From 77a0d129204f037f4c729ac4c6002cf77e561faf Mon Sep 17 00:00:00 2001 From: Booteille Date: Thu, 1 Aug 2024 17:06:04 +0200 Subject: [PATCH] Update lufi-api to last commit --- themes/default/public/js/lufi-api.browser.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/themes/default/public/js/lufi-api.browser.js b/themes/default/public/js/lufi-api.browser.js index b506d10..387c4de 100644 --- a/themes/default/public/js/lufi-api.browser.js +++ b/themes/default/public/js/lufi-api.browser.js @@ -1,11 +1,11 @@ -var w6=Object.create;var{defineProperty:b2,getPrototypeOf:y6,getOwnPropertyNames:$5,getOwnPropertyDescriptor:_6}=Object,j5=Object.prototype.hasOwnProperty;var g6=(E,I,F)=>{F=E!=null?w6(y6(E)):{};const L=I||!E||!E.__esModule?b2(F,"default",{value:E,enumerable:!0}):F;for(let H of $5(E))if(!j5.call(L,H))b2(L,H,{get:()=>E[H],enumerable:!0});return L},V5=(E)=>{const I=V5.moduleCache??=new WeakMap;var F=I.get(E);if(F)return F;var L=b2({},"__esModule",{value:!0}),H={enumerable:!1};if(E&&typeof E==="object"||typeof E==="function"){for(let k of $5(E))if(!j5.call(L,k))b2(L,k,{get:()=>E[k],enumerable:!(H=_6(E,k))||H.enumerable})}return I.set(E,L),L};var m6=(E,I)=>()=>(I||E((I={exports:{}}).exports,I),I.exports);var K5=(E,I)=>{for(var F in I)b2(E,F,{get:I[F],enumerable:!0,configurable:!0,set:(L)=>I[F]=()=>L})};var p6=(E,I)=>()=>(E&&(I=E(E=0)),I);var T6={};K5(T6,{webcrypto:()=>{{return i1}},timingSafeEqual:()=>{{return o2}},scryptSync:()=>{{return Z1}},scrypt:()=>{{return H1}},randomUUID:()=>{{return n1}},getRandomValues:()=>{{return a1}},getCurves:()=>{{return r1}},default:()=>{{return P6}},DEFAULT_ENCODING:()=>{{return y2}}});var r1,c6,Y1,d6,b6,l6,h6,L1,$0,J1,X1,N1,R2,W2,o6,u6,U2,l0,_2,c0,E2,U5,C1,s6,F5,g2,W5,P5,T5,M2,k1,l2,D1,G1,I1,f6,a6,D5,L5,n6,r6,i6,N5,B1,q1,m2,t6,e6,k5,X8,I5,G8,R1,O2,N2,E1,F2,z1,Z5,I2,B5,x2,v2,S2,Y8,p2,x1,v1,J8,S1,q5,Q1,R5,C8,k2,E5,x5,A1,z8,v5,Q8,H5,M1,S5,$8,q2,u2,j8,A5,M5,w5,V8,y5,_5,g5,m5,K8,p5,c5,P2,w1,d5,Z8,H8,O8,U8,F8,s2,W8,P8,T8,D8,L8,b5,O5,l5,y1,$1,N8,h5,o5,j1,k8,I8,_1,B8,q8,A2,u5,R8,E8,g1,s5,f5,x8,v8,S8,a5,A8,n5,c2,r5,i5,w2,m1,M8,w8,t5,e5,y8,_8,g8,p1,c1,m8,B2,X6,T2,V1,p8,c8,d8,G6,L2,f2,Y6,b8,J6,l8,C6,h8,o8,u8,s8,d1,f8,b1,a8,n8,r8,i8,t8,e8,X3,l1,z6,h1,o1,h2,u1,s1,Q6,G3,$6,j6,Y3,V6,J3,C3,z3,K6,Q3,$3,j3,V3,K1,Z6,K3,Z3,H3,O3,U3,H6,O6,f1,U6,F3,W3,P3,T3,F6,W6,D3,y2,a1,n1,L3,o2,Z1,H1,i1,P6;var D6=p6(()=>{r1=function(){return L3},c6=Object.create,Y1=Object.defineProperty,d6=Object.getOwnPropertyDescriptor,b6=Object.getOwnPropertyNames,l6=Object.getPrototypeOf,h6=Object.prototype.hasOwnProperty,L1=(E,I)=>()=>(E&&(I=E(E=0)),I),$0=(E,I)=>()=>(I||E((I={exports:{}}).exports,I),I.exports),J1=(E,I)=>{for(var F in I)Y1(E,F,{get:I[F],enumerable:!0})},X1=(E,I,F,L)=>{if(I&&typeof I=="object"||typeof I=="function")for(let H of b6(I))!h6.call(E,H)&&H!==F&&Y1(E,H,{get:()=>I[H],enumerable:!(L=d6(I,H))||L.enumerable});return E},N1=(E,I,F)=>(X1(E,I,"default"),F&&X1(F,I,"default")),R2=(E,I,F)=>(F=E!=null?c6(l6(E)):{},X1(I||!E||!E.__esModule?Y1(F,"default",{value:E,enumerable:!0}):F,E)),W2=(E)=>X1(Y1({},"__esModule",{value:!0}),E),o6=$0((E)=>{E.byteLength=N,E.toByteArray=W,E.fromByteArray=B;var I=[],F=[],L=typeof Uint8Array<"u"?Uint8Array:Array,H="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(k=0,Q=H.length;k0)throw new Error("Invalid string. Length must be a multiple of 4");var x=P.indexOf("=");x===-1&&(x=q);var w=x===q?0:4-x%4;return[x,w]}function N(P){var q=O(P),x=q[0],w=q[1];return(x+w)*3/4-w}function U(P,q,x){return(q+x)*3/4-x}function W(P){var q,x=O(P),w=x[0],M=x[1],y=new L(U(P,w,M)),m=0,c=M>0?w-4:w,l;for(l=0;l>16&255,y[m++]=q>>8&255,y[m++]=q&255;return M===2&&(q=F[P.charCodeAt(l)]<<2|F[P.charCodeAt(l+1)]>>4,y[m++]=q&255),M===1&&(q=F[P.charCodeAt(l)]<<10|F[P.charCodeAt(l+1)]<<4|F[P.charCodeAt(l+2)]>>2,y[m++]=q>>8&255,y[m++]=q&255),y}function Z(P){return I[P>>18&63]+I[P>>12&63]+I[P>>6&63]+I[P&63]}function T(P,q,x){for(var w,M=[],y=q;yc?c:m+y));return w===1?(q=P[x-1],M.push(I[q>>2]+I[q<<4&63]+"==")):w===2&&(q=(P[x-2]<<8)+P[x-1],M.push(I[q>>10]+I[q>>4&63]+I[q<<2&63]+"=")),M.join("")}}),u6=$0((E)=>{E.read=function(I,F,L,H,k){var Q,O,N=k*8-H-1,U=(1<>1,Z=-7,T=L?k-1:0,B=L?-1:1,P=I[F+T];for(T+=B,Q=P&(1<<-Z)-1,P>>=-Z,Z+=N;Z>0;Q=Q*256+I[F+T],T+=B,Z-=8);for(O=Q&(1<<-Z)-1,Q>>=-Z,Z+=H;Z>0;O=O*256+I[F+T],T+=B,Z-=8);if(Q===0)Q=1-W;else{if(Q===U)return O?NaN:(P?-1:1)*(1/0);O=O+Math.pow(2,H),Q=Q-W}return(P?-1:1)*O*Math.pow(2,Q-H)},E.write=function(I,F,L,H,k,Q){var O,N,U,W=Q*8-k-1,Z=(1<>1,B=k===23?Math.pow(2,-24)-Math.pow(2,-77):0,P=H?0:Q-1,q=H?1:-1,x=F<0||F===0&&1/F<0?1:0;for(F=Math.abs(F),isNaN(F)||F===1/0?(N=isNaN(F)?1:0,O=Z):(O=Math.floor(Math.log(F)/Math.LN2),F*(U=Math.pow(2,-O))<1&&(O--,U*=2),O+T>=1?F+=B/U:F+=B*Math.pow(2,1-T),F*U>=2&&(O++,U/=2),O+T>=Z?(N=0,O=Z):O+T>=1?(N=(F*U-1)*Math.pow(2,k),O=O+T):(N=F*Math.pow(2,T-1)*Math.pow(2,k),O=0));k>=8;I[L+P]=N&255,P+=q,N/=256,k-=8);for(O=O<0;I[L+P]=O&255,P+=q,O/=256,W-=8);I[L+P-q]|=x*128}}),U2=$0((E)=>{var I=o6(),F=u6(),L=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;E.Buffer=O,E.SlowBuffer=M,E.INSPECT_MAX_BYTES=50;var H=2147483647;E.kMaxLength=H,O.TYPED_ARRAY_SUPPORT=k(),!O.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 k(){try{let D=new Uint8Array(1),S={foo:function(){return 42}};return Object.setPrototypeOf(S,Uint8Array.prototype),Object.setPrototypeOf(D,S),D.foo()===42}catch{return!1}}Object.defineProperty(O.prototype,"parent",{enumerable:!0,get:function(){if(O.isBuffer(this))return this.buffer}}),Object.defineProperty(O.prototype,"offset",{enumerable:!0,get:function(){if(O.isBuffer(this))return this.byteOffset}});function Q(D){if(D>H)throw new RangeError('The value "'+D+'" is invalid for option "size"');let S=new Uint8Array(D);return Object.setPrototypeOf(S,O.prototype),S}function O(D,S,d){if(typeof D=="number"){if(typeof S=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Z(D)}return N(D,S,d)}O.poolSize=8192;function N(D,S,d){if(typeof D=="string")return T(D,S);if(ArrayBuffer.isView(D))return P(D);if(D==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof D);if(V0(D,ArrayBuffer)||D&&V0(D.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(V0(D,SharedArrayBuffer)||D&&V0(D.buffer,SharedArrayBuffer)))return q(D,S,d);if(typeof D=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let h=D.valueOf&&D.valueOf();if(h!=null&&h!==D)return O.from(h,S,d);let u=x(D);if(u)return u;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof D[Symbol.toPrimitive]=="function")return O.from(D[Symbol.toPrimitive]("string"),S,d);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof D)}O.from=function(D,S,d){return N(D,S,d)},Object.setPrototypeOf(O.prototype,Uint8Array.prototype),Object.setPrototypeOf(O,Uint8Array);function U(D){if(typeof D!="number")throw new TypeError('"size" argument must be of type number');if(D<0)throw new RangeError('The value "'+D+'" is invalid for option "size"')}function W(D,S,d){return U(D),D<=0?Q(D):S!==void 0?typeof d=="string"?Q(D).fill(S,d):Q(D).fill(S):Q(D)}O.alloc=function(D,S,d){return W(D,S,d)};function Z(D){return U(D),Q(D<0?0:w(D)|0)}O.allocUnsafe=function(D){return Z(D)},O.allocUnsafeSlow=function(D){return Z(D)};function T(D,S){if((typeof S!="string"||S==="")&&(S="utf8"),!O.isEncoding(S))throw new TypeError("Unknown encoding: "+S);let d=y(D,S)|0,h=Q(d),u=h.write(D,S);return u!==d&&(h=h.slice(0,u)),h}function B(D){let S=D.length<0?0:w(D.length)|0,d=Q(S);for(let h=0;h=H)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+H.toString(16)+" bytes");return D|0}function M(D){return+D!=D&&(D=0),O.alloc(+D)}O.isBuffer=function(D){return D!=null&&D._isBuffer===!0&&D!==O.prototype},O.compare=function(D,S){if(V0(D,Uint8Array)&&(D=O.from(D,D.offset,D.byteLength)),V0(S,Uint8Array)&&(S=O.from(S,S.offset,S.byteLength)),!O.isBuffer(D)||!O.isBuffer(S))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(D===S)return 0;let d=D.length,h=S.length;for(let u=0,P0=Math.min(d,h);uh.length?(O.isBuffer(P0)||(P0=O.from(P0)),P0.copy(h,u)):Uint8Array.prototype.set.call(h,P0,u);else if(O.isBuffer(P0))P0.copy(h,u);else throw new TypeError('"list" argument must be an Array of Buffers');u+=P0.length}return h};function y(D,S){if(O.isBuffer(D))return D.length;if(ArrayBuffer.isView(D)||V0(D,ArrayBuffer))return D.byteLength;if(typeof D!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof D);let d=D.length,h=arguments.length>2&&arguments[2]===!0;if(!h&&d===0)return 0;let u=!1;for(;;)switch(S){case"ascii":case"latin1":case"binary":return d;case"utf8":case"utf-8":return e(D).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return d*2;case"hex":return d>>>1;case"base64":return y0(D).length;default:if(u)return h?-1:e(D).length;S=(""+S).toLowerCase(),u=!0}}O.byteLength=y;function m(D,S,d){let h=!1;if((S===void 0||S<0)&&(S=0),S>this.length||((d===void 0||d>this.length)&&(d=this.length),d<=0)||(d>>>=0,S>>>=0,d<=S))return"";for(D||(D="utf8");;)switch(D){case"hex":return $(this,S,d);case"utf8":case"utf-8":return C(this,S,d);case"ascii":return V(this,S,d);case"latin1":case"binary":return K(this,S,d);case"base64":return Y(this,S,d);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(this,S,d);default:if(h)throw new TypeError("Unknown encoding: "+D);D=(D+"").toLowerCase(),h=!0}}O.prototype._isBuffer=!0;function c(D,S,d){let h=D[S];D[S]=D[d],D[d]=h}O.prototype.swap16=function(){let D=this.length;if(D%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let S=0;SS&&(D+=" ... "),""},L&&(O.prototype[L]=O.prototype.inspect),O.prototype.compare=function(D,S,d,h,u){if(V0(D,Uint8Array)&&(D=O.from(D,D.offset,D.byteLength)),!O.isBuffer(D))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof D);if(S===void 0&&(S=0),d===void 0&&(d=D?D.length:0),h===void 0&&(h=0),u===void 0&&(u=this.length),S<0||d>D.length||h<0||u>this.length)throw new RangeError("out of range index");if(h>=u&&S>=d)return 0;if(h>=u)return-1;if(S>=d)return 1;if(S>>>=0,d>>>=0,h>>>=0,u>>>=0,this===D)return 0;let P0=u-h,J0=d-S,H0=Math.min(P0,J0),d0=this.slice(h,u),U0=D.slice(S,d);for(let O0=0;O02147483647?d=2147483647:d<-2147483648&&(d=-2147483648),d=+d,_0(d)&&(d=u?0:D.length-1),d<0&&(d=D.length+d),d>=D.length){if(u)return-1;d=D.length-1}else if(d<0)if(u)d=0;else return-1;if(typeof S=="string"&&(S=O.from(S,h)),O.isBuffer(S))return S.length===0?-1:n(D,S,d,h,u);if(typeof S=="number")return S=S&255,typeof Uint8Array.prototype.indexOf=="function"?u?Uint8Array.prototype.indexOf.call(D,S,d):Uint8Array.prototype.lastIndexOf.call(D,S,d):n(D,[S],d,h,u);throw new TypeError("val must be string, number or Buffer")}function n(D,S,d,h,u){let P0=1,J0=D.length,H0=S.length;if(h!==void 0&&(h=String(h).toLowerCase(),h==="ucs2"||h==="ucs-2"||h==="utf16le"||h==="utf-16le")){if(D.length<2||S.length<2)return-1;P0=2,J0/=2,H0/=2,d/=2}function d0(O0,g0){return P0===1?O0[g0]:O0.readUInt16BE(g0*P0)}let U0;if(u){let O0=-1;for(U0=d;U0J0&&(d=J0-H0),U0=d;U0>=0;U0--){let O0=!0;for(let g0=0;g0u&&(h=u)):h=u;let P0=S.length;h>P0/2&&(h=P0/2);let J0;for(J0=0;J0>>0,isFinite(d)?(d=d>>>0,h===void 0&&(h="utf8")):(h=d,d=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let u=this.length-S;if((d===void 0||d>u)&&(d=u),D.length>0&&(d<0||S<0)||S>this.length)throw new RangeError("Attempt to write outside buffer bounds");h||(h="utf8");let P0=!1;for(;;)switch(h){case"hex":return i(this,D,S,d);case"utf8":case"utf-8":return C0(this,D,S,d);case"ascii":case"latin1":case"binary":return a(this,D,S,d);case"base64":return K0(this,D,S,d);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X(this,D,S,d);default:if(P0)throw new TypeError("Unknown encoding: "+h);h=(""+h).toLowerCase(),P0=!0}},O.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Y(D,S,d){return S===0&&d===D.length?I.fromByteArray(D):I.fromByteArray(D.slice(S,d))}function C(D,S,d){d=Math.min(D.length,d);let h=[],u=S;for(;u239?4:P0>223?3:P0>191?2:1;if(u+H0<=d){let d0,U0,O0,g0;switch(H0){case 1:P0<128&&(J0=P0);break;case 2:d0=D[u+1],(d0&192)===128&&(g0=(P0&31)<<6|d0&63,g0>127&&(J0=g0));break;case 3:d0=D[u+1],U0=D[u+2],(d0&192)===128&&(U0&192)===128&&(g0=(P0&15)<<12|(d0&63)<<6|U0&63,g0>2047&&(g0<55296||g0>57343)&&(J0=g0));break;case 4:d0=D[u+1],U0=D[u+2],O0=D[u+3],(d0&192)===128&&(U0&192)===128&&(O0&192)===128&&(g0=(P0&15)<<18|(d0&63)<<12|(U0&63)<<6|O0&63,g0>65535&&g0<1114112&&(J0=g0))}}J0===null?(J0=65533,H0=1):J0>65535&&(J0-=65536,h.push(J0>>>10&1023|55296),J0=56320|J0&1023),h.push(J0),u+=H0}return z(h)}var J=4096;function z(D){let S=D.length;if(S<=J)return String.fromCharCode.apply(String,D);let d="",h=0;for(;hh)&&(d=h);let u="";for(let P0=S;P0d&&(D=d),S<0?(S+=d,S<0&&(S=0)):S>d&&(S=d),Sd)throw new RangeError("Trying to access beyond buffer length")}O.prototype.readUintLE=O.prototype.readUIntLE=function(D,S,d){D=D>>>0,S=S>>>0,d||j(D,S,this.length);let h=this[D],u=1,P0=0;for(;++P0>>0,S=S>>>0,d||j(D,S,this.length);let h=this[D+--S],u=1;for(;S>0&&(u*=256);)h+=this[D+--S]*u;return h},O.prototype.readUint8=O.prototype.readUInt8=function(D,S){return D=D>>>0,S||j(D,1,this.length),this[D]},O.prototype.readUint16LE=O.prototype.readUInt16LE=function(D,S){return D=D>>>0,S||j(D,2,this.length),this[D]|this[D+1]<<8},O.prototype.readUint16BE=O.prototype.readUInt16BE=function(D,S){return D=D>>>0,S||j(D,2,this.length),this[D]<<8|this[D+1]},O.prototype.readUint32LE=O.prototype.readUInt32LE=function(D,S){return D=D>>>0,S||j(D,4,this.length),(this[D]|this[D+1]<<8|this[D+2]<<16)+this[D+3]*16777216},O.prototype.readUint32BE=O.prototype.readUInt32BE=function(D,S){return D=D>>>0,S||j(D,4,this.length),this[D]*16777216+(this[D+1]<<16|this[D+2]<<8|this[D+3])},O.prototype.readBigUInt64LE=Z0(function(D){D=D>>>0,z0(D,"offset");let S=this[D],d=this[D+7];(S===void 0||d===void 0)&&g(D,this.length-8);let h=S+this[++D]*256+this[++D]*65536+this[++D]*16777216,u=this[++D]+this[++D]*256+this[++D]*65536+d*16777216;return BigInt(h)+(BigInt(u)<>>0,z0(D,"offset");let S=this[D],d=this[D+7];(S===void 0||d===void 0)&&g(D,this.length-8);let h=S*16777216+this[++D]*65536+this[++D]*256+this[++D],u=this[++D]*16777216+this[++D]*65536+this[++D]*256+d;return(BigInt(h)<>>0,S=S>>>0,d||j(D,S,this.length);let h=this[D],u=1,P0=0;for(;++P0=u&&(h-=Math.pow(2,8*S)),h},O.prototype.readIntBE=function(D,S,d){D=D>>>0,S=S>>>0,d||j(D,S,this.length);let h=S,u=1,P0=this[D+--h];for(;h>0&&(u*=256);)P0+=this[D+--h]*u;return u*=128,P0>=u&&(P0-=Math.pow(2,8*S)),P0},O.prototype.readInt8=function(D,S){return D=D>>>0,S||j(D,1,this.length),this[D]&128?(255-this[D]+1)*-1:this[D]},O.prototype.readInt16LE=function(D,S){D=D>>>0,S||j(D,2,this.length);let d=this[D]|this[D+1]<<8;return d&32768?d|4294901760:d},O.prototype.readInt16BE=function(D,S){D=D>>>0,S||j(D,2,this.length);let d=this[D+1]|this[D]<<8;return d&32768?d|4294901760:d},O.prototype.readInt32LE=function(D,S){return D=D>>>0,S||j(D,4,this.length),this[D]|this[D+1]<<8|this[D+2]<<16|this[D+3]<<24},O.prototype.readInt32BE=function(D,S){return D=D>>>0,S||j(D,4,this.length),this[D]<<24|this[D+1]<<16|this[D+2]<<8|this[D+3]},O.prototype.readBigInt64LE=Z0(function(D){D=D>>>0,z0(D,"offset");let S=this[D],d=this[D+7];(S===void 0||d===void 0)&&g(D,this.length-8);let h=this[D+4]+this[D+5]*256+this[D+6]*65536+(d<<24);return(BigInt(h)<>>0,z0(D,"offset");let S=this[D],d=this[D+7];(S===void 0||d===void 0)&&g(D,this.length-8);let h=(S<<24)+this[++D]*65536+this[++D]*256+this[++D];return(BigInt(h)<>>0,S||j(D,4,this.length),F.read(this,D,!0,23,4)},O.prototype.readFloatBE=function(D,S){return D=D>>>0,S||j(D,4,this.length),F.read(this,D,!1,23,4)},O.prototype.readDoubleLE=function(D,S){return D=D>>>0,S||j(D,8,this.length),F.read(this,D,!0,52,8)},O.prototype.readDoubleBE=function(D,S){return D=D>>>0,S||j(D,8,this.length),F.read(this,D,!1,52,8)};function A(D,S,d,h,u,P0){if(!O.isBuffer(D))throw new TypeError('"buffer" argument must be a Buffer instance');if(S>u||SD.length)throw new RangeError("Index out of range")}O.prototype.writeUintLE=O.prototype.writeUIntLE=function(D,S,d,h){if(D=+D,S=S>>>0,d=d>>>0,!h){let J0=Math.pow(2,8*d)-1;A(this,D,S,d,J0,0)}let u=1,P0=0;for(this[S]=D&255;++P0>>0,d=d>>>0,!h){let J0=Math.pow(2,8*d)-1;A(this,D,S,d,J0,0)}let u=d-1,P0=1;for(this[S+u]=D&255;--u>=0&&(P0*=256);)this[S+u]=D/P0&255;return S+d},O.prototype.writeUint8=O.prototype.writeUInt8=function(D,S,d){return D=+D,S=S>>>0,d||A(this,D,S,1,255,0),this[S]=D&255,S+1},O.prototype.writeUint16LE=O.prototype.writeUInt16LE=function(D,S,d){return D=+D,S=S>>>0,d||A(this,D,S,2,65535,0),this[S]=D&255,this[S+1]=D>>>8,S+2},O.prototype.writeUint16BE=O.prototype.writeUInt16BE=function(D,S,d){return D=+D,S=S>>>0,d||A(this,D,S,2,65535,0),this[S]=D>>>8,this[S+1]=D&255,S+2},O.prototype.writeUint32LE=O.prototype.writeUInt32LE=function(D,S,d){return D=+D,S=S>>>0,d||A(this,D,S,4,4294967295,0),this[S+3]=D>>>24,this[S+2]=D>>>16,this[S+1]=D>>>8,this[S]=D&255,S+4},O.prototype.writeUint32BE=O.prototype.writeUInt32BE=function(D,S,d){return D=+D,S=S>>>0,d||A(this,D,S,4,4294967295,0),this[S]=D>>>24,this[S+1]=D>>>16,this[S+2]=D>>>8,this[S+3]=D&255,S+4};function R(D,S,d,h,u){X0(S,h,u,D,d,7);let P0=Number(S&BigInt(4294967295));D[d++]=P0,P0=P0>>8,D[d++]=P0,P0=P0>>8,D[d++]=P0,P0=P0>>8,D[d++]=P0;let J0=Number(S>>BigInt(32)&BigInt(4294967295));return D[d++]=J0,J0=J0>>8,D[d++]=J0,J0=J0>>8,D[d++]=J0,J0=J0>>8,D[d++]=J0,d}function _(D,S,d,h,u){X0(S,h,u,D,d,7);let P0=Number(S&BigInt(4294967295));D[d+7]=P0,P0=P0>>8,D[d+6]=P0,P0=P0>>8,D[d+5]=P0,P0=P0>>8,D[d+4]=P0;let J0=Number(S>>BigInt(32)&BigInt(4294967295));return D[d+3]=J0,J0=J0>>8,D[d+2]=J0,J0=J0>>8,D[d+1]=J0,J0=J0>>8,D[d]=J0,d+8}O.prototype.writeBigUInt64LE=Z0(function(D,S=0){return R(this,D,S,BigInt(0),BigInt("0xffffffffffffffff"))}),O.prototype.writeBigUInt64BE=Z0(function(D,S=0){return _(this,D,S,BigInt(0),BigInt("0xffffffffffffffff"))}),O.prototype.writeIntLE=function(D,S,d,h){if(D=+D,S=S>>>0,!h){let H0=Math.pow(2,8*d-1);A(this,D,S,d,H0-1,-H0)}let u=0,P0=1,J0=0;for(this[S]=D&255;++u>0)-J0&255;return S+d},O.prototype.writeIntBE=function(D,S,d,h){if(D=+D,S=S>>>0,!h){let H0=Math.pow(2,8*d-1);A(this,D,S,d,H0-1,-H0)}let u=d-1,P0=1,J0=0;for(this[S+u]=D&255;--u>=0&&(P0*=256);)D<0&&J0===0&&this[S+u+1]!==0&&(J0=1),this[S+u]=(D/P0>>0)-J0&255;return S+d},O.prototype.writeInt8=function(D,S,d){return D=+D,S=S>>>0,d||A(this,D,S,1,127,-128),D<0&&(D=255+D+1),this[S]=D&255,S+1},O.prototype.writeInt16LE=function(D,S,d){return D=+D,S=S>>>0,d||A(this,D,S,2,32767,-32768),this[S]=D&255,this[S+1]=D>>>8,S+2},O.prototype.writeInt16BE=function(D,S,d){return D=+D,S=S>>>0,d||A(this,D,S,2,32767,-32768),this[S]=D>>>8,this[S+1]=D&255,S+2},O.prototype.writeInt32LE=function(D,S,d){return D=+D,S=S>>>0,d||A(this,D,S,4,2147483647,-2147483648),this[S]=D&255,this[S+1]=D>>>8,this[S+2]=D>>>16,this[S+3]=D>>>24,S+4},O.prototype.writeInt32BE=function(D,S,d){return D=+D,S=S>>>0,d||A(this,D,S,4,2147483647,-2147483648),D<0&&(D=4294967295+D+1),this[S]=D>>>24,this[S+1]=D>>>16,this[S+2]=D>>>8,this[S+3]=D&255,S+4},O.prototype.writeBigInt64LE=Z0(function(D,S=0){return R(this,D,S,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),O.prototype.writeBigInt64BE=Z0(function(D,S=0){return _(this,D,S,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function s(D,S,d,h,u,P0){if(d+h>D.length)throw new RangeError("Index out of range");if(d<0)throw new RangeError("Index out of range")}function r(D,S,d,h,u){return S=+S,d=d>>>0,u||s(D,S,d,4,340282346638528860000000000000000000000,-340282346638528860000000000000000000000),F.write(D,S,d,h,23,4),d+4}O.prototype.writeFloatLE=function(D,S,d){return r(this,D,S,!0,d)},O.prototype.writeFloatBE=function(D,S,d){return r(this,D,S,!1,d)};function Y0(D,S,d,h,u){return S=+S,d=d>>>0,u||s(D,S,d,8,179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,-179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),F.write(D,S,d,h,52,8),d+8}O.prototype.writeDoubleLE=function(D,S,d){return Y0(this,D,S,!0,d)},O.prototype.writeDoubleBE=function(D,S,d){return Y0(this,D,S,!1,d)},O.prototype.copy=function(D,S,d,h){if(!O.isBuffer(D))throw new TypeError("argument should be a Buffer");if(d||(d=0),!h&&h!==0&&(h=this.length),S>=D.length&&(S=D.length),S||(S=0),h>0&&h=this.length)throw new RangeError("Index out of range");if(h<0)throw new RangeError("sourceEnd out of bounds");h>this.length&&(h=this.length),D.length-S>>0,d=d===void 0?this.length:d>>>0,D||(D=0);let u;if(typeof D=="number")for(u=S;u4294967296?u=f(String(d)):typeof d=="bigint"&&(u=String(d),(d>BigInt(2)**BigInt(32)||d<-(BigInt(2)**BigInt(32)))&&(u=f(u)),u+="n"),h+=` It must be ${S}. Received ${u}`,h},RangeError);function f(D){let S="",d=D.length,h=D[0]==="-"?1:0;for(;d>=h+4;d-=3)S=`_${D.slice(d-3,d)}${S}`;return`${D.slice(0,d)}${S}`}function W0(D,S,d){z0(S,"offset"),(D[S]===void 0||D[S+d]===void 0)&&g(S,D.length-(d+1))}function X0(D,S,d,h,u,P0){if(D>d||D3?S===0||S===BigInt(0)?H0=`>= 0${J0} and < 2${J0} ** ${(P0+1)*8}${J0}`:H0=`>= -(2${J0} ** ${(P0+1)*8-1}${J0}) and < 2 ** ${(P0+1)*8-1}${J0}`:H0=`>= ${S}${J0} and <= ${d}${J0}`,new o.ERR_OUT_OF_RANGE("value",H0,D)}W0(h,u,P0)}function z0(D,S){if(typeof D!="number")throw new o.ERR_INVALID_ARG_TYPE(S,"number",D)}function g(D,S,d){throw Math.floor(D)!==D?(z0(D,d),new o.ERR_OUT_OF_RANGE(d||"offset","an integer",D)):S<0?new o.ERR_BUFFER_OUT_OF_BOUNDS:new o.ERR_OUT_OF_RANGE(d||"offset",`>= ${d?1:0} and <= ${S}`,D)}var v=/[^+/0-9A-Za-z-_]/g;function p(D){if(D=D.split("=")[0],D=D.trim().replace(v,""),D.length<2)return"";for(;D.length%4!==0;)D=D+"=";return D}function e(D,S){S=S||1/0;let d,h=D.length,u=null,P0=[];for(let J0=0;J055295&&d<57344){if(!u){if(d>56319){(S-=3)>-1&&P0.push(239,191,189);continue}else if(J0+1===h){(S-=3)>-1&&P0.push(239,191,189);continue}u=d;continue}if(d<56320){(S-=3)>-1&&P0.push(239,191,189),u=d;continue}d=(u-55296<<10|d-56320)+65536}else u&&(S-=3)>-1&&P0.push(239,191,189);if(u=null,d<128){if((S-=1)<0)break;P0.push(d)}else if(d<2048){if((S-=2)<0)break;P0.push(d>>6|192,d&63|128)}else if(d<65536){if((S-=3)<0)break;P0.push(d>>12|224,d>>6&63|128,d&63|128)}else if(d<1114112){if((S-=4)<0)break;P0.push(d>>18|240,d>>12&63|128,d>>6&63|128,d&63|128)}else throw new Error("Invalid code point")}return P0}function G0(D){let S=[];for(let d=0;d>8,u=d%256,P0.push(u),P0.push(h);return P0}function y0(D){return I.toByteArray(p(D))}function Q0(D,S,d,h){let u;for(u=0;u=S.length||u>=D.length);++u)S[u+d]=D[u];return u}function V0(D,S){return D instanceof S||D!=null&&D.constructor!=null&&D.constructor.name!=null&&D.constructor.name===S.name}function _0(D){return D!==D}var F0=function(){let D="0123456789abcdef",S=new Array(256);for(let d=0;d<16;++d){let h=d*16;for(let u=0;u<16;++u)S[h+u]=D[d]+D[u]}return S}();function Z0(D){return typeof BigInt>"u"?b0:D}function b0(){throw new Error("BigInt not supported")}}),l0=$0((E,I)=>{var F=U2(),L=F.Buffer;function H(Q,O){for(var N in Q)O[N]=Q[N]}L.from&&L.alloc&&L.allocUnsafe&&L.allocUnsafeSlow?I.exports=F:(H(F,E),E.Buffer=k);function k(Q,O,N){return L(Q,O,N)}k.prototype=Object.create(L.prototype),H(L,k),k.from=function(Q,O,N){if(typeof Q=="number")throw new TypeError("Argument must not be a number");return L(Q,O,N)},k.alloc=function(Q,O,N){if(typeof Q!="number")throw new TypeError("Argument must be a number");var U=L(Q);return O!==void 0?typeof N=="string"?U.fill(O,N):U.fill(O):U.fill(0),U},k.allocUnsafe=function(Q){if(typeof Q!="number")throw new TypeError("Argument must be a number");return L(Q)},k.allocUnsafeSlow=function(Q){if(typeof Q!="number")throw new TypeError("Argument must be a number");return F.SlowBuffer(Q)}}),_2=$0((E,I)=>{var F=65536,L=4294967295;function H(){throw new Error(`Secure random number generation is not supported by this browser. -Use Chrome, Firefox or Internet Explorer 11`)}var k=l0().Buffer,Q=global.crypto||global.msCrypto;Q&&Q.getRandomValues?I.exports=O:I.exports=H;function O(N,U){if(N>L)throw new RangeError("requested too many random bytes");var W=k.allocUnsafe(N);if(N>0)if(N>F)for(var Z=0;Z{typeof Object.create=="function"?I.exports=function(F,L){L&&(F.super_=L,F.prototype=Object.create(L.prototype,{constructor:{value:F,enumerable:!1,writable:!0,configurable:!0}}))}:I.exports=function(F,L){if(L){F.super_=L;var H=function(){};H.prototype=L.prototype,F.prototype=new H,F.prototype.constructor=F}}}),E2=$0((E,I)=>{var F=typeof Reflect=="object"?Reflect:null,L=F&&typeof F.apply=="function"?F.apply:function(l,n,i){return Function.prototype.apply.call(l,n,i)},H;F&&typeof F.ownKeys=="function"?H=F.ownKeys:Object.getOwnPropertySymbols?H=function(l){return Object.getOwnPropertyNames(l).concat(Object.getOwnPropertySymbols(l))}:H=function(l){return Object.getOwnPropertyNames(l)};function k(l){console&&console.warn&&console.warn(l)}var Q=Number.isNaN||function(l){return l!==l};function O(){O.init.call(this)}I.exports=O,I.exports.once=y,O.EventEmitter=O,O.prototype._events=void 0,O.prototype._eventsCount=0,O.prototype._maxListeners=void 0;var N=10;function U(l){if(typeof l!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof l)}Object.defineProperty(O,"defaultMaxListeners",{enumerable:!0,get:function(){return N},set:function(l){if(typeof l!="number"||l<0||Q(l))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+l+".");N=l}}),O.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},O.prototype.setMaxListeners=function(l){if(typeof l!="number"||l<0||Q(l))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+l+".");return this._maxListeners=l,this};function W(l){return l._maxListeners===void 0?O.defaultMaxListeners:l._maxListeners}O.prototype.getMaxListeners=function(){return W(this)},O.prototype.emit=function(l){for(var n=[],i=1;i0&&(K0=n[0]),K0 instanceof Error)throw K0;var X=new Error("Unhandled error."+(K0?" ("+K0.message+")":""));throw X.context=K0,X}var Y=a[l];if(Y===void 0)return!1;if(typeof Y=="function")L(Y,this,n);else for(var C=Y.length,J=x(Y,C),i=0;i0&&X.length>a&&!X.warned){X.warned=!0;var Y=new Error("Possible EventEmitter memory leak detected. "+X.length+" "+String(n)+" listeners added. Use emitter.setMaxListeners() to increase limit");Y.name="MaxListenersExceededWarning",Y.emitter=l,Y.type=n,Y.count=X.length,k(Y)}return l}O.prototype.addListener=function(l,n){return Z(this,l,n,!1)},O.prototype.on=O.prototype.addListener,O.prototype.prependListener=function(l,n){return Z(this,l,n,!0)};function T(){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 B(l,n,i){var C0={fired:!1,wrapFn:void 0,target:l,type:n,listener:i},a=T.bind(C0);return a.listener=i,C0.wrapFn=a,a}O.prototype.once=function(l,n){return U(n),this.on(l,B(this,l,n)),this},O.prototype.prependOnceListener=function(l,n){return U(n),this.prependListener(l,B(this,l,n)),this},O.prototype.removeListener=function(l,n){var i,C0,a,K0,X;if(U(n),C0=this._events,C0===void 0)return this;if(i=C0[l],i===void 0)return this;if(i===n||i.listener===n)--this._eventsCount===0?this._events=Object.create(null):(delete C0[l],C0.removeListener&&this.emit("removeListener",l,i.listener||n));else if(typeof i!="function"){for(a=-1,K0=i.length-1;K0>=0;K0--)if(i[K0]===n||i[K0].listener===n){X=i[K0].listener,a=K0;break}if(a<0)return this;a===0?i.shift():w(i,a),i.length===1&&(C0[l]=i[0]),C0.removeListener!==void 0&&this.emit("removeListener",l,X||n)}return this},O.prototype.off=O.prototype.removeListener,O.prototype.removeAllListeners=function(l){var n,i,C0;if(i=this._events,i===void 0)return this;if(i.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):i[l]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete i[l]),this;if(arguments.length===0){var a=Object.keys(i),K0;for(C0=0;C0=0;C0--)this.removeListener(l,n[C0]);return this};function P(l,n,i){var C0=l._events;if(C0===void 0)return[];var a=C0[n];return a===void 0?[]:typeof a=="function"?i?[a.listener||a]:[a]:i?M(a):x(a,a.length)}O.prototype.listeners=function(l){return P(this,l,!0)},O.prototype.rawListeners=function(l){return P(this,l,!1)},O.listenerCount=function(l,n){return typeof l.listenerCount=="function"?l.listenerCount(n):q.call(l,n)},O.prototype.listenerCount=q;function q(l){var n=this._events;if(n!==void 0){var i=n[l];if(typeof i=="function")return 1;if(i!==void 0)return i.length}return 0}O.prototype.eventNames=function(){return this._eventsCount>0?H(this._events):[]};function x(l,n){for(var i=new Array(n),C0=0;C0{I.exports=E2().EventEmitter}),C1=$0(()=>{}),s6=$0((E,I)=>{function F(P,q){var x=Object.keys(P);if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(P);q&&(w=w.filter(function(M){return Object.getOwnPropertyDescriptor(P,M).enumerable})),x.push.apply(x,w)}return x}function L(P){for(var q=1;q0?this.tail.next=x:this.head=x,this.tail=x,++this.length}},{key:"unshift",value:function(q){var x={data:q,next:this.head};this.length===0&&(this.tail=x),this.head=x,++this.length}},{key:"shift",value:function(){if(this.length!==0){var q=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,q}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(q){if(this.length===0)return"";for(var x=this.head,w=""+x.data;x=x.next;)w+=q+x.data;return w}},{key:"concat",value:function(q){if(this.length===0)return U.alloc(0);for(var x=U.allocUnsafe(q>>>0),w=this.head,M=0;w;)B(w.data,x,M),M+=w.data.length,w=w.next;return x}},{key:"consume",value:function(q,x){var w;return qy.length?y.length:q;if(m===y.length?M+=y:M+=y.slice(0,q),q-=m,q===0){m===y.length?(++w,x.next?this.head=x.next:this.head=this.tail=null):(this.head=x,x.data=y.slice(m));break}++w}return this.length-=w,M}},{key:"_getBuffer",value:function(q){var x=U.allocUnsafe(q),w=this.head,M=1;for(w.data.copy(x),q-=w.data.length;w=w.next;){var y=w.data,m=q>y.length?y.length:q;if(y.copy(x,x.length-q,0,m),q-=m,q===0){m===y.length?(++M,w.next?this.head=w.next:this.head=this.tail=null):(this.head=w,w.data=y.slice(m));break}++M}return this.length-=M,x}},{key:T,value:function(q,x){return Z(this,L({},x,{depth:0,customInspect:!1}))}}]),P}()}),F5=$0((E,I)=>{function F(N,U){var W=this,Z=this._readableState&&this._readableState.destroyed,T=this._writableState&&this._writableState.destroyed;return Z||T?(U?U(N):N&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(Q,this,N)):process.nextTick(Q,this,N)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(N||null,function(B){!U&&B?W._writableState?W._writableState.errorEmitted?process.nextTick(H,W):(W._writableState.errorEmitted=!0,process.nextTick(L,W,B)):process.nextTick(L,W,B):U?(process.nextTick(H,W),U(B)):process.nextTick(H,W)}),this)}function L(N,U){Q(N,U),H(N)}function H(N){N._writableState&&!N._writableState.emitClose||N._readableState&&!N._readableState.emitClose||N.emit("close")}function k(){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 Q(N,U){N.emit("error",U)}function O(N,U){var{_readableState:W,_writableState:Z}=N;W&&W.autoDestroy||Z&&Z.autoDestroy?N.destroy(U):N.emit("error",U)}I.exports={destroy:F,undestroy:k,errorOrDestroy:O}}),g2=$0((E,I)=>{function F(U,W){U.prototype=Object.create(W.prototype),U.prototype.constructor=U,U.__proto__=W}var L={};function H(U,W,Z){Z||(Z=Error);function T(P,q,x){return typeof W=="string"?W:W(P,q,x)}var B=function(P){F(q,P);function q(x,w,M){return P.call(this,T(x,w,M))||this}return q}(Z);B.prototype.name=Z.name,B.prototype.code=U,L[U]=B}function k(U,W){if(Array.isArray(U)){var Z=U.length;return U=U.map(function(T){return String(T)}),Z>2?"one of ".concat(W," ").concat(U.slice(0,Z-1).join(", "),", or ")+U[Z-1]:Z===2?"one of ".concat(W," ").concat(U[0]," or ").concat(U[1]):"of ".concat(W," ").concat(U[0])}else return"of ".concat(W," ").concat(String(U))}function Q(U,W,Z){return U.substr(!Z||Z<0?0:+Z,W.length)===W}function O(U,W,Z){return(Z===void 0||Z>U.length)&&(Z=U.length),U.substring(Z-W.length,Z)===W}function N(U,W,Z){return typeof Z!="number"&&(Z=0),Z+W.length>U.length?!1:U.indexOf(W,Z)!==-1}H("ERR_INVALID_OPT_VALUE",function(U,W){return'The value "'+W+'" is invalid for option "'+U+'"'},TypeError),H("ERR_INVALID_ARG_TYPE",function(U,W,Z){var T;typeof W=="string"&&Q(W,"not ")?(T="must not be",W=W.replace(/^not /,"")):T="must be";var B;if(O(U," argument"))B="The ".concat(U," ").concat(T," ").concat(k(W,"type"));else{var P=N(U,".")?"property":"argument";B='The "'.concat(U,'" ').concat(P," ").concat(T," ").concat(k(W,"type"))}return B+=". Received type ".concat(typeof Z),B},TypeError),H("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),H("ERR_METHOD_NOT_IMPLEMENTED",function(U){return"The "+U+" method is not implemented"}),H("ERR_STREAM_PREMATURE_CLOSE","Premature close"),H("ERR_STREAM_DESTROYED",function(U){return"Cannot call "+U+" after a stream was destroyed"}),H("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),H("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),H("ERR_STREAM_WRITE_AFTER_END","write after end"),H("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),H("ERR_UNKNOWN_ENCODING",function(U){return"Unknown encoding: "+U},TypeError),H("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),I.exports.codes=L}),W5=$0((E,I)=>{var F=g2().codes.ERR_INVALID_OPT_VALUE;function L(k,Q,O){return k.highWaterMark!=null?k.highWaterMark:Q?k[O]:null}function H(k,Q,O,N){var U=L(Q,N,O);if(U!=null){if(!(isFinite(U)&&Math.floor(U)===U)||U<0){var W=N?O:"highWaterMark";throw new F(W,U)}return Math.floor(U)}return k.objectMode?16:16384}I.exports={getHighWaterMark:H}}),P5=$0((E,I)=>{I.exports=F;function F(H,k){if(L("noDeprecation"))return H;var Q=!1;function O(){if(!Q){if(L("throwDeprecation"))throw new Error(k);L("traceDeprecation")?console.trace(k):console.warn(k),Q=!0}return H.apply(this,arguments)}return O}function L(H){try{if(!global.localStorage)return!1}catch{return!1}var k=global.localStorage[H];return k==null?!1:String(k).toLowerCase()==="true"}}),T5=$0((E,I)=>{I.exports=a;function F(o){var b=this;this.next=null,this.entry=null,this.finish=function(){Y0(b,o)}}var L;a.WritableState=i;var H={deprecate:P5()},k=U5(),Q=U2().Buffer,O=global.Uint8Array||function(){};function N(o){return Q.from(o)}function U(o){return Q.isBuffer(o)||o instanceof O}var W=F5(),Z=W5(),T=Z.getHighWaterMark,B=g2().codes,P=B.ERR_INVALID_ARG_TYPE,q=B.ERR_METHOD_NOT_IMPLEMENTED,x=B.ERR_MULTIPLE_CALLBACK,w=B.ERR_STREAM_CANNOT_PIPE,M=B.ERR_STREAM_DESTROYED,y=B.ERR_STREAM_NULL_VALUES,m=B.ERR_STREAM_WRITE_AFTER_END,c=B.ERR_UNKNOWN_ENCODING,l=W.errorOrDestroy;c0()(a,k);function n(){}function i(o,b,f){L=L||M2(),o=o||{},typeof f!="boolean"&&(f=b instanceof L),this.objectMode=!!o.objectMode,f&&(this.objectMode=this.objectMode||!!o.writableObjectMode),this.highWaterMark=T(this,o,"writableHighWaterMark",f),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var W0=o.decodeStrings===!1;this.decodeStrings=!W0,this.defaultEncoding=o.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(X0){K(b,X0)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=o.emitClose!==!1,this.autoDestroy=!!o.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new F(this)}i.prototype.getBuffer=function(){for(var o=this.bufferedRequest,b=[];o;)b.push(o),o=o.next;return b},function(){try{Object.defineProperty(i.prototype,"buffer",{get:H.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var C0;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(C0=Function.prototype[Symbol.hasInstance],Object.defineProperty(a,Symbol.hasInstance,{value:function(o){return C0.call(this,o)?!0:this!==a?!1:o&&o._writableState instanceof i}})):C0=function(o){return o instanceof this};function a(o){L=L||M2();var b=this instanceof L;if(!b&&!C0.call(a,this))return new a(o);this._writableState=new i(o,this,b),this.writable=!0,o&&(typeof o.write=="function"&&(this._write=o.write),typeof o.writev=="function"&&(this._writev=o.writev),typeof o.destroy=="function"&&(this._destroy=o.destroy),typeof o.final=="function"&&(this._final=o.final)),k.call(this)}a.prototype.pipe=function(){l(this,new w)};function K0(o,b){var f=new m;l(o,f),process.nextTick(b,f)}function X(o,b,f,W0){var X0;return f===null?X0=new y:typeof f!="string"&&!b.objectMode&&(X0=new P("chunk",["string","Buffer"],f)),X0?(l(o,X0),process.nextTick(W0,X0),!1):!0}a.prototype.write=function(o,b,f){var W0=this._writableState,X0=!1,z0=!W0.objectMode&&U(o);return z0&&!Q.isBuffer(o)&&(o=N(o)),typeof b=="function"&&(f=b,b=null),z0?b="buffer":b||(b=W0.defaultEncoding),typeof f!="function"&&(f=n),W0.ending?K0(this,f):(z0||X(this,W0,o,f))&&(W0.pendingcb++,X0=C(this,W0,z0,o,b,f)),X0},a.prototype.cork=function(){this._writableState.corked++},a.prototype.uncork=function(){var o=this._writableState;o.corked&&(o.corked--,!o.writing&&!o.corked&&!o.bufferProcessing&&o.bufferedRequest&&j(this,o))},a.prototype.setDefaultEncoding=function(o){if(typeof o=="string"&&(o=o.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((o+"").toLowerCase())>-1))throw new c(o);return this._writableState.defaultEncoding=o,this},Object.defineProperty(a.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Y(o,b,f){return!o.objectMode&&o.decodeStrings!==!1&&typeof b=="string"&&(b=Q.from(b,f)),b}Object.defineProperty(a.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function C(o,b,f,W0,X0,z0){if(!f){var g=Y(b,W0,X0);W0!==g&&(f=!0,X0="buffer",W0=g)}var v=b.objectMode?1:W0.length;b.length+=v;var p=b.length{var F=Object.keys||function(Z){var T=[];for(var B in Z)T.push(B);return T};I.exports=N;var L=D5(),H=T5();c0()(N,L);for(k=F(H.prototype),O=0;O{var I=l0().Buffer,F=I.isEncoding||function(M){switch(M=""+M,M&&M.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 L(M){if(!M)return"utf8";for(var y;;)switch(M){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 M;default:if(y)return;M=(""+M).toLowerCase(),y=!0}}function H(M){var y=L(M);if(typeof y!="string"&&(I.isEncoding===F||!F(M)))throw new Error("Unknown encoding: "+M);return y||M}E.StringDecoder=k;function k(M){this.encoding=H(M);var y;switch(this.encoding){case"utf16le":this.text=T,this.end=B,y=4;break;case"utf8":this.fillLast=U,y=4;break;case"base64":this.text=P,this.end=q,y=3;break;default:this.write=x,this.end=w;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=I.allocUnsafe(y)}k.prototype.write=function(M){if(M.length===0)return"";var y,m;if(this.lastNeed){if(y=this.fillLast(M),y===void 0)return"";m=this.lastNeed,this.lastNeed=0}else m=0;return m>5===6?2:M>>4===14?3:M>>3===30?4:M>>6===2?-1:-2}function O(M,y,m){var c=y.length-1;if(c=0?(l>0&&(M.lastNeed=l-1),l):--c=0?(l>0&&(M.lastNeed=l-2),l):--c=0?(l>0&&(l===2?l=0:M.lastNeed=l-3),l):0))}function N(M,y,m){if((y[0]&192)!==128)return M.lastNeed=0,"\uFFFD";if(M.lastNeed>1&&y.length>1){if((y[1]&192)!==128)return M.lastNeed=1,"\uFFFD";if(M.lastNeed>2&&y.length>2&&(y[2]&192)!==128)return M.lastNeed=2,"\uFFFD"}}function U(M){var y=this.lastTotal-this.lastNeed,m=N(this,M,y);if(m!==void 0)return m;if(this.lastNeed<=M.length)return M.copy(this.lastChar,y,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);M.copy(this.lastChar,y,0,M.length),this.lastNeed-=M.length}function W(M,y){var m=O(this,M,y);if(!this.lastNeed)return M.toString("utf8",y);this.lastTotal=m;var c=M.length-(m-this.lastNeed);return M.copy(this.lastChar,0,c),M.toString("utf8",y,c)}function Z(M){var y=M&&M.length?this.write(M):"";return this.lastNeed?y+"\uFFFD":y}function T(M,y){if((M.length-y)%2===0){var m=M.toString("utf16le",y);if(m){var c=m.charCodeAt(m.length-1);if(c>=55296&&c<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=M[M.length-2],this.lastChar[1]=M[M.length-1],m.slice(0,-1)}return m}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=M[M.length-1],M.toString("utf16le",y,M.length-1)}function B(M){var y=M&&M.length?this.write(M):"";if(this.lastNeed){var m=this.lastTotal-this.lastNeed;return y+this.lastChar.toString("utf16le",0,m)}return y}function P(M,y){var m=(M.length-y)%3;return m===0?M.toString("base64",y):(this.lastNeed=3-m,this.lastTotal=3,m===1?this.lastChar[0]=M[M.length-1]:(this.lastChar[0]=M[M.length-2],this.lastChar[1]=M[M.length-1]),M.toString("base64",y,M.length-m))}function q(M){var y=M&&M.length?this.write(M):"";return this.lastNeed?y+this.lastChar.toString("base64",0,3-this.lastNeed):y}function x(M){return M.toString(this.encoding)}function w(M){return M&&M.length?this.write(M):""}}),l2={};J1(l2,{StringDecoder:()=>D1.StringDecoder,default:()=>D1.StringDecoder});G1=L1(()=>{D1=R2(k1())}),I1=$0((E,I)=>{var F=g2().codes.ERR_STREAM_PREMATURE_CLOSE;function L(O){var N=!1;return function(){if(!N){N=!0;for(var U=arguments.length,W=new Array(U),Z=0;Z{var F;function L(y,m,c){return m in y?Object.defineProperty(y,m,{value:c,enumerable:!0,configurable:!0,writable:!0}):y[m]=c,y}var H=I1(),k=Symbol("lastResolve"),Q=Symbol("lastReject"),O=Symbol("error"),N=Symbol("ended"),U=Symbol("lastPromise"),W=Symbol("handlePromise"),Z=Symbol("stream");function T(y,m){return{value:y,done:m}}function B(y){var m=y[k];if(m!==null){var c=y[Z].read();c!==null&&(y[U]=null,y[k]=null,y[Q]=null,m(T(c,!1)))}}function P(y){process.nextTick(B,y)}function q(y,m){return function(c,l){y.then(function(){if(m[N]){c(T(void 0,!0));return}m[W](c,l)},l)}}var x=Object.getPrototypeOf(function(){}),w=Object.setPrototypeOf((F={get stream(){return this[Z]},next:function(){var y=this,m=this[O];if(m!==null)return Promise.reject(m);if(this[N])return Promise.resolve(T(void 0,!0));if(this[Z].destroyed)return new Promise(function(i,C0){process.nextTick(function(){y[O]?C0(y[O]):i(T(void 0,!0))})});var c=this[U],l;if(c)l=new Promise(q(c,this));else{var n=this[Z].read();if(n!==null)return Promise.resolve(T(n,!1));l=new Promise(this[W])}return this[U]=l,l}},L(F,Symbol.asyncIterator,function(){return this}),L(F,"return",function(){var y=this;return new Promise(function(m,c){y[Z].destroy(null,function(l){if(l){c(l);return}m(T(void 0,!0))})})}),F),x),M=function(y){var m,c=Object.create(w,(m={},L(m,Z,{value:y,writable:!0}),L(m,k,{value:null,writable:!0}),L(m,Q,{value:null,writable:!0}),L(m,O,{value:null,writable:!0}),L(m,N,{value:y._readableState.endEmitted,writable:!0}),L(m,W,{value:function(l,n){var i=c[Z].read();i?(c[U]=null,c[k]=null,c[Q]=null,l(T(i,!1))):(c[k]=l,c[Q]=n)},writable:!0}),m));return c[U]=null,H(y,function(l){if(l&&l.code!=="ERR_STREAM_PREMATURE_CLOSE"){var n=c[Q];n!==null&&(c[U]=null,c[k]=null,c[Q]=null,n(l)),c[O]=l;return}var i=c[k];i!==null&&(c[U]=null,c[k]=null,c[Q]=null,i(T(void 0,!0))),c[N]=!0}),y.on("readable",P.bind(null,c)),c};I.exports=M}),a6=$0((E,I)=>{I.exports=function(){throw new Error("Readable.from is not available in the browser")}}),D5=$0((E,I)=>{I.exports=X;var F;X.ReadableState=K0;var L=E2().EventEmitter,H=function(g,v){return g.listeners(v).length},k=U5(),Q=U2().Buffer,O=global.Uint8Array||function(){};function N(g){return Q.from(g)}function U(g){return Q.isBuffer(g)||g instanceof O}var W=C1(),Z;W&&W.debuglog?Z=W.debuglog("stream"):Z=function(){};var T=s6(),B=F5(),P=W5(),q=P.getHighWaterMark,x=g2().codes,w=x.ERR_INVALID_ARG_TYPE,M=x.ERR_STREAM_PUSH_AFTER_EOF,y=x.ERR_METHOD_NOT_IMPLEMENTED,m=x.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,c,l,n;c0()(X,k);var i=B.errorOrDestroy,C0=["error","close","destroy","pause","resume"];function a(g,v,p){if(typeof g.prependListener=="function")return g.prependListener(v,p);!g._events||!g._events[v]?g.on(v,p):Array.isArray(g._events[v])?g._events[v].unshift(p):g._events[v]=[p,g._events[v]]}function K0(g,v,p){F=F||M2(),g=g||{},typeof p!="boolean"&&(p=v instanceof F),this.objectMode=!!g.objectMode,p&&(this.objectMode=this.objectMode||!!g.readableObjectMode),this.highWaterMark=q(this,g,"readableHighWaterMark",p),this.buffer=new T,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=g.emitClose!==!1,this.autoDestroy=!!g.autoDestroy,this.destroyed=!1,this.defaultEncoding=g.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,g.encoding&&(c||(c=(G1(),W2(l2)).StringDecoder),this.decoder=new c(g.encoding),this.encoding=g.encoding)}function X(g){if(F=F||M2(),!(this instanceof X))return new X(g);var v=this instanceof F;this._readableState=new K0(g,this,v),this.readable=!0,g&&(typeof g.read=="function"&&(this._read=g.read),typeof g.destroy=="function"&&(this._destroy=g.destroy)),k.call(this)}Object.defineProperty(X.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(g){!this._readableState||(this._readableState.destroyed=g)}}),X.prototype.destroy=B.destroy,X.prototype._undestroy=B.undestroy,X.prototype._destroy=function(g,v){v(g)},X.prototype.push=function(g,v){var p=this._readableState,e;return p.objectMode?e=!0:typeof g=="string"&&(v=v||p.defaultEncoding,v!==p.encoding&&(g=Q.from(g,v),v=""),e=!0),Y(this,g,v,!1,e)},X.prototype.unshift=function(g){return Y(this,g,null,!0,!1)};function Y(g,v,p,e,G0){Z("readableAddChunk",v);var t=g._readableState;if(v===null)t.reading=!1,$(g,t);else{var y0;if(G0||(y0=J(t,v)),y0)i(g,y0);else if(t.objectMode||v&&v.length>0)if(typeof v!="string"&&!t.objectMode&&Object.getPrototypeOf(v)!==Q.prototype&&(v=N(v)),e)t.endEmitted?i(g,new m):C(g,t,v,!0);else if(t.ended)i(g,new M);else{if(t.destroyed)return!1;t.reading=!1,t.decoder&&!p?(v=t.decoder.write(v),t.objectMode||v.length!==0?C(g,t,v,!1):A(g,t)):C(g,t,v,!1)}else e||(t.reading=!1,A(g,t))}return!t.ended&&(t.length=z?g=z:(g--,g|=g>>>1,g|=g>>>2,g|=g>>>4,g|=g>>>8,g|=g>>>16,g++),g}function K(g,v){return g<=0||v.length===0&&v.ended?0:v.objectMode?1:g!==g?v.flowing&&v.length?v.buffer.head.data.length:v.length:(g>v.highWaterMark&&(v.highWaterMark=V(g)),g<=v.length?g:v.ended?v.length:(v.needReadable=!0,0))}X.prototype.read=function(g){Z("read",g),g=parseInt(g,10);var v=this._readableState,p=g;if(g!==0&&(v.emittedReadable=!1),g===0&&v.needReadable&&((v.highWaterMark!==0?v.length>=v.highWaterMark:v.length>0)||v.ended))return Z("read: emitReadable",v.length,v.ended),v.length===0&&v.ended?W0(this):G(this),null;if(g=K(g,v),g===0&&v.ended)return v.length===0&&W0(this),null;var e=v.needReadable;Z("need readable",e),(v.length===0||v.length-g0?G0=f(g,v):G0=null,G0===null?(v.needReadable=v.length<=v.highWaterMark,g=0):(v.length-=g,v.awaitDrain=0),v.length===0&&(v.ended||(v.needReadable=!0),p!==g&&v.ended&&W0(this)),G0!==null&&this.emit("data",G0),G0};function $(g,v){if(Z("onEofChunk"),!v.ended){if(v.decoder){var p=v.decoder.end();p&&p.length&&(v.buffer.push(p),v.length+=v.objectMode?1:p.length)}v.ended=!0,v.sync?G(g):(v.needReadable=!1,v.emittedReadable||(v.emittedReadable=!0,j(g)))}}function G(g){var v=g._readableState;Z("emitReadable",v.needReadable,v.emittedReadable),v.needReadable=!1,v.emittedReadable||(Z("emitReadable",v.flowing),v.emittedReadable=!0,process.nextTick(j,g))}function j(g){var v=g._readableState;Z("emitReadable_",v.destroyed,v.length,v.ended),!v.destroyed&&(v.length||v.ended)&&(g.emit("readable"),v.emittedReadable=!1),v.needReadable=!v.flowing&&!v.ended&&v.length<=v.highWaterMark,b(g)}function A(g,v){v.readingMore||(v.readingMore=!0,process.nextTick(R,g,v))}function R(g,v){for(;!v.reading&&!v.ended&&(v.length1&&z0(e.pipes,g)!==-1)&&!_0&&(Z("false write response, pause",e.awaitDrain),e.awaitDrain++),p.pause())}function b0(h){Z("onerror",h),d(),g.removeListener("error",b0),H(g,"error")===0&&i(g,h)}a(g,"error",b0);function D(){g.removeListener("finish",S),d()}g.once("close",D);function S(){Z("onfinish"),g.removeListener("close",D),d()}g.once("finish",S);function d(){Z("unpipe"),p.unpipe(g)}return g.emit("pipe",p),e.flowing||(Z("pipe resume"),p.resume()),g};function _(g){return function(){var v=g._readableState;Z("pipeOnDrain",v.awaitDrain),v.awaitDrain&&v.awaitDrain--,v.awaitDrain===0&&H(g,"data")&&(v.flowing=!0,b(g))}}X.prototype.unpipe=function(g){var v=this._readableState,p={hasUnpiped:!1};if(v.pipesCount===0)return this;if(v.pipesCount===1)return g&&g!==v.pipes?this:(g||(g=v.pipes),v.pipes=null,v.pipesCount=0,v.flowing=!1,g&&g.emit("unpipe",this,p),this);if(!g){var{pipes:e,pipesCount:G0}=v;v.pipes=null,v.pipesCount=0,v.flowing=!1;for(var t=0;t0,e.flowing!==!1&&this.resume()):g==="readable"&&!e.endEmitted&&!e.readableListening&&(e.readableListening=e.needReadable=!0,e.flowing=!1,e.emittedReadable=!1,Z("on readable",e.length,e.reading),e.length?G(this):e.reading||process.nextTick(r,this)),p},X.prototype.addListener=X.prototype.on,X.prototype.removeListener=function(g,v){var p=k.prototype.removeListener.call(this,g,v);return g==="readable"&&process.nextTick(s,this),p},X.prototype.removeAllListeners=function(g){var v=k.prototype.removeAllListeners.apply(this,arguments);return(g==="readable"||g===void 0)&&process.nextTick(s,this),v};function s(g){var v=g._readableState;v.readableListening=g.listenerCount("readable")>0,v.resumeScheduled&&!v.paused?v.flowing=!0:g.listenerCount("data")>0&&g.resume()}function r(g){Z("readable nexttick read 0"),g.read(0)}X.prototype.resume=function(){var g=this._readableState;return g.flowing||(Z("resume"),g.flowing=!g.readableListening,Y0(this,g)),g.paused=!1,this};function Y0(g,v){v.resumeScheduled||(v.resumeScheduled=!0,process.nextTick(o,g,v))}function o(g,v){Z("resume",v.reading),v.reading||g.read(0),v.resumeScheduled=!1,g.emit("resume"),b(g),v.flowing&&!v.reading&&g.read(0)}X.prototype.pause=function(){return Z("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Z("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function b(g){var v=g._readableState;for(Z("flow",v.flowing);v.flowing&&g.read()!==null;);}X.prototype.wrap=function(g){var v=this,p=this._readableState,e=!1;g.on("end",function(){if(Z("wrapped end"),p.decoder&&!p.ended){var y0=p.decoder.end();y0&&y0.length&&v.push(y0)}v.push(null)}),g.on("data",function(y0){if(Z("wrapped data"),p.decoder&&(y0=p.decoder.write(y0)),!(p.objectMode&&y0==null)&&!(!p.objectMode&&(!y0||!y0.length))){var Q0=v.push(y0);Q0||(e=!0,g.pause())}});for(var G0 in g)this[G0]===void 0&&typeof g[G0]=="function"&&(this[G0]=function(y0){return function(){return g[y0].apply(g,arguments)}}(G0));for(var t=0;t=v.length?(v.decoder?p=v.buffer.join(""):v.buffer.length===1?p=v.buffer.first():p=v.buffer.concat(v.length),v.buffer.clear()):p=v.buffer.consume(g,v.decoder),p}function W0(g){var v=g._readableState;Z("endReadable",v.endEmitted),v.endEmitted||(v.ended=!0,process.nextTick(X0,v,g))}function X0(g,v){if(Z("endReadableNT",g.endEmitted,g.length),!g.endEmitted&&g.length===0&&(g.endEmitted=!0,v.readable=!1,v.emit("end"),g.autoDestroy)){var p=v._writableState;(!p||p.autoDestroy&&p.finished)&&v.destroy()}}typeof Symbol=="function"&&(X.from=function(g,v){return n===void 0&&(n=a6()),n(X,g,v)});function z0(g,v){for(var p=0,e=g.length;p{I.exports=U;var F=g2().codes,L=F.ERR_METHOD_NOT_IMPLEMENTED,H=F.ERR_MULTIPLE_CALLBACK,k=F.ERR_TRANSFORM_ALREADY_TRANSFORMING,Q=F.ERR_TRANSFORM_WITH_LENGTH_0,O=M2();c0()(U,O);function N(T,B){var P=this._transformState;P.transforming=!1;var q=P.writecb;if(q===null)return this.emit("error",new H);P.writechunk=null,P.writecb=null,B!=null&&this.push(B),q(T);var x=this._readableState;x.reading=!1,(x.needReadable||x.length{I.exports=L;var F=L5();c0()(L,F);function L(H){if(!(this instanceof L))return new L(H);F.call(this,H)}L.prototype._transform=function(H,k,Q){Q(null,H)}}),r6=$0((E,I)=>{var F;function L(P){var q=!1;return function(){q||(q=!0,P.apply(void 0,arguments))}}var H=g2().codes,k=H.ERR_MISSING_ARGS,Q=H.ERR_STREAM_DESTROYED;function O(P){if(P)throw P}function N(P){return P.setHeader&&typeof P.abort=="function"}function U(P,q,x,w){w=L(w);var M=!1;P.on("close",function(){M=!0}),F===void 0&&(F=I1()),F(P,{readable:q,writable:x},function(m){if(m)return w(m);M=!0,w()});var y=!1;return function(m){if(!M&&!y){if(y=!0,N(P))return P.abort();if(typeof P.destroy=="function")return P.destroy();w(m||new Q("pipe"))}}}function W(P){P()}function Z(P,q){return P.pipe(q)}function T(P){return!P.length||typeof P[P.length-1]!="function"?O:P.pop()}function B(){for(var P=arguments.length,q=new Array(P),x=0;x0;return U(m,l,n,function(i){M||(M=i),i&&y.forEach(W),!l&&(y.forEach(W),w(M))})});return q.reduce(Z)}I.exports=B}),i6=$0((E,I)=>{E=I.exports=D5(),E.Stream=E,E.Readable=E,E.Writable=T5(),E.Duplex=M2(),E.Transform=L5(),E.PassThrough=n6(),E.finished=I1(),E.pipeline=r6()}),N5=$0((E,I)=>{var F=l0().Buffer,L=i6().Transform,H=c0();function k(O,N){if(!F.isBuffer(O)&&typeof O!="string")throw new TypeError(N+" must be a string or a buffer")}function Q(O){L.call(this),this._block=F.allocUnsafe(O),this._blockSize=O,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}H(Q,L),Q.prototype._transform=function(O,N,U){var W=null;try{this.update(O,N)}catch(Z){W=Z}U(W)},Q.prototype._flush=function(O){var N=null;try{this.push(this.digest())}catch(U){N=U}O(N)},Q.prototype.update=function(O,N){if(k(O,"Data"),this._finalized)throw new Error("Digest already called");F.isBuffer(O)||(O=F.from(O,N));for(var U=this._block,W=0;this._blockOffset+O.length-W>=this._blockSize;){for(var Z=this._blockOffset;Z0;++T)this._length[T]+=B,B=this._length[T]/4294967296|0,B>0&&(this._length[T]-=4294967296*B);return this},Q.prototype._update=function(){throw new Error("_update is not implemented")},Q.prototype.digest=function(O){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var N=this._digest();O!==void 0&&(N=N.toString(O)),this._block.fill(0),this._blockOffset=0;for(var U=0;U<4;++U)this._length[U]=0;return N},Q.prototype._digest=function(){throw new Error("_digest is not implemented")},I.exports=Q}),B1=$0((E,I)=>{var F=c0(),L=N5(),H=l0().Buffer,k=new Array(16);function Q(){L.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}F(Q,L),Q.prototype._update=function(){for(var T=k,B=0;B<16;++B)T[B]=this._block.readInt32LE(B*4);var P=this._a,q=this._b,x=this._c,w=this._d;P=N(P,q,x,w,T[0],3614090360,7),w=N(w,P,q,x,T[1],3905402710,12),x=N(x,w,P,q,T[2],606105819,17),q=N(q,x,w,P,T[3],3250441966,22),P=N(P,q,x,w,T[4],4118548399,7),w=N(w,P,q,x,T[5],1200080426,12),x=N(x,w,P,q,T[6],2821735955,17),q=N(q,x,w,P,T[7],4249261313,22),P=N(P,q,x,w,T[8],1770035416,7),w=N(w,P,q,x,T[9],2336552879,12),x=N(x,w,P,q,T[10],4294925233,17),q=N(q,x,w,P,T[11],2304563134,22),P=N(P,q,x,w,T[12],1804603682,7),w=N(w,P,q,x,T[13],4254626195,12),x=N(x,w,P,q,T[14],2792965006,17),q=N(q,x,w,P,T[15],1236535329,22),P=U(P,q,x,w,T[1],4129170786,5),w=U(w,P,q,x,T[6],3225465664,9),x=U(x,w,P,q,T[11],643717713,14),q=U(q,x,w,P,T[0],3921069994,20),P=U(P,q,x,w,T[5],3593408605,5),w=U(w,P,q,x,T[10],38016083,9),x=U(x,w,P,q,T[15],3634488961,14),q=U(q,x,w,P,T[4],3889429448,20),P=U(P,q,x,w,T[9],568446438,5),w=U(w,P,q,x,T[14],3275163606,9),x=U(x,w,P,q,T[3],4107603335,14),q=U(q,x,w,P,T[8],1163531501,20),P=U(P,q,x,w,T[13],2850285829,5),w=U(w,P,q,x,T[2],4243563512,9),x=U(x,w,P,q,T[7],1735328473,14),q=U(q,x,w,P,T[12],2368359562,20),P=W(P,q,x,w,T[5],4294588738,4),w=W(w,P,q,x,T[8],2272392833,11),x=W(x,w,P,q,T[11],1839030562,16),q=W(q,x,w,P,T[14],4259657740,23),P=W(P,q,x,w,T[1],2763975236,4),w=W(w,P,q,x,T[4],1272893353,11),x=W(x,w,P,q,T[7],4139469664,16),q=W(q,x,w,P,T[10],3200236656,23),P=W(P,q,x,w,T[13],681279174,4),w=W(w,P,q,x,T[0],3936430074,11),x=W(x,w,P,q,T[3],3572445317,16),q=W(q,x,w,P,T[6],76029189,23),P=W(P,q,x,w,T[9],3654602809,4),w=W(w,P,q,x,T[12],3873151461,11),x=W(x,w,P,q,T[15],530742520,16),q=W(q,x,w,P,T[2],3299628645,23),P=Z(P,q,x,w,T[0],4096336452,6),w=Z(w,P,q,x,T[7],1126891415,10),x=Z(x,w,P,q,T[14],2878612391,15),q=Z(q,x,w,P,T[5],4237533241,21),P=Z(P,q,x,w,T[12],1700485571,6),w=Z(w,P,q,x,T[3],2399980690,10),x=Z(x,w,P,q,T[10],4293915773,15),q=Z(q,x,w,P,T[1],2240044497,21),P=Z(P,q,x,w,T[8],1873313359,6),w=Z(w,P,q,x,T[15],4264355552,10),x=Z(x,w,P,q,T[6],2734768916,15),q=Z(q,x,w,P,T[13],1309151649,21),P=Z(P,q,x,w,T[4],4149444226,6),w=Z(w,P,q,x,T[11],3174756917,10),x=Z(x,w,P,q,T[2],718787259,15),q=Z(q,x,w,P,T[9],3951481745,21),this._a=this._a+P|0,this._b=this._b+q|0,this._c=this._c+x|0,this._d=this._d+w|0},Q.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=H.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 O(T,B){return T<>>32-B}function N(T,B,P,q,x,w,M){return O(T+(B&P|~B&q)+x+w|0,M)+B|0}function U(T,B,P,q,x,w,M){return O(T+(B&q|P&~q)+x+w|0,M)+B|0}function W(T,B,P,q,x,w,M){return O(T+(B^P^q)+x+w|0,M)+B|0}function Z(T,B,P,q,x,w,M){return O(T+(P^(B|~q))+x+w|0,M)+B|0}I.exports=Q}),q1=$0((E,I)=>{var F=U2().Buffer,L=c0(),H=N5(),k=new Array(16),Q=[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],O=[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],N=[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],U=[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],W=[0,1518500249,1859775393,2400959708,2840853838],Z=[1352829926,1548603684,1836072691,2053994217,0];function T(){H.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}L(T,H),T.prototype._update=function(){for(var y=k,m=0;m<16;++m)y[m]=this._block.readInt32LE(m*4);for(var c=this._a|0,l=this._b|0,n=this._c|0,i=this._d|0,C0=this._e|0,a=this._a|0,K0=this._b|0,X=this._c|0,Y=this._d|0,C=this._e|0,J=0;J<80;J+=1){var z,V;J<16?(z=P(c,l,n,i,C0,y[Q[J]],W[0],N[J]),V=M(a,K0,X,Y,C,y[O[J]],Z[0],U[J])):J<32?(z=q(c,l,n,i,C0,y[Q[J]],W[1],N[J]),V=w(a,K0,X,Y,C,y[O[J]],Z[1],U[J])):J<48?(z=x(c,l,n,i,C0,y[Q[J]],W[2],N[J]),V=x(a,K0,X,Y,C,y[O[J]],Z[2],U[J])):J<64?(z=w(c,l,n,i,C0,y[Q[J]],W[3],N[J]),V=q(a,K0,X,Y,C,y[O[J]],Z[3],U[J])):(z=M(c,l,n,i,C0,y[Q[J]],W[4],N[J]),V=P(a,K0,X,Y,C,y[O[J]],Z[4],U[J])),c=C0,C0=i,i=B(n,10),n=l,l=z,a=C,C=Y,Y=B(X,10),X=K0,K0=V}var K=this._b+n+Y|0;this._b=this._c+i+C|0,this._c=this._d+C0+a|0,this._d=this._e+c+K0|0,this._e=this._a+l+X|0,this._a=K},T.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 y=F.alloc?F.alloc(20):new F(20);return y.writeInt32LE(this._a,0),y.writeInt32LE(this._b,4),y.writeInt32LE(this._c,8),y.writeInt32LE(this._d,12),y.writeInt32LE(this._e,16),y};function B(y,m){return y<>>32-m}function P(y,m,c,l,n,i,C0,a){return B(y+(m^c^l)+i+C0|0,a)+n|0}function q(y,m,c,l,n,i,C0,a){return B(y+(m&c|~m&l)+i+C0|0,a)+n|0}function x(y,m,c,l,n,i,C0,a){return B(y+((m|~c)^l)+i+C0|0,a)+n|0}function w(y,m,c,l,n,i,C0,a){return B(y+(m&l|c&~l)+i+C0|0,a)+n|0}function M(y,m,c,l,n,i,C0,a){return B(y+(m^(c|~l))+i+C0|0,a)+n|0}I.exports=T}),m2=$0((E,I)=>{var F=l0().Buffer;function L(H,k){this._block=F.alloc(H),this._finalSize=k,this._blockSize=H,this._len=0}L.prototype.update=function(H,k){typeof H=="string"&&(k=k||"utf8",H=F.from(H,k));for(var Q=this._block,O=this._blockSize,N=H.length,U=this._len,W=0;W=this._finalSize&&(this._update(this._block),this._block.fill(0));var Q=this._len*8;if(Q<=4294967295)this._block.writeUInt32BE(Q,this._blockSize-4);else{var O=(Q&4294967295)>>>0,N=(Q-O)/4294967296;this._block.writeUInt32BE(N,this._blockSize-8),this._block.writeUInt32BE(O,this._blockSize-4)}this._update(this._block);var U=this._hash();return H?U.toString(H):U},L.prototype._update=function(){throw new Error("_update must be implemented by subclass")},I.exports=L}),t6=$0((E,I)=>{var F=c0(),L=m2(),H=l0().Buffer,k=[1518500249,1859775393,-1894007588,-899497514],Q=new Array(80);function O(){this.init(),this._w=Q,L.call(this,64,56)}F(O,L),O.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function N(Z){return Z<<5|Z>>>27}function U(Z){return Z<<30|Z>>>2}function W(Z,T,B,P){return Z===0?T&B|~T&P:Z===2?T&B|T&P|B&P:T^B^P}O.prototype._update=function(Z){for(var T=this._w,B=this._a|0,P=this._b|0,q=this._c|0,x=this._d|0,w=this._e|0,M=0;M<16;++M)T[M]=Z.readInt32BE(M*4);for(;M<80;++M)T[M]=T[M-3]^T[M-8]^T[M-14]^T[M-16];for(var y=0;y<80;++y){var m=~~(y/20),c=N(B)+W(m,P,q,x)+w+T[y]+k[m]|0;w=x,x=q,q=U(P),P=B,B=c}this._a=B+this._a|0,this._b=P+this._b|0,this._c=q+this._c|0,this._d=x+this._d|0,this._e=w+this._e|0},O.prototype._hash=function(){var Z=H.allocUnsafe(20);return Z.writeInt32BE(this._a|0,0),Z.writeInt32BE(this._b|0,4),Z.writeInt32BE(this._c|0,8),Z.writeInt32BE(this._d|0,12),Z.writeInt32BE(this._e|0,16),Z},I.exports=O}),e6=$0((E,I)=>{var F=c0(),L=m2(),H=l0().Buffer,k=[1518500249,1859775393,-1894007588,-899497514],Q=new Array(80);function O(){this.init(),this._w=Q,L.call(this,64,56)}F(O,L),O.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function N(T){return T<<1|T>>>31}function U(T){return T<<5|T>>>27}function W(T){return T<<30|T>>>2}function Z(T,B,P,q){return T===0?B&P|~B&q:T===2?B&P|B&q|P&q:B^P^q}O.prototype._update=function(T){for(var B=this._w,P=this._a|0,q=this._b|0,x=this._c|0,w=this._d|0,M=this._e|0,y=0;y<16;++y)B[y]=T.readInt32BE(y*4);for(;y<80;++y)B[y]=N(B[y-3]^B[y-8]^B[y-14]^B[y-16]);for(var m=0;m<80;++m){var c=~~(m/20),l=U(P)+Z(c,q,x,w)+M+B[m]+k[c]|0;M=w,w=x,x=W(q),q=P,P=l}this._a=P+this._a|0,this._b=q+this._b|0,this._c=x+this._c|0,this._d=w+this._d|0,this._e=M+this._e|0},O.prototype._hash=function(){var T=H.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},I.exports=O}),k5=$0((E,I)=>{var F=c0(),L=m2(),H=l0().Buffer,k=[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],Q=new Array(64);function O(){this.init(),this._w=Q,L.call(this,64,56)}F(O,L),O.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 N(P,q,x){return x^P&(q^x)}function U(P,q,x){return P&q|x&(P|q)}function W(P){return(P>>>2|P<<30)^(P>>>13|P<<19)^(P>>>22|P<<10)}function Z(P){return(P>>>6|P<<26)^(P>>>11|P<<21)^(P>>>25|P<<7)}function T(P){return(P>>>7|P<<25)^(P>>>18|P<<14)^P>>>3}function B(P){return(P>>>17|P<<15)^(P>>>19|P<<13)^P>>>10}O.prototype._update=function(P){for(var q=this._w,x=this._a|0,w=this._b|0,M=this._c|0,y=this._d|0,m=this._e|0,c=this._f|0,l=this._g|0,n=this._h|0,i=0;i<16;++i)q[i]=P.readInt32BE(i*4);for(;i<64;++i)q[i]=B(q[i-2])+q[i-7]+T(q[i-15])+q[i-16]|0;for(var C0=0;C0<64;++C0){var a=n+Z(m)+N(m,c,l)+k[C0]+q[C0]|0,K0=W(x)+U(x,w,M)|0;n=l,l=c,c=m,m=y+a|0,y=M,M=w,w=x,x=a+K0|0}this._a=x+this._a|0,this._b=w+this._b|0,this._c=M+this._c|0,this._d=y+this._d|0,this._e=m+this._e|0,this._f=c+this._f|0,this._g=l+this._g|0,this._h=n+this._h|0},O.prototype._hash=function(){var P=H.allocUnsafe(32);return P.writeInt32BE(this._a,0),P.writeInt32BE(this._b,4),P.writeInt32BE(this._c,8),P.writeInt32BE(this._d,12),P.writeInt32BE(this._e,16),P.writeInt32BE(this._f,20),P.writeInt32BE(this._g,24),P.writeInt32BE(this._h,28),P},I.exports=O}),X8=$0((E,I)=>{var F=c0(),L=k5(),H=m2(),k=l0().Buffer,Q=new Array(64);function O(){this.init(),this._w=Q,H.call(this,64,56)}F(O,L),O.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},O.prototype._hash=function(){var N=k.allocUnsafe(28);return N.writeInt32BE(this._a,0),N.writeInt32BE(this._b,4),N.writeInt32BE(this._c,8),N.writeInt32BE(this._d,12),N.writeInt32BE(this._e,16),N.writeInt32BE(this._f,20),N.writeInt32BE(this._g,24),N},I.exports=O}),I5=$0((E,I)=>{var F=c0(),L=m2(),H=l0().Buffer,k=[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],Q=new Array(160);function O(){this.init(),this._w=Q,L.call(this,128,112)}F(O,L),O.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 N(w,M,y){return y^w&(M^y)}function U(w,M,y){return w&M|y&(w|M)}function W(w,M){return(w>>>28|M<<4)^(M>>>2|w<<30)^(M>>>7|w<<25)}function Z(w,M){return(w>>>14|M<<18)^(w>>>18|M<<14)^(M>>>9|w<<23)}function T(w,M){return(w>>>1|M<<31)^(w>>>8|M<<24)^w>>>7}function B(w,M){return(w>>>1|M<<31)^(w>>>8|M<<24)^(w>>>7|M<<25)}function P(w,M){return(w>>>19|M<<13)^(M>>>29|w<<3)^w>>>6}function q(w,M){return(w>>>19|M<<13)^(M>>>29|w<<3)^(w>>>6|M<<26)}function x(w,M){return w>>>0>>0?1:0}O.prototype._update=function(w){for(var M=this._w,y=this._ah|0,m=this._bh|0,c=this._ch|0,l=this._dh|0,n=this._eh|0,i=this._fh|0,C0=this._gh|0,a=this._hh|0,K0=this._al|0,X=this._bl|0,Y=this._cl|0,C=this._dl|0,J=this._el|0,z=this._fl|0,V=this._gl|0,K=this._hl|0,$=0;$<32;$+=2)M[$]=w.readInt32BE($*4),M[$+1]=w.readInt32BE($*4+4);for(;$<160;$+=2){var G=M[$-30],j=M[$-30+1],A=T(G,j),R=B(j,G);G=M[$-4],j=M[$-4+1];var _=P(G,j),s=q(j,G),r=M[$-14],Y0=M[$-14+1],o=M[$-32],b=M[$-32+1],f=R+Y0|0,W0=A+r+x(f,R)|0;f=f+s|0,W0=W0+_+x(f,s)|0,f=f+b|0,W0=W0+o+x(f,b)|0,M[$]=W0,M[$+1]=f}for(var X0=0;X0<160;X0+=2){W0=M[X0],f=M[X0+1];var z0=U(y,m,c),g=U(K0,X,Y),v=W(y,K0),p=W(K0,y),e=Z(n,J),G0=Z(J,n),t=k[X0],y0=k[X0+1],Q0=N(n,i,C0),V0=N(J,z,V),_0=K+G0|0,F0=a+e+x(_0,K)|0;_0=_0+V0|0,F0=F0+Q0+x(_0,V0)|0,_0=_0+y0|0,F0=F0+t+x(_0,y0)|0,_0=_0+f|0,F0=F0+W0+x(_0,f)|0;var Z0=p+g|0,b0=v+z0+x(Z0,p)|0;a=C0,K=V,C0=i,V=z,i=n,z=J,J=C+_0|0,n=l+F0+x(J,C)|0,l=c,C=Y,c=m,Y=X,m=y,X=K0,K0=_0+Z0|0,y=F0+b0+x(K0,_0)|0}this._al=this._al+K0|0,this._bl=this._bl+X|0,this._cl=this._cl+Y|0,this._dl=this._dl+C|0,this._el=this._el+J|0,this._fl=this._fl+z|0,this._gl=this._gl+V|0,this._hl=this._hl+K|0,this._ah=this._ah+y+x(this._al,K0)|0,this._bh=this._bh+m+x(this._bl,X)|0,this._ch=this._ch+c+x(this._cl,Y)|0,this._dh=this._dh+l+x(this._dl,C)|0,this._eh=this._eh+n+x(this._el,J)|0,this._fh=this._fh+i+x(this._fl,z)|0,this._gh=this._gh+C0+x(this._gl,V)|0,this._hh=this._hh+a+x(this._hl,K)|0},O.prototype._hash=function(){var w=H.allocUnsafe(64);function M(y,m,c){w.writeInt32BE(y,c),w.writeInt32BE(m,c+4)}return M(this._ah,this._al,0),M(this._bh,this._bl,8),M(this._ch,this._cl,16),M(this._dh,this._dl,24),M(this._eh,this._el,32),M(this._fh,this._fl,40),M(this._gh,this._gl,48),M(this._hh,this._hl,56),w},I.exports=O}),G8=$0((E,I)=>{var F=c0(),L=I5(),H=m2(),k=l0().Buffer,Q=new Array(160);function O(){this.init(),this._w=Q,H.call(this,128,112)}F(O,L),O.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},O.prototype._hash=function(){var N=k.allocUnsafe(48);function U(W,Z,T){N.writeInt32BE(W,T),N.writeInt32BE(Z,T+4)}return U(this._ah,this._al,0),U(this._bh,this._bl,8),U(this._ch,this._cl,16),U(this._dh,this._dl,24),U(this._eh,this._el,32),U(this._fh,this._fl,40),N},I.exports=O}),R1=$0((F,I)=>{var F=I.exports=function(L){L=L.toLowerCase();var H=F[L];if(!H)throw new Error(L+" is not supported (we accept pull requests)");return new H};F.sha=t6(),F.sha1=e6(),F.sha224=X8(),F.sha256=k5(),F.sha384=G8(),F.sha512=I5()}),O2=$0((E,I)=>{I.exports={ArrayIsArray(F){return Array.isArray(F)},ArrayPrototypeIncludes(F,L){return F.includes(L)},ArrayPrototypeIndexOf(F,L){return F.indexOf(L)},ArrayPrototypeJoin(F,L){return F.join(L)},ArrayPrototypeMap(F,L){return F.map(L)},ArrayPrototypePop(F,L){return F.pop(L)},ArrayPrototypePush(F,L){return F.push(L)},ArrayPrototypeSlice(F,L,H){return F.slice(L,H)},Error,FunctionPrototypeCall(F,L,...H){return F.call(L,...H)},FunctionPrototypeSymbolHasInstance(F,L){return Function.prototype[Symbol.hasInstance].call(F,L)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(F,L){return Object.defineProperties(F,L)},ObjectDefineProperty(F,L,H){return Object.defineProperty(F,L,H)},ObjectGetOwnPropertyDescriptor(F,L){return Object.getOwnPropertyDescriptor(F,L)},ObjectKeys(F){return Object.keys(F)},ObjectSetPrototypeOf(F,L){return Object.setPrototypeOf(F,L)},Promise,PromisePrototypeCatch(F,L){return F.catch(L)},PromisePrototypeThen(F,L,H){return F.then(L,H)},PromiseReject(F){return Promise.reject(F)},ReflectApply:Reflect.apply,RegExpPrototypeTest(F,L){return F.test(L)},SafeSet:Set,String,StringPrototypeSlice(F,L,H){return F.slice(L,H)},StringPrototypeToLowerCase(F){return F.toLowerCase()},StringPrototypeToUpperCase(F){return F.toUpperCase()},StringPrototypeTrim(F){return F.trim()},Symbol,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,TypedArrayPrototypeSet(F,L,H){return F.set(L,H)},Uint8Array}}),N2=$0((E,I)=>{var F=U2(),L=Object.getPrototypeOf(async function(){}).constructor,H=globalThis.Blob||F.Blob,k=typeof H<"u"?function(O){return O instanceof H}:function(O){return!1},Q=class extends Error{constructor(O){if(!Array.isArray(O))throw new TypeError(`Expected input to be an Array, got ${typeof O}`);let N="";for(let U=0;U{O=U,N=W}),resolve:O,reject:N}},promisify(O){return new Promise((N,U)=>{O((W,...Z)=>W?U(W):N(...Z))})},debuglog(){return function(){}},format(O,...N){return O.replace(/%([sdifj])/g,function(...[U,W]){let Z=N.shift();return W==="f"?Z.toFixed(6):W==="j"?JSON.stringify(Z):W==="s"&&typeof Z=="object"?`${Z.constructor!==Object?Z.constructor.name:""} {}`.trim():Z.toString()})},inspect(O){switch(typeof O){case"string":if(O.includes("'"))if(O.includes('"')){if(!O.includes("`")&&!O.includes("${"))return`\`${O}\``}else return`"${O}"`;return`'${O}'`;case"number":return isNaN(O)?"NaN":Object.is(O,-0)?String(O):O;case"bigint":return`${String(O)}n`;case"boolean":case"undefined":return String(O);case"object":return"{}"}},types:{isAsyncFunction(O){return O instanceof L},isArrayBufferView(O){return ArrayBuffer.isView(O)}},isBlob:k},I.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")}),E1=$0((E,I)=>{var{AbortController:F,AbortSignal:L}=typeof self<"u"?self:typeof window<"u"?window:void 0;I.exports=F,I.exports.AbortSignal=L,I.exports.default=F}),F2=$0((E,I)=>{var{format:F,inspect:L,AggregateError:H}=N2(),k=globalThis.AggregateError||H,Q=Symbol("kIsNodeError"),O=["string","function","number","object","Function","Object","boolean","bigint","symbol"],N=/^([A-Z][a-z0-9]*)+$/,U="__node_internal_",W={};function Z(M,y){if(!M)throw new W.ERR_INTERNAL_ASSERTION(y)}function T(M){let y="",m=M.length,c=M[0]==="-"?1:0;for(;m>=c+4;m-=3)y=`_${M.slice(m-3,m)}${y}`;return`${M.slice(0,m)}${y}`}function B(M,y,m){if(typeof y=="function")return Z(y.length<=m.length,`Code: ${M}; The provided arguments length (${m.length}) does not match the required ones (${y.length}).`),y(...m);let c=(y.match(/%[dfijoOs]/g)||[]).length;return Z(c===m.length,`Code: ${M}; The provided arguments length (${m.length}) does not match the required ones (${c}).`),m.length===0?y:F(y,...m)}function P(M,y,m){m||(m=Error);class c extends m{constructor(...l){super(B(M,y,l))}toString(){return`${this.name} [${M}]: ${this.message}`}}Object.defineProperties(c.prototype,{name:{value:m.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${M}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),c.prototype.code=M,c.prototype[Q]=!0,W[M]=c}function q(M){let y=U+M.name;return Object.defineProperty(M,"name",{value:y}),M}function x(M,y){if(M&&y&&M!==y){if(Array.isArray(y.errors))return y.errors.push(M),y;let m=new k([y,M],y.message);return m.code=y.code,m}return M||y}var w=class extends Error{constructor(M="The operation was aborted",y=void 0){if(y!==void 0&&typeof y!="object")throw new W.ERR_INVALID_ARG_TYPE("options","Object",y);super(M,y),this.code="ABORT_ERR",this.name="AbortError"}};P("ERR_ASSERTION","%s",Error),P("ERR_INVALID_ARG_TYPE",(M,y,m)=>{Z(typeof M=="string","'name' must be a string"),Array.isArray(y)||(y=[y]);let c="The ";M.endsWith(" argument")?c+=`${M} `:c+=`"${M}" ${M.includes(".")?"property":"argument"} `,c+="must be ";let l=[],n=[],i=[];for(let a of y)Z(typeof a=="string","All expected entries have to be of type string"),O.includes(a)?l.push(a.toLowerCase()):N.test(a)?n.push(a):(Z(a!=="object",'The value "object" should be written as "Object"'),i.push(a));if(n.length>0){let a=l.indexOf("object");a!==-1&&(l.splice(l,a,1),n.push("Object"))}if(l.length>0){switch(l.length){case 1:c+=`of type ${l[0]}`;break;case 2:c+=`one of type ${l[0]} or ${l[1]}`;break;default:{let a=l.pop();c+=`one of type ${l.join(", ")}, or ${a}`}}(n.length>0||i.length>0)&&(c+=" or ")}if(n.length>0){switch(n.length){case 1:c+=`an instance of ${n[0]}`;break;case 2:c+=`an instance of ${n[0]} or ${n[1]}`;break;default:{let a=n.pop();c+=`an instance of ${n.join(", ")}, or ${a}`}}i.length>0&&(c+=" or ")}switch(i.length){case 0:break;case 1:i[0].toLowerCase()!==i[0]&&(c+="an "),c+=`${i[0]}`;break;case 2:c+=`one of ${i[0]} or ${i[1]}`;break;default:{let a=i.pop();c+=`one of ${i.join(", ")}, or ${a}`}}if(m==null)c+=`. Received ${m}`;else if(typeof m=="function"&&m.name)c+=`. Received function ${m.name}`;else if(typeof m=="object"){var C0;(C0=m.constructor)!==null&&C0!==void 0&&C0.name?c+=`. Received an instance of ${m.constructor.name}`:c+=`. Received ${L(m,{depth:-1})}`}else{let a=L(m,{colors:!1});a.length>25&&(a=`${a.slice(0,25)}...`),c+=`. Received type ${typeof m} (${a})`}return c},TypeError),P("ERR_INVALID_ARG_VALUE",(M,y,m="is invalid")=>{let c=L(y);return c.length>128&&(c=c.slice(0,128)+"..."),`The ${M.includes(".")?"property":"argument"} '${M}' ${m}. Received ${c}`},TypeError),P("ERR_INVALID_RETURN_VALUE",(M,y,m)=>{var c;let l=m!=null&&(c=m.constructor)!==null&&c!==void 0&&c.name?`instance of ${m.constructor.name}`:`type ${typeof m}`;return`Expected ${M} to be returned from the "${y}" function but got ${l}.`},TypeError),P("ERR_MISSING_ARGS",(...M)=>{Z(M.length>0,"At least one arg needs to be specified");let y,m=M.length;switch(M=(Array.isArray(M)?M:[M]).map((c)=>`"${c}"`).join(" or "),m){case 1:y+=`The ${M[0]} argument`;break;case 2:y+=`The ${M[0]} and ${M[1]} arguments`;break;default:{let c=M.pop();y+=`The ${M.join(", ")}, and ${c} arguments`}break}return`${y} must be specified`},TypeError),P("ERR_OUT_OF_RANGE",(M,y,m)=>{Z(y,'Missing "range" argument');let c;return Number.isInteger(m)&&Math.abs(m)>4294967296?c=T(String(m)):typeof m=="bigint"?(c=String(m),(m>2n**32n||m<-(2n**32n))&&(c=T(c)),c+="n"):c=L(m),`The value of "${M}" is out of range. It must be ${y}. Received ${c}`},RangeError),P("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),P("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),P("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),P("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),P("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),P("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),P("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),P("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),P("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),P("ERR_STREAM_WRITE_AFTER_END","write after end",Error),P("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),I.exports={AbortError:w,aggregateTwoErrors:q(x),hideStackFrames:q,codes:W}}),z1=$0((E,I)=>{var{ArrayIsArray:F,ArrayPrototypeIncludes:L,ArrayPrototypeJoin:H,ArrayPrototypeMap:k,NumberIsInteger:Q,NumberIsNaN:O,NumberMAX_SAFE_INTEGER:N,NumberMIN_SAFE_INTEGER:U,NumberParseInt:W,ObjectPrototypeHasOwnProperty:Z,RegExpPrototypeExec:T,String:B,StringPrototypeToUpperCase:P,StringPrototypeTrim:q}=O2(),{hideStackFrames:x,codes:{ERR_SOCKET_BAD_PORT:w,ERR_INVALID_ARG_TYPE:M,ERR_INVALID_ARG_VALUE:y,ERR_OUT_OF_RANGE:m,ERR_UNKNOWN_SIGNAL:c}}=F2(),{normalizeEncoding:l}=N2(),{isAsyncFunction:n,isArrayBufferView:i}=N2().types,C0={};function a(g){return g===(g|0)}function K0(g){return g===g>>>0}var X=/^[0-7]+$/,Y="must be a 32-bit unsigned integer or an octal string";function C(g,v,p){if(typeof g>"u"&&(g=p),typeof g=="string"){if(T(X,g)===null)throw new y(v,g,Y);g=W(g,8)}return V(g,v),g}var J=x((g,v,p=U,e=N)=>{if(typeof g!="number")throw new M(v,"number",g);if(!Q(g))throw new m(v,"an integer",g);if(ge)throw new m(v,`>= ${p} && <= ${e}`,g)}),z=x((g,v,p=-2147483648,e=2147483647)=>{if(typeof g!="number")throw new M(v,"number",g);if(!Q(g))throw new m(v,"an integer",g);if(ge)throw new m(v,`>= ${p} && <= ${e}`,g)}),V=x((g,v,p=!1)=>{if(typeof g!="number")throw new M(v,"number",g);if(!Q(g))throw new m(v,"an integer",g);let e=p?1:0,G0=4294967295;if(gG0)throw new m(v,`>= ${e} && <= ${G0}`,g)});function K(g,v){if(typeof g!="string")throw new M(v,"string",g)}function $(g,v,p=void 0,e){if(typeof g!="number")throw new M(v,"number",g);if(p!=null&&ge||(p!=null||e!=null)&&O(g))throw new m(v,`${p!=null?`>= ${p}`:""}${p!=null&&e!=null?" && ":""}${e!=null?`<= ${e}`:""}`,g)}var G=x((g,v,p)=>{if(!L(p,g)){let e=H(k(p,(t)=>typeof t=="string"?`'${t}'`:B(t)),", "),G0="must be one of: "+e;throw new y(v,g,G0)}});function j(g,v){if(typeof g!="boolean")throw new M(v,"boolean",g)}function A(g,v,p){return g==null||!Z(g,v)?p:g[v]}var R=x((g,v,p=null)=>{let e=A(p,"allowArray",!1),G0=A(p,"allowFunction",!1);if(!A(p,"nullable",!1)&&g===null||!e&&F(g)||typeof g!="object"&&(!G0||typeof g!="function"))throw new M(v,"Object",g)}),_=x((g,v,p=0)=>{if(!F(g))throw new M(v,"Array",g);if(g.length{if(!i(g))throw new M(v,["Buffer","TypedArray","DataView"],g)});function Y0(g,v){let p=l(v),e=g.length;if(p==="hex"&&e%2!==0)throw new y("encoding",v,`is invalid for data of length ${e}`)}function o(g,v="Port",p=!0){if(typeof g!="number"&&typeof g!="string"||typeof g=="string"&&q(g).length===0||+g!==+g>>>0||g>65535||g===0&&!p)throw new w(v,g,p);return g|0}var b=x((g,v)=>{if(g!==void 0&&(g===null||typeof g!="object"||!("aborted"in g)))throw new M(v,"AbortSignal",g)}),f=x((g,v)=>{if(typeof g!="function")throw new M(v,"Function",g)}),W0=x((g,v)=>{if(typeof g!="function"||n(g))throw new M(v,"Function",g)}),X0=x((g,v)=>{if(g!==void 0)throw new M(v,"undefined",g)});function z0(g,v,p){if(!L(p,g))throw new M(v,`('${H(p,"|")}')`,g)}I.exports={isInt32:a,isUint32:K0,parseFileMode:C,validateArray:_,validateBoolean:j,validateBuffer:r,validateEncoding:Y0,validateFunction:f,validateInt32:z,validateInteger:J,validateNumber:$,validateObject:R,validateOneOf:G,validatePlainFunction:W0,validatePort:o,validateSignalName:s,validateString:K,validateUint32:V,validateUndefined:X0,validateUnion:z0,validateAbortSignal:b}}),Z5=$0((E,I)=>{var F=I.exports={},L,H;function k(){throw new Error("setTimeout has not been defined")}function Q(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?L=setTimeout:L=k}catch{L=k}try{typeof clearTimeout=="function"?H=clearTimeout:H=Q}catch{H=Q}})();function O(w){if(L===setTimeout)return setTimeout(w,0);if((L===k||!L)&&setTimeout)return L=setTimeout,setTimeout(w,0);try{return L(w,0)}catch{try{return L.call(null,w,0)}catch{return L.call(this,w,0)}}}function N(w){if(H===clearTimeout)return clearTimeout(w);if((H===Q||!H)&&clearTimeout)return H=clearTimeout,clearTimeout(w);try{return H(w)}catch{try{return H.call(null,w)}catch{return H.call(this,w)}}}var U=[],W=!1,Z,T=-1;function B(){!W||!Z||(W=!1,Z.length?U=Z.concat(U):T=-1,U.length&&P())}function P(){if(!W){var w=O(B);W=!0;for(var M=U.length;M;){for(Z=U,U=[];++T1)for(var y=1;yB5});x2=L1(()=>{N1(I2,R2(Z5())),B5=R2(Z5())}),v2=$0((E,I)=>{var{Symbol:F,SymbolAsyncIterator:L,SymbolIterator:H}=O2(),k=F("kDestroyed"),Q=F("kIsErrored"),O=F("kIsReadable"),N=F("kIsDisturbed");function U(J,z=!1){var V;return!!(J&&typeof J.pipe=="function"&&typeof J.on=="function"&&(!z||typeof J.pause=="function"&&typeof J.resume=="function")&&(!J._writableState||((V=J._readableState)===null||V===void 0?void 0:V.readable)!==!1)&&(!J._writableState||J._readableState))}function W(J){var z;return!!(J&&typeof J.write=="function"&&typeof J.on=="function"&&(!J._readableState||((z=J._writableState)===null||z===void 0?void 0:z.writable)!==!1))}function Z(J){return!!(J&&typeof J.pipe=="function"&&J._readableState&&typeof J.on=="function"&&typeof J.write=="function")}function T(J){return J&&(J._readableState||J._writableState||typeof J.write=="function"&&typeof J.on=="function"||typeof J.pipe=="function"&&typeof J.on=="function")}function B(J,z){return J==null?!1:z===!0?typeof J[L]=="function":z===!1?typeof J[H]=="function":typeof J[L]=="function"||typeof J[H]=="function"}function P(J){if(!T(J))return null;let{_writableState:z,_readableState:V}=J,K=z||V;return!!(J.destroyed||J[k]||K!=null&&K.destroyed)}function q(J){if(!W(J))return null;if(J.writableEnded===!0)return!0;let z=J._writableState;return z!=null&&z.errored?!1:typeof z?.ended!="boolean"?null:z.ended}function x(J,z){if(!W(J))return null;if(J.writableFinished===!0)return!0;let V=J._writableState;return V!=null&&V.errored?!1:typeof V?.finished!="boolean"?null:!!(V.finished||z===!1&&V.ended===!0&&V.length===0)}function w(J){if(!U(J))return null;if(J.readableEnded===!0)return!0;let z=J._readableState;return!z||z.errored?!1:typeof z?.ended!="boolean"?null:z.ended}function M(J,z){if(!U(J))return null;let V=J._readableState;return V!=null&&V.errored?!1:typeof V?.endEmitted!="boolean"?null:!!(V.endEmitted||z===!1&&V.ended===!0&&V.length===0)}function y(J){return J&&J[O]!=null?J[O]:typeof J?.readable!="boolean"?null:P(J)?!1:U(J)&&J.readable&&!M(J)}function m(J){return typeof J?.writable!="boolean"?null:P(J)?!1:W(J)&&J.writable&&!q(J)}function c(J,z){return T(J)?P(J)?!0:!(z?.readable!==!1&&y(J)||z?.writable!==!1&&m(J)):null}function l(J){var z,V;return T(J)?J.writableErrored?J.writableErrored:(z=(V=J._writableState)===null||V===void 0?void 0:V.errored)!==null&&z!==void 0?z:null:null}function n(J){var z,V;return T(J)?J.readableErrored?J.readableErrored:(z=(V=J._readableState)===null||V===void 0?void 0:V.errored)!==null&&z!==void 0?z:null:null}function i(J){if(!T(J))return null;if(typeof J.closed=="boolean")return J.closed;let{_writableState:z,_readableState:V}=J;return typeof z?.closed=="boolean"||typeof V?.closed=="boolean"?z?.closed||V?.closed:typeof J._closed=="boolean"&&C0(J)?J._closed:null}function C0(J){return typeof J._closed=="boolean"&&typeof J._defaultKeepAlive=="boolean"&&typeof J._removedConnection=="boolean"&&typeof J._removedContLen=="boolean"}function a(J){return typeof J._sent100=="boolean"&&C0(J)}function K0(J){var z;return typeof J._consuming=="boolean"&&typeof J._dumped=="boolean"&&((z=J.req)===null||z===void 0?void 0:z.upgradeOrConnect)===void 0}function X(J){if(!T(J))return null;let{_writableState:z,_readableState:V}=J,K=z||V;return!K&&a(J)||!!(K&&K.autoDestroy&&K.emitClose&&K.closed===!1)}function Y(J){var z;return!!(J&&((z=J[N])!==null&&z!==void 0?z:J.readableDidRead||J.readableAborted))}function C(J){var z,V,K,$,G,j,A,R,_,s;return!!(J&&((z=(V=(K=($=(G=(j=J[Q])!==null&&j!==void 0?j:J.readableErrored)!==null&&G!==void 0?G:J.writableErrored)!==null&&$!==void 0?$:(A=J._readableState)===null||A===void 0?void 0:A.errorEmitted)!==null&&K!==void 0?K:(R=J._writableState)===null||R===void 0?void 0:R.errorEmitted)!==null&&V!==void 0?V:(_=J._readableState)===null||_===void 0?void 0:_.errored)!==null&&z!==void 0?z:(s=J._writableState)===null||s===void 0?void 0:s.errored))}I.exports={kDestroyed:k,isDisturbed:Y,kIsDisturbed:N,isErrored:C,kIsErrored:Q,isReadable:y,kIsReadable:O,isClosed:i,isDestroyed:P,isDuplexNodeStream:Z,isFinished:c,isIterable:B,isReadableNodeStream:U,isReadableEnded:w,isReadableFinished:M,isReadableErrored:n,isNodeStream:T,isWritable:m,isWritableNodeStream:W,isWritableEnded:q,isWritableFinished:x,isWritableErrored:l,isServerRequest:K0,isServerResponse:a,willEmitClose:X}}),S2=$0((E,I)=>{var F=(x2(),W2(I2)),{AbortError:L,codes:H}=F2(),{ERR_INVALID_ARG_TYPE:k,ERR_STREAM_PREMATURE_CLOSE:Q}=H,{kEmptyObject:O,once:N}=N2(),{validateAbortSignal:U,validateFunction:W,validateObject:Z}=z1(),{Promise:T}=O2(),{isClosed:B,isReadable:P,isReadableNodeStream:q,isReadableFinished:x,isReadableErrored:w,isWritable:M,isWritableNodeStream:y,isWritableFinished:m,isWritableErrored:c,isNodeStream:l,willEmitClose:n}=v2();function i(X){return X.setHeader&&typeof X.abort=="function"}var C0=()=>{};function a(X,Y,C){var J,z;arguments.length===2?(C=Y,Y=O):Y==null?Y=O:Z(Y,"options"),W(C,"callback"),U(Y.signal,"options.signal"),C=N(C);let V=(J=Y.readable)!==null&&J!==void 0?J:q(X),K=(z=Y.writable)!==null&&z!==void 0?z:y(X);if(!l(X))throw new k("stream","Stream",X);let{_writableState:$,_readableState:G}=X,j=()=>{X.writable||_()},A=n(X)&&q(X)===V&&y(X)===K,R=m(X,!1),_=()=>{R=!0,X.destroyed&&(A=!1),!(A&&(!X.readable||V))&&(!V||s)&&C.call(X)},s=x(X,!1),r=()=>{s=!0,X.destroyed&&(A=!1),!(A&&(!X.writable||K))&&(!K||R)&&C.call(X)},Y0=(X0)=>{C.call(X,X0)},o=B(X),b=()=>{o=!0;let X0=c(X)||w(X);if(X0&&typeof X0!="boolean")return C.call(X,X0);if(V&&!s&&q(X,!0)&&!x(X,!1))return C.call(X,new Q);if(K&&!R&&!m(X,!1))return C.call(X,new Q);C.call(X)},f=()=>{X.req.on("finish",_)};i(X)?(X.on("complete",_),A||X.on("abort",b),X.req?f():X.on("request",f)):K&&!$&&(X.on("end",j),X.on("close",j)),!A&&typeof X.aborted=="boolean"&&X.on("aborted",b),X.on("end",r),X.on("finish",_),Y.error!==!1&&X.on("error",Y0),X.on("close",b),o?F.nextTick(b):$!=null&&$.errorEmitted||G!=null&&G.errorEmitted?A||F.nextTick(b):(!V&&(!A||P(X))&&(R||M(X)===!1)||!K&&(!A||M(X))&&(s||P(X)===!1)||G&&X.req&&X.aborted)&&F.nextTick(b);let W0=()=>{C=C0,X.removeListener("aborted",b),X.removeListener("complete",_),X.removeListener("abort",b),X.removeListener("request",f),X.req&&X.req.removeListener("finish",_),X.removeListener("end",j),X.removeListener("close",j),X.removeListener("finish",_),X.removeListener("end",r),X.removeListener("error",Y0),X.removeListener("close",b)};if(Y.signal&&!o){let X0=()=>{let z0=C;W0(),z0.call(X,new L(void 0,{cause:Y.signal.reason}))};if(Y.signal.aborted)F.nextTick(X0);else{let z0=C;C=N((...g)=>{Y.signal.removeEventListener("abort",X0),z0.apply(X,g)}),Y.signal.addEventListener("abort",X0)}}return W0}function K0(X,Y){return new T((C,J)=>{a(X,Y,(z)=>{z?J(z):C()})})}I.exports=a,I.exports.finished=K0}),Y8=$0((E,I)=>{var F=globalThis.AbortController||E1().AbortController,{codes:{ERR_INVALID_ARG_TYPE:L,ERR_MISSING_ARGS:H,ERR_OUT_OF_RANGE:k},AbortError:Q}=F2(),{validateAbortSignal:O,validateInteger:N,validateObject:U}=z1(),W=O2().Symbol("kWeak"),{finished:Z}=S2(),{ArrayPrototypePush:T,MathFloor:B,Number:P,NumberIsNaN:q,Promise:x,PromiseReject:w,PromisePrototypeThen:M,Symbol:y}=O2(),m=y("kEmpty"),c=y("kEof");function l(G,j){if(typeof G!="function")throw new L("fn",["Function","AsyncFunction"],G);j!=null&&U(j,"options"),j?.signal!=null&&O(j.signal,"options.signal");let A=1;return j?.concurrency!=null&&(A=B(j.concurrency)),N(A,"concurrency",1),async function*(){var R,_;let s=new F,r=this,Y0=[],o=s.signal,b={signal:o},f=()=>s.abort();j!=null&&(R=j.signal)!==null&&R!==void 0&&R.aborted&&f(),j==null||(_=j.signal)===null||_===void 0||_.addEventListener("abort",f);let W0,X0,z0=!1;function g(){z0=!0}async function v(){try{for await(let G0 of r){var p;if(z0)return;if(o.aborted)throw new Q;try{G0=G(G0,b)}catch(t){G0=w(t)}G0!==m&&(typeof((p=G0)===null||p===void 0?void 0:p.catch)=="function"&&G0.catch(g),Y0.push(G0),W0&&(W0(),W0=null),!z0&&Y0.length&&Y0.length>=A&&await new x((t)=>{X0=t}))}Y0.push(c)}catch(G0){let t=w(G0);M(t,void 0,g),Y0.push(t)}finally{var e;z0=!0,W0&&(W0(),W0=null),j==null||(e=j.signal)===null||e===void 0||e.removeEventListener("abort",f)}}v();try{for(;;){for(;Y0.length>0;){let p=await Y0[0];if(p===c)return;if(o.aborted)throw new Q;p!==m&&(yield p),Y0.shift(),X0&&(X0(),X0=null)}await new x((p)=>{W0=p})}}finally{s.abort(),z0=!0,X0&&(X0(),X0=null)}}.call(this)}function n(G=void 0){return G!=null&&U(G,"options"),G?.signal!=null&&O(G.signal,"options.signal"),async function*(){let j=0;for await(let R of this){var A;if(G!=null&&(A=G.signal)!==null&&A!==void 0&&A.aborted)throw new Q({cause:G.signal.reason});yield[j++,R]}}.call(this)}async function i(G,j=void 0){for await(let A of X.call(this,G,j))return!0;return!1}async function C0(G,j=void 0){if(typeof G!="function")throw new L("fn",["Function","AsyncFunction"],G);return!await i.call(this,async(...A)=>!await G(...A),j)}async function a(G,j){for await(let A of X.call(this,G,j))return A}async function K0(G,j){if(typeof G!="function")throw new L("fn",["Function","AsyncFunction"],G);async function A(R,_){return await G(R,_),m}for await(let R of l.call(this,A,j));}function X(G,j){if(typeof G!="function")throw new L("fn",["Function","AsyncFunction"],G);async function A(R,_){return await G(R,_)?R:m}return l.call(this,A,j)}var Y=class extends H{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}};async function C(G,j,A){var R;if(typeof G!="function")throw new L("reducer",["Function","AsyncFunction"],G);A!=null&&U(A,"options"),A?.signal!=null&&O(A.signal,"options.signal");let _=arguments.length>1;if(A!=null&&(R=A.signal)!==null&&R!==void 0&&R.aborted){let b=new Q(void 0,{cause:A.signal.reason});throw this.once("error",()=>{}),await Z(this.destroy(b)),b}let s=new F,r=s.signal;if(A!=null&&A.signal){let b={once:!0,[W]:this};A.signal.addEventListener("abort",()=>s.abort(),b)}let Y0=!1;try{for await(let b of this){var o;if(Y0=!0,A!=null&&(o=A.signal)!==null&&o!==void 0&&o.aborted)throw new Q;_?j=await G(j,b,{signal:r}):(j=b,_=!0)}if(!Y0&&!_)throw new Y}finally{s.abort()}return j}async function J(G){G!=null&&U(G,"options"),G?.signal!=null&&O(G.signal,"options.signal");let j=[];for await(let R of this){var A;if(G!=null&&(A=G.signal)!==null&&A!==void 0&&A.aborted)throw new Q(void 0,{cause:G.signal.reason});T(j,R)}return j}function z(G,j){let A=l.call(this,G,j);return async function*(){for await(let R of A)yield*R}.call(this)}function V(G){if(G=P(G),q(G))return 0;if(G<0)throw new k("number",">= 0",G);return G}function K(G,j=void 0){return j!=null&&U(j,"options"),j?.signal!=null&&O(j.signal,"options.signal"),G=V(G),async function*(){var A;if(j!=null&&(A=j.signal)!==null&&A!==void 0&&A.aborted)throw new Q;for await(let _ of this){var R;if(j!=null&&(R=j.signal)!==null&&R!==void 0&&R.aborted)throw new Q;G--<=0&&(yield _)}}.call(this)}function $(G,j=void 0){return j!=null&&U(j,"options"),j?.signal!=null&&O(j.signal,"options.signal"),G=V(G),async function*(){var A;if(j!=null&&(A=j.signal)!==null&&A!==void 0&&A.aborted)throw new Q;for await(let _ of this){var R;if(j!=null&&(R=j.signal)!==null&&R!==void 0&&R.aborted)throw new Q;if(G-- >0)yield _;else return}}.call(this)}I.exports.streamReturningOperators={asIndexedPairs:n,drop:K,filter:X,flatMap:z,map:l,take:$},I.exports.promiseReturningOperators={every:C0,forEach:K0,reduce:C,toArray:J,some:i,find:a}}),p2=$0((E,I)=>{var F=(x2(),W2(I2)),{aggregateTwoErrors:L,codes:{ERR_MULTIPLE_CALLBACK:H},AbortError:k}=F2(),{Symbol:Q}=O2(),{kDestroyed:O,isDestroyed:N,isFinished:U,isServerRequest:W}=v2(),Z=Q("kDestroy"),T=Q("kConstruct");function B(X,Y,C){X&&(X.stack,Y&&!Y.errored&&(Y.errored=X),C&&!C.errored&&(C.errored=X))}function P(X,Y){let C=this._readableState,J=this._writableState,z=J||C;return J&&J.destroyed||C&&C.destroyed?(typeof Y=="function"&&Y(),this):(B(X,J,C),J&&(J.destroyed=!0),C&&(C.destroyed=!0),z.constructed?q(this,X,Y):this.once(Z,function(V){q(this,L(V,X),Y)}),this)}function q(X,Y,C){let J=!1;function z(V){if(J)return;J=!0;let{_readableState:K,_writableState:$}=X;B(V,$,K),$&&($.closed=!0),K&&(K.closed=!0),typeof C=="function"&&C(V),V?F.nextTick(x,X,V):F.nextTick(w,X)}try{X._destroy(Y||null,z)}catch(V){z(V)}}function x(X,Y){M(X,Y),w(X)}function w(X){let{_readableState:Y,_writableState:C}=X;C&&(C.closeEmitted=!0),Y&&(Y.closeEmitted=!0),(C&&C.emitClose||Y&&Y.emitClose)&&X.emit("close")}function M(X,Y){let{_readableState:C,_writableState:J}=X;J&&J.errorEmitted||C&&C.errorEmitted||(J&&(J.errorEmitted=!0),C&&(C.errorEmitted=!0),X.emit("error",Y))}function y(){let X=this._readableState,Y=this._writableState;X&&(X.constructed=!0,X.closed=!1,X.closeEmitted=!1,X.destroyed=!1,X.errored=null,X.errorEmitted=!1,X.reading=!1,X.ended=X.readable===!1,X.endEmitted=X.readable===!1),Y&&(Y.constructed=!0,Y.destroyed=!1,Y.closed=!1,Y.closeEmitted=!1,Y.errored=null,Y.errorEmitted=!1,Y.finalCalled=!1,Y.prefinished=!1,Y.ended=Y.writable===!1,Y.ending=Y.writable===!1,Y.finished=Y.writable===!1)}function m(X,Y,C){let{_readableState:J,_writableState:z}=X;if(z&&z.destroyed||J&&J.destroyed)return this;J&&J.autoDestroy||z&&z.autoDestroy?X.destroy(Y):Y&&(Y.stack,z&&!z.errored&&(z.errored=Y),J&&!J.errored&&(J.errored=Y),C?F.nextTick(M,X,Y):M(X,Y))}function c(X,Y){if(typeof X._construct!="function")return;let{_readableState:C,_writableState:J}=X;C&&(C.constructed=!1),J&&(J.constructed=!1),X.once(T,Y),!(X.listenerCount(T)>1)&&F.nextTick(l,X)}function l(X){let Y=!1;function C(J){if(Y){m(X,J??new H);return}Y=!0;let{_readableState:z,_writableState:V}=X,K=V||z;z&&(z.constructed=!0),V&&(V.constructed=!0),K.destroyed?X.emit(Z,J):J?m(X,J,!0):F.nextTick(n,X)}try{X._construct(C)}catch(J){C(J)}}function n(X){X.emit(T)}function i(X){return X&&X.setHeader&&typeof X.abort=="function"}function C0(X){X.emit("close")}function a(X,Y){X.emit("error",Y),F.nextTick(C0,X)}function K0(X,Y){!X||N(X)||(!Y&&!U(X)&&(Y=new k),W(X)?(X.socket=null,X.destroy(Y)):i(X)?X.abort():i(X.req)?X.req.abort():typeof X.destroy=="function"?X.destroy(Y):typeof X.close=="function"?X.close():Y?F.nextTick(a,X,Y):F.nextTick(C0,X),X.destroyed||(X[O]=!0))}I.exports={construct:c,destroyer:K0,destroy:P,undestroy:y,errorOrDestroy:m}}),x1=$0((E,I)=>{var{ArrayIsArray:F,ObjectSetPrototypeOf:L}=O2(),{EventEmitter:H}=E2();function k(O){H.call(this,O)}L(k.prototype,H.prototype),L(k,H),k.prototype.pipe=function(O,N){let U=this;function W(w){O.writable&&O.write(w)===!1&&U.pause&&U.pause()}U.on("data",W);function Z(){U.readable&&U.resume&&U.resume()}O.on("drain",Z),!O._isStdio&&(!N||N.end!==!1)&&(U.on("end",B),U.on("close",P));let T=!1;function B(){T||(T=!0,O.end())}function P(){T||(T=!0,typeof O.destroy=="function"&&O.destroy())}function q(w){x(),H.listenerCount(this,"error")===0&&this.emit("error",w)}Q(U,"error",q),Q(O,"error",q);function x(){U.removeListener("data",W),O.removeListener("drain",Z),U.removeListener("end",B),U.removeListener("close",P),U.removeListener("error",q),O.removeListener("error",q),U.removeListener("end",x),U.removeListener("close",x),O.removeListener("close",x)}return U.on("end",x),U.on("close",x),O.on("close",x),O.emit("pipe",U),O};function Q(O,N,U){if(typeof O.prependListener=="function")return O.prependListener(N,U);!O._events||!O._events[N]?O.on(N,U):F(O._events[N])?O._events[N].unshift(U):O._events[N]=[U,O._events[N]]}I.exports={Stream:k,prependListener:Q}}),v1=$0((E,I)=>{var{AbortError:F,codes:L}=F2(),H=S2(),{ERR_INVALID_ARG_TYPE:k}=L,Q=(N,U)=>{if(typeof N!="object"||!("aborted"in N))throw new k(U,"AbortSignal",N)};function O(N){return!!(N&&typeof N.pipe=="function")}I.exports.addAbortSignal=function(N,U){if(Q(N,"signal"),!O(U))throw new k("stream","stream.Stream",U);return I.exports.addAbortSignalNoValidate(N,U)},I.exports.addAbortSignalNoValidate=function(N,U){if(typeof N!="object"||!("aborted"in N))return U;let W=()=>{U.destroy(new F(void 0,{cause:N.reason}))};return N.aborted?W():(N.addEventListener("abort",W),H(U,()=>N.removeEventListener("abort",W))),U}}),J8=$0((E,I)=>{var{StringPrototypeSlice:F,SymbolIterator:L,TypedArrayPrototypeSet:H,Uint8Array:k}=O2(),{Buffer:Q}=U2(),{inspect:O}=N2();I.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(N){let U={data:N,next:null};this.length>0?this.tail.next=U:this.head=U,this.tail=U,++this.length}unshift(N){let U={data:N,next:this.head};this.length===0&&(this.tail=U),this.head=U,++this.length}shift(){if(this.length===0)return;let N=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,N}clear(){this.head=this.tail=null,this.length=0}join(N){if(this.length===0)return"";let U=this.head,W=""+U.data;for(;(U=U.next)!==null;)W+=N+U.data;return W}concat(N){if(this.length===0)return Q.alloc(0);let U=Q.allocUnsafe(N>>>0),W=this.head,Z=0;for(;W;)H(U,W.data,Z),Z+=W.data.length,W=W.next;return U}consume(N,U){let W=this.head.data;if(NT.length)U+=T,N-=T.length;else{N===T.length?(U+=T,++Z,W.next?this.head=W.next:this.head=this.tail=null):(U+=F(T,0,N),this.head=W,W.data=F(T,N));break}++Z}while((W=W.next)!==null);return this.length-=Z,U}_getBuffer(N){let U=Q.allocUnsafe(N),W=N,Z=this.head,T=0;do{let B=Z.data;if(N>B.length)H(U,B,W-N),N-=B.length;else{N===B.length?(H(U,B,W-N),++T,Z.next?this.head=Z.next:this.head=this.tail=null):(H(U,new k(B.buffer,B.byteOffset,N),W-N),this.head=Z,Z.data=B.slice(N));break}++T}while((Z=Z.next)!==null);return this.length-=T,U}[Symbol.for("nodejs.util.inspect.custom")](N,U){return O(this,{...U,depth:0,customInspect:!1})}}}),S1=$0((E,I)=>{var{MathFloor:F,NumberIsInteger:L}=O2(),{ERR_INVALID_ARG_VALUE:H}=F2().codes;function k(N,U,W){return N.highWaterMark!=null?N.highWaterMark:U?N[W]:null}function Q(N){return N?16:16384}function O(N,U,W,Z){let T=k(U,Z,W);if(T!=null){if(!L(T)||T<0){let B=Z?`options.${W}`:"options.highWaterMark";throw new H(B,T)}return F(T)}return Q(N.objectMode)}I.exports={getHighWaterMark:O,getDefaultHighWaterMark:Q}}),q5=$0((E,I)=>{var F=(x2(),W2(I2)),{PromisePrototypeThen:L,SymbolAsyncIterator:H,SymbolIterator:k}=O2(),{Buffer:Q}=U2(),{ERR_INVALID_ARG_TYPE:O,ERR_STREAM_NULL_VALUES:N}=F2().codes;function U(W,Z,T){let B;if(typeof Z=="string"||Z instanceof Q)return new W({objectMode:!0,...T,read(){this.push(Z),this.push(null)}});let P;if(Z&&Z[H])P=!0,B=Z[H]();else if(Z&&Z[k])P=!1,B=Z[k]();else throw new O("iterable",["Iterable"],Z);let q=new W({objectMode:!0,highWaterMark:1,...T}),x=!1;q._read=function(){x||(x=!0,M())},q._destroy=function(y,m){L(w(y),()=>F.nextTick(m,y),(c)=>F.nextTick(m,c||y))};async function w(y){let m=y!=null,c=typeof B.throw=="function";if(m&&c){let{value:l,done:n}=await B.throw(y);if(await l,n)return}if(typeof B.return=="function"){let{value:l}=await B.return();await l}}async function M(){for(;;){try{let{value:y,done:m}=P?await B.next():B.next();if(m)q.push(null);else{let c=y&&typeof y.then=="function"?await y:y;if(c===null)throw x=!1,new N;if(q.push(c))continue;x=!1}}catch(y){q.destroy(y)}break}}return q}I.exports=U}),Q1=$0((E,I)=>{var F=(x2(),W2(I2)),{ArrayPrototypeIndexOf:L,NumberIsInteger:H,NumberIsNaN:k,NumberParseInt:Q,ObjectDefineProperties:O,ObjectKeys:N,ObjectSetPrototypeOf:U,Promise:W,SafeSet:Z,SymbolAsyncIterator:T,Symbol:B}=O2();I.exports=A,A.ReadableState=j;var{EventEmitter:P}=E2(),{Stream:q,prependListener:x}=x1(),{Buffer:w}=U2(),{addAbortSignal:M}=v1(),y=S2(),m=N2().debuglog("stream",(D)=>{m=D}),c=J8(),l=p2(),{getHighWaterMark:n,getDefaultHighWaterMark:i}=S1(),{aggregateTwoErrors:C0,codes:{ERR_INVALID_ARG_TYPE:a,ERR_METHOD_NOT_IMPLEMENTED:K0,ERR_OUT_OF_RANGE:X,ERR_STREAM_PUSH_AFTER_EOF:Y,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:C}}=F2(),{validateObject:J}=z1(),z=B("kPaused"),{StringDecoder:V}=k1(),K=q5();U(A.prototype,q.prototype),U(A,q);var $=()=>{},{errorOrDestroy:G}=l;function j(D,S,d){typeof d!="boolean"&&(d=S instanceof k2()),this.objectMode=!!(D&&D.objectMode),d&&(this.objectMode=this.objectMode||!!(D&&D.readableObjectMode)),this.highWaterMark=D?n(this,D,"readableHighWaterMark",d):i(!1),this.buffer=new c,this.length=0,this.pipes=[],this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.constructed=!0,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this[z]=null,this.errorEmitted=!1,this.emitClose=!D||D.emitClose!==!1,this.autoDestroy=!D||D.autoDestroy!==!1,this.destroyed=!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this.defaultEncoding=D&&D.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.multiAwaitDrain=!1,this.readingMore=!1,this.dataEmitted=!1,this.decoder=null,this.encoding=null,D&&D.encoding&&(this.decoder=new V(D.encoding),this.encoding=D.encoding)}function A(D){if(!(this instanceof A))return new A(D);let S=this instanceof k2();this._readableState=new j(D,this,S),D&&(typeof D.read=="function"&&(this._read=D.read),typeof D.destroy=="function"&&(this._destroy=D.destroy),typeof D.construct=="function"&&(this._construct=D.construct),D.signal&&!S&&M(D.signal,this)),q.call(this,D),l.construct(this,()=>{this._readableState.needReadable&&W0(this,this._readableState)})}A.prototype.destroy=l.destroy,A.prototype._undestroy=l.undestroy,A.prototype._destroy=function(D,S){S(D)},A.prototype[P.captureRejectionSymbol]=function(D){this.destroy(D)},A.prototype.push=function(D,S){return R(this,D,S,!1)},A.prototype.unshift=function(D,S){return R(this,D,S,!0)};function R(D,S,d,h){m("readableAddChunk",S);let u=D._readableState,P0;if(u.objectMode||(typeof S=="string"?(d=d||u.defaultEncoding,u.encoding!==d&&(h&&u.encoding?S=w.from(S,d).toString(u.encoding):(S=w.from(S,d),d=""))):S instanceof w?d="":q._isUint8Array(S)?(S=q._uint8ArrayToBuffer(S),d=""):S!=null&&(P0=new a("chunk",["string","Buffer","Uint8Array"],S))),P0)G(D,P0);else if(S===null)u.reading=!1,o(D,u);else if(u.objectMode||S&&S.length>0)if(h)if(u.endEmitted)G(D,new C);else{if(u.destroyed||u.errored)return!1;_(D,u,S,!0)}else if(u.ended)G(D,new Y);else{if(u.destroyed||u.errored)return!1;u.reading=!1,u.decoder&&!d?(S=u.decoder.write(S),u.objectMode||S.length!==0?_(D,u,S,!1):W0(D,u)):_(D,u,S,!1)}else h||(u.reading=!1,W0(D,u));return!u.ended&&(u.length0?(S.multiAwaitDrain?S.awaitDrainWriters.clear():S.awaitDrainWriters=null,S.dataEmitted=!0,D.emit("data",d)):(S.length+=S.objectMode?1:d.length,h?S.buffer.unshift(d):S.buffer.push(d),S.needReadable&&b(D)),W0(D,S)}A.prototype.isPaused=function(){let D=this._readableState;return D[z]===!0||D.flowing===!1},A.prototype.setEncoding=function(D){let S=new V(D);this._readableState.decoder=S,this._readableState.encoding=this._readableState.decoder.encoding;let d=this._readableState.buffer,h="";for(let u of d)h+=S.write(u);return d.clear(),h!==""&&d.push(h),this._readableState.length=h.length,this};var s=1073741824;function r(D){if(D>s)throw new X("size","<= 1GiB",D);return D--,D|=D>>>1,D|=D>>>2,D|=D>>>4,D|=D>>>8,D|=D>>>16,D++,D}function Y0(D,S){return D<=0||S.length===0&&S.ended?0:S.objectMode?1:k(D)?S.flowing&&S.length?S.buffer.first().length:S.length:D<=S.length?D:S.ended?S.length:0}A.prototype.read=function(D){m("read",D),D===void 0?D=NaN:H(D)||(D=Q(D,10));let S=this._readableState,d=D;if(D>S.highWaterMark&&(S.highWaterMark=r(D)),D!==0&&(S.emittedReadable=!1),D===0&&S.needReadable&&((S.highWaterMark!==0?S.length>=S.highWaterMark:S.length>0)||S.ended))return m("read: emitReadable",S.length,S.ended),S.length===0&&S.ended?V0(this):b(this),null;if(D=Y0(D,S),D===0&&S.ended)return S.length===0&&V0(this),null;let h=S.needReadable;if(m("need readable",h),(S.length===0||S.length-D0?u=Q0(D,S):u=null,u===null?(S.needReadable=S.length<=S.highWaterMark,D=0):(S.length-=D,S.multiAwaitDrain?S.awaitDrainWriters.clear():S.awaitDrainWriters=null),S.length===0&&(S.ended||(S.needReadable=!0),d!==D&&S.ended&&V0(this)),u!==null&&!S.errorEmitted&&!S.closeEmitted&&(S.dataEmitted=!0,this.emit("data",u)),u};function o(D,S){if(m("onEofChunk"),!S.ended){if(S.decoder){let d=S.decoder.end();d&&d.length&&(S.buffer.push(d),S.length+=S.objectMode?1:d.length)}S.ended=!0,S.sync?b(D):(S.needReadable=!1,S.emittedReadable=!0,f(D))}}function b(D){let S=D._readableState;m("emitReadable",S.needReadable,S.emittedReadable),S.needReadable=!1,S.emittedReadable||(m("emitReadable",S.flowing),S.emittedReadable=!0,F.nextTick(f,D))}function f(D){let S=D._readableState;m("emitReadable_",S.destroyed,S.length,S.ended),!S.destroyed&&!S.errored&&(S.length||S.ended)&&(D.emit("readable"),S.emittedReadable=!1),S.needReadable=!S.flowing&&!S.ended&&S.length<=S.highWaterMark,G0(D)}function W0(D,S){!S.readingMore&&S.constructed&&(S.readingMore=!0,F.nextTick(X0,D,S))}function X0(D,S){for(;!S.reading&&!S.ended&&(S.length1&&h.pipes.includes(D)&&(m("false write response, pause",h.awaitDrainWriters.size),h.awaitDrainWriters.add(D)),d.pause()),H0||(H0=z0(d,D),D.on("drain",H0))}d.on("data",g0);function g0(T0){m("ondata");let h0=D.write(T0);m("dest.write",h0),h0===!1&&O0()}function L0(T0){if(m("onerror",T0),D0(),D.removeListener("error",L0),D.listenerCount("error")===0){let h0=D._writableState||D._readableState;h0&&!h0.errorEmitted?G(D,T0):D.emit("error",T0)}}x(D,"error",L0);function N0(){D.removeListener("finish",$2),D0()}D.once("close",N0);function $2(){m("onfinish"),D.removeListener("close",N0),D0()}D.once("finish",$2);function D0(){m("unpipe"),d.unpipe(D)}return D.emit("pipe",d),D.writableNeedDrain===!0?h.flowing&&O0():h.flowing||(m("pipe resume"),d.resume()),D};function z0(D,S){return function(){let d=D._readableState;d.awaitDrainWriters===S?(m("pipeOnDrain",1),d.awaitDrainWriters=null):d.multiAwaitDrain&&(m("pipeOnDrain",d.awaitDrainWriters.size),d.awaitDrainWriters.delete(S)),(!d.awaitDrainWriters||d.awaitDrainWriters.size===0)&&D.listenerCount("data")&&D.resume()}}A.prototype.unpipe=function(D){let S=this._readableState,d={hasUnpiped:!1};if(S.pipes.length===0)return this;if(!D){let u=S.pipes;S.pipes=[],this.pause();for(let P0=0;P00,h.flowing!==!1&&this.resume()):D==="readable"&&!h.endEmitted&&!h.readableListening&&(h.readableListening=h.needReadable=!0,h.flowing=!1,h.emittedReadable=!1,m("on readable",h.length,h.reading),h.length?b(this):h.reading||F.nextTick(v,this)),d},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(D,S){let d=q.prototype.removeListener.call(this,D,S);return D==="readable"&&F.nextTick(g,this),d},A.prototype.off=A.prototype.removeListener,A.prototype.removeAllListeners=function(D){let S=q.prototype.removeAllListeners.apply(this,arguments);return(D==="readable"||D===void 0)&&F.nextTick(g,this),S};function g(D){let S=D._readableState;S.readableListening=D.listenerCount("readable")>0,S.resumeScheduled&&S[z]===!1?S.flowing=!0:D.listenerCount("data")>0?D.resume():S.readableListening||(S.flowing=null)}function v(D){m("readable nexttick read 0"),D.read(0)}A.prototype.resume=function(){let D=this._readableState;return D.flowing||(m("resume"),D.flowing=!D.readableListening,p(this,D)),D[z]=!1,this};function p(D,S){S.resumeScheduled||(S.resumeScheduled=!0,F.nextTick(e,D,S))}function e(D,S){m("resume",S.reading),S.reading||D.read(0),S.resumeScheduled=!1,D.emit("resume"),G0(D),S.flowing&&!S.reading&&D.read(0)}A.prototype.pause=function(){return m("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(m("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[z]=!0,this};function G0(D){let S=D._readableState;for(m("flow",S.flowing);S.flowing&&D.read()!==null;);}A.prototype.wrap=function(D){let S=!1;D.on("data",(h)=>{!this.push(h)&&D.pause&&(S=!0,D.pause())}),D.on("end",()=>{this.push(null)}),D.on("error",(h)=>{G(this,h)}),D.on("close",()=>{this.destroy()}),D.on("destroy",()=>{this.destroy()}),this._read=()=>{S&&D.resume&&(S=!1,D.resume())};let d=N(D);for(let h=1;h{u=J0?C0(u,J0):null,d(),d=$});try{for(;;){let J0=D.destroyed?null:D.read();if(J0!==null)yield J0;else{if(u)throw u;if(u===null)return;await new W(h)}}}catch(J0){throw u=C0(u,J0),u}finally{(u||S?.destroyOnReturn!==!1)&&(u===void 0||D._readableState.autoDestroy)?l.destroyer(D,null):(D.off("readable",h),P0())}}O(A.prototype,{readable:{__proto__:null,get(){let D=this._readableState;return!!D&&D.readable!==!1&&!D.destroyed&&!D.errorEmitted&&!D.endEmitted},set(D){this._readableState&&(this._readableState.readable=!!D)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(D){this._readableState&&(this._readableState.flowing=D)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(D){!this._readableState||(this._readableState.destroyed=D)}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),O(j.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[z]!==!1},set(D){this[z]=!!D}}}),A._fromList=Q0;function Q0(D,S){if(S.length===0)return null;let d;return S.objectMode?d=S.buffer.shift():!D||D>=S.length?(S.decoder?d=S.buffer.join(""):S.buffer.length===1?d=S.buffer.first():d=S.buffer.concat(S.length),S.buffer.clear()):d=S.buffer.consume(D,S.decoder),d}function V0(D){let S=D._readableState;m("endReadable",S.endEmitted),S.endEmitted||(S.ended=!0,F.nextTick(_0,S,D))}function _0(D,S){if(m("endReadableNT",D.endEmitted,D.length),!D.errored&&!D.closeEmitted&&!D.endEmitted&&D.length===0){if(D.endEmitted=!0,S.emit("end"),S.writable&&S.allowHalfOpen===!1)F.nextTick(F0,S);else if(D.autoDestroy){let d=S._writableState;(!d||d.autoDestroy&&(d.finished||d.writable===!1))&&S.destroy()}}}function F0(D){D.writable&&!D.writableEnded&&!D.destroyed&&D.end()}A.from=function(D,S){return K(A,D,S)};var Z0;function b0(){return Z0===void 0&&(Z0={}),Z0}A.fromWeb=function(D,S){return b0().newStreamReadableFromReadableStream(D,S)},A.toWeb=function(D,S){return b0().newReadableStreamFromStreamReadable(D,S)},A.wrap=function(D,S){var d,h;return new A({objectMode:(d=(h=D.readableObjectMode)!==null&&h!==void 0?h:D.objectMode)!==null&&d!==void 0?d:!0,...S,destroy(u,P0){l.destroyer(D,u),P0(u)}}).wrap(D)}}),R5=$0((E,I)=>{var F=(x2(),W2(I2)),{ArrayPrototypeSlice:L,Error:H,FunctionPrototypeSymbolHasInstance:k,ObjectDefineProperty:Q,ObjectDefineProperties:O,ObjectSetPrototypeOf:N,StringPrototypeToLowerCase:U,Symbol:W,SymbolHasInstance:Z}=O2();I.exports=V,V.WritableState=J;var{EventEmitter:T}=E2(),B=x1().Stream,{Buffer:P}=U2(),q=p2(),{addAbortSignal:x}=v1(),{getHighWaterMark:w,getDefaultHighWaterMark:M}=S1(),{ERR_INVALID_ARG_TYPE:y,ERR_METHOD_NOT_IMPLEMENTED:m,ERR_MULTIPLE_CALLBACK:c,ERR_STREAM_CANNOT_PIPE:l,ERR_STREAM_DESTROYED:n,ERR_STREAM_ALREADY_FINISHED:i,ERR_STREAM_NULL_VALUES:C0,ERR_STREAM_WRITE_AFTER_END:a,ERR_UNKNOWN_ENCODING:K0}=F2().codes,{errorOrDestroy:X}=q;N(V.prototype,B.prototype),N(V,B);function Y(){}var C=W("kOnFinished");function J(v,p,e){typeof e!="boolean"&&(e=p instanceof k2()),this.objectMode=!!(v&&v.objectMode),e&&(this.objectMode=this.objectMode||!!(v&&v.writableObjectMode)),this.highWaterMark=v?w(this,v,"writableHighWaterMark",e):M(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;let G0=!!(v&&v.decodeStrings===!1);this.decodeStrings=!G0,this.defaultEncoding=v&&v.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=A.bind(void 0,p),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,z(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!v||v.emitClose!==!1,this.autoDestroy=!v||v.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[C]=[]}function z(v){v.buffered=[],v.bufferedIndex=0,v.allBuffers=!0,v.allNoop=!0}J.prototype.getBuffer=function(){return L(this.buffered,this.bufferedIndex)},Q(J.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function V(v){let p=this instanceof k2();if(!p&&!k(V,this))return new V(v);this._writableState=new J(v,this,p),v&&(typeof v.write=="function"&&(this._write=v.write),typeof v.writev=="function"&&(this._writev=v.writev),typeof v.destroy=="function"&&(this._destroy=v.destroy),typeof v.final=="function"&&(this._final=v.final),typeof v.construct=="function"&&(this._construct=v.construct),v.signal&&x(v.signal,this)),B.call(this,v),q.construct(this,()=>{let e=this._writableState;e.writing||r(this,e),f(this,e)})}Q(V,Z,{__proto__:null,value:function(v){return k(this,v)?!0:this!==V?!1:v&&v._writableState instanceof J}}),V.prototype.pipe=function(){X(this,new l)};function K(v,p,e,G0){let t=v._writableState;if(typeof e=="function")G0=e,e=t.defaultEncoding;else{if(!e)e=t.defaultEncoding;else if(e!=="buffer"&&!P.isEncoding(e))throw new K0(e);typeof G0!="function"&&(G0=Y)}if(p===null)throw new C0;if(!t.objectMode)if(typeof p=="string")t.decodeStrings!==!1&&(p=P.from(p,e),e="buffer");else if(p instanceof P)e="buffer";else if(B._isUint8Array(p))p=B._uint8ArrayToBuffer(p),e="buffer";else throw new y("chunk",["string","Buffer","Uint8Array"],p);let y0;return t.ending?y0=new a:t.destroyed&&(y0=new n("write")),y0?(F.nextTick(G0,y0),X(v,y0,!0),y0):(t.pendingcb++,$(v,t,p,e,G0))}V.prototype.write=function(v,p,e){return K(this,v,p,e)===!0},V.prototype.cork=function(){this._writableState.corked++},V.prototype.uncork=function(){let v=this._writableState;v.corked&&(v.corked--,v.writing||r(this,v))},V.prototype.setDefaultEncoding=function(v){if(typeof v=="string"&&(v=U(v)),!P.isEncoding(v))throw new K0(v);return this._writableState.defaultEncoding=v,this};function $(v,p,e,G0,t){let y0=p.objectMode?1:e.length;p.length+=y0;let Q0=p.lengthe.bufferedIndex&&r(v,e),G0?e.afterWriteTickInfo!==null&&e.afterWriteTickInfo.cb===t?e.afterWriteTickInfo.count++:(e.afterWriteTickInfo={count:1,cb:t,stream:v,state:e},F.nextTick(R,e.afterWriteTickInfo)):_(v,e,1,t))}function R({stream:v,state:p,count:e,cb:G0}){return p.afterWriteTickInfo=null,_(v,p,e,G0)}function _(v,p,e,G0){for(!p.ending&&!v.destroyed&&p.length===0&&p.needDrain&&(p.needDrain=!1,v.emit("drain"));e-- >0;)p.pendingcb--,G0();p.destroyed&&s(p),f(v,p)}function s(v){if(v.writing)return;for(let t=v.bufferedIndex;t1&&v._writev){p.pendingcb-=y0-1;let V0=p.allNoop?Y:(F0)=>{for(let Z0=Q0;Z0256?(e.splice(0,Q0),p.bufferedIndex=0):p.bufferedIndex=Q0}p.bufferProcessing=!1}V.prototype._write=function(v,p,e){if(this._writev)this._writev([{chunk:v,encoding:p}],e);else throw new m("_write()")},V.prototype._writev=null,V.prototype.end=function(v,p,e){let G0=this._writableState;typeof v=="function"?(e=v,v=null,p=null):typeof p=="function"&&(e=p,p=null);let t;if(v!=null){let y0=K(this,v,p);y0 instanceof H&&(t=y0)}return G0.corked&&(G0.corked=1,this.uncork()),t||(!G0.errored&&!G0.ending?(G0.ending=!0,f(this,G0,!0),G0.ended=!0):G0.finished?t=new i("end"):G0.destroyed&&(t=new n("end"))),typeof e=="function"&&(t||G0.finished?F.nextTick(e,t):G0[C].push(e)),this};function Y0(v){return v.ending&&!v.destroyed&&v.constructed&&v.length===0&&!v.errored&&v.buffered.length===0&&!v.finished&&!v.writing&&!v.errorEmitted&&!v.closeEmitted}function o(v,p){let e=!1;function G0(t){if(e){X(v,t??c());return}if(e=!0,p.pendingcb--,t){let y0=p[C].splice(0);for(let Q0=0;Q0{Y0(t)?W0(G0,t):t.pendingcb--},v,p)):Y0(p)&&(p.pendingcb++,W0(v,p))))}function W0(v,p){p.pendingcb--,p.finished=!0;let e=p[C].splice(0);for(let G0=0;G0{var F=(x2(),W2(I2)),L=U2(),{isReadable:H,isWritable:k,isIterable:Q,isNodeStream:O,isReadableNodeStream:N,isWritableNodeStream:U,isDuplexNodeStream:W}=v2(),Z=S2(),{AbortError:T,codes:{ERR_INVALID_ARG_TYPE:B,ERR_INVALID_RETURN_VALUE:P}}=F2(),{destroyer:q}=p2(),x=k2(),w=Q1(),{createDeferredPromise:M}=N2(),y=q5(),m=globalThis.Blob||L.Blob,c=typeof m<"u"?function(K0){return K0 instanceof m}:function(K0){return!1},l=globalThis.AbortController||E1().AbortController,{FunctionPrototypeCall:n}=O2(),i=class extends x{constructor(K0){super(K0),K0?.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),K0?.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}};I.exports=function K0(X,Y){if(W(X))return X;if(N(X))return a({readable:X});if(U(X))return a({writable:X});if(O(X))return a({writable:!1,readable:!1});if(typeof X=="function"){let{value:J,write:z,final:V,destroy:K}=C0(X);if(Q(J))return y(i,J,{objectMode:!0,write:z,final:V,destroy:K});let $=J?.then;if(typeof $=="function"){let G,j=n($,J,(A)=>{if(A!=null)throw new P("nully","body",A)},(A)=>{q(G,A)});return G=new i({objectMode:!0,readable:!1,write:z,final(A){V(async()=>{try{await j,F.nextTick(A,null)}catch(R){F.nextTick(A,R)}})},destroy:K})}throw new P("Iterable, AsyncIterable or AsyncFunction",Y,J)}if(c(X))return K0(X.arrayBuffer());if(Q(X))return y(i,X,{objectMode:!0,writable:!1});if(typeof X?.writable=="object"||typeof X?.readable=="object"){let J=X!=null&&X.readable?N(X?.readable)?X?.readable:K0(X.readable):void 0,z=X!=null&&X.writable?U(X?.writable)?X?.writable:K0(X.writable):void 0;return a({readable:J,writable:z})}let C=X?.then;if(typeof C=="function"){let J;return n(C,X,(z)=>{z!=null&&J.push(z),J.push(null)},(z)=>{q(J,z)}),J=new i({objectMode:!0,writable:!1,read(){}})}throw new B(Y,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],X)};function C0(K0){let{promise:X,resolve:Y}=M(),C=new l,J=C.signal;return{value:K0(async function*(){for(;;){let z=X;X=null;let{chunk:V,done:K,cb:$}=await z;if(F.nextTick($),K)return;if(J.aborted)throw new T(void 0,{cause:J.reason});({promise:X,resolve:Y}=M()),yield V}}(),{signal:J}),write(z,V,K){let $=Y;Y=null,$({chunk:z,done:!1,cb:K})},final(z){let V=Y;Y=null,V({done:!0,cb:z})},destroy(z,V){C.abort(),V(z)}}}function a(K0){let X=K0.readable&&typeof K0.readable.read!="function"?w.wrap(K0.readable):K0.readable,Y=K0.writable,C=!!H(X),J=!!k(Y),z,V,K,$,G;function j(A){let R=$;$=null,R?R(A):A?G.destroy(A):!C&&!J&&G.destroy()}return G=new i({readableObjectMode:!!(X!=null&&X.readableObjectMode),writableObjectMode:!!(Y!=null&&Y.writableObjectMode),readable:C,writable:J}),J&&(Z(Y,(A)=>{J=!1,A&&q(X,A),j(A)}),G._write=function(A,R,_){Y.write(A,R)?_():z=_},G._final=function(A){Y.end(),V=A},Y.on("drain",function(){if(z){let A=z;z=null,A()}}),Y.on("finish",function(){if(V){let A=V;V=null,A()}})),C&&(Z(X,(A)=>{C=!1,A&&q(X,A),j(A)}),X.on("readable",function(){if(K){let A=K;K=null,A()}}),X.on("end",function(){G.push(null)}),G._read=function(){for(;;){let A=X.read();if(A===null){K=G._read;return}if(!G.push(A))return}}),G._destroy=function(A,R){!A&&$!==null&&(A=new T),K=null,z=null,V=null,$===null?R(A):($=R,q(Y,A),q(X,A))},G}}),k2=$0((E,I)=>{var{ObjectDefineProperties:F,ObjectGetOwnPropertyDescriptor:L,ObjectKeys:H,ObjectSetPrototypeOf:k}=O2();I.exports=N;var Q=Q1(),O=R5();k(N.prototype,Q.prototype),k(N,Q);{let T=H(O.prototype);for(let B=0;B{var{ObjectSetPrototypeOf:F,Symbol:L}=O2();I.exports=N;var{ERR_METHOD_NOT_IMPLEMENTED:H}=F2().codes,k=k2(),{getHighWaterMark:Q}=S1();F(N.prototype,k.prototype),F(N,k);var O=L("kCallback");function N(Z){if(!(this instanceof N))return new N(Z);let T=Z?Q(this,Z,"readableHighWaterMark",!0):null;T===0&&(Z={...Z,highWaterMark:null,readableHighWaterMark:T,writableHighWaterMark:Z.writableHighWaterMark||0}),k.call(this,Z),this._readableState.sync=!1,this[O]=null,Z&&(typeof Z.transform=="function"&&(this._transform=Z.transform),typeof Z.flush=="function"&&(this._flush=Z.flush)),this.on("prefinish",W)}function U(Z){typeof this._flush=="function"&&!this.destroyed?this._flush((T,B)=>{if(T){Z?Z(T):this.destroy(T);return}B!=null&&this.push(B),this.push(null),Z&&Z()}):(this.push(null),Z&&Z())}function W(){this._final!==U&&U.call(this)}N.prototype._final=U,N.prototype._transform=function(Z,T,B){throw new H("_transform()")},N.prototype._write=function(Z,T,B){let P=this._readableState,q=this._writableState,x=P.length;this._transform(Z,T,(w,M)=>{if(w){B(w);return}M!=null&&this.push(M),q.ended||x===P.length||P.length{var{ObjectSetPrototypeOf:F}=O2();I.exports=H;var L=E5();F(H.prototype,L.prototype),F(H,L);function H(k){if(!(this instanceof H))return new H(k);L.call(this,k)}H.prototype._transform=function(k,Q,O){O(null,k)}}),A1=$0((E,I)=>{var F=(x2(),W2(I2)),{ArrayIsArray:L,Promise:H,SymbolAsyncIterator:k}=O2(),Q=S2(),{once:O}=N2(),N=p2(),U=k2(),{aggregateTwoErrors:W,codes:{ERR_INVALID_ARG_TYPE:Z,ERR_INVALID_RETURN_VALUE:T,ERR_MISSING_ARGS:B,ERR_STREAM_DESTROYED:P,ERR_STREAM_PREMATURE_CLOSE:q},AbortError:x}=F2(),{validateFunction:w,validateAbortSignal:M}=z1(),{isIterable:y,isReadable:m,isReadableNodeStream:c,isNodeStream:l}=v2(),n=globalThis.AbortController||E1().AbortController,i,C0;function a(K,$,G){let j=!1;K.on("close",()=>{j=!0});let A=Q(K,{readable:$,writable:G},(R)=>{j=!R});return{destroy:(R)=>{j||(j=!0,N.destroyer(K,R||new P("pipe")))},cleanup:A}}function K0(K){return w(K[K.length-1],"streams[stream.length - 1]"),K.pop()}function X(K){if(y(K))return K;if(c(K))return Y(K);throw new Z("val",["Readable","Iterable","AsyncIterable"],K)}async function*Y(K){C0||(C0=Q1()),yield*C0.prototype[k].call(K)}async function C(K,$,G,{end:j}){let A,R=null,_=(Y0)=>{if(Y0&&(A=Y0),R){let o=R;R=null,o()}},s=()=>new H((Y0,o)=>{A?o(A):R=()=>{A?o(A):Y0()}});$.on("drain",_);let r=Q($,{readable:!1},_);try{$.writableNeedDrain&&await s();for await(let Y0 of K)$.write(Y0)||await s();j&&$.end(),await s(),G()}catch(Y0){G(A!==Y0?W(A,Y0):Y0)}finally{r(),$.off("drain",_)}}function J(...K){return z(K,O(K0(K)))}function z(K,$,G){if(K.length===1&&L(K[0])&&(K=K[0]),K.length<2)throw new B("streams");let j=new n,A=j.signal,R=G?.signal,_=[];M(R,"options.signal");function s(){W0(new x)}R?.addEventListener("abort",s);let r,Y0,o=[],b=0;function f(v){W0(v,--b===0)}function W0(v,p){if(v&&(!r||r.code==="ERR_STREAM_PREMATURE_CLOSE")&&(r=v),!(!r&&!p)){for(;o.length;)o.shift()(r);R?.removeEventListener("abort",s),j.abort(),p&&(r||_.forEach((e)=>e()),F.nextTick($,r,Y0))}}let X0;for(let v=0;v0,t=e||G?.end!==!1,y0=v===K.length-1;if(l(p)){let Q0=function(V0){V0&&V0.name!=="AbortError"&&V0.code!=="ERR_STREAM_PREMATURE_CLOSE"&&f(V0)};var z0=Q0;if(t){let{destroy:V0,cleanup:_0}=a(p,e,G0);o.push(V0),m(p)&&y0&&_.push(_0)}p.on("error",Q0),m(p)&&y0&&_.push(()=>{p.removeListener("error",Q0)})}if(v===0)if(typeof p=="function"){if(X0=p({signal:A}),!y(X0))throw new T("Iterable, AsyncIterable or Stream","source",X0)}else y(p)||c(p)?X0=p:X0=U.from(p);else if(typeof p=="function")if(X0=X(X0),X0=p(X0,{signal:A}),e){if(!y(X0,!0))throw new T("AsyncIterable",`transform[${v-1}]`,X0)}else{var g;i||(i=x5());let Q0=new i({objectMode:!0}),V0=(g=X0)===null||g===void 0?void 0:g.then;if(typeof V0=="function")b++,V0.call(X0,(Z0)=>{Y0=Z0,Z0!=null&&Q0.write(Z0),t&&Q0.end(),F.nextTick(f)},(Z0)=>{Q0.destroy(Z0),F.nextTick(f,Z0)});else if(y(X0,!0))b++,C(X0,Q0,f,{end:t});else throw new T("AsyncIterable or Promise","destination",X0);X0=Q0;let{destroy:_0,cleanup:F0}=a(X0,!1,!0);o.push(_0),y0&&_.push(F0)}else if(l(p)){if(c(X0)){b+=2;let Q0=V(X0,p,f,{end:t});m(p)&&y0&&_.push(Q0)}else if(y(X0))b++,C(X0,p,f,{end:t});else throw new Z("val",["Readable","Iterable","AsyncIterable"],X0);X0=p}else X0=U.from(p)}return(A!=null&&A.aborted||R!=null&&R.aborted)&&F.nextTick(s),X0}function V(K,$,G,{end:j}){let A=!1;return $.on("close",()=>{A||G(new q)}),K.pipe($,{end:j}),j?K.once("end",()=>{A=!0,$.end()}):G(),Q(K,{readable:!0,writable:!1},(R)=>{let _=K._readableState;R&&R.code==="ERR_STREAM_PREMATURE_CLOSE"&&_&&_.ended&&!_.errored&&!_.errorEmitted?K.once("end",G).once("error",G):G(R)}),Q($,{readable:!1,writable:!0},G)}I.exports={pipelineImpl:z,pipeline:J}}),z8=$0((E,I)=>{var{pipeline:F}=A1(),L=k2(),{destroyer:H}=p2(),{isNodeStream:k,isReadable:Q,isWritable:O}=v2(),{AbortError:N,codes:{ERR_INVALID_ARG_VALUE:U,ERR_MISSING_ARGS:W}}=F2();I.exports=function(...Z){if(Z.length===0)throw new W("streams");if(Z.length===1)return L.from(Z[0]);let T=[...Z];if(typeof Z[0]=="function"&&(Z[0]=L.from(Z[0])),typeof Z[Z.length-1]=="function"){let n=Z.length-1;Z[n]=L.from(Z[n])}for(let n=0;n0&&!O(Z[n]))throw new U(`streams[${n}]`,T[n],"must be writable")}let B,P,q,x,w;function M(n){let i=x;x=null,i?i(n):n?w.destroy(n):!l&&!c&&w.destroy()}let y=Z[0],m=F(Z,M),c=!!O(y),l=!!Q(m);return w=new L({writableObjectMode:!!(y!=null&&y.writableObjectMode),readableObjectMode:!!(m!=null&&m.writableObjectMode),writable:c,readable:l}),c&&(w._write=function(n,i,C0){y.write(n,i)?C0():B=C0},w._final=function(n){y.end(),P=n},y.on("drain",function(){if(B){let n=B;B=null,n()}}),m.on("finish",function(){if(P){let n=P;P=null,n()}})),l&&(m.on("readable",function(){if(q){let n=q;q=null,n()}}),m.on("end",function(){w.push(null)}),w._read=function(){for(;;){let n=m.read();if(n===null){q=w._read;return}if(!w.push(n))return}}),w._destroy=function(n,i){!n&&x!==null&&(n=new N),q=null,B=null,P=null,x===null?i(n):(x=i,H(m,n))},w}}),v5=$0((E,I)=>{var{ArrayPrototypePop:F,Promise:L}=O2(),{isIterable:H,isNodeStream:k}=v2(),{pipelineImpl:Q}=A1(),{finished:O}=S2();function N(...U){return new L((W,Z)=>{let T,B,P=U[U.length-1];if(P&&typeof P=="object"&&!k(P)&&!H(P)){let q=F(U);T=q.signal,B=q.end}Q(U,(q,x)=>{q?Z(q):W(x)},{signal:T,end:B})})}I.exports={finished:O,pipeline:N}}),Q8=$0((E,I)=>{var{Buffer:F}=U2(),{ObjectDefineProperty:L,ObjectKeys:H,ReflectApply:k}=O2(),{promisify:{custom:Q}}=N2(),{streamReturningOperators:O,promiseReturningOperators:N}=Y8(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:U}}=F2(),W=z8(),{pipeline:Z}=A1(),{destroyer:T}=p2(),B=S2(),P=v5(),q=v2(),x=I.exports=x1().Stream;x.isDisturbed=q.isDisturbed,x.isErrored=q.isErrored,x.isReadable=q.isReadable,x.Readable=Q1();for(let y of H(O)){let m=function(...l){if(new.target)throw U();return x.Readable.from(k(c,this,l))};w=m;let c=O[y];L(m,"name",{__proto__:null,value:c.name}),L(m,"length",{__proto__:null,value:c.length}),L(x.Readable.prototype,y,{__proto__:null,value:m,enumerable:!1,configurable:!0,writable:!0})}var w;for(let y of H(N)){let m=function(...l){if(new.target)throw U();return k(c,this,l)};w=m;let c=N[y];L(m,"name",{__proto__:null,value:c.name}),L(m,"length",{__proto__:null,value:c.length}),L(x.Readable.prototype,y,{__proto__:null,value:m,enumerable:!1,configurable:!0,writable:!0})}var w;x.Writable=R5(),x.Duplex=k2(),x.Transform=E5(),x.PassThrough=x5(),x.pipeline=Z;var{addAbortSignal:M}=v1();x.addAbortSignal=M,x.finished=B,x.destroy=T,x.compose=W,L(x,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return P}}),L(Z,Q,{__proto__:null,enumerable:!0,get(){return P.pipeline}}),L(B,Q,{__proto__:null,enumerable:!0,get(){return P.finished}}),x.Stream=x,x._isUint8Array=function(y){return y instanceof Uint8Array},x._uint8ArrayToBuffer=function(y){return F.from(y.buffer,y.byteOffset,y.byteLength)}}),H5=$0((E,I)=>{var F=Q8(),L=v5(),H=F.Readable.destroy;I.exports=F.Readable,I.exports._uint8ArrayToBuffer=F._uint8ArrayToBuffer,I.exports._isUint8Array=F._isUint8Array,I.exports.isDisturbed=F.isDisturbed,I.exports.isErrored=F.isErrored,I.exports.isReadable=F.isReadable,I.exports.Readable=F.Readable,I.exports.Writable=F.Writable,I.exports.Duplex=F.Duplex,I.exports.Transform=F.Transform,I.exports.PassThrough=F.PassThrough,I.exports.addAbortSignal=F.addAbortSignal,I.exports.finished=F.finished,I.exports.destroy=F.destroy,I.exports.destroy=H,I.exports.pipeline=F.pipeline,I.exports.compose=F.compose,Object.defineProperty(F,"promises",{configurable:!0,enumerable:!0,get(){return L}}),I.exports.Stream=F.Stream,I.exports.default=I.exports}),M1={};J1(M1,{default:()=>S5});$8=L1(()=>{N1(M1,R2(H5())),S5=R2(H5())}),q2=$0((E,I)=>{var F=l0().Buffer,L=($8(),W2(M1)).Transform,H=k1().StringDecoder,k=c0();function Q(O){L.call(this),this.hashMode=typeof O=="string",this.hashMode?this[O]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}k(Q,L),Q.prototype.update=function(O,N,U){typeof O=="string"&&(O=F.from(O,N));var W=this._update(O);return this.hashMode?this:(U&&(W=this._toString(W,U)),W)},Q.prototype.setAutoPadding=function(){},Q.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},Q.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},Q.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},Q.prototype._transform=function(O,N,U){var W;try{this.hashMode?this._update(O):this.push(this._update(O))}catch(Z){W=Z}finally{U(W)}},Q.prototype._flush=function(O){var N;try{this.push(this.__final())}catch(U){N=U}O(N)},Q.prototype._finalOrDigest=function(O){var N=this.__final()||F.alloc(0);return O&&(N=this._toString(N,O,!0)),N},Q.prototype._toString=function(O,N,U){if(this._decoder||(this._decoder=new H(N),this._encoding=N),this._encoding!==N)throw new Error("can't switch encodings");var W=this._decoder.write(O);return U&&(W+=this._decoder.end()),W},I.exports=Q}),u2=$0((E,I)=>{var F=c0(),L=B1(),H=q1(),k=R1(),Q=q2();function O(N){Q.call(this,"digest"),this._hash=N}F(O,Q),O.prototype._update=function(N){this._hash.update(N)},O.prototype._final=function(){return this._hash.digest()},I.exports=function(N){return N=N.toLowerCase(),N==="md5"?new L:N==="rmd160"||N==="ripemd160"?new H:new O(k(N))}}),j8=$0((E,I)=>{var F=c0(),L=l0().Buffer,H=q2(),k=L.alloc(128),Q=64;function O(N,U){H.call(this,"digest"),typeof U=="string"&&(U=L.from(U)),this._alg=N,this._key=U,U.length>Q?U=N(U):U.length{var F=B1();I.exports=function(L){return new F().update(L).digest()}}),M5=$0((E,I)=>{var F=c0(),L=j8(),H=q2(),k=l0().Buffer,Q=A5(),O=q1(),N=R1(),U=k.alloc(128);function W(Z,T){H.call(this,"digest"),typeof T=="string"&&(T=k.from(T));var B=Z==="sha512"||Z==="sha384"?128:64;if(this._alg=Z,this._key=T,T.length>B){var P=Z==="rmd160"?new O:N(Z);T=P.update(T).digest()}else T.length{I.exports={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"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:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"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:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}}}),V8=$0((E,I)=>{I.exports=w5()}),y5=$0((E,I)=>{var F=Math.pow(2,30)-1;I.exports=function(L,H){if(typeof L!="number")throw new TypeError("Iterations not a number");if(L<0)throw new TypeError("Bad iterations");if(typeof H!="number")throw new TypeError("Key length not a number");if(H<0||H>F||H!==H)throw new TypeError("Bad key length")}}),_5=$0((E,I)=>{var F;global.process&&global.process.browser?F="utf-8":global.process&&global.process.version?(L=parseInt(process.version.split(".")[0].slice(1),10),F=L>=6?"utf-8":"binary"):F="utf-8";var L;I.exports=F}),g5=$0((E,I)=>{var F=l0().Buffer;I.exports=function(L,H,k){if(F.isBuffer(L))return L;if(typeof L=="string")return F.from(L,H);if(ArrayBuffer.isView(L))return F.from(L.buffer);throw new TypeError(k+" must be a string, a Buffer, a typed array or a DataView")}}),m5=$0((E,I)=>{var F=A5(),L=q1(),H=R1(),k=l0().Buffer,Q=y5(),O=_5(),N=g5(),U=k.alloc(128),W={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function Z(P,q,x){var w=T(P),M=P==="sha512"||P==="sha384"?128:64;q.length>M?q=w(q):q.length{var F=l0().Buffer,L=y5(),H=_5(),k=m5(),Q=g5(),O,N=global.crypto&&global.crypto.subtle,U={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"},W=[];function Z(x){if(global.process&&!global.process.browser||!N||!N.importKey||!N.deriveBits)return Promise.resolve(!1);if(W[x]!==void 0)return W[x];O=O||F.alloc(8);var w=P(O,O,10,128,x).then(function(){return!0}).catch(function(){return!1});return W[x]=w,w}var T;function B(){return T||(global.process&&global.process.nextTick?T=global.process.nextTick:global.queueMicrotask?T=global.queueMicrotask:global.setImmediate?T=global.setImmediate:T=global.setTimeout,T)}function P(x,w,M,y,m){return N.importKey("raw",x,{name:"PBKDF2"},!1,["deriveBits"]).then(function(c){return N.deriveBits({name:"PBKDF2",salt:w,iterations:M,hash:{name:m}},c,y<<3)}).then(function(c){return F.from(c)})}function q(x,w){x.then(function(M){B()(function(){w(null,M)})},function(M){B()(function(){w(M)})})}I.exports=function(x,w,M,y,m,c){typeof m=="function"&&(c=m,m=void 0),m=m||"sha1";var l=U[m.toLowerCase()];if(!l||typeof global.Promise!="function"){B()(function(){var n;try{n=k(x,w,M,y,m)}catch(i){return c(i)}c(null,n)});return}if(L(M,y),x=Q(x,H,"Password"),w=Q(w,H,"Salt"),typeof c!="function")throw new Error("No callback provided to pbkdf2");q(Z(l).then(function(n){return n?P(x,w,M,y,l):k(x,w,M,y,m)}),c)}}),p5=$0((E)=>{E.pbkdf2=K8(),E.pbkdf2Sync=m5()}),c5=$0((E)=>{E.readUInt32BE=function(H,k){var Q=H[0+k]<<24|H[1+k]<<16|H[2+k]<<8|H[3+k];return Q>>>0},E.writeUInt32BE=function(H,k,Q){H[0+Q]=k>>>24,H[1+Q]=k>>>16&255,H[2+Q]=k>>>8&255,H[3+Q]=k&255},E.ip=function(H,k,Q,O){for(var N=0,U=0,W=6;W>=0;W-=2){for(var Z=0;Z<=24;Z+=8)N<<=1,N|=k>>>Z+W&1;for(var Z=0;Z<=24;Z+=8)N<<=1,N|=H>>>Z+W&1}for(var W=6;W>=0;W-=2){for(var Z=1;Z<=25;Z+=8)U<<=1,U|=k>>>Z+W&1;for(var Z=1;Z<=25;Z+=8)U<<=1,U|=H>>>Z+W&1}Q[O+0]=N>>>0,Q[O+1]=U>>>0},E.rip=function(H,k,Q,O){for(var N=0,U=0,W=0;W<4;W++)for(var Z=24;Z>=0;Z-=8)N<<=1,N|=k>>>Z+W&1,N<<=1,N|=H>>>Z+W&1;for(var W=4;W<8;W++)for(var Z=24;Z>=0;Z-=8)U<<=1,U|=k>>>Z+W&1,U<<=1,U|=H>>>Z+W&1;Q[O+0]=N>>>0,Q[O+1]=U>>>0},E.pc1=function(H,k,Q,O){for(var N=0,U=0,W=7;W>=5;W--){for(var Z=0;Z<=24;Z+=8)N<<=1,N|=k>>Z+W&1;for(var Z=0;Z<=24;Z+=8)N<<=1,N|=H>>Z+W&1}for(var Z=0;Z<=24;Z+=8)N<<=1,N|=k>>Z+W&1;for(var W=1;W<=3;W++){for(var Z=0;Z<=24;Z+=8)U<<=1,U|=k>>Z+W&1;for(var Z=0;Z<=24;Z+=8)U<<=1,U|=H>>Z+W&1}for(var Z=0;Z<=24;Z+=8)U<<=1,U|=H>>Z+W&1;Q[O+0]=N>>>0,Q[O+1]=U>>>0},E.r28shl=function(H,k){return H<>>28-k};var I=[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];E.pc2=function(H,k,Q,O){for(var N=0,U=0,W=I.length>>>1,Z=0;Z>>I[Z]&1;for(var Z=W;Z>>I[Z]&1;Q[O+0]=N>>>0,Q[O+1]=U>>>0},E.expand=function(H,k,Q){var O=0,N=0;O=(H&1)<<5|H>>>27;for(var U=23;U>=15;U-=4)O<<=6,O|=H>>>U&63;for(var U=11;U>=3;U-=4)N|=H>>>U&63,N<<=6;N|=(H&31)<<1|H>>>31,k[Q+0]=O>>>0,k[Q+1]=N>>>0};var F=[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];E.substitute=function(H,k){for(var Q=0,O=0;O<4;O++){var N=H>>>18-O*6&63,U=F[O*64+N];Q<<=4,Q|=U}for(var O=0;O<4;O++){var N=k>>>18-O*6&63,U=F[256+O*64+N];Q<<=4,Q|=U}return Q>>>0};var L=[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];E.permute=function(H){for(var k=0,Q=0;Q>>L[Q]&1;return k>>>0},E.padSplit=function(H,k,Q){for(var O=H.toString(2);O.length{I.exports=F;function F(L,H){if(!L)throw new Error(H||"Assertion failed")}F.equal=function(L,H,k){if(L!=H)throw new Error(k||"Assertion failed: "+L+" != "+H)}}),w1=$0((E,I)=>{var F=P2();function L(H){this.options=H,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}I.exports=L,L.prototype._init=function(){},L.prototype.update=function(H){return H.length===0?[]:this.type==="decrypt"?this._updateDecrypt(H):this._updateEncrypt(H)},L.prototype._buffer=function(H,k){for(var Q=Math.min(this.buffer.length-this.bufferOff,H.length-k),O=0;O0;O--)k+=this._buffer(H,k),Q+=this._flushBuffer(N,Q);return k+=this._buffer(H,k),N},L.prototype.final=function(H){var k;H&&(k=this.update(H));var Q;return this.type==="encrypt"?Q=this._finalEncrypt():Q=this._finalDecrypt(),k?k.concat(Q):Q},L.prototype._pad=function(H,k){if(k===0)return!1;for(;k{var F=P2(),L=c0(),H=c5(),k=w1();function Q(){this.tmp=new Array(2),this.keys=null}function O(U){k.call(this,U);var W=new Q;this._desState=W,this.deriveKeys(W,U.key)}L(O,k),I.exports=O,O.create=function(U){return new O(U)};var N=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];O.prototype.deriveKeys=function(U,W){U.keys=new Array(32),F.equal(W.length,this.blockSize,"Invalid key length");var Z=H.readUInt32BE(W,0),T=H.readUInt32BE(W,4);H.pc1(Z,T,U.tmp,0),Z=U.tmp[0],T=U.tmp[1];for(var B=0;B>>1];Z=H.r28shl(Z,P),T=H.r28shl(T,P),H.pc2(Z,T,U.keys,B)}},O.prototype._update=function(U,W,Z,T){var B=this._desState,P=H.readUInt32BE(U,W),q=H.readUInt32BE(U,W+4);H.ip(P,q,B.tmp,0),P=B.tmp[0],q=B.tmp[1],this.type==="encrypt"?this._encrypt(B,P,q,B.tmp,0):this._decrypt(B,P,q,B.tmp,0),P=B.tmp[0],q=B.tmp[1],H.writeUInt32BE(Z,P,T),H.writeUInt32BE(Z,q,T+4)},O.prototype._pad=function(U,W){for(var Z=U.length-W,T=W;T>>0,P=c}H.rip(q,P,T,B)},O.prototype._decrypt=function(U,W,Z,T,B){for(var P=Z,q=W,x=U.keys.length-2;x>=0;x-=2){var w=U.keys[x],M=U.keys[x+1];H.expand(P,U.tmp,0),w^=U.tmp[0],M^=U.tmp[1];var y=H.substitute(w,M),m=H.permute(y),c=P;P=(q^m)>>>0,q=c}H.rip(P,q,T,B)}}),Z8=$0((E)=>{var I=P2(),F=c0(),L={};function H(Q){I.equal(Q.length,8,"Invalid IV length"),this.iv=new Array(8);for(var O=0;O{var F=P2(),L=c0(),H=w1(),k=d5();function Q(N,U){F.equal(U.length,24,"Invalid key length");var W=U.slice(0,8),Z=U.slice(8,16),T=U.slice(16,24);N==="encrypt"?this.ciphers=[k.create({type:"encrypt",key:W}),k.create({type:"decrypt",key:Z}),k.create({type:"encrypt",key:T})]:this.ciphers=[k.create({type:"decrypt",key:T}),k.create({type:"encrypt",key:Z}),k.create({type:"decrypt",key:W})]}function O(N){H.call(this,N);var U=new Q(this.type,this.options.key);this._edeState=U}L(O,H),I.exports=O,O.create=function(N){return new O(N)},O.prototype._update=function(N,U,W,Z){var T=this._edeState;T.ciphers[0]._update(N,U,W,Z),T.ciphers[1]._update(W,Z,W,Z),T.ciphers[2]._update(W,Z,W,Z)},O.prototype._pad=k.prototype._pad,O.prototype._unpad=k.prototype._unpad}),O8=$0((E)=>{E.utils=c5(),E.Cipher=w1(),E.DES=d5(),E.CBC=Z8(),E.EDE=H8()}),U8=$0((E,I)=>{var F=q2(),L=O8(),H=c0(),k=l0().Buffer,Q={"des-ede3-cbc":L.CBC.instantiate(L.EDE),"des-ede3":L.EDE,"des-ede-cbc":L.CBC.instantiate(L.EDE),"des-ede":L.EDE,"des-cbc":L.CBC.instantiate(L.DES),"des-ecb":L.DES};Q.des=Q["des-cbc"],Q.des3=Q["des-ede3-cbc"],I.exports=O,H(O,F);function O(N){F.call(this);var U=N.mode.toLowerCase(),W=Q[U],Z;N.decrypt?Z="decrypt":Z="encrypt";var T=N.key;k.isBuffer(T)||(T=k.from(T)),(U==="des-ede"||U==="des-ede-cbc")&&(T=k.concat([T,T.slice(0,8)]));var B=N.iv;k.isBuffer(B)||(B=k.from(B)),this._des=W.create({key:T,iv:B,type:Z})}O.prototype._update=function(N){return k.from(this._des.update(N))},O.prototype._final=function(){return k.from(this._des.final())}}),F8=$0((E)=>{E.encrypt=function(I,F){return I._cipher.encryptBlock(F)},E.decrypt=function(I,F){return I._cipher.decryptBlock(F)}}),s2=$0((E,I)=>{I.exports=function(F,L){for(var H=Math.min(F.length,L.length),k=new Buffer(H),Q=0;Q{var I=s2();E.encrypt=function(F,L){var H=I(L,F._prev);return F._prev=F._cipher.encryptBlock(H),F._prev},E.decrypt=function(F,L){var H=F._prev;F._prev=L;var k=F._cipher.decryptBlock(L);return I(k,H)}}),P8=$0((E)=>{var I=l0().Buffer,F=s2();function L(H,k,Q){var O=k.length,N=F(k,H._cache);return H._cache=H._cache.slice(O),H._prev=I.concat([H._prev,Q?k:N]),N}E.encrypt=function(H,k,Q){for(var O=I.allocUnsafe(0),N;k.length;)if(H._cache.length===0&&(H._cache=H._cipher.encryptBlock(H._prev),H._prev=I.allocUnsafe(0)),H._cache.length<=k.length)N=H._cache.length,O=I.concat([O,L(H,k.slice(0,N),Q)]),k=k.slice(N);else{O=I.concat([O,L(H,k,Q)]);break}return O}}),T8=$0((E)=>{var I=l0().Buffer;function F(L,H,k){var Q=L._cipher.encryptBlock(L._prev),O=Q[0]^H;return L._prev=I.concat([L._prev.slice(1),I.from([k?H:O])]),O}E.encrypt=function(L,H,k){for(var Q=H.length,O=I.allocUnsafe(Q),N=-1;++N{var I=l0().Buffer;function F(H,k,Q){for(var O,N=-1,U=8,W=0,Z,T;++N>N%8,H._prev=L(H._prev,Q?Z:T);return W}function L(H,k){var Q=H.length,O=-1,N=I.allocUnsafe(H.length);for(H=I.concat([H,I.from([k])]);++O>7;return N}E.encrypt=function(H,k,Q){for(var O=k.length,N=I.allocUnsafe(O),U=-1;++U{var I=s2();function F(L){return L._prev=L._cipher.encryptBlock(L._prev),L._prev}E.encrypt=function(L,H){for(;L._cache.length{function F(L){for(var H=L.length,k;H--;)if(k=L.readUInt8(H),k===255)L.writeUInt8(0,H);else{k++,L.writeUInt8(k,H);break}}I.exports=F}),O5=$0((E)=>{var I=s2(),F=l0().Buffer,L=b5();function H(Q){var O=Q._cipher.encryptBlockRaw(Q._prev);return L(Q._prev),O}var k=16;E.encrypt=function(Q,O){var N=Math.ceil(O.length/k),U=Q._cache.length;Q._cache=F.concat([Q._cache,F.allocUnsafe(N*k)]);for(var W=0;W{I.exports={"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:{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192:{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256:{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},"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"}}}),y1=$0((E,I)=>{var F={ECB:F8(),CBC:W8(),CFB:P8(),CFB8:T8(),CFB1:D8(),OFB:L8(),CTR:O5(),GCM:O5()},L=l5();for(H in L)L[H].module=F[L[H].mode];var H;I.exports=L}),$1=$0((E,I)=>{var F=l0().Buffer;function L(U){F.isBuffer(U)||(U=F.from(U));for(var W=U.length/4|0,Z=new Array(W),T=0;T>>24]^q[y>>>16&255]^x[m>>>8&255]^w[c&255]^W[a++],n=P[y>>>24]^q[m>>>16&255]^x[c>>>8&255]^w[M&255]^W[a++],i=P[m>>>24]^q[c>>>16&255]^x[M>>>8&255]^w[y&255]^W[a++],C0=P[c>>>24]^q[M>>>16&255]^x[y>>>8&255]^w[m&255]^W[a++],M=l,y=n,m=i,c=C0;return l=(T[M>>>24]<<24|T[y>>>16&255]<<16|T[m>>>8&255]<<8|T[c&255])^W[a++],n=(T[y>>>24]<<24|T[m>>>16&255]<<16|T[c>>>8&255]<<8|T[M&255])^W[a++],i=(T[m>>>24]<<24|T[c>>>16&255]<<16|T[M>>>8&255]<<8|T[y&255])^W[a++],C0=(T[c>>>24]<<24|T[M>>>16&255]<<16|T[y>>>8&255]<<8|T[m&255])^W[a++],l=l>>>0,n=n>>>0,i=i>>>0,C0=C0>>>0,[l,n,i,C0]}var Q=[0,1,2,4,8,16,32,64,128,27,54],O=function(){for(var U=new Array(256),W=0;W<256;W++)W<128?U[W]=W<<1:U[W]=W<<1^283;for(var Z=[],T=[],B=[[],[],[],[]],P=[[],[],[],[]],q=0,x=0,w=0;w<256;++w){var M=x^x<<1^x<<2^x<<3^x<<4;M=M>>>8^M&255^99,Z[q]=M,T[M]=q;var y=U[q],m=U[y],c=U[m],l=U[M]*257^M*16843008;B[0][q]=l<<24|l>>>8,B[1][q]=l<<16|l>>>16,B[2][q]=l<<8|l>>>24,B[3][q]=l,l=c*16843009^m*65537^y*257^q*16843008,P[0][M]=l<<24|l>>>8,P[1][M]=l<<16|l>>>16,P[2][M]=l<<8|l>>>24,P[3][M]=l,q===0?q=x=1:(q=y^U[U[U[c^y]]],x^=U[U[x]])}return{SBOX:Z,INV_SBOX:T,SUB_MIX:B,INV_SUB_MIX:P}}();function N(U){this._key=L(U),this._reset()}N.blockSize=16,N.keySize=32,N.prototype.blockSize=N.blockSize,N.prototype.keySize=N.keySize,N.prototype._reset=function(){for(var U=this._key,W=U.length,Z=W+6,T=(Z+1)*4,B=[],P=0;P>>24,q=O.SBOX[q>>>24]<<24|O.SBOX[q>>>16&255]<<16|O.SBOX[q>>>8&255]<<8|O.SBOX[q&255],q^=Q[P/W|0]<<24):W>6&&P%W===4&&(q=O.SBOX[q>>>24]<<24|O.SBOX[q>>>16&255]<<16|O.SBOX[q>>>8&255]<<8|O.SBOX[q&255]),B[P]=B[P-W]^q}for(var x=[],w=0;w>>24]]^O.INV_SUB_MIX[1][O.SBOX[y>>>16&255]]^O.INV_SUB_MIX[2][O.SBOX[y>>>8&255]]^O.INV_SUB_MIX[3][O.SBOX[y&255]]}this._nRounds=Z,this._keySchedule=B,this._invKeySchedule=x},N.prototype.encryptBlockRaw=function(U){return U=L(U),k(U,this._keySchedule,O.SUB_MIX,O.SBOX,this._nRounds)},N.prototype.encryptBlock=function(U){var W=this.encryptBlockRaw(U),Z=F.allocUnsafe(16);return Z.writeUInt32BE(W[0],0),Z.writeUInt32BE(W[1],4),Z.writeUInt32BE(W[2],8),Z.writeUInt32BE(W[3],12),Z},N.prototype.decryptBlock=function(U){U=L(U);var W=U[1];U[1]=U[3],U[3]=W;var Z=k(U,this._invKeySchedule,O.INV_SUB_MIX,O.INV_SBOX,this._nRounds),T=F.allocUnsafe(16);return T.writeUInt32BE(Z[0],0),T.writeUInt32BE(Z[3],4),T.writeUInt32BE(Z[2],8),T.writeUInt32BE(Z[1],12),T},N.prototype.scrub=function(){H(this._keySchedule),H(this._invKeySchedule),H(this._key)},I.exports.AES=N}),N8=$0((E,I)=>{var F=l0().Buffer,L=F.alloc(16,0);function H(O){return[O.readUInt32BE(0),O.readUInt32BE(4),O.readUInt32BE(8),O.readUInt32BE(12)]}function k(O){var N=F.allocUnsafe(16);return N.writeUInt32BE(O[0]>>>0,0),N.writeUInt32BE(O[1]>>>0,4),N.writeUInt32BE(O[2]>>>0,8),N.writeUInt32BE(O[3]>>>0,12),N}function Q(O){this.h=O,this.state=F.alloc(16,0),this.cache=F.allocUnsafe(0)}Q.prototype.ghash=function(O){for(var N=-1;++N0;U--)O[U]=O[U]>>>1|(O[U-1]&1)<<31;O[0]=O[0]>>>1,Z&&(O[0]=O[0]^225<<24)}this.state=k(N)},Q.prototype.update=function(O){this.cache=F.concat([this.cache,O]);for(var N;this.cache.length>=16;)N=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(N)},Q.prototype.final=function(O,N){return this.cache.length&&this.ghash(F.concat([this.cache,L],16)),this.ghash(k([0,O,0,N])),this.state},I.exports=Q}),h5=$0((E,I)=>{var F=$1(),L=l0().Buffer,H=q2(),k=c0(),Q=N8(),O=s2(),N=b5();function U(T,B){var P=0;T.length!==B.length&&P++;for(var q=Math.min(T.length,B.length),x=0;x{var F=$1(),L=l0().Buffer,H=q2(),k=c0();function Q(O,N,U,W){H.call(this),this._cipher=new F.AES(N),this._prev=L.from(U),this._cache=L.allocUnsafe(0),this._secCache=L.allocUnsafe(0),this._decrypt=W,this._mode=O}k(Q,H),Q.prototype._update=function(O){return this._mode.encrypt(this,O,this._decrypt)},Q.prototype._final=function(){this._cipher.scrub()},I.exports=Q}),j1=$0((E,I)=>{var F=l0().Buffer,L=B1();function H(k,Q,O,N){if(F.isBuffer(k)||(k=F.from(k,"binary")),Q&&(F.isBuffer(Q)||(Q=F.from(Q,"binary")),Q.length!==8))throw new RangeError("salt should be Buffer with 8 byte length");for(var U=O/8,W=F.alloc(U),Z=F.alloc(N||0),T=F.alloc(0);U>0||N>0;){var B=new L;B.update(T),B.update(k),Q&&B.update(Q),T=B.digest();var P=0;if(U>0){var q=W.length-U;P=Math.min(U,T.length),T.copy(W,q,0,P),U-=P}if(P0){var x=Z.length-N,w=Math.min(N,T.length-P);T.copy(Z,x,P,P+w),N-=w}}return T.fill(0),{key:W,iv:Z}}I.exports=H}),k8=$0((E)=>{var I=y1(),F=h5(),L=l0().Buffer,H=o5(),k=q2(),Q=$1(),O=j1(),N=c0();function U(P,q,x){k.call(this),this._cache=new Z,this._cipher=new Q.AES(q),this._prev=L.from(x),this._mode=P,this._autopadding=!0}N(U,k),U.prototype._update=function(P){this._cache.add(P);for(var q,x,w=[];q=this._cache.get();)x=this._mode.encrypt(this,q),w.push(x);return L.concat(w)};var W=L.alloc(16,16);U.prototype._final=function(){var P=this._cache.flush();if(this._autopadding)return P=this._mode.encrypt(this,P),this._cipher.scrub(),P;if(!P.equals(W))throw this._cipher.scrub(),new Error("data not multiple of block length")},U.prototype.setAutoPadding=function(P){return this._autopadding=!!P,this};function Z(){this.cache=L.allocUnsafe(0)}Z.prototype.add=function(P){this.cache=L.concat([this.cache,P])},Z.prototype.get=function(){if(this.cache.length>15){var P=this.cache.slice(0,16);return this.cache=this.cache.slice(16),P}return null},Z.prototype.flush=function(){for(var P=16-this.cache.length,q=L.allocUnsafe(P),x=-1;++x{var I=h5(),F=l0().Buffer,L=y1(),H=o5(),k=q2(),Q=$1(),O=j1(),N=c0();function U(P,q,x){k.call(this),this._cache=new W,this._last=void 0,this._cipher=new Q.AES(q),this._prev=F.from(x),this._mode=P,this._autopadding=!0}N(U,k),U.prototype._update=function(P){this._cache.add(P);for(var q,x,w=[];q=this._cache.get(this._autopadding);)x=this._mode.decrypt(this,q),w.push(x);return F.concat(w)},U.prototype._final=function(){var P=this._cache.flush();if(this._autopadding)return Z(this._mode.decrypt(this,P));if(P)throw new Error("data not multiple of block length")},U.prototype.setAutoPadding=function(P){return this._autopadding=!!P,this};function W(){this.cache=F.allocUnsafe(0)}W.prototype.add=function(P){this.cache=F.concat([this.cache,P])},W.prototype.get=function(P){var q;if(P){if(this.cache.length>16)return q=this.cache.slice(0,16),this.cache=this.cache.slice(16),q}else if(this.cache.length>=16)return q=this.cache.slice(0,16),this.cache=this.cache.slice(16),q;return null},W.prototype.flush=function(){if(this.cache.length)return this.cache};function Z(P){var q=P[15];if(q<1||q>16)throw new Error("unable to decrypt data");for(var x=-1;++x{var I=k8(),F=I8(),L=l5();function H(){return Object.keys(L)}E.createCipher=E.Cipher=I.createCipher,E.createCipheriv=E.Cipheriv=I.createCipheriv,E.createDecipher=E.Decipher=F.createDecipher,E.createDecipheriv=E.Decipheriv=F.createDecipheriv,E.listCiphers=E.getCiphers=H}),B8=$0((E)=>{E["des-ecb"]={key:8,iv:0},E["des-cbc"]=E.des={key:8,iv:8},E["des-ede3-cbc"]=E.des3={key:24,iv:8},E["des-ede3"]={key:24,iv:0},E["des-ede-cbc"]={key:16,iv:8},E["des-ede"]={key:16,iv:0}}),q8=$0((E)=>{var I=U8(),F=_1(),L=y1(),H=B8(),k=j1();function Q(Z,T){Z=Z.toLowerCase();var B,P;if(L[Z])B=L[Z].key,P=L[Z].iv;else if(H[Z])B=H[Z].key*8,P=H[Z].iv;else throw new TypeError("invalid suite type");var q=k(T,!1,B,P);return N(Z,q.key,q.iv)}function O(Z,T){Z=Z.toLowerCase();var B,P;if(L[Z])B=L[Z].key,P=L[Z].iv;else if(H[Z])B=H[Z].key*8,P=H[Z].iv;else throw new TypeError("invalid suite type");var q=k(T,!1,B,P);return U(Z,q.key,q.iv)}function N(Z,T,B){if(Z=Z.toLowerCase(),L[Z])return F.createCipheriv(Z,T,B);if(H[Z])return new I({key:T,iv:B,mode:Z});throw new TypeError("invalid suite type")}function U(Z,T,B){if(Z=Z.toLowerCase(),L[Z])return F.createDecipheriv(Z,T,B);if(H[Z])return new I({key:T,iv:B,mode:Z,decrypt:!0});throw new TypeError("invalid suite type")}function W(){return Object.keys(H).concat(F.getCiphers())}E.createCipher=E.Cipher=Q,E.createCipheriv=E.Cipheriv=N,E.createDecipher=E.Decipher=O,E.createDecipheriv=E.Decipheriv=U,E.listCiphers=E.getCiphers=W}),A2=$0(()=>{}),u5=$0((E,I)=>{(function(F,L){function H(X,Y){if(!X)throw new Error(Y||"Assertion failed")}function k(X,Y){X.super_=Y;var C=function(){};C.prototype=Y.prototype,X.prototype=new C,X.prototype.constructor=X}function Q(X,Y,C){if(Q.isBN(X))return X;this.negative=0,this.words=null,this.length=0,this.red=null,X!==null&&((Y==="le"||Y==="be")&&(C=Y,Y=10),this._init(X||0,Y||10,C||"be"))}typeof F=="object"?F.exports=Q:L.BN=Q,Q.BN=Q,Q.wordSize=26;var O;try{typeof window<"u"&&typeof window.Buffer<"u"?O=window.Buffer:O=A2().Buffer}catch{}Q.isBN=function(X){return X instanceof Q?!0:X!==null&&typeof X=="object"&&X.constructor.wordSize===Q.wordSize&&Array.isArray(X.words)},Q.max=function(X,Y){return X.cmp(Y)>0?X:Y},Q.min=function(X,Y){return X.cmp(Y)<0?X:Y},Q.prototype._init=function(X,Y,C){if(typeof X=="number")return this._initNumber(X,Y,C);if(typeof X=="object")return this._initArray(X,Y,C);Y==="hex"&&(Y=16),H(Y===(Y|0)&&Y>=2&&Y<=36),X=X.toString().replace(/\s+/g,"");var J=0;X[0]==="-"&&(J++,this.negative=1),J=0;J-=3)V=X[J]|X[J-1]<<8|X[J-2]<<16,this.words[z]|=V<>>26-K&67108863,K+=24,K>=26&&(K-=26,z++);else if(C==="le")for(J=0,z=0;J>>26-K&67108863,K+=24,K>=26&&(K-=26,z++);return this.strip()};function N(X,Y){var C=X.charCodeAt(Y);return C>=65&&C<=70?C-55:C>=97&&C<=102?C-87:C-48&15}function U(X,Y,C){var J=N(X,C);return C-1>=Y&&(J|=N(X,C-1)<<4),J}Q.prototype._parseHex=function(X,Y,C){this.length=Math.ceil((X.length-Y)/6),this.words=new Array(this.length);for(var J=0;J=Y;J-=2)K=U(X,Y,J)<=18?(z-=18,V+=1,this.words[V]|=K>>>26):z+=8;else{var $=X.length-Y;for(J=$%2===0?Y+1:Y;J=18?(z-=18,V+=1,this.words[V]|=K>>>26):z+=8}this.strip()};function W(X,Y,C,J){for(var z=0,V=Math.min(X.length,C),K=Y;K=49?z+=$-49+10:$>=17?z+=$-17+10:z+=$}return z}Q.prototype._parseBase=function(X,Y,C){this.words=[0],this.length=1;for(var J=0,z=1;z<=67108863;z*=Y)J++;J--,z=z/Y|0;for(var V=X.length-C,K=V%J,$=Math.min(V,V-K)+C,G=0,j=C;j<$;j+=J)G=W(X,j,j+J,Y),this.imuln(z),this.words[0]+G<67108864?this.words[0]+=G:this._iaddn(G);if(K!==0){var A=1;for(G=W(X,j,X.length,Y),j=0;j1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},Q.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},Q.prototype.inspect=function(){return(this.red?""};var Z=["","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"],T=[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,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];Q.prototype.toString=function(X,Y){X=X||10,Y=Y|0||1;var C;if(X===16||X==="hex"){C="";for(var J=0,z=0,V=0;V>>24-J&16777215,z!==0||V!==this.length-1?C=Z[6-$.length]+$+C:C=$+C,J+=2,J>=26&&(J-=26,V--)}for(z!==0&&(C=z.toString(16)+C);C.length%Y!==0;)C="0"+C;return this.negative!==0&&(C="-"+C),C}if(X===(X|0)&&X>=2&&X<=36){var G=T[X],j=B[X];C="";var A=this.clone();for(A.negative=0;!A.isZero();){var R=A.modn(j).toString(X);A=A.idivn(j),A.isZero()?C=R+C:C=Z[G-R.length]+R+C}for(this.isZero()&&(C="0"+C);C.length%Y!==0;)C="0"+C;return this.negative!==0&&(C="-"+C),C}H(!1,"Base should be between 2 and 36")},Q.prototype.toNumber=function(){var X=this.words[0];return this.length===2?X+=this.words[1]*67108864:this.length===3&&this.words[2]===1?X+=4503599627370496+this.words[1]*67108864:this.length>2&&H(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-X:X},Q.prototype.toJSON=function(){return this.toString(16)},Q.prototype.toBuffer=function(X,Y){return H(typeof O<"u"),this.toArrayLike(O,X,Y)},Q.prototype.toArray=function(X,Y){return this.toArrayLike(Array,X,Y)},Q.prototype.toArrayLike=function(X,Y,C){var J=this.byteLength(),z=C||Math.max(1,J);H(J<=z,"byte array longer than desired length"),H(z>0,"Requested array length <= 0"),this.strip();var V=Y==="le",K=new X(z),$,G,j=this.clone();if(V){for(G=0;!j.isZero();G++)$=j.andln(255),j.iushrn(8),K[G]=$;for(;G=4096&&(C+=13,Y>>>=13),Y>=64&&(C+=7,Y>>>=7),Y>=8&&(C+=4,Y>>>=4),Y>=2&&(C+=2,Y>>>=2),C+Y},Q.prototype._zeroBits=function(X){if(X===0)return 26;var Y=X,C=0;return(Y&8191)===0&&(C+=13,Y>>>=13),(Y&127)===0&&(C+=7,Y>>>=7),(Y&15)===0&&(C+=4,Y>>>=4),(Y&3)===0&&(C+=2,Y>>>=2),(Y&1)===0&&C++,C},Q.prototype.bitLength=function(){var X=this.words[this.length-1],Y=this._countBits(X);return(this.length-1)*26+Y};function P(X){for(var Y=new Array(X.bitLength()),C=0;C>>z}return Y}Q.prototype.zeroBits=function(){if(this.isZero())return 0;for(var X=0,Y=0;YX.length?this.clone().ior(X):X.clone().ior(this)},Q.prototype.uor=function(X){return this.length>X.length?this.clone().iuor(X):X.clone().iuor(this)},Q.prototype.iuand=function(X){var Y;this.length>X.length?Y=X:Y=this;for(var C=0;CX.length?this.clone().iand(X):X.clone().iand(this)},Q.prototype.uand=function(X){return this.length>X.length?this.clone().iuand(X):X.clone().iuand(this)},Q.prototype.iuxor=function(X){var Y,C;this.length>X.length?(Y=this,C=X):(Y=X,C=this);for(var J=0;JX.length?this.clone().ixor(X):X.clone().ixor(this)},Q.prototype.uxor=function(X){return this.length>X.length?this.clone().iuxor(X):X.clone().iuxor(this)},Q.prototype.inotn=function(X){H(typeof X=="number"&&X>=0);var Y=Math.ceil(X/26)|0,C=X%26;this._expand(Y),C>0&&Y--;for(var J=0;J0&&(this.words[J]=~this.words[J]&67108863>>26-C),this.strip()},Q.prototype.notn=function(X){return this.clone().inotn(X)},Q.prototype.setn=function(X,Y){H(typeof X=="number"&&X>=0);var C=X/26|0,J=X%26;return this._expand(C+1),Y?this.words[C]=this.words[C]|1<X.length?(C=this,J=X):(C=X,J=this);for(var z=0,V=0;V>>26;for(;z!==0&&V>>26;if(this.length=C.length,z!==0)this.words[this.length]=z,this.length++;else if(C!==this)for(;VX.length?this.clone().iadd(X):X.clone().iadd(this)},Q.prototype.isub=function(X){if(X.negative!==0){X.negative=0;var Y=this.iadd(X);return X.negative=1,Y._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(X),this.negative=1,this._normSign();var C=this.cmp(X);if(C===0)return this.negative=0,this.length=1,this.words[0]=0,this;var J,z;C>0?(J=this,z=X):(J=X,z=this);for(var V=0,K=0;K>26,this.words[K]=Y&67108863;for(;V!==0&&K>26,this.words[K]=Y&67108863;if(V===0&&K>>26,R=G&67108863,_=Math.min(j,Y.length-1),s=Math.max(0,j-X.length+1);s<=_;s++){var r=j-s|0;z=X.words[r]|0,V=Y.words[s]|0,K=z*V+R,A+=K/67108864|0,R=K&67108863}C.words[j]=R|0,G=A|0}return G!==0?C.words[j]=G|0:C.length--,C.strip()}var x=function(X,Y,C){var J=X.words,z=Y.words,V=C.words,K=0,$,G,j,A=J[0]|0,R=A&8191,_=A>>>13,s=J[1]|0,r=s&8191,Y0=s>>>13,o=J[2]|0,b=o&8191,f=o>>>13,W0=J[3]|0,X0=W0&8191,z0=W0>>>13,g=J[4]|0,v=g&8191,p=g>>>13,e=J[5]|0,G0=e&8191,t=e>>>13,y0=J[6]|0,Q0=y0&8191,V0=y0>>>13,_0=J[7]|0,F0=_0&8191,Z0=_0>>>13,b0=J[8]|0,D=b0&8191,S=b0>>>13,d=J[9]|0,h=d&8191,u=d>>>13,P0=z[0]|0,J0=P0&8191,H0=P0>>>13,d0=z[1]|0,U0=d0&8191,O0=d0>>>13,g0=z[2]|0,L0=g0&8191,N0=g0>>>13,$2=z[3]|0,D0=$2&8191,T0=$2>>>13,h0=z[4]|0,k0=h0&8191,I0=h0>>>13,j2=z[5]|0,B0=j2&8191,q0=j2>>>13,V2=z[6]|0,R0=V2&8191,E0=V2>>>13,K2=z[7]|0,x0=K2&8191,v0=K2>>>13,Z2=z[8]|0,S0=Z2&8191,A0=Z2>>>13,H2=z[9]|0,M0=H2&8191,w0=H2>>>13;C.negative=X.negative^Y.negative,C.length=19,$=Math.imul(R,J0),G=Math.imul(R,H0),G=G+Math.imul(_,J0)|0,j=Math.imul(_,H0);var Q2=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(Q2>>>26)|0,Q2&=67108863,$=Math.imul(r,J0),G=Math.imul(r,H0),G=G+Math.imul(Y0,J0)|0,j=Math.imul(Y0,H0),$=$+Math.imul(R,U0)|0,G=G+Math.imul(R,O0)|0,G=G+Math.imul(_,U0)|0,j=j+Math.imul(_,O0)|0;var m0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(m0>>>26)|0,m0&=67108863,$=Math.imul(b,J0),G=Math.imul(b,H0),G=G+Math.imul(f,J0)|0,j=Math.imul(f,H0),$=$+Math.imul(r,U0)|0,G=G+Math.imul(r,O0)|0,G=G+Math.imul(Y0,U0)|0,j=j+Math.imul(Y0,O0)|0,$=$+Math.imul(R,L0)|0,G=G+Math.imul(R,N0)|0,G=G+Math.imul(_,L0)|0,j=j+Math.imul(_,N0)|0;var p0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(p0>>>26)|0,p0&=67108863,$=Math.imul(X0,J0),G=Math.imul(X0,H0),G=G+Math.imul(z0,J0)|0,j=Math.imul(z0,H0),$=$+Math.imul(b,U0)|0,G=G+Math.imul(b,O0)|0,G=G+Math.imul(f,U0)|0,j=j+Math.imul(f,O0)|0,$=$+Math.imul(r,L0)|0,G=G+Math.imul(r,N0)|0,G=G+Math.imul(Y0,L0)|0,j=j+Math.imul(Y0,N0)|0,$=$+Math.imul(R,D0)|0,G=G+Math.imul(R,T0)|0,G=G+Math.imul(_,D0)|0,j=j+Math.imul(_,T0)|0;var o0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(o0>>>26)|0,o0&=67108863,$=Math.imul(v,J0),G=Math.imul(v,H0),G=G+Math.imul(p,J0)|0,j=Math.imul(p,H0),$=$+Math.imul(X0,U0)|0,G=G+Math.imul(X0,O0)|0,G=G+Math.imul(z0,U0)|0,j=j+Math.imul(z0,O0)|0,$=$+Math.imul(b,L0)|0,G=G+Math.imul(b,N0)|0,G=G+Math.imul(f,L0)|0,j=j+Math.imul(f,N0)|0,$=$+Math.imul(r,D0)|0,G=G+Math.imul(r,T0)|0,G=G+Math.imul(Y0,D0)|0,j=j+Math.imul(Y0,T0)|0,$=$+Math.imul(R,k0)|0,G=G+Math.imul(R,I0)|0,G=G+Math.imul(_,k0)|0,j=j+Math.imul(_,I0)|0;var u0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(u0>>>26)|0,u0&=67108863,$=Math.imul(G0,J0),G=Math.imul(G0,H0),G=G+Math.imul(t,J0)|0,j=Math.imul(t,H0),$=$+Math.imul(v,U0)|0,G=G+Math.imul(v,O0)|0,G=G+Math.imul(p,U0)|0,j=j+Math.imul(p,O0)|0,$=$+Math.imul(X0,L0)|0,G=G+Math.imul(X0,N0)|0,G=G+Math.imul(z0,L0)|0,j=j+Math.imul(z0,N0)|0,$=$+Math.imul(b,D0)|0,G=G+Math.imul(b,T0)|0,G=G+Math.imul(f,D0)|0,j=j+Math.imul(f,T0)|0,$=$+Math.imul(r,k0)|0,G=G+Math.imul(r,I0)|0,G=G+Math.imul(Y0,k0)|0,j=j+Math.imul(Y0,I0)|0,$=$+Math.imul(R,B0)|0,G=G+Math.imul(R,q0)|0,G=G+Math.imul(_,B0)|0,j=j+Math.imul(_,q0)|0;var s0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(s0>>>26)|0,s0&=67108863,$=Math.imul(Q0,J0),G=Math.imul(Q0,H0),G=G+Math.imul(V0,J0)|0,j=Math.imul(V0,H0),$=$+Math.imul(G0,U0)|0,G=G+Math.imul(G0,O0)|0,G=G+Math.imul(t,U0)|0,j=j+Math.imul(t,O0)|0,$=$+Math.imul(v,L0)|0,G=G+Math.imul(v,N0)|0,G=G+Math.imul(p,L0)|0,j=j+Math.imul(p,N0)|0,$=$+Math.imul(X0,D0)|0,G=G+Math.imul(X0,T0)|0,G=G+Math.imul(z0,D0)|0,j=j+Math.imul(z0,T0)|0,$=$+Math.imul(b,k0)|0,G=G+Math.imul(b,I0)|0,G=G+Math.imul(f,k0)|0,j=j+Math.imul(f,I0)|0,$=$+Math.imul(r,B0)|0,G=G+Math.imul(r,q0)|0,G=G+Math.imul(Y0,B0)|0,j=j+Math.imul(Y0,q0)|0,$=$+Math.imul(R,R0)|0,G=G+Math.imul(R,E0)|0,G=G+Math.imul(_,R0)|0,j=j+Math.imul(_,E0)|0;var f0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(f0>>>26)|0,f0&=67108863,$=Math.imul(F0,J0),G=Math.imul(F0,H0),G=G+Math.imul(Z0,J0)|0,j=Math.imul(Z0,H0),$=$+Math.imul(Q0,U0)|0,G=G+Math.imul(Q0,O0)|0,G=G+Math.imul(V0,U0)|0,j=j+Math.imul(V0,O0)|0,$=$+Math.imul(G0,L0)|0,G=G+Math.imul(G0,N0)|0,G=G+Math.imul(t,L0)|0,j=j+Math.imul(t,N0)|0,$=$+Math.imul(v,D0)|0,G=G+Math.imul(v,T0)|0,G=G+Math.imul(p,D0)|0,j=j+Math.imul(p,T0)|0,$=$+Math.imul(X0,k0)|0,G=G+Math.imul(X0,I0)|0,G=G+Math.imul(z0,k0)|0,j=j+Math.imul(z0,I0)|0,$=$+Math.imul(b,B0)|0,G=G+Math.imul(b,q0)|0,G=G+Math.imul(f,B0)|0,j=j+Math.imul(f,q0)|0,$=$+Math.imul(r,R0)|0,G=G+Math.imul(r,E0)|0,G=G+Math.imul(Y0,R0)|0,j=j+Math.imul(Y0,E0)|0,$=$+Math.imul(R,x0)|0,G=G+Math.imul(R,v0)|0,G=G+Math.imul(_,x0)|0,j=j+Math.imul(_,v0)|0;var a0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(a0>>>26)|0,a0&=67108863,$=Math.imul(D,J0),G=Math.imul(D,H0),G=G+Math.imul(S,J0)|0,j=Math.imul(S,H0),$=$+Math.imul(F0,U0)|0,G=G+Math.imul(F0,O0)|0,G=G+Math.imul(Z0,U0)|0,j=j+Math.imul(Z0,O0)|0,$=$+Math.imul(Q0,L0)|0,G=G+Math.imul(Q0,N0)|0,G=G+Math.imul(V0,L0)|0,j=j+Math.imul(V0,N0)|0,$=$+Math.imul(G0,D0)|0,G=G+Math.imul(G0,T0)|0,G=G+Math.imul(t,D0)|0,j=j+Math.imul(t,T0)|0,$=$+Math.imul(v,k0)|0,G=G+Math.imul(v,I0)|0,G=G+Math.imul(p,k0)|0,j=j+Math.imul(p,I0)|0,$=$+Math.imul(X0,B0)|0,G=G+Math.imul(X0,q0)|0,G=G+Math.imul(z0,B0)|0,j=j+Math.imul(z0,q0)|0,$=$+Math.imul(b,R0)|0,G=G+Math.imul(b,E0)|0,G=G+Math.imul(f,R0)|0,j=j+Math.imul(f,E0)|0,$=$+Math.imul(r,x0)|0,G=G+Math.imul(r,v0)|0,G=G+Math.imul(Y0,x0)|0,j=j+Math.imul(Y0,v0)|0,$=$+Math.imul(R,S0)|0,G=G+Math.imul(R,A0)|0,G=G+Math.imul(_,S0)|0,j=j+Math.imul(_,A0)|0;var n0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(n0>>>26)|0,n0&=67108863,$=Math.imul(h,J0),G=Math.imul(h,H0),G=G+Math.imul(u,J0)|0,j=Math.imul(u,H0),$=$+Math.imul(D,U0)|0,G=G+Math.imul(D,O0)|0,G=G+Math.imul(S,U0)|0,j=j+Math.imul(S,O0)|0,$=$+Math.imul(F0,L0)|0,G=G+Math.imul(F0,N0)|0,G=G+Math.imul(Z0,L0)|0,j=j+Math.imul(Z0,N0)|0,$=$+Math.imul(Q0,D0)|0,G=G+Math.imul(Q0,T0)|0,G=G+Math.imul(V0,D0)|0,j=j+Math.imul(V0,T0)|0,$=$+Math.imul(G0,k0)|0,G=G+Math.imul(G0,I0)|0,G=G+Math.imul(t,k0)|0,j=j+Math.imul(t,I0)|0,$=$+Math.imul(v,B0)|0,G=G+Math.imul(v,q0)|0,G=G+Math.imul(p,B0)|0,j=j+Math.imul(p,q0)|0,$=$+Math.imul(X0,R0)|0,G=G+Math.imul(X0,E0)|0,G=G+Math.imul(z0,R0)|0,j=j+Math.imul(z0,E0)|0,$=$+Math.imul(b,x0)|0,G=G+Math.imul(b,v0)|0,G=G+Math.imul(f,x0)|0,j=j+Math.imul(f,v0)|0,$=$+Math.imul(r,S0)|0,G=G+Math.imul(r,A0)|0,G=G+Math.imul(Y0,S0)|0,j=j+Math.imul(Y0,A0)|0,$=$+Math.imul(R,M0)|0,G=G+Math.imul(R,w0)|0,G=G+Math.imul(_,M0)|0,j=j+Math.imul(_,w0)|0;var r0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(r0>>>26)|0,r0&=67108863,$=Math.imul(h,U0),G=Math.imul(h,O0),G=G+Math.imul(u,U0)|0,j=Math.imul(u,O0),$=$+Math.imul(D,L0)|0,G=G+Math.imul(D,N0)|0,G=G+Math.imul(S,L0)|0,j=j+Math.imul(S,N0)|0,$=$+Math.imul(F0,D0)|0,G=G+Math.imul(F0,T0)|0,G=G+Math.imul(Z0,D0)|0,j=j+Math.imul(Z0,T0)|0,$=$+Math.imul(Q0,k0)|0,G=G+Math.imul(Q0,I0)|0,G=G+Math.imul(V0,k0)|0,j=j+Math.imul(V0,I0)|0,$=$+Math.imul(G0,B0)|0,G=G+Math.imul(G0,q0)|0,G=G+Math.imul(t,B0)|0,j=j+Math.imul(t,q0)|0,$=$+Math.imul(v,R0)|0,G=G+Math.imul(v,E0)|0,G=G+Math.imul(p,R0)|0,j=j+Math.imul(p,E0)|0,$=$+Math.imul(X0,x0)|0,G=G+Math.imul(X0,v0)|0,G=G+Math.imul(z0,x0)|0,j=j+Math.imul(z0,v0)|0,$=$+Math.imul(b,S0)|0,G=G+Math.imul(b,A0)|0,G=G+Math.imul(f,S0)|0,j=j+Math.imul(f,A0)|0,$=$+Math.imul(r,M0)|0,G=G+Math.imul(r,w0)|0,G=G+Math.imul(Y0,M0)|0,j=j+Math.imul(Y0,w0)|0;var i0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(i0>>>26)|0,i0&=67108863,$=Math.imul(h,L0),G=Math.imul(h,N0),G=G+Math.imul(u,L0)|0,j=Math.imul(u,N0),$=$+Math.imul(D,D0)|0,G=G+Math.imul(D,T0)|0,G=G+Math.imul(S,D0)|0,j=j+Math.imul(S,T0)|0,$=$+Math.imul(F0,k0)|0,G=G+Math.imul(F0,I0)|0,G=G+Math.imul(Z0,k0)|0,j=j+Math.imul(Z0,I0)|0,$=$+Math.imul(Q0,B0)|0,G=G+Math.imul(Q0,q0)|0,G=G+Math.imul(V0,B0)|0,j=j+Math.imul(V0,q0)|0,$=$+Math.imul(G0,R0)|0,G=G+Math.imul(G0,E0)|0,G=G+Math.imul(t,R0)|0,j=j+Math.imul(t,E0)|0,$=$+Math.imul(v,x0)|0,G=G+Math.imul(v,v0)|0,G=G+Math.imul(p,x0)|0,j=j+Math.imul(p,v0)|0,$=$+Math.imul(X0,S0)|0,G=G+Math.imul(X0,A0)|0,G=G+Math.imul(z0,S0)|0,j=j+Math.imul(z0,A0)|0,$=$+Math.imul(b,M0)|0,G=G+Math.imul(b,w0)|0,G=G+Math.imul(f,M0)|0,j=j+Math.imul(f,w0)|0;var t0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(t0>>>26)|0,t0&=67108863,$=Math.imul(h,D0),G=Math.imul(h,T0),G=G+Math.imul(u,D0)|0,j=Math.imul(u,T0),$=$+Math.imul(D,k0)|0,G=G+Math.imul(D,I0)|0,G=G+Math.imul(S,k0)|0,j=j+Math.imul(S,I0)|0,$=$+Math.imul(F0,B0)|0,G=G+Math.imul(F0,q0)|0,G=G+Math.imul(Z0,B0)|0,j=j+Math.imul(Z0,q0)|0,$=$+Math.imul(Q0,R0)|0,G=G+Math.imul(Q0,E0)|0,G=G+Math.imul(V0,R0)|0,j=j+Math.imul(V0,E0)|0,$=$+Math.imul(G0,x0)|0,G=G+Math.imul(G0,v0)|0,G=G+Math.imul(t,x0)|0,j=j+Math.imul(t,v0)|0,$=$+Math.imul(v,S0)|0,G=G+Math.imul(v,A0)|0,G=G+Math.imul(p,S0)|0,j=j+Math.imul(p,A0)|0,$=$+Math.imul(X0,M0)|0,G=G+Math.imul(X0,w0)|0,G=G+Math.imul(z0,M0)|0,j=j+Math.imul(z0,w0)|0;var e0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(e0>>>26)|0,e0&=67108863,$=Math.imul(h,k0),G=Math.imul(h,I0),G=G+Math.imul(u,k0)|0,j=Math.imul(u,I0),$=$+Math.imul(D,B0)|0,G=G+Math.imul(D,q0)|0,G=G+Math.imul(S,B0)|0,j=j+Math.imul(S,q0)|0,$=$+Math.imul(F0,R0)|0,G=G+Math.imul(F0,E0)|0,G=G+Math.imul(Z0,R0)|0,j=j+Math.imul(Z0,E0)|0,$=$+Math.imul(Q0,x0)|0,G=G+Math.imul(Q0,v0)|0,G=G+Math.imul(V0,x0)|0,j=j+Math.imul(V0,v0)|0,$=$+Math.imul(G0,S0)|0,G=G+Math.imul(G0,A0)|0,G=G+Math.imul(t,S0)|0,j=j+Math.imul(t,A0)|0,$=$+Math.imul(v,M0)|0,G=G+Math.imul(v,w0)|0,G=G+Math.imul(p,M0)|0,j=j+Math.imul(p,w0)|0;var X2=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(X2>>>26)|0,X2&=67108863,$=Math.imul(h,B0),G=Math.imul(h,q0),G=G+Math.imul(u,B0)|0,j=Math.imul(u,q0),$=$+Math.imul(D,R0)|0,G=G+Math.imul(D,E0)|0,G=G+Math.imul(S,R0)|0,j=j+Math.imul(S,E0)|0,$=$+Math.imul(F0,x0)|0,G=G+Math.imul(F0,v0)|0,G=G+Math.imul(Z0,x0)|0,j=j+Math.imul(Z0,v0)|0,$=$+Math.imul(Q0,S0)|0,G=G+Math.imul(Q0,A0)|0,G=G+Math.imul(V0,S0)|0,j=j+Math.imul(V0,A0)|0,$=$+Math.imul(G0,M0)|0,G=G+Math.imul(G0,w0)|0,G=G+Math.imul(t,M0)|0,j=j+Math.imul(t,w0)|0;var G2=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(G2>>>26)|0,G2&=67108863,$=Math.imul(h,R0),G=Math.imul(h,E0),G=G+Math.imul(u,R0)|0,j=Math.imul(u,E0),$=$+Math.imul(D,x0)|0,G=G+Math.imul(D,v0)|0,G=G+Math.imul(S,x0)|0,j=j+Math.imul(S,v0)|0,$=$+Math.imul(F0,S0)|0,G=G+Math.imul(F0,A0)|0,G=G+Math.imul(Z0,S0)|0,j=j+Math.imul(Z0,A0)|0,$=$+Math.imul(Q0,M0)|0,G=G+Math.imul(Q0,w0)|0,G=G+Math.imul(V0,M0)|0,j=j+Math.imul(V0,w0)|0;var Y2=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(Y2>>>26)|0,Y2&=67108863,$=Math.imul(h,x0),G=Math.imul(h,v0),G=G+Math.imul(u,x0)|0,j=Math.imul(u,v0),$=$+Math.imul(D,S0)|0,G=G+Math.imul(D,A0)|0,G=G+Math.imul(S,S0)|0,j=j+Math.imul(S,A0)|0,$=$+Math.imul(F0,M0)|0,G=G+Math.imul(F0,w0)|0,G=G+Math.imul(Z0,M0)|0,j=j+Math.imul(Z0,w0)|0;var J2=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(J2>>>26)|0,J2&=67108863,$=Math.imul(h,S0),G=Math.imul(h,A0),G=G+Math.imul(u,S0)|0,j=Math.imul(u,A0),$=$+Math.imul(D,M0)|0,G=G+Math.imul(D,w0)|0,G=G+Math.imul(S,M0)|0,j=j+Math.imul(S,w0)|0;var C2=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(C2>>>26)|0,C2&=67108863,$=Math.imul(h,M0),G=Math.imul(h,w0),G=G+Math.imul(u,M0)|0,j=Math.imul(u,w0);var z2=(K+$|0)+((G&8191)<<13)|0;return K=(j+(G>>>13)|0)+(z2>>>26)|0,z2&=67108863,V[0]=Q2,V[1]=m0,V[2]=p0,V[3]=o0,V[4]=u0,V[5]=s0,V[6]=f0,V[7]=a0,V[8]=n0,V[9]=r0,V[10]=i0,V[11]=t0,V[12]=e0,V[13]=X2,V[14]=G2,V[15]=Y2,V[16]=J2,V[17]=C2,V[18]=z2,K!==0&&(V[19]=K,C.length++),C};Math.imul||(x=q);function w(X,Y,C){C.negative=Y.negative^X.negative,C.length=X.length+Y.length;for(var J=0,z=0,V=0;V>>26)|0,z+=K>>>26,K&=67108863}C.words[V]=$,J=K,K=z}return J!==0?C.words[V]=J:C.length--,C.strip()}function M(X,Y,C){var J=new y;return J.mulp(X,Y,C)}Q.prototype.mulTo=function(X,Y){var C,J=this.length+X.length;return this.length===10&&X.length===10?C=x(this,X,Y):J<63?C=q(this,X,Y):J<1024?C=w(this,X,Y):C=M(this,X,Y),C};function y(X,Y){this.x=X,this.y=Y}y.prototype.makeRBT=function(X){for(var Y=new Array(X),C=Q.prototype._countBits(X)-1,J=0;J>=1;return J},y.prototype.permute=function(X,Y,C,J,z,V){for(var K=0;K>>1)z++;return 1<>>13,C[2*V+1]=z&8191,z=z>>>13;for(V=2*Y;V>=26,Y+=J/67108864|0,Y+=z>>>26,this.words[C]=z&67108863}return Y!==0&&(this.words[C]=Y,this.length++),this},Q.prototype.muln=function(X){return this.clone().imuln(X)},Q.prototype.sqr=function(){return this.mul(this)},Q.prototype.isqr=function(){return this.imul(this.clone())},Q.prototype.pow=function(X){var Y=P(X);if(Y.length===0)return new Q(1);for(var C=this,J=0;J=0);var Y=X%26,C=(X-Y)/26,J=67108863>>>26-Y<<26-Y,z;if(Y!==0){var V=0;for(z=0;z>>26-Y}V&&(this.words[z]=V,this.length++)}if(C!==0){for(z=this.length-1;z>=0;z--)this.words[z+C]=this.words[z];for(z=0;z=0);var J;Y?J=(Y-Y%26)/26:J=0;var z=X%26,V=Math.min((X-z)/26,this.length),K=67108863^67108863>>>z<V)for(this.length-=V,G=0;G=0&&(j!==0||G>=J);G--){var A=this.words[G]|0;this.words[G]=j<<26-z|A>>>z,j=A&K}return $&&j!==0&&($.words[$.length++]=j),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},Q.prototype.ishrn=function(X,Y,C){return H(this.negative===0),this.iushrn(X,Y,C)},Q.prototype.shln=function(X){return this.clone().ishln(X)},Q.prototype.ushln=function(X){return this.clone().iushln(X)},Q.prototype.shrn=function(X){return this.clone().ishrn(X)},Q.prototype.ushrn=function(X){return this.clone().iushrn(X)},Q.prototype.testn=function(X){H(typeof X=="number"&&X>=0);var Y=X%26,C=(X-Y)/26,J=1<=0);var Y=X%26,C=(X-Y)/26;if(H(this.negative===0,"imaskn works only with positive numbers"),this.length<=C)return this;if(Y!==0&&C++,this.length=Math.min(C,this.length),Y!==0){var J=67108863^67108863>>>Y<=67108864;Y++)this.words[Y]-=67108864,Y===this.length-1?this.words[Y+1]=1:this.words[Y+1]++;return this.length=Math.max(this.length,Y+1),this},Q.prototype.isubn=function(X){if(H(typeof X=="number"),H(X<67108864),X<0)return this.iaddn(-X);if(this.negative!==0)return this.negative=0,this.iaddn(X),this.negative=1,this;if(this.words[0]-=X,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var Y=0;Y>26)-($/67108864|0),this.words[z+C]=V&67108863}for(;z>26,this.words[z+C]=V&67108863;if(K===0)return this.strip();for(H(K===-1),K=0,z=0;z>26,this.words[z]=V&67108863;return this.negative=1,this.strip()},Q.prototype._wordDiv=function(X,Y){var C=this.length-X.length,J=this.clone(),z=X,V=z.words[z.length-1]|0,K=this._countBits(V);C=26-K,C!==0&&(z=z.ushln(C),J.iushln(C),V=z.words[z.length-1]|0);var $=J.length-z.length,G;if(Y!=="mod"){G=new Q(null),G.length=$+1,G.words=new Array(G.length);for(var j=0;j=0;R--){var _=(J.words[z.length+R]|0)*67108864+(J.words[z.length+R-1]|0);for(_=Math.min(_/V|0,67108863),J._ishlnsubmul(z,_,R);J.negative!==0;)_--,J.negative=0,J._ishlnsubmul(z,1,R),J.isZero()||(J.negative^=1);G&&(G.words[R]=_)}return G&&G.strip(),J.strip(),Y!=="div"&&C!==0&&J.iushrn(C),{div:G||null,mod:J}},Q.prototype.divmod=function(X,Y,C){if(H(!X.isZero()),this.isZero())return{div:new Q(0),mod:new Q(0)};var J,z,V;return this.negative!==0&&X.negative===0?(V=this.neg().divmod(X,Y),Y!=="mod"&&(J=V.div.neg()),Y!=="div"&&(z=V.mod.neg(),C&&z.negative!==0&&z.iadd(X)),{div:J,mod:z}):this.negative===0&&X.negative!==0?(V=this.divmod(X.neg(),Y),Y!=="mod"&&(J=V.div.neg()),{div:J,mod:V.mod}):(this.negative&X.negative)!==0?(V=this.neg().divmod(X.neg(),Y),Y!=="div"&&(z=V.mod.neg(),C&&z.negative!==0&&z.isub(X)),{div:V.div,mod:z}):X.length>this.length||this.cmp(X)<0?{div:new Q(0),mod:this}:X.length===1?Y==="div"?{div:this.divn(X.words[0]),mod:null}:Y==="mod"?{div:null,mod:new Q(this.modn(X.words[0]))}:{div:this.divn(X.words[0]),mod:new Q(this.modn(X.words[0]))}:this._wordDiv(X,Y)},Q.prototype.div=function(X){return this.divmod(X,"div",!1).div},Q.prototype.mod=function(X){return this.divmod(X,"mod",!1).mod},Q.prototype.umod=function(X){return this.divmod(X,"mod",!0).mod},Q.prototype.divRound=function(X){var Y=this.divmod(X);if(Y.mod.isZero())return Y.div;var C=Y.div.negative!==0?Y.mod.isub(X):Y.mod,J=X.ushrn(1),z=X.andln(1),V=C.cmp(J);return V<0||z===1&&V===0?Y.div:Y.div.negative!==0?Y.div.isubn(1):Y.div.iaddn(1)},Q.prototype.modn=function(X){H(X<=67108863);for(var Y=(1<<26)%X,C=0,J=this.length-1;J>=0;J--)C=(Y*C+(this.words[J]|0))%X;return C},Q.prototype.idivn=function(X){H(X<=67108863);for(var Y=0,C=this.length-1;C>=0;C--){var J=(this.words[C]|0)+Y*67108864;this.words[C]=J/X|0,Y=J%X}return this.strip()},Q.prototype.divn=function(X){return this.clone().idivn(X)},Q.prototype.egcd=function(X){H(X.negative===0),H(!X.isZero());var Y=this,C=X.clone();Y.negative!==0?Y=Y.umod(X):Y=Y.clone();for(var J=new Q(1),z=new Q(0),V=new Q(0),K=new Q(1),$=0;Y.isEven()&&C.isEven();)Y.iushrn(1),C.iushrn(1),++$;for(var G=C.clone(),j=Y.clone();!Y.isZero();){for(var A=0,R=1;(Y.words[0]&R)===0&&A<26;++A,R<<=1);if(A>0)for(Y.iushrn(A);A-- >0;)(J.isOdd()||z.isOdd())&&(J.iadd(G),z.isub(j)),J.iushrn(1),z.iushrn(1);for(var _=0,s=1;(C.words[0]&s)===0&&_<26;++_,s<<=1);if(_>0)for(C.iushrn(_);_-- >0;)(V.isOdd()||K.isOdd())&&(V.iadd(G),K.isub(j)),V.iushrn(1),K.iushrn(1);Y.cmp(C)>=0?(Y.isub(C),J.isub(V),z.isub(K)):(C.isub(Y),V.isub(J),K.isub(z))}return{a:V,b:K,gcd:C.iushln($)}},Q.prototype._invmp=function(X){H(X.negative===0),H(!X.isZero());var Y=this,C=X.clone();Y.negative!==0?Y=Y.umod(X):Y=Y.clone();for(var J=new Q(1),z=new Q(0),V=C.clone();Y.cmpn(1)>0&&C.cmpn(1)>0;){for(var K=0,$=1;(Y.words[0]&$)===0&&K<26;++K,$<<=1);if(K>0)for(Y.iushrn(K);K-- >0;)J.isOdd()&&J.iadd(V),J.iushrn(1);for(var G=0,j=1;(C.words[0]&j)===0&&G<26;++G,j<<=1);if(G>0)for(C.iushrn(G);G-- >0;)z.isOdd()&&z.iadd(V),z.iushrn(1);Y.cmp(C)>=0?(Y.isub(C),J.isub(z)):(C.isub(Y),z.isub(J))}var A;return Y.cmpn(1)===0?A=J:A=z,A.cmpn(0)<0&&A.iadd(X),A},Q.prototype.gcd=function(X){if(this.isZero())return X.abs();if(X.isZero())return this.abs();var Y=this.clone(),C=X.clone();Y.negative=0,C.negative=0;for(var J=0;Y.isEven()&&C.isEven();J++)Y.iushrn(1),C.iushrn(1);do{for(;Y.isEven();)Y.iushrn(1);for(;C.isEven();)C.iushrn(1);var z=Y.cmp(C);if(z<0){var V=Y;Y=C,C=V}else if(z===0||C.cmpn(1)===0)break;Y.isub(C)}while(!0);return C.iushln(J)},Q.prototype.invm=function(X){return this.egcd(X).a.umod(X)},Q.prototype.isEven=function(){return(this.words[0]&1)===0},Q.prototype.isOdd=function(){return(this.words[0]&1)===1},Q.prototype.andln=function(X){return this.words[0]&X},Q.prototype.bincn=function(X){H(typeof X=="number");var Y=X%26,C=(X-Y)/26,J=1<>>26,K&=67108863,this.words[V]=K}return z!==0&&(this.words[V]=z,this.length++),this},Q.prototype.isZero=function(){return this.length===1&&this.words[0]===0},Q.prototype.cmpn=function(X){var Y=X<0;if(this.negative!==0&&!Y)return-1;if(this.negative===0&&Y)return 1;this.strip();var C;if(this.length>1)C=1;else{Y&&(X=-X),H(X<=67108863,"Number is too big");var J=this.words[0]|0;C=J===X?0:JX.length)return 1;if(this.length=0;C--){var J=this.words[C]|0,z=X.words[C]|0;if(J!==z){Jz&&(Y=1);break}}return Y},Q.prototype.gtn=function(X){return this.cmpn(X)===1},Q.prototype.gt=function(X){return this.cmp(X)===1},Q.prototype.gten=function(X){return this.cmpn(X)>=0},Q.prototype.gte=function(X){return this.cmp(X)>=0},Q.prototype.ltn=function(X){return this.cmpn(X)===-1},Q.prototype.lt=function(X){return this.cmp(X)===-1},Q.prototype.lten=function(X){return this.cmpn(X)<=0},Q.prototype.lte=function(X){return this.cmp(X)<=0},Q.prototype.eqn=function(X){return this.cmpn(X)===0},Q.prototype.eq=function(X){return this.cmp(X)===0},Q.red=function(X){return new a(X)},Q.prototype.toRed=function(X){return H(!this.red,"Already a number in reduction context"),H(this.negative===0,"red works only with positives"),X.convertTo(this)._forceRed(X)},Q.prototype.fromRed=function(){return H(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},Q.prototype._forceRed=function(X){return this.red=X,this},Q.prototype.forceRed=function(X){return H(!this.red,"Already a number in reduction context"),this._forceRed(X)},Q.prototype.redAdd=function(X){return H(this.red,"redAdd works only with red numbers"),this.red.add(this,X)},Q.prototype.redIAdd=function(X){return H(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,X)},Q.prototype.redSub=function(X){return H(this.red,"redSub works only with red numbers"),this.red.sub(this,X)},Q.prototype.redISub=function(X){return H(this.red,"redISub works only with red numbers"),this.red.isub(this,X)},Q.prototype.redShl=function(X){return H(this.red,"redShl works only with red numbers"),this.red.shl(this,X)},Q.prototype.redMul=function(X){return H(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.mul(this,X)},Q.prototype.redIMul=function(X){return H(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.imul(this,X)},Q.prototype.redSqr=function(){return H(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},Q.prototype.redISqr=function(){return H(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},Q.prototype.redSqrt=function(){return H(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},Q.prototype.redInvm=function(){return H(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},Q.prototype.redNeg=function(){return H(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},Q.prototype.redPow=function(X){return H(this.red&&!X.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,X)};var m={k256:null,p224:null,p192:null,p25519:null};function c(X,Y){this.name=X,this.p=new Q(Y,16),this.n=this.p.bitLength(),this.k=new Q(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}c.prototype._tmp=function(){var X=new Q(null);return X.words=new Array(Math.ceil(this.n/13)),X},c.prototype.ireduce=function(X){var Y=X,C;do this.split(Y,this.tmp),Y=this.imulK(Y),Y=Y.iadd(this.tmp),C=Y.bitLength();while(C>this.n);var J=C0?Y.isub(this.p):Y.strip!==void 0?Y.strip():Y._strip(),Y},c.prototype.split=function(X,Y){X.iushrn(this.n,0,Y)},c.prototype.imulK=function(X){return X.imul(this.k)};function l(){c.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}k(l,c),l.prototype.split=function(X,Y){for(var C=4194303,J=Math.min(X.length,9),z=0;z>>22,V=K}V>>>=22,X.words[z-10]=V,V===0&&X.length>10?X.length-=10:X.length-=9},l.prototype.imulK=function(X){X.words[X.length]=0,X.words[X.length+1]=0,X.length+=2;for(var Y=0,C=0;C>>=26,X.words[C]=z,Y=J}return Y!==0&&(X.words[X.length++]=Y),X},Q._prime=function(X){if(m[X])return m[X];var Y;if(X==="k256")Y=new l;else if(X==="p224")Y=new n;else if(X==="p192")Y=new i;else if(X==="p25519")Y=new C0;else throw new Error("Unknown prime "+X);return m[X]=Y,Y};function a(X){if(typeof X=="string"){var Y=Q._prime(X);this.m=Y.p,this.prime=Y}else H(X.gtn(1),"modulus must be greater than 1"),this.m=X,this.prime=null}a.prototype._verify1=function(X){H(X.negative===0,"red works only with positives"),H(X.red,"red works only with red numbers")},a.prototype._verify2=function(X,Y){H((X.negative|Y.negative)===0,"red works only with positives"),H(X.red&&X.red===Y.red,"red works only with red numbers")},a.prototype.imod=function(X){return this.prime?this.prime.ireduce(X)._forceRed(this):X.umod(this.m)._forceRed(this)},a.prototype.neg=function(X){return X.isZero()?X.clone():this.m.sub(X)._forceRed(this)},a.prototype.add=function(X,Y){this._verify2(X,Y);var C=X.add(Y);return C.cmp(this.m)>=0&&C.isub(this.m),C._forceRed(this)},a.prototype.iadd=function(X,Y){this._verify2(X,Y);var C=X.iadd(Y);return C.cmp(this.m)>=0&&C.isub(this.m),C},a.prototype.sub=function(X,Y){this._verify2(X,Y);var C=X.sub(Y);return C.cmpn(0)<0&&C.iadd(this.m),C._forceRed(this)},a.prototype.isub=function(X,Y){this._verify2(X,Y);var C=X.isub(Y);return C.cmpn(0)<0&&C.iadd(this.m),C},a.prototype.shl=function(X,Y){return this._verify1(X),this.imod(X.ushln(Y))},a.prototype.imul=function(X,Y){return this._verify2(X,Y),this.imod(X.imul(Y))},a.prototype.mul=function(X,Y){return this._verify2(X,Y),this.imod(X.mul(Y))},a.prototype.isqr=function(X){return this.imul(X,X.clone())},a.prototype.sqr=function(X){return this.mul(X,X)},a.prototype.sqrt=function(X){if(X.isZero())return X.clone();var Y=this.m.andln(3);if(H(Y%2===1),Y===3){var C=this.m.add(new Q(1)).iushrn(2);return this.pow(X,C)}for(var J=this.m.subn(1),z=0;!J.isZero()&&J.andln(1)===0;)z++,J.iushrn(1);H(!J.isZero());var V=new Q(1).toRed(this),K=V.redNeg(),$=this.m.subn(1).iushrn(1),G=this.m.bitLength();for(G=new Q(2*G*G).toRed(this);this.pow(G,$).cmp(K)!==0;)G.redIAdd(K);for(var j=this.pow(G,J),A=this.pow(X,J.addn(1).iushrn(1)),R=this.pow(X,J),_=z;R.cmp(V)!==0;){for(var s=R,r=0;s.cmp(V)!==0;r++)s=s.redSqr();H(r<_);var Y0=this.pow(j,new Q(1).iushln(_-r-1));A=A.redMul(Y0),j=Y0.redSqr(),R=R.redMul(j),_=r}return A},a.prototype.invm=function(X){var Y=X._invmp(this.m);return Y.negative!==0?(Y.negative=0,this.imod(Y).redNeg()):this.imod(Y)},a.prototype.pow=function(X,Y){if(Y.isZero())return new Q(1).toRed(this);if(Y.cmpn(1)===0)return X.clone();var C=4,J=new Array(1<=0;z--){for(var j=Y.words[z],A=G-1;A>=0;A--){var R=j>>A&1;if(V!==J[0]&&(V=this.sqr(V)),R===0&&K===0){$=0;continue}K<<=1,K|=R,$++,!($!==C&&(z!==0||A!==0))&&(V=this.mul(V,J[K]),$=0,K=0)}G=26}return V},a.prototype.convertTo=function(X){var Y=X.umod(this.m);return Y===X?Y.clone():Y},a.prototype.convertFrom=function(X){var Y=X.clone();return Y.red=null,Y},Q.mont=function(X){return new K0(X)};function K0(X){a.call(this,X),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new Q(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)}k(K0,a),K0.prototype.convertTo=function(X){return this.imod(X.ushln(this.shift))},K0.prototype.convertFrom=function(X){var Y=this.imod(X.mul(this.rinv));return Y.red=null,Y},K0.prototype.imul=function(X,Y){if(X.isZero()||Y.isZero())return X.words[0]=0,X.length=1,X;var C=X.imul(Y),J=C.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),z=C.isub(J).iushrn(this.shift),V=z;return z.cmp(this.m)>=0?V=z.isub(this.m):z.cmpn(0)<0&&(V=z.iadd(this.m)),V._forceRed(this)},K0.prototype.mul=function(X,Y){if(X.isZero()||Y.isZero())return new Q(0)._forceRed(this);var C=X.mul(Y),J=C.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),z=C.isub(J).iushrn(this.shift),V=z;return z.cmp(this.m)>=0?V=z.isub(this.m):z.cmpn(0)<0&&(V=z.iadd(this.m)),V._forceRed(this)},K0.prototype.invm=function(X){var Y=this.imod(X._invmp(this.m).mul(this.r2));return Y._forceRed(this)}})(typeof I>"u"||I,E)}),R8=$0((E,I)=>{(function(F,L){function H(X,Y){if(!X)throw new Error(Y||"Assertion failed")}function k(X,Y){X.super_=Y;var C=function(){};C.prototype=Y.prototype,X.prototype=new C,X.prototype.constructor=X}function Q(X,Y,C){if(Q.isBN(X))return X;this.negative=0,this.words=null,this.length=0,this.red=null,X!==null&&((Y==="le"||Y==="be")&&(C=Y,Y=10),this._init(X||0,Y||10,C||"be"))}typeof F=="object"?F.exports=Q:L.BN=Q,Q.BN=Q,Q.wordSize=26;var O;try{typeof window<"u"&&typeof window.Buffer<"u"?O=window.Buffer:O=A2().Buffer}catch{}Q.isBN=function(X){return X instanceof Q?!0:X!==null&&typeof X=="object"&&X.constructor.wordSize===Q.wordSize&&Array.isArray(X.words)},Q.max=function(X,Y){return X.cmp(Y)>0?X:Y},Q.min=function(X,Y){return X.cmp(Y)<0?X:Y},Q.prototype._init=function(X,Y,C){if(typeof X=="number")return this._initNumber(X,Y,C);if(typeof X=="object")return this._initArray(X,Y,C);Y==="hex"&&(Y=16),H(Y===(Y|0)&&Y>=2&&Y<=36),X=X.toString().replace(/\s+/g,"");var J=0;X[0]==="-"&&(J++,this.negative=1),J=0;J-=3)V=X[J]|X[J-1]<<8|X[J-2]<<16,this.words[z]|=V<>>26-K&67108863,K+=24,K>=26&&(K-=26,z++);else if(C==="le")for(J=0,z=0;J>>26-K&67108863,K+=24,K>=26&&(K-=26,z++);return this.strip()};function N(X,Y){var C=X.charCodeAt(Y);return C>=65&&C<=70?C-55:C>=97&&C<=102?C-87:C-48&15}function U(X,Y,C){var J=N(X,C);return C-1>=Y&&(J|=N(X,C-1)<<4),J}Q.prototype._parseHex=function(X,Y,C){this.length=Math.ceil((X.length-Y)/6),this.words=new Array(this.length);for(var J=0;J=Y;J-=2)K=U(X,Y,J)<=18?(z-=18,V+=1,this.words[V]|=K>>>26):z+=8;else{var $=X.length-Y;for(J=$%2===0?Y+1:Y;J=18?(z-=18,V+=1,this.words[V]|=K>>>26):z+=8}this.strip()};function W(X,Y,C,J){for(var z=0,V=Math.min(X.length,C),K=Y;K=49?z+=$-49+10:$>=17?z+=$-17+10:z+=$}return z}Q.prototype._parseBase=function(X,Y,C){this.words=[0],this.length=1;for(var J=0,z=1;z<=67108863;z*=Y)J++;J--,z=z/Y|0;for(var V=X.length-C,K=V%J,$=Math.min(V,V-K)+C,G=0,j=C;j<$;j+=J)G=W(X,j,j+J,Y),this.imuln(z),this.words[0]+G<67108864?this.words[0]+=G:this._iaddn(G);if(K!==0){var A=1;for(G=W(X,j,X.length,Y),j=0;j1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},Q.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},Q.prototype.inspect=function(){return(this.red?""};var Z=["","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"],T=[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,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];Q.prototype.toString=function(X,Y){X=X||10,Y=Y|0||1;var C;if(X===16||X==="hex"){C="";for(var J=0,z=0,V=0;V>>24-J&16777215,z!==0||V!==this.length-1?C=Z[6-$.length]+$+C:C=$+C,J+=2,J>=26&&(J-=26,V--)}for(z!==0&&(C=z.toString(16)+C);C.length%Y!==0;)C="0"+C;return this.negative!==0&&(C="-"+C),C}if(X===(X|0)&&X>=2&&X<=36){var G=T[X],j=B[X];C="";var A=this.clone();for(A.negative=0;!A.isZero();){var R=A.modn(j).toString(X);A=A.idivn(j),A.isZero()?C=R+C:C=Z[G-R.length]+R+C}for(this.isZero()&&(C="0"+C);C.length%Y!==0;)C="0"+C;return this.negative!==0&&(C="-"+C),C}H(!1,"Base should be between 2 and 36")},Q.prototype.toNumber=function(){var X=this.words[0];return this.length===2?X+=this.words[1]*67108864:this.length===3&&this.words[2]===1?X+=4503599627370496+this.words[1]*67108864:this.length>2&&H(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-X:X},Q.prototype.toJSON=function(){return this.toString(16)},Q.prototype.toBuffer=function(X,Y){return H(typeof O<"u"),this.toArrayLike(O,X,Y)},Q.prototype.toArray=function(X,Y){return this.toArrayLike(Array,X,Y)},Q.prototype.toArrayLike=function(X,Y,C){var J=this.byteLength(),z=C||Math.max(1,J);H(J<=z,"byte array longer than desired length"),H(z>0,"Requested array length <= 0"),this.strip();var V=Y==="le",K=new X(z),$,G,j=this.clone();if(V){for(G=0;!j.isZero();G++)$=j.andln(255),j.iushrn(8),K[G]=$;for(;G=4096&&(C+=13,Y>>>=13),Y>=64&&(C+=7,Y>>>=7),Y>=8&&(C+=4,Y>>>=4),Y>=2&&(C+=2,Y>>>=2),C+Y},Q.prototype._zeroBits=function(X){if(X===0)return 26;var Y=X,C=0;return(Y&8191)===0&&(C+=13,Y>>>=13),(Y&127)===0&&(C+=7,Y>>>=7),(Y&15)===0&&(C+=4,Y>>>=4),(Y&3)===0&&(C+=2,Y>>>=2),(Y&1)===0&&C++,C},Q.prototype.bitLength=function(){var X=this.words[this.length-1],Y=this._countBits(X);return(this.length-1)*26+Y};function P(X){for(var Y=new Array(X.bitLength()),C=0;C>>z}return Y}Q.prototype.zeroBits=function(){if(this.isZero())return 0;for(var X=0,Y=0;YX.length?this.clone().ior(X):X.clone().ior(this)},Q.prototype.uor=function(X){return this.length>X.length?this.clone().iuor(X):X.clone().iuor(this)},Q.prototype.iuand=function(X){var Y;this.length>X.length?Y=X:Y=this;for(var C=0;CX.length?this.clone().iand(X):X.clone().iand(this)},Q.prototype.uand=function(X){return this.length>X.length?this.clone().iuand(X):X.clone().iuand(this)},Q.prototype.iuxor=function(X){var Y,C;this.length>X.length?(Y=this,C=X):(Y=X,C=this);for(var J=0;JX.length?this.clone().ixor(X):X.clone().ixor(this)},Q.prototype.uxor=function(X){return this.length>X.length?this.clone().iuxor(X):X.clone().iuxor(this)},Q.prototype.inotn=function(X){H(typeof X=="number"&&X>=0);var Y=Math.ceil(X/26)|0,C=X%26;this._expand(Y),C>0&&Y--;for(var J=0;J0&&(this.words[J]=~this.words[J]&67108863>>26-C),this.strip()},Q.prototype.notn=function(X){return this.clone().inotn(X)},Q.prototype.setn=function(X,Y){H(typeof X=="number"&&X>=0);var C=X/26|0,J=X%26;return this._expand(C+1),Y?this.words[C]=this.words[C]|1<X.length?(C=this,J=X):(C=X,J=this);for(var z=0,V=0;V>>26;for(;z!==0&&V>>26;if(this.length=C.length,z!==0)this.words[this.length]=z,this.length++;else if(C!==this)for(;VX.length?this.clone().iadd(X):X.clone().iadd(this)},Q.prototype.isub=function(X){if(X.negative!==0){X.negative=0;var Y=this.iadd(X);return X.negative=1,Y._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(X),this.negative=1,this._normSign();var C=this.cmp(X);if(C===0)return this.negative=0,this.length=1,this.words[0]=0,this;var J,z;C>0?(J=this,z=X):(J=X,z=this);for(var V=0,K=0;K>26,this.words[K]=Y&67108863;for(;V!==0&&K>26,this.words[K]=Y&67108863;if(V===0&&K>>26,R=G&67108863,_=Math.min(j,Y.length-1),s=Math.max(0,j-X.length+1);s<=_;s++){var r=j-s|0;z=X.words[r]|0,V=Y.words[s]|0,K=z*V+R,A+=K/67108864|0,R=K&67108863}C.words[j]=R|0,G=A|0}return G!==0?C.words[j]=G|0:C.length--,C.strip()}var x=function(X,Y,C){var J=X.words,z=Y.words,V=C.words,K=0,$,G,j,A=J[0]|0,R=A&8191,_=A>>>13,s=J[1]|0,r=s&8191,Y0=s>>>13,o=J[2]|0,b=o&8191,f=o>>>13,W0=J[3]|0,X0=W0&8191,z0=W0>>>13,g=J[4]|0,v=g&8191,p=g>>>13,e=J[5]|0,G0=e&8191,t=e>>>13,y0=J[6]|0,Q0=y0&8191,V0=y0>>>13,_0=J[7]|0,F0=_0&8191,Z0=_0>>>13,b0=J[8]|0,D=b0&8191,S=b0>>>13,d=J[9]|0,h=d&8191,u=d>>>13,P0=z[0]|0,J0=P0&8191,H0=P0>>>13,d0=z[1]|0,U0=d0&8191,O0=d0>>>13,g0=z[2]|0,L0=g0&8191,N0=g0>>>13,$2=z[3]|0,D0=$2&8191,T0=$2>>>13,h0=z[4]|0,k0=h0&8191,I0=h0>>>13,j2=z[5]|0,B0=j2&8191,q0=j2>>>13,V2=z[6]|0,R0=V2&8191,E0=V2>>>13,K2=z[7]|0,x0=K2&8191,v0=K2>>>13,Z2=z[8]|0,S0=Z2&8191,A0=Z2>>>13,H2=z[9]|0,M0=H2&8191,w0=H2>>>13;C.negative=X.negative^Y.negative,C.length=19,$=Math.imul(R,J0),G=Math.imul(R,H0),G=G+Math.imul(_,J0)|0,j=Math.imul(_,H0);var Q2=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(Q2>>>26)|0,Q2&=67108863,$=Math.imul(r,J0),G=Math.imul(r,H0),G=G+Math.imul(Y0,J0)|0,j=Math.imul(Y0,H0),$=$+Math.imul(R,U0)|0,G=G+Math.imul(R,O0)|0,G=G+Math.imul(_,U0)|0,j=j+Math.imul(_,O0)|0;var m0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(m0>>>26)|0,m0&=67108863,$=Math.imul(b,J0),G=Math.imul(b,H0),G=G+Math.imul(f,J0)|0,j=Math.imul(f,H0),$=$+Math.imul(r,U0)|0,G=G+Math.imul(r,O0)|0,G=G+Math.imul(Y0,U0)|0,j=j+Math.imul(Y0,O0)|0,$=$+Math.imul(R,L0)|0,G=G+Math.imul(R,N0)|0,G=G+Math.imul(_,L0)|0,j=j+Math.imul(_,N0)|0;var p0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(p0>>>26)|0,p0&=67108863,$=Math.imul(X0,J0),G=Math.imul(X0,H0),G=G+Math.imul(z0,J0)|0,j=Math.imul(z0,H0),$=$+Math.imul(b,U0)|0,G=G+Math.imul(b,O0)|0,G=G+Math.imul(f,U0)|0,j=j+Math.imul(f,O0)|0,$=$+Math.imul(r,L0)|0,G=G+Math.imul(r,N0)|0,G=G+Math.imul(Y0,L0)|0,j=j+Math.imul(Y0,N0)|0,$=$+Math.imul(R,D0)|0,G=G+Math.imul(R,T0)|0,G=G+Math.imul(_,D0)|0,j=j+Math.imul(_,T0)|0;var o0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(o0>>>26)|0,o0&=67108863,$=Math.imul(v,J0),G=Math.imul(v,H0),G=G+Math.imul(p,J0)|0,j=Math.imul(p,H0),$=$+Math.imul(X0,U0)|0,G=G+Math.imul(X0,O0)|0,G=G+Math.imul(z0,U0)|0,j=j+Math.imul(z0,O0)|0,$=$+Math.imul(b,L0)|0,G=G+Math.imul(b,N0)|0,G=G+Math.imul(f,L0)|0,j=j+Math.imul(f,N0)|0,$=$+Math.imul(r,D0)|0,G=G+Math.imul(r,T0)|0,G=G+Math.imul(Y0,D0)|0,j=j+Math.imul(Y0,T0)|0,$=$+Math.imul(R,k0)|0,G=G+Math.imul(R,I0)|0,G=G+Math.imul(_,k0)|0,j=j+Math.imul(_,I0)|0;var u0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(u0>>>26)|0,u0&=67108863,$=Math.imul(G0,J0),G=Math.imul(G0,H0),G=G+Math.imul(t,J0)|0,j=Math.imul(t,H0),$=$+Math.imul(v,U0)|0,G=G+Math.imul(v,O0)|0,G=G+Math.imul(p,U0)|0,j=j+Math.imul(p,O0)|0,$=$+Math.imul(X0,L0)|0,G=G+Math.imul(X0,N0)|0,G=G+Math.imul(z0,L0)|0,j=j+Math.imul(z0,N0)|0,$=$+Math.imul(b,D0)|0,G=G+Math.imul(b,T0)|0,G=G+Math.imul(f,D0)|0,j=j+Math.imul(f,T0)|0,$=$+Math.imul(r,k0)|0,G=G+Math.imul(r,I0)|0,G=G+Math.imul(Y0,k0)|0,j=j+Math.imul(Y0,I0)|0,$=$+Math.imul(R,B0)|0,G=G+Math.imul(R,q0)|0,G=G+Math.imul(_,B0)|0,j=j+Math.imul(_,q0)|0;var s0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(s0>>>26)|0,s0&=67108863,$=Math.imul(Q0,J0),G=Math.imul(Q0,H0),G=G+Math.imul(V0,J0)|0,j=Math.imul(V0,H0),$=$+Math.imul(G0,U0)|0,G=G+Math.imul(G0,O0)|0,G=G+Math.imul(t,U0)|0,j=j+Math.imul(t,O0)|0,$=$+Math.imul(v,L0)|0,G=G+Math.imul(v,N0)|0,G=G+Math.imul(p,L0)|0,j=j+Math.imul(p,N0)|0,$=$+Math.imul(X0,D0)|0,G=G+Math.imul(X0,T0)|0,G=G+Math.imul(z0,D0)|0,j=j+Math.imul(z0,T0)|0,$=$+Math.imul(b,k0)|0,G=G+Math.imul(b,I0)|0,G=G+Math.imul(f,k0)|0,j=j+Math.imul(f,I0)|0,$=$+Math.imul(r,B0)|0,G=G+Math.imul(r,q0)|0,G=G+Math.imul(Y0,B0)|0,j=j+Math.imul(Y0,q0)|0,$=$+Math.imul(R,R0)|0,G=G+Math.imul(R,E0)|0,G=G+Math.imul(_,R0)|0,j=j+Math.imul(_,E0)|0;var f0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(f0>>>26)|0,f0&=67108863,$=Math.imul(F0,J0),G=Math.imul(F0,H0),G=G+Math.imul(Z0,J0)|0,j=Math.imul(Z0,H0),$=$+Math.imul(Q0,U0)|0,G=G+Math.imul(Q0,O0)|0,G=G+Math.imul(V0,U0)|0,j=j+Math.imul(V0,O0)|0,$=$+Math.imul(G0,L0)|0,G=G+Math.imul(G0,N0)|0,G=G+Math.imul(t,L0)|0,j=j+Math.imul(t,N0)|0,$=$+Math.imul(v,D0)|0,G=G+Math.imul(v,T0)|0,G=G+Math.imul(p,D0)|0,j=j+Math.imul(p,T0)|0,$=$+Math.imul(X0,k0)|0,G=G+Math.imul(X0,I0)|0,G=G+Math.imul(z0,k0)|0,j=j+Math.imul(z0,I0)|0,$=$+Math.imul(b,B0)|0,G=G+Math.imul(b,q0)|0,G=G+Math.imul(f,B0)|0,j=j+Math.imul(f,q0)|0,$=$+Math.imul(r,R0)|0,G=G+Math.imul(r,E0)|0,G=G+Math.imul(Y0,R0)|0,j=j+Math.imul(Y0,E0)|0,$=$+Math.imul(R,x0)|0,G=G+Math.imul(R,v0)|0,G=G+Math.imul(_,x0)|0,j=j+Math.imul(_,v0)|0;var a0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(a0>>>26)|0,a0&=67108863,$=Math.imul(D,J0),G=Math.imul(D,H0),G=G+Math.imul(S,J0)|0,j=Math.imul(S,H0),$=$+Math.imul(F0,U0)|0,G=G+Math.imul(F0,O0)|0,G=G+Math.imul(Z0,U0)|0,j=j+Math.imul(Z0,O0)|0,$=$+Math.imul(Q0,L0)|0,G=G+Math.imul(Q0,N0)|0,G=G+Math.imul(V0,L0)|0,j=j+Math.imul(V0,N0)|0,$=$+Math.imul(G0,D0)|0,G=G+Math.imul(G0,T0)|0,G=G+Math.imul(t,D0)|0,j=j+Math.imul(t,T0)|0,$=$+Math.imul(v,k0)|0,G=G+Math.imul(v,I0)|0,G=G+Math.imul(p,k0)|0,j=j+Math.imul(p,I0)|0,$=$+Math.imul(X0,B0)|0,G=G+Math.imul(X0,q0)|0,G=G+Math.imul(z0,B0)|0,j=j+Math.imul(z0,q0)|0,$=$+Math.imul(b,R0)|0,G=G+Math.imul(b,E0)|0,G=G+Math.imul(f,R0)|0,j=j+Math.imul(f,E0)|0,$=$+Math.imul(r,x0)|0,G=G+Math.imul(r,v0)|0,G=G+Math.imul(Y0,x0)|0,j=j+Math.imul(Y0,v0)|0,$=$+Math.imul(R,S0)|0,G=G+Math.imul(R,A0)|0,G=G+Math.imul(_,S0)|0,j=j+Math.imul(_,A0)|0;var n0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(n0>>>26)|0,n0&=67108863,$=Math.imul(h,J0),G=Math.imul(h,H0),G=G+Math.imul(u,J0)|0,j=Math.imul(u,H0),$=$+Math.imul(D,U0)|0,G=G+Math.imul(D,O0)|0,G=G+Math.imul(S,U0)|0,j=j+Math.imul(S,O0)|0,$=$+Math.imul(F0,L0)|0,G=G+Math.imul(F0,N0)|0,G=G+Math.imul(Z0,L0)|0,j=j+Math.imul(Z0,N0)|0,$=$+Math.imul(Q0,D0)|0,G=G+Math.imul(Q0,T0)|0,G=G+Math.imul(V0,D0)|0,j=j+Math.imul(V0,T0)|0,$=$+Math.imul(G0,k0)|0,G=G+Math.imul(G0,I0)|0,G=G+Math.imul(t,k0)|0,j=j+Math.imul(t,I0)|0,$=$+Math.imul(v,B0)|0,G=G+Math.imul(v,q0)|0,G=G+Math.imul(p,B0)|0,j=j+Math.imul(p,q0)|0,$=$+Math.imul(X0,R0)|0,G=G+Math.imul(X0,E0)|0,G=G+Math.imul(z0,R0)|0,j=j+Math.imul(z0,E0)|0,$=$+Math.imul(b,x0)|0,G=G+Math.imul(b,v0)|0,G=G+Math.imul(f,x0)|0,j=j+Math.imul(f,v0)|0,$=$+Math.imul(r,S0)|0,G=G+Math.imul(r,A0)|0,G=G+Math.imul(Y0,S0)|0,j=j+Math.imul(Y0,A0)|0,$=$+Math.imul(R,M0)|0,G=G+Math.imul(R,w0)|0,G=G+Math.imul(_,M0)|0,j=j+Math.imul(_,w0)|0;var r0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(r0>>>26)|0,r0&=67108863,$=Math.imul(h,U0),G=Math.imul(h,O0),G=G+Math.imul(u,U0)|0,j=Math.imul(u,O0),$=$+Math.imul(D,L0)|0,G=G+Math.imul(D,N0)|0,G=G+Math.imul(S,L0)|0,j=j+Math.imul(S,N0)|0,$=$+Math.imul(F0,D0)|0,G=G+Math.imul(F0,T0)|0,G=G+Math.imul(Z0,D0)|0,j=j+Math.imul(Z0,T0)|0,$=$+Math.imul(Q0,k0)|0,G=G+Math.imul(Q0,I0)|0,G=G+Math.imul(V0,k0)|0,j=j+Math.imul(V0,I0)|0,$=$+Math.imul(G0,B0)|0,G=G+Math.imul(G0,q0)|0,G=G+Math.imul(t,B0)|0,j=j+Math.imul(t,q0)|0,$=$+Math.imul(v,R0)|0,G=G+Math.imul(v,E0)|0,G=G+Math.imul(p,R0)|0,j=j+Math.imul(p,E0)|0,$=$+Math.imul(X0,x0)|0,G=G+Math.imul(X0,v0)|0,G=G+Math.imul(z0,x0)|0,j=j+Math.imul(z0,v0)|0,$=$+Math.imul(b,S0)|0,G=G+Math.imul(b,A0)|0,G=G+Math.imul(f,S0)|0,j=j+Math.imul(f,A0)|0,$=$+Math.imul(r,M0)|0,G=G+Math.imul(r,w0)|0,G=G+Math.imul(Y0,M0)|0,j=j+Math.imul(Y0,w0)|0;var i0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(i0>>>26)|0,i0&=67108863,$=Math.imul(h,L0),G=Math.imul(h,N0),G=G+Math.imul(u,L0)|0,j=Math.imul(u,N0),$=$+Math.imul(D,D0)|0,G=G+Math.imul(D,T0)|0,G=G+Math.imul(S,D0)|0,j=j+Math.imul(S,T0)|0,$=$+Math.imul(F0,k0)|0,G=G+Math.imul(F0,I0)|0,G=G+Math.imul(Z0,k0)|0,j=j+Math.imul(Z0,I0)|0,$=$+Math.imul(Q0,B0)|0,G=G+Math.imul(Q0,q0)|0,G=G+Math.imul(V0,B0)|0,j=j+Math.imul(V0,q0)|0,$=$+Math.imul(G0,R0)|0,G=G+Math.imul(G0,E0)|0,G=G+Math.imul(t,R0)|0,j=j+Math.imul(t,E0)|0,$=$+Math.imul(v,x0)|0,G=G+Math.imul(v,v0)|0,G=G+Math.imul(p,x0)|0,j=j+Math.imul(p,v0)|0,$=$+Math.imul(X0,S0)|0,G=G+Math.imul(X0,A0)|0,G=G+Math.imul(z0,S0)|0,j=j+Math.imul(z0,A0)|0,$=$+Math.imul(b,M0)|0,G=G+Math.imul(b,w0)|0,G=G+Math.imul(f,M0)|0,j=j+Math.imul(f,w0)|0;var t0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(t0>>>26)|0,t0&=67108863,$=Math.imul(h,D0),G=Math.imul(h,T0),G=G+Math.imul(u,D0)|0,j=Math.imul(u,T0),$=$+Math.imul(D,k0)|0,G=G+Math.imul(D,I0)|0,G=G+Math.imul(S,k0)|0,j=j+Math.imul(S,I0)|0,$=$+Math.imul(F0,B0)|0,G=G+Math.imul(F0,q0)|0,G=G+Math.imul(Z0,B0)|0,j=j+Math.imul(Z0,q0)|0,$=$+Math.imul(Q0,R0)|0,G=G+Math.imul(Q0,E0)|0,G=G+Math.imul(V0,R0)|0,j=j+Math.imul(V0,E0)|0,$=$+Math.imul(G0,x0)|0,G=G+Math.imul(G0,v0)|0,G=G+Math.imul(t,x0)|0,j=j+Math.imul(t,v0)|0,$=$+Math.imul(v,S0)|0,G=G+Math.imul(v,A0)|0,G=G+Math.imul(p,S0)|0,j=j+Math.imul(p,A0)|0,$=$+Math.imul(X0,M0)|0,G=G+Math.imul(X0,w0)|0,G=G+Math.imul(z0,M0)|0,j=j+Math.imul(z0,w0)|0;var e0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(e0>>>26)|0,e0&=67108863,$=Math.imul(h,k0),G=Math.imul(h,I0),G=G+Math.imul(u,k0)|0,j=Math.imul(u,I0),$=$+Math.imul(D,B0)|0,G=G+Math.imul(D,q0)|0,G=G+Math.imul(S,B0)|0,j=j+Math.imul(S,q0)|0,$=$+Math.imul(F0,R0)|0,G=G+Math.imul(F0,E0)|0,G=G+Math.imul(Z0,R0)|0,j=j+Math.imul(Z0,E0)|0,$=$+Math.imul(Q0,x0)|0,G=G+Math.imul(Q0,v0)|0,G=G+Math.imul(V0,x0)|0,j=j+Math.imul(V0,v0)|0,$=$+Math.imul(G0,S0)|0,G=G+Math.imul(G0,A0)|0,G=G+Math.imul(t,S0)|0,j=j+Math.imul(t,A0)|0,$=$+Math.imul(v,M0)|0,G=G+Math.imul(v,w0)|0,G=G+Math.imul(p,M0)|0,j=j+Math.imul(p,w0)|0;var X2=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(X2>>>26)|0,X2&=67108863,$=Math.imul(h,B0),G=Math.imul(h,q0),G=G+Math.imul(u,B0)|0,j=Math.imul(u,q0),$=$+Math.imul(D,R0)|0,G=G+Math.imul(D,E0)|0,G=G+Math.imul(S,R0)|0,j=j+Math.imul(S,E0)|0,$=$+Math.imul(F0,x0)|0,G=G+Math.imul(F0,v0)|0,G=G+Math.imul(Z0,x0)|0,j=j+Math.imul(Z0,v0)|0,$=$+Math.imul(Q0,S0)|0,G=G+Math.imul(Q0,A0)|0,G=G+Math.imul(V0,S0)|0,j=j+Math.imul(V0,A0)|0,$=$+Math.imul(G0,M0)|0,G=G+Math.imul(G0,w0)|0,G=G+Math.imul(t,M0)|0,j=j+Math.imul(t,w0)|0;var G2=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(G2>>>26)|0,G2&=67108863,$=Math.imul(h,R0),G=Math.imul(h,E0),G=G+Math.imul(u,R0)|0,j=Math.imul(u,E0),$=$+Math.imul(D,x0)|0,G=G+Math.imul(D,v0)|0,G=G+Math.imul(S,x0)|0,j=j+Math.imul(S,v0)|0,$=$+Math.imul(F0,S0)|0,G=G+Math.imul(F0,A0)|0,G=G+Math.imul(Z0,S0)|0,j=j+Math.imul(Z0,A0)|0,$=$+Math.imul(Q0,M0)|0,G=G+Math.imul(Q0,w0)|0,G=G+Math.imul(V0,M0)|0,j=j+Math.imul(V0,w0)|0;var Y2=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(Y2>>>26)|0,Y2&=67108863,$=Math.imul(h,x0),G=Math.imul(h,v0),G=G+Math.imul(u,x0)|0,j=Math.imul(u,v0),$=$+Math.imul(D,S0)|0,G=G+Math.imul(D,A0)|0,G=G+Math.imul(S,S0)|0,j=j+Math.imul(S,A0)|0,$=$+Math.imul(F0,M0)|0,G=G+Math.imul(F0,w0)|0,G=G+Math.imul(Z0,M0)|0,j=j+Math.imul(Z0,w0)|0;var J2=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(J2>>>26)|0,J2&=67108863,$=Math.imul(h,S0),G=Math.imul(h,A0),G=G+Math.imul(u,S0)|0,j=Math.imul(u,A0),$=$+Math.imul(D,M0)|0,G=G+Math.imul(D,w0)|0,G=G+Math.imul(S,M0)|0,j=j+Math.imul(S,w0)|0;var C2=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(C2>>>26)|0,C2&=67108863,$=Math.imul(h,M0),G=Math.imul(h,w0),G=G+Math.imul(u,M0)|0,j=Math.imul(u,w0);var z2=(K+$|0)+((G&8191)<<13)|0;return K=(j+(G>>>13)|0)+(z2>>>26)|0,z2&=67108863,V[0]=Q2,V[1]=m0,V[2]=p0,V[3]=o0,V[4]=u0,V[5]=s0,V[6]=f0,V[7]=a0,V[8]=n0,V[9]=r0,V[10]=i0,V[11]=t0,V[12]=e0,V[13]=X2,V[14]=G2,V[15]=Y2,V[16]=J2,V[17]=C2,V[18]=z2,K!==0&&(V[19]=K,C.length++),C};Math.imul||(x=q);function w(X,Y,C){C.negative=Y.negative^X.negative,C.length=X.length+Y.length;for(var J=0,z=0,V=0;V>>26)|0,z+=K>>>26,K&=67108863}C.words[V]=$,J=K,K=z}return J!==0?C.words[V]=J:C.length--,C.strip()}function M(X,Y,C){var J=new y;return J.mulp(X,Y,C)}Q.prototype.mulTo=function(X,Y){var C,J=this.length+X.length;return this.length===10&&X.length===10?C=x(this,X,Y):J<63?C=q(this,X,Y):J<1024?C=w(this,X,Y):C=M(this,X,Y),C};function y(X,Y){this.x=X,this.y=Y}y.prototype.makeRBT=function(X){for(var Y=new Array(X),C=Q.prototype._countBits(X)-1,J=0;J>=1;return J},y.prototype.permute=function(X,Y,C,J,z,V){for(var K=0;K>>1)z++;return 1<>>13,C[2*V+1]=z&8191,z=z>>>13;for(V=2*Y;V>=26,Y+=J/67108864|0,Y+=z>>>26,this.words[C]=z&67108863}return Y!==0&&(this.words[C]=Y,this.length++),this},Q.prototype.muln=function(X){return this.clone().imuln(X)},Q.prototype.sqr=function(){return this.mul(this)},Q.prototype.isqr=function(){return this.imul(this.clone())},Q.prototype.pow=function(X){var Y=P(X);if(Y.length===0)return new Q(1);for(var C=this,J=0;J=0);var Y=X%26,C=(X-Y)/26,J=67108863>>>26-Y<<26-Y,z;if(Y!==0){var V=0;for(z=0;z>>26-Y}V&&(this.words[z]=V,this.length++)}if(C!==0){for(z=this.length-1;z>=0;z--)this.words[z+C]=this.words[z];for(z=0;z=0);var J;Y?J=(Y-Y%26)/26:J=0;var z=X%26,V=Math.min((X-z)/26,this.length),K=67108863^67108863>>>z<V)for(this.length-=V,G=0;G=0&&(j!==0||G>=J);G--){var A=this.words[G]|0;this.words[G]=j<<26-z|A>>>z,j=A&K}return $&&j!==0&&($.words[$.length++]=j),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},Q.prototype.ishrn=function(X,Y,C){return H(this.negative===0),this.iushrn(X,Y,C)},Q.prototype.shln=function(X){return this.clone().ishln(X)},Q.prototype.ushln=function(X){return this.clone().iushln(X)},Q.prototype.shrn=function(X){return this.clone().ishrn(X)},Q.prototype.ushrn=function(X){return this.clone().iushrn(X)},Q.prototype.testn=function(X){H(typeof X=="number"&&X>=0);var Y=X%26,C=(X-Y)/26,J=1<=0);var Y=X%26,C=(X-Y)/26;if(H(this.negative===0,"imaskn works only with positive numbers"),this.length<=C)return this;if(Y!==0&&C++,this.length=Math.min(C,this.length),Y!==0){var J=67108863^67108863>>>Y<=67108864;Y++)this.words[Y]-=67108864,Y===this.length-1?this.words[Y+1]=1:this.words[Y+1]++;return this.length=Math.max(this.length,Y+1),this},Q.prototype.isubn=function(X){if(H(typeof X=="number"),H(X<67108864),X<0)return this.iaddn(-X);if(this.negative!==0)return this.negative=0,this.iaddn(X),this.negative=1,this;if(this.words[0]-=X,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var Y=0;Y>26)-($/67108864|0),this.words[z+C]=V&67108863}for(;z>26,this.words[z+C]=V&67108863;if(K===0)return this.strip();for(H(K===-1),K=0,z=0;z>26,this.words[z]=V&67108863;return this.negative=1,this.strip()},Q.prototype._wordDiv=function(X,Y){var C=this.length-X.length,J=this.clone(),z=X,V=z.words[z.length-1]|0,K=this._countBits(V);C=26-K,C!==0&&(z=z.ushln(C),J.iushln(C),V=z.words[z.length-1]|0);var $=J.length-z.length,G;if(Y!=="mod"){G=new Q(null),G.length=$+1,G.words=new Array(G.length);for(var j=0;j=0;R--){var _=(J.words[z.length+R]|0)*67108864+(J.words[z.length+R-1]|0);for(_=Math.min(_/V|0,67108863),J._ishlnsubmul(z,_,R);J.negative!==0;)_--,J.negative=0,J._ishlnsubmul(z,1,R),J.isZero()||(J.negative^=1);G&&(G.words[R]=_)}return G&&G.strip(),J.strip(),Y!=="div"&&C!==0&&J.iushrn(C),{div:G||null,mod:J}},Q.prototype.divmod=function(X,Y,C){if(H(!X.isZero()),this.isZero())return{div:new Q(0),mod:new Q(0)};var J,z,V;return this.negative!==0&&X.negative===0?(V=this.neg().divmod(X,Y),Y!=="mod"&&(J=V.div.neg()),Y!=="div"&&(z=V.mod.neg(),C&&z.negative!==0&&z.iadd(X)),{div:J,mod:z}):this.negative===0&&X.negative!==0?(V=this.divmod(X.neg(),Y),Y!=="mod"&&(J=V.div.neg()),{div:J,mod:V.mod}):(this.negative&X.negative)!==0?(V=this.neg().divmod(X.neg(),Y),Y!=="div"&&(z=V.mod.neg(),C&&z.negative!==0&&z.isub(X)),{div:V.div,mod:z}):X.length>this.length||this.cmp(X)<0?{div:new Q(0),mod:this}:X.length===1?Y==="div"?{div:this.divn(X.words[0]),mod:null}:Y==="mod"?{div:null,mod:new Q(this.modn(X.words[0]))}:{div:this.divn(X.words[0]),mod:new Q(this.modn(X.words[0]))}:this._wordDiv(X,Y)},Q.prototype.div=function(X){return this.divmod(X,"div",!1).div},Q.prototype.mod=function(X){return this.divmod(X,"mod",!1).mod},Q.prototype.umod=function(X){return this.divmod(X,"mod",!0).mod},Q.prototype.divRound=function(X){var Y=this.divmod(X);if(Y.mod.isZero())return Y.div;var C=Y.div.negative!==0?Y.mod.isub(X):Y.mod,J=X.ushrn(1),z=X.andln(1),V=C.cmp(J);return V<0||z===1&&V===0?Y.div:Y.div.negative!==0?Y.div.isubn(1):Y.div.iaddn(1)},Q.prototype.modn=function(X){H(X<=67108863);for(var Y=(1<<26)%X,C=0,J=this.length-1;J>=0;J--)C=(Y*C+(this.words[J]|0))%X;return C},Q.prototype.idivn=function(X){H(X<=67108863);for(var Y=0,C=this.length-1;C>=0;C--){var J=(this.words[C]|0)+Y*67108864;this.words[C]=J/X|0,Y=J%X}return this.strip()},Q.prototype.divn=function(X){return this.clone().idivn(X)},Q.prototype.egcd=function(X){H(X.negative===0),H(!X.isZero());var Y=this,C=X.clone();Y.negative!==0?Y=Y.umod(X):Y=Y.clone();for(var J=new Q(1),z=new Q(0),V=new Q(0),K=new Q(1),$=0;Y.isEven()&&C.isEven();)Y.iushrn(1),C.iushrn(1),++$;for(var G=C.clone(),j=Y.clone();!Y.isZero();){for(var A=0,R=1;(Y.words[0]&R)===0&&A<26;++A,R<<=1);if(A>0)for(Y.iushrn(A);A-- >0;)(J.isOdd()||z.isOdd())&&(J.iadd(G),z.isub(j)),J.iushrn(1),z.iushrn(1);for(var _=0,s=1;(C.words[0]&s)===0&&_<26;++_,s<<=1);if(_>0)for(C.iushrn(_);_-- >0;)(V.isOdd()||K.isOdd())&&(V.iadd(G),K.isub(j)),V.iushrn(1),K.iushrn(1);Y.cmp(C)>=0?(Y.isub(C),J.isub(V),z.isub(K)):(C.isub(Y),V.isub(J),K.isub(z))}return{a:V,b:K,gcd:C.iushln($)}},Q.prototype._invmp=function(X){H(X.negative===0),H(!X.isZero());var Y=this,C=X.clone();Y.negative!==0?Y=Y.umod(X):Y=Y.clone();for(var J=new Q(1),z=new Q(0),V=C.clone();Y.cmpn(1)>0&&C.cmpn(1)>0;){for(var K=0,$=1;(Y.words[0]&$)===0&&K<26;++K,$<<=1);if(K>0)for(Y.iushrn(K);K-- >0;)J.isOdd()&&J.iadd(V),J.iushrn(1);for(var G=0,j=1;(C.words[0]&j)===0&&G<26;++G,j<<=1);if(G>0)for(C.iushrn(G);G-- >0;)z.isOdd()&&z.iadd(V),z.iushrn(1);Y.cmp(C)>=0?(Y.isub(C),J.isub(z)):(C.isub(Y),z.isub(J))}var A;return Y.cmpn(1)===0?A=J:A=z,A.cmpn(0)<0&&A.iadd(X),A},Q.prototype.gcd=function(X){if(this.isZero())return X.abs();if(X.isZero())return this.abs();var Y=this.clone(),C=X.clone();Y.negative=0,C.negative=0;for(var J=0;Y.isEven()&&C.isEven();J++)Y.iushrn(1),C.iushrn(1);do{for(;Y.isEven();)Y.iushrn(1);for(;C.isEven();)C.iushrn(1);var z=Y.cmp(C);if(z<0){var V=Y;Y=C,C=V}else if(z===0||C.cmpn(1)===0)break;Y.isub(C)}while(!0);return C.iushln(J)},Q.prototype.invm=function(X){return this.egcd(X).a.umod(X)},Q.prototype.isEven=function(){return(this.words[0]&1)===0},Q.prototype.isOdd=function(){return(this.words[0]&1)===1},Q.prototype.andln=function(X){return this.words[0]&X},Q.prototype.bincn=function(X){H(typeof X=="number");var Y=X%26,C=(X-Y)/26,J=1<>>26,K&=67108863,this.words[V]=K}return z!==0&&(this.words[V]=z,this.length++),this},Q.prototype.isZero=function(){return this.length===1&&this.words[0]===0},Q.prototype.cmpn=function(X){var Y=X<0;if(this.negative!==0&&!Y)return-1;if(this.negative===0&&Y)return 1;this.strip();var C;if(this.length>1)C=1;else{Y&&(X=-X),H(X<=67108863,"Number is too big");var J=this.words[0]|0;C=J===X?0:JX.length)return 1;if(this.length=0;C--){var J=this.words[C]|0,z=X.words[C]|0;if(J!==z){Jz&&(Y=1);break}}return Y},Q.prototype.gtn=function(X){return this.cmpn(X)===1},Q.prototype.gt=function(X){return this.cmp(X)===1},Q.prototype.gten=function(X){return this.cmpn(X)>=0},Q.prototype.gte=function(X){return this.cmp(X)>=0},Q.prototype.ltn=function(X){return this.cmpn(X)===-1},Q.prototype.lt=function(X){return this.cmp(X)===-1},Q.prototype.lten=function(X){return this.cmpn(X)<=0},Q.prototype.lte=function(X){return this.cmp(X)<=0},Q.prototype.eqn=function(X){return this.cmpn(X)===0},Q.prototype.eq=function(X){return this.cmp(X)===0},Q.red=function(X){return new a(X)},Q.prototype.toRed=function(X){return H(!this.red,"Already a number in reduction context"),H(this.negative===0,"red works only with positives"),X.convertTo(this)._forceRed(X)},Q.prototype.fromRed=function(){return H(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},Q.prototype._forceRed=function(X){return this.red=X,this},Q.prototype.forceRed=function(X){return H(!this.red,"Already a number in reduction context"),this._forceRed(X)},Q.prototype.redAdd=function(X){return H(this.red,"redAdd works only with red numbers"),this.red.add(this,X)},Q.prototype.redIAdd=function(X){return H(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,X)},Q.prototype.redSub=function(X){return H(this.red,"redSub works only with red numbers"),this.red.sub(this,X)},Q.prototype.redISub=function(X){return H(this.red,"redISub works only with red numbers"),this.red.isub(this,X)},Q.prototype.redShl=function(X){return H(this.red,"redShl works only with red numbers"),this.red.shl(this,X)},Q.prototype.redMul=function(X){return H(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.mul(this,X)},Q.prototype.redIMul=function(X){return H(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.imul(this,X)},Q.prototype.redSqr=function(){return H(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},Q.prototype.redISqr=function(){return H(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},Q.prototype.redSqrt=function(){return H(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},Q.prototype.redInvm=function(){return H(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},Q.prototype.redNeg=function(){return H(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},Q.prototype.redPow=function(X){return H(this.red&&!X.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,X)};var m={k256:null,p224:null,p192:null,p25519:null};function c(X,Y){this.name=X,this.p=new Q(Y,16),this.n=this.p.bitLength(),this.k=new Q(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}c.prototype._tmp=function(){var X=new Q(null);return X.words=new Array(Math.ceil(this.n/13)),X},c.prototype.ireduce=function(X){var Y=X,C;do this.split(Y,this.tmp),Y=this.imulK(Y),Y=Y.iadd(this.tmp),C=Y.bitLength();while(C>this.n);var J=C0?Y.isub(this.p):Y.strip!==void 0?Y.strip():Y._strip(),Y},c.prototype.split=function(X,Y){X.iushrn(this.n,0,Y)},c.prototype.imulK=function(X){return X.imul(this.k)};function l(){c.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}k(l,c),l.prototype.split=function(X,Y){for(var C=4194303,J=Math.min(X.length,9),z=0;z>>22,V=K}V>>>=22,X.words[z-10]=V,V===0&&X.length>10?X.length-=10:X.length-=9},l.prototype.imulK=function(X){X.words[X.length]=0,X.words[X.length+1]=0,X.length+=2;for(var Y=0,C=0;C>>=26,X.words[C]=z,Y=J}return Y!==0&&(X.words[X.length++]=Y),X},Q._prime=function(X){if(m[X])return m[X];var Y;if(X==="k256")Y=new l;else if(X==="p224")Y=new n;else if(X==="p192")Y=new i;else if(X==="p25519")Y=new C0;else throw new Error("Unknown prime "+X);return m[X]=Y,Y};function a(X){if(typeof X=="string"){var Y=Q._prime(X);this.m=Y.p,this.prime=Y}else H(X.gtn(1),"modulus must be greater than 1"),this.m=X,this.prime=null}a.prototype._verify1=function(X){H(X.negative===0,"red works only with positives"),H(X.red,"red works only with red numbers")},a.prototype._verify2=function(X,Y){H((X.negative|Y.negative)===0,"red works only with positives"),H(X.red&&X.red===Y.red,"red works only with red numbers")},a.prototype.imod=function(X){return this.prime?this.prime.ireduce(X)._forceRed(this):X.umod(this.m)._forceRed(this)},a.prototype.neg=function(X){return X.isZero()?X.clone():this.m.sub(X)._forceRed(this)},a.prototype.add=function(X,Y){this._verify2(X,Y);var C=X.add(Y);return C.cmp(this.m)>=0&&C.isub(this.m),C._forceRed(this)},a.prototype.iadd=function(X,Y){this._verify2(X,Y);var C=X.iadd(Y);return C.cmp(this.m)>=0&&C.isub(this.m),C},a.prototype.sub=function(X,Y){this._verify2(X,Y);var C=X.sub(Y);return C.cmpn(0)<0&&C.iadd(this.m),C._forceRed(this)},a.prototype.isub=function(X,Y){this._verify2(X,Y);var C=X.isub(Y);return C.cmpn(0)<0&&C.iadd(this.m),C},a.prototype.shl=function(X,Y){return this._verify1(X),this.imod(X.ushln(Y))},a.prototype.imul=function(X,Y){return this._verify2(X,Y),this.imod(X.imul(Y))},a.prototype.mul=function(X,Y){return this._verify2(X,Y),this.imod(X.mul(Y))},a.prototype.isqr=function(X){return this.imul(X,X.clone())},a.prototype.sqr=function(X){return this.mul(X,X)},a.prototype.sqrt=function(X){if(X.isZero())return X.clone();var Y=this.m.andln(3);if(H(Y%2===1),Y===3){var C=this.m.add(new Q(1)).iushrn(2);return this.pow(X,C)}for(var J=this.m.subn(1),z=0;!J.isZero()&&J.andln(1)===0;)z++,J.iushrn(1);H(!J.isZero());var V=new Q(1).toRed(this),K=V.redNeg(),$=this.m.subn(1).iushrn(1),G=this.m.bitLength();for(G=new Q(2*G*G).toRed(this);this.pow(G,$).cmp(K)!==0;)G.redIAdd(K);for(var j=this.pow(G,J),A=this.pow(X,J.addn(1).iushrn(1)),R=this.pow(X,J),_=z;R.cmp(V)!==0;){for(var s=R,r=0;s.cmp(V)!==0;r++)s=s.redSqr();H(r<_);var Y0=this.pow(j,new Q(1).iushln(_-r-1));A=A.redMul(Y0),j=Y0.redSqr(),R=R.redMul(j),_=r}return A},a.prototype.invm=function(X){var Y=X._invmp(this.m);return Y.negative!==0?(Y.negative=0,this.imod(Y).redNeg()):this.imod(Y)},a.prototype.pow=function(X,Y){if(Y.isZero())return new Q(1).toRed(this);if(Y.cmpn(1)===0)return X.clone();var C=4,J=new Array(1<=0;z--){for(var j=Y.words[z],A=G-1;A>=0;A--){var R=j>>A&1;if(V!==J[0]&&(V=this.sqr(V)),R===0&&K===0){$=0;continue}K<<=1,K|=R,$++,!($!==C&&(z!==0||A!==0))&&(V=this.mul(V,J[K]),$=0,K=0)}G=26}return V},a.prototype.convertTo=function(X){var Y=X.umod(this.m);return Y===X?Y.clone():Y},a.prototype.convertFrom=function(X){var Y=X.clone();return Y.red=null,Y},Q.mont=function(X){return new K0(X)};function K0(X){a.call(this,X),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new Q(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)}k(K0,a),K0.prototype.convertTo=function(X){return this.imod(X.ushln(this.shift))},K0.prototype.convertFrom=function(X){var Y=this.imod(X.mul(this.rinv));return Y.red=null,Y},K0.prototype.imul=function(X,Y){if(X.isZero()||Y.isZero())return X.words[0]=0,X.length=1,X;var C=X.imul(Y),J=C.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),z=C.isub(J).iushrn(this.shift),V=z;return z.cmp(this.m)>=0?V=z.isub(this.m):z.cmpn(0)<0&&(V=z.iadd(this.m)),V._forceRed(this)},K0.prototype.mul=function(X,Y){if(X.isZero()||Y.isZero())return new Q(0)._forceRed(this);var C=X.mul(Y),J=C.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),z=C.isub(J).iushrn(this.shift),V=z;return z.cmp(this.m)>=0?V=z.isub(this.m):z.cmpn(0)<0&&(V=z.iadd(this.m)),V._forceRed(this)},K0.prototype.invm=function(X){var Y=this.imod(X._invmp(this.m).mul(this.r2));return Y._forceRed(this)}})(typeof I>"u"||I,E)}),E8=$0(()=>{}),g1=$0((E,I)=>{var F;I.exports=function(k){return F||(F=new L(null)),F.generate(k)};function L(k){this.rand=k}if(I.exports.Rand=L,L.prototype.generate=function(k){return this._rand(k)},L.prototype._rand=function(k){if(this.rand.getBytes)return this.rand.getBytes(k);for(var Q=new Uint8Array(k),O=0;O{var F=R8(),L=g1();function H(k){this.rand=k||new L.Rand}I.exports=H,H.create=function(k){return new H(k)},H.prototype._randbelow=function(k){var Q=k.bitLength(),O=Math.ceil(Q/8);do var N=new F(this.rand.generate(O));while(N.cmp(k)>=0);return N},H.prototype._randrange=function(k,Q){var O=Q.sub(k);return k.add(this._randbelow(O))},H.prototype.test=function(k,Q,O){var N=k.bitLength(),U=F.mont(k),W=new F(1).toRed(U);Q||(Q=Math.max(1,N/48|0));for(var Z=k.subn(1),T=0;!Z.testn(T);T++);for(var B=k.shrn(T),P=Z.toRed(U),q=!0;Q>0;Q--){var x=this._randrange(new F(2),Z);O&&O(x);var w=x.toRed(U).redPow(B);if(!(w.cmp(W)===0||w.cmp(P)===0)){for(var M=1;M0;Q--){var P=this._randrange(new F(2),W),q=k.gcd(P);if(q.cmpn(1)!==0)return q;var x=P.toRed(N).redPow(T);if(!(x.cmp(U)===0||x.cmp(B)===0)){for(var w=1;w{var F=_2();I.exports=l,l.simpleSieve=m,l.fermatTest=c;var L=u5(),H=new L(24),k=s5(),Q=new k,O=new L(1),N=new L(2),U=new L(5),W=new L(16),Z=new L(8),T=new L(10),B=new L(3),P=new L(7),q=new L(11),x=new L(4),w=new L(12),M=null;function y(){if(M!==null)return M;var n=1048576,i=[];i[0]=2;for(var C0=1,a=3;an;)C0.ishrn(1);if(C0.isEven()&&C0.iadd(O),C0.testn(1)||C0.iadd(N),i.cmp(N)){if(!i.cmp(U))for(;C0.mod(T).cmp(B);)C0.iadd(x)}else for(;C0.mod(H).cmp(q);)C0.iadd(x);if(a=C0.shrn(1),m(a)&&m(C0)&&c(a)&&c(C0)&&Q.test(a)&&Q.test(C0))return C0}}}),x8=$0((E,I)=>{I.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}}),v8=$0((E,I)=>{var F=u5(),L=s5(),H=new L,k=new F(24),Q=new F(11),O=new F(10),N=new F(3),U=new F(7),W=f5(),Z=_2();I.exports=x;function T(M,y){return y=y||"utf8",Buffer.isBuffer(M)||(M=new Buffer(M,y)),this._pub=new F(M),this}function B(M,y){return y=y||"utf8",Buffer.isBuffer(M)||(M=new Buffer(M,y)),this._priv=new F(M),this}var P={};function q(M,y){var m=y.toString("hex"),c=[m,M.toString(16)].join("_");if(c in P)return P[c];var l=0;if(M.isEven()||!W.simpleSieve||!W.fermatTest(M)||!H.test(M))return l+=1,m==="02"||m==="05"?l+=8:l+=4,P[c]=l,l;H.test(M.shrn(1))||(l+=2);var n;switch(m){case"02":M.mod(k).cmp(Q)&&(l+=8);break;case"05":n=M.mod(O),n.cmp(N)&&n.cmp(U)&&(l+=8);break;default:l+=4}return P[c]=l,l}function x(M,y,m){this.setGenerator(y),this.__prime=new F(M),this._prime=F.mont(this.__prime),this._primeLen=M.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,m?(this.setPublicKey=T,this.setPrivateKey=B):this._primeCode=8}Object.defineProperty(x.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=q(this.__prime,this.__gen)),this._primeCode}}),x.prototype.generateKeys=function(){return this._priv||(this._priv=new F(Z(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},x.prototype.computeSecret=function(M){M=new F(M),M=M.toRed(this._prime);var y=M.redPow(this._priv).fromRed(),m=new Buffer(y.toArray()),c=this.getPrime();if(m.length{var I=f5(),F=x8(),L=v8();function H(O){var N=new Buffer(F[O].prime,"hex"),U=new Buffer(F[O].gen,"hex");return new L(N,U)}var k={binary:!0,hex:!0,base64:!0};function Q(O,N,U,W){return Buffer.isBuffer(N)||k[N]===void 0?Q(O,"binary",N,U):(N=N||"binary",W=W||"binary",U=U||new Buffer([2]),Buffer.isBuffer(U)||(U=new Buffer(U,W)),typeof O=="number"?new L(I(O,U),U,!0):(Buffer.isBuffer(O)||(O=new Buffer(O,N)),new L(O,U,!0)))}E.DiffieHellmanGroup=E.createDiffieHellmanGroup=E.getDiffieHellman=H,E.createDiffieHellman=E.DiffieHellman=Q}),a5=$0((E,I)=>{I.exports=E2().EventEmitter}),A8=$0((E,I)=>{function F(P,q){var x=Object.keys(P);if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(P);q&&(w=w.filter(function(M){return Object.getOwnPropertyDescriptor(P,M).enumerable})),x.push.apply(x,w)}return x}function L(P){for(var q=1;q0?this.tail.next=x:this.head=x,this.tail=x,++this.length}},{key:"unshift",value:function(q){var x={data:q,next:this.head};this.length===0&&(this.tail=x),this.head=x,++this.length}},{key:"shift",value:function(){if(this.length!==0){var q=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,q}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(q){if(this.length===0)return"";for(var x=this.head,w=""+x.data;x=x.next;)w+=q+x.data;return w}},{key:"concat",value:function(q){if(this.length===0)return U.alloc(0);for(var x=U.allocUnsafe(q>>>0),w=this.head,M=0;w;)B(w.data,x,M),M+=w.data.length,w=w.next;return x}},{key:"consume",value:function(q,x){var w;return qy.length?y.length:q;if(m===y.length?M+=y:M+=y.slice(0,q),q-=m,q===0){m===y.length?(++w,x.next?this.head=x.next:this.head=this.tail=null):(this.head=x,x.data=y.slice(m));break}++w}return this.length-=w,M}},{key:"_getBuffer",value:function(q){var x=U.allocUnsafe(q),w=this.head,M=1;for(w.data.copy(x),q-=w.data.length;w=w.next;){var y=w.data,m=q>y.length?y.length:q;if(y.copy(x,x.length-q,0,m),q-=m,q===0){m===y.length?(++M,w.next?this.head=w.next:this.head=this.tail=null):(this.head=w,w.data=y.slice(m));break}++M}return this.length-=M,x}},{key:T,value:function(q,x){return Z(this,L({},x,{depth:0,customInspect:!1}))}}]),P}()}),n5=$0((E,I)=>{function F(N,U){var W=this,Z=this._readableState&&this._readableState.destroyed,T=this._writableState&&this._writableState.destroyed;return Z||T?(U?U(N):N&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(Q,this,N)):process.nextTick(Q,this,N)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(N||null,function(B){!U&&B?W._writableState?W._writableState.errorEmitted?process.nextTick(H,W):(W._writableState.errorEmitted=!0,process.nextTick(L,W,B)):process.nextTick(L,W,B):U?(process.nextTick(H,W),U(B)):process.nextTick(H,W)}),this)}function L(N,U){Q(N,U),H(N)}function H(N){N._writableState&&!N._writableState.emitClose||N._readableState&&!N._readableState.emitClose||N.emit("close")}function k(){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 Q(N,U){N.emit("error",U)}function O(N,U){var{_readableState:W,_writableState:Z}=N;W&&W.autoDestroy||Z&&Z.autoDestroy?N.destroy(U):N.emit("error",U)}I.exports={destroy:F,undestroy:k,errorOrDestroy:O}}),c2=$0((E,I)=>{function F(U,W){U.prototype=Object.create(W.prototype),U.prototype.constructor=U,U.__proto__=W}var L={};function H(U,W,Z){Z||(Z=Error);function T(P,q,x){return typeof W=="string"?W:W(P,q,x)}var B=function(P){F(q,P);function q(x,w,M){return P.call(this,T(x,w,M))||this}return q}(Z);B.prototype.name=Z.name,B.prototype.code=U,L[U]=B}function k(U,W){if(Array.isArray(U)){var Z=U.length;return U=U.map(function(T){return String(T)}),Z>2?"one of ".concat(W," ").concat(U.slice(0,Z-1).join(", "),", or ")+U[Z-1]:Z===2?"one of ".concat(W," ").concat(U[0]," or ").concat(U[1]):"of ".concat(W," ").concat(U[0])}else return"of ".concat(W," ").concat(String(U))}function Q(U,W,Z){return U.substr(!Z||Z<0?0:+Z,W.length)===W}function O(U,W,Z){return(Z===void 0||Z>U.length)&&(Z=U.length),U.substring(Z-W.length,Z)===W}function N(U,W,Z){return typeof Z!="number"&&(Z=0),Z+W.length>U.length?!1:U.indexOf(W,Z)!==-1}H("ERR_INVALID_OPT_VALUE",function(U,W){return'The value "'+W+'" is invalid for option "'+U+'"'},TypeError),H("ERR_INVALID_ARG_TYPE",function(U,W,Z){var T;typeof W=="string"&&Q(W,"not ")?(T="must not be",W=W.replace(/^not /,"")):T="must be";var B;if(O(U," argument"))B="The ".concat(U," ").concat(T," ").concat(k(W,"type"));else{var P=N(U,".")?"property":"argument";B='The "'.concat(U,'" ').concat(P," ").concat(T," ").concat(k(W,"type"))}return B+=". Received type ".concat(typeof Z),B},TypeError),H("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),H("ERR_METHOD_NOT_IMPLEMENTED",function(U){return"The "+U+" method is not implemented"}),H("ERR_STREAM_PREMATURE_CLOSE","Premature close"),H("ERR_STREAM_DESTROYED",function(U){return"Cannot call "+U+" after a stream was destroyed"}),H("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),H("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),H("ERR_STREAM_WRITE_AFTER_END","write after end"),H("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),H("ERR_UNKNOWN_ENCODING",function(U){return"Unknown encoding: "+U},TypeError),H("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),I.exports.codes=L}),r5=$0((E,I)=>{var F=c2().codes.ERR_INVALID_OPT_VALUE;function L(k,Q,O){return k.highWaterMark!=null?k.highWaterMark:Q?k[O]:null}function H(k,Q,O,N){var U=L(Q,N,O);if(U!=null){if(!(isFinite(U)&&Math.floor(U)===U)||U<0){var W=N?O:"highWaterMark";throw new F(W,U)}return Math.floor(U)}return k.objectMode?16:16384}I.exports={getHighWaterMark:H}}),i5=$0((E,I)=>{I.exports=a;function F(o){var b=this;this.next=null,this.entry=null,this.finish=function(){Y0(b,o)}}var L;a.WritableState=i;var H={deprecate:P5()},k=a5(),Q=U2().Buffer,O=global.Uint8Array||function(){};function N(o){return Q.from(o)}function U(o){return Q.isBuffer(o)||o instanceof O}var W=n5(),Z=r5(),T=Z.getHighWaterMark,B=c2().codes,P=B.ERR_INVALID_ARG_TYPE,q=B.ERR_METHOD_NOT_IMPLEMENTED,x=B.ERR_MULTIPLE_CALLBACK,w=B.ERR_STREAM_CANNOT_PIPE,M=B.ERR_STREAM_DESTROYED,y=B.ERR_STREAM_NULL_VALUES,m=B.ERR_STREAM_WRITE_AFTER_END,c=B.ERR_UNKNOWN_ENCODING,l=W.errorOrDestroy;c0()(a,k);function n(){}function i(o,b,f){L=L||w2(),o=o||{},typeof f!="boolean"&&(f=b instanceof L),this.objectMode=!!o.objectMode,f&&(this.objectMode=this.objectMode||!!o.writableObjectMode),this.highWaterMark=T(this,o,"writableHighWaterMark",f),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var W0=o.decodeStrings===!1;this.decodeStrings=!W0,this.defaultEncoding=o.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(X0){K(b,X0)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=o.emitClose!==!1,this.autoDestroy=!!o.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new F(this)}i.prototype.getBuffer=function(){for(var o=this.bufferedRequest,b=[];o;)b.push(o),o=o.next;return b},function(){try{Object.defineProperty(i.prototype,"buffer",{get:H.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var C0;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(C0=Function.prototype[Symbol.hasInstance],Object.defineProperty(a,Symbol.hasInstance,{value:function(o){return C0.call(this,o)?!0:this!==a?!1:o&&o._writableState instanceof i}})):C0=function(o){return o instanceof this};function a(o){L=L||w2();var b=this instanceof L;if(!b&&!C0.call(a,this))return new a(o);this._writableState=new i(o,this,b),this.writable=!0,o&&(typeof o.write=="function"&&(this._write=o.write),typeof o.writev=="function"&&(this._writev=o.writev),typeof o.destroy=="function"&&(this._destroy=o.destroy),typeof o.final=="function"&&(this._final=o.final)),k.call(this)}a.prototype.pipe=function(){l(this,new w)};function K0(o,b){var f=new m;l(o,f),process.nextTick(b,f)}function X(o,b,f,W0){var X0;return f===null?X0=new y:typeof f!="string"&&!b.objectMode&&(X0=new P("chunk",["string","Buffer"],f)),X0?(l(o,X0),process.nextTick(W0,X0),!1):!0}a.prototype.write=function(o,b,f){var W0=this._writableState,X0=!1,z0=!W0.objectMode&&U(o);return z0&&!Q.isBuffer(o)&&(o=N(o)),typeof b=="function"&&(f=b,b=null),z0?b="buffer":b||(b=W0.defaultEncoding),typeof f!="function"&&(f=n),W0.ending?K0(this,f):(z0||X(this,W0,o,f))&&(W0.pendingcb++,X0=C(this,W0,z0,o,b,f)),X0},a.prototype.cork=function(){this._writableState.corked++},a.prototype.uncork=function(){var o=this._writableState;o.corked&&(o.corked--,!o.writing&&!o.corked&&!o.bufferProcessing&&o.bufferedRequest&&j(this,o))},a.prototype.setDefaultEncoding=function(o){if(typeof o=="string"&&(o=o.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((o+"").toLowerCase())>-1))throw new c(o);return this._writableState.defaultEncoding=o,this},Object.defineProperty(a.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Y(o,b,f){return!o.objectMode&&o.decodeStrings!==!1&&typeof b=="string"&&(b=Q.from(b,f)),b}Object.defineProperty(a.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function C(o,b,f,W0,X0,z0){if(!f){var g=Y(b,W0,X0);W0!==g&&(f=!0,X0="buffer",W0=g)}var v=b.objectMode?1:W0.length;b.length+=v;var p=b.length{var F=Object.keys||function(Z){var T=[];for(var B in Z)T.push(B);return T};I.exports=N;var L=t5(),H=i5();c0()(N,L);for(k=F(H.prototype),O=0;O{var F=c2().codes.ERR_STREAM_PREMATURE_CLOSE;function L(O){var N=!1;return function(){if(!N){N=!0;for(var U=arguments.length,W=new Array(U),Z=0;Z{var F;function L(y,m,c){return m in y?Object.defineProperty(y,m,{value:c,enumerable:!0,configurable:!0,writable:!0}):y[m]=c,y}var H=m1(),k=Symbol("lastResolve"),Q=Symbol("lastReject"),O=Symbol("error"),N=Symbol("ended"),U=Symbol("lastPromise"),W=Symbol("handlePromise"),Z=Symbol("stream");function T(y,m){return{value:y,done:m}}function B(y){var m=y[k];if(m!==null){var c=y[Z].read();c!==null&&(y[U]=null,y[k]=null,y[Q]=null,m(T(c,!1)))}}function P(y){process.nextTick(B,y)}function q(y,m){return function(c,l){y.then(function(){if(m[N]){c(T(void 0,!0));return}m[W](c,l)},l)}}var x=Object.getPrototypeOf(function(){}),w=Object.setPrototypeOf((F={get stream(){return this[Z]},next:function(){var y=this,m=this[O];if(m!==null)return Promise.reject(m);if(this[N])return Promise.resolve(T(void 0,!0));if(this[Z].destroyed)return new Promise(function(i,C0){process.nextTick(function(){y[O]?C0(y[O]):i(T(void 0,!0))})});var c=this[U],l;if(c)l=new Promise(q(c,this));else{var n=this[Z].read();if(n!==null)return Promise.resolve(T(n,!1));l=new Promise(this[W])}return this[U]=l,l}},L(F,Symbol.asyncIterator,function(){return this}),L(F,"return",function(){var y=this;return new Promise(function(m,c){y[Z].destroy(null,function(l){if(l){c(l);return}m(T(void 0,!0))})})}),F),x),M=function(y){var m,c=Object.create(w,(m={},L(m,Z,{value:y,writable:!0}),L(m,k,{value:null,writable:!0}),L(m,Q,{value:null,writable:!0}),L(m,O,{value:null,writable:!0}),L(m,N,{value:y._readableState.endEmitted,writable:!0}),L(m,W,{value:function(l,n){var i=c[Z].read();i?(c[U]=null,c[k]=null,c[Q]=null,l(T(i,!1))):(c[k]=l,c[Q]=n)},writable:!0}),m));return c[U]=null,H(y,function(l){if(l&&l.code!=="ERR_STREAM_PREMATURE_CLOSE"){var n=c[Q];n!==null&&(c[U]=null,c[k]=null,c[Q]=null,n(l)),c[O]=l;return}var i=c[k];i!==null&&(c[U]=null,c[k]=null,c[Q]=null,i(T(void 0,!0))),c[N]=!0}),y.on("readable",P.bind(null,c)),c};I.exports=M}),w8=$0((E,I)=>{I.exports=function(){throw new Error("Readable.from is not available in the browser")}}),t5=$0((E,I)=>{I.exports=X;var F;X.ReadableState=K0;var L=E2().EventEmitter,H=function(g,v){return g.listeners(v).length},k=a5(),Q=U2().Buffer,O=global.Uint8Array||function(){};function N(g){return Q.from(g)}function U(g){return Q.isBuffer(g)||g instanceof O}var W=C1(),Z;W&&W.debuglog?Z=W.debuglog("stream"):Z=function(){};var T=A8(),B=n5(),P=r5(),q=P.getHighWaterMark,x=c2().codes,w=x.ERR_INVALID_ARG_TYPE,M=x.ERR_STREAM_PUSH_AFTER_EOF,y=x.ERR_METHOD_NOT_IMPLEMENTED,m=x.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,c,l,n;c0()(X,k);var i=B.errorOrDestroy,C0=["error","close","destroy","pause","resume"];function a(g,v,p){if(typeof g.prependListener=="function")return g.prependListener(v,p);!g._events||!g._events[v]?g.on(v,p):Array.isArray(g._events[v])?g._events[v].unshift(p):g._events[v]=[p,g._events[v]]}function K0(g,v,p){F=F||w2(),g=g||{},typeof p!="boolean"&&(p=v instanceof F),this.objectMode=!!g.objectMode,p&&(this.objectMode=this.objectMode||!!g.readableObjectMode),this.highWaterMark=q(this,g,"readableHighWaterMark",p),this.buffer=new T,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=g.emitClose!==!1,this.autoDestroy=!!g.autoDestroy,this.destroyed=!1,this.defaultEncoding=g.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,g.encoding&&(c||(c=(G1(),W2(l2)).StringDecoder),this.decoder=new c(g.encoding),this.encoding=g.encoding)}function X(g){if(F=F||w2(),!(this instanceof X))return new X(g);var v=this instanceof F;this._readableState=new K0(g,this,v),this.readable=!0,g&&(typeof g.read=="function"&&(this._read=g.read),typeof g.destroy=="function"&&(this._destroy=g.destroy)),k.call(this)}Object.defineProperty(X.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(g){!this._readableState||(this._readableState.destroyed=g)}}),X.prototype.destroy=B.destroy,X.prototype._undestroy=B.undestroy,X.prototype._destroy=function(g,v){v(g)},X.prototype.push=function(g,v){var p=this._readableState,e;return p.objectMode?e=!0:typeof g=="string"&&(v=v||p.defaultEncoding,v!==p.encoding&&(g=Q.from(g,v),v=""),e=!0),Y(this,g,v,!1,e)},X.prototype.unshift=function(g){return Y(this,g,null,!0,!1)};function Y(g,v,p,e,G0){Z("readableAddChunk",v);var t=g._readableState;if(v===null)t.reading=!1,$(g,t);else{var y0;if(G0||(y0=J(t,v)),y0)i(g,y0);else if(t.objectMode||v&&v.length>0)if(typeof v!="string"&&!t.objectMode&&Object.getPrototypeOf(v)!==Q.prototype&&(v=N(v)),e)t.endEmitted?i(g,new m):C(g,t,v,!0);else if(t.ended)i(g,new M);else{if(t.destroyed)return!1;t.reading=!1,t.decoder&&!p?(v=t.decoder.write(v),t.objectMode||v.length!==0?C(g,t,v,!1):A(g,t)):C(g,t,v,!1)}else e||(t.reading=!1,A(g,t))}return!t.ended&&(t.length=z?g=z:(g--,g|=g>>>1,g|=g>>>2,g|=g>>>4,g|=g>>>8,g|=g>>>16,g++),g}function K(g,v){return g<=0||v.length===0&&v.ended?0:v.objectMode?1:g!==g?v.flowing&&v.length?v.buffer.head.data.length:v.length:(g>v.highWaterMark&&(v.highWaterMark=V(g)),g<=v.length?g:v.ended?v.length:(v.needReadable=!0,0))}X.prototype.read=function(g){Z("read",g),g=parseInt(g,10);var v=this._readableState,p=g;if(g!==0&&(v.emittedReadable=!1),g===0&&v.needReadable&&((v.highWaterMark!==0?v.length>=v.highWaterMark:v.length>0)||v.ended))return Z("read: emitReadable",v.length,v.ended),v.length===0&&v.ended?W0(this):G(this),null;if(g=K(g,v),g===0&&v.ended)return v.length===0&&W0(this),null;var e=v.needReadable;Z("need readable",e),(v.length===0||v.length-g0?G0=f(g,v):G0=null,G0===null?(v.needReadable=v.length<=v.highWaterMark,g=0):(v.length-=g,v.awaitDrain=0),v.length===0&&(v.ended||(v.needReadable=!0),p!==g&&v.ended&&W0(this)),G0!==null&&this.emit("data",G0),G0};function $(g,v){if(Z("onEofChunk"),!v.ended){if(v.decoder){var p=v.decoder.end();p&&p.length&&(v.buffer.push(p),v.length+=v.objectMode?1:p.length)}v.ended=!0,v.sync?G(g):(v.needReadable=!1,v.emittedReadable||(v.emittedReadable=!0,j(g)))}}function G(g){var v=g._readableState;Z("emitReadable",v.needReadable,v.emittedReadable),v.needReadable=!1,v.emittedReadable||(Z("emitReadable",v.flowing),v.emittedReadable=!0,process.nextTick(j,g))}function j(g){var v=g._readableState;Z("emitReadable_",v.destroyed,v.length,v.ended),!v.destroyed&&(v.length||v.ended)&&(g.emit("readable"),v.emittedReadable=!1),v.needReadable=!v.flowing&&!v.ended&&v.length<=v.highWaterMark,b(g)}function A(g,v){v.readingMore||(v.readingMore=!0,process.nextTick(R,g,v))}function R(g,v){for(;!v.reading&&!v.ended&&(v.length1&&z0(e.pipes,g)!==-1)&&!_0&&(Z("false write response, pause",e.awaitDrain),e.awaitDrain++),p.pause())}function b0(h){Z("onerror",h),d(),g.removeListener("error",b0),H(g,"error")===0&&i(g,h)}a(g,"error",b0);function D(){g.removeListener("finish",S),d()}g.once("close",D);function S(){Z("onfinish"),g.removeListener("close",D),d()}g.once("finish",S);function d(){Z("unpipe"),p.unpipe(g)}return g.emit("pipe",p),e.flowing||(Z("pipe resume"),p.resume()),g};function _(g){return function(){var v=g._readableState;Z("pipeOnDrain",v.awaitDrain),v.awaitDrain&&v.awaitDrain--,v.awaitDrain===0&&H(g,"data")&&(v.flowing=!0,b(g))}}X.prototype.unpipe=function(g){var v=this._readableState,p={hasUnpiped:!1};if(v.pipesCount===0)return this;if(v.pipesCount===1)return g&&g!==v.pipes?this:(g||(g=v.pipes),v.pipes=null,v.pipesCount=0,v.flowing=!1,g&&g.emit("unpipe",this,p),this);if(!g){var{pipes:e,pipesCount:G0}=v;v.pipes=null,v.pipesCount=0,v.flowing=!1;for(var t=0;t0,e.flowing!==!1&&this.resume()):g==="readable"&&!e.endEmitted&&!e.readableListening&&(e.readableListening=e.needReadable=!0,e.flowing=!1,e.emittedReadable=!1,Z("on readable",e.length,e.reading),e.length?G(this):e.reading||process.nextTick(r,this)),p},X.prototype.addListener=X.prototype.on,X.prototype.removeListener=function(g,v){var p=k.prototype.removeListener.call(this,g,v);return g==="readable"&&process.nextTick(s,this),p},X.prototype.removeAllListeners=function(g){var v=k.prototype.removeAllListeners.apply(this,arguments);return(g==="readable"||g===void 0)&&process.nextTick(s,this),v};function s(g){var v=g._readableState;v.readableListening=g.listenerCount("readable")>0,v.resumeScheduled&&!v.paused?v.flowing=!0:g.listenerCount("data")>0&&g.resume()}function r(g){Z("readable nexttick read 0"),g.read(0)}X.prototype.resume=function(){var g=this._readableState;return g.flowing||(Z("resume"),g.flowing=!g.readableListening,Y0(this,g)),g.paused=!1,this};function Y0(g,v){v.resumeScheduled||(v.resumeScheduled=!0,process.nextTick(o,g,v))}function o(g,v){Z("resume",v.reading),v.reading||g.read(0),v.resumeScheduled=!1,g.emit("resume"),b(g),v.flowing&&!v.reading&&g.read(0)}X.prototype.pause=function(){return Z("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Z("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function b(g){var v=g._readableState;for(Z("flow",v.flowing);v.flowing&&g.read()!==null;);}X.prototype.wrap=function(g){var v=this,p=this._readableState,e=!1;g.on("end",function(){if(Z("wrapped end"),p.decoder&&!p.ended){var y0=p.decoder.end();y0&&y0.length&&v.push(y0)}v.push(null)}),g.on("data",function(y0){if(Z("wrapped data"),p.decoder&&(y0=p.decoder.write(y0)),!(p.objectMode&&y0==null)&&!(!p.objectMode&&(!y0||!y0.length))){var Q0=v.push(y0);Q0||(e=!0,g.pause())}});for(var G0 in g)this[G0]===void 0&&typeof g[G0]=="function"&&(this[G0]=function(y0){return function(){return g[y0].apply(g,arguments)}}(G0));for(var t=0;t=v.length?(v.decoder?p=v.buffer.join(""):v.buffer.length===1?p=v.buffer.first():p=v.buffer.concat(v.length),v.buffer.clear()):p=v.buffer.consume(g,v.decoder),p}function W0(g){var v=g._readableState;Z("endReadable",v.endEmitted),v.endEmitted||(v.ended=!0,process.nextTick(X0,v,g))}function X0(g,v){if(Z("endReadableNT",g.endEmitted,g.length),!g.endEmitted&&g.length===0&&(g.endEmitted=!0,v.readable=!1,v.emit("end"),g.autoDestroy)){var p=v._writableState;(!p||p.autoDestroy&&p.finished)&&v.destroy()}}typeof Symbol=="function"&&(X.from=function(g,v){return n===void 0&&(n=w8()),n(X,g,v)});function z0(g,v){for(var p=0,e=g.length;p{I.exports=U;var F=c2().codes,L=F.ERR_METHOD_NOT_IMPLEMENTED,H=F.ERR_MULTIPLE_CALLBACK,k=F.ERR_TRANSFORM_ALREADY_TRANSFORMING,Q=F.ERR_TRANSFORM_WITH_LENGTH_0,O=w2();c0()(U,O);function N(T,B){var P=this._transformState;P.transforming=!1;var q=P.writecb;if(q===null)return this.emit("error",new H);P.writechunk=null,P.writecb=null,B!=null&&this.push(B),q(T);var x=this._readableState;x.reading=!1,(x.needReadable||x.length{I.exports=L;var F=e5();c0()(L,F);function L(H){if(!(this instanceof L))return new L(H);F.call(this,H)}L.prototype._transform=function(H,k,Q){Q(null,H)}}),_8=$0((E,I)=>{var F;function L(P){var q=!1;return function(){q||(q=!0,P.apply(void 0,arguments))}}var H=c2().codes,k=H.ERR_MISSING_ARGS,Q=H.ERR_STREAM_DESTROYED;function O(P){if(P)throw P}function N(P){return P.setHeader&&typeof P.abort=="function"}function U(P,q,x,w){w=L(w);var M=!1;P.on("close",function(){M=!0}),F===void 0&&(F=m1()),F(P,{readable:q,writable:x},function(m){if(m)return w(m);M=!0,w()});var y=!1;return function(m){if(!M&&!y){if(y=!0,N(P))return P.abort();if(typeof P.destroy=="function")return P.destroy();w(m||new Q("pipe"))}}}function W(P){P()}function Z(P,q){return P.pipe(q)}function T(P){return!P.length||typeof P[P.length-1]!="function"?O:P.pop()}function B(){for(var P=arguments.length,q=new Array(P),x=0;x0;return U(m,l,n,function(i){M||(M=i),i&&y.forEach(W),!l&&(y.forEach(W),w(M))})});return q.reduce(Z)}I.exports=B}),g8=$0((E,I)=>{E=I.exports=t5(),E.Stream=E,E.Readable=E,E.Writable=i5(),E.Duplex=w2(),E.Transform=e5(),E.PassThrough=y8(),E.finished=m1(),E.pipeline=_8()}),p1=$0((E,I)=>{(function(F,L){function H(J,z){if(!J)throw new Error(z||"Assertion failed")}function k(J,z){J.super_=z;var V=function(){};V.prototype=z.prototype,J.prototype=new V,J.prototype.constructor=J}function Q(J,z,V){if(Q.isBN(J))return J;this.negative=0,this.words=null,this.length=0,this.red=null,J!==null&&((z==="le"||z==="be")&&(V=z,z=10),this._init(J||0,z||10,V||"be"))}typeof F=="object"?F.exports=Q:L.BN=Q,Q.BN=Q,Q.wordSize=26;var O;try{typeof window<"u"&&typeof window.Buffer<"u"?O=window.Buffer:O=A2().Buffer}catch{}Q.isBN=function(J){return J instanceof Q?!0:J!==null&&typeof J=="object"&&J.constructor.wordSize===Q.wordSize&&Array.isArray(J.words)},Q.max=function(J,z){return J.cmp(z)>0?J:z},Q.min=function(J,z){return J.cmp(z)<0?J:z},Q.prototype._init=function(J,z,V){if(typeof J=="number")return this._initNumber(J,z,V);if(typeof J=="object")return this._initArray(J,z,V);z==="hex"&&(z=16),H(z===(z|0)&&z>=2&&z<=36),J=J.toString().replace(/\s+/g,"");var K=0;J[0]==="-"&&(K++,this.negative=1),K=0;K-=3)G=J[K]|J[K-1]<<8|J[K-2]<<16,this.words[$]|=G<>>26-j&67108863,j+=24,j>=26&&(j-=26,$++);else if(V==="le")for(K=0,$=0;K>>26-j&67108863,j+=24,j>=26&&(j-=26,$++);return this._strip()};function N(J,z){var V=J.charCodeAt(z);if(V>=48&&V<=57)return V-48;if(V>=65&&V<=70)return V-55;if(V>=97&&V<=102)return V-87;H(!1,"Invalid character in "+J)}function U(J,z,V){var K=N(J,V);return V-1>=z&&(K|=N(J,V-1)<<4),K}Q.prototype._parseHex=function(J,z,V){this.length=Math.ceil((J.length-z)/6),this.words=new Array(this.length);for(var K=0;K=z;K-=2)j=U(J,z,K)<<$,this.words[G]|=j&67108863,$>=18?($-=18,G+=1,this.words[G]|=j>>>26):$+=8;else{var A=J.length-z;for(K=A%2===0?z+1:z;K=18?($-=18,G+=1,this.words[G]|=j>>>26):$+=8}this._strip()};function W(J,z,V,K){for(var $=0,G=0,j=Math.min(J.length,V),A=z;A=49?G=R-49+10:R>=17?G=R-17+10:G=R,H(R>=0&&G1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},Q.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{Q.prototype[Symbol.for("nodejs.util.inspect.custom")]=T}catch{Q.prototype.inspect=T}else Q.prototype.inspect=T;function T(){return(this.red?""}var B=["","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"],P=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],q=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];Q.prototype.toString=function(J,z){J=J||10,z=z|0||1;var V;if(J===16||J==="hex"){V="";for(var K=0,$=0,G=0;G>>24-K&16777215,K+=2,K>=26&&(K-=26,G--),$!==0||G!==this.length-1?V=B[6-A.length]+A+V:V=A+V}for($!==0&&(V=$.toString(16)+V);V.length%z!==0;)V="0"+V;return this.negative!==0&&(V="-"+V),V}if(J===(J|0)&&J>=2&&J<=36){var R=P[J],_=q[J];V="";var s=this.clone();for(s.negative=0;!s.isZero();){var r=s.modrn(_).toString(J);s=s.idivn(_),s.isZero()?V=r+V:V=B[R-r.length]+r+V}for(this.isZero()&&(V="0"+V);V.length%z!==0;)V="0"+V;return this.negative!==0&&(V="-"+V),V}H(!1,"Base should be between 2 and 36")},Q.prototype.toNumber=function(){var J=this.words[0];return this.length===2?J+=this.words[1]*67108864:this.length===3&&this.words[2]===1?J+=4503599627370496+this.words[1]*67108864:this.length>2&&H(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-J:J},Q.prototype.toJSON=function(){return this.toString(16,2)},O&&(Q.prototype.toBuffer=function(J,z){return this.toArrayLike(O,J,z)}),Q.prototype.toArray=function(J,z){return this.toArrayLike(Array,J,z)};var x=function(J,z){return J.allocUnsafe?J.allocUnsafe(z):new J(z)};Q.prototype.toArrayLike=function(J,z,V){this._strip();var K=this.byteLength(),$=V||Math.max(1,K);H(K<=$,"byte array longer than desired length"),H($>0,"Requested array length <= 0");var G=x(J,$),j=z==="le"?"LE":"BE";return this["_toArrayLike"+j](G,K),G},Q.prototype._toArrayLikeLE=function(J,z){for(var V=0,K=0,$=0,G=0;$>8&255),V>16&255),G===6?(V>24&255),K=0,G=0):(K=j>>>24,G+=2)}if(V=0&&(J[V--]=j>>8&255),V>=0&&(J[V--]=j>>16&255),G===6?(V>=0&&(J[V--]=j>>24&255),K=0,G=0):(K=j>>>24,G+=2)}if(V>=0)for(J[V--]=K;V>=0;)J[V--]=0},Math.clz32?Q.prototype._countBits=function(J){return 32-Math.clz32(J)}:Q.prototype._countBits=function(J){var z=J,V=0;return z>=4096&&(V+=13,z>>>=13),z>=64&&(V+=7,z>>>=7),z>=8&&(V+=4,z>>>=4),z>=2&&(V+=2,z>>>=2),V+z},Q.prototype._zeroBits=function(J){if(J===0)return 26;var z=J,V=0;return(z&8191)===0&&(V+=13,z>>>=13),(z&127)===0&&(V+=7,z>>>=7),(z&15)===0&&(V+=4,z>>>=4),(z&3)===0&&(V+=2,z>>>=2),(z&1)===0&&V++,V},Q.prototype.bitLength=function(){var J=this.words[this.length-1],z=this._countBits(J);return(this.length-1)*26+z};function w(J){for(var z=new Array(J.bitLength()),V=0;V>>$&1}return z}Q.prototype.zeroBits=function(){if(this.isZero())return 0;for(var J=0,z=0;zJ.length?this.clone().ior(J):J.clone().ior(this)},Q.prototype.uor=function(J){return this.length>J.length?this.clone().iuor(J):J.clone().iuor(this)},Q.prototype.iuand=function(J){var z;this.length>J.length?z=J:z=this;for(var V=0;VJ.length?this.clone().iand(J):J.clone().iand(this)},Q.prototype.uand=function(J){return this.length>J.length?this.clone().iuand(J):J.clone().iuand(this)},Q.prototype.iuxor=function(J){var z,V;this.length>J.length?(z=this,V=J):(z=J,V=this);for(var K=0;KJ.length?this.clone().ixor(J):J.clone().ixor(this)},Q.prototype.uxor=function(J){return this.length>J.length?this.clone().iuxor(J):J.clone().iuxor(this)},Q.prototype.inotn=function(J){H(typeof J=="number"&&J>=0);var z=Math.ceil(J/26)|0,V=J%26;this._expand(z),V>0&&z--;for(var K=0;K0&&(this.words[K]=~this.words[K]&67108863>>26-V),this._strip()},Q.prototype.notn=function(J){return this.clone().inotn(J)},Q.prototype.setn=function(J,z){H(typeof J=="number"&&J>=0);var V=J/26|0,K=J%26;return this._expand(V+1),z?this.words[V]=this.words[V]|1<J.length?(V=this,K=J):(V=J,K=this);for(var $=0,G=0;G>>26;for(;$!==0&&G>>26;if(this.length=V.length,$!==0)this.words[this.length]=$,this.length++;else if(V!==this)for(;GJ.length?this.clone().iadd(J):J.clone().iadd(this)},Q.prototype.isub=function(J){if(J.negative!==0){J.negative=0;var z=this.iadd(J);return J.negative=1,z._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(J),this.negative=1,this._normSign();var V=this.cmp(J);if(V===0)return this.negative=0,this.length=1,this.words[0]=0,this;var K,$;V>0?(K=this,$=J):(K=J,$=this);for(var G=0,j=0;j<$.length;j++)z=(K.words[j]|0)-($.words[j]|0)+G,G=z>>26,this.words[j]=z&67108863;for(;G!==0&&j>26,this.words[j]=z&67108863;if(G===0&&j>>26,r=R&67108863,Y0=Math.min(_,z.length-1),o=Math.max(0,_-J.length+1);o<=Y0;o++){var b=_-o|0;$=J.words[b]|0,G=z.words[o]|0,j=$*G+r,s+=j/67108864|0,r=j&67108863}V.words[_]=r|0,R=s|0}return R!==0?V.words[_]=R|0:V.length--,V._strip()}var y=function(J,z,V){var K=J.words,$=z.words,G=V.words,j=0,A,R,_,s=K[0]|0,r=s&8191,Y0=s>>>13,o=K[1]|0,b=o&8191,f=o>>>13,W0=K[2]|0,X0=W0&8191,z0=W0>>>13,g=K[3]|0,v=g&8191,p=g>>>13,e=K[4]|0,G0=e&8191,t=e>>>13,y0=K[5]|0,Q0=y0&8191,V0=y0>>>13,_0=K[6]|0,F0=_0&8191,Z0=_0>>>13,b0=K[7]|0,D=b0&8191,S=b0>>>13,d=K[8]|0,h=d&8191,u=d>>>13,P0=K[9]|0,J0=P0&8191,H0=P0>>>13,d0=$[0]|0,U0=d0&8191,O0=d0>>>13,g0=$[1]|0,L0=g0&8191,N0=g0>>>13,$2=$[2]|0,D0=$2&8191,T0=$2>>>13,h0=$[3]|0,k0=h0&8191,I0=h0>>>13,j2=$[4]|0,B0=j2&8191,q0=j2>>>13,V2=$[5]|0,R0=V2&8191,E0=V2>>>13,K2=$[6]|0,x0=K2&8191,v0=K2>>>13,Z2=$[7]|0,S0=Z2&8191,A0=Z2>>>13,H2=$[8]|0,M0=H2&8191,w0=H2>>>13,Q2=$[9]|0,m0=Q2&8191,p0=Q2>>>13;V.negative=J.negative^z.negative,V.length=19,A=Math.imul(r,U0),R=Math.imul(r,O0),R=R+Math.imul(Y0,U0)|0,_=Math.imul(Y0,O0);var o0=(j+A|0)+((R&8191)<<13)|0;j=(_+(R>>>13)|0)+(o0>>>26)|0,o0&=67108863,A=Math.imul(b,U0),R=Math.imul(b,O0),R=R+Math.imul(f,U0)|0,_=Math.imul(f,O0),A=A+Math.imul(r,L0)|0,R=R+Math.imul(r,N0)|0,R=R+Math.imul(Y0,L0)|0,_=_+Math.imul(Y0,N0)|0;var u0=(j+A|0)+((R&8191)<<13)|0;j=(_+(R>>>13)|0)+(u0>>>26)|0,u0&=67108863,A=Math.imul(X0,U0),R=Math.imul(X0,O0),R=R+Math.imul(z0,U0)|0,_=Math.imul(z0,O0),A=A+Math.imul(b,L0)|0,R=R+Math.imul(b,N0)|0,R=R+Math.imul(f,L0)|0,_=_+Math.imul(f,N0)|0,A=A+Math.imul(r,D0)|0,R=R+Math.imul(r,T0)|0,R=R+Math.imul(Y0,D0)|0,_=_+Math.imul(Y0,T0)|0;var s0=(j+A|0)+((R&8191)<<13)|0;j=(_+(R>>>13)|0)+(s0>>>26)|0,s0&=67108863,A=Math.imul(v,U0),R=Math.imul(v,O0),R=R+Math.imul(p,U0)|0,_=Math.imul(p,O0),A=A+Math.imul(X0,L0)|0,R=R+Math.imul(X0,N0)|0,R=R+Math.imul(z0,L0)|0,_=_+Math.imul(z0,N0)|0,A=A+Math.imul(b,D0)|0,R=R+Math.imul(b,T0)|0,R=R+Math.imul(f,D0)|0,_=_+Math.imul(f,T0)|0,A=A+Math.imul(r,k0)|0,R=R+Math.imul(r,I0)|0,R=R+Math.imul(Y0,k0)|0,_=_+Math.imul(Y0,I0)|0;var f0=(j+A|0)+((R&8191)<<13)|0;j=(_+(R>>>13)|0)+(f0>>>26)|0,f0&=67108863,A=Math.imul(G0,U0),R=Math.imul(G0,O0),R=R+Math.imul(t,U0)|0,_=Math.imul(t,O0),A=A+Math.imul(v,L0)|0,R=R+Math.imul(v,N0)|0,R=R+Math.imul(p,L0)|0,_=_+Math.imul(p,N0)|0,A=A+Math.imul(X0,D0)|0,R=R+Math.imul(X0,T0)|0,R=R+Math.imul(z0,D0)|0,_=_+Math.imul(z0,T0)|0,A=A+Math.imul(b,k0)|0,R=R+Math.imul(b,I0)|0,R=R+Math.imul(f,k0)|0,_=_+Math.imul(f,I0)|0,A=A+Math.imul(r,B0)|0,R=R+Math.imul(r,q0)|0,R=R+Math.imul(Y0,B0)|0,_=_+Math.imul(Y0,q0)|0;var a0=(j+A|0)+((R&8191)<<13)|0;j=(_+(R>>>13)|0)+(a0>>>26)|0,a0&=67108863,A=Math.imul(Q0,U0),R=Math.imul(Q0,O0),R=R+Math.imul(V0,U0)|0,_=Math.imul(V0,O0),A=A+Math.imul(G0,L0)|0,R=R+Math.imul(G0,N0)|0,R=R+Math.imul(t,L0)|0,_=_+Math.imul(t,N0)|0,A=A+Math.imul(v,D0)|0,R=R+Math.imul(v,T0)|0,R=R+Math.imul(p,D0)|0,_=_+Math.imul(p,T0)|0,A=A+Math.imul(X0,k0)|0,R=R+Math.imul(X0,I0)|0,R=R+Math.imul(z0,k0)|0,_=_+Math.imul(z0,I0)|0,A=A+Math.imul(b,B0)|0,R=R+Math.imul(b,q0)|0,R=R+Math.imul(f,B0)|0,_=_+Math.imul(f,q0)|0,A=A+Math.imul(r,R0)|0,R=R+Math.imul(r,E0)|0,R=R+Math.imul(Y0,R0)|0,_=_+Math.imul(Y0,E0)|0;var n0=(j+A|0)+((R&8191)<<13)|0;j=(_+(R>>>13)|0)+(n0>>>26)|0,n0&=67108863,A=Math.imul(F0,U0),R=Math.imul(F0,O0),R=R+Math.imul(Z0,U0)|0,_=Math.imul(Z0,O0),A=A+Math.imul(Q0,L0)|0,R=R+Math.imul(Q0,N0)|0,R=R+Math.imul(V0,L0)|0,_=_+Math.imul(V0,N0)|0,A=A+Math.imul(G0,D0)|0,R=R+Math.imul(G0,T0)|0,R=R+Math.imul(t,D0)|0,_=_+Math.imul(t,T0)|0,A=A+Math.imul(v,k0)|0,R=R+Math.imul(v,I0)|0,R=R+Math.imul(p,k0)|0,_=_+Math.imul(p,I0)|0,A=A+Math.imul(X0,B0)|0,R=R+Math.imul(X0,q0)|0,R=R+Math.imul(z0,B0)|0,_=_+Math.imul(z0,q0)|0,A=A+Math.imul(b,R0)|0,R=R+Math.imul(b,E0)|0,R=R+Math.imul(f,R0)|0,_=_+Math.imul(f,E0)|0,A=A+Math.imul(r,x0)|0,R=R+Math.imul(r,v0)|0,R=R+Math.imul(Y0,x0)|0,_=_+Math.imul(Y0,v0)|0;var r0=(j+A|0)+((R&8191)<<13)|0;j=(_+(R>>>13)|0)+(r0>>>26)|0,r0&=67108863,A=Math.imul(D,U0),R=Math.imul(D,O0),R=R+Math.imul(S,U0)|0,_=Math.imul(S,O0),A=A+Math.imul(F0,L0)|0,R=R+Math.imul(F0,N0)|0,R=R+Math.imul(Z0,L0)|0,_=_+Math.imul(Z0,N0)|0,A=A+Math.imul(Q0,D0)|0,R=R+Math.imul(Q0,T0)|0,R=R+Math.imul(V0,D0)|0,_=_+Math.imul(V0,T0)|0,A=A+Math.imul(G0,k0)|0,R=R+Math.imul(G0,I0)|0,R=R+Math.imul(t,k0)|0,_=_+Math.imul(t,I0)|0,A=A+Math.imul(v,B0)|0,R=R+Math.imul(v,q0)|0,R=R+Math.imul(p,B0)|0,_=_+Math.imul(p,q0)|0,A=A+Math.imul(X0,R0)|0,R=R+Math.imul(X0,E0)|0,R=R+Math.imul(z0,R0)|0,_=_+Math.imul(z0,E0)|0,A=A+Math.imul(b,x0)|0,R=R+Math.imul(b,v0)|0,R=R+Math.imul(f,x0)|0,_=_+Math.imul(f,v0)|0,A=A+Math.imul(r,S0)|0,R=R+Math.imul(r,A0)|0,R=R+Math.imul(Y0,S0)|0,_=_+Math.imul(Y0,A0)|0;var i0=(j+A|0)+((R&8191)<<13)|0;j=(_+(R>>>13)|0)+(i0>>>26)|0,i0&=67108863,A=Math.imul(h,U0),R=Math.imul(h,O0),R=R+Math.imul(u,U0)|0,_=Math.imul(u,O0),A=A+Math.imul(D,L0)|0,R=R+Math.imul(D,N0)|0,R=R+Math.imul(S,L0)|0,_=_+Math.imul(S,N0)|0,A=A+Math.imul(F0,D0)|0,R=R+Math.imul(F0,T0)|0,R=R+Math.imul(Z0,D0)|0,_=_+Math.imul(Z0,T0)|0,A=A+Math.imul(Q0,k0)|0,R=R+Math.imul(Q0,I0)|0,R=R+Math.imul(V0,k0)|0,_=_+Math.imul(V0,I0)|0,A=A+Math.imul(G0,B0)|0,R=R+Math.imul(G0,q0)|0,R=R+Math.imul(t,B0)|0,_=_+Math.imul(t,q0)|0,A=A+Math.imul(v,R0)|0,R=R+Math.imul(v,E0)|0,R=R+Math.imul(p,R0)|0,_=_+Math.imul(p,E0)|0,A=A+Math.imul(X0,x0)|0,R=R+Math.imul(X0,v0)|0,R=R+Math.imul(z0,x0)|0,_=_+Math.imul(z0,v0)|0,A=A+Math.imul(b,S0)|0,R=R+Math.imul(b,A0)|0,R=R+Math.imul(f,S0)|0,_=_+Math.imul(f,A0)|0,A=A+Math.imul(r,M0)|0,R=R+Math.imul(r,w0)|0,R=R+Math.imul(Y0,M0)|0,_=_+Math.imul(Y0,w0)|0;var t0=(j+A|0)+((R&8191)<<13)|0;j=(_+(R>>>13)|0)+(t0>>>26)|0,t0&=67108863,A=Math.imul(J0,U0),R=Math.imul(J0,O0),R=R+Math.imul(H0,U0)|0,_=Math.imul(H0,O0),A=A+Math.imul(h,L0)|0,R=R+Math.imul(h,N0)|0,R=R+Math.imul(u,L0)|0,_=_+Math.imul(u,N0)|0,A=A+Math.imul(D,D0)|0,R=R+Math.imul(D,T0)|0,R=R+Math.imul(S,D0)|0,_=_+Math.imul(S,T0)|0,A=A+Math.imul(F0,k0)|0,R=R+Math.imul(F0,I0)|0,R=R+Math.imul(Z0,k0)|0,_=_+Math.imul(Z0,I0)|0,A=A+Math.imul(Q0,B0)|0,R=R+Math.imul(Q0,q0)|0,R=R+Math.imul(V0,B0)|0,_=_+Math.imul(V0,q0)|0,A=A+Math.imul(G0,R0)|0,R=R+Math.imul(G0,E0)|0,R=R+Math.imul(t,R0)|0,_=_+Math.imul(t,E0)|0,A=A+Math.imul(v,x0)|0,R=R+Math.imul(v,v0)|0,R=R+Math.imul(p,x0)|0,_=_+Math.imul(p,v0)|0,A=A+Math.imul(X0,S0)|0,R=R+Math.imul(X0,A0)|0,R=R+Math.imul(z0,S0)|0,_=_+Math.imul(z0,A0)|0,A=A+Math.imul(b,M0)|0,R=R+Math.imul(b,w0)|0,R=R+Math.imul(f,M0)|0,_=_+Math.imul(f,w0)|0,A=A+Math.imul(r,m0)|0,R=R+Math.imul(r,p0)|0,R=R+Math.imul(Y0,m0)|0,_=_+Math.imul(Y0,p0)|0;var e0=(j+A|0)+((R&8191)<<13)|0;j=(_+(R>>>13)|0)+(e0>>>26)|0,e0&=67108863,A=Math.imul(J0,L0),R=Math.imul(J0,N0),R=R+Math.imul(H0,L0)|0,_=Math.imul(H0,N0),A=A+Math.imul(h,D0)|0,R=R+Math.imul(h,T0)|0,R=R+Math.imul(u,D0)|0,_=_+Math.imul(u,T0)|0,A=A+Math.imul(D,k0)|0,R=R+Math.imul(D,I0)|0,R=R+Math.imul(S,k0)|0,_=_+Math.imul(S,I0)|0,A=A+Math.imul(F0,B0)|0,R=R+Math.imul(F0,q0)|0,R=R+Math.imul(Z0,B0)|0,_=_+Math.imul(Z0,q0)|0,A=A+Math.imul(Q0,R0)|0,R=R+Math.imul(Q0,E0)|0,R=R+Math.imul(V0,R0)|0,_=_+Math.imul(V0,E0)|0,A=A+Math.imul(G0,x0)|0,R=R+Math.imul(G0,v0)|0,R=R+Math.imul(t,x0)|0,_=_+Math.imul(t,v0)|0,A=A+Math.imul(v,S0)|0,R=R+Math.imul(v,A0)|0,R=R+Math.imul(p,S0)|0,_=_+Math.imul(p,A0)|0,A=A+Math.imul(X0,M0)|0,R=R+Math.imul(X0,w0)|0,R=R+Math.imul(z0,M0)|0,_=_+Math.imul(z0,w0)|0,A=A+Math.imul(b,m0)|0,R=R+Math.imul(b,p0)|0,R=R+Math.imul(f,m0)|0,_=_+Math.imul(f,p0)|0;var X2=(j+A|0)+((R&8191)<<13)|0;j=(_+(R>>>13)|0)+(X2>>>26)|0,X2&=67108863,A=Math.imul(J0,D0),R=Math.imul(J0,T0),R=R+Math.imul(H0,D0)|0,_=Math.imul(H0,T0),A=A+Math.imul(h,k0)|0,R=R+Math.imul(h,I0)|0,R=R+Math.imul(u,k0)|0,_=_+Math.imul(u,I0)|0,A=A+Math.imul(D,B0)|0,R=R+Math.imul(D,q0)|0,R=R+Math.imul(S,B0)|0,_=_+Math.imul(S,q0)|0,A=A+Math.imul(F0,R0)|0,R=R+Math.imul(F0,E0)|0,R=R+Math.imul(Z0,R0)|0,_=_+Math.imul(Z0,E0)|0,A=A+Math.imul(Q0,x0)|0,R=R+Math.imul(Q0,v0)|0,R=R+Math.imul(V0,x0)|0,_=_+Math.imul(V0,v0)|0,A=A+Math.imul(G0,S0)|0,R=R+Math.imul(G0,A0)|0,R=R+Math.imul(t,S0)|0,_=_+Math.imul(t,A0)|0,A=A+Math.imul(v,M0)|0,R=R+Math.imul(v,w0)|0,R=R+Math.imul(p,M0)|0,_=_+Math.imul(p,w0)|0,A=A+Math.imul(X0,m0)|0,R=R+Math.imul(X0,p0)|0,R=R+Math.imul(z0,m0)|0,_=_+Math.imul(z0,p0)|0;var G2=(j+A|0)+((R&8191)<<13)|0;j=(_+(R>>>13)|0)+(G2>>>26)|0,G2&=67108863,A=Math.imul(J0,k0),R=Math.imul(J0,I0),R=R+Math.imul(H0,k0)|0,_=Math.imul(H0,I0),A=A+Math.imul(h,B0)|0,R=R+Math.imul(h,q0)|0,R=R+Math.imul(u,B0)|0,_=_+Math.imul(u,q0)|0,A=A+Math.imul(D,R0)|0,R=R+Math.imul(D,E0)|0,R=R+Math.imul(S,R0)|0,_=_+Math.imul(S,E0)|0,A=A+Math.imul(F0,x0)|0,R=R+Math.imul(F0,v0)|0,R=R+Math.imul(Z0,x0)|0,_=_+Math.imul(Z0,v0)|0,A=A+Math.imul(Q0,S0)|0,R=R+Math.imul(Q0,A0)|0,R=R+Math.imul(V0,S0)|0,_=_+Math.imul(V0,A0)|0,A=A+Math.imul(G0,M0)|0,R=R+Math.imul(G0,w0)|0,R=R+Math.imul(t,M0)|0,_=_+Math.imul(t,w0)|0,A=A+Math.imul(v,m0)|0,R=R+Math.imul(v,p0)|0,R=R+Math.imul(p,m0)|0,_=_+Math.imul(p,p0)|0;var Y2=(j+A|0)+((R&8191)<<13)|0;j=(_+(R>>>13)|0)+(Y2>>>26)|0,Y2&=67108863,A=Math.imul(J0,B0),R=Math.imul(J0,q0),R=R+Math.imul(H0,B0)|0,_=Math.imul(H0,q0),A=A+Math.imul(h,R0)|0,R=R+Math.imul(h,E0)|0,R=R+Math.imul(u,R0)|0,_=_+Math.imul(u,E0)|0,A=A+Math.imul(D,x0)|0,R=R+Math.imul(D,v0)|0,R=R+Math.imul(S,x0)|0,_=_+Math.imul(S,v0)|0,A=A+Math.imul(F0,S0)|0,R=R+Math.imul(F0,A0)|0,R=R+Math.imul(Z0,S0)|0,_=_+Math.imul(Z0,A0)|0,A=A+Math.imul(Q0,M0)|0,R=R+Math.imul(Q0,w0)|0,R=R+Math.imul(V0,M0)|0,_=_+Math.imul(V0,w0)|0,A=A+Math.imul(G0,m0)|0,R=R+Math.imul(G0,p0)|0,R=R+Math.imul(t,m0)|0,_=_+Math.imul(t,p0)|0;var J2=(j+A|0)+((R&8191)<<13)|0;j=(_+(R>>>13)|0)+(J2>>>26)|0,J2&=67108863,A=Math.imul(J0,R0),R=Math.imul(J0,E0),R=R+Math.imul(H0,R0)|0,_=Math.imul(H0,E0),A=A+Math.imul(h,x0)|0,R=R+Math.imul(h,v0)|0,R=R+Math.imul(u,x0)|0,_=_+Math.imul(u,v0)|0,A=A+Math.imul(D,S0)|0,R=R+Math.imul(D,A0)|0,R=R+Math.imul(S,S0)|0,_=_+Math.imul(S,A0)|0,A=A+Math.imul(F0,M0)|0,R=R+Math.imul(F0,w0)|0,R=R+Math.imul(Z0,M0)|0,_=_+Math.imul(Z0,w0)|0,A=A+Math.imul(Q0,m0)|0,R=R+Math.imul(Q0,p0)|0,R=R+Math.imul(V0,m0)|0,_=_+Math.imul(V0,p0)|0;var C2=(j+A|0)+((R&8191)<<13)|0;j=(_+(R>>>13)|0)+(C2>>>26)|0,C2&=67108863,A=Math.imul(J0,x0),R=Math.imul(J0,v0),R=R+Math.imul(H0,x0)|0,_=Math.imul(H0,v0),A=A+Math.imul(h,S0)|0,R=R+Math.imul(h,A0)|0,R=R+Math.imul(u,S0)|0,_=_+Math.imul(u,A0)|0,A=A+Math.imul(D,M0)|0,R=R+Math.imul(D,w0)|0,R=R+Math.imul(S,M0)|0,_=_+Math.imul(S,w0)|0,A=A+Math.imul(F0,m0)|0,R=R+Math.imul(F0,p0)|0,R=R+Math.imul(Z0,m0)|0,_=_+Math.imul(Z0,p0)|0;var z2=(j+A|0)+((R&8191)<<13)|0;j=(_+(R>>>13)|0)+(z2>>>26)|0,z2&=67108863,A=Math.imul(J0,S0),R=Math.imul(J0,A0),R=R+Math.imul(H0,S0)|0,_=Math.imul(H0,A0),A=A+Math.imul(h,M0)|0,R=R+Math.imul(h,w0)|0,R=R+Math.imul(u,M0)|0,_=_+Math.imul(u,w0)|0,A=A+Math.imul(D,m0)|0,R=R+Math.imul(D,p0)|0,R=R+Math.imul(S,m0)|0,_=_+Math.imul(S,p0)|0;var W1=(j+A|0)+((R&8191)<<13)|0;j=(_+(R>>>13)|0)+(W1>>>26)|0,W1&=67108863,A=Math.imul(J0,M0),R=Math.imul(J0,w0),R=R+Math.imul(H0,M0)|0,_=Math.imul(H0,w0),A=A+Math.imul(h,m0)|0,R=R+Math.imul(h,p0)|0,R=R+Math.imul(u,m0)|0,_=_+Math.imul(u,p0)|0;var P1=(j+A|0)+((R&8191)<<13)|0;j=(_+(R>>>13)|0)+(P1>>>26)|0,P1&=67108863,A=Math.imul(J0,m0),R=Math.imul(J0,p0),R=R+Math.imul(H0,m0)|0,_=Math.imul(H0,p0);var T1=(j+A|0)+((R&8191)<<13)|0;return j=(_+(R>>>13)|0)+(T1>>>26)|0,T1&=67108863,G[0]=o0,G[1]=u0,G[2]=s0,G[3]=f0,G[4]=a0,G[5]=n0,G[6]=r0,G[7]=i0,G[8]=t0,G[9]=e0,G[10]=X2,G[11]=G2,G[12]=Y2,G[13]=J2,G[14]=C2,G[15]=z2,G[16]=W1,G[17]=P1,G[18]=T1,j!==0&&(G[19]=j,V.length++),V};Math.imul||(y=M);function m(J,z,V){V.negative=z.negative^J.negative,V.length=J.length+z.length;for(var K=0,$=0,G=0;G>>26)|0,$+=j>>>26,j&=67108863}V.words[G]=A,K=j,j=$}return K!==0?V.words[G]=K:V.length--,V._strip()}function c(J,z,V){return m(J,z,V)}Q.prototype.mulTo=function(J,z){var V,K=this.length+J.length;return this.length===10&&J.length===10?V=y(this,J,z):K<63?V=M(this,J,z):K<1024?V=m(this,J,z):V=c(this,J,z),V};function l(J,z){this.x=J,this.y=z}l.prototype.makeRBT=function(J){for(var z=new Array(J),V=Q.prototype._countBits(J)-1,K=0;K>=1;return K},l.prototype.permute=function(J,z,V,K,$,G){for(var j=0;j>>1)$++;return 1<<$+1+K},l.prototype.conjugate=function(J,z,V){if(!(V<=1))for(var K=0;K>>13,V[2*G+1]=$&8191,$=$>>>13;for(G=2*z;G>=26,V+=$/67108864|0,V+=G>>>26,this.words[K]=G&67108863}return V!==0&&(this.words[K]=V,this.length++),z?this.ineg():this},Q.prototype.muln=function(J){return this.clone().imuln(J)},Q.prototype.sqr=function(){return this.mul(this)},Q.prototype.isqr=function(){return this.imul(this.clone())},Q.prototype.pow=function(J){var z=w(J);if(z.length===0)return new Q(1);for(var V=this,K=0;K=0);var z=J%26,V=(J-z)/26,K=67108863>>>26-z<<26-z,$;if(z!==0){var G=0;for($=0;$>>26-z}G&&(this.words[$]=G,this.length++)}if(V!==0){for($=this.length-1;$>=0;$--)this.words[$+V]=this.words[$];for($=0;$=0);var K;z?K=(z-z%26)/26:K=0;var $=J%26,G=Math.min((J-$)/26,this.length),j=67108863^67108863>>>$<<$,A=V;if(K-=G,K=Math.max(0,K),A){for(var R=0;RG)for(this.length-=G,R=0;R=0&&(_!==0||R>=K);R--){var s=this.words[R]|0;this.words[R]=_<<26-$|s>>>$,_=s&j}return A&&_!==0&&(A.words[A.length++]=_),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},Q.prototype.ishrn=function(J,z,V){return H(this.negative===0),this.iushrn(J,z,V)},Q.prototype.shln=function(J){return this.clone().ishln(J)},Q.prototype.ushln=function(J){return this.clone().iushln(J)},Q.prototype.shrn=function(J){return this.clone().ishrn(J)},Q.prototype.ushrn=function(J){return this.clone().iushrn(J)},Q.prototype.testn=function(J){H(typeof J=="number"&&J>=0);var z=J%26,V=(J-z)/26,K=1<=0);var z=J%26,V=(J-z)/26;if(H(this.negative===0,"imaskn works only with positive numbers"),this.length<=V)return this;if(z!==0&&V++,this.length=Math.min(V,this.length),z!==0){var K=67108863^67108863>>>z<=67108864;z++)this.words[z]-=67108864,z===this.length-1?this.words[z+1]=1:this.words[z+1]++;return this.length=Math.max(this.length,z+1),this},Q.prototype.isubn=function(J){if(H(typeof J=="number"),H(J<67108864),J<0)return this.iaddn(-J);if(this.negative!==0)return this.negative=0,this.iaddn(J),this.negative=1,this;if(this.words[0]-=J,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var z=0;z>26)-(A/67108864|0),this.words[$+V]=G&67108863}for(;$>26,this.words[$+V]=G&67108863;if(j===0)return this._strip();for(H(j===-1),j=0,$=0;$>26,this.words[$]=G&67108863;return this.negative=1,this._strip()},Q.prototype._wordDiv=function(J,z){var V=this.length-J.length,K=this.clone(),$=J,G=$.words[$.length-1]|0,j=this._countBits(G);V=26-j,V!==0&&($=$.ushln(V),K.iushln(V),G=$.words[$.length-1]|0);var A=K.length-$.length,R;if(z!=="mod"){R=new Q(null),R.length=A+1,R.words=new Array(R.length);for(var _=0;_=0;r--){var Y0=(K.words[$.length+r]|0)*67108864+(K.words[$.length+r-1]|0);for(Y0=Math.min(Y0/G|0,67108863),K._ishlnsubmul($,Y0,r);K.negative!==0;)Y0--,K.negative=0,K._ishlnsubmul($,1,r),K.isZero()||(K.negative^=1);R&&(R.words[r]=Y0)}return R&&R._strip(),K._strip(),z!=="div"&&V!==0&&K.iushrn(V),{div:R||null,mod:K}},Q.prototype.divmod=function(J,z,V){if(H(!J.isZero()),this.isZero())return{div:new Q(0),mod:new Q(0)};var K,$,G;return this.negative!==0&&J.negative===0?(G=this.neg().divmod(J,z),z!=="mod"&&(K=G.div.neg()),z!=="div"&&($=G.mod.neg(),V&&$.negative!==0&&$.iadd(J)),{div:K,mod:$}):this.negative===0&&J.negative!==0?(G=this.divmod(J.neg(),z),z!=="mod"&&(K=G.div.neg()),{div:K,mod:G.mod}):(this.negative&J.negative)!==0?(G=this.neg().divmod(J.neg(),z),z!=="div"&&($=G.mod.neg(),V&&$.negative!==0&&$.isub(J)),{div:G.div,mod:$}):J.length>this.length||this.cmp(J)<0?{div:new Q(0),mod:this}:J.length===1?z==="div"?{div:this.divn(J.words[0]),mod:null}:z==="mod"?{div:null,mod:new Q(this.modrn(J.words[0]))}:{div:this.divn(J.words[0]),mod:new Q(this.modrn(J.words[0]))}:this._wordDiv(J,z)},Q.prototype.div=function(J){return this.divmod(J,"div",!1).div},Q.prototype.mod=function(J){return this.divmod(J,"mod",!1).mod},Q.prototype.umod=function(J){return this.divmod(J,"mod",!0).mod},Q.prototype.divRound=function(J){var z=this.divmod(J);if(z.mod.isZero())return z.div;var V=z.div.negative!==0?z.mod.isub(J):z.mod,K=J.ushrn(1),$=J.andln(1),G=V.cmp(K);return G<0||$===1&&G===0?z.div:z.div.negative!==0?z.div.isubn(1):z.div.iaddn(1)},Q.prototype.modrn=function(J){var z=J<0;z&&(J=-J),H(J<=67108863);for(var V=(1<<26)%J,K=0,$=this.length-1;$>=0;$--)K=(V*K+(this.words[$]|0))%J;return z?-K:K},Q.prototype.modn=function(J){return this.modrn(J)},Q.prototype.idivn=function(J){var z=J<0;z&&(J=-J),H(J<=67108863);for(var V=0,K=this.length-1;K>=0;K--){var $=(this.words[K]|0)+V*67108864;this.words[K]=$/J|0,V=$%J}return this._strip(),z?this.ineg():this},Q.prototype.divn=function(J){return this.clone().idivn(J)},Q.prototype.egcd=function(J){H(J.negative===0),H(!J.isZero());var z=this,V=J.clone();z.negative!==0?z=z.umod(J):z=z.clone();for(var K=new Q(1),$=new Q(0),G=new Q(0),j=new Q(1),A=0;z.isEven()&&V.isEven();)z.iushrn(1),V.iushrn(1),++A;for(var R=V.clone(),_=z.clone();!z.isZero();){for(var s=0,r=1;(z.words[0]&r)===0&&s<26;++s,r<<=1);if(s>0)for(z.iushrn(s);s-- >0;)(K.isOdd()||$.isOdd())&&(K.iadd(R),$.isub(_)),K.iushrn(1),$.iushrn(1);for(var Y0=0,o=1;(V.words[0]&o)===0&&Y0<26;++Y0,o<<=1);if(Y0>0)for(V.iushrn(Y0);Y0-- >0;)(G.isOdd()||j.isOdd())&&(G.iadd(R),j.isub(_)),G.iushrn(1),j.iushrn(1);z.cmp(V)>=0?(z.isub(V),K.isub(G),$.isub(j)):(V.isub(z),G.isub(K),j.isub($))}return{a:G,b:j,gcd:V.iushln(A)}},Q.prototype._invmp=function(J){H(J.negative===0),H(!J.isZero());var z=this,V=J.clone();z.negative!==0?z=z.umod(J):z=z.clone();for(var K=new Q(1),$=new Q(0),G=V.clone();z.cmpn(1)>0&&V.cmpn(1)>0;){for(var j=0,A=1;(z.words[0]&A)===0&&j<26;++j,A<<=1);if(j>0)for(z.iushrn(j);j-- >0;)K.isOdd()&&K.iadd(G),K.iushrn(1);for(var R=0,_=1;(V.words[0]&_)===0&&R<26;++R,_<<=1);if(R>0)for(V.iushrn(R);R-- >0;)$.isOdd()&&$.iadd(G),$.iushrn(1);z.cmp(V)>=0?(z.isub(V),K.isub($)):(V.isub(z),$.isub(K))}var s;return z.cmpn(1)===0?s=K:s=$,s.cmpn(0)<0&&s.iadd(J),s},Q.prototype.gcd=function(J){if(this.isZero())return J.abs();if(J.isZero())return this.abs();var z=this.clone(),V=J.clone();z.negative=0,V.negative=0;for(var K=0;z.isEven()&&V.isEven();K++)z.iushrn(1),V.iushrn(1);do{for(;z.isEven();)z.iushrn(1);for(;V.isEven();)V.iushrn(1);var $=z.cmp(V);if($<0){var G=z;z=V,V=G}else if($===0||V.cmpn(1)===0)break;z.isub(V)}while(!0);return V.iushln(K)},Q.prototype.invm=function(J){return this.egcd(J).a.umod(J)},Q.prototype.isEven=function(){return(this.words[0]&1)===0},Q.prototype.isOdd=function(){return(this.words[0]&1)===1},Q.prototype.andln=function(J){return this.words[0]&J},Q.prototype.bincn=function(J){H(typeof J=="number");var z=J%26,V=(J-z)/26,K=1<>>26,j&=67108863,this.words[G]=j}return $!==0&&(this.words[G]=$,this.length++),this},Q.prototype.isZero=function(){return this.length===1&&this.words[0]===0},Q.prototype.cmpn=function(J){var z=J<0;if(this.negative!==0&&!z)return-1;if(this.negative===0&&z)return 1;this._strip();var V;if(this.length>1)V=1;else{z&&(J=-J),H(J<=67108863,"Number is too big");var K=this.words[0]|0;V=K===J?0:KJ.length)return 1;if(this.length=0;V--){var K=this.words[V]|0,$=J.words[V]|0;if(K!==$){K<$?z=-1:K>$&&(z=1);break}}return z},Q.prototype.gtn=function(J){return this.cmpn(J)===1},Q.prototype.gt=function(J){return this.cmp(J)===1},Q.prototype.gten=function(J){return this.cmpn(J)>=0},Q.prototype.gte=function(J){return this.cmp(J)>=0},Q.prototype.ltn=function(J){return this.cmpn(J)===-1},Q.prototype.lt=function(J){return this.cmp(J)===-1},Q.prototype.lten=function(J){return this.cmpn(J)<=0},Q.prototype.lte=function(J){return this.cmp(J)<=0},Q.prototype.eqn=function(J){return this.cmpn(J)===0},Q.prototype.eq=function(J){return this.cmp(J)===0},Q.red=function(J){return new Y(J)},Q.prototype.toRed=function(J){return H(!this.red,"Already a number in reduction context"),H(this.negative===0,"red works only with positives"),J.convertTo(this)._forceRed(J)},Q.prototype.fromRed=function(){return H(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},Q.prototype._forceRed=function(J){return this.red=J,this},Q.prototype.forceRed=function(J){return H(!this.red,"Already a number in reduction context"),this._forceRed(J)},Q.prototype.redAdd=function(J){return H(this.red,"redAdd works only with red numbers"),this.red.add(this,J)},Q.prototype.redIAdd=function(J){return H(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,J)},Q.prototype.redSub=function(J){return H(this.red,"redSub works only with red numbers"),this.red.sub(this,J)},Q.prototype.redISub=function(J){return H(this.red,"redISub works only with red numbers"),this.red.isub(this,J)},Q.prototype.redShl=function(J){return H(this.red,"redShl works only with red numbers"),this.red.shl(this,J)},Q.prototype.redMul=function(J){return H(this.red,"redMul works only with red numbers"),this.red._verify2(this,J),this.red.mul(this,J)},Q.prototype.redIMul=function(J){return H(this.red,"redMul works only with red numbers"),this.red._verify2(this,J),this.red.imul(this,J)},Q.prototype.redSqr=function(){return H(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},Q.prototype.redISqr=function(){return H(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},Q.prototype.redSqrt=function(){return H(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},Q.prototype.redInvm=function(){return H(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},Q.prototype.redNeg=function(){return H(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},Q.prototype.redPow=function(J){return H(this.red&&!J.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,J)};var n={k256:null,p224:null,p192:null,p25519:null};function i(J,z){this.name=J,this.p=new Q(z,16),this.n=this.p.bitLength(),this.k=new Q(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}i.prototype._tmp=function(){var J=new Q(null);return J.words=new Array(Math.ceil(this.n/13)),J},i.prototype.ireduce=function(J){var z=J,V;do this.split(z,this.tmp),z=this.imulK(z),z=z.iadd(this.tmp),V=z.bitLength();while(V>this.n);var K=V0?z.isub(this.p):z.strip!==void 0?z.strip():z._strip(),z},i.prototype.split=function(J,z){J.iushrn(this.n,0,z)},i.prototype.imulK=function(J){return J.imul(this.k)};function C0(){i.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}k(C0,i),C0.prototype.split=function(J,z){for(var V=4194303,K=Math.min(J.length,9),$=0;$>>22,G=j}G>>>=22,J.words[$-10]=G,G===0&&J.length>10?J.length-=10:J.length-=9},C0.prototype.imulK=function(J){J.words[J.length]=0,J.words[J.length+1]=0,J.length+=2;for(var z=0,V=0;V>>=26,J.words[V]=$,z=K}return z!==0&&(J.words[J.length++]=z),J},Q._prime=function(J){if(n[J])return n[J];var z;if(J==="k256")z=new C0;else if(J==="p224")z=new a;else if(J==="p192")z=new K0;else if(J==="p25519")z=new X;else throw new Error("Unknown prime "+J);return n[J]=z,z};function Y(J){if(typeof J=="string"){var z=Q._prime(J);this.m=z.p,this.prime=z}else H(J.gtn(1),"modulus must be greater than 1"),this.m=J,this.prime=null}Y.prototype._verify1=function(J){H(J.negative===0,"red works only with positives"),H(J.red,"red works only with red numbers")},Y.prototype._verify2=function(J,z){H((J.negative|z.negative)===0,"red works only with positives"),H(J.red&&J.red===z.red,"red works only with red numbers")},Y.prototype.imod=function(J){return this.prime?this.prime.ireduce(J)._forceRed(this):(Z(J,J.umod(this.m)._forceRed(this)),J)},Y.prototype.neg=function(J){return J.isZero()?J.clone():this.m.sub(J)._forceRed(this)},Y.prototype.add=function(J,z){this._verify2(J,z);var V=J.add(z);return V.cmp(this.m)>=0&&V.isub(this.m),V._forceRed(this)},Y.prototype.iadd=function(J,z){this._verify2(J,z);var V=J.iadd(z);return V.cmp(this.m)>=0&&V.isub(this.m),V},Y.prototype.sub=function(J,z){this._verify2(J,z);var V=J.sub(z);return V.cmpn(0)<0&&V.iadd(this.m),V._forceRed(this)},Y.prototype.isub=function(J,z){this._verify2(J,z);var V=J.isub(z);return V.cmpn(0)<0&&V.iadd(this.m),V},Y.prototype.shl=function(J,z){return this._verify1(J),this.imod(J.ushln(z))},Y.prototype.imul=function(J,z){return this._verify2(J,z),this.imod(J.imul(z))},Y.prototype.mul=function(J,z){return this._verify2(J,z),this.imod(J.mul(z))},Y.prototype.isqr=function(J){return this.imul(J,J.clone())},Y.prototype.sqr=function(J){return this.mul(J,J)},Y.prototype.sqrt=function(J){if(J.isZero())return J.clone();var z=this.m.andln(3);if(H(z%2===1),z===3){var V=this.m.add(new Q(1)).iushrn(2);return this.pow(J,V)}for(var K=this.m.subn(1),$=0;!K.isZero()&&K.andln(1)===0;)$++,K.iushrn(1);H(!K.isZero());var G=new Q(1).toRed(this),j=G.redNeg(),A=this.m.subn(1).iushrn(1),R=this.m.bitLength();for(R=new Q(2*R*R).toRed(this);this.pow(R,A).cmp(j)!==0;)R.redIAdd(j);for(var _=this.pow(R,K),s=this.pow(J,K.addn(1).iushrn(1)),r=this.pow(J,K),Y0=$;r.cmp(G)!==0;){for(var o=r,b=0;o.cmp(G)!==0;b++)o=o.redSqr();H(b=0;$--){for(var _=z.words[$],s=R-1;s>=0;s--){var r=_>>s&1;if(G!==K[0]&&(G=this.sqr(G)),r===0&&j===0){A=0;continue}j<<=1,j|=r,A++,!(A!==V&&($!==0||s!==0))&&(G=this.mul(G,K[j]),A=0,j=0)}R=26}return G},Y.prototype.convertTo=function(J){var z=J.umod(this.m);return z===J?z.clone():z},Y.prototype.convertFrom=function(J){var z=J.clone();return z.red=null,z},Q.mont=function(J){return new C(J)};function C(J){Y.call(this,J),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new Q(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)}k(C,Y),C.prototype.convertTo=function(J){return this.imod(J.ushln(this.shift))},C.prototype.convertFrom=function(J){var z=this.imod(J.mul(this.rinv));return z.red=null,z},C.prototype.imul=function(J,z){if(J.isZero()||z.isZero())return J.words[0]=0,J.length=1,J;var V=J.imul(z),K=V.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),$=V.isub(K).iushrn(this.shift),G=$;return $.cmp(this.m)>=0?G=$.isub(this.m):$.cmpn(0)<0&&(G=$.iadd(this.m)),G._forceRed(this)},C.prototype.mul=function(J,z){if(J.isZero()||z.isZero())return new Q(0)._forceRed(this);var V=J.mul(z),K=V.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),$=V.isub(K).iushrn(this.shift),G=$;return $.cmp(this.m)>=0?G=$.isub(this.m):$.cmpn(0)<0&&(G=$.iadd(this.m)),G._forceRed(this)},C.prototype.invm=function(J){var z=this.imod(J._invmp(this.m).mul(this.r2));return z._forceRed(this)}})(typeof I>"u"||I,E)}),c1=$0((E,I)=>{var F=p1(),L=_2();function H(O){var N=k(O),U=N.toRed(F.mont(O.modulus)).redPow(new F(O.publicExponent)).fromRed();return{blinder:U,unblinder:N.invm(O.modulus)}}function k(O){var N=O.modulus.byteLength(),U;do U=new F(L(N));while(U.cmp(O.modulus)>=0||!U.umod(O.prime1)||!U.umod(O.prime2));return U}function Q(O,N){var U=H(N),W=N.modulus.byteLength(),Z=new F(O).mul(U.blinder).umod(N.modulus),T=Z.toRed(F.mont(N.prime1)),B=Z.toRed(F.mont(N.prime2)),P=N.coefficient,q=N.prime1,x=N.prime2,w=T.redPow(N.exponent1).fromRed(),M=B.redPow(N.exponent2).fromRed(),y=w.isub(M).imul(P).umod(q).imul(x);return M.iadd(y).imul(U.unblinder).umod(N.modulus).toArrayLike(Buffer,"be",W)}Q.getr=k,I.exports=Q}),m8=$0((E,I)=>{I.exports={name:"elliptic",version:"6.5.4",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{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/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny ",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{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"},dependencies:{"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"}}}),B2=$0((E,I)=>{(function(F,L){function H(X,Y){if(!X)throw new Error(Y||"Assertion failed")}function k(X,Y){X.super_=Y;var C=function(){};C.prototype=Y.prototype,X.prototype=new C,X.prototype.constructor=X}function Q(X,Y,C){if(Q.isBN(X))return X;this.negative=0,this.words=null,this.length=0,this.red=null,X!==null&&((Y==="le"||Y==="be")&&(C=Y,Y=10),this._init(X||0,Y||10,C||"be"))}typeof F=="object"?F.exports=Q:L.BN=Q,Q.BN=Q,Q.wordSize=26;var O;try{typeof window<"u"&&typeof window.Buffer<"u"?O=window.Buffer:O=A2().Buffer}catch{}Q.isBN=function(X){return X instanceof Q?!0:X!==null&&typeof X=="object"&&X.constructor.wordSize===Q.wordSize&&Array.isArray(X.words)},Q.max=function(X,Y){return X.cmp(Y)>0?X:Y},Q.min=function(X,Y){return X.cmp(Y)<0?X:Y},Q.prototype._init=function(X,Y,C){if(typeof X=="number")return this._initNumber(X,Y,C);if(typeof X=="object")return this._initArray(X,Y,C);Y==="hex"&&(Y=16),H(Y===(Y|0)&&Y>=2&&Y<=36),X=X.toString().replace(/\s+/g,"");var J=0;X[0]==="-"&&(J++,this.negative=1),J=0;J-=3)V=X[J]|X[J-1]<<8|X[J-2]<<16,this.words[z]|=V<>>26-K&67108863,K+=24,K>=26&&(K-=26,z++);else if(C==="le")for(J=0,z=0;J>>26-K&67108863,K+=24,K>=26&&(K-=26,z++);return this.strip()};function N(X,Y){var C=X.charCodeAt(Y);return C>=65&&C<=70?C-55:C>=97&&C<=102?C-87:C-48&15}function U(X,Y,C){var J=N(X,C);return C-1>=Y&&(J|=N(X,C-1)<<4),J}Q.prototype._parseHex=function(X,Y,C){this.length=Math.ceil((X.length-Y)/6),this.words=new Array(this.length);for(var J=0;J=Y;J-=2)K=U(X,Y,J)<=18?(z-=18,V+=1,this.words[V]|=K>>>26):z+=8;else{var $=X.length-Y;for(J=$%2===0?Y+1:Y;J=18?(z-=18,V+=1,this.words[V]|=K>>>26):z+=8}this.strip()};function W(X,Y,C,J){for(var z=0,V=Math.min(X.length,C),K=Y;K=49?z+=$-49+10:$>=17?z+=$-17+10:z+=$}return z}Q.prototype._parseBase=function(X,Y,C){this.words=[0],this.length=1;for(var J=0,z=1;z<=67108863;z*=Y)J++;J--,z=z/Y|0;for(var V=X.length-C,K=V%J,$=Math.min(V,V-K)+C,G=0,j=C;j<$;j+=J)G=W(X,j,j+J,Y),this.imuln(z),this.words[0]+G<67108864?this.words[0]+=G:this._iaddn(G);if(K!==0){var A=1;for(G=W(X,j,X.length,Y),j=0;j1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},Q.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},Q.prototype.inspect=function(){return(this.red?""};var Z=["","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"],T=[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,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];Q.prototype.toString=function(X,Y){X=X||10,Y=Y|0||1;var C;if(X===16||X==="hex"){C="";for(var J=0,z=0,V=0;V>>24-J&16777215,z!==0||V!==this.length-1?C=Z[6-$.length]+$+C:C=$+C,J+=2,J>=26&&(J-=26,V--)}for(z!==0&&(C=z.toString(16)+C);C.length%Y!==0;)C="0"+C;return this.negative!==0&&(C="-"+C),C}if(X===(X|0)&&X>=2&&X<=36){var G=T[X],j=B[X];C="";var A=this.clone();for(A.negative=0;!A.isZero();){var R=A.modn(j).toString(X);A=A.idivn(j),A.isZero()?C=R+C:C=Z[G-R.length]+R+C}for(this.isZero()&&(C="0"+C);C.length%Y!==0;)C="0"+C;return this.negative!==0&&(C="-"+C),C}H(!1,"Base should be between 2 and 36")},Q.prototype.toNumber=function(){var X=this.words[0];return this.length===2?X+=this.words[1]*67108864:this.length===3&&this.words[2]===1?X+=4503599627370496+this.words[1]*67108864:this.length>2&&H(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-X:X},Q.prototype.toJSON=function(){return this.toString(16)},Q.prototype.toBuffer=function(X,Y){return H(typeof O<"u"),this.toArrayLike(O,X,Y)},Q.prototype.toArray=function(X,Y){return this.toArrayLike(Array,X,Y)},Q.prototype.toArrayLike=function(X,Y,C){var J=this.byteLength(),z=C||Math.max(1,J);H(J<=z,"byte array longer than desired length"),H(z>0,"Requested array length <= 0"),this.strip();var V=Y==="le",K=new X(z),$,G,j=this.clone();if(V){for(G=0;!j.isZero();G++)$=j.andln(255),j.iushrn(8),K[G]=$;for(;G=4096&&(C+=13,Y>>>=13),Y>=64&&(C+=7,Y>>>=7),Y>=8&&(C+=4,Y>>>=4),Y>=2&&(C+=2,Y>>>=2),C+Y},Q.prototype._zeroBits=function(X){if(X===0)return 26;var Y=X,C=0;return(Y&8191)===0&&(C+=13,Y>>>=13),(Y&127)===0&&(C+=7,Y>>>=7),(Y&15)===0&&(C+=4,Y>>>=4),(Y&3)===0&&(C+=2,Y>>>=2),(Y&1)===0&&C++,C},Q.prototype.bitLength=function(){var X=this.words[this.length-1],Y=this._countBits(X);return(this.length-1)*26+Y};function P(X){for(var Y=new Array(X.bitLength()),C=0;C>>z}return Y}Q.prototype.zeroBits=function(){if(this.isZero())return 0;for(var X=0,Y=0;YX.length?this.clone().ior(X):X.clone().ior(this)},Q.prototype.uor=function(X){return this.length>X.length?this.clone().iuor(X):X.clone().iuor(this)},Q.prototype.iuand=function(X){var Y;this.length>X.length?Y=X:Y=this;for(var C=0;CX.length?this.clone().iand(X):X.clone().iand(this)},Q.prototype.uand=function(X){return this.length>X.length?this.clone().iuand(X):X.clone().iuand(this)},Q.prototype.iuxor=function(X){var Y,C;this.length>X.length?(Y=this,C=X):(Y=X,C=this);for(var J=0;JX.length?this.clone().ixor(X):X.clone().ixor(this)},Q.prototype.uxor=function(X){return this.length>X.length?this.clone().iuxor(X):X.clone().iuxor(this)},Q.prototype.inotn=function(X){H(typeof X=="number"&&X>=0);var Y=Math.ceil(X/26)|0,C=X%26;this._expand(Y),C>0&&Y--;for(var J=0;J0&&(this.words[J]=~this.words[J]&67108863>>26-C),this.strip()},Q.prototype.notn=function(X){return this.clone().inotn(X)},Q.prototype.setn=function(X,Y){H(typeof X=="number"&&X>=0);var C=X/26|0,J=X%26;return this._expand(C+1),Y?this.words[C]=this.words[C]|1<X.length?(C=this,J=X):(C=X,J=this);for(var z=0,V=0;V>>26;for(;z!==0&&V>>26;if(this.length=C.length,z!==0)this.words[this.length]=z,this.length++;else if(C!==this)for(;VX.length?this.clone().iadd(X):X.clone().iadd(this)},Q.prototype.isub=function(X){if(X.negative!==0){X.negative=0;var Y=this.iadd(X);return X.negative=1,Y._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(X),this.negative=1,this._normSign();var C=this.cmp(X);if(C===0)return this.negative=0,this.length=1,this.words[0]=0,this;var J,z;C>0?(J=this,z=X):(J=X,z=this);for(var V=0,K=0;K>26,this.words[K]=Y&67108863;for(;V!==0&&K>26,this.words[K]=Y&67108863;if(V===0&&K>>26,R=G&67108863,_=Math.min(j,Y.length-1),s=Math.max(0,j-X.length+1);s<=_;s++){var r=j-s|0;z=X.words[r]|0,V=Y.words[s]|0,K=z*V+R,A+=K/67108864|0,R=K&67108863}C.words[j]=R|0,G=A|0}return G!==0?C.words[j]=G|0:C.length--,C.strip()}var x=function(X,Y,C){var J=X.words,z=Y.words,V=C.words,K=0,$,G,j,A=J[0]|0,R=A&8191,_=A>>>13,s=J[1]|0,r=s&8191,Y0=s>>>13,o=J[2]|0,b=o&8191,f=o>>>13,W0=J[3]|0,X0=W0&8191,z0=W0>>>13,g=J[4]|0,v=g&8191,p=g>>>13,e=J[5]|0,G0=e&8191,t=e>>>13,y0=J[6]|0,Q0=y0&8191,V0=y0>>>13,_0=J[7]|0,F0=_0&8191,Z0=_0>>>13,b0=J[8]|0,D=b0&8191,S=b0>>>13,d=J[9]|0,h=d&8191,u=d>>>13,P0=z[0]|0,J0=P0&8191,H0=P0>>>13,d0=z[1]|0,U0=d0&8191,O0=d0>>>13,g0=z[2]|0,L0=g0&8191,N0=g0>>>13,$2=z[3]|0,D0=$2&8191,T0=$2>>>13,h0=z[4]|0,k0=h0&8191,I0=h0>>>13,j2=z[5]|0,B0=j2&8191,q0=j2>>>13,V2=z[6]|0,R0=V2&8191,E0=V2>>>13,K2=z[7]|0,x0=K2&8191,v0=K2>>>13,Z2=z[8]|0,S0=Z2&8191,A0=Z2>>>13,H2=z[9]|0,M0=H2&8191,w0=H2>>>13;C.negative=X.negative^Y.negative,C.length=19,$=Math.imul(R,J0),G=Math.imul(R,H0),G=G+Math.imul(_,J0)|0,j=Math.imul(_,H0);var Q2=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(Q2>>>26)|0,Q2&=67108863,$=Math.imul(r,J0),G=Math.imul(r,H0),G=G+Math.imul(Y0,J0)|0,j=Math.imul(Y0,H0),$=$+Math.imul(R,U0)|0,G=G+Math.imul(R,O0)|0,G=G+Math.imul(_,U0)|0,j=j+Math.imul(_,O0)|0;var m0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(m0>>>26)|0,m0&=67108863,$=Math.imul(b,J0),G=Math.imul(b,H0),G=G+Math.imul(f,J0)|0,j=Math.imul(f,H0),$=$+Math.imul(r,U0)|0,G=G+Math.imul(r,O0)|0,G=G+Math.imul(Y0,U0)|0,j=j+Math.imul(Y0,O0)|0,$=$+Math.imul(R,L0)|0,G=G+Math.imul(R,N0)|0,G=G+Math.imul(_,L0)|0,j=j+Math.imul(_,N0)|0;var p0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(p0>>>26)|0,p0&=67108863,$=Math.imul(X0,J0),G=Math.imul(X0,H0),G=G+Math.imul(z0,J0)|0,j=Math.imul(z0,H0),$=$+Math.imul(b,U0)|0,G=G+Math.imul(b,O0)|0,G=G+Math.imul(f,U0)|0,j=j+Math.imul(f,O0)|0,$=$+Math.imul(r,L0)|0,G=G+Math.imul(r,N0)|0,G=G+Math.imul(Y0,L0)|0,j=j+Math.imul(Y0,N0)|0,$=$+Math.imul(R,D0)|0,G=G+Math.imul(R,T0)|0,G=G+Math.imul(_,D0)|0,j=j+Math.imul(_,T0)|0;var o0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(o0>>>26)|0,o0&=67108863,$=Math.imul(v,J0),G=Math.imul(v,H0),G=G+Math.imul(p,J0)|0,j=Math.imul(p,H0),$=$+Math.imul(X0,U0)|0,G=G+Math.imul(X0,O0)|0,G=G+Math.imul(z0,U0)|0,j=j+Math.imul(z0,O0)|0,$=$+Math.imul(b,L0)|0,G=G+Math.imul(b,N0)|0,G=G+Math.imul(f,L0)|0,j=j+Math.imul(f,N0)|0,$=$+Math.imul(r,D0)|0,G=G+Math.imul(r,T0)|0,G=G+Math.imul(Y0,D0)|0,j=j+Math.imul(Y0,T0)|0,$=$+Math.imul(R,k0)|0,G=G+Math.imul(R,I0)|0,G=G+Math.imul(_,k0)|0,j=j+Math.imul(_,I0)|0;var u0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(u0>>>26)|0,u0&=67108863,$=Math.imul(G0,J0),G=Math.imul(G0,H0),G=G+Math.imul(t,J0)|0,j=Math.imul(t,H0),$=$+Math.imul(v,U0)|0,G=G+Math.imul(v,O0)|0,G=G+Math.imul(p,U0)|0,j=j+Math.imul(p,O0)|0,$=$+Math.imul(X0,L0)|0,G=G+Math.imul(X0,N0)|0,G=G+Math.imul(z0,L0)|0,j=j+Math.imul(z0,N0)|0,$=$+Math.imul(b,D0)|0,G=G+Math.imul(b,T0)|0,G=G+Math.imul(f,D0)|0,j=j+Math.imul(f,T0)|0,$=$+Math.imul(r,k0)|0,G=G+Math.imul(r,I0)|0,G=G+Math.imul(Y0,k0)|0,j=j+Math.imul(Y0,I0)|0,$=$+Math.imul(R,B0)|0,G=G+Math.imul(R,q0)|0,G=G+Math.imul(_,B0)|0,j=j+Math.imul(_,q0)|0;var s0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(s0>>>26)|0,s0&=67108863,$=Math.imul(Q0,J0),G=Math.imul(Q0,H0),G=G+Math.imul(V0,J0)|0,j=Math.imul(V0,H0),$=$+Math.imul(G0,U0)|0,G=G+Math.imul(G0,O0)|0,G=G+Math.imul(t,U0)|0,j=j+Math.imul(t,O0)|0,$=$+Math.imul(v,L0)|0,G=G+Math.imul(v,N0)|0,G=G+Math.imul(p,L0)|0,j=j+Math.imul(p,N0)|0,$=$+Math.imul(X0,D0)|0,G=G+Math.imul(X0,T0)|0,G=G+Math.imul(z0,D0)|0,j=j+Math.imul(z0,T0)|0,$=$+Math.imul(b,k0)|0,G=G+Math.imul(b,I0)|0,G=G+Math.imul(f,k0)|0,j=j+Math.imul(f,I0)|0,$=$+Math.imul(r,B0)|0,G=G+Math.imul(r,q0)|0,G=G+Math.imul(Y0,B0)|0,j=j+Math.imul(Y0,q0)|0,$=$+Math.imul(R,R0)|0,G=G+Math.imul(R,E0)|0,G=G+Math.imul(_,R0)|0,j=j+Math.imul(_,E0)|0;var f0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(f0>>>26)|0,f0&=67108863,$=Math.imul(F0,J0),G=Math.imul(F0,H0),G=G+Math.imul(Z0,J0)|0,j=Math.imul(Z0,H0),$=$+Math.imul(Q0,U0)|0,G=G+Math.imul(Q0,O0)|0,G=G+Math.imul(V0,U0)|0,j=j+Math.imul(V0,O0)|0,$=$+Math.imul(G0,L0)|0,G=G+Math.imul(G0,N0)|0,G=G+Math.imul(t,L0)|0,j=j+Math.imul(t,N0)|0,$=$+Math.imul(v,D0)|0,G=G+Math.imul(v,T0)|0,G=G+Math.imul(p,D0)|0,j=j+Math.imul(p,T0)|0,$=$+Math.imul(X0,k0)|0,G=G+Math.imul(X0,I0)|0,G=G+Math.imul(z0,k0)|0,j=j+Math.imul(z0,I0)|0,$=$+Math.imul(b,B0)|0,G=G+Math.imul(b,q0)|0,G=G+Math.imul(f,B0)|0,j=j+Math.imul(f,q0)|0,$=$+Math.imul(r,R0)|0,G=G+Math.imul(r,E0)|0,G=G+Math.imul(Y0,R0)|0,j=j+Math.imul(Y0,E0)|0,$=$+Math.imul(R,x0)|0,G=G+Math.imul(R,v0)|0,G=G+Math.imul(_,x0)|0,j=j+Math.imul(_,v0)|0;var a0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(a0>>>26)|0,a0&=67108863,$=Math.imul(D,J0),G=Math.imul(D,H0),G=G+Math.imul(S,J0)|0,j=Math.imul(S,H0),$=$+Math.imul(F0,U0)|0,G=G+Math.imul(F0,O0)|0,G=G+Math.imul(Z0,U0)|0,j=j+Math.imul(Z0,O0)|0,$=$+Math.imul(Q0,L0)|0,G=G+Math.imul(Q0,N0)|0,G=G+Math.imul(V0,L0)|0,j=j+Math.imul(V0,N0)|0,$=$+Math.imul(G0,D0)|0,G=G+Math.imul(G0,T0)|0,G=G+Math.imul(t,D0)|0,j=j+Math.imul(t,T0)|0,$=$+Math.imul(v,k0)|0,G=G+Math.imul(v,I0)|0,G=G+Math.imul(p,k0)|0,j=j+Math.imul(p,I0)|0,$=$+Math.imul(X0,B0)|0,G=G+Math.imul(X0,q0)|0,G=G+Math.imul(z0,B0)|0,j=j+Math.imul(z0,q0)|0,$=$+Math.imul(b,R0)|0,G=G+Math.imul(b,E0)|0,G=G+Math.imul(f,R0)|0,j=j+Math.imul(f,E0)|0,$=$+Math.imul(r,x0)|0,G=G+Math.imul(r,v0)|0,G=G+Math.imul(Y0,x0)|0,j=j+Math.imul(Y0,v0)|0,$=$+Math.imul(R,S0)|0,G=G+Math.imul(R,A0)|0,G=G+Math.imul(_,S0)|0,j=j+Math.imul(_,A0)|0;var n0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(n0>>>26)|0,n0&=67108863,$=Math.imul(h,J0),G=Math.imul(h,H0),G=G+Math.imul(u,J0)|0,j=Math.imul(u,H0),$=$+Math.imul(D,U0)|0,G=G+Math.imul(D,O0)|0,G=G+Math.imul(S,U0)|0,j=j+Math.imul(S,O0)|0,$=$+Math.imul(F0,L0)|0,G=G+Math.imul(F0,N0)|0,G=G+Math.imul(Z0,L0)|0,j=j+Math.imul(Z0,N0)|0,$=$+Math.imul(Q0,D0)|0,G=G+Math.imul(Q0,T0)|0,G=G+Math.imul(V0,D0)|0,j=j+Math.imul(V0,T0)|0,$=$+Math.imul(G0,k0)|0,G=G+Math.imul(G0,I0)|0,G=G+Math.imul(t,k0)|0,j=j+Math.imul(t,I0)|0,$=$+Math.imul(v,B0)|0,G=G+Math.imul(v,q0)|0,G=G+Math.imul(p,B0)|0,j=j+Math.imul(p,q0)|0,$=$+Math.imul(X0,R0)|0,G=G+Math.imul(X0,E0)|0,G=G+Math.imul(z0,R0)|0,j=j+Math.imul(z0,E0)|0,$=$+Math.imul(b,x0)|0,G=G+Math.imul(b,v0)|0,G=G+Math.imul(f,x0)|0,j=j+Math.imul(f,v0)|0,$=$+Math.imul(r,S0)|0,G=G+Math.imul(r,A0)|0,G=G+Math.imul(Y0,S0)|0,j=j+Math.imul(Y0,A0)|0,$=$+Math.imul(R,M0)|0,G=G+Math.imul(R,w0)|0,G=G+Math.imul(_,M0)|0,j=j+Math.imul(_,w0)|0;var r0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(r0>>>26)|0,r0&=67108863,$=Math.imul(h,U0),G=Math.imul(h,O0),G=G+Math.imul(u,U0)|0,j=Math.imul(u,O0),$=$+Math.imul(D,L0)|0,G=G+Math.imul(D,N0)|0,G=G+Math.imul(S,L0)|0,j=j+Math.imul(S,N0)|0,$=$+Math.imul(F0,D0)|0,G=G+Math.imul(F0,T0)|0,G=G+Math.imul(Z0,D0)|0,j=j+Math.imul(Z0,T0)|0,$=$+Math.imul(Q0,k0)|0,G=G+Math.imul(Q0,I0)|0,G=G+Math.imul(V0,k0)|0,j=j+Math.imul(V0,I0)|0,$=$+Math.imul(G0,B0)|0,G=G+Math.imul(G0,q0)|0,G=G+Math.imul(t,B0)|0,j=j+Math.imul(t,q0)|0,$=$+Math.imul(v,R0)|0,G=G+Math.imul(v,E0)|0,G=G+Math.imul(p,R0)|0,j=j+Math.imul(p,E0)|0,$=$+Math.imul(X0,x0)|0,G=G+Math.imul(X0,v0)|0,G=G+Math.imul(z0,x0)|0,j=j+Math.imul(z0,v0)|0,$=$+Math.imul(b,S0)|0,G=G+Math.imul(b,A0)|0,G=G+Math.imul(f,S0)|0,j=j+Math.imul(f,A0)|0,$=$+Math.imul(r,M0)|0,G=G+Math.imul(r,w0)|0,G=G+Math.imul(Y0,M0)|0,j=j+Math.imul(Y0,w0)|0;var i0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(i0>>>26)|0,i0&=67108863,$=Math.imul(h,L0),G=Math.imul(h,N0),G=G+Math.imul(u,L0)|0,j=Math.imul(u,N0),$=$+Math.imul(D,D0)|0,G=G+Math.imul(D,T0)|0,G=G+Math.imul(S,D0)|0,j=j+Math.imul(S,T0)|0,$=$+Math.imul(F0,k0)|0,G=G+Math.imul(F0,I0)|0,G=G+Math.imul(Z0,k0)|0,j=j+Math.imul(Z0,I0)|0,$=$+Math.imul(Q0,B0)|0,G=G+Math.imul(Q0,q0)|0,G=G+Math.imul(V0,B0)|0,j=j+Math.imul(V0,q0)|0,$=$+Math.imul(G0,R0)|0,G=G+Math.imul(G0,E0)|0,G=G+Math.imul(t,R0)|0,j=j+Math.imul(t,E0)|0,$=$+Math.imul(v,x0)|0,G=G+Math.imul(v,v0)|0,G=G+Math.imul(p,x0)|0,j=j+Math.imul(p,v0)|0,$=$+Math.imul(X0,S0)|0,G=G+Math.imul(X0,A0)|0,G=G+Math.imul(z0,S0)|0,j=j+Math.imul(z0,A0)|0,$=$+Math.imul(b,M0)|0,G=G+Math.imul(b,w0)|0,G=G+Math.imul(f,M0)|0,j=j+Math.imul(f,w0)|0;var t0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(t0>>>26)|0,t0&=67108863,$=Math.imul(h,D0),G=Math.imul(h,T0),G=G+Math.imul(u,D0)|0,j=Math.imul(u,T0),$=$+Math.imul(D,k0)|0,G=G+Math.imul(D,I0)|0,G=G+Math.imul(S,k0)|0,j=j+Math.imul(S,I0)|0,$=$+Math.imul(F0,B0)|0,G=G+Math.imul(F0,q0)|0,G=G+Math.imul(Z0,B0)|0,j=j+Math.imul(Z0,q0)|0,$=$+Math.imul(Q0,R0)|0,G=G+Math.imul(Q0,E0)|0,G=G+Math.imul(V0,R0)|0,j=j+Math.imul(V0,E0)|0,$=$+Math.imul(G0,x0)|0,G=G+Math.imul(G0,v0)|0,G=G+Math.imul(t,x0)|0,j=j+Math.imul(t,v0)|0,$=$+Math.imul(v,S0)|0,G=G+Math.imul(v,A0)|0,G=G+Math.imul(p,S0)|0,j=j+Math.imul(p,A0)|0,$=$+Math.imul(X0,M0)|0,G=G+Math.imul(X0,w0)|0,G=G+Math.imul(z0,M0)|0,j=j+Math.imul(z0,w0)|0;var e0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(e0>>>26)|0,e0&=67108863,$=Math.imul(h,k0),G=Math.imul(h,I0),G=G+Math.imul(u,k0)|0,j=Math.imul(u,I0),$=$+Math.imul(D,B0)|0,G=G+Math.imul(D,q0)|0,G=G+Math.imul(S,B0)|0,j=j+Math.imul(S,q0)|0,$=$+Math.imul(F0,R0)|0,G=G+Math.imul(F0,E0)|0,G=G+Math.imul(Z0,R0)|0,j=j+Math.imul(Z0,E0)|0,$=$+Math.imul(Q0,x0)|0,G=G+Math.imul(Q0,v0)|0,G=G+Math.imul(V0,x0)|0,j=j+Math.imul(V0,v0)|0,$=$+Math.imul(G0,S0)|0,G=G+Math.imul(G0,A0)|0,G=G+Math.imul(t,S0)|0,j=j+Math.imul(t,A0)|0,$=$+Math.imul(v,M0)|0,G=G+Math.imul(v,w0)|0,G=G+Math.imul(p,M0)|0,j=j+Math.imul(p,w0)|0;var X2=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(X2>>>26)|0,X2&=67108863,$=Math.imul(h,B0),G=Math.imul(h,q0),G=G+Math.imul(u,B0)|0,j=Math.imul(u,q0),$=$+Math.imul(D,R0)|0,G=G+Math.imul(D,E0)|0,G=G+Math.imul(S,R0)|0,j=j+Math.imul(S,E0)|0,$=$+Math.imul(F0,x0)|0,G=G+Math.imul(F0,v0)|0,G=G+Math.imul(Z0,x0)|0,j=j+Math.imul(Z0,v0)|0,$=$+Math.imul(Q0,S0)|0,G=G+Math.imul(Q0,A0)|0,G=G+Math.imul(V0,S0)|0,j=j+Math.imul(V0,A0)|0,$=$+Math.imul(G0,M0)|0,G=G+Math.imul(G0,w0)|0,G=G+Math.imul(t,M0)|0,j=j+Math.imul(t,w0)|0;var G2=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(G2>>>26)|0,G2&=67108863,$=Math.imul(h,R0),G=Math.imul(h,E0),G=G+Math.imul(u,R0)|0,j=Math.imul(u,E0),$=$+Math.imul(D,x0)|0,G=G+Math.imul(D,v0)|0,G=G+Math.imul(S,x0)|0,j=j+Math.imul(S,v0)|0,$=$+Math.imul(F0,S0)|0,G=G+Math.imul(F0,A0)|0,G=G+Math.imul(Z0,S0)|0,j=j+Math.imul(Z0,A0)|0,$=$+Math.imul(Q0,M0)|0,G=G+Math.imul(Q0,w0)|0,G=G+Math.imul(V0,M0)|0,j=j+Math.imul(V0,w0)|0;var Y2=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(Y2>>>26)|0,Y2&=67108863,$=Math.imul(h,x0),G=Math.imul(h,v0),G=G+Math.imul(u,x0)|0,j=Math.imul(u,v0),$=$+Math.imul(D,S0)|0,G=G+Math.imul(D,A0)|0,G=G+Math.imul(S,S0)|0,j=j+Math.imul(S,A0)|0,$=$+Math.imul(F0,M0)|0,G=G+Math.imul(F0,w0)|0,G=G+Math.imul(Z0,M0)|0,j=j+Math.imul(Z0,w0)|0;var J2=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(J2>>>26)|0,J2&=67108863,$=Math.imul(h,S0),G=Math.imul(h,A0),G=G+Math.imul(u,S0)|0,j=Math.imul(u,A0),$=$+Math.imul(D,M0)|0,G=G+Math.imul(D,w0)|0,G=G+Math.imul(S,M0)|0,j=j+Math.imul(S,w0)|0;var C2=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(C2>>>26)|0,C2&=67108863,$=Math.imul(h,M0),G=Math.imul(h,w0),G=G+Math.imul(u,M0)|0,j=Math.imul(u,w0);var z2=(K+$|0)+((G&8191)<<13)|0;return K=(j+(G>>>13)|0)+(z2>>>26)|0,z2&=67108863,V[0]=Q2,V[1]=m0,V[2]=p0,V[3]=o0,V[4]=u0,V[5]=s0,V[6]=f0,V[7]=a0,V[8]=n0,V[9]=r0,V[10]=i0,V[11]=t0,V[12]=e0,V[13]=X2,V[14]=G2,V[15]=Y2,V[16]=J2,V[17]=C2,V[18]=z2,K!==0&&(V[19]=K,C.length++),C};Math.imul||(x=q);function w(X,Y,C){C.negative=Y.negative^X.negative,C.length=X.length+Y.length;for(var J=0,z=0,V=0;V>>26)|0,z+=K>>>26,K&=67108863}C.words[V]=$,J=K,K=z}return J!==0?C.words[V]=J:C.length--,C.strip()}function M(X,Y,C){var J=new y;return J.mulp(X,Y,C)}Q.prototype.mulTo=function(X,Y){var C,J=this.length+X.length;return this.length===10&&X.length===10?C=x(this,X,Y):J<63?C=q(this,X,Y):J<1024?C=w(this,X,Y):C=M(this,X,Y),C};function y(X,Y){this.x=X,this.y=Y}y.prototype.makeRBT=function(X){for(var Y=new Array(X),C=Q.prototype._countBits(X)-1,J=0;J>=1;return J},y.prototype.permute=function(X,Y,C,J,z,V){for(var K=0;K>>1)z++;return 1<>>13,C[2*V+1]=z&8191,z=z>>>13;for(V=2*Y;V>=26,Y+=J/67108864|0,Y+=z>>>26,this.words[C]=z&67108863}return Y!==0&&(this.words[C]=Y,this.length++),this},Q.prototype.muln=function(X){return this.clone().imuln(X)},Q.prototype.sqr=function(){return this.mul(this)},Q.prototype.isqr=function(){return this.imul(this.clone())},Q.prototype.pow=function(X){var Y=P(X);if(Y.length===0)return new Q(1);for(var C=this,J=0;J=0);var Y=X%26,C=(X-Y)/26,J=67108863>>>26-Y<<26-Y,z;if(Y!==0){var V=0;for(z=0;z>>26-Y}V&&(this.words[z]=V,this.length++)}if(C!==0){for(z=this.length-1;z>=0;z--)this.words[z+C]=this.words[z];for(z=0;z=0);var J;Y?J=(Y-Y%26)/26:J=0;var z=X%26,V=Math.min((X-z)/26,this.length),K=67108863^67108863>>>z<V)for(this.length-=V,G=0;G=0&&(j!==0||G>=J);G--){var A=this.words[G]|0;this.words[G]=j<<26-z|A>>>z,j=A&K}return $&&j!==0&&($.words[$.length++]=j),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},Q.prototype.ishrn=function(X,Y,C){return H(this.negative===0),this.iushrn(X,Y,C)},Q.prototype.shln=function(X){return this.clone().ishln(X)},Q.prototype.ushln=function(X){return this.clone().iushln(X)},Q.prototype.shrn=function(X){return this.clone().ishrn(X)},Q.prototype.ushrn=function(X){return this.clone().iushrn(X)},Q.prototype.testn=function(X){H(typeof X=="number"&&X>=0);var Y=X%26,C=(X-Y)/26,J=1<=0);var Y=X%26,C=(X-Y)/26;if(H(this.negative===0,"imaskn works only with positive numbers"),this.length<=C)return this;if(Y!==0&&C++,this.length=Math.min(C,this.length),Y!==0){var J=67108863^67108863>>>Y<=67108864;Y++)this.words[Y]-=67108864,Y===this.length-1?this.words[Y+1]=1:this.words[Y+1]++;return this.length=Math.max(this.length,Y+1),this},Q.prototype.isubn=function(X){if(H(typeof X=="number"),H(X<67108864),X<0)return this.iaddn(-X);if(this.negative!==0)return this.negative=0,this.iaddn(X),this.negative=1,this;if(this.words[0]-=X,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var Y=0;Y>26)-($/67108864|0),this.words[z+C]=V&67108863}for(;z>26,this.words[z+C]=V&67108863;if(K===0)return this.strip();for(H(K===-1),K=0,z=0;z>26,this.words[z]=V&67108863;return this.negative=1,this.strip()},Q.prototype._wordDiv=function(X,Y){var C=this.length-X.length,J=this.clone(),z=X,V=z.words[z.length-1]|0,K=this._countBits(V);C=26-K,C!==0&&(z=z.ushln(C),J.iushln(C),V=z.words[z.length-1]|0);var $=J.length-z.length,G;if(Y!=="mod"){G=new Q(null),G.length=$+1,G.words=new Array(G.length);for(var j=0;j=0;R--){var _=(J.words[z.length+R]|0)*67108864+(J.words[z.length+R-1]|0);for(_=Math.min(_/V|0,67108863),J._ishlnsubmul(z,_,R);J.negative!==0;)_--,J.negative=0,J._ishlnsubmul(z,1,R),J.isZero()||(J.negative^=1);G&&(G.words[R]=_)}return G&&G.strip(),J.strip(),Y!=="div"&&C!==0&&J.iushrn(C),{div:G||null,mod:J}},Q.prototype.divmod=function(X,Y,C){if(H(!X.isZero()),this.isZero())return{div:new Q(0),mod:new Q(0)};var J,z,V;return this.negative!==0&&X.negative===0?(V=this.neg().divmod(X,Y),Y!=="mod"&&(J=V.div.neg()),Y!=="div"&&(z=V.mod.neg(),C&&z.negative!==0&&z.iadd(X)),{div:J,mod:z}):this.negative===0&&X.negative!==0?(V=this.divmod(X.neg(),Y),Y!=="mod"&&(J=V.div.neg()),{div:J,mod:V.mod}):(this.negative&X.negative)!==0?(V=this.neg().divmod(X.neg(),Y),Y!=="div"&&(z=V.mod.neg(),C&&z.negative!==0&&z.isub(X)),{div:V.div,mod:z}):X.length>this.length||this.cmp(X)<0?{div:new Q(0),mod:this}:X.length===1?Y==="div"?{div:this.divn(X.words[0]),mod:null}:Y==="mod"?{div:null,mod:new Q(this.modn(X.words[0]))}:{div:this.divn(X.words[0]),mod:new Q(this.modn(X.words[0]))}:this._wordDiv(X,Y)},Q.prototype.div=function(X){return this.divmod(X,"div",!1).div},Q.prototype.mod=function(X){return this.divmod(X,"mod",!1).mod},Q.prototype.umod=function(X){return this.divmod(X,"mod",!0).mod},Q.prototype.divRound=function(X){var Y=this.divmod(X);if(Y.mod.isZero())return Y.div;var C=Y.div.negative!==0?Y.mod.isub(X):Y.mod,J=X.ushrn(1),z=X.andln(1),V=C.cmp(J);return V<0||z===1&&V===0?Y.div:Y.div.negative!==0?Y.div.isubn(1):Y.div.iaddn(1)},Q.prototype.modn=function(X){H(X<=67108863);for(var Y=(1<<26)%X,C=0,J=this.length-1;J>=0;J--)C=(Y*C+(this.words[J]|0))%X;return C},Q.prototype.idivn=function(X){H(X<=67108863);for(var Y=0,C=this.length-1;C>=0;C--){var J=(this.words[C]|0)+Y*67108864;this.words[C]=J/X|0,Y=J%X}return this.strip()},Q.prototype.divn=function(X){return this.clone().idivn(X)},Q.prototype.egcd=function(X){H(X.negative===0),H(!X.isZero());var Y=this,C=X.clone();Y.negative!==0?Y=Y.umod(X):Y=Y.clone();for(var J=new Q(1),z=new Q(0),V=new Q(0),K=new Q(1),$=0;Y.isEven()&&C.isEven();)Y.iushrn(1),C.iushrn(1),++$;for(var G=C.clone(),j=Y.clone();!Y.isZero();){for(var A=0,R=1;(Y.words[0]&R)===0&&A<26;++A,R<<=1);if(A>0)for(Y.iushrn(A);A-- >0;)(J.isOdd()||z.isOdd())&&(J.iadd(G),z.isub(j)),J.iushrn(1),z.iushrn(1);for(var _=0,s=1;(C.words[0]&s)===0&&_<26;++_,s<<=1);if(_>0)for(C.iushrn(_);_-- >0;)(V.isOdd()||K.isOdd())&&(V.iadd(G),K.isub(j)),V.iushrn(1),K.iushrn(1);Y.cmp(C)>=0?(Y.isub(C),J.isub(V),z.isub(K)):(C.isub(Y),V.isub(J),K.isub(z))}return{a:V,b:K,gcd:C.iushln($)}},Q.prototype._invmp=function(X){H(X.negative===0),H(!X.isZero());var Y=this,C=X.clone();Y.negative!==0?Y=Y.umod(X):Y=Y.clone();for(var J=new Q(1),z=new Q(0),V=C.clone();Y.cmpn(1)>0&&C.cmpn(1)>0;){for(var K=0,$=1;(Y.words[0]&$)===0&&K<26;++K,$<<=1);if(K>0)for(Y.iushrn(K);K-- >0;)J.isOdd()&&J.iadd(V),J.iushrn(1);for(var G=0,j=1;(C.words[0]&j)===0&&G<26;++G,j<<=1);if(G>0)for(C.iushrn(G);G-- >0;)z.isOdd()&&z.iadd(V),z.iushrn(1);Y.cmp(C)>=0?(Y.isub(C),J.isub(z)):(C.isub(Y),z.isub(J))}var A;return Y.cmpn(1)===0?A=J:A=z,A.cmpn(0)<0&&A.iadd(X),A},Q.prototype.gcd=function(X){if(this.isZero())return X.abs();if(X.isZero())return this.abs();var Y=this.clone(),C=X.clone();Y.negative=0,C.negative=0;for(var J=0;Y.isEven()&&C.isEven();J++)Y.iushrn(1),C.iushrn(1);do{for(;Y.isEven();)Y.iushrn(1);for(;C.isEven();)C.iushrn(1);var z=Y.cmp(C);if(z<0){var V=Y;Y=C,C=V}else if(z===0||C.cmpn(1)===0)break;Y.isub(C)}while(!0);return C.iushln(J)},Q.prototype.invm=function(X){return this.egcd(X).a.umod(X)},Q.prototype.isEven=function(){return(this.words[0]&1)===0},Q.prototype.isOdd=function(){return(this.words[0]&1)===1},Q.prototype.andln=function(X){return this.words[0]&X},Q.prototype.bincn=function(X){H(typeof X=="number");var Y=X%26,C=(X-Y)/26,J=1<>>26,K&=67108863,this.words[V]=K}return z!==0&&(this.words[V]=z,this.length++),this},Q.prototype.isZero=function(){return this.length===1&&this.words[0]===0},Q.prototype.cmpn=function(X){var Y=X<0;if(this.negative!==0&&!Y)return-1;if(this.negative===0&&Y)return 1;this.strip();var C;if(this.length>1)C=1;else{Y&&(X=-X),H(X<=67108863,"Number is too big");var J=this.words[0]|0;C=J===X?0:JX.length)return 1;if(this.length=0;C--){var J=this.words[C]|0,z=X.words[C]|0;if(J!==z){Jz&&(Y=1);break}}return Y},Q.prototype.gtn=function(X){return this.cmpn(X)===1},Q.prototype.gt=function(X){return this.cmp(X)===1},Q.prototype.gten=function(X){return this.cmpn(X)>=0},Q.prototype.gte=function(X){return this.cmp(X)>=0},Q.prototype.ltn=function(X){return this.cmpn(X)===-1},Q.prototype.lt=function(X){return this.cmp(X)===-1},Q.prototype.lten=function(X){return this.cmpn(X)<=0},Q.prototype.lte=function(X){return this.cmp(X)<=0},Q.prototype.eqn=function(X){return this.cmpn(X)===0},Q.prototype.eq=function(X){return this.cmp(X)===0},Q.red=function(X){return new a(X)},Q.prototype.toRed=function(X){return H(!this.red,"Already a number in reduction context"),H(this.negative===0,"red works only with positives"),X.convertTo(this)._forceRed(X)},Q.prototype.fromRed=function(){return H(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},Q.prototype._forceRed=function(X){return this.red=X,this},Q.prototype.forceRed=function(X){return H(!this.red,"Already a number in reduction context"),this._forceRed(X)},Q.prototype.redAdd=function(X){return H(this.red,"redAdd works only with red numbers"),this.red.add(this,X)},Q.prototype.redIAdd=function(X){return H(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,X)},Q.prototype.redSub=function(X){return H(this.red,"redSub works only with red numbers"),this.red.sub(this,X)},Q.prototype.redISub=function(X){return H(this.red,"redISub works only with red numbers"),this.red.isub(this,X)},Q.prototype.redShl=function(X){return H(this.red,"redShl works only with red numbers"),this.red.shl(this,X)},Q.prototype.redMul=function(X){return H(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.mul(this,X)},Q.prototype.redIMul=function(X){return H(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.imul(this,X)},Q.prototype.redSqr=function(){return H(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},Q.prototype.redISqr=function(){return H(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},Q.prototype.redSqrt=function(){return H(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},Q.prototype.redInvm=function(){return H(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},Q.prototype.redNeg=function(){return H(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},Q.prototype.redPow=function(X){return H(this.red&&!X.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,X)};var m={k256:null,p224:null,p192:null,p25519:null};function c(X,Y){this.name=X,this.p=new Q(Y,16),this.n=this.p.bitLength(),this.k=new Q(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}c.prototype._tmp=function(){var X=new Q(null);return X.words=new Array(Math.ceil(this.n/13)),X},c.prototype.ireduce=function(X){var Y=X,C;do this.split(Y,this.tmp),Y=this.imulK(Y),Y=Y.iadd(this.tmp),C=Y.bitLength();while(C>this.n);var J=C0?Y.isub(this.p):Y.strip!==void 0?Y.strip():Y._strip(),Y},c.prototype.split=function(X,Y){X.iushrn(this.n,0,Y)},c.prototype.imulK=function(X){return X.imul(this.k)};function l(){c.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}k(l,c),l.prototype.split=function(X,Y){for(var C=4194303,J=Math.min(X.length,9),z=0;z>>22,V=K}V>>>=22,X.words[z-10]=V,V===0&&X.length>10?X.length-=10:X.length-=9},l.prototype.imulK=function(X){X.words[X.length]=0,X.words[X.length+1]=0,X.length+=2;for(var Y=0,C=0;C>>=26,X.words[C]=z,Y=J}return Y!==0&&(X.words[X.length++]=Y),X},Q._prime=function(X){if(m[X])return m[X];var Y;if(X==="k256")Y=new l;else if(X==="p224")Y=new n;else if(X==="p192")Y=new i;else if(X==="p25519")Y=new C0;else throw new Error("Unknown prime "+X);return m[X]=Y,Y};function a(X){if(typeof X=="string"){var Y=Q._prime(X);this.m=Y.p,this.prime=Y}else H(X.gtn(1),"modulus must be greater than 1"),this.m=X,this.prime=null}a.prototype._verify1=function(X){H(X.negative===0,"red works only with positives"),H(X.red,"red works only with red numbers")},a.prototype._verify2=function(X,Y){H((X.negative|Y.negative)===0,"red works only with positives"),H(X.red&&X.red===Y.red,"red works only with red numbers")},a.prototype.imod=function(X){return this.prime?this.prime.ireduce(X)._forceRed(this):X.umod(this.m)._forceRed(this)},a.prototype.neg=function(X){return X.isZero()?X.clone():this.m.sub(X)._forceRed(this)},a.prototype.add=function(X,Y){this._verify2(X,Y);var C=X.add(Y);return C.cmp(this.m)>=0&&C.isub(this.m),C._forceRed(this)},a.prototype.iadd=function(X,Y){this._verify2(X,Y);var C=X.iadd(Y);return C.cmp(this.m)>=0&&C.isub(this.m),C},a.prototype.sub=function(X,Y){this._verify2(X,Y);var C=X.sub(Y);return C.cmpn(0)<0&&C.iadd(this.m),C._forceRed(this)},a.prototype.isub=function(X,Y){this._verify2(X,Y);var C=X.isub(Y);return C.cmpn(0)<0&&C.iadd(this.m),C},a.prototype.shl=function(X,Y){return this._verify1(X),this.imod(X.ushln(Y))},a.prototype.imul=function(X,Y){return this._verify2(X,Y),this.imod(X.imul(Y))},a.prototype.mul=function(X,Y){return this._verify2(X,Y),this.imod(X.mul(Y))},a.prototype.isqr=function(X){return this.imul(X,X.clone())},a.prototype.sqr=function(X){return this.mul(X,X)},a.prototype.sqrt=function(X){if(X.isZero())return X.clone();var Y=this.m.andln(3);if(H(Y%2===1),Y===3){var C=this.m.add(new Q(1)).iushrn(2);return this.pow(X,C)}for(var J=this.m.subn(1),z=0;!J.isZero()&&J.andln(1)===0;)z++,J.iushrn(1);H(!J.isZero());var V=new Q(1).toRed(this),K=V.redNeg(),$=this.m.subn(1).iushrn(1),G=this.m.bitLength();for(G=new Q(2*G*G).toRed(this);this.pow(G,$).cmp(K)!==0;)G.redIAdd(K);for(var j=this.pow(G,J),A=this.pow(X,J.addn(1).iushrn(1)),R=this.pow(X,J),_=z;R.cmp(V)!==0;){for(var s=R,r=0;s.cmp(V)!==0;r++)s=s.redSqr();H(r<_);var Y0=this.pow(j,new Q(1).iushln(_-r-1));A=A.redMul(Y0),j=Y0.redSqr(),R=R.redMul(j),_=r}return A},a.prototype.invm=function(X){var Y=X._invmp(this.m);return Y.negative!==0?(Y.negative=0,this.imod(Y).redNeg()):this.imod(Y)},a.prototype.pow=function(X,Y){if(Y.isZero())return new Q(1).toRed(this);if(Y.cmpn(1)===0)return X.clone();var C=4,J=new Array(1<=0;z--){for(var j=Y.words[z],A=G-1;A>=0;A--){var R=j>>A&1;if(V!==J[0]&&(V=this.sqr(V)),R===0&&K===0){$=0;continue}K<<=1,K|=R,$++,!($!==C&&(z!==0||A!==0))&&(V=this.mul(V,J[K]),$=0,K=0)}G=26}return V},a.prototype.convertTo=function(X){var Y=X.umod(this.m);return Y===X?Y.clone():Y},a.prototype.convertFrom=function(X){var Y=X.clone();return Y.red=null,Y},Q.mont=function(X){return new K0(X)};function K0(X){a.call(this,X),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new Q(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)}k(K0,a),K0.prototype.convertTo=function(X){return this.imod(X.ushln(this.shift))},K0.prototype.convertFrom=function(X){var Y=this.imod(X.mul(this.rinv));return Y.red=null,Y},K0.prototype.imul=function(X,Y){if(X.isZero()||Y.isZero())return X.words[0]=0,X.length=1,X;var C=X.imul(Y),J=C.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),z=C.isub(J).iushrn(this.shift),V=z;return z.cmp(this.m)>=0?V=z.isub(this.m):z.cmpn(0)<0&&(V=z.iadd(this.m)),V._forceRed(this)},K0.prototype.mul=function(X,Y){if(X.isZero()||Y.isZero())return new Q(0)._forceRed(this);var C=X.mul(Y),J=C.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),z=C.isub(J).iushrn(this.shift),V=z;return z.cmp(this.m)>=0?V=z.isub(this.m):z.cmpn(0)<0&&(V=z.iadd(this.m)),V._forceRed(this)},K0.prototype.invm=function(X){var Y=this.imod(X._invmp(this.m).mul(this.r2));return Y._forceRed(this)}})(typeof I>"u"||I,E)}),X6=$0((E)=>{var I=E;function F(k,Q){if(Array.isArray(k))return k.slice();if(!k)return[];var O=[];if(typeof k!="string"){for(var N=0;N>8,Z=U&255;W?O.push(W,Z):O.push(Z)}return O}I.toArray=F;function L(k){return k.length===1?"0"+k:k}I.zero2=L;function H(k){for(var Q="",O=0;O{var I=E,F=B2(),L=P2(),H=X6();I.assert=L,I.toArray=H.toArray,I.zero2=H.zero2,I.toHex=H.toHex,I.encode=H.encode;function k(W,Z,T){var B=new Array(Math.max(W.bitLength(),T)+1);B.fill(0);for(var P=1<(P>>1)-1?w=(P>>1)-M:w=M,q.isubn(w)):w=0,B[x]=w,q.iushrn(1)}return B}I.getNAF=k;function Q(W,Z){var T=[[],[]];W=W.clone(),Z=Z.clone();for(var B=0,P=0,q;W.cmpn(-B)>0||Z.cmpn(-P)>0;){var x=W.andln(3)+B&3,w=Z.andln(3)+P&3;x===3&&(x=-1),w===3&&(w=-1);var M;(x&1)===0?M=0:(q=W.andln(7)+B&7,(q===3||q===5)&&w===2?M=-x:M=x),T[0].push(M);var y;(w&1)===0?y=0:(q=Z.andln(7)+P&7,(q===3||q===5)&&x===2?y=-w:y=w),T[1].push(y),2*B===M+1&&(B=1-B),2*P===y+1&&(P=1-P),W.iushrn(1),Z.iushrn(1)}return T}I.getJSF=Q;function O(W,Z,T){var B="_"+Z;W.prototype[Z]=function(){return this[B]!==void 0?this[B]:this[B]=T.call(this)}}I.cachedProperty=O;function N(W){return typeof W=="string"?I.toArray(W,"hex"):W}I.parseBytes=N;function U(W){return new F(W,"hex","le")}I.intFromLE=U}),V1=$0((E,I)=>{var F=B2(),L=T2(),H=L.getNAF,k=L.getJSF,Q=L.assert;function O(U,W){this.type=U,this.p=new F(W.p,16),this.red=W.prime?F.red(W.prime):F.mont(this.p),this.zero=new F(0).toRed(this.red),this.one=new F(1).toRed(this.red),this.two=new F(2).toRed(this.red),this.n=W.n&&new F(W.n,16),this.g=W.g&&this.pointFromJSON(W.g,W.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 Z=this.n&&this.p.div(this.n);!Z||Z.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}I.exports=O,O.prototype.point=function(){throw new Error("Not implemented")},O.prototype.validate=function(){throw new Error("Not implemented")},O.prototype._fixedNafMul=function(U,W){Q(U.precomputed);var Z=U._getDoubles(),T=H(W,1,this._bitLength),B=(1<=q;w--)x=(x<<1)+T[w];P.push(x)}for(var M=this.jpoint(null,null,null),y=this.jpoint(null,null,null),m=B;m>0;m--){for(q=0;q=0;x--){for(var w=0;x>=0&&P[x]===0;x--)w++;if(x>=0&&w++,q=q.dblp(w),x<0)break;var M=P[x];Q(M!==0),U.type==="affine"?M>0?q=q.mixedAdd(B[M-1>>1]):q=q.mixedAdd(B[-M-1>>1].neg()):M>0?q=q.add(B[M-1>>1]):q=q.add(B[-M-1>>1].neg())}return U.type==="affine"?q.toP():q},O.prototype._wnafMulAdd=function(U,W,Z,T,B){var P=this._wnafT1,q=this._wnafT2,x=this._wnafT3,w=0,M,y,m;for(M=0;M=1;M-=2){var l=M-1,n=M;if(P[l]!==1||P[n]!==1){x[l]=H(Z[l],P[l],this._bitLength),x[n]=H(Z[n],P[n],this._bitLength),w=Math.max(x[l].length,w),w=Math.max(x[n].length,w);continue}var i=[W[l],null,null,W[n]];W[l].y.cmp(W[n].y)===0?(i[1]=W[l].add(W[n]),i[2]=W[l].toJ().mixedAdd(W[n].neg())):W[l].y.cmp(W[n].y.redNeg())===0?(i[1]=W[l].toJ().mixedAdd(W[n]),i[2]=W[l].add(W[n].neg())):(i[1]=W[l].toJ().mixedAdd(W[n]),i[2]=W[l].toJ().mixedAdd(W[n].neg()));var C0=[-3,-1,-5,-7,0,7,5,1,3],a=k(Z[l],Z[n]);for(w=Math.max(a[0].length,w),x[l]=new Array(w),x[n]=new Array(w),y=0;y=0;M--){for(var J=0;M>=0;){var z=!0;for(y=0;y=0&&J++,Y=Y.dblp(J),M<0)break;for(y=0;y0?m=q[y][V-1>>1]:V<0&&(m=q[y][-V-1>>1].neg()),m.type==="affine"?Y=Y.mixedAdd(m):Y=Y.add(m))}}for(M=0;M=Math.ceil((U.bitLength()+1)/W.step):!1},N.prototype._getDoubles=function(U,W){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var Z=[this],T=this,B=0;B{var F=T2(),L=B2(),H=c0(),k=V1(),Q=F.assert;function O(W){k.call(this,"short",W),this.a=new L(W.a,16).toRed(this.red),this.b=new L(W.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(W),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}H(O,k),I.exports=O,O.prototype._getEndomorphism=function(W){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var Z,T;if(W.beta)Z=new L(W.beta,16).toRed(this.red);else{var B=this._getEndoRoots(this.p);Z=B[0].cmp(B[1])<0?B[0]:B[1],Z=Z.toRed(this.red)}if(W.lambda)T=new L(W.lambda,16);else{var P=this._getEndoRoots(this.n);this.g.mul(P[0]).x.cmp(this.g.x.redMul(Z))===0?T=P[0]:(T=P[1],Q(this.g.mul(T).x.cmp(this.g.x.redMul(Z))===0))}var q;return W.basis?q=W.basis.map(function(x){return{a:new L(x.a,16),b:new L(x.b,16)}}):q=this._getEndoBasis(T),{beta:Z,lambda:T,basis:q}}},O.prototype._getEndoRoots=function(W){var Z=W===this.p?this.red:L.mont(W),T=new L(2).toRed(Z).redInvm(),B=T.redNeg(),P=new L(3).toRed(Z).redNeg().redSqrt().redMul(T),q=B.redAdd(P).fromRed(),x=B.redSub(P).fromRed();return[q,x]},O.prototype._getEndoBasis=function(W){for(var Z=this.n.ushrn(Math.floor(this.n.bitLength()/2)),T=W,B=this.n.clone(),P=new L(1),q=new L(0),x=new L(0),w=new L(1),M,y,m,c,l,n,i,C0=0,a,K0;T.cmpn(0)!==0;){var X=B.div(T);a=B.sub(X.mul(T)),K0=x.sub(X.mul(P));var Y=w.sub(X.mul(q));if(!m&&a.cmp(Z)<0)M=i.neg(),y=P,m=a.neg(),c=K0;else if(m&&++C0===2)break;i=a,B=T,T=a,x=P,P=K0,w=q,q=Y}l=a.neg(),n=K0;var C=m.sqr().add(c.sqr()),J=l.sqr().add(n.sqr());return J.cmp(C)>=0&&(l=M,n=y),m.negative&&(m=m.neg(),c=c.neg()),l.negative&&(l=l.neg(),n=n.neg()),[{a:m,b:c},{a:l,b:n}]},O.prototype._endoSplit=function(W){var Z=this.endo.basis,T=Z[0],B=Z[1],P=B.b.mul(W).divRound(this.n),q=T.b.neg().mul(W).divRound(this.n),x=P.mul(T.a),w=q.mul(B.a),M=P.mul(T.b),y=q.mul(B.b),m=W.sub(x).sub(w),c=M.add(y).neg();return{k1:m,k2:c}},O.prototype.pointFromX=function(W,Z){W=new L(W,16),W.red||(W=W.toRed(this.red));var T=W.redSqr().redMul(W).redIAdd(W.redMul(this.a)).redIAdd(this.b),B=T.redSqrt();if(B.redSqr().redSub(T).cmp(this.zero)!==0)throw new Error("invalid point");var P=B.fromRed().isOdd();return(Z&&!P||!Z&&P)&&(B=B.redNeg()),this.point(W,B)},O.prototype.validate=function(W){if(W.inf)return!0;var{x:Z,y:T}=W,B=this.a.redMul(Z),P=Z.redSqr().redMul(Z).redIAdd(B).redIAdd(this.b);return T.redSqr().redISub(P).cmpn(0)===0},O.prototype._endoWnafMulAdd=function(W,Z,T){for(var B=this._endoWnafT1,P=this._endoWnafT2,q=0;q":""},N.prototype.isInfinity=function(){return this.inf},N.prototype.add=function(W){if(this.inf)return W;if(W.inf)return this;if(this.eq(W))return this.dbl();if(this.neg().eq(W))return this.curve.point(null,null);if(this.x.cmp(W.x)===0)return this.curve.point(null,null);var Z=this.y.redSub(W.y);Z.cmpn(0)!==0&&(Z=Z.redMul(this.x.redSub(W.x).redInvm()));var T=Z.redSqr().redISub(this.x).redISub(W.x),B=Z.redMul(this.x.redSub(T)).redISub(this.y);return this.curve.point(T,B)},N.prototype.dbl=function(){if(this.inf)return this;var W=this.y.redAdd(this.y);if(W.cmpn(0)===0)return this.curve.point(null,null);var Z=this.curve.a,T=this.x.redSqr(),B=W.redInvm(),P=T.redAdd(T).redIAdd(T).redIAdd(Z).redMul(B),q=P.redSqr().redISub(this.x.redAdd(this.x)),x=P.redMul(this.x.redSub(q)).redISub(this.y);return this.curve.point(q,x)},N.prototype.getX=function(){return this.x.fromRed()},N.prototype.getY=function(){return this.y.fromRed()},N.prototype.mul=function(W){return W=new L(W,16),this.isInfinity()?this:this._hasDoubles(W)?this.curve._fixedNafMul(this,W):this.curve.endo?this.curve._endoWnafMulAdd([this],[W]):this.curve._wnafMul(this,W)},N.prototype.mulAdd=function(W,Z,T){var B=[this,Z],P=[W,T];return this.curve.endo?this.curve._endoWnafMulAdd(B,P):this.curve._wnafMulAdd(1,B,P,2)},N.prototype.jmulAdd=function(W,Z,T){var B=[this,Z],P=[W,T];return this.curve.endo?this.curve._endoWnafMulAdd(B,P,!0):this.curve._wnafMulAdd(1,B,P,2,!0)},N.prototype.eq=function(W){return this===W||this.inf===W.inf&&(this.inf||this.x.cmp(W.x)===0&&this.y.cmp(W.y)===0)},N.prototype.neg=function(W){if(this.inf)return this;var Z=this.curve.point(this.x,this.y.redNeg());if(W&&this.precomputed){var T=this.precomputed,B=function(P){return P.neg()};Z.precomputed={naf:T.naf&&{wnd:T.naf.wnd,points:T.naf.points.map(B)},doubles:T.doubles&&{step:T.doubles.step,points:T.doubles.points.map(B)}}}return Z},N.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var W=this.curve.jpoint(this.x,this.y,this.curve.one);return W};function U(W,Z,T,B){k.BasePoint.call(this,W,"jacobian"),Z===null&&T===null&&B===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new L(0)):(this.x=new L(Z,16),this.y=new L(T,16),this.z=new L(B,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}H(U,k.BasePoint),O.prototype.jpoint=function(W,Z,T){return new U(this,W,Z,T)},U.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var W=this.z.redInvm(),Z=W.redSqr(),T=this.x.redMul(Z),B=this.y.redMul(Z).redMul(W);return this.curve.point(T,B)},U.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},U.prototype.add=function(W){if(this.isInfinity())return W;if(W.isInfinity())return this;var Z=W.z.redSqr(),T=this.z.redSqr(),B=this.x.redMul(Z),P=W.x.redMul(T),q=this.y.redMul(Z.redMul(W.z)),x=W.y.redMul(T.redMul(this.z)),w=B.redSub(P),M=q.redSub(x);if(w.cmpn(0)===0)return M.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var y=w.redSqr(),m=y.redMul(w),c=B.redMul(y),l=M.redSqr().redIAdd(m).redISub(c).redISub(c),n=M.redMul(c.redISub(l)).redISub(q.redMul(m)),i=this.z.redMul(W.z).redMul(w);return this.curve.jpoint(l,n,i)},U.prototype.mixedAdd=function(W){if(this.isInfinity())return W.toJ();if(W.isInfinity())return this;var Z=this.z.redSqr(),T=this.x,B=W.x.redMul(Z),P=this.y,q=W.y.redMul(Z).redMul(this.z),x=T.redSub(B),w=P.redSub(q);if(x.cmpn(0)===0)return w.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var M=x.redSqr(),y=M.redMul(x),m=T.redMul(M),c=w.redSqr().redIAdd(y).redISub(m).redISub(m),l=w.redMul(m.redISub(c)).redISub(P.redMul(y)),n=this.z.redMul(x);return this.curve.jpoint(c,l,n)},U.prototype.dblp=function(W){if(W===0)return this;if(this.isInfinity())return this;if(!W)return this.dbl();var Z;if(this.curve.zeroA||this.curve.threeA){var T=this;for(Z=0;Z=0)return!1;if(T.redIAdd(P),this.x.cmp(T)===0)return!0}},U.prototype.inspect=function(){return this.isInfinity()?"":""},U.prototype.isInfinity=function(){return this.z.cmpn(0)===0}}),c8=$0((E,I)=>{var F=B2(),L=c0(),H=V1(),k=T2();function Q(N){H.call(this,"mont",N),this.a=new F(N.a,16).toRed(this.red),this.b=new F(N.b,16).toRed(this.red),this.i4=new F(4).toRed(this.red).redInvm(),this.two=new F(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}L(Q,H),I.exports=Q,Q.prototype.validate=function(N){var U=N.normalize().x,W=U.redSqr(),Z=W.redMul(U).redAdd(W.redMul(this.a)).redAdd(U),T=Z.redSqrt();return T.redSqr().cmp(Z)===0};function O(N,U,W){H.BasePoint.call(this,N,"projective"),U===null&&W===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new F(U,16),this.z=new F(W,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}L(O,H.BasePoint),Q.prototype.decodePoint=function(N,U){return this.point(k.toArray(N,U),1)},Q.prototype.point=function(N,U){return new O(this,N,U)},Q.prototype.pointFromJSON=function(N){return O.fromJSON(this,N)},O.prototype.precompute=function(){},O.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},O.fromJSON=function(N,U){return new O(N,U[0],U[1]||N.one)},O.prototype.inspect=function(){return this.isInfinity()?"":""},O.prototype.isInfinity=function(){return this.z.cmpn(0)===0},O.prototype.dbl=function(){var N=this.x.redAdd(this.z),U=N.redSqr(),W=this.x.redSub(this.z),Z=W.redSqr(),T=U.redSub(Z),B=U.redMul(Z),P=T.redMul(Z.redAdd(this.curve.a24.redMul(T)));return this.curve.point(B,P)},O.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},O.prototype.diffAdd=function(N,U){var W=this.x.redAdd(this.z),Z=this.x.redSub(this.z),T=N.x.redAdd(N.z),B=N.x.redSub(N.z),P=B.redMul(W),q=T.redMul(Z),x=U.z.redMul(P.redAdd(q).redSqr()),w=U.x.redMul(P.redISub(q).redSqr());return this.curve.point(x,w)},O.prototype.mul=function(N){for(var U=N.clone(),W=this,Z=this.curve.point(null,null),T=this,B=[];U.cmpn(0)!==0;U.iushrn(1))B.push(U.andln(1));for(var P=B.length-1;P>=0;P--)B[P]===0?(W=W.diffAdd(Z,T),Z=Z.dbl()):(Z=W.diffAdd(Z,T),W=W.dbl());return Z},O.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},O.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},O.prototype.eq=function(N){return this.getX().cmp(N.getX())===0},O.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},O.prototype.getX=function(){return this.normalize(),this.x.fromRed()}}),d8=$0((E,I)=>{var F=T2(),L=B2(),H=c0(),k=V1(),Q=F.assert;function O(U){this.twisted=(U.a|0)!==1,this.mOneA=this.twisted&&(U.a|0)===-1,this.extended=this.mOneA,k.call(this,"edwards",U),this.a=new L(U.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new L(U.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new L(U.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),Q(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(U.c|0)===1}H(O,k),I.exports=O,O.prototype._mulA=function(U){return this.mOneA?U.redNeg():this.a.redMul(U)},O.prototype._mulC=function(U){return this.oneC?U:this.c.redMul(U)},O.prototype.jpoint=function(U,W,Z,T){return this.point(U,W,Z,T)},O.prototype.pointFromX=function(U,W){U=new L(U,16),U.red||(U=U.toRed(this.red));var Z=U.redSqr(),T=this.c2.redSub(this.a.redMul(Z)),B=this.one.redSub(this.c2.redMul(this.d).redMul(Z)),P=T.redMul(B.redInvm()),q=P.redSqrt();if(q.redSqr().redSub(P).cmp(this.zero)!==0)throw new Error("invalid point");var x=q.fromRed().isOdd();return(W&&!x||!W&&x)&&(q=q.redNeg()),this.point(U,q)},O.prototype.pointFromY=function(U,W){U=new L(U,16),U.red||(U=U.toRed(this.red));var Z=U.redSqr(),T=Z.redSub(this.c2),B=Z.redMul(this.d).redMul(this.c2).redSub(this.a),P=T.redMul(B.redInvm());if(P.cmp(this.zero)===0){if(W)throw new Error("invalid point");return this.point(this.zero,U)}var q=P.redSqrt();if(q.redSqr().redSub(P).cmp(this.zero)!==0)throw new Error("invalid point");return q.fromRed().isOdd()!==W&&(q=q.redNeg()),this.point(q,U)},O.prototype.validate=function(U){if(U.isInfinity())return!0;U.normalize();var W=U.x.redSqr(),Z=U.y.redSqr(),T=W.redMul(this.a).redAdd(Z),B=this.c2.redMul(this.one.redAdd(this.d.redMul(W).redMul(Z)));return T.cmp(B)===0};function N(U,W,Z,T,B){k.BasePoint.call(this,U,"projective"),W===null&&Z===null&&T===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 L(W,16),this.y=new L(Z,16),this.z=T?new L(T,16):this.curve.one,this.t=B&&new L(B,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()))))}H(N,k.BasePoint),O.prototype.pointFromJSON=function(U){return N.fromJSON(this,U)},O.prototype.point=function(U,W,Z,T){return new N(this,U,W,Z,T)},N.fromJSON=function(U,W){return new N(U,W[0],W[1],W[2])},N.prototype.inspect=function(){return this.isInfinity()?"":""},N.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},N.prototype._extDbl=function(){var U=this.x.redSqr(),W=this.y.redSqr(),Z=this.z.redSqr();Z=Z.redIAdd(Z);var T=this.curve._mulA(U),B=this.x.redAdd(this.y).redSqr().redISub(U).redISub(W),P=T.redAdd(W),q=P.redSub(Z),x=T.redSub(W),w=B.redMul(q),M=P.redMul(x),y=B.redMul(x),m=q.redMul(P);return this.curve.point(w,M,m,y)},N.prototype._projDbl=function(){var U=this.x.redAdd(this.y).redSqr(),W=this.x.redSqr(),Z=this.y.redSqr(),T,B,P,q,x,w;if(this.curve.twisted){q=this.curve._mulA(W);var M=q.redAdd(Z);this.zOne?(T=U.redSub(W).redSub(Z).redMul(M.redSub(this.curve.two)),B=M.redMul(q.redSub(Z)),P=M.redSqr().redSub(M).redSub(M)):(x=this.z.redSqr(),w=M.redSub(x).redISub(x),T=U.redSub(W).redISub(Z).redMul(w),B=M.redMul(q.redSub(Z)),P=M.redMul(w))}else q=W.redAdd(Z),x=this.curve._mulC(this.z).redSqr(),w=q.redSub(x).redSub(x),T=this.curve._mulC(U.redISub(q)).redMul(w),B=this.curve._mulC(q).redMul(W.redISub(Z)),P=q.redMul(w);return this.curve.point(T,B,P)},N.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},N.prototype._extAdd=function(U){var W=this.y.redSub(this.x).redMul(U.y.redSub(U.x)),Z=this.y.redAdd(this.x).redMul(U.y.redAdd(U.x)),T=this.t.redMul(this.curve.dd).redMul(U.t),B=this.z.redMul(U.z.redAdd(U.z)),P=Z.redSub(W),q=B.redSub(T),x=B.redAdd(T),w=Z.redAdd(W),M=P.redMul(q),y=x.redMul(w),m=P.redMul(w),c=q.redMul(x);return this.curve.point(M,y,c,m)},N.prototype._projAdd=function(U){var W=this.z.redMul(U.z),Z=W.redSqr(),T=this.x.redMul(U.x),B=this.y.redMul(U.y),P=this.curve.d.redMul(T).redMul(B),q=Z.redSub(P),x=Z.redAdd(P),w=this.x.redAdd(this.y).redMul(U.x.redAdd(U.y)).redISub(T).redISub(B),M=W.redMul(q).redMul(w),y,m;return this.curve.twisted?(y=W.redMul(x).redMul(B.redSub(this.curve._mulA(T))),m=q.redMul(x)):(y=W.redMul(x).redMul(B.redSub(T)),m=this.curve._mulC(q).redMul(x)),this.curve.point(M,y,m)},N.prototype.add=function(U){return this.isInfinity()?U:U.isInfinity()?this:this.curve.extended?this._extAdd(U):this._projAdd(U)},N.prototype.mul=function(U){return this._hasDoubles(U)?this.curve._fixedNafMul(this,U):this.curve._wnafMul(this,U)},N.prototype.mulAdd=function(U,W,Z){return this.curve._wnafMulAdd(1,[this,W],[U,Z],2,!1)},N.prototype.jmulAdd=function(U,W,Z){return this.curve._wnafMulAdd(1,[this,W],[U,Z],2,!0)},N.prototype.normalize=function(){if(this.zOne)return this;var U=this.z.redInvm();return this.x=this.x.redMul(U),this.y=this.y.redMul(U),this.t&&(this.t=this.t.redMul(U)),this.z=this.curve.one,this.zOne=!0,this},N.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},N.prototype.getX=function(){return this.normalize(),this.x.fromRed()},N.prototype.getY=function(){return this.normalize(),this.y.fromRed()},N.prototype.eq=function(U){return this===U||this.getX().cmp(U.getX())===0&&this.getY().cmp(U.getY())===0},N.prototype.eqXToP=function(U){var W=U.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(W)===0)return!0;for(var Z=U.clone(),T=this.curve.redN.redMul(this.z);;){if(Z.iadd(this.curve.n),Z.cmp(this.curve.p)>=0)return!1;if(W.redIAdd(T),this.x.cmp(W)===0)return!0}},N.prototype.toP=N.prototype.normalize,N.prototype.mixedAdd=N.prototype.add}),G6=$0((E)=>{var I=E;I.base=V1(),I.short=p8(),I.mont=c8(),I.edwards=d8()}),L2=$0((E)=>{var I=P2(),F=c0();E.inherits=F;function L(Y,C){return(Y.charCodeAt(C)&64512)!==55296||C<0||C+1>=Y.length?!1:(Y.charCodeAt(C+1)&64512)===56320}function H(Y,C){if(Array.isArray(Y))return Y.slice();if(!Y)return[];var J=[];if(typeof Y=="string")if(C){if(C==="hex")for(Y=Y.replace(/[^a-z0-9]+/ig,""),Y.length%2!==0&&(Y="0"+Y),V=0;V>6|192,J[z++]=K&63|128):L(Y,V)?(K=65536+((K&1023)<<10)+(Y.charCodeAt(++V)&1023),J[z++]=K>>18|240,J[z++]=K>>12&63|128,J[z++]=K>>6&63|128,J[z++]=K&63|128):(J[z++]=K>>12|224,J[z++]=K>>6&63|128,J[z++]=K&63|128)}else for(V=0;V>>24|Y>>>8&65280|Y<<8&16711680|(Y&255)<<24;return C>>>0}E.htonl=Q;function O(Y,C){for(var J="",z=0;z>>0}return K}E.join32=W;function Z(Y,C){for(var J=new Array(Y.length*4),z=0,V=0;z>>24,J[V+1]=K>>>16&255,J[V+2]=K>>>8&255,J[V+3]=K&255):(J[V+3]=K>>>24,J[V+2]=K>>>16&255,J[V+1]=K>>>8&255,J[V]=K&255)}return J}E.split32=Z;function T(Y,C){return Y>>>C|Y<<32-C}E.rotr32=T;function B(Y,C){return Y<>>32-C}E.rotl32=B;function P(Y,C){return Y+C>>>0}E.sum32=P;function q(Y,C,J){return Y+C+J>>>0}E.sum32_3=q;function x(Y,C,J,z){return Y+C+J+z>>>0}E.sum32_4=x;function w(Y,C,J,z,V){return Y+C+J+z+V>>>0}E.sum32_5=w;function M(Y,C,J,z){var V=Y[C],K=Y[C+1],$=z+K>>>0,G=($>>0,Y[C+1]=$}E.sum64=M;function y(Y,C,J,z){var V=C+z>>>0,K=(V>>0}E.sum64_hi=y;function m(Y,C,J,z){var V=C+z;return V>>>0}E.sum64_lo=m;function c(Y,C,J,z,V,K,$,G){var j=0,A=C;A=A+z>>>0,j+=A>>0,j+=A>>0,j+=A>>0}E.sum64_4_hi=c;function l(Y,C,J,z,V,K,$,G){var j=C+z+K+G;return j>>>0}E.sum64_4_lo=l;function n(Y,C,J,z,V,K,$,G,j,A){var R=0,_=C;_=_+z>>>0,R+=_>>0,R+=_>>0,R+=_>>0,R+=_>>0}E.sum64_5_hi=n;function i(Y,C,J,z,V,K,$,G,j,A){var R=C+z+K+G+A;return R>>>0}E.sum64_5_lo=i;function C0(Y,C,J){var z=C<<32-J|Y>>>J;return z>>>0}E.rotr64_hi=C0;function a(Y,C,J){var z=Y<<32-J|C>>>J;return z>>>0}E.rotr64_lo=a;function K0(Y,C,J){return Y>>>J}E.shr64_hi=K0;function X(Y,C,J){var z=Y<<32-J|C>>>J;return z>>>0}E.shr64_lo=X}),f2=$0((E)=>{var I=L2(),F=P2();function L(){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}E.BlockHash=L,L.prototype.update=function(H,k){if(H=I.toArray(H,k),this.pending?this.pending=this.pending.concat(H):this.pending=H,this.pendingTotal+=H.length,this.pending.length>=this._delta8){H=this.pending;var Q=H.length%this._delta8;this.pending=H.slice(H.length-Q,H.length),this.pending.length===0&&(this.pending=null),H=I.join32(H,0,H.length-Q,this.endian);for(var O=0;O>>24&255,O[N++]=H>>>16&255,O[N++]=H>>>8&255,O[N++]=H&255}else for(O[N++]=H&255,O[N++]=H>>>8&255,O[N++]=H>>>16&255,O[N++]=H>>>24&255,O[N++]=0,O[N++]=0,O[N++]=0,O[N++]=0,U=8;U{var I=L2(),F=I.rotr32;function L(Z,T,B,P){if(Z===0)return H(T,B,P);if(Z===1||Z===3)return Q(T,B,P);if(Z===2)return k(T,B,P)}E.ft_1=L;function H(Z,T,B){return Z&T^~Z&B}E.ch32=H;function k(Z,T,B){return Z&T^Z&B^T&B}E.maj32=k;function Q(Z,T,B){return Z^T^B}E.p32=Q;function O(Z){return F(Z,2)^F(Z,13)^F(Z,22)}E.s0_256=O;function N(Z){return F(Z,6)^F(Z,11)^F(Z,25)}E.s1_256=N;function U(Z){return F(Z,7)^F(Z,18)^Z>>>3}E.g0_256=U;function W(Z){return F(Z,17)^F(Z,19)^Z>>>10}E.g1_256=W}),b8=$0((E,I)=>{var F=L2(),L=f2(),H=Y6(),k=F.rotl32,Q=F.sum32,O=F.sum32_5,N=H.ft_1,U=L.BlockHash,W=[1518500249,1859775393,2400959708,3395469782];function Z(){if(!(this instanceof Z))return new Z;U.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}F.inherits(Z,U),I.exports=Z,Z.blockSize=512,Z.outSize=160,Z.hmacStrength=80,Z.padLength=64,Z.prototype._update=function(T,B){for(var P=this.W,q=0;q<16;q++)P[q]=T[B+q];for(;q{var F=L2(),L=f2(),H=Y6(),k=P2(),Q=F.sum32,O=F.sum32_4,N=F.sum32_5,U=H.ch32,W=H.maj32,Z=H.s0_256,T=H.s1_256,B=H.g0_256,P=H.g1_256,q=L.BlockHash,x=[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 w(){if(!(this instanceof w))return new w;q.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=x,this.W=new Array(64)}F.inherits(w,q),I.exports=w,w.blockSize=512,w.outSize=256,w.hmacStrength=192,w.padLength=64,w.prototype._update=function(M,y){for(var m=this.W,c=0;c<16;c++)m[c]=M[y+c];for(;c{var F=L2(),L=J6();function H(){if(!(this instanceof H))return new H;L.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}F.inherits(H,L),I.exports=H,H.blockSize=512,H.outSize=224,H.hmacStrength=192,H.padLength=64,H.prototype._digest=function(k){return k==="hex"?F.toHex32(this.h.slice(0,7),"big"):F.split32(this.h.slice(0,7),"big")}}),C6=$0((E,I)=>{var F=L2(),L=f2(),H=P2(),k=F.rotr64_hi,Q=F.rotr64_lo,O=F.shr64_hi,N=F.shr64_lo,U=F.sum64,W=F.sum64_hi,Z=F.sum64_lo,T=F.sum64_4_hi,B=F.sum64_4_lo,P=F.sum64_5_hi,q=F.sum64_5_lo,x=L.BlockHash,w=[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 M(){if(!(this instanceof M))return new M;x.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=w,this.W=new Array(160)}F.inherits(M,x),I.exports=M,M.blockSize=1024,M.outSize=512,M.hmacStrength=192,M.padLength=128,M.prototype._prepareBlock=function(J,z){for(var V=this.W,K=0;K<32;K++)V[K]=J[z+K];for(;K{var F=L2(),L=C6();function H(){if(!(this instanceof H))return new H;L.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}F.inherits(H,L),I.exports=H,H.blockSize=1024,H.outSize=384,H.hmacStrength=192,H.padLength=128,H.prototype._digest=function(k){return k==="hex"?F.toHex32(this.h.slice(0,12),"big"):F.split32(this.h.slice(0,12),"big")}}),o8=$0((E)=>{E.sha1=b8(),E.sha224=l8(),E.sha256=J6(),E.sha384=h8(),E.sha512=C6()}),u8=$0((E)=>{var I=L2(),F=f2(),L=I.rotl32,H=I.sum32,k=I.sum32_3,Q=I.sum32_4,O=F.BlockHash;function N(){if(!(this instanceof N))return new N;O.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}I.inherits(N,O),E.ripemd160=N,N.blockSize=512,N.outSize=160,N.hmacStrength=192,N.padLength=64,N.prototype._update=function(x,w){for(var M=this.h[0],y=this.h[1],m=this.h[2],c=this.h[3],l=this.h[4],n=M,i=y,C0=m,a=c,K0=l,X=0;X<80;X++){var Y=H(L(Q(M,U(X,y,m,c),x[T[X]+w],W(X)),P[X]),l);M=l,l=c,c=L(m,10),m=y,y=Y,Y=H(L(Q(n,U(79-X,i,C0,a),x[B[X]+w],Z(X)),q[X]),K0),n=K0,K0=a,a=L(C0,10),C0=i,i=Y}Y=k(this.h[1],m,a),this.h[1]=k(this.h[2],c,K0),this.h[2]=k(this.h[3],l,n),this.h[3]=k(this.h[4],M,i),this.h[4]=k(this.h[0],y,C0),this.h[0]=Y},N.prototype._digest=function(x){return x==="hex"?I.toHex32(this.h,"little"):I.split32(this.h,"little")};function U(x,w,M,y){return x<=15?w^M^y:x<=31?w&M|~w&y:x<=47?(w|~M)^y:x<=63?w&y|M&~y:w^(M|~y)}function W(x){return x<=15?0:x<=31?1518500249:x<=47?1859775393:x<=63?2400959708:2840853838}function Z(x){return x<=15?1352829926:x<=31?1548603684:x<=47?1836072691:x<=63?2053994217:0}var T=[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],B=[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],P=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],q=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]}),s8=$0((E,I)=>{var F=L2(),L=P2();function H(k,Q,O){if(!(this instanceof H))return new H(k,Q,O);this.Hash=k,this.blockSize=k.blockSize/8,this.outSize=k.outSize/8,this.inner=null,this.outer=null,this._init(F.toArray(Q,O))}I.exports=H,H.prototype._init=function(k){k.length>this.blockSize&&(k=new this.Hash().update(k).digest()),L(k.length<=this.blockSize);for(var Q=k.length;Q{var I=E;I.utils=L2(),I.common=f2(),I.sha=o8(),I.ripemd=u8(),I.hmac=s8(),I.sha1=I.sha.sha1,I.sha256=I.sha.sha256,I.sha224=I.sha.sha224,I.sha384=I.sha.sha384,I.sha512=I.sha.sha512,I.ripemd160=I.ripemd.ripemd160}),f8=$0((E,I)=>{I.exports={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"]]}}}),b1=$0((E)=>{var I=E,F=d1(),L=G6(),H=T2(),k=H.assert;function Q(U){U.type==="short"?this.curve=new L.short(U):U.type==="edwards"?this.curve=new L.edwards(U):this.curve=new L.mont(U),this.g=this.curve.g,this.n=this.curve.n,this.hash=U.hash,k(this.g.validate(),"Invalid curve"),k(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}I.PresetCurve=Q;function O(U,W){Object.defineProperty(I,U,{configurable:!0,enumerable:!0,get:function(){var Z=new Q(W);return Object.defineProperty(I,U,{configurable:!0,enumerable:!0,value:Z}),Z}})}O("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:F.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),O("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:F.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),O("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:F.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),O("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:F.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"]}),O("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:F.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"]}),O("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:F.sha256,gRed:!1,g:["9"]}),O("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:F.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var N;try{N=f8()}catch{N=void 0}O("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:F.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",N]})}),a8=$0((E,I)=>{var F=d1(),L=X6(),H=P2();function k(Q){if(!(this instanceof k))return new k(Q);this.hash=Q.hash,this.predResist=!!Q.predResist,this.outLen=this.hash.outSize,this.minEntropy=Q.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var O=L.toArray(Q.entropy,Q.entropyEnc||"hex"),N=L.toArray(Q.nonce,Q.nonceEnc||"hex"),U=L.toArray(Q.pers,Q.persEnc||"hex");H(O.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(O,N,U)}I.exports=k,k.prototype._init=function(Q,O,N){var U=Q.concat(O).concat(N);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var W=0;W=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(Q.concat(N||[])),this._reseed=1},k.prototype.generate=function(Q,O,N,U){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof O!="string"&&(U=N,N=O,O=null),N&&(N=L.toArray(N,U||"hex"),this._update(N));for(var W=[];W.length{var F=B2(),L=T2(),H=L.assert;function k(Q,O){this.ec=Q,this.priv=null,this.pub=null,O.priv&&this._importPrivate(O.priv,O.privEnc),O.pub&&this._importPublic(O.pub,O.pubEnc)}I.exports=k,k.fromPublic=function(Q,O,N){return O instanceof k?O:new k(Q,{pub:O,pubEnc:N})},k.fromPrivate=function(Q,O,N){return O instanceof k?O:new k(Q,{priv:O,privEnc:N})},k.prototype.validate=function(){var Q=this.getPublic();return Q.isInfinity()?{result:!1,reason:"Invalid public key"}:Q.validate()?Q.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"}},k.prototype.getPublic=function(Q,O){return typeof Q=="string"&&(O=Q,Q=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),O?this.pub.encode(O,Q):this.pub},k.prototype.getPrivate=function(Q){return Q==="hex"?this.priv.toString(16,2):this.priv},k.prototype._importPrivate=function(Q,O){this.priv=new F(Q,O||16),this.priv=this.priv.umod(this.ec.curve.n)},k.prototype._importPublic=function(Q,O){if(Q.x||Q.y){this.ec.curve.type==="mont"?H(Q.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&H(Q.x&&Q.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(Q.x,Q.y);return}this.pub=this.ec.curve.decodePoint(Q,O)},k.prototype.derive=function(Q){return Q.validate()||H(Q.validate(),"public point not validated"),Q.mul(this.priv).getX()},k.prototype.sign=function(Q,O,N){return this.ec.sign(Q,this,O,N)},k.prototype.verify=function(Q,O){return this.ec.verify(Q,O,this)},k.prototype.inspect=function(){return""}}),r8=$0((E,I)=>{var F=B2(),L=T2(),H=L.assert;function k(W,Z){if(W instanceof k)return W;this._importDER(W,Z)||(H(W.r&&W.s,"Signature without r or s"),this.r=new F(W.r,16),this.s=new F(W.s,16),W.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=W.recoveryParam)}I.exports=k;function Q(){this.place=0}function O(W,Z){var T=W[Z.place++];if(!(T&128))return T;var B=T&15;if(B===0||B>4)return!1;for(var P=0,q=0,x=Z.place;q>>=0;return P<=127?!1:(Z.place=x,P)}function N(W){for(var Z=0,T=W.length-1;!W[Z]&&!(W[Z+1]&128)&&Z>>3);for(W.push(T|128);--T;)W.push(Z>>>(T<<3)&255);W.push(Z)}k.prototype.toDER=function(W){var Z=this.r.toArray(),T=this.s.toArray();for(Z[0]&128&&(Z=[0].concat(Z)),T[0]&128&&(T=[0].concat(T)),Z=N(Z),T=N(T);!T[0]&&!(T[1]&128);)T=T.slice(1);var B=[2];U(B,Z.length),B=B.concat(Z),B.push(2),U(B,T.length);var P=B.concat(T),q=[48];return U(q,P.length),q=q.concat(P),L.encode(q,W)}}),i8=$0((E,I)=>{var F=B2(),L=a8(),H=T2(),k=b1(),Q=g1(),O=H.assert,N=n8(),U=r8();function W(Z){if(!(this instanceof W))return new W(Z);typeof Z=="string"&&(O(Object.prototype.hasOwnProperty.call(k,Z),"Unknown curve "+Z),Z=k[Z]),Z instanceof k.PresetCurve&&(Z={curve:Z}),this.curve=Z.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=Z.curve.g,this.g.precompute(Z.curve.n.bitLength()+1),this.hash=Z.hash||Z.curve.hash}I.exports=W,W.prototype.keyPair=function(Z){return new N(this,Z)},W.prototype.keyFromPrivate=function(Z,T){return N.fromPrivate(this,Z,T)},W.prototype.keyFromPublic=function(Z,T){return N.fromPublic(this,Z,T)},W.prototype.genKeyPair=function(Z){Z||(Z={});for(var T=new L({hash:this.hash,pers:Z.pers,persEnc:Z.persEnc||"utf8",entropy:Z.entropy||Q(this.hash.hmacStrength),entropyEnc:Z.entropy&&Z.entropyEnc||"utf8",nonce:this.n.toArray()}),B=this.n.byteLength(),P=this.n.sub(new F(2));;){var q=new F(T.generate(B));if(!(q.cmp(P)>0))return q.iaddn(1),this.keyFromPrivate(q)}},W.prototype._truncateToN=function(Z,T){var B=Z.byteLength()*8-this.n.bitLength();return B>0&&(Z=Z.ushrn(B)),!T&&Z.cmp(this.n)>=0?Z.sub(this.n):Z},W.prototype.sign=function(Z,T,B,P){typeof B=="object"&&(P=B,B=null),P||(P={}),T=this.keyFromPrivate(T,B),Z=this._truncateToN(new F(Z,16));for(var q=this.n.byteLength(),x=T.getPrivate().toArray("be",q),w=Z.toArray("be",q),M=new L({hash:this.hash,entropy:x,nonce:w,pers:P.pers,persEnc:P.persEnc||"utf8"}),y=this.n.sub(new F(1)),m=0;;m++){var c=P.k?P.k(m):new F(M.generate(this.n.byteLength()));if(c=this._truncateToN(c,!0),!(c.cmpn(1)<=0||c.cmp(y)>=0)){var l=this.g.mul(c);if(!l.isInfinity()){var n=l.getX(),i=n.umod(this.n);if(i.cmpn(0)!==0){var C0=c.invm(this.n).mul(i.mul(T.getPrivate()).iadd(Z));if(C0=C0.umod(this.n),C0.cmpn(0)!==0){var a=(l.getY().isOdd()?1:0)|(n.cmp(i)!==0?2:0);return P.canonical&&C0.cmp(this.nh)>0&&(C0=this.n.sub(C0),a^=1),new U({r:i,s:C0,recoveryParam:a})}}}}}},W.prototype.verify=function(Z,T,B,P){Z=this._truncateToN(new F(Z,16)),B=this.keyFromPublic(B,P),T=new U(T,"hex");var{r:q,s:x}=T;if(q.cmpn(1)<0||q.cmp(this.n)>=0||x.cmpn(1)<0||x.cmp(this.n)>=0)return!1;var w=x.invm(this.n),M=w.mul(Z).umod(this.n),y=w.mul(q).umod(this.n),m;return this.curve._maxwellTrick?(m=this.g.jmulAdd(M,B.getPublic(),y),m.isInfinity()?!1:m.eqXToP(q)):(m=this.g.mulAdd(M,B.getPublic(),y),m.isInfinity()?!1:m.getX().umod(this.n).cmp(q)===0)},W.prototype.recoverPubKey=function(Z,T,B,P){O((3&B)===B,"The recovery param is more than two bits"),T=new U(T,P);var q=this.n,x=new F(Z),w=T.r,M=T.s,y=B&1,m=B>>1;if(w.cmp(this.curve.p.umod(this.curve.n))>=0&&m)throw new Error("Unable to find sencond key candinate");m?w=this.curve.pointFromX(w.add(this.curve.n),y):w=this.curve.pointFromX(w,y);var c=T.r.invm(q),l=q.sub(x).mul(c).umod(q),n=M.mul(c).umod(q);return this.g.mulAdd(l,w,n)},W.prototype.getKeyRecoveryParam=function(Z,T,B,P){if(T=new U(T,P),T.recoveryParam!==null)return T.recoveryParam;for(var q=0;q<4;q++){var x;try{x=this.recoverPubKey(Z,T,q)}catch{continue}if(x.eq(B))return q}throw new Error("Unable to find valid recovery factor")}}),t8=$0((E,I)=>{var F=T2(),L=F.assert,H=F.parseBytes,k=F.cachedProperty;function Q(O,N){this.eddsa=O,this._secret=H(N.secret),O.isPoint(N.pub)?this._pub=N.pub:this._pubBytes=H(N.pub)}Q.fromPublic=function(O,N){return N instanceof Q?N:new Q(O,{pub:N})},Q.fromSecret=function(O,N){return N instanceof Q?N:new Q(O,{secret:N})},Q.prototype.secret=function(){return this._secret},k(Q,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),k(Q,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),k(Q,"privBytes",function(){var O=this.eddsa,N=this.hash(),U=O.encodingLength-1,W=N.slice(0,O.encodingLength);return W[0]&=248,W[U]&=127,W[U]|=64,W}),k(Q,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),k(Q,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),k(Q,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),Q.prototype.sign=function(O){return L(this._secret,"KeyPair can only verify"),this.eddsa.sign(O,this)},Q.prototype.verify=function(O,N){return this.eddsa.verify(O,N,this)},Q.prototype.getSecret=function(O){return L(this._secret,"KeyPair is public only"),F.encode(this.secret(),O)},Q.prototype.getPublic=function(O){return F.encode(this.pubBytes(),O)},I.exports=Q}),e8=$0((E,I)=>{var F=B2(),L=T2(),H=L.assert,k=L.cachedProperty,Q=L.parseBytes;function O(N,U){this.eddsa=N,typeof U!="object"&&(U=Q(U)),Array.isArray(U)&&(U={R:U.slice(0,N.encodingLength),S:U.slice(N.encodingLength)}),H(U.R&&U.S,"Signature without R or S"),N.isPoint(U.R)&&(this._R=U.R),U.S instanceof F&&(this._S=U.S),this._Rencoded=Array.isArray(U.R)?U.R:U.Rencoded,this._Sencoded=Array.isArray(U.S)?U.S:U.Sencoded}k(O,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),k(O,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),k(O,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),k(O,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),O.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},O.prototype.toHex=function(){return L.encode(this.toBytes(),"hex").toUpperCase()},I.exports=O}),X3=$0((E,I)=>{var F=d1(),L=b1(),H=T2(),k=H.assert,Q=H.parseBytes,O=t8(),N=e8();function U(W){if(k(W==="ed25519","only tested with ed25519 so far"),!(this instanceof U))return new U(W);W=L[W].curve,this.curve=W,this.g=W.g,this.g.precompute(W.n.bitLength()+1),this.pointClass=W.point().constructor,this.encodingLength=Math.ceil(W.n.bitLength()/8),this.hash=F.sha512}I.exports=U,U.prototype.sign=function(W,Z){W=Q(W);var T=this.keyFromSecret(Z),B=this.hashInt(T.messagePrefix(),W),P=this.g.mul(B),q=this.encodePoint(P),x=this.hashInt(q,T.pubBytes(),W).mul(T.priv()),w=B.add(x).umod(this.curve.n);return this.makeSignature({R:P,S:w,Rencoded:q})},U.prototype.verify=function(W,Z,T){W=Q(W),Z=this.makeSignature(Z);var B=this.keyFromPublic(T),P=this.hashInt(Z.Rencoded(),B.pubBytes(),W),q=this.g.mul(Z.S()),x=Z.R().add(B.pub().mul(P));return x.eq(q)},U.prototype.hashInt=function(){for(var W=this.hash(),Z=0;Z{var I=E;I.version=m8().version,I.utils=T2(),I.rand=g1(),I.curve=G6(),I.curves=b1(),I.ec=i8(),I.eddsa=X3()}),z6=$0((E,I)=>{(function(F,L){function H(X,Y){if(!X)throw new Error(Y||"Assertion failed")}function k(X,Y){X.super_=Y;var C=function(){};C.prototype=Y.prototype,X.prototype=new C,X.prototype.constructor=X}function Q(X,Y,C){if(Q.isBN(X))return X;this.negative=0,this.words=null,this.length=0,this.red=null,X!==null&&((Y==="le"||Y==="be")&&(C=Y,Y=10),this._init(X||0,Y||10,C||"be"))}typeof F=="object"?F.exports=Q:L.BN=Q,Q.BN=Q,Q.wordSize=26;var O;try{typeof window<"u"&&typeof window.Buffer<"u"?O=window.Buffer:O=A2().Buffer}catch{}Q.isBN=function(X){return X instanceof Q?!0:X!==null&&typeof X=="object"&&X.constructor.wordSize===Q.wordSize&&Array.isArray(X.words)},Q.max=function(X,Y){return X.cmp(Y)>0?X:Y},Q.min=function(X,Y){return X.cmp(Y)<0?X:Y},Q.prototype._init=function(X,Y,C){if(typeof X=="number")return this._initNumber(X,Y,C);if(typeof X=="object")return this._initArray(X,Y,C);Y==="hex"&&(Y=16),H(Y===(Y|0)&&Y>=2&&Y<=36),X=X.toString().replace(/\s+/g,"");var J=0;X[0]==="-"&&(J++,this.negative=1),J=0;J-=3)V=X[J]|X[J-1]<<8|X[J-2]<<16,this.words[z]|=V<>>26-K&67108863,K+=24,K>=26&&(K-=26,z++);else if(C==="le")for(J=0,z=0;J>>26-K&67108863,K+=24,K>=26&&(K-=26,z++);return this.strip()};function N(X,Y){var C=X.charCodeAt(Y);return C>=65&&C<=70?C-55:C>=97&&C<=102?C-87:C-48&15}function U(X,Y,C){var J=N(X,C);return C-1>=Y&&(J|=N(X,C-1)<<4),J}Q.prototype._parseHex=function(X,Y,C){this.length=Math.ceil((X.length-Y)/6),this.words=new Array(this.length);for(var J=0;J=Y;J-=2)K=U(X,Y,J)<=18?(z-=18,V+=1,this.words[V]|=K>>>26):z+=8;else{var $=X.length-Y;for(J=$%2===0?Y+1:Y;J=18?(z-=18,V+=1,this.words[V]|=K>>>26):z+=8}this.strip()};function W(X,Y,C,J){for(var z=0,V=Math.min(X.length,C),K=Y;K=49?z+=$-49+10:$>=17?z+=$-17+10:z+=$}return z}Q.prototype._parseBase=function(X,Y,C){this.words=[0],this.length=1;for(var J=0,z=1;z<=67108863;z*=Y)J++;J--,z=z/Y|0;for(var V=X.length-C,K=V%J,$=Math.min(V,V-K)+C,G=0,j=C;j<$;j+=J)G=W(X,j,j+J,Y),this.imuln(z),this.words[0]+G<67108864?this.words[0]+=G:this._iaddn(G);if(K!==0){var A=1;for(G=W(X,j,X.length,Y),j=0;j1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},Q.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},Q.prototype.inspect=function(){return(this.red?""};var Z=["","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"],T=[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,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];Q.prototype.toString=function(X,Y){X=X||10,Y=Y|0||1;var C;if(X===16||X==="hex"){C="";for(var J=0,z=0,V=0;V>>24-J&16777215,z!==0||V!==this.length-1?C=Z[6-$.length]+$+C:C=$+C,J+=2,J>=26&&(J-=26,V--)}for(z!==0&&(C=z.toString(16)+C);C.length%Y!==0;)C="0"+C;return this.negative!==0&&(C="-"+C),C}if(X===(X|0)&&X>=2&&X<=36){var G=T[X],j=B[X];C="";var A=this.clone();for(A.negative=0;!A.isZero();){var R=A.modn(j).toString(X);A=A.idivn(j),A.isZero()?C=R+C:C=Z[G-R.length]+R+C}for(this.isZero()&&(C="0"+C);C.length%Y!==0;)C="0"+C;return this.negative!==0&&(C="-"+C),C}H(!1,"Base should be between 2 and 36")},Q.prototype.toNumber=function(){var X=this.words[0];return this.length===2?X+=this.words[1]*67108864:this.length===3&&this.words[2]===1?X+=4503599627370496+this.words[1]*67108864:this.length>2&&H(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-X:X},Q.prototype.toJSON=function(){return this.toString(16)},Q.prototype.toBuffer=function(X,Y){return H(typeof O<"u"),this.toArrayLike(O,X,Y)},Q.prototype.toArray=function(X,Y){return this.toArrayLike(Array,X,Y)},Q.prototype.toArrayLike=function(X,Y,C){var J=this.byteLength(),z=C||Math.max(1,J);H(J<=z,"byte array longer than desired length"),H(z>0,"Requested array length <= 0"),this.strip();var V=Y==="le",K=new X(z),$,G,j=this.clone();if(V){for(G=0;!j.isZero();G++)$=j.andln(255),j.iushrn(8),K[G]=$;for(;G=4096&&(C+=13,Y>>>=13),Y>=64&&(C+=7,Y>>>=7),Y>=8&&(C+=4,Y>>>=4),Y>=2&&(C+=2,Y>>>=2),C+Y},Q.prototype._zeroBits=function(X){if(X===0)return 26;var Y=X,C=0;return(Y&8191)===0&&(C+=13,Y>>>=13),(Y&127)===0&&(C+=7,Y>>>=7),(Y&15)===0&&(C+=4,Y>>>=4),(Y&3)===0&&(C+=2,Y>>>=2),(Y&1)===0&&C++,C},Q.prototype.bitLength=function(){var X=this.words[this.length-1],Y=this._countBits(X);return(this.length-1)*26+Y};function P(X){for(var Y=new Array(X.bitLength()),C=0;C>>z}return Y}Q.prototype.zeroBits=function(){if(this.isZero())return 0;for(var X=0,Y=0;YX.length?this.clone().ior(X):X.clone().ior(this)},Q.prototype.uor=function(X){return this.length>X.length?this.clone().iuor(X):X.clone().iuor(this)},Q.prototype.iuand=function(X){var Y;this.length>X.length?Y=X:Y=this;for(var C=0;CX.length?this.clone().iand(X):X.clone().iand(this)},Q.prototype.uand=function(X){return this.length>X.length?this.clone().iuand(X):X.clone().iuand(this)},Q.prototype.iuxor=function(X){var Y,C;this.length>X.length?(Y=this,C=X):(Y=X,C=this);for(var J=0;JX.length?this.clone().ixor(X):X.clone().ixor(this)},Q.prototype.uxor=function(X){return this.length>X.length?this.clone().iuxor(X):X.clone().iuxor(this)},Q.prototype.inotn=function(X){H(typeof X=="number"&&X>=0);var Y=Math.ceil(X/26)|0,C=X%26;this._expand(Y),C>0&&Y--;for(var J=0;J0&&(this.words[J]=~this.words[J]&67108863>>26-C),this.strip()},Q.prototype.notn=function(X){return this.clone().inotn(X)},Q.prototype.setn=function(X,Y){H(typeof X=="number"&&X>=0);var C=X/26|0,J=X%26;return this._expand(C+1),Y?this.words[C]=this.words[C]|1<X.length?(C=this,J=X):(C=X,J=this);for(var z=0,V=0;V>>26;for(;z!==0&&V>>26;if(this.length=C.length,z!==0)this.words[this.length]=z,this.length++;else if(C!==this)for(;VX.length?this.clone().iadd(X):X.clone().iadd(this)},Q.prototype.isub=function(X){if(X.negative!==0){X.negative=0;var Y=this.iadd(X);return X.negative=1,Y._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(X),this.negative=1,this._normSign();var C=this.cmp(X);if(C===0)return this.negative=0,this.length=1,this.words[0]=0,this;var J,z;C>0?(J=this,z=X):(J=X,z=this);for(var V=0,K=0;K>26,this.words[K]=Y&67108863;for(;V!==0&&K>26,this.words[K]=Y&67108863;if(V===0&&K>>26,R=G&67108863,_=Math.min(j,Y.length-1),s=Math.max(0,j-X.length+1);s<=_;s++){var r=j-s|0;z=X.words[r]|0,V=Y.words[s]|0,K=z*V+R,A+=K/67108864|0,R=K&67108863}C.words[j]=R|0,G=A|0}return G!==0?C.words[j]=G|0:C.length--,C.strip()}var x=function(X,Y,C){var J=X.words,z=Y.words,V=C.words,K=0,$,G,j,A=J[0]|0,R=A&8191,_=A>>>13,s=J[1]|0,r=s&8191,Y0=s>>>13,o=J[2]|0,b=o&8191,f=o>>>13,W0=J[3]|0,X0=W0&8191,z0=W0>>>13,g=J[4]|0,v=g&8191,p=g>>>13,e=J[5]|0,G0=e&8191,t=e>>>13,y0=J[6]|0,Q0=y0&8191,V0=y0>>>13,_0=J[7]|0,F0=_0&8191,Z0=_0>>>13,b0=J[8]|0,D=b0&8191,S=b0>>>13,d=J[9]|0,h=d&8191,u=d>>>13,P0=z[0]|0,J0=P0&8191,H0=P0>>>13,d0=z[1]|0,U0=d0&8191,O0=d0>>>13,g0=z[2]|0,L0=g0&8191,N0=g0>>>13,$2=z[3]|0,D0=$2&8191,T0=$2>>>13,h0=z[4]|0,k0=h0&8191,I0=h0>>>13,j2=z[5]|0,B0=j2&8191,q0=j2>>>13,V2=z[6]|0,R0=V2&8191,E0=V2>>>13,K2=z[7]|0,x0=K2&8191,v0=K2>>>13,Z2=z[8]|0,S0=Z2&8191,A0=Z2>>>13,H2=z[9]|0,M0=H2&8191,w0=H2>>>13;C.negative=X.negative^Y.negative,C.length=19,$=Math.imul(R,J0),G=Math.imul(R,H0),G=G+Math.imul(_,J0)|0,j=Math.imul(_,H0);var Q2=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(Q2>>>26)|0,Q2&=67108863,$=Math.imul(r,J0),G=Math.imul(r,H0),G=G+Math.imul(Y0,J0)|0,j=Math.imul(Y0,H0),$=$+Math.imul(R,U0)|0,G=G+Math.imul(R,O0)|0,G=G+Math.imul(_,U0)|0,j=j+Math.imul(_,O0)|0;var m0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(m0>>>26)|0,m0&=67108863,$=Math.imul(b,J0),G=Math.imul(b,H0),G=G+Math.imul(f,J0)|0,j=Math.imul(f,H0),$=$+Math.imul(r,U0)|0,G=G+Math.imul(r,O0)|0,G=G+Math.imul(Y0,U0)|0,j=j+Math.imul(Y0,O0)|0,$=$+Math.imul(R,L0)|0,G=G+Math.imul(R,N0)|0,G=G+Math.imul(_,L0)|0,j=j+Math.imul(_,N0)|0;var p0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(p0>>>26)|0,p0&=67108863,$=Math.imul(X0,J0),G=Math.imul(X0,H0),G=G+Math.imul(z0,J0)|0,j=Math.imul(z0,H0),$=$+Math.imul(b,U0)|0,G=G+Math.imul(b,O0)|0,G=G+Math.imul(f,U0)|0,j=j+Math.imul(f,O0)|0,$=$+Math.imul(r,L0)|0,G=G+Math.imul(r,N0)|0,G=G+Math.imul(Y0,L0)|0,j=j+Math.imul(Y0,N0)|0,$=$+Math.imul(R,D0)|0,G=G+Math.imul(R,T0)|0,G=G+Math.imul(_,D0)|0,j=j+Math.imul(_,T0)|0;var o0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(o0>>>26)|0,o0&=67108863,$=Math.imul(v,J0),G=Math.imul(v,H0),G=G+Math.imul(p,J0)|0,j=Math.imul(p,H0),$=$+Math.imul(X0,U0)|0,G=G+Math.imul(X0,O0)|0,G=G+Math.imul(z0,U0)|0,j=j+Math.imul(z0,O0)|0,$=$+Math.imul(b,L0)|0,G=G+Math.imul(b,N0)|0,G=G+Math.imul(f,L0)|0,j=j+Math.imul(f,N0)|0,$=$+Math.imul(r,D0)|0,G=G+Math.imul(r,T0)|0,G=G+Math.imul(Y0,D0)|0,j=j+Math.imul(Y0,T0)|0,$=$+Math.imul(R,k0)|0,G=G+Math.imul(R,I0)|0,G=G+Math.imul(_,k0)|0,j=j+Math.imul(_,I0)|0;var u0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(u0>>>26)|0,u0&=67108863,$=Math.imul(G0,J0),G=Math.imul(G0,H0),G=G+Math.imul(t,J0)|0,j=Math.imul(t,H0),$=$+Math.imul(v,U0)|0,G=G+Math.imul(v,O0)|0,G=G+Math.imul(p,U0)|0,j=j+Math.imul(p,O0)|0,$=$+Math.imul(X0,L0)|0,G=G+Math.imul(X0,N0)|0,G=G+Math.imul(z0,L0)|0,j=j+Math.imul(z0,N0)|0,$=$+Math.imul(b,D0)|0,G=G+Math.imul(b,T0)|0,G=G+Math.imul(f,D0)|0,j=j+Math.imul(f,T0)|0,$=$+Math.imul(r,k0)|0,G=G+Math.imul(r,I0)|0,G=G+Math.imul(Y0,k0)|0,j=j+Math.imul(Y0,I0)|0,$=$+Math.imul(R,B0)|0,G=G+Math.imul(R,q0)|0,G=G+Math.imul(_,B0)|0,j=j+Math.imul(_,q0)|0;var s0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(s0>>>26)|0,s0&=67108863,$=Math.imul(Q0,J0),G=Math.imul(Q0,H0),G=G+Math.imul(V0,J0)|0,j=Math.imul(V0,H0),$=$+Math.imul(G0,U0)|0,G=G+Math.imul(G0,O0)|0,G=G+Math.imul(t,U0)|0,j=j+Math.imul(t,O0)|0,$=$+Math.imul(v,L0)|0,G=G+Math.imul(v,N0)|0,G=G+Math.imul(p,L0)|0,j=j+Math.imul(p,N0)|0,$=$+Math.imul(X0,D0)|0,G=G+Math.imul(X0,T0)|0,G=G+Math.imul(z0,D0)|0,j=j+Math.imul(z0,T0)|0,$=$+Math.imul(b,k0)|0,G=G+Math.imul(b,I0)|0,G=G+Math.imul(f,k0)|0,j=j+Math.imul(f,I0)|0,$=$+Math.imul(r,B0)|0,G=G+Math.imul(r,q0)|0,G=G+Math.imul(Y0,B0)|0,j=j+Math.imul(Y0,q0)|0,$=$+Math.imul(R,R0)|0,G=G+Math.imul(R,E0)|0,G=G+Math.imul(_,R0)|0,j=j+Math.imul(_,E0)|0;var f0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(f0>>>26)|0,f0&=67108863,$=Math.imul(F0,J0),G=Math.imul(F0,H0),G=G+Math.imul(Z0,J0)|0,j=Math.imul(Z0,H0),$=$+Math.imul(Q0,U0)|0,G=G+Math.imul(Q0,O0)|0,G=G+Math.imul(V0,U0)|0,j=j+Math.imul(V0,O0)|0,$=$+Math.imul(G0,L0)|0,G=G+Math.imul(G0,N0)|0,G=G+Math.imul(t,L0)|0,j=j+Math.imul(t,N0)|0,$=$+Math.imul(v,D0)|0,G=G+Math.imul(v,T0)|0,G=G+Math.imul(p,D0)|0,j=j+Math.imul(p,T0)|0,$=$+Math.imul(X0,k0)|0,G=G+Math.imul(X0,I0)|0,G=G+Math.imul(z0,k0)|0,j=j+Math.imul(z0,I0)|0,$=$+Math.imul(b,B0)|0,G=G+Math.imul(b,q0)|0,G=G+Math.imul(f,B0)|0,j=j+Math.imul(f,q0)|0,$=$+Math.imul(r,R0)|0,G=G+Math.imul(r,E0)|0,G=G+Math.imul(Y0,R0)|0,j=j+Math.imul(Y0,E0)|0,$=$+Math.imul(R,x0)|0,G=G+Math.imul(R,v0)|0,G=G+Math.imul(_,x0)|0,j=j+Math.imul(_,v0)|0;var a0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(a0>>>26)|0,a0&=67108863,$=Math.imul(D,J0),G=Math.imul(D,H0),G=G+Math.imul(S,J0)|0,j=Math.imul(S,H0),$=$+Math.imul(F0,U0)|0,G=G+Math.imul(F0,O0)|0,G=G+Math.imul(Z0,U0)|0,j=j+Math.imul(Z0,O0)|0,$=$+Math.imul(Q0,L0)|0,G=G+Math.imul(Q0,N0)|0,G=G+Math.imul(V0,L0)|0,j=j+Math.imul(V0,N0)|0,$=$+Math.imul(G0,D0)|0,G=G+Math.imul(G0,T0)|0,G=G+Math.imul(t,D0)|0,j=j+Math.imul(t,T0)|0,$=$+Math.imul(v,k0)|0,G=G+Math.imul(v,I0)|0,G=G+Math.imul(p,k0)|0,j=j+Math.imul(p,I0)|0,$=$+Math.imul(X0,B0)|0,G=G+Math.imul(X0,q0)|0,G=G+Math.imul(z0,B0)|0,j=j+Math.imul(z0,q0)|0,$=$+Math.imul(b,R0)|0,G=G+Math.imul(b,E0)|0,G=G+Math.imul(f,R0)|0,j=j+Math.imul(f,E0)|0,$=$+Math.imul(r,x0)|0,G=G+Math.imul(r,v0)|0,G=G+Math.imul(Y0,x0)|0,j=j+Math.imul(Y0,v0)|0,$=$+Math.imul(R,S0)|0,G=G+Math.imul(R,A0)|0,G=G+Math.imul(_,S0)|0,j=j+Math.imul(_,A0)|0;var n0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(n0>>>26)|0,n0&=67108863,$=Math.imul(h,J0),G=Math.imul(h,H0),G=G+Math.imul(u,J0)|0,j=Math.imul(u,H0),$=$+Math.imul(D,U0)|0,G=G+Math.imul(D,O0)|0,G=G+Math.imul(S,U0)|0,j=j+Math.imul(S,O0)|0,$=$+Math.imul(F0,L0)|0,G=G+Math.imul(F0,N0)|0,G=G+Math.imul(Z0,L0)|0,j=j+Math.imul(Z0,N0)|0,$=$+Math.imul(Q0,D0)|0,G=G+Math.imul(Q0,T0)|0,G=G+Math.imul(V0,D0)|0,j=j+Math.imul(V0,T0)|0,$=$+Math.imul(G0,k0)|0,G=G+Math.imul(G0,I0)|0,G=G+Math.imul(t,k0)|0,j=j+Math.imul(t,I0)|0,$=$+Math.imul(v,B0)|0,G=G+Math.imul(v,q0)|0,G=G+Math.imul(p,B0)|0,j=j+Math.imul(p,q0)|0,$=$+Math.imul(X0,R0)|0,G=G+Math.imul(X0,E0)|0,G=G+Math.imul(z0,R0)|0,j=j+Math.imul(z0,E0)|0,$=$+Math.imul(b,x0)|0,G=G+Math.imul(b,v0)|0,G=G+Math.imul(f,x0)|0,j=j+Math.imul(f,v0)|0,$=$+Math.imul(r,S0)|0,G=G+Math.imul(r,A0)|0,G=G+Math.imul(Y0,S0)|0,j=j+Math.imul(Y0,A0)|0,$=$+Math.imul(R,M0)|0,G=G+Math.imul(R,w0)|0,G=G+Math.imul(_,M0)|0,j=j+Math.imul(_,w0)|0;var r0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(r0>>>26)|0,r0&=67108863,$=Math.imul(h,U0),G=Math.imul(h,O0),G=G+Math.imul(u,U0)|0,j=Math.imul(u,O0),$=$+Math.imul(D,L0)|0,G=G+Math.imul(D,N0)|0,G=G+Math.imul(S,L0)|0,j=j+Math.imul(S,N0)|0,$=$+Math.imul(F0,D0)|0,G=G+Math.imul(F0,T0)|0,G=G+Math.imul(Z0,D0)|0,j=j+Math.imul(Z0,T0)|0,$=$+Math.imul(Q0,k0)|0,G=G+Math.imul(Q0,I0)|0,G=G+Math.imul(V0,k0)|0,j=j+Math.imul(V0,I0)|0,$=$+Math.imul(G0,B0)|0,G=G+Math.imul(G0,q0)|0,G=G+Math.imul(t,B0)|0,j=j+Math.imul(t,q0)|0,$=$+Math.imul(v,R0)|0,G=G+Math.imul(v,E0)|0,G=G+Math.imul(p,R0)|0,j=j+Math.imul(p,E0)|0,$=$+Math.imul(X0,x0)|0,G=G+Math.imul(X0,v0)|0,G=G+Math.imul(z0,x0)|0,j=j+Math.imul(z0,v0)|0,$=$+Math.imul(b,S0)|0,G=G+Math.imul(b,A0)|0,G=G+Math.imul(f,S0)|0,j=j+Math.imul(f,A0)|0,$=$+Math.imul(r,M0)|0,G=G+Math.imul(r,w0)|0,G=G+Math.imul(Y0,M0)|0,j=j+Math.imul(Y0,w0)|0;var i0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(i0>>>26)|0,i0&=67108863,$=Math.imul(h,L0),G=Math.imul(h,N0),G=G+Math.imul(u,L0)|0,j=Math.imul(u,N0),$=$+Math.imul(D,D0)|0,G=G+Math.imul(D,T0)|0,G=G+Math.imul(S,D0)|0,j=j+Math.imul(S,T0)|0,$=$+Math.imul(F0,k0)|0,G=G+Math.imul(F0,I0)|0,G=G+Math.imul(Z0,k0)|0,j=j+Math.imul(Z0,I0)|0,$=$+Math.imul(Q0,B0)|0,G=G+Math.imul(Q0,q0)|0,G=G+Math.imul(V0,B0)|0,j=j+Math.imul(V0,q0)|0,$=$+Math.imul(G0,R0)|0,G=G+Math.imul(G0,E0)|0,G=G+Math.imul(t,R0)|0,j=j+Math.imul(t,E0)|0,$=$+Math.imul(v,x0)|0,G=G+Math.imul(v,v0)|0,G=G+Math.imul(p,x0)|0,j=j+Math.imul(p,v0)|0,$=$+Math.imul(X0,S0)|0,G=G+Math.imul(X0,A0)|0,G=G+Math.imul(z0,S0)|0,j=j+Math.imul(z0,A0)|0,$=$+Math.imul(b,M0)|0,G=G+Math.imul(b,w0)|0,G=G+Math.imul(f,M0)|0,j=j+Math.imul(f,w0)|0;var t0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(t0>>>26)|0,t0&=67108863,$=Math.imul(h,D0),G=Math.imul(h,T0),G=G+Math.imul(u,D0)|0,j=Math.imul(u,T0),$=$+Math.imul(D,k0)|0,G=G+Math.imul(D,I0)|0,G=G+Math.imul(S,k0)|0,j=j+Math.imul(S,I0)|0,$=$+Math.imul(F0,B0)|0,G=G+Math.imul(F0,q0)|0,G=G+Math.imul(Z0,B0)|0,j=j+Math.imul(Z0,q0)|0,$=$+Math.imul(Q0,R0)|0,G=G+Math.imul(Q0,E0)|0,G=G+Math.imul(V0,R0)|0,j=j+Math.imul(V0,E0)|0,$=$+Math.imul(G0,x0)|0,G=G+Math.imul(G0,v0)|0,G=G+Math.imul(t,x0)|0,j=j+Math.imul(t,v0)|0,$=$+Math.imul(v,S0)|0,G=G+Math.imul(v,A0)|0,G=G+Math.imul(p,S0)|0,j=j+Math.imul(p,A0)|0,$=$+Math.imul(X0,M0)|0,G=G+Math.imul(X0,w0)|0,G=G+Math.imul(z0,M0)|0,j=j+Math.imul(z0,w0)|0;var e0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(e0>>>26)|0,e0&=67108863,$=Math.imul(h,k0),G=Math.imul(h,I0),G=G+Math.imul(u,k0)|0,j=Math.imul(u,I0),$=$+Math.imul(D,B0)|0,G=G+Math.imul(D,q0)|0,G=G+Math.imul(S,B0)|0,j=j+Math.imul(S,q0)|0,$=$+Math.imul(F0,R0)|0,G=G+Math.imul(F0,E0)|0,G=G+Math.imul(Z0,R0)|0,j=j+Math.imul(Z0,E0)|0,$=$+Math.imul(Q0,x0)|0,G=G+Math.imul(Q0,v0)|0,G=G+Math.imul(V0,x0)|0,j=j+Math.imul(V0,v0)|0,$=$+Math.imul(G0,S0)|0,G=G+Math.imul(G0,A0)|0,G=G+Math.imul(t,S0)|0,j=j+Math.imul(t,A0)|0,$=$+Math.imul(v,M0)|0,G=G+Math.imul(v,w0)|0,G=G+Math.imul(p,M0)|0,j=j+Math.imul(p,w0)|0;var X2=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(X2>>>26)|0,X2&=67108863,$=Math.imul(h,B0),G=Math.imul(h,q0),G=G+Math.imul(u,B0)|0,j=Math.imul(u,q0),$=$+Math.imul(D,R0)|0,G=G+Math.imul(D,E0)|0,G=G+Math.imul(S,R0)|0,j=j+Math.imul(S,E0)|0,$=$+Math.imul(F0,x0)|0,G=G+Math.imul(F0,v0)|0,G=G+Math.imul(Z0,x0)|0,j=j+Math.imul(Z0,v0)|0,$=$+Math.imul(Q0,S0)|0,G=G+Math.imul(Q0,A0)|0,G=G+Math.imul(V0,S0)|0,j=j+Math.imul(V0,A0)|0,$=$+Math.imul(G0,M0)|0,G=G+Math.imul(G0,w0)|0,G=G+Math.imul(t,M0)|0,j=j+Math.imul(t,w0)|0;var G2=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(G2>>>26)|0,G2&=67108863,$=Math.imul(h,R0),G=Math.imul(h,E0),G=G+Math.imul(u,R0)|0,j=Math.imul(u,E0),$=$+Math.imul(D,x0)|0,G=G+Math.imul(D,v0)|0,G=G+Math.imul(S,x0)|0,j=j+Math.imul(S,v0)|0,$=$+Math.imul(F0,S0)|0,G=G+Math.imul(F0,A0)|0,G=G+Math.imul(Z0,S0)|0,j=j+Math.imul(Z0,A0)|0,$=$+Math.imul(Q0,M0)|0,G=G+Math.imul(Q0,w0)|0,G=G+Math.imul(V0,M0)|0,j=j+Math.imul(V0,w0)|0;var Y2=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(Y2>>>26)|0,Y2&=67108863,$=Math.imul(h,x0),G=Math.imul(h,v0),G=G+Math.imul(u,x0)|0,j=Math.imul(u,v0),$=$+Math.imul(D,S0)|0,G=G+Math.imul(D,A0)|0,G=G+Math.imul(S,S0)|0,j=j+Math.imul(S,A0)|0,$=$+Math.imul(F0,M0)|0,G=G+Math.imul(F0,w0)|0,G=G+Math.imul(Z0,M0)|0,j=j+Math.imul(Z0,w0)|0;var J2=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(J2>>>26)|0,J2&=67108863,$=Math.imul(h,S0),G=Math.imul(h,A0),G=G+Math.imul(u,S0)|0,j=Math.imul(u,A0),$=$+Math.imul(D,M0)|0,G=G+Math.imul(D,w0)|0,G=G+Math.imul(S,M0)|0,j=j+Math.imul(S,w0)|0;var C2=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(C2>>>26)|0,C2&=67108863,$=Math.imul(h,M0),G=Math.imul(h,w0),G=G+Math.imul(u,M0)|0,j=Math.imul(u,w0);var z2=(K+$|0)+((G&8191)<<13)|0;return K=(j+(G>>>13)|0)+(z2>>>26)|0,z2&=67108863,V[0]=Q2,V[1]=m0,V[2]=p0,V[3]=o0,V[4]=u0,V[5]=s0,V[6]=f0,V[7]=a0,V[8]=n0,V[9]=r0,V[10]=i0,V[11]=t0,V[12]=e0,V[13]=X2,V[14]=G2,V[15]=Y2,V[16]=J2,V[17]=C2,V[18]=z2,K!==0&&(V[19]=K,C.length++),C};Math.imul||(x=q);function w(X,Y,C){C.negative=Y.negative^X.negative,C.length=X.length+Y.length;for(var J=0,z=0,V=0;V>>26)|0,z+=K>>>26,K&=67108863}C.words[V]=$,J=K,K=z}return J!==0?C.words[V]=J:C.length--,C.strip()}function M(X,Y,C){var J=new y;return J.mulp(X,Y,C)}Q.prototype.mulTo=function(X,Y){var C,J=this.length+X.length;return this.length===10&&X.length===10?C=x(this,X,Y):J<63?C=q(this,X,Y):J<1024?C=w(this,X,Y):C=M(this,X,Y),C};function y(X,Y){this.x=X,this.y=Y}y.prototype.makeRBT=function(X){for(var Y=new Array(X),C=Q.prototype._countBits(X)-1,J=0;J>=1;return J},y.prototype.permute=function(X,Y,C,J,z,V){for(var K=0;K>>1)z++;return 1<>>13,C[2*V+1]=z&8191,z=z>>>13;for(V=2*Y;V>=26,Y+=J/67108864|0,Y+=z>>>26,this.words[C]=z&67108863}return Y!==0&&(this.words[C]=Y,this.length++),this},Q.prototype.muln=function(X){return this.clone().imuln(X)},Q.prototype.sqr=function(){return this.mul(this)},Q.prototype.isqr=function(){return this.imul(this.clone())},Q.prototype.pow=function(X){var Y=P(X);if(Y.length===0)return new Q(1);for(var C=this,J=0;J=0);var Y=X%26,C=(X-Y)/26,J=67108863>>>26-Y<<26-Y,z;if(Y!==0){var V=0;for(z=0;z>>26-Y}V&&(this.words[z]=V,this.length++)}if(C!==0){for(z=this.length-1;z>=0;z--)this.words[z+C]=this.words[z];for(z=0;z=0);var J;Y?J=(Y-Y%26)/26:J=0;var z=X%26,V=Math.min((X-z)/26,this.length),K=67108863^67108863>>>z<V)for(this.length-=V,G=0;G=0&&(j!==0||G>=J);G--){var A=this.words[G]|0;this.words[G]=j<<26-z|A>>>z,j=A&K}return $&&j!==0&&($.words[$.length++]=j),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},Q.prototype.ishrn=function(X,Y,C){return H(this.negative===0),this.iushrn(X,Y,C)},Q.prototype.shln=function(X){return this.clone().ishln(X)},Q.prototype.ushln=function(X){return this.clone().iushln(X)},Q.prototype.shrn=function(X){return this.clone().ishrn(X)},Q.prototype.ushrn=function(X){return this.clone().iushrn(X)},Q.prototype.testn=function(X){H(typeof X=="number"&&X>=0);var Y=X%26,C=(X-Y)/26,J=1<=0);var Y=X%26,C=(X-Y)/26;if(H(this.negative===0,"imaskn works only with positive numbers"),this.length<=C)return this;if(Y!==0&&C++,this.length=Math.min(C,this.length),Y!==0){var J=67108863^67108863>>>Y<=67108864;Y++)this.words[Y]-=67108864,Y===this.length-1?this.words[Y+1]=1:this.words[Y+1]++;return this.length=Math.max(this.length,Y+1),this},Q.prototype.isubn=function(X){if(H(typeof X=="number"),H(X<67108864),X<0)return this.iaddn(-X);if(this.negative!==0)return this.negative=0,this.iaddn(X),this.negative=1,this;if(this.words[0]-=X,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var Y=0;Y>26)-($/67108864|0),this.words[z+C]=V&67108863}for(;z>26,this.words[z+C]=V&67108863;if(K===0)return this.strip();for(H(K===-1),K=0,z=0;z>26,this.words[z]=V&67108863;return this.negative=1,this.strip()},Q.prototype._wordDiv=function(X,Y){var C=this.length-X.length,J=this.clone(),z=X,V=z.words[z.length-1]|0,K=this._countBits(V);C=26-K,C!==0&&(z=z.ushln(C),J.iushln(C),V=z.words[z.length-1]|0);var $=J.length-z.length,G;if(Y!=="mod"){G=new Q(null),G.length=$+1,G.words=new Array(G.length);for(var j=0;j=0;R--){var _=(J.words[z.length+R]|0)*67108864+(J.words[z.length+R-1]|0);for(_=Math.min(_/V|0,67108863),J._ishlnsubmul(z,_,R);J.negative!==0;)_--,J.negative=0,J._ishlnsubmul(z,1,R),J.isZero()||(J.negative^=1);G&&(G.words[R]=_)}return G&&G.strip(),J.strip(),Y!=="div"&&C!==0&&J.iushrn(C),{div:G||null,mod:J}},Q.prototype.divmod=function(X,Y,C){if(H(!X.isZero()),this.isZero())return{div:new Q(0),mod:new Q(0)};var J,z,V;return this.negative!==0&&X.negative===0?(V=this.neg().divmod(X,Y),Y!=="mod"&&(J=V.div.neg()),Y!=="div"&&(z=V.mod.neg(),C&&z.negative!==0&&z.iadd(X)),{div:J,mod:z}):this.negative===0&&X.negative!==0?(V=this.divmod(X.neg(),Y),Y!=="mod"&&(J=V.div.neg()),{div:J,mod:V.mod}):(this.negative&X.negative)!==0?(V=this.neg().divmod(X.neg(),Y),Y!=="div"&&(z=V.mod.neg(),C&&z.negative!==0&&z.isub(X)),{div:V.div,mod:z}):X.length>this.length||this.cmp(X)<0?{div:new Q(0),mod:this}:X.length===1?Y==="div"?{div:this.divn(X.words[0]),mod:null}:Y==="mod"?{div:null,mod:new Q(this.modn(X.words[0]))}:{div:this.divn(X.words[0]),mod:new Q(this.modn(X.words[0]))}:this._wordDiv(X,Y)},Q.prototype.div=function(X){return this.divmod(X,"div",!1).div},Q.prototype.mod=function(X){return this.divmod(X,"mod",!1).mod},Q.prototype.umod=function(X){return this.divmod(X,"mod",!0).mod},Q.prototype.divRound=function(X){var Y=this.divmod(X);if(Y.mod.isZero())return Y.div;var C=Y.div.negative!==0?Y.mod.isub(X):Y.mod,J=X.ushrn(1),z=X.andln(1),V=C.cmp(J);return V<0||z===1&&V===0?Y.div:Y.div.negative!==0?Y.div.isubn(1):Y.div.iaddn(1)},Q.prototype.modn=function(X){H(X<=67108863);for(var Y=(1<<26)%X,C=0,J=this.length-1;J>=0;J--)C=(Y*C+(this.words[J]|0))%X;return C},Q.prototype.idivn=function(X){H(X<=67108863);for(var Y=0,C=this.length-1;C>=0;C--){var J=(this.words[C]|0)+Y*67108864;this.words[C]=J/X|0,Y=J%X}return this.strip()},Q.prototype.divn=function(X){return this.clone().idivn(X)},Q.prototype.egcd=function(X){H(X.negative===0),H(!X.isZero());var Y=this,C=X.clone();Y.negative!==0?Y=Y.umod(X):Y=Y.clone();for(var J=new Q(1),z=new Q(0),V=new Q(0),K=new Q(1),$=0;Y.isEven()&&C.isEven();)Y.iushrn(1),C.iushrn(1),++$;for(var G=C.clone(),j=Y.clone();!Y.isZero();){for(var A=0,R=1;(Y.words[0]&R)===0&&A<26;++A,R<<=1);if(A>0)for(Y.iushrn(A);A-- >0;)(J.isOdd()||z.isOdd())&&(J.iadd(G),z.isub(j)),J.iushrn(1),z.iushrn(1);for(var _=0,s=1;(C.words[0]&s)===0&&_<26;++_,s<<=1);if(_>0)for(C.iushrn(_);_-- >0;)(V.isOdd()||K.isOdd())&&(V.iadd(G),K.isub(j)),V.iushrn(1),K.iushrn(1);Y.cmp(C)>=0?(Y.isub(C),J.isub(V),z.isub(K)):(C.isub(Y),V.isub(J),K.isub(z))}return{a:V,b:K,gcd:C.iushln($)}},Q.prototype._invmp=function(X){H(X.negative===0),H(!X.isZero());var Y=this,C=X.clone();Y.negative!==0?Y=Y.umod(X):Y=Y.clone();for(var J=new Q(1),z=new Q(0),V=C.clone();Y.cmpn(1)>0&&C.cmpn(1)>0;){for(var K=0,$=1;(Y.words[0]&$)===0&&K<26;++K,$<<=1);if(K>0)for(Y.iushrn(K);K-- >0;)J.isOdd()&&J.iadd(V),J.iushrn(1);for(var G=0,j=1;(C.words[0]&j)===0&&G<26;++G,j<<=1);if(G>0)for(C.iushrn(G);G-- >0;)z.isOdd()&&z.iadd(V),z.iushrn(1);Y.cmp(C)>=0?(Y.isub(C),J.isub(z)):(C.isub(Y),z.isub(J))}var A;return Y.cmpn(1)===0?A=J:A=z,A.cmpn(0)<0&&A.iadd(X),A},Q.prototype.gcd=function(X){if(this.isZero())return X.abs();if(X.isZero())return this.abs();var Y=this.clone(),C=X.clone();Y.negative=0,C.negative=0;for(var J=0;Y.isEven()&&C.isEven();J++)Y.iushrn(1),C.iushrn(1);do{for(;Y.isEven();)Y.iushrn(1);for(;C.isEven();)C.iushrn(1);var z=Y.cmp(C);if(z<0){var V=Y;Y=C,C=V}else if(z===0||C.cmpn(1)===0)break;Y.isub(C)}while(!0);return C.iushln(J)},Q.prototype.invm=function(X){return this.egcd(X).a.umod(X)},Q.prototype.isEven=function(){return(this.words[0]&1)===0},Q.prototype.isOdd=function(){return(this.words[0]&1)===1},Q.prototype.andln=function(X){return this.words[0]&X},Q.prototype.bincn=function(X){H(typeof X=="number");var Y=X%26,C=(X-Y)/26,J=1<>>26,K&=67108863,this.words[V]=K}return z!==0&&(this.words[V]=z,this.length++),this},Q.prototype.isZero=function(){return this.length===1&&this.words[0]===0},Q.prototype.cmpn=function(X){var Y=X<0;if(this.negative!==0&&!Y)return-1;if(this.negative===0&&Y)return 1;this.strip();var C;if(this.length>1)C=1;else{Y&&(X=-X),H(X<=67108863,"Number is too big");var J=this.words[0]|0;C=J===X?0:JX.length)return 1;if(this.length=0;C--){var J=this.words[C]|0,z=X.words[C]|0;if(J!==z){Jz&&(Y=1);break}}return Y},Q.prototype.gtn=function(X){return this.cmpn(X)===1},Q.prototype.gt=function(X){return this.cmp(X)===1},Q.prototype.gten=function(X){return this.cmpn(X)>=0},Q.prototype.gte=function(X){return this.cmp(X)>=0},Q.prototype.ltn=function(X){return this.cmpn(X)===-1},Q.prototype.lt=function(X){return this.cmp(X)===-1},Q.prototype.lten=function(X){return this.cmpn(X)<=0},Q.prototype.lte=function(X){return this.cmp(X)<=0},Q.prototype.eqn=function(X){return this.cmpn(X)===0},Q.prototype.eq=function(X){return this.cmp(X)===0},Q.red=function(X){return new a(X)},Q.prototype.toRed=function(X){return H(!this.red,"Already a number in reduction context"),H(this.negative===0,"red works only with positives"),X.convertTo(this)._forceRed(X)},Q.prototype.fromRed=function(){return H(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},Q.prototype._forceRed=function(X){return this.red=X,this},Q.prototype.forceRed=function(X){return H(!this.red,"Already a number in reduction context"),this._forceRed(X)},Q.prototype.redAdd=function(X){return H(this.red,"redAdd works only with red numbers"),this.red.add(this,X)},Q.prototype.redIAdd=function(X){return H(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,X)},Q.prototype.redSub=function(X){return H(this.red,"redSub works only with red numbers"),this.red.sub(this,X)},Q.prototype.redISub=function(X){return H(this.red,"redISub works only with red numbers"),this.red.isub(this,X)},Q.prototype.redShl=function(X){return H(this.red,"redShl works only with red numbers"),this.red.shl(this,X)},Q.prototype.redMul=function(X){return H(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.mul(this,X)},Q.prototype.redIMul=function(X){return H(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.imul(this,X)},Q.prototype.redSqr=function(){return H(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},Q.prototype.redISqr=function(){return H(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},Q.prototype.redSqrt=function(){return H(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},Q.prototype.redInvm=function(){return H(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},Q.prototype.redNeg=function(){return H(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},Q.prototype.redPow=function(X){return H(this.red&&!X.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,X)};var m={k256:null,p224:null,p192:null,p25519:null};function c(X,Y){this.name=X,this.p=new Q(Y,16),this.n=this.p.bitLength(),this.k=new Q(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}c.prototype._tmp=function(){var X=new Q(null);return X.words=new Array(Math.ceil(this.n/13)),X},c.prototype.ireduce=function(X){var Y=X,C;do this.split(Y,this.tmp),Y=this.imulK(Y),Y=Y.iadd(this.tmp),C=Y.bitLength();while(C>this.n);var J=C0?Y.isub(this.p):Y.strip!==void 0?Y.strip():Y._strip(),Y},c.prototype.split=function(X,Y){X.iushrn(this.n,0,Y)},c.prototype.imulK=function(X){return X.imul(this.k)};function l(){c.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}k(l,c),l.prototype.split=function(X,Y){for(var C=4194303,J=Math.min(X.length,9),z=0;z>>22,V=K}V>>>=22,X.words[z-10]=V,V===0&&X.length>10?X.length-=10:X.length-=9},l.prototype.imulK=function(X){X.words[X.length]=0,X.words[X.length+1]=0,X.length+=2;for(var Y=0,C=0;C>>=26,X.words[C]=z,Y=J}return Y!==0&&(X.words[X.length++]=Y),X},Q._prime=function(X){if(m[X])return m[X];var Y;if(X==="k256")Y=new l;else if(X==="p224")Y=new n;else if(X==="p192")Y=new i;else if(X==="p25519")Y=new C0;else throw new Error("Unknown prime "+X);return m[X]=Y,Y};function a(X){if(typeof X=="string"){var Y=Q._prime(X);this.m=Y.p,this.prime=Y}else H(X.gtn(1),"modulus must be greater than 1"),this.m=X,this.prime=null}a.prototype._verify1=function(X){H(X.negative===0,"red works only with positives"),H(X.red,"red works only with red numbers")},a.prototype._verify2=function(X,Y){H((X.negative|Y.negative)===0,"red works only with positives"),H(X.red&&X.red===Y.red,"red works only with red numbers")},a.prototype.imod=function(X){return this.prime?this.prime.ireduce(X)._forceRed(this):X.umod(this.m)._forceRed(this)},a.prototype.neg=function(X){return X.isZero()?X.clone():this.m.sub(X)._forceRed(this)},a.prototype.add=function(X,Y){this._verify2(X,Y);var C=X.add(Y);return C.cmp(this.m)>=0&&C.isub(this.m),C._forceRed(this)},a.prototype.iadd=function(X,Y){this._verify2(X,Y);var C=X.iadd(Y);return C.cmp(this.m)>=0&&C.isub(this.m),C},a.prototype.sub=function(X,Y){this._verify2(X,Y);var C=X.sub(Y);return C.cmpn(0)<0&&C.iadd(this.m),C._forceRed(this)},a.prototype.isub=function(X,Y){this._verify2(X,Y);var C=X.isub(Y);return C.cmpn(0)<0&&C.iadd(this.m),C},a.prototype.shl=function(X,Y){return this._verify1(X),this.imod(X.ushln(Y))},a.prototype.imul=function(X,Y){return this._verify2(X,Y),this.imod(X.imul(Y))},a.prototype.mul=function(X,Y){return this._verify2(X,Y),this.imod(X.mul(Y))},a.prototype.isqr=function(X){return this.imul(X,X.clone())},a.prototype.sqr=function(X){return this.mul(X,X)},a.prototype.sqrt=function(X){if(X.isZero())return X.clone();var Y=this.m.andln(3);if(H(Y%2===1),Y===3){var C=this.m.add(new Q(1)).iushrn(2);return this.pow(X,C)}for(var J=this.m.subn(1),z=0;!J.isZero()&&J.andln(1)===0;)z++,J.iushrn(1);H(!J.isZero());var V=new Q(1).toRed(this),K=V.redNeg(),$=this.m.subn(1).iushrn(1),G=this.m.bitLength();for(G=new Q(2*G*G).toRed(this);this.pow(G,$).cmp(K)!==0;)G.redIAdd(K);for(var j=this.pow(G,J),A=this.pow(X,J.addn(1).iushrn(1)),R=this.pow(X,J),_=z;R.cmp(V)!==0;){for(var s=R,r=0;s.cmp(V)!==0;r++)s=s.redSqr();H(r<_);var Y0=this.pow(j,new Q(1).iushln(_-r-1));A=A.redMul(Y0),j=Y0.redSqr(),R=R.redMul(j),_=r}return A},a.prototype.invm=function(X){var Y=X._invmp(this.m);return Y.negative!==0?(Y.negative=0,this.imod(Y).redNeg()):this.imod(Y)},a.prototype.pow=function(X,Y){if(Y.isZero())return new Q(1).toRed(this);if(Y.cmpn(1)===0)return X.clone();var C=4,J=new Array(1<=0;z--){for(var j=Y.words[z],A=G-1;A>=0;A--){var R=j>>A&1;if(V!==J[0]&&(V=this.sqr(V)),R===0&&K===0){$=0;continue}K<<=1,K|=R,$++,!($!==C&&(z!==0||A!==0))&&(V=this.mul(V,J[K]),$=0,K=0)}G=26}return V},a.prototype.convertTo=function(X){var Y=X.umod(this.m);return Y===X?Y.clone():Y},a.prototype.convertFrom=function(X){var Y=X.clone();return Y.red=null,Y},Q.mont=function(X){return new K0(X)};function K0(X){a.call(this,X),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new Q(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)}k(K0,a),K0.prototype.convertTo=function(X){return this.imod(X.ushln(this.shift))},K0.prototype.convertFrom=function(X){var Y=this.imod(X.mul(this.rinv));return Y.red=null,Y},K0.prototype.imul=function(X,Y){if(X.isZero()||Y.isZero())return X.words[0]=0,X.length=1,X;var C=X.imul(Y),J=C.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),z=C.isub(J).iushrn(this.shift),V=z;return z.cmp(this.m)>=0?V=z.isub(this.m):z.cmpn(0)<0&&(V=z.iadd(this.m)),V._forceRed(this)},K0.prototype.mul=function(X,Y){if(X.isZero()||Y.isZero())return new Q(0)._forceRed(this);var C=X.mul(Y),J=C.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),z=C.isub(J).iushrn(this.shift),V=z;return z.cmp(this.m)>=0?V=z.isub(this.m):z.cmpn(0)<0&&(V=z.iadd(this.m)),V._forceRed(this)},K0.prototype.invm=function(X){var Y=this.imod(X._invmp(this.m).mul(this.r2));return Y._forceRed(this)}})(typeof I>"u"||I,E)}),h1=$0((E,I)=>{var F=U2(),L=F.Buffer,H={},k;for(k in F)!F.hasOwnProperty(k)||k==="SlowBuffer"||k==="Buffer"||(H[k]=F[k]);var Q=H.Buffer={};for(k in L)!L.hasOwnProperty(k)||k==="allocUnsafe"||k==="allocUnsafeSlow"||(Q[k]=L[k]);if(H.Buffer.prototype=L.prototype,(!Q.from||Q.from===Uint8Array.from)&&(Q.from=function(O,N,U){if(typeof O=="number")throw new TypeError('The "value" argument must not be of type number. Received type '+typeof O);if(O&&typeof O.length>"u")throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof O);return L(O,N,U)}),Q.alloc||(Q.alloc=function(O,N,U){if(typeof O!="number")throw new TypeError('The "size" argument must be of type number. Received type '+typeof O);if(O<0||O>=2*(1<<30))throw new RangeError('The value "'+O+'" is invalid for option "size"');var W=L(O);return!N||N.length===0?W.fill(0):typeof U=="string"?W.fill(N,U):W.fill(N),W}),!H.kStringMaxLength)try{H.kStringMaxLength=process.binding("buffer").kStringMaxLength}catch{}H.constants||(H.constants={MAX_LENGTH:H.kMaxLength},H.kStringMaxLength&&(H.constants.MAX_STRING_LENGTH=H.kStringMaxLength)),I.exports=H}),o1=$0((E)=>{var I=c0();function F(H){this._reporterState={obj:null,path:[],options:H||{},errors:[]}}E.Reporter=F,F.prototype.isError=function(H){return H instanceof L},F.prototype.save=function(){let H=this._reporterState;return{obj:H.obj,pathLen:H.path.length}},F.prototype.restore=function(H){let k=this._reporterState;k.obj=H.obj,k.path=k.path.slice(0,H.pathLen)},F.prototype.enterKey=function(H){return this._reporterState.path.push(H)},F.prototype.exitKey=function(H){let k=this._reporterState;k.path=k.path.slice(0,H-1)},F.prototype.leaveKey=function(H,k,Q){let O=this._reporterState;this.exitKey(H),O.obj!==null&&(O.obj[k]=Q)},F.prototype.path=function(){return this._reporterState.path.join("/")},F.prototype.enterObject=function(){let H=this._reporterState,k=H.obj;return H.obj={},k},F.prototype.leaveObject=function(H){let k=this._reporterState,Q=k.obj;return k.obj=H,Q},F.prototype.error=function(H){let k,Q=this._reporterState,O=H instanceof L;if(O?k=H:k=new L(Q.path.map(function(N){return"["+JSON.stringify(N)+"]"}).join(""),H.message||H,H.stack),!Q.options.partial)throw k;return O||Q.errors.push(k),k},F.prototype.wrapResult=function(H){let k=this._reporterState;return k.options.partial?{result:this.isError(H)?null:H,errors:k.errors}:H};function L(H,k){this.path=H,this.rethrow(k)}I(L,Error),L.prototype.rethrow=function(H){if(this.message=H+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,L),!this.stack)try{throw new Error(this.message)}catch(k){this.stack=k.stack}return this}}),h2=$0((E)=>{var I=c0(),F=o1().Reporter,L=h1().Buffer;function H(Q,O){if(F.call(this,O),!L.isBuffer(Q)){this.error("Input not Buffer");return}this.base=Q,this.offset=0,this.length=Q.length}I(H,F),E.DecoderBuffer=H,H.isDecoderBuffer=function(Q){return Q instanceof H?!0:typeof Q=="object"&&L.isBuffer(Q.base)&&Q.constructor.name==="DecoderBuffer"&&typeof Q.offset=="number"&&typeof Q.length=="number"&&typeof Q.save=="function"&&typeof Q.restore=="function"&&typeof Q.isEmpty=="function"&&typeof Q.readUInt8=="function"&&typeof Q.skip=="function"&&typeof Q.raw=="function"},H.prototype.save=function(){return{offset:this.offset,reporter:F.prototype.save.call(this)}},H.prototype.restore=function(Q){let O=new H(this.base);return O.offset=Q.offset,O.length=this.offset,this.offset=Q.offset,F.prototype.restore.call(this,Q.reporter),O},H.prototype.isEmpty=function(){return this.offset===this.length},H.prototype.readUInt8=function(Q){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(Q||"DecoderBuffer overrun")},H.prototype.skip=function(Q,O){if(!(this.offset+Q<=this.length))return this.error(O||"DecoderBuffer overrun");let N=new H(this.base);return N._reporterState=this._reporterState,N.offset=this.offset,N.length=this.offset+Q,this.offset+=Q,N},H.prototype.raw=function(Q){return this.base.slice(Q?Q.offset:this.offset,this.length)};function k(Q,O){if(Array.isArray(Q))this.length=0,this.value=Q.map(function(N){return k.isEncoderBuffer(N)||(N=new k(N,O)),this.length+=N.length,N},this);else if(typeof Q=="number"){if(!(0<=Q&&Q<=255))return O.error("non-byte EncoderBuffer value");this.value=Q,this.length=1}else if(typeof Q=="string")this.value=Q,this.length=L.byteLength(Q);else if(L.isBuffer(Q))this.value=Q,this.length=Q.length;else return O.error("Unsupported type: "+typeof Q)}E.EncoderBuffer=k,k.isEncoderBuffer=function(Q){return Q instanceof k?!0:typeof Q=="object"&&Q.constructor.name==="EncoderBuffer"&&typeof Q.length=="number"&&typeof Q.join=="function"},k.prototype.join=function(Q,O){return Q||(Q=L.alloc(this.length)),O||(O=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(N){N.join(Q,O),O+=N.length}):(typeof this.value=="number"?Q[O]=this.value:typeof this.value=="string"?Q.write(this.value,O):L.isBuffer(this.value)&&this.value.copy(Q,O),O+=this.length)),Q}}),u1=$0((E,I)=>{var F=o1().Reporter,L=h2().EncoderBuffer,H=h2().DecoderBuffer,k=P2(),Q=["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"],O=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(Q),N=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function U(Z,T,B){let P={};this._baseState=P,P.name=B,P.enc=Z,P.parent=T||null,P.children=null,P.tag=null,P.args=null,P.reverseArgs=null,P.choice=null,P.optional=!1,P.any=!1,P.obj=!1,P.use=null,P.useDecoder=null,P.key=null,P.default=null,P.explicit=null,P.implicit=null,P.contains=null,P.parent||(P.children=[],this._wrap())}I.exports=U;var W=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];U.prototype.clone=function(){let Z=this._baseState,T={};W.forEach(function(P){T[P]=Z[P]});let B=new this.constructor(T.parent);return B._baseState=T,B},U.prototype._wrap=function(){let Z=this._baseState;O.forEach(function(T){this[T]=function(){let B=new this.constructor(this);return Z.children.push(B),B[T].apply(B,arguments)}},this)},U.prototype._init=function(Z){let T=this._baseState;k(T.parent===null),Z.call(this),T.children=T.children.filter(function(B){return B._baseState.parent===this},this),k.equal(T.children.length,1,"Root node can have only one child")},U.prototype._useArgs=function(Z){let T=this._baseState,B=Z.filter(function(P){return P instanceof this.constructor},this);Z=Z.filter(function(P){return!(P instanceof this.constructor)},this),B.length!==0&&(k(T.children===null),T.children=B,B.forEach(function(P){P._baseState.parent=this},this)),Z.length!==0&&(k(T.args===null),T.args=Z,T.reverseArgs=Z.map(function(P){if(typeof P!="object"||P.constructor!==Object)return P;let q={};return Object.keys(P).forEach(function(x){x==(x|0)&&(x|=0);let w=P[x];q[w]=x}),q}))},N.forEach(function(Z){U.prototype[Z]=function(){let T=this._baseState;throw new Error(Z+" not implemented for encoding: "+T.enc)}}),Q.forEach(function(Z){U.prototype[Z]=function(){let T=this._baseState,B=Array.prototype.slice.call(arguments);return k(T.tag===null),T.tag=Z,this._useArgs(B),this}}),U.prototype.use=function(Z){k(Z);let T=this._baseState;return k(T.use===null),T.use=Z,this},U.prototype.optional=function(){let Z=this._baseState;return Z.optional=!0,this},U.prototype.def=function(Z){let T=this._baseState;return k(T.default===null),T.default=Z,T.optional=!0,this},U.prototype.explicit=function(Z){let T=this._baseState;return k(T.explicit===null&&T.implicit===null),T.explicit=Z,this},U.prototype.implicit=function(Z){let T=this._baseState;return k(T.explicit===null&&T.implicit===null),T.implicit=Z,this},U.prototype.obj=function(){let Z=this._baseState,T=Array.prototype.slice.call(arguments);return Z.obj=!0,T.length!==0&&this._useArgs(T),this},U.prototype.key=function(Z){let T=this._baseState;return k(T.key===null),T.key=Z,this},U.prototype.any=function(){let Z=this._baseState;return Z.any=!0,this},U.prototype.choice=function(Z){let T=this._baseState;return k(T.choice===null),T.choice=Z,this._useArgs(Object.keys(Z).map(function(B){return Z[B]})),this},U.prototype.contains=function(Z){let T=this._baseState;return k(T.use===null),T.contains=Z,this},U.prototype._decode=function(Z,T){let B=this._baseState;if(B.parent===null)return Z.wrapResult(B.children[0]._decode(Z,T));let P=B.default,q=!0,x=null;if(B.key!==null&&(x=Z.enterKey(B.key)),B.optional){let M=null;if(B.explicit!==null?M=B.explicit:B.implicit!==null?M=B.implicit:B.tag!==null&&(M=B.tag),M===null&&!B.any){let y=Z.save();try{B.choice===null?this._decodeGeneric(B.tag,Z,T):this._decodeChoice(Z,T),q=!0}catch{q=!1}Z.restore(y)}else if(q=this._peekTag(Z,M,B.any),Z.isError(q))return q}let w;if(B.obj&&q&&(w=Z.enterObject()),q){if(B.explicit!==null){let y=this._decodeTag(Z,B.explicit);if(Z.isError(y))return y;Z=y}let M=Z.offset;if(B.use===null&&B.choice===null){let y;B.any&&(y=Z.save());let m=this._decodeTag(Z,B.implicit!==null?B.implicit:B.tag,B.any);if(Z.isError(m))return m;B.any?P=Z.raw(y):Z=m}if(T&&T.track&&B.tag!==null&&T.track(Z.path(),M,Z.length,"tagged"),T&&T.track&&B.tag!==null&&T.track(Z.path(),Z.offset,Z.length,"content"),B.any||(B.choice===null?P=this._decodeGeneric(B.tag,Z,T):P=this._decodeChoice(Z,T)),Z.isError(P))return P;if(!B.any&&B.choice===null&&B.children!==null&&B.children.forEach(function(y){y._decode(Z,T)}),B.contains&&(B.tag==="octstr"||B.tag==="bitstr")){let y=new H(P);P=this._getUse(B.contains,Z._reporterState.obj)._decode(y,T)}}return B.obj&&q&&(P=Z.leaveObject(w)),B.key!==null&&(P!==null||q===!0)?Z.leaveKey(x,B.key,P):x!==null&&Z.exitKey(x),P},U.prototype._decodeGeneric=function(Z,T,B){let P=this._baseState;return Z==="seq"||Z==="set"?null:Z==="seqof"||Z==="setof"?this._decodeList(T,Z,P.args[0],B):/str$/.test(Z)?this._decodeStr(T,Z,B):Z==="objid"&&P.args?this._decodeObjid(T,P.args[0],P.args[1],B):Z==="objid"?this._decodeObjid(T,null,null,B):Z==="gentime"||Z==="utctime"?this._decodeTime(T,Z,B):Z==="null_"?this._decodeNull(T,B):Z==="bool"?this._decodeBool(T,B):Z==="objDesc"?this._decodeStr(T,Z,B):Z==="int"||Z==="enum"?this._decodeInt(T,P.args&&P.args[0],B):P.use!==null?this._getUse(P.use,T._reporterState.obj)._decode(T,B):T.error("unknown tag: "+Z)},U.prototype._getUse=function(Z,T){let B=this._baseState;return B.useDecoder=this._use(Z,T),k(B.useDecoder._baseState.parent===null),B.useDecoder=B.useDecoder._baseState.children[0],B.implicit!==B.useDecoder._baseState.implicit&&(B.useDecoder=B.useDecoder.clone(),B.useDecoder._baseState.implicit=B.implicit),B.useDecoder},U.prototype._decodeChoice=function(Z,T){let B=this._baseState,P=null,q=!1;return Object.keys(B.choice).some(function(x){let w=Z.save(),M=B.choice[x];try{let y=M._decode(Z,T);if(Z.isError(y))return!1;P={type:x,value:y},q=!0}catch{return Z.restore(w),!1}return!0},this),q?P:Z.error("Choice not matched")},U.prototype._createEncoderBuffer=function(Z){return new L(Z,this.reporter)},U.prototype._encode=function(Z,T,B){let P=this._baseState;if(P.default!==null&&P.default===Z)return;let q=this._encodeValue(Z,T,B);if(q!==void 0&&!this._skipDefault(q,T,B))return q},U.prototype._encodeValue=function(Z,T,B){let P=this._baseState;if(P.parent===null)return P.children[0]._encode(Z,T||new F);let q=null;if(this.reporter=T,P.optional&&Z===void 0)if(P.default!==null)Z=P.default;else return;let x=null,w=!1;if(P.any)q=this._createEncoderBuffer(Z);else if(P.choice)q=this._encodeChoice(Z,T);else if(P.contains)x=this._getUse(P.contains,B)._encode(Z,T),w=!0;else if(P.children)x=P.children.map(function(M){if(M._baseState.tag==="null_")return M._encode(null,T,Z);if(M._baseState.key===null)return T.error("Child should have a key");let y=T.enterKey(M._baseState.key);if(typeof Z!="object")return T.error("Child expected, but input is not object");let m=M._encode(Z[M._baseState.key],T,Z);return T.leaveKey(y),m},this).filter(function(M){return M}),x=this._createEncoderBuffer(x);else if(P.tag==="seqof"||P.tag==="setof"){if(!(P.args&&P.args.length===1))return T.error("Too many args for : "+P.tag);if(!Array.isArray(Z))return T.error("seqof/setof, but data is not Array");let M=this.clone();M._baseState.implicit=null,x=this._createEncoderBuffer(Z.map(function(y){let m=this._baseState;return this._getUse(m.args[0],Z)._encode(y,T)},M))}else P.use!==null?q=this._getUse(P.use,B)._encode(Z,T):(x=this._encodePrimitive(P.tag,Z),w=!0);if(!P.any&&P.choice===null){let M=P.implicit!==null?P.implicit:P.tag,y=P.implicit===null?"universal":"context";M===null?P.use===null&&T.error("Tag could be omitted only for .use()"):P.use===null&&(q=this._encodeComposite(M,w,y,x))}return P.explicit!==null&&(q=this._encodeComposite(P.explicit,!1,"context",q)),q},U.prototype._encodeChoice=function(Z,T){let B=this._baseState,P=B.choice[Z.type];return P||k(!1,Z.type+" not found in "+JSON.stringify(Object.keys(B.choice))),P._encode(Z.value,T)},U.prototype._encodePrimitive=function(Z,T){let B=this._baseState;if(/str$/.test(Z))return this._encodeStr(T,Z);if(Z==="objid"&&B.args)return this._encodeObjid(T,B.reverseArgs[0],B.args[1]);if(Z==="objid")return this._encodeObjid(T,null,null);if(Z==="gentime"||Z==="utctime")return this._encodeTime(T,Z);if(Z==="null_")return this._encodeNull();if(Z==="int"||Z==="enum")return this._encodeInt(T,B.args&&B.reverseArgs[0]);if(Z==="bool")return this._encodeBool(T);if(Z==="objDesc")return this._encodeStr(T,Z);throw new Error("Unsupported tag: "+Z)},U.prototype._isNumstr=function(Z){return/^[0-9 ]*$/.test(Z)},U.prototype._isPrintstr=function(Z){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(Z)}}),s1=$0((E)=>{function I(F){let L={};return Object.keys(F).forEach(function(H){(H|0)==H&&(H=H|0);let k=F[H];L[k]=H}),L}E.tagClass={0:"universal",1:"application",2:"context",3:"private"},E.tagClassByName=I(E.tagClass),E.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"},E.tagByName=I(E.tag)}),Q6=$0((E,I)=>{var F=c0(),L=h1().Buffer,H=u1(),k=s1();function Q(W){this.enc="der",this.name=W.name,this.entity=W,this.tree=new O,this.tree._init(W.body)}I.exports=Q,Q.prototype.encode=function(W,Z){return this.tree._encode(W,Z).join()};function O(W){H.call(this,"der",W)}F(O,H),O.prototype._encodeComposite=function(W,Z,T,B){let P=U(W,Z,T,this.reporter);if(B.length<128){let w=L.alloc(2);return w[0]=P,w[1]=B.length,this._createEncoderBuffer([w,B])}let q=1;for(let w=B.length;w>=256;w>>=8)q++;let x=L.alloc(2+q);x[0]=P,x[1]=128|q;for(let w=1+q,M=B.length;M>0;w--,M>>=8)x[w]=M&255;return this._createEncoderBuffer([x,B])},O.prototype._encodeStr=function(W,Z){if(Z==="bitstr")return this._createEncoderBuffer([W.unused|0,W.data]);if(Z==="bmpstr"){let T=L.alloc(W.length*2);for(let B=0;B=40)return this.reporter.error("Second objid identifier OOB");W.splice(0,2,W[0]*40+W[1])}let B=0;for(let x=0;x=128;w>>=7)B++}let P=L.alloc(B),q=P.length-1;for(let x=W.length-1;x>=0;x--){let w=W[x];for(P[q--]=w&127;(w>>=7)>0;)P[q--]=128|w&127}return this._createEncoderBuffer(P)};function N(W){return W<10?"0"+W:W}O.prototype._encodeTime=function(W,Z){let T,B=new Date(W);return Z==="gentime"?T=[N(B.getUTCFullYear()),N(B.getUTCMonth()+1),N(B.getUTCDate()),N(B.getUTCHours()),N(B.getUTCMinutes()),N(B.getUTCSeconds()),"Z"].join(""):Z==="utctime"?T=[N(B.getUTCFullYear()%100),N(B.getUTCMonth()+1),N(B.getUTCDate()),N(B.getUTCHours()),N(B.getUTCMinutes()),N(B.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+Z+" time is not supported yet"),this._encodeStr(T,"octstr")},O.prototype._encodeNull=function(){return this._createEncoderBuffer("")},O.prototype._encodeInt=function(W,Z){if(typeof W=="string"){if(!Z)return this.reporter.error("String int or enum given, but no values map");if(!Z.hasOwnProperty(W))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(W));W=Z[W]}if(typeof W!="number"&&!L.isBuffer(W)){let P=W.toArray();!W.sign&&P[0]&128&&P.unshift(0),W=L.from(P)}if(L.isBuffer(W)){let P=W.length;W.length===0&&P++;let q=L.alloc(P);return W.copy(q),W.length===0&&(q[0]=0),this._createEncoderBuffer(q)}if(W<128)return this._createEncoderBuffer(W);if(W<256)return this._createEncoderBuffer([0,W]);let T=1;for(let P=W;P>=256;P>>=8)T++;let B=new Array(T);for(let P=B.length-1;P>=0;P--)B[P]=W&255,W>>=8;return B[0]&128&&B.unshift(0),this._createEncoderBuffer(L.from(B))},O.prototype._encodeBool=function(W){return this._createEncoderBuffer(W?255:0)},O.prototype._use=function(W,Z){return typeof W=="function"&&(W=W(Z)),W._getEncoder("der").tree},O.prototype._skipDefault=function(W,Z,T){let B=this._baseState,P;if(B.default===null)return!1;let q=W.join();if(B.defaultBuffer===void 0&&(B.defaultBuffer=this._encodeValue(B.default,Z,T).join()),q.length!==B.defaultBuffer.length)return!1;for(P=0;P=31?B.error("Multi-octet tag encoding unsupported"):(Z||(P|=32),P|=k.tagClassByName[T||"universal"]<<6,P)}}),G3=$0((E,I)=>{var F=c0(),L=Q6();function H(k){L.call(this,k),this.enc="pem"}F(H,L),I.exports=H,H.prototype.encode=function(k,Q){let O=L.prototype.encode.call(this,k).toString("base64"),N=["-----BEGIN "+Q.label+"-----"];for(let U=0;U{var I=E;I.der=Q6(),I.pem=G3()}),j6=$0((E,I)=>{var F=c0(),L=z6(),H=h2().DecoderBuffer,k=u1(),Q=s1();function O(Z){this.enc="der",this.name=Z.name,this.entity=Z,this.tree=new N,this.tree._init(Z.body)}I.exports=O,O.prototype.decode=function(Z,T){return H.isDecoderBuffer(Z)||(Z=new H(Z,T)),this.tree._decode(Z,T)};function N(Z){k.call(this,"der",Z)}F(N,k),N.prototype._peekTag=function(Z,T,B){if(Z.isEmpty())return!1;let P=Z.save(),q=U(Z,'Failed to peek tag: "'+T+'"');return Z.isError(q)?q:(Z.restore(P),q.tag===T||q.tagStr===T||q.tagStr+"of"===T||B)},N.prototype._decodeTag=function(Z,T,B){let P=U(Z,'Failed to decode tag of "'+T+'"');if(Z.isError(P))return P;let q=W(Z,P.primitive,'Failed to get length of "'+T+'"');if(Z.isError(q))return q;if(!B&&P.tag!==T&&P.tagStr!==T&&P.tagStr+"of"!==T)return Z.error('Failed to match tag: "'+T+'"');if(P.primitive||q!==null)return Z.skip(q,'Failed to match body of: "'+T+'"');let x=Z.save(),w=this._skipUntilEnd(Z,'Failed to skip indefinite length body: "'+this.tag+'"');return Z.isError(w)?w:(q=Z.offset-x.offset,Z.restore(x),Z.skip(q,'Failed to match body of: "'+T+'"'))},N.prototype._skipUntilEnd=function(Z,T){for(;;){let B=U(Z,T);if(Z.isError(B))return B;let P=W(Z,B.primitive,T);if(Z.isError(P))return P;let q;if(B.primitive||P!==null?q=Z.skip(P):q=this._skipUntilEnd(Z,T),Z.isError(q))return q;if(B.tagStr==="end")break}},N.prototype._decodeList=function(Z,T,B,P){let q=[];for(;!Z.isEmpty();){let x=this._peekTag(Z,"end");if(Z.isError(x))return x;let w=B.decode(Z,"der",P);if(Z.isError(w)&&x)break;q.push(w)}return q},N.prototype._decodeStr=function(Z,T){if(T==="bitstr"){let B=Z.readUInt8();return Z.isError(B)?B:{unused:B,data:Z.raw()}}else if(T==="bmpstr"){let B=Z.raw();if(B.length%2===1)return Z.error("Decoding of string type: bmpstr length mismatch");let P="";for(let q=0;q>6],q=(B&32)===0;if((B&31)===31){let w=B;for(B=0;(w&128)===128;){if(w=Z.readUInt8(T),Z.isError(w))return w;B<<=7,B|=w&127}}else B&=31;let x=Q.tag[B];return{cls:P,primitive:q,tag:B,tagStr:x}}function W(Z,T,B){let P=Z.readUInt8(B);if(Z.isError(P))return P;if(!T&&P===128)return null;if((P&128)===0)return P;let q=P&127;if(q>4)return Z.error("length octect is too long");P=0;for(let x=0;x{var F=c0(),L=h1().Buffer,H=j6();function k(Q){H.call(this,Q),this.enc="pem"}F(k,H),I.exports=k,k.prototype.decode=function(Q,O){let N=Q.toString().split(/[\r\n]+/g),U=O.label.toUpperCase(),W=/^-----(BEGIN|END) ([^-]+)-----$/,Z=-1,T=-1;for(let q=0;q{var I=E;I.der=j6(),I.pem=Y3()}),J3=$0((E)=>{var I=$6(),F=V6(),L=c0(),H=E;H.define=function(Q,O){return new k(Q,O)};function k(Q,O){this.name=Q,this.body=O,this.decoders={},this.encoders={}}k.prototype._createNamed=function(Q){let O=this.name;function N(U){this._initNamed(U,O)}return L(N,Q),N.prototype._initNamed=function(U,W){Q.call(this,U,W)},new N(this)},k.prototype._getDecoder=function(Q){return Q=Q||"der",this.decoders.hasOwnProperty(Q)||(this.decoders[Q]=this._createNamed(F[Q])),this.decoders[Q]},k.prototype.decode=function(Q,O,N){return this._getDecoder(O).decode(Q,N)},k.prototype._getEncoder=function(Q){return Q=Q||"der",this.encoders.hasOwnProperty(Q)||(this.encoders[Q]=this._createNamed(I[Q])),this.encoders[Q]},k.prototype.encode=function(Q,O,N){return this._getEncoder(O).encode(Q,N)}}),C3=$0((E)=>{var I=E;I.Reporter=o1().Reporter,I.DecoderBuffer=h2().DecoderBuffer,I.EncoderBuffer=h2().EncoderBuffer,I.Node=u1()}),z3=$0((E)=>{var I=E;I._reverse=function(F){let L={};return Object.keys(F).forEach(function(H){(H|0)==H&&(H=H|0);let k=F[H];L[k]=H}),L},I.der=s1()}),K6=$0((E)=>{var I=E;I.bignum=z6(),I.define=J3().define,I.base=C3(),I.constants=z3(),I.decoders=V6(),I.encoders=$6()}),Q3=$0((E,I)=>{var F=K6(),L=F.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),H=F.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),k=F.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),Q=F.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(k),this.key("subjectPublicKey").bitstr())}),O=F.define("RelativeDistinguishedName",function(){this.setof(H)}),N=F.define("RDNSequence",function(){this.seqof(O)}),U=F.define("Name",function(){this.choice({rdnSequence:this.use(N)})}),W=F.define("Validity",function(){this.seq().obj(this.key("notBefore").use(L),this.key("notAfter").use(L))}),Z=F.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),T=F.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(k),this.key("issuer").use(U),this.key("validity").use(W),this.key("subject").use(U),this.key("subjectPublicKeyInfo").use(Q),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(Z).optional())}),B=F.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(T),this.key("signatureAlgorithm").use(k),this.key("signatureValue").bitstr())});I.exports=B}),$3=$0((E)=>{var I=K6();E.certificate=Q3();var F=I.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())});E.RSAPrivateKey=F;var L=I.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});E.RSAPublicKey=L;var H=I.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(k),this.key("subjectPublicKey").bitstr())});E.PublicKey=H;var k=I.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())}),Q=I.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(k),this.key("subjectPrivateKey").octstr())});E.PrivateKey=Q;var O=I.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())});E.EncryptedPrivateKey=O;var N=I.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())});E.DSAPrivateKey=N,E.DSAparam=I.define("DSAparam",function(){this.int()});var U=I.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(W),this.key("publicKey").optional().explicit(1).bitstr())});E.ECPrivateKey=U;var W=I.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});E.signature=I.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})}),j3=$0((E,I)=>{I.exports={"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"}}),V3=$0((E,I)=>{var F=/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,L=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,H=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,k=j1(),Q=_1(),O=l0().Buffer;I.exports=function(N,U){var W=N.toString(),Z=W.match(F),T;if(Z){var B="aes"+Z[1],P=O.from(Z[2],"hex"),q=O.from(Z[3].replace(/[\r\n]/g,""),"base64"),x=k(U,P.slice(0,8),parseInt(Z[1],10)).key,w=[],M=Q.createDecipheriv(B,x,P);w.push(M.update(q)),w.push(M.final()),T=O.concat(w)}else{var y=W.match(H);T=O.from(y[2].replace(/[\r\n]/g,""),"base64")}var m=W.match(L)[1];return{tag:m,data:T}}}),K1=$0((E,I)=>{var F=$3(),L=j3(),H=V3(),k=_1(),Q=p5(),O=l0().Buffer;I.exports=N;function N(W){var Z;typeof W=="object"&&!O.isBuffer(W)&&(Z=W.passphrase,W=W.key),typeof W=="string"&&(W=O.from(W));var T=H(W,Z),B=T.tag,P=T.data,q,x;switch(B){case"CERTIFICATE":x=F.certificate.decode(P,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(x||(x=F.PublicKey.decode(P,"der")),q=x.algorithm.algorithm.join("."),q){case"1.2.840.113549.1.1.1":return F.RSAPublicKey.decode(x.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return x.subjectPrivateKey=x.subjectPublicKey,{type:"ec",data:x};case"1.2.840.10040.4.1":return x.algorithm.params.pub_key=F.DSAparam.decode(x.subjectPublicKey.data,"der"),{type:"dsa",data:x.algorithm.params};default:throw new Error("unknown key id "+q)}case"ENCRYPTED PRIVATE KEY":P=F.EncryptedPrivateKey.decode(P,"der"),P=U(P,Z);case"PRIVATE KEY":switch(x=F.PrivateKey.decode(P,"der"),q=x.algorithm.algorithm.join("."),q){case"1.2.840.113549.1.1.1":return F.RSAPrivateKey.decode(x.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:x.algorithm.curve,privateKey:F.ECPrivateKey.decode(x.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return x.algorithm.params.priv_key=F.DSAparam.decode(x.subjectPrivateKey,"der"),{type:"dsa",params:x.algorithm.params};default:throw new Error("unknown key id "+q)}case"RSA PUBLIC KEY":return F.RSAPublicKey.decode(P,"der");case"RSA PRIVATE KEY":return F.RSAPrivateKey.decode(P,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:F.DSAPrivateKey.decode(P,"der")};case"EC PRIVATE KEY":return P=F.ECPrivateKey.decode(P,"der"),{curve:P.parameters.value,privateKey:P.privateKey};default:throw new Error("unknown key type "+B)}}N.signature=F.signature;function U(W,Z){var T=W.algorithm.decrypt.kde.kdeparams.salt,B=parseInt(W.algorithm.decrypt.kde.kdeparams.iters.toString(),10),P=L[W.algorithm.decrypt.cipher.algo.join(".")],q=W.algorithm.decrypt.cipher.iv,x=W.subjectPrivateKey,w=parseInt(P.split("-")[1],10)/8,M=Q.pbkdf2Sync(Z,T,B,w,"sha1"),y=k.createDecipheriv(P,M,q),m=[];return m.push(y.update(x)),m.push(y.final()),O.concat(m)}}),Z6=$0((E,I)=>{I.exports={"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"}}),K3=$0((E,I)=>{var F=l0().Buffer,L=M5(),H=c1(),k=l1().ec,Q=p1(),O=K1(),N=Z6();function U(M,y,m,c,l){var n=O(y);if(n.curve){if(c!=="ecdsa"&&c!=="ecdsa/rsa")throw new Error("wrong private key type");return W(M,n)}else if(n.type==="dsa"){if(c!=="dsa")throw new Error("wrong private key type");return Z(M,n,m)}else if(c!=="rsa"&&c!=="ecdsa/rsa")throw new Error("wrong private key type");M=F.concat([l,M]);for(var i=n.modulus.byteLength(),C0=[0,1];M.length+C0.length+10&&m.ishrn(c),m}function q(M,y){M=P(M,y),M=M.mod(y);var m=F.from(M.toArray());if(m.length{var F=l0().Buffer,L=p1(),H=l1().ec,k=K1(),Q=Z6();function O(Z,T,B,P,q){var x=k(B);if(x.type==="ec"){if(P!=="ecdsa"&&P!=="ecdsa/rsa")throw new Error("wrong public key type");return N(Z,T,x)}else if(x.type==="dsa"){if(P!=="dsa")throw new Error("wrong public key type");return U(Z,T,x)}else if(P!=="rsa"&&P!=="ecdsa/rsa")throw new Error("wrong public key type");T=F.concat([q,T]);for(var w=x.modulus.byteLength(),M=[1],y=0;T.length+M.length+2=T)throw new Error("invalid sig")}I.exports=O}),H3=$0((E,I)=>{var F=l0().Buffer,L=u2(),H=g8(),k=c0(),Q=K3(),O=Z3(),N=w5();Object.keys(N).forEach(function(B){N[B].id=F.from(N[B].id,"hex"),N[B.toLowerCase()]=N[B]});function U(B){H.Writable.call(this);var P=N[B];if(!P)throw new Error("Unknown message digest");this._hashType=P.hash,this._hash=L(P.hash),this._tag=P.id,this._signType=P.sign}k(U,H.Writable),U.prototype._write=function(B,P,q){this._hash.update(B),q()},U.prototype.update=function(B,P){return typeof B=="string"&&(B=F.from(B,P)),this._hash.update(B),this},U.prototype.sign=function(B,P){this.end();var q=this._hash.digest(),x=Q(q,B,this._hashType,this._signType,this._tag);return P?x.toString(P):x};function W(B){H.Writable.call(this);var P=N[B];if(!P)throw new Error("Unknown message digest");this._hash=L(P.hash),this._tag=P.id,this._signType=P.sign}k(W,H.Writable),W.prototype._write=function(B,P,q){this._hash.update(B),q()},W.prototype.update=function(B,P){return typeof B=="string"&&(B=F.from(B,P)),this._hash.update(B),this},W.prototype.verify=function(B,P,q){typeof P=="string"&&(P=F.from(P,q)),this.end();var x=this._hash.digest();return O(P,x,B,this._signType,this._tag)};function Z(B){return new U(B)}function T(B){return new W(B)}I.exports={Sign:Z,Verify:T,createSign:Z,createVerify:T}}),O3=$0((E,I)=>{(function(F,L){function H(X,Y){if(!X)throw new Error(Y||"Assertion failed")}function k(X,Y){X.super_=Y;var C=function(){};C.prototype=Y.prototype,X.prototype=new C,X.prototype.constructor=X}function Q(X,Y,C){if(Q.isBN(X))return X;this.negative=0,this.words=null,this.length=0,this.red=null,X!==null&&((Y==="le"||Y==="be")&&(C=Y,Y=10),this._init(X||0,Y||10,C||"be"))}typeof F=="object"?F.exports=Q:L.BN=Q,Q.BN=Q,Q.wordSize=26;var O;try{typeof window<"u"&&typeof window.Buffer<"u"?O=window.Buffer:O=A2().Buffer}catch{}Q.isBN=function(X){return X instanceof Q?!0:X!==null&&typeof X=="object"&&X.constructor.wordSize===Q.wordSize&&Array.isArray(X.words)},Q.max=function(X,Y){return X.cmp(Y)>0?X:Y},Q.min=function(X,Y){return X.cmp(Y)<0?X:Y},Q.prototype._init=function(X,Y,C){if(typeof X=="number")return this._initNumber(X,Y,C);if(typeof X=="object")return this._initArray(X,Y,C);Y==="hex"&&(Y=16),H(Y===(Y|0)&&Y>=2&&Y<=36),X=X.toString().replace(/\s+/g,"");var J=0;X[0]==="-"&&(J++,this.negative=1),J=0;J-=3)V=X[J]|X[J-1]<<8|X[J-2]<<16,this.words[z]|=V<>>26-K&67108863,K+=24,K>=26&&(K-=26,z++);else if(C==="le")for(J=0,z=0;J>>26-K&67108863,K+=24,K>=26&&(K-=26,z++);return this.strip()};function N(X,Y){var C=X.charCodeAt(Y);return C>=65&&C<=70?C-55:C>=97&&C<=102?C-87:C-48&15}function U(X,Y,C){var J=N(X,C);return C-1>=Y&&(J|=N(X,C-1)<<4),J}Q.prototype._parseHex=function(X,Y,C){this.length=Math.ceil((X.length-Y)/6),this.words=new Array(this.length);for(var J=0;J=Y;J-=2)K=U(X,Y,J)<=18?(z-=18,V+=1,this.words[V]|=K>>>26):z+=8;else{var $=X.length-Y;for(J=$%2===0?Y+1:Y;J=18?(z-=18,V+=1,this.words[V]|=K>>>26):z+=8}this.strip()};function W(X,Y,C,J){for(var z=0,V=Math.min(X.length,C),K=Y;K=49?z+=$-49+10:$>=17?z+=$-17+10:z+=$}return z}Q.prototype._parseBase=function(X,Y,C){this.words=[0],this.length=1;for(var J=0,z=1;z<=67108863;z*=Y)J++;J--,z=z/Y|0;for(var V=X.length-C,K=V%J,$=Math.min(V,V-K)+C,G=0,j=C;j<$;j+=J)G=W(X,j,j+J,Y),this.imuln(z),this.words[0]+G<67108864?this.words[0]+=G:this._iaddn(G);if(K!==0){var A=1;for(G=W(X,j,X.length,Y),j=0;j1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},Q.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},Q.prototype.inspect=function(){return(this.red?""};var Z=["","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"],T=[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,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];Q.prototype.toString=function(X,Y){X=X||10,Y=Y|0||1;var C;if(X===16||X==="hex"){C="";for(var J=0,z=0,V=0;V>>24-J&16777215,z!==0||V!==this.length-1?C=Z[6-$.length]+$+C:C=$+C,J+=2,J>=26&&(J-=26,V--)}for(z!==0&&(C=z.toString(16)+C);C.length%Y!==0;)C="0"+C;return this.negative!==0&&(C="-"+C),C}if(X===(X|0)&&X>=2&&X<=36){var G=T[X],j=B[X];C="";var A=this.clone();for(A.negative=0;!A.isZero();){var R=A.modn(j).toString(X);A=A.idivn(j),A.isZero()?C=R+C:C=Z[G-R.length]+R+C}for(this.isZero()&&(C="0"+C);C.length%Y!==0;)C="0"+C;return this.negative!==0&&(C="-"+C),C}H(!1,"Base should be between 2 and 36")},Q.prototype.toNumber=function(){var X=this.words[0];return this.length===2?X+=this.words[1]*67108864:this.length===3&&this.words[2]===1?X+=4503599627370496+this.words[1]*67108864:this.length>2&&H(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-X:X},Q.prototype.toJSON=function(){return this.toString(16)},Q.prototype.toBuffer=function(X,Y){return H(typeof O<"u"),this.toArrayLike(O,X,Y)},Q.prototype.toArray=function(X,Y){return this.toArrayLike(Array,X,Y)},Q.prototype.toArrayLike=function(X,Y,C){var J=this.byteLength(),z=C||Math.max(1,J);H(J<=z,"byte array longer than desired length"),H(z>0,"Requested array length <= 0"),this.strip();var V=Y==="le",K=new X(z),$,G,j=this.clone();if(V){for(G=0;!j.isZero();G++)$=j.andln(255),j.iushrn(8),K[G]=$;for(;G=4096&&(C+=13,Y>>>=13),Y>=64&&(C+=7,Y>>>=7),Y>=8&&(C+=4,Y>>>=4),Y>=2&&(C+=2,Y>>>=2),C+Y},Q.prototype._zeroBits=function(X){if(X===0)return 26;var Y=X,C=0;return(Y&8191)===0&&(C+=13,Y>>>=13),(Y&127)===0&&(C+=7,Y>>>=7),(Y&15)===0&&(C+=4,Y>>>=4),(Y&3)===0&&(C+=2,Y>>>=2),(Y&1)===0&&C++,C},Q.prototype.bitLength=function(){var X=this.words[this.length-1],Y=this._countBits(X);return(this.length-1)*26+Y};function P(X){for(var Y=new Array(X.bitLength()),C=0;C>>z}return Y}Q.prototype.zeroBits=function(){if(this.isZero())return 0;for(var X=0,Y=0;YX.length?this.clone().ior(X):X.clone().ior(this)},Q.prototype.uor=function(X){return this.length>X.length?this.clone().iuor(X):X.clone().iuor(this)},Q.prototype.iuand=function(X){var Y;this.length>X.length?Y=X:Y=this;for(var C=0;CX.length?this.clone().iand(X):X.clone().iand(this)},Q.prototype.uand=function(X){return this.length>X.length?this.clone().iuand(X):X.clone().iuand(this)},Q.prototype.iuxor=function(X){var Y,C;this.length>X.length?(Y=this,C=X):(Y=X,C=this);for(var J=0;JX.length?this.clone().ixor(X):X.clone().ixor(this)},Q.prototype.uxor=function(X){return this.length>X.length?this.clone().iuxor(X):X.clone().iuxor(this)},Q.prototype.inotn=function(X){H(typeof X=="number"&&X>=0);var Y=Math.ceil(X/26)|0,C=X%26;this._expand(Y),C>0&&Y--;for(var J=0;J0&&(this.words[J]=~this.words[J]&67108863>>26-C),this.strip()},Q.prototype.notn=function(X){return this.clone().inotn(X)},Q.prototype.setn=function(X,Y){H(typeof X=="number"&&X>=0);var C=X/26|0,J=X%26;return this._expand(C+1),Y?this.words[C]=this.words[C]|1<X.length?(C=this,J=X):(C=X,J=this);for(var z=0,V=0;V>>26;for(;z!==0&&V>>26;if(this.length=C.length,z!==0)this.words[this.length]=z,this.length++;else if(C!==this)for(;VX.length?this.clone().iadd(X):X.clone().iadd(this)},Q.prototype.isub=function(X){if(X.negative!==0){X.negative=0;var Y=this.iadd(X);return X.negative=1,Y._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(X),this.negative=1,this._normSign();var C=this.cmp(X);if(C===0)return this.negative=0,this.length=1,this.words[0]=0,this;var J,z;C>0?(J=this,z=X):(J=X,z=this);for(var V=0,K=0;K>26,this.words[K]=Y&67108863;for(;V!==0&&K>26,this.words[K]=Y&67108863;if(V===0&&K>>26,R=G&67108863,_=Math.min(j,Y.length-1),s=Math.max(0,j-X.length+1);s<=_;s++){var r=j-s|0;z=X.words[r]|0,V=Y.words[s]|0,K=z*V+R,A+=K/67108864|0,R=K&67108863}C.words[j]=R|0,G=A|0}return G!==0?C.words[j]=G|0:C.length--,C.strip()}var x=function(X,Y,C){var J=X.words,z=Y.words,V=C.words,K=0,$,G,j,A=J[0]|0,R=A&8191,_=A>>>13,s=J[1]|0,r=s&8191,Y0=s>>>13,o=J[2]|0,b=o&8191,f=o>>>13,W0=J[3]|0,X0=W0&8191,z0=W0>>>13,g=J[4]|0,v=g&8191,p=g>>>13,e=J[5]|0,G0=e&8191,t=e>>>13,y0=J[6]|0,Q0=y0&8191,V0=y0>>>13,_0=J[7]|0,F0=_0&8191,Z0=_0>>>13,b0=J[8]|0,D=b0&8191,S=b0>>>13,d=J[9]|0,h=d&8191,u=d>>>13,P0=z[0]|0,J0=P0&8191,H0=P0>>>13,d0=z[1]|0,U0=d0&8191,O0=d0>>>13,g0=z[2]|0,L0=g0&8191,N0=g0>>>13,$2=z[3]|0,D0=$2&8191,T0=$2>>>13,h0=z[4]|0,k0=h0&8191,I0=h0>>>13,j2=z[5]|0,B0=j2&8191,q0=j2>>>13,V2=z[6]|0,R0=V2&8191,E0=V2>>>13,K2=z[7]|0,x0=K2&8191,v0=K2>>>13,Z2=z[8]|0,S0=Z2&8191,A0=Z2>>>13,H2=z[9]|0,M0=H2&8191,w0=H2>>>13;C.negative=X.negative^Y.negative,C.length=19,$=Math.imul(R,J0),G=Math.imul(R,H0),G=G+Math.imul(_,J0)|0,j=Math.imul(_,H0);var Q2=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(Q2>>>26)|0,Q2&=67108863,$=Math.imul(r,J0),G=Math.imul(r,H0),G=G+Math.imul(Y0,J0)|0,j=Math.imul(Y0,H0),$=$+Math.imul(R,U0)|0,G=G+Math.imul(R,O0)|0,G=G+Math.imul(_,U0)|0,j=j+Math.imul(_,O0)|0;var m0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(m0>>>26)|0,m0&=67108863,$=Math.imul(b,J0),G=Math.imul(b,H0),G=G+Math.imul(f,J0)|0,j=Math.imul(f,H0),$=$+Math.imul(r,U0)|0,G=G+Math.imul(r,O0)|0,G=G+Math.imul(Y0,U0)|0,j=j+Math.imul(Y0,O0)|0,$=$+Math.imul(R,L0)|0,G=G+Math.imul(R,N0)|0,G=G+Math.imul(_,L0)|0,j=j+Math.imul(_,N0)|0;var p0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(p0>>>26)|0,p0&=67108863,$=Math.imul(X0,J0),G=Math.imul(X0,H0),G=G+Math.imul(z0,J0)|0,j=Math.imul(z0,H0),$=$+Math.imul(b,U0)|0,G=G+Math.imul(b,O0)|0,G=G+Math.imul(f,U0)|0,j=j+Math.imul(f,O0)|0,$=$+Math.imul(r,L0)|0,G=G+Math.imul(r,N0)|0,G=G+Math.imul(Y0,L0)|0,j=j+Math.imul(Y0,N0)|0,$=$+Math.imul(R,D0)|0,G=G+Math.imul(R,T0)|0,G=G+Math.imul(_,D0)|0,j=j+Math.imul(_,T0)|0;var o0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(o0>>>26)|0,o0&=67108863,$=Math.imul(v,J0),G=Math.imul(v,H0),G=G+Math.imul(p,J0)|0,j=Math.imul(p,H0),$=$+Math.imul(X0,U0)|0,G=G+Math.imul(X0,O0)|0,G=G+Math.imul(z0,U0)|0,j=j+Math.imul(z0,O0)|0,$=$+Math.imul(b,L0)|0,G=G+Math.imul(b,N0)|0,G=G+Math.imul(f,L0)|0,j=j+Math.imul(f,N0)|0,$=$+Math.imul(r,D0)|0,G=G+Math.imul(r,T0)|0,G=G+Math.imul(Y0,D0)|0,j=j+Math.imul(Y0,T0)|0,$=$+Math.imul(R,k0)|0,G=G+Math.imul(R,I0)|0,G=G+Math.imul(_,k0)|0,j=j+Math.imul(_,I0)|0;var u0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(u0>>>26)|0,u0&=67108863,$=Math.imul(G0,J0),G=Math.imul(G0,H0),G=G+Math.imul(t,J0)|0,j=Math.imul(t,H0),$=$+Math.imul(v,U0)|0,G=G+Math.imul(v,O0)|0,G=G+Math.imul(p,U0)|0,j=j+Math.imul(p,O0)|0,$=$+Math.imul(X0,L0)|0,G=G+Math.imul(X0,N0)|0,G=G+Math.imul(z0,L0)|0,j=j+Math.imul(z0,N0)|0,$=$+Math.imul(b,D0)|0,G=G+Math.imul(b,T0)|0,G=G+Math.imul(f,D0)|0,j=j+Math.imul(f,T0)|0,$=$+Math.imul(r,k0)|0,G=G+Math.imul(r,I0)|0,G=G+Math.imul(Y0,k0)|0,j=j+Math.imul(Y0,I0)|0,$=$+Math.imul(R,B0)|0,G=G+Math.imul(R,q0)|0,G=G+Math.imul(_,B0)|0,j=j+Math.imul(_,q0)|0;var s0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(s0>>>26)|0,s0&=67108863,$=Math.imul(Q0,J0),G=Math.imul(Q0,H0),G=G+Math.imul(V0,J0)|0,j=Math.imul(V0,H0),$=$+Math.imul(G0,U0)|0,G=G+Math.imul(G0,O0)|0,G=G+Math.imul(t,U0)|0,j=j+Math.imul(t,O0)|0,$=$+Math.imul(v,L0)|0,G=G+Math.imul(v,N0)|0,G=G+Math.imul(p,L0)|0,j=j+Math.imul(p,N0)|0,$=$+Math.imul(X0,D0)|0,G=G+Math.imul(X0,T0)|0,G=G+Math.imul(z0,D0)|0,j=j+Math.imul(z0,T0)|0,$=$+Math.imul(b,k0)|0,G=G+Math.imul(b,I0)|0,G=G+Math.imul(f,k0)|0,j=j+Math.imul(f,I0)|0,$=$+Math.imul(r,B0)|0,G=G+Math.imul(r,q0)|0,G=G+Math.imul(Y0,B0)|0,j=j+Math.imul(Y0,q0)|0,$=$+Math.imul(R,R0)|0,G=G+Math.imul(R,E0)|0,G=G+Math.imul(_,R0)|0,j=j+Math.imul(_,E0)|0;var f0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(f0>>>26)|0,f0&=67108863,$=Math.imul(F0,J0),G=Math.imul(F0,H0),G=G+Math.imul(Z0,J0)|0,j=Math.imul(Z0,H0),$=$+Math.imul(Q0,U0)|0,G=G+Math.imul(Q0,O0)|0,G=G+Math.imul(V0,U0)|0,j=j+Math.imul(V0,O0)|0,$=$+Math.imul(G0,L0)|0,G=G+Math.imul(G0,N0)|0,G=G+Math.imul(t,L0)|0,j=j+Math.imul(t,N0)|0,$=$+Math.imul(v,D0)|0,G=G+Math.imul(v,T0)|0,G=G+Math.imul(p,D0)|0,j=j+Math.imul(p,T0)|0,$=$+Math.imul(X0,k0)|0,G=G+Math.imul(X0,I0)|0,G=G+Math.imul(z0,k0)|0,j=j+Math.imul(z0,I0)|0,$=$+Math.imul(b,B0)|0,G=G+Math.imul(b,q0)|0,G=G+Math.imul(f,B0)|0,j=j+Math.imul(f,q0)|0,$=$+Math.imul(r,R0)|0,G=G+Math.imul(r,E0)|0,G=G+Math.imul(Y0,R0)|0,j=j+Math.imul(Y0,E0)|0,$=$+Math.imul(R,x0)|0,G=G+Math.imul(R,v0)|0,G=G+Math.imul(_,x0)|0,j=j+Math.imul(_,v0)|0;var a0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(a0>>>26)|0,a0&=67108863,$=Math.imul(D,J0),G=Math.imul(D,H0),G=G+Math.imul(S,J0)|0,j=Math.imul(S,H0),$=$+Math.imul(F0,U0)|0,G=G+Math.imul(F0,O0)|0,G=G+Math.imul(Z0,U0)|0,j=j+Math.imul(Z0,O0)|0,$=$+Math.imul(Q0,L0)|0,G=G+Math.imul(Q0,N0)|0,G=G+Math.imul(V0,L0)|0,j=j+Math.imul(V0,N0)|0,$=$+Math.imul(G0,D0)|0,G=G+Math.imul(G0,T0)|0,G=G+Math.imul(t,D0)|0,j=j+Math.imul(t,T0)|0,$=$+Math.imul(v,k0)|0,G=G+Math.imul(v,I0)|0,G=G+Math.imul(p,k0)|0,j=j+Math.imul(p,I0)|0,$=$+Math.imul(X0,B0)|0,G=G+Math.imul(X0,q0)|0,G=G+Math.imul(z0,B0)|0,j=j+Math.imul(z0,q0)|0,$=$+Math.imul(b,R0)|0,G=G+Math.imul(b,E0)|0,G=G+Math.imul(f,R0)|0,j=j+Math.imul(f,E0)|0,$=$+Math.imul(r,x0)|0,G=G+Math.imul(r,v0)|0,G=G+Math.imul(Y0,x0)|0,j=j+Math.imul(Y0,v0)|0,$=$+Math.imul(R,S0)|0,G=G+Math.imul(R,A0)|0,G=G+Math.imul(_,S0)|0,j=j+Math.imul(_,A0)|0;var n0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(n0>>>26)|0,n0&=67108863,$=Math.imul(h,J0),G=Math.imul(h,H0),G=G+Math.imul(u,J0)|0,j=Math.imul(u,H0),$=$+Math.imul(D,U0)|0,G=G+Math.imul(D,O0)|0,G=G+Math.imul(S,U0)|0,j=j+Math.imul(S,O0)|0,$=$+Math.imul(F0,L0)|0,G=G+Math.imul(F0,N0)|0,G=G+Math.imul(Z0,L0)|0,j=j+Math.imul(Z0,N0)|0,$=$+Math.imul(Q0,D0)|0,G=G+Math.imul(Q0,T0)|0,G=G+Math.imul(V0,D0)|0,j=j+Math.imul(V0,T0)|0,$=$+Math.imul(G0,k0)|0,G=G+Math.imul(G0,I0)|0,G=G+Math.imul(t,k0)|0,j=j+Math.imul(t,I0)|0,$=$+Math.imul(v,B0)|0,G=G+Math.imul(v,q0)|0,G=G+Math.imul(p,B0)|0,j=j+Math.imul(p,q0)|0,$=$+Math.imul(X0,R0)|0,G=G+Math.imul(X0,E0)|0,G=G+Math.imul(z0,R0)|0,j=j+Math.imul(z0,E0)|0,$=$+Math.imul(b,x0)|0,G=G+Math.imul(b,v0)|0,G=G+Math.imul(f,x0)|0,j=j+Math.imul(f,v0)|0,$=$+Math.imul(r,S0)|0,G=G+Math.imul(r,A0)|0,G=G+Math.imul(Y0,S0)|0,j=j+Math.imul(Y0,A0)|0,$=$+Math.imul(R,M0)|0,G=G+Math.imul(R,w0)|0,G=G+Math.imul(_,M0)|0,j=j+Math.imul(_,w0)|0;var r0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(r0>>>26)|0,r0&=67108863,$=Math.imul(h,U0),G=Math.imul(h,O0),G=G+Math.imul(u,U0)|0,j=Math.imul(u,O0),$=$+Math.imul(D,L0)|0,G=G+Math.imul(D,N0)|0,G=G+Math.imul(S,L0)|0,j=j+Math.imul(S,N0)|0,$=$+Math.imul(F0,D0)|0,G=G+Math.imul(F0,T0)|0,G=G+Math.imul(Z0,D0)|0,j=j+Math.imul(Z0,T0)|0,$=$+Math.imul(Q0,k0)|0,G=G+Math.imul(Q0,I0)|0,G=G+Math.imul(V0,k0)|0,j=j+Math.imul(V0,I0)|0,$=$+Math.imul(G0,B0)|0,G=G+Math.imul(G0,q0)|0,G=G+Math.imul(t,B0)|0,j=j+Math.imul(t,q0)|0,$=$+Math.imul(v,R0)|0,G=G+Math.imul(v,E0)|0,G=G+Math.imul(p,R0)|0,j=j+Math.imul(p,E0)|0,$=$+Math.imul(X0,x0)|0,G=G+Math.imul(X0,v0)|0,G=G+Math.imul(z0,x0)|0,j=j+Math.imul(z0,v0)|0,$=$+Math.imul(b,S0)|0,G=G+Math.imul(b,A0)|0,G=G+Math.imul(f,S0)|0,j=j+Math.imul(f,A0)|0,$=$+Math.imul(r,M0)|0,G=G+Math.imul(r,w0)|0,G=G+Math.imul(Y0,M0)|0,j=j+Math.imul(Y0,w0)|0;var i0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(i0>>>26)|0,i0&=67108863,$=Math.imul(h,L0),G=Math.imul(h,N0),G=G+Math.imul(u,L0)|0,j=Math.imul(u,N0),$=$+Math.imul(D,D0)|0,G=G+Math.imul(D,T0)|0,G=G+Math.imul(S,D0)|0,j=j+Math.imul(S,T0)|0,$=$+Math.imul(F0,k0)|0,G=G+Math.imul(F0,I0)|0,G=G+Math.imul(Z0,k0)|0,j=j+Math.imul(Z0,I0)|0,$=$+Math.imul(Q0,B0)|0,G=G+Math.imul(Q0,q0)|0,G=G+Math.imul(V0,B0)|0,j=j+Math.imul(V0,q0)|0,$=$+Math.imul(G0,R0)|0,G=G+Math.imul(G0,E0)|0,G=G+Math.imul(t,R0)|0,j=j+Math.imul(t,E0)|0,$=$+Math.imul(v,x0)|0,G=G+Math.imul(v,v0)|0,G=G+Math.imul(p,x0)|0,j=j+Math.imul(p,v0)|0,$=$+Math.imul(X0,S0)|0,G=G+Math.imul(X0,A0)|0,G=G+Math.imul(z0,S0)|0,j=j+Math.imul(z0,A0)|0,$=$+Math.imul(b,M0)|0,G=G+Math.imul(b,w0)|0,G=G+Math.imul(f,M0)|0,j=j+Math.imul(f,w0)|0;var t0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(t0>>>26)|0,t0&=67108863,$=Math.imul(h,D0),G=Math.imul(h,T0),G=G+Math.imul(u,D0)|0,j=Math.imul(u,T0),$=$+Math.imul(D,k0)|0,G=G+Math.imul(D,I0)|0,G=G+Math.imul(S,k0)|0,j=j+Math.imul(S,I0)|0,$=$+Math.imul(F0,B0)|0,G=G+Math.imul(F0,q0)|0,G=G+Math.imul(Z0,B0)|0,j=j+Math.imul(Z0,q0)|0,$=$+Math.imul(Q0,R0)|0,G=G+Math.imul(Q0,E0)|0,G=G+Math.imul(V0,R0)|0,j=j+Math.imul(V0,E0)|0,$=$+Math.imul(G0,x0)|0,G=G+Math.imul(G0,v0)|0,G=G+Math.imul(t,x0)|0,j=j+Math.imul(t,v0)|0,$=$+Math.imul(v,S0)|0,G=G+Math.imul(v,A0)|0,G=G+Math.imul(p,S0)|0,j=j+Math.imul(p,A0)|0,$=$+Math.imul(X0,M0)|0,G=G+Math.imul(X0,w0)|0,G=G+Math.imul(z0,M0)|0,j=j+Math.imul(z0,w0)|0;var e0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(e0>>>26)|0,e0&=67108863,$=Math.imul(h,k0),G=Math.imul(h,I0),G=G+Math.imul(u,k0)|0,j=Math.imul(u,I0),$=$+Math.imul(D,B0)|0,G=G+Math.imul(D,q0)|0,G=G+Math.imul(S,B0)|0,j=j+Math.imul(S,q0)|0,$=$+Math.imul(F0,R0)|0,G=G+Math.imul(F0,E0)|0,G=G+Math.imul(Z0,R0)|0,j=j+Math.imul(Z0,E0)|0,$=$+Math.imul(Q0,x0)|0,G=G+Math.imul(Q0,v0)|0,G=G+Math.imul(V0,x0)|0,j=j+Math.imul(V0,v0)|0,$=$+Math.imul(G0,S0)|0,G=G+Math.imul(G0,A0)|0,G=G+Math.imul(t,S0)|0,j=j+Math.imul(t,A0)|0,$=$+Math.imul(v,M0)|0,G=G+Math.imul(v,w0)|0,G=G+Math.imul(p,M0)|0,j=j+Math.imul(p,w0)|0;var X2=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(X2>>>26)|0,X2&=67108863,$=Math.imul(h,B0),G=Math.imul(h,q0),G=G+Math.imul(u,B0)|0,j=Math.imul(u,q0),$=$+Math.imul(D,R0)|0,G=G+Math.imul(D,E0)|0,G=G+Math.imul(S,R0)|0,j=j+Math.imul(S,E0)|0,$=$+Math.imul(F0,x0)|0,G=G+Math.imul(F0,v0)|0,G=G+Math.imul(Z0,x0)|0,j=j+Math.imul(Z0,v0)|0,$=$+Math.imul(Q0,S0)|0,G=G+Math.imul(Q0,A0)|0,G=G+Math.imul(V0,S0)|0,j=j+Math.imul(V0,A0)|0,$=$+Math.imul(G0,M0)|0,G=G+Math.imul(G0,w0)|0,G=G+Math.imul(t,M0)|0,j=j+Math.imul(t,w0)|0;var G2=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(G2>>>26)|0,G2&=67108863,$=Math.imul(h,R0),G=Math.imul(h,E0),G=G+Math.imul(u,R0)|0,j=Math.imul(u,E0),$=$+Math.imul(D,x0)|0,G=G+Math.imul(D,v0)|0,G=G+Math.imul(S,x0)|0,j=j+Math.imul(S,v0)|0,$=$+Math.imul(F0,S0)|0,G=G+Math.imul(F0,A0)|0,G=G+Math.imul(Z0,S0)|0,j=j+Math.imul(Z0,A0)|0,$=$+Math.imul(Q0,M0)|0,G=G+Math.imul(Q0,w0)|0,G=G+Math.imul(V0,M0)|0,j=j+Math.imul(V0,w0)|0;var Y2=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(Y2>>>26)|0,Y2&=67108863,$=Math.imul(h,x0),G=Math.imul(h,v0),G=G+Math.imul(u,x0)|0,j=Math.imul(u,v0),$=$+Math.imul(D,S0)|0,G=G+Math.imul(D,A0)|0,G=G+Math.imul(S,S0)|0,j=j+Math.imul(S,A0)|0,$=$+Math.imul(F0,M0)|0,G=G+Math.imul(F0,w0)|0,G=G+Math.imul(Z0,M0)|0,j=j+Math.imul(Z0,w0)|0;var J2=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(J2>>>26)|0,J2&=67108863,$=Math.imul(h,S0),G=Math.imul(h,A0),G=G+Math.imul(u,S0)|0,j=Math.imul(u,A0),$=$+Math.imul(D,M0)|0,G=G+Math.imul(D,w0)|0,G=G+Math.imul(S,M0)|0,j=j+Math.imul(S,w0)|0;var C2=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(C2>>>26)|0,C2&=67108863,$=Math.imul(h,M0),G=Math.imul(h,w0),G=G+Math.imul(u,M0)|0,j=Math.imul(u,w0);var z2=(K+$|0)+((G&8191)<<13)|0;return K=(j+(G>>>13)|0)+(z2>>>26)|0,z2&=67108863,V[0]=Q2,V[1]=m0,V[2]=p0,V[3]=o0,V[4]=u0,V[5]=s0,V[6]=f0,V[7]=a0,V[8]=n0,V[9]=r0,V[10]=i0,V[11]=t0,V[12]=e0,V[13]=X2,V[14]=G2,V[15]=Y2,V[16]=J2,V[17]=C2,V[18]=z2,K!==0&&(V[19]=K,C.length++),C};Math.imul||(x=q);function w(X,Y,C){C.negative=Y.negative^X.negative,C.length=X.length+Y.length;for(var J=0,z=0,V=0;V>>26)|0,z+=K>>>26,K&=67108863}C.words[V]=$,J=K,K=z}return J!==0?C.words[V]=J:C.length--,C.strip()}function M(X,Y,C){var J=new y;return J.mulp(X,Y,C)}Q.prototype.mulTo=function(X,Y){var C,J=this.length+X.length;return this.length===10&&X.length===10?C=x(this,X,Y):J<63?C=q(this,X,Y):J<1024?C=w(this,X,Y):C=M(this,X,Y),C};function y(X,Y){this.x=X,this.y=Y}y.prototype.makeRBT=function(X){for(var Y=new Array(X),C=Q.prototype._countBits(X)-1,J=0;J>=1;return J},y.prototype.permute=function(X,Y,C,J,z,V){for(var K=0;K>>1)z++;return 1<>>13,C[2*V+1]=z&8191,z=z>>>13;for(V=2*Y;V>=26,Y+=J/67108864|0,Y+=z>>>26,this.words[C]=z&67108863}return Y!==0&&(this.words[C]=Y,this.length++),this},Q.prototype.muln=function(X){return this.clone().imuln(X)},Q.prototype.sqr=function(){return this.mul(this)},Q.prototype.isqr=function(){return this.imul(this.clone())},Q.prototype.pow=function(X){var Y=P(X);if(Y.length===0)return new Q(1);for(var C=this,J=0;J=0);var Y=X%26,C=(X-Y)/26,J=67108863>>>26-Y<<26-Y,z;if(Y!==0){var V=0;for(z=0;z>>26-Y}V&&(this.words[z]=V,this.length++)}if(C!==0){for(z=this.length-1;z>=0;z--)this.words[z+C]=this.words[z];for(z=0;z=0);var J;Y?J=(Y-Y%26)/26:J=0;var z=X%26,V=Math.min((X-z)/26,this.length),K=67108863^67108863>>>z<V)for(this.length-=V,G=0;G=0&&(j!==0||G>=J);G--){var A=this.words[G]|0;this.words[G]=j<<26-z|A>>>z,j=A&K}return $&&j!==0&&($.words[$.length++]=j),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},Q.prototype.ishrn=function(X,Y,C){return H(this.negative===0),this.iushrn(X,Y,C)},Q.prototype.shln=function(X){return this.clone().ishln(X)},Q.prototype.ushln=function(X){return this.clone().iushln(X)},Q.prototype.shrn=function(X){return this.clone().ishrn(X)},Q.prototype.ushrn=function(X){return this.clone().iushrn(X)},Q.prototype.testn=function(X){H(typeof X=="number"&&X>=0);var Y=X%26,C=(X-Y)/26,J=1<=0);var Y=X%26,C=(X-Y)/26;if(H(this.negative===0,"imaskn works only with positive numbers"),this.length<=C)return this;if(Y!==0&&C++,this.length=Math.min(C,this.length),Y!==0){var J=67108863^67108863>>>Y<=67108864;Y++)this.words[Y]-=67108864,Y===this.length-1?this.words[Y+1]=1:this.words[Y+1]++;return this.length=Math.max(this.length,Y+1),this},Q.prototype.isubn=function(X){if(H(typeof X=="number"),H(X<67108864),X<0)return this.iaddn(-X);if(this.negative!==0)return this.negative=0,this.iaddn(X),this.negative=1,this;if(this.words[0]-=X,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var Y=0;Y>26)-($/67108864|0),this.words[z+C]=V&67108863}for(;z>26,this.words[z+C]=V&67108863;if(K===0)return this.strip();for(H(K===-1),K=0,z=0;z>26,this.words[z]=V&67108863;return this.negative=1,this.strip()},Q.prototype._wordDiv=function(X,Y){var C=this.length-X.length,J=this.clone(),z=X,V=z.words[z.length-1]|0,K=this._countBits(V);C=26-K,C!==0&&(z=z.ushln(C),J.iushln(C),V=z.words[z.length-1]|0);var $=J.length-z.length,G;if(Y!=="mod"){G=new Q(null),G.length=$+1,G.words=new Array(G.length);for(var j=0;j=0;R--){var _=(J.words[z.length+R]|0)*67108864+(J.words[z.length+R-1]|0);for(_=Math.min(_/V|0,67108863),J._ishlnsubmul(z,_,R);J.negative!==0;)_--,J.negative=0,J._ishlnsubmul(z,1,R),J.isZero()||(J.negative^=1);G&&(G.words[R]=_)}return G&&G.strip(),J.strip(),Y!=="div"&&C!==0&&J.iushrn(C),{div:G||null,mod:J}},Q.prototype.divmod=function(X,Y,C){if(H(!X.isZero()),this.isZero())return{div:new Q(0),mod:new Q(0)};var J,z,V;return this.negative!==0&&X.negative===0?(V=this.neg().divmod(X,Y),Y!=="mod"&&(J=V.div.neg()),Y!=="div"&&(z=V.mod.neg(),C&&z.negative!==0&&z.iadd(X)),{div:J,mod:z}):this.negative===0&&X.negative!==0?(V=this.divmod(X.neg(),Y),Y!=="mod"&&(J=V.div.neg()),{div:J,mod:V.mod}):(this.negative&X.negative)!==0?(V=this.neg().divmod(X.neg(),Y),Y!=="div"&&(z=V.mod.neg(),C&&z.negative!==0&&z.isub(X)),{div:V.div,mod:z}):X.length>this.length||this.cmp(X)<0?{div:new Q(0),mod:this}:X.length===1?Y==="div"?{div:this.divn(X.words[0]),mod:null}:Y==="mod"?{div:null,mod:new Q(this.modn(X.words[0]))}:{div:this.divn(X.words[0]),mod:new Q(this.modn(X.words[0]))}:this._wordDiv(X,Y)},Q.prototype.div=function(X){return this.divmod(X,"div",!1).div},Q.prototype.mod=function(X){return this.divmod(X,"mod",!1).mod},Q.prototype.umod=function(X){return this.divmod(X,"mod",!0).mod},Q.prototype.divRound=function(X){var Y=this.divmod(X);if(Y.mod.isZero())return Y.div;var C=Y.div.negative!==0?Y.mod.isub(X):Y.mod,J=X.ushrn(1),z=X.andln(1),V=C.cmp(J);return V<0||z===1&&V===0?Y.div:Y.div.negative!==0?Y.div.isubn(1):Y.div.iaddn(1)},Q.prototype.modn=function(X){H(X<=67108863);for(var Y=(1<<26)%X,C=0,J=this.length-1;J>=0;J--)C=(Y*C+(this.words[J]|0))%X;return C},Q.prototype.idivn=function(X){H(X<=67108863);for(var Y=0,C=this.length-1;C>=0;C--){var J=(this.words[C]|0)+Y*67108864;this.words[C]=J/X|0,Y=J%X}return this.strip()},Q.prototype.divn=function(X){return this.clone().idivn(X)},Q.prototype.egcd=function(X){H(X.negative===0),H(!X.isZero());var Y=this,C=X.clone();Y.negative!==0?Y=Y.umod(X):Y=Y.clone();for(var J=new Q(1),z=new Q(0),V=new Q(0),K=new Q(1),$=0;Y.isEven()&&C.isEven();)Y.iushrn(1),C.iushrn(1),++$;for(var G=C.clone(),j=Y.clone();!Y.isZero();){for(var A=0,R=1;(Y.words[0]&R)===0&&A<26;++A,R<<=1);if(A>0)for(Y.iushrn(A);A-- >0;)(J.isOdd()||z.isOdd())&&(J.iadd(G),z.isub(j)),J.iushrn(1),z.iushrn(1);for(var _=0,s=1;(C.words[0]&s)===0&&_<26;++_,s<<=1);if(_>0)for(C.iushrn(_);_-- >0;)(V.isOdd()||K.isOdd())&&(V.iadd(G),K.isub(j)),V.iushrn(1),K.iushrn(1);Y.cmp(C)>=0?(Y.isub(C),J.isub(V),z.isub(K)):(C.isub(Y),V.isub(J),K.isub(z))}return{a:V,b:K,gcd:C.iushln($)}},Q.prototype._invmp=function(X){H(X.negative===0),H(!X.isZero());var Y=this,C=X.clone();Y.negative!==0?Y=Y.umod(X):Y=Y.clone();for(var J=new Q(1),z=new Q(0),V=C.clone();Y.cmpn(1)>0&&C.cmpn(1)>0;){for(var K=0,$=1;(Y.words[0]&$)===0&&K<26;++K,$<<=1);if(K>0)for(Y.iushrn(K);K-- >0;)J.isOdd()&&J.iadd(V),J.iushrn(1);for(var G=0,j=1;(C.words[0]&j)===0&&G<26;++G,j<<=1);if(G>0)for(C.iushrn(G);G-- >0;)z.isOdd()&&z.iadd(V),z.iushrn(1);Y.cmp(C)>=0?(Y.isub(C),J.isub(z)):(C.isub(Y),z.isub(J))}var A;return Y.cmpn(1)===0?A=J:A=z,A.cmpn(0)<0&&A.iadd(X),A},Q.prototype.gcd=function(X){if(this.isZero())return X.abs();if(X.isZero())return this.abs();var Y=this.clone(),C=X.clone();Y.negative=0,C.negative=0;for(var J=0;Y.isEven()&&C.isEven();J++)Y.iushrn(1),C.iushrn(1);do{for(;Y.isEven();)Y.iushrn(1);for(;C.isEven();)C.iushrn(1);var z=Y.cmp(C);if(z<0){var V=Y;Y=C,C=V}else if(z===0||C.cmpn(1)===0)break;Y.isub(C)}while(!0);return C.iushln(J)},Q.prototype.invm=function(X){return this.egcd(X).a.umod(X)},Q.prototype.isEven=function(){return(this.words[0]&1)===0},Q.prototype.isOdd=function(){return(this.words[0]&1)===1},Q.prototype.andln=function(X){return this.words[0]&X},Q.prototype.bincn=function(X){H(typeof X=="number");var Y=X%26,C=(X-Y)/26,J=1<>>26,K&=67108863,this.words[V]=K}return z!==0&&(this.words[V]=z,this.length++),this},Q.prototype.isZero=function(){return this.length===1&&this.words[0]===0},Q.prototype.cmpn=function(X){var Y=X<0;if(this.negative!==0&&!Y)return-1;if(this.negative===0&&Y)return 1;this.strip();var C;if(this.length>1)C=1;else{Y&&(X=-X),H(X<=67108863,"Number is too big");var J=this.words[0]|0;C=J===X?0:JX.length)return 1;if(this.length=0;C--){var J=this.words[C]|0,z=X.words[C]|0;if(J!==z){Jz&&(Y=1);break}}return Y},Q.prototype.gtn=function(X){return this.cmpn(X)===1},Q.prototype.gt=function(X){return this.cmp(X)===1},Q.prototype.gten=function(X){return this.cmpn(X)>=0},Q.prototype.gte=function(X){return this.cmp(X)>=0},Q.prototype.ltn=function(X){return this.cmpn(X)===-1},Q.prototype.lt=function(X){return this.cmp(X)===-1},Q.prototype.lten=function(X){return this.cmpn(X)<=0},Q.prototype.lte=function(X){return this.cmp(X)<=0},Q.prototype.eqn=function(X){return this.cmpn(X)===0},Q.prototype.eq=function(X){return this.cmp(X)===0},Q.red=function(X){return new a(X)},Q.prototype.toRed=function(X){return H(!this.red,"Already a number in reduction context"),H(this.negative===0,"red works only with positives"),X.convertTo(this)._forceRed(X)},Q.prototype.fromRed=function(){return H(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},Q.prototype._forceRed=function(X){return this.red=X,this},Q.prototype.forceRed=function(X){return H(!this.red,"Already a number in reduction context"),this._forceRed(X)},Q.prototype.redAdd=function(X){return H(this.red,"redAdd works only with red numbers"),this.red.add(this,X)},Q.prototype.redIAdd=function(X){return H(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,X)},Q.prototype.redSub=function(X){return H(this.red,"redSub works only with red numbers"),this.red.sub(this,X)},Q.prototype.redISub=function(X){return H(this.red,"redISub works only with red numbers"),this.red.isub(this,X)},Q.prototype.redShl=function(X){return H(this.red,"redShl works only with red numbers"),this.red.shl(this,X)},Q.prototype.redMul=function(X){return H(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.mul(this,X)},Q.prototype.redIMul=function(X){return H(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.imul(this,X)},Q.prototype.redSqr=function(){return H(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},Q.prototype.redISqr=function(){return H(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},Q.prototype.redSqrt=function(){return H(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},Q.prototype.redInvm=function(){return H(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},Q.prototype.redNeg=function(){return H(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},Q.prototype.redPow=function(X){return H(this.red&&!X.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,X)};var m={k256:null,p224:null,p192:null,p25519:null};function c(X,Y){this.name=X,this.p=new Q(Y,16),this.n=this.p.bitLength(),this.k=new Q(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}c.prototype._tmp=function(){var X=new Q(null);return X.words=new Array(Math.ceil(this.n/13)),X},c.prototype.ireduce=function(X){var Y=X,C;do this.split(Y,this.tmp),Y=this.imulK(Y),Y=Y.iadd(this.tmp),C=Y.bitLength();while(C>this.n);var J=C0?Y.isub(this.p):Y.strip!==void 0?Y.strip():Y._strip(),Y},c.prototype.split=function(X,Y){X.iushrn(this.n,0,Y)},c.prototype.imulK=function(X){return X.imul(this.k)};function l(){c.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}k(l,c),l.prototype.split=function(X,Y){for(var C=4194303,J=Math.min(X.length,9),z=0;z>>22,V=K}V>>>=22,X.words[z-10]=V,V===0&&X.length>10?X.length-=10:X.length-=9},l.prototype.imulK=function(X){X.words[X.length]=0,X.words[X.length+1]=0,X.length+=2;for(var Y=0,C=0;C>>=26,X.words[C]=z,Y=J}return Y!==0&&(X.words[X.length++]=Y),X},Q._prime=function(X){if(m[X])return m[X];var Y;if(X==="k256")Y=new l;else if(X==="p224")Y=new n;else if(X==="p192")Y=new i;else if(X==="p25519")Y=new C0;else throw new Error("Unknown prime "+X);return m[X]=Y,Y};function a(X){if(typeof X=="string"){var Y=Q._prime(X);this.m=Y.p,this.prime=Y}else H(X.gtn(1),"modulus must be greater than 1"),this.m=X,this.prime=null}a.prototype._verify1=function(X){H(X.negative===0,"red works only with positives"),H(X.red,"red works only with red numbers")},a.prototype._verify2=function(X,Y){H((X.negative|Y.negative)===0,"red works only with positives"),H(X.red&&X.red===Y.red,"red works only with red numbers")},a.prototype.imod=function(X){return this.prime?this.prime.ireduce(X)._forceRed(this):X.umod(this.m)._forceRed(this)},a.prototype.neg=function(X){return X.isZero()?X.clone():this.m.sub(X)._forceRed(this)},a.prototype.add=function(X,Y){this._verify2(X,Y);var C=X.add(Y);return C.cmp(this.m)>=0&&C.isub(this.m),C._forceRed(this)},a.prototype.iadd=function(X,Y){this._verify2(X,Y);var C=X.iadd(Y);return C.cmp(this.m)>=0&&C.isub(this.m),C},a.prototype.sub=function(X,Y){this._verify2(X,Y);var C=X.sub(Y);return C.cmpn(0)<0&&C.iadd(this.m),C._forceRed(this)},a.prototype.isub=function(X,Y){this._verify2(X,Y);var C=X.isub(Y);return C.cmpn(0)<0&&C.iadd(this.m),C},a.prototype.shl=function(X,Y){return this._verify1(X),this.imod(X.ushln(Y))},a.prototype.imul=function(X,Y){return this._verify2(X,Y),this.imod(X.imul(Y))},a.prototype.mul=function(X,Y){return this._verify2(X,Y),this.imod(X.mul(Y))},a.prototype.isqr=function(X){return this.imul(X,X.clone())},a.prototype.sqr=function(X){return this.mul(X,X)},a.prototype.sqrt=function(X){if(X.isZero())return X.clone();var Y=this.m.andln(3);if(H(Y%2===1),Y===3){var C=this.m.add(new Q(1)).iushrn(2);return this.pow(X,C)}for(var J=this.m.subn(1),z=0;!J.isZero()&&J.andln(1)===0;)z++,J.iushrn(1);H(!J.isZero());var V=new Q(1).toRed(this),K=V.redNeg(),$=this.m.subn(1).iushrn(1),G=this.m.bitLength();for(G=new Q(2*G*G).toRed(this);this.pow(G,$).cmp(K)!==0;)G.redIAdd(K);for(var j=this.pow(G,J),A=this.pow(X,J.addn(1).iushrn(1)),R=this.pow(X,J),_=z;R.cmp(V)!==0;){for(var s=R,r=0;s.cmp(V)!==0;r++)s=s.redSqr();H(r<_);var Y0=this.pow(j,new Q(1).iushln(_-r-1));A=A.redMul(Y0),j=Y0.redSqr(),R=R.redMul(j),_=r}return A},a.prototype.invm=function(X){var Y=X._invmp(this.m);return Y.negative!==0?(Y.negative=0,this.imod(Y).redNeg()):this.imod(Y)},a.prototype.pow=function(X,Y){if(Y.isZero())return new Q(1).toRed(this);if(Y.cmpn(1)===0)return X.clone();var C=4,J=new Array(1<=0;z--){for(var j=Y.words[z],A=G-1;A>=0;A--){var R=j>>A&1;if(V!==J[0]&&(V=this.sqr(V)),R===0&&K===0){$=0;continue}K<<=1,K|=R,$++,!($!==C&&(z!==0||A!==0))&&(V=this.mul(V,J[K]),$=0,K=0)}G=26}return V},a.prototype.convertTo=function(X){var Y=X.umod(this.m);return Y===X?Y.clone():Y},a.prototype.convertFrom=function(X){var Y=X.clone();return Y.red=null,Y},Q.mont=function(X){return new K0(X)};function K0(X){a.call(this,X),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new Q(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)}k(K0,a),K0.prototype.convertTo=function(X){return this.imod(X.ushln(this.shift))},K0.prototype.convertFrom=function(X){var Y=this.imod(X.mul(this.rinv));return Y.red=null,Y},K0.prototype.imul=function(X,Y){if(X.isZero()||Y.isZero())return X.words[0]=0,X.length=1,X;var C=X.imul(Y),J=C.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),z=C.isub(J).iushrn(this.shift),V=z;return z.cmp(this.m)>=0?V=z.isub(this.m):z.cmpn(0)<0&&(V=z.iadd(this.m)),V._forceRed(this)},K0.prototype.mul=function(X,Y){if(X.isZero()||Y.isZero())return new Q(0)._forceRed(this);var C=X.mul(Y),J=C.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),z=C.isub(J).iushrn(this.shift),V=z;return z.cmp(this.m)>=0?V=z.isub(this.m):z.cmpn(0)<0&&(V=z.iadd(this.m)),V._forceRed(this)},K0.prototype.invm=function(X){var Y=this.imod(X._invmp(this.m).mul(this.r2));return Y._forceRed(this)}})(typeof I>"u"||I,E)}),U3=$0((E,I)=>{var F=l1(),L=O3();I.exports=function(O){return new k(O)};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 k(O){this.curveType=H[O],this.curveType||(this.curveType={name:O}),this.curve=new F.ec(this.curveType.name),this.keys=void 0}k.prototype.generateKeys=function(O,N){return this.keys=this.curve.genKeyPair(),this.getPublicKey(O,N)},k.prototype.computeSecret=function(O,N,U){N=N||"utf8",Buffer.isBuffer(O)||(O=new Buffer(O,N));var W=this.curve.keyFromPublic(O).getPublic(),Z=W.mul(this.keys.getPrivate()).getX();return Q(Z,U,this.curveType.byteLength)},k.prototype.getPublicKey=function(O,N){var U=this.keys.getPublic(N==="compressed",!0);return N==="hybrid"&&(U[U.length-1]%2?U[0]=7:U[0]=6),Q(U,O)},k.prototype.getPrivateKey=function(O){return Q(this.keys.getPrivate(),O)},k.prototype.setPublicKey=function(O,N){return N=N||"utf8",Buffer.isBuffer(O)||(O=new Buffer(O,N)),this.keys._importPublic(O),this},k.prototype.setPrivateKey=function(O,N){N=N||"utf8",Buffer.isBuffer(O)||(O=new Buffer(O,N));var U=new L(O);return U=U.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(U),this};function Q(O,N,U){Array.isArray(O)||(O=O.toArray());var W=new Buffer(O);if(U&&W.length{var F=u2(),L=l0().Buffer;I.exports=function(k,Q){for(var O=L.alloc(0),N=0,U;O.length{I.exports=function(F,L){for(var H=F.length,k=-1;++k{(function(F,L){function H(X,Y){if(!X)throw new Error(Y||"Assertion failed")}function k(X,Y){X.super_=Y;var C=function(){};C.prototype=Y.prototype,X.prototype=new C,X.prototype.constructor=X}function Q(X,Y,C){if(Q.isBN(X))return X;this.negative=0,this.words=null,this.length=0,this.red=null,X!==null&&((Y==="le"||Y==="be")&&(C=Y,Y=10),this._init(X||0,Y||10,C||"be"))}typeof F=="object"?F.exports=Q:L.BN=Q,Q.BN=Q,Q.wordSize=26;var O;try{typeof window<"u"&&typeof window.Buffer<"u"?O=window.Buffer:O=A2().Buffer}catch{}Q.isBN=function(X){return X instanceof Q?!0:X!==null&&typeof X=="object"&&X.constructor.wordSize===Q.wordSize&&Array.isArray(X.words)},Q.max=function(X,Y){return X.cmp(Y)>0?X:Y},Q.min=function(X,Y){return X.cmp(Y)<0?X:Y},Q.prototype._init=function(X,Y,C){if(typeof X=="number")return this._initNumber(X,Y,C);if(typeof X=="object")return this._initArray(X,Y,C);Y==="hex"&&(Y=16),H(Y===(Y|0)&&Y>=2&&Y<=36),X=X.toString().replace(/\s+/g,"");var J=0;X[0]==="-"&&(J++,this.negative=1),J=0;J-=3)V=X[J]|X[J-1]<<8|X[J-2]<<16,this.words[z]|=V<>>26-K&67108863,K+=24,K>=26&&(K-=26,z++);else if(C==="le")for(J=0,z=0;J>>26-K&67108863,K+=24,K>=26&&(K-=26,z++);return this.strip()};function N(X,Y){var C=X.charCodeAt(Y);return C>=65&&C<=70?C-55:C>=97&&C<=102?C-87:C-48&15}function U(X,Y,C){var J=N(X,C);return C-1>=Y&&(J|=N(X,C-1)<<4),J}Q.prototype._parseHex=function(X,Y,C){this.length=Math.ceil((X.length-Y)/6),this.words=new Array(this.length);for(var J=0;J=Y;J-=2)K=U(X,Y,J)<=18?(z-=18,V+=1,this.words[V]|=K>>>26):z+=8;else{var $=X.length-Y;for(J=$%2===0?Y+1:Y;J=18?(z-=18,V+=1,this.words[V]|=K>>>26):z+=8}this.strip()};function W(X,Y,C,J){for(var z=0,V=Math.min(X.length,C),K=Y;K=49?z+=$-49+10:$>=17?z+=$-17+10:z+=$}return z}Q.prototype._parseBase=function(X,Y,C){this.words=[0],this.length=1;for(var J=0,z=1;z<=67108863;z*=Y)J++;J--,z=z/Y|0;for(var V=X.length-C,K=V%J,$=Math.min(V,V-K)+C,G=0,j=C;j<$;j+=J)G=W(X,j,j+J,Y),this.imuln(z),this.words[0]+G<67108864?this.words[0]+=G:this._iaddn(G);if(K!==0){var A=1;for(G=W(X,j,X.length,Y),j=0;j1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},Q.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},Q.prototype.inspect=function(){return(this.red?""};var Z=["","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"],T=[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,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];Q.prototype.toString=function(X,Y){X=X||10,Y=Y|0||1;var C;if(X===16||X==="hex"){C="";for(var J=0,z=0,V=0;V>>24-J&16777215,z!==0||V!==this.length-1?C=Z[6-$.length]+$+C:C=$+C,J+=2,J>=26&&(J-=26,V--)}for(z!==0&&(C=z.toString(16)+C);C.length%Y!==0;)C="0"+C;return this.negative!==0&&(C="-"+C),C}if(X===(X|0)&&X>=2&&X<=36){var G=T[X],j=B[X];C="";var A=this.clone();for(A.negative=0;!A.isZero();){var R=A.modn(j).toString(X);A=A.idivn(j),A.isZero()?C=R+C:C=Z[G-R.length]+R+C}for(this.isZero()&&(C="0"+C);C.length%Y!==0;)C="0"+C;return this.negative!==0&&(C="-"+C),C}H(!1,"Base should be between 2 and 36")},Q.prototype.toNumber=function(){var X=this.words[0];return this.length===2?X+=this.words[1]*67108864:this.length===3&&this.words[2]===1?X+=4503599627370496+this.words[1]*67108864:this.length>2&&H(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-X:X},Q.prototype.toJSON=function(){return this.toString(16)},Q.prototype.toBuffer=function(X,Y){return H(typeof O<"u"),this.toArrayLike(O,X,Y)},Q.prototype.toArray=function(X,Y){return this.toArrayLike(Array,X,Y)},Q.prototype.toArrayLike=function(X,Y,C){var J=this.byteLength(),z=C||Math.max(1,J);H(J<=z,"byte array longer than desired length"),H(z>0,"Requested array length <= 0"),this.strip();var V=Y==="le",K=new X(z),$,G,j=this.clone();if(V){for(G=0;!j.isZero();G++)$=j.andln(255),j.iushrn(8),K[G]=$;for(;G=4096&&(C+=13,Y>>>=13),Y>=64&&(C+=7,Y>>>=7),Y>=8&&(C+=4,Y>>>=4),Y>=2&&(C+=2,Y>>>=2),C+Y},Q.prototype._zeroBits=function(X){if(X===0)return 26;var Y=X,C=0;return(Y&8191)===0&&(C+=13,Y>>>=13),(Y&127)===0&&(C+=7,Y>>>=7),(Y&15)===0&&(C+=4,Y>>>=4),(Y&3)===0&&(C+=2,Y>>>=2),(Y&1)===0&&C++,C},Q.prototype.bitLength=function(){var X=this.words[this.length-1],Y=this._countBits(X);return(this.length-1)*26+Y};function P(X){for(var Y=new Array(X.bitLength()),C=0;C>>z}return Y}Q.prototype.zeroBits=function(){if(this.isZero())return 0;for(var X=0,Y=0;YX.length?this.clone().ior(X):X.clone().ior(this)},Q.prototype.uor=function(X){return this.length>X.length?this.clone().iuor(X):X.clone().iuor(this)},Q.prototype.iuand=function(X){var Y;this.length>X.length?Y=X:Y=this;for(var C=0;CX.length?this.clone().iand(X):X.clone().iand(this)},Q.prototype.uand=function(X){return this.length>X.length?this.clone().iuand(X):X.clone().iuand(this)},Q.prototype.iuxor=function(X){var Y,C;this.length>X.length?(Y=this,C=X):(Y=X,C=this);for(var J=0;JX.length?this.clone().ixor(X):X.clone().ixor(this)},Q.prototype.uxor=function(X){return this.length>X.length?this.clone().iuxor(X):X.clone().iuxor(this)},Q.prototype.inotn=function(X){H(typeof X=="number"&&X>=0);var Y=Math.ceil(X/26)|0,C=X%26;this._expand(Y),C>0&&Y--;for(var J=0;J0&&(this.words[J]=~this.words[J]&67108863>>26-C),this.strip()},Q.prototype.notn=function(X){return this.clone().inotn(X)},Q.prototype.setn=function(X,Y){H(typeof X=="number"&&X>=0);var C=X/26|0,J=X%26;return this._expand(C+1),Y?this.words[C]=this.words[C]|1<X.length?(C=this,J=X):(C=X,J=this);for(var z=0,V=0;V>>26;for(;z!==0&&V>>26;if(this.length=C.length,z!==0)this.words[this.length]=z,this.length++;else if(C!==this)for(;VX.length?this.clone().iadd(X):X.clone().iadd(this)},Q.prototype.isub=function(X){if(X.negative!==0){X.negative=0;var Y=this.iadd(X);return X.negative=1,Y._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(X),this.negative=1,this._normSign();var C=this.cmp(X);if(C===0)return this.negative=0,this.length=1,this.words[0]=0,this;var J,z;C>0?(J=this,z=X):(J=X,z=this);for(var V=0,K=0;K>26,this.words[K]=Y&67108863;for(;V!==0&&K>26,this.words[K]=Y&67108863;if(V===0&&K>>26,R=G&67108863,_=Math.min(j,Y.length-1),s=Math.max(0,j-X.length+1);s<=_;s++){var r=j-s|0;z=X.words[r]|0,V=Y.words[s]|0,K=z*V+R,A+=K/67108864|0,R=K&67108863}C.words[j]=R|0,G=A|0}return G!==0?C.words[j]=G|0:C.length--,C.strip()}var x=function(X,Y,C){var J=X.words,z=Y.words,V=C.words,K=0,$,G,j,A=J[0]|0,R=A&8191,_=A>>>13,s=J[1]|0,r=s&8191,Y0=s>>>13,o=J[2]|0,b=o&8191,f=o>>>13,W0=J[3]|0,X0=W0&8191,z0=W0>>>13,g=J[4]|0,v=g&8191,p=g>>>13,e=J[5]|0,G0=e&8191,t=e>>>13,y0=J[6]|0,Q0=y0&8191,V0=y0>>>13,_0=J[7]|0,F0=_0&8191,Z0=_0>>>13,b0=J[8]|0,D=b0&8191,S=b0>>>13,d=J[9]|0,h=d&8191,u=d>>>13,P0=z[0]|0,J0=P0&8191,H0=P0>>>13,d0=z[1]|0,U0=d0&8191,O0=d0>>>13,g0=z[2]|0,L0=g0&8191,N0=g0>>>13,$2=z[3]|0,D0=$2&8191,T0=$2>>>13,h0=z[4]|0,k0=h0&8191,I0=h0>>>13,j2=z[5]|0,B0=j2&8191,q0=j2>>>13,V2=z[6]|0,R0=V2&8191,E0=V2>>>13,K2=z[7]|0,x0=K2&8191,v0=K2>>>13,Z2=z[8]|0,S0=Z2&8191,A0=Z2>>>13,H2=z[9]|0,M0=H2&8191,w0=H2>>>13;C.negative=X.negative^Y.negative,C.length=19,$=Math.imul(R,J0),G=Math.imul(R,H0),G=G+Math.imul(_,J0)|0,j=Math.imul(_,H0);var Q2=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(Q2>>>26)|0,Q2&=67108863,$=Math.imul(r,J0),G=Math.imul(r,H0),G=G+Math.imul(Y0,J0)|0,j=Math.imul(Y0,H0),$=$+Math.imul(R,U0)|0,G=G+Math.imul(R,O0)|0,G=G+Math.imul(_,U0)|0,j=j+Math.imul(_,O0)|0;var m0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(m0>>>26)|0,m0&=67108863,$=Math.imul(b,J0),G=Math.imul(b,H0),G=G+Math.imul(f,J0)|0,j=Math.imul(f,H0),$=$+Math.imul(r,U0)|0,G=G+Math.imul(r,O0)|0,G=G+Math.imul(Y0,U0)|0,j=j+Math.imul(Y0,O0)|0,$=$+Math.imul(R,L0)|0,G=G+Math.imul(R,N0)|0,G=G+Math.imul(_,L0)|0,j=j+Math.imul(_,N0)|0;var p0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(p0>>>26)|0,p0&=67108863,$=Math.imul(X0,J0),G=Math.imul(X0,H0),G=G+Math.imul(z0,J0)|0,j=Math.imul(z0,H0),$=$+Math.imul(b,U0)|0,G=G+Math.imul(b,O0)|0,G=G+Math.imul(f,U0)|0,j=j+Math.imul(f,O0)|0,$=$+Math.imul(r,L0)|0,G=G+Math.imul(r,N0)|0,G=G+Math.imul(Y0,L0)|0,j=j+Math.imul(Y0,N0)|0,$=$+Math.imul(R,D0)|0,G=G+Math.imul(R,T0)|0,G=G+Math.imul(_,D0)|0,j=j+Math.imul(_,T0)|0;var o0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(o0>>>26)|0,o0&=67108863,$=Math.imul(v,J0),G=Math.imul(v,H0),G=G+Math.imul(p,J0)|0,j=Math.imul(p,H0),$=$+Math.imul(X0,U0)|0,G=G+Math.imul(X0,O0)|0,G=G+Math.imul(z0,U0)|0,j=j+Math.imul(z0,O0)|0,$=$+Math.imul(b,L0)|0,G=G+Math.imul(b,N0)|0,G=G+Math.imul(f,L0)|0,j=j+Math.imul(f,N0)|0,$=$+Math.imul(r,D0)|0,G=G+Math.imul(r,T0)|0,G=G+Math.imul(Y0,D0)|0,j=j+Math.imul(Y0,T0)|0,$=$+Math.imul(R,k0)|0,G=G+Math.imul(R,I0)|0,G=G+Math.imul(_,k0)|0,j=j+Math.imul(_,I0)|0;var u0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(u0>>>26)|0,u0&=67108863,$=Math.imul(G0,J0),G=Math.imul(G0,H0),G=G+Math.imul(t,J0)|0,j=Math.imul(t,H0),$=$+Math.imul(v,U0)|0,G=G+Math.imul(v,O0)|0,G=G+Math.imul(p,U0)|0,j=j+Math.imul(p,O0)|0,$=$+Math.imul(X0,L0)|0,G=G+Math.imul(X0,N0)|0,G=G+Math.imul(z0,L0)|0,j=j+Math.imul(z0,N0)|0,$=$+Math.imul(b,D0)|0,G=G+Math.imul(b,T0)|0,G=G+Math.imul(f,D0)|0,j=j+Math.imul(f,T0)|0,$=$+Math.imul(r,k0)|0,G=G+Math.imul(r,I0)|0,G=G+Math.imul(Y0,k0)|0,j=j+Math.imul(Y0,I0)|0,$=$+Math.imul(R,B0)|0,G=G+Math.imul(R,q0)|0,G=G+Math.imul(_,B0)|0,j=j+Math.imul(_,q0)|0;var s0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(s0>>>26)|0,s0&=67108863,$=Math.imul(Q0,J0),G=Math.imul(Q0,H0),G=G+Math.imul(V0,J0)|0,j=Math.imul(V0,H0),$=$+Math.imul(G0,U0)|0,G=G+Math.imul(G0,O0)|0,G=G+Math.imul(t,U0)|0,j=j+Math.imul(t,O0)|0,$=$+Math.imul(v,L0)|0,G=G+Math.imul(v,N0)|0,G=G+Math.imul(p,L0)|0,j=j+Math.imul(p,N0)|0,$=$+Math.imul(X0,D0)|0,G=G+Math.imul(X0,T0)|0,G=G+Math.imul(z0,D0)|0,j=j+Math.imul(z0,T0)|0,$=$+Math.imul(b,k0)|0,G=G+Math.imul(b,I0)|0,G=G+Math.imul(f,k0)|0,j=j+Math.imul(f,I0)|0,$=$+Math.imul(r,B0)|0,G=G+Math.imul(r,q0)|0,G=G+Math.imul(Y0,B0)|0,j=j+Math.imul(Y0,q0)|0,$=$+Math.imul(R,R0)|0,G=G+Math.imul(R,E0)|0,G=G+Math.imul(_,R0)|0,j=j+Math.imul(_,E0)|0;var f0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(f0>>>26)|0,f0&=67108863,$=Math.imul(F0,J0),G=Math.imul(F0,H0),G=G+Math.imul(Z0,J0)|0,j=Math.imul(Z0,H0),$=$+Math.imul(Q0,U0)|0,G=G+Math.imul(Q0,O0)|0,G=G+Math.imul(V0,U0)|0,j=j+Math.imul(V0,O0)|0,$=$+Math.imul(G0,L0)|0,G=G+Math.imul(G0,N0)|0,G=G+Math.imul(t,L0)|0,j=j+Math.imul(t,N0)|0,$=$+Math.imul(v,D0)|0,G=G+Math.imul(v,T0)|0,G=G+Math.imul(p,D0)|0,j=j+Math.imul(p,T0)|0,$=$+Math.imul(X0,k0)|0,G=G+Math.imul(X0,I0)|0,G=G+Math.imul(z0,k0)|0,j=j+Math.imul(z0,I0)|0,$=$+Math.imul(b,B0)|0,G=G+Math.imul(b,q0)|0,G=G+Math.imul(f,B0)|0,j=j+Math.imul(f,q0)|0,$=$+Math.imul(r,R0)|0,G=G+Math.imul(r,E0)|0,G=G+Math.imul(Y0,R0)|0,j=j+Math.imul(Y0,E0)|0,$=$+Math.imul(R,x0)|0,G=G+Math.imul(R,v0)|0,G=G+Math.imul(_,x0)|0,j=j+Math.imul(_,v0)|0;var a0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(a0>>>26)|0,a0&=67108863,$=Math.imul(D,J0),G=Math.imul(D,H0),G=G+Math.imul(S,J0)|0,j=Math.imul(S,H0),$=$+Math.imul(F0,U0)|0,G=G+Math.imul(F0,O0)|0,G=G+Math.imul(Z0,U0)|0,j=j+Math.imul(Z0,O0)|0,$=$+Math.imul(Q0,L0)|0,G=G+Math.imul(Q0,N0)|0,G=G+Math.imul(V0,L0)|0,j=j+Math.imul(V0,N0)|0,$=$+Math.imul(G0,D0)|0,G=G+Math.imul(G0,T0)|0,G=G+Math.imul(t,D0)|0,j=j+Math.imul(t,T0)|0,$=$+Math.imul(v,k0)|0,G=G+Math.imul(v,I0)|0,G=G+Math.imul(p,k0)|0,j=j+Math.imul(p,I0)|0,$=$+Math.imul(X0,B0)|0,G=G+Math.imul(X0,q0)|0,G=G+Math.imul(z0,B0)|0,j=j+Math.imul(z0,q0)|0,$=$+Math.imul(b,R0)|0,G=G+Math.imul(b,E0)|0,G=G+Math.imul(f,R0)|0,j=j+Math.imul(f,E0)|0,$=$+Math.imul(r,x0)|0,G=G+Math.imul(r,v0)|0,G=G+Math.imul(Y0,x0)|0,j=j+Math.imul(Y0,v0)|0,$=$+Math.imul(R,S0)|0,G=G+Math.imul(R,A0)|0,G=G+Math.imul(_,S0)|0,j=j+Math.imul(_,A0)|0;var n0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(n0>>>26)|0,n0&=67108863,$=Math.imul(h,J0),G=Math.imul(h,H0),G=G+Math.imul(u,J0)|0,j=Math.imul(u,H0),$=$+Math.imul(D,U0)|0,G=G+Math.imul(D,O0)|0,G=G+Math.imul(S,U0)|0,j=j+Math.imul(S,O0)|0,$=$+Math.imul(F0,L0)|0,G=G+Math.imul(F0,N0)|0,G=G+Math.imul(Z0,L0)|0,j=j+Math.imul(Z0,N0)|0,$=$+Math.imul(Q0,D0)|0,G=G+Math.imul(Q0,T0)|0,G=G+Math.imul(V0,D0)|0,j=j+Math.imul(V0,T0)|0,$=$+Math.imul(G0,k0)|0,G=G+Math.imul(G0,I0)|0,G=G+Math.imul(t,k0)|0,j=j+Math.imul(t,I0)|0,$=$+Math.imul(v,B0)|0,G=G+Math.imul(v,q0)|0,G=G+Math.imul(p,B0)|0,j=j+Math.imul(p,q0)|0,$=$+Math.imul(X0,R0)|0,G=G+Math.imul(X0,E0)|0,G=G+Math.imul(z0,R0)|0,j=j+Math.imul(z0,E0)|0,$=$+Math.imul(b,x0)|0,G=G+Math.imul(b,v0)|0,G=G+Math.imul(f,x0)|0,j=j+Math.imul(f,v0)|0,$=$+Math.imul(r,S0)|0,G=G+Math.imul(r,A0)|0,G=G+Math.imul(Y0,S0)|0,j=j+Math.imul(Y0,A0)|0,$=$+Math.imul(R,M0)|0,G=G+Math.imul(R,w0)|0,G=G+Math.imul(_,M0)|0,j=j+Math.imul(_,w0)|0;var r0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(r0>>>26)|0,r0&=67108863,$=Math.imul(h,U0),G=Math.imul(h,O0),G=G+Math.imul(u,U0)|0,j=Math.imul(u,O0),$=$+Math.imul(D,L0)|0,G=G+Math.imul(D,N0)|0,G=G+Math.imul(S,L0)|0,j=j+Math.imul(S,N0)|0,$=$+Math.imul(F0,D0)|0,G=G+Math.imul(F0,T0)|0,G=G+Math.imul(Z0,D0)|0,j=j+Math.imul(Z0,T0)|0,$=$+Math.imul(Q0,k0)|0,G=G+Math.imul(Q0,I0)|0,G=G+Math.imul(V0,k0)|0,j=j+Math.imul(V0,I0)|0,$=$+Math.imul(G0,B0)|0,G=G+Math.imul(G0,q0)|0,G=G+Math.imul(t,B0)|0,j=j+Math.imul(t,q0)|0,$=$+Math.imul(v,R0)|0,G=G+Math.imul(v,E0)|0,G=G+Math.imul(p,R0)|0,j=j+Math.imul(p,E0)|0,$=$+Math.imul(X0,x0)|0,G=G+Math.imul(X0,v0)|0,G=G+Math.imul(z0,x0)|0,j=j+Math.imul(z0,v0)|0,$=$+Math.imul(b,S0)|0,G=G+Math.imul(b,A0)|0,G=G+Math.imul(f,S0)|0,j=j+Math.imul(f,A0)|0,$=$+Math.imul(r,M0)|0,G=G+Math.imul(r,w0)|0,G=G+Math.imul(Y0,M0)|0,j=j+Math.imul(Y0,w0)|0;var i0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(i0>>>26)|0,i0&=67108863,$=Math.imul(h,L0),G=Math.imul(h,N0),G=G+Math.imul(u,L0)|0,j=Math.imul(u,N0),$=$+Math.imul(D,D0)|0,G=G+Math.imul(D,T0)|0,G=G+Math.imul(S,D0)|0,j=j+Math.imul(S,T0)|0,$=$+Math.imul(F0,k0)|0,G=G+Math.imul(F0,I0)|0,G=G+Math.imul(Z0,k0)|0,j=j+Math.imul(Z0,I0)|0,$=$+Math.imul(Q0,B0)|0,G=G+Math.imul(Q0,q0)|0,G=G+Math.imul(V0,B0)|0,j=j+Math.imul(V0,q0)|0,$=$+Math.imul(G0,R0)|0,G=G+Math.imul(G0,E0)|0,G=G+Math.imul(t,R0)|0,j=j+Math.imul(t,E0)|0,$=$+Math.imul(v,x0)|0,G=G+Math.imul(v,v0)|0,G=G+Math.imul(p,x0)|0,j=j+Math.imul(p,v0)|0,$=$+Math.imul(X0,S0)|0,G=G+Math.imul(X0,A0)|0,G=G+Math.imul(z0,S0)|0,j=j+Math.imul(z0,A0)|0,$=$+Math.imul(b,M0)|0,G=G+Math.imul(b,w0)|0,G=G+Math.imul(f,M0)|0,j=j+Math.imul(f,w0)|0;var t0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(t0>>>26)|0,t0&=67108863,$=Math.imul(h,D0),G=Math.imul(h,T0),G=G+Math.imul(u,D0)|0,j=Math.imul(u,T0),$=$+Math.imul(D,k0)|0,G=G+Math.imul(D,I0)|0,G=G+Math.imul(S,k0)|0,j=j+Math.imul(S,I0)|0,$=$+Math.imul(F0,B0)|0,G=G+Math.imul(F0,q0)|0,G=G+Math.imul(Z0,B0)|0,j=j+Math.imul(Z0,q0)|0,$=$+Math.imul(Q0,R0)|0,G=G+Math.imul(Q0,E0)|0,G=G+Math.imul(V0,R0)|0,j=j+Math.imul(V0,E0)|0,$=$+Math.imul(G0,x0)|0,G=G+Math.imul(G0,v0)|0,G=G+Math.imul(t,x0)|0,j=j+Math.imul(t,v0)|0,$=$+Math.imul(v,S0)|0,G=G+Math.imul(v,A0)|0,G=G+Math.imul(p,S0)|0,j=j+Math.imul(p,A0)|0,$=$+Math.imul(X0,M0)|0,G=G+Math.imul(X0,w0)|0,G=G+Math.imul(z0,M0)|0,j=j+Math.imul(z0,w0)|0;var e0=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(e0>>>26)|0,e0&=67108863,$=Math.imul(h,k0),G=Math.imul(h,I0),G=G+Math.imul(u,k0)|0,j=Math.imul(u,I0),$=$+Math.imul(D,B0)|0,G=G+Math.imul(D,q0)|0,G=G+Math.imul(S,B0)|0,j=j+Math.imul(S,q0)|0,$=$+Math.imul(F0,R0)|0,G=G+Math.imul(F0,E0)|0,G=G+Math.imul(Z0,R0)|0,j=j+Math.imul(Z0,E0)|0,$=$+Math.imul(Q0,x0)|0,G=G+Math.imul(Q0,v0)|0,G=G+Math.imul(V0,x0)|0,j=j+Math.imul(V0,v0)|0,$=$+Math.imul(G0,S0)|0,G=G+Math.imul(G0,A0)|0,G=G+Math.imul(t,S0)|0,j=j+Math.imul(t,A0)|0,$=$+Math.imul(v,M0)|0,G=G+Math.imul(v,w0)|0,G=G+Math.imul(p,M0)|0,j=j+Math.imul(p,w0)|0;var X2=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(X2>>>26)|0,X2&=67108863,$=Math.imul(h,B0),G=Math.imul(h,q0),G=G+Math.imul(u,B0)|0,j=Math.imul(u,q0),$=$+Math.imul(D,R0)|0,G=G+Math.imul(D,E0)|0,G=G+Math.imul(S,R0)|0,j=j+Math.imul(S,E0)|0,$=$+Math.imul(F0,x0)|0,G=G+Math.imul(F0,v0)|0,G=G+Math.imul(Z0,x0)|0,j=j+Math.imul(Z0,v0)|0,$=$+Math.imul(Q0,S0)|0,G=G+Math.imul(Q0,A0)|0,G=G+Math.imul(V0,S0)|0,j=j+Math.imul(V0,A0)|0,$=$+Math.imul(G0,M0)|0,G=G+Math.imul(G0,w0)|0,G=G+Math.imul(t,M0)|0,j=j+Math.imul(t,w0)|0;var G2=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(G2>>>26)|0,G2&=67108863,$=Math.imul(h,R0),G=Math.imul(h,E0),G=G+Math.imul(u,R0)|0,j=Math.imul(u,E0),$=$+Math.imul(D,x0)|0,G=G+Math.imul(D,v0)|0,G=G+Math.imul(S,x0)|0,j=j+Math.imul(S,v0)|0,$=$+Math.imul(F0,S0)|0,G=G+Math.imul(F0,A0)|0,G=G+Math.imul(Z0,S0)|0,j=j+Math.imul(Z0,A0)|0,$=$+Math.imul(Q0,M0)|0,G=G+Math.imul(Q0,w0)|0,G=G+Math.imul(V0,M0)|0,j=j+Math.imul(V0,w0)|0;var Y2=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(Y2>>>26)|0,Y2&=67108863,$=Math.imul(h,x0),G=Math.imul(h,v0),G=G+Math.imul(u,x0)|0,j=Math.imul(u,v0),$=$+Math.imul(D,S0)|0,G=G+Math.imul(D,A0)|0,G=G+Math.imul(S,S0)|0,j=j+Math.imul(S,A0)|0,$=$+Math.imul(F0,M0)|0,G=G+Math.imul(F0,w0)|0,G=G+Math.imul(Z0,M0)|0,j=j+Math.imul(Z0,w0)|0;var J2=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(J2>>>26)|0,J2&=67108863,$=Math.imul(h,S0),G=Math.imul(h,A0),G=G+Math.imul(u,S0)|0,j=Math.imul(u,A0),$=$+Math.imul(D,M0)|0,G=G+Math.imul(D,w0)|0,G=G+Math.imul(S,M0)|0,j=j+Math.imul(S,w0)|0;var C2=(K+$|0)+((G&8191)<<13)|0;K=(j+(G>>>13)|0)+(C2>>>26)|0,C2&=67108863,$=Math.imul(h,M0),G=Math.imul(h,w0),G=G+Math.imul(u,M0)|0,j=Math.imul(u,w0);var z2=(K+$|0)+((G&8191)<<13)|0;return K=(j+(G>>>13)|0)+(z2>>>26)|0,z2&=67108863,V[0]=Q2,V[1]=m0,V[2]=p0,V[3]=o0,V[4]=u0,V[5]=s0,V[6]=f0,V[7]=a0,V[8]=n0,V[9]=r0,V[10]=i0,V[11]=t0,V[12]=e0,V[13]=X2,V[14]=G2,V[15]=Y2,V[16]=J2,V[17]=C2,V[18]=z2,K!==0&&(V[19]=K,C.length++),C};Math.imul||(x=q);function w(X,Y,C){C.negative=Y.negative^X.negative,C.length=X.length+Y.length;for(var J=0,z=0,V=0;V>>26)|0,z+=K>>>26,K&=67108863}C.words[V]=$,J=K,K=z}return J!==0?C.words[V]=J:C.length--,C.strip()}function M(X,Y,C){var J=new y;return J.mulp(X,Y,C)}Q.prototype.mulTo=function(X,Y){var C,J=this.length+X.length;return this.length===10&&X.length===10?C=x(this,X,Y):J<63?C=q(this,X,Y):J<1024?C=w(this,X,Y):C=M(this,X,Y),C};function y(X,Y){this.x=X,this.y=Y}y.prototype.makeRBT=function(X){for(var Y=new Array(X),C=Q.prototype._countBits(X)-1,J=0;J>=1;return J},y.prototype.permute=function(X,Y,C,J,z,V){for(var K=0;K>>1)z++;return 1<>>13,C[2*V+1]=z&8191,z=z>>>13;for(V=2*Y;V>=26,Y+=J/67108864|0,Y+=z>>>26,this.words[C]=z&67108863}return Y!==0&&(this.words[C]=Y,this.length++),this},Q.prototype.muln=function(X){return this.clone().imuln(X)},Q.prototype.sqr=function(){return this.mul(this)},Q.prototype.isqr=function(){return this.imul(this.clone())},Q.prototype.pow=function(X){var Y=P(X);if(Y.length===0)return new Q(1);for(var C=this,J=0;J=0);var Y=X%26,C=(X-Y)/26,J=67108863>>>26-Y<<26-Y,z;if(Y!==0){var V=0;for(z=0;z>>26-Y}V&&(this.words[z]=V,this.length++)}if(C!==0){for(z=this.length-1;z>=0;z--)this.words[z+C]=this.words[z];for(z=0;z=0);var J;Y?J=(Y-Y%26)/26:J=0;var z=X%26,V=Math.min((X-z)/26,this.length),K=67108863^67108863>>>z<V)for(this.length-=V,G=0;G=0&&(j!==0||G>=J);G--){var A=this.words[G]|0;this.words[G]=j<<26-z|A>>>z,j=A&K}return $&&j!==0&&($.words[$.length++]=j),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},Q.prototype.ishrn=function(X,Y,C){return H(this.negative===0),this.iushrn(X,Y,C)},Q.prototype.shln=function(X){return this.clone().ishln(X)},Q.prototype.ushln=function(X){return this.clone().iushln(X)},Q.prototype.shrn=function(X){return this.clone().ishrn(X)},Q.prototype.ushrn=function(X){return this.clone().iushrn(X)},Q.prototype.testn=function(X){H(typeof X=="number"&&X>=0);var Y=X%26,C=(X-Y)/26,J=1<=0);var Y=X%26,C=(X-Y)/26;if(H(this.negative===0,"imaskn works only with positive numbers"),this.length<=C)return this;if(Y!==0&&C++,this.length=Math.min(C,this.length),Y!==0){var J=67108863^67108863>>>Y<=67108864;Y++)this.words[Y]-=67108864,Y===this.length-1?this.words[Y+1]=1:this.words[Y+1]++;return this.length=Math.max(this.length,Y+1),this},Q.prototype.isubn=function(X){if(H(typeof X=="number"),H(X<67108864),X<0)return this.iaddn(-X);if(this.negative!==0)return this.negative=0,this.iaddn(X),this.negative=1,this;if(this.words[0]-=X,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var Y=0;Y>26)-($/67108864|0),this.words[z+C]=V&67108863}for(;z>26,this.words[z+C]=V&67108863;if(K===0)return this.strip();for(H(K===-1),K=0,z=0;z>26,this.words[z]=V&67108863;return this.negative=1,this.strip()},Q.prototype._wordDiv=function(X,Y){var C=this.length-X.length,J=this.clone(),z=X,V=z.words[z.length-1]|0,K=this._countBits(V);C=26-K,C!==0&&(z=z.ushln(C),J.iushln(C),V=z.words[z.length-1]|0);var $=J.length-z.length,G;if(Y!=="mod"){G=new Q(null),G.length=$+1,G.words=new Array(G.length);for(var j=0;j=0;R--){var _=(J.words[z.length+R]|0)*67108864+(J.words[z.length+R-1]|0);for(_=Math.min(_/V|0,67108863),J._ishlnsubmul(z,_,R);J.negative!==0;)_--,J.negative=0,J._ishlnsubmul(z,1,R),J.isZero()||(J.negative^=1);G&&(G.words[R]=_)}return G&&G.strip(),J.strip(),Y!=="div"&&C!==0&&J.iushrn(C),{div:G||null,mod:J}},Q.prototype.divmod=function(X,Y,C){if(H(!X.isZero()),this.isZero())return{div:new Q(0),mod:new Q(0)};var J,z,V;return this.negative!==0&&X.negative===0?(V=this.neg().divmod(X,Y),Y!=="mod"&&(J=V.div.neg()),Y!=="div"&&(z=V.mod.neg(),C&&z.negative!==0&&z.iadd(X)),{div:J,mod:z}):this.negative===0&&X.negative!==0?(V=this.divmod(X.neg(),Y),Y!=="mod"&&(J=V.div.neg()),{div:J,mod:V.mod}):(this.negative&X.negative)!==0?(V=this.neg().divmod(X.neg(),Y),Y!=="div"&&(z=V.mod.neg(),C&&z.negative!==0&&z.isub(X)),{div:V.div,mod:z}):X.length>this.length||this.cmp(X)<0?{div:new Q(0),mod:this}:X.length===1?Y==="div"?{div:this.divn(X.words[0]),mod:null}:Y==="mod"?{div:null,mod:new Q(this.modn(X.words[0]))}:{div:this.divn(X.words[0]),mod:new Q(this.modn(X.words[0]))}:this._wordDiv(X,Y)},Q.prototype.div=function(X){return this.divmod(X,"div",!1).div},Q.prototype.mod=function(X){return this.divmod(X,"mod",!1).mod},Q.prototype.umod=function(X){return this.divmod(X,"mod",!0).mod},Q.prototype.divRound=function(X){var Y=this.divmod(X);if(Y.mod.isZero())return Y.div;var C=Y.div.negative!==0?Y.mod.isub(X):Y.mod,J=X.ushrn(1),z=X.andln(1),V=C.cmp(J);return V<0||z===1&&V===0?Y.div:Y.div.negative!==0?Y.div.isubn(1):Y.div.iaddn(1)},Q.prototype.modn=function(X){H(X<=67108863);for(var Y=(1<<26)%X,C=0,J=this.length-1;J>=0;J--)C=(Y*C+(this.words[J]|0))%X;return C},Q.prototype.idivn=function(X){H(X<=67108863);for(var Y=0,C=this.length-1;C>=0;C--){var J=(this.words[C]|0)+Y*67108864;this.words[C]=J/X|0,Y=J%X}return this.strip()},Q.prototype.divn=function(X){return this.clone().idivn(X)},Q.prototype.egcd=function(X){H(X.negative===0),H(!X.isZero());var Y=this,C=X.clone();Y.negative!==0?Y=Y.umod(X):Y=Y.clone();for(var J=new Q(1),z=new Q(0),V=new Q(0),K=new Q(1),$=0;Y.isEven()&&C.isEven();)Y.iushrn(1),C.iushrn(1),++$;for(var G=C.clone(),j=Y.clone();!Y.isZero();){for(var A=0,R=1;(Y.words[0]&R)===0&&A<26;++A,R<<=1);if(A>0)for(Y.iushrn(A);A-- >0;)(J.isOdd()||z.isOdd())&&(J.iadd(G),z.isub(j)),J.iushrn(1),z.iushrn(1);for(var _=0,s=1;(C.words[0]&s)===0&&_<26;++_,s<<=1);if(_>0)for(C.iushrn(_);_-- >0;)(V.isOdd()||K.isOdd())&&(V.iadd(G),K.isub(j)),V.iushrn(1),K.iushrn(1);Y.cmp(C)>=0?(Y.isub(C),J.isub(V),z.isub(K)):(C.isub(Y),V.isub(J),K.isub(z))}return{a:V,b:K,gcd:C.iushln($)}},Q.prototype._invmp=function(X){H(X.negative===0),H(!X.isZero());var Y=this,C=X.clone();Y.negative!==0?Y=Y.umod(X):Y=Y.clone();for(var J=new Q(1),z=new Q(0),V=C.clone();Y.cmpn(1)>0&&C.cmpn(1)>0;){for(var K=0,$=1;(Y.words[0]&$)===0&&K<26;++K,$<<=1);if(K>0)for(Y.iushrn(K);K-- >0;)J.isOdd()&&J.iadd(V),J.iushrn(1);for(var G=0,j=1;(C.words[0]&j)===0&&G<26;++G,j<<=1);if(G>0)for(C.iushrn(G);G-- >0;)z.isOdd()&&z.iadd(V),z.iushrn(1);Y.cmp(C)>=0?(Y.isub(C),J.isub(z)):(C.isub(Y),z.isub(J))}var A;return Y.cmpn(1)===0?A=J:A=z,A.cmpn(0)<0&&A.iadd(X),A},Q.prototype.gcd=function(X){if(this.isZero())return X.abs();if(X.isZero())return this.abs();var Y=this.clone(),C=X.clone();Y.negative=0,C.negative=0;for(var J=0;Y.isEven()&&C.isEven();J++)Y.iushrn(1),C.iushrn(1);do{for(;Y.isEven();)Y.iushrn(1);for(;C.isEven();)C.iushrn(1);var z=Y.cmp(C);if(z<0){var V=Y;Y=C,C=V}else if(z===0||C.cmpn(1)===0)break;Y.isub(C)}while(!0);return C.iushln(J)},Q.prototype.invm=function(X){return this.egcd(X).a.umod(X)},Q.prototype.isEven=function(){return(this.words[0]&1)===0},Q.prototype.isOdd=function(){return(this.words[0]&1)===1},Q.prototype.andln=function(X){return this.words[0]&X},Q.prototype.bincn=function(X){H(typeof X=="number");var Y=X%26,C=(X-Y)/26,J=1<>>26,K&=67108863,this.words[V]=K}return z!==0&&(this.words[V]=z,this.length++),this},Q.prototype.isZero=function(){return this.length===1&&this.words[0]===0},Q.prototype.cmpn=function(X){var Y=X<0;if(this.negative!==0&&!Y)return-1;if(this.negative===0&&Y)return 1;this.strip();var C;if(this.length>1)C=1;else{Y&&(X=-X),H(X<=67108863,"Number is too big");var J=this.words[0]|0;C=J===X?0:JX.length)return 1;if(this.length=0;C--){var J=this.words[C]|0,z=X.words[C]|0;if(J!==z){Jz&&(Y=1);break}}return Y},Q.prototype.gtn=function(X){return this.cmpn(X)===1},Q.prototype.gt=function(X){return this.cmp(X)===1},Q.prototype.gten=function(X){return this.cmpn(X)>=0},Q.prototype.gte=function(X){return this.cmp(X)>=0},Q.prototype.ltn=function(X){return this.cmpn(X)===-1},Q.prototype.lt=function(X){return this.cmp(X)===-1},Q.prototype.lten=function(X){return this.cmpn(X)<=0},Q.prototype.lte=function(X){return this.cmp(X)<=0},Q.prototype.eqn=function(X){return this.cmpn(X)===0},Q.prototype.eq=function(X){return this.cmp(X)===0},Q.red=function(X){return new a(X)},Q.prototype.toRed=function(X){return H(!this.red,"Already a number in reduction context"),H(this.negative===0,"red works only with positives"),X.convertTo(this)._forceRed(X)},Q.prototype.fromRed=function(){return H(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},Q.prototype._forceRed=function(X){return this.red=X,this},Q.prototype.forceRed=function(X){return H(!this.red,"Already a number in reduction context"),this._forceRed(X)},Q.prototype.redAdd=function(X){return H(this.red,"redAdd works only with red numbers"),this.red.add(this,X)},Q.prototype.redIAdd=function(X){return H(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,X)},Q.prototype.redSub=function(X){return H(this.red,"redSub works only with red numbers"),this.red.sub(this,X)},Q.prototype.redISub=function(X){return H(this.red,"redISub works only with red numbers"),this.red.isub(this,X)},Q.prototype.redShl=function(X){return H(this.red,"redShl works only with red numbers"),this.red.shl(this,X)},Q.prototype.redMul=function(X){return H(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.mul(this,X)},Q.prototype.redIMul=function(X){return H(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.imul(this,X)},Q.prototype.redSqr=function(){return H(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},Q.prototype.redISqr=function(){return H(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},Q.prototype.redSqrt=function(){return H(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},Q.prototype.redInvm=function(){return H(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},Q.prototype.redNeg=function(){return H(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},Q.prototype.redPow=function(X){return H(this.red&&!X.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,X)};var m={k256:null,p224:null,p192:null,p25519:null};function c(X,Y){this.name=X,this.p=new Q(Y,16),this.n=this.p.bitLength(),this.k=new Q(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}c.prototype._tmp=function(){var X=new Q(null);return X.words=new Array(Math.ceil(this.n/13)),X},c.prototype.ireduce=function(X){var Y=X,C;do this.split(Y,this.tmp),Y=this.imulK(Y),Y=Y.iadd(this.tmp),C=Y.bitLength();while(C>this.n);var J=C0?Y.isub(this.p):Y.strip!==void 0?Y.strip():Y._strip(),Y},c.prototype.split=function(X,Y){X.iushrn(this.n,0,Y)},c.prototype.imulK=function(X){return X.imul(this.k)};function l(){c.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}k(l,c),l.prototype.split=function(X,Y){for(var C=4194303,J=Math.min(X.length,9),z=0;z>>22,V=K}V>>>=22,X.words[z-10]=V,V===0&&X.length>10?X.length-=10:X.length-=9},l.prototype.imulK=function(X){X.words[X.length]=0,X.words[X.length+1]=0,X.length+=2;for(var Y=0,C=0;C>>=26,X.words[C]=z,Y=J}return Y!==0&&(X.words[X.length++]=Y),X},Q._prime=function(X){if(m[X])return m[X];var Y;if(X==="k256")Y=new l;else if(X==="p224")Y=new n;else if(X==="p192")Y=new i;else if(X==="p25519")Y=new C0;else throw new Error("Unknown prime "+X);return m[X]=Y,Y};function a(X){if(typeof X=="string"){var Y=Q._prime(X);this.m=Y.p,this.prime=Y}else H(X.gtn(1),"modulus must be greater than 1"),this.m=X,this.prime=null}a.prototype._verify1=function(X){H(X.negative===0,"red works only with positives"),H(X.red,"red works only with red numbers")},a.prototype._verify2=function(X,Y){H((X.negative|Y.negative)===0,"red works only with positives"),H(X.red&&X.red===Y.red,"red works only with red numbers")},a.prototype.imod=function(X){return this.prime?this.prime.ireduce(X)._forceRed(this):X.umod(this.m)._forceRed(this)},a.prototype.neg=function(X){return X.isZero()?X.clone():this.m.sub(X)._forceRed(this)},a.prototype.add=function(X,Y){this._verify2(X,Y);var C=X.add(Y);return C.cmp(this.m)>=0&&C.isub(this.m),C._forceRed(this)},a.prototype.iadd=function(X,Y){this._verify2(X,Y);var C=X.iadd(Y);return C.cmp(this.m)>=0&&C.isub(this.m),C},a.prototype.sub=function(X,Y){this._verify2(X,Y);var C=X.sub(Y);return C.cmpn(0)<0&&C.iadd(this.m),C._forceRed(this)},a.prototype.isub=function(X,Y){this._verify2(X,Y);var C=X.isub(Y);return C.cmpn(0)<0&&C.iadd(this.m),C},a.prototype.shl=function(X,Y){return this._verify1(X),this.imod(X.ushln(Y))},a.prototype.imul=function(X,Y){return this._verify2(X,Y),this.imod(X.imul(Y))},a.prototype.mul=function(X,Y){return this._verify2(X,Y),this.imod(X.mul(Y))},a.prototype.isqr=function(X){return this.imul(X,X.clone())},a.prototype.sqr=function(X){return this.mul(X,X)},a.prototype.sqrt=function(X){if(X.isZero())return X.clone();var Y=this.m.andln(3);if(H(Y%2===1),Y===3){var C=this.m.add(new Q(1)).iushrn(2);return this.pow(X,C)}for(var J=this.m.subn(1),z=0;!J.isZero()&&J.andln(1)===0;)z++,J.iushrn(1);H(!J.isZero());var V=new Q(1).toRed(this),K=V.redNeg(),$=this.m.subn(1).iushrn(1),G=this.m.bitLength();for(G=new Q(2*G*G).toRed(this);this.pow(G,$).cmp(K)!==0;)G.redIAdd(K);for(var j=this.pow(G,J),A=this.pow(X,J.addn(1).iushrn(1)),R=this.pow(X,J),_=z;R.cmp(V)!==0;){for(var s=R,r=0;s.cmp(V)!==0;r++)s=s.redSqr();H(r<_);var Y0=this.pow(j,new Q(1).iushln(_-r-1));A=A.redMul(Y0),j=Y0.redSqr(),R=R.redMul(j),_=r}return A},a.prototype.invm=function(X){var Y=X._invmp(this.m);return Y.negative!==0?(Y.negative=0,this.imod(Y).redNeg()):this.imod(Y)},a.prototype.pow=function(X,Y){if(Y.isZero())return new Q(1).toRed(this);if(Y.cmpn(1)===0)return X.clone();var C=4,J=new Array(1<=0;z--){for(var j=Y.words[z],A=G-1;A>=0;A--){var R=j>>A&1;if(V!==J[0]&&(V=this.sqr(V)),R===0&&K===0){$=0;continue}K<<=1,K|=R,$++,!($!==C&&(z!==0||A!==0))&&(V=this.mul(V,J[K]),$=0,K=0)}G=26}return V},a.prototype.convertTo=function(X){var Y=X.umod(this.m);return Y===X?Y.clone():Y},a.prototype.convertFrom=function(X){var Y=X.clone();return Y.red=null,Y},Q.mont=function(X){return new K0(X)};function K0(X){a.call(this,X),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new Q(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)}k(K0,a),K0.prototype.convertTo=function(X){return this.imod(X.ushln(this.shift))},K0.prototype.convertFrom=function(X){var Y=this.imod(X.mul(this.rinv));return Y.red=null,Y},K0.prototype.imul=function(X,Y){if(X.isZero()||Y.isZero())return X.words[0]=0,X.length=1,X;var C=X.imul(Y),J=C.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),z=C.isub(J).iushrn(this.shift),V=z;return z.cmp(this.m)>=0?V=z.isub(this.m):z.cmpn(0)<0&&(V=z.iadd(this.m)),V._forceRed(this)},K0.prototype.mul=function(X,Y){if(X.isZero()||Y.isZero())return new Q(0)._forceRed(this);var C=X.mul(Y),J=C.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),z=C.isub(J).iushrn(this.shift),V=z;return z.cmp(this.m)>=0?V=z.isub(this.m):z.cmpn(0)<0&&(V=z.iadd(this.m)),V._forceRed(this)},K0.prototype.invm=function(X){var Y=this.imod(X._invmp(this.m).mul(this.r2));return Y._forceRed(this)}})(typeof I>"u"||I,E)}),U6=$0((E,I)=>{var F=f1(),L=l0().Buffer;function H(k,Q){return L.from(k.toRed(F.mont(Q.modulus)).redPow(new F(Q.publicExponent)).fromRed().toArray())}I.exports=H}),F3=$0((E,I)=>{var F=K1(),L=_2(),H=u2(),k=H6(),Q=O6(),O=f1(),N=U6(),U=c1(),W=l0().Buffer;I.exports=function(P,q,x){var w;P.padding?w=P.padding:x?w=1:w=4;var M=F(P),y;if(w===4)y=Z(M,q);else if(w===1)y=T(M,q,x);else if(w===3){if(y=new O(q),y.cmp(M.modulus)>=0)throw new Error("data too long for modulus")}else throw new Error("unknown padding");return x?U(y,M):N(y,M)};function Z(P,q){var x=P.modulus.byteLength(),w=q.length,M=H("sha1").update(W.alloc(0)).digest(),y=M.length,m=2*y;if(w>x-m-2)throw new Error("message too long");var c=W.alloc(x-w-m-2),l=x-y-1,n=L(y),i=Q(W.concat([M,c,W.alloc(1,1),q],l),k(n,l)),C0=Q(n,k(i,y));return new O(W.concat([W.alloc(1),C0,i],x))}function T(P,q,x){var w=q.length,M=P.modulus.byteLength();if(w>M-11)throw new Error("message too long");var y;return x?y=W.alloc(M-w-3,255):y=B(M-w-3),new O(W.concat([W.from([0,x?1:2]),y,W.alloc(1),q],M))}function B(P){for(var q=W.allocUnsafe(P),x=0,w=L(P*2),M=0,y;x{var F=K1(),L=H6(),H=O6(),k=f1(),Q=c1(),O=u2(),N=U6(),U=l0().Buffer;I.exports=function(B,P,q){var x;B.padding?x=B.padding:q?x=1:x=4;var w=F(B),M=w.modulus.byteLength();if(P.length>M||new k(P).cmp(w.modulus)>=0)throw new Error("decryption error");var y;q?y=N(new k(P),w):y=Q(P,w);var m=U.alloc(M-y.length);if(y=U.concat([m,y],M),x===4)return W(w,y);if(x===1)return Z(w,y,q);if(x===3)return y;throw new Error("unknown padding")};function W(B,P){var q=B.modulus.byteLength(),x=O("sha1").update(U.alloc(0)).digest(),w=x.length;if(P[0]!==0)throw new Error("decryption error");var M=P.slice(1,w+1),y=P.slice(w+1),m=H(M,L(y,w)),c=H(y,L(m,q-w-1));if(T(x,c.slice(0,w)))throw new Error("decryption error");for(var l=w;c[l]===0;)l++;if(c[l++]!==1)throw new Error("decryption error");return c.slice(l)}function Z(B,P,q){for(var x=P.slice(0,2),w=2,M=0;P[w++]!==0;)if(w>=P.length){M++;break}var y=P.slice(2,w-1);if((x.toString("hex")!=="0002"&&!q||x.toString("hex")!=="0001"&&q)&&M++,y.length<8&&M++,M)throw new Error("decryption error");return P.slice(w)}function T(B,P){B=U.from(B),P=U.from(P);var q=0,x=B.length;B.length!==P.length&&(q++,x=Math.min(B.length,P.length));for(var w=-1;++w{E.publicEncrypt=F3(),E.privateDecrypt=W3(),E.privateEncrypt=function(I,F){return E.publicEncrypt(I,F,!0)},E.publicDecrypt=function(I,F){return E.privateDecrypt(I,F,!0)}}),T3=$0((E)=>{function I(){throw new Error(`secure random number generation not supported by this browser -use chrome, FireFox or Internet Explorer 11`)}var F=l0(),L=_2(),H=F.Buffer,k=F.kMaxLength,Q=global.crypto||global.msCrypto,O=Math.pow(2,32)-1;function N(B,P){if(typeof B!="number"||B!==B)throw new TypeError("offset must be a number");if(B>O||B<0)throw new TypeError("offset must be a uint32");if(B>k||B>P)throw new RangeError("offset out of range")}function U(B,P,q){if(typeof B!="number"||B!==B)throw new TypeError("size must be a number");if(B>O||B<0)throw new TypeError("size must be a uint32");if(B+P>q||B>k)throw new RangeError("buffer too small")}Q&&Q.getRandomValues?(E.randomFill=W,E.randomFillSync=T):(E.randomFill=I,E.randomFillSync=I);function W(B,P,q,x){if(!H.isBuffer(B)&&!(B instanceof global.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof P=="function")x=P,P=0,q=B.length;else if(typeof q=="function")x=q,q=B.length-P;else if(typeof x!="function")throw new TypeError('"cb" argument must be a function');return N(P,B.length),U(q,P,B.length),Z(B,P,q,x)}function Z(B,P,q,x){var w=B.buffer,M=new Uint8Array(w,P,q);if(Q.getRandomValues(M),x){process.nextTick(function(){x(null,B)});return}return B;var y}function T(B,P,q){if(typeof P>"u"&&(P=0),!H.isBuffer(B)&&!(B instanceof global.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return N(P,B.length),q===void 0&&(q=B.length-P),U(q,P,B.length),Z(B,P,q)}}),F6=$0((E)=>{E.randomBytes=E.rng=E.pseudoRandomBytes=E.prng=_2(),E.createHash=E.Hash=u2(),E.createHmac=E.Hmac=M5();var I=V8(),F=Object.keys(I),L=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(F);E.getHashes=function(){return L};var H=p5();E.pbkdf2=H.pbkdf2,E.pbkdf2Sync=H.pbkdf2Sync;var k=q8();E.Cipher=k.Cipher,E.createCipher=k.createCipher,E.Cipheriv=k.Cipheriv,E.createCipheriv=k.createCipheriv,E.Decipher=k.Decipher,E.createDecipher=k.createDecipher,E.Decipheriv=k.Decipheriv,E.createDecipheriv=k.createDecipheriv,E.getCiphers=k.getCiphers,E.listCiphers=k.listCiphers;var Q=S8();E.DiffieHellmanGroup=Q.DiffieHellmanGroup,E.createDiffieHellmanGroup=Q.createDiffieHellmanGroup,E.getDiffieHellman=Q.getDiffieHellman,E.createDiffieHellman=Q.createDiffieHellman,E.DiffieHellman=Q.DiffieHellman;var O=H3();E.createSign=O.createSign,E.Sign=O.Sign,E.createVerify=O.createVerify,E.Verify=O.Verify,E.createECDH=U3();var N=P3();E.publicEncrypt=N.publicEncrypt,E.privateEncrypt=N.privateEncrypt,E.publicDecrypt=N.publicDecrypt,E.privateDecrypt=N.privateDecrypt;var U=T3();E.randomFill=U.randomFill,E.randomFillSync=U.randomFillSync,E.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join(` -`))},E.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}}),W6={};J1(W6,{DEFAULT_ENCODING:()=>y2,default:()=>P6,getCurves:()=>r1,getRandomValues:()=>a1,randomUUID:()=>n1,scrypt:()=>H1,scryptSync:()=>Z1,timingSafeEqual:()=>o2,webcrypto:()=>i1});N1(W6,R2(F6()));D3=R2(F6()),y2="buffer",a1=(E)=>crypto.getRandomValues(E),n1=()=>crypto.randomUUID(),L3=["p192","p224","p256","p384","p521","curve25519","ed25519","secp256k1","secp224r1","prime256v1","prime192v1","ed25519","secp384r1","secp521r1"],o2="timingSafeEqual"in crypto?(E,I)=>{let{byteLength:F}=E,{byteLength:L}=I;if(typeof F!="number"||typeof L!="number")throw new TypeError("Input must be an array buffer view");if(F!==L)throw new RangeError("Input buffers must have the same length");return crypto.timingSafeEqual(E,I)}:void 0,Z1="scryptSync"in crypto?(E,I,F,L)=>{let H=crypto.scryptSync(E,I,F,L);return y2!=="buffer"?new Buffer(H).toString(y2):new Buffer(H)}:void 0,H1="scryptSync"in crypto?function(E,I,F,L,H){if(typeof L=="function"&&(H=L,L=void 0),typeof H!="function"){var k=new TypeError("callback must be a function");throw k.code="ERR_INVALID_CALLBACK",k}try{let Q=crypto.scryptSync(E,I,F,L);process.nextTick(H,null,y2!=="buffer"?new Buffer(Q).toString(y2):new Buffer(Q))}catch(Q){throw Q}}:void 0;o2&&(Object.defineProperty(o2,"name",{value:"::bunternal::"}),Object.defineProperty(H1,"name",{value:"::bunternal::"}),Object.defineProperty(Z1,"name",{value:"::bunternal::"}));i1=crypto,P6={...D3,getRandomValues:a1,randomUUID:n1,timingSafeEqual:o2,scryptSync:Z1,scrypt:H1,webcrypto:i1,getCurves:r1};/*! +var $8=Object.create;var{getPrototypeOf:G8,defineProperty:o2,getOwnPropertyNames:S5,getOwnPropertyDescriptor:Y8}=Object,v5=Object.prototype.hasOwnProperty;var C8=(B,k,V)=>{V=B!=null?$8(G8(B)):{};const N=k||!B||!B.__esModule?o2(V,"default",{value:B,enumerable:!0}):V;for(let Q of S5(B))if(!v5.call(N,Q))o2(N,Q,{get:()=>B[Q],enumerable:!0});return N},x5=new WeakMap,K8=(B)=>{var k=x5.get(B),V;if(k)return k;if(k=o2({},"__esModule",{value:!0}),B&&typeof B==="object"||typeof B==="function")S5(B).map((N)=>!v5.call(k,N)&&o2(k,N,{get:()=>B[N],enumerable:!(V=Y8(B,N))||V.enumerable}));return x5.set(B,k),k};var j8=(B,k)=>()=>(k||B((k={exports:{}}).exports,k),k.exports);var C1=(B,k)=>{for(var V in k)o2(B,V,{get:k[V],enumerable:!0,configurable:!0,set:(N)=>k[V]=()=>N})};var W8=(B,k)=>()=>(B&&(k=B(B=0)),k);var p6={};C1(p6,{webcrypto:()=>Y5,timingSafeEqual:()=>n2,scryptSync:()=>T1,scrypt:()=>D1,randomUUID:()=>$5,getRandomValues:()=>O5,getCurves:()=>G5,default:()=>m6,DEFAULT_ENCODING:()=>_2});function G5(){return u3}var Z8,W1,Q8,z8,H8,V8,x1=(B,k)=>()=>(B&&(k=B(B=0)),k),K0=(B,k)=>()=>(k||B((k={exports:{}}).exports,k),k.exports),Z1=(B,k)=>{for(var V in k)W1(B,V,{get:k[V],enumerable:!0})},K1=(B,k,V,N)=>{if(k&&typeof k=="object"||typeof k=="function")for(let Q of z8(k))!V8.call(B,Q)&&Q!==V&&W1(B,Q,{get:()=>k[Q],enumerable:!(N=Q8(k,Q))||N.enumerable});return B},S1=(B,k,V)=>(K1(B,k,"default"),V&&K1(V,k,"default")),E2=(B,k,V)=>(V=B!=null?Z8(H8(B)):{},K1(k||!B||!B.__esModule?W1(V,"default",{value:B,enumerable:!0}):V,B)),T2=(B)=>K1(W1({},"__esModule",{value:!0}),B),P8,U8,P2,h0,g2,c0,x2,y5,Q1,F8,_5,m2,g5,m5,p5,w2,v1,s2,E1,j1,A1,T8,D8,c5,b5,N8,L8,k8,d5,M1,w1,p2,B8,R8,h5,q8,l5,I8,y1,H2,k2,_1,U2,z1,A5,R2,o5,S2,v2,A2,E8,c2,g1,m1,x8,p1,u5,H1,s5,S8,B2,f5,n5,c1,v8,a5,A8,M5,b1,r5,M8,I2,a2,w8,i5,t5,e5,y8,X6,J6,O6,$6,_8,G6,Y6,D2,d1,C6,g8,m8,p8,c8,b8,r2,d8,h8,l8,o8,u8,K6,w5,j6,h1,V1,s8,W6,Z6,P1,f8,n8,l1,a8,r8,M2,Q6,i8,t8,o1,z6,H6,e8,X3,J3,V6,O3,P6,b2,U6,F6,y2,u1,$3,G3,T6,D6,Y3,C3,K3,s1,f1,j3,q2,N6,N2,U1,W3,Z3,Q3,L6,L2,i2,k6,z3,B6,H3,R6,V3,P3,U3,F3,n1,T3,a1,D3,N3,L3,k3,B3,R3,q3,r1,q6,i1,t1,f2,e1,X5,I6,I3,E6,x6,E3,S6,x3,S3,v3,v6,A3,M3,w3,y3,F1,A6,_3,g3,m3,p3,c3,M6,w6,J5,y6,b3,d3,h3,l3,_6,g6,o3,_2="buffer",O5=(B)=>crypto.getRandomValues(B),$5=()=>crypto.randomUUID(),u3,n2,T1,D1,Y5,m6;var c6=W8(()=>{Z8=Object.create,W1=Object.defineProperty,Q8=Object.getOwnPropertyDescriptor,z8=Object.getOwnPropertyNames,H8=Object.getPrototypeOf,V8=Object.prototype.hasOwnProperty,P8=K0((B)=>{B.byteLength=L,B.toByteArray=U,B.fromByteArray=q;var k=[],V=[],N=typeof Uint8Array<"u"?Uint8Array:Array,Q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(R=0,C=Q.length;R0)throw new Error("Invalid string. Length must be a multiple of 4");var x=F.indexOf("=");x===-1&&(x=I);var w=x===I?0:4-x%4;return[x,w]}function L(F){var I=H(F),x=I[0],w=I[1];return(x+w)*3/4-w}function P(F,I,x){return(I+x)*3/4-x}function U(F){var I,x=H(F),w=x[0],M=x[1],y=new N(P(F,w,M)),m=0,c=M>0?w-4:w,h;for(h=0;h>16&255,y[m++]=I>>8&255,y[m++]=I&255;return M===2&&(I=V[F.charCodeAt(h)]<<2|V[F.charCodeAt(h+1)]>>4,y[m++]=I&255),M===1&&(I=V[F.charCodeAt(h)]<<10|V[F.charCodeAt(h+1)]<<4|V[F.charCodeAt(h+2)]>>2,y[m++]=I>>8&255,y[m++]=I&255),y}function z(F){return k[F>>18&63]+k[F>>12&63]+k[F>>6&63]+k[F&63]}function T(F,I,x){for(var w,M=[],y=I;yc?c:m+y));return w===1?(I=F[x-1],M.push(k[I>>2]+k[I<<4&63]+"==")):w===2&&(I=(F[x-2]<<8)+F[x-1],M.push(k[I>>10]+k[I>>4&63]+k[I<<2&63]+"=")),M.join("")}}),U8=K0((B)=>{B.read=function(k,V,N,Q,R){var C,H,L=R*8-Q-1,P=(1<>1,z=-7,T=N?R-1:0,q=N?-1:1,F=k[V+T];for(T+=q,C=F&(1<<-z)-1,F>>=-z,z+=L;z>0;C=C*256+k[V+T],T+=q,z-=8);for(H=C&(1<<-z)-1,C>>=-z,z+=Q;z>0;H=H*256+k[V+T],T+=q,z-=8);if(C===0)C=1-U;else{if(C===P)return H?NaN:(F?-1:1)*(1/0);H=H+Math.pow(2,Q),C=C-U}return(F?-1:1)*H*Math.pow(2,C-Q)},B.write=function(k,V,N,Q,R,C){var H,L,P,U=C*8-R-1,z=(1<>1,q=R===23?Math.pow(2,-24)-Math.pow(2,-77):0,F=Q?0:C-1,I=Q?1:-1,x=V<0||V===0&&1/V<0?1:0;for(V=Math.abs(V),isNaN(V)||V===1/0?(L=isNaN(V)?1:0,H=z):(H=Math.floor(Math.log(V)/Math.LN2),V*(P=Math.pow(2,-H))<1&&(H--,P*=2),H+T>=1?V+=q/P:V+=q*Math.pow(2,1-T),V*P>=2&&(H++,P/=2),H+T>=z?(L=0,H=z):H+T>=1?(L=(V*P-1)*Math.pow(2,R),H=H+T):(L=V*Math.pow(2,T-1)*Math.pow(2,R),H=0));R>=8;k[N+F]=L&255,F+=I,L/=256,R-=8);for(H=H<0;k[N+F]=H&255,F+=I,H/=256,U-=8);k[N+F-I]|=x*128}}),P2=K0((B)=>{var k=P8(),V=U8(),N=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;B.Buffer=H,B.SlowBuffer=M,B.INSPECT_MAX_BYTES=50;var Q=2147483647;B.kMaxLength=Q,H.TYPED_ARRAY_SUPPORT=R(),!H.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 R(){try{let D=new Uint8Array(1),v={foo:function(){return 42}};return Object.setPrototypeOf(v,Uint8Array.prototype),Object.setPrototypeOf(D,v),D.foo()===42}catch{return!1}}Object.defineProperty(H.prototype,"parent",{enumerable:!0,get:function(){if(H.isBuffer(this))return this.buffer}}),Object.defineProperty(H.prototype,"offset",{enumerable:!0,get:function(){if(H.isBuffer(this))return this.byteOffset}});function C(D){if(D>Q)throw new RangeError('The value "'+D+'" is invalid for option "size"');let v=new Uint8Array(D);return Object.setPrototypeOf(v,H.prototype),v}function H(D,v,b){if(typeof D=="number"){if(typeof v=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return z(D)}return L(D,v,b)}H.poolSize=8192;function L(D,v,b){if(typeof D=="string")return T(D,v);if(ArrayBuffer.isView(D))return F(D);if(D==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof D);if(W0(D,ArrayBuffer)||D&&W0(D.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(W0(D,SharedArrayBuffer)||D&&W0(D.buffer,SharedArrayBuffer)))return I(D,v,b);if(typeof D=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let l=D.valueOf&&D.valueOf();if(l!=null&&l!==D)return H.from(l,v,b);let u=x(D);if(u)return u;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof D[Symbol.toPrimitive]=="function")return H.from(D[Symbol.toPrimitive]("string"),v,b);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof D)}H.from=function(D,v,b){return L(D,v,b)},Object.setPrototypeOf(H.prototype,Uint8Array.prototype),Object.setPrototypeOf(H,Uint8Array);function P(D){if(typeof D!="number")throw new TypeError('"size" argument must be of type number');if(D<0)throw new RangeError('The value "'+D+'" is invalid for option "size"')}function U(D,v,b){return P(D),D<=0?C(D):v!==void 0?typeof b=="string"?C(D).fill(v,b):C(D).fill(v):C(D)}H.alloc=function(D,v,b){return U(D,v,b)};function z(D){return P(D),C(D<0?0:w(D)|0)}H.allocUnsafe=function(D){return z(D)},H.allocUnsafeSlow=function(D){return z(D)};function T(D,v){if((typeof v!="string"||v==="")&&(v="utf8"),!H.isEncoding(v))throw new TypeError("Unknown encoding: "+v);let b=y(D,v)|0,l=C(b),u=l.write(D,v);return u!==b&&(l=l.slice(0,u)),l}function q(D){let v=D.length<0?0:w(D.length)|0,b=C(v);for(let l=0;l=Q)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Q.toString(16)+" bytes");return D|0}function M(D){return+D!=D&&(D=0),H.alloc(+D)}H.isBuffer=function(D){return D!=null&&D._isBuffer===!0&&D!==H.prototype},H.compare=function(D,v){if(W0(D,Uint8Array)&&(D=H.from(D,D.offset,D.byteLength)),W0(v,Uint8Array)&&(v=H.from(v,v.offset,v.byteLength)),!H.isBuffer(D)||!H.isBuffer(v))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(D===v)return 0;let b=D.length,l=v.length;for(let u=0,F0=Math.min(b,l);ul.length?(H.isBuffer(F0)||(F0=H.from(F0)),F0.copy(l,u)):Uint8Array.prototype.set.call(l,F0,u);else if(H.isBuffer(F0))F0.copy(l,u);else throw new TypeError('"list" argument must be an Array of Buffers');u+=F0.length}return l};function y(D,v){if(H.isBuffer(D))return D.length;if(ArrayBuffer.isView(D)||W0(D,ArrayBuffer))return D.byteLength;if(typeof D!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof D);let b=D.length,l=arguments.length>2&&arguments[2]===!0;if(!l&&b===0)return 0;let u=!1;for(;;)switch(v){case"ascii":case"latin1":case"binary":return b;case"utf8":case"utf-8":return e(D).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return b*2;case"hex":return b>>>1;case"base64":return y0(D).length;default:if(u)return l?-1:e(D).length;v=(""+v).toLowerCase(),u=!0}}H.byteLength=y;function m(D,v,b){let l=!1;if((v===void 0||v<0)&&(v=0),v>this.length||((b===void 0||b>this.length)&&(b=this.length),b<=0)||(b>>>=0,v>>>=0,b<=v))return"";for(D||(D="utf8");;)switch(D){case"hex":return K(this,v,b);case"utf8":case"utf-8":return G(this,v,b);case"ascii":return W(this,v,b);case"latin1":case"binary":return Z(this,v,b);case"base64":return O(this,v,b);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return J(this,v,b);default:if(l)throw new TypeError("Unknown encoding: "+D);D=(D+"").toLowerCase(),l=!0}}H.prototype._isBuffer=!0;function c(D,v,b){let l=D[v];D[v]=D[b],D[b]=l}H.prototype.swap16=function(){let D=this.length;if(D%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let v=0;vv&&(D+=" ... "),""},N&&(H.prototype[N]=H.prototype.inspect),H.prototype.compare=function(D,v,b,l,u){if(W0(D,Uint8Array)&&(D=H.from(D,D.offset,D.byteLength)),!H.isBuffer(D))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof D);if(v===void 0&&(v=0),b===void 0&&(b=D?D.length:0),l===void 0&&(l=0),u===void 0&&(u=this.length),v<0||b>D.length||l<0||u>this.length)throw new RangeError("out of range index");if(l>=u&&v>=b)return 0;if(l>=u)return-1;if(v>=b)return 1;if(v>>>=0,b>>>=0,l>>>=0,u>>>=0,this===D)return 0;let F0=u-l,$0=b-v,z0=Math.min(F0,$0),b0=this.slice(l,u),V0=D.slice(v,b);for(let H0=0;H02147483647?b=2147483647:b<-2147483648&&(b=-2147483648),b=+b,_0(b)&&(b=u?0:D.length-1),b<0&&(b=D.length+b),b>=D.length){if(u)return-1;b=D.length-1}else if(b<0)if(u)b=0;else return-1;if(typeof v=="string"&&(v=H.from(v,l)),H.isBuffer(v))return v.length===0?-1:a(D,v,b,l,u);if(typeof v=="number")return v=v&255,typeof Uint8Array.prototype.indexOf=="function"?u?Uint8Array.prototype.indexOf.call(D,v,b):Uint8Array.prototype.lastIndexOf.call(D,v,b):a(D,[v],b,l,u);throw new TypeError("val must be string, number or Buffer")}function a(D,v,b,l,u){let F0=1,$0=D.length,z0=v.length;if(l!==void 0&&(l=String(l).toLowerCase(),l==="ucs2"||l==="ucs-2"||l==="utf16le"||l==="utf-16le")){if(D.length<2||v.length<2)return-1;F0=2,$0/=2,z0/=2,b/=2}function b0(H0,g0){return F0===1?H0[g0]:H0.readUInt16BE(g0*F0)}let V0;if(u){let H0=-1;for(V0=b;V0<$0;V0++)if(b0(D,V0)===b0(v,H0===-1?0:V0-H0)){if(H0===-1&&(H0=V0),V0-H0+1===z0)return H0*F0}else H0!==-1&&(V0-=V0-H0),H0=-1}else for(b+z0>$0&&(b=$0-z0),V0=b;V0>=0;V0--){let H0=!0;for(let g0=0;g0u&&(l=u)):l=u;let F0=v.length;l>F0/2&&(l=F0/2);let $0;for($0=0;$0>>0,isFinite(b)?(b=b>>>0,l===void 0&&(l="utf8")):(l=b,b=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let u=this.length-v;if((b===void 0||b>u)&&(b=u),D.length>0&&(b<0||v<0)||v>this.length)throw new RangeError("Attempt to write outside buffer bounds");l||(l="utf8");let F0=!1;for(;;)switch(l){case"hex":return i(this,D,v,b);case"utf8":case"utf-8":return G0(this,D,v,b);case"ascii":case"latin1":case"binary":return n(this,D,v,b);case"base64":return Z0(this,D,v,b);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X(this,D,v,b);default:if(F0)throw new TypeError("Unknown encoding: "+l);l=(""+l).toLowerCase(),F0=!0}},H.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function O(D,v,b){return v===0&&b===D.length?k.fromByteArray(D):k.fromByteArray(D.slice(v,b))}function G(D,v,b){b=Math.min(D.length,b);let l=[],u=v;for(;u239?4:F0>223?3:F0>191?2:1;if(u+z0<=b){let b0,V0,H0,g0;switch(z0){case 1:F0<128&&($0=F0);break;case 2:b0=D[u+1],(b0&192)===128&&(g0=(F0&31)<<6|b0&63,g0>127&&($0=g0));break;case 3:b0=D[u+1],V0=D[u+2],(b0&192)===128&&(V0&192)===128&&(g0=(F0&15)<<12|(b0&63)<<6|V0&63,g0>2047&&(g0<55296||g0>57343)&&($0=g0));break;case 4:b0=D[u+1],V0=D[u+2],H0=D[u+3],(b0&192)===128&&(V0&192)===128&&(H0&192)===128&&(g0=(F0&15)<<18|(b0&63)<<12|(V0&63)<<6|H0&63,g0>65535&&g0<1114112&&($0=g0))}}$0===null?($0=65533,z0=1):$0>65535&&($0-=65536,l.push($0>>>10&1023|55296),$0=56320|$0&1023),l.push($0),u+=z0}return Y(l)}var $=4096;function Y(D){let v=D.length;if(v<=$)return String.fromCharCode.apply(String,D);let b="",l=0;for(;ll)&&(b=l);let u="";for(let F0=v;F0b&&(D=b),v<0?(v+=b,v<0&&(v=0)):v>b&&(v=b),vb)throw new RangeError("Trying to access beyond buffer length")}H.prototype.readUintLE=H.prototype.readUIntLE=function(D,v,b){D=D>>>0,v=v>>>0,b||j(D,v,this.length);let l=this[D],u=1,F0=0;for(;++F0>>0,v=v>>>0,b||j(D,v,this.length);let l=this[D+--v],u=1;for(;v>0&&(u*=256);)l+=this[D+--v]*u;return l},H.prototype.readUint8=H.prototype.readUInt8=function(D,v){return D=D>>>0,v||j(D,1,this.length),this[D]},H.prototype.readUint16LE=H.prototype.readUInt16LE=function(D,v){return D=D>>>0,v||j(D,2,this.length),this[D]|this[D+1]<<8},H.prototype.readUint16BE=H.prototype.readUInt16BE=function(D,v){return D=D>>>0,v||j(D,2,this.length),this[D]<<8|this[D+1]},H.prototype.readUint32LE=H.prototype.readUInt32LE=function(D,v){return D=D>>>0,v||j(D,4,this.length),(this[D]|this[D+1]<<8|this[D+2]<<16)+this[D+3]*16777216},H.prototype.readUint32BE=H.prototype.readUInt32BE=function(D,v){return D=D>>>0,v||j(D,4,this.length),this[D]*16777216+(this[D+1]<<16|this[D+2]<<8|this[D+3])},H.prototype.readBigUInt64LE=Q0(function(D){D=D>>>0,Y0(D,"offset");let v=this[D],b=this[D+7];(v===void 0||b===void 0)&&g(D,this.length-8);let l=v+this[++D]*256+this[++D]*65536+this[++D]*16777216,u=this[++D]+this[++D]*256+this[++D]*65536+b*16777216;return BigInt(l)+(BigInt(u)<>>0,Y0(D,"offset");let v=this[D],b=this[D+7];(v===void 0||b===void 0)&&g(D,this.length-8);let l=v*16777216+this[++D]*65536+this[++D]*256+this[++D],u=this[++D]*16777216+this[++D]*65536+this[++D]*256+b;return(BigInt(l)<>>0,v=v>>>0,b||j(D,v,this.length);let l=this[D],u=1,F0=0;for(;++F0=u&&(l-=Math.pow(2,8*v)),l},H.prototype.readIntBE=function(D,v,b){D=D>>>0,v=v>>>0,b||j(D,v,this.length);let l=v,u=1,F0=this[D+--l];for(;l>0&&(u*=256);)F0+=this[D+--l]*u;return u*=128,F0>=u&&(F0-=Math.pow(2,8*v)),F0},H.prototype.readInt8=function(D,v){return D=D>>>0,v||j(D,1,this.length),this[D]&128?(255-this[D]+1)*-1:this[D]},H.prototype.readInt16LE=function(D,v){D=D>>>0,v||j(D,2,this.length);let b=this[D]|this[D+1]<<8;return b&32768?b|4294901760:b},H.prototype.readInt16BE=function(D,v){D=D>>>0,v||j(D,2,this.length);let b=this[D+1]|this[D]<<8;return b&32768?b|4294901760:b},H.prototype.readInt32LE=function(D,v){return D=D>>>0,v||j(D,4,this.length),this[D]|this[D+1]<<8|this[D+2]<<16|this[D+3]<<24},H.prototype.readInt32BE=function(D,v){return D=D>>>0,v||j(D,4,this.length),this[D]<<24|this[D+1]<<16|this[D+2]<<8|this[D+3]},H.prototype.readBigInt64LE=Q0(function(D){D=D>>>0,Y0(D,"offset");let v=this[D],b=this[D+7];(v===void 0||b===void 0)&&g(D,this.length-8);let l=this[D+4]+this[D+5]*256+this[D+6]*65536+(b<<24);return(BigInt(l)<>>0,Y0(D,"offset");let v=this[D],b=this[D+7];(v===void 0||b===void 0)&&g(D,this.length-8);let l=(v<<24)+this[++D]*65536+this[++D]*256+this[++D];return(BigInt(l)<>>0,v||j(D,4,this.length),V.read(this,D,!0,23,4)},H.prototype.readFloatBE=function(D,v){return D=D>>>0,v||j(D,4,this.length),V.read(this,D,!1,23,4)},H.prototype.readDoubleLE=function(D,v){return D=D>>>0,v||j(D,8,this.length),V.read(this,D,!0,52,8)},H.prototype.readDoubleBE=function(D,v){return D=D>>>0,v||j(D,8,this.length),V.read(this,D,!1,52,8)};function A(D,v,b,l,u,F0){if(!H.isBuffer(D))throw new TypeError('"buffer" argument must be a Buffer instance');if(v>u||vD.length)throw new RangeError("Index out of range")}H.prototype.writeUintLE=H.prototype.writeUIntLE=function(D,v,b,l){if(D=+D,v=v>>>0,b=b>>>0,!l){let $0=Math.pow(2,8*b)-1;A(this,D,v,b,$0,0)}let u=1,F0=0;for(this[v]=D&255;++F0>>0,b=b>>>0,!l){let $0=Math.pow(2,8*b)-1;A(this,D,v,b,$0,0)}let u=b-1,F0=1;for(this[v+u]=D&255;--u>=0&&(F0*=256);)this[v+u]=D/F0&255;return v+b},H.prototype.writeUint8=H.prototype.writeUInt8=function(D,v,b){return D=+D,v=v>>>0,b||A(this,D,v,1,255,0),this[v]=D&255,v+1},H.prototype.writeUint16LE=H.prototype.writeUInt16LE=function(D,v,b){return D=+D,v=v>>>0,b||A(this,D,v,2,65535,0),this[v]=D&255,this[v+1]=D>>>8,v+2},H.prototype.writeUint16BE=H.prototype.writeUInt16BE=function(D,v,b){return D=+D,v=v>>>0,b||A(this,D,v,2,65535,0),this[v]=D>>>8,this[v+1]=D&255,v+2},H.prototype.writeUint32LE=H.prototype.writeUInt32LE=function(D,v,b){return D=+D,v=v>>>0,b||A(this,D,v,4,4294967295,0),this[v+3]=D>>>24,this[v+2]=D>>>16,this[v+1]=D>>>8,this[v]=D&255,v+4},H.prototype.writeUint32BE=H.prototype.writeUInt32BE=function(D,v,b){return D=+D,v=v>>>0,b||A(this,D,v,4,4294967295,0),this[v]=D>>>24,this[v+1]=D>>>16,this[v+2]=D>>>8,this[v+3]=D&255,v+4};function E(D,v,b,l,u){X0(v,l,u,D,b,7);let F0=Number(v&BigInt(4294967295));D[b++]=F0,F0=F0>>8,D[b++]=F0,F0=F0>>8,D[b++]=F0,F0=F0>>8,D[b++]=F0;let $0=Number(v>>BigInt(32)&BigInt(4294967295));return D[b++]=$0,$0=$0>>8,D[b++]=$0,$0=$0>>8,D[b++]=$0,$0=$0>>8,D[b++]=$0,b}function _(D,v,b,l,u){X0(v,l,u,D,b,7);let F0=Number(v&BigInt(4294967295));D[b+7]=F0,F0=F0>>8,D[b+6]=F0,F0=F0>>8,D[b+5]=F0,F0=F0>>8,D[b+4]=F0;let $0=Number(v>>BigInt(32)&BigInt(4294967295));return D[b+3]=$0,$0=$0>>8,D[b+2]=$0,$0=$0>>8,D[b+1]=$0,$0=$0>>8,D[b]=$0,b+8}H.prototype.writeBigUInt64LE=Q0(function(D,v=0){return E(this,D,v,BigInt(0),BigInt("0xffffffffffffffff"))}),H.prototype.writeBigUInt64BE=Q0(function(D,v=0){return _(this,D,v,BigInt(0),BigInt("0xffffffffffffffff"))}),H.prototype.writeIntLE=function(D,v,b,l){if(D=+D,v=v>>>0,!l){let z0=Math.pow(2,8*b-1);A(this,D,v,b,z0-1,-z0)}let u=0,F0=1,$0=0;for(this[v]=D&255;++u>0)-$0&255;return v+b},H.prototype.writeIntBE=function(D,v,b,l){if(D=+D,v=v>>>0,!l){let z0=Math.pow(2,8*b-1);A(this,D,v,b,z0-1,-z0)}let u=b-1,F0=1,$0=0;for(this[v+u]=D&255;--u>=0&&(F0*=256);)D<0&&$0===0&&this[v+u+1]!==0&&($0=1),this[v+u]=(D/F0>>0)-$0&255;return v+b},H.prototype.writeInt8=function(D,v,b){return D=+D,v=v>>>0,b||A(this,D,v,1,127,-128),D<0&&(D=255+D+1),this[v]=D&255,v+1},H.prototype.writeInt16LE=function(D,v,b){return D=+D,v=v>>>0,b||A(this,D,v,2,32767,-32768),this[v]=D&255,this[v+1]=D>>>8,v+2},H.prototype.writeInt16BE=function(D,v,b){return D=+D,v=v>>>0,b||A(this,D,v,2,32767,-32768),this[v]=D>>>8,this[v+1]=D&255,v+2},H.prototype.writeInt32LE=function(D,v,b){return D=+D,v=v>>>0,b||A(this,D,v,4,2147483647,-2147483648),this[v]=D&255,this[v+1]=D>>>8,this[v+2]=D>>>16,this[v+3]=D>>>24,v+4},H.prototype.writeInt32BE=function(D,v,b){return D=+D,v=v>>>0,b||A(this,D,v,4,2147483647,-2147483648),D<0&&(D=4294967295+D+1),this[v]=D>>>24,this[v+1]=D>>>16,this[v+2]=D>>>8,this[v+3]=D&255,v+4},H.prototype.writeBigInt64LE=Q0(function(D,v=0){return E(this,D,v,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),H.prototype.writeBigInt64BE=Q0(function(D,v=0){return _(this,D,v,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function s(D,v,b,l,u,F0){if(b+l>D.length)throw new RangeError("Index out of range");if(b<0)throw new RangeError("Index out of range")}function r(D,v,b,l,u){return v=+v,b=b>>>0,u||s(D,v,b,4,340282346638528860000000000000000000000,-340282346638528860000000000000000000000),V.write(D,v,b,l,23,4),b+4}H.prototype.writeFloatLE=function(D,v,b){return r(this,D,v,!0,b)},H.prototype.writeFloatBE=function(D,v,b){return r(this,D,v,!1,b)};function O0(D,v,b,l,u){return v=+v,b=b>>>0,u||s(D,v,b,8,179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,-179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),V.write(D,v,b,l,52,8),b+8}H.prototype.writeDoubleLE=function(D,v,b){return O0(this,D,v,!0,b)},H.prototype.writeDoubleBE=function(D,v,b){return O0(this,D,v,!1,b)},H.prototype.copy=function(D,v,b,l){if(!H.isBuffer(D))throw new TypeError("argument should be a Buffer");if(b||(b=0),!l&&l!==0&&(l=this.length),v>=D.length&&(v=D.length),v||(v=0),l>0&&l=this.length)throw new RangeError("Index out of range");if(l<0)throw new RangeError("sourceEnd out of bounds");l>this.length&&(l=this.length),D.length-v>>0,b=b===void 0?this.length:b>>>0,D||(D=0);let u;if(typeof D=="number")for(u=v;u4294967296?u=f(String(b)):typeof b=="bigint"&&(u=String(b),(b>BigInt(2)**BigInt(32)||b<-(BigInt(2)**BigInt(32)))&&(u=f(u)),u+="n"),l+=` It must be ${v}. Received ${u}`,l},RangeError);function f(D){let v="",b=D.length,l=D[0]==="-"?1:0;for(;b>=l+4;b-=3)v=`_${D.slice(b-3,b)}${v}`;return`${D.slice(0,b)}${v}`}function U0(D,v,b){Y0(v,"offset"),(D[v]===void 0||D[v+b]===void 0)&&g(v,D.length-(b+1))}function X0(D,v,b,l,u,F0){if(D>b||D3?v===0||v===BigInt(0)?z0=`>= 0${$0} and < 2${$0} ** ${(F0+1)*8}${$0}`:z0=`>= -(2${$0} ** ${(F0+1)*8-1}${$0}) and < 2 ** ${(F0+1)*8-1}${$0}`:z0=`>= ${v}${$0} and <= ${b}${$0}`,new o.ERR_OUT_OF_RANGE("value",z0,D)}U0(l,u,F0)}function Y0(D,v){if(typeof D!="number")throw new o.ERR_INVALID_ARG_TYPE(v,"number",D)}function g(D,v,b){throw Math.floor(D)!==D?(Y0(D,b),new o.ERR_OUT_OF_RANGE(b||"offset","an integer",D)):v<0?new o.ERR_BUFFER_OUT_OF_BOUNDS:new o.ERR_OUT_OF_RANGE(b||"offset",`>= ${b?1:0} and <= ${v}`,D)}var S=/[^+/0-9A-Za-z-_]/g;function p(D){if(D=D.split("=")[0],D=D.trim().replace(S,""),D.length<2)return"";for(;D.length%4!==0;)D=D+"=";return D}function e(D,v){v=v||1/0;let b,l=D.length,u=null,F0=[];for(let $0=0;$055295&&b<57344){if(!u){if(b>56319){(v-=3)>-1&&F0.push(239,191,189);continue}else if($0+1===l){(v-=3)>-1&&F0.push(239,191,189);continue}u=b;continue}if(b<56320){(v-=3)>-1&&F0.push(239,191,189),u=b;continue}b=(u-55296<<10|b-56320)+65536}else u&&(v-=3)>-1&&F0.push(239,191,189);if(u=null,b<128){if((v-=1)<0)break;F0.push(b)}else if(b<2048){if((v-=2)<0)break;F0.push(b>>6|192,b&63|128)}else if(b<65536){if((v-=3)<0)break;F0.push(b>>12|224,b>>6&63|128,b&63|128)}else if(b<1114112){if((v-=4)<0)break;F0.push(b>>18|240,b>>12&63|128,b>>6&63|128,b&63|128)}else throw new Error("Invalid code point")}return F0}function J0(D){let v=[];for(let b=0;b>8,u=b%256,F0.push(u),F0.push(l);return F0}function y0(D){return k.toByteArray(p(D))}function C0(D,v,b,l){let u;for(u=0;u=v.length||u>=D.length);++u)v[u+b]=D[u];return u}function W0(D,v){return D instanceof v||D!=null&&D.constructor!=null&&D.constructor.name!=null&&D.constructor.name===v.name}function _0(D){return D!==D}var P0=function(){let D="0123456789abcdef",v=new Array(256);for(let b=0;b<16;++b){let l=b*16;for(let u=0;u<16;++u)v[l+u]=D[b]+D[u]}return v}();function Q0(D){return typeof BigInt>"u"?d0:D}function d0(){throw new Error("BigInt not supported")}}),h0=K0((B,k)=>{var V=P2(),N=V.Buffer;function Q(C,H){for(var L in C)H[L]=C[L]}N.from&&N.alloc&&N.allocUnsafe&&N.allocUnsafeSlow?k.exports=V:(Q(V,B),B.Buffer=R);function R(C,H,L){return N(C,H,L)}R.prototype=Object.create(N.prototype),Q(N,R),R.from=function(C,H,L){if(typeof C=="number")throw new TypeError("Argument must not be a number");return N(C,H,L)},R.alloc=function(C,H,L){if(typeof C!="number")throw new TypeError("Argument must be a number");var P=N(C);return H!==void 0?typeof L=="string"?P.fill(H,L):P.fill(H):P.fill(0),P},R.allocUnsafe=function(C){if(typeof C!="number")throw new TypeError("Argument must be a number");return N(C)},R.allocUnsafeSlow=function(C){if(typeof C!="number")throw new TypeError("Argument must be a number");return V.SlowBuffer(C)}}),g2=K0((B,k)=>{var V=65536,N=4294967295;function Q(){throw new Error(`Secure random number generation is not supported by this browser. +Use Chrome, Firefox or Internet Explorer 11`)}var R=h0().Buffer,C=global.crypto||global.msCrypto;C&&C.getRandomValues?k.exports=H:k.exports=Q;function H(L,P){if(L>N)throw new RangeError("requested too many random bytes");var U=R.allocUnsafe(L);if(L>0)if(L>V)for(var z=0;z{typeof Object.create=="function"?k.exports=function(V,N){N&&(V.super_=N,V.prototype=Object.create(N.prototype,{constructor:{value:V,enumerable:!1,writable:!0,configurable:!0}}))}:k.exports=function(V,N){if(N){V.super_=N;var Q=function(){};Q.prototype=N.prototype,V.prototype=new Q,V.prototype.constructor=V}}}),x2=K0((B,k)=>{var V=typeof Reflect=="object"?Reflect:null,N=V&&typeof V.apply=="function"?V.apply:function(h,a,i){return Function.prototype.apply.call(h,a,i)},Q;V&&typeof V.ownKeys=="function"?Q=V.ownKeys:Object.getOwnPropertySymbols?Q=function(h){return Object.getOwnPropertyNames(h).concat(Object.getOwnPropertySymbols(h))}:Q=function(h){return Object.getOwnPropertyNames(h)};function R(h){console&&console.warn&&console.warn(h)}var C=Number.isNaN||function(h){return h!==h};function H(){H.init.call(this)}k.exports=H,k.exports.once=y,H.EventEmitter=H,H.prototype._events=void 0,H.prototype._eventsCount=0,H.prototype._maxListeners=void 0;var L=10;function P(h){if(typeof h!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof h)}Object.defineProperty(H,"defaultMaxListeners",{enumerable:!0,get:function(){return L},set:function(h){if(typeof h!="number"||h<0||C(h))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+h+".");L=h}}),H.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},H.prototype.setMaxListeners=function(h){if(typeof h!="number"||h<0||C(h))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+h+".");return this._maxListeners=h,this};function U(h){return h._maxListeners===void 0?H.defaultMaxListeners:h._maxListeners}H.prototype.getMaxListeners=function(){return U(this)},H.prototype.emit=function(h){for(var a=[],i=1;i0&&(Z0=a[0]),Z0 instanceof Error)throw Z0;var X=new Error("Unhandled error."+(Z0?" ("+Z0.message+")":""));throw X.context=Z0,X}var O=n[h];if(O===void 0)return!1;if(typeof O=="function")N(O,this,a);else for(var G=O.length,$=x(O,G),i=0;i0&&X.length>n&&!X.warned){X.warned=!0;var O=new Error("Possible EventEmitter memory leak detected. "+X.length+" "+String(a)+" listeners added. Use emitter.setMaxListeners() to increase limit");O.name="MaxListenersExceededWarning",O.emitter=h,O.type=a,O.count=X.length,R(O)}return h}H.prototype.addListener=function(h,a){return z(this,h,a,!1)},H.prototype.on=H.prototype.addListener,H.prototype.prependListener=function(h,a){return z(this,h,a,!0)};function T(){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 q(h,a,i){var G0={fired:!1,wrapFn:void 0,target:h,type:a,listener:i},n=T.bind(G0);return n.listener=i,G0.wrapFn=n,n}H.prototype.once=function(h,a){return P(a),this.on(h,q(this,h,a)),this},H.prototype.prependOnceListener=function(h,a){return P(a),this.prependListener(h,q(this,h,a)),this},H.prototype.removeListener=function(h,a){var i,G0,n,Z0,X;if(P(a),G0=this._events,G0===void 0)return this;if(i=G0[h],i===void 0)return this;if(i===a||i.listener===a)--this._eventsCount===0?this._events=Object.create(null):(delete G0[h],G0.removeListener&&this.emit("removeListener",h,i.listener||a));else if(typeof i!="function"){for(n=-1,Z0=i.length-1;Z0>=0;Z0--)if(i[Z0]===a||i[Z0].listener===a){X=i[Z0].listener,n=Z0;break}if(n<0)return this;n===0?i.shift():w(i,n),i.length===1&&(G0[h]=i[0]),G0.removeListener!==void 0&&this.emit("removeListener",h,X||a)}return this},H.prototype.off=H.prototype.removeListener,H.prototype.removeAllListeners=function(h){var a,i,G0;if(i=this._events,i===void 0)return this;if(i.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):i[h]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete i[h]),this;if(arguments.length===0){var n=Object.keys(i),Z0;for(G0=0;G0=0;G0--)this.removeListener(h,a[G0]);return this};function F(h,a,i){var G0=h._events;if(G0===void 0)return[];var n=G0[a];return n===void 0?[]:typeof n=="function"?i?[n.listener||n]:[n]:i?M(n):x(n,n.length)}H.prototype.listeners=function(h){return F(this,h,!0)},H.prototype.rawListeners=function(h){return F(this,h,!1)},H.listenerCount=function(h,a){return typeof h.listenerCount=="function"?h.listenerCount(a):I.call(h,a)},H.prototype.listenerCount=I;function I(h){var a=this._events;if(a!==void 0){var i=a[h];if(typeof i=="function")return 1;if(i!==void 0)return i.length}return 0}H.prototype.eventNames=function(){return this._eventsCount>0?Q(this._events):[]};function x(h,a){for(var i=new Array(a),G0=0;G0{k.exports=x2().EventEmitter}),Q1=K0(()=>{}),F8=K0((B,k)=>{function V(F,I){var x=Object.keys(F);if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(F);I&&(w=w.filter(function(M){return Object.getOwnPropertyDescriptor(F,M).enumerable})),x.push.apply(x,w)}return x}function N(F){for(var I=1;I0?this.tail.next=x:this.head=x,this.tail=x,++this.length}},{key:"unshift",value:function(I){var x={data:I,next:this.head};this.length===0&&(this.tail=x),this.head=x,++this.length}},{key:"shift",value:function(){if(this.length!==0){var I=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,I}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(I){if(this.length===0)return"";for(var x=this.head,w=""+x.data;x=x.next;)w+=I+x.data;return w}},{key:"concat",value:function(I){if(this.length===0)return P.alloc(0);for(var x=P.allocUnsafe(I>>>0),w=this.head,M=0;w;)q(w.data,x,M),M+=w.data.length,w=w.next;return x}},{key:"consume",value:function(I,x){var w;return Iy.length?y.length:I;if(m===y.length?M+=y:M+=y.slice(0,I),I-=m,I===0){m===y.length?(++w,x.next?this.head=x.next:this.head=this.tail=null):(this.head=x,x.data=y.slice(m));break}++w}return this.length-=w,M}},{key:"_getBuffer",value:function(I){var x=P.allocUnsafe(I),w=this.head,M=1;for(w.data.copy(x),I-=w.data.length;w=w.next;){var y=w.data,m=I>y.length?y.length:I;if(y.copy(x,x.length-I,0,m),I-=m,I===0){m===y.length?(++M,w.next?this.head=w.next:this.head=this.tail=null):(this.head=w,w.data=y.slice(m));break}++M}return this.length-=M,x}},{key:T,value:function(I,x){return z(this,N({},x,{depth:0,customInspect:!1}))}}]),F}()}),_5=K0((B,k)=>{function V(L,P){var U=this,z=this._readableState&&this._readableState.destroyed,T=this._writableState&&this._writableState.destroyed;return z||T?(P?P(L):L&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(C,this,L)):process.nextTick(C,this,L)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(L||null,function(q){!P&&q?U._writableState?U._writableState.errorEmitted?process.nextTick(Q,U):(U._writableState.errorEmitted=!0,process.nextTick(N,U,q)):process.nextTick(N,U,q):P?(process.nextTick(Q,U),P(q)):process.nextTick(Q,U)}),this)}function N(L,P){C(L,P),Q(L)}function Q(L){L._writableState&&!L._writableState.emitClose||L._readableState&&!L._readableState.emitClose||L.emit("close")}function R(){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 C(L,P){L.emit("error",P)}function H(L,P){var{_readableState:U,_writableState:z}=L;U&&U.autoDestroy||z&&z.autoDestroy?L.destroy(P):L.emit("error",P)}k.exports={destroy:V,undestroy:R,errorOrDestroy:H}}),m2=K0((B,k)=>{function V(P,U){P.prototype=Object.create(U.prototype),P.prototype.constructor=P,P.__proto__=U}var N={};function Q(P,U,z){z||(z=Error);function T(F,I,x){return typeof U=="string"?U:U(F,I,x)}var q=function(F){V(I,F);function I(x,w,M){return F.call(this,T(x,w,M))||this}return I}(z);q.prototype.name=z.name,q.prototype.code=P,N[P]=q}function R(P,U){if(Array.isArray(P)){var z=P.length;return P=P.map(function(T){return String(T)}),z>2?"one of ".concat(U," ").concat(P.slice(0,z-1).join(", "),", or ")+P[z-1]:z===2?"one of ".concat(U," ").concat(P[0]," or ").concat(P[1]):"of ".concat(U," ").concat(P[0])}else return"of ".concat(U," ").concat(String(P))}function C(P,U,z){return P.substr(!z||z<0?0:+z,U.length)===U}function H(P,U,z){return(z===void 0||z>P.length)&&(z=P.length),P.substring(z-U.length,z)===U}function L(P,U,z){return typeof z!="number"&&(z=0),z+U.length>P.length?!1:P.indexOf(U,z)!==-1}Q("ERR_INVALID_OPT_VALUE",function(P,U){return'The value "'+U+'" is invalid for option "'+P+'"'},TypeError),Q("ERR_INVALID_ARG_TYPE",function(P,U,z){var T;typeof U=="string"&&C(U,"not ")?(T="must not be",U=U.replace(/^not /,"")):T="must be";var q;if(H(P," argument"))q="The ".concat(P," ").concat(T," ").concat(R(U,"type"));else{var F=L(P,".")?"property":"argument";q='The "'.concat(P,'" ').concat(F," ").concat(T," ").concat(R(U,"type"))}return q+=". Received type ".concat(typeof z),q},TypeError),Q("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),Q("ERR_METHOD_NOT_IMPLEMENTED",function(P){return"The "+P+" method is not implemented"}),Q("ERR_STREAM_PREMATURE_CLOSE","Premature close"),Q("ERR_STREAM_DESTROYED",function(P){return"Cannot call "+P+" after a stream was destroyed"}),Q("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),Q("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),Q("ERR_STREAM_WRITE_AFTER_END","write after end"),Q("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),Q("ERR_UNKNOWN_ENCODING",function(P){return"Unknown encoding: "+P},TypeError),Q("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),k.exports.codes=N}),g5=K0((B,k)=>{var V=m2().codes.ERR_INVALID_OPT_VALUE;function N(R,C,H){return R.highWaterMark!=null?R.highWaterMark:C?R[H]:null}function Q(R,C,H,L){var P=N(C,L,H);if(P!=null){if(!(isFinite(P)&&Math.floor(P)===P)||P<0){var U=L?H:"highWaterMark";throw new V(U,P)}return Math.floor(P)}return R.objectMode?16:16384}k.exports={getHighWaterMark:Q}}),m5=K0((B,k)=>{k.exports=V;function V(Q,R){if(N("noDeprecation"))return Q;var C=!1;function H(){if(!C){if(N("throwDeprecation"))throw new Error(R);N("traceDeprecation")?console.trace(R):console.warn(R),C=!0}return Q.apply(this,arguments)}return H}function N(Q){try{if(!global.localStorage)return!1}catch{return!1}var R=global.localStorage[Q];return R==null?!1:String(R).toLowerCase()==="true"}}),p5=K0((B,k)=>{k.exports=n;function V(o){var d=this;this.next=null,this.entry=null,this.finish=function(){O0(d,o)}}var N;n.WritableState=i;var Q={deprecate:m5()},R=y5(),C=P2().Buffer,H=global.Uint8Array||function(){};function L(o){return C.from(o)}function P(o){return C.isBuffer(o)||o instanceof H}var U=_5(),z=g5(),T=z.getHighWaterMark,q=m2().codes,F=q.ERR_INVALID_ARG_TYPE,I=q.ERR_METHOD_NOT_IMPLEMENTED,x=q.ERR_MULTIPLE_CALLBACK,w=q.ERR_STREAM_CANNOT_PIPE,M=q.ERR_STREAM_DESTROYED,y=q.ERR_STREAM_NULL_VALUES,m=q.ERR_STREAM_WRITE_AFTER_END,c=q.ERR_UNKNOWN_ENCODING,h=U.errorOrDestroy;c0()(n,R);function a(){}function i(o,d,f){N=N||w2(),o=o||{},typeof f!="boolean"&&(f=d instanceof N),this.objectMode=!!o.objectMode,f&&(this.objectMode=this.objectMode||!!o.writableObjectMode),this.highWaterMark=T(this,o,"writableHighWaterMark",f),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var U0=o.decodeStrings===!1;this.decodeStrings=!U0,this.defaultEncoding=o.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(X0){Z(d,X0)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=o.emitClose!==!1,this.autoDestroy=!!o.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new V(this)}i.prototype.getBuffer=function(){for(var o=this.bufferedRequest,d=[];o;)d.push(o),o=o.next;return d},function(){try{Object.defineProperty(i.prototype,"buffer",{get:Q.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var G0;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(G0=Function.prototype[Symbol.hasInstance],Object.defineProperty(n,Symbol.hasInstance,{value:function(o){return G0.call(this,o)?!0:this!==n?!1:o&&o._writableState instanceof i}})):G0=function(o){return o instanceof this};function n(o){N=N||w2();var d=this instanceof N;if(!d&&!G0.call(n,this))return new n(o);this._writableState=new i(o,this,d),this.writable=!0,o&&(typeof o.write=="function"&&(this._write=o.write),typeof o.writev=="function"&&(this._writev=o.writev),typeof o.destroy=="function"&&(this._destroy=o.destroy),typeof o.final=="function"&&(this._final=o.final)),R.call(this)}n.prototype.pipe=function(){h(this,new w)};function Z0(o,d){var f=new m;h(o,f),process.nextTick(d,f)}function X(o,d,f,U0){var X0;return f===null?X0=new y:typeof f!="string"&&!d.objectMode&&(X0=new F("chunk",["string","Buffer"],f)),X0?(h(o,X0),process.nextTick(U0,X0),!1):!0}n.prototype.write=function(o,d,f){var U0=this._writableState,X0=!1,Y0=!U0.objectMode&&P(o);return Y0&&!C.isBuffer(o)&&(o=L(o)),typeof d=="function"&&(f=d,d=null),Y0?d="buffer":d||(d=U0.defaultEncoding),typeof f!="function"&&(f=a),U0.ending?Z0(this,f):(Y0||X(this,U0,o,f))&&(U0.pendingcb++,X0=G(this,U0,Y0,o,d,f)),X0},n.prototype.cork=function(){this._writableState.corked++},n.prototype.uncork=function(){var o=this._writableState;o.corked&&(o.corked--,!o.writing&&!o.corked&&!o.bufferProcessing&&o.bufferedRequest&&j(this,o))},n.prototype.setDefaultEncoding=function(o){if(typeof o=="string"&&(o=o.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((o+"").toLowerCase())>-1))throw new c(o);return this._writableState.defaultEncoding=o,this},Object.defineProperty(n.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function O(o,d,f){return!o.objectMode&&o.decodeStrings!==!1&&typeof d=="string"&&(d=C.from(d,f)),d}Object.defineProperty(n.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function G(o,d,f,U0,X0,Y0){if(!f){var g=O(d,U0,X0);U0!==g&&(f=!0,X0="buffer",U0=g)}var S=d.objectMode?1:U0.length;d.length+=S;var p=d.length{var V=Object.keys||function(z){var T=[];for(var q in z)T.push(q);return T};k.exports=L;var N=c5(),Q=p5();c0()(L,N);for(R=V(Q.prototype),H=0;H{var k=h0().Buffer,V=k.isEncoding||function(M){switch(M=""+M,M&&M.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 N(M){if(!M)return"utf8";for(var y;;)switch(M){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 M;default:if(y)return;M=(""+M).toLowerCase(),y=!0}}function Q(M){var y=N(M);if(typeof y!="string"&&(k.isEncoding===V||!V(M)))throw new Error("Unknown encoding: "+M);return y||M}B.StringDecoder=R;function R(M){this.encoding=Q(M);var y;switch(this.encoding){case"utf16le":this.text=T,this.end=q,y=4;break;case"utf8":this.fillLast=P,y=4;break;case"base64":this.text=F,this.end=I,y=3;break;default:this.write=x,this.end=w;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=k.allocUnsafe(y)}R.prototype.write=function(M){if(M.length===0)return"";var y,m;if(this.lastNeed){if(y=this.fillLast(M),y===void 0)return"";m=this.lastNeed,this.lastNeed=0}else m=0;return m>5===6?2:M>>4===14?3:M>>3===30?4:M>>6===2?-1:-2}function H(M,y,m){var c=y.length-1;if(c=0?(h>0&&(M.lastNeed=h-1),h):--c=0?(h>0&&(M.lastNeed=h-2),h):--c=0?(h>0&&(h===2?h=0:M.lastNeed=h-3),h):0))}function L(M,y,m){if((y[0]&192)!==128)return M.lastNeed=0,"\uFFFD";if(M.lastNeed>1&&y.length>1){if((y[1]&192)!==128)return M.lastNeed=1,"\uFFFD";if(M.lastNeed>2&&y.length>2&&(y[2]&192)!==128)return M.lastNeed=2,"\uFFFD"}}function P(M){var y=this.lastTotal-this.lastNeed,m=L(this,M,y);if(m!==void 0)return m;if(this.lastNeed<=M.length)return M.copy(this.lastChar,y,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);M.copy(this.lastChar,y,0,M.length),this.lastNeed-=M.length}function U(M,y){var m=H(this,M,y);if(!this.lastNeed)return M.toString("utf8",y);this.lastTotal=m;var c=M.length-(m-this.lastNeed);return M.copy(this.lastChar,0,c),M.toString("utf8",y,c)}function z(M){var y=M&&M.length?this.write(M):"";return this.lastNeed?y+"\uFFFD":y}function T(M,y){if((M.length-y)%2===0){var m=M.toString("utf16le",y);if(m){var c=m.charCodeAt(m.length-1);if(c>=55296&&c<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=M[M.length-2],this.lastChar[1]=M[M.length-1],m.slice(0,-1)}return m}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=M[M.length-1],M.toString("utf16le",y,M.length-1)}function q(M){var y=M&&M.length?this.write(M):"";if(this.lastNeed){var m=this.lastTotal-this.lastNeed;return y+this.lastChar.toString("utf16le",0,m)}return y}function F(M,y){var m=(M.length-y)%3;return m===0?M.toString("base64",y):(this.lastNeed=3-m,this.lastTotal=3,m===1?this.lastChar[0]=M[M.length-1]:(this.lastChar[0]=M[M.length-2],this.lastChar[1]=M[M.length-1]),M.toString("base64",y,M.length-m))}function I(M){var y=M&&M.length?this.write(M):"";return this.lastNeed?y+this.lastChar.toString("base64",0,3-this.lastNeed):y}function x(M){return M.toString(this.encoding)}function w(M){return M&&M.length?this.write(M):""}}),s2={};Z1(s2,{StringDecoder:()=>E1.StringDecoder,default:()=>E1.StringDecoder});j1=x1(()=>{E1=E2(v1())}),A1=K0((B,k)=>{var V=m2().codes.ERR_STREAM_PREMATURE_CLOSE;function N(H){var L=!1;return function(){if(!L){L=!0;for(var P=arguments.length,U=new Array(P),z=0;z{var V;function N(y,m,c){return m in y?Object.defineProperty(y,m,{value:c,enumerable:!0,configurable:!0,writable:!0}):y[m]=c,y}var Q=A1(),R=Symbol("lastResolve"),C=Symbol("lastReject"),H=Symbol("error"),L=Symbol("ended"),P=Symbol("lastPromise"),U=Symbol("handlePromise"),z=Symbol("stream");function T(y,m){return{value:y,done:m}}function q(y){var m=y[R];if(m!==null){var c=y[z].read();c!==null&&(y[P]=null,y[R]=null,y[C]=null,m(T(c,!1)))}}function F(y){process.nextTick(q,y)}function I(y,m){return function(c,h){y.then(function(){if(m[L]){c(T(void 0,!0));return}m[U](c,h)},h)}}var x=Object.getPrototypeOf(function(){}),w=Object.setPrototypeOf((V={get stream(){return this[z]},next:function(){var y=this,m=this[H];if(m!==null)return Promise.reject(m);if(this[L])return Promise.resolve(T(void 0,!0));if(this[z].destroyed)return new Promise(function(i,G0){process.nextTick(function(){y[H]?G0(y[H]):i(T(void 0,!0))})});var c=this[P],h;if(c)h=new Promise(I(c,this));else{var a=this[z].read();if(a!==null)return Promise.resolve(T(a,!1));h=new Promise(this[U])}return this[P]=h,h}},N(V,Symbol.asyncIterator,function(){return this}),N(V,"return",function(){var y=this;return new Promise(function(m,c){y[z].destroy(null,function(h){if(h){c(h);return}m(T(void 0,!0))})})}),V),x),M=function(y){var m,c=Object.create(w,(m={},N(m,z,{value:y,writable:!0}),N(m,R,{value:null,writable:!0}),N(m,C,{value:null,writable:!0}),N(m,H,{value:null,writable:!0}),N(m,L,{value:y._readableState.endEmitted,writable:!0}),N(m,U,{value:function(h,a){var i=c[z].read();i?(c[P]=null,c[R]=null,c[C]=null,h(T(i,!1))):(c[R]=h,c[C]=a)},writable:!0}),m));return c[P]=null,Q(y,function(h){if(h&&h.code!=="ERR_STREAM_PREMATURE_CLOSE"){var a=c[C];a!==null&&(c[P]=null,c[R]=null,c[C]=null,a(h)),c[H]=h;return}var i=c[R];i!==null&&(c[P]=null,c[R]=null,c[C]=null,i(T(void 0,!0))),c[L]=!0}),y.on("readable",F.bind(null,c)),c};k.exports=M}),D8=K0((B,k)=>{k.exports=function(){throw new Error("Readable.from is not available in the browser")}}),c5=K0((B,k)=>{k.exports=X;var V;X.ReadableState=Z0;var N=x2().EventEmitter,Q=function(g,S){return g.listeners(S).length},R=y5(),C=P2().Buffer,H=global.Uint8Array||function(){};function L(g){return C.from(g)}function P(g){return C.isBuffer(g)||g instanceof H}var U=Q1(),z;U&&U.debuglog?z=U.debuglog("stream"):z=function(){};var T=F8(),q=_5(),F=g5(),I=F.getHighWaterMark,x=m2().codes,w=x.ERR_INVALID_ARG_TYPE,M=x.ERR_STREAM_PUSH_AFTER_EOF,y=x.ERR_METHOD_NOT_IMPLEMENTED,m=x.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,c,h,a;c0()(X,R);var i=q.errorOrDestroy,G0=["error","close","destroy","pause","resume"];function n(g,S,p){if(typeof g.prependListener=="function")return g.prependListener(S,p);!g._events||!g._events[S]?g.on(S,p):Array.isArray(g._events[S])?g._events[S].unshift(p):g._events[S]=[p,g._events[S]]}function Z0(g,S,p){V=V||w2(),g=g||{},typeof p!="boolean"&&(p=S instanceof V),this.objectMode=!!g.objectMode,p&&(this.objectMode=this.objectMode||!!g.readableObjectMode),this.highWaterMark=I(this,g,"readableHighWaterMark",p),this.buffer=new T,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=g.emitClose!==!1,this.autoDestroy=!!g.autoDestroy,this.destroyed=!1,this.defaultEncoding=g.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,g.encoding&&(c||(c=(j1(),T2(s2)).StringDecoder),this.decoder=new c(g.encoding),this.encoding=g.encoding)}function X(g){if(V=V||w2(),!(this instanceof X))return new X(g);var S=this instanceof V;this._readableState=new Z0(g,this,S),this.readable=!0,g&&(typeof g.read=="function"&&(this._read=g.read),typeof g.destroy=="function"&&(this._destroy=g.destroy)),R.call(this)}Object.defineProperty(X.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(g){!this._readableState||(this._readableState.destroyed=g)}}),X.prototype.destroy=q.destroy,X.prototype._undestroy=q.undestroy,X.prototype._destroy=function(g,S){S(g)},X.prototype.push=function(g,S){var p=this._readableState,e;return p.objectMode?e=!0:typeof g=="string"&&(S=S||p.defaultEncoding,S!==p.encoding&&(g=C.from(g,S),S=""),e=!0),O(this,g,S,!1,e)},X.prototype.unshift=function(g){return O(this,g,null,!0,!1)};function O(g,S,p,e,J0){z("readableAddChunk",S);var t=g._readableState;if(S===null)t.reading=!1,K(g,t);else{var y0;if(J0||(y0=$(t,S)),y0)i(g,y0);else if(t.objectMode||S&&S.length>0)if(typeof S!="string"&&!t.objectMode&&Object.getPrototypeOf(S)!==C.prototype&&(S=L(S)),e)t.endEmitted?i(g,new m):G(g,t,S,!0);else if(t.ended)i(g,new M);else{if(t.destroyed)return!1;t.reading=!1,t.decoder&&!p?(S=t.decoder.write(S),t.objectMode||S.length!==0?G(g,t,S,!1):A(g,t)):G(g,t,S,!1)}else e||(t.reading=!1,A(g,t))}return!t.ended&&(t.length=Y?g=Y:(g--,g|=g>>>1,g|=g>>>2,g|=g>>>4,g|=g>>>8,g|=g>>>16,g++),g}function Z(g,S){return g<=0||S.length===0&&S.ended?0:S.objectMode?1:g!==g?S.flowing&&S.length?S.buffer.head.data.length:S.length:(g>S.highWaterMark&&(S.highWaterMark=W(g)),g<=S.length?g:S.ended?S.length:(S.needReadable=!0,0))}X.prototype.read=function(g){z("read",g),g=parseInt(g,10);var S=this._readableState,p=g;if(g!==0&&(S.emittedReadable=!1),g===0&&S.needReadable&&((S.highWaterMark!==0?S.length>=S.highWaterMark:S.length>0)||S.ended))return z("read: emitReadable",S.length,S.ended),S.length===0&&S.ended?U0(this):J(this),null;if(g=Z(g,S),g===0&&S.ended)return S.length===0&&U0(this),null;var e=S.needReadable;z("need readable",e),(S.length===0||S.length-g0?J0=f(g,S):J0=null,J0===null?(S.needReadable=S.length<=S.highWaterMark,g=0):(S.length-=g,S.awaitDrain=0),S.length===0&&(S.ended||(S.needReadable=!0),p!==g&&S.ended&&U0(this)),J0!==null&&this.emit("data",J0),J0};function K(g,S){if(z("onEofChunk"),!S.ended){if(S.decoder){var p=S.decoder.end();p&&p.length&&(S.buffer.push(p),S.length+=S.objectMode?1:p.length)}S.ended=!0,S.sync?J(g):(S.needReadable=!1,S.emittedReadable||(S.emittedReadable=!0,j(g)))}}function J(g){var S=g._readableState;z("emitReadable",S.needReadable,S.emittedReadable),S.needReadable=!1,S.emittedReadable||(z("emitReadable",S.flowing),S.emittedReadable=!0,process.nextTick(j,g))}function j(g){var S=g._readableState;z("emitReadable_",S.destroyed,S.length,S.ended),!S.destroyed&&(S.length||S.ended)&&(g.emit("readable"),S.emittedReadable=!1),S.needReadable=!S.flowing&&!S.ended&&S.length<=S.highWaterMark,d(g)}function A(g,S){S.readingMore||(S.readingMore=!0,process.nextTick(E,g,S))}function E(g,S){for(;!S.reading&&!S.ended&&(S.length1&&Y0(e.pipes,g)!==-1)&&!_0&&(z("false write response, pause",e.awaitDrain),e.awaitDrain++),p.pause())}function d0(l){z("onerror",l),b(),g.removeListener("error",d0),Q(g,"error")===0&&i(g,l)}n(g,"error",d0);function D(){g.removeListener("finish",v),b()}g.once("close",D);function v(){z("onfinish"),g.removeListener("close",D),b()}g.once("finish",v);function b(){z("unpipe"),p.unpipe(g)}return g.emit("pipe",p),e.flowing||(z("pipe resume"),p.resume()),g};function _(g){return function(){var S=g._readableState;z("pipeOnDrain",S.awaitDrain),S.awaitDrain&&S.awaitDrain--,S.awaitDrain===0&&Q(g,"data")&&(S.flowing=!0,d(g))}}X.prototype.unpipe=function(g){var S=this._readableState,p={hasUnpiped:!1};if(S.pipesCount===0)return this;if(S.pipesCount===1)return g&&g!==S.pipes?this:(g||(g=S.pipes),S.pipes=null,S.pipesCount=0,S.flowing=!1,g&&g.emit("unpipe",this,p),this);if(!g){var{pipes:e,pipesCount:J0}=S;S.pipes=null,S.pipesCount=0,S.flowing=!1;for(var t=0;t0,e.flowing!==!1&&this.resume()):g==="readable"&&!e.endEmitted&&!e.readableListening&&(e.readableListening=e.needReadable=!0,e.flowing=!1,e.emittedReadable=!1,z("on readable",e.length,e.reading),e.length?J(this):e.reading||process.nextTick(r,this)),p},X.prototype.addListener=X.prototype.on,X.prototype.removeListener=function(g,S){var p=R.prototype.removeListener.call(this,g,S);return g==="readable"&&process.nextTick(s,this),p},X.prototype.removeAllListeners=function(g){var S=R.prototype.removeAllListeners.apply(this,arguments);return(g==="readable"||g===void 0)&&process.nextTick(s,this),S};function s(g){var S=g._readableState;S.readableListening=g.listenerCount("readable")>0,S.resumeScheduled&&!S.paused?S.flowing=!0:g.listenerCount("data")>0&&g.resume()}function r(g){z("readable nexttick read 0"),g.read(0)}X.prototype.resume=function(){var g=this._readableState;return g.flowing||(z("resume"),g.flowing=!g.readableListening,O0(this,g)),g.paused=!1,this};function O0(g,S){S.resumeScheduled||(S.resumeScheduled=!0,process.nextTick(o,g,S))}function o(g,S){z("resume",S.reading),S.reading||g.read(0),S.resumeScheduled=!1,g.emit("resume"),d(g),S.flowing&&!S.reading&&g.read(0)}X.prototype.pause=function(){return z("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(z("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function d(g){var S=g._readableState;for(z("flow",S.flowing);S.flowing&&g.read()!==null;);}X.prototype.wrap=function(g){var S=this,p=this._readableState,e=!1;g.on("end",function(){if(z("wrapped end"),p.decoder&&!p.ended){var y0=p.decoder.end();y0&&y0.length&&S.push(y0)}S.push(null)}),g.on("data",function(y0){if(z("wrapped data"),p.decoder&&(y0=p.decoder.write(y0)),!(p.objectMode&&y0==null)&&!(!p.objectMode&&(!y0||!y0.length))){var C0=S.push(y0);C0||(e=!0,g.pause())}});for(var J0 in g)this[J0]===void 0&&typeof g[J0]=="function"&&(this[J0]=function(y0){return function(){return g[y0].apply(g,arguments)}}(J0));for(var t=0;t=S.length?(S.decoder?p=S.buffer.join(""):S.buffer.length===1?p=S.buffer.first():p=S.buffer.concat(S.length),S.buffer.clear()):p=S.buffer.consume(g,S.decoder),p}function U0(g){var S=g._readableState;z("endReadable",S.endEmitted),S.endEmitted||(S.ended=!0,process.nextTick(X0,S,g))}function X0(g,S){if(z("endReadableNT",g.endEmitted,g.length),!g.endEmitted&&g.length===0&&(g.endEmitted=!0,S.readable=!1,S.emit("end"),g.autoDestroy)){var p=S._writableState;(!p||p.autoDestroy&&p.finished)&&S.destroy()}}typeof Symbol=="function"&&(X.from=function(g,S){return a===void 0&&(a=D8()),a(X,g,S)});function Y0(g,S){for(var p=0,e=g.length;p{k.exports=P;var V=m2().codes,N=V.ERR_METHOD_NOT_IMPLEMENTED,Q=V.ERR_MULTIPLE_CALLBACK,R=V.ERR_TRANSFORM_ALREADY_TRANSFORMING,C=V.ERR_TRANSFORM_WITH_LENGTH_0,H=w2();c0()(P,H);function L(T,q){var F=this._transformState;F.transforming=!1;var I=F.writecb;if(I===null)return this.emit("error",new Q);F.writechunk=null,F.writecb=null,q!=null&&this.push(q),I(T);var x=this._readableState;x.reading=!1,(x.needReadable||x.length{k.exports=N;var V=b5();c0()(N,V);function N(Q){if(!(this instanceof N))return new N(Q);V.call(this,Q)}N.prototype._transform=function(Q,R,C){C(null,Q)}}),L8=K0((B,k)=>{var V;function N(F){var I=!1;return function(){I||(I=!0,F.apply(void 0,arguments))}}var Q=m2().codes,R=Q.ERR_MISSING_ARGS,C=Q.ERR_STREAM_DESTROYED;function H(F){if(F)throw F}function L(F){return F.setHeader&&typeof F.abort=="function"}function P(F,I,x,w){w=N(w);var M=!1;F.on("close",function(){M=!0}),V===void 0&&(V=A1()),V(F,{readable:I,writable:x},function(m){if(m)return w(m);M=!0,w()});var y=!1;return function(m){if(!M&&!y){if(y=!0,L(F))return F.abort();if(typeof F.destroy=="function")return F.destroy();w(m||new C("pipe"))}}}function U(F){F()}function z(F,I){return F.pipe(I)}function T(F){return!F.length||typeof F[F.length-1]!="function"?H:F.pop()}function q(){for(var F=arguments.length,I=new Array(F),x=0;x0;return P(m,h,a,function(i){M||(M=i),i&&y.forEach(U),!h&&(y.forEach(U),w(M))})});return I.reduce(z)}k.exports=q}),k8=K0((B,k)=>{B=k.exports=c5(),B.Stream=B,B.Readable=B,B.Writable=p5(),B.Duplex=w2(),B.Transform=b5(),B.PassThrough=N8(),B.finished=A1(),B.pipeline=L8()}),d5=K0((B,k)=>{var V=h0().Buffer,N=k8().Transform,Q=c0();function R(H,L){if(!V.isBuffer(H)&&typeof H!="string")throw new TypeError(L+" must be a string or a buffer")}function C(H){N.call(this),this._block=V.allocUnsafe(H),this._blockSize=H,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}Q(C,N),C.prototype._transform=function(H,L,P){var U=null;try{this.update(H,L)}catch(z){U=z}P(U)},C.prototype._flush=function(H){var L=null;try{this.push(this.digest())}catch(P){L=P}H(L)},C.prototype.update=function(H,L){if(R(H,"Data"),this._finalized)throw new Error("Digest already called");V.isBuffer(H)||(H=V.from(H,L));for(var P=this._block,U=0;this._blockOffset+H.length-U>=this._blockSize;){for(var z=this._blockOffset;z0;++T)this._length[T]+=q,q=this._length[T]/4294967296|0,q>0&&(this._length[T]-=4294967296*q);return this},C.prototype._update=function(){throw new Error("_update is not implemented")},C.prototype.digest=function(H){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var L=this._digest();H!==void 0&&(L=L.toString(H)),this._block.fill(0),this._blockOffset=0;for(var P=0;P<4;++P)this._length[P]=0;return L},C.prototype._digest=function(){throw new Error("_digest is not implemented")},k.exports=C}),M1=K0((B,k)=>{var V=c0(),N=d5(),Q=h0().Buffer,R=new Array(16);function C(){N.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}V(C,N),C.prototype._update=function(){for(var T=R,q=0;q<16;++q)T[q]=this._block.readInt32LE(q*4);var F=this._a,I=this._b,x=this._c,w=this._d;F=L(F,I,x,w,T[0],3614090360,7),w=L(w,F,I,x,T[1],3905402710,12),x=L(x,w,F,I,T[2],606105819,17),I=L(I,x,w,F,T[3],3250441966,22),F=L(F,I,x,w,T[4],4118548399,7),w=L(w,F,I,x,T[5],1200080426,12),x=L(x,w,F,I,T[6],2821735955,17),I=L(I,x,w,F,T[7],4249261313,22),F=L(F,I,x,w,T[8],1770035416,7),w=L(w,F,I,x,T[9],2336552879,12),x=L(x,w,F,I,T[10],4294925233,17),I=L(I,x,w,F,T[11],2304563134,22),F=L(F,I,x,w,T[12],1804603682,7),w=L(w,F,I,x,T[13],4254626195,12),x=L(x,w,F,I,T[14],2792965006,17),I=L(I,x,w,F,T[15],1236535329,22),F=P(F,I,x,w,T[1],4129170786,5),w=P(w,F,I,x,T[6],3225465664,9),x=P(x,w,F,I,T[11],643717713,14),I=P(I,x,w,F,T[0],3921069994,20),F=P(F,I,x,w,T[5],3593408605,5),w=P(w,F,I,x,T[10],38016083,9),x=P(x,w,F,I,T[15],3634488961,14),I=P(I,x,w,F,T[4],3889429448,20),F=P(F,I,x,w,T[9],568446438,5),w=P(w,F,I,x,T[14],3275163606,9),x=P(x,w,F,I,T[3],4107603335,14),I=P(I,x,w,F,T[8],1163531501,20),F=P(F,I,x,w,T[13],2850285829,5),w=P(w,F,I,x,T[2],4243563512,9),x=P(x,w,F,I,T[7],1735328473,14),I=P(I,x,w,F,T[12],2368359562,20),F=U(F,I,x,w,T[5],4294588738,4),w=U(w,F,I,x,T[8],2272392833,11),x=U(x,w,F,I,T[11],1839030562,16),I=U(I,x,w,F,T[14],4259657740,23),F=U(F,I,x,w,T[1],2763975236,4),w=U(w,F,I,x,T[4],1272893353,11),x=U(x,w,F,I,T[7],4139469664,16),I=U(I,x,w,F,T[10],3200236656,23),F=U(F,I,x,w,T[13],681279174,4),w=U(w,F,I,x,T[0],3936430074,11),x=U(x,w,F,I,T[3],3572445317,16),I=U(I,x,w,F,T[6],76029189,23),F=U(F,I,x,w,T[9],3654602809,4),w=U(w,F,I,x,T[12],3873151461,11),x=U(x,w,F,I,T[15],530742520,16),I=U(I,x,w,F,T[2],3299628645,23),F=z(F,I,x,w,T[0],4096336452,6),w=z(w,F,I,x,T[7],1126891415,10),x=z(x,w,F,I,T[14],2878612391,15),I=z(I,x,w,F,T[5],4237533241,21),F=z(F,I,x,w,T[12],1700485571,6),w=z(w,F,I,x,T[3],2399980690,10),x=z(x,w,F,I,T[10],4293915773,15),I=z(I,x,w,F,T[1],2240044497,21),F=z(F,I,x,w,T[8],1873313359,6),w=z(w,F,I,x,T[15],4264355552,10),x=z(x,w,F,I,T[6],2734768916,15),I=z(I,x,w,F,T[13],1309151649,21),F=z(F,I,x,w,T[4],4149444226,6),w=z(w,F,I,x,T[11],3174756917,10),x=z(x,w,F,I,T[2],718787259,15),I=z(I,x,w,F,T[9],3951481745,21),this._a=this._a+F|0,this._b=this._b+I|0,this._c=this._c+x|0,this._d=this._d+w|0},C.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=Q.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 H(T,q){return T<>>32-q}function L(T,q,F,I,x,w,M){return H(T+(q&F|~q&I)+x+w|0,M)+q|0}function P(T,q,F,I,x,w,M){return H(T+(q&I|F&~I)+x+w|0,M)+q|0}function U(T,q,F,I,x,w,M){return H(T+(q^F^I)+x+w|0,M)+q|0}function z(T,q,F,I,x,w,M){return H(T+(F^(q|~I))+x+w|0,M)+q|0}k.exports=C}),w1=K0((B,k)=>{var V=P2().Buffer,N=c0(),Q=d5(),R=new Array(16),C=[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],H=[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],L=[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],P=[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],U=[0,1518500249,1859775393,2400959708,2840853838],z=[1352829926,1548603684,1836072691,2053994217,0];function T(){Q.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}N(T,Q),T.prototype._update=function(){for(var y=R,m=0;m<16;++m)y[m]=this._block.readInt32LE(m*4);for(var c=this._a|0,h=this._b|0,a=this._c|0,i=this._d|0,G0=this._e|0,n=this._a|0,Z0=this._b|0,X=this._c|0,O=this._d|0,G=this._e|0,$=0;$<80;$+=1){var Y,W;$<16?(Y=F(c,h,a,i,G0,y[C[$]],U[0],L[$]),W=M(n,Z0,X,O,G,y[H[$]],z[0],P[$])):$<32?(Y=I(c,h,a,i,G0,y[C[$]],U[1],L[$]),W=w(n,Z0,X,O,G,y[H[$]],z[1],P[$])):$<48?(Y=x(c,h,a,i,G0,y[C[$]],U[2],L[$]),W=x(n,Z0,X,O,G,y[H[$]],z[2],P[$])):$<64?(Y=w(c,h,a,i,G0,y[C[$]],U[3],L[$]),W=I(n,Z0,X,O,G,y[H[$]],z[3],P[$])):(Y=M(c,h,a,i,G0,y[C[$]],U[4],L[$]),W=F(n,Z0,X,O,G,y[H[$]],z[4],P[$])),c=G0,G0=i,i=q(a,10),a=h,h=Y,n=G,G=O,O=q(X,10),X=Z0,Z0=W}var Z=this._b+a+O|0;this._b=this._c+i+G|0,this._c=this._d+G0+n|0,this._d=this._e+c+Z0|0,this._e=this._a+h+X|0,this._a=Z},T.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 y=V.alloc?V.alloc(20):new V(20);return y.writeInt32LE(this._a,0),y.writeInt32LE(this._b,4),y.writeInt32LE(this._c,8),y.writeInt32LE(this._d,12),y.writeInt32LE(this._e,16),y};function q(y,m){return y<>>32-m}function F(y,m,c,h,a,i,G0,n){return q(y+(m^c^h)+i+G0|0,n)+a|0}function I(y,m,c,h,a,i,G0,n){return q(y+(m&c|~m&h)+i+G0|0,n)+a|0}function x(y,m,c,h,a,i,G0,n){return q(y+((m|~c)^h)+i+G0|0,n)+a|0}function w(y,m,c,h,a,i,G0,n){return q(y+(m&h|c&~h)+i+G0|0,n)+a|0}function M(y,m,c,h,a,i,G0,n){return q(y+(m^(c|~h))+i+G0|0,n)+a|0}k.exports=T}),p2=K0((B,k)=>{var V=h0().Buffer;function N(Q,R){this._block=V.alloc(Q),this._finalSize=R,this._blockSize=Q,this._len=0}N.prototype.update=function(Q,R){typeof Q=="string"&&(R=R||"utf8",Q=V.from(Q,R));for(var C=this._block,H=this._blockSize,L=Q.length,P=this._len,U=0;U=this._finalSize&&(this._update(this._block),this._block.fill(0));var C=this._len*8;if(C<=4294967295)this._block.writeUInt32BE(C,this._blockSize-4);else{var H=(C&4294967295)>>>0,L=(C-H)/4294967296;this._block.writeUInt32BE(L,this._blockSize-8),this._block.writeUInt32BE(H,this._blockSize-4)}this._update(this._block);var P=this._hash();return Q?P.toString(Q):P},N.prototype._update=function(){throw new Error("_update must be implemented by subclass")},k.exports=N}),B8=K0((B,k)=>{var V=c0(),N=p2(),Q=h0().Buffer,R=[1518500249,1859775393,-1894007588,-899497514],C=new Array(80);function H(){this.init(),this._w=C,N.call(this,64,56)}V(H,N),H.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function L(z){return z<<5|z>>>27}function P(z){return z<<30|z>>>2}function U(z,T,q,F){return z===0?T&q|~T&F:z===2?T&q|T&F|q&F:T^q^F}H.prototype._update=function(z){for(var T=this._w,q=this._a|0,F=this._b|0,I=this._c|0,x=this._d|0,w=this._e|0,M=0;M<16;++M)T[M]=z.readInt32BE(M*4);for(;M<80;++M)T[M]=T[M-3]^T[M-8]^T[M-14]^T[M-16];for(var y=0;y<80;++y){var m=~~(y/20),c=L(q)+U(m,F,I,x)+w+T[y]+R[m]|0;w=x,x=I,I=P(F),F=q,q=c}this._a=q+this._a|0,this._b=F+this._b|0,this._c=I+this._c|0,this._d=x+this._d|0,this._e=w+this._e|0},H.prototype._hash=function(){var z=Q.allocUnsafe(20);return z.writeInt32BE(this._a|0,0),z.writeInt32BE(this._b|0,4),z.writeInt32BE(this._c|0,8),z.writeInt32BE(this._d|0,12),z.writeInt32BE(this._e|0,16),z},k.exports=H}),R8=K0((B,k)=>{var V=c0(),N=p2(),Q=h0().Buffer,R=[1518500249,1859775393,-1894007588,-899497514],C=new Array(80);function H(){this.init(),this._w=C,N.call(this,64,56)}V(H,N),H.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function L(T){return T<<1|T>>>31}function P(T){return T<<5|T>>>27}function U(T){return T<<30|T>>>2}function z(T,q,F,I){return T===0?q&F|~q&I:T===2?q&F|q&I|F&I:q^F^I}H.prototype._update=function(T){for(var q=this._w,F=this._a|0,I=this._b|0,x=this._c|0,w=this._d|0,M=this._e|0,y=0;y<16;++y)q[y]=T.readInt32BE(y*4);for(;y<80;++y)q[y]=L(q[y-3]^q[y-8]^q[y-14]^q[y-16]);for(var m=0;m<80;++m){var c=~~(m/20),h=P(F)+z(c,I,x,w)+M+q[m]+R[c]|0;M=w,w=x,x=U(I),I=F,F=h}this._a=F+this._a|0,this._b=I+this._b|0,this._c=x+this._c|0,this._d=w+this._d|0,this._e=M+this._e|0},H.prototype._hash=function(){var T=Q.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},k.exports=H}),h5=K0((B,k)=>{var V=c0(),N=p2(),Q=h0().Buffer,R=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],C=new Array(64);function H(){this.init(),this._w=C,N.call(this,64,56)}V(H,N),H.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 L(F,I,x){return x^F&(I^x)}function P(F,I,x){return F&I|x&(F|I)}function U(F){return(F>>>2|F<<30)^(F>>>13|F<<19)^(F>>>22|F<<10)}function z(F){return(F>>>6|F<<26)^(F>>>11|F<<21)^(F>>>25|F<<7)}function T(F){return(F>>>7|F<<25)^(F>>>18|F<<14)^F>>>3}function q(F){return(F>>>17|F<<15)^(F>>>19|F<<13)^F>>>10}H.prototype._update=function(F){for(var I=this._w,x=this._a|0,w=this._b|0,M=this._c|0,y=this._d|0,m=this._e|0,c=this._f|0,h=this._g|0,a=this._h|0,i=0;i<16;++i)I[i]=F.readInt32BE(i*4);for(;i<64;++i)I[i]=q(I[i-2])+I[i-7]+T(I[i-15])+I[i-16]|0;for(var G0=0;G0<64;++G0){var n=a+z(m)+L(m,c,h)+R[G0]+I[G0]|0,Z0=U(x)+P(x,w,M)|0;a=h,h=c,c=m,m=y+n|0,y=M,M=w,w=x,x=n+Z0|0}this._a=x+this._a|0,this._b=w+this._b|0,this._c=M+this._c|0,this._d=y+this._d|0,this._e=m+this._e|0,this._f=c+this._f|0,this._g=h+this._g|0,this._h=a+this._h|0},H.prototype._hash=function(){var F=Q.allocUnsafe(32);return F.writeInt32BE(this._a,0),F.writeInt32BE(this._b,4),F.writeInt32BE(this._c,8),F.writeInt32BE(this._d,12),F.writeInt32BE(this._e,16),F.writeInt32BE(this._f,20),F.writeInt32BE(this._g,24),F.writeInt32BE(this._h,28),F},k.exports=H}),q8=K0((B,k)=>{var V=c0(),N=h5(),Q=p2(),R=h0().Buffer,C=new Array(64);function H(){this.init(),this._w=C,Q.call(this,64,56)}V(H,N),H.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},H.prototype._hash=function(){var L=R.allocUnsafe(28);return L.writeInt32BE(this._a,0),L.writeInt32BE(this._b,4),L.writeInt32BE(this._c,8),L.writeInt32BE(this._d,12),L.writeInt32BE(this._e,16),L.writeInt32BE(this._f,20),L.writeInt32BE(this._g,24),L},k.exports=H}),l5=K0((B,k)=>{var V=c0(),N=p2(),Q=h0().Buffer,R=[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],C=new Array(160);function H(){this.init(),this._w=C,N.call(this,128,112)}V(H,N),H.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 L(w,M,y){return y^w&(M^y)}function P(w,M,y){return w&M|y&(w|M)}function U(w,M){return(w>>>28|M<<4)^(M>>>2|w<<30)^(M>>>7|w<<25)}function z(w,M){return(w>>>14|M<<18)^(w>>>18|M<<14)^(M>>>9|w<<23)}function T(w,M){return(w>>>1|M<<31)^(w>>>8|M<<24)^w>>>7}function q(w,M){return(w>>>1|M<<31)^(w>>>8|M<<24)^(w>>>7|M<<25)}function F(w,M){return(w>>>19|M<<13)^(M>>>29|w<<3)^w>>>6}function I(w,M){return(w>>>19|M<<13)^(M>>>29|w<<3)^(w>>>6|M<<26)}function x(w,M){return w>>>0>>0?1:0}H.prototype._update=function(w){for(var M=this._w,y=this._ah|0,m=this._bh|0,c=this._ch|0,h=this._dh|0,a=this._eh|0,i=this._fh|0,G0=this._gh|0,n=this._hh|0,Z0=this._al|0,X=this._bl|0,O=this._cl|0,G=this._dl|0,$=this._el|0,Y=this._fl|0,W=this._gl|0,Z=this._hl|0,K=0;K<32;K+=2)M[K]=w.readInt32BE(K*4),M[K+1]=w.readInt32BE(K*4+4);for(;K<160;K+=2){var J=M[K-30],j=M[K-30+1],A=T(J,j),E=q(j,J);J=M[K-4],j=M[K-4+1];var _=F(J,j),s=I(j,J),r=M[K-14],O0=M[K-14+1],o=M[K-32],d=M[K-32+1],f=E+O0|0,U0=A+r+x(f,E)|0;f=f+s|0,U0=U0+_+x(f,s)|0,f=f+d|0,U0=U0+o+x(f,d)|0,M[K]=U0,M[K+1]=f}for(var X0=0;X0<160;X0+=2){U0=M[X0],f=M[X0+1];var Y0=P(y,m,c),g=P(Z0,X,O),S=U(y,Z0),p=U(Z0,y),e=z(a,$),J0=z($,a),t=R[X0],y0=R[X0+1],C0=L(a,i,G0),W0=L($,Y,W),_0=Z+J0|0,P0=n+e+x(_0,Z)|0;_0=_0+W0|0,P0=P0+C0+x(_0,W0)|0,_0=_0+y0|0,P0=P0+t+x(_0,y0)|0,_0=_0+f|0,P0=P0+U0+x(_0,f)|0;var Q0=p+g|0,d0=S+Y0+x(Q0,p)|0;n=G0,Z=W,G0=i,W=Y,i=a,Y=$,$=G+_0|0,a=h+P0+x($,G)|0,h=c,G=O,c=m,O=X,m=y,X=Z0,Z0=_0+Q0|0,y=P0+d0+x(Z0,_0)|0}this._al=this._al+Z0|0,this._bl=this._bl+X|0,this._cl=this._cl+O|0,this._dl=this._dl+G|0,this._el=this._el+$|0,this._fl=this._fl+Y|0,this._gl=this._gl+W|0,this._hl=this._hl+Z|0,this._ah=this._ah+y+x(this._al,Z0)|0,this._bh=this._bh+m+x(this._bl,X)|0,this._ch=this._ch+c+x(this._cl,O)|0,this._dh=this._dh+h+x(this._dl,G)|0,this._eh=this._eh+a+x(this._el,$)|0,this._fh=this._fh+i+x(this._fl,Y)|0,this._gh=this._gh+G0+x(this._gl,W)|0,this._hh=this._hh+n+x(this._hl,Z)|0},H.prototype._hash=function(){var w=Q.allocUnsafe(64);function M(y,m,c){w.writeInt32BE(y,c),w.writeInt32BE(m,c+4)}return M(this._ah,this._al,0),M(this._bh,this._bl,8),M(this._ch,this._cl,16),M(this._dh,this._dl,24),M(this._eh,this._el,32),M(this._fh,this._fl,40),M(this._gh,this._gl,48),M(this._hh,this._hl,56),w},k.exports=H}),I8=K0((B,k)=>{var V=c0(),N=l5(),Q=p2(),R=h0().Buffer,C=new Array(160);function H(){this.init(),this._w=C,Q.call(this,128,112)}V(H,N),H.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},H.prototype._hash=function(){var L=R.allocUnsafe(48);function P(U,z,T){L.writeInt32BE(U,T),L.writeInt32BE(z,T+4)}return P(this._ah,this._al,0),P(this._bh,this._bl,8),P(this._ch,this._cl,16),P(this._dh,this._dl,24),P(this._eh,this._el,32),P(this._fh,this._fl,40),L},k.exports=H}),y1=K0((V,k)=>{var V=k.exports=function(N){N=N.toLowerCase();var Q=V[N];if(!Q)throw new Error(N+" is not supported (we accept pull requests)");return new Q};V.sha=B8(),V.sha1=R8(),V.sha224=q8(),V.sha256=h5(),V.sha384=I8(),V.sha512=l5()}),H2=K0((B,k)=>{k.exports={ArrayIsArray(V){return Array.isArray(V)},ArrayPrototypeIncludes(V,N){return V.includes(N)},ArrayPrototypeIndexOf(V,N){return V.indexOf(N)},ArrayPrototypeJoin(V,N){return V.join(N)},ArrayPrototypeMap(V,N){return V.map(N)},ArrayPrototypePop(V,N){return V.pop(N)},ArrayPrototypePush(V,N){return V.push(N)},ArrayPrototypeSlice(V,N,Q){return V.slice(N,Q)},Error,FunctionPrototypeCall(V,N,...Q){return V.call(N,...Q)},FunctionPrototypeSymbolHasInstance(V,N){return Function.prototype[Symbol.hasInstance].call(V,N)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(V,N){return Object.defineProperties(V,N)},ObjectDefineProperty(V,N,Q){return Object.defineProperty(V,N,Q)},ObjectGetOwnPropertyDescriptor(V,N){return Object.getOwnPropertyDescriptor(V,N)},ObjectKeys(V){return Object.keys(V)},ObjectSetPrototypeOf(V,N){return Object.setPrototypeOf(V,N)},Promise,PromisePrototypeCatch(V,N){return V.catch(N)},PromisePrototypeThen(V,N,Q){return V.then(N,Q)},PromiseReject(V){return Promise.reject(V)},ReflectApply:Reflect.apply,RegExpPrototypeTest(V,N){return V.test(N)},SafeSet:Set,String,StringPrototypeSlice(V,N,Q){return V.slice(N,Q)},StringPrototypeToLowerCase(V){return V.toLowerCase()},StringPrototypeToUpperCase(V){return V.toUpperCase()},StringPrototypeTrim(V){return V.trim()},Symbol,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,TypedArrayPrototypeSet(V,N,Q){return V.set(N,Q)},Uint8Array}}),k2=K0((B,k)=>{var V=P2(),N=Object.getPrototypeOf(async function(){}).constructor,Q=globalThis.Blob||V.Blob,R=typeof Q<"u"?function(H){return H instanceof Q}:function(H){return!1},C=class extends Error{constructor(H){if(!Array.isArray(H))throw new TypeError(`Expected input to be an Array, got ${typeof H}`);let L="";for(let P=0;P{H=P,L=U}),resolve:H,reject:L}},promisify(H){return new Promise((L,P)=>{H((U,...z)=>U?P(U):L(...z))})},debuglog(){return function(){}},format(H,...L){return H.replace(/%([sdifj])/g,function(...[P,U]){let z=L.shift();return U==="f"?z.toFixed(6):U==="j"?JSON.stringify(z):U==="s"&&typeof z=="object"?`${z.constructor!==Object?z.constructor.name:""} {}`.trim():z.toString()})},inspect(H){switch(typeof H){case"string":if(H.includes("'"))if(H.includes('"')){if(!H.includes("`")&&!H.includes("${"))return`\`${H}\``}else return`"${H}"`;return`'${H}'`;case"number":return isNaN(H)?"NaN":Object.is(H,-0)?String(H):H;case"bigint":return`${String(H)}n`;case"boolean":case"undefined":return String(H);case"object":return"{}"}},types:{isAsyncFunction(H){return H instanceof N},isArrayBufferView(H){return ArrayBuffer.isView(H)}},isBlob:R},k.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")}),_1=K0((B,k)=>{var{AbortController:V,AbortSignal:N}=typeof self<"u"?self:typeof window<"u"?window:void 0;k.exports=V,k.exports.AbortSignal=N,k.exports.default=V}),U2=K0((B,k)=>{var{format:V,inspect:N,AggregateError:Q}=k2(),R=globalThis.AggregateError||Q,C=Symbol("kIsNodeError"),H=["string","function","number","object","Function","Object","boolean","bigint","symbol"],L=/^([A-Z][a-z0-9]*)+$/,P="__node_internal_",U={};function z(M,y){if(!M)throw new U.ERR_INTERNAL_ASSERTION(y)}function T(M){let y="",m=M.length,c=M[0]==="-"?1:0;for(;m>=c+4;m-=3)y=`_${M.slice(m-3,m)}${y}`;return`${M.slice(0,m)}${y}`}function q(M,y,m){if(typeof y=="function")return z(y.length<=m.length,`Code: ${M}; The provided arguments length (${m.length}) does not match the required ones (${y.length}).`),y(...m);let c=(y.match(/%[dfijoOs]/g)||[]).length;return z(c===m.length,`Code: ${M}; The provided arguments length (${m.length}) does not match the required ones (${c}).`),m.length===0?y:V(y,...m)}function F(M,y,m){m||(m=Error);class c extends m{constructor(...h){super(q(M,y,h))}toString(){return`${this.name} [${M}]: ${this.message}`}}Object.defineProperties(c.prototype,{name:{value:m.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${M}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),c.prototype.code=M,c.prototype[C]=!0,U[M]=c}function I(M){let y=P+M.name;return Object.defineProperty(M,"name",{value:y}),M}function x(M,y){if(M&&y&&M!==y){if(Array.isArray(y.errors))return y.errors.push(M),y;let m=new R([y,M],y.message);return m.code=y.code,m}return M||y}var w=class extends Error{constructor(M="The operation was aborted",y=void 0){if(y!==void 0&&typeof y!="object")throw new U.ERR_INVALID_ARG_TYPE("options","Object",y);super(M,y),this.code="ABORT_ERR",this.name="AbortError"}};F("ERR_ASSERTION","%s",Error),F("ERR_INVALID_ARG_TYPE",(M,y,m)=>{z(typeof M=="string","'name' must be a string"),Array.isArray(y)||(y=[y]);let c="The ";M.endsWith(" argument")?c+=`${M} `:c+=`"${M}" ${M.includes(".")?"property":"argument"} `,c+="must be ";let h=[],a=[],i=[];for(let n of y)z(typeof n=="string","All expected entries have to be of type string"),H.includes(n)?h.push(n.toLowerCase()):L.test(n)?a.push(n):(z(n!=="object",'The value "object" should be written as "Object"'),i.push(n));if(a.length>0){let n=h.indexOf("object");n!==-1&&(h.splice(h,n,1),a.push("Object"))}if(h.length>0){switch(h.length){case 1:c+=`of type ${h[0]}`;break;case 2:c+=`one of type ${h[0]} or ${h[1]}`;break;default:{let n=h.pop();c+=`one of type ${h.join(", ")}, or ${n}`}}(a.length>0||i.length>0)&&(c+=" or ")}if(a.length>0){switch(a.length){case 1:c+=`an instance of ${a[0]}`;break;case 2:c+=`an instance of ${a[0]} or ${a[1]}`;break;default:{let n=a.pop();c+=`an instance of ${a.join(", ")}, or ${n}`}}i.length>0&&(c+=" or ")}switch(i.length){case 0:break;case 1:i[0].toLowerCase()!==i[0]&&(c+="an "),c+=`${i[0]}`;break;case 2:c+=`one of ${i[0]} or ${i[1]}`;break;default:{let n=i.pop();c+=`one of ${i.join(", ")}, or ${n}`}}if(m==null)c+=`. Received ${m}`;else if(typeof m=="function"&&m.name)c+=`. Received function ${m.name}`;else if(typeof m=="object"){var G0;(G0=m.constructor)!==null&&G0!==void 0&&G0.name?c+=`. Received an instance of ${m.constructor.name}`:c+=`. Received ${N(m,{depth:-1})}`}else{let n=N(m,{colors:!1});n.length>25&&(n=`${n.slice(0,25)}...`),c+=`. Received type ${typeof m} (${n})`}return c},TypeError),F("ERR_INVALID_ARG_VALUE",(M,y,m="is invalid")=>{let c=N(y);return c.length>128&&(c=c.slice(0,128)+"..."),`The ${M.includes(".")?"property":"argument"} '${M}' ${m}. Received ${c}`},TypeError),F("ERR_INVALID_RETURN_VALUE",(M,y,m)=>{var c;let h=m!=null&&(c=m.constructor)!==null&&c!==void 0&&c.name?`instance of ${m.constructor.name}`:`type ${typeof m}`;return`Expected ${M} to be returned from the "${y}" function but got ${h}.`},TypeError),F("ERR_MISSING_ARGS",(...M)=>{z(M.length>0,"At least one arg needs to be specified");let y,m=M.length;switch(M=(Array.isArray(M)?M:[M]).map((c)=>`"${c}"`).join(" or "),m){case 1:y+=`The ${M[0]} argument`;break;case 2:y+=`The ${M[0]} and ${M[1]} arguments`;break;default:{let c=M.pop();y+=`The ${M.join(", ")}, and ${c} arguments`}break}return`${y} must be specified`},TypeError),F("ERR_OUT_OF_RANGE",(M,y,m)=>{z(y,'Missing "range" argument');let c;return Number.isInteger(m)&&Math.abs(m)>4294967296?c=T(String(m)):typeof m=="bigint"?(c=String(m),(m>2n**32n||m<-(2n**32n))&&(c=T(c)),c+="n"):c=N(m),`The value of "${M}" is out of range. It must be ${y}. Received ${c}`},RangeError),F("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),F("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),F("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),F("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),F("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),F("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),F("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),F("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),F("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),F("ERR_STREAM_WRITE_AFTER_END","write after end",Error),F("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),k.exports={AbortError:w,aggregateTwoErrors:I(x),hideStackFrames:I,codes:U}}),z1=K0((B,k)=>{var{ArrayIsArray:V,ArrayPrototypeIncludes:N,ArrayPrototypeJoin:Q,ArrayPrototypeMap:R,NumberIsInteger:C,NumberIsNaN:H,NumberMAX_SAFE_INTEGER:L,NumberMIN_SAFE_INTEGER:P,NumberParseInt:U,ObjectPrototypeHasOwnProperty:z,RegExpPrototypeExec:T,String:q,StringPrototypeToUpperCase:F,StringPrototypeTrim:I}=H2(),{hideStackFrames:x,codes:{ERR_SOCKET_BAD_PORT:w,ERR_INVALID_ARG_TYPE:M,ERR_INVALID_ARG_VALUE:y,ERR_OUT_OF_RANGE:m,ERR_UNKNOWN_SIGNAL:c}}=U2(),{normalizeEncoding:h}=k2(),{isAsyncFunction:a,isArrayBufferView:i}=k2().types,G0={};function n(g){return g===(g|0)}function Z0(g){return g===g>>>0}var X=/^[0-7]+$/,O="must be a 32-bit unsigned integer or an octal string";function G(g,S,p){if(typeof g>"u"&&(g=p),typeof g=="string"){if(T(X,g)===null)throw new y(S,g,O);g=U(g,8)}return W(g,S),g}var $=x((g,S,p=P,e=L)=>{if(typeof g!="number")throw new M(S,"number",g);if(!C(g))throw new m(S,"an integer",g);if(ge)throw new m(S,`>= ${p} && <= ${e}`,g)}),Y=x((g,S,p=-2147483648,e=2147483647)=>{if(typeof g!="number")throw new M(S,"number",g);if(!C(g))throw new m(S,"an integer",g);if(ge)throw new m(S,`>= ${p} && <= ${e}`,g)}),W=x((g,S,p=!1)=>{if(typeof g!="number")throw new M(S,"number",g);if(!C(g))throw new m(S,"an integer",g);let e=p?1:0,J0=4294967295;if(gJ0)throw new m(S,`>= ${e} && <= ${J0}`,g)});function Z(g,S){if(typeof g!="string")throw new M(S,"string",g)}function K(g,S,p=void 0,e){if(typeof g!="number")throw new M(S,"number",g);if(p!=null&&ge||(p!=null||e!=null)&&H(g))throw new m(S,`${p!=null?`>= ${p}`:""}${p!=null&&e!=null?" && ":""}${e!=null?`<= ${e}`:""}`,g)}var J=x((g,S,p)=>{if(!N(p,g)){let e=Q(R(p,(t)=>typeof t=="string"?`'${t}'`:q(t)),", "),J0="must be one of: "+e;throw new y(S,g,J0)}});function j(g,S){if(typeof g!="boolean")throw new M(S,"boolean",g)}function A(g,S,p){return g==null||!z(g,S)?p:g[S]}var E=x((g,S,p=null)=>{let e=A(p,"allowArray",!1),J0=A(p,"allowFunction",!1);if(!A(p,"nullable",!1)&&g===null||!e&&V(g)||typeof g!="object"&&(!J0||typeof g!="function"))throw new M(S,"Object",g)}),_=x((g,S,p=0)=>{if(!V(g))throw new M(S,"Array",g);if(g.length{if(!i(g))throw new M(S,["Buffer","TypedArray","DataView"],g)});function O0(g,S){let p=h(S),e=g.length;if(p==="hex"&&e%2!==0)throw new y("encoding",S,`is invalid for data of length ${e}`)}function o(g,S="Port",p=!0){if(typeof g!="number"&&typeof g!="string"||typeof g=="string"&&I(g).length===0||+g!==+g>>>0||g>65535||g===0&&!p)throw new w(S,g,p);return g|0}var d=x((g,S)=>{if(g!==void 0&&(g===null||typeof g!="object"||!("aborted"in g)))throw new M(S,"AbortSignal",g)}),f=x((g,S)=>{if(typeof g!="function")throw new M(S,"Function",g)}),U0=x((g,S)=>{if(typeof g!="function"||a(g))throw new M(S,"Function",g)}),X0=x((g,S)=>{if(g!==void 0)throw new M(S,"undefined",g)});function Y0(g,S,p){if(!N(p,g))throw new M(S,`('${Q(p,"|")}')`,g)}k.exports={isInt32:n,isUint32:Z0,parseFileMode:G,validateArray:_,validateBoolean:j,validateBuffer:r,validateEncoding:O0,validateFunction:f,validateInt32:Y,validateInteger:$,validateNumber:K,validateObject:E,validateOneOf:J,validatePlainFunction:U0,validatePort:o,validateSignalName:s,validateString:Z,validateUint32:W,validateUndefined:X0,validateUnion:Y0,validateAbortSignal:d}}),A5=K0((B,k)=>{var V=k.exports={},N,Q;function R(){throw new Error("setTimeout has not been defined")}function C(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?N=setTimeout:N=R}catch{N=R}try{typeof clearTimeout=="function"?Q=clearTimeout:Q=C}catch{Q=C}})();function H(w){if(N===setTimeout)return setTimeout(w,0);if((N===R||!N)&&setTimeout)return N=setTimeout,setTimeout(w,0);try{return N(w,0)}catch{try{return N.call(null,w,0)}catch{return N.call(this,w,0)}}}function L(w){if(Q===clearTimeout)return clearTimeout(w);if((Q===C||!Q)&&clearTimeout)return Q=clearTimeout,clearTimeout(w);try{return Q(w)}catch{try{return Q.call(null,w)}catch{return Q.call(this,w)}}}var P=[],U=!1,z,T=-1;function q(){!U||!z||(U=!1,z.length?P=z.concat(P):T=-1,P.length&&F())}function F(){if(!U){var w=H(q);U=!0;for(var M=P.length;M;){for(z=P,P=[];++T1)for(var y=1;yo5});S2=x1(()=>{S1(R2,E2(A5())),o5=E2(A5())}),v2=K0((B,k)=>{var{Symbol:V,SymbolAsyncIterator:N,SymbolIterator:Q}=H2(),R=V("kDestroyed"),C=V("kIsErrored"),H=V("kIsReadable"),L=V("kIsDisturbed");function P($,Y=!1){var W;return!!($&&typeof $.pipe=="function"&&typeof $.on=="function"&&(!Y||typeof $.pause=="function"&&typeof $.resume=="function")&&(!$._writableState||((W=$._readableState)===null||W===void 0?void 0:W.readable)!==!1)&&(!$._writableState||$._readableState))}function U($){var Y;return!!($&&typeof $.write=="function"&&typeof $.on=="function"&&(!$._readableState||((Y=$._writableState)===null||Y===void 0?void 0:Y.writable)!==!1))}function z($){return!!($&&typeof $.pipe=="function"&&$._readableState&&typeof $.on=="function"&&typeof $.write=="function")}function T($){return $&&($._readableState||$._writableState||typeof $.write=="function"&&typeof $.on=="function"||typeof $.pipe=="function"&&typeof $.on=="function")}function q($,Y){return $==null?!1:Y===!0?typeof $[N]=="function":Y===!1?typeof $[Q]=="function":typeof $[N]=="function"||typeof $[Q]=="function"}function F($){if(!T($))return null;let{_writableState:Y,_readableState:W}=$,Z=Y||W;return!!($.destroyed||$[R]||Z!=null&&Z.destroyed)}function I($){if(!U($))return null;if($.writableEnded===!0)return!0;let Y=$._writableState;return Y!=null&&Y.errored?!1:typeof Y?.ended!="boolean"?null:Y.ended}function x($,Y){if(!U($))return null;if($.writableFinished===!0)return!0;let W=$._writableState;return W!=null&&W.errored?!1:typeof W?.finished!="boolean"?null:!!(W.finished||Y===!1&&W.ended===!0&&W.length===0)}function w($){if(!P($))return null;if($.readableEnded===!0)return!0;let Y=$._readableState;return!Y||Y.errored?!1:typeof Y?.ended!="boolean"?null:Y.ended}function M($,Y){if(!P($))return null;let W=$._readableState;return W!=null&&W.errored?!1:typeof W?.endEmitted!="boolean"?null:!!(W.endEmitted||Y===!1&&W.ended===!0&&W.length===0)}function y($){return $&&$[H]!=null?$[H]:typeof $?.readable!="boolean"?null:F($)?!1:P($)&&$.readable&&!M($)}function m($){return typeof $?.writable!="boolean"?null:F($)?!1:U($)&&$.writable&&!I($)}function c($,Y){return T($)?F($)?!0:!(Y?.readable!==!1&&y($)||Y?.writable!==!1&&m($)):null}function h($){var Y,W;return T($)?$.writableErrored?$.writableErrored:(Y=(W=$._writableState)===null||W===void 0?void 0:W.errored)!==null&&Y!==void 0?Y:null:null}function a($){var Y,W;return T($)?$.readableErrored?$.readableErrored:(Y=(W=$._readableState)===null||W===void 0?void 0:W.errored)!==null&&Y!==void 0?Y:null:null}function i($){if(!T($))return null;if(typeof $.closed=="boolean")return $.closed;let{_writableState:Y,_readableState:W}=$;return typeof Y?.closed=="boolean"||typeof W?.closed=="boolean"?Y?.closed||W?.closed:typeof $._closed=="boolean"&&G0($)?$._closed:null}function G0($){return typeof $._closed=="boolean"&&typeof $._defaultKeepAlive=="boolean"&&typeof $._removedConnection=="boolean"&&typeof $._removedContLen=="boolean"}function n($){return typeof $._sent100=="boolean"&&G0($)}function Z0($){var Y;return typeof $._consuming=="boolean"&&typeof $._dumped=="boolean"&&((Y=$.req)===null||Y===void 0?void 0:Y.upgradeOrConnect)===void 0}function X($){if(!T($))return null;let{_writableState:Y,_readableState:W}=$,Z=Y||W;return!Z&&n($)||!!(Z&&Z.autoDestroy&&Z.emitClose&&Z.closed===!1)}function O($){var Y;return!!($&&((Y=$[L])!==null&&Y!==void 0?Y:$.readableDidRead||$.readableAborted))}function G($){var Y,W,Z,K,J,j,A,E,_,s;return!!($&&((Y=(W=(Z=(K=(J=(j=$[C])!==null&&j!==void 0?j:$.readableErrored)!==null&&J!==void 0?J:$.writableErrored)!==null&&K!==void 0?K:(A=$._readableState)===null||A===void 0?void 0:A.errorEmitted)!==null&&Z!==void 0?Z:(E=$._writableState)===null||E===void 0?void 0:E.errorEmitted)!==null&&W!==void 0?W:(_=$._readableState)===null||_===void 0?void 0:_.errored)!==null&&Y!==void 0?Y:(s=$._writableState)===null||s===void 0?void 0:s.errored))}k.exports={kDestroyed:R,isDisturbed:O,kIsDisturbed:L,isErrored:G,kIsErrored:C,isReadable:y,kIsReadable:H,isClosed:i,isDestroyed:F,isDuplexNodeStream:z,isFinished:c,isIterable:q,isReadableNodeStream:P,isReadableEnded:w,isReadableFinished:M,isReadableErrored:a,isNodeStream:T,isWritable:m,isWritableNodeStream:U,isWritableEnded:I,isWritableFinished:x,isWritableErrored:h,isServerRequest:Z0,isServerResponse:n,willEmitClose:X}}),A2=K0((B,k)=>{var V=(S2(),T2(R2)),{AbortError:N,codes:Q}=U2(),{ERR_INVALID_ARG_TYPE:R,ERR_STREAM_PREMATURE_CLOSE:C}=Q,{kEmptyObject:H,once:L}=k2(),{validateAbortSignal:P,validateFunction:U,validateObject:z}=z1(),{Promise:T}=H2(),{isClosed:q,isReadable:F,isReadableNodeStream:I,isReadableFinished:x,isReadableErrored:w,isWritable:M,isWritableNodeStream:y,isWritableFinished:m,isWritableErrored:c,isNodeStream:h,willEmitClose:a}=v2();function i(X){return X.setHeader&&typeof X.abort=="function"}var G0=()=>{};function n(X,O,G){var $,Y;arguments.length===2?(G=O,O=H):O==null?O=H:z(O,"options"),U(G,"callback"),P(O.signal,"options.signal"),G=L(G);let W=($=O.readable)!==null&&$!==void 0?$:I(X),Z=(Y=O.writable)!==null&&Y!==void 0?Y:y(X);if(!h(X))throw new R("stream","Stream",X);let{_writableState:K,_readableState:J}=X,j=()=>{X.writable||_()},A=a(X)&&I(X)===W&&y(X)===Z,E=m(X,!1),_=()=>{E=!0,X.destroyed&&(A=!1),!(A&&(!X.readable||W))&&(!W||s)&&G.call(X)},s=x(X,!1),r=()=>{s=!0,X.destroyed&&(A=!1),!(A&&(!X.writable||Z))&&(!Z||E)&&G.call(X)},O0=(X0)=>{G.call(X,X0)},o=q(X),d=()=>{o=!0;let X0=c(X)||w(X);if(X0&&typeof X0!="boolean")return G.call(X,X0);if(W&&!s&&I(X,!0)&&!x(X,!1))return G.call(X,new C);if(Z&&!E&&!m(X,!1))return G.call(X,new C);G.call(X)},f=()=>{X.req.on("finish",_)};i(X)?(X.on("complete",_),A||X.on("abort",d),X.req?f():X.on("request",f)):Z&&!K&&(X.on("end",j),X.on("close",j)),!A&&typeof X.aborted=="boolean"&&X.on("aborted",d),X.on("end",r),X.on("finish",_),O.error!==!1&&X.on("error",O0),X.on("close",d),o?V.nextTick(d):K!=null&&K.errorEmitted||J!=null&&J.errorEmitted?A||V.nextTick(d):(!W&&(!A||F(X))&&(E||M(X)===!1)||!Z&&(!A||M(X))&&(s||F(X)===!1)||J&&X.req&&X.aborted)&&V.nextTick(d);let U0=()=>{G=G0,X.removeListener("aborted",d),X.removeListener("complete",_),X.removeListener("abort",d),X.removeListener("request",f),X.req&&X.req.removeListener("finish",_),X.removeListener("end",j),X.removeListener("close",j),X.removeListener("finish",_),X.removeListener("end",r),X.removeListener("error",O0),X.removeListener("close",d)};if(O.signal&&!o){let X0=()=>{let Y0=G;U0(),Y0.call(X,new N(void 0,{cause:O.signal.reason}))};if(O.signal.aborted)V.nextTick(X0);else{let Y0=G;G=L((...g)=>{O.signal.removeEventListener("abort",X0),Y0.apply(X,g)}),O.signal.addEventListener("abort",X0)}}return U0}function Z0(X,O){return new T((G,$)=>{n(X,O,(Y)=>{Y?$(Y):G()})})}k.exports=n,k.exports.finished=Z0}),E8=K0((B,k)=>{var V=globalThis.AbortController||_1().AbortController,{codes:{ERR_INVALID_ARG_TYPE:N,ERR_MISSING_ARGS:Q,ERR_OUT_OF_RANGE:R},AbortError:C}=U2(),{validateAbortSignal:H,validateInteger:L,validateObject:P}=z1(),U=H2().Symbol("kWeak"),{finished:z}=A2(),{ArrayPrototypePush:T,MathFloor:q,Number:F,NumberIsNaN:I,Promise:x,PromiseReject:w,PromisePrototypeThen:M,Symbol:y}=H2(),m=y("kEmpty"),c=y("kEof");function h(J,j){if(typeof J!="function")throw new N("fn",["Function","AsyncFunction"],J);j!=null&&P(j,"options"),j?.signal!=null&&H(j.signal,"options.signal");let A=1;return j?.concurrency!=null&&(A=q(j.concurrency)),L(A,"concurrency",1),async function*(){var E,_;let s=new V,r=this,O0=[],o=s.signal,d={signal:o},f=()=>s.abort();j!=null&&(E=j.signal)!==null&&E!==void 0&&E.aborted&&f(),j==null||(_=j.signal)===null||_===void 0||_.addEventListener("abort",f);let U0,X0,Y0=!1;function g(){Y0=!0}async function S(){try{for await(let J0 of r){var p;if(Y0)return;if(o.aborted)throw new C;try{J0=J(J0,d)}catch(t){J0=w(t)}J0!==m&&(typeof((p=J0)===null||p===void 0?void 0:p.catch)=="function"&&J0.catch(g),O0.push(J0),U0&&(U0(),U0=null),!Y0&&O0.length&&O0.length>=A&&await new x((t)=>{X0=t}))}O0.push(c)}catch(J0){let t=w(J0);M(t,void 0,g),O0.push(t)}finally{var e;Y0=!0,U0&&(U0(),U0=null),j==null||(e=j.signal)===null||e===void 0||e.removeEventListener("abort",f)}}S();try{for(;;){for(;O0.length>0;){let p=await O0[0];if(p===c)return;if(o.aborted)throw new C;p!==m&&(yield p),O0.shift(),X0&&(X0(),X0=null)}await new x((p)=>{U0=p})}}finally{s.abort(),Y0=!0,X0&&(X0(),X0=null)}}.call(this)}function a(J=void 0){return J!=null&&P(J,"options"),J?.signal!=null&&H(J.signal,"options.signal"),async function*(){let j=0;for await(let E of this){var A;if(J!=null&&(A=J.signal)!==null&&A!==void 0&&A.aborted)throw new C({cause:J.signal.reason});yield[j++,E]}}.call(this)}async function i(J,j=void 0){for await(let A of X.call(this,J,j))return!0;return!1}async function G0(J,j=void 0){if(typeof J!="function")throw new N("fn",["Function","AsyncFunction"],J);return!await i.call(this,async(...A)=>!await J(...A),j)}async function n(J,j){for await(let A of X.call(this,J,j))return A}async function Z0(J,j){if(typeof J!="function")throw new N("fn",["Function","AsyncFunction"],J);async function A(E,_){return await J(E,_),m}for await(let E of h.call(this,A,j));}function X(J,j){if(typeof J!="function")throw new N("fn",["Function","AsyncFunction"],J);async function A(E,_){return await J(E,_)?E:m}return h.call(this,A,j)}var O=class extends Q{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}};async function G(J,j,A){var E;if(typeof J!="function")throw new N("reducer",["Function","AsyncFunction"],J);A!=null&&P(A,"options"),A?.signal!=null&&H(A.signal,"options.signal");let _=arguments.length>1;if(A!=null&&(E=A.signal)!==null&&E!==void 0&&E.aborted){let d=new C(void 0,{cause:A.signal.reason});throw this.once("error",()=>{}),await z(this.destroy(d)),d}let s=new V,r=s.signal;if(A!=null&&A.signal){let d={once:!0,[U]:this};A.signal.addEventListener("abort",()=>s.abort(),d)}let O0=!1;try{for await(let d of this){var o;if(O0=!0,A!=null&&(o=A.signal)!==null&&o!==void 0&&o.aborted)throw new C;_?j=await J(j,d,{signal:r}):(j=d,_=!0)}if(!O0&&!_)throw new O}finally{s.abort()}return j}async function $(J){J!=null&&P(J,"options"),J?.signal!=null&&H(J.signal,"options.signal");let j=[];for await(let E of this){var A;if(J!=null&&(A=J.signal)!==null&&A!==void 0&&A.aborted)throw new C(void 0,{cause:J.signal.reason});T(j,E)}return j}function Y(J,j){let A=h.call(this,J,j);return async function*(){for await(let E of A)yield*E}.call(this)}function W(J){if(J=F(J),I(J))return 0;if(J<0)throw new R("number",">= 0",J);return J}function Z(J,j=void 0){return j!=null&&P(j,"options"),j?.signal!=null&&H(j.signal,"options.signal"),J=W(J),async function*(){var A;if(j!=null&&(A=j.signal)!==null&&A!==void 0&&A.aborted)throw new C;for await(let _ of this){var E;if(j!=null&&(E=j.signal)!==null&&E!==void 0&&E.aborted)throw new C;J--<=0&&(yield _)}}.call(this)}function K(J,j=void 0){return j!=null&&P(j,"options"),j?.signal!=null&&H(j.signal,"options.signal"),J=W(J),async function*(){var A;if(j!=null&&(A=j.signal)!==null&&A!==void 0&&A.aborted)throw new C;for await(let _ of this){var E;if(j!=null&&(E=j.signal)!==null&&E!==void 0&&E.aborted)throw new C;if(J-- >0)yield _;else return}}.call(this)}k.exports.streamReturningOperators={asIndexedPairs:a,drop:Z,filter:X,flatMap:Y,map:h,take:K},k.exports.promiseReturningOperators={every:G0,forEach:Z0,reduce:G,toArray:$,some:i,find:n}}),c2=K0((B,k)=>{var V=(S2(),T2(R2)),{aggregateTwoErrors:N,codes:{ERR_MULTIPLE_CALLBACK:Q},AbortError:R}=U2(),{Symbol:C}=H2(),{kDestroyed:H,isDestroyed:L,isFinished:P,isServerRequest:U}=v2(),z=C("kDestroy"),T=C("kConstruct");function q(X,O,G){X&&(X.stack,O&&!O.errored&&(O.errored=X),G&&!G.errored&&(G.errored=X))}function F(X,O){let G=this._readableState,$=this._writableState,Y=$||G;return $&&$.destroyed||G&&G.destroyed?(typeof O=="function"&&O(),this):(q(X,$,G),$&&($.destroyed=!0),G&&(G.destroyed=!0),Y.constructed?I(this,X,O):this.once(z,function(W){I(this,N(W,X),O)}),this)}function I(X,O,G){let $=!1;function Y(W){if($)return;$=!0;let{_readableState:Z,_writableState:K}=X;q(W,K,Z),K&&(K.closed=!0),Z&&(Z.closed=!0),typeof G=="function"&&G(W),W?V.nextTick(x,X,W):V.nextTick(w,X)}try{X._destroy(O||null,Y)}catch(W){Y(W)}}function x(X,O){M(X,O),w(X)}function w(X){let{_readableState:O,_writableState:G}=X;G&&(G.closeEmitted=!0),O&&(O.closeEmitted=!0),(G&&G.emitClose||O&&O.emitClose)&&X.emit("close")}function M(X,O){let{_readableState:G,_writableState:$}=X;$&&$.errorEmitted||G&&G.errorEmitted||($&&($.errorEmitted=!0),G&&(G.errorEmitted=!0),X.emit("error",O))}function y(){let X=this._readableState,O=this._writableState;X&&(X.constructed=!0,X.closed=!1,X.closeEmitted=!1,X.destroyed=!1,X.errored=null,X.errorEmitted=!1,X.reading=!1,X.ended=X.readable===!1,X.endEmitted=X.readable===!1),O&&(O.constructed=!0,O.destroyed=!1,O.closed=!1,O.closeEmitted=!1,O.errored=null,O.errorEmitted=!1,O.finalCalled=!1,O.prefinished=!1,O.ended=O.writable===!1,O.ending=O.writable===!1,O.finished=O.writable===!1)}function m(X,O,G){let{_readableState:$,_writableState:Y}=X;if(Y&&Y.destroyed||$&&$.destroyed)return this;$&&$.autoDestroy||Y&&Y.autoDestroy?X.destroy(O):O&&(O.stack,Y&&!Y.errored&&(Y.errored=O),$&&!$.errored&&($.errored=O),G?V.nextTick(M,X,O):M(X,O))}function c(X,O){if(typeof X._construct!="function")return;let{_readableState:G,_writableState:$}=X;G&&(G.constructed=!1),$&&($.constructed=!1),X.once(T,O),!(X.listenerCount(T)>1)&&V.nextTick(h,X)}function h(X){let O=!1;function G($){if(O){m(X,$??new Q);return}O=!0;let{_readableState:Y,_writableState:W}=X,Z=W||Y;Y&&(Y.constructed=!0),W&&(W.constructed=!0),Z.destroyed?X.emit(z,$):$?m(X,$,!0):V.nextTick(a,X)}try{X._construct(G)}catch($){G($)}}function a(X){X.emit(T)}function i(X){return X&&X.setHeader&&typeof X.abort=="function"}function G0(X){X.emit("close")}function n(X,O){X.emit("error",O),V.nextTick(G0,X)}function Z0(X,O){!X||L(X)||(!O&&!P(X)&&(O=new R),U(X)?(X.socket=null,X.destroy(O)):i(X)?X.abort():i(X.req)?X.req.abort():typeof X.destroy=="function"?X.destroy(O):typeof X.close=="function"?X.close():O?V.nextTick(n,X,O):V.nextTick(G0,X),X.destroyed||(X[H]=!0))}k.exports={construct:c,destroyer:Z0,destroy:F,undestroy:y,errorOrDestroy:m}}),g1=K0((B,k)=>{var{ArrayIsArray:V,ObjectSetPrototypeOf:N}=H2(),{EventEmitter:Q}=x2();function R(H){Q.call(this,H)}N(R.prototype,Q.prototype),N(R,Q),R.prototype.pipe=function(H,L){let P=this;function U(w){H.writable&&H.write(w)===!1&&P.pause&&P.pause()}P.on("data",U);function z(){P.readable&&P.resume&&P.resume()}H.on("drain",z),!H._isStdio&&(!L||L.end!==!1)&&(P.on("end",q),P.on("close",F));let T=!1;function q(){T||(T=!0,H.end())}function F(){T||(T=!0,typeof H.destroy=="function"&&H.destroy())}function I(w){x(),Q.listenerCount(this,"error")===0&&this.emit("error",w)}C(P,"error",I),C(H,"error",I);function x(){P.removeListener("data",U),H.removeListener("drain",z),P.removeListener("end",q),P.removeListener("close",F),P.removeListener("error",I),H.removeListener("error",I),P.removeListener("end",x),P.removeListener("close",x),H.removeListener("close",x)}return P.on("end",x),P.on("close",x),H.on("close",x),H.emit("pipe",P),H};function C(H,L,P){if(typeof H.prependListener=="function")return H.prependListener(L,P);!H._events||!H._events[L]?H.on(L,P):V(H._events[L])?H._events[L].unshift(P):H._events[L]=[P,H._events[L]]}k.exports={Stream:R,prependListener:C}}),m1=K0((B,k)=>{var{AbortError:V,codes:N}=U2(),Q=A2(),{ERR_INVALID_ARG_TYPE:R}=N,C=(L,P)=>{if(typeof L!="object"||!("aborted"in L))throw new R(P,"AbortSignal",L)};function H(L){return!!(L&&typeof L.pipe=="function")}k.exports.addAbortSignal=function(L,P){if(C(L,"signal"),!H(P))throw new R("stream","stream.Stream",P);return k.exports.addAbortSignalNoValidate(L,P)},k.exports.addAbortSignalNoValidate=function(L,P){if(typeof L!="object"||!("aborted"in L))return P;let U=()=>{P.destroy(new V(void 0,{cause:L.reason}))};return L.aborted?U():(L.addEventListener("abort",U),Q(P,()=>L.removeEventListener("abort",U))),P}}),x8=K0((B,k)=>{var{StringPrototypeSlice:V,SymbolIterator:N,TypedArrayPrototypeSet:Q,Uint8Array:R}=H2(),{Buffer:C}=P2(),{inspect:H}=k2();k.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(L){let P={data:L,next:null};this.length>0?this.tail.next=P:this.head=P,this.tail=P,++this.length}unshift(L){let P={data:L,next:this.head};this.length===0&&(this.tail=P),this.head=P,++this.length}shift(){if(this.length===0)return;let L=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,L}clear(){this.head=this.tail=null,this.length=0}join(L){if(this.length===0)return"";let P=this.head,U=""+P.data;for(;(P=P.next)!==null;)U+=L+P.data;return U}concat(L){if(this.length===0)return C.alloc(0);let P=C.allocUnsafe(L>>>0),U=this.head,z=0;for(;U;)Q(P,U.data,z),z+=U.data.length,U=U.next;return P}consume(L,P){let U=this.head.data;if(LT.length)P+=T,L-=T.length;else{L===T.length?(P+=T,++z,U.next?this.head=U.next:this.head=this.tail=null):(P+=V(T,0,L),this.head=U,U.data=V(T,L));break}++z}while((U=U.next)!==null);return this.length-=z,P}_getBuffer(L){let P=C.allocUnsafe(L),U=L,z=this.head,T=0;do{let q=z.data;if(L>q.length)Q(P,q,U-L),L-=q.length;else{L===q.length?(Q(P,q,U-L),++T,z.next?this.head=z.next:this.head=this.tail=null):(Q(P,new R(q.buffer,q.byteOffset,L),U-L),this.head=z,z.data=q.slice(L));break}++T}while((z=z.next)!==null);return this.length-=T,P}[Symbol.for("nodejs.util.inspect.custom")](L,P){return H(this,{...P,depth:0,customInspect:!1})}}}),p1=K0((B,k)=>{var{MathFloor:V,NumberIsInteger:N}=H2(),{ERR_INVALID_ARG_VALUE:Q}=U2().codes;function R(L,P,U){return L.highWaterMark!=null?L.highWaterMark:P?L[U]:null}function C(L){return L?16:16384}function H(L,P,U,z){let T=R(P,z,U);if(T!=null){if(!N(T)||T<0){let q=z?`options.${U}`:"options.highWaterMark";throw new Q(q,T)}return V(T)}return C(L.objectMode)}k.exports={getHighWaterMark:H,getDefaultHighWaterMark:C}}),u5=K0((B,k)=>{var V=(S2(),T2(R2)),{PromisePrototypeThen:N,SymbolAsyncIterator:Q,SymbolIterator:R}=H2(),{Buffer:C}=P2(),{ERR_INVALID_ARG_TYPE:H,ERR_STREAM_NULL_VALUES:L}=U2().codes;function P(U,z,T){let q;if(typeof z=="string"||z instanceof C)return new U({objectMode:!0,...T,read(){this.push(z),this.push(null)}});let F;if(z&&z[Q])F=!0,q=z[Q]();else if(z&&z[R])F=!1,q=z[R]();else throw new H("iterable",["Iterable"],z);let I=new U({objectMode:!0,highWaterMark:1,...T}),x=!1;I._read=function(){x||(x=!0,M())},I._destroy=function(y,m){N(w(y),()=>V.nextTick(m,y),(c)=>V.nextTick(m,c||y))};async function w(y){let m=y!=null,c=typeof q.throw=="function";if(m&&c){let{value:h,done:a}=await q.throw(y);if(await h,a)return}if(typeof q.return=="function"){let{value:h}=await q.return();await h}}async function M(){for(;;){try{let{value:y,done:m}=F?await q.next():q.next();if(m)I.push(null);else{let c=y&&typeof y.then=="function"?await y:y;if(c===null)throw x=!1,new L;if(I.push(c))continue;x=!1}}catch(y){I.destroy(y)}break}}return I}k.exports=P}),H1=K0((B,k)=>{var V=(S2(),T2(R2)),{ArrayPrototypeIndexOf:N,NumberIsInteger:Q,NumberIsNaN:R,NumberParseInt:C,ObjectDefineProperties:H,ObjectKeys:L,ObjectSetPrototypeOf:P,Promise:U,SafeSet:z,SymbolAsyncIterator:T,Symbol:q}=H2();k.exports=A,A.ReadableState=j;var{EventEmitter:F}=x2(),{Stream:I,prependListener:x}=g1(),{Buffer:w}=P2(),{addAbortSignal:M}=m1(),y=A2(),m=k2().debuglog("stream",(D)=>{m=D}),c=x8(),h=c2(),{getHighWaterMark:a,getDefaultHighWaterMark:i}=p1(),{aggregateTwoErrors:G0,codes:{ERR_INVALID_ARG_TYPE:n,ERR_METHOD_NOT_IMPLEMENTED:Z0,ERR_OUT_OF_RANGE:X,ERR_STREAM_PUSH_AFTER_EOF:O,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:G}}=U2(),{validateObject:$}=z1(),Y=q("kPaused"),{StringDecoder:W}=v1(),Z=u5();P(A.prototype,I.prototype),P(A,I);var K=()=>{},{errorOrDestroy:J}=h;function j(D,v,b){typeof b!="boolean"&&(b=v instanceof B2()),this.objectMode=!!(D&&D.objectMode),b&&(this.objectMode=this.objectMode||!!(D&&D.readableObjectMode)),this.highWaterMark=D?a(this,D,"readableHighWaterMark",b):i(!1),this.buffer=new c,this.length=0,this.pipes=[],this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.constructed=!0,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this[Y]=null,this.errorEmitted=!1,this.emitClose=!D||D.emitClose!==!1,this.autoDestroy=!D||D.autoDestroy!==!1,this.destroyed=!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this.defaultEncoding=D&&D.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.multiAwaitDrain=!1,this.readingMore=!1,this.dataEmitted=!1,this.decoder=null,this.encoding=null,D&&D.encoding&&(this.decoder=new W(D.encoding),this.encoding=D.encoding)}function A(D){if(!(this instanceof A))return new A(D);let v=this instanceof B2();this._readableState=new j(D,this,v),D&&(typeof D.read=="function"&&(this._read=D.read),typeof D.destroy=="function"&&(this._destroy=D.destroy),typeof D.construct=="function"&&(this._construct=D.construct),D.signal&&!v&&M(D.signal,this)),I.call(this,D),h.construct(this,()=>{this._readableState.needReadable&&U0(this,this._readableState)})}A.prototype.destroy=h.destroy,A.prototype._undestroy=h.undestroy,A.prototype._destroy=function(D,v){v(D)},A.prototype[F.captureRejectionSymbol]=function(D){this.destroy(D)},A.prototype.push=function(D,v){return E(this,D,v,!1)},A.prototype.unshift=function(D,v){return E(this,D,v,!0)};function E(D,v,b,l){m("readableAddChunk",v);let u=D._readableState,F0;if(u.objectMode||(typeof v=="string"?(b=b||u.defaultEncoding,u.encoding!==b&&(l&&u.encoding?v=w.from(v,b).toString(u.encoding):(v=w.from(v,b),b=""))):v instanceof w?b="":I._isUint8Array(v)?(v=I._uint8ArrayToBuffer(v),b=""):v!=null&&(F0=new n("chunk",["string","Buffer","Uint8Array"],v))),F0)J(D,F0);else if(v===null)u.reading=!1,o(D,u);else if(u.objectMode||v&&v.length>0)if(l)if(u.endEmitted)J(D,new G);else{if(u.destroyed||u.errored)return!1;_(D,u,v,!0)}else if(u.ended)J(D,new O);else{if(u.destroyed||u.errored)return!1;u.reading=!1,u.decoder&&!b?(v=u.decoder.write(v),u.objectMode||v.length!==0?_(D,u,v,!1):U0(D,u)):_(D,u,v,!1)}else l||(u.reading=!1,U0(D,u));return!u.ended&&(u.length0?(v.multiAwaitDrain?v.awaitDrainWriters.clear():v.awaitDrainWriters=null,v.dataEmitted=!0,D.emit("data",b)):(v.length+=v.objectMode?1:b.length,l?v.buffer.unshift(b):v.buffer.push(b),v.needReadable&&d(D)),U0(D,v)}A.prototype.isPaused=function(){let D=this._readableState;return D[Y]===!0||D.flowing===!1},A.prototype.setEncoding=function(D){let v=new W(D);this._readableState.decoder=v,this._readableState.encoding=this._readableState.decoder.encoding;let b=this._readableState.buffer,l="";for(let u of b)l+=v.write(u);return b.clear(),l!==""&&b.push(l),this._readableState.length=l.length,this};var s=1073741824;function r(D){if(D>s)throw new X("size","<= 1GiB",D);return D--,D|=D>>>1,D|=D>>>2,D|=D>>>4,D|=D>>>8,D|=D>>>16,D++,D}function O0(D,v){return D<=0||v.length===0&&v.ended?0:v.objectMode?1:R(D)?v.flowing&&v.length?v.buffer.first().length:v.length:D<=v.length?D:v.ended?v.length:0}A.prototype.read=function(D){m("read",D),D===void 0?D=NaN:Q(D)||(D=C(D,10));let v=this._readableState,b=D;if(D>v.highWaterMark&&(v.highWaterMark=r(D)),D!==0&&(v.emittedReadable=!1),D===0&&v.needReadable&&((v.highWaterMark!==0?v.length>=v.highWaterMark:v.length>0)||v.ended))return m("read: emitReadable",v.length,v.ended),v.length===0&&v.ended?W0(this):d(this),null;if(D=O0(D,v),D===0&&v.ended)return v.length===0&&W0(this),null;let l=v.needReadable;if(m("need readable",l),(v.length===0||v.length-D0?u=C0(D,v):u=null,u===null?(v.needReadable=v.length<=v.highWaterMark,D=0):(v.length-=D,v.multiAwaitDrain?v.awaitDrainWriters.clear():v.awaitDrainWriters=null),v.length===0&&(v.ended||(v.needReadable=!0),b!==D&&v.ended&&W0(this)),u!==null&&!v.errorEmitted&&!v.closeEmitted&&(v.dataEmitted=!0,this.emit("data",u)),u};function o(D,v){if(m("onEofChunk"),!v.ended){if(v.decoder){let b=v.decoder.end();b&&b.length&&(v.buffer.push(b),v.length+=v.objectMode?1:b.length)}v.ended=!0,v.sync?d(D):(v.needReadable=!1,v.emittedReadable=!0,f(D))}}function d(D){let v=D._readableState;m("emitReadable",v.needReadable,v.emittedReadable),v.needReadable=!1,v.emittedReadable||(m("emitReadable",v.flowing),v.emittedReadable=!0,V.nextTick(f,D))}function f(D){let v=D._readableState;m("emitReadable_",v.destroyed,v.length,v.ended),!v.destroyed&&!v.errored&&(v.length||v.ended)&&(D.emit("readable"),v.emittedReadable=!1),v.needReadable=!v.flowing&&!v.ended&&v.length<=v.highWaterMark,J0(D)}function U0(D,v){!v.readingMore&&v.constructed&&(v.readingMore=!0,V.nextTick(X0,D,v))}function X0(D,v){for(;!v.reading&&!v.ended&&(v.length1&&l.pipes.includes(D)&&(m("false write response, pause",l.awaitDrainWriters.size),l.awaitDrainWriters.add(D)),b.pause()),z0||(z0=Y0(b,D),D.on("drain",z0))}b.on("data",g0);function g0(T0){m("ondata");let l0=D.write(T0);m("dest.write",l0),l0===!1&&H0()}function N0(T0){if(m("onerror",T0),D0(),D.removeListener("error",N0),D.listenerCount("error")===0){let l0=D._writableState||D._readableState;l0&&!l0.errorEmitted?J(D,T0):D.emit("error",T0)}}x(D,"error",N0);function L0(){D.removeListener("finish",K2),D0()}D.once("close",L0);function K2(){m("onfinish"),D.removeListener("close",L0),D0()}D.once("finish",K2);function D0(){m("unpipe"),b.unpipe(D)}return D.emit("pipe",b),D.writableNeedDrain===!0?l.flowing&&H0():l.flowing||(m("pipe resume"),b.resume()),D};function Y0(D,v){return function(){let b=D._readableState;b.awaitDrainWriters===v?(m("pipeOnDrain",1),b.awaitDrainWriters=null):b.multiAwaitDrain&&(m("pipeOnDrain",b.awaitDrainWriters.size),b.awaitDrainWriters.delete(v)),(!b.awaitDrainWriters||b.awaitDrainWriters.size===0)&&D.listenerCount("data")&&D.resume()}}A.prototype.unpipe=function(D){let v=this._readableState,b={hasUnpiped:!1};if(v.pipes.length===0)return this;if(!D){let u=v.pipes;v.pipes=[],this.pause();for(let F0=0;F00,l.flowing!==!1&&this.resume()):D==="readable"&&!l.endEmitted&&!l.readableListening&&(l.readableListening=l.needReadable=!0,l.flowing=!1,l.emittedReadable=!1,m("on readable",l.length,l.reading),l.length?d(this):l.reading||V.nextTick(S,this)),b},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(D,v){let b=I.prototype.removeListener.call(this,D,v);return D==="readable"&&V.nextTick(g,this),b},A.prototype.off=A.prototype.removeListener,A.prototype.removeAllListeners=function(D){let v=I.prototype.removeAllListeners.apply(this,arguments);return(D==="readable"||D===void 0)&&V.nextTick(g,this),v};function g(D){let v=D._readableState;v.readableListening=D.listenerCount("readable")>0,v.resumeScheduled&&v[Y]===!1?v.flowing=!0:D.listenerCount("data")>0?D.resume():v.readableListening||(v.flowing=null)}function S(D){m("readable nexttick read 0"),D.read(0)}A.prototype.resume=function(){let D=this._readableState;return D.flowing||(m("resume"),D.flowing=!D.readableListening,p(this,D)),D[Y]=!1,this};function p(D,v){v.resumeScheduled||(v.resumeScheduled=!0,V.nextTick(e,D,v))}function e(D,v){m("resume",v.reading),v.reading||D.read(0),v.resumeScheduled=!1,D.emit("resume"),J0(D),v.flowing&&!v.reading&&D.read(0)}A.prototype.pause=function(){return m("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(m("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[Y]=!0,this};function J0(D){let v=D._readableState;for(m("flow",v.flowing);v.flowing&&D.read()!==null;);}A.prototype.wrap=function(D){let v=!1;D.on("data",(l)=>{!this.push(l)&&D.pause&&(v=!0,D.pause())}),D.on("end",()=>{this.push(null)}),D.on("error",(l)=>{J(this,l)}),D.on("close",()=>{this.destroy()}),D.on("destroy",()=>{this.destroy()}),this._read=()=>{v&&D.resume&&(v=!1,D.resume())};let b=L(D);for(let l=1;l{u=$0?G0(u,$0):null,b(),b=K});try{for(;;){let $0=D.destroyed?null:D.read();if($0!==null)yield $0;else{if(u)throw u;if(u===null)return;await new U(l)}}}catch($0){throw u=G0(u,$0),u}finally{(u||v?.destroyOnReturn!==!1)&&(u===void 0||D._readableState.autoDestroy)?h.destroyer(D,null):(D.off("readable",l),F0())}}H(A.prototype,{readable:{__proto__:null,get(){let D=this._readableState;return!!D&&D.readable!==!1&&!D.destroyed&&!D.errorEmitted&&!D.endEmitted},set(D){this._readableState&&(this._readableState.readable=!!D)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(D){this._readableState&&(this._readableState.flowing=D)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(D){!this._readableState||(this._readableState.destroyed=D)}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),H(j.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[Y]!==!1},set(D){this[Y]=!!D}}}),A._fromList=C0;function C0(D,v){if(v.length===0)return null;let b;return v.objectMode?b=v.buffer.shift():!D||D>=v.length?(v.decoder?b=v.buffer.join(""):v.buffer.length===1?b=v.buffer.first():b=v.buffer.concat(v.length),v.buffer.clear()):b=v.buffer.consume(D,v.decoder),b}function W0(D){let v=D._readableState;m("endReadable",v.endEmitted),v.endEmitted||(v.ended=!0,V.nextTick(_0,v,D))}function _0(D,v){if(m("endReadableNT",D.endEmitted,D.length),!D.errored&&!D.closeEmitted&&!D.endEmitted&&D.length===0){if(D.endEmitted=!0,v.emit("end"),v.writable&&v.allowHalfOpen===!1)V.nextTick(P0,v);else if(D.autoDestroy){let b=v._writableState;(!b||b.autoDestroy&&(b.finished||b.writable===!1))&&v.destroy()}}}function P0(D){D.writable&&!D.writableEnded&&!D.destroyed&&D.end()}A.from=function(D,v){return Z(A,D,v)};var Q0;function d0(){return Q0===void 0&&(Q0={}),Q0}A.fromWeb=function(D,v){return d0().newStreamReadableFromReadableStream(D,v)},A.toWeb=function(D,v){return d0().newReadableStreamFromStreamReadable(D,v)},A.wrap=function(D,v){var b,l;return new A({objectMode:(b=(l=D.readableObjectMode)!==null&&l!==void 0?l:D.objectMode)!==null&&b!==void 0?b:!0,...v,destroy(u,F0){h.destroyer(D,u),F0(u)}}).wrap(D)}}),s5=K0((B,k)=>{var V=(S2(),T2(R2)),{ArrayPrototypeSlice:N,Error:Q,FunctionPrototypeSymbolHasInstance:R,ObjectDefineProperty:C,ObjectDefineProperties:H,ObjectSetPrototypeOf:L,StringPrototypeToLowerCase:P,Symbol:U,SymbolHasInstance:z}=H2();k.exports=W,W.WritableState=$;var{EventEmitter:T}=x2(),q=g1().Stream,{Buffer:F}=P2(),I=c2(),{addAbortSignal:x}=m1(),{getHighWaterMark:w,getDefaultHighWaterMark:M}=p1(),{ERR_INVALID_ARG_TYPE:y,ERR_METHOD_NOT_IMPLEMENTED:m,ERR_MULTIPLE_CALLBACK:c,ERR_STREAM_CANNOT_PIPE:h,ERR_STREAM_DESTROYED:a,ERR_STREAM_ALREADY_FINISHED:i,ERR_STREAM_NULL_VALUES:G0,ERR_STREAM_WRITE_AFTER_END:n,ERR_UNKNOWN_ENCODING:Z0}=U2().codes,{errorOrDestroy:X}=I;L(W.prototype,q.prototype),L(W,q);function O(){}var G=U("kOnFinished");function $(S,p,e){typeof e!="boolean"&&(e=p instanceof B2()),this.objectMode=!!(S&&S.objectMode),e&&(this.objectMode=this.objectMode||!!(S&&S.writableObjectMode)),this.highWaterMark=S?w(this,S,"writableHighWaterMark",e):M(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;let J0=!!(S&&S.decodeStrings===!1);this.decodeStrings=!J0,this.defaultEncoding=S&&S.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=A.bind(void 0,p),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,Y(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!S||S.emitClose!==!1,this.autoDestroy=!S||S.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[G]=[]}function Y(S){S.buffered=[],S.bufferedIndex=0,S.allBuffers=!0,S.allNoop=!0}$.prototype.getBuffer=function(){return N(this.buffered,this.bufferedIndex)},C($.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function W(S){let p=this instanceof B2();if(!p&&!R(W,this))return new W(S);this._writableState=new $(S,this,p),S&&(typeof S.write=="function"&&(this._write=S.write),typeof S.writev=="function"&&(this._writev=S.writev),typeof S.destroy=="function"&&(this._destroy=S.destroy),typeof S.final=="function"&&(this._final=S.final),typeof S.construct=="function"&&(this._construct=S.construct),S.signal&&x(S.signal,this)),q.call(this,S),I.construct(this,()=>{let e=this._writableState;e.writing||r(this,e),f(this,e)})}C(W,z,{__proto__:null,value:function(S){return R(this,S)?!0:this!==W?!1:S&&S._writableState instanceof $}}),W.prototype.pipe=function(){X(this,new h)};function Z(S,p,e,J0){let t=S._writableState;if(typeof e=="function")J0=e,e=t.defaultEncoding;else{if(!e)e=t.defaultEncoding;else if(e!=="buffer"&&!F.isEncoding(e))throw new Z0(e);typeof J0!="function"&&(J0=O)}if(p===null)throw new G0;if(!t.objectMode)if(typeof p=="string")t.decodeStrings!==!1&&(p=F.from(p,e),e="buffer");else if(p instanceof F)e="buffer";else if(q._isUint8Array(p))p=q._uint8ArrayToBuffer(p),e="buffer";else throw new y("chunk",["string","Buffer","Uint8Array"],p);let y0;return t.ending?y0=new n:t.destroyed&&(y0=new a("write")),y0?(V.nextTick(J0,y0),X(S,y0,!0),y0):(t.pendingcb++,K(S,t,p,e,J0))}W.prototype.write=function(S,p,e){return Z(this,S,p,e)===!0},W.prototype.cork=function(){this._writableState.corked++},W.prototype.uncork=function(){let S=this._writableState;S.corked&&(S.corked--,S.writing||r(this,S))},W.prototype.setDefaultEncoding=function(S){if(typeof S=="string"&&(S=P(S)),!F.isEncoding(S))throw new Z0(S);return this._writableState.defaultEncoding=S,this};function K(S,p,e,J0,t){let y0=p.objectMode?1:e.length;p.length+=y0;let C0=p.lengthe.bufferedIndex&&r(S,e),J0?e.afterWriteTickInfo!==null&&e.afterWriteTickInfo.cb===t?e.afterWriteTickInfo.count++:(e.afterWriteTickInfo={count:1,cb:t,stream:S,state:e},V.nextTick(E,e.afterWriteTickInfo)):_(S,e,1,t))}function E({stream:S,state:p,count:e,cb:J0}){return p.afterWriteTickInfo=null,_(S,p,e,J0)}function _(S,p,e,J0){for(!p.ending&&!S.destroyed&&p.length===0&&p.needDrain&&(p.needDrain=!1,S.emit("drain"));e-- >0;)p.pendingcb--,J0();p.destroyed&&s(p),f(S,p)}function s(S){if(S.writing)return;for(let t=S.bufferedIndex;t1&&S._writev){p.pendingcb-=y0-1;let W0=p.allNoop?O:(P0)=>{for(let Q0=C0;Q0256?(e.splice(0,C0),p.bufferedIndex=0):p.bufferedIndex=C0}p.bufferProcessing=!1}W.prototype._write=function(S,p,e){if(this._writev)this._writev([{chunk:S,encoding:p}],e);else throw new m("_write()")},W.prototype._writev=null,W.prototype.end=function(S,p,e){let J0=this._writableState;typeof S=="function"?(e=S,S=null,p=null):typeof p=="function"&&(e=p,p=null);let t;if(S!=null){let y0=Z(this,S,p);y0 instanceof Q&&(t=y0)}return J0.corked&&(J0.corked=1,this.uncork()),t||(!J0.errored&&!J0.ending?(J0.ending=!0,f(this,J0,!0),J0.ended=!0):J0.finished?t=new i("end"):J0.destroyed&&(t=new a("end"))),typeof e=="function"&&(t||J0.finished?V.nextTick(e,t):J0[G].push(e)),this};function O0(S){return S.ending&&!S.destroyed&&S.constructed&&S.length===0&&!S.errored&&S.buffered.length===0&&!S.finished&&!S.writing&&!S.errorEmitted&&!S.closeEmitted}function o(S,p){let e=!1;function J0(t){if(e){X(S,t??c());return}if(e=!0,p.pendingcb--,t){let y0=p[G].splice(0);for(let C0=0;C0{O0(t)?U0(J0,t):t.pendingcb--},S,p)):O0(p)&&(p.pendingcb++,U0(S,p))))}function U0(S,p){p.pendingcb--,p.finished=!0;let e=p[G].splice(0);for(let J0=0;J0{var V=(S2(),T2(R2)),N=P2(),{isReadable:Q,isWritable:R,isIterable:C,isNodeStream:H,isReadableNodeStream:L,isWritableNodeStream:P,isDuplexNodeStream:U}=v2(),z=A2(),{AbortError:T,codes:{ERR_INVALID_ARG_TYPE:q,ERR_INVALID_RETURN_VALUE:F}}=U2(),{destroyer:I}=c2(),x=B2(),w=H1(),{createDeferredPromise:M}=k2(),y=u5(),m=globalThis.Blob||N.Blob,c=typeof m<"u"?function(Z0){return Z0 instanceof m}:function(Z0){return!1},h=globalThis.AbortController||_1().AbortController,{FunctionPrototypeCall:a}=H2(),i=class extends x{constructor(Z0){super(Z0),Z0?.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),Z0?.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}};k.exports=function Z0(X,O){if(U(X))return X;if(L(X))return n({readable:X});if(P(X))return n({writable:X});if(H(X))return n({writable:!1,readable:!1});if(typeof X=="function"){let{value:$,write:Y,final:W,destroy:Z}=G0(X);if(C($))return y(i,$,{objectMode:!0,write:Y,final:W,destroy:Z});let K=$?.then;if(typeof K=="function"){let J,j=a(K,$,(A)=>{if(A!=null)throw new F("nully","body",A)},(A)=>{I(J,A)});return J=new i({objectMode:!0,readable:!1,write:Y,final(A){W(async()=>{try{await j,V.nextTick(A,null)}catch(E){V.nextTick(A,E)}})},destroy:Z})}throw new F("Iterable, AsyncIterable or AsyncFunction",O,$)}if(c(X))return Z0(X.arrayBuffer());if(C(X))return y(i,X,{objectMode:!0,writable:!1});if(typeof X?.writable=="object"||typeof X?.readable=="object"){let $=X!=null&&X.readable?L(X?.readable)?X?.readable:Z0(X.readable):void 0,Y=X!=null&&X.writable?P(X?.writable)?X?.writable:Z0(X.writable):void 0;return n({readable:$,writable:Y})}let G=X?.then;if(typeof G=="function"){let $;return a(G,X,(Y)=>{Y!=null&&$.push(Y),$.push(null)},(Y)=>{I($,Y)}),$=new i({objectMode:!0,writable:!1,read(){}})}throw new q(O,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],X)};function G0(Z0){let{promise:X,resolve:O}=M(),G=new h,$=G.signal;return{value:Z0(async function*(){for(;;){let Y=X;X=null;let{chunk:W,done:Z,cb:K}=await Y;if(V.nextTick(K),Z)return;if($.aborted)throw new T(void 0,{cause:$.reason});({promise:X,resolve:O}=M()),yield W}}(),{signal:$}),write(Y,W,Z){let K=O;O=null,K({chunk:Y,done:!1,cb:Z})},final(Y){let W=O;O=null,W({done:!0,cb:Y})},destroy(Y,W){G.abort(),W(Y)}}}function n(Z0){let X=Z0.readable&&typeof Z0.readable.read!="function"?w.wrap(Z0.readable):Z0.readable,O=Z0.writable,G=!!Q(X),$=!!R(O),Y,W,Z,K,J;function j(A){let E=K;K=null,E?E(A):A?J.destroy(A):!G&&!$&&J.destroy()}return J=new i({readableObjectMode:!!(X!=null&&X.readableObjectMode),writableObjectMode:!!(O!=null&&O.writableObjectMode),readable:G,writable:$}),$&&(z(O,(A)=>{$=!1,A&&I(X,A),j(A)}),J._write=function(A,E,_){O.write(A,E)?_():Y=_},J._final=function(A){O.end(),W=A},O.on("drain",function(){if(Y){let A=Y;Y=null,A()}}),O.on("finish",function(){if(W){let A=W;W=null,A()}})),G&&(z(X,(A)=>{G=!1,A&&I(X,A),j(A)}),X.on("readable",function(){if(Z){let A=Z;Z=null,A()}}),X.on("end",function(){J.push(null)}),J._read=function(){for(;;){let A=X.read();if(A===null){Z=J._read;return}if(!J.push(A))return}}),J._destroy=function(A,E){!A&&K!==null&&(A=new T),Z=null,Y=null,W=null,K===null?E(A):(K=E,I(O,A),I(X,A))},J}}),B2=K0((B,k)=>{var{ObjectDefineProperties:V,ObjectGetOwnPropertyDescriptor:N,ObjectKeys:Q,ObjectSetPrototypeOf:R}=H2();k.exports=L;var C=H1(),H=s5();R(L.prototype,C.prototype),R(L,C);{let T=Q(H.prototype);for(let q=0;q{var{ObjectSetPrototypeOf:V,Symbol:N}=H2();k.exports=L;var{ERR_METHOD_NOT_IMPLEMENTED:Q}=U2().codes,R=B2(),{getHighWaterMark:C}=p1();V(L.prototype,R.prototype),V(L,R);var H=N("kCallback");function L(z){if(!(this instanceof L))return new L(z);let T=z?C(this,z,"readableHighWaterMark",!0):null;T===0&&(z={...z,highWaterMark:null,readableHighWaterMark:T,writableHighWaterMark:z.writableHighWaterMark||0}),R.call(this,z),this._readableState.sync=!1,this[H]=null,z&&(typeof z.transform=="function"&&(this._transform=z.transform),typeof z.flush=="function"&&(this._flush=z.flush)),this.on("prefinish",U)}function P(z){typeof this._flush=="function"&&!this.destroyed?this._flush((T,q)=>{if(T){z?z(T):this.destroy(T);return}q!=null&&this.push(q),this.push(null),z&&z()}):(this.push(null),z&&z())}function U(){this._final!==P&&P.call(this)}L.prototype._final=P,L.prototype._transform=function(z,T,q){throw new Q("_transform()")},L.prototype._write=function(z,T,q){let F=this._readableState,I=this._writableState,x=F.length;this._transform(z,T,(w,M)=>{if(w){q(w);return}M!=null&&this.push(M),I.ended||x===F.length||F.length{var{ObjectSetPrototypeOf:V}=H2();k.exports=Q;var N=f5();V(Q.prototype,N.prototype),V(Q,N);function Q(R){if(!(this instanceof Q))return new Q(R);N.call(this,R)}Q.prototype._transform=function(R,C,H){H(null,R)}}),c1=K0((B,k)=>{var V=(S2(),T2(R2)),{ArrayIsArray:N,Promise:Q,SymbolAsyncIterator:R}=H2(),C=A2(),{once:H}=k2(),L=c2(),P=B2(),{aggregateTwoErrors:U,codes:{ERR_INVALID_ARG_TYPE:z,ERR_INVALID_RETURN_VALUE:T,ERR_MISSING_ARGS:q,ERR_STREAM_DESTROYED:F,ERR_STREAM_PREMATURE_CLOSE:I},AbortError:x}=U2(),{validateFunction:w,validateAbortSignal:M}=z1(),{isIterable:y,isReadable:m,isReadableNodeStream:c,isNodeStream:h}=v2(),a=globalThis.AbortController||_1().AbortController,i,G0;function n(Z,K,J){let j=!1;Z.on("close",()=>{j=!0});let A=C(Z,{readable:K,writable:J},(E)=>{j=!E});return{destroy:(E)=>{j||(j=!0,L.destroyer(Z,E||new F("pipe")))},cleanup:A}}function Z0(Z){return w(Z[Z.length-1],"streams[stream.length - 1]"),Z.pop()}function X(Z){if(y(Z))return Z;if(c(Z))return O(Z);throw new z("val",["Readable","Iterable","AsyncIterable"],Z)}async function*O(Z){G0||(G0=H1()),yield*G0.prototype[R].call(Z)}async function G(Z,K,J,{end:j}){let A,E=null,_=(O0)=>{if(O0&&(A=O0),E){let o=E;E=null,o()}},s=()=>new Q((O0,o)=>{A?o(A):E=()=>{A?o(A):O0()}});K.on("drain",_);let r=C(K,{readable:!1},_);try{K.writableNeedDrain&&await s();for await(let O0 of Z)K.write(O0)||await s();j&&K.end(),await s(),J()}catch(O0){J(A!==O0?U(A,O0):O0)}finally{r(),K.off("drain",_)}}function $(...Z){return Y(Z,H(Z0(Z)))}function Y(Z,K,J){if(Z.length===1&&N(Z[0])&&(Z=Z[0]),Z.length<2)throw new q("streams");let j=new a,A=j.signal,E=J?.signal,_=[];M(E,"options.signal");function s(){U0(new x)}E?.addEventListener("abort",s);let r,O0,o=[],d=0;function f(S){U0(S,--d===0)}function U0(S,p){if(S&&(!r||r.code==="ERR_STREAM_PREMATURE_CLOSE")&&(r=S),!(!r&&!p)){for(;o.length;)o.shift()(r);E?.removeEventListener("abort",s),j.abort(),p&&(r||_.forEach((e)=>e()),V.nextTick(K,r,O0))}}let X0;for(let S=0;S0,t=e||J?.end!==!1,y0=S===Z.length-1;if(h(p)){let C0=function(W0){W0&&W0.name!=="AbortError"&&W0.code!=="ERR_STREAM_PREMATURE_CLOSE"&&f(W0)};var Y0=C0;if(t){let{destroy:W0,cleanup:_0}=n(p,e,J0);o.push(W0),m(p)&&y0&&_.push(_0)}p.on("error",C0),m(p)&&y0&&_.push(()=>{p.removeListener("error",C0)})}if(S===0)if(typeof p=="function"){if(X0=p({signal:A}),!y(X0))throw new T("Iterable, AsyncIterable or Stream","source",X0)}else y(p)||c(p)?X0=p:X0=P.from(p);else if(typeof p=="function")if(X0=X(X0),X0=p(X0,{signal:A}),e){if(!y(X0,!0))throw new T("AsyncIterable",`transform[${S-1}]`,X0)}else{var g;i||(i=n5());let C0=new i({objectMode:!0}),W0=(g=X0)===null||g===void 0?void 0:g.then;if(typeof W0=="function")d++,W0.call(X0,(Q0)=>{O0=Q0,Q0!=null&&C0.write(Q0),t&&C0.end(),V.nextTick(f)},(Q0)=>{C0.destroy(Q0),V.nextTick(f,Q0)});else if(y(X0,!0))d++,G(X0,C0,f,{end:t});else throw new T("AsyncIterable or Promise","destination",X0);X0=C0;let{destroy:_0,cleanup:P0}=n(X0,!1,!0);o.push(_0),y0&&_.push(P0)}else if(h(p)){if(c(X0)){d+=2;let C0=W(X0,p,f,{end:t});m(p)&&y0&&_.push(C0)}else if(y(X0))d++,G(X0,p,f,{end:t});else throw new z("val",["Readable","Iterable","AsyncIterable"],X0);X0=p}else X0=P.from(p)}return(A!=null&&A.aborted||E!=null&&E.aborted)&&V.nextTick(s),X0}function W(Z,K,J,{end:j}){let A=!1;return K.on("close",()=>{A||J(new I)}),Z.pipe(K,{end:j}),j?Z.once("end",()=>{A=!0,K.end()}):J(),C(Z,{readable:!0,writable:!1},(E)=>{let _=Z._readableState;E&&E.code==="ERR_STREAM_PREMATURE_CLOSE"&&_&&_.ended&&!_.errored&&!_.errorEmitted?Z.once("end",J).once("error",J):J(E)}),C(K,{readable:!1,writable:!0},J)}k.exports={pipelineImpl:Y,pipeline:$}}),v8=K0((B,k)=>{var{pipeline:V}=c1(),N=B2(),{destroyer:Q}=c2(),{isNodeStream:R,isReadable:C,isWritable:H}=v2(),{AbortError:L,codes:{ERR_INVALID_ARG_VALUE:P,ERR_MISSING_ARGS:U}}=U2();k.exports=function(...z){if(z.length===0)throw new U("streams");if(z.length===1)return N.from(z[0]);let T=[...z];if(typeof z[0]=="function"&&(z[0]=N.from(z[0])),typeof z[z.length-1]=="function"){let a=z.length-1;z[a]=N.from(z[a])}for(let a=0;a0&&!H(z[a]))throw new P(`streams[${a}]`,T[a],"must be writable")}let q,F,I,x,w;function M(a){let i=x;x=null,i?i(a):a?w.destroy(a):!h&&!c&&w.destroy()}let y=z[0],m=V(z,M),c=!!H(y),h=!!C(m);return w=new N({writableObjectMode:!!(y!=null&&y.writableObjectMode),readableObjectMode:!!(m!=null&&m.writableObjectMode),writable:c,readable:h}),c&&(w._write=function(a,i,G0){y.write(a,i)?G0():q=G0},w._final=function(a){y.end(),F=a},y.on("drain",function(){if(q){let a=q;q=null,a()}}),m.on("finish",function(){if(F){let a=F;F=null,a()}})),h&&(m.on("readable",function(){if(I){let a=I;I=null,a()}}),m.on("end",function(){w.push(null)}),w._read=function(){for(;;){let a=m.read();if(a===null){I=w._read;return}if(!w.push(a))return}}),w._destroy=function(a,i){!a&&x!==null&&(a=new L),I=null,q=null,F=null,x===null?i(a):(x=i,Q(m,a))},w}}),a5=K0((B,k)=>{var{ArrayPrototypePop:V,Promise:N}=H2(),{isIterable:Q,isNodeStream:R}=v2(),{pipelineImpl:C}=c1(),{finished:H}=A2();function L(...P){return new N((U,z)=>{let T,q,F=P[P.length-1];if(F&&typeof F=="object"&&!R(F)&&!Q(F)){let I=V(P);T=I.signal,q=I.end}C(P,(I,x)=>{I?z(I):U(x)},{signal:T,end:q})})}k.exports={finished:H,pipeline:L}}),A8=K0((B,k)=>{var{Buffer:V}=P2(),{ObjectDefineProperty:N,ObjectKeys:Q,ReflectApply:R}=H2(),{promisify:{custom:C}}=k2(),{streamReturningOperators:H,promiseReturningOperators:L}=E8(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:P}}=U2(),U=v8(),{pipeline:z}=c1(),{destroyer:T}=c2(),q=A2(),F=a5(),I=v2(),x=k.exports=g1().Stream;x.isDisturbed=I.isDisturbed,x.isErrored=I.isErrored,x.isReadable=I.isReadable,x.Readable=H1();for(let y of Q(H)){let m=function(...h){if(new.target)throw P();return x.Readable.from(R(c,this,h))};w=m;let c=H[y];N(m,"name",{__proto__:null,value:c.name}),N(m,"length",{__proto__:null,value:c.length}),N(x.Readable.prototype,y,{__proto__:null,value:m,enumerable:!1,configurable:!0,writable:!0})}var w;for(let y of Q(L)){let m=function(...h){if(new.target)throw P();return R(c,this,h)};w=m;let c=L[y];N(m,"name",{__proto__:null,value:c.name}),N(m,"length",{__proto__:null,value:c.length}),N(x.Readable.prototype,y,{__proto__:null,value:m,enumerable:!1,configurable:!0,writable:!0})}var w;x.Writable=s5(),x.Duplex=B2(),x.Transform=f5(),x.PassThrough=n5(),x.pipeline=z;var{addAbortSignal:M}=m1();x.addAbortSignal=M,x.finished=q,x.destroy=T,x.compose=U,N(x,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return F}}),N(z,C,{__proto__:null,enumerable:!0,get(){return F.pipeline}}),N(q,C,{__proto__:null,enumerable:!0,get(){return F.finished}}),x.Stream=x,x._isUint8Array=function(y){return y instanceof Uint8Array},x._uint8ArrayToBuffer=function(y){return V.from(y.buffer,y.byteOffset,y.byteLength)}}),M5=K0((B,k)=>{var V=A8(),N=a5(),Q=V.Readable.destroy;k.exports=V.Readable,k.exports._uint8ArrayToBuffer=V._uint8ArrayToBuffer,k.exports._isUint8Array=V._isUint8Array,k.exports.isDisturbed=V.isDisturbed,k.exports.isErrored=V.isErrored,k.exports.isReadable=V.isReadable,k.exports.Readable=V.Readable,k.exports.Writable=V.Writable,k.exports.Duplex=V.Duplex,k.exports.Transform=V.Transform,k.exports.PassThrough=V.PassThrough,k.exports.addAbortSignal=V.addAbortSignal,k.exports.finished=V.finished,k.exports.destroy=V.destroy,k.exports.destroy=Q,k.exports.pipeline=V.pipeline,k.exports.compose=V.compose,Object.defineProperty(V,"promises",{configurable:!0,enumerable:!0,get(){return N}}),k.exports.Stream=V.Stream,k.exports.default=k.exports}),b1={};Z1(b1,{default:()=>r5});M8=x1(()=>{S1(b1,E2(M5())),r5=E2(M5())}),I2=K0((B,k)=>{var V=h0().Buffer,N=(M8(),T2(b1)).Transform,Q=v1().StringDecoder,R=c0();function C(H){N.call(this),this.hashMode=typeof H=="string",this.hashMode?this[H]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}R(C,N),C.prototype.update=function(H,L,P){typeof H=="string"&&(H=V.from(H,L));var U=this._update(H);return this.hashMode?this:(P&&(U=this._toString(U,P)),U)},C.prototype.setAutoPadding=function(){},C.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},C.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},C.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},C.prototype._transform=function(H,L,P){var U;try{this.hashMode?this._update(H):this.push(this._update(H))}catch(z){U=z}finally{P(U)}},C.prototype._flush=function(H){var L;try{this.push(this.__final())}catch(P){L=P}H(L)},C.prototype._finalOrDigest=function(H){var L=this.__final()||V.alloc(0);return H&&(L=this._toString(L,H,!0)),L},C.prototype._toString=function(H,L,P){if(this._decoder||(this._decoder=new Q(L),this._encoding=L),this._encoding!==L)throw new Error("can't switch encodings");var U=this._decoder.write(H);return P&&(U+=this._decoder.end()),U},k.exports=C}),a2=K0((B,k)=>{var V=c0(),N=M1(),Q=w1(),R=y1(),C=I2();function H(L){C.call(this,"digest"),this._hash=L}V(H,C),H.prototype._update=function(L){this._hash.update(L)},H.prototype._final=function(){return this._hash.digest()},k.exports=function(L){return L=L.toLowerCase(),L==="md5"?new N:L==="rmd160"||L==="ripemd160"?new Q:new H(R(L))}}),w8=K0((B,k)=>{var V=c0(),N=h0().Buffer,Q=I2(),R=N.alloc(128),C=64;function H(L,P){Q.call(this,"digest"),typeof P=="string"&&(P=N.from(P)),this._alg=L,this._key=P,P.length>C?P=L(P):P.length{var V=M1();k.exports=function(N){return new V().update(N).digest()}}),t5=K0((B,k)=>{var V=c0(),N=w8(),Q=I2(),R=h0().Buffer,C=i5(),H=w1(),L=y1(),P=R.alloc(128);function U(z,T){Q.call(this,"digest"),typeof T=="string"&&(T=R.from(T));var q=z==="sha512"||z==="sha384"?128:64;if(this._alg=z,this._key=T,T.length>q){var F=z==="rmd160"?new H:L(z);T=F.update(T).digest()}else T.length{k.exports={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"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:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"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:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}}}),y8=K0((B,k)=>{k.exports=e5()}),X6=K0((B,k)=>{var V=Math.pow(2,30)-1;k.exports=function(N,Q){if(typeof N!="number")throw new TypeError("Iterations not a number");if(N<0)throw new TypeError("Bad iterations");if(typeof Q!="number")throw new TypeError("Key length not a number");if(Q<0||Q>V||Q!==Q)throw new TypeError("Bad key length")}}),J6=K0((B,k)=>{var V;global.process&&global.process.browser?V="utf-8":global.process&&global.process.version?(N=parseInt(process.version.split(".")[0].slice(1),10),V=N>=6?"utf-8":"binary"):V="utf-8";var N;k.exports=V}),O6=K0((B,k)=>{var V=h0().Buffer;k.exports=function(N,Q,R){if(V.isBuffer(N))return N;if(typeof N=="string")return V.from(N,Q);if(ArrayBuffer.isView(N))return V.from(N.buffer);throw new TypeError(R+" must be a string, a Buffer, a typed array or a DataView")}}),$6=K0((B,k)=>{var V=i5(),N=w1(),Q=y1(),R=h0().Buffer,C=X6(),H=J6(),L=O6(),P=R.alloc(128),U={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function z(F,I,x){var w=T(F),M=F==="sha512"||F==="sha384"?128:64;I.length>M?I=w(I):I.length{var V=h0().Buffer,N=X6(),Q=J6(),R=$6(),C=O6(),H,L=global.crypto&&global.crypto.subtle,P={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"},U=[];function z(x){if(global.process&&!global.process.browser||!L||!L.importKey||!L.deriveBits)return Promise.resolve(!1);if(U[x]!==void 0)return U[x];H=H||V.alloc(8);var w=F(H,H,10,128,x).then(function(){return!0}).catch(function(){return!1});return U[x]=w,w}var T;function q(){return T||(global.process&&global.process.nextTick?T=global.process.nextTick:global.queueMicrotask?T=global.queueMicrotask:global.setImmediate?T=global.setImmediate:T=global.setTimeout,T)}function F(x,w,M,y,m){return L.importKey("raw",x,{name:"PBKDF2"},!1,["deriveBits"]).then(function(c){return L.deriveBits({name:"PBKDF2",salt:w,iterations:M,hash:{name:m}},c,y<<3)}).then(function(c){return V.from(c)})}function I(x,w){x.then(function(M){q()(function(){w(null,M)})},function(M){q()(function(){w(M)})})}k.exports=function(x,w,M,y,m,c){typeof m=="function"&&(c=m,m=void 0),m=m||"sha1";var h=P[m.toLowerCase()];if(!h||typeof global.Promise!="function"){q()(function(){var a;try{a=R(x,w,M,y,m)}catch(i){return c(i)}c(null,a)});return}if(N(M,y),x=C(x,Q,"Password"),w=C(w,Q,"Salt"),typeof c!="function")throw new Error("No callback provided to pbkdf2");I(z(h).then(function(a){return a?F(x,w,M,y,h):R(x,w,M,y,m)}),c)}}),G6=K0((B)=>{B.pbkdf2=_8(),B.pbkdf2Sync=$6()}),Y6=K0((B)=>{B.readUInt32BE=function(Q,R){var C=Q[0+R]<<24|Q[1+R]<<16|Q[2+R]<<8|Q[3+R];return C>>>0},B.writeUInt32BE=function(Q,R,C){Q[0+C]=R>>>24,Q[1+C]=R>>>16&255,Q[2+C]=R>>>8&255,Q[3+C]=R&255},B.ip=function(Q,R,C,H){for(var L=0,P=0,U=6;U>=0;U-=2){for(var z=0;z<=24;z+=8)L<<=1,L|=R>>>z+U&1;for(var z=0;z<=24;z+=8)L<<=1,L|=Q>>>z+U&1}for(var U=6;U>=0;U-=2){for(var z=1;z<=25;z+=8)P<<=1,P|=R>>>z+U&1;for(var z=1;z<=25;z+=8)P<<=1,P|=Q>>>z+U&1}C[H+0]=L>>>0,C[H+1]=P>>>0},B.rip=function(Q,R,C,H){for(var L=0,P=0,U=0;U<4;U++)for(var z=24;z>=0;z-=8)L<<=1,L|=R>>>z+U&1,L<<=1,L|=Q>>>z+U&1;for(var U=4;U<8;U++)for(var z=24;z>=0;z-=8)P<<=1,P|=R>>>z+U&1,P<<=1,P|=Q>>>z+U&1;C[H+0]=L>>>0,C[H+1]=P>>>0},B.pc1=function(Q,R,C,H){for(var L=0,P=0,U=7;U>=5;U--){for(var z=0;z<=24;z+=8)L<<=1,L|=R>>z+U&1;for(var z=0;z<=24;z+=8)L<<=1,L|=Q>>z+U&1}for(var z=0;z<=24;z+=8)L<<=1,L|=R>>z+U&1;for(var U=1;U<=3;U++){for(var z=0;z<=24;z+=8)P<<=1,P|=R>>z+U&1;for(var z=0;z<=24;z+=8)P<<=1,P|=Q>>z+U&1}for(var z=0;z<=24;z+=8)P<<=1,P|=Q>>z+U&1;C[H+0]=L>>>0,C[H+1]=P>>>0},B.r28shl=function(Q,R){return Q<>>28-R};var k=[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];B.pc2=function(Q,R,C,H){for(var L=0,P=0,U=k.length>>>1,z=0;z>>k[z]&1;for(var z=U;z>>k[z]&1;C[H+0]=L>>>0,C[H+1]=P>>>0},B.expand=function(Q,R,C){var H=0,L=0;H=(Q&1)<<5|Q>>>27;for(var P=23;P>=15;P-=4)H<<=6,H|=Q>>>P&63;for(var P=11;P>=3;P-=4)L|=Q>>>P&63,L<<=6;L|=(Q&31)<<1|Q>>>31,R[C+0]=H>>>0,R[C+1]=L>>>0};var V=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];B.substitute=function(Q,R){for(var C=0,H=0;H<4;H++){var L=Q>>>18-H*6&63,P=V[H*64+L];C<<=4,C|=P}for(var H=0;H<4;H++){var L=R>>>18-H*6&63,P=V[256+H*64+L];C<<=4,C|=P}return C>>>0};var N=[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];B.permute=function(Q){for(var R=0,C=0;C>>N[C]&1;return R>>>0},B.padSplit=function(Q,R,C){for(var H=Q.toString(2);H.length{k.exports=V;function V(N,Q){if(!N)throw new Error(Q||"Assertion failed")}V.equal=function(N,Q,R){if(N!=Q)throw new Error(R||"Assertion failed: "+N+" != "+Q)}}),d1=K0((B,k)=>{var V=D2();function N(Q){this.options=Q,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}k.exports=N,N.prototype._init=function(){},N.prototype.update=function(Q){return Q.length===0?[]:this.type==="decrypt"?this._updateDecrypt(Q):this._updateEncrypt(Q)},N.prototype._buffer=function(Q,R){for(var C=Math.min(this.buffer.length-this.bufferOff,Q.length-R),H=0;H0;H--)R+=this._buffer(Q,R),C+=this._flushBuffer(L,C);return R+=this._buffer(Q,R),L},N.prototype.final=function(Q){var R;Q&&(R=this.update(Q));var C;return this.type==="encrypt"?C=this._finalEncrypt():C=this._finalDecrypt(),R?R.concat(C):C},N.prototype._pad=function(Q,R){if(R===0)return!1;for(;R{var V=D2(),N=c0(),Q=Y6(),R=d1();function C(){this.tmp=new Array(2),this.keys=null}function H(P){R.call(this,P);var U=new C;this._desState=U,this.deriveKeys(U,P.key)}N(H,R),k.exports=H,H.create=function(P){return new H(P)};var L=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];H.prototype.deriveKeys=function(P,U){P.keys=new Array(32),V.equal(U.length,this.blockSize,"Invalid key length");var z=Q.readUInt32BE(U,0),T=Q.readUInt32BE(U,4);Q.pc1(z,T,P.tmp,0),z=P.tmp[0],T=P.tmp[1];for(var q=0;q>>1];z=Q.r28shl(z,F),T=Q.r28shl(T,F),Q.pc2(z,T,P.keys,q)}},H.prototype._update=function(P,U,z,T){var q=this._desState,F=Q.readUInt32BE(P,U),I=Q.readUInt32BE(P,U+4);Q.ip(F,I,q.tmp,0),F=q.tmp[0],I=q.tmp[1],this.type==="encrypt"?this._encrypt(q,F,I,q.tmp,0):this._decrypt(q,F,I,q.tmp,0),F=q.tmp[0],I=q.tmp[1],Q.writeUInt32BE(z,F,T),Q.writeUInt32BE(z,I,T+4)},H.prototype._pad=function(P,U){for(var z=P.length-U,T=U;T>>0,F=c}Q.rip(I,F,T,q)},H.prototype._decrypt=function(P,U,z,T,q){for(var F=z,I=U,x=P.keys.length-2;x>=0;x-=2){var w=P.keys[x],M=P.keys[x+1];Q.expand(F,P.tmp,0),w^=P.tmp[0],M^=P.tmp[1];var y=Q.substitute(w,M),m=Q.permute(y),c=F;F=(I^m)>>>0,I=c}Q.rip(F,I,T,q)}}),g8=K0((B)=>{var k=D2(),V=c0(),N={};function Q(C){k.equal(C.length,8,"Invalid IV length"),this.iv=new Array(8);for(var H=0;H{var V=D2(),N=c0(),Q=d1(),R=C6();function C(L,P){V.equal(P.length,24,"Invalid key length");var U=P.slice(0,8),z=P.slice(8,16),T=P.slice(16,24);L==="encrypt"?this.ciphers=[R.create({type:"encrypt",key:U}),R.create({type:"decrypt",key:z}),R.create({type:"encrypt",key:T})]:this.ciphers=[R.create({type:"decrypt",key:T}),R.create({type:"encrypt",key:z}),R.create({type:"decrypt",key:U})]}function H(L){Q.call(this,L);var P=new C(this.type,this.options.key);this._edeState=P}N(H,Q),k.exports=H,H.create=function(L){return new H(L)},H.prototype._update=function(L,P,U,z){var T=this._edeState;T.ciphers[0]._update(L,P,U,z),T.ciphers[1]._update(U,z,U,z),T.ciphers[2]._update(U,z,U,z)},H.prototype._pad=R.prototype._pad,H.prototype._unpad=R.prototype._unpad}),p8=K0((B)=>{B.utils=Y6(),B.Cipher=d1(),B.DES=C6(),B.CBC=g8(),B.EDE=m8()}),c8=K0((B,k)=>{var V=I2(),N=p8(),Q=c0(),R=h0().Buffer,C={"des-ede3-cbc":N.CBC.instantiate(N.EDE),"des-ede3":N.EDE,"des-ede-cbc":N.CBC.instantiate(N.EDE),"des-ede":N.EDE,"des-cbc":N.CBC.instantiate(N.DES),"des-ecb":N.DES};C.des=C["des-cbc"],C.des3=C["des-ede3-cbc"],k.exports=H,Q(H,V);function H(L){V.call(this);var P=L.mode.toLowerCase(),U=C[P],z;L.decrypt?z="decrypt":z="encrypt";var T=L.key;R.isBuffer(T)||(T=R.from(T)),(P==="des-ede"||P==="des-ede-cbc")&&(T=R.concat([T,T.slice(0,8)]));var q=L.iv;R.isBuffer(q)||(q=R.from(q)),this._des=U.create({key:T,iv:q,type:z})}H.prototype._update=function(L){return R.from(this._des.update(L))},H.prototype._final=function(){return R.from(this._des.final())}}),b8=K0((B)=>{B.encrypt=function(k,V){return k._cipher.encryptBlock(V)},B.decrypt=function(k,V){return k._cipher.decryptBlock(V)}}),r2=K0((B,k)=>{k.exports=function(V,N){for(var Q=Math.min(V.length,N.length),R=new Buffer(Q),C=0;C{var k=r2();B.encrypt=function(V,N){var Q=k(N,V._prev);return V._prev=V._cipher.encryptBlock(Q),V._prev},B.decrypt=function(V,N){var Q=V._prev;V._prev=N;var R=V._cipher.decryptBlock(N);return k(R,Q)}}),h8=K0((B)=>{var k=h0().Buffer,V=r2();function N(Q,R,C){var H=R.length,L=V(R,Q._cache);return Q._cache=Q._cache.slice(H),Q._prev=k.concat([Q._prev,C?R:L]),L}B.encrypt=function(Q,R,C){for(var H=k.allocUnsafe(0),L;R.length;)if(Q._cache.length===0&&(Q._cache=Q._cipher.encryptBlock(Q._prev),Q._prev=k.allocUnsafe(0)),Q._cache.length<=R.length)L=Q._cache.length,H=k.concat([H,N(Q,R.slice(0,L),C)]),R=R.slice(L);else{H=k.concat([H,N(Q,R,C)]);break}return H}}),l8=K0((B)=>{var k=h0().Buffer;function V(N,Q,R){var C=N._cipher.encryptBlock(N._prev),H=C[0]^Q;return N._prev=k.concat([N._prev.slice(1),k.from([R?Q:H])]),H}B.encrypt=function(N,Q,R){for(var C=Q.length,H=k.allocUnsafe(C),L=-1;++L{var k=h0().Buffer;function V(Q,R,C){for(var H,L=-1,P=8,U=0,z,T;++L>L%8,Q._prev=N(Q._prev,C?z:T);return U}function N(Q,R){var C=Q.length,H=-1,L=k.allocUnsafe(Q.length);for(Q=k.concat([Q,k.from([R])]);++H>7;return L}B.encrypt=function(Q,R,C){for(var H=R.length,L=k.allocUnsafe(H),P=-1;++P{var k=r2();function V(N){return N._prev=N._cipher.encryptBlock(N._prev),N._prev}B.encrypt=function(N,Q){for(;N._cache.length{function V(N){for(var Q=N.length,R;Q--;)if(R=N.readUInt8(Q),R===255)N.writeUInt8(0,Q);else{R++,N.writeUInt8(R,Q);break}}k.exports=V}),w5=K0((B)=>{var k=r2(),V=h0().Buffer,N=K6();function Q(C){var H=C._cipher.encryptBlockRaw(C._prev);return N(C._prev),H}var R=16;B.encrypt=function(C,H){var L=Math.ceil(H.length/R),P=C._cache.length;C._cache=V.concat([C._cache,V.allocUnsafe(L*R)]);for(var U=0;U{k.exports={"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:{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192:{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256:{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},"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"}}}),h1=K0((B,k)=>{var V={ECB:b8(),CBC:d8(),CFB:h8(),CFB8:l8(),CFB1:o8(),OFB:u8(),CTR:w5(),GCM:w5()},N=j6();for(Q in N)N[Q].module=V[N[Q].mode];var Q;k.exports=N}),V1=K0((B,k)=>{var V=h0().Buffer;function N(P){V.isBuffer(P)||(P=V.from(P));for(var U=P.length/4|0,z=new Array(U),T=0;T>>24]^I[y>>>16&255]^x[m>>>8&255]^w[c&255]^U[n++],a=F[y>>>24]^I[m>>>16&255]^x[c>>>8&255]^w[M&255]^U[n++],i=F[m>>>24]^I[c>>>16&255]^x[M>>>8&255]^w[y&255]^U[n++],G0=F[c>>>24]^I[M>>>16&255]^x[y>>>8&255]^w[m&255]^U[n++],M=h,y=a,m=i,c=G0;return h=(T[M>>>24]<<24|T[y>>>16&255]<<16|T[m>>>8&255]<<8|T[c&255])^U[n++],a=(T[y>>>24]<<24|T[m>>>16&255]<<16|T[c>>>8&255]<<8|T[M&255])^U[n++],i=(T[m>>>24]<<24|T[c>>>16&255]<<16|T[M>>>8&255]<<8|T[y&255])^U[n++],G0=(T[c>>>24]<<24|T[M>>>16&255]<<16|T[y>>>8&255]<<8|T[m&255])^U[n++],h=h>>>0,a=a>>>0,i=i>>>0,G0=G0>>>0,[h,a,i,G0]}var C=[0,1,2,4,8,16,32,64,128,27,54],H=function(){for(var P=new Array(256),U=0;U<256;U++)U<128?P[U]=U<<1:P[U]=U<<1^283;for(var z=[],T=[],q=[[],[],[],[]],F=[[],[],[],[]],I=0,x=0,w=0;w<256;++w){var M=x^x<<1^x<<2^x<<3^x<<4;M=M>>>8^M&255^99,z[I]=M,T[M]=I;var y=P[I],m=P[y],c=P[m],h=P[M]*257^M*16843008;q[0][I]=h<<24|h>>>8,q[1][I]=h<<16|h>>>16,q[2][I]=h<<8|h>>>24,q[3][I]=h,h=c*16843009^m*65537^y*257^I*16843008,F[0][M]=h<<24|h>>>8,F[1][M]=h<<16|h>>>16,F[2][M]=h<<8|h>>>24,F[3][M]=h,I===0?I=x=1:(I=y^P[P[P[c^y]]],x^=P[P[x]])}return{SBOX:z,INV_SBOX:T,SUB_MIX:q,INV_SUB_MIX:F}}();function L(P){this._key=N(P),this._reset()}L.blockSize=16,L.keySize=32,L.prototype.blockSize=L.blockSize,L.prototype.keySize=L.keySize,L.prototype._reset=function(){for(var P=this._key,U=P.length,z=U+6,T=(z+1)*4,q=[],F=0;F>>24,I=H.SBOX[I>>>24]<<24|H.SBOX[I>>>16&255]<<16|H.SBOX[I>>>8&255]<<8|H.SBOX[I&255],I^=C[F/U|0]<<24):U>6&&F%U===4&&(I=H.SBOX[I>>>24]<<24|H.SBOX[I>>>16&255]<<16|H.SBOX[I>>>8&255]<<8|H.SBOX[I&255]),q[F]=q[F-U]^I}for(var x=[],w=0;w>>24]]^H.INV_SUB_MIX[1][H.SBOX[y>>>16&255]]^H.INV_SUB_MIX[2][H.SBOX[y>>>8&255]]^H.INV_SUB_MIX[3][H.SBOX[y&255]]}this._nRounds=z,this._keySchedule=q,this._invKeySchedule=x},L.prototype.encryptBlockRaw=function(P){return P=N(P),R(P,this._keySchedule,H.SUB_MIX,H.SBOX,this._nRounds)},L.prototype.encryptBlock=function(P){var U=this.encryptBlockRaw(P),z=V.allocUnsafe(16);return z.writeUInt32BE(U[0],0),z.writeUInt32BE(U[1],4),z.writeUInt32BE(U[2],8),z.writeUInt32BE(U[3],12),z},L.prototype.decryptBlock=function(P){P=N(P);var U=P[1];P[1]=P[3],P[3]=U;var z=R(P,this._invKeySchedule,H.INV_SUB_MIX,H.INV_SBOX,this._nRounds),T=V.allocUnsafe(16);return T.writeUInt32BE(z[0],0),T.writeUInt32BE(z[3],4),T.writeUInt32BE(z[2],8),T.writeUInt32BE(z[1],12),T},L.prototype.scrub=function(){Q(this._keySchedule),Q(this._invKeySchedule),Q(this._key)},k.exports.AES=L}),s8=K0((B,k)=>{var V=h0().Buffer,N=V.alloc(16,0);function Q(H){return[H.readUInt32BE(0),H.readUInt32BE(4),H.readUInt32BE(8),H.readUInt32BE(12)]}function R(H){var L=V.allocUnsafe(16);return L.writeUInt32BE(H[0]>>>0,0),L.writeUInt32BE(H[1]>>>0,4),L.writeUInt32BE(H[2]>>>0,8),L.writeUInt32BE(H[3]>>>0,12),L}function C(H){this.h=H,this.state=V.alloc(16,0),this.cache=V.allocUnsafe(0)}C.prototype.ghash=function(H){for(var L=-1;++L0;P--)H[P]=H[P]>>>1|(H[P-1]&1)<<31;H[0]=H[0]>>>1,z&&(H[0]=H[0]^-520093696)}this.state=R(L)},C.prototype.update=function(H){this.cache=V.concat([this.cache,H]);for(var L;this.cache.length>=16;)L=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(L)},C.prototype.final=function(H,L){return this.cache.length&&this.ghash(V.concat([this.cache,N],16)),this.ghash(R([0,H,0,L])),this.state},k.exports=C}),W6=K0((B,k)=>{var V=V1(),N=h0().Buffer,Q=I2(),R=c0(),C=s8(),H=r2(),L=K6();function P(T,q){var F=0;T.length!==q.length&&F++;for(var I=Math.min(T.length,q.length),x=0;x{var V=V1(),N=h0().Buffer,Q=I2(),R=c0();function C(H,L,P,U){Q.call(this),this._cipher=new V.AES(L),this._prev=N.from(P),this._cache=N.allocUnsafe(0),this._secCache=N.allocUnsafe(0),this._decrypt=U,this._mode=H}R(C,Q),C.prototype._update=function(H){return this._mode.encrypt(this,H,this._decrypt)},C.prototype._final=function(){this._cipher.scrub()},k.exports=C}),P1=K0((B,k)=>{var V=h0().Buffer,N=M1();function Q(R,C,H,L){if(V.isBuffer(R)||(R=V.from(R,"binary")),C&&(V.isBuffer(C)||(C=V.from(C,"binary")),C.length!==8))throw new RangeError("salt should be Buffer with 8 byte length");for(var P=H/8,U=V.alloc(P),z=V.alloc(L||0),T=V.alloc(0);P>0||L>0;){var q=new N;q.update(T),q.update(R),C&&q.update(C),T=q.digest();var F=0;if(P>0){var I=U.length-P;F=Math.min(P,T.length),T.copy(U,I,0,F),P-=F}if(F0){var x=z.length-L,w=Math.min(L,T.length-F);T.copy(z,x,F,F+w),L-=w}}return T.fill(0),{key:U,iv:z}}k.exports=Q}),f8=K0((B)=>{var k=h1(),V=W6(),N=h0().Buffer,Q=Z6(),R=I2(),C=V1(),H=P1(),L=c0();function P(F,I,x){R.call(this),this._cache=new z,this._cipher=new C.AES(I),this._prev=N.from(x),this._mode=F,this._autopadding=!0}L(P,R),P.prototype._update=function(F){this._cache.add(F);for(var I,x,w=[];I=this._cache.get();)x=this._mode.encrypt(this,I),w.push(x);return N.concat(w)};var U=N.alloc(16,16);P.prototype._final=function(){var F=this._cache.flush();if(this._autopadding)return F=this._mode.encrypt(this,F),this._cipher.scrub(),F;if(!F.equals(U))throw this._cipher.scrub(),new Error("data not multiple of block length")},P.prototype.setAutoPadding=function(F){return this._autopadding=!!F,this};function z(){this.cache=N.allocUnsafe(0)}z.prototype.add=function(F){this.cache=N.concat([this.cache,F])},z.prototype.get=function(){if(this.cache.length>15){var F=this.cache.slice(0,16);return this.cache=this.cache.slice(16),F}return null},z.prototype.flush=function(){for(var F=16-this.cache.length,I=N.allocUnsafe(F),x=-1;++x{var k=W6(),V=h0().Buffer,N=h1(),Q=Z6(),R=I2(),C=V1(),H=P1(),L=c0();function P(F,I,x){R.call(this),this._cache=new U,this._last=void 0,this._cipher=new C.AES(I),this._prev=V.from(x),this._mode=F,this._autopadding=!0}L(P,R),P.prototype._update=function(F){this._cache.add(F);for(var I,x,w=[];I=this._cache.get(this._autopadding);)x=this._mode.decrypt(this,I),w.push(x);return V.concat(w)},P.prototype._final=function(){var F=this._cache.flush();if(this._autopadding)return z(this._mode.decrypt(this,F));if(F)throw new Error("data not multiple of block length")},P.prototype.setAutoPadding=function(F){return this._autopadding=!!F,this};function U(){this.cache=V.allocUnsafe(0)}U.prototype.add=function(F){this.cache=V.concat([this.cache,F])},U.prototype.get=function(F){var I;if(F){if(this.cache.length>16)return I=this.cache.slice(0,16),this.cache=this.cache.slice(16),I}else if(this.cache.length>=16)return I=this.cache.slice(0,16),this.cache=this.cache.slice(16),I;return null},U.prototype.flush=function(){if(this.cache.length)return this.cache};function z(F){var I=F[15];if(I<1||I>16)throw new Error("unable to decrypt data");for(var x=-1;++x{var k=f8(),V=n8(),N=j6();function Q(){return Object.keys(N)}B.createCipher=B.Cipher=k.createCipher,B.createCipheriv=B.Cipheriv=k.createCipheriv,B.createDecipher=B.Decipher=V.createDecipher,B.createDecipheriv=B.Decipheriv=V.createDecipheriv,B.listCiphers=B.getCiphers=Q}),a8=K0((B)=>{B["des-ecb"]={key:8,iv:0},B["des-cbc"]=B.des={key:8,iv:8},B["des-ede3-cbc"]=B.des3={key:24,iv:8},B["des-ede3"]={key:24,iv:0},B["des-ede-cbc"]={key:16,iv:8},B["des-ede"]={key:16,iv:0}}),r8=K0((B)=>{var k=c8(),V=l1(),N=h1(),Q=a8(),R=P1();function C(z,T){z=z.toLowerCase();var q,F;if(N[z])q=N[z].key,F=N[z].iv;else if(Q[z])q=Q[z].key*8,F=Q[z].iv;else throw new TypeError("invalid suite type");var I=R(T,!1,q,F);return L(z,I.key,I.iv)}function H(z,T){z=z.toLowerCase();var q,F;if(N[z])q=N[z].key,F=N[z].iv;else if(Q[z])q=Q[z].key*8,F=Q[z].iv;else throw new TypeError("invalid suite type");var I=R(T,!1,q,F);return P(z,I.key,I.iv)}function L(z,T,q){if(z=z.toLowerCase(),N[z])return V.createCipheriv(z,T,q);if(Q[z])return new k({key:T,iv:q,mode:z});throw new TypeError("invalid suite type")}function P(z,T,q){if(z=z.toLowerCase(),N[z])return V.createDecipheriv(z,T,q);if(Q[z])return new k({key:T,iv:q,mode:z,decrypt:!0});throw new TypeError("invalid suite type")}function U(){return Object.keys(Q).concat(V.getCiphers())}B.createCipher=B.Cipher=C,B.createCipheriv=B.Cipheriv=L,B.createDecipher=B.Decipher=H,B.createDecipheriv=B.Decipheriv=P,B.listCiphers=B.getCiphers=U}),M2=K0(()=>{}),Q6=K0((B,k)=>{(function(V,N){function Q(X,O){if(!X)throw new Error(O||"Assertion failed")}function R(X,O){X.super_=O;var G=function(){};G.prototype=O.prototype,X.prototype=new G,X.prototype.constructor=X}function C(X,O,G){if(C.isBN(X))return X;this.negative=0,this.words=null,this.length=0,this.red=null,X!==null&&((O==="le"||O==="be")&&(G=O,O=10),this._init(X||0,O||10,G||"be"))}typeof V=="object"?V.exports=C:N.BN=C,C.BN=C,C.wordSize=26;var H;try{typeof window<"u"&&typeof window.Buffer<"u"?H=window.Buffer:H=M2().Buffer}catch{}C.isBN=function(X){return X instanceof C?!0:X!==null&&typeof X=="object"&&X.constructor.wordSize===C.wordSize&&Array.isArray(X.words)},C.max=function(X,O){return X.cmp(O)>0?X:O},C.min=function(X,O){return X.cmp(O)<0?X:O},C.prototype._init=function(X,O,G){if(typeof X=="number")return this._initNumber(X,O,G);if(typeof X=="object")return this._initArray(X,O,G);O==="hex"&&(O=16),Q(O===(O|0)&&O>=2&&O<=36),X=X.toString().replace(/\s+/g,"");var $=0;X[0]==="-"&&($++,this.negative=1),$=0;$-=3)W=X[$]|X[$-1]<<8|X[$-2]<<16,this.words[Y]|=W<>>26-Z&67108863,Z+=24,Z>=26&&(Z-=26,Y++);else if(G==="le")for($=0,Y=0;$>>26-Z&67108863,Z+=24,Z>=26&&(Z-=26,Y++);return this.strip()};function L(X,O){var G=X.charCodeAt(O);return G>=65&&G<=70?G-55:G>=97&&G<=102?G-87:G-48&15}function P(X,O,G){var $=L(X,G);return G-1>=O&&($|=L(X,G-1)<<4),$}C.prototype._parseHex=function(X,O,G){this.length=Math.ceil((X.length-O)/6),this.words=new Array(this.length);for(var $=0;$=O;$-=2)Z=P(X,O,$)<=18?(Y-=18,W+=1,this.words[W]|=Z>>>26):Y+=8;else{var K=X.length-O;for($=K%2===0?O+1:O;$=18?(Y-=18,W+=1,this.words[W]|=Z>>>26):Y+=8}this.strip()};function U(X,O,G,$){for(var Y=0,W=Math.min(X.length,G),Z=O;Z=49?Y+=K-49+10:K>=17?Y+=K-17+10:Y+=K}return Y}C.prototype._parseBase=function(X,O,G){this.words=[0],this.length=1;for(var $=0,Y=1;Y<=67108863;Y*=O)$++;$--,Y=Y/O|0;for(var W=X.length-G,Z=W%$,K=Math.min(W,W-Z)+G,J=0,j=G;j1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},C.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},C.prototype.inspect=function(){return(this.red?""};var z=["","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"],T=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],q=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];C.prototype.toString=function(X,O){X=X||10,O=O|0||1;var G;if(X===16||X==="hex"){G="";for(var $=0,Y=0,W=0;W>>24-$&16777215,Y!==0||W!==this.length-1?G=z[6-K.length]+K+G:G=K+G,$+=2,$>=26&&($-=26,W--)}for(Y!==0&&(G=Y.toString(16)+G);G.length%O!==0;)G="0"+G;return this.negative!==0&&(G="-"+G),G}if(X===(X|0)&&X>=2&&X<=36){var J=T[X],j=q[X];G="";var A=this.clone();for(A.negative=0;!A.isZero();){var E=A.modn(j).toString(X);A=A.idivn(j),A.isZero()?G=E+G:G=z[J-E.length]+E+G}for(this.isZero()&&(G="0"+G);G.length%O!==0;)G="0"+G;return this.negative!==0&&(G="-"+G),G}Q(!1,"Base should be between 2 and 36")},C.prototype.toNumber=function(){var X=this.words[0];return this.length===2?X+=this.words[1]*67108864:this.length===3&&this.words[2]===1?X+=4503599627370496+this.words[1]*67108864:this.length>2&&Q(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-X:X},C.prototype.toJSON=function(){return this.toString(16)},C.prototype.toBuffer=function(X,O){return Q(typeof H<"u"),this.toArrayLike(H,X,O)},C.prototype.toArray=function(X,O){return this.toArrayLike(Array,X,O)},C.prototype.toArrayLike=function(X,O,G){var $=this.byteLength(),Y=G||Math.max(1,$);Q($<=Y,"byte array longer than desired length"),Q(Y>0,"Requested array length <= 0"),this.strip();var W=O==="le",Z=new X(Y),K,J,j=this.clone();if(W){for(J=0;!j.isZero();J++)K=j.andln(255),j.iushrn(8),Z[J]=K;for(;J=4096&&(G+=13,O>>>=13),O>=64&&(G+=7,O>>>=7),O>=8&&(G+=4,O>>>=4),O>=2&&(G+=2,O>>>=2),G+O},C.prototype._zeroBits=function(X){if(X===0)return 26;var O=X,G=0;return(O&8191)===0&&(G+=13,O>>>=13),(O&127)===0&&(G+=7,O>>>=7),(O&15)===0&&(G+=4,O>>>=4),(O&3)===0&&(G+=2,O>>>=2),(O&1)===0&&G++,G},C.prototype.bitLength=function(){var X=this.words[this.length-1],O=this._countBits(X);return(this.length-1)*26+O};function F(X){for(var O=new Array(X.bitLength()),G=0;G>>Y}return O}C.prototype.zeroBits=function(){if(this.isZero())return 0;for(var X=0,O=0;OX.length?this.clone().ior(X):X.clone().ior(this)},C.prototype.uor=function(X){return this.length>X.length?this.clone().iuor(X):X.clone().iuor(this)},C.prototype.iuand=function(X){var O;this.length>X.length?O=X:O=this;for(var G=0;GX.length?this.clone().iand(X):X.clone().iand(this)},C.prototype.uand=function(X){return this.length>X.length?this.clone().iuand(X):X.clone().iuand(this)},C.prototype.iuxor=function(X){var O,G;this.length>X.length?(O=this,G=X):(O=X,G=this);for(var $=0;$X.length?this.clone().ixor(X):X.clone().ixor(this)},C.prototype.uxor=function(X){return this.length>X.length?this.clone().iuxor(X):X.clone().iuxor(this)},C.prototype.inotn=function(X){Q(typeof X=="number"&&X>=0);var O=Math.ceil(X/26)|0,G=X%26;this._expand(O),G>0&&O--;for(var $=0;$0&&(this.words[$]=~this.words[$]&67108863>>26-G),this.strip()},C.prototype.notn=function(X){return this.clone().inotn(X)},C.prototype.setn=function(X,O){Q(typeof X=="number"&&X>=0);var G=X/26|0,$=X%26;return this._expand(G+1),O?this.words[G]=this.words[G]|1<<$:this.words[G]=this.words[G]&~(1<<$),this.strip()},C.prototype.iadd=function(X){var O;if(this.negative!==0&&X.negative===0)return this.negative=0,O=this.isub(X),this.negative^=1,this._normSign();if(this.negative===0&&X.negative!==0)return X.negative=0,O=this.isub(X),X.negative=1,O._normSign();var G,$;this.length>X.length?(G=this,$=X):(G=X,$=this);for(var Y=0,W=0;W<$.length;W++)O=(G.words[W]|0)+($.words[W]|0)+Y,this.words[W]=O&67108863,Y=O>>>26;for(;Y!==0&&W>>26;if(this.length=G.length,Y!==0)this.words[this.length]=Y,this.length++;else if(G!==this)for(;WX.length?this.clone().iadd(X):X.clone().iadd(this)},C.prototype.isub=function(X){if(X.negative!==0){X.negative=0;var O=this.iadd(X);return X.negative=1,O._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(X),this.negative=1,this._normSign();var G=this.cmp(X);if(G===0)return this.negative=0,this.length=1,this.words[0]=0,this;var $,Y;G>0?($=this,Y=X):($=X,Y=this);for(var W=0,Z=0;Z>26,this.words[Z]=O&67108863;for(;W!==0&&Z<$.length;Z++)O=($.words[Z]|0)+W,W=O>>26,this.words[Z]=O&67108863;if(W===0&&Z<$.length&&$!==this)for(;Z<$.length;Z++)this.words[Z]=$.words[Z];return this.length=Math.max(this.length,Z),$!==this&&(this.negative=1),this.strip()},C.prototype.sub=function(X){return this.clone().isub(X)};function I(X,O,G){G.negative=O.negative^X.negative;var $=X.length+O.length|0;G.length=$,$=$-1|0;var Y=X.words[0]|0,W=O.words[0]|0,Z=Y*W,K=Z&67108863,J=Z/67108864|0;G.words[0]=K;for(var j=1;j<$;j++){for(var A=J>>>26,E=J&67108863,_=Math.min(j,O.length-1),s=Math.max(0,j-X.length+1);s<=_;s++){var r=j-s|0;Y=X.words[r]|0,W=O.words[s]|0,Z=Y*W+E,A+=Z/67108864|0,E=Z&67108863}G.words[j]=E|0,J=A|0}return J!==0?G.words[j]=J|0:G.length--,G.strip()}var x=function(X,O,G){var $=X.words,Y=O.words,W=G.words,Z=0,K,J,j,A=$[0]|0,E=A&8191,_=A>>>13,s=$[1]|0,r=s&8191,O0=s>>>13,o=$[2]|0,d=o&8191,f=o>>>13,U0=$[3]|0,X0=U0&8191,Y0=U0>>>13,g=$[4]|0,S=g&8191,p=g>>>13,e=$[5]|0,J0=e&8191,t=e>>>13,y0=$[6]|0,C0=y0&8191,W0=y0>>>13,_0=$[7]|0,P0=_0&8191,Q0=_0>>>13,d0=$[8]|0,D=d0&8191,v=d0>>>13,b=$[9]|0,l=b&8191,u=b>>>13,F0=Y[0]|0,$0=F0&8191,z0=F0>>>13,b0=Y[1]|0,V0=b0&8191,H0=b0>>>13,g0=Y[2]|0,N0=g0&8191,L0=g0>>>13,K2=Y[3]|0,D0=K2&8191,T0=K2>>>13,l0=Y[4]|0,k0=l0&8191,B0=l0>>>13,j2=Y[5]|0,R0=j2&8191,q0=j2>>>13,W2=Y[6]|0,I0=W2&8191,E0=W2>>>13,Z2=Y[7]|0,x0=Z2&8191,S0=Z2>>>13,Q2=Y[8]|0,v0=Q2&8191,A0=Q2>>>13,z2=Y[9]|0,M0=z2&8191,w0=z2>>>13;G.negative=X.negative^O.negative,G.length=19,K=Math.imul(E,$0),J=Math.imul(E,z0),J=J+Math.imul(_,$0)|0,j=Math.imul(_,z0);var C2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(C2>>>26)|0,C2&=67108863,K=Math.imul(r,$0),J=Math.imul(r,z0),J=J+Math.imul(O0,$0)|0,j=Math.imul(O0,z0),K=K+Math.imul(E,V0)|0,J=J+Math.imul(E,H0)|0,J=J+Math.imul(_,V0)|0,j=j+Math.imul(_,H0)|0;var m0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(m0>>>26)|0,m0&=67108863,K=Math.imul(d,$0),J=Math.imul(d,z0),J=J+Math.imul(f,$0)|0,j=Math.imul(f,z0),K=K+Math.imul(r,V0)|0,J=J+Math.imul(r,H0)|0,J=J+Math.imul(O0,V0)|0,j=j+Math.imul(O0,H0)|0,K=K+Math.imul(E,N0)|0,J=J+Math.imul(E,L0)|0,J=J+Math.imul(_,N0)|0,j=j+Math.imul(_,L0)|0;var p0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(p0>>>26)|0,p0&=67108863,K=Math.imul(X0,$0),J=Math.imul(X0,z0),J=J+Math.imul(Y0,$0)|0,j=Math.imul(Y0,z0),K=K+Math.imul(d,V0)|0,J=J+Math.imul(d,H0)|0,J=J+Math.imul(f,V0)|0,j=j+Math.imul(f,H0)|0,K=K+Math.imul(r,N0)|0,J=J+Math.imul(r,L0)|0,J=J+Math.imul(O0,N0)|0,j=j+Math.imul(O0,L0)|0,K=K+Math.imul(E,D0)|0,J=J+Math.imul(E,T0)|0,J=J+Math.imul(_,D0)|0,j=j+Math.imul(_,T0)|0;var o0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(o0>>>26)|0,o0&=67108863,K=Math.imul(S,$0),J=Math.imul(S,z0),J=J+Math.imul(p,$0)|0,j=Math.imul(p,z0),K=K+Math.imul(X0,V0)|0,J=J+Math.imul(X0,H0)|0,J=J+Math.imul(Y0,V0)|0,j=j+Math.imul(Y0,H0)|0,K=K+Math.imul(d,N0)|0,J=J+Math.imul(d,L0)|0,J=J+Math.imul(f,N0)|0,j=j+Math.imul(f,L0)|0,K=K+Math.imul(r,D0)|0,J=J+Math.imul(r,T0)|0,J=J+Math.imul(O0,D0)|0,j=j+Math.imul(O0,T0)|0,K=K+Math.imul(E,k0)|0,J=J+Math.imul(E,B0)|0,J=J+Math.imul(_,k0)|0,j=j+Math.imul(_,B0)|0;var u0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(u0>>>26)|0,u0&=67108863,K=Math.imul(J0,$0),J=Math.imul(J0,z0),J=J+Math.imul(t,$0)|0,j=Math.imul(t,z0),K=K+Math.imul(S,V0)|0,J=J+Math.imul(S,H0)|0,J=J+Math.imul(p,V0)|0,j=j+Math.imul(p,H0)|0,K=K+Math.imul(X0,N0)|0,J=J+Math.imul(X0,L0)|0,J=J+Math.imul(Y0,N0)|0,j=j+Math.imul(Y0,L0)|0,K=K+Math.imul(d,D0)|0,J=J+Math.imul(d,T0)|0,J=J+Math.imul(f,D0)|0,j=j+Math.imul(f,T0)|0,K=K+Math.imul(r,k0)|0,J=J+Math.imul(r,B0)|0,J=J+Math.imul(O0,k0)|0,j=j+Math.imul(O0,B0)|0,K=K+Math.imul(E,R0)|0,J=J+Math.imul(E,q0)|0,J=J+Math.imul(_,R0)|0,j=j+Math.imul(_,q0)|0;var s0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(s0>>>26)|0,s0&=67108863,K=Math.imul(C0,$0),J=Math.imul(C0,z0),J=J+Math.imul(W0,$0)|0,j=Math.imul(W0,z0),K=K+Math.imul(J0,V0)|0,J=J+Math.imul(J0,H0)|0,J=J+Math.imul(t,V0)|0,j=j+Math.imul(t,H0)|0,K=K+Math.imul(S,N0)|0,J=J+Math.imul(S,L0)|0,J=J+Math.imul(p,N0)|0,j=j+Math.imul(p,L0)|0,K=K+Math.imul(X0,D0)|0,J=J+Math.imul(X0,T0)|0,J=J+Math.imul(Y0,D0)|0,j=j+Math.imul(Y0,T0)|0,K=K+Math.imul(d,k0)|0,J=J+Math.imul(d,B0)|0,J=J+Math.imul(f,k0)|0,j=j+Math.imul(f,B0)|0,K=K+Math.imul(r,R0)|0,J=J+Math.imul(r,q0)|0,J=J+Math.imul(O0,R0)|0,j=j+Math.imul(O0,q0)|0,K=K+Math.imul(E,I0)|0,J=J+Math.imul(E,E0)|0,J=J+Math.imul(_,I0)|0,j=j+Math.imul(_,E0)|0;var f0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(f0>>>26)|0,f0&=67108863,K=Math.imul(P0,$0),J=Math.imul(P0,z0),J=J+Math.imul(Q0,$0)|0,j=Math.imul(Q0,z0),K=K+Math.imul(C0,V0)|0,J=J+Math.imul(C0,H0)|0,J=J+Math.imul(W0,V0)|0,j=j+Math.imul(W0,H0)|0,K=K+Math.imul(J0,N0)|0,J=J+Math.imul(J0,L0)|0,J=J+Math.imul(t,N0)|0,j=j+Math.imul(t,L0)|0,K=K+Math.imul(S,D0)|0,J=J+Math.imul(S,T0)|0,J=J+Math.imul(p,D0)|0,j=j+Math.imul(p,T0)|0,K=K+Math.imul(X0,k0)|0,J=J+Math.imul(X0,B0)|0,J=J+Math.imul(Y0,k0)|0,j=j+Math.imul(Y0,B0)|0,K=K+Math.imul(d,R0)|0,J=J+Math.imul(d,q0)|0,J=J+Math.imul(f,R0)|0,j=j+Math.imul(f,q0)|0,K=K+Math.imul(r,I0)|0,J=J+Math.imul(r,E0)|0,J=J+Math.imul(O0,I0)|0,j=j+Math.imul(O0,E0)|0,K=K+Math.imul(E,x0)|0,J=J+Math.imul(E,S0)|0,J=J+Math.imul(_,x0)|0,j=j+Math.imul(_,S0)|0;var n0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(n0>>>26)|0,n0&=67108863,K=Math.imul(D,$0),J=Math.imul(D,z0),J=J+Math.imul(v,$0)|0,j=Math.imul(v,z0),K=K+Math.imul(P0,V0)|0,J=J+Math.imul(P0,H0)|0,J=J+Math.imul(Q0,V0)|0,j=j+Math.imul(Q0,H0)|0,K=K+Math.imul(C0,N0)|0,J=J+Math.imul(C0,L0)|0,J=J+Math.imul(W0,N0)|0,j=j+Math.imul(W0,L0)|0,K=K+Math.imul(J0,D0)|0,J=J+Math.imul(J0,T0)|0,J=J+Math.imul(t,D0)|0,j=j+Math.imul(t,T0)|0,K=K+Math.imul(S,k0)|0,J=J+Math.imul(S,B0)|0,J=J+Math.imul(p,k0)|0,j=j+Math.imul(p,B0)|0,K=K+Math.imul(X0,R0)|0,J=J+Math.imul(X0,q0)|0,J=J+Math.imul(Y0,R0)|0,j=j+Math.imul(Y0,q0)|0,K=K+Math.imul(d,I0)|0,J=J+Math.imul(d,E0)|0,J=J+Math.imul(f,I0)|0,j=j+Math.imul(f,E0)|0,K=K+Math.imul(r,x0)|0,J=J+Math.imul(r,S0)|0,J=J+Math.imul(O0,x0)|0,j=j+Math.imul(O0,S0)|0,K=K+Math.imul(E,v0)|0,J=J+Math.imul(E,A0)|0,J=J+Math.imul(_,v0)|0,j=j+Math.imul(_,A0)|0;var a0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(a0>>>26)|0,a0&=67108863,K=Math.imul(l,$0),J=Math.imul(l,z0),J=J+Math.imul(u,$0)|0,j=Math.imul(u,z0),K=K+Math.imul(D,V0)|0,J=J+Math.imul(D,H0)|0,J=J+Math.imul(v,V0)|0,j=j+Math.imul(v,H0)|0,K=K+Math.imul(P0,N0)|0,J=J+Math.imul(P0,L0)|0,J=J+Math.imul(Q0,N0)|0,j=j+Math.imul(Q0,L0)|0,K=K+Math.imul(C0,D0)|0,J=J+Math.imul(C0,T0)|0,J=J+Math.imul(W0,D0)|0,j=j+Math.imul(W0,T0)|0,K=K+Math.imul(J0,k0)|0,J=J+Math.imul(J0,B0)|0,J=J+Math.imul(t,k0)|0,j=j+Math.imul(t,B0)|0,K=K+Math.imul(S,R0)|0,J=J+Math.imul(S,q0)|0,J=J+Math.imul(p,R0)|0,j=j+Math.imul(p,q0)|0,K=K+Math.imul(X0,I0)|0,J=J+Math.imul(X0,E0)|0,J=J+Math.imul(Y0,I0)|0,j=j+Math.imul(Y0,E0)|0,K=K+Math.imul(d,x0)|0,J=J+Math.imul(d,S0)|0,J=J+Math.imul(f,x0)|0,j=j+Math.imul(f,S0)|0,K=K+Math.imul(r,v0)|0,J=J+Math.imul(r,A0)|0,J=J+Math.imul(O0,v0)|0,j=j+Math.imul(O0,A0)|0,K=K+Math.imul(E,M0)|0,J=J+Math.imul(E,w0)|0,J=J+Math.imul(_,M0)|0,j=j+Math.imul(_,w0)|0;var r0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(r0>>>26)|0,r0&=67108863,K=Math.imul(l,V0),J=Math.imul(l,H0),J=J+Math.imul(u,V0)|0,j=Math.imul(u,H0),K=K+Math.imul(D,N0)|0,J=J+Math.imul(D,L0)|0,J=J+Math.imul(v,N0)|0,j=j+Math.imul(v,L0)|0,K=K+Math.imul(P0,D0)|0,J=J+Math.imul(P0,T0)|0,J=J+Math.imul(Q0,D0)|0,j=j+Math.imul(Q0,T0)|0,K=K+Math.imul(C0,k0)|0,J=J+Math.imul(C0,B0)|0,J=J+Math.imul(W0,k0)|0,j=j+Math.imul(W0,B0)|0,K=K+Math.imul(J0,R0)|0,J=J+Math.imul(J0,q0)|0,J=J+Math.imul(t,R0)|0,j=j+Math.imul(t,q0)|0,K=K+Math.imul(S,I0)|0,J=J+Math.imul(S,E0)|0,J=J+Math.imul(p,I0)|0,j=j+Math.imul(p,E0)|0,K=K+Math.imul(X0,x0)|0,J=J+Math.imul(X0,S0)|0,J=J+Math.imul(Y0,x0)|0,j=j+Math.imul(Y0,S0)|0,K=K+Math.imul(d,v0)|0,J=J+Math.imul(d,A0)|0,J=J+Math.imul(f,v0)|0,j=j+Math.imul(f,A0)|0,K=K+Math.imul(r,M0)|0,J=J+Math.imul(r,w0)|0,J=J+Math.imul(O0,M0)|0,j=j+Math.imul(O0,w0)|0;var i0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(i0>>>26)|0,i0&=67108863,K=Math.imul(l,N0),J=Math.imul(l,L0),J=J+Math.imul(u,N0)|0,j=Math.imul(u,L0),K=K+Math.imul(D,D0)|0,J=J+Math.imul(D,T0)|0,J=J+Math.imul(v,D0)|0,j=j+Math.imul(v,T0)|0,K=K+Math.imul(P0,k0)|0,J=J+Math.imul(P0,B0)|0,J=J+Math.imul(Q0,k0)|0,j=j+Math.imul(Q0,B0)|0,K=K+Math.imul(C0,R0)|0,J=J+Math.imul(C0,q0)|0,J=J+Math.imul(W0,R0)|0,j=j+Math.imul(W0,q0)|0,K=K+Math.imul(J0,I0)|0,J=J+Math.imul(J0,E0)|0,J=J+Math.imul(t,I0)|0,j=j+Math.imul(t,E0)|0,K=K+Math.imul(S,x0)|0,J=J+Math.imul(S,S0)|0,J=J+Math.imul(p,x0)|0,j=j+Math.imul(p,S0)|0,K=K+Math.imul(X0,v0)|0,J=J+Math.imul(X0,A0)|0,J=J+Math.imul(Y0,v0)|0,j=j+Math.imul(Y0,A0)|0,K=K+Math.imul(d,M0)|0,J=J+Math.imul(d,w0)|0,J=J+Math.imul(f,M0)|0,j=j+Math.imul(f,w0)|0;var t0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(t0>>>26)|0,t0&=67108863,K=Math.imul(l,D0),J=Math.imul(l,T0),J=J+Math.imul(u,D0)|0,j=Math.imul(u,T0),K=K+Math.imul(D,k0)|0,J=J+Math.imul(D,B0)|0,J=J+Math.imul(v,k0)|0,j=j+Math.imul(v,B0)|0,K=K+Math.imul(P0,R0)|0,J=J+Math.imul(P0,q0)|0,J=J+Math.imul(Q0,R0)|0,j=j+Math.imul(Q0,q0)|0,K=K+Math.imul(C0,I0)|0,J=J+Math.imul(C0,E0)|0,J=J+Math.imul(W0,I0)|0,j=j+Math.imul(W0,E0)|0,K=K+Math.imul(J0,x0)|0,J=J+Math.imul(J0,S0)|0,J=J+Math.imul(t,x0)|0,j=j+Math.imul(t,S0)|0,K=K+Math.imul(S,v0)|0,J=J+Math.imul(S,A0)|0,J=J+Math.imul(p,v0)|0,j=j+Math.imul(p,A0)|0,K=K+Math.imul(X0,M0)|0,J=J+Math.imul(X0,w0)|0,J=J+Math.imul(Y0,M0)|0,j=j+Math.imul(Y0,w0)|0;var e0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(e0>>>26)|0,e0&=67108863,K=Math.imul(l,k0),J=Math.imul(l,B0),J=J+Math.imul(u,k0)|0,j=Math.imul(u,B0),K=K+Math.imul(D,R0)|0,J=J+Math.imul(D,q0)|0,J=J+Math.imul(v,R0)|0,j=j+Math.imul(v,q0)|0,K=K+Math.imul(P0,I0)|0,J=J+Math.imul(P0,E0)|0,J=J+Math.imul(Q0,I0)|0,j=j+Math.imul(Q0,E0)|0,K=K+Math.imul(C0,x0)|0,J=J+Math.imul(C0,S0)|0,J=J+Math.imul(W0,x0)|0,j=j+Math.imul(W0,S0)|0,K=K+Math.imul(J0,v0)|0,J=J+Math.imul(J0,A0)|0,J=J+Math.imul(t,v0)|0,j=j+Math.imul(t,A0)|0,K=K+Math.imul(S,M0)|0,J=J+Math.imul(S,w0)|0,J=J+Math.imul(p,M0)|0,j=j+Math.imul(p,w0)|0;var X2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(X2>>>26)|0,X2&=67108863,K=Math.imul(l,R0),J=Math.imul(l,q0),J=J+Math.imul(u,R0)|0,j=Math.imul(u,q0),K=K+Math.imul(D,I0)|0,J=J+Math.imul(D,E0)|0,J=J+Math.imul(v,I0)|0,j=j+Math.imul(v,E0)|0,K=K+Math.imul(P0,x0)|0,J=J+Math.imul(P0,S0)|0,J=J+Math.imul(Q0,x0)|0,j=j+Math.imul(Q0,S0)|0,K=K+Math.imul(C0,v0)|0,J=J+Math.imul(C0,A0)|0,J=J+Math.imul(W0,v0)|0,j=j+Math.imul(W0,A0)|0,K=K+Math.imul(J0,M0)|0,J=J+Math.imul(J0,w0)|0,J=J+Math.imul(t,M0)|0,j=j+Math.imul(t,w0)|0;var J2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(J2>>>26)|0,J2&=67108863,K=Math.imul(l,I0),J=Math.imul(l,E0),J=J+Math.imul(u,I0)|0,j=Math.imul(u,E0),K=K+Math.imul(D,x0)|0,J=J+Math.imul(D,S0)|0,J=J+Math.imul(v,x0)|0,j=j+Math.imul(v,S0)|0,K=K+Math.imul(P0,v0)|0,J=J+Math.imul(P0,A0)|0,J=J+Math.imul(Q0,v0)|0,j=j+Math.imul(Q0,A0)|0,K=K+Math.imul(C0,M0)|0,J=J+Math.imul(C0,w0)|0,J=J+Math.imul(W0,M0)|0,j=j+Math.imul(W0,w0)|0;var O2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(O2>>>26)|0,O2&=67108863,K=Math.imul(l,x0),J=Math.imul(l,S0),J=J+Math.imul(u,x0)|0,j=Math.imul(u,S0),K=K+Math.imul(D,v0)|0,J=J+Math.imul(D,A0)|0,J=J+Math.imul(v,v0)|0,j=j+Math.imul(v,A0)|0,K=K+Math.imul(P0,M0)|0,J=J+Math.imul(P0,w0)|0,J=J+Math.imul(Q0,M0)|0,j=j+Math.imul(Q0,w0)|0;var $2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+($2>>>26)|0,$2&=67108863,K=Math.imul(l,v0),J=Math.imul(l,A0),J=J+Math.imul(u,v0)|0,j=Math.imul(u,A0),K=K+Math.imul(D,M0)|0,J=J+Math.imul(D,w0)|0,J=J+Math.imul(v,M0)|0,j=j+Math.imul(v,w0)|0;var G2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(G2>>>26)|0,G2&=67108863,K=Math.imul(l,M0),J=Math.imul(l,w0),J=J+Math.imul(u,M0)|0,j=Math.imul(u,w0);var Y2=(Z+K|0)+((J&8191)<<13)|0;return Z=(j+(J>>>13)|0)+(Y2>>>26)|0,Y2&=67108863,W[0]=C2,W[1]=m0,W[2]=p0,W[3]=o0,W[4]=u0,W[5]=s0,W[6]=f0,W[7]=n0,W[8]=a0,W[9]=r0,W[10]=i0,W[11]=t0,W[12]=e0,W[13]=X2,W[14]=J2,W[15]=O2,W[16]=$2,W[17]=G2,W[18]=Y2,Z!==0&&(W[19]=Z,G.length++),G};Math.imul||(x=I);function w(X,O,G){G.negative=O.negative^X.negative,G.length=X.length+O.length;for(var $=0,Y=0,W=0;W>>26)|0,Y+=Z>>>26,Z&=67108863}G.words[W]=K,$=Z,Z=Y}return $!==0?G.words[W]=$:G.length--,G.strip()}function M(X,O,G){var $=new y;return $.mulp(X,O,G)}C.prototype.mulTo=function(X,O){var G,$=this.length+X.length;return this.length===10&&X.length===10?G=x(this,X,O):$<63?G=I(this,X,O):$<1024?G=w(this,X,O):G=M(this,X,O),G};function y(X,O){this.x=X,this.y=O}y.prototype.makeRBT=function(X){for(var O=new Array(X),G=C.prototype._countBits(X)-1,$=0;$>=1;return $},y.prototype.permute=function(X,O,G,$,Y,W){for(var Z=0;Z>>1)Y++;return 1<>>13,G[2*W+1]=Y&8191,Y=Y>>>13;for(W=2*O;W<$;++W)G[W]=0;Q(Y===0),Q((Y&-8192)===0)},y.prototype.stub=function(X){for(var O=new Array(X),G=0;G>=26,O+=$/67108864|0,O+=Y>>>26,this.words[G]=Y&67108863}return O!==0&&(this.words[G]=O,this.length++),this},C.prototype.muln=function(X){return this.clone().imuln(X)},C.prototype.sqr=function(){return this.mul(this)},C.prototype.isqr=function(){return this.imul(this.clone())},C.prototype.pow=function(X){var O=F(X);if(O.length===0)return new C(1);for(var G=this,$=0;$=0);var O=X%26,G=(X-O)/26,$=67108863>>>26-O<<26-O,Y;if(O!==0){var W=0;for(Y=0;Y>>26-O}W&&(this.words[Y]=W,this.length++)}if(G!==0){for(Y=this.length-1;Y>=0;Y--)this.words[Y+G]=this.words[Y];for(Y=0;Y=0);var $;O?$=(O-O%26)/26:$=0;var Y=X%26,W=Math.min((X-Y)/26,this.length),Z=67108863^67108863>>>Y<W)for(this.length-=W,J=0;J=0&&(j!==0||J>=$);J--){var A=this.words[J]|0;this.words[J]=j<<26-Y|A>>>Y,j=A&Z}return K&&j!==0&&(K.words[K.length++]=j),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},C.prototype.ishrn=function(X,O,G){return Q(this.negative===0),this.iushrn(X,O,G)},C.prototype.shln=function(X){return this.clone().ishln(X)},C.prototype.ushln=function(X){return this.clone().iushln(X)},C.prototype.shrn=function(X){return this.clone().ishrn(X)},C.prototype.ushrn=function(X){return this.clone().iushrn(X)},C.prototype.testn=function(X){Q(typeof X=="number"&&X>=0);var O=X%26,G=(X-O)/26,$=1<=0);var O=X%26,G=(X-O)/26;if(Q(this.negative===0,"imaskn works only with positive numbers"),this.length<=G)return this;if(O!==0&&G++,this.length=Math.min(G,this.length),O!==0){var $=67108863^67108863>>>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},C.prototype.isubn=function(X){if(Q(typeof X=="number"),Q(X<67108864),X<0)return this.iaddn(-X);if(this.negative!==0)return this.negative=0,this.iaddn(X),this.negative=1,this;if(this.words[0]-=X,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var O=0;O>26)-(K/67108864|0),this.words[Y+G]=W&67108863}for(;Y>26,this.words[Y+G]=W&67108863;if(Z===0)return this.strip();for(Q(Z===-1),Z=0,Y=0;Y>26,this.words[Y]=W&67108863;return this.negative=1,this.strip()},C.prototype._wordDiv=function(X,O){var G=this.length-X.length,$=this.clone(),Y=X,W=Y.words[Y.length-1]|0,Z=this._countBits(W);G=26-Z,G!==0&&(Y=Y.ushln(G),$.iushln(G),W=Y.words[Y.length-1]|0);var K=$.length-Y.length,J;if(O!=="mod"){J=new C(null),J.length=K+1,J.words=new Array(J.length);for(var j=0;j=0;E--){var _=($.words[Y.length+E]|0)*67108864+($.words[Y.length+E-1]|0);for(_=Math.min(_/W|0,67108863),$._ishlnsubmul(Y,_,E);$.negative!==0;)_--,$.negative=0,$._ishlnsubmul(Y,1,E),$.isZero()||($.negative^=1);J&&(J.words[E]=_)}return J&&J.strip(),$.strip(),O!=="div"&&G!==0&&$.iushrn(G),{div:J||null,mod:$}},C.prototype.divmod=function(X,O,G){if(Q(!X.isZero()),this.isZero())return{div:new C(0),mod:new C(0)};var $,Y,W;return this.negative!==0&&X.negative===0?(W=this.neg().divmod(X,O),O!=="mod"&&($=W.div.neg()),O!=="div"&&(Y=W.mod.neg(),G&&Y.negative!==0&&Y.iadd(X)),{div:$,mod:Y}):this.negative===0&&X.negative!==0?(W=this.divmod(X.neg(),O),O!=="mod"&&($=W.div.neg()),{div:$,mod:W.mod}):(this.negative&X.negative)!==0?(W=this.neg().divmod(X.neg(),O),O!=="div"&&(Y=W.mod.neg(),G&&Y.negative!==0&&Y.isub(X)),{div:W.div,mod:Y}):X.length>this.length||this.cmp(X)<0?{div:new C(0),mod:this}:X.length===1?O==="div"?{div:this.divn(X.words[0]),mod:null}:O==="mod"?{div:null,mod:new C(this.modn(X.words[0]))}:{div:this.divn(X.words[0]),mod:new C(this.modn(X.words[0]))}:this._wordDiv(X,O)},C.prototype.div=function(X){return this.divmod(X,"div",!1).div},C.prototype.mod=function(X){return this.divmod(X,"mod",!1).mod},C.prototype.umod=function(X){return this.divmod(X,"mod",!0).mod},C.prototype.divRound=function(X){var O=this.divmod(X);if(O.mod.isZero())return O.div;var G=O.div.negative!==0?O.mod.isub(X):O.mod,$=X.ushrn(1),Y=X.andln(1),W=G.cmp($);return W<0||Y===1&&W===0?O.div:O.div.negative!==0?O.div.isubn(1):O.div.iaddn(1)},C.prototype.modn=function(X){Q(X<=67108863);for(var O=67108864%X,G=0,$=this.length-1;$>=0;$--)G=(O*G+(this.words[$]|0))%X;return G},C.prototype.idivn=function(X){Q(X<=67108863);for(var O=0,G=this.length-1;G>=0;G--){var $=(this.words[G]|0)+O*67108864;this.words[G]=$/X|0,O=$%X}return this.strip()},C.prototype.divn=function(X){return this.clone().idivn(X)},C.prototype.egcd=function(X){Q(X.negative===0),Q(!X.isZero());var O=this,G=X.clone();O.negative!==0?O=O.umod(X):O=O.clone();for(var $=new C(1),Y=new C(0),W=new C(0),Z=new C(1),K=0;O.isEven()&&G.isEven();)O.iushrn(1),G.iushrn(1),++K;for(var J=G.clone(),j=O.clone();!O.isZero();){for(var A=0,E=1;(O.words[0]&E)===0&&A<26;++A,E<<=1);if(A>0)for(O.iushrn(A);A-- >0;)($.isOdd()||Y.isOdd())&&($.iadd(J),Y.isub(j)),$.iushrn(1),Y.iushrn(1);for(var _=0,s=1;(G.words[0]&s)===0&&_<26;++_,s<<=1);if(_>0)for(G.iushrn(_);_-- >0;)(W.isOdd()||Z.isOdd())&&(W.iadd(J),Z.isub(j)),W.iushrn(1),Z.iushrn(1);O.cmp(G)>=0?(O.isub(G),$.isub(W),Y.isub(Z)):(G.isub(O),W.isub($),Z.isub(Y))}return{a:W,b:Z,gcd:G.iushln(K)}},C.prototype._invmp=function(X){Q(X.negative===0),Q(!X.isZero());var O=this,G=X.clone();O.negative!==0?O=O.umod(X):O=O.clone();for(var $=new C(1),Y=new C(0),W=G.clone();O.cmpn(1)>0&&G.cmpn(1)>0;){for(var Z=0,K=1;(O.words[0]&K)===0&&Z<26;++Z,K<<=1);if(Z>0)for(O.iushrn(Z);Z-- >0;)$.isOdd()&&$.iadd(W),$.iushrn(1);for(var J=0,j=1;(G.words[0]&j)===0&&J<26;++J,j<<=1);if(J>0)for(G.iushrn(J);J-- >0;)Y.isOdd()&&Y.iadd(W),Y.iushrn(1);O.cmp(G)>=0?(O.isub(G),$.isub(Y)):(G.isub(O),Y.isub($))}var A;return O.cmpn(1)===0?A=$:A=Y,A.cmpn(0)<0&&A.iadd(X),A},C.prototype.gcd=function(X){if(this.isZero())return X.abs();if(X.isZero())return this.abs();var O=this.clone(),G=X.clone();O.negative=0,G.negative=0;for(var $=0;O.isEven()&&G.isEven();$++)O.iushrn(1),G.iushrn(1);do{for(;O.isEven();)O.iushrn(1);for(;G.isEven();)G.iushrn(1);var Y=O.cmp(G);if(Y<0){var W=O;O=G,G=W}else if(Y===0||G.cmpn(1)===0)break;O.isub(G)}while(!0);return G.iushln($)},C.prototype.invm=function(X){return this.egcd(X).a.umod(X)},C.prototype.isEven=function(){return(this.words[0]&1)===0},C.prototype.isOdd=function(){return(this.words[0]&1)===1},C.prototype.andln=function(X){return this.words[0]&X},C.prototype.bincn=function(X){Q(typeof X=="number");var O=X%26,G=(X-O)/26,$=1<>>26,Z&=67108863,this.words[W]=Z}return Y!==0&&(this.words[W]=Y,this.length++),this},C.prototype.isZero=function(){return this.length===1&&this.words[0]===0},C.prototype.cmpn=function(X){var O=X<0;if(this.negative!==0&&!O)return-1;if(this.negative===0&&O)return 1;this.strip();var G;if(this.length>1)G=1;else{O&&(X=-X),Q(X<=67108863,"Number is too big");var $=this.words[0]|0;G=$===X?0:$X.length)return 1;if(this.length=0;G--){var $=this.words[G]|0,Y=X.words[G]|0;if($!==Y){$Y&&(O=1);break}}return O},C.prototype.gtn=function(X){return this.cmpn(X)===1},C.prototype.gt=function(X){return this.cmp(X)===1},C.prototype.gten=function(X){return this.cmpn(X)>=0},C.prototype.gte=function(X){return this.cmp(X)>=0},C.prototype.ltn=function(X){return this.cmpn(X)===-1},C.prototype.lt=function(X){return this.cmp(X)===-1},C.prototype.lten=function(X){return this.cmpn(X)<=0},C.prototype.lte=function(X){return this.cmp(X)<=0},C.prototype.eqn=function(X){return this.cmpn(X)===0},C.prototype.eq=function(X){return this.cmp(X)===0},C.red=function(X){return new n(X)},C.prototype.toRed=function(X){return Q(!this.red,"Already a number in reduction context"),Q(this.negative===0,"red works only with positives"),X.convertTo(this)._forceRed(X)},C.prototype.fromRed=function(){return Q(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},C.prototype._forceRed=function(X){return this.red=X,this},C.prototype.forceRed=function(X){return Q(!this.red,"Already a number in reduction context"),this._forceRed(X)},C.prototype.redAdd=function(X){return Q(this.red,"redAdd works only with red numbers"),this.red.add(this,X)},C.prototype.redIAdd=function(X){return Q(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,X)},C.prototype.redSub=function(X){return Q(this.red,"redSub works only with red numbers"),this.red.sub(this,X)},C.prototype.redISub=function(X){return Q(this.red,"redISub works only with red numbers"),this.red.isub(this,X)},C.prototype.redShl=function(X){return Q(this.red,"redShl works only with red numbers"),this.red.shl(this,X)},C.prototype.redMul=function(X){return Q(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.mul(this,X)},C.prototype.redIMul=function(X){return Q(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.imul(this,X)},C.prototype.redSqr=function(){return Q(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},C.prototype.redISqr=function(){return Q(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},C.prototype.redSqrt=function(){return Q(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},C.prototype.redInvm=function(){return Q(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},C.prototype.redNeg=function(){return Q(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},C.prototype.redPow=function(X){return Q(this.red&&!X.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,X)};var m={k256:null,p224:null,p192:null,p25519:null};function c(X,O){this.name=X,this.p=new C(O,16),this.n=this.p.bitLength(),this.k=new C(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}c.prototype._tmp=function(){var X=new C(null);return X.words=new Array(Math.ceil(this.n/13)),X},c.prototype.ireduce=function(X){var O=X,G;do this.split(O,this.tmp),O=this.imulK(O),O=O.iadd(this.tmp),G=O.bitLength();while(G>this.n);var $=G0?O.isub(this.p):O.strip!==void 0?O.strip():O._strip(),O},c.prototype.split=function(X,O){X.iushrn(this.n,0,O)},c.prototype.imulK=function(X){return X.imul(this.k)};function h(){c.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}R(h,c),h.prototype.split=function(X,O){for(var G=4194303,$=Math.min(X.length,9),Y=0;Y<$;Y++)O.words[Y]=X.words[Y];if(O.length=$,X.length<=9){X.words[0]=0,X.length=1;return}var W=X.words[9];for(O.words[O.length++]=W&G,Y=10;Y>>22,W=Z}W>>>=22,X.words[Y-10]=W,W===0&&X.length>10?X.length-=10:X.length-=9},h.prototype.imulK=function(X){X.words[X.length]=0,X.words[X.length+1]=0,X.length+=2;for(var O=0,G=0;G>>=26,X.words[G]=Y,O=$}return O!==0&&(X.words[X.length++]=O),X},C._prime=function(X){if(m[X])return m[X];var O;if(X==="k256")O=new h;else if(X==="p224")O=new a;else if(X==="p192")O=new i;else if(X==="p25519")O=new G0;else throw new Error("Unknown prime "+X);return m[X]=O,O};function n(X){if(typeof X=="string"){var O=C._prime(X);this.m=O.p,this.prime=O}else Q(X.gtn(1),"modulus must be greater than 1"),this.m=X,this.prime=null}n.prototype._verify1=function(X){Q(X.negative===0,"red works only with positives"),Q(X.red,"red works only with red numbers")},n.prototype._verify2=function(X,O){Q((X.negative|O.negative)===0,"red works only with positives"),Q(X.red&&X.red===O.red,"red works only with red numbers")},n.prototype.imod=function(X){return this.prime?this.prime.ireduce(X)._forceRed(this):X.umod(this.m)._forceRed(this)},n.prototype.neg=function(X){return X.isZero()?X.clone():this.m.sub(X)._forceRed(this)},n.prototype.add=function(X,O){this._verify2(X,O);var G=X.add(O);return G.cmp(this.m)>=0&&G.isub(this.m),G._forceRed(this)},n.prototype.iadd=function(X,O){this._verify2(X,O);var G=X.iadd(O);return G.cmp(this.m)>=0&&G.isub(this.m),G},n.prototype.sub=function(X,O){this._verify2(X,O);var G=X.sub(O);return G.cmpn(0)<0&&G.iadd(this.m),G._forceRed(this)},n.prototype.isub=function(X,O){this._verify2(X,O);var G=X.isub(O);return G.cmpn(0)<0&&G.iadd(this.m),G},n.prototype.shl=function(X,O){return this._verify1(X),this.imod(X.ushln(O))},n.prototype.imul=function(X,O){return this._verify2(X,O),this.imod(X.imul(O))},n.prototype.mul=function(X,O){return this._verify2(X,O),this.imod(X.mul(O))},n.prototype.isqr=function(X){return this.imul(X,X.clone())},n.prototype.sqr=function(X){return this.mul(X,X)},n.prototype.sqrt=function(X){if(X.isZero())return X.clone();var O=this.m.andln(3);if(Q(O%2===1),O===3){var G=this.m.add(new C(1)).iushrn(2);return this.pow(X,G)}for(var $=this.m.subn(1),Y=0;!$.isZero()&&$.andln(1)===0;)Y++,$.iushrn(1);Q(!$.isZero());var W=new C(1).toRed(this),Z=W.redNeg(),K=this.m.subn(1).iushrn(1),J=this.m.bitLength();for(J=new C(2*J*J).toRed(this);this.pow(J,K).cmp(Z)!==0;)J.redIAdd(Z);for(var j=this.pow(J,$),A=this.pow(X,$.addn(1).iushrn(1)),E=this.pow(X,$),_=Y;E.cmp(W)!==0;){for(var s=E,r=0;s.cmp(W)!==0;r++)s=s.redSqr();Q(r<_);var O0=this.pow(j,new C(1).iushln(_-r-1));A=A.redMul(O0),j=O0.redSqr(),E=E.redMul(j),_=r}return A},n.prototype.invm=function(X){var O=X._invmp(this.m);return O.negative!==0?(O.negative=0,this.imod(O).redNeg()):this.imod(O)},n.prototype.pow=function(X,O){if(O.isZero())return new C(1).toRed(this);if(O.cmpn(1)===0)return X.clone();var G=4,$=new Array(1<=0;Y--){for(var j=O.words[Y],A=J-1;A>=0;A--){var E=j>>A&1;if(W!==$[0]&&(W=this.sqr(W)),E===0&&Z===0){K=0;continue}Z<<=1,Z|=E,K++,!(K!==G&&(Y!==0||A!==0))&&(W=this.mul(W,$[Z]),K=0,Z=0)}J=26}return W},n.prototype.convertTo=function(X){var O=X.umod(this.m);return O===X?O.clone():O},n.prototype.convertFrom=function(X){var O=X.clone();return O.red=null,O},C.mont=function(X){return new Z0(X)};function Z0(X){n.call(this,X),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new C(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}R(Z0,n),Z0.prototype.convertTo=function(X){return this.imod(X.ushln(this.shift))},Z0.prototype.convertFrom=function(X){var O=this.imod(X.mul(this.rinv));return O.red=null,O},Z0.prototype.imul=function(X,O){if(X.isZero()||O.isZero())return X.words[0]=0,X.length=1,X;var G=X.imul(O),$=G.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Y=G.isub($).iushrn(this.shift),W=Y;return Y.cmp(this.m)>=0?W=Y.isub(this.m):Y.cmpn(0)<0&&(W=Y.iadd(this.m)),W._forceRed(this)},Z0.prototype.mul=function(X,O){if(X.isZero()||O.isZero())return new C(0)._forceRed(this);var G=X.mul(O),$=G.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Y=G.isub($).iushrn(this.shift),W=Y;return Y.cmp(this.m)>=0?W=Y.isub(this.m):Y.cmpn(0)<0&&(W=Y.iadd(this.m)),W._forceRed(this)},Z0.prototype.invm=function(X){var O=this.imod(X._invmp(this.m).mul(this.r2));return O._forceRed(this)}})(typeof k>"u"||k,B)}),i8=K0((B,k)=>{(function(V,N){function Q(X,O){if(!X)throw new Error(O||"Assertion failed")}function R(X,O){X.super_=O;var G=function(){};G.prototype=O.prototype,X.prototype=new G,X.prototype.constructor=X}function C(X,O,G){if(C.isBN(X))return X;this.negative=0,this.words=null,this.length=0,this.red=null,X!==null&&((O==="le"||O==="be")&&(G=O,O=10),this._init(X||0,O||10,G||"be"))}typeof V=="object"?V.exports=C:N.BN=C,C.BN=C,C.wordSize=26;var H;try{typeof window<"u"&&typeof window.Buffer<"u"?H=window.Buffer:H=M2().Buffer}catch{}C.isBN=function(X){return X instanceof C?!0:X!==null&&typeof X=="object"&&X.constructor.wordSize===C.wordSize&&Array.isArray(X.words)},C.max=function(X,O){return X.cmp(O)>0?X:O},C.min=function(X,O){return X.cmp(O)<0?X:O},C.prototype._init=function(X,O,G){if(typeof X=="number")return this._initNumber(X,O,G);if(typeof X=="object")return this._initArray(X,O,G);O==="hex"&&(O=16),Q(O===(O|0)&&O>=2&&O<=36),X=X.toString().replace(/\s+/g,"");var $=0;X[0]==="-"&&($++,this.negative=1),$=0;$-=3)W=X[$]|X[$-1]<<8|X[$-2]<<16,this.words[Y]|=W<>>26-Z&67108863,Z+=24,Z>=26&&(Z-=26,Y++);else if(G==="le")for($=0,Y=0;$>>26-Z&67108863,Z+=24,Z>=26&&(Z-=26,Y++);return this.strip()};function L(X,O){var G=X.charCodeAt(O);return G>=65&&G<=70?G-55:G>=97&&G<=102?G-87:G-48&15}function P(X,O,G){var $=L(X,G);return G-1>=O&&($|=L(X,G-1)<<4),$}C.prototype._parseHex=function(X,O,G){this.length=Math.ceil((X.length-O)/6),this.words=new Array(this.length);for(var $=0;$=O;$-=2)Z=P(X,O,$)<=18?(Y-=18,W+=1,this.words[W]|=Z>>>26):Y+=8;else{var K=X.length-O;for($=K%2===0?O+1:O;$=18?(Y-=18,W+=1,this.words[W]|=Z>>>26):Y+=8}this.strip()};function U(X,O,G,$){for(var Y=0,W=Math.min(X.length,G),Z=O;Z=49?Y+=K-49+10:K>=17?Y+=K-17+10:Y+=K}return Y}C.prototype._parseBase=function(X,O,G){this.words=[0],this.length=1;for(var $=0,Y=1;Y<=67108863;Y*=O)$++;$--,Y=Y/O|0;for(var W=X.length-G,Z=W%$,K=Math.min(W,W-Z)+G,J=0,j=G;j1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},C.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},C.prototype.inspect=function(){return(this.red?""};var z=["","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"],T=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],q=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];C.prototype.toString=function(X,O){X=X||10,O=O|0||1;var G;if(X===16||X==="hex"){G="";for(var $=0,Y=0,W=0;W>>24-$&16777215,Y!==0||W!==this.length-1?G=z[6-K.length]+K+G:G=K+G,$+=2,$>=26&&($-=26,W--)}for(Y!==0&&(G=Y.toString(16)+G);G.length%O!==0;)G="0"+G;return this.negative!==0&&(G="-"+G),G}if(X===(X|0)&&X>=2&&X<=36){var J=T[X],j=q[X];G="";var A=this.clone();for(A.negative=0;!A.isZero();){var E=A.modn(j).toString(X);A=A.idivn(j),A.isZero()?G=E+G:G=z[J-E.length]+E+G}for(this.isZero()&&(G="0"+G);G.length%O!==0;)G="0"+G;return this.negative!==0&&(G="-"+G),G}Q(!1,"Base should be between 2 and 36")},C.prototype.toNumber=function(){var X=this.words[0];return this.length===2?X+=this.words[1]*67108864:this.length===3&&this.words[2]===1?X+=4503599627370496+this.words[1]*67108864:this.length>2&&Q(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-X:X},C.prototype.toJSON=function(){return this.toString(16)},C.prototype.toBuffer=function(X,O){return Q(typeof H<"u"),this.toArrayLike(H,X,O)},C.prototype.toArray=function(X,O){return this.toArrayLike(Array,X,O)},C.prototype.toArrayLike=function(X,O,G){var $=this.byteLength(),Y=G||Math.max(1,$);Q($<=Y,"byte array longer than desired length"),Q(Y>0,"Requested array length <= 0"),this.strip();var W=O==="le",Z=new X(Y),K,J,j=this.clone();if(W){for(J=0;!j.isZero();J++)K=j.andln(255),j.iushrn(8),Z[J]=K;for(;J=4096&&(G+=13,O>>>=13),O>=64&&(G+=7,O>>>=7),O>=8&&(G+=4,O>>>=4),O>=2&&(G+=2,O>>>=2),G+O},C.prototype._zeroBits=function(X){if(X===0)return 26;var O=X,G=0;return(O&8191)===0&&(G+=13,O>>>=13),(O&127)===0&&(G+=7,O>>>=7),(O&15)===0&&(G+=4,O>>>=4),(O&3)===0&&(G+=2,O>>>=2),(O&1)===0&&G++,G},C.prototype.bitLength=function(){var X=this.words[this.length-1],O=this._countBits(X);return(this.length-1)*26+O};function F(X){for(var O=new Array(X.bitLength()),G=0;G>>Y}return O}C.prototype.zeroBits=function(){if(this.isZero())return 0;for(var X=0,O=0;OX.length?this.clone().ior(X):X.clone().ior(this)},C.prototype.uor=function(X){return this.length>X.length?this.clone().iuor(X):X.clone().iuor(this)},C.prototype.iuand=function(X){var O;this.length>X.length?O=X:O=this;for(var G=0;GX.length?this.clone().iand(X):X.clone().iand(this)},C.prototype.uand=function(X){return this.length>X.length?this.clone().iuand(X):X.clone().iuand(this)},C.prototype.iuxor=function(X){var O,G;this.length>X.length?(O=this,G=X):(O=X,G=this);for(var $=0;$X.length?this.clone().ixor(X):X.clone().ixor(this)},C.prototype.uxor=function(X){return this.length>X.length?this.clone().iuxor(X):X.clone().iuxor(this)},C.prototype.inotn=function(X){Q(typeof X=="number"&&X>=0);var O=Math.ceil(X/26)|0,G=X%26;this._expand(O),G>0&&O--;for(var $=0;$0&&(this.words[$]=~this.words[$]&67108863>>26-G),this.strip()},C.prototype.notn=function(X){return this.clone().inotn(X)},C.prototype.setn=function(X,O){Q(typeof X=="number"&&X>=0);var G=X/26|0,$=X%26;return this._expand(G+1),O?this.words[G]=this.words[G]|1<<$:this.words[G]=this.words[G]&~(1<<$),this.strip()},C.prototype.iadd=function(X){var O;if(this.negative!==0&&X.negative===0)return this.negative=0,O=this.isub(X),this.negative^=1,this._normSign();if(this.negative===0&&X.negative!==0)return X.negative=0,O=this.isub(X),X.negative=1,O._normSign();var G,$;this.length>X.length?(G=this,$=X):(G=X,$=this);for(var Y=0,W=0;W<$.length;W++)O=(G.words[W]|0)+($.words[W]|0)+Y,this.words[W]=O&67108863,Y=O>>>26;for(;Y!==0&&W>>26;if(this.length=G.length,Y!==0)this.words[this.length]=Y,this.length++;else if(G!==this)for(;WX.length?this.clone().iadd(X):X.clone().iadd(this)},C.prototype.isub=function(X){if(X.negative!==0){X.negative=0;var O=this.iadd(X);return X.negative=1,O._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(X),this.negative=1,this._normSign();var G=this.cmp(X);if(G===0)return this.negative=0,this.length=1,this.words[0]=0,this;var $,Y;G>0?($=this,Y=X):($=X,Y=this);for(var W=0,Z=0;Z>26,this.words[Z]=O&67108863;for(;W!==0&&Z<$.length;Z++)O=($.words[Z]|0)+W,W=O>>26,this.words[Z]=O&67108863;if(W===0&&Z<$.length&&$!==this)for(;Z<$.length;Z++)this.words[Z]=$.words[Z];return this.length=Math.max(this.length,Z),$!==this&&(this.negative=1),this.strip()},C.prototype.sub=function(X){return this.clone().isub(X)};function I(X,O,G){G.negative=O.negative^X.negative;var $=X.length+O.length|0;G.length=$,$=$-1|0;var Y=X.words[0]|0,W=O.words[0]|0,Z=Y*W,K=Z&67108863,J=Z/67108864|0;G.words[0]=K;for(var j=1;j<$;j++){for(var A=J>>>26,E=J&67108863,_=Math.min(j,O.length-1),s=Math.max(0,j-X.length+1);s<=_;s++){var r=j-s|0;Y=X.words[r]|0,W=O.words[s]|0,Z=Y*W+E,A+=Z/67108864|0,E=Z&67108863}G.words[j]=E|0,J=A|0}return J!==0?G.words[j]=J|0:G.length--,G.strip()}var x=function(X,O,G){var $=X.words,Y=O.words,W=G.words,Z=0,K,J,j,A=$[0]|0,E=A&8191,_=A>>>13,s=$[1]|0,r=s&8191,O0=s>>>13,o=$[2]|0,d=o&8191,f=o>>>13,U0=$[3]|0,X0=U0&8191,Y0=U0>>>13,g=$[4]|0,S=g&8191,p=g>>>13,e=$[5]|0,J0=e&8191,t=e>>>13,y0=$[6]|0,C0=y0&8191,W0=y0>>>13,_0=$[7]|0,P0=_0&8191,Q0=_0>>>13,d0=$[8]|0,D=d0&8191,v=d0>>>13,b=$[9]|0,l=b&8191,u=b>>>13,F0=Y[0]|0,$0=F0&8191,z0=F0>>>13,b0=Y[1]|0,V0=b0&8191,H0=b0>>>13,g0=Y[2]|0,N0=g0&8191,L0=g0>>>13,K2=Y[3]|0,D0=K2&8191,T0=K2>>>13,l0=Y[4]|0,k0=l0&8191,B0=l0>>>13,j2=Y[5]|0,R0=j2&8191,q0=j2>>>13,W2=Y[6]|0,I0=W2&8191,E0=W2>>>13,Z2=Y[7]|0,x0=Z2&8191,S0=Z2>>>13,Q2=Y[8]|0,v0=Q2&8191,A0=Q2>>>13,z2=Y[9]|0,M0=z2&8191,w0=z2>>>13;G.negative=X.negative^O.negative,G.length=19,K=Math.imul(E,$0),J=Math.imul(E,z0),J=J+Math.imul(_,$0)|0,j=Math.imul(_,z0);var C2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(C2>>>26)|0,C2&=67108863,K=Math.imul(r,$0),J=Math.imul(r,z0),J=J+Math.imul(O0,$0)|0,j=Math.imul(O0,z0),K=K+Math.imul(E,V0)|0,J=J+Math.imul(E,H0)|0,J=J+Math.imul(_,V0)|0,j=j+Math.imul(_,H0)|0;var m0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(m0>>>26)|0,m0&=67108863,K=Math.imul(d,$0),J=Math.imul(d,z0),J=J+Math.imul(f,$0)|0,j=Math.imul(f,z0),K=K+Math.imul(r,V0)|0,J=J+Math.imul(r,H0)|0,J=J+Math.imul(O0,V0)|0,j=j+Math.imul(O0,H0)|0,K=K+Math.imul(E,N0)|0,J=J+Math.imul(E,L0)|0,J=J+Math.imul(_,N0)|0,j=j+Math.imul(_,L0)|0;var p0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(p0>>>26)|0,p0&=67108863,K=Math.imul(X0,$0),J=Math.imul(X0,z0),J=J+Math.imul(Y0,$0)|0,j=Math.imul(Y0,z0),K=K+Math.imul(d,V0)|0,J=J+Math.imul(d,H0)|0,J=J+Math.imul(f,V0)|0,j=j+Math.imul(f,H0)|0,K=K+Math.imul(r,N0)|0,J=J+Math.imul(r,L0)|0,J=J+Math.imul(O0,N0)|0,j=j+Math.imul(O0,L0)|0,K=K+Math.imul(E,D0)|0,J=J+Math.imul(E,T0)|0,J=J+Math.imul(_,D0)|0,j=j+Math.imul(_,T0)|0;var o0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(o0>>>26)|0,o0&=67108863,K=Math.imul(S,$0),J=Math.imul(S,z0),J=J+Math.imul(p,$0)|0,j=Math.imul(p,z0),K=K+Math.imul(X0,V0)|0,J=J+Math.imul(X0,H0)|0,J=J+Math.imul(Y0,V0)|0,j=j+Math.imul(Y0,H0)|0,K=K+Math.imul(d,N0)|0,J=J+Math.imul(d,L0)|0,J=J+Math.imul(f,N0)|0,j=j+Math.imul(f,L0)|0,K=K+Math.imul(r,D0)|0,J=J+Math.imul(r,T0)|0,J=J+Math.imul(O0,D0)|0,j=j+Math.imul(O0,T0)|0,K=K+Math.imul(E,k0)|0,J=J+Math.imul(E,B0)|0,J=J+Math.imul(_,k0)|0,j=j+Math.imul(_,B0)|0;var u0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(u0>>>26)|0,u0&=67108863,K=Math.imul(J0,$0),J=Math.imul(J0,z0),J=J+Math.imul(t,$0)|0,j=Math.imul(t,z0),K=K+Math.imul(S,V0)|0,J=J+Math.imul(S,H0)|0,J=J+Math.imul(p,V0)|0,j=j+Math.imul(p,H0)|0,K=K+Math.imul(X0,N0)|0,J=J+Math.imul(X0,L0)|0,J=J+Math.imul(Y0,N0)|0,j=j+Math.imul(Y0,L0)|0,K=K+Math.imul(d,D0)|0,J=J+Math.imul(d,T0)|0,J=J+Math.imul(f,D0)|0,j=j+Math.imul(f,T0)|0,K=K+Math.imul(r,k0)|0,J=J+Math.imul(r,B0)|0,J=J+Math.imul(O0,k0)|0,j=j+Math.imul(O0,B0)|0,K=K+Math.imul(E,R0)|0,J=J+Math.imul(E,q0)|0,J=J+Math.imul(_,R0)|0,j=j+Math.imul(_,q0)|0;var s0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(s0>>>26)|0,s0&=67108863,K=Math.imul(C0,$0),J=Math.imul(C0,z0),J=J+Math.imul(W0,$0)|0,j=Math.imul(W0,z0),K=K+Math.imul(J0,V0)|0,J=J+Math.imul(J0,H0)|0,J=J+Math.imul(t,V0)|0,j=j+Math.imul(t,H0)|0,K=K+Math.imul(S,N0)|0,J=J+Math.imul(S,L0)|0,J=J+Math.imul(p,N0)|0,j=j+Math.imul(p,L0)|0,K=K+Math.imul(X0,D0)|0,J=J+Math.imul(X0,T0)|0,J=J+Math.imul(Y0,D0)|0,j=j+Math.imul(Y0,T0)|0,K=K+Math.imul(d,k0)|0,J=J+Math.imul(d,B0)|0,J=J+Math.imul(f,k0)|0,j=j+Math.imul(f,B0)|0,K=K+Math.imul(r,R0)|0,J=J+Math.imul(r,q0)|0,J=J+Math.imul(O0,R0)|0,j=j+Math.imul(O0,q0)|0,K=K+Math.imul(E,I0)|0,J=J+Math.imul(E,E0)|0,J=J+Math.imul(_,I0)|0,j=j+Math.imul(_,E0)|0;var f0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(f0>>>26)|0,f0&=67108863,K=Math.imul(P0,$0),J=Math.imul(P0,z0),J=J+Math.imul(Q0,$0)|0,j=Math.imul(Q0,z0),K=K+Math.imul(C0,V0)|0,J=J+Math.imul(C0,H0)|0,J=J+Math.imul(W0,V0)|0,j=j+Math.imul(W0,H0)|0,K=K+Math.imul(J0,N0)|0,J=J+Math.imul(J0,L0)|0,J=J+Math.imul(t,N0)|0,j=j+Math.imul(t,L0)|0,K=K+Math.imul(S,D0)|0,J=J+Math.imul(S,T0)|0,J=J+Math.imul(p,D0)|0,j=j+Math.imul(p,T0)|0,K=K+Math.imul(X0,k0)|0,J=J+Math.imul(X0,B0)|0,J=J+Math.imul(Y0,k0)|0,j=j+Math.imul(Y0,B0)|0,K=K+Math.imul(d,R0)|0,J=J+Math.imul(d,q0)|0,J=J+Math.imul(f,R0)|0,j=j+Math.imul(f,q0)|0,K=K+Math.imul(r,I0)|0,J=J+Math.imul(r,E0)|0,J=J+Math.imul(O0,I0)|0,j=j+Math.imul(O0,E0)|0,K=K+Math.imul(E,x0)|0,J=J+Math.imul(E,S0)|0,J=J+Math.imul(_,x0)|0,j=j+Math.imul(_,S0)|0;var n0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(n0>>>26)|0,n0&=67108863,K=Math.imul(D,$0),J=Math.imul(D,z0),J=J+Math.imul(v,$0)|0,j=Math.imul(v,z0),K=K+Math.imul(P0,V0)|0,J=J+Math.imul(P0,H0)|0,J=J+Math.imul(Q0,V0)|0,j=j+Math.imul(Q0,H0)|0,K=K+Math.imul(C0,N0)|0,J=J+Math.imul(C0,L0)|0,J=J+Math.imul(W0,N0)|0,j=j+Math.imul(W0,L0)|0,K=K+Math.imul(J0,D0)|0,J=J+Math.imul(J0,T0)|0,J=J+Math.imul(t,D0)|0,j=j+Math.imul(t,T0)|0,K=K+Math.imul(S,k0)|0,J=J+Math.imul(S,B0)|0,J=J+Math.imul(p,k0)|0,j=j+Math.imul(p,B0)|0,K=K+Math.imul(X0,R0)|0,J=J+Math.imul(X0,q0)|0,J=J+Math.imul(Y0,R0)|0,j=j+Math.imul(Y0,q0)|0,K=K+Math.imul(d,I0)|0,J=J+Math.imul(d,E0)|0,J=J+Math.imul(f,I0)|0,j=j+Math.imul(f,E0)|0,K=K+Math.imul(r,x0)|0,J=J+Math.imul(r,S0)|0,J=J+Math.imul(O0,x0)|0,j=j+Math.imul(O0,S0)|0,K=K+Math.imul(E,v0)|0,J=J+Math.imul(E,A0)|0,J=J+Math.imul(_,v0)|0,j=j+Math.imul(_,A0)|0;var a0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(a0>>>26)|0,a0&=67108863,K=Math.imul(l,$0),J=Math.imul(l,z0),J=J+Math.imul(u,$0)|0,j=Math.imul(u,z0),K=K+Math.imul(D,V0)|0,J=J+Math.imul(D,H0)|0,J=J+Math.imul(v,V0)|0,j=j+Math.imul(v,H0)|0,K=K+Math.imul(P0,N0)|0,J=J+Math.imul(P0,L0)|0,J=J+Math.imul(Q0,N0)|0,j=j+Math.imul(Q0,L0)|0,K=K+Math.imul(C0,D0)|0,J=J+Math.imul(C0,T0)|0,J=J+Math.imul(W0,D0)|0,j=j+Math.imul(W0,T0)|0,K=K+Math.imul(J0,k0)|0,J=J+Math.imul(J0,B0)|0,J=J+Math.imul(t,k0)|0,j=j+Math.imul(t,B0)|0,K=K+Math.imul(S,R0)|0,J=J+Math.imul(S,q0)|0,J=J+Math.imul(p,R0)|0,j=j+Math.imul(p,q0)|0,K=K+Math.imul(X0,I0)|0,J=J+Math.imul(X0,E0)|0,J=J+Math.imul(Y0,I0)|0,j=j+Math.imul(Y0,E0)|0,K=K+Math.imul(d,x0)|0,J=J+Math.imul(d,S0)|0,J=J+Math.imul(f,x0)|0,j=j+Math.imul(f,S0)|0,K=K+Math.imul(r,v0)|0,J=J+Math.imul(r,A0)|0,J=J+Math.imul(O0,v0)|0,j=j+Math.imul(O0,A0)|0,K=K+Math.imul(E,M0)|0,J=J+Math.imul(E,w0)|0,J=J+Math.imul(_,M0)|0,j=j+Math.imul(_,w0)|0;var r0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(r0>>>26)|0,r0&=67108863,K=Math.imul(l,V0),J=Math.imul(l,H0),J=J+Math.imul(u,V0)|0,j=Math.imul(u,H0),K=K+Math.imul(D,N0)|0,J=J+Math.imul(D,L0)|0,J=J+Math.imul(v,N0)|0,j=j+Math.imul(v,L0)|0,K=K+Math.imul(P0,D0)|0,J=J+Math.imul(P0,T0)|0,J=J+Math.imul(Q0,D0)|0,j=j+Math.imul(Q0,T0)|0,K=K+Math.imul(C0,k0)|0,J=J+Math.imul(C0,B0)|0,J=J+Math.imul(W0,k0)|0,j=j+Math.imul(W0,B0)|0,K=K+Math.imul(J0,R0)|0,J=J+Math.imul(J0,q0)|0,J=J+Math.imul(t,R0)|0,j=j+Math.imul(t,q0)|0,K=K+Math.imul(S,I0)|0,J=J+Math.imul(S,E0)|0,J=J+Math.imul(p,I0)|0,j=j+Math.imul(p,E0)|0,K=K+Math.imul(X0,x0)|0,J=J+Math.imul(X0,S0)|0,J=J+Math.imul(Y0,x0)|0,j=j+Math.imul(Y0,S0)|0,K=K+Math.imul(d,v0)|0,J=J+Math.imul(d,A0)|0,J=J+Math.imul(f,v0)|0,j=j+Math.imul(f,A0)|0,K=K+Math.imul(r,M0)|0,J=J+Math.imul(r,w0)|0,J=J+Math.imul(O0,M0)|0,j=j+Math.imul(O0,w0)|0;var i0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(i0>>>26)|0,i0&=67108863,K=Math.imul(l,N0),J=Math.imul(l,L0),J=J+Math.imul(u,N0)|0,j=Math.imul(u,L0),K=K+Math.imul(D,D0)|0,J=J+Math.imul(D,T0)|0,J=J+Math.imul(v,D0)|0,j=j+Math.imul(v,T0)|0,K=K+Math.imul(P0,k0)|0,J=J+Math.imul(P0,B0)|0,J=J+Math.imul(Q0,k0)|0,j=j+Math.imul(Q0,B0)|0,K=K+Math.imul(C0,R0)|0,J=J+Math.imul(C0,q0)|0,J=J+Math.imul(W0,R0)|0,j=j+Math.imul(W0,q0)|0,K=K+Math.imul(J0,I0)|0,J=J+Math.imul(J0,E0)|0,J=J+Math.imul(t,I0)|0,j=j+Math.imul(t,E0)|0,K=K+Math.imul(S,x0)|0,J=J+Math.imul(S,S0)|0,J=J+Math.imul(p,x0)|0,j=j+Math.imul(p,S0)|0,K=K+Math.imul(X0,v0)|0,J=J+Math.imul(X0,A0)|0,J=J+Math.imul(Y0,v0)|0,j=j+Math.imul(Y0,A0)|0,K=K+Math.imul(d,M0)|0,J=J+Math.imul(d,w0)|0,J=J+Math.imul(f,M0)|0,j=j+Math.imul(f,w0)|0;var t0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(t0>>>26)|0,t0&=67108863,K=Math.imul(l,D0),J=Math.imul(l,T0),J=J+Math.imul(u,D0)|0,j=Math.imul(u,T0),K=K+Math.imul(D,k0)|0,J=J+Math.imul(D,B0)|0,J=J+Math.imul(v,k0)|0,j=j+Math.imul(v,B0)|0,K=K+Math.imul(P0,R0)|0,J=J+Math.imul(P0,q0)|0,J=J+Math.imul(Q0,R0)|0,j=j+Math.imul(Q0,q0)|0,K=K+Math.imul(C0,I0)|0,J=J+Math.imul(C0,E0)|0,J=J+Math.imul(W0,I0)|0,j=j+Math.imul(W0,E0)|0,K=K+Math.imul(J0,x0)|0,J=J+Math.imul(J0,S0)|0,J=J+Math.imul(t,x0)|0,j=j+Math.imul(t,S0)|0,K=K+Math.imul(S,v0)|0,J=J+Math.imul(S,A0)|0,J=J+Math.imul(p,v0)|0,j=j+Math.imul(p,A0)|0,K=K+Math.imul(X0,M0)|0,J=J+Math.imul(X0,w0)|0,J=J+Math.imul(Y0,M0)|0,j=j+Math.imul(Y0,w0)|0;var e0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(e0>>>26)|0,e0&=67108863,K=Math.imul(l,k0),J=Math.imul(l,B0),J=J+Math.imul(u,k0)|0,j=Math.imul(u,B0),K=K+Math.imul(D,R0)|0,J=J+Math.imul(D,q0)|0,J=J+Math.imul(v,R0)|0,j=j+Math.imul(v,q0)|0,K=K+Math.imul(P0,I0)|0,J=J+Math.imul(P0,E0)|0,J=J+Math.imul(Q0,I0)|0,j=j+Math.imul(Q0,E0)|0,K=K+Math.imul(C0,x0)|0,J=J+Math.imul(C0,S0)|0,J=J+Math.imul(W0,x0)|0,j=j+Math.imul(W0,S0)|0,K=K+Math.imul(J0,v0)|0,J=J+Math.imul(J0,A0)|0,J=J+Math.imul(t,v0)|0,j=j+Math.imul(t,A0)|0,K=K+Math.imul(S,M0)|0,J=J+Math.imul(S,w0)|0,J=J+Math.imul(p,M0)|0,j=j+Math.imul(p,w0)|0;var X2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(X2>>>26)|0,X2&=67108863,K=Math.imul(l,R0),J=Math.imul(l,q0),J=J+Math.imul(u,R0)|0,j=Math.imul(u,q0),K=K+Math.imul(D,I0)|0,J=J+Math.imul(D,E0)|0,J=J+Math.imul(v,I0)|0,j=j+Math.imul(v,E0)|0,K=K+Math.imul(P0,x0)|0,J=J+Math.imul(P0,S0)|0,J=J+Math.imul(Q0,x0)|0,j=j+Math.imul(Q0,S0)|0,K=K+Math.imul(C0,v0)|0,J=J+Math.imul(C0,A0)|0,J=J+Math.imul(W0,v0)|0,j=j+Math.imul(W0,A0)|0,K=K+Math.imul(J0,M0)|0,J=J+Math.imul(J0,w0)|0,J=J+Math.imul(t,M0)|0,j=j+Math.imul(t,w0)|0;var J2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(J2>>>26)|0,J2&=67108863,K=Math.imul(l,I0),J=Math.imul(l,E0),J=J+Math.imul(u,I0)|0,j=Math.imul(u,E0),K=K+Math.imul(D,x0)|0,J=J+Math.imul(D,S0)|0,J=J+Math.imul(v,x0)|0,j=j+Math.imul(v,S0)|0,K=K+Math.imul(P0,v0)|0,J=J+Math.imul(P0,A0)|0,J=J+Math.imul(Q0,v0)|0,j=j+Math.imul(Q0,A0)|0,K=K+Math.imul(C0,M0)|0,J=J+Math.imul(C0,w0)|0,J=J+Math.imul(W0,M0)|0,j=j+Math.imul(W0,w0)|0;var O2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(O2>>>26)|0,O2&=67108863,K=Math.imul(l,x0),J=Math.imul(l,S0),J=J+Math.imul(u,x0)|0,j=Math.imul(u,S0),K=K+Math.imul(D,v0)|0,J=J+Math.imul(D,A0)|0,J=J+Math.imul(v,v0)|0,j=j+Math.imul(v,A0)|0,K=K+Math.imul(P0,M0)|0,J=J+Math.imul(P0,w0)|0,J=J+Math.imul(Q0,M0)|0,j=j+Math.imul(Q0,w0)|0;var $2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+($2>>>26)|0,$2&=67108863,K=Math.imul(l,v0),J=Math.imul(l,A0),J=J+Math.imul(u,v0)|0,j=Math.imul(u,A0),K=K+Math.imul(D,M0)|0,J=J+Math.imul(D,w0)|0,J=J+Math.imul(v,M0)|0,j=j+Math.imul(v,w0)|0;var G2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(G2>>>26)|0,G2&=67108863,K=Math.imul(l,M0),J=Math.imul(l,w0),J=J+Math.imul(u,M0)|0,j=Math.imul(u,w0);var Y2=(Z+K|0)+((J&8191)<<13)|0;return Z=(j+(J>>>13)|0)+(Y2>>>26)|0,Y2&=67108863,W[0]=C2,W[1]=m0,W[2]=p0,W[3]=o0,W[4]=u0,W[5]=s0,W[6]=f0,W[7]=n0,W[8]=a0,W[9]=r0,W[10]=i0,W[11]=t0,W[12]=e0,W[13]=X2,W[14]=J2,W[15]=O2,W[16]=$2,W[17]=G2,W[18]=Y2,Z!==0&&(W[19]=Z,G.length++),G};Math.imul||(x=I);function w(X,O,G){G.negative=O.negative^X.negative,G.length=X.length+O.length;for(var $=0,Y=0,W=0;W>>26)|0,Y+=Z>>>26,Z&=67108863}G.words[W]=K,$=Z,Z=Y}return $!==0?G.words[W]=$:G.length--,G.strip()}function M(X,O,G){var $=new y;return $.mulp(X,O,G)}C.prototype.mulTo=function(X,O){var G,$=this.length+X.length;return this.length===10&&X.length===10?G=x(this,X,O):$<63?G=I(this,X,O):$<1024?G=w(this,X,O):G=M(this,X,O),G};function y(X,O){this.x=X,this.y=O}y.prototype.makeRBT=function(X){for(var O=new Array(X),G=C.prototype._countBits(X)-1,$=0;$>=1;return $},y.prototype.permute=function(X,O,G,$,Y,W){for(var Z=0;Z>>1)Y++;return 1<>>13,G[2*W+1]=Y&8191,Y=Y>>>13;for(W=2*O;W<$;++W)G[W]=0;Q(Y===0),Q((Y&-8192)===0)},y.prototype.stub=function(X){for(var O=new Array(X),G=0;G>=26,O+=$/67108864|0,O+=Y>>>26,this.words[G]=Y&67108863}return O!==0&&(this.words[G]=O,this.length++),this},C.prototype.muln=function(X){return this.clone().imuln(X)},C.prototype.sqr=function(){return this.mul(this)},C.prototype.isqr=function(){return this.imul(this.clone())},C.prototype.pow=function(X){var O=F(X);if(O.length===0)return new C(1);for(var G=this,$=0;$=0);var O=X%26,G=(X-O)/26,$=67108863>>>26-O<<26-O,Y;if(O!==0){var W=0;for(Y=0;Y>>26-O}W&&(this.words[Y]=W,this.length++)}if(G!==0){for(Y=this.length-1;Y>=0;Y--)this.words[Y+G]=this.words[Y];for(Y=0;Y=0);var $;O?$=(O-O%26)/26:$=0;var Y=X%26,W=Math.min((X-Y)/26,this.length),Z=67108863^67108863>>>Y<W)for(this.length-=W,J=0;J=0&&(j!==0||J>=$);J--){var A=this.words[J]|0;this.words[J]=j<<26-Y|A>>>Y,j=A&Z}return K&&j!==0&&(K.words[K.length++]=j),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},C.prototype.ishrn=function(X,O,G){return Q(this.negative===0),this.iushrn(X,O,G)},C.prototype.shln=function(X){return this.clone().ishln(X)},C.prototype.ushln=function(X){return this.clone().iushln(X)},C.prototype.shrn=function(X){return this.clone().ishrn(X)},C.prototype.ushrn=function(X){return this.clone().iushrn(X)},C.prototype.testn=function(X){Q(typeof X=="number"&&X>=0);var O=X%26,G=(X-O)/26,$=1<=0);var O=X%26,G=(X-O)/26;if(Q(this.negative===0,"imaskn works only with positive numbers"),this.length<=G)return this;if(O!==0&&G++,this.length=Math.min(G,this.length),O!==0){var $=67108863^67108863>>>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},C.prototype.isubn=function(X){if(Q(typeof X=="number"),Q(X<67108864),X<0)return this.iaddn(-X);if(this.negative!==0)return this.negative=0,this.iaddn(X),this.negative=1,this;if(this.words[0]-=X,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var O=0;O>26)-(K/67108864|0),this.words[Y+G]=W&67108863}for(;Y>26,this.words[Y+G]=W&67108863;if(Z===0)return this.strip();for(Q(Z===-1),Z=0,Y=0;Y>26,this.words[Y]=W&67108863;return this.negative=1,this.strip()},C.prototype._wordDiv=function(X,O){var G=this.length-X.length,$=this.clone(),Y=X,W=Y.words[Y.length-1]|0,Z=this._countBits(W);G=26-Z,G!==0&&(Y=Y.ushln(G),$.iushln(G),W=Y.words[Y.length-1]|0);var K=$.length-Y.length,J;if(O!=="mod"){J=new C(null),J.length=K+1,J.words=new Array(J.length);for(var j=0;j=0;E--){var _=($.words[Y.length+E]|0)*67108864+($.words[Y.length+E-1]|0);for(_=Math.min(_/W|0,67108863),$._ishlnsubmul(Y,_,E);$.negative!==0;)_--,$.negative=0,$._ishlnsubmul(Y,1,E),$.isZero()||($.negative^=1);J&&(J.words[E]=_)}return J&&J.strip(),$.strip(),O!=="div"&&G!==0&&$.iushrn(G),{div:J||null,mod:$}},C.prototype.divmod=function(X,O,G){if(Q(!X.isZero()),this.isZero())return{div:new C(0),mod:new C(0)};var $,Y,W;return this.negative!==0&&X.negative===0?(W=this.neg().divmod(X,O),O!=="mod"&&($=W.div.neg()),O!=="div"&&(Y=W.mod.neg(),G&&Y.negative!==0&&Y.iadd(X)),{div:$,mod:Y}):this.negative===0&&X.negative!==0?(W=this.divmod(X.neg(),O),O!=="mod"&&($=W.div.neg()),{div:$,mod:W.mod}):(this.negative&X.negative)!==0?(W=this.neg().divmod(X.neg(),O),O!=="div"&&(Y=W.mod.neg(),G&&Y.negative!==0&&Y.isub(X)),{div:W.div,mod:Y}):X.length>this.length||this.cmp(X)<0?{div:new C(0),mod:this}:X.length===1?O==="div"?{div:this.divn(X.words[0]),mod:null}:O==="mod"?{div:null,mod:new C(this.modn(X.words[0]))}:{div:this.divn(X.words[0]),mod:new C(this.modn(X.words[0]))}:this._wordDiv(X,O)},C.prototype.div=function(X){return this.divmod(X,"div",!1).div},C.prototype.mod=function(X){return this.divmod(X,"mod",!1).mod},C.prototype.umod=function(X){return this.divmod(X,"mod",!0).mod},C.prototype.divRound=function(X){var O=this.divmod(X);if(O.mod.isZero())return O.div;var G=O.div.negative!==0?O.mod.isub(X):O.mod,$=X.ushrn(1),Y=X.andln(1),W=G.cmp($);return W<0||Y===1&&W===0?O.div:O.div.negative!==0?O.div.isubn(1):O.div.iaddn(1)},C.prototype.modn=function(X){Q(X<=67108863);for(var O=67108864%X,G=0,$=this.length-1;$>=0;$--)G=(O*G+(this.words[$]|0))%X;return G},C.prototype.idivn=function(X){Q(X<=67108863);for(var O=0,G=this.length-1;G>=0;G--){var $=(this.words[G]|0)+O*67108864;this.words[G]=$/X|0,O=$%X}return this.strip()},C.prototype.divn=function(X){return this.clone().idivn(X)},C.prototype.egcd=function(X){Q(X.negative===0),Q(!X.isZero());var O=this,G=X.clone();O.negative!==0?O=O.umod(X):O=O.clone();for(var $=new C(1),Y=new C(0),W=new C(0),Z=new C(1),K=0;O.isEven()&&G.isEven();)O.iushrn(1),G.iushrn(1),++K;for(var J=G.clone(),j=O.clone();!O.isZero();){for(var A=0,E=1;(O.words[0]&E)===0&&A<26;++A,E<<=1);if(A>0)for(O.iushrn(A);A-- >0;)($.isOdd()||Y.isOdd())&&($.iadd(J),Y.isub(j)),$.iushrn(1),Y.iushrn(1);for(var _=0,s=1;(G.words[0]&s)===0&&_<26;++_,s<<=1);if(_>0)for(G.iushrn(_);_-- >0;)(W.isOdd()||Z.isOdd())&&(W.iadd(J),Z.isub(j)),W.iushrn(1),Z.iushrn(1);O.cmp(G)>=0?(O.isub(G),$.isub(W),Y.isub(Z)):(G.isub(O),W.isub($),Z.isub(Y))}return{a:W,b:Z,gcd:G.iushln(K)}},C.prototype._invmp=function(X){Q(X.negative===0),Q(!X.isZero());var O=this,G=X.clone();O.negative!==0?O=O.umod(X):O=O.clone();for(var $=new C(1),Y=new C(0),W=G.clone();O.cmpn(1)>0&&G.cmpn(1)>0;){for(var Z=0,K=1;(O.words[0]&K)===0&&Z<26;++Z,K<<=1);if(Z>0)for(O.iushrn(Z);Z-- >0;)$.isOdd()&&$.iadd(W),$.iushrn(1);for(var J=0,j=1;(G.words[0]&j)===0&&J<26;++J,j<<=1);if(J>0)for(G.iushrn(J);J-- >0;)Y.isOdd()&&Y.iadd(W),Y.iushrn(1);O.cmp(G)>=0?(O.isub(G),$.isub(Y)):(G.isub(O),Y.isub($))}var A;return O.cmpn(1)===0?A=$:A=Y,A.cmpn(0)<0&&A.iadd(X),A},C.prototype.gcd=function(X){if(this.isZero())return X.abs();if(X.isZero())return this.abs();var O=this.clone(),G=X.clone();O.negative=0,G.negative=0;for(var $=0;O.isEven()&&G.isEven();$++)O.iushrn(1),G.iushrn(1);do{for(;O.isEven();)O.iushrn(1);for(;G.isEven();)G.iushrn(1);var Y=O.cmp(G);if(Y<0){var W=O;O=G,G=W}else if(Y===0||G.cmpn(1)===0)break;O.isub(G)}while(!0);return G.iushln($)},C.prototype.invm=function(X){return this.egcd(X).a.umod(X)},C.prototype.isEven=function(){return(this.words[0]&1)===0},C.prototype.isOdd=function(){return(this.words[0]&1)===1},C.prototype.andln=function(X){return this.words[0]&X},C.prototype.bincn=function(X){Q(typeof X=="number");var O=X%26,G=(X-O)/26,$=1<>>26,Z&=67108863,this.words[W]=Z}return Y!==0&&(this.words[W]=Y,this.length++),this},C.prototype.isZero=function(){return this.length===1&&this.words[0]===0},C.prototype.cmpn=function(X){var O=X<0;if(this.negative!==0&&!O)return-1;if(this.negative===0&&O)return 1;this.strip();var G;if(this.length>1)G=1;else{O&&(X=-X),Q(X<=67108863,"Number is too big");var $=this.words[0]|0;G=$===X?0:$X.length)return 1;if(this.length=0;G--){var $=this.words[G]|0,Y=X.words[G]|0;if($!==Y){$Y&&(O=1);break}}return O},C.prototype.gtn=function(X){return this.cmpn(X)===1},C.prototype.gt=function(X){return this.cmp(X)===1},C.prototype.gten=function(X){return this.cmpn(X)>=0},C.prototype.gte=function(X){return this.cmp(X)>=0},C.prototype.ltn=function(X){return this.cmpn(X)===-1},C.prototype.lt=function(X){return this.cmp(X)===-1},C.prototype.lten=function(X){return this.cmpn(X)<=0},C.prototype.lte=function(X){return this.cmp(X)<=0},C.prototype.eqn=function(X){return this.cmpn(X)===0},C.prototype.eq=function(X){return this.cmp(X)===0},C.red=function(X){return new n(X)},C.prototype.toRed=function(X){return Q(!this.red,"Already a number in reduction context"),Q(this.negative===0,"red works only with positives"),X.convertTo(this)._forceRed(X)},C.prototype.fromRed=function(){return Q(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},C.prototype._forceRed=function(X){return this.red=X,this},C.prototype.forceRed=function(X){return Q(!this.red,"Already a number in reduction context"),this._forceRed(X)},C.prototype.redAdd=function(X){return Q(this.red,"redAdd works only with red numbers"),this.red.add(this,X)},C.prototype.redIAdd=function(X){return Q(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,X)},C.prototype.redSub=function(X){return Q(this.red,"redSub works only with red numbers"),this.red.sub(this,X)},C.prototype.redISub=function(X){return Q(this.red,"redISub works only with red numbers"),this.red.isub(this,X)},C.prototype.redShl=function(X){return Q(this.red,"redShl works only with red numbers"),this.red.shl(this,X)},C.prototype.redMul=function(X){return Q(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.mul(this,X)},C.prototype.redIMul=function(X){return Q(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.imul(this,X)},C.prototype.redSqr=function(){return Q(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},C.prototype.redISqr=function(){return Q(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},C.prototype.redSqrt=function(){return Q(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},C.prototype.redInvm=function(){return Q(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},C.prototype.redNeg=function(){return Q(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},C.prototype.redPow=function(X){return Q(this.red&&!X.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,X)};var m={k256:null,p224:null,p192:null,p25519:null};function c(X,O){this.name=X,this.p=new C(O,16),this.n=this.p.bitLength(),this.k=new C(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}c.prototype._tmp=function(){var X=new C(null);return X.words=new Array(Math.ceil(this.n/13)),X},c.prototype.ireduce=function(X){var O=X,G;do this.split(O,this.tmp),O=this.imulK(O),O=O.iadd(this.tmp),G=O.bitLength();while(G>this.n);var $=G0?O.isub(this.p):O.strip!==void 0?O.strip():O._strip(),O},c.prototype.split=function(X,O){X.iushrn(this.n,0,O)},c.prototype.imulK=function(X){return X.imul(this.k)};function h(){c.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}R(h,c),h.prototype.split=function(X,O){for(var G=4194303,$=Math.min(X.length,9),Y=0;Y<$;Y++)O.words[Y]=X.words[Y];if(O.length=$,X.length<=9){X.words[0]=0,X.length=1;return}var W=X.words[9];for(O.words[O.length++]=W&G,Y=10;Y>>22,W=Z}W>>>=22,X.words[Y-10]=W,W===0&&X.length>10?X.length-=10:X.length-=9},h.prototype.imulK=function(X){X.words[X.length]=0,X.words[X.length+1]=0,X.length+=2;for(var O=0,G=0;G>>=26,X.words[G]=Y,O=$}return O!==0&&(X.words[X.length++]=O),X},C._prime=function(X){if(m[X])return m[X];var O;if(X==="k256")O=new h;else if(X==="p224")O=new a;else if(X==="p192")O=new i;else if(X==="p25519")O=new G0;else throw new Error("Unknown prime "+X);return m[X]=O,O};function n(X){if(typeof X=="string"){var O=C._prime(X);this.m=O.p,this.prime=O}else Q(X.gtn(1),"modulus must be greater than 1"),this.m=X,this.prime=null}n.prototype._verify1=function(X){Q(X.negative===0,"red works only with positives"),Q(X.red,"red works only with red numbers")},n.prototype._verify2=function(X,O){Q((X.negative|O.negative)===0,"red works only with positives"),Q(X.red&&X.red===O.red,"red works only with red numbers")},n.prototype.imod=function(X){return this.prime?this.prime.ireduce(X)._forceRed(this):X.umod(this.m)._forceRed(this)},n.prototype.neg=function(X){return X.isZero()?X.clone():this.m.sub(X)._forceRed(this)},n.prototype.add=function(X,O){this._verify2(X,O);var G=X.add(O);return G.cmp(this.m)>=0&&G.isub(this.m),G._forceRed(this)},n.prototype.iadd=function(X,O){this._verify2(X,O);var G=X.iadd(O);return G.cmp(this.m)>=0&&G.isub(this.m),G},n.prototype.sub=function(X,O){this._verify2(X,O);var G=X.sub(O);return G.cmpn(0)<0&&G.iadd(this.m),G._forceRed(this)},n.prototype.isub=function(X,O){this._verify2(X,O);var G=X.isub(O);return G.cmpn(0)<0&&G.iadd(this.m),G},n.prototype.shl=function(X,O){return this._verify1(X),this.imod(X.ushln(O))},n.prototype.imul=function(X,O){return this._verify2(X,O),this.imod(X.imul(O))},n.prototype.mul=function(X,O){return this._verify2(X,O),this.imod(X.mul(O))},n.prototype.isqr=function(X){return this.imul(X,X.clone())},n.prototype.sqr=function(X){return this.mul(X,X)},n.prototype.sqrt=function(X){if(X.isZero())return X.clone();var O=this.m.andln(3);if(Q(O%2===1),O===3){var G=this.m.add(new C(1)).iushrn(2);return this.pow(X,G)}for(var $=this.m.subn(1),Y=0;!$.isZero()&&$.andln(1)===0;)Y++,$.iushrn(1);Q(!$.isZero());var W=new C(1).toRed(this),Z=W.redNeg(),K=this.m.subn(1).iushrn(1),J=this.m.bitLength();for(J=new C(2*J*J).toRed(this);this.pow(J,K).cmp(Z)!==0;)J.redIAdd(Z);for(var j=this.pow(J,$),A=this.pow(X,$.addn(1).iushrn(1)),E=this.pow(X,$),_=Y;E.cmp(W)!==0;){for(var s=E,r=0;s.cmp(W)!==0;r++)s=s.redSqr();Q(r<_);var O0=this.pow(j,new C(1).iushln(_-r-1));A=A.redMul(O0),j=O0.redSqr(),E=E.redMul(j),_=r}return A},n.prototype.invm=function(X){var O=X._invmp(this.m);return O.negative!==0?(O.negative=0,this.imod(O).redNeg()):this.imod(O)},n.prototype.pow=function(X,O){if(O.isZero())return new C(1).toRed(this);if(O.cmpn(1)===0)return X.clone();var G=4,$=new Array(1<=0;Y--){for(var j=O.words[Y],A=J-1;A>=0;A--){var E=j>>A&1;if(W!==$[0]&&(W=this.sqr(W)),E===0&&Z===0){K=0;continue}Z<<=1,Z|=E,K++,!(K!==G&&(Y!==0||A!==0))&&(W=this.mul(W,$[Z]),K=0,Z=0)}J=26}return W},n.prototype.convertTo=function(X){var O=X.umod(this.m);return O===X?O.clone():O},n.prototype.convertFrom=function(X){var O=X.clone();return O.red=null,O},C.mont=function(X){return new Z0(X)};function Z0(X){n.call(this,X),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new C(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}R(Z0,n),Z0.prototype.convertTo=function(X){return this.imod(X.ushln(this.shift))},Z0.prototype.convertFrom=function(X){var O=this.imod(X.mul(this.rinv));return O.red=null,O},Z0.prototype.imul=function(X,O){if(X.isZero()||O.isZero())return X.words[0]=0,X.length=1,X;var G=X.imul(O),$=G.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Y=G.isub($).iushrn(this.shift),W=Y;return Y.cmp(this.m)>=0?W=Y.isub(this.m):Y.cmpn(0)<0&&(W=Y.iadd(this.m)),W._forceRed(this)},Z0.prototype.mul=function(X,O){if(X.isZero()||O.isZero())return new C(0)._forceRed(this);var G=X.mul(O),$=G.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Y=G.isub($).iushrn(this.shift),W=Y;return Y.cmp(this.m)>=0?W=Y.isub(this.m):Y.cmpn(0)<0&&(W=Y.iadd(this.m)),W._forceRed(this)},Z0.prototype.invm=function(X){var O=this.imod(X._invmp(this.m).mul(this.r2));return O._forceRed(this)}})(typeof k>"u"||k,B)}),t8=K0(()=>{}),o1=K0((B,k)=>{var V;k.exports=function(R){return V||(V=new N(null)),V.generate(R)};function N(R){this.rand=R}if(k.exports.Rand=N,N.prototype.generate=function(R){return this._rand(R)},N.prototype._rand=function(R){if(this.rand.getBytes)return this.rand.getBytes(R);for(var C=new Uint8Array(R),H=0;H{var V=i8(),N=o1();function Q(R){this.rand=R||new N.Rand}k.exports=Q,Q.create=function(R){return new Q(R)},Q.prototype._randbelow=function(R){var C=R.bitLength(),H=Math.ceil(C/8);do var L=new V(this.rand.generate(H));while(L.cmp(R)>=0);return L},Q.prototype._randrange=function(R,C){var H=C.sub(R);return R.add(this._randbelow(H))},Q.prototype.test=function(R,C,H){var L=R.bitLength(),P=V.mont(R),U=new V(1).toRed(P);C||(C=Math.max(1,L/48|0));for(var z=R.subn(1),T=0;!z.testn(T);T++);for(var q=R.shrn(T),F=z.toRed(P),I=!0;C>0;C--){var x=this._randrange(new V(2),z);H&&H(x);var w=x.toRed(P).redPow(q);if(!(w.cmp(U)===0||w.cmp(F)===0)){for(var M=1;M0;C--){var F=this._randrange(new V(2),U),I=R.gcd(F);if(I.cmpn(1)!==0)return I;var x=F.toRed(L).redPow(T);if(!(x.cmp(P)===0||x.cmp(q)===0)){for(var w=1;w{var V=g2();k.exports=h,h.simpleSieve=m,h.fermatTest=c;var N=Q6(),Q=new N(24),R=z6(),C=new R,H=new N(1),L=new N(2),P=new N(5),U=new N(16),z=new N(8),T=new N(10),q=new N(3),F=new N(7),I=new N(11),x=new N(4),w=new N(12),M=null;function y(){if(M!==null)return M;var a=1048576,i=[];i[0]=2;for(var G0=1,n=3;na;)G0.ishrn(1);if(G0.isEven()&&G0.iadd(H),G0.testn(1)||G0.iadd(L),i.cmp(L)){if(!i.cmp(P))for(;G0.mod(T).cmp(q);)G0.iadd(x)}else for(;G0.mod(Q).cmp(I);)G0.iadd(x);if(n=G0.shrn(1),m(n)&&m(G0)&&c(n)&&c(G0)&&C.test(n)&&C.test(G0))return G0}}}),e8=K0((B,k)=>{k.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}}),X3=K0((B,k)=>{var V=Q6(),N=z6(),Q=new N,R=new V(24),C=new V(11),H=new V(10),L=new V(3),P=new V(7),U=H6(),z=g2();k.exports=x;function T(M,y){return y=y||"utf8",Buffer.isBuffer(M)||(M=new Buffer(M,y)),this._pub=new V(M),this}function q(M,y){return y=y||"utf8",Buffer.isBuffer(M)||(M=new Buffer(M,y)),this._priv=new V(M),this}var F={};function I(M,y){var m=y.toString("hex"),c=[m,M.toString(16)].join("_");if(c in F)return F[c];var h=0;if(M.isEven()||!U.simpleSieve||!U.fermatTest(M)||!Q.test(M))return h+=1,m==="02"||m==="05"?h+=8:h+=4,F[c]=h,h;Q.test(M.shrn(1))||(h+=2);var a;switch(m){case"02":M.mod(R).cmp(C)&&(h+=8);break;case"05":a=M.mod(H),a.cmp(L)&&a.cmp(P)&&(h+=8);break;default:h+=4}return F[c]=h,h}function x(M,y,m){this.setGenerator(y),this.__prime=new V(M),this._prime=V.mont(this.__prime),this._primeLen=M.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,m?(this.setPublicKey=T,this.setPrivateKey=q):this._primeCode=8}Object.defineProperty(x.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=I(this.__prime,this.__gen)),this._primeCode}}),x.prototype.generateKeys=function(){return this._priv||(this._priv=new V(z(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},x.prototype.computeSecret=function(M){M=new V(M),M=M.toRed(this._prime);var y=M.redPow(this._priv).fromRed(),m=new Buffer(y.toArray()),c=this.getPrime();if(m.length{var k=H6(),V=e8(),N=X3();function Q(H){var L=new Buffer(V[H].prime,"hex"),P=new Buffer(V[H].gen,"hex");return new N(L,P)}var R={binary:!0,hex:!0,base64:!0};function C(H,L,P,U){return Buffer.isBuffer(L)||R[L]===void 0?C(H,"binary",L,P):(L=L||"binary",U=U||"binary",P=P||new Buffer([2]),Buffer.isBuffer(P)||(P=new Buffer(P,U)),typeof H=="number"?new N(k(H,P),P,!0):(Buffer.isBuffer(H)||(H=new Buffer(H,L)),new N(H,P,!0)))}B.DiffieHellmanGroup=B.createDiffieHellmanGroup=B.getDiffieHellman=Q,B.createDiffieHellman=B.DiffieHellman=C}),V6=K0((B,k)=>{k.exports=x2().EventEmitter}),O3=K0((B,k)=>{function V(F,I){var x=Object.keys(F);if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(F);I&&(w=w.filter(function(M){return Object.getOwnPropertyDescriptor(F,M).enumerable})),x.push.apply(x,w)}return x}function N(F){for(var I=1;I0?this.tail.next=x:this.head=x,this.tail=x,++this.length}},{key:"unshift",value:function(I){var x={data:I,next:this.head};this.length===0&&(this.tail=x),this.head=x,++this.length}},{key:"shift",value:function(){if(this.length!==0){var I=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,I}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(I){if(this.length===0)return"";for(var x=this.head,w=""+x.data;x=x.next;)w+=I+x.data;return w}},{key:"concat",value:function(I){if(this.length===0)return P.alloc(0);for(var x=P.allocUnsafe(I>>>0),w=this.head,M=0;w;)q(w.data,x,M),M+=w.data.length,w=w.next;return x}},{key:"consume",value:function(I,x){var w;return Iy.length?y.length:I;if(m===y.length?M+=y:M+=y.slice(0,I),I-=m,I===0){m===y.length?(++w,x.next?this.head=x.next:this.head=this.tail=null):(this.head=x,x.data=y.slice(m));break}++w}return this.length-=w,M}},{key:"_getBuffer",value:function(I){var x=P.allocUnsafe(I),w=this.head,M=1;for(w.data.copy(x),I-=w.data.length;w=w.next;){var y=w.data,m=I>y.length?y.length:I;if(y.copy(x,x.length-I,0,m),I-=m,I===0){m===y.length?(++M,w.next?this.head=w.next:this.head=this.tail=null):(this.head=w,w.data=y.slice(m));break}++M}return this.length-=M,x}},{key:T,value:function(I,x){return z(this,N({},x,{depth:0,customInspect:!1}))}}]),F}()}),P6=K0((B,k)=>{function V(L,P){var U=this,z=this._readableState&&this._readableState.destroyed,T=this._writableState&&this._writableState.destroyed;return z||T?(P?P(L):L&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(C,this,L)):process.nextTick(C,this,L)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(L||null,function(q){!P&&q?U._writableState?U._writableState.errorEmitted?process.nextTick(Q,U):(U._writableState.errorEmitted=!0,process.nextTick(N,U,q)):process.nextTick(N,U,q):P?(process.nextTick(Q,U),P(q)):process.nextTick(Q,U)}),this)}function N(L,P){C(L,P),Q(L)}function Q(L){L._writableState&&!L._writableState.emitClose||L._readableState&&!L._readableState.emitClose||L.emit("close")}function R(){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 C(L,P){L.emit("error",P)}function H(L,P){var{_readableState:U,_writableState:z}=L;U&&U.autoDestroy||z&&z.autoDestroy?L.destroy(P):L.emit("error",P)}k.exports={destroy:V,undestroy:R,errorOrDestroy:H}}),b2=K0((B,k)=>{function V(P,U){P.prototype=Object.create(U.prototype),P.prototype.constructor=P,P.__proto__=U}var N={};function Q(P,U,z){z||(z=Error);function T(F,I,x){return typeof U=="string"?U:U(F,I,x)}var q=function(F){V(I,F);function I(x,w,M){return F.call(this,T(x,w,M))||this}return I}(z);q.prototype.name=z.name,q.prototype.code=P,N[P]=q}function R(P,U){if(Array.isArray(P)){var z=P.length;return P=P.map(function(T){return String(T)}),z>2?"one of ".concat(U," ").concat(P.slice(0,z-1).join(", "),", or ")+P[z-1]:z===2?"one of ".concat(U," ").concat(P[0]," or ").concat(P[1]):"of ".concat(U," ").concat(P[0])}else return"of ".concat(U," ").concat(String(P))}function C(P,U,z){return P.substr(!z||z<0?0:+z,U.length)===U}function H(P,U,z){return(z===void 0||z>P.length)&&(z=P.length),P.substring(z-U.length,z)===U}function L(P,U,z){return typeof z!="number"&&(z=0),z+U.length>P.length?!1:P.indexOf(U,z)!==-1}Q("ERR_INVALID_OPT_VALUE",function(P,U){return'The value "'+U+'" is invalid for option "'+P+'"'},TypeError),Q("ERR_INVALID_ARG_TYPE",function(P,U,z){var T;typeof U=="string"&&C(U,"not ")?(T="must not be",U=U.replace(/^not /,"")):T="must be";var q;if(H(P," argument"))q="The ".concat(P," ").concat(T," ").concat(R(U,"type"));else{var F=L(P,".")?"property":"argument";q='The "'.concat(P,'" ').concat(F," ").concat(T," ").concat(R(U,"type"))}return q+=". Received type ".concat(typeof z),q},TypeError),Q("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),Q("ERR_METHOD_NOT_IMPLEMENTED",function(P){return"The "+P+" method is not implemented"}),Q("ERR_STREAM_PREMATURE_CLOSE","Premature close"),Q("ERR_STREAM_DESTROYED",function(P){return"Cannot call "+P+" after a stream was destroyed"}),Q("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),Q("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),Q("ERR_STREAM_WRITE_AFTER_END","write after end"),Q("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),Q("ERR_UNKNOWN_ENCODING",function(P){return"Unknown encoding: "+P},TypeError),Q("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),k.exports.codes=N}),U6=K0((B,k)=>{var V=b2().codes.ERR_INVALID_OPT_VALUE;function N(R,C,H){return R.highWaterMark!=null?R.highWaterMark:C?R[H]:null}function Q(R,C,H,L){var P=N(C,L,H);if(P!=null){if(!(isFinite(P)&&Math.floor(P)===P)||P<0){var U=L?H:"highWaterMark";throw new V(U,P)}return Math.floor(P)}return R.objectMode?16:16384}k.exports={getHighWaterMark:Q}}),F6=K0((B,k)=>{k.exports=n;function V(o){var d=this;this.next=null,this.entry=null,this.finish=function(){O0(d,o)}}var N;n.WritableState=i;var Q={deprecate:m5()},R=V6(),C=P2().Buffer,H=global.Uint8Array||function(){};function L(o){return C.from(o)}function P(o){return C.isBuffer(o)||o instanceof H}var U=P6(),z=U6(),T=z.getHighWaterMark,q=b2().codes,F=q.ERR_INVALID_ARG_TYPE,I=q.ERR_METHOD_NOT_IMPLEMENTED,x=q.ERR_MULTIPLE_CALLBACK,w=q.ERR_STREAM_CANNOT_PIPE,M=q.ERR_STREAM_DESTROYED,y=q.ERR_STREAM_NULL_VALUES,m=q.ERR_STREAM_WRITE_AFTER_END,c=q.ERR_UNKNOWN_ENCODING,h=U.errorOrDestroy;c0()(n,R);function a(){}function i(o,d,f){N=N||y2(),o=o||{},typeof f!="boolean"&&(f=d instanceof N),this.objectMode=!!o.objectMode,f&&(this.objectMode=this.objectMode||!!o.writableObjectMode),this.highWaterMark=T(this,o,"writableHighWaterMark",f),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var U0=o.decodeStrings===!1;this.decodeStrings=!U0,this.defaultEncoding=o.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(X0){Z(d,X0)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=o.emitClose!==!1,this.autoDestroy=!!o.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new V(this)}i.prototype.getBuffer=function(){for(var o=this.bufferedRequest,d=[];o;)d.push(o),o=o.next;return d},function(){try{Object.defineProperty(i.prototype,"buffer",{get:Q.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var G0;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(G0=Function.prototype[Symbol.hasInstance],Object.defineProperty(n,Symbol.hasInstance,{value:function(o){return G0.call(this,o)?!0:this!==n?!1:o&&o._writableState instanceof i}})):G0=function(o){return o instanceof this};function n(o){N=N||y2();var d=this instanceof N;if(!d&&!G0.call(n,this))return new n(o);this._writableState=new i(o,this,d),this.writable=!0,o&&(typeof o.write=="function"&&(this._write=o.write),typeof o.writev=="function"&&(this._writev=o.writev),typeof o.destroy=="function"&&(this._destroy=o.destroy),typeof o.final=="function"&&(this._final=o.final)),R.call(this)}n.prototype.pipe=function(){h(this,new w)};function Z0(o,d){var f=new m;h(o,f),process.nextTick(d,f)}function X(o,d,f,U0){var X0;return f===null?X0=new y:typeof f!="string"&&!d.objectMode&&(X0=new F("chunk",["string","Buffer"],f)),X0?(h(o,X0),process.nextTick(U0,X0),!1):!0}n.prototype.write=function(o,d,f){var U0=this._writableState,X0=!1,Y0=!U0.objectMode&&P(o);return Y0&&!C.isBuffer(o)&&(o=L(o)),typeof d=="function"&&(f=d,d=null),Y0?d="buffer":d||(d=U0.defaultEncoding),typeof f!="function"&&(f=a),U0.ending?Z0(this,f):(Y0||X(this,U0,o,f))&&(U0.pendingcb++,X0=G(this,U0,Y0,o,d,f)),X0},n.prototype.cork=function(){this._writableState.corked++},n.prototype.uncork=function(){var o=this._writableState;o.corked&&(o.corked--,!o.writing&&!o.corked&&!o.bufferProcessing&&o.bufferedRequest&&j(this,o))},n.prototype.setDefaultEncoding=function(o){if(typeof o=="string"&&(o=o.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((o+"").toLowerCase())>-1))throw new c(o);return this._writableState.defaultEncoding=o,this},Object.defineProperty(n.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function O(o,d,f){return!o.objectMode&&o.decodeStrings!==!1&&typeof d=="string"&&(d=C.from(d,f)),d}Object.defineProperty(n.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function G(o,d,f,U0,X0,Y0){if(!f){var g=O(d,U0,X0);U0!==g&&(f=!0,X0="buffer",U0=g)}var S=d.objectMode?1:U0.length;d.length+=S;var p=d.length{var V=Object.keys||function(z){var T=[];for(var q in z)T.push(q);return T};k.exports=L;var N=T6(),Q=F6();c0()(L,N);for(R=V(Q.prototype),H=0;H{var V=b2().codes.ERR_STREAM_PREMATURE_CLOSE;function N(H){var L=!1;return function(){if(!L){L=!0;for(var P=arguments.length,U=new Array(P),z=0;z{var V;function N(y,m,c){return m in y?Object.defineProperty(y,m,{value:c,enumerable:!0,configurable:!0,writable:!0}):y[m]=c,y}var Q=u1(),R=Symbol("lastResolve"),C=Symbol("lastReject"),H=Symbol("error"),L=Symbol("ended"),P=Symbol("lastPromise"),U=Symbol("handlePromise"),z=Symbol("stream");function T(y,m){return{value:y,done:m}}function q(y){var m=y[R];if(m!==null){var c=y[z].read();c!==null&&(y[P]=null,y[R]=null,y[C]=null,m(T(c,!1)))}}function F(y){process.nextTick(q,y)}function I(y,m){return function(c,h){y.then(function(){if(m[L]){c(T(void 0,!0));return}m[U](c,h)},h)}}var x=Object.getPrototypeOf(function(){}),w=Object.setPrototypeOf((V={get stream(){return this[z]},next:function(){var y=this,m=this[H];if(m!==null)return Promise.reject(m);if(this[L])return Promise.resolve(T(void 0,!0));if(this[z].destroyed)return new Promise(function(i,G0){process.nextTick(function(){y[H]?G0(y[H]):i(T(void 0,!0))})});var c=this[P],h;if(c)h=new Promise(I(c,this));else{var a=this[z].read();if(a!==null)return Promise.resolve(T(a,!1));h=new Promise(this[U])}return this[P]=h,h}},N(V,Symbol.asyncIterator,function(){return this}),N(V,"return",function(){var y=this;return new Promise(function(m,c){y[z].destroy(null,function(h){if(h){c(h);return}m(T(void 0,!0))})})}),V),x),M=function(y){var m,c=Object.create(w,(m={},N(m,z,{value:y,writable:!0}),N(m,R,{value:null,writable:!0}),N(m,C,{value:null,writable:!0}),N(m,H,{value:null,writable:!0}),N(m,L,{value:y._readableState.endEmitted,writable:!0}),N(m,U,{value:function(h,a){var i=c[z].read();i?(c[P]=null,c[R]=null,c[C]=null,h(T(i,!1))):(c[R]=h,c[C]=a)},writable:!0}),m));return c[P]=null,Q(y,function(h){if(h&&h.code!=="ERR_STREAM_PREMATURE_CLOSE"){var a=c[C];a!==null&&(c[P]=null,c[R]=null,c[C]=null,a(h)),c[H]=h;return}var i=c[R];i!==null&&(c[P]=null,c[R]=null,c[C]=null,i(T(void 0,!0))),c[L]=!0}),y.on("readable",F.bind(null,c)),c};k.exports=M}),G3=K0((B,k)=>{k.exports=function(){throw new Error("Readable.from is not available in the browser")}}),T6=K0((B,k)=>{k.exports=X;var V;X.ReadableState=Z0;var N=x2().EventEmitter,Q=function(g,S){return g.listeners(S).length},R=V6(),C=P2().Buffer,H=global.Uint8Array||function(){};function L(g){return C.from(g)}function P(g){return C.isBuffer(g)||g instanceof H}var U=Q1(),z;U&&U.debuglog?z=U.debuglog("stream"):z=function(){};var T=O3(),q=P6(),F=U6(),I=F.getHighWaterMark,x=b2().codes,w=x.ERR_INVALID_ARG_TYPE,M=x.ERR_STREAM_PUSH_AFTER_EOF,y=x.ERR_METHOD_NOT_IMPLEMENTED,m=x.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,c,h,a;c0()(X,R);var i=q.errorOrDestroy,G0=["error","close","destroy","pause","resume"];function n(g,S,p){if(typeof g.prependListener=="function")return g.prependListener(S,p);!g._events||!g._events[S]?g.on(S,p):Array.isArray(g._events[S])?g._events[S].unshift(p):g._events[S]=[p,g._events[S]]}function Z0(g,S,p){V=V||y2(),g=g||{},typeof p!="boolean"&&(p=S instanceof V),this.objectMode=!!g.objectMode,p&&(this.objectMode=this.objectMode||!!g.readableObjectMode),this.highWaterMark=I(this,g,"readableHighWaterMark",p),this.buffer=new T,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=g.emitClose!==!1,this.autoDestroy=!!g.autoDestroy,this.destroyed=!1,this.defaultEncoding=g.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,g.encoding&&(c||(c=(j1(),T2(s2)).StringDecoder),this.decoder=new c(g.encoding),this.encoding=g.encoding)}function X(g){if(V=V||y2(),!(this instanceof X))return new X(g);var S=this instanceof V;this._readableState=new Z0(g,this,S),this.readable=!0,g&&(typeof g.read=="function"&&(this._read=g.read),typeof g.destroy=="function"&&(this._destroy=g.destroy)),R.call(this)}Object.defineProperty(X.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(g){!this._readableState||(this._readableState.destroyed=g)}}),X.prototype.destroy=q.destroy,X.prototype._undestroy=q.undestroy,X.prototype._destroy=function(g,S){S(g)},X.prototype.push=function(g,S){var p=this._readableState,e;return p.objectMode?e=!0:typeof g=="string"&&(S=S||p.defaultEncoding,S!==p.encoding&&(g=C.from(g,S),S=""),e=!0),O(this,g,S,!1,e)},X.prototype.unshift=function(g){return O(this,g,null,!0,!1)};function O(g,S,p,e,J0){z("readableAddChunk",S);var t=g._readableState;if(S===null)t.reading=!1,K(g,t);else{var y0;if(J0||(y0=$(t,S)),y0)i(g,y0);else if(t.objectMode||S&&S.length>0)if(typeof S!="string"&&!t.objectMode&&Object.getPrototypeOf(S)!==C.prototype&&(S=L(S)),e)t.endEmitted?i(g,new m):G(g,t,S,!0);else if(t.ended)i(g,new M);else{if(t.destroyed)return!1;t.reading=!1,t.decoder&&!p?(S=t.decoder.write(S),t.objectMode||S.length!==0?G(g,t,S,!1):A(g,t)):G(g,t,S,!1)}else e||(t.reading=!1,A(g,t))}return!t.ended&&(t.length=Y?g=Y:(g--,g|=g>>>1,g|=g>>>2,g|=g>>>4,g|=g>>>8,g|=g>>>16,g++),g}function Z(g,S){return g<=0||S.length===0&&S.ended?0:S.objectMode?1:g!==g?S.flowing&&S.length?S.buffer.head.data.length:S.length:(g>S.highWaterMark&&(S.highWaterMark=W(g)),g<=S.length?g:S.ended?S.length:(S.needReadable=!0,0))}X.prototype.read=function(g){z("read",g),g=parseInt(g,10);var S=this._readableState,p=g;if(g!==0&&(S.emittedReadable=!1),g===0&&S.needReadable&&((S.highWaterMark!==0?S.length>=S.highWaterMark:S.length>0)||S.ended))return z("read: emitReadable",S.length,S.ended),S.length===0&&S.ended?U0(this):J(this),null;if(g=Z(g,S),g===0&&S.ended)return S.length===0&&U0(this),null;var e=S.needReadable;z("need readable",e),(S.length===0||S.length-g0?J0=f(g,S):J0=null,J0===null?(S.needReadable=S.length<=S.highWaterMark,g=0):(S.length-=g,S.awaitDrain=0),S.length===0&&(S.ended||(S.needReadable=!0),p!==g&&S.ended&&U0(this)),J0!==null&&this.emit("data",J0),J0};function K(g,S){if(z("onEofChunk"),!S.ended){if(S.decoder){var p=S.decoder.end();p&&p.length&&(S.buffer.push(p),S.length+=S.objectMode?1:p.length)}S.ended=!0,S.sync?J(g):(S.needReadable=!1,S.emittedReadable||(S.emittedReadable=!0,j(g)))}}function J(g){var S=g._readableState;z("emitReadable",S.needReadable,S.emittedReadable),S.needReadable=!1,S.emittedReadable||(z("emitReadable",S.flowing),S.emittedReadable=!0,process.nextTick(j,g))}function j(g){var S=g._readableState;z("emitReadable_",S.destroyed,S.length,S.ended),!S.destroyed&&(S.length||S.ended)&&(g.emit("readable"),S.emittedReadable=!1),S.needReadable=!S.flowing&&!S.ended&&S.length<=S.highWaterMark,d(g)}function A(g,S){S.readingMore||(S.readingMore=!0,process.nextTick(E,g,S))}function E(g,S){for(;!S.reading&&!S.ended&&(S.length1&&Y0(e.pipes,g)!==-1)&&!_0&&(z("false write response, pause",e.awaitDrain),e.awaitDrain++),p.pause())}function d0(l){z("onerror",l),b(),g.removeListener("error",d0),Q(g,"error")===0&&i(g,l)}n(g,"error",d0);function D(){g.removeListener("finish",v),b()}g.once("close",D);function v(){z("onfinish"),g.removeListener("close",D),b()}g.once("finish",v);function b(){z("unpipe"),p.unpipe(g)}return g.emit("pipe",p),e.flowing||(z("pipe resume"),p.resume()),g};function _(g){return function(){var S=g._readableState;z("pipeOnDrain",S.awaitDrain),S.awaitDrain&&S.awaitDrain--,S.awaitDrain===0&&Q(g,"data")&&(S.flowing=!0,d(g))}}X.prototype.unpipe=function(g){var S=this._readableState,p={hasUnpiped:!1};if(S.pipesCount===0)return this;if(S.pipesCount===1)return g&&g!==S.pipes?this:(g||(g=S.pipes),S.pipes=null,S.pipesCount=0,S.flowing=!1,g&&g.emit("unpipe",this,p),this);if(!g){var{pipes:e,pipesCount:J0}=S;S.pipes=null,S.pipesCount=0,S.flowing=!1;for(var t=0;t0,e.flowing!==!1&&this.resume()):g==="readable"&&!e.endEmitted&&!e.readableListening&&(e.readableListening=e.needReadable=!0,e.flowing=!1,e.emittedReadable=!1,z("on readable",e.length,e.reading),e.length?J(this):e.reading||process.nextTick(r,this)),p},X.prototype.addListener=X.prototype.on,X.prototype.removeListener=function(g,S){var p=R.prototype.removeListener.call(this,g,S);return g==="readable"&&process.nextTick(s,this),p},X.prototype.removeAllListeners=function(g){var S=R.prototype.removeAllListeners.apply(this,arguments);return(g==="readable"||g===void 0)&&process.nextTick(s,this),S};function s(g){var S=g._readableState;S.readableListening=g.listenerCount("readable")>0,S.resumeScheduled&&!S.paused?S.flowing=!0:g.listenerCount("data")>0&&g.resume()}function r(g){z("readable nexttick read 0"),g.read(0)}X.prototype.resume=function(){var g=this._readableState;return g.flowing||(z("resume"),g.flowing=!g.readableListening,O0(this,g)),g.paused=!1,this};function O0(g,S){S.resumeScheduled||(S.resumeScheduled=!0,process.nextTick(o,g,S))}function o(g,S){z("resume",S.reading),S.reading||g.read(0),S.resumeScheduled=!1,g.emit("resume"),d(g),S.flowing&&!S.reading&&g.read(0)}X.prototype.pause=function(){return z("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(z("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function d(g){var S=g._readableState;for(z("flow",S.flowing);S.flowing&&g.read()!==null;);}X.prototype.wrap=function(g){var S=this,p=this._readableState,e=!1;g.on("end",function(){if(z("wrapped end"),p.decoder&&!p.ended){var y0=p.decoder.end();y0&&y0.length&&S.push(y0)}S.push(null)}),g.on("data",function(y0){if(z("wrapped data"),p.decoder&&(y0=p.decoder.write(y0)),!(p.objectMode&&y0==null)&&!(!p.objectMode&&(!y0||!y0.length))){var C0=S.push(y0);C0||(e=!0,g.pause())}});for(var J0 in g)this[J0]===void 0&&typeof g[J0]=="function"&&(this[J0]=function(y0){return function(){return g[y0].apply(g,arguments)}}(J0));for(var t=0;t=S.length?(S.decoder?p=S.buffer.join(""):S.buffer.length===1?p=S.buffer.first():p=S.buffer.concat(S.length),S.buffer.clear()):p=S.buffer.consume(g,S.decoder),p}function U0(g){var S=g._readableState;z("endReadable",S.endEmitted),S.endEmitted||(S.ended=!0,process.nextTick(X0,S,g))}function X0(g,S){if(z("endReadableNT",g.endEmitted,g.length),!g.endEmitted&&g.length===0&&(g.endEmitted=!0,S.readable=!1,S.emit("end"),g.autoDestroy)){var p=S._writableState;(!p||p.autoDestroy&&p.finished)&&S.destroy()}}typeof Symbol=="function"&&(X.from=function(g,S){return a===void 0&&(a=G3()),a(X,g,S)});function Y0(g,S){for(var p=0,e=g.length;p{k.exports=P;var V=b2().codes,N=V.ERR_METHOD_NOT_IMPLEMENTED,Q=V.ERR_MULTIPLE_CALLBACK,R=V.ERR_TRANSFORM_ALREADY_TRANSFORMING,C=V.ERR_TRANSFORM_WITH_LENGTH_0,H=y2();c0()(P,H);function L(T,q){var F=this._transformState;F.transforming=!1;var I=F.writecb;if(I===null)return this.emit("error",new Q);F.writechunk=null,F.writecb=null,q!=null&&this.push(q),I(T);var x=this._readableState;x.reading=!1,(x.needReadable||x.length{k.exports=N;var V=D6();c0()(N,V);function N(Q){if(!(this instanceof N))return new N(Q);V.call(this,Q)}N.prototype._transform=function(Q,R,C){C(null,Q)}}),C3=K0((B,k)=>{var V;function N(F){var I=!1;return function(){I||(I=!0,F.apply(void 0,arguments))}}var Q=b2().codes,R=Q.ERR_MISSING_ARGS,C=Q.ERR_STREAM_DESTROYED;function H(F){if(F)throw F}function L(F){return F.setHeader&&typeof F.abort=="function"}function P(F,I,x,w){w=N(w);var M=!1;F.on("close",function(){M=!0}),V===void 0&&(V=u1()),V(F,{readable:I,writable:x},function(m){if(m)return w(m);M=!0,w()});var y=!1;return function(m){if(!M&&!y){if(y=!0,L(F))return F.abort();if(typeof F.destroy=="function")return F.destroy();w(m||new C("pipe"))}}}function U(F){F()}function z(F,I){return F.pipe(I)}function T(F){return!F.length||typeof F[F.length-1]!="function"?H:F.pop()}function q(){for(var F=arguments.length,I=new Array(F),x=0;x0;return P(m,h,a,function(i){M||(M=i),i&&y.forEach(U),!h&&(y.forEach(U),w(M))})});return I.reduce(z)}k.exports=q}),K3=K0((B,k)=>{B=k.exports=T6(),B.Stream=B,B.Readable=B,B.Writable=F6(),B.Duplex=y2(),B.Transform=D6(),B.PassThrough=Y3(),B.finished=u1(),B.pipeline=C3()}),s1=K0((B,k)=>{(function(V,N){function Q($,Y){if(!$)throw new Error(Y||"Assertion failed")}function R($,Y){$.super_=Y;var W=function(){};W.prototype=Y.prototype,$.prototype=new W,$.prototype.constructor=$}function C($,Y,W){if(C.isBN($))return $;this.negative=0,this.words=null,this.length=0,this.red=null,$!==null&&((Y==="le"||Y==="be")&&(W=Y,Y=10),this._init($||0,Y||10,W||"be"))}typeof V=="object"?V.exports=C:N.BN=C,C.BN=C,C.wordSize=26;var H;try{typeof window<"u"&&typeof window.Buffer<"u"?H=window.Buffer:H=M2().Buffer}catch{}C.isBN=function($){return $ instanceof C?!0:$!==null&&typeof $=="object"&&$.constructor.wordSize===C.wordSize&&Array.isArray($.words)},C.max=function($,Y){return $.cmp(Y)>0?$:Y},C.min=function($,Y){return $.cmp(Y)<0?$:Y},C.prototype._init=function($,Y,W){if(typeof $=="number")return this._initNumber($,Y,W);if(typeof $=="object")return this._initArray($,Y,W);Y==="hex"&&(Y=16),Q(Y===(Y|0)&&Y>=2&&Y<=36),$=$.toString().replace(/\s+/g,"");var Z=0;$[0]==="-"&&(Z++,this.negative=1),Z<$.length&&(Y===16?this._parseHex($,Z,W):(this._parseBase($,Y,Z),W==="le"&&this._initArray(this.toArray(),Y,W)))},C.prototype._initNumber=function($,Y,W){$<0&&(this.negative=1,$=-$),$<67108864?(this.words=[$&67108863],this.length=1):$<4503599627370496?(this.words=[$&67108863,$/67108864&67108863],this.length=2):(Q($<9007199254740992),this.words=[$&67108863,$/67108864&67108863,1],this.length=3),W==="le"&&this._initArray(this.toArray(),Y,W)},C.prototype._initArray=function($,Y,W){if(Q(typeof $.length=="number"),$.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil($.length/3),this.words=new Array(this.length);for(var Z=0;Z=0;Z-=3)J=$[Z]|$[Z-1]<<8|$[Z-2]<<16,this.words[K]|=J<>>26-j&67108863,j+=24,j>=26&&(j-=26,K++);else if(W==="le")for(Z=0,K=0;Z<$.length;Z+=3)J=$[Z]|$[Z+1]<<8|$[Z+2]<<16,this.words[K]|=J<>>26-j&67108863,j+=24,j>=26&&(j-=26,K++);return this._strip()};function L($,Y){var W=$.charCodeAt(Y);if(W>=48&&W<=57)return W-48;if(W>=65&&W<=70)return W-55;if(W>=97&&W<=102)return W-87;Q(!1,"Invalid character in "+$)}function P($,Y,W){var Z=L($,W);return W-1>=Y&&(Z|=L($,W-1)<<4),Z}C.prototype._parseHex=function($,Y,W){this.length=Math.ceil(($.length-Y)/6),this.words=new Array(this.length);for(var Z=0;Z=Y;Z-=2)j=P($,Y,Z)<=18?(K-=18,J+=1,this.words[J]|=j>>>26):K+=8;else{var A=$.length-Y;for(Z=A%2===0?Y+1:Y;Z<$.length;Z+=2)j=P($,Y,Z)<=18?(K-=18,J+=1,this.words[J]|=j>>>26):K+=8}this._strip()};function U($,Y,W,Z){for(var K=0,J=0,j=Math.min($.length,W),A=Y;A=49?J=E-49+10:E>=17?J=E-17+10:J=E,Q(E>=0&&J1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},C.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{C.prototype[Symbol.for("nodejs.util.inspect.custom")]=T}catch{C.prototype.inspect=T}else C.prototype.inspect=T;function T(){return(this.red?""}var q=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],F=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],I=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];C.prototype.toString=function($,Y){$=$||10,Y=Y|0||1;var W;if($===16||$==="hex"){W="";for(var Z=0,K=0,J=0;J>>24-Z&16777215,Z+=2,Z>=26&&(Z-=26,J--),K!==0||J!==this.length-1?W=q[6-A.length]+A+W:W=A+W}for(K!==0&&(W=K.toString(16)+W);W.length%Y!==0;)W="0"+W;return this.negative!==0&&(W="-"+W),W}if($===($|0)&&$>=2&&$<=36){var E=F[$],_=I[$];W="";var s=this.clone();for(s.negative=0;!s.isZero();){var r=s.modrn(_).toString($);s=s.idivn(_),s.isZero()?W=r+W:W=q[E-r.length]+r+W}for(this.isZero()&&(W="0"+W);W.length%Y!==0;)W="0"+W;return this.negative!==0&&(W="-"+W),W}Q(!1,"Base should be between 2 and 36")},C.prototype.toNumber=function(){var $=this.words[0];return this.length===2?$+=this.words[1]*67108864:this.length===3&&this.words[2]===1?$+=4503599627370496+this.words[1]*67108864:this.length>2&&Q(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-$:$},C.prototype.toJSON=function(){return this.toString(16,2)},H&&(C.prototype.toBuffer=function($,Y){return this.toArrayLike(H,$,Y)}),C.prototype.toArray=function($,Y){return this.toArrayLike(Array,$,Y)};var x=function($,Y){return $.allocUnsafe?$.allocUnsafe(Y):new $(Y)};C.prototype.toArrayLike=function($,Y,W){this._strip();var Z=this.byteLength(),K=W||Math.max(1,Z);Q(Z<=K,"byte array longer than desired length"),Q(K>0,"Requested array length <= 0");var J=x($,K),j=Y==="le"?"LE":"BE";return this["_toArrayLike"+j](J,Z),J},C.prototype._toArrayLikeLE=function($,Y){for(var W=0,Z=0,K=0,J=0;K>8&255),W<$.length&&($[W++]=j>>16&255),J===6?(W<$.length&&($[W++]=j>>24&255),Z=0,J=0):(Z=j>>>24,J+=2)}if(W<$.length)for($[W++]=Z;W<$.length;)$[W++]=0},C.prototype._toArrayLikeBE=function($,Y){for(var W=$.length-1,Z=0,K=0,J=0;K=0&&($[W--]=j>>8&255),W>=0&&($[W--]=j>>16&255),J===6?(W>=0&&($[W--]=j>>24&255),Z=0,J=0):(Z=j>>>24,J+=2)}if(W>=0)for($[W--]=Z;W>=0;)$[W--]=0},Math.clz32?C.prototype._countBits=function($){return 32-Math.clz32($)}:C.prototype._countBits=function($){var Y=$,W=0;return Y>=4096&&(W+=13,Y>>>=13),Y>=64&&(W+=7,Y>>>=7),Y>=8&&(W+=4,Y>>>=4),Y>=2&&(W+=2,Y>>>=2),W+Y},C.prototype._zeroBits=function($){if($===0)return 26;var Y=$,W=0;return(Y&8191)===0&&(W+=13,Y>>>=13),(Y&127)===0&&(W+=7,Y>>>=7),(Y&15)===0&&(W+=4,Y>>>=4),(Y&3)===0&&(W+=2,Y>>>=2),(Y&1)===0&&W++,W},C.prototype.bitLength=function(){var $=this.words[this.length-1],Y=this._countBits($);return(this.length-1)*26+Y};function w($){for(var Y=new Array($.bitLength()),W=0;W>>K&1}return Y}C.prototype.zeroBits=function(){if(this.isZero())return 0;for(var $=0,Y=0;Y$.length?this.clone().ior($):$.clone().ior(this)},C.prototype.uor=function($){return this.length>$.length?this.clone().iuor($):$.clone().iuor(this)},C.prototype.iuand=function($){var Y;this.length>$.length?Y=$:Y=this;for(var W=0;W$.length?this.clone().iand($):$.clone().iand(this)},C.prototype.uand=function($){return this.length>$.length?this.clone().iuand($):$.clone().iuand(this)},C.prototype.iuxor=function($){var Y,W;this.length>$.length?(Y=this,W=$):(Y=$,W=this);for(var Z=0;Z$.length?this.clone().ixor($):$.clone().ixor(this)},C.prototype.uxor=function($){return this.length>$.length?this.clone().iuxor($):$.clone().iuxor(this)},C.prototype.inotn=function($){Q(typeof $=="number"&&$>=0);var Y=Math.ceil($/26)|0,W=$%26;this._expand(Y),W>0&&Y--;for(var Z=0;Z0&&(this.words[Z]=~this.words[Z]&67108863>>26-W),this._strip()},C.prototype.notn=function($){return this.clone().inotn($)},C.prototype.setn=function($,Y){Q(typeof $=="number"&&$>=0);var W=$/26|0,Z=$%26;return this._expand(W+1),Y?this.words[W]=this.words[W]|1<$.length?(W=this,Z=$):(W=$,Z=this);for(var K=0,J=0;J>>26;for(;K!==0&&J>>26;if(this.length=W.length,K!==0)this.words[this.length]=K,this.length++;else if(W!==this)for(;J$.length?this.clone().iadd($):$.clone().iadd(this)},C.prototype.isub=function($){if($.negative!==0){$.negative=0;var Y=this.iadd($);return $.negative=1,Y._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd($),this.negative=1,this._normSign();var W=this.cmp($);if(W===0)return this.negative=0,this.length=1,this.words[0]=0,this;var Z,K;W>0?(Z=this,K=$):(Z=$,K=this);for(var J=0,j=0;j>26,this.words[j]=Y&67108863;for(;J!==0&&j>26,this.words[j]=Y&67108863;if(J===0&&j>>26,r=E&67108863,O0=Math.min(_,Y.length-1),o=Math.max(0,_-$.length+1);o<=O0;o++){var d=_-o|0;K=$.words[d]|0,J=Y.words[o]|0,j=K*J+r,s+=j/67108864|0,r=j&67108863}W.words[_]=r|0,E=s|0}return E!==0?W.words[_]=E|0:W.length--,W._strip()}var y=function($,Y,W){var Z=$.words,K=Y.words,J=W.words,j=0,A,E,_,s=Z[0]|0,r=s&8191,O0=s>>>13,o=Z[1]|0,d=o&8191,f=o>>>13,U0=Z[2]|0,X0=U0&8191,Y0=U0>>>13,g=Z[3]|0,S=g&8191,p=g>>>13,e=Z[4]|0,J0=e&8191,t=e>>>13,y0=Z[5]|0,C0=y0&8191,W0=y0>>>13,_0=Z[6]|0,P0=_0&8191,Q0=_0>>>13,d0=Z[7]|0,D=d0&8191,v=d0>>>13,b=Z[8]|0,l=b&8191,u=b>>>13,F0=Z[9]|0,$0=F0&8191,z0=F0>>>13,b0=K[0]|0,V0=b0&8191,H0=b0>>>13,g0=K[1]|0,N0=g0&8191,L0=g0>>>13,K2=K[2]|0,D0=K2&8191,T0=K2>>>13,l0=K[3]|0,k0=l0&8191,B0=l0>>>13,j2=K[4]|0,R0=j2&8191,q0=j2>>>13,W2=K[5]|0,I0=W2&8191,E0=W2>>>13,Z2=K[6]|0,x0=Z2&8191,S0=Z2>>>13,Q2=K[7]|0,v0=Q2&8191,A0=Q2>>>13,z2=K[8]|0,M0=z2&8191,w0=z2>>>13,C2=K[9]|0,m0=C2&8191,p0=C2>>>13;W.negative=$.negative^Y.negative,W.length=19,A=Math.imul(r,V0),E=Math.imul(r,H0),E=E+Math.imul(O0,V0)|0,_=Math.imul(O0,H0);var o0=(j+A|0)+((E&8191)<<13)|0;j=(_+(E>>>13)|0)+(o0>>>26)|0,o0&=67108863,A=Math.imul(d,V0),E=Math.imul(d,H0),E=E+Math.imul(f,V0)|0,_=Math.imul(f,H0),A=A+Math.imul(r,N0)|0,E=E+Math.imul(r,L0)|0,E=E+Math.imul(O0,N0)|0,_=_+Math.imul(O0,L0)|0;var u0=(j+A|0)+((E&8191)<<13)|0;j=(_+(E>>>13)|0)+(u0>>>26)|0,u0&=67108863,A=Math.imul(X0,V0),E=Math.imul(X0,H0),E=E+Math.imul(Y0,V0)|0,_=Math.imul(Y0,H0),A=A+Math.imul(d,N0)|0,E=E+Math.imul(d,L0)|0,E=E+Math.imul(f,N0)|0,_=_+Math.imul(f,L0)|0,A=A+Math.imul(r,D0)|0,E=E+Math.imul(r,T0)|0,E=E+Math.imul(O0,D0)|0,_=_+Math.imul(O0,T0)|0;var s0=(j+A|0)+((E&8191)<<13)|0;j=(_+(E>>>13)|0)+(s0>>>26)|0,s0&=67108863,A=Math.imul(S,V0),E=Math.imul(S,H0),E=E+Math.imul(p,V0)|0,_=Math.imul(p,H0),A=A+Math.imul(X0,N0)|0,E=E+Math.imul(X0,L0)|0,E=E+Math.imul(Y0,N0)|0,_=_+Math.imul(Y0,L0)|0,A=A+Math.imul(d,D0)|0,E=E+Math.imul(d,T0)|0,E=E+Math.imul(f,D0)|0,_=_+Math.imul(f,T0)|0,A=A+Math.imul(r,k0)|0,E=E+Math.imul(r,B0)|0,E=E+Math.imul(O0,k0)|0,_=_+Math.imul(O0,B0)|0;var f0=(j+A|0)+((E&8191)<<13)|0;j=(_+(E>>>13)|0)+(f0>>>26)|0,f0&=67108863,A=Math.imul(J0,V0),E=Math.imul(J0,H0),E=E+Math.imul(t,V0)|0,_=Math.imul(t,H0),A=A+Math.imul(S,N0)|0,E=E+Math.imul(S,L0)|0,E=E+Math.imul(p,N0)|0,_=_+Math.imul(p,L0)|0,A=A+Math.imul(X0,D0)|0,E=E+Math.imul(X0,T0)|0,E=E+Math.imul(Y0,D0)|0,_=_+Math.imul(Y0,T0)|0,A=A+Math.imul(d,k0)|0,E=E+Math.imul(d,B0)|0,E=E+Math.imul(f,k0)|0,_=_+Math.imul(f,B0)|0,A=A+Math.imul(r,R0)|0,E=E+Math.imul(r,q0)|0,E=E+Math.imul(O0,R0)|0,_=_+Math.imul(O0,q0)|0;var n0=(j+A|0)+((E&8191)<<13)|0;j=(_+(E>>>13)|0)+(n0>>>26)|0,n0&=67108863,A=Math.imul(C0,V0),E=Math.imul(C0,H0),E=E+Math.imul(W0,V0)|0,_=Math.imul(W0,H0),A=A+Math.imul(J0,N0)|0,E=E+Math.imul(J0,L0)|0,E=E+Math.imul(t,N0)|0,_=_+Math.imul(t,L0)|0,A=A+Math.imul(S,D0)|0,E=E+Math.imul(S,T0)|0,E=E+Math.imul(p,D0)|0,_=_+Math.imul(p,T0)|0,A=A+Math.imul(X0,k0)|0,E=E+Math.imul(X0,B0)|0,E=E+Math.imul(Y0,k0)|0,_=_+Math.imul(Y0,B0)|0,A=A+Math.imul(d,R0)|0,E=E+Math.imul(d,q0)|0,E=E+Math.imul(f,R0)|0,_=_+Math.imul(f,q0)|0,A=A+Math.imul(r,I0)|0,E=E+Math.imul(r,E0)|0,E=E+Math.imul(O0,I0)|0,_=_+Math.imul(O0,E0)|0;var a0=(j+A|0)+((E&8191)<<13)|0;j=(_+(E>>>13)|0)+(a0>>>26)|0,a0&=67108863,A=Math.imul(P0,V0),E=Math.imul(P0,H0),E=E+Math.imul(Q0,V0)|0,_=Math.imul(Q0,H0),A=A+Math.imul(C0,N0)|0,E=E+Math.imul(C0,L0)|0,E=E+Math.imul(W0,N0)|0,_=_+Math.imul(W0,L0)|0,A=A+Math.imul(J0,D0)|0,E=E+Math.imul(J0,T0)|0,E=E+Math.imul(t,D0)|0,_=_+Math.imul(t,T0)|0,A=A+Math.imul(S,k0)|0,E=E+Math.imul(S,B0)|0,E=E+Math.imul(p,k0)|0,_=_+Math.imul(p,B0)|0,A=A+Math.imul(X0,R0)|0,E=E+Math.imul(X0,q0)|0,E=E+Math.imul(Y0,R0)|0,_=_+Math.imul(Y0,q0)|0,A=A+Math.imul(d,I0)|0,E=E+Math.imul(d,E0)|0,E=E+Math.imul(f,I0)|0,_=_+Math.imul(f,E0)|0,A=A+Math.imul(r,x0)|0,E=E+Math.imul(r,S0)|0,E=E+Math.imul(O0,x0)|0,_=_+Math.imul(O0,S0)|0;var r0=(j+A|0)+((E&8191)<<13)|0;j=(_+(E>>>13)|0)+(r0>>>26)|0,r0&=67108863,A=Math.imul(D,V0),E=Math.imul(D,H0),E=E+Math.imul(v,V0)|0,_=Math.imul(v,H0),A=A+Math.imul(P0,N0)|0,E=E+Math.imul(P0,L0)|0,E=E+Math.imul(Q0,N0)|0,_=_+Math.imul(Q0,L0)|0,A=A+Math.imul(C0,D0)|0,E=E+Math.imul(C0,T0)|0,E=E+Math.imul(W0,D0)|0,_=_+Math.imul(W0,T0)|0,A=A+Math.imul(J0,k0)|0,E=E+Math.imul(J0,B0)|0,E=E+Math.imul(t,k0)|0,_=_+Math.imul(t,B0)|0,A=A+Math.imul(S,R0)|0,E=E+Math.imul(S,q0)|0,E=E+Math.imul(p,R0)|0,_=_+Math.imul(p,q0)|0,A=A+Math.imul(X0,I0)|0,E=E+Math.imul(X0,E0)|0,E=E+Math.imul(Y0,I0)|0,_=_+Math.imul(Y0,E0)|0,A=A+Math.imul(d,x0)|0,E=E+Math.imul(d,S0)|0,E=E+Math.imul(f,x0)|0,_=_+Math.imul(f,S0)|0,A=A+Math.imul(r,v0)|0,E=E+Math.imul(r,A0)|0,E=E+Math.imul(O0,v0)|0,_=_+Math.imul(O0,A0)|0;var i0=(j+A|0)+((E&8191)<<13)|0;j=(_+(E>>>13)|0)+(i0>>>26)|0,i0&=67108863,A=Math.imul(l,V0),E=Math.imul(l,H0),E=E+Math.imul(u,V0)|0,_=Math.imul(u,H0),A=A+Math.imul(D,N0)|0,E=E+Math.imul(D,L0)|0,E=E+Math.imul(v,N0)|0,_=_+Math.imul(v,L0)|0,A=A+Math.imul(P0,D0)|0,E=E+Math.imul(P0,T0)|0,E=E+Math.imul(Q0,D0)|0,_=_+Math.imul(Q0,T0)|0,A=A+Math.imul(C0,k0)|0,E=E+Math.imul(C0,B0)|0,E=E+Math.imul(W0,k0)|0,_=_+Math.imul(W0,B0)|0,A=A+Math.imul(J0,R0)|0,E=E+Math.imul(J0,q0)|0,E=E+Math.imul(t,R0)|0,_=_+Math.imul(t,q0)|0,A=A+Math.imul(S,I0)|0,E=E+Math.imul(S,E0)|0,E=E+Math.imul(p,I0)|0,_=_+Math.imul(p,E0)|0,A=A+Math.imul(X0,x0)|0,E=E+Math.imul(X0,S0)|0,E=E+Math.imul(Y0,x0)|0,_=_+Math.imul(Y0,S0)|0,A=A+Math.imul(d,v0)|0,E=E+Math.imul(d,A0)|0,E=E+Math.imul(f,v0)|0,_=_+Math.imul(f,A0)|0,A=A+Math.imul(r,M0)|0,E=E+Math.imul(r,w0)|0,E=E+Math.imul(O0,M0)|0,_=_+Math.imul(O0,w0)|0;var t0=(j+A|0)+((E&8191)<<13)|0;j=(_+(E>>>13)|0)+(t0>>>26)|0,t0&=67108863,A=Math.imul($0,V0),E=Math.imul($0,H0),E=E+Math.imul(z0,V0)|0,_=Math.imul(z0,H0),A=A+Math.imul(l,N0)|0,E=E+Math.imul(l,L0)|0,E=E+Math.imul(u,N0)|0,_=_+Math.imul(u,L0)|0,A=A+Math.imul(D,D0)|0,E=E+Math.imul(D,T0)|0,E=E+Math.imul(v,D0)|0,_=_+Math.imul(v,T0)|0,A=A+Math.imul(P0,k0)|0,E=E+Math.imul(P0,B0)|0,E=E+Math.imul(Q0,k0)|0,_=_+Math.imul(Q0,B0)|0,A=A+Math.imul(C0,R0)|0,E=E+Math.imul(C0,q0)|0,E=E+Math.imul(W0,R0)|0,_=_+Math.imul(W0,q0)|0,A=A+Math.imul(J0,I0)|0,E=E+Math.imul(J0,E0)|0,E=E+Math.imul(t,I0)|0,_=_+Math.imul(t,E0)|0,A=A+Math.imul(S,x0)|0,E=E+Math.imul(S,S0)|0,E=E+Math.imul(p,x0)|0,_=_+Math.imul(p,S0)|0,A=A+Math.imul(X0,v0)|0,E=E+Math.imul(X0,A0)|0,E=E+Math.imul(Y0,v0)|0,_=_+Math.imul(Y0,A0)|0,A=A+Math.imul(d,M0)|0,E=E+Math.imul(d,w0)|0,E=E+Math.imul(f,M0)|0,_=_+Math.imul(f,w0)|0,A=A+Math.imul(r,m0)|0,E=E+Math.imul(r,p0)|0,E=E+Math.imul(O0,m0)|0,_=_+Math.imul(O0,p0)|0;var e0=(j+A|0)+((E&8191)<<13)|0;j=(_+(E>>>13)|0)+(e0>>>26)|0,e0&=67108863,A=Math.imul($0,N0),E=Math.imul($0,L0),E=E+Math.imul(z0,N0)|0,_=Math.imul(z0,L0),A=A+Math.imul(l,D0)|0,E=E+Math.imul(l,T0)|0,E=E+Math.imul(u,D0)|0,_=_+Math.imul(u,T0)|0,A=A+Math.imul(D,k0)|0,E=E+Math.imul(D,B0)|0,E=E+Math.imul(v,k0)|0,_=_+Math.imul(v,B0)|0,A=A+Math.imul(P0,R0)|0,E=E+Math.imul(P0,q0)|0,E=E+Math.imul(Q0,R0)|0,_=_+Math.imul(Q0,q0)|0,A=A+Math.imul(C0,I0)|0,E=E+Math.imul(C0,E0)|0,E=E+Math.imul(W0,I0)|0,_=_+Math.imul(W0,E0)|0,A=A+Math.imul(J0,x0)|0,E=E+Math.imul(J0,S0)|0,E=E+Math.imul(t,x0)|0,_=_+Math.imul(t,S0)|0,A=A+Math.imul(S,v0)|0,E=E+Math.imul(S,A0)|0,E=E+Math.imul(p,v0)|0,_=_+Math.imul(p,A0)|0,A=A+Math.imul(X0,M0)|0,E=E+Math.imul(X0,w0)|0,E=E+Math.imul(Y0,M0)|0,_=_+Math.imul(Y0,w0)|0,A=A+Math.imul(d,m0)|0,E=E+Math.imul(d,p0)|0,E=E+Math.imul(f,m0)|0,_=_+Math.imul(f,p0)|0;var X2=(j+A|0)+((E&8191)<<13)|0;j=(_+(E>>>13)|0)+(X2>>>26)|0,X2&=67108863,A=Math.imul($0,D0),E=Math.imul($0,T0),E=E+Math.imul(z0,D0)|0,_=Math.imul(z0,T0),A=A+Math.imul(l,k0)|0,E=E+Math.imul(l,B0)|0,E=E+Math.imul(u,k0)|0,_=_+Math.imul(u,B0)|0,A=A+Math.imul(D,R0)|0,E=E+Math.imul(D,q0)|0,E=E+Math.imul(v,R0)|0,_=_+Math.imul(v,q0)|0,A=A+Math.imul(P0,I0)|0,E=E+Math.imul(P0,E0)|0,E=E+Math.imul(Q0,I0)|0,_=_+Math.imul(Q0,E0)|0,A=A+Math.imul(C0,x0)|0,E=E+Math.imul(C0,S0)|0,E=E+Math.imul(W0,x0)|0,_=_+Math.imul(W0,S0)|0,A=A+Math.imul(J0,v0)|0,E=E+Math.imul(J0,A0)|0,E=E+Math.imul(t,v0)|0,_=_+Math.imul(t,A0)|0,A=A+Math.imul(S,M0)|0,E=E+Math.imul(S,w0)|0,E=E+Math.imul(p,M0)|0,_=_+Math.imul(p,w0)|0,A=A+Math.imul(X0,m0)|0,E=E+Math.imul(X0,p0)|0,E=E+Math.imul(Y0,m0)|0,_=_+Math.imul(Y0,p0)|0;var J2=(j+A|0)+((E&8191)<<13)|0;j=(_+(E>>>13)|0)+(J2>>>26)|0,J2&=67108863,A=Math.imul($0,k0),E=Math.imul($0,B0),E=E+Math.imul(z0,k0)|0,_=Math.imul(z0,B0),A=A+Math.imul(l,R0)|0,E=E+Math.imul(l,q0)|0,E=E+Math.imul(u,R0)|0,_=_+Math.imul(u,q0)|0,A=A+Math.imul(D,I0)|0,E=E+Math.imul(D,E0)|0,E=E+Math.imul(v,I0)|0,_=_+Math.imul(v,E0)|0,A=A+Math.imul(P0,x0)|0,E=E+Math.imul(P0,S0)|0,E=E+Math.imul(Q0,x0)|0,_=_+Math.imul(Q0,S0)|0,A=A+Math.imul(C0,v0)|0,E=E+Math.imul(C0,A0)|0,E=E+Math.imul(W0,v0)|0,_=_+Math.imul(W0,A0)|0,A=A+Math.imul(J0,M0)|0,E=E+Math.imul(J0,w0)|0,E=E+Math.imul(t,M0)|0,_=_+Math.imul(t,w0)|0,A=A+Math.imul(S,m0)|0,E=E+Math.imul(S,p0)|0,E=E+Math.imul(p,m0)|0,_=_+Math.imul(p,p0)|0;var O2=(j+A|0)+((E&8191)<<13)|0;j=(_+(E>>>13)|0)+(O2>>>26)|0,O2&=67108863,A=Math.imul($0,R0),E=Math.imul($0,q0),E=E+Math.imul(z0,R0)|0,_=Math.imul(z0,q0),A=A+Math.imul(l,I0)|0,E=E+Math.imul(l,E0)|0,E=E+Math.imul(u,I0)|0,_=_+Math.imul(u,E0)|0,A=A+Math.imul(D,x0)|0,E=E+Math.imul(D,S0)|0,E=E+Math.imul(v,x0)|0,_=_+Math.imul(v,S0)|0,A=A+Math.imul(P0,v0)|0,E=E+Math.imul(P0,A0)|0,E=E+Math.imul(Q0,v0)|0,_=_+Math.imul(Q0,A0)|0,A=A+Math.imul(C0,M0)|0,E=E+Math.imul(C0,w0)|0,E=E+Math.imul(W0,M0)|0,_=_+Math.imul(W0,w0)|0,A=A+Math.imul(J0,m0)|0,E=E+Math.imul(J0,p0)|0,E=E+Math.imul(t,m0)|0,_=_+Math.imul(t,p0)|0;var $2=(j+A|0)+((E&8191)<<13)|0;j=(_+(E>>>13)|0)+($2>>>26)|0,$2&=67108863,A=Math.imul($0,I0),E=Math.imul($0,E0),E=E+Math.imul(z0,I0)|0,_=Math.imul(z0,E0),A=A+Math.imul(l,x0)|0,E=E+Math.imul(l,S0)|0,E=E+Math.imul(u,x0)|0,_=_+Math.imul(u,S0)|0,A=A+Math.imul(D,v0)|0,E=E+Math.imul(D,A0)|0,E=E+Math.imul(v,v0)|0,_=_+Math.imul(v,A0)|0,A=A+Math.imul(P0,M0)|0,E=E+Math.imul(P0,w0)|0,E=E+Math.imul(Q0,M0)|0,_=_+Math.imul(Q0,w0)|0,A=A+Math.imul(C0,m0)|0,E=E+Math.imul(C0,p0)|0,E=E+Math.imul(W0,m0)|0,_=_+Math.imul(W0,p0)|0;var G2=(j+A|0)+((E&8191)<<13)|0;j=(_+(E>>>13)|0)+(G2>>>26)|0,G2&=67108863,A=Math.imul($0,x0),E=Math.imul($0,S0),E=E+Math.imul(z0,x0)|0,_=Math.imul(z0,S0),A=A+Math.imul(l,v0)|0,E=E+Math.imul(l,A0)|0,E=E+Math.imul(u,v0)|0,_=_+Math.imul(u,A0)|0,A=A+Math.imul(D,M0)|0,E=E+Math.imul(D,w0)|0,E=E+Math.imul(v,M0)|0,_=_+Math.imul(v,w0)|0,A=A+Math.imul(P0,m0)|0,E=E+Math.imul(P0,p0)|0,E=E+Math.imul(Q0,m0)|0,_=_+Math.imul(Q0,p0)|0;var Y2=(j+A|0)+((E&8191)<<13)|0;j=(_+(E>>>13)|0)+(Y2>>>26)|0,Y2&=67108863,A=Math.imul($0,v0),E=Math.imul($0,A0),E=E+Math.imul(z0,v0)|0,_=Math.imul(z0,A0),A=A+Math.imul(l,M0)|0,E=E+Math.imul(l,w0)|0,E=E+Math.imul(u,M0)|0,_=_+Math.imul(u,w0)|0,A=A+Math.imul(D,m0)|0,E=E+Math.imul(D,p0)|0,E=E+Math.imul(v,m0)|0,_=_+Math.imul(v,p0)|0;var R1=(j+A|0)+((E&8191)<<13)|0;j=(_+(E>>>13)|0)+(R1>>>26)|0,R1&=67108863,A=Math.imul($0,M0),E=Math.imul($0,w0),E=E+Math.imul(z0,M0)|0,_=Math.imul(z0,w0),A=A+Math.imul(l,m0)|0,E=E+Math.imul(l,p0)|0,E=E+Math.imul(u,m0)|0,_=_+Math.imul(u,p0)|0;var q1=(j+A|0)+((E&8191)<<13)|0;j=(_+(E>>>13)|0)+(q1>>>26)|0,q1&=67108863,A=Math.imul($0,m0),E=Math.imul($0,p0),E=E+Math.imul(z0,m0)|0,_=Math.imul(z0,p0);var I1=(j+A|0)+((E&8191)<<13)|0;return j=(_+(E>>>13)|0)+(I1>>>26)|0,I1&=67108863,J[0]=o0,J[1]=u0,J[2]=s0,J[3]=f0,J[4]=n0,J[5]=a0,J[6]=r0,J[7]=i0,J[8]=t0,J[9]=e0,J[10]=X2,J[11]=J2,J[12]=O2,J[13]=$2,J[14]=G2,J[15]=Y2,J[16]=R1,J[17]=q1,J[18]=I1,j!==0&&(J[19]=j,W.length++),W};Math.imul||(y=M);function m($,Y,W){W.negative=Y.negative^$.negative,W.length=$.length+Y.length;for(var Z=0,K=0,J=0;J>>26)|0,K+=j>>>26,j&=67108863}W.words[J]=A,Z=j,j=K}return Z!==0?W.words[J]=Z:W.length--,W._strip()}function c($,Y,W){return m($,Y,W)}C.prototype.mulTo=function($,Y){var W,Z=this.length+$.length;return this.length===10&&$.length===10?W=y(this,$,Y):Z<63?W=M(this,$,Y):Z<1024?W=m(this,$,Y):W=c(this,$,Y),W};function h($,Y){this.x=$,this.y=Y}h.prototype.makeRBT=function($){for(var Y=new Array($),W=C.prototype._countBits($)-1,Z=0;Z<$;Z++)Y[Z]=this.revBin(Z,W,$);return Y},h.prototype.revBin=function($,Y,W){if($===0||$===W-1)return $;for(var Z=0,K=0;K>=1;return Z},h.prototype.permute=function($,Y,W,Z,K,J){for(var j=0;j>>1)K++;return 1<>>13,W[2*J+1]=K&8191,K=K>>>13;for(J=2*Y;J>=26,W+=K/67108864|0,W+=J>>>26,this.words[Z]=J&67108863}return W!==0&&(this.words[Z]=W,this.length++),Y?this.ineg():this},C.prototype.muln=function($){return this.clone().imuln($)},C.prototype.sqr=function(){return this.mul(this)},C.prototype.isqr=function(){return this.imul(this.clone())},C.prototype.pow=function($){var Y=w($);if(Y.length===0)return new C(1);for(var W=this,Z=0;Z=0);var Y=$%26,W=($-Y)/26,Z=67108863>>>26-Y<<26-Y,K;if(Y!==0){var J=0;for(K=0;K>>26-Y}J&&(this.words[K]=J,this.length++)}if(W!==0){for(K=this.length-1;K>=0;K--)this.words[K+W]=this.words[K];for(K=0;K=0);var Z;Y?Z=(Y-Y%26)/26:Z=0;var K=$%26,J=Math.min(($-K)/26,this.length),j=67108863^67108863>>>K<J)for(this.length-=J,E=0;E=0&&(_!==0||E>=Z);E--){var s=this.words[E]|0;this.words[E]=_<<26-K|s>>>K,_=s&j}return A&&_!==0&&(A.words[A.length++]=_),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},C.prototype.ishrn=function($,Y,W){return Q(this.negative===0),this.iushrn($,Y,W)},C.prototype.shln=function($){return this.clone().ishln($)},C.prototype.ushln=function($){return this.clone().iushln($)},C.prototype.shrn=function($){return this.clone().ishrn($)},C.prototype.ushrn=function($){return this.clone().iushrn($)},C.prototype.testn=function($){Q(typeof $=="number"&&$>=0);var Y=$%26,W=($-Y)/26,Z=1<=0);var Y=$%26,W=($-Y)/26;if(Q(this.negative===0,"imaskn works only with positive numbers"),this.length<=W)return this;if(Y!==0&&W++,this.length=Math.min(W,this.length),Y!==0){var Z=67108863^67108863>>>Y<=67108864;Y++)this.words[Y]-=67108864,Y===this.length-1?this.words[Y+1]=1:this.words[Y+1]++;return this.length=Math.max(this.length,Y+1),this},C.prototype.isubn=function($){if(Q(typeof $=="number"),Q($<67108864),$<0)return this.iaddn(-$);if(this.negative!==0)return this.negative=0,this.iaddn($),this.negative=1,this;if(this.words[0]-=$,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var Y=0;Y>26)-(A/67108864|0),this.words[K+W]=J&67108863}for(;K>26,this.words[K+W]=J&67108863;if(j===0)return this._strip();for(Q(j===-1),j=0,K=0;K>26,this.words[K]=J&67108863;return this.negative=1,this._strip()},C.prototype._wordDiv=function($,Y){var W=this.length-$.length,Z=this.clone(),K=$,J=K.words[K.length-1]|0,j=this._countBits(J);W=26-j,W!==0&&(K=K.ushln(W),Z.iushln(W),J=K.words[K.length-1]|0);var A=Z.length-K.length,E;if(Y!=="mod"){E=new C(null),E.length=A+1,E.words=new Array(E.length);for(var _=0;_=0;r--){var O0=(Z.words[K.length+r]|0)*67108864+(Z.words[K.length+r-1]|0);for(O0=Math.min(O0/J|0,67108863),Z._ishlnsubmul(K,O0,r);Z.negative!==0;)O0--,Z.negative=0,Z._ishlnsubmul(K,1,r),Z.isZero()||(Z.negative^=1);E&&(E.words[r]=O0)}return E&&E._strip(),Z._strip(),Y!=="div"&&W!==0&&Z.iushrn(W),{div:E||null,mod:Z}},C.prototype.divmod=function($,Y,W){if(Q(!$.isZero()),this.isZero())return{div:new C(0),mod:new C(0)};var Z,K,J;return this.negative!==0&&$.negative===0?(J=this.neg().divmod($,Y),Y!=="mod"&&(Z=J.div.neg()),Y!=="div"&&(K=J.mod.neg(),W&&K.negative!==0&&K.iadd($)),{div:Z,mod:K}):this.negative===0&&$.negative!==0?(J=this.divmod($.neg(),Y),Y!=="mod"&&(Z=J.div.neg()),{div:Z,mod:J.mod}):(this.negative&$.negative)!==0?(J=this.neg().divmod($.neg(),Y),Y!=="div"&&(K=J.mod.neg(),W&&K.negative!==0&&K.isub($)),{div:J.div,mod:K}):$.length>this.length||this.cmp($)<0?{div:new C(0),mod:this}:$.length===1?Y==="div"?{div:this.divn($.words[0]),mod:null}:Y==="mod"?{div:null,mod:new C(this.modrn($.words[0]))}:{div:this.divn($.words[0]),mod:new C(this.modrn($.words[0]))}:this._wordDiv($,Y)},C.prototype.div=function($){return this.divmod($,"div",!1).div},C.prototype.mod=function($){return this.divmod($,"mod",!1).mod},C.prototype.umod=function($){return this.divmod($,"mod",!0).mod},C.prototype.divRound=function($){var Y=this.divmod($);if(Y.mod.isZero())return Y.div;var W=Y.div.negative!==0?Y.mod.isub($):Y.mod,Z=$.ushrn(1),K=$.andln(1),J=W.cmp(Z);return J<0||K===1&&J===0?Y.div:Y.div.negative!==0?Y.div.isubn(1):Y.div.iaddn(1)},C.prototype.modrn=function($){var Y=$<0;Y&&($=-$),Q($<=67108863);for(var W=67108864%$,Z=0,K=this.length-1;K>=0;K--)Z=(W*Z+(this.words[K]|0))%$;return Y?-Z:Z},C.prototype.modn=function($){return this.modrn($)},C.prototype.idivn=function($){var Y=$<0;Y&&($=-$),Q($<=67108863);for(var W=0,Z=this.length-1;Z>=0;Z--){var K=(this.words[Z]|0)+W*67108864;this.words[Z]=K/$|0,W=K%$}return this._strip(),Y?this.ineg():this},C.prototype.divn=function($){return this.clone().idivn($)},C.prototype.egcd=function($){Q($.negative===0),Q(!$.isZero());var Y=this,W=$.clone();Y.negative!==0?Y=Y.umod($):Y=Y.clone();for(var Z=new C(1),K=new C(0),J=new C(0),j=new C(1),A=0;Y.isEven()&&W.isEven();)Y.iushrn(1),W.iushrn(1),++A;for(var E=W.clone(),_=Y.clone();!Y.isZero();){for(var s=0,r=1;(Y.words[0]&r)===0&&s<26;++s,r<<=1);if(s>0)for(Y.iushrn(s);s-- >0;)(Z.isOdd()||K.isOdd())&&(Z.iadd(E),K.isub(_)),Z.iushrn(1),K.iushrn(1);for(var O0=0,o=1;(W.words[0]&o)===0&&O0<26;++O0,o<<=1);if(O0>0)for(W.iushrn(O0);O0-- >0;)(J.isOdd()||j.isOdd())&&(J.iadd(E),j.isub(_)),J.iushrn(1),j.iushrn(1);Y.cmp(W)>=0?(Y.isub(W),Z.isub(J),K.isub(j)):(W.isub(Y),J.isub(Z),j.isub(K))}return{a:J,b:j,gcd:W.iushln(A)}},C.prototype._invmp=function($){Q($.negative===0),Q(!$.isZero());var Y=this,W=$.clone();Y.negative!==0?Y=Y.umod($):Y=Y.clone();for(var Z=new C(1),K=new C(0),J=W.clone();Y.cmpn(1)>0&&W.cmpn(1)>0;){for(var j=0,A=1;(Y.words[0]&A)===0&&j<26;++j,A<<=1);if(j>0)for(Y.iushrn(j);j-- >0;)Z.isOdd()&&Z.iadd(J),Z.iushrn(1);for(var E=0,_=1;(W.words[0]&_)===0&&E<26;++E,_<<=1);if(E>0)for(W.iushrn(E);E-- >0;)K.isOdd()&&K.iadd(J),K.iushrn(1);Y.cmp(W)>=0?(Y.isub(W),Z.isub(K)):(W.isub(Y),K.isub(Z))}var s;return Y.cmpn(1)===0?s=Z:s=K,s.cmpn(0)<0&&s.iadd($),s},C.prototype.gcd=function($){if(this.isZero())return $.abs();if($.isZero())return this.abs();var Y=this.clone(),W=$.clone();Y.negative=0,W.negative=0;for(var Z=0;Y.isEven()&&W.isEven();Z++)Y.iushrn(1),W.iushrn(1);do{for(;Y.isEven();)Y.iushrn(1);for(;W.isEven();)W.iushrn(1);var K=Y.cmp(W);if(K<0){var J=Y;Y=W,W=J}else if(K===0||W.cmpn(1)===0)break;Y.isub(W)}while(!0);return W.iushln(Z)},C.prototype.invm=function($){return this.egcd($).a.umod($)},C.prototype.isEven=function(){return(this.words[0]&1)===0},C.prototype.isOdd=function(){return(this.words[0]&1)===1},C.prototype.andln=function($){return this.words[0]&$},C.prototype.bincn=function($){Q(typeof $=="number");var Y=$%26,W=($-Y)/26,Z=1<>>26,j&=67108863,this.words[J]=j}return K!==0&&(this.words[J]=K,this.length++),this},C.prototype.isZero=function(){return this.length===1&&this.words[0]===0},C.prototype.cmpn=function($){var Y=$<0;if(this.negative!==0&&!Y)return-1;if(this.negative===0&&Y)return 1;this._strip();var W;if(this.length>1)W=1;else{Y&&($=-$),Q($<=67108863,"Number is too big");var Z=this.words[0]|0;W=Z===$?0:Z<$?-1:1}return this.negative!==0?-W|0:W},C.prototype.cmp=function($){if(this.negative!==0&&$.negative===0)return-1;if(this.negative===0&&$.negative!==0)return 1;var Y=this.ucmp($);return this.negative!==0?-Y|0:Y},C.prototype.ucmp=function($){if(this.length>$.length)return 1;if(this.length<$.length)return-1;for(var Y=0,W=this.length-1;W>=0;W--){var Z=this.words[W]|0,K=$.words[W]|0;if(Z!==K){ZK&&(Y=1);break}}return Y},C.prototype.gtn=function($){return this.cmpn($)===1},C.prototype.gt=function($){return this.cmp($)===1},C.prototype.gten=function($){return this.cmpn($)>=0},C.prototype.gte=function($){return this.cmp($)>=0},C.prototype.ltn=function($){return this.cmpn($)===-1},C.prototype.lt=function($){return this.cmp($)===-1},C.prototype.lten=function($){return this.cmpn($)<=0},C.prototype.lte=function($){return this.cmp($)<=0},C.prototype.eqn=function($){return this.cmpn($)===0},C.prototype.eq=function($){return this.cmp($)===0},C.red=function($){return new O($)},C.prototype.toRed=function($){return Q(!this.red,"Already a number in reduction context"),Q(this.negative===0,"red works only with positives"),$.convertTo(this)._forceRed($)},C.prototype.fromRed=function(){return Q(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},C.prototype._forceRed=function($){return this.red=$,this},C.prototype.forceRed=function($){return Q(!this.red,"Already a number in reduction context"),this._forceRed($)},C.prototype.redAdd=function($){return Q(this.red,"redAdd works only with red numbers"),this.red.add(this,$)},C.prototype.redIAdd=function($){return Q(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,$)},C.prototype.redSub=function($){return Q(this.red,"redSub works only with red numbers"),this.red.sub(this,$)},C.prototype.redISub=function($){return Q(this.red,"redISub works only with red numbers"),this.red.isub(this,$)},C.prototype.redShl=function($){return Q(this.red,"redShl works only with red numbers"),this.red.shl(this,$)},C.prototype.redMul=function($){return Q(this.red,"redMul works only with red numbers"),this.red._verify2(this,$),this.red.mul(this,$)},C.prototype.redIMul=function($){return Q(this.red,"redMul works only with red numbers"),this.red._verify2(this,$),this.red.imul(this,$)},C.prototype.redSqr=function(){return Q(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},C.prototype.redISqr=function(){return Q(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},C.prototype.redSqrt=function(){return Q(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},C.prototype.redInvm=function(){return Q(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},C.prototype.redNeg=function(){return Q(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},C.prototype.redPow=function($){return Q(this.red&&!$.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,$)};var a={k256:null,p224:null,p192:null,p25519:null};function i($,Y){this.name=$,this.p=new C(Y,16),this.n=this.p.bitLength(),this.k=new C(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}i.prototype._tmp=function(){var $=new C(null);return $.words=new Array(Math.ceil(this.n/13)),$},i.prototype.ireduce=function($){var Y=$,W;do this.split(Y,this.tmp),Y=this.imulK(Y),Y=Y.iadd(this.tmp),W=Y.bitLength();while(W>this.n);var Z=W0?Y.isub(this.p):Y.strip!==void 0?Y.strip():Y._strip(),Y},i.prototype.split=function($,Y){$.iushrn(this.n,0,Y)},i.prototype.imulK=function($){return $.imul(this.k)};function G0(){i.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}R(G0,i),G0.prototype.split=function($,Y){for(var W=4194303,Z=Math.min($.length,9),K=0;K>>22,J=j}J>>>=22,$.words[K-10]=J,J===0&&$.length>10?$.length-=10:$.length-=9},G0.prototype.imulK=function($){$.words[$.length]=0,$.words[$.length+1]=0,$.length+=2;for(var Y=0,W=0;W<$.length;W++){var Z=$.words[W]|0;Y+=Z*977,$.words[W]=Y&67108863,Y=Z*64+(Y/67108864|0)}return $.words[$.length-1]===0&&($.length--,$.words[$.length-1]===0&&$.length--),$};function n(){i.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}R(n,i);function Z0(){i.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}R(Z0,i);function X(){i.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}R(X,i),X.prototype.imulK=function($){for(var Y=0,W=0;W<$.length;W++){var Z=($.words[W]|0)*19+Y,K=Z&67108863;Z>>>=26,$.words[W]=K,Y=Z}return Y!==0&&($.words[$.length++]=Y),$},C._prime=function($){if(a[$])return a[$];var Y;if($==="k256")Y=new G0;else if($==="p224")Y=new n;else if($==="p192")Y=new Z0;else if($==="p25519")Y=new X;else throw new Error("Unknown prime "+$);return a[$]=Y,Y};function O($){if(typeof $=="string"){var Y=C._prime($);this.m=Y.p,this.prime=Y}else Q($.gtn(1),"modulus must be greater than 1"),this.m=$,this.prime=null}O.prototype._verify1=function($){Q($.negative===0,"red works only with positives"),Q($.red,"red works only with red numbers")},O.prototype._verify2=function($,Y){Q(($.negative|Y.negative)===0,"red works only with positives"),Q($.red&&$.red===Y.red,"red works only with red numbers")},O.prototype.imod=function($){return this.prime?this.prime.ireduce($)._forceRed(this):(z($,$.umod(this.m)._forceRed(this)),$)},O.prototype.neg=function($){return $.isZero()?$.clone():this.m.sub($)._forceRed(this)},O.prototype.add=function($,Y){this._verify2($,Y);var W=$.add(Y);return W.cmp(this.m)>=0&&W.isub(this.m),W._forceRed(this)},O.prototype.iadd=function($,Y){this._verify2($,Y);var W=$.iadd(Y);return W.cmp(this.m)>=0&&W.isub(this.m),W},O.prototype.sub=function($,Y){this._verify2($,Y);var W=$.sub(Y);return W.cmpn(0)<0&&W.iadd(this.m),W._forceRed(this)},O.prototype.isub=function($,Y){this._verify2($,Y);var W=$.isub(Y);return W.cmpn(0)<0&&W.iadd(this.m),W},O.prototype.shl=function($,Y){return this._verify1($),this.imod($.ushln(Y))},O.prototype.imul=function($,Y){return this._verify2($,Y),this.imod($.imul(Y))},O.prototype.mul=function($,Y){return this._verify2($,Y),this.imod($.mul(Y))},O.prototype.isqr=function($){return this.imul($,$.clone())},O.prototype.sqr=function($){return this.mul($,$)},O.prototype.sqrt=function($){if($.isZero())return $.clone();var Y=this.m.andln(3);if(Q(Y%2===1),Y===3){var W=this.m.add(new C(1)).iushrn(2);return this.pow($,W)}for(var Z=this.m.subn(1),K=0;!Z.isZero()&&Z.andln(1)===0;)K++,Z.iushrn(1);Q(!Z.isZero());var J=new C(1).toRed(this),j=J.redNeg(),A=this.m.subn(1).iushrn(1),E=this.m.bitLength();for(E=new C(2*E*E).toRed(this);this.pow(E,A).cmp(j)!==0;)E.redIAdd(j);for(var _=this.pow(E,Z),s=this.pow($,Z.addn(1).iushrn(1)),r=this.pow($,Z),O0=K;r.cmp(J)!==0;){for(var o=r,d=0;o.cmp(J)!==0;d++)o=o.redSqr();Q(d=0;K--){for(var _=Y.words[K],s=E-1;s>=0;s--){var r=_>>s&1;if(J!==Z[0]&&(J=this.sqr(J)),r===0&&j===0){A=0;continue}j<<=1,j|=r,A++,!(A!==W&&(K!==0||s!==0))&&(J=this.mul(J,Z[j]),A=0,j=0)}E=26}return J},O.prototype.convertTo=function($){var Y=$.umod(this.m);return Y===$?Y.clone():Y},O.prototype.convertFrom=function($){var Y=$.clone();return Y.red=null,Y},C.mont=function($){return new G($)};function G($){O.call(this,$),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new C(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}R(G,O),G.prototype.convertTo=function($){return this.imod($.ushln(this.shift))},G.prototype.convertFrom=function($){var Y=this.imod($.mul(this.rinv));return Y.red=null,Y},G.prototype.imul=function($,Y){if($.isZero()||Y.isZero())return $.words[0]=0,$.length=1,$;var W=$.imul(Y),Z=W.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),K=W.isub(Z).iushrn(this.shift),J=K;return K.cmp(this.m)>=0?J=K.isub(this.m):K.cmpn(0)<0&&(J=K.iadd(this.m)),J._forceRed(this)},G.prototype.mul=function($,Y){if($.isZero()||Y.isZero())return new C(0)._forceRed(this);var W=$.mul(Y),Z=W.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),K=W.isub(Z).iushrn(this.shift),J=K;return K.cmp(this.m)>=0?J=K.isub(this.m):K.cmpn(0)<0&&(J=K.iadd(this.m)),J._forceRed(this)},G.prototype.invm=function($){var Y=this.imod($._invmp(this.m).mul(this.r2));return Y._forceRed(this)}})(typeof k>"u"||k,B)}),f1=K0((B,k)=>{var V=s1(),N=g2();function Q(H){var L=R(H),P=L.toRed(V.mont(H.modulus)).redPow(new V(H.publicExponent)).fromRed();return{blinder:P,unblinder:L.invm(H.modulus)}}function R(H){var L=H.modulus.byteLength(),P;do P=new V(N(L));while(P.cmp(H.modulus)>=0||!P.umod(H.prime1)||!P.umod(H.prime2));return P}function C(H,L){var P=Q(L),U=L.modulus.byteLength(),z=new V(H).mul(P.blinder).umod(L.modulus),T=z.toRed(V.mont(L.prime1)),q=z.toRed(V.mont(L.prime2)),F=L.coefficient,I=L.prime1,x=L.prime2,w=T.redPow(L.exponent1).fromRed(),M=q.redPow(L.exponent2).fromRed(),y=w.isub(M).imul(F).umod(I).imul(x);return M.iadd(y).imul(P.unblinder).umod(L.modulus).toArrayLike(Buffer,"be",U)}C.getr=R,k.exports=C}),j3=K0((B,k)=>{k.exports={name:"elliptic",version:"6.5.4",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{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/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny ",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{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"},dependencies:{"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"}}}),q2=K0((B,k)=>{(function(V,N){function Q(X,O){if(!X)throw new Error(O||"Assertion failed")}function R(X,O){X.super_=O;var G=function(){};G.prototype=O.prototype,X.prototype=new G,X.prototype.constructor=X}function C(X,O,G){if(C.isBN(X))return X;this.negative=0,this.words=null,this.length=0,this.red=null,X!==null&&((O==="le"||O==="be")&&(G=O,O=10),this._init(X||0,O||10,G||"be"))}typeof V=="object"?V.exports=C:N.BN=C,C.BN=C,C.wordSize=26;var H;try{typeof window<"u"&&typeof window.Buffer<"u"?H=window.Buffer:H=M2().Buffer}catch{}C.isBN=function(X){return X instanceof C?!0:X!==null&&typeof X=="object"&&X.constructor.wordSize===C.wordSize&&Array.isArray(X.words)},C.max=function(X,O){return X.cmp(O)>0?X:O},C.min=function(X,O){return X.cmp(O)<0?X:O},C.prototype._init=function(X,O,G){if(typeof X=="number")return this._initNumber(X,O,G);if(typeof X=="object")return this._initArray(X,O,G);O==="hex"&&(O=16),Q(O===(O|0)&&O>=2&&O<=36),X=X.toString().replace(/\s+/g,"");var $=0;X[0]==="-"&&($++,this.negative=1),$=0;$-=3)W=X[$]|X[$-1]<<8|X[$-2]<<16,this.words[Y]|=W<>>26-Z&67108863,Z+=24,Z>=26&&(Z-=26,Y++);else if(G==="le")for($=0,Y=0;$>>26-Z&67108863,Z+=24,Z>=26&&(Z-=26,Y++);return this.strip()};function L(X,O){var G=X.charCodeAt(O);return G>=65&&G<=70?G-55:G>=97&&G<=102?G-87:G-48&15}function P(X,O,G){var $=L(X,G);return G-1>=O&&($|=L(X,G-1)<<4),$}C.prototype._parseHex=function(X,O,G){this.length=Math.ceil((X.length-O)/6),this.words=new Array(this.length);for(var $=0;$=O;$-=2)Z=P(X,O,$)<=18?(Y-=18,W+=1,this.words[W]|=Z>>>26):Y+=8;else{var K=X.length-O;for($=K%2===0?O+1:O;$=18?(Y-=18,W+=1,this.words[W]|=Z>>>26):Y+=8}this.strip()};function U(X,O,G,$){for(var Y=0,W=Math.min(X.length,G),Z=O;Z=49?Y+=K-49+10:K>=17?Y+=K-17+10:Y+=K}return Y}C.prototype._parseBase=function(X,O,G){this.words=[0],this.length=1;for(var $=0,Y=1;Y<=67108863;Y*=O)$++;$--,Y=Y/O|0;for(var W=X.length-G,Z=W%$,K=Math.min(W,W-Z)+G,J=0,j=G;j1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},C.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},C.prototype.inspect=function(){return(this.red?""};var z=["","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"],T=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],q=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];C.prototype.toString=function(X,O){X=X||10,O=O|0||1;var G;if(X===16||X==="hex"){G="";for(var $=0,Y=0,W=0;W>>24-$&16777215,Y!==0||W!==this.length-1?G=z[6-K.length]+K+G:G=K+G,$+=2,$>=26&&($-=26,W--)}for(Y!==0&&(G=Y.toString(16)+G);G.length%O!==0;)G="0"+G;return this.negative!==0&&(G="-"+G),G}if(X===(X|0)&&X>=2&&X<=36){var J=T[X],j=q[X];G="";var A=this.clone();for(A.negative=0;!A.isZero();){var E=A.modn(j).toString(X);A=A.idivn(j),A.isZero()?G=E+G:G=z[J-E.length]+E+G}for(this.isZero()&&(G="0"+G);G.length%O!==0;)G="0"+G;return this.negative!==0&&(G="-"+G),G}Q(!1,"Base should be between 2 and 36")},C.prototype.toNumber=function(){var X=this.words[0];return this.length===2?X+=this.words[1]*67108864:this.length===3&&this.words[2]===1?X+=4503599627370496+this.words[1]*67108864:this.length>2&&Q(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-X:X},C.prototype.toJSON=function(){return this.toString(16)},C.prototype.toBuffer=function(X,O){return Q(typeof H<"u"),this.toArrayLike(H,X,O)},C.prototype.toArray=function(X,O){return this.toArrayLike(Array,X,O)},C.prototype.toArrayLike=function(X,O,G){var $=this.byteLength(),Y=G||Math.max(1,$);Q($<=Y,"byte array longer than desired length"),Q(Y>0,"Requested array length <= 0"),this.strip();var W=O==="le",Z=new X(Y),K,J,j=this.clone();if(W){for(J=0;!j.isZero();J++)K=j.andln(255),j.iushrn(8),Z[J]=K;for(;J=4096&&(G+=13,O>>>=13),O>=64&&(G+=7,O>>>=7),O>=8&&(G+=4,O>>>=4),O>=2&&(G+=2,O>>>=2),G+O},C.prototype._zeroBits=function(X){if(X===0)return 26;var O=X,G=0;return(O&8191)===0&&(G+=13,O>>>=13),(O&127)===0&&(G+=7,O>>>=7),(O&15)===0&&(G+=4,O>>>=4),(O&3)===0&&(G+=2,O>>>=2),(O&1)===0&&G++,G},C.prototype.bitLength=function(){var X=this.words[this.length-1],O=this._countBits(X);return(this.length-1)*26+O};function F(X){for(var O=new Array(X.bitLength()),G=0;G>>Y}return O}C.prototype.zeroBits=function(){if(this.isZero())return 0;for(var X=0,O=0;OX.length?this.clone().ior(X):X.clone().ior(this)},C.prototype.uor=function(X){return this.length>X.length?this.clone().iuor(X):X.clone().iuor(this)},C.prototype.iuand=function(X){var O;this.length>X.length?O=X:O=this;for(var G=0;GX.length?this.clone().iand(X):X.clone().iand(this)},C.prototype.uand=function(X){return this.length>X.length?this.clone().iuand(X):X.clone().iuand(this)},C.prototype.iuxor=function(X){var O,G;this.length>X.length?(O=this,G=X):(O=X,G=this);for(var $=0;$X.length?this.clone().ixor(X):X.clone().ixor(this)},C.prototype.uxor=function(X){return this.length>X.length?this.clone().iuxor(X):X.clone().iuxor(this)},C.prototype.inotn=function(X){Q(typeof X=="number"&&X>=0);var O=Math.ceil(X/26)|0,G=X%26;this._expand(O),G>0&&O--;for(var $=0;$0&&(this.words[$]=~this.words[$]&67108863>>26-G),this.strip()},C.prototype.notn=function(X){return this.clone().inotn(X)},C.prototype.setn=function(X,O){Q(typeof X=="number"&&X>=0);var G=X/26|0,$=X%26;return this._expand(G+1),O?this.words[G]=this.words[G]|1<<$:this.words[G]=this.words[G]&~(1<<$),this.strip()},C.prototype.iadd=function(X){var O;if(this.negative!==0&&X.negative===0)return this.negative=0,O=this.isub(X),this.negative^=1,this._normSign();if(this.negative===0&&X.negative!==0)return X.negative=0,O=this.isub(X),X.negative=1,O._normSign();var G,$;this.length>X.length?(G=this,$=X):(G=X,$=this);for(var Y=0,W=0;W<$.length;W++)O=(G.words[W]|0)+($.words[W]|0)+Y,this.words[W]=O&67108863,Y=O>>>26;for(;Y!==0&&W>>26;if(this.length=G.length,Y!==0)this.words[this.length]=Y,this.length++;else if(G!==this)for(;WX.length?this.clone().iadd(X):X.clone().iadd(this)},C.prototype.isub=function(X){if(X.negative!==0){X.negative=0;var O=this.iadd(X);return X.negative=1,O._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(X),this.negative=1,this._normSign();var G=this.cmp(X);if(G===0)return this.negative=0,this.length=1,this.words[0]=0,this;var $,Y;G>0?($=this,Y=X):($=X,Y=this);for(var W=0,Z=0;Z>26,this.words[Z]=O&67108863;for(;W!==0&&Z<$.length;Z++)O=($.words[Z]|0)+W,W=O>>26,this.words[Z]=O&67108863;if(W===0&&Z<$.length&&$!==this)for(;Z<$.length;Z++)this.words[Z]=$.words[Z];return this.length=Math.max(this.length,Z),$!==this&&(this.negative=1),this.strip()},C.prototype.sub=function(X){return this.clone().isub(X)};function I(X,O,G){G.negative=O.negative^X.negative;var $=X.length+O.length|0;G.length=$,$=$-1|0;var Y=X.words[0]|0,W=O.words[0]|0,Z=Y*W,K=Z&67108863,J=Z/67108864|0;G.words[0]=K;for(var j=1;j<$;j++){for(var A=J>>>26,E=J&67108863,_=Math.min(j,O.length-1),s=Math.max(0,j-X.length+1);s<=_;s++){var r=j-s|0;Y=X.words[r]|0,W=O.words[s]|0,Z=Y*W+E,A+=Z/67108864|0,E=Z&67108863}G.words[j]=E|0,J=A|0}return J!==0?G.words[j]=J|0:G.length--,G.strip()}var x=function(X,O,G){var $=X.words,Y=O.words,W=G.words,Z=0,K,J,j,A=$[0]|0,E=A&8191,_=A>>>13,s=$[1]|0,r=s&8191,O0=s>>>13,o=$[2]|0,d=o&8191,f=o>>>13,U0=$[3]|0,X0=U0&8191,Y0=U0>>>13,g=$[4]|0,S=g&8191,p=g>>>13,e=$[5]|0,J0=e&8191,t=e>>>13,y0=$[6]|0,C0=y0&8191,W0=y0>>>13,_0=$[7]|0,P0=_0&8191,Q0=_0>>>13,d0=$[8]|0,D=d0&8191,v=d0>>>13,b=$[9]|0,l=b&8191,u=b>>>13,F0=Y[0]|0,$0=F0&8191,z0=F0>>>13,b0=Y[1]|0,V0=b0&8191,H0=b0>>>13,g0=Y[2]|0,N0=g0&8191,L0=g0>>>13,K2=Y[3]|0,D0=K2&8191,T0=K2>>>13,l0=Y[4]|0,k0=l0&8191,B0=l0>>>13,j2=Y[5]|0,R0=j2&8191,q0=j2>>>13,W2=Y[6]|0,I0=W2&8191,E0=W2>>>13,Z2=Y[7]|0,x0=Z2&8191,S0=Z2>>>13,Q2=Y[8]|0,v0=Q2&8191,A0=Q2>>>13,z2=Y[9]|0,M0=z2&8191,w0=z2>>>13;G.negative=X.negative^O.negative,G.length=19,K=Math.imul(E,$0),J=Math.imul(E,z0),J=J+Math.imul(_,$0)|0,j=Math.imul(_,z0);var C2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(C2>>>26)|0,C2&=67108863,K=Math.imul(r,$0),J=Math.imul(r,z0),J=J+Math.imul(O0,$0)|0,j=Math.imul(O0,z0),K=K+Math.imul(E,V0)|0,J=J+Math.imul(E,H0)|0,J=J+Math.imul(_,V0)|0,j=j+Math.imul(_,H0)|0;var m0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(m0>>>26)|0,m0&=67108863,K=Math.imul(d,$0),J=Math.imul(d,z0),J=J+Math.imul(f,$0)|0,j=Math.imul(f,z0),K=K+Math.imul(r,V0)|0,J=J+Math.imul(r,H0)|0,J=J+Math.imul(O0,V0)|0,j=j+Math.imul(O0,H0)|0,K=K+Math.imul(E,N0)|0,J=J+Math.imul(E,L0)|0,J=J+Math.imul(_,N0)|0,j=j+Math.imul(_,L0)|0;var p0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(p0>>>26)|0,p0&=67108863,K=Math.imul(X0,$0),J=Math.imul(X0,z0),J=J+Math.imul(Y0,$0)|0,j=Math.imul(Y0,z0),K=K+Math.imul(d,V0)|0,J=J+Math.imul(d,H0)|0,J=J+Math.imul(f,V0)|0,j=j+Math.imul(f,H0)|0,K=K+Math.imul(r,N0)|0,J=J+Math.imul(r,L0)|0,J=J+Math.imul(O0,N0)|0,j=j+Math.imul(O0,L0)|0,K=K+Math.imul(E,D0)|0,J=J+Math.imul(E,T0)|0,J=J+Math.imul(_,D0)|0,j=j+Math.imul(_,T0)|0;var o0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(o0>>>26)|0,o0&=67108863,K=Math.imul(S,$0),J=Math.imul(S,z0),J=J+Math.imul(p,$0)|0,j=Math.imul(p,z0),K=K+Math.imul(X0,V0)|0,J=J+Math.imul(X0,H0)|0,J=J+Math.imul(Y0,V0)|0,j=j+Math.imul(Y0,H0)|0,K=K+Math.imul(d,N0)|0,J=J+Math.imul(d,L0)|0,J=J+Math.imul(f,N0)|0,j=j+Math.imul(f,L0)|0,K=K+Math.imul(r,D0)|0,J=J+Math.imul(r,T0)|0,J=J+Math.imul(O0,D0)|0,j=j+Math.imul(O0,T0)|0,K=K+Math.imul(E,k0)|0,J=J+Math.imul(E,B0)|0,J=J+Math.imul(_,k0)|0,j=j+Math.imul(_,B0)|0;var u0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(u0>>>26)|0,u0&=67108863,K=Math.imul(J0,$0),J=Math.imul(J0,z0),J=J+Math.imul(t,$0)|0,j=Math.imul(t,z0),K=K+Math.imul(S,V0)|0,J=J+Math.imul(S,H0)|0,J=J+Math.imul(p,V0)|0,j=j+Math.imul(p,H0)|0,K=K+Math.imul(X0,N0)|0,J=J+Math.imul(X0,L0)|0,J=J+Math.imul(Y0,N0)|0,j=j+Math.imul(Y0,L0)|0,K=K+Math.imul(d,D0)|0,J=J+Math.imul(d,T0)|0,J=J+Math.imul(f,D0)|0,j=j+Math.imul(f,T0)|0,K=K+Math.imul(r,k0)|0,J=J+Math.imul(r,B0)|0,J=J+Math.imul(O0,k0)|0,j=j+Math.imul(O0,B0)|0,K=K+Math.imul(E,R0)|0,J=J+Math.imul(E,q0)|0,J=J+Math.imul(_,R0)|0,j=j+Math.imul(_,q0)|0;var s0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(s0>>>26)|0,s0&=67108863,K=Math.imul(C0,$0),J=Math.imul(C0,z0),J=J+Math.imul(W0,$0)|0,j=Math.imul(W0,z0),K=K+Math.imul(J0,V0)|0,J=J+Math.imul(J0,H0)|0,J=J+Math.imul(t,V0)|0,j=j+Math.imul(t,H0)|0,K=K+Math.imul(S,N0)|0,J=J+Math.imul(S,L0)|0,J=J+Math.imul(p,N0)|0,j=j+Math.imul(p,L0)|0,K=K+Math.imul(X0,D0)|0,J=J+Math.imul(X0,T0)|0,J=J+Math.imul(Y0,D0)|0,j=j+Math.imul(Y0,T0)|0,K=K+Math.imul(d,k0)|0,J=J+Math.imul(d,B0)|0,J=J+Math.imul(f,k0)|0,j=j+Math.imul(f,B0)|0,K=K+Math.imul(r,R0)|0,J=J+Math.imul(r,q0)|0,J=J+Math.imul(O0,R0)|0,j=j+Math.imul(O0,q0)|0,K=K+Math.imul(E,I0)|0,J=J+Math.imul(E,E0)|0,J=J+Math.imul(_,I0)|0,j=j+Math.imul(_,E0)|0;var f0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(f0>>>26)|0,f0&=67108863,K=Math.imul(P0,$0),J=Math.imul(P0,z0),J=J+Math.imul(Q0,$0)|0,j=Math.imul(Q0,z0),K=K+Math.imul(C0,V0)|0,J=J+Math.imul(C0,H0)|0,J=J+Math.imul(W0,V0)|0,j=j+Math.imul(W0,H0)|0,K=K+Math.imul(J0,N0)|0,J=J+Math.imul(J0,L0)|0,J=J+Math.imul(t,N0)|0,j=j+Math.imul(t,L0)|0,K=K+Math.imul(S,D0)|0,J=J+Math.imul(S,T0)|0,J=J+Math.imul(p,D0)|0,j=j+Math.imul(p,T0)|0,K=K+Math.imul(X0,k0)|0,J=J+Math.imul(X0,B0)|0,J=J+Math.imul(Y0,k0)|0,j=j+Math.imul(Y0,B0)|0,K=K+Math.imul(d,R0)|0,J=J+Math.imul(d,q0)|0,J=J+Math.imul(f,R0)|0,j=j+Math.imul(f,q0)|0,K=K+Math.imul(r,I0)|0,J=J+Math.imul(r,E0)|0,J=J+Math.imul(O0,I0)|0,j=j+Math.imul(O0,E0)|0,K=K+Math.imul(E,x0)|0,J=J+Math.imul(E,S0)|0,J=J+Math.imul(_,x0)|0,j=j+Math.imul(_,S0)|0;var n0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(n0>>>26)|0,n0&=67108863,K=Math.imul(D,$0),J=Math.imul(D,z0),J=J+Math.imul(v,$0)|0,j=Math.imul(v,z0),K=K+Math.imul(P0,V0)|0,J=J+Math.imul(P0,H0)|0,J=J+Math.imul(Q0,V0)|0,j=j+Math.imul(Q0,H0)|0,K=K+Math.imul(C0,N0)|0,J=J+Math.imul(C0,L0)|0,J=J+Math.imul(W0,N0)|0,j=j+Math.imul(W0,L0)|0,K=K+Math.imul(J0,D0)|0,J=J+Math.imul(J0,T0)|0,J=J+Math.imul(t,D0)|0,j=j+Math.imul(t,T0)|0,K=K+Math.imul(S,k0)|0,J=J+Math.imul(S,B0)|0,J=J+Math.imul(p,k0)|0,j=j+Math.imul(p,B0)|0,K=K+Math.imul(X0,R0)|0,J=J+Math.imul(X0,q0)|0,J=J+Math.imul(Y0,R0)|0,j=j+Math.imul(Y0,q0)|0,K=K+Math.imul(d,I0)|0,J=J+Math.imul(d,E0)|0,J=J+Math.imul(f,I0)|0,j=j+Math.imul(f,E0)|0,K=K+Math.imul(r,x0)|0,J=J+Math.imul(r,S0)|0,J=J+Math.imul(O0,x0)|0,j=j+Math.imul(O0,S0)|0,K=K+Math.imul(E,v0)|0,J=J+Math.imul(E,A0)|0,J=J+Math.imul(_,v0)|0,j=j+Math.imul(_,A0)|0;var a0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(a0>>>26)|0,a0&=67108863,K=Math.imul(l,$0),J=Math.imul(l,z0),J=J+Math.imul(u,$0)|0,j=Math.imul(u,z0),K=K+Math.imul(D,V0)|0,J=J+Math.imul(D,H0)|0,J=J+Math.imul(v,V0)|0,j=j+Math.imul(v,H0)|0,K=K+Math.imul(P0,N0)|0,J=J+Math.imul(P0,L0)|0,J=J+Math.imul(Q0,N0)|0,j=j+Math.imul(Q0,L0)|0,K=K+Math.imul(C0,D0)|0,J=J+Math.imul(C0,T0)|0,J=J+Math.imul(W0,D0)|0,j=j+Math.imul(W0,T0)|0,K=K+Math.imul(J0,k0)|0,J=J+Math.imul(J0,B0)|0,J=J+Math.imul(t,k0)|0,j=j+Math.imul(t,B0)|0,K=K+Math.imul(S,R0)|0,J=J+Math.imul(S,q0)|0,J=J+Math.imul(p,R0)|0,j=j+Math.imul(p,q0)|0,K=K+Math.imul(X0,I0)|0,J=J+Math.imul(X0,E0)|0,J=J+Math.imul(Y0,I0)|0,j=j+Math.imul(Y0,E0)|0,K=K+Math.imul(d,x0)|0,J=J+Math.imul(d,S0)|0,J=J+Math.imul(f,x0)|0,j=j+Math.imul(f,S0)|0,K=K+Math.imul(r,v0)|0,J=J+Math.imul(r,A0)|0,J=J+Math.imul(O0,v0)|0,j=j+Math.imul(O0,A0)|0,K=K+Math.imul(E,M0)|0,J=J+Math.imul(E,w0)|0,J=J+Math.imul(_,M0)|0,j=j+Math.imul(_,w0)|0;var r0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(r0>>>26)|0,r0&=67108863,K=Math.imul(l,V0),J=Math.imul(l,H0),J=J+Math.imul(u,V0)|0,j=Math.imul(u,H0),K=K+Math.imul(D,N0)|0,J=J+Math.imul(D,L0)|0,J=J+Math.imul(v,N0)|0,j=j+Math.imul(v,L0)|0,K=K+Math.imul(P0,D0)|0,J=J+Math.imul(P0,T0)|0,J=J+Math.imul(Q0,D0)|0,j=j+Math.imul(Q0,T0)|0,K=K+Math.imul(C0,k0)|0,J=J+Math.imul(C0,B0)|0,J=J+Math.imul(W0,k0)|0,j=j+Math.imul(W0,B0)|0,K=K+Math.imul(J0,R0)|0,J=J+Math.imul(J0,q0)|0,J=J+Math.imul(t,R0)|0,j=j+Math.imul(t,q0)|0,K=K+Math.imul(S,I0)|0,J=J+Math.imul(S,E0)|0,J=J+Math.imul(p,I0)|0,j=j+Math.imul(p,E0)|0,K=K+Math.imul(X0,x0)|0,J=J+Math.imul(X0,S0)|0,J=J+Math.imul(Y0,x0)|0,j=j+Math.imul(Y0,S0)|0,K=K+Math.imul(d,v0)|0,J=J+Math.imul(d,A0)|0,J=J+Math.imul(f,v0)|0,j=j+Math.imul(f,A0)|0,K=K+Math.imul(r,M0)|0,J=J+Math.imul(r,w0)|0,J=J+Math.imul(O0,M0)|0,j=j+Math.imul(O0,w0)|0;var i0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(i0>>>26)|0,i0&=67108863,K=Math.imul(l,N0),J=Math.imul(l,L0),J=J+Math.imul(u,N0)|0,j=Math.imul(u,L0),K=K+Math.imul(D,D0)|0,J=J+Math.imul(D,T0)|0,J=J+Math.imul(v,D0)|0,j=j+Math.imul(v,T0)|0,K=K+Math.imul(P0,k0)|0,J=J+Math.imul(P0,B0)|0,J=J+Math.imul(Q0,k0)|0,j=j+Math.imul(Q0,B0)|0,K=K+Math.imul(C0,R0)|0,J=J+Math.imul(C0,q0)|0,J=J+Math.imul(W0,R0)|0,j=j+Math.imul(W0,q0)|0,K=K+Math.imul(J0,I0)|0,J=J+Math.imul(J0,E0)|0,J=J+Math.imul(t,I0)|0,j=j+Math.imul(t,E0)|0,K=K+Math.imul(S,x0)|0,J=J+Math.imul(S,S0)|0,J=J+Math.imul(p,x0)|0,j=j+Math.imul(p,S0)|0,K=K+Math.imul(X0,v0)|0,J=J+Math.imul(X0,A0)|0,J=J+Math.imul(Y0,v0)|0,j=j+Math.imul(Y0,A0)|0,K=K+Math.imul(d,M0)|0,J=J+Math.imul(d,w0)|0,J=J+Math.imul(f,M0)|0,j=j+Math.imul(f,w0)|0;var t0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(t0>>>26)|0,t0&=67108863,K=Math.imul(l,D0),J=Math.imul(l,T0),J=J+Math.imul(u,D0)|0,j=Math.imul(u,T0),K=K+Math.imul(D,k0)|0,J=J+Math.imul(D,B0)|0,J=J+Math.imul(v,k0)|0,j=j+Math.imul(v,B0)|0,K=K+Math.imul(P0,R0)|0,J=J+Math.imul(P0,q0)|0,J=J+Math.imul(Q0,R0)|0,j=j+Math.imul(Q0,q0)|0,K=K+Math.imul(C0,I0)|0,J=J+Math.imul(C0,E0)|0,J=J+Math.imul(W0,I0)|0,j=j+Math.imul(W0,E0)|0,K=K+Math.imul(J0,x0)|0,J=J+Math.imul(J0,S0)|0,J=J+Math.imul(t,x0)|0,j=j+Math.imul(t,S0)|0,K=K+Math.imul(S,v0)|0,J=J+Math.imul(S,A0)|0,J=J+Math.imul(p,v0)|0,j=j+Math.imul(p,A0)|0,K=K+Math.imul(X0,M0)|0,J=J+Math.imul(X0,w0)|0,J=J+Math.imul(Y0,M0)|0,j=j+Math.imul(Y0,w0)|0;var e0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(e0>>>26)|0,e0&=67108863,K=Math.imul(l,k0),J=Math.imul(l,B0),J=J+Math.imul(u,k0)|0,j=Math.imul(u,B0),K=K+Math.imul(D,R0)|0,J=J+Math.imul(D,q0)|0,J=J+Math.imul(v,R0)|0,j=j+Math.imul(v,q0)|0,K=K+Math.imul(P0,I0)|0,J=J+Math.imul(P0,E0)|0,J=J+Math.imul(Q0,I0)|0,j=j+Math.imul(Q0,E0)|0,K=K+Math.imul(C0,x0)|0,J=J+Math.imul(C0,S0)|0,J=J+Math.imul(W0,x0)|0,j=j+Math.imul(W0,S0)|0,K=K+Math.imul(J0,v0)|0,J=J+Math.imul(J0,A0)|0,J=J+Math.imul(t,v0)|0,j=j+Math.imul(t,A0)|0,K=K+Math.imul(S,M0)|0,J=J+Math.imul(S,w0)|0,J=J+Math.imul(p,M0)|0,j=j+Math.imul(p,w0)|0;var X2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(X2>>>26)|0,X2&=67108863,K=Math.imul(l,R0),J=Math.imul(l,q0),J=J+Math.imul(u,R0)|0,j=Math.imul(u,q0),K=K+Math.imul(D,I0)|0,J=J+Math.imul(D,E0)|0,J=J+Math.imul(v,I0)|0,j=j+Math.imul(v,E0)|0,K=K+Math.imul(P0,x0)|0,J=J+Math.imul(P0,S0)|0,J=J+Math.imul(Q0,x0)|0,j=j+Math.imul(Q0,S0)|0,K=K+Math.imul(C0,v0)|0,J=J+Math.imul(C0,A0)|0,J=J+Math.imul(W0,v0)|0,j=j+Math.imul(W0,A0)|0,K=K+Math.imul(J0,M0)|0,J=J+Math.imul(J0,w0)|0,J=J+Math.imul(t,M0)|0,j=j+Math.imul(t,w0)|0;var J2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(J2>>>26)|0,J2&=67108863,K=Math.imul(l,I0),J=Math.imul(l,E0),J=J+Math.imul(u,I0)|0,j=Math.imul(u,E0),K=K+Math.imul(D,x0)|0,J=J+Math.imul(D,S0)|0,J=J+Math.imul(v,x0)|0,j=j+Math.imul(v,S0)|0,K=K+Math.imul(P0,v0)|0,J=J+Math.imul(P0,A0)|0,J=J+Math.imul(Q0,v0)|0,j=j+Math.imul(Q0,A0)|0,K=K+Math.imul(C0,M0)|0,J=J+Math.imul(C0,w0)|0,J=J+Math.imul(W0,M0)|0,j=j+Math.imul(W0,w0)|0;var O2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(O2>>>26)|0,O2&=67108863,K=Math.imul(l,x0),J=Math.imul(l,S0),J=J+Math.imul(u,x0)|0,j=Math.imul(u,S0),K=K+Math.imul(D,v0)|0,J=J+Math.imul(D,A0)|0,J=J+Math.imul(v,v0)|0,j=j+Math.imul(v,A0)|0,K=K+Math.imul(P0,M0)|0,J=J+Math.imul(P0,w0)|0,J=J+Math.imul(Q0,M0)|0,j=j+Math.imul(Q0,w0)|0;var $2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+($2>>>26)|0,$2&=67108863,K=Math.imul(l,v0),J=Math.imul(l,A0),J=J+Math.imul(u,v0)|0,j=Math.imul(u,A0),K=K+Math.imul(D,M0)|0,J=J+Math.imul(D,w0)|0,J=J+Math.imul(v,M0)|0,j=j+Math.imul(v,w0)|0;var G2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(G2>>>26)|0,G2&=67108863,K=Math.imul(l,M0),J=Math.imul(l,w0),J=J+Math.imul(u,M0)|0,j=Math.imul(u,w0);var Y2=(Z+K|0)+((J&8191)<<13)|0;return Z=(j+(J>>>13)|0)+(Y2>>>26)|0,Y2&=67108863,W[0]=C2,W[1]=m0,W[2]=p0,W[3]=o0,W[4]=u0,W[5]=s0,W[6]=f0,W[7]=n0,W[8]=a0,W[9]=r0,W[10]=i0,W[11]=t0,W[12]=e0,W[13]=X2,W[14]=J2,W[15]=O2,W[16]=$2,W[17]=G2,W[18]=Y2,Z!==0&&(W[19]=Z,G.length++),G};Math.imul||(x=I);function w(X,O,G){G.negative=O.negative^X.negative,G.length=X.length+O.length;for(var $=0,Y=0,W=0;W>>26)|0,Y+=Z>>>26,Z&=67108863}G.words[W]=K,$=Z,Z=Y}return $!==0?G.words[W]=$:G.length--,G.strip()}function M(X,O,G){var $=new y;return $.mulp(X,O,G)}C.prototype.mulTo=function(X,O){var G,$=this.length+X.length;return this.length===10&&X.length===10?G=x(this,X,O):$<63?G=I(this,X,O):$<1024?G=w(this,X,O):G=M(this,X,O),G};function y(X,O){this.x=X,this.y=O}y.prototype.makeRBT=function(X){for(var O=new Array(X),G=C.prototype._countBits(X)-1,$=0;$>=1;return $},y.prototype.permute=function(X,O,G,$,Y,W){for(var Z=0;Z>>1)Y++;return 1<>>13,G[2*W+1]=Y&8191,Y=Y>>>13;for(W=2*O;W<$;++W)G[W]=0;Q(Y===0),Q((Y&-8192)===0)},y.prototype.stub=function(X){for(var O=new Array(X),G=0;G>=26,O+=$/67108864|0,O+=Y>>>26,this.words[G]=Y&67108863}return O!==0&&(this.words[G]=O,this.length++),this},C.prototype.muln=function(X){return this.clone().imuln(X)},C.prototype.sqr=function(){return this.mul(this)},C.prototype.isqr=function(){return this.imul(this.clone())},C.prototype.pow=function(X){var O=F(X);if(O.length===0)return new C(1);for(var G=this,$=0;$=0);var O=X%26,G=(X-O)/26,$=67108863>>>26-O<<26-O,Y;if(O!==0){var W=0;for(Y=0;Y>>26-O}W&&(this.words[Y]=W,this.length++)}if(G!==0){for(Y=this.length-1;Y>=0;Y--)this.words[Y+G]=this.words[Y];for(Y=0;Y=0);var $;O?$=(O-O%26)/26:$=0;var Y=X%26,W=Math.min((X-Y)/26,this.length),Z=67108863^67108863>>>Y<W)for(this.length-=W,J=0;J=0&&(j!==0||J>=$);J--){var A=this.words[J]|0;this.words[J]=j<<26-Y|A>>>Y,j=A&Z}return K&&j!==0&&(K.words[K.length++]=j),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},C.prototype.ishrn=function(X,O,G){return Q(this.negative===0),this.iushrn(X,O,G)},C.prototype.shln=function(X){return this.clone().ishln(X)},C.prototype.ushln=function(X){return this.clone().iushln(X)},C.prototype.shrn=function(X){return this.clone().ishrn(X)},C.prototype.ushrn=function(X){return this.clone().iushrn(X)},C.prototype.testn=function(X){Q(typeof X=="number"&&X>=0);var O=X%26,G=(X-O)/26,$=1<=0);var O=X%26,G=(X-O)/26;if(Q(this.negative===0,"imaskn works only with positive numbers"),this.length<=G)return this;if(O!==0&&G++,this.length=Math.min(G,this.length),O!==0){var $=67108863^67108863>>>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},C.prototype.isubn=function(X){if(Q(typeof X=="number"),Q(X<67108864),X<0)return this.iaddn(-X);if(this.negative!==0)return this.negative=0,this.iaddn(X),this.negative=1,this;if(this.words[0]-=X,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var O=0;O>26)-(K/67108864|0),this.words[Y+G]=W&67108863}for(;Y>26,this.words[Y+G]=W&67108863;if(Z===0)return this.strip();for(Q(Z===-1),Z=0,Y=0;Y>26,this.words[Y]=W&67108863;return this.negative=1,this.strip()},C.prototype._wordDiv=function(X,O){var G=this.length-X.length,$=this.clone(),Y=X,W=Y.words[Y.length-1]|0,Z=this._countBits(W);G=26-Z,G!==0&&(Y=Y.ushln(G),$.iushln(G),W=Y.words[Y.length-1]|0);var K=$.length-Y.length,J;if(O!=="mod"){J=new C(null),J.length=K+1,J.words=new Array(J.length);for(var j=0;j=0;E--){var _=($.words[Y.length+E]|0)*67108864+($.words[Y.length+E-1]|0);for(_=Math.min(_/W|0,67108863),$._ishlnsubmul(Y,_,E);$.negative!==0;)_--,$.negative=0,$._ishlnsubmul(Y,1,E),$.isZero()||($.negative^=1);J&&(J.words[E]=_)}return J&&J.strip(),$.strip(),O!=="div"&&G!==0&&$.iushrn(G),{div:J||null,mod:$}},C.prototype.divmod=function(X,O,G){if(Q(!X.isZero()),this.isZero())return{div:new C(0),mod:new C(0)};var $,Y,W;return this.negative!==0&&X.negative===0?(W=this.neg().divmod(X,O),O!=="mod"&&($=W.div.neg()),O!=="div"&&(Y=W.mod.neg(),G&&Y.negative!==0&&Y.iadd(X)),{div:$,mod:Y}):this.negative===0&&X.negative!==0?(W=this.divmod(X.neg(),O),O!=="mod"&&($=W.div.neg()),{div:$,mod:W.mod}):(this.negative&X.negative)!==0?(W=this.neg().divmod(X.neg(),O),O!=="div"&&(Y=W.mod.neg(),G&&Y.negative!==0&&Y.isub(X)),{div:W.div,mod:Y}):X.length>this.length||this.cmp(X)<0?{div:new C(0),mod:this}:X.length===1?O==="div"?{div:this.divn(X.words[0]),mod:null}:O==="mod"?{div:null,mod:new C(this.modn(X.words[0]))}:{div:this.divn(X.words[0]),mod:new C(this.modn(X.words[0]))}:this._wordDiv(X,O)},C.prototype.div=function(X){return this.divmod(X,"div",!1).div},C.prototype.mod=function(X){return this.divmod(X,"mod",!1).mod},C.prototype.umod=function(X){return this.divmod(X,"mod",!0).mod},C.prototype.divRound=function(X){var O=this.divmod(X);if(O.mod.isZero())return O.div;var G=O.div.negative!==0?O.mod.isub(X):O.mod,$=X.ushrn(1),Y=X.andln(1),W=G.cmp($);return W<0||Y===1&&W===0?O.div:O.div.negative!==0?O.div.isubn(1):O.div.iaddn(1)},C.prototype.modn=function(X){Q(X<=67108863);for(var O=67108864%X,G=0,$=this.length-1;$>=0;$--)G=(O*G+(this.words[$]|0))%X;return G},C.prototype.idivn=function(X){Q(X<=67108863);for(var O=0,G=this.length-1;G>=0;G--){var $=(this.words[G]|0)+O*67108864;this.words[G]=$/X|0,O=$%X}return this.strip()},C.prototype.divn=function(X){return this.clone().idivn(X)},C.prototype.egcd=function(X){Q(X.negative===0),Q(!X.isZero());var O=this,G=X.clone();O.negative!==0?O=O.umod(X):O=O.clone();for(var $=new C(1),Y=new C(0),W=new C(0),Z=new C(1),K=0;O.isEven()&&G.isEven();)O.iushrn(1),G.iushrn(1),++K;for(var J=G.clone(),j=O.clone();!O.isZero();){for(var A=0,E=1;(O.words[0]&E)===0&&A<26;++A,E<<=1);if(A>0)for(O.iushrn(A);A-- >0;)($.isOdd()||Y.isOdd())&&($.iadd(J),Y.isub(j)),$.iushrn(1),Y.iushrn(1);for(var _=0,s=1;(G.words[0]&s)===0&&_<26;++_,s<<=1);if(_>0)for(G.iushrn(_);_-- >0;)(W.isOdd()||Z.isOdd())&&(W.iadd(J),Z.isub(j)),W.iushrn(1),Z.iushrn(1);O.cmp(G)>=0?(O.isub(G),$.isub(W),Y.isub(Z)):(G.isub(O),W.isub($),Z.isub(Y))}return{a:W,b:Z,gcd:G.iushln(K)}},C.prototype._invmp=function(X){Q(X.negative===0),Q(!X.isZero());var O=this,G=X.clone();O.negative!==0?O=O.umod(X):O=O.clone();for(var $=new C(1),Y=new C(0),W=G.clone();O.cmpn(1)>0&&G.cmpn(1)>0;){for(var Z=0,K=1;(O.words[0]&K)===0&&Z<26;++Z,K<<=1);if(Z>0)for(O.iushrn(Z);Z-- >0;)$.isOdd()&&$.iadd(W),$.iushrn(1);for(var J=0,j=1;(G.words[0]&j)===0&&J<26;++J,j<<=1);if(J>0)for(G.iushrn(J);J-- >0;)Y.isOdd()&&Y.iadd(W),Y.iushrn(1);O.cmp(G)>=0?(O.isub(G),$.isub(Y)):(G.isub(O),Y.isub($))}var A;return O.cmpn(1)===0?A=$:A=Y,A.cmpn(0)<0&&A.iadd(X),A},C.prototype.gcd=function(X){if(this.isZero())return X.abs();if(X.isZero())return this.abs();var O=this.clone(),G=X.clone();O.negative=0,G.negative=0;for(var $=0;O.isEven()&&G.isEven();$++)O.iushrn(1),G.iushrn(1);do{for(;O.isEven();)O.iushrn(1);for(;G.isEven();)G.iushrn(1);var Y=O.cmp(G);if(Y<0){var W=O;O=G,G=W}else if(Y===0||G.cmpn(1)===0)break;O.isub(G)}while(!0);return G.iushln($)},C.prototype.invm=function(X){return this.egcd(X).a.umod(X)},C.prototype.isEven=function(){return(this.words[0]&1)===0},C.prototype.isOdd=function(){return(this.words[0]&1)===1},C.prototype.andln=function(X){return this.words[0]&X},C.prototype.bincn=function(X){Q(typeof X=="number");var O=X%26,G=(X-O)/26,$=1<>>26,Z&=67108863,this.words[W]=Z}return Y!==0&&(this.words[W]=Y,this.length++),this},C.prototype.isZero=function(){return this.length===1&&this.words[0]===0},C.prototype.cmpn=function(X){var O=X<0;if(this.negative!==0&&!O)return-1;if(this.negative===0&&O)return 1;this.strip();var G;if(this.length>1)G=1;else{O&&(X=-X),Q(X<=67108863,"Number is too big");var $=this.words[0]|0;G=$===X?0:$X.length)return 1;if(this.length=0;G--){var $=this.words[G]|0,Y=X.words[G]|0;if($!==Y){$Y&&(O=1);break}}return O},C.prototype.gtn=function(X){return this.cmpn(X)===1},C.prototype.gt=function(X){return this.cmp(X)===1},C.prototype.gten=function(X){return this.cmpn(X)>=0},C.prototype.gte=function(X){return this.cmp(X)>=0},C.prototype.ltn=function(X){return this.cmpn(X)===-1},C.prototype.lt=function(X){return this.cmp(X)===-1},C.prototype.lten=function(X){return this.cmpn(X)<=0},C.prototype.lte=function(X){return this.cmp(X)<=0},C.prototype.eqn=function(X){return this.cmpn(X)===0},C.prototype.eq=function(X){return this.cmp(X)===0},C.red=function(X){return new n(X)},C.prototype.toRed=function(X){return Q(!this.red,"Already a number in reduction context"),Q(this.negative===0,"red works only with positives"),X.convertTo(this)._forceRed(X)},C.prototype.fromRed=function(){return Q(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},C.prototype._forceRed=function(X){return this.red=X,this},C.prototype.forceRed=function(X){return Q(!this.red,"Already a number in reduction context"),this._forceRed(X)},C.prototype.redAdd=function(X){return Q(this.red,"redAdd works only with red numbers"),this.red.add(this,X)},C.prototype.redIAdd=function(X){return Q(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,X)},C.prototype.redSub=function(X){return Q(this.red,"redSub works only with red numbers"),this.red.sub(this,X)},C.prototype.redISub=function(X){return Q(this.red,"redISub works only with red numbers"),this.red.isub(this,X)},C.prototype.redShl=function(X){return Q(this.red,"redShl works only with red numbers"),this.red.shl(this,X)},C.prototype.redMul=function(X){return Q(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.mul(this,X)},C.prototype.redIMul=function(X){return Q(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.imul(this,X)},C.prototype.redSqr=function(){return Q(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},C.prototype.redISqr=function(){return Q(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},C.prototype.redSqrt=function(){return Q(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},C.prototype.redInvm=function(){return Q(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},C.prototype.redNeg=function(){return Q(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},C.prototype.redPow=function(X){return Q(this.red&&!X.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,X)};var m={k256:null,p224:null,p192:null,p25519:null};function c(X,O){this.name=X,this.p=new C(O,16),this.n=this.p.bitLength(),this.k=new C(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}c.prototype._tmp=function(){var X=new C(null);return X.words=new Array(Math.ceil(this.n/13)),X},c.prototype.ireduce=function(X){var O=X,G;do this.split(O,this.tmp),O=this.imulK(O),O=O.iadd(this.tmp),G=O.bitLength();while(G>this.n);var $=G0?O.isub(this.p):O.strip!==void 0?O.strip():O._strip(),O},c.prototype.split=function(X,O){X.iushrn(this.n,0,O)},c.prototype.imulK=function(X){return X.imul(this.k)};function h(){c.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}R(h,c),h.prototype.split=function(X,O){for(var G=4194303,$=Math.min(X.length,9),Y=0;Y<$;Y++)O.words[Y]=X.words[Y];if(O.length=$,X.length<=9){X.words[0]=0,X.length=1;return}var W=X.words[9];for(O.words[O.length++]=W&G,Y=10;Y>>22,W=Z}W>>>=22,X.words[Y-10]=W,W===0&&X.length>10?X.length-=10:X.length-=9},h.prototype.imulK=function(X){X.words[X.length]=0,X.words[X.length+1]=0,X.length+=2;for(var O=0,G=0;G>>=26,X.words[G]=Y,O=$}return O!==0&&(X.words[X.length++]=O),X},C._prime=function(X){if(m[X])return m[X];var O;if(X==="k256")O=new h;else if(X==="p224")O=new a;else if(X==="p192")O=new i;else if(X==="p25519")O=new G0;else throw new Error("Unknown prime "+X);return m[X]=O,O};function n(X){if(typeof X=="string"){var O=C._prime(X);this.m=O.p,this.prime=O}else Q(X.gtn(1),"modulus must be greater than 1"),this.m=X,this.prime=null}n.prototype._verify1=function(X){Q(X.negative===0,"red works only with positives"),Q(X.red,"red works only with red numbers")},n.prototype._verify2=function(X,O){Q((X.negative|O.negative)===0,"red works only with positives"),Q(X.red&&X.red===O.red,"red works only with red numbers")},n.prototype.imod=function(X){return this.prime?this.prime.ireduce(X)._forceRed(this):X.umod(this.m)._forceRed(this)},n.prototype.neg=function(X){return X.isZero()?X.clone():this.m.sub(X)._forceRed(this)},n.prototype.add=function(X,O){this._verify2(X,O);var G=X.add(O);return G.cmp(this.m)>=0&&G.isub(this.m),G._forceRed(this)},n.prototype.iadd=function(X,O){this._verify2(X,O);var G=X.iadd(O);return G.cmp(this.m)>=0&&G.isub(this.m),G},n.prototype.sub=function(X,O){this._verify2(X,O);var G=X.sub(O);return G.cmpn(0)<0&&G.iadd(this.m),G._forceRed(this)},n.prototype.isub=function(X,O){this._verify2(X,O);var G=X.isub(O);return G.cmpn(0)<0&&G.iadd(this.m),G},n.prototype.shl=function(X,O){return this._verify1(X),this.imod(X.ushln(O))},n.prototype.imul=function(X,O){return this._verify2(X,O),this.imod(X.imul(O))},n.prototype.mul=function(X,O){return this._verify2(X,O),this.imod(X.mul(O))},n.prototype.isqr=function(X){return this.imul(X,X.clone())},n.prototype.sqr=function(X){return this.mul(X,X)},n.prototype.sqrt=function(X){if(X.isZero())return X.clone();var O=this.m.andln(3);if(Q(O%2===1),O===3){var G=this.m.add(new C(1)).iushrn(2);return this.pow(X,G)}for(var $=this.m.subn(1),Y=0;!$.isZero()&&$.andln(1)===0;)Y++,$.iushrn(1);Q(!$.isZero());var W=new C(1).toRed(this),Z=W.redNeg(),K=this.m.subn(1).iushrn(1),J=this.m.bitLength();for(J=new C(2*J*J).toRed(this);this.pow(J,K).cmp(Z)!==0;)J.redIAdd(Z);for(var j=this.pow(J,$),A=this.pow(X,$.addn(1).iushrn(1)),E=this.pow(X,$),_=Y;E.cmp(W)!==0;){for(var s=E,r=0;s.cmp(W)!==0;r++)s=s.redSqr();Q(r<_);var O0=this.pow(j,new C(1).iushln(_-r-1));A=A.redMul(O0),j=O0.redSqr(),E=E.redMul(j),_=r}return A},n.prototype.invm=function(X){var O=X._invmp(this.m);return O.negative!==0?(O.negative=0,this.imod(O).redNeg()):this.imod(O)},n.prototype.pow=function(X,O){if(O.isZero())return new C(1).toRed(this);if(O.cmpn(1)===0)return X.clone();var G=4,$=new Array(1<=0;Y--){for(var j=O.words[Y],A=J-1;A>=0;A--){var E=j>>A&1;if(W!==$[0]&&(W=this.sqr(W)),E===0&&Z===0){K=0;continue}Z<<=1,Z|=E,K++,!(K!==G&&(Y!==0||A!==0))&&(W=this.mul(W,$[Z]),K=0,Z=0)}J=26}return W},n.prototype.convertTo=function(X){var O=X.umod(this.m);return O===X?O.clone():O},n.prototype.convertFrom=function(X){var O=X.clone();return O.red=null,O},C.mont=function(X){return new Z0(X)};function Z0(X){n.call(this,X),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new C(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}R(Z0,n),Z0.prototype.convertTo=function(X){return this.imod(X.ushln(this.shift))},Z0.prototype.convertFrom=function(X){var O=this.imod(X.mul(this.rinv));return O.red=null,O},Z0.prototype.imul=function(X,O){if(X.isZero()||O.isZero())return X.words[0]=0,X.length=1,X;var G=X.imul(O),$=G.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Y=G.isub($).iushrn(this.shift),W=Y;return Y.cmp(this.m)>=0?W=Y.isub(this.m):Y.cmpn(0)<0&&(W=Y.iadd(this.m)),W._forceRed(this)},Z0.prototype.mul=function(X,O){if(X.isZero()||O.isZero())return new C(0)._forceRed(this);var G=X.mul(O),$=G.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Y=G.isub($).iushrn(this.shift),W=Y;return Y.cmp(this.m)>=0?W=Y.isub(this.m):Y.cmpn(0)<0&&(W=Y.iadd(this.m)),W._forceRed(this)},Z0.prototype.invm=function(X){var O=this.imod(X._invmp(this.m).mul(this.r2));return O._forceRed(this)}})(typeof k>"u"||k,B)}),N6=K0((B)=>{var k=B;function V(R,C){if(Array.isArray(R))return R.slice();if(!R)return[];var H=[];if(typeof R!="string"){for(var L=0;L>8,z=P&255;U?H.push(U,z):H.push(z)}return H}k.toArray=V;function N(R){return R.length===1?"0"+R:R}k.zero2=N;function Q(R){for(var C="",H=0;H{var k=B,V=q2(),N=D2(),Q=N6();k.assert=N,k.toArray=Q.toArray,k.zero2=Q.zero2,k.toHex=Q.toHex,k.encode=Q.encode;function R(U,z,T){var q=new Array(Math.max(U.bitLength(),T)+1);q.fill(0);for(var F=1<(F>>1)-1?w=(F>>1)-M:w=M,I.isubn(w)):w=0,q[x]=w,I.iushrn(1)}return q}k.getNAF=R;function C(U,z){var T=[[],[]];U=U.clone(),z=z.clone();for(var q=0,F=0,I;U.cmpn(-q)>0||z.cmpn(-F)>0;){var x=U.andln(3)+q&3,w=z.andln(3)+F&3;x===3&&(x=-1),w===3&&(w=-1);var M;(x&1)===0?M=0:(I=U.andln(7)+q&7,(I===3||I===5)&&w===2?M=-x:M=x),T[0].push(M);var y;(w&1)===0?y=0:(I=z.andln(7)+F&7,(I===3||I===5)&&x===2?y=-w:y=w),T[1].push(y),2*q===M+1&&(q=1-q),2*F===y+1&&(F=1-F),U.iushrn(1),z.iushrn(1)}return T}k.getJSF=C;function H(U,z,T){var q="_"+z;U.prototype[z]=function(){return this[q]!==void 0?this[q]:this[q]=T.call(this)}}k.cachedProperty=H;function L(U){return typeof U=="string"?k.toArray(U,"hex"):U}k.parseBytes=L;function P(U){return new V(U,"hex","le")}k.intFromLE=P}),U1=K0((B,k)=>{var V=q2(),N=N2(),Q=N.getNAF,R=N.getJSF,C=N.assert;function H(P,U){this.type=P,this.p=new V(U.p,16),this.red=U.prime?V.red(U.prime):V.mont(this.p),this.zero=new V(0).toRed(this.red),this.one=new V(1).toRed(this.red),this.two=new V(2).toRed(this.red),this.n=U.n&&new V(U.n,16),this.g=U.g&&this.pointFromJSON(U.g,U.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 z=this.n&&this.p.div(this.n);!z||z.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}k.exports=H,H.prototype.point=function(){throw new Error("Not implemented")},H.prototype.validate=function(){throw new Error("Not implemented")},H.prototype._fixedNafMul=function(P,U){C(P.precomputed);var z=P._getDoubles(),T=Q(U,1,this._bitLength),q=(1<=I;w--)x=(x<<1)+T[w];F.push(x)}for(var M=this.jpoint(null,null,null),y=this.jpoint(null,null,null),m=q;m>0;m--){for(I=0;I=0;x--){for(var w=0;x>=0&&F[x]===0;x--)w++;if(x>=0&&w++,I=I.dblp(w),x<0)break;var M=F[x];C(M!==0),P.type==="affine"?M>0?I=I.mixedAdd(q[M-1>>1]):I=I.mixedAdd(q[-M-1>>1].neg()):M>0?I=I.add(q[M-1>>1]):I=I.add(q[-M-1>>1].neg())}return P.type==="affine"?I.toP():I},H.prototype._wnafMulAdd=function(P,U,z,T,q){var F=this._wnafT1,I=this._wnafT2,x=this._wnafT3,w=0,M,y,m;for(M=0;M=1;M-=2){var h=M-1,a=M;if(F[h]!==1||F[a]!==1){x[h]=Q(z[h],F[h],this._bitLength),x[a]=Q(z[a],F[a],this._bitLength),w=Math.max(x[h].length,w),w=Math.max(x[a].length,w);continue}var i=[U[h],null,null,U[a]];U[h].y.cmp(U[a].y)===0?(i[1]=U[h].add(U[a]),i[2]=U[h].toJ().mixedAdd(U[a].neg())):U[h].y.cmp(U[a].y.redNeg())===0?(i[1]=U[h].toJ().mixedAdd(U[a]),i[2]=U[h].add(U[a].neg())):(i[1]=U[h].toJ().mixedAdd(U[a]),i[2]=U[h].toJ().mixedAdd(U[a].neg()));var G0=[-3,-1,-5,-7,0,7,5,1,3],n=R(z[h],z[a]);for(w=Math.max(n[0].length,w),x[h]=new Array(w),x[a]=new Array(w),y=0;y=0;M--){for(var $=0;M>=0;){var Y=!0;for(y=0;y=0&&$++,O=O.dblp($),M<0)break;for(y=0;y0?m=I[y][W-1>>1]:W<0&&(m=I[y][-W-1>>1].neg()),m.type==="affine"?O=O.mixedAdd(m):O=O.add(m))}}for(M=0;M=Math.ceil((P.bitLength()+1)/U.step):!1},L.prototype._getDoubles=function(P,U){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var z=[this],T=this,q=0;q{var V=N2(),N=q2(),Q=c0(),R=U1(),C=V.assert;function H(U){R.call(this,"short",U),this.a=new N(U.a,16).toRed(this.red),this.b=new N(U.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(U),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}Q(H,R),k.exports=H,H.prototype._getEndomorphism=function(U){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var z,T;if(U.beta)z=new N(U.beta,16).toRed(this.red);else{var q=this._getEndoRoots(this.p);z=q[0].cmp(q[1])<0?q[0]:q[1],z=z.toRed(this.red)}if(U.lambda)T=new N(U.lambda,16);else{var F=this._getEndoRoots(this.n);this.g.mul(F[0]).x.cmp(this.g.x.redMul(z))===0?T=F[0]:(T=F[1],C(this.g.mul(T).x.cmp(this.g.x.redMul(z))===0))}var I;return U.basis?I=U.basis.map(function(x){return{a:new N(x.a,16),b:new N(x.b,16)}}):I=this._getEndoBasis(T),{beta:z,lambda:T,basis:I}}},H.prototype._getEndoRoots=function(U){var z=U===this.p?this.red:N.mont(U),T=new N(2).toRed(z).redInvm(),q=T.redNeg(),F=new N(3).toRed(z).redNeg().redSqrt().redMul(T),I=q.redAdd(F).fromRed(),x=q.redSub(F).fromRed();return[I,x]},H.prototype._getEndoBasis=function(U){for(var z=this.n.ushrn(Math.floor(this.n.bitLength()/2)),T=U,q=this.n.clone(),F=new N(1),I=new N(0),x=new N(0),w=new N(1),M,y,m,c,h,a,i,G0=0,n,Z0;T.cmpn(0)!==0;){var X=q.div(T);n=q.sub(X.mul(T)),Z0=x.sub(X.mul(F));var O=w.sub(X.mul(I));if(!m&&n.cmp(z)<0)M=i.neg(),y=F,m=n.neg(),c=Z0;else if(m&&++G0===2)break;i=n,q=T,T=n,x=F,F=Z0,w=I,I=O}h=n.neg(),a=Z0;var G=m.sqr().add(c.sqr()),$=h.sqr().add(a.sqr());return $.cmp(G)>=0&&(h=M,a=y),m.negative&&(m=m.neg(),c=c.neg()),h.negative&&(h=h.neg(),a=a.neg()),[{a:m,b:c},{a:h,b:a}]},H.prototype._endoSplit=function(U){var z=this.endo.basis,T=z[0],q=z[1],F=q.b.mul(U).divRound(this.n),I=T.b.neg().mul(U).divRound(this.n),x=F.mul(T.a),w=I.mul(q.a),M=F.mul(T.b),y=I.mul(q.b),m=U.sub(x).sub(w),c=M.add(y).neg();return{k1:m,k2:c}},H.prototype.pointFromX=function(U,z){U=new N(U,16),U.red||(U=U.toRed(this.red));var T=U.redSqr().redMul(U).redIAdd(U.redMul(this.a)).redIAdd(this.b),q=T.redSqrt();if(q.redSqr().redSub(T).cmp(this.zero)!==0)throw new Error("invalid point");var F=q.fromRed().isOdd();return(z&&!F||!z&&F)&&(q=q.redNeg()),this.point(U,q)},H.prototype.validate=function(U){if(U.inf)return!0;var{x:z,y:T}=U,q=this.a.redMul(z),F=z.redSqr().redMul(z).redIAdd(q).redIAdd(this.b);return T.redSqr().redISub(F).cmpn(0)===0},H.prototype._endoWnafMulAdd=function(U,z,T){for(var q=this._endoWnafT1,F=this._endoWnafT2,I=0;I":""},L.prototype.isInfinity=function(){return this.inf},L.prototype.add=function(U){if(this.inf)return U;if(U.inf)return this;if(this.eq(U))return this.dbl();if(this.neg().eq(U))return this.curve.point(null,null);if(this.x.cmp(U.x)===0)return this.curve.point(null,null);var z=this.y.redSub(U.y);z.cmpn(0)!==0&&(z=z.redMul(this.x.redSub(U.x).redInvm()));var T=z.redSqr().redISub(this.x).redISub(U.x),q=z.redMul(this.x.redSub(T)).redISub(this.y);return this.curve.point(T,q)},L.prototype.dbl=function(){if(this.inf)return this;var U=this.y.redAdd(this.y);if(U.cmpn(0)===0)return this.curve.point(null,null);var z=this.curve.a,T=this.x.redSqr(),q=U.redInvm(),F=T.redAdd(T).redIAdd(T).redIAdd(z).redMul(q),I=F.redSqr().redISub(this.x.redAdd(this.x)),x=F.redMul(this.x.redSub(I)).redISub(this.y);return this.curve.point(I,x)},L.prototype.getX=function(){return this.x.fromRed()},L.prototype.getY=function(){return this.y.fromRed()},L.prototype.mul=function(U){return U=new N(U,16),this.isInfinity()?this:this._hasDoubles(U)?this.curve._fixedNafMul(this,U):this.curve.endo?this.curve._endoWnafMulAdd([this],[U]):this.curve._wnafMul(this,U)},L.prototype.mulAdd=function(U,z,T){var q=[this,z],F=[U,T];return this.curve.endo?this.curve._endoWnafMulAdd(q,F):this.curve._wnafMulAdd(1,q,F,2)},L.prototype.jmulAdd=function(U,z,T){var q=[this,z],F=[U,T];return this.curve.endo?this.curve._endoWnafMulAdd(q,F,!0):this.curve._wnafMulAdd(1,q,F,2,!0)},L.prototype.eq=function(U){return this===U||this.inf===U.inf&&(this.inf||this.x.cmp(U.x)===0&&this.y.cmp(U.y)===0)},L.prototype.neg=function(U){if(this.inf)return this;var z=this.curve.point(this.x,this.y.redNeg());if(U&&this.precomputed){var T=this.precomputed,q=function(F){return F.neg()};z.precomputed={naf:T.naf&&{wnd:T.naf.wnd,points:T.naf.points.map(q)},doubles:T.doubles&&{step:T.doubles.step,points:T.doubles.points.map(q)}}}return z},L.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var U=this.curve.jpoint(this.x,this.y,this.curve.one);return U};function P(U,z,T,q){R.BasePoint.call(this,U,"jacobian"),z===null&&T===null&&q===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new N(0)):(this.x=new N(z,16),this.y=new N(T,16),this.z=new N(q,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}Q(P,R.BasePoint),H.prototype.jpoint=function(U,z,T){return new P(this,U,z,T)},P.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var U=this.z.redInvm(),z=U.redSqr(),T=this.x.redMul(z),q=this.y.redMul(z).redMul(U);return this.curve.point(T,q)},P.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},P.prototype.add=function(U){if(this.isInfinity())return U;if(U.isInfinity())return this;var z=U.z.redSqr(),T=this.z.redSqr(),q=this.x.redMul(z),F=U.x.redMul(T),I=this.y.redMul(z.redMul(U.z)),x=U.y.redMul(T.redMul(this.z)),w=q.redSub(F),M=I.redSub(x);if(w.cmpn(0)===0)return M.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var y=w.redSqr(),m=y.redMul(w),c=q.redMul(y),h=M.redSqr().redIAdd(m).redISub(c).redISub(c),a=M.redMul(c.redISub(h)).redISub(I.redMul(m)),i=this.z.redMul(U.z).redMul(w);return this.curve.jpoint(h,a,i)},P.prototype.mixedAdd=function(U){if(this.isInfinity())return U.toJ();if(U.isInfinity())return this;var z=this.z.redSqr(),T=this.x,q=U.x.redMul(z),F=this.y,I=U.y.redMul(z).redMul(this.z),x=T.redSub(q),w=F.redSub(I);if(x.cmpn(0)===0)return w.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var M=x.redSqr(),y=M.redMul(x),m=T.redMul(M),c=w.redSqr().redIAdd(y).redISub(m).redISub(m),h=w.redMul(m.redISub(c)).redISub(F.redMul(y)),a=this.z.redMul(x);return this.curve.jpoint(c,h,a)},P.prototype.dblp=function(U){if(U===0)return this;if(this.isInfinity())return this;if(!U)return this.dbl();var z;if(this.curve.zeroA||this.curve.threeA){var T=this;for(z=0;z=0)return!1;if(T.redIAdd(F),this.x.cmp(T)===0)return!0}},P.prototype.inspect=function(){return this.isInfinity()?"":""},P.prototype.isInfinity=function(){return this.z.cmpn(0)===0}}),Z3=K0((B,k)=>{var V=q2(),N=c0(),Q=U1(),R=N2();function C(L){Q.call(this,"mont",L),this.a=new V(L.a,16).toRed(this.red),this.b=new V(L.b,16).toRed(this.red),this.i4=new V(4).toRed(this.red).redInvm(),this.two=new V(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}N(C,Q),k.exports=C,C.prototype.validate=function(L){var P=L.normalize().x,U=P.redSqr(),z=U.redMul(P).redAdd(U.redMul(this.a)).redAdd(P),T=z.redSqrt();return T.redSqr().cmp(z)===0};function H(L,P,U){Q.BasePoint.call(this,L,"projective"),P===null&&U===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new V(P,16),this.z=new V(U,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}N(H,Q.BasePoint),C.prototype.decodePoint=function(L,P){return this.point(R.toArray(L,P),1)},C.prototype.point=function(L,P){return new H(this,L,P)},C.prototype.pointFromJSON=function(L){return H.fromJSON(this,L)},H.prototype.precompute=function(){},H.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},H.fromJSON=function(L,P){return new H(L,P[0],P[1]||L.one)},H.prototype.inspect=function(){return this.isInfinity()?"":""},H.prototype.isInfinity=function(){return this.z.cmpn(0)===0},H.prototype.dbl=function(){var L=this.x.redAdd(this.z),P=L.redSqr(),U=this.x.redSub(this.z),z=U.redSqr(),T=P.redSub(z),q=P.redMul(z),F=T.redMul(z.redAdd(this.curve.a24.redMul(T)));return this.curve.point(q,F)},H.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},H.prototype.diffAdd=function(L,P){var U=this.x.redAdd(this.z),z=this.x.redSub(this.z),T=L.x.redAdd(L.z),q=L.x.redSub(L.z),F=q.redMul(U),I=T.redMul(z),x=P.z.redMul(F.redAdd(I).redSqr()),w=P.x.redMul(F.redISub(I).redSqr());return this.curve.point(x,w)},H.prototype.mul=function(L){for(var P=L.clone(),U=this,z=this.curve.point(null,null),T=this,q=[];P.cmpn(0)!==0;P.iushrn(1))q.push(P.andln(1));for(var F=q.length-1;F>=0;F--)q[F]===0?(U=U.diffAdd(z,T),z=z.dbl()):(z=U.diffAdd(z,T),U=U.dbl());return z},H.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},H.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},H.prototype.eq=function(L){return this.getX().cmp(L.getX())===0},H.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},H.prototype.getX=function(){return this.normalize(),this.x.fromRed()}}),Q3=K0((B,k)=>{var V=N2(),N=q2(),Q=c0(),R=U1(),C=V.assert;function H(P){this.twisted=(P.a|0)!==1,this.mOneA=this.twisted&&(P.a|0)===-1,this.extended=this.mOneA,R.call(this,"edwards",P),this.a=new N(P.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new N(P.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new N(P.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),C(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(P.c|0)===1}Q(H,R),k.exports=H,H.prototype._mulA=function(P){return this.mOneA?P.redNeg():this.a.redMul(P)},H.prototype._mulC=function(P){return this.oneC?P:this.c.redMul(P)},H.prototype.jpoint=function(P,U,z,T){return this.point(P,U,z,T)},H.prototype.pointFromX=function(P,U){P=new N(P,16),P.red||(P=P.toRed(this.red));var z=P.redSqr(),T=this.c2.redSub(this.a.redMul(z)),q=this.one.redSub(this.c2.redMul(this.d).redMul(z)),F=T.redMul(q.redInvm()),I=F.redSqrt();if(I.redSqr().redSub(F).cmp(this.zero)!==0)throw new Error("invalid point");var x=I.fromRed().isOdd();return(U&&!x||!U&&x)&&(I=I.redNeg()),this.point(P,I)},H.prototype.pointFromY=function(P,U){P=new N(P,16),P.red||(P=P.toRed(this.red));var z=P.redSqr(),T=z.redSub(this.c2),q=z.redMul(this.d).redMul(this.c2).redSub(this.a),F=T.redMul(q.redInvm());if(F.cmp(this.zero)===0){if(U)throw new Error("invalid point");return this.point(this.zero,P)}var I=F.redSqrt();if(I.redSqr().redSub(F).cmp(this.zero)!==0)throw new Error("invalid point");return I.fromRed().isOdd()!==U&&(I=I.redNeg()),this.point(I,P)},H.prototype.validate=function(P){if(P.isInfinity())return!0;P.normalize();var U=P.x.redSqr(),z=P.y.redSqr(),T=U.redMul(this.a).redAdd(z),q=this.c2.redMul(this.one.redAdd(this.d.redMul(U).redMul(z)));return T.cmp(q)===0};function L(P,U,z,T,q){R.BasePoint.call(this,P,"projective"),U===null&&z===null&&T===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 N(U,16),this.y=new N(z,16),this.z=T?new N(T,16):this.curve.one,this.t=q&&new N(q,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()))))}Q(L,R.BasePoint),H.prototype.pointFromJSON=function(P){return L.fromJSON(this,P)},H.prototype.point=function(P,U,z,T){return new L(this,P,U,z,T)},L.fromJSON=function(P,U){return new L(P,U[0],U[1],U[2])},L.prototype.inspect=function(){return this.isInfinity()?"":""},L.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},L.prototype._extDbl=function(){var P=this.x.redSqr(),U=this.y.redSqr(),z=this.z.redSqr();z=z.redIAdd(z);var T=this.curve._mulA(P),q=this.x.redAdd(this.y).redSqr().redISub(P).redISub(U),F=T.redAdd(U),I=F.redSub(z),x=T.redSub(U),w=q.redMul(I),M=F.redMul(x),y=q.redMul(x),m=I.redMul(F);return this.curve.point(w,M,m,y)},L.prototype._projDbl=function(){var P=this.x.redAdd(this.y).redSqr(),U=this.x.redSqr(),z=this.y.redSqr(),T,q,F,I,x,w;if(this.curve.twisted){I=this.curve._mulA(U);var M=I.redAdd(z);this.zOne?(T=P.redSub(U).redSub(z).redMul(M.redSub(this.curve.two)),q=M.redMul(I.redSub(z)),F=M.redSqr().redSub(M).redSub(M)):(x=this.z.redSqr(),w=M.redSub(x).redISub(x),T=P.redSub(U).redISub(z).redMul(w),q=M.redMul(I.redSub(z)),F=M.redMul(w))}else I=U.redAdd(z),x=this.curve._mulC(this.z).redSqr(),w=I.redSub(x).redSub(x),T=this.curve._mulC(P.redISub(I)).redMul(w),q=this.curve._mulC(I).redMul(U.redISub(z)),F=I.redMul(w);return this.curve.point(T,q,F)},L.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},L.prototype._extAdd=function(P){var U=this.y.redSub(this.x).redMul(P.y.redSub(P.x)),z=this.y.redAdd(this.x).redMul(P.y.redAdd(P.x)),T=this.t.redMul(this.curve.dd).redMul(P.t),q=this.z.redMul(P.z.redAdd(P.z)),F=z.redSub(U),I=q.redSub(T),x=q.redAdd(T),w=z.redAdd(U),M=F.redMul(I),y=x.redMul(w),m=F.redMul(w),c=I.redMul(x);return this.curve.point(M,y,c,m)},L.prototype._projAdd=function(P){var U=this.z.redMul(P.z),z=U.redSqr(),T=this.x.redMul(P.x),q=this.y.redMul(P.y),F=this.curve.d.redMul(T).redMul(q),I=z.redSub(F),x=z.redAdd(F),w=this.x.redAdd(this.y).redMul(P.x.redAdd(P.y)).redISub(T).redISub(q),M=U.redMul(I).redMul(w),y,m;return this.curve.twisted?(y=U.redMul(x).redMul(q.redSub(this.curve._mulA(T))),m=I.redMul(x)):(y=U.redMul(x).redMul(q.redSub(T)),m=this.curve._mulC(I).redMul(x)),this.curve.point(M,y,m)},L.prototype.add=function(P){return this.isInfinity()?P:P.isInfinity()?this:this.curve.extended?this._extAdd(P):this._projAdd(P)},L.prototype.mul=function(P){return this._hasDoubles(P)?this.curve._fixedNafMul(this,P):this.curve._wnafMul(this,P)},L.prototype.mulAdd=function(P,U,z){return this.curve._wnafMulAdd(1,[this,U],[P,z],2,!1)},L.prototype.jmulAdd=function(P,U,z){return this.curve._wnafMulAdd(1,[this,U],[P,z],2,!0)},L.prototype.normalize=function(){if(this.zOne)return this;var P=this.z.redInvm();return this.x=this.x.redMul(P),this.y=this.y.redMul(P),this.t&&(this.t=this.t.redMul(P)),this.z=this.curve.one,this.zOne=!0,this},L.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},L.prototype.getX=function(){return this.normalize(),this.x.fromRed()},L.prototype.getY=function(){return this.normalize(),this.y.fromRed()},L.prototype.eq=function(P){return this===P||this.getX().cmp(P.getX())===0&&this.getY().cmp(P.getY())===0},L.prototype.eqXToP=function(P){var U=P.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(U)===0)return!0;for(var z=P.clone(),T=this.curve.redN.redMul(this.z);;){if(z.iadd(this.curve.n),z.cmp(this.curve.p)>=0)return!1;if(U.redIAdd(T),this.x.cmp(U)===0)return!0}},L.prototype.toP=L.prototype.normalize,L.prototype.mixedAdd=L.prototype.add}),L6=K0((B)=>{var k=B;k.base=U1(),k.short=W3(),k.mont=Z3(),k.edwards=Q3()}),L2=K0((B)=>{var k=D2(),V=c0();B.inherits=V;function N(O,G){return(O.charCodeAt(G)&64512)!==55296||G<0||G+1>=O.length?!1:(O.charCodeAt(G+1)&64512)===56320}function Q(O,G){if(Array.isArray(O))return O.slice();if(!O)return[];var $=[];if(typeof O=="string")if(G){if(G==="hex")for(O=O.replace(/[^a-z0-9]+/ig,""),O.length%2!==0&&(O="0"+O),W=0;W>6|192,$[Y++]=Z&63|128):N(O,W)?(Z=65536+((Z&1023)<<10)+(O.charCodeAt(++W)&1023),$[Y++]=Z>>18|240,$[Y++]=Z>>12&63|128,$[Y++]=Z>>6&63|128,$[Y++]=Z&63|128):($[Y++]=Z>>12|224,$[Y++]=Z>>6&63|128,$[Y++]=Z&63|128)}else for(W=0;W>>24|O>>>8&65280|O<<8&16711680|(O&255)<<24;return G>>>0}B.htonl=C;function H(O,G){for(var $="",Y=0;Y>>0}return Z}B.join32=U;function z(O,G){for(var $=new Array(O.length*4),Y=0,W=0;Y>>24,$[W+1]=Z>>>16&255,$[W+2]=Z>>>8&255,$[W+3]=Z&255):($[W+3]=Z>>>24,$[W+2]=Z>>>16&255,$[W+1]=Z>>>8&255,$[W]=Z&255)}return $}B.split32=z;function T(O,G){return O>>>G|O<<32-G}B.rotr32=T;function q(O,G){return O<>>32-G}B.rotl32=q;function F(O,G){return O+G>>>0}B.sum32=F;function I(O,G,$){return O+G+$>>>0}B.sum32_3=I;function x(O,G,$,Y){return O+G+$+Y>>>0}B.sum32_4=x;function w(O,G,$,Y,W){return O+G+$+Y+W>>>0}B.sum32_5=w;function M(O,G,$,Y){var W=O[G],Z=O[G+1],K=Y+Z>>>0,J=(K>>0,O[G+1]=K}B.sum64=M;function y(O,G,$,Y){var W=G+Y>>>0,Z=(W>>0}B.sum64_hi=y;function m(O,G,$,Y){var W=G+Y;return W>>>0}B.sum64_lo=m;function c(O,G,$,Y,W,Z,K,J){var j=0,A=G;A=A+Y>>>0,j+=A>>0,j+=A>>0,j+=A>>0}B.sum64_4_hi=c;function h(O,G,$,Y,W,Z,K,J){var j=G+Y+Z+J;return j>>>0}B.sum64_4_lo=h;function a(O,G,$,Y,W,Z,K,J,j,A){var E=0,_=G;_=_+Y>>>0,E+=_>>0,E+=_>>0,E+=_>>0,E+=_>>0}B.sum64_5_hi=a;function i(O,G,$,Y,W,Z,K,J,j,A){var E=G+Y+Z+J+A;return E>>>0}B.sum64_5_lo=i;function G0(O,G,$){var Y=G<<32-$|O>>>$;return Y>>>0}B.rotr64_hi=G0;function n(O,G,$){var Y=O<<32-$|G>>>$;return Y>>>0}B.rotr64_lo=n;function Z0(O,G,$){return O>>>$}B.shr64_hi=Z0;function X(O,G,$){var Y=O<<32-$|G>>>$;return Y>>>0}B.shr64_lo=X}),i2=K0((B)=>{var k=L2(),V=D2();function N(){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}B.BlockHash=N,N.prototype.update=function(Q,R){if(Q=k.toArray(Q,R),this.pending?this.pending=this.pending.concat(Q):this.pending=Q,this.pendingTotal+=Q.length,this.pending.length>=this._delta8){Q=this.pending;var C=Q.length%this._delta8;this.pending=Q.slice(Q.length-C,Q.length),this.pending.length===0&&(this.pending=null),Q=k.join32(Q,0,Q.length-C,this.endian);for(var H=0;H>>24&255,H[L++]=Q>>>16&255,H[L++]=Q>>>8&255,H[L++]=Q&255}else for(H[L++]=Q&255,H[L++]=Q>>>8&255,H[L++]=Q>>>16&255,H[L++]=Q>>>24&255,H[L++]=0,H[L++]=0,H[L++]=0,H[L++]=0,P=8;P{var k=L2(),V=k.rotr32;function N(z,T,q,F){if(z===0)return Q(T,q,F);if(z===1||z===3)return C(T,q,F);if(z===2)return R(T,q,F)}B.ft_1=N;function Q(z,T,q){return z&T^~z&q}B.ch32=Q;function R(z,T,q){return z&T^z&q^T&q}B.maj32=R;function C(z,T,q){return z^T^q}B.p32=C;function H(z){return V(z,2)^V(z,13)^V(z,22)}B.s0_256=H;function L(z){return V(z,6)^V(z,11)^V(z,25)}B.s1_256=L;function P(z){return V(z,7)^V(z,18)^z>>>3}B.g0_256=P;function U(z){return V(z,17)^V(z,19)^z>>>10}B.g1_256=U}),z3=K0((B,k)=>{var V=L2(),N=i2(),Q=k6(),R=V.rotl32,C=V.sum32,H=V.sum32_5,L=Q.ft_1,P=N.BlockHash,U=[1518500249,1859775393,2400959708,3395469782];function z(){if(!(this instanceof z))return new z;P.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}V.inherits(z,P),k.exports=z,z.blockSize=512,z.outSize=160,z.hmacStrength=80,z.padLength=64,z.prototype._update=function(T,q){for(var F=this.W,I=0;I<16;I++)F[I]=T[q+I];for(;I{var V=L2(),N=i2(),Q=k6(),R=D2(),C=V.sum32,H=V.sum32_4,L=V.sum32_5,P=Q.ch32,U=Q.maj32,z=Q.s0_256,T=Q.s1_256,q=Q.g0_256,F=Q.g1_256,I=N.BlockHash,x=[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 w(){if(!(this instanceof w))return new w;I.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=x,this.W=new Array(64)}V.inherits(w,I),k.exports=w,w.blockSize=512,w.outSize=256,w.hmacStrength=192,w.padLength=64,w.prototype._update=function(M,y){for(var m=this.W,c=0;c<16;c++)m[c]=M[y+c];for(;c{var V=L2(),N=B6();function Q(){if(!(this instanceof Q))return new Q;N.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}V.inherits(Q,N),k.exports=Q,Q.blockSize=512,Q.outSize=224,Q.hmacStrength=192,Q.padLength=64,Q.prototype._digest=function(R){return R==="hex"?V.toHex32(this.h.slice(0,7),"big"):V.split32(this.h.slice(0,7),"big")}}),R6=K0((B,k)=>{var V=L2(),N=i2(),Q=D2(),R=V.rotr64_hi,C=V.rotr64_lo,H=V.shr64_hi,L=V.shr64_lo,P=V.sum64,U=V.sum64_hi,z=V.sum64_lo,T=V.sum64_4_hi,q=V.sum64_4_lo,F=V.sum64_5_hi,I=V.sum64_5_lo,x=N.BlockHash,w=[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 M(){if(!(this instanceof M))return new M;x.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=w,this.W=new Array(160)}V.inherits(M,x),k.exports=M,M.blockSize=1024,M.outSize=512,M.hmacStrength=192,M.padLength=128,M.prototype._prepareBlock=function($,Y){for(var W=this.W,Z=0;Z<32;Z++)W[Z]=$[Y+Z];for(;Z{var V=L2(),N=R6();function Q(){if(!(this instanceof Q))return new Q;N.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}V.inherits(Q,N),k.exports=Q,Q.blockSize=1024,Q.outSize=384,Q.hmacStrength=192,Q.padLength=128,Q.prototype._digest=function(R){return R==="hex"?V.toHex32(this.h.slice(0,12),"big"):V.split32(this.h.slice(0,12),"big")}}),P3=K0((B)=>{B.sha1=z3(),B.sha224=H3(),B.sha256=B6(),B.sha384=V3(),B.sha512=R6()}),U3=K0((B)=>{var k=L2(),V=i2(),N=k.rotl32,Q=k.sum32,R=k.sum32_3,C=k.sum32_4,H=V.BlockHash;function L(){if(!(this instanceof L))return new L;H.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}k.inherits(L,H),B.ripemd160=L,L.blockSize=512,L.outSize=160,L.hmacStrength=192,L.padLength=64,L.prototype._update=function(x,w){for(var M=this.h[0],y=this.h[1],m=this.h[2],c=this.h[3],h=this.h[4],a=M,i=y,G0=m,n=c,Z0=h,X=0;X<80;X++){var O=Q(N(C(M,P(X,y,m,c),x[T[X]+w],U(X)),F[X]),h);M=h,h=c,c=N(m,10),m=y,y=O,O=Q(N(C(a,P(79-X,i,G0,n),x[q[X]+w],z(X)),I[X]),Z0),a=Z0,Z0=n,n=N(G0,10),G0=i,i=O}O=R(this.h[1],m,n),this.h[1]=R(this.h[2],c,Z0),this.h[2]=R(this.h[3],h,a),this.h[3]=R(this.h[4],M,i),this.h[4]=R(this.h[0],y,G0),this.h[0]=O},L.prototype._digest=function(x){return x==="hex"?k.toHex32(this.h,"little"):k.split32(this.h,"little")};function P(x,w,M,y){return x<=15?w^M^y:x<=31?w&M|~w&y:x<=47?(w|~M)^y:x<=63?w&y|M&~y:w^(M|~y)}function U(x){return x<=15?0:x<=31?1518500249:x<=47?1859775393:x<=63?2400959708:2840853838}function z(x){return x<=15?1352829926:x<=31?1548603684:x<=47?1836072691:x<=63?2053994217:0}var T=[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],q=[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],F=[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],I=[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]}),F3=K0((B,k)=>{var V=L2(),N=D2();function Q(R,C,H){if(!(this instanceof Q))return new Q(R,C,H);this.Hash=R,this.blockSize=R.blockSize/8,this.outSize=R.outSize/8,this.inner=null,this.outer=null,this._init(V.toArray(C,H))}k.exports=Q,Q.prototype._init=function(R){R.length>this.blockSize&&(R=new this.Hash().update(R).digest()),N(R.length<=this.blockSize);for(var C=R.length;C{var k=B;k.utils=L2(),k.common=i2(),k.sha=P3(),k.ripemd=U3(),k.hmac=F3(),k.sha1=k.sha.sha1,k.sha256=k.sha.sha256,k.sha224=k.sha.sha224,k.sha384=k.sha.sha384,k.sha512=k.sha.sha512,k.ripemd160=k.ripemd.ripemd160}),T3=K0((B,k)=>{k.exports={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"]]}}}),a1=K0((B)=>{var k=B,V=n1(),N=L6(),Q=N2(),R=Q.assert;function C(P){P.type==="short"?this.curve=new N.short(P):P.type==="edwards"?this.curve=new N.edwards(P):this.curve=new N.mont(P),this.g=this.curve.g,this.n=this.curve.n,this.hash=P.hash,R(this.g.validate(),"Invalid curve"),R(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}k.PresetCurve=C;function H(P,U){Object.defineProperty(k,P,{configurable:!0,enumerable:!0,get:function(){var z=new C(U);return Object.defineProperty(k,P,{configurable:!0,enumerable:!0,value:z}),z}})}H("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:V.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),H("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:V.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),H("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:V.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),H("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:V.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"]}),H("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:V.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"]}),H("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:V.sha256,gRed:!1,g:["9"]}),H("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:V.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var L;try{L=T3()}catch{L=void 0}H("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:V.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",L]})}),D3=K0((B,k)=>{var V=n1(),N=N6(),Q=D2();function R(C){if(!(this instanceof R))return new R(C);this.hash=C.hash,this.predResist=!!C.predResist,this.outLen=this.hash.outSize,this.minEntropy=C.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var H=N.toArray(C.entropy,C.entropyEnc||"hex"),L=N.toArray(C.nonce,C.nonceEnc||"hex"),P=N.toArray(C.pers,C.persEnc||"hex");Q(H.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(H,L,P)}k.exports=R,R.prototype._init=function(C,H,L){var P=C.concat(H).concat(L);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var U=0;U=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(C.concat(L||[])),this._reseed=1},R.prototype.generate=function(C,H,L,P){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof H!="string"&&(P=L,L=H,H=null),L&&(L=N.toArray(L,P||"hex"),this._update(L));for(var U=[];U.length{var V=q2(),N=N2(),Q=N.assert;function R(C,H){this.ec=C,this.priv=null,this.pub=null,H.priv&&this._importPrivate(H.priv,H.privEnc),H.pub&&this._importPublic(H.pub,H.pubEnc)}k.exports=R,R.fromPublic=function(C,H,L){return H instanceof R?H:new R(C,{pub:H,pubEnc:L})},R.fromPrivate=function(C,H,L){return H instanceof R?H:new R(C,{priv:H,privEnc:L})},R.prototype.validate=function(){var C=this.getPublic();return C.isInfinity()?{result:!1,reason:"Invalid public key"}:C.validate()?C.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"}},R.prototype.getPublic=function(C,H){return typeof C=="string"&&(H=C,C=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),H?this.pub.encode(H,C):this.pub},R.prototype.getPrivate=function(C){return C==="hex"?this.priv.toString(16,2):this.priv},R.prototype._importPrivate=function(C,H){this.priv=new V(C,H||16),this.priv=this.priv.umod(this.ec.curve.n)},R.prototype._importPublic=function(C,H){if(C.x||C.y){this.ec.curve.type==="mont"?Q(C.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&Q(C.x&&C.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(C.x,C.y);return}this.pub=this.ec.curve.decodePoint(C,H)},R.prototype.derive=function(C){return C.validate()||Q(C.validate(),"public point not validated"),C.mul(this.priv).getX()},R.prototype.sign=function(C,H,L){return this.ec.sign(C,this,H,L)},R.prototype.verify=function(C,H){return this.ec.verify(C,H,this)},R.prototype.inspect=function(){return""}}),L3=K0((B,k)=>{var V=q2(),N=N2(),Q=N.assert;function R(U,z){if(U instanceof R)return U;this._importDER(U,z)||(Q(U.r&&U.s,"Signature without r or s"),this.r=new V(U.r,16),this.s=new V(U.s,16),U.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=U.recoveryParam)}k.exports=R;function C(){this.place=0}function H(U,z){var T=U[z.place++];if(!(T&128))return T;var q=T&15;if(q===0||q>4)return!1;for(var F=0,I=0,x=z.place;I>>=0;return F<=127?!1:(z.place=x,F)}function L(U){for(var z=0,T=U.length-1;!U[z]&&!(U[z+1]&128)&&z>>3);for(U.push(T|128);--T;)U.push(z>>>(T<<3)&255);U.push(z)}R.prototype.toDER=function(U){var z=this.r.toArray(),T=this.s.toArray();for(z[0]&128&&(z=[0].concat(z)),T[0]&128&&(T=[0].concat(T)),z=L(z),T=L(T);!T[0]&&!(T[1]&128);)T=T.slice(1);var q=[2];P(q,z.length),q=q.concat(z),q.push(2),P(q,T.length);var F=q.concat(T),I=[48];return P(I,F.length),I=I.concat(F),N.encode(I,U)}}),k3=K0((B,k)=>{var V=q2(),N=D3(),Q=N2(),R=a1(),C=o1(),H=Q.assert,L=N3(),P=L3();function U(z){if(!(this instanceof U))return new U(z);typeof z=="string"&&(H(Object.prototype.hasOwnProperty.call(R,z),"Unknown curve "+z),z=R[z]),z instanceof R.PresetCurve&&(z={curve:z}),this.curve=z.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=z.curve.g,this.g.precompute(z.curve.n.bitLength()+1),this.hash=z.hash||z.curve.hash}k.exports=U,U.prototype.keyPair=function(z){return new L(this,z)},U.prototype.keyFromPrivate=function(z,T){return L.fromPrivate(this,z,T)},U.prototype.keyFromPublic=function(z,T){return L.fromPublic(this,z,T)},U.prototype.genKeyPair=function(z){z||(z={});for(var T=new N({hash:this.hash,pers:z.pers,persEnc:z.persEnc||"utf8",entropy:z.entropy||C(this.hash.hmacStrength),entropyEnc:z.entropy&&z.entropyEnc||"utf8",nonce:this.n.toArray()}),q=this.n.byteLength(),F=this.n.sub(new V(2));;){var I=new V(T.generate(q));if(!(I.cmp(F)>0))return I.iaddn(1),this.keyFromPrivate(I)}},U.prototype._truncateToN=function(z,T){var q=z.byteLength()*8-this.n.bitLength();return q>0&&(z=z.ushrn(q)),!T&&z.cmp(this.n)>=0?z.sub(this.n):z},U.prototype.sign=function(z,T,q,F){typeof q=="object"&&(F=q,q=null),F||(F={}),T=this.keyFromPrivate(T,q),z=this._truncateToN(new V(z,16));for(var I=this.n.byteLength(),x=T.getPrivate().toArray("be",I),w=z.toArray("be",I),M=new N({hash:this.hash,entropy:x,nonce:w,pers:F.pers,persEnc:F.persEnc||"utf8"}),y=this.n.sub(new V(1)),m=0;;m++){var c=F.k?F.k(m):new V(M.generate(this.n.byteLength()));if(c=this._truncateToN(c,!0),!(c.cmpn(1)<=0||c.cmp(y)>=0)){var h=this.g.mul(c);if(!h.isInfinity()){var a=h.getX(),i=a.umod(this.n);if(i.cmpn(0)!==0){var G0=c.invm(this.n).mul(i.mul(T.getPrivate()).iadd(z));if(G0=G0.umod(this.n),G0.cmpn(0)!==0){var n=(h.getY().isOdd()?1:0)|(a.cmp(i)!==0?2:0);return F.canonical&&G0.cmp(this.nh)>0&&(G0=this.n.sub(G0),n^=1),new P({r:i,s:G0,recoveryParam:n})}}}}}},U.prototype.verify=function(z,T,q,F){z=this._truncateToN(new V(z,16)),q=this.keyFromPublic(q,F),T=new P(T,"hex");var{r:I,s:x}=T;if(I.cmpn(1)<0||I.cmp(this.n)>=0||x.cmpn(1)<0||x.cmp(this.n)>=0)return!1;var w=x.invm(this.n),M=w.mul(z).umod(this.n),y=w.mul(I).umod(this.n),m;return this.curve._maxwellTrick?(m=this.g.jmulAdd(M,q.getPublic(),y),m.isInfinity()?!1:m.eqXToP(I)):(m=this.g.mulAdd(M,q.getPublic(),y),m.isInfinity()?!1:m.getX().umod(this.n).cmp(I)===0)},U.prototype.recoverPubKey=function(z,T,q,F){H((3&q)===q,"The recovery param is more than two bits"),T=new P(T,F);var I=this.n,x=new V(z),w=T.r,M=T.s,y=q&1,m=q>>1;if(w.cmp(this.curve.p.umod(this.curve.n))>=0&&m)throw new Error("Unable to find sencond key candinate");m?w=this.curve.pointFromX(w.add(this.curve.n),y):w=this.curve.pointFromX(w,y);var c=T.r.invm(I),h=I.sub(x).mul(c).umod(I),a=M.mul(c).umod(I);return this.g.mulAdd(h,w,a)},U.prototype.getKeyRecoveryParam=function(z,T,q,F){if(T=new P(T,F),T.recoveryParam!==null)return T.recoveryParam;for(var I=0;I<4;I++){var x;try{x=this.recoverPubKey(z,T,I)}catch{continue}if(x.eq(q))return I}throw new Error("Unable to find valid recovery factor")}}),B3=K0((B,k)=>{var V=N2(),N=V.assert,Q=V.parseBytes,R=V.cachedProperty;function C(H,L){this.eddsa=H,this._secret=Q(L.secret),H.isPoint(L.pub)?this._pub=L.pub:this._pubBytes=Q(L.pub)}C.fromPublic=function(H,L){return L instanceof C?L:new C(H,{pub:L})},C.fromSecret=function(H,L){return L instanceof C?L:new C(H,{secret:L})},C.prototype.secret=function(){return this._secret},R(C,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),R(C,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),R(C,"privBytes",function(){var H=this.eddsa,L=this.hash(),P=H.encodingLength-1,U=L.slice(0,H.encodingLength);return U[0]&=248,U[P]&=127,U[P]|=64,U}),R(C,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),R(C,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),R(C,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),C.prototype.sign=function(H){return N(this._secret,"KeyPair can only verify"),this.eddsa.sign(H,this)},C.prototype.verify=function(H,L){return this.eddsa.verify(H,L,this)},C.prototype.getSecret=function(H){return N(this._secret,"KeyPair is public only"),V.encode(this.secret(),H)},C.prototype.getPublic=function(H){return V.encode(this.pubBytes(),H)},k.exports=C}),R3=K0((B,k)=>{var V=q2(),N=N2(),Q=N.assert,R=N.cachedProperty,C=N.parseBytes;function H(L,P){this.eddsa=L,typeof P!="object"&&(P=C(P)),Array.isArray(P)&&(P={R:P.slice(0,L.encodingLength),S:P.slice(L.encodingLength)}),Q(P.R&&P.S,"Signature without R or S"),L.isPoint(P.R)&&(this._R=P.R),P.S instanceof V&&(this._S=P.S),this._Rencoded=Array.isArray(P.R)?P.R:P.Rencoded,this._Sencoded=Array.isArray(P.S)?P.S:P.Sencoded}R(H,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),R(H,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),R(H,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),R(H,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),H.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},H.prototype.toHex=function(){return N.encode(this.toBytes(),"hex").toUpperCase()},k.exports=H}),q3=K0((B,k)=>{var V=n1(),N=a1(),Q=N2(),R=Q.assert,C=Q.parseBytes,H=B3(),L=R3();function P(U){if(R(U==="ed25519","only tested with ed25519 so far"),!(this instanceof P))return new P(U);U=N[U].curve,this.curve=U,this.g=U.g,this.g.precompute(U.n.bitLength()+1),this.pointClass=U.point().constructor,this.encodingLength=Math.ceil(U.n.bitLength()/8),this.hash=V.sha512}k.exports=P,P.prototype.sign=function(U,z){U=C(U);var T=this.keyFromSecret(z),q=this.hashInt(T.messagePrefix(),U),F=this.g.mul(q),I=this.encodePoint(F),x=this.hashInt(I,T.pubBytes(),U).mul(T.priv()),w=q.add(x).umod(this.curve.n);return this.makeSignature({R:F,S:w,Rencoded:I})},P.prototype.verify=function(U,z,T){U=C(U),z=this.makeSignature(z);var q=this.keyFromPublic(T),F=this.hashInt(z.Rencoded(),q.pubBytes(),U),I=this.g.mul(z.S()),x=z.R().add(q.pub().mul(F));return x.eq(I)},P.prototype.hashInt=function(){for(var U=this.hash(),z=0;z{var k=B;k.version=j3().version,k.utils=N2(),k.rand=o1(),k.curve=L6(),k.curves=a1(),k.ec=k3(),k.eddsa=q3()}),q6=K0((B,k)=>{(function(V,N){function Q(X,O){if(!X)throw new Error(O||"Assertion failed")}function R(X,O){X.super_=O;var G=function(){};G.prototype=O.prototype,X.prototype=new G,X.prototype.constructor=X}function C(X,O,G){if(C.isBN(X))return X;this.negative=0,this.words=null,this.length=0,this.red=null,X!==null&&((O==="le"||O==="be")&&(G=O,O=10),this._init(X||0,O||10,G||"be"))}typeof V=="object"?V.exports=C:N.BN=C,C.BN=C,C.wordSize=26;var H;try{typeof window<"u"&&typeof window.Buffer<"u"?H=window.Buffer:H=M2().Buffer}catch{}C.isBN=function(X){return X instanceof C?!0:X!==null&&typeof X=="object"&&X.constructor.wordSize===C.wordSize&&Array.isArray(X.words)},C.max=function(X,O){return X.cmp(O)>0?X:O},C.min=function(X,O){return X.cmp(O)<0?X:O},C.prototype._init=function(X,O,G){if(typeof X=="number")return this._initNumber(X,O,G);if(typeof X=="object")return this._initArray(X,O,G);O==="hex"&&(O=16),Q(O===(O|0)&&O>=2&&O<=36),X=X.toString().replace(/\s+/g,"");var $=0;X[0]==="-"&&($++,this.negative=1),$=0;$-=3)W=X[$]|X[$-1]<<8|X[$-2]<<16,this.words[Y]|=W<>>26-Z&67108863,Z+=24,Z>=26&&(Z-=26,Y++);else if(G==="le")for($=0,Y=0;$>>26-Z&67108863,Z+=24,Z>=26&&(Z-=26,Y++);return this.strip()};function L(X,O){var G=X.charCodeAt(O);return G>=65&&G<=70?G-55:G>=97&&G<=102?G-87:G-48&15}function P(X,O,G){var $=L(X,G);return G-1>=O&&($|=L(X,G-1)<<4),$}C.prototype._parseHex=function(X,O,G){this.length=Math.ceil((X.length-O)/6),this.words=new Array(this.length);for(var $=0;$=O;$-=2)Z=P(X,O,$)<=18?(Y-=18,W+=1,this.words[W]|=Z>>>26):Y+=8;else{var K=X.length-O;for($=K%2===0?O+1:O;$=18?(Y-=18,W+=1,this.words[W]|=Z>>>26):Y+=8}this.strip()};function U(X,O,G,$){for(var Y=0,W=Math.min(X.length,G),Z=O;Z=49?Y+=K-49+10:K>=17?Y+=K-17+10:Y+=K}return Y}C.prototype._parseBase=function(X,O,G){this.words=[0],this.length=1;for(var $=0,Y=1;Y<=67108863;Y*=O)$++;$--,Y=Y/O|0;for(var W=X.length-G,Z=W%$,K=Math.min(W,W-Z)+G,J=0,j=G;j1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},C.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},C.prototype.inspect=function(){return(this.red?""};var z=["","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"],T=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],q=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];C.prototype.toString=function(X,O){X=X||10,O=O|0||1;var G;if(X===16||X==="hex"){G="";for(var $=0,Y=0,W=0;W>>24-$&16777215,Y!==0||W!==this.length-1?G=z[6-K.length]+K+G:G=K+G,$+=2,$>=26&&($-=26,W--)}for(Y!==0&&(G=Y.toString(16)+G);G.length%O!==0;)G="0"+G;return this.negative!==0&&(G="-"+G),G}if(X===(X|0)&&X>=2&&X<=36){var J=T[X],j=q[X];G="";var A=this.clone();for(A.negative=0;!A.isZero();){var E=A.modn(j).toString(X);A=A.idivn(j),A.isZero()?G=E+G:G=z[J-E.length]+E+G}for(this.isZero()&&(G="0"+G);G.length%O!==0;)G="0"+G;return this.negative!==0&&(G="-"+G),G}Q(!1,"Base should be between 2 and 36")},C.prototype.toNumber=function(){var X=this.words[0];return this.length===2?X+=this.words[1]*67108864:this.length===3&&this.words[2]===1?X+=4503599627370496+this.words[1]*67108864:this.length>2&&Q(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-X:X},C.prototype.toJSON=function(){return this.toString(16)},C.prototype.toBuffer=function(X,O){return Q(typeof H<"u"),this.toArrayLike(H,X,O)},C.prototype.toArray=function(X,O){return this.toArrayLike(Array,X,O)},C.prototype.toArrayLike=function(X,O,G){var $=this.byteLength(),Y=G||Math.max(1,$);Q($<=Y,"byte array longer than desired length"),Q(Y>0,"Requested array length <= 0"),this.strip();var W=O==="le",Z=new X(Y),K,J,j=this.clone();if(W){for(J=0;!j.isZero();J++)K=j.andln(255),j.iushrn(8),Z[J]=K;for(;J=4096&&(G+=13,O>>>=13),O>=64&&(G+=7,O>>>=7),O>=8&&(G+=4,O>>>=4),O>=2&&(G+=2,O>>>=2),G+O},C.prototype._zeroBits=function(X){if(X===0)return 26;var O=X,G=0;return(O&8191)===0&&(G+=13,O>>>=13),(O&127)===0&&(G+=7,O>>>=7),(O&15)===0&&(G+=4,O>>>=4),(O&3)===0&&(G+=2,O>>>=2),(O&1)===0&&G++,G},C.prototype.bitLength=function(){var X=this.words[this.length-1],O=this._countBits(X);return(this.length-1)*26+O};function F(X){for(var O=new Array(X.bitLength()),G=0;G>>Y}return O}C.prototype.zeroBits=function(){if(this.isZero())return 0;for(var X=0,O=0;OX.length?this.clone().ior(X):X.clone().ior(this)},C.prototype.uor=function(X){return this.length>X.length?this.clone().iuor(X):X.clone().iuor(this)},C.prototype.iuand=function(X){var O;this.length>X.length?O=X:O=this;for(var G=0;GX.length?this.clone().iand(X):X.clone().iand(this)},C.prototype.uand=function(X){return this.length>X.length?this.clone().iuand(X):X.clone().iuand(this)},C.prototype.iuxor=function(X){var O,G;this.length>X.length?(O=this,G=X):(O=X,G=this);for(var $=0;$X.length?this.clone().ixor(X):X.clone().ixor(this)},C.prototype.uxor=function(X){return this.length>X.length?this.clone().iuxor(X):X.clone().iuxor(this)},C.prototype.inotn=function(X){Q(typeof X=="number"&&X>=0);var O=Math.ceil(X/26)|0,G=X%26;this._expand(O),G>0&&O--;for(var $=0;$0&&(this.words[$]=~this.words[$]&67108863>>26-G),this.strip()},C.prototype.notn=function(X){return this.clone().inotn(X)},C.prototype.setn=function(X,O){Q(typeof X=="number"&&X>=0);var G=X/26|0,$=X%26;return this._expand(G+1),O?this.words[G]=this.words[G]|1<<$:this.words[G]=this.words[G]&~(1<<$),this.strip()},C.prototype.iadd=function(X){var O;if(this.negative!==0&&X.negative===0)return this.negative=0,O=this.isub(X),this.negative^=1,this._normSign();if(this.negative===0&&X.negative!==0)return X.negative=0,O=this.isub(X),X.negative=1,O._normSign();var G,$;this.length>X.length?(G=this,$=X):(G=X,$=this);for(var Y=0,W=0;W<$.length;W++)O=(G.words[W]|0)+($.words[W]|0)+Y,this.words[W]=O&67108863,Y=O>>>26;for(;Y!==0&&W>>26;if(this.length=G.length,Y!==0)this.words[this.length]=Y,this.length++;else if(G!==this)for(;WX.length?this.clone().iadd(X):X.clone().iadd(this)},C.prototype.isub=function(X){if(X.negative!==0){X.negative=0;var O=this.iadd(X);return X.negative=1,O._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(X),this.negative=1,this._normSign();var G=this.cmp(X);if(G===0)return this.negative=0,this.length=1,this.words[0]=0,this;var $,Y;G>0?($=this,Y=X):($=X,Y=this);for(var W=0,Z=0;Z>26,this.words[Z]=O&67108863;for(;W!==0&&Z<$.length;Z++)O=($.words[Z]|0)+W,W=O>>26,this.words[Z]=O&67108863;if(W===0&&Z<$.length&&$!==this)for(;Z<$.length;Z++)this.words[Z]=$.words[Z];return this.length=Math.max(this.length,Z),$!==this&&(this.negative=1),this.strip()},C.prototype.sub=function(X){return this.clone().isub(X)};function I(X,O,G){G.negative=O.negative^X.negative;var $=X.length+O.length|0;G.length=$,$=$-1|0;var Y=X.words[0]|0,W=O.words[0]|0,Z=Y*W,K=Z&67108863,J=Z/67108864|0;G.words[0]=K;for(var j=1;j<$;j++){for(var A=J>>>26,E=J&67108863,_=Math.min(j,O.length-1),s=Math.max(0,j-X.length+1);s<=_;s++){var r=j-s|0;Y=X.words[r]|0,W=O.words[s]|0,Z=Y*W+E,A+=Z/67108864|0,E=Z&67108863}G.words[j]=E|0,J=A|0}return J!==0?G.words[j]=J|0:G.length--,G.strip()}var x=function(X,O,G){var $=X.words,Y=O.words,W=G.words,Z=0,K,J,j,A=$[0]|0,E=A&8191,_=A>>>13,s=$[1]|0,r=s&8191,O0=s>>>13,o=$[2]|0,d=o&8191,f=o>>>13,U0=$[3]|0,X0=U0&8191,Y0=U0>>>13,g=$[4]|0,S=g&8191,p=g>>>13,e=$[5]|0,J0=e&8191,t=e>>>13,y0=$[6]|0,C0=y0&8191,W0=y0>>>13,_0=$[7]|0,P0=_0&8191,Q0=_0>>>13,d0=$[8]|0,D=d0&8191,v=d0>>>13,b=$[9]|0,l=b&8191,u=b>>>13,F0=Y[0]|0,$0=F0&8191,z0=F0>>>13,b0=Y[1]|0,V0=b0&8191,H0=b0>>>13,g0=Y[2]|0,N0=g0&8191,L0=g0>>>13,K2=Y[3]|0,D0=K2&8191,T0=K2>>>13,l0=Y[4]|0,k0=l0&8191,B0=l0>>>13,j2=Y[5]|0,R0=j2&8191,q0=j2>>>13,W2=Y[6]|0,I0=W2&8191,E0=W2>>>13,Z2=Y[7]|0,x0=Z2&8191,S0=Z2>>>13,Q2=Y[8]|0,v0=Q2&8191,A0=Q2>>>13,z2=Y[9]|0,M0=z2&8191,w0=z2>>>13;G.negative=X.negative^O.negative,G.length=19,K=Math.imul(E,$0),J=Math.imul(E,z0),J=J+Math.imul(_,$0)|0,j=Math.imul(_,z0);var C2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(C2>>>26)|0,C2&=67108863,K=Math.imul(r,$0),J=Math.imul(r,z0),J=J+Math.imul(O0,$0)|0,j=Math.imul(O0,z0),K=K+Math.imul(E,V0)|0,J=J+Math.imul(E,H0)|0,J=J+Math.imul(_,V0)|0,j=j+Math.imul(_,H0)|0;var m0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(m0>>>26)|0,m0&=67108863,K=Math.imul(d,$0),J=Math.imul(d,z0),J=J+Math.imul(f,$0)|0,j=Math.imul(f,z0),K=K+Math.imul(r,V0)|0,J=J+Math.imul(r,H0)|0,J=J+Math.imul(O0,V0)|0,j=j+Math.imul(O0,H0)|0,K=K+Math.imul(E,N0)|0,J=J+Math.imul(E,L0)|0,J=J+Math.imul(_,N0)|0,j=j+Math.imul(_,L0)|0;var p0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(p0>>>26)|0,p0&=67108863,K=Math.imul(X0,$0),J=Math.imul(X0,z0),J=J+Math.imul(Y0,$0)|0,j=Math.imul(Y0,z0),K=K+Math.imul(d,V0)|0,J=J+Math.imul(d,H0)|0,J=J+Math.imul(f,V0)|0,j=j+Math.imul(f,H0)|0,K=K+Math.imul(r,N0)|0,J=J+Math.imul(r,L0)|0,J=J+Math.imul(O0,N0)|0,j=j+Math.imul(O0,L0)|0,K=K+Math.imul(E,D0)|0,J=J+Math.imul(E,T0)|0,J=J+Math.imul(_,D0)|0,j=j+Math.imul(_,T0)|0;var o0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(o0>>>26)|0,o0&=67108863,K=Math.imul(S,$0),J=Math.imul(S,z0),J=J+Math.imul(p,$0)|0,j=Math.imul(p,z0),K=K+Math.imul(X0,V0)|0,J=J+Math.imul(X0,H0)|0,J=J+Math.imul(Y0,V0)|0,j=j+Math.imul(Y0,H0)|0,K=K+Math.imul(d,N0)|0,J=J+Math.imul(d,L0)|0,J=J+Math.imul(f,N0)|0,j=j+Math.imul(f,L0)|0,K=K+Math.imul(r,D0)|0,J=J+Math.imul(r,T0)|0,J=J+Math.imul(O0,D0)|0,j=j+Math.imul(O0,T0)|0,K=K+Math.imul(E,k0)|0,J=J+Math.imul(E,B0)|0,J=J+Math.imul(_,k0)|0,j=j+Math.imul(_,B0)|0;var u0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(u0>>>26)|0,u0&=67108863,K=Math.imul(J0,$0),J=Math.imul(J0,z0),J=J+Math.imul(t,$0)|0,j=Math.imul(t,z0),K=K+Math.imul(S,V0)|0,J=J+Math.imul(S,H0)|0,J=J+Math.imul(p,V0)|0,j=j+Math.imul(p,H0)|0,K=K+Math.imul(X0,N0)|0,J=J+Math.imul(X0,L0)|0,J=J+Math.imul(Y0,N0)|0,j=j+Math.imul(Y0,L0)|0,K=K+Math.imul(d,D0)|0,J=J+Math.imul(d,T0)|0,J=J+Math.imul(f,D0)|0,j=j+Math.imul(f,T0)|0,K=K+Math.imul(r,k0)|0,J=J+Math.imul(r,B0)|0,J=J+Math.imul(O0,k0)|0,j=j+Math.imul(O0,B0)|0,K=K+Math.imul(E,R0)|0,J=J+Math.imul(E,q0)|0,J=J+Math.imul(_,R0)|0,j=j+Math.imul(_,q0)|0;var s0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(s0>>>26)|0,s0&=67108863,K=Math.imul(C0,$0),J=Math.imul(C0,z0),J=J+Math.imul(W0,$0)|0,j=Math.imul(W0,z0),K=K+Math.imul(J0,V0)|0,J=J+Math.imul(J0,H0)|0,J=J+Math.imul(t,V0)|0,j=j+Math.imul(t,H0)|0,K=K+Math.imul(S,N0)|0,J=J+Math.imul(S,L0)|0,J=J+Math.imul(p,N0)|0,j=j+Math.imul(p,L0)|0,K=K+Math.imul(X0,D0)|0,J=J+Math.imul(X0,T0)|0,J=J+Math.imul(Y0,D0)|0,j=j+Math.imul(Y0,T0)|0,K=K+Math.imul(d,k0)|0,J=J+Math.imul(d,B0)|0,J=J+Math.imul(f,k0)|0,j=j+Math.imul(f,B0)|0,K=K+Math.imul(r,R0)|0,J=J+Math.imul(r,q0)|0,J=J+Math.imul(O0,R0)|0,j=j+Math.imul(O0,q0)|0,K=K+Math.imul(E,I0)|0,J=J+Math.imul(E,E0)|0,J=J+Math.imul(_,I0)|0,j=j+Math.imul(_,E0)|0;var f0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(f0>>>26)|0,f0&=67108863,K=Math.imul(P0,$0),J=Math.imul(P0,z0),J=J+Math.imul(Q0,$0)|0,j=Math.imul(Q0,z0),K=K+Math.imul(C0,V0)|0,J=J+Math.imul(C0,H0)|0,J=J+Math.imul(W0,V0)|0,j=j+Math.imul(W0,H0)|0,K=K+Math.imul(J0,N0)|0,J=J+Math.imul(J0,L0)|0,J=J+Math.imul(t,N0)|0,j=j+Math.imul(t,L0)|0,K=K+Math.imul(S,D0)|0,J=J+Math.imul(S,T0)|0,J=J+Math.imul(p,D0)|0,j=j+Math.imul(p,T0)|0,K=K+Math.imul(X0,k0)|0,J=J+Math.imul(X0,B0)|0,J=J+Math.imul(Y0,k0)|0,j=j+Math.imul(Y0,B0)|0,K=K+Math.imul(d,R0)|0,J=J+Math.imul(d,q0)|0,J=J+Math.imul(f,R0)|0,j=j+Math.imul(f,q0)|0,K=K+Math.imul(r,I0)|0,J=J+Math.imul(r,E0)|0,J=J+Math.imul(O0,I0)|0,j=j+Math.imul(O0,E0)|0,K=K+Math.imul(E,x0)|0,J=J+Math.imul(E,S0)|0,J=J+Math.imul(_,x0)|0,j=j+Math.imul(_,S0)|0;var n0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(n0>>>26)|0,n0&=67108863,K=Math.imul(D,$0),J=Math.imul(D,z0),J=J+Math.imul(v,$0)|0,j=Math.imul(v,z0),K=K+Math.imul(P0,V0)|0,J=J+Math.imul(P0,H0)|0,J=J+Math.imul(Q0,V0)|0,j=j+Math.imul(Q0,H0)|0,K=K+Math.imul(C0,N0)|0,J=J+Math.imul(C0,L0)|0,J=J+Math.imul(W0,N0)|0,j=j+Math.imul(W0,L0)|0,K=K+Math.imul(J0,D0)|0,J=J+Math.imul(J0,T0)|0,J=J+Math.imul(t,D0)|0,j=j+Math.imul(t,T0)|0,K=K+Math.imul(S,k0)|0,J=J+Math.imul(S,B0)|0,J=J+Math.imul(p,k0)|0,j=j+Math.imul(p,B0)|0,K=K+Math.imul(X0,R0)|0,J=J+Math.imul(X0,q0)|0,J=J+Math.imul(Y0,R0)|0,j=j+Math.imul(Y0,q0)|0,K=K+Math.imul(d,I0)|0,J=J+Math.imul(d,E0)|0,J=J+Math.imul(f,I0)|0,j=j+Math.imul(f,E0)|0,K=K+Math.imul(r,x0)|0,J=J+Math.imul(r,S0)|0,J=J+Math.imul(O0,x0)|0,j=j+Math.imul(O0,S0)|0,K=K+Math.imul(E,v0)|0,J=J+Math.imul(E,A0)|0,J=J+Math.imul(_,v0)|0,j=j+Math.imul(_,A0)|0;var a0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(a0>>>26)|0,a0&=67108863,K=Math.imul(l,$0),J=Math.imul(l,z0),J=J+Math.imul(u,$0)|0,j=Math.imul(u,z0),K=K+Math.imul(D,V0)|0,J=J+Math.imul(D,H0)|0,J=J+Math.imul(v,V0)|0,j=j+Math.imul(v,H0)|0,K=K+Math.imul(P0,N0)|0,J=J+Math.imul(P0,L0)|0,J=J+Math.imul(Q0,N0)|0,j=j+Math.imul(Q0,L0)|0,K=K+Math.imul(C0,D0)|0,J=J+Math.imul(C0,T0)|0,J=J+Math.imul(W0,D0)|0,j=j+Math.imul(W0,T0)|0,K=K+Math.imul(J0,k0)|0,J=J+Math.imul(J0,B0)|0,J=J+Math.imul(t,k0)|0,j=j+Math.imul(t,B0)|0,K=K+Math.imul(S,R0)|0,J=J+Math.imul(S,q0)|0,J=J+Math.imul(p,R0)|0,j=j+Math.imul(p,q0)|0,K=K+Math.imul(X0,I0)|0,J=J+Math.imul(X0,E0)|0,J=J+Math.imul(Y0,I0)|0,j=j+Math.imul(Y0,E0)|0,K=K+Math.imul(d,x0)|0,J=J+Math.imul(d,S0)|0,J=J+Math.imul(f,x0)|0,j=j+Math.imul(f,S0)|0,K=K+Math.imul(r,v0)|0,J=J+Math.imul(r,A0)|0,J=J+Math.imul(O0,v0)|0,j=j+Math.imul(O0,A0)|0,K=K+Math.imul(E,M0)|0,J=J+Math.imul(E,w0)|0,J=J+Math.imul(_,M0)|0,j=j+Math.imul(_,w0)|0;var r0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(r0>>>26)|0,r0&=67108863,K=Math.imul(l,V0),J=Math.imul(l,H0),J=J+Math.imul(u,V0)|0,j=Math.imul(u,H0),K=K+Math.imul(D,N0)|0,J=J+Math.imul(D,L0)|0,J=J+Math.imul(v,N0)|0,j=j+Math.imul(v,L0)|0,K=K+Math.imul(P0,D0)|0,J=J+Math.imul(P0,T0)|0,J=J+Math.imul(Q0,D0)|0,j=j+Math.imul(Q0,T0)|0,K=K+Math.imul(C0,k0)|0,J=J+Math.imul(C0,B0)|0,J=J+Math.imul(W0,k0)|0,j=j+Math.imul(W0,B0)|0,K=K+Math.imul(J0,R0)|0,J=J+Math.imul(J0,q0)|0,J=J+Math.imul(t,R0)|0,j=j+Math.imul(t,q0)|0,K=K+Math.imul(S,I0)|0,J=J+Math.imul(S,E0)|0,J=J+Math.imul(p,I0)|0,j=j+Math.imul(p,E0)|0,K=K+Math.imul(X0,x0)|0,J=J+Math.imul(X0,S0)|0,J=J+Math.imul(Y0,x0)|0,j=j+Math.imul(Y0,S0)|0,K=K+Math.imul(d,v0)|0,J=J+Math.imul(d,A0)|0,J=J+Math.imul(f,v0)|0,j=j+Math.imul(f,A0)|0,K=K+Math.imul(r,M0)|0,J=J+Math.imul(r,w0)|0,J=J+Math.imul(O0,M0)|0,j=j+Math.imul(O0,w0)|0;var i0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(i0>>>26)|0,i0&=67108863,K=Math.imul(l,N0),J=Math.imul(l,L0),J=J+Math.imul(u,N0)|0,j=Math.imul(u,L0),K=K+Math.imul(D,D0)|0,J=J+Math.imul(D,T0)|0,J=J+Math.imul(v,D0)|0,j=j+Math.imul(v,T0)|0,K=K+Math.imul(P0,k0)|0,J=J+Math.imul(P0,B0)|0,J=J+Math.imul(Q0,k0)|0,j=j+Math.imul(Q0,B0)|0,K=K+Math.imul(C0,R0)|0,J=J+Math.imul(C0,q0)|0,J=J+Math.imul(W0,R0)|0,j=j+Math.imul(W0,q0)|0,K=K+Math.imul(J0,I0)|0,J=J+Math.imul(J0,E0)|0,J=J+Math.imul(t,I0)|0,j=j+Math.imul(t,E0)|0,K=K+Math.imul(S,x0)|0,J=J+Math.imul(S,S0)|0,J=J+Math.imul(p,x0)|0,j=j+Math.imul(p,S0)|0,K=K+Math.imul(X0,v0)|0,J=J+Math.imul(X0,A0)|0,J=J+Math.imul(Y0,v0)|0,j=j+Math.imul(Y0,A0)|0,K=K+Math.imul(d,M0)|0,J=J+Math.imul(d,w0)|0,J=J+Math.imul(f,M0)|0,j=j+Math.imul(f,w0)|0;var t0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(t0>>>26)|0,t0&=67108863,K=Math.imul(l,D0),J=Math.imul(l,T0),J=J+Math.imul(u,D0)|0,j=Math.imul(u,T0),K=K+Math.imul(D,k0)|0,J=J+Math.imul(D,B0)|0,J=J+Math.imul(v,k0)|0,j=j+Math.imul(v,B0)|0,K=K+Math.imul(P0,R0)|0,J=J+Math.imul(P0,q0)|0,J=J+Math.imul(Q0,R0)|0,j=j+Math.imul(Q0,q0)|0,K=K+Math.imul(C0,I0)|0,J=J+Math.imul(C0,E0)|0,J=J+Math.imul(W0,I0)|0,j=j+Math.imul(W0,E0)|0,K=K+Math.imul(J0,x0)|0,J=J+Math.imul(J0,S0)|0,J=J+Math.imul(t,x0)|0,j=j+Math.imul(t,S0)|0,K=K+Math.imul(S,v0)|0,J=J+Math.imul(S,A0)|0,J=J+Math.imul(p,v0)|0,j=j+Math.imul(p,A0)|0,K=K+Math.imul(X0,M0)|0,J=J+Math.imul(X0,w0)|0,J=J+Math.imul(Y0,M0)|0,j=j+Math.imul(Y0,w0)|0;var e0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(e0>>>26)|0,e0&=67108863,K=Math.imul(l,k0),J=Math.imul(l,B0),J=J+Math.imul(u,k0)|0,j=Math.imul(u,B0),K=K+Math.imul(D,R0)|0,J=J+Math.imul(D,q0)|0,J=J+Math.imul(v,R0)|0,j=j+Math.imul(v,q0)|0,K=K+Math.imul(P0,I0)|0,J=J+Math.imul(P0,E0)|0,J=J+Math.imul(Q0,I0)|0,j=j+Math.imul(Q0,E0)|0,K=K+Math.imul(C0,x0)|0,J=J+Math.imul(C0,S0)|0,J=J+Math.imul(W0,x0)|0,j=j+Math.imul(W0,S0)|0,K=K+Math.imul(J0,v0)|0,J=J+Math.imul(J0,A0)|0,J=J+Math.imul(t,v0)|0,j=j+Math.imul(t,A0)|0,K=K+Math.imul(S,M0)|0,J=J+Math.imul(S,w0)|0,J=J+Math.imul(p,M0)|0,j=j+Math.imul(p,w0)|0;var X2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(X2>>>26)|0,X2&=67108863,K=Math.imul(l,R0),J=Math.imul(l,q0),J=J+Math.imul(u,R0)|0,j=Math.imul(u,q0),K=K+Math.imul(D,I0)|0,J=J+Math.imul(D,E0)|0,J=J+Math.imul(v,I0)|0,j=j+Math.imul(v,E0)|0,K=K+Math.imul(P0,x0)|0,J=J+Math.imul(P0,S0)|0,J=J+Math.imul(Q0,x0)|0,j=j+Math.imul(Q0,S0)|0,K=K+Math.imul(C0,v0)|0,J=J+Math.imul(C0,A0)|0,J=J+Math.imul(W0,v0)|0,j=j+Math.imul(W0,A0)|0,K=K+Math.imul(J0,M0)|0,J=J+Math.imul(J0,w0)|0,J=J+Math.imul(t,M0)|0,j=j+Math.imul(t,w0)|0;var J2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(J2>>>26)|0,J2&=67108863,K=Math.imul(l,I0),J=Math.imul(l,E0),J=J+Math.imul(u,I0)|0,j=Math.imul(u,E0),K=K+Math.imul(D,x0)|0,J=J+Math.imul(D,S0)|0,J=J+Math.imul(v,x0)|0,j=j+Math.imul(v,S0)|0,K=K+Math.imul(P0,v0)|0,J=J+Math.imul(P0,A0)|0,J=J+Math.imul(Q0,v0)|0,j=j+Math.imul(Q0,A0)|0,K=K+Math.imul(C0,M0)|0,J=J+Math.imul(C0,w0)|0,J=J+Math.imul(W0,M0)|0,j=j+Math.imul(W0,w0)|0;var O2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(O2>>>26)|0,O2&=67108863,K=Math.imul(l,x0),J=Math.imul(l,S0),J=J+Math.imul(u,x0)|0,j=Math.imul(u,S0),K=K+Math.imul(D,v0)|0,J=J+Math.imul(D,A0)|0,J=J+Math.imul(v,v0)|0,j=j+Math.imul(v,A0)|0,K=K+Math.imul(P0,M0)|0,J=J+Math.imul(P0,w0)|0,J=J+Math.imul(Q0,M0)|0,j=j+Math.imul(Q0,w0)|0;var $2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+($2>>>26)|0,$2&=67108863,K=Math.imul(l,v0),J=Math.imul(l,A0),J=J+Math.imul(u,v0)|0,j=Math.imul(u,A0),K=K+Math.imul(D,M0)|0,J=J+Math.imul(D,w0)|0,J=J+Math.imul(v,M0)|0,j=j+Math.imul(v,w0)|0;var G2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(G2>>>26)|0,G2&=67108863,K=Math.imul(l,M0),J=Math.imul(l,w0),J=J+Math.imul(u,M0)|0,j=Math.imul(u,w0);var Y2=(Z+K|0)+((J&8191)<<13)|0;return Z=(j+(J>>>13)|0)+(Y2>>>26)|0,Y2&=67108863,W[0]=C2,W[1]=m0,W[2]=p0,W[3]=o0,W[4]=u0,W[5]=s0,W[6]=f0,W[7]=n0,W[8]=a0,W[9]=r0,W[10]=i0,W[11]=t0,W[12]=e0,W[13]=X2,W[14]=J2,W[15]=O2,W[16]=$2,W[17]=G2,W[18]=Y2,Z!==0&&(W[19]=Z,G.length++),G};Math.imul||(x=I);function w(X,O,G){G.negative=O.negative^X.negative,G.length=X.length+O.length;for(var $=0,Y=0,W=0;W>>26)|0,Y+=Z>>>26,Z&=67108863}G.words[W]=K,$=Z,Z=Y}return $!==0?G.words[W]=$:G.length--,G.strip()}function M(X,O,G){var $=new y;return $.mulp(X,O,G)}C.prototype.mulTo=function(X,O){var G,$=this.length+X.length;return this.length===10&&X.length===10?G=x(this,X,O):$<63?G=I(this,X,O):$<1024?G=w(this,X,O):G=M(this,X,O),G};function y(X,O){this.x=X,this.y=O}y.prototype.makeRBT=function(X){for(var O=new Array(X),G=C.prototype._countBits(X)-1,$=0;$>=1;return $},y.prototype.permute=function(X,O,G,$,Y,W){for(var Z=0;Z>>1)Y++;return 1<>>13,G[2*W+1]=Y&8191,Y=Y>>>13;for(W=2*O;W<$;++W)G[W]=0;Q(Y===0),Q((Y&-8192)===0)},y.prototype.stub=function(X){for(var O=new Array(X),G=0;G>=26,O+=$/67108864|0,O+=Y>>>26,this.words[G]=Y&67108863}return O!==0&&(this.words[G]=O,this.length++),this},C.prototype.muln=function(X){return this.clone().imuln(X)},C.prototype.sqr=function(){return this.mul(this)},C.prototype.isqr=function(){return this.imul(this.clone())},C.prototype.pow=function(X){var O=F(X);if(O.length===0)return new C(1);for(var G=this,$=0;$=0);var O=X%26,G=(X-O)/26,$=67108863>>>26-O<<26-O,Y;if(O!==0){var W=0;for(Y=0;Y>>26-O}W&&(this.words[Y]=W,this.length++)}if(G!==0){for(Y=this.length-1;Y>=0;Y--)this.words[Y+G]=this.words[Y];for(Y=0;Y=0);var $;O?$=(O-O%26)/26:$=0;var Y=X%26,W=Math.min((X-Y)/26,this.length),Z=67108863^67108863>>>Y<W)for(this.length-=W,J=0;J=0&&(j!==0||J>=$);J--){var A=this.words[J]|0;this.words[J]=j<<26-Y|A>>>Y,j=A&Z}return K&&j!==0&&(K.words[K.length++]=j),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},C.prototype.ishrn=function(X,O,G){return Q(this.negative===0),this.iushrn(X,O,G)},C.prototype.shln=function(X){return this.clone().ishln(X)},C.prototype.ushln=function(X){return this.clone().iushln(X)},C.prototype.shrn=function(X){return this.clone().ishrn(X)},C.prototype.ushrn=function(X){return this.clone().iushrn(X)},C.prototype.testn=function(X){Q(typeof X=="number"&&X>=0);var O=X%26,G=(X-O)/26,$=1<=0);var O=X%26,G=(X-O)/26;if(Q(this.negative===0,"imaskn works only with positive numbers"),this.length<=G)return this;if(O!==0&&G++,this.length=Math.min(G,this.length),O!==0){var $=67108863^67108863>>>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},C.prototype.isubn=function(X){if(Q(typeof X=="number"),Q(X<67108864),X<0)return this.iaddn(-X);if(this.negative!==0)return this.negative=0,this.iaddn(X),this.negative=1,this;if(this.words[0]-=X,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var O=0;O>26)-(K/67108864|0),this.words[Y+G]=W&67108863}for(;Y>26,this.words[Y+G]=W&67108863;if(Z===0)return this.strip();for(Q(Z===-1),Z=0,Y=0;Y>26,this.words[Y]=W&67108863;return this.negative=1,this.strip()},C.prototype._wordDiv=function(X,O){var G=this.length-X.length,$=this.clone(),Y=X,W=Y.words[Y.length-1]|0,Z=this._countBits(W);G=26-Z,G!==0&&(Y=Y.ushln(G),$.iushln(G),W=Y.words[Y.length-1]|0);var K=$.length-Y.length,J;if(O!=="mod"){J=new C(null),J.length=K+1,J.words=new Array(J.length);for(var j=0;j=0;E--){var _=($.words[Y.length+E]|0)*67108864+($.words[Y.length+E-1]|0);for(_=Math.min(_/W|0,67108863),$._ishlnsubmul(Y,_,E);$.negative!==0;)_--,$.negative=0,$._ishlnsubmul(Y,1,E),$.isZero()||($.negative^=1);J&&(J.words[E]=_)}return J&&J.strip(),$.strip(),O!=="div"&&G!==0&&$.iushrn(G),{div:J||null,mod:$}},C.prototype.divmod=function(X,O,G){if(Q(!X.isZero()),this.isZero())return{div:new C(0),mod:new C(0)};var $,Y,W;return this.negative!==0&&X.negative===0?(W=this.neg().divmod(X,O),O!=="mod"&&($=W.div.neg()),O!=="div"&&(Y=W.mod.neg(),G&&Y.negative!==0&&Y.iadd(X)),{div:$,mod:Y}):this.negative===0&&X.negative!==0?(W=this.divmod(X.neg(),O),O!=="mod"&&($=W.div.neg()),{div:$,mod:W.mod}):(this.negative&X.negative)!==0?(W=this.neg().divmod(X.neg(),O),O!=="div"&&(Y=W.mod.neg(),G&&Y.negative!==0&&Y.isub(X)),{div:W.div,mod:Y}):X.length>this.length||this.cmp(X)<0?{div:new C(0),mod:this}:X.length===1?O==="div"?{div:this.divn(X.words[0]),mod:null}:O==="mod"?{div:null,mod:new C(this.modn(X.words[0]))}:{div:this.divn(X.words[0]),mod:new C(this.modn(X.words[0]))}:this._wordDiv(X,O)},C.prototype.div=function(X){return this.divmod(X,"div",!1).div},C.prototype.mod=function(X){return this.divmod(X,"mod",!1).mod},C.prototype.umod=function(X){return this.divmod(X,"mod",!0).mod},C.prototype.divRound=function(X){var O=this.divmod(X);if(O.mod.isZero())return O.div;var G=O.div.negative!==0?O.mod.isub(X):O.mod,$=X.ushrn(1),Y=X.andln(1),W=G.cmp($);return W<0||Y===1&&W===0?O.div:O.div.negative!==0?O.div.isubn(1):O.div.iaddn(1)},C.prototype.modn=function(X){Q(X<=67108863);for(var O=67108864%X,G=0,$=this.length-1;$>=0;$--)G=(O*G+(this.words[$]|0))%X;return G},C.prototype.idivn=function(X){Q(X<=67108863);for(var O=0,G=this.length-1;G>=0;G--){var $=(this.words[G]|0)+O*67108864;this.words[G]=$/X|0,O=$%X}return this.strip()},C.prototype.divn=function(X){return this.clone().idivn(X)},C.prototype.egcd=function(X){Q(X.negative===0),Q(!X.isZero());var O=this,G=X.clone();O.negative!==0?O=O.umod(X):O=O.clone();for(var $=new C(1),Y=new C(0),W=new C(0),Z=new C(1),K=0;O.isEven()&&G.isEven();)O.iushrn(1),G.iushrn(1),++K;for(var J=G.clone(),j=O.clone();!O.isZero();){for(var A=0,E=1;(O.words[0]&E)===0&&A<26;++A,E<<=1);if(A>0)for(O.iushrn(A);A-- >0;)($.isOdd()||Y.isOdd())&&($.iadd(J),Y.isub(j)),$.iushrn(1),Y.iushrn(1);for(var _=0,s=1;(G.words[0]&s)===0&&_<26;++_,s<<=1);if(_>0)for(G.iushrn(_);_-- >0;)(W.isOdd()||Z.isOdd())&&(W.iadd(J),Z.isub(j)),W.iushrn(1),Z.iushrn(1);O.cmp(G)>=0?(O.isub(G),$.isub(W),Y.isub(Z)):(G.isub(O),W.isub($),Z.isub(Y))}return{a:W,b:Z,gcd:G.iushln(K)}},C.prototype._invmp=function(X){Q(X.negative===0),Q(!X.isZero());var O=this,G=X.clone();O.negative!==0?O=O.umod(X):O=O.clone();for(var $=new C(1),Y=new C(0),W=G.clone();O.cmpn(1)>0&&G.cmpn(1)>0;){for(var Z=0,K=1;(O.words[0]&K)===0&&Z<26;++Z,K<<=1);if(Z>0)for(O.iushrn(Z);Z-- >0;)$.isOdd()&&$.iadd(W),$.iushrn(1);for(var J=0,j=1;(G.words[0]&j)===0&&J<26;++J,j<<=1);if(J>0)for(G.iushrn(J);J-- >0;)Y.isOdd()&&Y.iadd(W),Y.iushrn(1);O.cmp(G)>=0?(O.isub(G),$.isub(Y)):(G.isub(O),Y.isub($))}var A;return O.cmpn(1)===0?A=$:A=Y,A.cmpn(0)<0&&A.iadd(X),A},C.prototype.gcd=function(X){if(this.isZero())return X.abs();if(X.isZero())return this.abs();var O=this.clone(),G=X.clone();O.negative=0,G.negative=0;for(var $=0;O.isEven()&&G.isEven();$++)O.iushrn(1),G.iushrn(1);do{for(;O.isEven();)O.iushrn(1);for(;G.isEven();)G.iushrn(1);var Y=O.cmp(G);if(Y<0){var W=O;O=G,G=W}else if(Y===0||G.cmpn(1)===0)break;O.isub(G)}while(!0);return G.iushln($)},C.prototype.invm=function(X){return this.egcd(X).a.umod(X)},C.prototype.isEven=function(){return(this.words[0]&1)===0},C.prototype.isOdd=function(){return(this.words[0]&1)===1},C.prototype.andln=function(X){return this.words[0]&X},C.prototype.bincn=function(X){Q(typeof X=="number");var O=X%26,G=(X-O)/26,$=1<>>26,Z&=67108863,this.words[W]=Z}return Y!==0&&(this.words[W]=Y,this.length++),this},C.prototype.isZero=function(){return this.length===1&&this.words[0]===0},C.prototype.cmpn=function(X){var O=X<0;if(this.negative!==0&&!O)return-1;if(this.negative===0&&O)return 1;this.strip();var G;if(this.length>1)G=1;else{O&&(X=-X),Q(X<=67108863,"Number is too big");var $=this.words[0]|0;G=$===X?0:$X.length)return 1;if(this.length=0;G--){var $=this.words[G]|0,Y=X.words[G]|0;if($!==Y){$Y&&(O=1);break}}return O},C.prototype.gtn=function(X){return this.cmpn(X)===1},C.prototype.gt=function(X){return this.cmp(X)===1},C.prototype.gten=function(X){return this.cmpn(X)>=0},C.prototype.gte=function(X){return this.cmp(X)>=0},C.prototype.ltn=function(X){return this.cmpn(X)===-1},C.prototype.lt=function(X){return this.cmp(X)===-1},C.prototype.lten=function(X){return this.cmpn(X)<=0},C.prototype.lte=function(X){return this.cmp(X)<=0},C.prototype.eqn=function(X){return this.cmpn(X)===0},C.prototype.eq=function(X){return this.cmp(X)===0},C.red=function(X){return new n(X)},C.prototype.toRed=function(X){return Q(!this.red,"Already a number in reduction context"),Q(this.negative===0,"red works only with positives"),X.convertTo(this)._forceRed(X)},C.prototype.fromRed=function(){return Q(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},C.prototype._forceRed=function(X){return this.red=X,this},C.prototype.forceRed=function(X){return Q(!this.red,"Already a number in reduction context"),this._forceRed(X)},C.prototype.redAdd=function(X){return Q(this.red,"redAdd works only with red numbers"),this.red.add(this,X)},C.prototype.redIAdd=function(X){return Q(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,X)},C.prototype.redSub=function(X){return Q(this.red,"redSub works only with red numbers"),this.red.sub(this,X)},C.prototype.redISub=function(X){return Q(this.red,"redISub works only with red numbers"),this.red.isub(this,X)},C.prototype.redShl=function(X){return Q(this.red,"redShl works only with red numbers"),this.red.shl(this,X)},C.prototype.redMul=function(X){return Q(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.mul(this,X)},C.prototype.redIMul=function(X){return Q(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.imul(this,X)},C.prototype.redSqr=function(){return Q(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},C.prototype.redISqr=function(){return Q(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},C.prototype.redSqrt=function(){return Q(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},C.prototype.redInvm=function(){return Q(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},C.prototype.redNeg=function(){return Q(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},C.prototype.redPow=function(X){return Q(this.red&&!X.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,X)};var m={k256:null,p224:null,p192:null,p25519:null};function c(X,O){this.name=X,this.p=new C(O,16),this.n=this.p.bitLength(),this.k=new C(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}c.prototype._tmp=function(){var X=new C(null);return X.words=new Array(Math.ceil(this.n/13)),X},c.prototype.ireduce=function(X){var O=X,G;do this.split(O,this.tmp),O=this.imulK(O),O=O.iadd(this.tmp),G=O.bitLength();while(G>this.n);var $=G0?O.isub(this.p):O.strip!==void 0?O.strip():O._strip(),O},c.prototype.split=function(X,O){X.iushrn(this.n,0,O)},c.prototype.imulK=function(X){return X.imul(this.k)};function h(){c.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}R(h,c),h.prototype.split=function(X,O){for(var G=4194303,$=Math.min(X.length,9),Y=0;Y<$;Y++)O.words[Y]=X.words[Y];if(O.length=$,X.length<=9){X.words[0]=0,X.length=1;return}var W=X.words[9];for(O.words[O.length++]=W&G,Y=10;Y>>22,W=Z}W>>>=22,X.words[Y-10]=W,W===0&&X.length>10?X.length-=10:X.length-=9},h.prototype.imulK=function(X){X.words[X.length]=0,X.words[X.length+1]=0,X.length+=2;for(var O=0,G=0;G>>=26,X.words[G]=Y,O=$}return O!==0&&(X.words[X.length++]=O),X},C._prime=function(X){if(m[X])return m[X];var O;if(X==="k256")O=new h;else if(X==="p224")O=new a;else if(X==="p192")O=new i;else if(X==="p25519")O=new G0;else throw new Error("Unknown prime "+X);return m[X]=O,O};function n(X){if(typeof X=="string"){var O=C._prime(X);this.m=O.p,this.prime=O}else Q(X.gtn(1),"modulus must be greater than 1"),this.m=X,this.prime=null}n.prototype._verify1=function(X){Q(X.negative===0,"red works only with positives"),Q(X.red,"red works only with red numbers")},n.prototype._verify2=function(X,O){Q((X.negative|O.negative)===0,"red works only with positives"),Q(X.red&&X.red===O.red,"red works only with red numbers")},n.prototype.imod=function(X){return this.prime?this.prime.ireduce(X)._forceRed(this):X.umod(this.m)._forceRed(this)},n.prototype.neg=function(X){return X.isZero()?X.clone():this.m.sub(X)._forceRed(this)},n.prototype.add=function(X,O){this._verify2(X,O);var G=X.add(O);return G.cmp(this.m)>=0&&G.isub(this.m),G._forceRed(this)},n.prototype.iadd=function(X,O){this._verify2(X,O);var G=X.iadd(O);return G.cmp(this.m)>=0&&G.isub(this.m),G},n.prototype.sub=function(X,O){this._verify2(X,O);var G=X.sub(O);return G.cmpn(0)<0&&G.iadd(this.m),G._forceRed(this)},n.prototype.isub=function(X,O){this._verify2(X,O);var G=X.isub(O);return G.cmpn(0)<0&&G.iadd(this.m),G},n.prototype.shl=function(X,O){return this._verify1(X),this.imod(X.ushln(O))},n.prototype.imul=function(X,O){return this._verify2(X,O),this.imod(X.imul(O))},n.prototype.mul=function(X,O){return this._verify2(X,O),this.imod(X.mul(O))},n.prototype.isqr=function(X){return this.imul(X,X.clone())},n.prototype.sqr=function(X){return this.mul(X,X)},n.prototype.sqrt=function(X){if(X.isZero())return X.clone();var O=this.m.andln(3);if(Q(O%2===1),O===3){var G=this.m.add(new C(1)).iushrn(2);return this.pow(X,G)}for(var $=this.m.subn(1),Y=0;!$.isZero()&&$.andln(1)===0;)Y++,$.iushrn(1);Q(!$.isZero());var W=new C(1).toRed(this),Z=W.redNeg(),K=this.m.subn(1).iushrn(1),J=this.m.bitLength();for(J=new C(2*J*J).toRed(this);this.pow(J,K).cmp(Z)!==0;)J.redIAdd(Z);for(var j=this.pow(J,$),A=this.pow(X,$.addn(1).iushrn(1)),E=this.pow(X,$),_=Y;E.cmp(W)!==0;){for(var s=E,r=0;s.cmp(W)!==0;r++)s=s.redSqr();Q(r<_);var O0=this.pow(j,new C(1).iushln(_-r-1));A=A.redMul(O0),j=O0.redSqr(),E=E.redMul(j),_=r}return A},n.prototype.invm=function(X){var O=X._invmp(this.m);return O.negative!==0?(O.negative=0,this.imod(O).redNeg()):this.imod(O)},n.prototype.pow=function(X,O){if(O.isZero())return new C(1).toRed(this);if(O.cmpn(1)===0)return X.clone();var G=4,$=new Array(1<=0;Y--){for(var j=O.words[Y],A=J-1;A>=0;A--){var E=j>>A&1;if(W!==$[0]&&(W=this.sqr(W)),E===0&&Z===0){K=0;continue}Z<<=1,Z|=E,K++,!(K!==G&&(Y!==0||A!==0))&&(W=this.mul(W,$[Z]),K=0,Z=0)}J=26}return W},n.prototype.convertTo=function(X){var O=X.umod(this.m);return O===X?O.clone():O},n.prototype.convertFrom=function(X){var O=X.clone();return O.red=null,O},C.mont=function(X){return new Z0(X)};function Z0(X){n.call(this,X),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new C(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}R(Z0,n),Z0.prototype.convertTo=function(X){return this.imod(X.ushln(this.shift))},Z0.prototype.convertFrom=function(X){var O=this.imod(X.mul(this.rinv));return O.red=null,O},Z0.prototype.imul=function(X,O){if(X.isZero()||O.isZero())return X.words[0]=0,X.length=1,X;var G=X.imul(O),$=G.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Y=G.isub($).iushrn(this.shift),W=Y;return Y.cmp(this.m)>=0?W=Y.isub(this.m):Y.cmpn(0)<0&&(W=Y.iadd(this.m)),W._forceRed(this)},Z0.prototype.mul=function(X,O){if(X.isZero()||O.isZero())return new C(0)._forceRed(this);var G=X.mul(O),$=G.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Y=G.isub($).iushrn(this.shift),W=Y;return Y.cmp(this.m)>=0?W=Y.isub(this.m):Y.cmpn(0)<0&&(W=Y.iadd(this.m)),W._forceRed(this)},Z0.prototype.invm=function(X){var O=this.imod(X._invmp(this.m).mul(this.r2));return O._forceRed(this)}})(typeof k>"u"||k,B)}),i1=K0((B,k)=>{var V=P2(),N=V.Buffer,Q={},R;for(R in V)!V.hasOwnProperty(R)||R==="SlowBuffer"||R==="Buffer"||(Q[R]=V[R]);var C=Q.Buffer={};for(R in N)!N.hasOwnProperty(R)||R==="allocUnsafe"||R==="allocUnsafeSlow"||(C[R]=N[R]);if(Q.Buffer.prototype=N.prototype,(!C.from||C.from===Uint8Array.from)&&(C.from=function(H,L,P){if(typeof H=="number")throw new TypeError('The "value" argument must not be of type number. Received type '+typeof H);if(H&&typeof H.length>"u")throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof H);return N(H,L,P)}),C.alloc||(C.alloc=function(H,L,P){if(typeof H!="number")throw new TypeError('The "size" argument must be of type number. Received type '+typeof H);if(H<0||H>=2147483648)throw new RangeError('The value "'+H+'" is invalid for option "size"');var U=N(H);return!L||L.length===0?U.fill(0):typeof P=="string"?U.fill(L,P):U.fill(L),U}),!Q.kStringMaxLength)try{Q.kStringMaxLength=process.binding("buffer").kStringMaxLength}catch{}Q.constants||(Q.constants={MAX_LENGTH:Q.kMaxLength},Q.kStringMaxLength&&(Q.constants.MAX_STRING_LENGTH=Q.kStringMaxLength)),k.exports=Q}),t1=K0((B)=>{var k=c0();function V(Q){this._reporterState={obj:null,path:[],options:Q||{},errors:[]}}B.Reporter=V,V.prototype.isError=function(Q){return Q instanceof N},V.prototype.save=function(){let Q=this._reporterState;return{obj:Q.obj,pathLen:Q.path.length}},V.prototype.restore=function(Q){let R=this._reporterState;R.obj=Q.obj,R.path=R.path.slice(0,Q.pathLen)},V.prototype.enterKey=function(Q){return this._reporterState.path.push(Q)},V.prototype.exitKey=function(Q){let R=this._reporterState;R.path=R.path.slice(0,Q-1)},V.prototype.leaveKey=function(Q,R,C){let H=this._reporterState;this.exitKey(Q),H.obj!==null&&(H.obj[R]=C)},V.prototype.path=function(){return this._reporterState.path.join("/")},V.prototype.enterObject=function(){let Q=this._reporterState,R=Q.obj;return Q.obj={},R},V.prototype.leaveObject=function(Q){let R=this._reporterState,C=R.obj;return R.obj=Q,C},V.prototype.error=function(Q){let R,C=this._reporterState,H=Q instanceof N;if(H?R=Q:R=new N(C.path.map(function(L){return"["+JSON.stringify(L)+"]"}).join(""),Q.message||Q,Q.stack),!C.options.partial)throw R;return H||C.errors.push(R),R},V.prototype.wrapResult=function(Q){let R=this._reporterState;return R.options.partial?{result:this.isError(Q)?null:Q,errors:R.errors}:Q};function N(Q,R){this.path=Q,this.rethrow(R)}k(N,Error),N.prototype.rethrow=function(Q){if(this.message=Q+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,N),!this.stack)try{throw new Error(this.message)}catch(R){this.stack=R.stack}return this}}),f2=K0((B)=>{var k=c0(),V=t1().Reporter,N=i1().Buffer;function Q(C,H){if(V.call(this,H),!N.isBuffer(C)){this.error("Input not Buffer");return}this.base=C,this.offset=0,this.length=C.length}k(Q,V),B.DecoderBuffer=Q,Q.isDecoderBuffer=function(C){return C instanceof Q?!0:typeof C=="object"&&N.isBuffer(C.base)&&C.constructor.name==="DecoderBuffer"&&typeof C.offset=="number"&&typeof C.length=="number"&&typeof C.save=="function"&&typeof C.restore=="function"&&typeof C.isEmpty=="function"&&typeof C.readUInt8=="function"&&typeof C.skip=="function"&&typeof C.raw=="function"},Q.prototype.save=function(){return{offset:this.offset,reporter:V.prototype.save.call(this)}},Q.prototype.restore=function(C){let H=new Q(this.base);return H.offset=C.offset,H.length=this.offset,this.offset=C.offset,V.prototype.restore.call(this,C.reporter),H},Q.prototype.isEmpty=function(){return this.offset===this.length},Q.prototype.readUInt8=function(C){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(C||"DecoderBuffer overrun")},Q.prototype.skip=function(C,H){if(!(this.offset+C<=this.length))return this.error(H||"DecoderBuffer overrun");let L=new Q(this.base);return L._reporterState=this._reporterState,L.offset=this.offset,L.length=this.offset+C,this.offset+=C,L},Q.prototype.raw=function(C){return this.base.slice(C?C.offset:this.offset,this.length)};function R(C,H){if(Array.isArray(C))this.length=0,this.value=C.map(function(L){return R.isEncoderBuffer(L)||(L=new R(L,H)),this.length+=L.length,L},this);else if(typeof C=="number"){if(!(0<=C&&C<=255))return H.error("non-byte EncoderBuffer value");this.value=C,this.length=1}else if(typeof C=="string")this.value=C,this.length=N.byteLength(C);else if(N.isBuffer(C))this.value=C,this.length=C.length;else return H.error("Unsupported type: "+typeof C)}B.EncoderBuffer=R,R.isEncoderBuffer=function(C){return C instanceof R?!0:typeof C=="object"&&C.constructor.name==="EncoderBuffer"&&typeof C.length=="number"&&typeof C.join=="function"},R.prototype.join=function(C,H){return C||(C=N.alloc(this.length)),H||(H=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(L){L.join(C,H),H+=L.length}):(typeof this.value=="number"?C[H]=this.value:typeof this.value=="string"?C.write(this.value,H):N.isBuffer(this.value)&&this.value.copy(C,H),H+=this.length)),C}}),e1=K0((B,k)=>{var V=t1().Reporter,N=f2().EncoderBuffer,Q=f2().DecoderBuffer,R=D2(),C=["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"],H=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(C),L=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function P(z,T,q){let F={};this._baseState=F,F.name=q,F.enc=z,F.parent=T||null,F.children=null,F.tag=null,F.args=null,F.reverseArgs=null,F.choice=null,F.optional=!1,F.any=!1,F.obj=!1,F.use=null,F.useDecoder=null,F.key=null,F.default=null,F.explicit=null,F.implicit=null,F.contains=null,F.parent||(F.children=[],this._wrap())}k.exports=P;var U=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];P.prototype.clone=function(){let z=this._baseState,T={};U.forEach(function(F){T[F]=z[F]});let q=new this.constructor(T.parent);return q._baseState=T,q},P.prototype._wrap=function(){let z=this._baseState;H.forEach(function(T){this[T]=function(){let q=new this.constructor(this);return z.children.push(q),q[T].apply(q,arguments)}},this)},P.prototype._init=function(z){let T=this._baseState;R(T.parent===null),z.call(this),T.children=T.children.filter(function(q){return q._baseState.parent===this},this),R.equal(T.children.length,1,"Root node can have only one child")},P.prototype._useArgs=function(z){let T=this._baseState,q=z.filter(function(F){return F instanceof this.constructor},this);z=z.filter(function(F){return!(F instanceof this.constructor)},this),q.length!==0&&(R(T.children===null),T.children=q,q.forEach(function(F){F._baseState.parent=this},this)),z.length!==0&&(R(T.args===null),T.args=z,T.reverseArgs=z.map(function(F){if(typeof F!="object"||F.constructor!==Object)return F;let I={};return Object.keys(F).forEach(function(x){x==(x|0)&&(x|=0);let w=F[x];I[w]=x}),I}))},L.forEach(function(z){P.prototype[z]=function(){let T=this._baseState;throw new Error(z+" not implemented for encoding: "+T.enc)}}),C.forEach(function(z){P.prototype[z]=function(){let T=this._baseState,q=Array.prototype.slice.call(arguments);return R(T.tag===null),T.tag=z,this._useArgs(q),this}}),P.prototype.use=function(z){R(z);let T=this._baseState;return R(T.use===null),T.use=z,this},P.prototype.optional=function(){let z=this._baseState;return z.optional=!0,this},P.prototype.def=function(z){let T=this._baseState;return R(T.default===null),T.default=z,T.optional=!0,this},P.prototype.explicit=function(z){let T=this._baseState;return R(T.explicit===null&&T.implicit===null),T.explicit=z,this},P.prototype.implicit=function(z){let T=this._baseState;return R(T.explicit===null&&T.implicit===null),T.implicit=z,this},P.prototype.obj=function(){let z=this._baseState,T=Array.prototype.slice.call(arguments);return z.obj=!0,T.length!==0&&this._useArgs(T),this},P.prototype.key=function(z){let T=this._baseState;return R(T.key===null),T.key=z,this},P.prototype.any=function(){let z=this._baseState;return z.any=!0,this},P.prototype.choice=function(z){let T=this._baseState;return R(T.choice===null),T.choice=z,this._useArgs(Object.keys(z).map(function(q){return z[q]})),this},P.prototype.contains=function(z){let T=this._baseState;return R(T.use===null),T.contains=z,this},P.prototype._decode=function(z,T){let q=this._baseState;if(q.parent===null)return z.wrapResult(q.children[0]._decode(z,T));let F=q.default,I=!0,x=null;if(q.key!==null&&(x=z.enterKey(q.key)),q.optional){let M=null;if(q.explicit!==null?M=q.explicit:q.implicit!==null?M=q.implicit:q.tag!==null&&(M=q.tag),M===null&&!q.any){let y=z.save();try{q.choice===null?this._decodeGeneric(q.tag,z,T):this._decodeChoice(z,T),I=!0}catch{I=!1}z.restore(y)}else if(I=this._peekTag(z,M,q.any),z.isError(I))return I}let w;if(q.obj&&I&&(w=z.enterObject()),I){if(q.explicit!==null){let y=this._decodeTag(z,q.explicit);if(z.isError(y))return y;z=y}let M=z.offset;if(q.use===null&&q.choice===null){let y;q.any&&(y=z.save());let m=this._decodeTag(z,q.implicit!==null?q.implicit:q.tag,q.any);if(z.isError(m))return m;q.any?F=z.raw(y):z=m}if(T&&T.track&&q.tag!==null&&T.track(z.path(),M,z.length,"tagged"),T&&T.track&&q.tag!==null&&T.track(z.path(),z.offset,z.length,"content"),q.any||(q.choice===null?F=this._decodeGeneric(q.tag,z,T):F=this._decodeChoice(z,T)),z.isError(F))return F;if(!q.any&&q.choice===null&&q.children!==null&&q.children.forEach(function(y){y._decode(z,T)}),q.contains&&(q.tag==="octstr"||q.tag==="bitstr")){let y=new Q(F);F=this._getUse(q.contains,z._reporterState.obj)._decode(y,T)}}return q.obj&&I&&(F=z.leaveObject(w)),q.key!==null&&(F!==null||I===!0)?z.leaveKey(x,q.key,F):x!==null&&z.exitKey(x),F},P.prototype._decodeGeneric=function(z,T,q){let F=this._baseState;return z==="seq"||z==="set"?null:z==="seqof"||z==="setof"?this._decodeList(T,z,F.args[0],q):/str$/.test(z)?this._decodeStr(T,z,q):z==="objid"&&F.args?this._decodeObjid(T,F.args[0],F.args[1],q):z==="objid"?this._decodeObjid(T,null,null,q):z==="gentime"||z==="utctime"?this._decodeTime(T,z,q):z==="null_"?this._decodeNull(T,q):z==="bool"?this._decodeBool(T,q):z==="objDesc"?this._decodeStr(T,z,q):z==="int"||z==="enum"?this._decodeInt(T,F.args&&F.args[0],q):F.use!==null?this._getUse(F.use,T._reporterState.obj)._decode(T,q):T.error("unknown tag: "+z)},P.prototype._getUse=function(z,T){let q=this._baseState;return q.useDecoder=this._use(z,T),R(q.useDecoder._baseState.parent===null),q.useDecoder=q.useDecoder._baseState.children[0],q.implicit!==q.useDecoder._baseState.implicit&&(q.useDecoder=q.useDecoder.clone(),q.useDecoder._baseState.implicit=q.implicit),q.useDecoder},P.prototype._decodeChoice=function(z,T){let q=this._baseState,F=null,I=!1;return Object.keys(q.choice).some(function(x){let w=z.save(),M=q.choice[x];try{let y=M._decode(z,T);if(z.isError(y))return!1;F={type:x,value:y},I=!0}catch{return z.restore(w),!1}return!0},this),I?F:z.error("Choice not matched")},P.prototype._createEncoderBuffer=function(z){return new N(z,this.reporter)},P.prototype._encode=function(z,T,q){let F=this._baseState;if(F.default!==null&&F.default===z)return;let I=this._encodeValue(z,T,q);if(I!==void 0&&!this._skipDefault(I,T,q))return I},P.prototype._encodeValue=function(z,T,q){let F=this._baseState;if(F.parent===null)return F.children[0]._encode(z,T||new V);let I=null;if(this.reporter=T,F.optional&&z===void 0)if(F.default!==null)z=F.default;else return;let x=null,w=!1;if(F.any)I=this._createEncoderBuffer(z);else if(F.choice)I=this._encodeChoice(z,T);else if(F.contains)x=this._getUse(F.contains,q)._encode(z,T),w=!0;else if(F.children)x=F.children.map(function(M){if(M._baseState.tag==="null_")return M._encode(null,T,z);if(M._baseState.key===null)return T.error("Child should have a key");let y=T.enterKey(M._baseState.key);if(typeof z!="object")return T.error("Child expected, but input is not object");let m=M._encode(z[M._baseState.key],T,z);return T.leaveKey(y),m},this).filter(function(M){return M}),x=this._createEncoderBuffer(x);else if(F.tag==="seqof"||F.tag==="setof"){if(!(F.args&&F.args.length===1))return T.error("Too many args for : "+F.tag);if(!Array.isArray(z))return T.error("seqof/setof, but data is not Array");let M=this.clone();M._baseState.implicit=null,x=this._createEncoderBuffer(z.map(function(y){let m=this._baseState;return this._getUse(m.args[0],z)._encode(y,T)},M))}else F.use!==null?I=this._getUse(F.use,q)._encode(z,T):(x=this._encodePrimitive(F.tag,z),w=!0);if(!F.any&&F.choice===null){let M=F.implicit!==null?F.implicit:F.tag,y=F.implicit===null?"universal":"context";M===null?F.use===null&&T.error("Tag could be omitted only for .use()"):F.use===null&&(I=this._encodeComposite(M,w,y,x))}return F.explicit!==null&&(I=this._encodeComposite(F.explicit,!1,"context",I)),I},P.prototype._encodeChoice=function(z,T){let q=this._baseState,F=q.choice[z.type];return F||R(!1,z.type+" not found in "+JSON.stringify(Object.keys(q.choice))),F._encode(z.value,T)},P.prototype._encodePrimitive=function(z,T){let q=this._baseState;if(/str$/.test(z))return this._encodeStr(T,z);if(z==="objid"&&q.args)return this._encodeObjid(T,q.reverseArgs[0],q.args[1]);if(z==="objid")return this._encodeObjid(T,null,null);if(z==="gentime"||z==="utctime")return this._encodeTime(T,z);if(z==="null_")return this._encodeNull();if(z==="int"||z==="enum")return this._encodeInt(T,q.args&&q.reverseArgs[0]);if(z==="bool")return this._encodeBool(T);if(z==="objDesc")return this._encodeStr(T,z);throw new Error("Unsupported tag: "+z)},P.prototype._isNumstr=function(z){return/^[0-9 ]*$/.test(z)},P.prototype._isPrintstr=function(z){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(z)}}),X5=K0((B)=>{function k(V){let N={};return Object.keys(V).forEach(function(Q){(Q|0)==Q&&(Q=Q|0);let R=V[Q];N[R]=Q}),N}B.tagClass={0:"universal",1:"application",2:"context",3:"private"},B.tagClassByName=k(B.tagClass),B.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},B.tagByName=k(B.tag)}),I6=K0((B,k)=>{var V=c0(),N=i1().Buffer,Q=e1(),R=X5();function C(U){this.enc="der",this.name=U.name,this.entity=U,this.tree=new H,this.tree._init(U.body)}k.exports=C,C.prototype.encode=function(U,z){return this.tree._encode(U,z).join()};function H(U){Q.call(this,"der",U)}V(H,Q),H.prototype._encodeComposite=function(U,z,T,q){let F=P(U,z,T,this.reporter);if(q.length<128){let w=N.alloc(2);return w[0]=F,w[1]=q.length,this._createEncoderBuffer([w,q])}let I=1;for(let w=q.length;w>=256;w>>=8)I++;let x=N.alloc(2+I);x[0]=F,x[1]=128|I;for(let w=1+I,M=q.length;M>0;w--,M>>=8)x[w]=M&255;return this._createEncoderBuffer([x,q])},H.prototype._encodeStr=function(U,z){if(z==="bitstr")return this._createEncoderBuffer([U.unused|0,U.data]);if(z==="bmpstr"){let T=N.alloc(U.length*2);for(let q=0;q=40)return this.reporter.error("Second objid identifier OOB");U.splice(0,2,U[0]*40+U[1])}let q=0;for(let x=0;x=128;w>>=7)q++}let F=N.alloc(q),I=F.length-1;for(let x=U.length-1;x>=0;x--){let w=U[x];for(F[I--]=w&127;(w>>=7)>0;)F[I--]=128|w&127}return this._createEncoderBuffer(F)};function L(U){return U<10?"0"+U:U}H.prototype._encodeTime=function(U,z){let T,q=new Date(U);return z==="gentime"?T=[L(q.getUTCFullYear()),L(q.getUTCMonth()+1),L(q.getUTCDate()),L(q.getUTCHours()),L(q.getUTCMinutes()),L(q.getUTCSeconds()),"Z"].join(""):z==="utctime"?T=[L(q.getUTCFullYear()%100),L(q.getUTCMonth()+1),L(q.getUTCDate()),L(q.getUTCHours()),L(q.getUTCMinutes()),L(q.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+z+" time is not supported yet"),this._encodeStr(T,"octstr")},H.prototype._encodeNull=function(){return this._createEncoderBuffer("")},H.prototype._encodeInt=function(U,z){if(typeof U=="string"){if(!z)return this.reporter.error("String int or enum given, but no values map");if(!z.hasOwnProperty(U))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(U));U=z[U]}if(typeof U!="number"&&!N.isBuffer(U)){let F=U.toArray();!U.sign&&F[0]&128&&F.unshift(0),U=N.from(F)}if(N.isBuffer(U)){let F=U.length;U.length===0&&F++;let I=N.alloc(F);return U.copy(I),U.length===0&&(I[0]=0),this._createEncoderBuffer(I)}if(U<128)return this._createEncoderBuffer(U);if(U<256)return this._createEncoderBuffer([0,U]);let T=1;for(let F=U;F>=256;F>>=8)T++;let q=new Array(T);for(let F=q.length-1;F>=0;F--)q[F]=U&255,U>>=8;return q[0]&128&&q.unshift(0),this._createEncoderBuffer(N.from(q))},H.prototype._encodeBool=function(U){return this._createEncoderBuffer(U?255:0)},H.prototype._use=function(U,z){return typeof U=="function"&&(U=U(z)),U._getEncoder("der").tree},H.prototype._skipDefault=function(U,z,T){let q=this._baseState,F;if(q.default===null)return!1;let I=U.join();if(q.defaultBuffer===void 0&&(q.defaultBuffer=this._encodeValue(q.default,z,T).join()),I.length!==q.defaultBuffer.length)return!1;for(F=0;F=31?q.error("Multi-octet tag encoding unsupported"):(z||(F|=32),F|=R.tagClassByName[T||"universal"]<<6,F)}}),I3=K0((B,k)=>{var V=c0(),N=I6();function Q(R){N.call(this,R),this.enc="pem"}V(Q,N),k.exports=Q,Q.prototype.encode=function(R,C){let H=N.prototype.encode.call(this,R).toString("base64"),L=["-----BEGIN "+C.label+"-----"];for(let P=0;P{var k=B;k.der=I6(),k.pem=I3()}),x6=K0((B,k)=>{var V=c0(),N=q6(),Q=f2().DecoderBuffer,R=e1(),C=X5();function H(z){this.enc="der",this.name=z.name,this.entity=z,this.tree=new L,this.tree._init(z.body)}k.exports=H,H.prototype.decode=function(z,T){return Q.isDecoderBuffer(z)||(z=new Q(z,T)),this.tree._decode(z,T)};function L(z){R.call(this,"der",z)}V(L,R),L.prototype._peekTag=function(z,T,q){if(z.isEmpty())return!1;let F=z.save(),I=P(z,'Failed to peek tag: "'+T+'"');return z.isError(I)?I:(z.restore(F),I.tag===T||I.tagStr===T||I.tagStr+"of"===T||q)},L.prototype._decodeTag=function(z,T,q){let F=P(z,'Failed to decode tag of "'+T+'"');if(z.isError(F))return F;let I=U(z,F.primitive,'Failed to get length of "'+T+'"');if(z.isError(I))return I;if(!q&&F.tag!==T&&F.tagStr!==T&&F.tagStr+"of"!==T)return z.error('Failed to match tag: "'+T+'"');if(F.primitive||I!==null)return z.skip(I,'Failed to match body of: "'+T+'"');let x=z.save(),w=this._skipUntilEnd(z,'Failed to skip indefinite length body: "'+this.tag+'"');return z.isError(w)?w:(I=z.offset-x.offset,z.restore(x),z.skip(I,'Failed to match body of: "'+T+'"'))},L.prototype._skipUntilEnd=function(z,T){for(;;){let q=P(z,T);if(z.isError(q))return q;let F=U(z,q.primitive,T);if(z.isError(F))return F;let I;if(q.primitive||F!==null?I=z.skip(F):I=this._skipUntilEnd(z,T),z.isError(I))return I;if(q.tagStr==="end")break}},L.prototype._decodeList=function(z,T,q,F){let I=[];for(;!z.isEmpty();){let x=this._peekTag(z,"end");if(z.isError(x))return x;let w=q.decode(z,"der",F);if(z.isError(w)&&x)break;I.push(w)}return I},L.prototype._decodeStr=function(z,T){if(T==="bitstr"){let q=z.readUInt8();return z.isError(q)?q:{unused:q,data:z.raw()}}else if(T==="bmpstr"){let q=z.raw();if(q.length%2===1)return z.error("Decoding of string type: bmpstr length mismatch");let F="";for(let I=0;I>6],I=(q&32)===0;if((q&31)===31){let w=q;for(q=0;(w&128)===128;){if(w=z.readUInt8(T),z.isError(w))return w;q<<=7,q|=w&127}}else q&=31;let x=C.tag[q];return{cls:F,primitive:I,tag:q,tagStr:x}}function U(z,T,q){let F=z.readUInt8(q);if(z.isError(F))return F;if(!T&&F===128)return null;if((F&128)===0)return F;let I=F&127;if(I>4)return z.error("length octect is too long");F=0;for(let x=0;x{var V=c0(),N=i1().Buffer,Q=x6();function R(C){Q.call(this,C),this.enc="pem"}V(R,Q),k.exports=R,R.prototype.decode=function(C,H){let L=C.toString().split(/[\r\n]+/g),P=H.label.toUpperCase(),U=/^-----(BEGIN|END) ([^-]+)-----$/,z=-1,T=-1;for(let I=0;I{var k=B;k.der=x6(),k.pem=E3()}),x3=K0((B)=>{var k=E6(),V=S6(),N=c0(),Q=B;Q.define=function(C,H){return new R(C,H)};function R(C,H){this.name=C,this.body=H,this.decoders={},this.encoders={}}R.prototype._createNamed=function(C){let H=this.name;function L(P){this._initNamed(P,H)}return N(L,C),L.prototype._initNamed=function(P,U){C.call(this,P,U)},new L(this)},R.prototype._getDecoder=function(C){return C=C||"der",this.decoders.hasOwnProperty(C)||(this.decoders[C]=this._createNamed(V[C])),this.decoders[C]},R.prototype.decode=function(C,H,L){return this._getDecoder(H).decode(C,L)},R.prototype._getEncoder=function(C){return C=C||"der",this.encoders.hasOwnProperty(C)||(this.encoders[C]=this._createNamed(k[C])),this.encoders[C]},R.prototype.encode=function(C,H,L){return this._getEncoder(H).encode(C,L)}}),S3=K0((B)=>{var k=B;k.Reporter=t1().Reporter,k.DecoderBuffer=f2().DecoderBuffer,k.EncoderBuffer=f2().EncoderBuffer,k.Node=e1()}),v3=K0((B)=>{var k=B;k._reverse=function(V){let N={};return Object.keys(V).forEach(function(Q){(Q|0)==Q&&(Q=Q|0);let R=V[Q];N[R]=Q}),N},k.der=X5()}),v6=K0((B)=>{var k=B;k.bignum=q6(),k.define=x3().define,k.base=S3(),k.constants=v3(),k.decoders=S6(),k.encoders=E6()}),A3=K0((B,k)=>{var V=v6(),N=V.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),Q=V.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),R=V.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),C=V.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(R),this.key("subjectPublicKey").bitstr())}),H=V.define("RelativeDistinguishedName",function(){this.setof(Q)}),L=V.define("RDNSequence",function(){this.seqof(H)}),P=V.define("Name",function(){this.choice({rdnSequence:this.use(L)})}),U=V.define("Validity",function(){this.seq().obj(this.key("notBefore").use(N),this.key("notAfter").use(N))}),z=V.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),T=V.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(R),this.key("issuer").use(P),this.key("validity").use(U),this.key("subject").use(P),this.key("subjectPublicKeyInfo").use(C),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(z).optional())}),q=V.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(T),this.key("signatureAlgorithm").use(R),this.key("signatureValue").bitstr())});k.exports=q}),M3=K0((B)=>{var k=v6();B.certificate=A3();var V=k.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())});B.RSAPrivateKey=V;var N=k.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});B.RSAPublicKey=N;var Q=k.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(R),this.key("subjectPublicKey").bitstr())});B.PublicKey=Q;var R=k.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())}),C=k.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(R),this.key("subjectPrivateKey").octstr())});B.PrivateKey=C;var H=k.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())});B.EncryptedPrivateKey=H;var L=k.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())});B.DSAPrivateKey=L,B.DSAparam=k.define("DSAparam",function(){this.int()});var P=k.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(U),this.key("publicKey").optional().explicit(1).bitstr())});B.ECPrivateKey=P;var U=k.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});B.signature=k.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})}),w3=K0((B,k)=>{k.exports={"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"}}),y3=K0((B,k)=>{var V=/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,N=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,Q=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,R=P1(),C=l1(),H=h0().Buffer;k.exports=function(L,P){var U=L.toString(),z=U.match(V),T;if(z){var q="aes"+z[1],F=H.from(z[2],"hex"),I=H.from(z[3].replace(/[\r\n]/g,""),"base64"),x=R(P,F.slice(0,8),parseInt(z[1],10)).key,w=[],M=C.createDecipheriv(q,x,F);w.push(M.update(I)),w.push(M.final()),T=H.concat(w)}else{var y=U.match(Q);T=H.from(y[2].replace(/[\r\n]/g,""),"base64")}var m=U.match(N)[1];return{tag:m,data:T}}}),F1=K0((B,k)=>{var V=M3(),N=w3(),Q=y3(),R=l1(),C=G6(),H=h0().Buffer;k.exports=L;function L(U){var z;typeof U=="object"&&!H.isBuffer(U)&&(z=U.passphrase,U=U.key),typeof U=="string"&&(U=H.from(U));var T=Q(U,z),q=T.tag,F=T.data,I,x;switch(q){case"CERTIFICATE":x=V.certificate.decode(F,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(x||(x=V.PublicKey.decode(F,"der")),I=x.algorithm.algorithm.join("."),I){case"1.2.840.113549.1.1.1":return V.RSAPublicKey.decode(x.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return x.subjectPrivateKey=x.subjectPublicKey,{type:"ec",data:x};case"1.2.840.10040.4.1":return x.algorithm.params.pub_key=V.DSAparam.decode(x.subjectPublicKey.data,"der"),{type:"dsa",data:x.algorithm.params};default:throw new Error("unknown key id "+I)}case"ENCRYPTED PRIVATE KEY":F=V.EncryptedPrivateKey.decode(F,"der"),F=P(F,z);case"PRIVATE KEY":switch(x=V.PrivateKey.decode(F,"der"),I=x.algorithm.algorithm.join("."),I){case"1.2.840.113549.1.1.1":return V.RSAPrivateKey.decode(x.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:x.algorithm.curve,privateKey:V.ECPrivateKey.decode(x.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return x.algorithm.params.priv_key=V.DSAparam.decode(x.subjectPrivateKey,"der"),{type:"dsa",params:x.algorithm.params};default:throw new Error("unknown key id "+I)}case"RSA PUBLIC KEY":return V.RSAPublicKey.decode(F,"der");case"RSA PRIVATE KEY":return V.RSAPrivateKey.decode(F,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:V.DSAPrivateKey.decode(F,"der")};case"EC PRIVATE KEY":return F=V.ECPrivateKey.decode(F,"der"),{curve:F.parameters.value,privateKey:F.privateKey};default:throw new Error("unknown key type "+q)}}L.signature=V.signature;function P(U,z){var T=U.algorithm.decrypt.kde.kdeparams.salt,q=parseInt(U.algorithm.decrypt.kde.kdeparams.iters.toString(),10),F=N[U.algorithm.decrypt.cipher.algo.join(".")],I=U.algorithm.decrypt.cipher.iv,x=U.subjectPrivateKey,w=parseInt(F.split("-")[1],10)/8,M=C.pbkdf2Sync(z,T,q,w,"sha1"),y=R.createDecipheriv(F,M,I),m=[];return m.push(y.update(x)),m.push(y.final()),H.concat(m)}}),A6=K0((B,k)=>{k.exports={"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"}}),_3=K0((B,k)=>{var V=h0().Buffer,N=t5(),Q=f1(),R=r1().ec,C=s1(),H=F1(),L=A6();function P(M,y,m,c,h){var a=H(y);if(a.curve){if(c!=="ecdsa"&&c!=="ecdsa/rsa")throw new Error("wrong private key type");return U(M,a)}else if(a.type==="dsa"){if(c!=="dsa")throw new Error("wrong private key type");return z(M,a,m)}else if(c!=="rsa"&&c!=="ecdsa/rsa")throw new Error("wrong private key type");M=V.concat([h,M]);for(var i=a.modulus.byteLength(),G0=[0,1];M.length+G0.length+10&&m.ishrn(c),m}function I(M,y){M=F(M,y),M=M.mod(y);var m=V.from(M.toArray());if(m.length{var V=h0().Buffer,N=s1(),Q=r1().ec,R=F1(),C=A6();function H(z,T,q,F,I){var x=R(q);if(x.type==="ec"){if(F!=="ecdsa"&&F!=="ecdsa/rsa")throw new Error("wrong public key type");return L(z,T,x)}else if(x.type==="dsa"){if(F!=="dsa")throw new Error("wrong public key type");return P(z,T,x)}else if(F!=="rsa"&&F!=="ecdsa/rsa")throw new Error("wrong public key type");T=V.concat([I,T]);for(var w=x.modulus.byteLength(),M=[1],y=0;T.length+M.length+2=T)throw new Error("invalid sig")}k.exports=H}),m3=K0((B,k)=>{var V=h0().Buffer,N=a2(),Q=K3(),R=c0(),C=_3(),H=g3(),L=e5();Object.keys(L).forEach(function(q){L[q].id=V.from(L[q].id,"hex"),L[q.toLowerCase()]=L[q]});function P(q){Q.Writable.call(this);var F=L[q];if(!F)throw new Error("Unknown message digest");this._hashType=F.hash,this._hash=N(F.hash),this._tag=F.id,this._signType=F.sign}R(P,Q.Writable),P.prototype._write=function(q,F,I){this._hash.update(q),I()},P.prototype.update=function(q,F){return typeof q=="string"&&(q=V.from(q,F)),this._hash.update(q),this},P.prototype.sign=function(q,F){this.end();var I=this._hash.digest(),x=C(I,q,this._hashType,this._signType,this._tag);return F?x.toString(F):x};function U(q){Q.Writable.call(this);var F=L[q];if(!F)throw new Error("Unknown message digest");this._hash=N(F.hash),this._tag=F.id,this._signType=F.sign}R(U,Q.Writable),U.prototype._write=function(q,F,I){this._hash.update(q),I()},U.prototype.update=function(q,F){return typeof q=="string"&&(q=V.from(q,F)),this._hash.update(q),this},U.prototype.verify=function(q,F,I){typeof F=="string"&&(F=V.from(F,I)),this.end();var x=this._hash.digest();return H(F,x,q,this._signType,this._tag)};function z(q){return new P(q)}function T(q){return new U(q)}k.exports={Sign:z,Verify:T,createSign:z,createVerify:T}}),p3=K0((B,k)=>{(function(V,N){function Q(X,O){if(!X)throw new Error(O||"Assertion failed")}function R(X,O){X.super_=O;var G=function(){};G.prototype=O.prototype,X.prototype=new G,X.prototype.constructor=X}function C(X,O,G){if(C.isBN(X))return X;this.negative=0,this.words=null,this.length=0,this.red=null,X!==null&&((O==="le"||O==="be")&&(G=O,O=10),this._init(X||0,O||10,G||"be"))}typeof V=="object"?V.exports=C:N.BN=C,C.BN=C,C.wordSize=26;var H;try{typeof window<"u"&&typeof window.Buffer<"u"?H=window.Buffer:H=M2().Buffer}catch{}C.isBN=function(X){return X instanceof C?!0:X!==null&&typeof X=="object"&&X.constructor.wordSize===C.wordSize&&Array.isArray(X.words)},C.max=function(X,O){return X.cmp(O)>0?X:O},C.min=function(X,O){return X.cmp(O)<0?X:O},C.prototype._init=function(X,O,G){if(typeof X=="number")return this._initNumber(X,O,G);if(typeof X=="object")return this._initArray(X,O,G);O==="hex"&&(O=16),Q(O===(O|0)&&O>=2&&O<=36),X=X.toString().replace(/\s+/g,"");var $=0;X[0]==="-"&&($++,this.negative=1),$=0;$-=3)W=X[$]|X[$-1]<<8|X[$-2]<<16,this.words[Y]|=W<>>26-Z&67108863,Z+=24,Z>=26&&(Z-=26,Y++);else if(G==="le")for($=0,Y=0;$>>26-Z&67108863,Z+=24,Z>=26&&(Z-=26,Y++);return this.strip()};function L(X,O){var G=X.charCodeAt(O);return G>=65&&G<=70?G-55:G>=97&&G<=102?G-87:G-48&15}function P(X,O,G){var $=L(X,G);return G-1>=O&&($|=L(X,G-1)<<4),$}C.prototype._parseHex=function(X,O,G){this.length=Math.ceil((X.length-O)/6),this.words=new Array(this.length);for(var $=0;$=O;$-=2)Z=P(X,O,$)<=18?(Y-=18,W+=1,this.words[W]|=Z>>>26):Y+=8;else{var K=X.length-O;for($=K%2===0?O+1:O;$=18?(Y-=18,W+=1,this.words[W]|=Z>>>26):Y+=8}this.strip()};function U(X,O,G,$){for(var Y=0,W=Math.min(X.length,G),Z=O;Z=49?Y+=K-49+10:K>=17?Y+=K-17+10:Y+=K}return Y}C.prototype._parseBase=function(X,O,G){this.words=[0],this.length=1;for(var $=0,Y=1;Y<=67108863;Y*=O)$++;$--,Y=Y/O|0;for(var W=X.length-G,Z=W%$,K=Math.min(W,W-Z)+G,J=0,j=G;j1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},C.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},C.prototype.inspect=function(){return(this.red?""};var z=["","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"],T=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],q=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];C.prototype.toString=function(X,O){X=X||10,O=O|0||1;var G;if(X===16||X==="hex"){G="";for(var $=0,Y=0,W=0;W>>24-$&16777215,Y!==0||W!==this.length-1?G=z[6-K.length]+K+G:G=K+G,$+=2,$>=26&&($-=26,W--)}for(Y!==0&&(G=Y.toString(16)+G);G.length%O!==0;)G="0"+G;return this.negative!==0&&(G="-"+G),G}if(X===(X|0)&&X>=2&&X<=36){var J=T[X],j=q[X];G="";var A=this.clone();for(A.negative=0;!A.isZero();){var E=A.modn(j).toString(X);A=A.idivn(j),A.isZero()?G=E+G:G=z[J-E.length]+E+G}for(this.isZero()&&(G="0"+G);G.length%O!==0;)G="0"+G;return this.negative!==0&&(G="-"+G),G}Q(!1,"Base should be between 2 and 36")},C.prototype.toNumber=function(){var X=this.words[0];return this.length===2?X+=this.words[1]*67108864:this.length===3&&this.words[2]===1?X+=4503599627370496+this.words[1]*67108864:this.length>2&&Q(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-X:X},C.prototype.toJSON=function(){return this.toString(16)},C.prototype.toBuffer=function(X,O){return Q(typeof H<"u"),this.toArrayLike(H,X,O)},C.prototype.toArray=function(X,O){return this.toArrayLike(Array,X,O)},C.prototype.toArrayLike=function(X,O,G){var $=this.byteLength(),Y=G||Math.max(1,$);Q($<=Y,"byte array longer than desired length"),Q(Y>0,"Requested array length <= 0"),this.strip();var W=O==="le",Z=new X(Y),K,J,j=this.clone();if(W){for(J=0;!j.isZero();J++)K=j.andln(255),j.iushrn(8),Z[J]=K;for(;J=4096&&(G+=13,O>>>=13),O>=64&&(G+=7,O>>>=7),O>=8&&(G+=4,O>>>=4),O>=2&&(G+=2,O>>>=2),G+O},C.prototype._zeroBits=function(X){if(X===0)return 26;var O=X,G=0;return(O&8191)===0&&(G+=13,O>>>=13),(O&127)===0&&(G+=7,O>>>=7),(O&15)===0&&(G+=4,O>>>=4),(O&3)===0&&(G+=2,O>>>=2),(O&1)===0&&G++,G},C.prototype.bitLength=function(){var X=this.words[this.length-1],O=this._countBits(X);return(this.length-1)*26+O};function F(X){for(var O=new Array(X.bitLength()),G=0;G>>Y}return O}C.prototype.zeroBits=function(){if(this.isZero())return 0;for(var X=0,O=0;OX.length?this.clone().ior(X):X.clone().ior(this)},C.prototype.uor=function(X){return this.length>X.length?this.clone().iuor(X):X.clone().iuor(this)},C.prototype.iuand=function(X){var O;this.length>X.length?O=X:O=this;for(var G=0;GX.length?this.clone().iand(X):X.clone().iand(this)},C.prototype.uand=function(X){return this.length>X.length?this.clone().iuand(X):X.clone().iuand(this)},C.prototype.iuxor=function(X){var O,G;this.length>X.length?(O=this,G=X):(O=X,G=this);for(var $=0;$X.length?this.clone().ixor(X):X.clone().ixor(this)},C.prototype.uxor=function(X){return this.length>X.length?this.clone().iuxor(X):X.clone().iuxor(this)},C.prototype.inotn=function(X){Q(typeof X=="number"&&X>=0);var O=Math.ceil(X/26)|0,G=X%26;this._expand(O),G>0&&O--;for(var $=0;$0&&(this.words[$]=~this.words[$]&67108863>>26-G),this.strip()},C.prototype.notn=function(X){return this.clone().inotn(X)},C.prototype.setn=function(X,O){Q(typeof X=="number"&&X>=0);var G=X/26|0,$=X%26;return this._expand(G+1),O?this.words[G]=this.words[G]|1<<$:this.words[G]=this.words[G]&~(1<<$),this.strip()},C.prototype.iadd=function(X){var O;if(this.negative!==0&&X.negative===0)return this.negative=0,O=this.isub(X),this.negative^=1,this._normSign();if(this.negative===0&&X.negative!==0)return X.negative=0,O=this.isub(X),X.negative=1,O._normSign();var G,$;this.length>X.length?(G=this,$=X):(G=X,$=this);for(var Y=0,W=0;W<$.length;W++)O=(G.words[W]|0)+($.words[W]|0)+Y,this.words[W]=O&67108863,Y=O>>>26;for(;Y!==0&&W>>26;if(this.length=G.length,Y!==0)this.words[this.length]=Y,this.length++;else if(G!==this)for(;WX.length?this.clone().iadd(X):X.clone().iadd(this)},C.prototype.isub=function(X){if(X.negative!==0){X.negative=0;var O=this.iadd(X);return X.negative=1,O._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(X),this.negative=1,this._normSign();var G=this.cmp(X);if(G===0)return this.negative=0,this.length=1,this.words[0]=0,this;var $,Y;G>0?($=this,Y=X):($=X,Y=this);for(var W=0,Z=0;Z>26,this.words[Z]=O&67108863;for(;W!==0&&Z<$.length;Z++)O=($.words[Z]|0)+W,W=O>>26,this.words[Z]=O&67108863;if(W===0&&Z<$.length&&$!==this)for(;Z<$.length;Z++)this.words[Z]=$.words[Z];return this.length=Math.max(this.length,Z),$!==this&&(this.negative=1),this.strip()},C.prototype.sub=function(X){return this.clone().isub(X)};function I(X,O,G){G.negative=O.negative^X.negative;var $=X.length+O.length|0;G.length=$,$=$-1|0;var Y=X.words[0]|0,W=O.words[0]|0,Z=Y*W,K=Z&67108863,J=Z/67108864|0;G.words[0]=K;for(var j=1;j<$;j++){for(var A=J>>>26,E=J&67108863,_=Math.min(j,O.length-1),s=Math.max(0,j-X.length+1);s<=_;s++){var r=j-s|0;Y=X.words[r]|0,W=O.words[s]|0,Z=Y*W+E,A+=Z/67108864|0,E=Z&67108863}G.words[j]=E|0,J=A|0}return J!==0?G.words[j]=J|0:G.length--,G.strip()}var x=function(X,O,G){var $=X.words,Y=O.words,W=G.words,Z=0,K,J,j,A=$[0]|0,E=A&8191,_=A>>>13,s=$[1]|0,r=s&8191,O0=s>>>13,o=$[2]|0,d=o&8191,f=o>>>13,U0=$[3]|0,X0=U0&8191,Y0=U0>>>13,g=$[4]|0,S=g&8191,p=g>>>13,e=$[5]|0,J0=e&8191,t=e>>>13,y0=$[6]|0,C0=y0&8191,W0=y0>>>13,_0=$[7]|0,P0=_0&8191,Q0=_0>>>13,d0=$[8]|0,D=d0&8191,v=d0>>>13,b=$[9]|0,l=b&8191,u=b>>>13,F0=Y[0]|0,$0=F0&8191,z0=F0>>>13,b0=Y[1]|0,V0=b0&8191,H0=b0>>>13,g0=Y[2]|0,N0=g0&8191,L0=g0>>>13,K2=Y[3]|0,D0=K2&8191,T0=K2>>>13,l0=Y[4]|0,k0=l0&8191,B0=l0>>>13,j2=Y[5]|0,R0=j2&8191,q0=j2>>>13,W2=Y[6]|0,I0=W2&8191,E0=W2>>>13,Z2=Y[7]|0,x0=Z2&8191,S0=Z2>>>13,Q2=Y[8]|0,v0=Q2&8191,A0=Q2>>>13,z2=Y[9]|0,M0=z2&8191,w0=z2>>>13;G.negative=X.negative^O.negative,G.length=19,K=Math.imul(E,$0),J=Math.imul(E,z0),J=J+Math.imul(_,$0)|0,j=Math.imul(_,z0);var C2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(C2>>>26)|0,C2&=67108863,K=Math.imul(r,$0),J=Math.imul(r,z0),J=J+Math.imul(O0,$0)|0,j=Math.imul(O0,z0),K=K+Math.imul(E,V0)|0,J=J+Math.imul(E,H0)|0,J=J+Math.imul(_,V0)|0,j=j+Math.imul(_,H0)|0;var m0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(m0>>>26)|0,m0&=67108863,K=Math.imul(d,$0),J=Math.imul(d,z0),J=J+Math.imul(f,$0)|0,j=Math.imul(f,z0),K=K+Math.imul(r,V0)|0,J=J+Math.imul(r,H0)|0,J=J+Math.imul(O0,V0)|0,j=j+Math.imul(O0,H0)|0,K=K+Math.imul(E,N0)|0,J=J+Math.imul(E,L0)|0,J=J+Math.imul(_,N0)|0,j=j+Math.imul(_,L0)|0;var p0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(p0>>>26)|0,p0&=67108863,K=Math.imul(X0,$0),J=Math.imul(X0,z0),J=J+Math.imul(Y0,$0)|0,j=Math.imul(Y0,z0),K=K+Math.imul(d,V0)|0,J=J+Math.imul(d,H0)|0,J=J+Math.imul(f,V0)|0,j=j+Math.imul(f,H0)|0,K=K+Math.imul(r,N0)|0,J=J+Math.imul(r,L0)|0,J=J+Math.imul(O0,N0)|0,j=j+Math.imul(O0,L0)|0,K=K+Math.imul(E,D0)|0,J=J+Math.imul(E,T0)|0,J=J+Math.imul(_,D0)|0,j=j+Math.imul(_,T0)|0;var o0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(o0>>>26)|0,o0&=67108863,K=Math.imul(S,$0),J=Math.imul(S,z0),J=J+Math.imul(p,$0)|0,j=Math.imul(p,z0),K=K+Math.imul(X0,V0)|0,J=J+Math.imul(X0,H0)|0,J=J+Math.imul(Y0,V0)|0,j=j+Math.imul(Y0,H0)|0,K=K+Math.imul(d,N0)|0,J=J+Math.imul(d,L0)|0,J=J+Math.imul(f,N0)|0,j=j+Math.imul(f,L0)|0,K=K+Math.imul(r,D0)|0,J=J+Math.imul(r,T0)|0,J=J+Math.imul(O0,D0)|0,j=j+Math.imul(O0,T0)|0,K=K+Math.imul(E,k0)|0,J=J+Math.imul(E,B0)|0,J=J+Math.imul(_,k0)|0,j=j+Math.imul(_,B0)|0;var u0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(u0>>>26)|0,u0&=67108863,K=Math.imul(J0,$0),J=Math.imul(J0,z0),J=J+Math.imul(t,$0)|0,j=Math.imul(t,z0),K=K+Math.imul(S,V0)|0,J=J+Math.imul(S,H0)|0,J=J+Math.imul(p,V0)|0,j=j+Math.imul(p,H0)|0,K=K+Math.imul(X0,N0)|0,J=J+Math.imul(X0,L0)|0,J=J+Math.imul(Y0,N0)|0,j=j+Math.imul(Y0,L0)|0,K=K+Math.imul(d,D0)|0,J=J+Math.imul(d,T0)|0,J=J+Math.imul(f,D0)|0,j=j+Math.imul(f,T0)|0,K=K+Math.imul(r,k0)|0,J=J+Math.imul(r,B0)|0,J=J+Math.imul(O0,k0)|0,j=j+Math.imul(O0,B0)|0,K=K+Math.imul(E,R0)|0,J=J+Math.imul(E,q0)|0,J=J+Math.imul(_,R0)|0,j=j+Math.imul(_,q0)|0;var s0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(s0>>>26)|0,s0&=67108863,K=Math.imul(C0,$0),J=Math.imul(C0,z0),J=J+Math.imul(W0,$0)|0,j=Math.imul(W0,z0),K=K+Math.imul(J0,V0)|0,J=J+Math.imul(J0,H0)|0,J=J+Math.imul(t,V0)|0,j=j+Math.imul(t,H0)|0,K=K+Math.imul(S,N0)|0,J=J+Math.imul(S,L0)|0,J=J+Math.imul(p,N0)|0,j=j+Math.imul(p,L0)|0,K=K+Math.imul(X0,D0)|0,J=J+Math.imul(X0,T0)|0,J=J+Math.imul(Y0,D0)|0,j=j+Math.imul(Y0,T0)|0,K=K+Math.imul(d,k0)|0,J=J+Math.imul(d,B0)|0,J=J+Math.imul(f,k0)|0,j=j+Math.imul(f,B0)|0,K=K+Math.imul(r,R0)|0,J=J+Math.imul(r,q0)|0,J=J+Math.imul(O0,R0)|0,j=j+Math.imul(O0,q0)|0,K=K+Math.imul(E,I0)|0,J=J+Math.imul(E,E0)|0,J=J+Math.imul(_,I0)|0,j=j+Math.imul(_,E0)|0;var f0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(f0>>>26)|0,f0&=67108863,K=Math.imul(P0,$0),J=Math.imul(P0,z0),J=J+Math.imul(Q0,$0)|0,j=Math.imul(Q0,z0),K=K+Math.imul(C0,V0)|0,J=J+Math.imul(C0,H0)|0,J=J+Math.imul(W0,V0)|0,j=j+Math.imul(W0,H0)|0,K=K+Math.imul(J0,N0)|0,J=J+Math.imul(J0,L0)|0,J=J+Math.imul(t,N0)|0,j=j+Math.imul(t,L0)|0,K=K+Math.imul(S,D0)|0,J=J+Math.imul(S,T0)|0,J=J+Math.imul(p,D0)|0,j=j+Math.imul(p,T0)|0,K=K+Math.imul(X0,k0)|0,J=J+Math.imul(X0,B0)|0,J=J+Math.imul(Y0,k0)|0,j=j+Math.imul(Y0,B0)|0,K=K+Math.imul(d,R0)|0,J=J+Math.imul(d,q0)|0,J=J+Math.imul(f,R0)|0,j=j+Math.imul(f,q0)|0,K=K+Math.imul(r,I0)|0,J=J+Math.imul(r,E0)|0,J=J+Math.imul(O0,I0)|0,j=j+Math.imul(O0,E0)|0,K=K+Math.imul(E,x0)|0,J=J+Math.imul(E,S0)|0,J=J+Math.imul(_,x0)|0,j=j+Math.imul(_,S0)|0;var n0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(n0>>>26)|0,n0&=67108863,K=Math.imul(D,$0),J=Math.imul(D,z0),J=J+Math.imul(v,$0)|0,j=Math.imul(v,z0),K=K+Math.imul(P0,V0)|0,J=J+Math.imul(P0,H0)|0,J=J+Math.imul(Q0,V0)|0,j=j+Math.imul(Q0,H0)|0,K=K+Math.imul(C0,N0)|0,J=J+Math.imul(C0,L0)|0,J=J+Math.imul(W0,N0)|0,j=j+Math.imul(W0,L0)|0,K=K+Math.imul(J0,D0)|0,J=J+Math.imul(J0,T0)|0,J=J+Math.imul(t,D0)|0,j=j+Math.imul(t,T0)|0,K=K+Math.imul(S,k0)|0,J=J+Math.imul(S,B0)|0,J=J+Math.imul(p,k0)|0,j=j+Math.imul(p,B0)|0,K=K+Math.imul(X0,R0)|0,J=J+Math.imul(X0,q0)|0,J=J+Math.imul(Y0,R0)|0,j=j+Math.imul(Y0,q0)|0,K=K+Math.imul(d,I0)|0,J=J+Math.imul(d,E0)|0,J=J+Math.imul(f,I0)|0,j=j+Math.imul(f,E0)|0,K=K+Math.imul(r,x0)|0,J=J+Math.imul(r,S0)|0,J=J+Math.imul(O0,x0)|0,j=j+Math.imul(O0,S0)|0,K=K+Math.imul(E,v0)|0,J=J+Math.imul(E,A0)|0,J=J+Math.imul(_,v0)|0,j=j+Math.imul(_,A0)|0;var a0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(a0>>>26)|0,a0&=67108863,K=Math.imul(l,$0),J=Math.imul(l,z0),J=J+Math.imul(u,$0)|0,j=Math.imul(u,z0),K=K+Math.imul(D,V0)|0,J=J+Math.imul(D,H0)|0,J=J+Math.imul(v,V0)|0,j=j+Math.imul(v,H0)|0,K=K+Math.imul(P0,N0)|0,J=J+Math.imul(P0,L0)|0,J=J+Math.imul(Q0,N0)|0,j=j+Math.imul(Q0,L0)|0,K=K+Math.imul(C0,D0)|0,J=J+Math.imul(C0,T0)|0,J=J+Math.imul(W0,D0)|0,j=j+Math.imul(W0,T0)|0,K=K+Math.imul(J0,k0)|0,J=J+Math.imul(J0,B0)|0,J=J+Math.imul(t,k0)|0,j=j+Math.imul(t,B0)|0,K=K+Math.imul(S,R0)|0,J=J+Math.imul(S,q0)|0,J=J+Math.imul(p,R0)|0,j=j+Math.imul(p,q0)|0,K=K+Math.imul(X0,I0)|0,J=J+Math.imul(X0,E0)|0,J=J+Math.imul(Y0,I0)|0,j=j+Math.imul(Y0,E0)|0,K=K+Math.imul(d,x0)|0,J=J+Math.imul(d,S0)|0,J=J+Math.imul(f,x0)|0,j=j+Math.imul(f,S0)|0,K=K+Math.imul(r,v0)|0,J=J+Math.imul(r,A0)|0,J=J+Math.imul(O0,v0)|0,j=j+Math.imul(O0,A0)|0,K=K+Math.imul(E,M0)|0,J=J+Math.imul(E,w0)|0,J=J+Math.imul(_,M0)|0,j=j+Math.imul(_,w0)|0;var r0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(r0>>>26)|0,r0&=67108863,K=Math.imul(l,V0),J=Math.imul(l,H0),J=J+Math.imul(u,V0)|0,j=Math.imul(u,H0),K=K+Math.imul(D,N0)|0,J=J+Math.imul(D,L0)|0,J=J+Math.imul(v,N0)|0,j=j+Math.imul(v,L0)|0,K=K+Math.imul(P0,D0)|0,J=J+Math.imul(P0,T0)|0,J=J+Math.imul(Q0,D0)|0,j=j+Math.imul(Q0,T0)|0,K=K+Math.imul(C0,k0)|0,J=J+Math.imul(C0,B0)|0,J=J+Math.imul(W0,k0)|0,j=j+Math.imul(W0,B0)|0,K=K+Math.imul(J0,R0)|0,J=J+Math.imul(J0,q0)|0,J=J+Math.imul(t,R0)|0,j=j+Math.imul(t,q0)|0,K=K+Math.imul(S,I0)|0,J=J+Math.imul(S,E0)|0,J=J+Math.imul(p,I0)|0,j=j+Math.imul(p,E0)|0,K=K+Math.imul(X0,x0)|0,J=J+Math.imul(X0,S0)|0,J=J+Math.imul(Y0,x0)|0,j=j+Math.imul(Y0,S0)|0,K=K+Math.imul(d,v0)|0,J=J+Math.imul(d,A0)|0,J=J+Math.imul(f,v0)|0,j=j+Math.imul(f,A0)|0,K=K+Math.imul(r,M0)|0,J=J+Math.imul(r,w0)|0,J=J+Math.imul(O0,M0)|0,j=j+Math.imul(O0,w0)|0;var i0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(i0>>>26)|0,i0&=67108863,K=Math.imul(l,N0),J=Math.imul(l,L0),J=J+Math.imul(u,N0)|0,j=Math.imul(u,L0),K=K+Math.imul(D,D0)|0,J=J+Math.imul(D,T0)|0,J=J+Math.imul(v,D0)|0,j=j+Math.imul(v,T0)|0,K=K+Math.imul(P0,k0)|0,J=J+Math.imul(P0,B0)|0,J=J+Math.imul(Q0,k0)|0,j=j+Math.imul(Q0,B0)|0,K=K+Math.imul(C0,R0)|0,J=J+Math.imul(C0,q0)|0,J=J+Math.imul(W0,R0)|0,j=j+Math.imul(W0,q0)|0,K=K+Math.imul(J0,I0)|0,J=J+Math.imul(J0,E0)|0,J=J+Math.imul(t,I0)|0,j=j+Math.imul(t,E0)|0,K=K+Math.imul(S,x0)|0,J=J+Math.imul(S,S0)|0,J=J+Math.imul(p,x0)|0,j=j+Math.imul(p,S0)|0,K=K+Math.imul(X0,v0)|0,J=J+Math.imul(X0,A0)|0,J=J+Math.imul(Y0,v0)|0,j=j+Math.imul(Y0,A0)|0,K=K+Math.imul(d,M0)|0,J=J+Math.imul(d,w0)|0,J=J+Math.imul(f,M0)|0,j=j+Math.imul(f,w0)|0;var t0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(t0>>>26)|0,t0&=67108863,K=Math.imul(l,D0),J=Math.imul(l,T0),J=J+Math.imul(u,D0)|0,j=Math.imul(u,T0),K=K+Math.imul(D,k0)|0,J=J+Math.imul(D,B0)|0,J=J+Math.imul(v,k0)|0,j=j+Math.imul(v,B0)|0,K=K+Math.imul(P0,R0)|0,J=J+Math.imul(P0,q0)|0,J=J+Math.imul(Q0,R0)|0,j=j+Math.imul(Q0,q0)|0,K=K+Math.imul(C0,I0)|0,J=J+Math.imul(C0,E0)|0,J=J+Math.imul(W0,I0)|0,j=j+Math.imul(W0,E0)|0,K=K+Math.imul(J0,x0)|0,J=J+Math.imul(J0,S0)|0,J=J+Math.imul(t,x0)|0,j=j+Math.imul(t,S0)|0,K=K+Math.imul(S,v0)|0,J=J+Math.imul(S,A0)|0,J=J+Math.imul(p,v0)|0,j=j+Math.imul(p,A0)|0,K=K+Math.imul(X0,M0)|0,J=J+Math.imul(X0,w0)|0,J=J+Math.imul(Y0,M0)|0,j=j+Math.imul(Y0,w0)|0;var e0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(e0>>>26)|0,e0&=67108863,K=Math.imul(l,k0),J=Math.imul(l,B0),J=J+Math.imul(u,k0)|0,j=Math.imul(u,B0),K=K+Math.imul(D,R0)|0,J=J+Math.imul(D,q0)|0,J=J+Math.imul(v,R0)|0,j=j+Math.imul(v,q0)|0,K=K+Math.imul(P0,I0)|0,J=J+Math.imul(P0,E0)|0,J=J+Math.imul(Q0,I0)|0,j=j+Math.imul(Q0,E0)|0,K=K+Math.imul(C0,x0)|0,J=J+Math.imul(C0,S0)|0,J=J+Math.imul(W0,x0)|0,j=j+Math.imul(W0,S0)|0,K=K+Math.imul(J0,v0)|0,J=J+Math.imul(J0,A0)|0,J=J+Math.imul(t,v0)|0,j=j+Math.imul(t,A0)|0,K=K+Math.imul(S,M0)|0,J=J+Math.imul(S,w0)|0,J=J+Math.imul(p,M0)|0,j=j+Math.imul(p,w0)|0;var X2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(X2>>>26)|0,X2&=67108863,K=Math.imul(l,R0),J=Math.imul(l,q0),J=J+Math.imul(u,R0)|0,j=Math.imul(u,q0),K=K+Math.imul(D,I0)|0,J=J+Math.imul(D,E0)|0,J=J+Math.imul(v,I0)|0,j=j+Math.imul(v,E0)|0,K=K+Math.imul(P0,x0)|0,J=J+Math.imul(P0,S0)|0,J=J+Math.imul(Q0,x0)|0,j=j+Math.imul(Q0,S0)|0,K=K+Math.imul(C0,v0)|0,J=J+Math.imul(C0,A0)|0,J=J+Math.imul(W0,v0)|0,j=j+Math.imul(W0,A0)|0,K=K+Math.imul(J0,M0)|0,J=J+Math.imul(J0,w0)|0,J=J+Math.imul(t,M0)|0,j=j+Math.imul(t,w0)|0;var J2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(J2>>>26)|0,J2&=67108863,K=Math.imul(l,I0),J=Math.imul(l,E0),J=J+Math.imul(u,I0)|0,j=Math.imul(u,E0),K=K+Math.imul(D,x0)|0,J=J+Math.imul(D,S0)|0,J=J+Math.imul(v,x0)|0,j=j+Math.imul(v,S0)|0,K=K+Math.imul(P0,v0)|0,J=J+Math.imul(P0,A0)|0,J=J+Math.imul(Q0,v0)|0,j=j+Math.imul(Q0,A0)|0,K=K+Math.imul(C0,M0)|0,J=J+Math.imul(C0,w0)|0,J=J+Math.imul(W0,M0)|0,j=j+Math.imul(W0,w0)|0;var O2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(O2>>>26)|0,O2&=67108863,K=Math.imul(l,x0),J=Math.imul(l,S0),J=J+Math.imul(u,x0)|0,j=Math.imul(u,S0),K=K+Math.imul(D,v0)|0,J=J+Math.imul(D,A0)|0,J=J+Math.imul(v,v0)|0,j=j+Math.imul(v,A0)|0,K=K+Math.imul(P0,M0)|0,J=J+Math.imul(P0,w0)|0,J=J+Math.imul(Q0,M0)|0,j=j+Math.imul(Q0,w0)|0;var $2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+($2>>>26)|0,$2&=67108863,K=Math.imul(l,v0),J=Math.imul(l,A0),J=J+Math.imul(u,v0)|0,j=Math.imul(u,A0),K=K+Math.imul(D,M0)|0,J=J+Math.imul(D,w0)|0,J=J+Math.imul(v,M0)|0,j=j+Math.imul(v,w0)|0;var G2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(G2>>>26)|0,G2&=67108863,K=Math.imul(l,M0),J=Math.imul(l,w0),J=J+Math.imul(u,M0)|0,j=Math.imul(u,w0);var Y2=(Z+K|0)+((J&8191)<<13)|0;return Z=(j+(J>>>13)|0)+(Y2>>>26)|0,Y2&=67108863,W[0]=C2,W[1]=m0,W[2]=p0,W[3]=o0,W[4]=u0,W[5]=s0,W[6]=f0,W[7]=n0,W[8]=a0,W[9]=r0,W[10]=i0,W[11]=t0,W[12]=e0,W[13]=X2,W[14]=J2,W[15]=O2,W[16]=$2,W[17]=G2,W[18]=Y2,Z!==0&&(W[19]=Z,G.length++),G};Math.imul||(x=I);function w(X,O,G){G.negative=O.negative^X.negative,G.length=X.length+O.length;for(var $=0,Y=0,W=0;W>>26)|0,Y+=Z>>>26,Z&=67108863}G.words[W]=K,$=Z,Z=Y}return $!==0?G.words[W]=$:G.length--,G.strip()}function M(X,O,G){var $=new y;return $.mulp(X,O,G)}C.prototype.mulTo=function(X,O){var G,$=this.length+X.length;return this.length===10&&X.length===10?G=x(this,X,O):$<63?G=I(this,X,O):$<1024?G=w(this,X,O):G=M(this,X,O),G};function y(X,O){this.x=X,this.y=O}y.prototype.makeRBT=function(X){for(var O=new Array(X),G=C.prototype._countBits(X)-1,$=0;$>=1;return $},y.prototype.permute=function(X,O,G,$,Y,W){for(var Z=0;Z>>1)Y++;return 1<>>13,G[2*W+1]=Y&8191,Y=Y>>>13;for(W=2*O;W<$;++W)G[W]=0;Q(Y===0),Q((Y&-8192)===0)},y.prototype.stub=function(X){for(var O=new Array(X),G=0;G>=26,O+=$/67108864|0,O+=Y>>>26,this.words[G]=Y&67108863}return O!==0&&(this.words[G]=O,this.length++),this},C.prototype.muln=function(X){return this.clone().imuln(X)},C.prototype.sqr=function(){return this.mul(this)},C.prototype.isqr=function(){return this.imul(this.clone())},C.prototype.pow=function(X){var O=F(X);if(O.length===0)return new C(1);for(var G=this,$=0;$=0);var O=X%26,G=(X-O)/26,$=67108863>>>26-O<<26-O,Y;if(O!==0){var W=0;for(Y=0;Y>>26-O}W&&(this.words[Y]=W,this.length++)}if(G!==0){for(Y=this.length-1;Y>=0;Y--)this.words[Y+G]=this.words[Y];for(Y=0;Y=0);var $;O?$=(O-O%26)/26:$=0;var Y=X%26,W=Math.min((X-Y)/26,this.length),Z=67108863^67108863>>>Y<W)for(this.length-=W,J=0;J=0&&(j!==0||J>=$);J--){var A=this.words[J]|0;this.words[J]=j<<26-Y|A>>>Y,j=A&Z}return K&&j!==0&&(K.words[K.length++]=j),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},C.prototype.ishrn=function(X,O,G){return Q(this.negative===0),this.iushrn(X,O,G)},C.prototype.shln=function(X){return this.clone().ishln(X)},C.prototype.ushln=function(X){return this.clone().iushln(X)},C.prototype.shrn=function(X){return this.clone().ishrn(X)},C.prototype.ushrn=function(X){return this.clone().iushrn(X)},C.prototype.testn=function(X){Q(typeof X=="number"&&X>=0);var O=X%26,G=(X-O)/26,$=1<=0);var O=X%26,G=(X-O)/26;if(Q(this.negative===0,"imaskn works only with positive numbers"),this.length<=G)return this;if(O!==0&&G++,this.length=Math.min(G,this.length),O!==0){var $=67108863^67108863>>>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},C.prototype.isubn=function(X){if(Q(typeof X=="number"),Q(X<67108864),X<0)return this.iaddn(-X);if(this.negative!==0)return this.negative=0,this.iaddn(X),this.negative=1,this;if(this.words[0]-=X,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var O=0;O>26)-(K/67108864|0),this.words[Y+G]=W&67108863}for(;Y>26,this.words[Y+G]=W&67108863;if(Z===0)return this.strip();for(Q(Z===-1),Z=0,Y=0;Y>26,this.words[Y]=W&67108863;return this.negative=1,this.strip()},C.prototype._wordDiv=function(X,O){var G=this.length-X.length,$=this.clone(),Y=X,W=Y.words[Y.length-1]|0,Z=this._countBits(W);G=26-Z,G!==0&&(Y=Y.ushln(G),$.iushln(G),W=Y.words[Y.length-1]|0);var K=$.length-Y.length,J;if(O!=="mod"){J=new C(null),J.length=K+1,J.words=new Array(J.length);for(var j=0;j=0;E--){var _=($.words[Y.length+E]|0)*67108864+($.words[Y.length+E-1]|0);for(_=Math.min(_/W|0,67108863),$._ishlnsubmul(Y,_,E);$.negative!==0;)_--,$.negative=0,$._ishlnsubmul(Y,1,E),$.isZero()||($.negative^=1);J&&(J.words[E]=_)}return J&&J.strip(),$.strip(),O!=="div"&&G!==0&&$.iushrn(G),{div:J||null,mod:$}},C.prototype.divmod=function(X,O,G){if(Q(!X.isZero()),this.isZero())return{div:new C(0),mod:new C(0)};var $,Y,W;return this.negative!==0&&X.negative===0?(W=this.neg().divmod(X,O),O!=="mod"&&($=W.div.neg()),O!=="div"&&(Y=W.mod.neg(),G&&Y.negative!==0&&Y.iadd(X)),{div:$,mod:Y}):this.negative===0&&X.negative!==0?(W=this.divmod(X.neg(),O),O!=="mod"&&($=W.div.neg()),{div:$,mod:W.mod}):(this.negative&X.negative)!==0?(W=this.neg().divmod(X.neg(),O),O!=="div"&&(Y=W.mod.neg(),G&&Y.negative!==0&&Y.isub(X)),{div:W.div,mod:Y}):X.length>this.length||this.cmp(X)<0?{div:new C(0),mod:this}:X.length===1?O==="div"?{div:this.divn(X.words[0]),mod:null}:O==="mod"?{div:null,mod:new C(this.modn(X.words[0]))}:{div:this.divn(X.words[0]),mod:new C(this.modn(X.words[0]))}:this._wordDiv(X,O)},C.prototype.div=function(X){return this.divmod(X,"div",!1).div},C.prototype.mod=function(X){return this.divmod(X,"mod",!1).mod},C.prototype.umod=function(X){return this.divmod(X,"mod",!0).mod},C.prototype.divRound=function(X){var O=this.divmod(X);if(O.mod.isZero())return O.div;var G=O.div.negative!==0?O.mod.isub(X):O.mod,$=X.ushrn(1),Y=X.andln(1),W=G.cmp($);return W<0||Y===1&&W===0?O.div:O.div.negative!==0?O.div.isubn(1):O.div.iaddn(1)},C.prototype.modn=function(X){Q(X<=67108863);for(var O=67108864%X,G=0,$=this.length-1;$>=0;$--)G=(O*G+(this.words[$]|0))%X;return G},C.prototype.idivn=function(X){Q(X<=67108863);for(var O=0,G=this.length-1;G>=0;G--){var $=(this.words[G]|0)+O*67108864;this.words[G]=$/X|0,O=$%X}return this.strip()},C.prototype.divn=function(X){return this.clone().idivn(X)},C.prototype.egcd=function(X){Q(X.negative===0),Q(!X.isZero());var O=this,G=X.clone();O.negative!==0?O=O.umod(X):O=O.clone();for(var $=new C(1),Y=new C(0),W=new C(0),Z=new C(1),K=0;O.isEven()&&G.isEven();)O.iushrn(1),G.iushrn(1),++K;for(var J=G.clone(),j=O.clone();!O.isZero();){for(var A=0,E=1;(O.words[0]&E)===0&&A<26;++A,E<<=1);if(A>0)for(O.iushrn(A);A-- >0;)($.isOdd()||Y.isOdd())&&($.iadd(J),Y.isub(j)),$.iushrn(1),Y.iushrn(1);for(var _=0,s=1;(G.words[0]&s)===0&&_<26;++_,s<<=1);if(_>0)for(G.iushrn(_);_-- >0;)(W.isOdd()||Z.isOdd())&&(W.iadd(J),Z.isub(j)),W.iushrn(1),Z.iushrn(1);O.cmp(G)>=0?(O.isub(G),$.isub(W),Y.isub(Z)):(G.isub(O),W.isub($),Z.isub(Y))}return{a:W,b:Z,gcd:G.iushln(K)}},C.prototype._invmp=function(X){Q(X.negative===0),Q(!X.isZero());var O=this,G=X.clone();O.negative!==0?O=O.umod(X):O=O.clone();for(var $=new C(1),Y=new C(0),W=G.clone();O.cmpn(1)>0&&G.cmpn(1)>0;){for(var Z=0,K=1;(O.words[0]&K)===0&&Z<26;++Z,K<<=1);if(Z>0)for(O.iushrn(Z);Z-- >0;)$.isOdd()&&$.iadd(W),$.iushrn(1);for(var J=0,j=1;(G.words[0]&j)===0&&J<26;++J,j<<=1);if(J>0)for(G.iushrn(J);J-- >0;)Y.isOdd()&&Y.iadd(W),Y.iushrn(1);O.cmp(G)>=0?(O.isub(G),$.isub(Y)):(G.isub(O),Y.isub($))}var A;return O.cmpn(1)===0?A=$:A=Y,A.cmpn(0)<0&&A.iadd(X),A},C.prototype.gcd=function(X){if(this.isZero())return X.abs();if(X.isZero())return this.abs();var O=this.clone(),G=X.clone();O.negative=0,G.negative=0;for(var $=0;O.isEven()&&G.isEven();$++)O.iushrn(1),G.iushrn(1);do{for(;O.isEven();)O.iushrn(1);for(;G.isEven();)G.iushrn(1);var Y=O.cmp(G);if(Y<0){var W=O;O=G,G=W}else if(Y===0||G.cmpn(1)===0)break;O.isub(G)}while(!0);return G.iushln($)},C.prototype.invm=function(X){return this.egcd(X).a.umod(X)},C.prototype.isEven=function(){return(this.words[0]&1)===0},C.prototype.isOdd=function(){return(this.words[0]&1)===1},C.prototype.andln=function(X){return this.words[0]&X},C.prototype.bincn=function(X){Q(typeof X=="number");var O=X%26,G=(X-O)/26,$=1<>>26,Z&=67108863,this.words[W]=Z}return Y!==0&&(this.words[W]=Y,this.length++),this},C.prototype.isZero=function(){return this.length===1&&this.words[0]===0},C.prototype.cmpn=function(X){var O=X<0;if(this.negative!==0&&!O)return-1;if(this.negative===0&&O)return 1;this.strip();var G;if(this.length>1)G=1;else{O&&(X=-X),Q(X<=67108863,"Number is too big");var $=this.words[0]|0;G=$===X?0:$X.length)return 1;if(this.length=0;G--){var $=this.words[G]|0,Y=X.words[G]|0;if($!==Y){$Y&&(O=1);break}}return O},C.prototype.gtn=function(X){return this.cmpn(X)===1},C.prototype.gt=function(X){return this.cmp(X)===1},C.prototype.gten=function(X){return this.cmpn(X)>=0},C.prototype.gte=function(X){return this.cmp(X)>=0},C.prototype.ltn=function(X){return this.cmpn(X)===-1},C.prototype.lt=function(X){return this.cmp(X)===-1},C.prototype.lten=function(X){return this.cmpn(X)<=0},C.prototype.lte=function(X){return this.cmp(X)<=0},C.prototype.eqn=function(X){return this.cmpn(X)===0},C.prototype.eq=function(X){return this.cmp(X)===0},C.red=function(X){return new n(X)},C.prototype.toRed=function(X){return Q(!this.red,"Already a number in reduction context"),Q(this.negative===0,"red works only with positives"),X.convertTo(this)._forceRed(X)},C.prototype.fromRed=function(){return Q(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},C.prototype._forceRed=function(X){return this.red=X,this},C.prototype.forceRed=function(X){return Q(!this.red,"Already a number in reduction context"),this._forceRed(X)},C.prototype.redAdd=function(X){return Q(this.red,"redAdd works only with red numbers"),this.red.add(this,X)},C.prototype.redIAdd=function(X){return Q(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,X)},C.prototype.redSub=function(X){return Q(this.red,"redSub works only with red numbers"),this.red.sub(this,X)},C.prototype.redISub=function(X){return Q(this.red,"redISub works only with red numbers"),this.red.isub(this,X)},C.prototype.redShl=function(X){return Q(this.red,"redShl works only with red numbers"),this.red.shl(this,X)},C.prototype.redMul=function(X){return Q(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.mul(this,X)},C.prototype.redIMul=function(X){return Q(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.imul(this,X)},C.prototype.redSqr=function(){return Q(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},C.prototype.redISqr=function(){return Q(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},C.prototype.redSqrt=function(){return Q(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},C.prototype.redInvm=function(){return Q(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},C.prototype.redNeg=function(){return Q(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},C.prototype.redPow=function(X){return Q(this.red&&!X.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,X)};var m={k256:null,p224:null,p192:null,p25519:null};function c(X,O){this.name=X,this.p=new C(O,16),this.n=this.p.bitLength(),this.k=new C(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}c.prototype._tmp=function(){var X=new C(null);return X.words=new Array(Math.ceil(this.n/13)),X},c.prototype.ireduce=function(X){var O=X,G;do this.split(O,this.tmp),O=this.imulK(O),O=O.iadd(this.tmp),G=O.bitLength();while(G>this.n);var $=G0?O.isub(this.p):O.strip!==void 0?O.strip():O._strip(),O},c.prototype.split=function(X,O){X.iushrn(this.n,0,O)},c.prototype.imulK=function(X){return X.imul(this.k)};function h(){c.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}R(h,c),h.prototype.split=function(X,O){for(var G=4194303,$=Math.min(X.length,9),Y=0;Y<$;Y++)O.words[Y]=X.words[Y];if(O.length=$,X.length<=9){X.words[0]=0,X.length=1;return}var W=X.words[9];for(O.words[O.length++]=W&G,Y=10;Y>>22,W=Z}W>>>=22,X.words[Y-10]=W,W===0&&X.length>10?X.length-=10:X.length-=9},h.prototype.imulK=function(X){X.words[X.length]=0,X.words[X.length+1]=0,X.length+=2;for(var O=0,G=0;G>>=26,X.words[G]=Y,O=$}return O!==0&&(X.words[X.length++]=O),X},C._prime=function(X){if(m[X])return m[X];var O;if(X==="k256")O=new h;else if(X==="p224")O=new a;else if(X==="p192")O=new i;else if(X==="p25519")O=new G0;else throw new Error("Unknown prime "+X);return m[X]=O,O};function n(X){if(typeof X=="string"){var O=C._prime(X);this.m=O.p,this.prime=O}else Q(X.gtn(1),"modulus must be greater than 1"),this.m=X,this.prime=null}n.prototype._verify1=function(X){Q(X.negative===0,"red works only with positives"),Q(X.red,"red works only with red numbers")},n.prototype._verify2=function(X,O){Q((X.negative|O.negative)===0,"red works only with positives"),Q(X.red&&X.red===O.red,"red works only with red numbers")},n.prototype.imod=function(X){return this.prime?this.prime.ireduce(X)._forceRed(this):X.umod(this.m)._forceRed(this)},n.prototype.neg=function(X){return X.isZero()?X.clone():this.m.sub(X)._forceRed(this)},n.prototype.add=function(X,O){this._verify2(X,O);var G=X.add(O);return G.cmp(this.m)>=0&&G.isub(this.m),G._forceRed(this)},n.prototype.iadd=function(X,O){this._verify2(X,O);var G=X.iadd(O);return G.cmp(this.m)>=0&&G.isub(this.m),G},n.prototype.sub=function(X,O){this._verify2(X,O);var G=X.sub(O);return G.cmpn(0)<0&&G.iadd(this.m),G._forceRed(this)},n.prototype.isub=function(X,O){this._verify2(X,O);var G=X.isub(O);return G.cmpn(0)<0&&G.iadd(this.m),G},n.prototype.shl=function(X,O){return this._verify1(X),this.imod(X.ushln(O))},n.prototype.imul=function(X,O){return this._verify2(X,O),this.imod(X.imul(O))},n.prototype.mul=function(X,O){return this._verify2(X,O),this.imod(X.mul(O))},n.prototype.isqr=function(X){return this.imul(X,X.clone())},n.prototype.sqr=function(X){return this.mul(X,X)},n.prototype.sqrt=function(X){if(X.isZero())return X.clone();var O=this.m.andln(3);if(Q(O%2===1),O===3){var G=this.m.add(new C(1)).iushrn(2);return this.pow(X,G)}for(var $=this.m.subn(1),Y=0;!$.isZero()&&$.andln(1)===0;)Y++,$.iushrn(1);Q(!$.isZero());var W=new C(1).toRed(this),Z=W.redNeg(),K=this.m.subn(1).iushrn(1),J=this.m.bitLength();for(J=new C(2*J*J).toRed(this);this.pow(J,K).cmp(Z)!==0;)J.redIAdd(Z);for(var j=this.pow(J,$),A=this.pow(X,$.addn(1).iushrn(1)),E=this.pow(X,$),_=Y;E.cmp(W)!==0;){for(var s=E,r=0;s.cmp(W)!==0;r++)s=s.redSqr();Q(r<_);var O0=this.pow(j,new C(1).iushln(_-r-1));A=A.redMul(O0),j=O0.redSqr(),E=E.redMul(j),_=r}return A},n.prototype.invm=function(X){var O=X._invmp(this.m);return O.negative!==0?(O.negative=0,this.imod(O).redNeg()):this.imod(O)},n.prototype.pow=function(X,O){if(O.isZero())return new C(1).toRed(this);if(O.cmpn(1)===0)return X.clone();var G=4,$=new Array(1<=0;Y--){for(var j=O.words[Y],A=J-1;A>=0;A--){var E=j>>A&1;if(W!==$[0]&&(W=this.sqr(W)),E===0&&Z===0){K=0;continue}Z<<=1,Z|=E,K++,!(K!==G&&(Y!==0||A!==0))&&(W=this.mul(W,$[Z]),K=0,Z=0)}J=26}return W},n.prototype.convertTo=function(X){var O=X.umod(this.m);return O===X?O.clone():O},n.prototype.convertFrom=function(X){var O=X.clone();return O.red=null,O},C.mont=function(X){return new Z0(X)};function Z0(X){n.call(this,X),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new C(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}R(Z0,n),Z0.prototype.convertTo=function(X){return this.imod(X.ushln(this.shift))},Z0.prototype.convertFrom=function(X){var O=this.imod(X.mul(this.rinv));return O.red=null,O},Z0.prototype.imul=function(X,O){if(X.isZero()||O.isZero())return X.words[0]=0,X.length=1,X;var G=X.imul(O),$=G.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Y=G.isub($).iushrn(this.shift),W=Y;return Y.cmp(this.m)>=0?W=Y.isub(this.m):Y.cmpn(0)<0&&(W=Y.iadd(this.m)),W._forceRed(this)},Z0.prototype.mul=function(X,O){if(X.isZero()||O.isZero())return new C(0)._forceRed(this);var G=X.mul(O),$=G.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Y=G.isub($).iushrn(this.shift),W=Y;return Y.cmp(this.m)>=0?W=Y.isub(this.m):Y.cmpn(0)<0&&(W=Y.iadd(this.m)),W._forceRed(this)},Z0.prototype.invm=function(X){var O=this.imod(X._invmp(this.m).mul(this.r2));return O._forceRed(this)}})(typeof k>"u"||k,B)}),c3=K0((B,k)=>{var V=r1(),N=p3();k.exports=function(H){return new R(H)};var Q={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}};Q.p224=Q.secp224r1,Q.p256=Q.secp256r1=Q.prime256v1,Q.p192=Q.secp192r1=Q.prime192v1,Q.p384=Q.secp384r1,Q.p521=Q.secp521r1;function R(H){this.curveType=Q[H],this.curveType||(this.curveType={name:H}),this.curve=new V.ec(this.curveType.name),this.keys=void 0}R.prototype.generateKeys=function(H,L){return this.keys=this.curve.genKeyPair(),this.getPublicKey(H,L)},R.prototype.computeSecret=function(H,L,P){L=L||"utf8",Buffer.isBuffer(H)||(H=new Buffer(H,L));var U=this.curve.keyFromPublic(H).getPublic(),z=U.mul(this.keys.getPrivate()).getX();return C(z,P,this.curveType.byteLength)},R.prototype.getPublicKey=function(H,L){var P=this.keys.getPublic(L==="compressed",!0);return L==="hybrid"&&(P[P.length-1]%2?P[0]=7:P[0]=6),C(P,H)},R.prototype.getPrivateKey=function(H){return C(this.keys.getPrivate(),H)},R.prototype.setPublicKey=function(H,L){return L=L||"utf8",Buffer.isBuffer(H)||(H=new Buffer(H,L)),this.keys._importPublic(H),this},R.prototype.setPrivateKey=function(H,L){L=L||"utf8",Buffer.isBuffer(H)||(H=new Buffer(H,L));var P=new N(H);return P=P.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(P),this};function C(H,L,P){Array.isArray(H)||(H=H.toArray());var U=new Buffer(H);if(P&&U.length{var V=a2(),N=h0().Buffer;k.exports=function(R,C){for(var H=N.alloc(0),L=0,P;H.length{k.exports=function(V,N){for(var Q=V.length,R=-1;++R{(function(V,N){function Q(X,O){if(!X)throw new Error(O||"Assertion failed")}function R(X,O){X.super_=O;var G=function(){};G.prototype=O.prototype,X.prototype=new G,X.prototype.constructor=X}function C(X,O,G){if(C.isBN(X))return X;this.negative=0,this.words=null,this.length=0,this.red=null,X!==null&&((O==="le"||O==="be")&&(G=O,O=10),this._init(X||0,O||10,G||"be"))}typeof V=="object"?V.exports=C:N.BN=C,C.BN=C,C.wordSize=26;var H;try{typeof window<"u"&&typeof window.Buffer<"u"?H=window.Buffer:H=M2().Buffer}catch{}C.isBN=function(X){return X instanceof C?!0:X!==null&&typeof X=="object"&&X.constructor.wordSize===C.wordSize&&Array.isArray(X.words)},C.max=function(X,O){return X.cmp(O)>0?X:O},C.min=function(X,O){return X.cmp(O)<0?X:O},C.prototype._init=function(X,O,G){if(typeof X=="number")return this._initNumber(X,O,G);if(typeof X=="object")return this._initArray(X,O,G);O==="hex"&&(O=16),Q(O===(O|0)&&O>=2&&O<=36),X=X.toString().replace(/\s+/g,"");var $=0;X[0]==="-"&&($++,this.negative=1),$=0;$-=3)W=X[$]|X[$-1]<<8|X[$-2]<<16,this.words[Y]|=W<>>26-Z&67108863,Z+=24,Z>=26&&(Z-=26,Y++);else if(G==="le")for($=0,Y=0;$>>26-Z&67108863,Z+=24,Z>=26&&(Z-=26,Y++);return this.strip()};function L(X,O){var G=X.charCodeAt(O);return G>=65&&G<=70?G-55:G>=97&&G<=102?G-87:G-48&15}function P(X,O,G){var $=L(X,G);return G-1>=O&&($|=L(X,G-1)<<4),$}C.prototype._parseHex=function(X,O,G){this.length=Math.ceil((X.length-O)/6),this.words=new Array(this.length);for(var $=0;$=O;$-=2)Z=P(X,O,$)<=18?(Y-=18,W+=1,this.words[W]|=Z>>>26):Y+=8;else{var K=X.length-O;for($=K%2===0?O+1:O;$=18?(Y-=18,W+=1,this.words[W]|=Z>>>26):Y+=8}this.strip()};function U(X,O,G,$){for(var Y=0,W=Math.min(X.length,G),Z=O;Z=49?Y+=K-49+10:K>=17?Y+=K-17+10:Y+=K}return Y}C.prototype._parseBase=function(X,O,G){this.words=[0],this.length=1;for(var $=0,Y=1;Y<=67108863;Y*=O)$++;$--,Y=Y/O|0;for(var W=X.length-G,Z=W%$,K=Math.min(W,W-Z)+G,J=0,j=G;j1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},C.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},C.prototype.inspect=function(){return(this.red?""};var z=["","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"],T=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],q=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];C.prototype.toString=function(X,O){X=X||10,O=O|0||1;var G;if(X===16||X==="hex"){G="";for(var $=0,Y=0,W=0;W>>24-$&16777215,Y!==0||W!==this.length-1?G=z[6-K.length]+K+G:G=K+G,$+=2,$>=26&&($-=26,W--)}for(Y!==0&&(G=Y.toString(16)+G);G.length%O!==0;)G="0"+G;return this.negative!==0&&(G="-"+G),G}if(X===(X|0)&&X>=2&&X<=36){var J=T[X],j=q[X];G="";var A=this.clone();for(A.negative=0;!A.isZero();){var E=A.modn(j).toString(X);A=A.idivn(j),A.isZero()?G=E+G:G=z[J-E.length]+E+G}for(this.isZero()&&(G="0"+G);G.length%O!==0;)G="0"+G;return this.negative!==0&&(G="-"+G),G}Q(!1,"Base should be between 2 and 36")},C.prototype.toNumber=function(){var X=this.words[0];return this.length===2?X+=this.words[1]*67108864:this.length===3&&this.words[2]===1?X+=4503599627370496+this.words[1]*67108864:this.length>2&&Q(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-X:X},C.prototype.toJSON=function(){return this.toString(16)},C.prototype.toBuffer=function(X,O){return Q(typeof H<"u"),this.toArrayLike(H,X,O)},C.prototype.toArray=function(X,O){return this.toArrayLike(Array,X,O)},C.prototype.toArrayLike=function(X,O,G){var $=this.byteLength(),Y=G||Math.max(1,$);Q($<=Y,"byte array longer than desired length"),Q(Y>0,"Requested array length <= 0"),this.strip();var W=O==="le",Z=new X(Y),K,J,j=this.clone();if(W){for(J=0;!j.isZero();J++)K=j.andln(255),j.iushrn(8),Z[J]=K;for(;J=4096&&(G+=13,O>>>=13),O>=64&&(G+=7,O>>>=7),O>=8&&(G+=4,O>>>=4),O>=2&&(G+=2,O>>>=2),G+O},C.prototype._zeroBits=function(X){if(X===0)return 26;var O=X,G=0;return(O&8191)===0&&(G+=13,O>>>=13),(O&127)===0&&(G+=7,O>>>=7),(O&15)===0&&(G+=4,O>>>=4),(O&3)===0&&(G+=2,O>>>=2),(O&1)===0&&G++,G},C.prototype.bitLength=function(){var X=this.words[this.length-1],O=this._countBits(X);return(this.length-1)*26+O};function F(X){for(var O=new Array(X.bitLength()),G=0;G>>Y}return O}C.prototype.zeroBits=function(){if(this.isZero())return 0;for(var X=0,O=0;OX.length?this.clone().ior(X):X.clone().ior(this)},C.prototype.uor=function(X){return this.length>X.length?this.clone().iuor(X):X.clone().iuor(this)},C.prototype.iuand=function(X){var O;this.length>X.length?O=X:O=this;for(var G=0;GX.length?this.clone().iand(X):X.clone().iand(this)},C.prototype.uand=function(X){return this.length>X.length?this.clone().iuand(X):X.clone().iuand(this)},C.prototype.iuxor=function(X){var O,G;this.length>X.length?(O=this,G=X):(O=X,G=this);for(var $=0;$X.length?this.clone().ixor(X):X.clone().ixor(this)},C.prototype.uxor=function(X){return this.length>X.length?this.clone().iuxor(X):X.clone().iuxor(this)},C.prototype.inotn=function(X){Q(typeof X=="number"&&X>=0);var O=Math.ceil(X/26)|0,G=X%26;this._expand(O),G>0&&O--;for(var $=0;$0&&(this.words[$]=~this.words[$]&67108863>>26-G),this.strip()},C.prototype.notn=function(X){return this.clone().inotn(X)},C.prototype.setn=function(X,O){Q(typeof X=="number"&&X>=0);var G=X/26|0,$=X%26;return this._expand(G+1),O?this.words[G]=this.words[G]|1<<$:this.words[G]=this.words[G]&~(1<<$),this.strip()},C.prototype.iadd=function(X){var O;if(this.negative!==0&&X.negative===0)return this.negative=0,O=this.isub(X),this.negative^=1,this._normSign();if(this.negative===0&&X.negative!==0)return X.negative=0,O=this.isub(X),X.negative=1,O._normSign();var G,$;this.length>X.length?(G=this,$=X):(G=X,$=this);for(var Y=0,W=0;W<$.length;W++)O=(G.words[W]|0)+($.words[W]|0)+Y,this.words[W]=O&67108863,Y=O>>>26;for(;Y!==0&&W>>26;if(this.length=G.length,Y!==0)this.words[this.length]=Y,this.length++;else if(G!==this)for(;WX.length?this.clone().iadd(X):X.clone().iadd(this)},C.prototype.isub=function(X){if(X.negative!==0){X.negative=0;var O=this.iadd(X);return X.negative=1,O._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(X),this.negative=1,this._normSign();var G=this.cmp(X);if(G===0)return this.negative=0,this.length=1,this.words[0]=0,this;var $,Y;G>0?($=this,Y=X):($=X,Y=this);for(var W=0,Z=0;Z>26,this.words[Z]=O&67108863;for(;W!==0&&Z<$.length;Z++)O=($.words[Z]|0)+W,W=O>>26,this.words[Z]=O&67108863;if(W===0&&Z<$.length&&$!==this)for(;Z<$.length;Z++)this.words[Z]=$.words[Z];return this.length=Math.max(this.length,Z),$!==this&&(this.negative=1),this.strip()},C.prototype.sub=function(X){return this.clone().isub(X)};function I(X,O,G){G.negative=O.negative^X.negative;var $=X.length+O.length|0;G.length=$,$=$-1|0;var Y=X.words[0]|0,W=O.words[0]|0,Z=Y*W,K=Z&67108863,J=Z/67108864|0;G.words[0]=K;for(var j=1;j<$;j++){for(var A=J>>>26,E=J&67108863,_=Math.min(j,O.length-1),s=Math.max(0,j-X.length+1);s<=_;s++){var r=j-s|0;Y=X.words[r]|0,W=O.words[s]|0,Z=Y*W+E,A+=Z/67108864|0,E=Z&67108863}G.words[j]=E|0,J=A|0}return J!==0?G.words[j]=J|0:G.length--,G.strip()}var x=function(X,O,G){var $=X.words,Y=O.words,W=G.words,Z=0,K,J,j,A=$[0]|0,E=A&8191,_=A>>>13,s=$[1]|0,r=s&8191,O0=s>>>13,o=$[2]|0,d=o&8191,f=o>>>13,U0=$[3]|0,X0=U0&8191,Y0=U0>>>13,g=$[4]|0,S=g&8191,p=g>>>13,e=$[5]|0,J0=e&8191,t=e>>>13,y0=$[6]|0,C0=y0&8191,W0=y0>>>13,_0=$[7]|0,P0=_0&8191,Q0=_0>>>13,d0=$[8]|0,D=d0&8191,v=d0>>>13,b=$[9]|0,l=b&8191,u=b>>>13,F0=Y[0]|0,$0=F0&8191,z0=F0>>>13,b0=Y[1]|0,V0=b0&8191,H0=b0>>>13,g0=Y[2]|0,N0=g0&8191,L0=g0>>>13,K2=Y[3]|0,D0=K2&8191,T0=K2>>>13,l0=Y[4]|0,k0=l0&8191,B0=l0>>>13,j2=Y[5]|0,R0=j2&8191,q0=j2>>>13,W2=Y[6]|0,I0=W2&8191,E0=W2>>>13,Z2=Y[7]|0,x0=Z2&8191,S0=Z2>>>13,Q2=Y[8]|0,v0=Q2&8191,A0=Q2>>>13,z2=Y[9]|0,M0=z2&8191,w0=z2>>>13;G.negative=X.negative^O.negative,G.length=19,K=Math.imul(E,$0),J=Math.imul(E,z0),J=J+Math.imul(_,$0)|0,j=Math.imul(_,z0);var C2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(C2>>>26)|0,C2&=67108863,K=Math.imul(r,$0),J=Math.imul(r,z0),J=J+Math.imul(O0,$0)|0,j=Math.imul(O0,z0),K=K+Math.imul(E,V0)|0,J=J+Math.imul(E,H0)|0,J=J+Math.imul(_,V0)|0,j=j+Math.imul(_,H0)|0;var m0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(m0>>>26)|0,m0&=67108863,K=Math.imul(d,$0),J=Math.imul(d,z0),J=J+Math.imul(f,$0)|0,j=Math.imul(f,z0),K=K+Math.imul(r,V0)|0,J=J+Math.imul(r,H0)|0,J=J+Math.imul(O0,V0)|0,j=j+Math.imul(O0,H0)|0,K=K+Math.imul(E,N0)|0,J=J+Math.imul(E,L0)|0,J=J+Math.imul(_,N0)|0,j=j+Math.imul(_,L0)|0;var p0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(p0>>>26)|0,p0&=67108863,K=Math.imul(X0,$0),J=Math.imul(X0,z0),J=J+Math.imul(Y0,$0)|0,j=Math.imul(Y0,z0),K=K+Math.imul(d,V0)|0,J=J+Math.imul(d,H0)|0,J=J+Math.imul(f,V0)|0,j=j+Math.imul(f,H0)|0,K=K+Math.imul(r,N0)|0,J=J+Math.imul(r,L0)|0,J=J+Math.imul(O0,N0)|0,j=j+Math.imul(O0,L0)|0,K=K+Math.imul(E,D0)|0,J=J+Math.imul(E,T0)|0,J=J+Math.imul(_,D0)|0,j=j+Math.imul(_,T0)|0;var o0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(o0>>>26)|0,o0&=67108863,K=Math.imul(S,$0),J=Math.imul(S,z0),J=J+Math.imul(p,$0)|0,j=Math.imul(p,z0),K=K+Math.imul(X0,V0)|0,J=J+Math.imul(X0,H0)|0,J=J+Math.imul(Y0,V0)|0,j=j+Math.imul(Y0,H0)|0,K=K+Math.imul(d,N0)|0,J=J+Math.imul(d,L0)|0,J=J+Math.imul(f,N0)|0,j=j+Math.imul(f,L0)|0,K=K+Math.imul(r,D0)|0,J=J+Math.imul(r,T0)|0,J=J+Math.imul(O0,D0)|0,j=j+Math.imul(O0,T0)|0,K=K+Math.imul(E,k0)|0,J=J+Math.imul(E,B0)|0,J=J+Math.imul(_,k0)|0,j=j+Math.imul(_,B0)|0;var u0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(u0>>>26)|0,u0&=67108863,K=Math.imul(J0,$0),J=Math.imul(J0,z0),J=J+Math.imul(t,$0)|0,j=Math.imul(t,z0),K=K+Math.imul(S,V0)|0,J=J+Math.imul(S,H0)|0,J=J+Math.imul(p,V0)|0,j=j+Math.imul(p,H0)|0,K=K+Math.imul(X0,N0)|0,J=J+Math.imul(X0,L0)|0,J=J+Math.imul(Y0,N0)|0,j=j+Math.imul(Y0,L0)|0,K=K+Math.imul(d,D0)|0,J=J+Math.imul(d,T0)|0,J=J+Math.imul(f,D0)|0,j=j+Math.imul(f,T0)|0,K=K+Math.imul(r,k0)|0,J=J+Math.imul(r,B0)|0,J=J+Math.imul(O0,k0)|0,j=j+Math.imul(O0,B0)|0,K=K+Math.imul(E,R0)|0,J=J+Math.imul(E,q0)|0,J=J+Math.imul(_,R0)|0,j=j+Math.imul(_,q0)|0;var s0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(s0>>>26)|0,s0&=67108863,K=Math.imul(C0,$0),J=Math.imul(C0,z0),J=J+Math.imul(W0,$0)|0,j=Math.imul(W0,z0),K=K+Math.imul(J0,V0)|0,J=J+Math.imul(J0,H0)|0,J=J+Math.imul(t,V0)|0,j=j+Math.imul(t,H0)|0,K=K+Math.imul(S,N0)|0,J=J+Math.imul(S,L0)|0,J=J+Math.imul(p,N0)|0,j=j+Math.imul(p,L0)|0,K=K+Math.imul(X0,D0)|0,J=J+Math.imul(X0,T0)|0,J=J+Math.imul(Y0,D0)|0,j=j+Math.imul(Y0,T0)|0,K=K+Math.imul(d,k0)|0,J=J+Math.imul(d,B0)|0,J=J+Math.imul(f,k0)|0,j=j+Math.imul(f,B0)|0,K=K+Math.imul(r,R0)|0,J=J+Math.imul(r,q0)|0,J=J+Math.imul(O0,R0)|0,j=j+Math.imul(O0,q0)|0,K=K+Math.imul(E,I0)|0,J=J+Math.imul(E,E0)|0,J=J+Math.imul(_,I0)|0,j=j+Math.imul(_,E0)|0;var f0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(f0>>>26)|0,f0&=67108863,K=Math.imul(P0,$0),J=Math.imul(P0,z0),J=J+Math.imul(Q0,$0)|0,j=Math.imul(Q0,z0),K=K+Math.imul(C0,V0)|0,J=J+Math.imul(C0,H0)|0,J=J+Math.imul(W0,V0)|0,j=j+Math.imul(W0,H0)|0,K=K+Math.imul(J0,N0)|0,J=J+Math.imul(J0,L0)|0,J=J+Math.imul(t,N0)|0,j=j+Math.imul(t,L0)|0,K=K+Math.imul(S,D0)|0,J=J+Math.imul(S,T0)|0,J=J+Math.imul(p,D0)|0,j=j+Math.imul(p,T0)|0,K=K+Math.imul(X0,k0)|0,J=J+Math.imul(X0,B0)|0,J=J+Math.imul(Y0,k0)|0,j=j+Math.imul(Y0,B0)|0,K=K+Math.imul(d,R0)|0,J=J+Math.imul(d,q0)|0,J=J+Math.imul(f,R0)|0,j=j+Math.imul(f,q0)|0,K=K+Math.imul(r,I0)|0,J=J+Math.imul(r,E0)|0,J=J+Math.imul(O0,I0)|0,j=j+Math.imul(O0,E0)|0,K=K+Math.imul(E,x0)|0,J=J+Math.imul(E,S0)|0,J=J+Math.imul(_,x0)|0,j=j+Math.imul(_,S0)|0;var n0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(n0>>>26)|0,n0&=67108863,K=Math.imul(D,$0),J=Math.imul(D,z0),J=J+Math.imul(v,$0)|0,j=Math.imul(v,z0),K=K+Math.imul(P0,V0)|0,J=J+Math.imul(P0,H0)|0,J=J+Math.imul(Q0,V0)|0,j=j+Math.imul(Q0,H0)|0,K=K+Math.imul(C0,N0)|0,J=J+Math.imul(C0,L0)|0,J=J+Math.imul(W0,N0)|0,j=j+Math.imul(W0,L0)|0,K=K+Math.imul(J0,D0)|0,J=J+Math.imul(J0,T0)|0,J=J+Math.imul(t,D0)|0,j=j+Math.imul(t,T0)|0,K=K+Math.imul(S,k0)|0,J=J+Math.imul(S,B0)|0,J=J+Math.imul(p,k0)|0,j=j+Math.imul(p,B0)|0,K=K+Math.imul(X0,R0)|0,J=J+Math.imul(X0,q0)|0,J=J+Math.imul(Y0,R0)|0,j=j+Math.imul(Y0,q0)|0,K=K+Math.imul(d,I0)|0,J=J+Math.imul(d,E0)|0,J=J+Math.imul(f,I0)|0,j=j+Math.imul(f,E0)|0,K=K+Math.imul(r,x0)|0,J=J+Math.imul(r,S0)|0,J=J+Math.imul(O0,x0)|0,j=j+Math.imul(O0,S0)|0,K=K+Math.imul(E,v0)|0,J=J+Math.imul(E,A0)|0,J=J+Math.imul(_,v0)|0,j=j+Math.imul(_,A0)|0;var a0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(a0>>>26)|0,a0&=67108863,K=Math.imul(l,$0),J=Math.imul(l,z0),J=J+Math.imul(u,$0)|0,j=Math.imul(u,z0),K=K+Math.imul(D,V0)|0,J=J+Math.imul(D,H0)|0,J=J+Math.imul(v,V0)|0,j=j+Math.imul(v,H0)|0,K=K+Math.imul(P0,N0)|0,J=J+Math.imul(P0,L0)|0,J=J+Math.imul(Q0,N0)|0,j=j+Math.imul(Q0,L0)|0,K=K+Math.imul(C0,D0)|0,J=J+Math.imul(C0,T0)|0,J=J+Math.imul(W0,D0)|0,j=j+Math.imul(W0,T0)|0,K=K+Math.imul(J0,k0)|0,J=J+Math.imul(J0,B0)|0,J=J+Math.imul(t,k0)|0,j=j+Math.imul(t,B0)|0,K=K+Math.imul(S,R0)|0,J=J+Math.imul(S,q0)|0,J=J+Math.imul(p,R0)|0,j=j+Math.imul(p,q0)|0,K=K+Math.imul(X0,I0)|0,J=J+Math.imul(X0,E0)|0,J=J+Math.imul(Y0,I0)|0,j=j+Math.imul(Y0,E0)|0,K=K+Math.imul(d,x0)|0,J=J+Math.imul(d,S0)|0,J=J+Math.imul(f,x0)|0,j=j+Math.imul(f,S0)|0,K=K+Math.imul(r,v0)|0,J=J+Math.imul(r,A0)|0,J=J+Math.imul(O0,v0)|0,j=j+Math.imul(O0,A0)|0,K=K+Math.imul(E,M0)|0,J=J+Math.imul(E,w0)|0,J=J+Math.imul(_,M0)|0,j=j+Math.imul(_,w0)|0;var r0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(r0>>>26)|0,r0&=67108863,K=Math.imul(l,V0),J=Math.imul(l,H0),J=J+Math.imul(u,V0)|0,j=Math.imul(u,H0),K=K+Math.imul(D,N0)|0,J=J+Math.imul(D,L0)|0,J=J+Math.imul(v,N0)|0,j=j+Math.imul(v,L0)|0,K=K+Math.imul(P0,D0)|0,J=J+Math.imul(P0,T0)|0,J=J+Math.imul(Q0,D0)|0,j=j+Math.imul(Q0,T0)|0,K=K+Math.imul(C0,k0)|0,J=J+Math.imul(C0,B0)|0,J=J+Math.imul(W0,k0)|0,j=j+Math.imul(W0,B0)|0,K=K+Math.imul(J0,R0)|0,J=J+Math.imul(J0,q0)|0,J=J+Math.imul(t,R0)|0,j=j+Math.imul(t,q0)|0,K=K+Math.imul(S,I0)|0,J=J+Math.imul(S,E0)|0,J=J+Math.imul(p,I0)|0,j=j+Math.imul(p,E0)|0,K=K+Math.imul(X0,x0)|0,J=J+Math.imul(X0,S0)|0,J=J+Math.imul(Y0,x0)|0,j=j+Math.imul(Y0,S0)|0,K=K+Math.imul(d,v0)|0,J=J+Math.imul(d,A0)|0,J=J+Math.imul(f,v0)|0,j=j+Math.imul(f,A0)|0,K=K+Math.imul(r,M0)|0,J=J+Math.imul(r,w0)|0,J=J+Math.imul(O0,M0)|0,j=j+Math.imul(O0,w0)|0;var i0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(i0>>>26)|0,i0&=67108863,K=Math.imul(l,N0),J=Math.imul(l,L0),J=J+Math.imul(u,N0)|0,j=Math.imul(u,L0),K=K+Math.imul(D,D0)|0,J=J+Math.imul(D,T0)|0,J=J+Math.imul(v,D0)|0,j=j+Math.imul(v,T0)|0,K=K+Math.imul(P0,k0)|0,J=J+Math.imul(P0,B0)|0,J=J+Math.imul(Q0,k0)|0,j=j+Math.imul(Q0,B0)|0,K=K+Math.imul(C0,R0)|0,J=J+Math.imul(C0,q0)|0,J=J+Math.imul(W0,R0)|0,j=j+Math.imul(W0,q0)|0,K=K+Math.imul(J0,I0)|0,J=J+Math.imul(J0,E0)|0,J=J+Math.imul(t,I0)|0,j=j+Math.imul(t,E0)|0,K=K+Math.imul(S,x0)|0,J=J+Math.imul(S,S0)|0,J=J+Math.imul(p,x0)|0,j=j+Math.imul(p,S0)|0,K=K+Math.imul(X0,v0)|0,J=J+Math.imul(X0,A0)|0,J=J+Math.imul(Y0,v0)|0,j=j+Math.imul(Y0,A0)|0,K=K+Math.imul(d,M0)|0,J=J+Math.imul(d,w0)|0,J=J+Math.imul(f,M0)|0,j=j+Math.imul(f,w0)|0;var t0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(t0>>>26)|0,t0&=67108863,K=Math.imul(l,D0),J=Math.imul(l,T0),J=J+Math.imul(u,D0)|0,j=Math.imul(u,T0),K=K+Math.imul(D,k0)|0,J=J+Math.imul(D,B0)|0,J=J+Math.imul(v,k0)|0,j=j+Math.imul(v,B0)|0,K=K+Math.imul(P0,R0)|0,J=J+Math.imul(P0,q0)|0,J=J+Math.imul(Q0,R0)|0,j=j+Math.imul(Q0,q0)|0,K=K+Math.imul(C0,I0)|0,J=J+Math.imul(C0,E0)|0,J=J+Math.imul(W0,I0)|0,j=j+Math.imul(W0,E0)|0,K=K+Math.imul(J0,x0)|0,J=J+Math.imul(J0,S0)|0,J=J+Math.imul(t,x0)|0,j=j+Math.imul(t,S0)|0,K=K+Math.imul(S,v0)|0,J=J+Math.imul(S,A0)|0,J=J+Math.imul(p,v0)|0,j=j+Math.imul(p,A0)|0,K=K+Math.imul(X0,M0)|0,J=J+Math.imul(X0,w0)|0,J=J+Math.imul(Y0,M0)|0,j=j+Math.imul(Y0,w0)|0;var e0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(e0>>>26)|0,e0&=67108863,K=Math.imul(l,k0),J=Math.imul(l,B0),J=J+Math.imul(u,k0)|0,j=Math.imul(u,B0),K=K+Math.imul(D,R0)|0,J=J+Math.imul(D,q0)|0,J=J+Math.imul(v,R0)|0,j=j+Math.imul(v,q0)|0,K=K+Math.imul(P0,I0)|0,J=J+Math.imul(P0,E0)|0,J=J+Math.imul(Q0,I0)|0,j=j+Math.imul(Q0,E0)|0,K=K+Math.imul(C0,x0)|0,J=J+Math.imul(C0,S0)|0,J=J+Math.imul(W0,x0)|0,j=j+Math.imul(W0,S0)|0,K=K+Math.imul(J0,v0)|0,J=J+Math.imul(J0,A0)|0,J=J+Math.imul(t,v0)|0,j=j+Math.imul(t,A0)|0,K=K+Math.imul(S,M0)|0,J=J+Math.imul(S,w0)|0,J=J+Math.imul(p,M0)|0,j=j+Math.imul(p,w0)|0;var X2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(X2>>>26)|0,X2&=67108863,K=Math.imul(l,R0),J=Math.imul(l,q0),J=J+Math.imul(u,R0)|0,j=Math.imul(u,q0),K=K+Math.imul(D,I0)|0,J=J+Math.imul(D,E0)|0,J=J+Math.imul(v,I0)|0,j=j+Math.imul(v,E0)|0,K=K+Math.imul(P0,x0)|0,J=J+Math.imul(P0,S0)|0,J=J+Math.imul(Q0,x0)|0,j=j+Math.imul(Q0,S0)|0,K=K+Math.imul(C0,v0)|0,J=J+Math.imul(C0,A0)|0,J=J+Math.imul(W0,v0)|0,j=j+Math.imul(W0,A0)|0,K=K+Math.imul(J0,M0)|0,J=J+Math.imul(J0,w0)|0,J=J+Math.imul(t,M0)|0,j=j+Math.imul(t,w0)|0;var J2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(J2>>>26)|0,J2&=67108863,K=Math.imul(l,I0),J=Math.imul(l,E0),J=J+Math.imul(u,I0)|0,j=Math.imul(u,E0),K=K+Math.imul(D,x0)|0,J=J+Math.imul(D,S0)|0,J=J+Math.imul(v,x0)|0,j=j+Math.imul(v,S0)|0,K=K+Math.imul(P0,v0)|0,J=J+Math.imul(P0,A0)|0,J=J+Math.imul(Q0,v0)|0,j=j+Math.imul(Q0,A0)|0,K=K+Math.imul(C0,M0)|0,J=J+Math.imul(C0,w0)|0,J=J+Math.imul(W0,M0)|0,j=j+Math.imul(W0,w0)|0;var O2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(O2>>>26)|0,O2&=67108863,K=Math.imul(l,x0),J=Math.imul(l,S0),J=J+Math.imul(u,x0)|0,j=Math.imul(u,S0),K=K+Math.imul(D,v0)|0,J=J+Math.imul(D,A0)|0,J=J+Math.imul(v,v0)|0,j=j+Math.imul(v,A0)|0,K=K+Math.imul(P0,M0)|0,J=J+Math.imul(P0,w0)|0,J=J+Math.imul(Q0,M0)|0,j=j+Math.imul(Q0,w0)|0;var $2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+($2>>>26)|0,$2&=67108863,K=Math.imul(l,v0),J=Math.imul(l,A0),J=J+Math.imul(u,v0)|0,j=Math.imul(u,A0),K=K+Math.imul(D,M0)|0,J=J+Math.imul(D,w0)|0,J=J+Math.imul(v,M0)|0,j=j+Math.imul(v,w0)|0;var G2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(G2>>>26)|0,G2&=67108863,K=Math.imul(l,M0),J=Math.imul(l,w0),J=J+Math.imul(u,M0)|0,j=Math.imul(u,w0);var Y2=(Z+K|0)+((J&8191)<<13)|0;return Z=(j+(J>>>13)|0)+(Y2>>>26)|0,Y2&=67108863,W[0]=C2,W[1]=m0,W[2]=p0,W[3]=o0,W[4]=u0,W[5]=s0,W[6]=f0,W[7]=n0,W[8]=a0,W[9]=r0,W[10]=i0,W[11]=t0,W[12]=e0,W[13]=X2,W[14]=J2,W[15]=O2,W[16]=$2,W[17]=G2,W[18]=Y2,Z!==0&&(W[19]=Z,G.length++),G};Math.imul||(x=I);function w(X,O,G){G.negative=O.negative^X.negative,G.length=X.length+O.length;for(var $=0,Y=0,W=0;W>>26)|0,Y+=Z>>>26,Z&=67108863}G.words[W]=K,$=Z,Z=Y}return $!==0?G.words[W]=$:G.length--,G.strip()}function M(X,O,G){var $=new y;return $.mulp(X,O,G)}C.prototype.mulTo=function(X,O){var G,$=this.length+X.length;return this.length===10&&X.length===10?G=x(this,X,O):$<63?G=I(this,X,O):$<1024?G=w(this,X,O):G=M(this,X,O),G};function y(X,O){this.x=X,this.y=O}y.prototype.makeRBT=function(X){for(var O=new Array(X),G=C.prototype._countBits(X)-1,$=0;$>=1;return $},y.prototype.permute=function(X,O,G,$,Y,W){for(var Z=0;Z>>1)Y++;return 1<>>13,G[2*W+1]=Y&8191,Y=Y>>>13;for(W=2*O;W<$;++W)G[W]=0;Q(Y===0),Q((Y&-8192)===0)},y.prototype.stub=function(X){for(var O=new Array(X),G=0;G>=26,O+=$/67108864|0,O+=Y>>>26,this.words[G]=Y&67108863}return O!==0&&(this.words[G]=O,this.length++),this},C.prototype.muln=function(X){return this.clone().imuln(X)},C.prototype.sqr=function(){return this.mul(this)},C.prototype.isqr=function(){return this.imul(this.clone())},C.prototype.pow=function(X){var O=F(X);if(O.length===0)return new C(1);for(var G=this,$=0;$=0);var O=X%26,G=(X-O)/26,$=67108863>>>26-O<<26-O,Y;if(O!==0){var W=0;for(Y=0;Y>>26-O}W&&(this.words[Y]=W,this.length++)}if(G!==0){for(Y=this.length-1;Y>=0;Y--)this.words[Y+G]=this.words[Y];for(Y=0;Y=0);var $;O?$=(O-O%26)/26:$=0;var Y=X%26,W=Math.min((X-Y)/26,this.length),Z=67108863^67108863>>>Y<W)for(this.length-=W,J=0;J=0&&(j!==0||J>=$);J--){var A=this.words[J]|0;this.words[J]=j<<26-Y|A>>>Y,j=A&Z}return K&&j!==0&&(K.words[K.length++]=j),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},C.prototype.ishrn=function(X,O,G){return Q(this.negative===0),this.iushrn(X,O,G)},C.prototype.shln=function(X){return this.clone().ishln(X)},C.prototype.ushln=function(X){return this.clone().iushln(X)},C.prototype.shrn=function(X){return this.clone().ishrn(X)},C.prototype.ushrn=function(X){return this.clone().iushrn(X)},C.prototype.testn=function(X){Q(typeof X=="number"&&X>=0);var O=X%26,G=(X-O)/26,$=1<=0);var O=X%26,G=(X-O)/26;if(Q(this.negative===0,"imaskn works only with positive numbers"),this.length<=G)return this;if(O!==0&&G++,this.length=Math.min(G,this.length),O!==0){var $=67108863^67108863>>>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},C.prototype.isubn=function(X){if(Q(typeof X=="number"),Q(X<67108864),X<0)return this.iaddn(-X);if(this.negative!==0)return this.negative=0,this.iaddn(X),this.negative=1,this;if(this.words[0]-=X,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var O=0;O>26)-(K/67108864|0),this.words[Y+G]=W&67108863}for(;Y>26,this.words[Y+G]=W&67108863;if(Z===0)return this.strip();for(Q(Z===-1),Z=0,Y=0;Y>26,this.words[Y]=W&67108863;return this.negative=1,this.strip()},C.prototype._wordDiv=function(X,O){var G=this.length-X.length,$=this.clone(),Y=X,W=Y.words[Y.length-1]|0,Z=this._countBits(W);G=26-Z,G!==0&&(Y=Y.ushln(G),$.iushln(G),W=Y.words[Y.length-1]|0);var K=$.length-Y.length,J;if(O!=="mod"){J=new C(null),J.length=K+1,J.words=new Array(J.length);for(var j=0;j=0;E--){var _=($.words[Y.length+E]|0)*67108864+($.words[Y.length+E-1]|0);for(_=Math.min(_/W|0,67108863),$._ishlnsubmul(Y,_,E);$.negative!==0;)_--,$.negative=0,$._ishlnsubmul(Y,1,E),$.isZero()||($.negative^=1);J&&(J.words[E]=_)}return J&&J.strip(),$.strip(),O!=="div"&&G!==0&&$.iushrn(G),{div:J||null,mod:$}},C.prototype.divmod=function(X,O,G){if(Q(!X.isZero()),this.isZero())return{div:new C(0),mod:new C(0)};var $,Y,W;return this.negative!==0&&X.negative===0?(W=this.neg().divmod(X,O),O!=="mod"&&($=W.div.neg()),O!=="div"&&(Y=W.mod.neg(),G&&Y.negative!==0&&Y.iadd(X)),{div:$,mod:Y}):this.negative===0&&X.negative!==0?(W=this.divmod(X.neg(),O),O!=="mod"&&($=W.div.neg()),{div:$,mod:W.mod}):(this.negative&X.negative)!==0?(W=this.neg().divmod(X.neg(),O),O!=="div"&&(Y=W.mod.neg(),G&&Y.negative!==0&&Y.isub(X)),{div:W.div,mod:Y}):X.length>this.length||this.cmp(X)<0?{div:new C(0),mod:this}:X.length===1?O==="div"?{div:this.divn(X.words[0]),mod:null}:O==="mod"?{div:null,mod:new C(this.modn(X.words[0]))}:{div:this.divn(X.words[0]),mod:new C(this.modn(X.words[0]))}:this._wordDiv(X,O)},C.prototype.div=function(X){return this.divmod(X,"div",!1).div},C.prototype.mod=function(X){return this.divmod(X,"mod",!1).mod},C.prototype.umod=function(X){return this.divmod(X,"mod",!0).mod},C.prototype.divRound=function(X){var O=this.divmod(X);if(O.mod.isZero())return O.div;var G=O.div.negative!==0?O.mod.isub(X):O.mod,$=X.ushrn(1),Y=X.andln(1),W=G.cmp($);return W<0||Y===1&&W===0?O.div:O.div.negative!==0?O.div.isubn(1):O.div.iaddn(1)},C.prototype.modn=function(X){Q(X<=67108863);for(var O=67108864%X,G=0,$=this.length-1;$>=0;$--)G=(O*G+(this.words[$]|0))%X;return G},C.prototype.idivn=function(X){Q(X<=67108863);for(var O=0,G=this.length-1;G>=0;G--){var $=(this.words[G]|0)+O*67108864;this.words[G]=$/X|0,O=$%X}return this.strip()},C.prototype.divn=function(X){return this.clone().idivn(X)},C.prototype.egcd=function(X){Q(X.negative===0),Q(!X.isZero());var O=this,G=X.clone();O.negative!==0?O=O.umod(X):O=O.clone();for(var $=new C(1),Y=new C(0),W=new C(0),Z=new C(1),K=0;O.isEven()&&G.isEven();)O.iushrn(1),G.iushrn(1),++K;for(var J=G.clone(),j=O.clone();!O.isZero();){for(var A=0,E=1;(O.words[0]&E)===0&&A<26;++A,E<<=1);if(A>0)for(O.iushrn(A);A-- >0;)($.isOdd()||Y.isOdd())&&($.iadd(J),Y.isub(j)),$.iushrn(1),Y.iushrn(1);for(var _=0,s=1;(G.words[0]&s)===0&&_<26;++_,s<<=1);if(_>0)for(G.iushrn(_);_-- >0;)(W.isOdd()||Z.isOdd())&&(W.iadd(J),Z.isub(j)),W.iushrn(1),Z.iushrn(1);O.cmp(G)>=0?(O.isub(G),$.isub(W),Y.isub(Z)):(G.isub(O),W.isub($),Z.isub(Y))}return{a:W,b:Z,gcd:G.iushln(K)}},C.prototype._invmp=function(X){Q(X.negative===0),Q(!X.isZero());var O=this,G=X.clone();O.negative!==0?O=O.umod(X):O=O.clone();for(var $=new C(1),Y=new C(0),W=G.clone();O.cmpn(1)>0&&G.cmpn(1)>0;){for(var Z=0,K=1;(O.words[0]&K)===0&&Z<26;++Z,K<<=1);if(Z>0)for(O.iushrn(Z);Z-- >0;)$.isOdd()&&$.iadd(W),$.iushrn(1);for(var J=0,j=1;(G.words[0]&j)===0&&J<26;++J,j<<=1);if(J>0)for(G.iushrn(J);J-- >0;)Y.isOdd()&&Y.iadd(W),Y.iushrn(1);O.cmp(G)>=0?(O.isub(G),$.isub(Y)):(G.isub(O),Y.isub($))}var A;return O.cmpn(1)===0?A=$:A=Y,A.cmpn(0)<0&&A.iadd(X),A},C.prototype.gcd=function(X){if(this.isZero())return X.abs();if(X.isZero())return this.abs();var O=this.clone(),G=X.clone();O.negative=0,G.negative=0;for(var $=0;O.isEven()&&G.isEven();$++)O.iushrn(1),G.iushrn(1);do{for(;O.isEven();)O.iushrn(1);for(;G.isEven();)G.iushrn(1);var Y=O.cmp(G);if(Y<0){var W=O;O=G,G=W}else if(Y===0||G.cmpn(1)===0)break;O.isub(G)}while(!0);return G.iushln($)},C.prototype.invm=function(X){return this.egcd(X).a.umod(X)},C.prototype.isEven=function(){return(this.words[0]&1)===0},C.prototype.isOdd=function(){return(this.words[0]&1)===1},C.prototype.andln=function(X){return this.words[0]&X},C.prototype.bincn=function(X){Q(typeof X=="number");var O=X%26,G=(X-O)/26,$=1<>>26,Z&=67108863,this.words[W]=Z}return Y!==0&&(this.words[W]=Y,this.length++),this},C.prototype.isZero=function(){return this.length===1&&this.words[0]===0},C.prototype.cmpn=function(X){var O=X<0;if(this.negative!==0&&!O)return-1;if(this.negative===0&&O)return 1;this.strip();var G;if(this.length>1)G=1;else{O&&(X=-X),Q(X<=67108863,"Number is too big");var $=this.words[0]|0;G=$===X?0:$X.length)return 1;if(this.length=0;G--){var $=this.words[G]|0,Y=X.words[G]|0;if($!==Y){$Y&&(O=1);break}}return O},C.prototype.gtn=function(X){return this.cmpn(X)===1},C.prototype.gt=function(X){return this.cmp(X)===1},C.prototype.gten=function(X){return this.cmpn(X)>=0},C.prototype.gte=function(X){return this.cmp(X)>=0},C.prototype.ltn=function(X){return this.cmpn(X)===-1},C.prototype.lt=function(X){return this.cmp(X)===-1},C.prototype.lten=function(X){return this.cmpn(X)<=0},C.prototype.lte=function(X){return this.cmp(X)<=0},C.prototype.eqn=function(X){return this.cmpn(X)===0},C.prototype.eq=function(X){return this.cmp(X)===0},C.red=function(X){return new n(X)},C.prototype.toRed=function(X){return Q(!this.red,"Already a number in reduction context"),Q(this.negative===0,"red works only with positives"),X.convertTo(this)._forceRed(X)},C.prototype.fromRed=function(){return Q(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},C.prototype._forceRed=function(X){return this.red=X,this},C.prototype.forceRed=function(X){return Q(!this.red,"Already a number in reduction context"),this._forceRed(X)},C.prototype.redAdd=function(X){return Q(this.red,"redAdd works only with red numbers"),this.red.add(this,X)},C.prototype.redIAdd=function(X){return Q(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,X)},C.prototype.redSub=function(X){return Q(this.red,"redSub works only with red numbers"),this.red.sub(this,X)},C.prototype.redISub=function(X){return Q(this.red,"redISub works only with red numbers"),this.red.isub(this,X)},C.prototype.redShl=function(X){return Q(this.red,"redShl works only with red numbers"),this.red.shl(this,X)},C.prototype.redMul=function(X){return Q(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.mul(this,X)},C.prototype.redIMul=function(X){return Q(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.imul(this,X)},C.prototype.redSqr=function(){return Q(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},C.prototype.redISqr=function(){return Q(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},C.prototype.redSqrt=function(){return Q(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},C.prototype.redInvm=function(){return Q(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},C.prototype.redNeg=function(){return Q(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},C.prototype.redPow=function(X){return Q(this.red&&!X.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,X)};var m={k256:null,p224:null,p192:null,p25519:null};function c(X,O){this.name=X,this.p=new C(O,16),this.n=this.p.bitLength(),this.k=new C(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}c.prototype._tmp=function(){var X=new C(null);return X.words=new Array(Math.ceil(this.n/13)),X},c.prototype.ireduce=function(X){var O=X,G;do this.split(O,this.tmp),O=this.imulK(O),O=O.iadd(this.tmp),G=O.bitLength();while(G>this.n);var $=G0?O.isub(this.p):O.strip!==void 0?O.strip():O._strip(),O},c.prototype.split=function(X,O){X.iushrn(this.n,0,O)},c.prototype.imulK=function(X){return X.imul(this.k)};function h(){c.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}R(h,c),h.prototype.split=function(X,O){for(var G=4194303,$=Math.min(X.length,9),Y=0;Y<$;Y++)O.words[Y]=X.words[Y];if(O.length=$,X.length<=9){X.words[0]=0,X.length=1;return}var W=X.words[9];for(O.words[O.length++]=W&G,Y=10;Y>>22,W=Z}W>>>=22,X.words[Y-10]=W,W===0&&X.length>10?X.length-=10:X.length-=9},h.prototype.imulK=function(X){X.words[X.length]=0,X.words[X.length+1]=0,X.length+=2;for(var O=0,G=0;G>>=26,X.words[G]=Y,O=$}return O!==0&&(X.words[X.length++]=O),X},C._prime=function(X){if(m[X])return m[X];var O;if(X==="k256")O=new h;else if(X==="p224")O=new a;else if(X==="p192")O=new i;else if(X==="p25519")O=new G0;else throw new Error("Unknown prime "+X);return m[X]=O,O};function n(X){if(typeof X=="string"){var O=C._prime(X);this.m=O.p,this.prime=O}else Q(X.gtn(1),"modulus must be greater than 1"),this.m=X,this.prime=null}n.prototype._verify1=function(X){Q(X.negative===0,"red works only with positives"),Q(X.red,"red works only with red numbers")},n.prototype._verify2=function(X,O){Q((X.negative|O.negative)===0,"red works only with positives"),Q(X.red&&X.red===O.red,"red works only with red numbers")},n.prototype.imod=function(X){return this.prime?this.prime.ireduce(X)._forceRed(this):X.umod(this.m)._forceRed(this)},n.prototype.neg=function(X){return X.isZero()?X.clone():this.m.sub(X)._forceRed(this)},n.prototype.add=function(X,O){this._verify2(X,O);var G=X.add(O);return G.cmp(this.m)>=0&&G.isub(this.m),G._forceRed(this)},n.prototype.iadd=function(X,O){this._verify2(X,O);var G=X.iadd(O);return G.cmp(this.m)>=0&&G.isub(this.m),G},n.prototype.sub=function(X,O){this._verify2(X,O);var G=X.sub(O);return G.cmpn(0)<0&&G.iadd(this.m),G._forceRed(this)},n.prototype.isub=function(X,O){this._verify2(X,O);var G=X.isub(O);return G.cmpn(0)<0&&G.iadd(this.m),G},n.prototype.shl=function(X,O){return this._verify1(X),this.imod(X.ushln(O))},n.prototype.imul=function(X,O){return this._verify2(X,O),this.imod(X.imul(O))},n.prototype.mul=function(X,O){return this._verify2(X,O),this.imod(X.mul(O))},n.prototype.isqr=function(X){return this.imul(X,X.clone())},n.prototype.sqr=function(X){return this.mul(X,X)},n.prototype.sqrt=function(X){if(X.isZero())return X.clone();var O=this.m.andln(3);if(Q(O%2===1),O===3){var G=this.m.add(new C(1)).iushrn(2);return this.pow(X,G)}for(var $=this.m.subn(1),Y=0;!$.isZero()&&$.andln(1)===0;)Y++,$.iushrn(1);Q(!$.isZero());var W=new C(1).toRed(this),Z=W.redNeg(),K=this.m.subn(1).iushrn(1),J=this.m.bitLength();for(J=new C(2*J*J).toRed(this);this.pow(J,K).cmp(Z)!==0;)J.redIAdd(Z);for(var j=this.pow(J,$),A=this.pow(X,$.addn(1).iushrn(1)),E=this.pow(X,$),_=Y;E.cmp(W)!==0;){for(var s=E,r=0;s.cmp(W)!==0;r++)s=s.redSqr();Q(r<_);var O0=this.pow(j,new C(1).iushln(_-r-1));A=A.redMul(O0),j=O0.redSqr(),E=E.redMul(j),_=r}return A},n.prototype.invm=function(X){var O=X._invmp(this.m);return O.negative!==0?(O.negative=0,this.imod(O).redNeg()):this.imod(O)},n.prototype.pow=function(X,O){if(O.isZero())return new C(1).toRed(this);if(O.cmpn(1)===0)return X.clone();var G=4,$=new Array(1<=0;Y--){for(var j=O.words[Y],A=J-1;A>=0;A--){var E=j>>A&1;if(W!==$[0]&&(W=this.sqr(W)),E===0&&Z===0){K=0;continue}Z<<=1,Z|=E,K++,!(K!==G&&(Y!==0||A!==0))&&(W=this.mul(W,$[Z]),K=0,Z=0)}J=26}return W},n.prototype.convertTo=function(X){var O=X.umod(this.m);return O===X?O.clone():O},n.prototype.convertFrom=function(X){var O=X.clone();return O.red=null,O},C.mont=function(X){return new Z0(X)};function Z0(X){n.call(this,X),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new C(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}R(Z0,n),Z0.prototype.convertTo=function(X){return this.imod(X.ushln(this.shift))},Z0.prototype.convertFrom=function(X){var O=this.imod(X.mul(this.rinv));return O.red=null,O},Z0.prototype.imul=function(X,O){if(X.isZero()||O.isZero())return X.words[0]=0,X.length=1,X;var G=X.imul(O),$=G.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Y=G.isub($).iushrn(this.shift),W=Y;return Y.cmp(this.m)>=0?W=Y.isub(this.m):Y.cmpn(0)<0&&(W=Y.iadd(this.m)),W._forceRed(this)},Z0.prototype.mul=function(X,O){if(X.isZero()||O.isZero())return new C(0)._forceRed(this);var G=X.mul(O),$=G.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Y=G.isub($).iushrn(this.shift),W=Y;return Y.cmp(this.m)>=0?W=Y.isub(this.m):Y.cmpn(0)<0&&(W=Y.iadd(this.m)),W._forceRed(this)},Z0.prototype.invm=function(X){var O=this.imod(X._invmp(this.m).mul(this.r2));return O._forceRed(this)}})(typeof k>"u"||k,B)}),y6=K0((B,k)=>{var V=J5(),N=h0().Buffer;function Q(R,C){return N.from(R.toRed(V.mont(C.modulus)).redPow(new V(C.publicExponent)).fromRed().toArray())}k.exports=Q}),b3=K0((B,k)=>{var V=F1(),N=g2(),Q=a2(),R=M6(),C=w6(),H=J5(),L=y6(),P=f1(),U=h0().Buffer;k.exports=function(F,I,x){var w;F.padding?w=F.padding:x?w=1:w=4;var M=V(F),y;if(w===4)y=z(M,I);else if(w===1)y=T(M,I,x);else if(w===3){if(y=new H(I),y.cmp(M.modulus)>=0)throw new Error("data too long for modulus")}else throw new Error("unknown padding");return x?P(y,M):L(y,M)};function z(F,I){var x=F.modulus.byteLength(),w=I.length,M=Q("sha1").update(U.alloc(0)).digest(),y=M.length,m=2*y;if(w>x-m-2)throw new Error("message too long");var c=U.alloc(x-w-m-2),h=x-y-1,a=N(y),i=C(U.concat([M,c,U.alloc(1,1),I],h),R(a,h)),G0=C(a,R(i,y));return new H(U.concat([U.alloc(1),G0,i],x))}function T(F,I,x){var w=I.length,M=F.modulus.byteLength();if(w>M-11)throw new Error("message too long");var y;return x?y=U.alloc(M-w-3,255):y=q(M-w-3),new H(U.concat([U.from([0,x?1:2]),y,U.alloc(1),I],M))}function q(F){for(var I=U.allocUnsafe(F),x=0,w=N(F*2),M=0,y;x{var V=F1(),N=M6(),Q=w6(),R=J5(),C=f1(),H=a2(),L=y6(),P=h0().Buffer;k.exports=function(q,F,I){var x;q.padding?x=q.padding:I?x=1:x=4;var w=V(q),M=w.modulus.byteLength();if(F.length>M||new R(F).cmp(w.modulus)>=0)throw new Error("decryption error");var y;I?y=L(new R(F),w):y=C(F,w);var m=P.alloc(M-y.length);if(y=P.concat([m,y],M),x===4)return U(w,y);if(x===1)return z(w,y,I);if(x===3)return y;throw new Error("unknown padding")};function U(q,F){var I=q.modulus.byteLength(),x=H("sha1").update(P.alloc(0)).digest(),w=x.length;if(F[0]!==0)throw new Error("decryption error");var M=F.slice(1,w+1),y=F.slice(w+1),m=Q(M,N(y,w)),c=Q(y,N(m,I-w-1));if(T(x,c.slice(0,w)))throw new Error("decryption error");for(var h=w;c[h]===0;)h++;if(c[h++]!==1)throw new Error("decryption error");return c.slice(h)}function z(q,F,I){for(var x=F.slice(0,2),w=2,M=0;F[w++]!==0;)if(w>=F.length){M++;break}var y=F.slice(2,w-1);if((x.toString("hex")!=="0002"&&!I||x.toString("hex")!=="0001"&&I)&&M++,y.length<8&&M++,M)throw new Error("decryption error");return F.slice(w)}function T(q,F){q=P.from(q),F=P.from(F);var I=0,x=q.length;q.length!==F.length&&(I++,x=Math.min(q.length,F.length));for(var w=-1;++w{B.publicEncrypt=b3(),B.privateDecrypt=d3(),B.privateEncrypt=function(k,V){return B.publicEncrypt(k,V,!0)},B.publicDecrypt=function(k,V){return B.privateDecrypt(k,V,!0)}}),l3=K0((B)=>{function k(){throw new Error(`secure random number generation not supported by this browser +use chrome, FireFox or Internet Explorer 11`)}var V=h0(),N=g2(),Q=V.Buffer,R=V.kMaxLength,C=global.crypto||global.msCrypto,H=Math.pow(2,32)-1;function L(q,F){if(typeof q!="number"||q!==q)throw new TypeError("offset must be a number");if(q>H||q<0)throw new TypeError("offset must be a uint32");if(q>R||q>F)throw new RangeError("offset out of range")}function P(q,F,I){if(typeof q!="number"||q!==q)throw new TypeError("size must be a number");if(q>H||q<0)throw new TypeError("size must be a uint32");if(q+F>I||q>R)throw new RangeError("buffer too small")}C&&C.getRandomValues?(B.randomFill=U,B.randomFillSync=T):(B.randomFill=k,B.randomFillSync=k);function U(q,F,I,x){if(!Q.isBuffer(q)&&!(q instanceof global.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof F=="function")x=F,F=0,I=q.length;else if(typeof I=="function")x=I,I=q.length-F;else if(typeof x!="function")throw new TypeError('"cb" argument must be a function');return L(F,q.length),P(I,F,q.length),z(q,F,I,x)}function z(q,F,I,x){var w=q.buffer,M=new Uint8Array(w,F,I);if(C.getRandomValues(M),x){process.nextTick(function(){x(null,q)});return}return q;var y}function T(q,F,I){if(typeof F>"u"&&(F=0),!Q.isBuffer(q)&&!(q instanceof global.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return L(F,q.length),I===void 0&&(I=q.length-F),P(I,F,q.length),z(q,F,I)}}),_6=K0((B)=>{B.randomBytes=B.rng=B.pseudoRandomBytes=B.prng=g2(),B.createHash=B.Hash=a2(),B.createHmac=B.Hmac=t5();var k=y8(),V=Object.keys(k),N=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(V);B.getHashes=function(){return N};var Q=G6();B.pbkdf2=Q.pbkdf2,B.pbkdf2Sync=Q.pbkdf2Sync;var R=r8();B.Cipher=R.Cipher,B.createCipher=R.createCipher,B.Cipheriv=R.Cipheriv,B.createCipheriv=R.createCipheriv,B.Decipher=R.Decipher,B.createDecipher=R.createDecipher,B.Decipheriv=R.Decipheriv,B.createDecipheriv=R.createDecipheriv,B.getCiphers=R.getCiphers,B.listCiphers=R.listCiphers;var C=J3();B.DiffieHellmanGroup=C.DiffieHellmanGroup,B.createDiffieHellmanGroup=C.createDiffieHellmanGroup,B.getDiffieHellman=C.getDiffieHellman,B.createDiffieHellman=C.createDiffieHellman,B.DiffieHellman=C.DiffieHellman;var H=m3();B.createSign=H.createSign,B.Sign=H.Sign,B.createVerify=H.createVerify,B.Verify=H.Verify,B.createECDH=c3();var L=h3();B.publicEncrypt=L.publicEncrypt,B.privateEncrypt=L.privateEncrypt,B.publicDecrypt=L.publicDecrypt,B.privateDecrypt=L.privateDecrypt;var P=l3();B.randomFill=P.randomFill,B.randomFillSync=P.randomFillSync,B.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join(` +`))},B.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}}),g6={};Z1(g6,{DEFAULT_ENCODING:()=>_2,default:()=>m6,getCurves:()=>G5,getRandomValues:()=>O5,randomUUID:()=>$5,scrypt:()=>D1,scryptSync:()=>T1,timingSafeEqual:()=>n2,webcrypto:()=>Y5});S1(g6,E2(_6()));o3=E2(_6()),u3=["p192","p224","p256","p384","p521","curve25519","ed25519","secp256k1","secp224r1","prime256v1","prime192v1","ed25519","secp384r1","secp521r1"],n2="timingSafeEqual"in crypto?(B,k)=>{let{byteLength:V}=B,{byteLength:N}=k;if(typeof V!="number"||typeof N!="number")throw new TypeError("Input must be an array buffer view");if(V!==N)throw new RangeError("Input buffers must have the same length");return crypto.timingSafeEqual(B,k)}:void 0,T1="scryptSync"in crypto?(B,k,V,N)=>{let Q=crypto.scryptSync(B,k,V,N);return _2!=="buffer"?new Buffer(Q).toString(_2):new Buffer(Q)}:void 0,D1="scryptSync"in crypto?function(B,k,V,N,Q){if(typeof N=="function"&&(Q=N,N=void 0),typeof Q!="function"){var R=new TypeError("callback must be a function");throw R.code="ERR_INVALID_CALLBACK",R}try{let C=crypto.scryptSync(B,k,V,N);process.nextTick(Q,null,_2!=="buffer"?new Buffer(C).toString(_2):new Buffer(C))}catch(C){throw C}}:void 0;n2&&(Object.defineProperty(n2,"name",{value:"::bunternal::"}),Object.defineProperty(D1,"name",{value:"::bunternal::"}),Object.defineProperty(T1,"name",{value:"::bunternal::"}));Y5=crypto,m6={...o3,getRandomValues:O5,randomUUID:$5,timingSafeEqual:n2,scryptSync:T1,scrypt:D1,webcrypto:Y5,getCurves:G5};/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT - *//*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh *//*! safe-buffer. MIT License. Feross Aboukhadijeh */});var I6=m6((y3,d2)=>{var L6=function(E,I,F){if(I.length!==4)throw new j0.exception.invalid("invalid aes block size");var L=E.b[F],H=I[0]^L[0],k=I[F?3:1]^L[1],Q=I[2]^L[2];I=I[F?1:3]^L[3];var O,N,U,W=L.length/4-2,Z,T=4,B=[0,0,0,0];O=E.s[F],E=O[0];var P=O[1],q=O[2],x=O[3],w=O[4];for(Z=0;Z>>24]^P[k>>16&255]^q[Q>>8&255]^x[I&255]^L[T],N=E[k>>>24]^P[Q>>16&255]^q[I>>8&255]^x[H&255]^L[T+1],U=E[Q>>>24]^P[I>>16&255]^q[H>>8&255]^x[k&255]^L[T+2],I=E[I>>>24]^P[H>>16&255]^q[k>>8&255]^x[Q&255]^L[T+3],T+=4,H=O,k=N,Q=U;for(Z=0;4>Z;Z++)B[F?3&-Z:Z]=w[H>>>24]<<24^w[k>>16&255]<<16^w[Q>>8&255]<<8^w[I&255]^L[T++],O=H,H=k,k=Q,Q=I,I=O;return B},t1=function(E,I){var F,L,H,k=E.F,Q=E.b,O=k[0],N=k[1],U=k[2],W=k[3],Z=k[4],T=k[5],B=k[6],P=k[7];for(F=0;64>F;F++)16>F?L=I[F]:(L=I[F+1&15],H=I[F+14&15],L=I[F&15]=(L>>>7^L>>>18^L>>>3^L<<25^L<<14)+(H>>>17^H>>>19^H>>>10^H<<15^H<<13)+I[F&15]+I[F+9&15]|0),L=L+P+(Z>>>6^Z>>>11^Z>>>25^Z<<26^Z<<21^Z<<7)+(B^Z&(T^B))+Q[F],P=B,B=T,T=Z,Z=W+L|0,W=U,U=N,N=O,O=L+(N&U^W&(N^U))+(N>>>2^N>>>13^N>>>22^N<<30^N<<19^N<<10)|0;k[0]=k[0]+O|0,k[1]=k[1]+N|0,k[2]=k[2]+U|0,k[3]=k[3]+W|0,k[4]=k[4]+Z|0,k[5]=k[5]+T|0,k[6]=k[6]+B|0,k[7]=k[7]+P|0},N6=function(E,I){var F,L=j0.random.K[E],H=[];for(F in L)L.hasOwnProperty(F)&&H.push(L[F]);for(F=0;FI&&(E.h[I]=E.h[I]+1|0,!E.h[I]);I++);return E.L.encrypt(E.h)},n2=function(E,I){return function(){I.apply(E,arguments)}},j0={cipher:{},hash:{},keyexchange:{},mode:{},misc:{},codec:{},exception:{corrupt:function(E){this.toString=function(){return"CORRUPT: "+this.message},this.message=E},invalid:function(E){this.toString=function(){return"INVALID: "+this.message},this.message=E},bug:function(E){this.toString=function(){return"BUG: "+this.message},this.message=E},notReady:function(E){this.toString=function(){return"NOT READY: "+this.message},this.message=E}}};j0.cipher.aes=function(E){this.s[0][0][0]||this.O();var I,F,L,H,k=this.s[0][4],Q=this.s[1];I=E.length;var O=1;if(I!==4&&I!==6&&I!==8)throw new j0.exception.invalid("invalid aes key size");this.b=[L=E.slice(0),H=[]];for(E=I;E<4*I+28;E++){if(F=L[E-1],E%I===0||I===8&&E%I===4)F=k[F>>>24]<<24^k[F>>16&255]<<16^k[F>>8&255]<<8^k[F&255],E%I===0&&(F=F<<8^F>>>24^O<<24,O=O<<1^283*(O>>7));L[E]=L[E-I]^F}for(I=0;E;I++,E--)F=L[I&3?E:E-4],H[I]=4>=E||4>I?F:Q[0][k[F>>>24]]^Q[1][k[F>>16&255]]^Q[2][k[F>>8&255]]^Q[3][k[F&255]]};j0.cipher.aes.prototype={encrypt:function(E){return L6(this,E,0)},decrypt:function(E){return L6(this,E,1)},s:[[[],[],[],[],[]],[[],[],[],[],[]]],O:function(){var E=this.s[0],I=this.s[1],F=E[4],L=I[4],H,k,Q,O=[],N=[],U,W,Z,T;for(H=0;256>H;H++)N[(O[H]=H<<1^283*(H>>7))^H]=H;for(k=Q=0;!F[k];k^=U||1,Q=N[Q]||1)for(Z=Q^Q<<1^Q<<2^Q<<3^Q<<4,Z=Z>>8^Z&255^99,F[k]=Z,L[Z]=k,W=O[H=O[U=O[k]]],T=16843009*W^65537*H^257*U^16843008*k,W=257*O[Z]^16843008*Z,H=0;4>H;H++)E[H][k]=W=W<<24^W>>>8,I[H][Z]=T=T<<24^T>>>8;for(H=0;5>H;H++)E[H]=E[H].slice(0),I[H]=I[H].slice(0)}};j0.bitArray={bitSlice:function(E,I,F){return E=j0.bitArray.$(E.slice(I/32),32-(I&31)).slice(1),F===void 0?E:j0.bitArray.clamp(E,F-I)},extract:function(E,I,F){var L=Math.floor(-I-F&31);return((I+F-1^I)&-32?E[I/32|0]<<32-L^E[I/32+1|0]>>>L:E[I/32|0]>>>L)&(1<>I-1,1)),E},partial:function(E,I,F){return E===32?I:(F?I|0:I<<32-E)+1099511627776*E},getPartial:function(E){return Math.round(E/1099511627776)||32},equal:function(E,I){if(j0.bitArray.bitLength(E)!==j0.bitArray.bitLength(I))return!1;var F=0,L;for(L=0;L>>I),F=E[H]<<32-I;return H=E.length?E[E.length-1]:0,E=j0.bitArray.getPartial(H),L.push(j0.bitArray.partial(I+E&31,32>>24|F>>>8&65280|(F&65280)<<8|F<<24;return E}};j0.codec.utf8String={fromBits:function(E){var I="",F=j0.bitArray.bitLength(E),L,H;for(L=0;L>>8>>>8>>>8),H<<=8;return decodeURIComponent(escape(I))},toBits:function(E){E=unescape(encodeURIComponent(E));var I=[],F,L=0;for(F=0;F>>Q)>>>H),QW){if(!I)try{return j0.codec.base32hex.toBits(E)}catch(T){}throw new j0.exception.invalid("this isn't "+Z+"!")}O>H?(O-=H,k.push(U^W>>>O),U=W<>>H)>>>26),6>H?(Q=E[F]<<6-H,H+=26,F++):(Q<<=6,H-=6);for(;L.length&3&&!I;)L+="=";return L},toBits:function(E,I){E=E.replace(/\s|=/g,"");var F=[],L,H=0,k=j0.codec.base64.B,Q=0,O;I&&(k=k.substr(0,62)+"-_");for(L=0;LO)throw new j0.exception.invalid("this isn't base64!");26>>H),Q=O<<32-H):(H+=6,Q^=O<<32-H)}return H&56&&F.push(j0.bitArray.partial(H&56,Q,1)),F}};j0.codec.base64url={fromBits:function(E){return j0.codec.base64.fromBits(E,1,1)},toBits:function(E){return j0.codec.base64.toBits(E,1)}};j0.hash.sha256=function(E){this.b[0]||this.O(),E?(this.F=E.F.slice(0),this.A=E.A.slice(0),this.l=E.l):this.reset()};j0.hash.sha256.hash=function(E){return new j0.hash.sha256().update(E).finalize()};j0.hash.sha256.prototype={blockSize:512,reset:function(){return this.F=this.Y.slice(0),this.A=[],this.l=0,this},update:function(E){typeof E==="string"&&(E=j0.codec.utf8String.toBits(E));var I,F=this.A=j0.bitArray.concat(this.A,E);if(I=this.l,E=this.l=I+j0.bitArray.bitLength(E),9007199254740991I;F++){H=!0;for(L=2;L*L<=F;L++)if(F%L===0){H=!1;break}H&&(8>I&&(this.Y[I]=E(Math.pow(F,0.5))),this.b[I]=E(Math.pow(F,0.3333333333333333)),I++)}}};j0.mode.ccm={name:"ccm",G:[],listenProgress:function(E){j0.mode.ccm.G.push(E)},unListenProgress:function(E){E=j0.mode.ccm.G.indexOf(E),-1N)throw new j0.exception.invalid("ccm: iv must be at least 7 bytes");for(k=2;4>k&&U>>>8*k;k++);return k<15-N&&(k=15-N),F=O.clamp(F,8*(15-k)),I=j0.mode.ccm.V(E,I,F,L,H,k),Q=j0.mode.ccm.C(E,Q,F,I,H,k),O.concat(Q.data,Q.tag)},decrypt:function(E,I,F,L,H){H=H||64,L=L||[];var k=j0.bitArray,Q=k.bitLength(F)/8,U=k.bitLength(I),O=k.clamp(I,U-H),N=k.bitSlice(I,U-H),U=(U-H)/8;if(7>Q)throw new j0.exception.invalid("ccm: iv must be at least 7 bytes");for(I=2;4>I&&U>>>8*I;I++);if(I<15-Q&&(I=15-Q),F=k.clamp(F,8*(15-I)),O=j0.mode.ccm.C(E,O,F,N,H,I),E=j0.mode.ccm.V(E,O.data,F,L,H,I),!k.equal(O.tag,E))throw new j0.exception.corrupt("ccm: tag doesn't match");return O.data},na:function(E,I,F,L,H,k){var Q=[],O=j0.bitArray,N=O.i;if(L=[O.partial(8,(I.length?64:0)|L-2<<2|k-1)],L=O.concat(L,F),L[3]|=H,L=E.encrypt(L),I.length)for(F=O.bitLength(I)/8,65279>=F?Q=[O.partial(16,F)]:4294967295>=F&&(Q=O.concat([O.partial(16,65534)],[F])),Q=O.concat(Q,I),I=0;IH||16W&&(j0.mode.ccm.fa(Q/N),W+=Z),F[3]++,H=E.encrypt(F),I[Q]^=H[0],I[Q+1]^=H[1],I[Q+2]^=H[2],I[Q+3]^=H[3];return{tag:L,data:O.clamp(I,U)}}};j0.mode.ocb2={name:"ocb2",encrypt:function(E,I,F,L,H,k){if(j0.bitArray.bitLength(F)!==128)throw new j0.exception.invalid("ocb iv must be 128 bits");var Q,O=j0.mode.ocb2.S,N=j0.bitArray,U=N.i,W=[0,0,0,0];F=O(E.encrypt(F));var Z,T=[];L=L||[],H=H||64;for(Q=0;Q+4H.bitLength(F)&&(O=k(O,L(O)),F=H.concat(F,[-2147483648,0,0,0])),Q=k(Q,F),E.encrypt(k(L(k(O,L(O))),Q))},S:function(E){return[E[0]<<1^E[1]>>>31,E[1]<<1^E[2]>>>31,E[2]<<1^E[3]>>>31,E[3]<<1^135*(E[0]>>>31)]}};j0.mode.gcm={name:"gcm",encrypt:function(E,I,F,L,H){var k=I.slice(0);return I=j0.bitArray,L=L||[],E=j0.mode.gcm.C(!0,E,k,L,F,H||128),I.concat(E.data,E.tag)},decrypt:function(E,I,F,L,H){var k=I.slice(0),Q=j0.bitArray,O=Q.bitLength(k);if(H=H||128,L=L||[],H<=O?(I=Q.bitSlice(k,O-H),k=Q.bitSlice(k,0,O-H)):(I=k,k=[]),E=j0.mode.gcm.C(!1,E,k,L,F,H),!Q.equal(E.tag,I))throw new j0.exception.corrupt("gcm: tag doesn't match");return E.data},ka:function(E,I){var F,L,H,k,Q,O=j0.bitArray.i;H=[0,0,0,0],k=I.slice(0);for(F=0;128>F;F++){(L=(E[Math.floor(F/32)]&1<<31-F%32)!==0)&&(H=O(H,k)),Q=(k[3]&1)!==0;for(L=3;0>>1|(k[L-1]&1)<<31;k[0]>>>=1,Q&&(k[0]^=-520093696)}return H},j:function(E,I,F){var L,H=F.length;I=I.slice(0);for(L=0;LH&&(E=I.hash(E));for(L=0;LL||0>F)throw new j0.exception.invalid("invalid params to pbkdf2");typeof E==="string"&&(E=j0.codec.utf8String.toBits(E)),typeof I==="string"&&(I=j0.codec.utf8String.toBits(I)),H=H||j0.misc.hmac,E=new H(E);var k,Q,O,N,U=[],W=j0.bitArray;for(N=1;32*U.length<(L||1);N++){H=k=E.encrypt(W.concat(I,[N]));for(Q=1;QQ;Q++)H.push(4294967296*Math.random()|0);for(Q=0;Q=1<this.o&&(this.o=k),this.P++,this.b=j0.hash.sha256.hash(this.b.concat(H)),this.L=new j0.cipher.aes(this.b);for(L=0;4>L&&(this.h[L]=this.h[L]+1|0,!this.h[L]);L++);}for(L=0;L>>1;this.c[Q].update([L,this.N++,2,I,k,E.length].concat(E))}break;case"string":I===void 0&&(I=E.length),this.c[Q].update([L,this.N++,3,I,k,E.length]),this.c[Q].update(E);break;default:N=1}if(N)throw new j0.exception.bug("random: addEntropy only supports number, array of numbers or string");this.m[Q]+=I,this.f+=I,O===this.u&&(this.isReady()!==this.u&&N6("seeded",Math.max(this.o,this.f)),N6("progress",this.getProgress()))},isReady:function(E){return E=this.T[E!==void 0?E:this.M],this.o&&this.o>=E?this.m[0]>this.ba&&(new Date()).valueOf()>this.Z?this.J|this.I:this.I:this.f>=E?this.J|this.u:this.u},getProgress:function(E){return E=this.T[E?E:this.M],this.o>=E?1:this.f>E?1:this.f/E},startCollectors:function(){if(!this.D){if(this.a={loadTimeCollector:n2(this,this.ma),mouseCollector:n2(this,this.oa),keyboardCollector:n2(this,this.la),accelerometerCollector:n2(this,this.ea),touchCollector:n2(this,this.qa)},window.addEventListener)window.addEventListener("load",this.a.loadTimeCollector,!1),window.addEventListener("mousemove",this.a.mouseCollector,!1),window.addEventListener("keypress",this.a.keyboardCollector,!1),window.addEventListener("devicemotion",this.a.accelerometerCollector,!1),window.addEventListener("touchmove",this.a.touchCollector,!1);else if(document.attachEvent)document.attachEvent("onload",this.a.loadTimeCollector),document.attachEvent("onmousemove",this.a.mouseCollector),document.attachEvent("keypress",this.a.keyboardCollector);else throw new j0.exception.bug("can't attach event");this.D=!0}},stopCollectors:function(){this.D&&(window.removeEventListener?(window.removeEventListener("load",this.a.loadTimeCollector,!1),window.removeEventListener("mousemove",this.a.mouseCollector,!1),window.removeEventListener("keypress",this.a.keyboardCollector,!1),window.removeEventListener("devicemotion",this.a.accelerometerCollector,!1),window.removeEventListener("touchmove",this.a.touchCollector,!1)):document.detachEvent&&(document.detachEvent("onload",this.a.loadTimeCollector),document.detachEvent("onmousemove",this.a.mouseCollector),document.detachEvent("keypress",this.a.keyboardCollector)),this.D=!1)},addEventListener:function(E,I){this.K[E][this.ga++]=I},removeEventListener:function(E,I){var F,L,H=this.K[E],k=[];for(L in H)H.hasOwnProperty(L)&&H[L]===I&&k.push(L);for(F=0;F=k.iter||k.ts!==64&&k.ts!==96&&k.ts!==128||k.ks!==128&&k.ks!==192&&k.ks!==256||2>k.iv.length||4=I.iter||I.ts!==64&&I.ts!==96&&I.ts!==128||I.ks!==128&&I.ks!==192&&I.ks!==256||!I.iv||2>I.iv.length||4{{return q3}},encrypt:()=>{{return B3}},decrypt:()=>{{return I3}}});var D2;(function(F){F[F["Sjcl"]=0]="Sjcl";F[F["WebCrypto"]=1]="WebCrypto"})(D2||(D2={}));var t2=g6(I6(),1);var X5=async(E,I)=>{const F=typeof I==="string"?I:I.data;return t2.default.decrypt(E,F)},B6=async(E,I)=>{const F=t2.default.encrypt(E,I);return{algo:D2.Sjcl,data:F,iv:F.iv}},q6=async()=>{return t2.default.codec.base64.fromBits(t2.default.random.randomWords(8,10))},R6=(E)=>{return E[E.length-1]==="="};class e2{constructor(E,I){if(!E||E.length!=64)throw Error("Charset must contain 64 characters");this._charset=E,this._noPadding=!!I,this._valid=new RegExp("^["+this._charset.replace("-","\\-")+"]+={0,2}$")}Encode(E){const I=E.byteLength;if(!I)return"";const F=new Uint8Array(E);let L="";for(let H=0;H>2]+this._charset[(F[H]&3)<<4|F[H+1]>>4]+this._charset[(F[H+1]&15)<<2|F[H+2]>>6]+this._charset[F[H+2]&63];if(I%3==2){if(L=L.substring(0,L.length-1),!this._noPadding)L+="="}else if(I%3==1){if(L=L.substring(0,L.length-2),!this._noPadding)L+="=="}return L}Decode(E){if(E=(E||"").replace(/[\s]/g,""),!E)return new ArrayBuffer(0);if(!this._valid.test(E))throw Error("Invalid base64 input sequence");let I=Math.floor(E.length*0.75);if(E[E.length-2]=="=")I-=2;else if(E[E.length-1]=="=")I--;const F=new Uint8Array(I);let L,H,k,Q,O=0,N=0;while(O>4,F[O++]=(H&15)<<4|k>>2,F[O++]=(k&3)<<6|Q;return F.buffer}}function G5(E){return E6.Encode(E)}function Y5(E){return E6.Decode(E)}var E6=new e2("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/");function J5(E){return x6.Encode(E)}function C5(E){return x6.Decode(E)}var x6=new e2("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",!0);var z5=async(E,I)=>{return await crypto.subtle.decrypt({name:"AES-GCM",iv:I.iv},await S6(E),Y5(I.data))},v6=async(E,I)=>{const F=crypto.getRandomValues(new Uint8Array(12)),L=await crypto.subtle.encrypt({name:"AES-GCM",iv:F},await S6(E),I);return{algo:D2.WebCrypto,data:G5(L),iv:F}},S6=async(E)=>{return crypto.subtle.importKey("raw",C5(E),{name:"AES-GCM"},!1,["encrypt","decrypt"])},A6=async()=>{const E=await crypto.subtle.generateKey({name:"AES-GCM",length:256},!0,["encrypt","decrypt"]);return J5(await crypto.subtle.exportKey("raw",E))};var I3=async(E,I,F)=>{if(F!==void 0)return Q5(F)?X5(E,I):z5(E,I);else return R6(E)?X5(E,I):z5(E,I)},B3=async(E,I,F=D2.WebCrypto)=>{let L;if(Q5(F))L=B6(E,I);else{if(typeof I==="string")I=(new TextEncoder()).encode(I).buffer;L=v6(E,I)}return L},q3=async(E=D2.WebCrypto)=>{return Q5(E)?q6():A6()},Q5=(E)=>{return E===D2.Sjcl};export{M6 as lufiCrypto,D2 as CryptoAlgorithm}; + *//*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh *//*! safe-buffer. MIT License. Feross Aboukhadijeh */});var l6=j8((Q4,d2)=>{function b6(B,k,V){if(k.length!==4)throw new j0.exception.invalid("invalid aes block size");var N=B.b[V],Q=k[0]^N[0],R=k[V?3:1]^N[1],C=k[2]^N[2];k=k[V?1:3]^N[3];var H,L,P,U=N.length/4-2,z,T=4,q=[0,0,0,0];H=B.s[V],B=H[0];var F=H[1],I=H[2],x=H[3],w=H[4];for(z=0;z>>24]^F[R>>16&255]^I[C>>8&255]^x[k&255]^N[T],L=B[R>>>24]^F[C>>16&255]^I[k>>8&255]^x[Q&255]^N[T+1],P=B[C>>>24]^F[k>>16&255]^I[Q>>8&255]^x[R&255]^N[T+2],k=B[k>>>24]^F[Q>>16&255]^I[R>>8&255]^x[C&255]^N[T+3],T+=4,Q=H,R=L,C=P;for(z=0;4>z;z++)q[V?3&-z:z]=w[Q>>>24]<<24^w[R>>16&255]<<16^w[C>>8&255]<<8^w[k&255]^N[T++],H=Q,Q=R,R=C,C=k,k=H;return q}function C5(B,k){var V,N,Q,R=B.F,C=B.b,H=R[0],L=R[1],P=R[2],U=R[3],z=R[4],T=R[5],q=R[6],F=R[7];for(V=0;64>V;V++)16>V?N=k[V]:(N=k[V+1&15],Q=k[V+14&15],N=k[V&15]=(N>>>7^N>>>18^N>>>3^N<<25^N<<14)+(Q>>>17^Q>>>19^Q>>>10^Q<<15^Q<<13)+k[V&15]+k[V+9&15]|0),N=N+F+(z>>>6^z>>>11^z>>>25^z<<26^z<<21^z<<7)+(q^z&(T^q))+C[V],F=q,q=T,T=z,z=U+N|0,U=P,P=L,L=H,H=N+(L&P^U&(L^P))+(L>>>2^L>>>13^L>>>22^L<<30^L<<19^L<<10)|0;R[0]=R[0]+H|0,R[1]=R[1]+L|0,R[2]=R[2]+P|0,R[3]=R[3]+U|0,R[4]=R[4]+z|0,R[5]=R[5]+T|0,R[6]=R[6]+q|0,R[7]=R[7]+F|0}function d6(B,k){var V,N=j0.random.K[B],Q=[];for(V in N)N.hasOwnProperty(V)&&Q.push(N[V]);for(V=0;Vk&&(B.h[k]=B.h[k]+1|0,!B.h[k]);k++);return B.L.encrypt(B.h)}function e2(B,k){return function(){k.apply(B,arguments)}}var j0={cipher:{},hash:{},keyexchange:{},mode:{},misc:{},codec:{},exception:{corrupt:function(B){this.toString=function(){return"CORRUPT: "+this.message},this.message=B},invalid:function(B){this.toString=function(){return"INVALID: "+this.message},this.message=B},bug:function(B){this.toString=function(){return"BUG: "+this.message},this.message=B},notReady:function(B){this.toString=function(){return"NOT READY: "+this.message},this.message=B}}};j0.cipher.aes=function(B){this.s[0][0][0]||this.O();var k,V,N,Q,R=this.s[0][4],C=this.s[1];k=B.length;var H=1;if(k!==4&&k!==6&&k!==8)throw new j0.exception.invalid("invalid aes key size");this.b=[N=B.slice(0),Q=[]];for(B=k;B<4*k+28;B++){if(V=N[B-1],B%k===0||k===8&&B%k===4)V=R[V>>>24]<<24^R[V>>16&255]<<16^R[V>>8&255]<<8^R[V&255],B%k===0&&(V=V<<8^V>>>24^H<<24,H=H<<1^283*(H>>7));N[B]=N[B-k]^V}for(k=0;B;k++,B--)V=N[k&3?B:B-4],Q[k]=4>=B||4>k?V:C[0][R[V>>>24]]^C[1][R[V>>16&255]]^C[2][R[V>>8&255]]^C[3][R[V&255]]};j0.cipher.aes.prototype={encrypt:function(B){return b6(this,B,0)},decrypt:function(B){return b6(this,B,1)},s:[[[],[],[],[],[]],[[],[],[],[],[]]],O:function(){var B=this.s[0],k=this.s[1],V=B[4],N=k[4],Q,R,C,H=[],L=[],P,U,z,T;for(Q=0;256>Q;Q++)L[(H[Q]=Q<<1^283*(Q>>7))^Q]=Q;for(R=C=0;!V[R];R^=P||1,C=L[C]||1)for(z=C^C<<1^C<<2^C<<3^C<<4,z=z>>8^z&255^99,V[R]=z,N[z]=R,U=H[Q=H[P=H[R]]],T=16843009*U^65537*Q^257*P^16843008*R,U=257*H[z]^16843008*z,Q=0;4>Q;Q++)B[Q][R]=U=U<<24^U>>>8,k[Q][z]=T=T<<24^T>>>8;for(Q=0;5>Q;Q++)B[Q]=B[Q].slice(0),k[Q]=k[Q].slice(0)}};j0.bitArray={bitSlice:function(B,k,V){return B=j0.bitArray.$(B.slice(k/32),32-(k&31)).slice(1),V===void 0?B:j0.bitArray.clamp(B,V-k)},extract:function(B,k,V){var N=Math.floor(-k-V&31);return((k+V-1^k)&-32?B[k/32|0]<<32-N^B[k/32+1|0]>>>N:B[k/32|0]>>>N)&(1<>k-1,1)),B},partial:function(B,k,V){return B===32?k:(V?k|0:k<<32-B)+1099511627776*B},getPartial:function(B){return Math.round(B/1099511627776)||32},equal:function(B,k){if(j0.bitArray.bitLength(B)!==j0.bitArray.bitLength(k))return!1;var V=0,N;for(N=0;N>>k),V=B[Q]<<32-k;return Q=B.length?B[B.length-1]:0,B=j0.bitArray.getPartial(Q),N.push(j0.bitArray.partial(k+B&31,32>>24|V>>>8&65280|(V&65280)<<8|V<<24;return B}};j0.codec.utf8String={fromBits:function(B){var k="",V=j0.bitArray.bitLength(B),N,Q;for(N=0;N>>8>>>8>>>8),Q<<=8;return decodeURIComponent(escape(k))},toBits:function(B){B=unescape(encodeURIComponent(B));var k=[],V,N=0;for(V=0;V>>C)>>>Q),CU){if(!k)try{return j0.codec.base32hex.toBits(B)}catch(T){}throw new j0.exception.invalid("this isn't "+z+"!")}H>Q?(H-=Q,R.push(P^U>>>H),P=U<>>Q)>>>26),6>Q?(C=B[V]<<6-Q,Q+=26,V++):(C<<=6,Q-=6);for(;N.length&3&&!k;)N+="=";return N},toBits:function(B,k){B=B.replace(/\s|=/g,"");var V=[],N,Q=0,R=j0.codec.base64.B,C=0,H;k&&(R=R.substr(0,62)+"-_");for(N=0;NH)throw new j0.exception.invalid("this isn't base64!");26>>Q),C=H<<32-Q):(Q+=6,C^=H<<32-Q)}return Q&56&&V.push(j0.bitArray.partial(Q&56,C,1)),V}};j0.codec.base64url={fromBits:function(B){return j0.codec.base64.fromBits(B,1,1)},toBits:function(B){return j0.codec.base64.toBits(B,1)}};j0.hash.sha256=function(B){this.b[0]||this.O(),B?(this.F=B.F.slice(0),this.A=B.A.slice(0),this.l=B.l):this.reset()};j0.hash.sha256.hash=function(B){return new j0.hash.sha256().update(B).finalize()};j0.hash.sha256.prototype={blockSize:512,reset:function(){return this.F=this.Y.slice(0),this.A=[],this.l=0,this},update:function(B){typeof B==="string"&&(B=j0.codec.utf8String.toBits(B));var k,V=this.A=j0.bitArray.concat(this.A,B);if(k=this.l,B=this.l=k+j0.bitArray.bitLength(B),9007199254740991k;V++){Q=!0;for(N=2;N*N<=V;N++)if(V%N===0){Q=!1;break}Q&&(8>k&&(this.Y[k]=B(Math.pow(V,0.5))),this.b[k]=B(Math.pow(V,0.3333333333333333)),k++)}}};j0.mode.ccm={name:"ccm",G:[],listenProgress:function(B){j0.mode.ccm.G.push(B)},unListenProgress:function(B){B=j0.mode.ccm.G.indexOf(B),-1L)throw new j0.exception.invalid("ccm: iv must be at least 7 bytes");for(R=2;4>R&&P>>>8*R;R++);return R<15-L&&(R=15-L),V=H.clamp(V,8*(15-R)),k=j0.mode.ccm.V(B,k,V,N,Q,R),C=j0.mode.ccm.C(B,C,V,k,Q,R),H.concat(C.data,C.tag)},decrypt:function(B,k,V,N,Q){Q=Q||64,N=N||[];var R=j0.bitArray,C=R.bitLength(V)/8,P=R.bitLength(k),H=R.clamp(k,P-Q),L=R.bitSlice(k,P-Q),P=(P-Q)/8;if(7>C)throw new j0.exception.invalid("ccm: iv must be at least 7 bytes");for(k=2;4>k&&P>>>8*k;k++);if(k<15-C&&(k=15-C),V=R.clamp(V,8*(15-k)),H=j0.mode.ccm.C(B,H,V,L,Q,k),B=j0.mode.ccm.V(B,H.data,V,N,Q,k),!R.equal(H.tag,B))throw new j0.exception.corrupt("ccm: tag doesn't match");return H.data},na:function(B,k,V,N,Q,R){var C=[],H=j0.bitArray,L=H.i;if(N=[H.partial(8,(k.length?64:0)|N-2<<2|R-1)],N=H.concat(N,V),N[3]|=Q,N=B.encrypt(N),k.length)for(V=H.bitLength(k)/8,65279>=V?C=[H.partial(16,V)]:4294967295>=V&&(C=H.concat([H.partial(16,65534)],[V])),C=H.concat(C,k),k=0;kQ||16U&&(j0.mode.ccm.fa(C/L),U+=z),V[3]++,Q=B.encrypt(V),k[C]^=Q[0],k[C+1]^=Q[1],k[C+2]^=Q[2],k[C+3]^=Q[3];return{tag:N,data:H.clamp(k,P)}}};j0.mode.ocb2={name:"ocb2",encrypt:function(B,k,V,N,Q,R){if(j0.bitArray.bitLength(V)!==128)throw new j0.exception.invalid("ocb iv must be 128 bits");var C,H=j0.mode.ocb2.S,L=j0.bitArray,P=L.i,U=[0,0,0,0];V=H(B.encrypt(V));var z,T=[];N=N||[],Q=Q||64;for(C=0;C+4Q.bitLength(V)&&(H=R(H,N(H)),V=Q.concat(V,[-2147483648,0,0,0])),C=R(C,V),B.encrypt(R(N(R(H,N(H))),C))},S:function(B){return[B[0]<<1^B[1]>>>31,B[1]<<1^B[2]>>>31,B[2]<<1^B[3]>>>31,B[3]<<1^135*(B[0]>>>31)]}};j0.mode.gcm={name:"gcm",encrypt:function(B,k,V,N,Q){var R=k.slice(0);return k=j0.bitArray,N=N||[],B=j0.mode.gcm.C(!0,B,R,N,V,Q||128),k.concat(B.data,B.tag)},decrypt:function(B,k,V,N,Q){var R=k.slice(0),C=j0.bitArray,H=C.bitLength(R);if(Q=Q||128,N=N||[],Q<=H?(k=C.bitSlice(R,H-Q),R=C.bitSlice(R,0,H-Q)):(k=R,R=[]),B=j0.mode.gcm.C(!1,B,R,N,V,Q),!C.equal(B.tag,k))throw new j0.exception.corrupt("gcm: tag doesn't match");return B.data},ka:function(B,k){var V,N,Q,R,C,H=j0.bitArray.i;Q=[0,0,0,0],R=k.slice(0);for(V=0;128>V;V++){(N=(B[Math.floor(V/32)]&1<<31-V%32)!==0)&&(Q=H(Q,R)),C=(R[3]&1)!==0;for(N=3;0>>1|(R[N-1]&1)<<31;R[0]>>>=1,C&&(R[0]^=-520093696)}return Q},j:function(B,k,V){var N,Q=V.length;k=k.slice(0);for(N=0;NQ&&(B=k.hash(B));for(N=0;NN||0>V)throw new j0.exception.invalid("invalid params to pbkdf2");typeof B==="string"&&(B=j0.codec.utf8String.toBits(B)),typeof k==="string"&&(k=j0.codec.utf8String.toBits(k)),Q=Q||j0.misc.hmac,B=new Q(B);var R,C,H,L,P=[],U=j0.bitArray;for(L=1;32*P.length<(N||1);L++){Q=R=B.encrypt(U.concat(k,[L]));for(C=1;CC;C++)Q.push(4294967296*Math.random()|0);for(C=0;C=1<this.o&&(this.o=R),this.P++,this.b=j0.hash.sha256.hash(this.b.concat(Q)),this.L=new j0.cipher.aes(this.b);for(N=0;4>N&&(this.h[N]=this.h[N]+1|0,!this.h[N]);N++);}for(N=0;N>>1;this.c[C].update([N,this.N++,2,k,R,B.length].concat(B))}break;case"string":k===void 0&&(k=B.length),this.c[C].update([N,this.N++,3,k,R,B.length]),this.c[C].update(B);break;default:L=1}if(L)throw new j0.exception.bug("random: addEntropy only supports number, array of numbers or string");this.m[C]+=k,this.f+=k,H===this.u&&(this.isReady()!==this.u&&d6("seeded",Math.max(this.o,this.f)),d6("progress",this.getProgress()))},isReady:function(B){return B=this.T[B!==void 0?B:this.M],this.o&&this.o>=B?this.m[0]>this.ba&&(new Date()).valueOf()>this.Z?this.J|this.I:this.I:this.f>=B?this.J|this.u:this.u},getProgress:function(B){return B=this.T[B?B:this.M],this.o>=B?1:this.f>B?1:this.f/B},startCollectors:function(){if(!this.D){if(this.a={loadTimeCollector:e2(this,this.ma),mouseCollector:e2(this,this.oa),keyboardCollector:e2(this,this.la),accelerometerCollector:e2(this,this.ea),touchCollector:e2(this,this.qa)},window.addEventListener)window.addEventListener("load",this.a.loadTimeCollector,!1),window.addEventListener("mousemove",this.a.mouseCollector,!1),window.addEventListener("keypress",this.a.keyboardCollector,!1),window.addEventListener("devicemotion",this.a.accelerometerCollector,!1),window.addEventListener("touchmove",this.a.touchCollector,!1);else if(document.attachEvent)document.attachEvent("onload",this.a.loadTimeCollector),document.attachEvent("onmousemove",this.a.mouseCollector),document.attachEvent("keypress",this.a.keyboardCollector);else throw new j0.exception.bug("can't attach event");this.D=!0}},stopCollectors:function(){this.D&&(window.removeEventListener?(window.removeEventListener("load",this.a.loadTimeCollector,!1),window.removeEventListener("mousemove",this.a.mouseCollector,!1),window.removeEventListener("keypress",this.a.keyboardCollector,!1),window.removeEventListener("devicemotion",this.a.accelerometerCollector,!1),window.removeEventListener("touchmove",this.a.touchCollector,!1)):document.detachEvent&&(document.detachEvent("onload",this.a.loadTimeCollector),document.detachEvent("onmousemove",this.a.mouseCollector),document.detachEvent("keypress",this.a.keyboardCollector)),this.D=!1)},addEventListener:function(B,k){this.K[B][this.ga++]=k},removeEventListener:function(B,k){var V,N,Q=this.K[B],R=[];for(N in Q)Q.hasOwnProperty(N)&&Q[N]===k&&R.push(N);for(V=0;V=R.iter||R.ts!==64&&R.ts!==96&&R.ts!==128||R.ks!==128&&R.ks!==192&&R.ks!==256||2>R.iv.length||4=k.iter||k.ts!==64&&k.ts!==96&&k.ts!==128||k.ks!==128&&k.ks!==192&&k.ks!==256||!k.iv||2>k.iv.length||4n3,encrypt:()=>P5,decrypt:()=>V5});var u2;((V)=>{V[V.Sjcl=0]="Sjcl";V[V.WebCrypto=1]="WebCrypto"})(u2||={});var O1=C8(l6(),1);var j5=async(B,k)=>{const V=typeof k==="string"?k:k.data;return O1.default.decrypt(B,V)},o6=async(B,k)=>{const V=O1.default.encrypt(B,k);return{algo:0,data:V,iv:V.iv}},u6=async()=>{return O1.default.codec.base64.fromBits(O1.default.random.randomWords(8,10))},s6=(B)=>{return B[B.length-1]==="="};class $1{constructor(B,k){if(!B||B.length!=64)throw Error("Charset must contain 64 characters");this._charset=B,this._noPadding=!!k,this._valid=new RegExp("^["+this._charset.replace("-","\\-")+"]+={0,2}$")}Encode(B){const k=B.byteLength;if(!k)return"";const V=new Uint8Array(B);let N="";for(let Q=0;Q>2]+this._charset[(V[Q]&3)<<4|V[Q+1]>>4]+this._charset[(V[Q+1]&15)<<2|V[Q+2]>>6]+this._charset[V[Q+2]&63];if(k%3==2){if(N=N.substring(0,N.length-1),!this._noPadding)N+="="}else if(k%3==1){if(N=N.substring(0,N.length-2),!this._noPadding)N+="=="}return N}Decode(B){if(B=(B||"").replace(/[\s]/g,""),!B)return new ArrayBuffer(0);if(!this._valid.test(B))throw Error("Invalid base64 input sequence");let k=Math.floor(B.length*0.75);if(B[B.length-2]=="=")k-=2;else if(B[B.length-1]=="=")k--;const V=new Uint8Array(k);let N,Q,R,C,H=0,L=0;while(H>4,V[H++]=(Q&15)<<4|R>>2,V[H++]=(R&3)<<6|C;return V.buffer}}function W5(B){return f6.Encode(B)}function Z5(B){return f6.Decode(B)}var f6=new $1("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/");function Q5(B){return n6.Encode(B)}function z5(B){return n6.Decode(B)}var n6=new $1("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",!0);var H5=async(B,k)=>{return await crypto.subtle.decrypt({name:"AES-GCM",iv:k.iv},await r6(B),Z5(k.data))},a6=async(B,k)=>{const V=crypto.getRandomValues(new Uint8Array(12)),N=await crypto.subtle.encrypt({name:"AES-GCM",iv:V},await r6(B),k);return{algo:1,data:W5(N),iv:V}},r6=async(B)=>{return crypto.subtle.importKey("raw",z5(B),{name:"AES-GCM"},!1,["encrypt","decrypt"])},i6=async()=>{const B=await crypto.subtle.generateKey({name:"AES-GCM",length:256},!0,["encrypt","decrypt"]);return Q5(await crypto.subtle.exportKey("raw",B))};var V5=async(B,k,V)=>{if(V!==void 0)return U5(V)?j5(B,k):H5(B,k);else return s6(B)?j5(B,k):H5(B,k)},P5=async(B,k,V=1)=>{let N;if(U5(V))N=o6(B,k);else{if(typeof k==="string")k=(new TextEncoder()).encode(k).buffer;N=a6(B,k)}return N},n3=async(B=1)=>{return U5(B)?u6():i6()},U5=(B)=>{return B===0};var R5={};C1(R5,{waitForSocketConnection:()=>T5,uploadPart:()=>L5,spawn:()=>l2,sockets:()=>F2,isSpawned:()=>D5,endDownload:()=>B5,downloadPart:()=>B1,downloadFirstPart:()=>k5,cancelFileUpload:()=>N5});var h2=async(B,k)=>{try{if(typeof Bun!=="undefined")await Bun.sleep(k),B();else await new Promise((V)=>{setTimeout(V,k)})}catch(V){console.error(V)}};var F2={},t6=5,T5=async(B,k=()=>{},V=100)=>{try{const N=B.toString();if(F2[N]&&F2[N].readyState===WebSocket.OPEN)await k();else if(--V)console.info("Waiting for websocket connection..."),await h2(async()=>{await T5(B,k,V)},50);else throw new Error("Unable to connect to WebSocket: Max waiting attempts reach")}catch(N){console.error(N)}},l2=async(B,k=()=>{return!1},V=0)=>{const N=B.toString();if(!D5(B)){if(console.info(`Spawning WebSocket ${N}`),!F2[N]||F2[N].readyState!==WebSocket.CONNECTING)F2[N]=new WebSocket(B),F2[N].onopen=()=>{console.info(`Websocket ${N} has been open`)},F2[N].onclose=()=>{console.info(`Websocket ${N} has been closed`)},F2[N].onerror=async()=>{if(++V,V<=t6)console.error(`An error happened while trying to connect to WebSocket ${N}. Trying again. ${V} / ${t6}`),await l2(B,k,V);else throw new Error(`Unable to connect to WebSocket ${N}.`)};await T5(B)}F2[N].onmessage=(Q)=>{k(Q)}},D5=(B)=>{const k=B.toString();return F2[k]!==void 0&&F2[k].readyState===WebSocket.OPEN},N5=async(B,k,V,N)=>{G1(B,`${JSON.stringify({id:k,mod_token:V,cancel:!0,i:N})}XXXXMOJOXXuseless`)},L5=async(B,k,V)=>{G1(B,`${JSON.stringify(k)}XXMOJOXX${JSON.stringify(V)}`)},B1=async(B,k,V)=>{console.info(`Downloading part ${k+1}`);let N;if(V)N={part:k,file_pwd:V};else N={part:k};await G1(B,JSON.stringify(N))},k5=async(B,k)=>{await B1(B,0,k)},B5=async(B,k)=>{let V;if(k)V={ended:!0,file_pwd:k};else V={ended:!0};G1(B,JSON.stringify(V))},G1=async(B,k)=>{if(!D5(B))await l2(B,()=>{G1(B,k)});else F2[B.toString()].send(k)};var O8={};C1(O8,{waitUntilFileIsUploaded:()=>J4,waitUntilFileIsDownloaded:()=>O4,uploadedFiles:()=>q5,uploadFile:()=>i3,sliceFile:()=>X8,queuedFiles:()=>V2,isFileUploaded:()=>J8,isFileQueued:()=>Y1,downloadedFiles:()=>I5,downloadFile:()=>r3,cancelUpload:()=>t3});var a3=750000,V2={},q5={},I5={},X8=(B,k=a3)=>{const V=Math.ceil(B.size/k),N=[];for(let Q=0;Q{console.info(`Uploading part ${N+1} / ${Q}`);const T=await P5(P,await V.arrayBuffer()),q={total:Q,part:N,size:k.size,name:k.name.split("/").pop(),type:k.type,delay:R,del_at_first_view:C,zipped:H,id:U,i:z,file_pwd:L};await L5(B,q,T)},r3=async(B,k,V,N)=>{const Q=E5(B,"/download"+`/${V}`);console.info(`Downloading file from ${Q.toString()}`);const R=[];await l2(Q,async(C)=>{const H=C.data.split("XXMOJOXX"),L=JSON.parse(H?.shift()),P=JSON.parse(H.shift());if(!L?.msg){if(P.iv)P.iv=new Uint8Array(Object.values(P.iv));const U=await V5(k,P);if(R[L.part]=typeof U==="string"?(new TextEncoder()).encode(U).buffer:U,++L.part===L.total)await B5(Q,N),I5[k]=new Blob(R,{type:L.type});else await B1(Q,L.part,N)}else console.error(`error: ${L.msg}`)}),await k5(Q,N)},i3=async(B,k,V,N,Q,R,C)=>{V2[C]={};const H=E5(B,"/upload"),L=X8(k);await l2(H,async(P)=>{let U=JSON.parse(P.data);if(U.success){if(Y1(C)){let z=++U.j;if(V2[C].serverId=U.short,V2[C].deleteToken=U.token,V2[C].fileNumber=U.i,z{if(Y1(k)){while(!X4(k))await h2(()=>{},100);await N5(E5(B,"/upload"),V2[k].serverId,V2[k].deleteToken,V2[k].fileNumber),delete V2[k]}else console.info(`Upload with file id "${k}" not queued, nothing to cancel.`)},E5=(B,k)=>{const V=new URL(B);return V.protocol="ws",V.pathname=k,V},e3=(B,k,V)=>{return`${B.origin}/r/${V}#${k}`},X4=(B)=>{return Y1(B)&&V2[B].serverId!==void 0&&V2[B].deleteToken!==void 0&&V2[B].fileNumber!==void 0},J4=async(B)=>{while(Y1(B)&&!J8(B))await h2(()=>{},100)},O4=async(B)=>{while(I5[B]===void 0)await h2(()=>{},100)},J8=(B)=>{return q5[B]!==void 0},Y1=(B)=>{return V2[B]!==void 0};export{R5 as ws,F5 as lufiCrypto,O8 as api,u2 as CryptoAlgorithm};