ayiin 2.0.2 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +674 -674
- package/README.md +28 -28
- package/ayiin/index.js +16 -16
- package/ayiin/methods/crypt.js +16 -79
- package/ayiin/methods/index.js +16 -75
- package/ayiin/methods/tools.js +1 -34
- package/bun.lock +66 -0
- package/package.json +11 -12
- package/save +26 -0
- package/tsconfig.json +31 -11
- package/ayiin/index.d.ts +0 -7
- package/ayiin/methods/crypt.d.ts +0 -38
- package/ayiin/methods/index.d.ts +0 -65
- package/ayiin/methods/mailer.d.ts +0 -18
- package/ayiin/methods/mailer.js +0 -58
- package/ayiin/methods/tools.d.ts +0 -17
- package/ayiin/types/options.d.ts +0 -4
- package/ayiin/types/options.js +0 -2
- package/ayiin/types/sendMail.d.ts +0 -5
- package/ayiin/types/sendMail.js +0 -2
package/ayiin/methods/crypt.js
CHANGED
|
@@ -1,79 +1,16 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
* Performs Base encryption and decryption.
|
|
11
|
-
* @param {string | Buffer} input - The input data to be encrypted or decrypted.
|
|
12
|
-
|
|
13
|
-
* @returns {Buffer} - The encrypted or decrypted data as a Buffer.
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const keyBuffer = Buffer.from(key, 'ascii');
|
|
18
|
-
const resultBuffer = Buffer.alloc(inputBuffer.length);
|
|
19
|
-
for (let i = 0; i < inputBuffer.length; i++) {
|
|
20
|
-
resultBuffer[i] = inputBuffer[i] ^ keyBuffer[i % keyBuffer.length];
|
|
21
|
-
}
|
|
22
|
-
return resultBuffer;
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
* Encrypts a plaintext message using the given key.
|
|
26
|
-
* @param {string} text - The plaintext message to be encrypted.
|
|
27
|
-
* @param {string} key - The encryption key.
|
|
28
|
-
* @returns {string} - The encrypted data in Hex format.
|
|
29
|
-
*/
|
|
30
|
-
this.encrypt = (text, key, bufferEncoding) => {
|
|
31
|
-
if (!bufferEncoding)
|
|
32
|
-
bufferEncoding = 'base64';
|
|
33
|
-
const encryptedBuffer = this.baseCrypt(text, key);
|
|
34
|
-
return encryptedBuffer.toString(bufferEncoding);
|
|
35
|
-
};
|
|
36
|
-
/**
|
|
37
|
-
* Decrypts an encrypted message using the given key.
|
|
38
|
-
* @param {string} encrypted - The encrypted data in Hex format.
|
|
39
|
-
* @param {string} key - The decryption key.
|
|
40
|
-
* @returns {string} - The decrypted plaintext message.
|
|
41
|
-
*/
|
|
42
|
-
this.decrypt = (encrypted, key, bufferEncoding) => {
|
|
43
|
-
if (!bufferEncoding)
|
|
44
|
-
bufferEncoding = 'base64';
|
|
45
|
-
const encryptedBuffer = Buffer.from(encrypted, bufferEncoding);
|
|
46
|
-
const decryptedBuffer = this.baseCrypt(encryptedBuffer, key);
|
|
47
|
-
return decryptedBuffer.toString('ascii');
|
|
48
|
-
};
|
|
49
|
-
/**
|
|
50
|
-
* Converts a Hex string to its corresponding ASCII representation.
|
|
51
|
-
* @param {string} hexString - The Hex string to be converted.
|
|
52
|
-
* @returns {string} - The ASCII representation of the Hex string.
|
|
53
|
-
*/
|
|
54
|
-
this.hexToAscii = (hexString) => {
|
|
55
|
-
const hexBuffer = Buffer.from(hexString, 'hex');
|
|
56
|
-
return hexBuffer.toString('ascii');
|
|
57
|
-
};
|
|
58
|
-
/**
|
|
59
|
-
* Converts an ASCII string to its corresponding Hex representation.
|
|
60
|
-
* @param {string} asciiString - The ASCII string to be converted.
|
|
61
|
-
* @returns {string} - The Hex representation of the ASCII string.
|
|
62
|
-
*/
|
|
63
|
-
this.asciiToHex = (asciiString) => {
|
|
64
|
-
const asciiBuffer = Buffer.from(asciiString, 'ascii');
|
|
65
|
-
return asciiBuffer.toString('hex');
|
|
66
|
-
};
|
|
67
|
-
this.md5 = (data, encoding) => {
|
|
68
|
-
if (!encoding)
|
|
69
|
-
encoding = 'hex';
|
|
70
|
-
let hasho = crypto_1.default
|
|
71
|
-
.createHash("md5")
|
|
72
|
-
.update(data)
|
|
73
|
-
.digest(encoding);
|
|
74
|
-
return hasho;
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
;
|
|
79
|
-
exports.default = Crypt;
|
|
1
|
+
var{defineProperty:Tr,getOwnPropertyNames:Zn,getOwnPropertyDescriptor:Gn}=Object,Vn=Object.prototype.hasOwnProperty;function Jn(h){return this[h]}var jt=(h)=>{var l=(pi??=new WeakMap).get(h),c;if(l)return l;if(l=Tr({},"__esModule",{value:!0}),h&&typeof h==="object"||typeof h==="function"){for(var b of Zn(h))if(!Vn.call(l,b))Tr(l,b,{get:Jn.bind(h,b),enumerable:!(c=Gn(h,b))||c.enumerable})}return pi.set(h,l),l},pi,Yn=(h,l)=>()=>(l||h((l={exports:{}}).exports,l),l.exports);var Xn=(h)=>h;function Qn(h,l){this[h]=Xn.bind(null,l)}var lr=(h,l)=>{for(var c in l)Tr(h,c,{get:l[c],enumerable:!0,configurable:!0,set:Qn.bind(l,c)})};var ur=(h,l)=>()=>(h&&(l=h(h=0)),l);var to=((h)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(h,{get:(l,c)=>(typeof require<"u"?require:l)[c]}):h)(function(h){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+h+'" is not supported')});var pe={};lr(pe,{Blob:()=>fo,Buffer:()=>lt,File:()=>ho,INSPECT_MAX_BYTES:()=>_i,atob:()=>so,btoa:()=>ao,constants:()=>lo,default:()=>jo,isAscii:()=>Uo,isUtf8:()=>Co,kMaxLength:()=>Ye,kStringMaxLength:()=>Si,resolveObjectURL:()=>Lo,transcode:()=>Fo});function eo(h){var l=h.length;if(l%4>0)throw Error("Invalid string. Length must be a multiple of 4");var c=h.indexOf("=");if(c===-1)c=l;var b=c===l?0:4-c%4;return[c,b]}function ro(h,l){return(h+l)*3/4-l}function io(h){var l,c=eo(h),b=c[0],p=c[1],M=new Uint8Array(ro(b,p)),a=0,E=p>0?b-4:b,R;for(R=0;R<E;R+=4)l=Be[h.charCodeAt(R)]<<18|Be[h.charCodeAt(R+1)]<<12|Be[h.charCodeAt(R+2)]<<6|Be[h.charCodeAt(R+3)],M[a++]=l>>16&255,M[a++]=l>>8&255,M[a++]=l&255;if(p===2)l=Be[h.charCodeAt(R)]<<2|Be[h.charCodeAt(R+1)]>>4,M[a++]=l&255;if(p===1)l=Be[h.charCodeAt(R)]<<10|Be[h.charCodeAt(R+1)]<<4|Be[h.charCodeAt(R+2)]>>2,M[a++]=l>>8&255,M[a++]=l&255;return M}function no(h){return xe[h>>18&63]+xe[h>>12&63]+xe[h>>6&63]+xe[h&63]}function oo(h,l,c){var b,p=[];for(var M=l;M<c;M+=3)b=(h[M]<<16&16711680)+(h[M+1]<<8&65280)+(h[M+2]&255),p.push(no(b));return p.join("")}function bi(h){var l,c=h.length,b=c%3,p=[],M=16383;for(var a=0,E=c-b;a<E;a+=M)p.push(oo(h,a,a+M>E?E:a+M));if(b===1)l=h[c-1],p.push(xe[l>>2]+xe[l<<4&63]+"==");else if(b===2)l=(h[c-2]<<8)+h[c-1],p.push(xe[l>>10]+xe[l>>4&63]+xe[l<<2&63]+"=");return p.join("")}function dr(h,l,c,b,p){var M,a,E=p*8-b-1,R=(1<<E)-1,w=R>>1,g=-7,y=c?p-1:0,v=c?-1:1,S=h[l+y];y+=v,M=S&(1<<-g)-1,S>>=-g,g+=E;for(;g>0;M=M*256+h[l+y],y+=v,g-=8);a=M&(1<<-g)-1,M>>=-g,g+=b;for(;g>0;a=a*256+h[l+y],y+=v,g-=8);if(M===0)M=1-w;else if(M===R)return a?NaN:(S?-1:1)*(1/0);else a=a+Math.pow(2,b),M=M-w;return(S?-1:1)*a*Math.pow(2,M-b)}function Mi(h,l,c,b,p,M){var a,E,R,w=M*8-p-1,g=(1<<w)-1,y=g>>1,v=p===23?Math.pow(2,-24)-Math.pow(2,-77):0,S=b?0:M-1,A=b?1:-1,x=l<0||l===0&&1/l<0?1:0;if(l=Math.abs(l),isNaN(l)||l===1/0)E=isNaN(l)?1:0,a=g;else{if(a=Math.floor(Math.log(l)/Math.LN2),l*(R=Math.pow(2,-a))<1)a--,R*=2;if(a+y>=1)l+=v/R;else l+=v*Math.pow(2,1-y);if(l*R>=2)a++,R/=2;if(a+y>=g)E=0,a=g;else if(a+y>=1)E=(l*R-1)*Math.pow(2,p),a=a+y;else E=l*Math.pow(2,y-1)*Math.pow(2,p),a=0}for(;p>=8;h[c+S]=E&255,S+=A,E/=256,p-=8);a=a<<p|E,w+=p;for(;w>0;h[c+S]=a&255,S+=A,a/=256,w-=8);h[c+S-A]|=x*128}function Pe(h){if(h>Ye)throw RangeError('The value "'+h+'" is invalid for option "size"');let l=new Uint8Array(h);return Object.setPrototypeOf(l,lt.prototype),l}function Lr(h,l,c){return class extends c{constructor(){super();Object.defineProperty(this,"message",{value:l.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${h}]`,this.stack,delete this.name}get code(){return h}set code(b){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:b,writable:!0})}toString(){return`${this.name} [${h}]: ${this.message}`}}}function lt(h,l,c){if(typeof h==="number"){if(typeof l==="string")throw TypeError('The "string" argument must be of type string. Received type number');return Cr(h)}return Ai(h,l,c)}function Ai(h,l,c){if(typeof h==="string")return yo(h,l);if(ArrayBuffer.isView(h))return bo(h);if(h==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof h);if(ke(h,ArrayBuffer)||h&&ke(h.buffer,ArrayBuffer))return Dr(h,l,c);if(typeof SharedArrayBuffer<"u"&&(ke(h,SharedArrayBuffer)||h&&ke(h.buffer,SharedArrayBuffer)))return Dr(h,l,c);if(typeof h==="number")throw TypeError('The "value" argument must not be of type number. Received type number');let b=h.valueOf&&h.valueOf();if(b!=null&&b!==h)return lt.from(b,l,c);let p=mo(h);if(p)return p;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof h[Symbol.toPrimitive]==="function")return lt.from(h[Symbol.toPrimitive]("string"),l,c);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof h)}function Ei(h){if(typeof h!=="number")throw TypeError('"size" argument must be of type number');else if(h<0)throw RangeError('The value "'+h+'" is invalid for option "size"')}function po(h,l,c){if(Ei(h),h<=0)return Pe(h);if(l!==void 0)return typeof c==="string"?Pe(h).fill(l,c):Pe(h).fill(l);return Pe(h)}function Cr(h){return Ei(h),Pe(h<0?0:Ur(h)|0)}function yo(h,l){if(typeof l!=="string"||l==="")l="utf8";if(!lt.isEncoding(l))throw TypeError("Unknown encoding: "+l);let c=Ri(h,l)|0,b=Pe(c),p=b.write(h,l);if(p!==c)b=b.slice(0,p);return b}function Nr(h){let l=h.length<0?0:Ur(h.length)|0,c=Pe(l);for(let b=0;b<l;b+=1)c[b]=h[b]&255;return c}function bo(h){if(ke(h,Uint8Array)){let l=new Uint8Array(h);return Dr(l.buffer,l.byteOffset,l.byteLength)}return Nr(h)}function Dr(h,l,c){if(l<0||h.byteLength<l)throw RangeError('"offset" is outside of buffer bounds');if(h.byteLength<l+(c||0))throw RangeError('"length" is outside of buffer bounds');let b;if(l===void 0&&c===void 0)b=new Uint8Array(h);else if(c===void 0)b=new Uint8Array(h,l);else b=new Uint8Array(h,l,c);return Object.setPrototypeOf(b,lt.prototype),b}function mo(h){if(lt.isBuffer(h)){let l=Ur(h.length)|0,c=Pe(l);if(c.length===0)return c;return h.copy(c,0,0,l),c}if(h.length!==void 0){if(typeof h.length!=="number"||Number.isNaN(h.length))return Pe(0);return Nr(h)}if(h.type==="Buffer"&&Array.isArray(h.data))return Nr(h.data)}function Ur(h){if(h>=Ye)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Ye.toString(16)+" bytes");return h|0}function Ri(h,l){if(lt.isBuffer(h))return h.length;if(ArrayBuffer.isView(h)||ke(h,ArrayBuffer))return h.byteLength;if(typeof h!=="string")throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof h);let c=h.length,b=arguments.length>2&&arguments[2]===!0;if(!b&&c===0)return 0;let p=!1;for(;;)switch(l){case"ascii":case"latin1":case"binary":return c;case"utf8":case"utf-8":return Or(h).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return c*2;case"hex":return c>>>1;case"base64":return Di(h).length;default:if(p)return b?-1:Or(h).length;l=(""+l).toLowerCase(),p=!0}}function vo(h,l,c){let b=!1;if(l===void 0||l<0)l=0;if(l>this.length)return"";if(c===void 0||c>this.length)c=this.length;if(c<=0)return"";if(c>>>=0,l>>>=0,c<=l)return"";if(!h)h="utf8";while(!0)switch(h){case"hex":return Io(this,l,c);case"utf8":case"utf-8":return Ii(this,l,c);case"ascii":return Ro(this,l,c);case"latin1":case"binary":return Bo(this,l,c);case"base64":return Ao(this,l,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return xo(this,l,c);default:if(b)throw TypeError("Unknown encoding: "+h);h=(h+"").toLowerCase(),b=!0}}function je(h,l,c){let b=h[l];h[l]=h[c],h[c]=b}function Bi(h,l,c,b,p){if(h.length===0)return-1;if(typeof c==="string")b=c,c=0;else if(c>2147483647)c=2147483647;else if(c<-2147483648)c=-2147483648;if(c=+c,Number.isNaN(c))c=p?0:h.length-1;if(c<0)c=h.length+c;if(c>=h.length)if(p)return-1;else c=h.length-1;else if(c<0)if(p)c=0;else return-1;if(typeof l==="string")l=lt.from(l,b);if(lt.isBuffer(l)){if(l.length===0)return-1;return vi(h,l,c,b,p)}else if(typeof l==="number"){if(l=l&255,typeof Uint8Array.prototype.indexOf==="function")if(p)return Uint8Array.prototype.indexOf.call(h,l,c);else return Uint8Array.prototype.lastIndexOf.call(h,l,c);return vi(h,[l],c,b,p)}throw TypeError("val must be string, number or Buffer")}function vi(h,l,c,b,p){let M=1,a=h.length,E=l.length;if(b!==void 0){if(b=String(b).toLowerCase(),b==="ucs2"||b==="ucs-2"||b==="utf16le"||b==="utf-16le"){if(h.length<2||l.length<2)return-1;M=2,a/=2,E/=2,c/=2}}function R(g,y){if(M===1)return g[y];else return g.readUInt16BE(y*M)}let w;if(p){let g=-1;for(w=c;w<a;w++)if(R(h,w)===R(l,g===-1?0:w-g)){if(g===-1)g=w;if(w-g+1===E)return g*M}else{if(g!==-1)w-=w-g;g=-1}}else{if(c+E>a)c=a-E;for(w=c;w>=0;w--){let g=!0;for(let y=0;y<E;y++)if(R(h,w+y)!==R(l,y)){g=!1;break}if(g)return w}}return-1}function go(h,l,c,b){c=Number(c)||0;let p=h.length-c;if(!b)b=p;else if(b=Number(b),b>p)b=p;let M=l.length;if(b>M/2)b=M/2;let a;for(a=0;a<b;++a){let E=parseInt(l.substr(a*2,2),16);if(Number.isNaN(E))return a;h[c+a]=E}return a}function wo(h,l,c,b){return cr(Or(l,h.length-c),h,c,b)}function Mo(h,l,c,b){return cr(qo(l),h,c,b)}function _o(h,l,c,b){return cr(Di(l),h,c,b)}function So(h,l,c,b){return cr(No(l,h.length-c),h,c,b)}function Ao(h,l,c){if(l===0&&c===h.length)return bi(h);else return bi(h.slice(l,c))}function Ii(h,l,c){c=Math.min(h.length,c);let b=[],p=l;while(p<c){let M=h[p],a=null,E=M>239?4:M>223?3:M>191?2:1;if(p+E<=c){let R,w,g,y;switch(E){case 1:if(M<128)a=M;break;case 2:if(R=h[p+1],(R&192)===128){if(y=(M&31)<<6|R&63,y>127)a=y}break;case 3:if(R=h[p+1],w=h[p+2],(R&192)===128&&(w&192)===128){if(y=(M&15)<<12|(R&63)<<6|w&63,y>2047&&(y<55296||y>57343))a=y}break;case 4:if(R=h[p+1],w=h[p+2],g=h[p+3],(R&192)===128&&(w&192)===128&&(g&192)===128){if(y=(M&15)<<18|(R&63)<<12|(w&63)<<6|g&63,y>65535&&y<1114112)a=y}}}if(a===null)a=65533,E=1;else if(a>65535)a-=65536,b.push(a>>>10&1023|55296),a=56320|a&1023;b.push(a),p+=E}return Eo(b)}function Eo(h){let l=h.length;if(l<=gi)return String.fromCharCode.apply(String,h);let c="",b=0;while(b<l)c+=String.fromCharCode.apply(String,h.slice(b,b+=gi));return c}function Ro(h,l,c){let b="";c=Math.min(h.length,c);for(let p=l;p<c;++p)b+=String.fromCharCode(h[p]&127);return b}function Bo(h,l,c){let b="";c=Math.min(h.length,c);for(let p=l;p<c;++p)b+=String.fromCharCode(h[p]);return b}function Io(h,l,c){let b=h.length;if(!l||l<0)l=0;if(!c||c<0||c>b)c=b;let p="";for(let M=l;M<c;++M)p+=Do[h[M]];return p}function xo(h,l,c){let b=h.slice(l,c),p="";for(let M=0;M<b.length-1;M+=2)p+=String.fromCharCode(b[M]+b[M+1]*256);return p}function ce(h,l,c){if(h%1!==0||h<0)throw RangeError("offset is not uint");if(h+l>c)throw RangeError("Trying to access beyond buffer length")}function _e(h,l,c,b,p,M){if(!lt.isBuffer(h))throw TypeError('"buffer" argument must be a Buffer instance');if(l>p||l<M)throw RangeError('"value" argument is out of bounds');if(c+b>h.length)throw RangeError("Index out of range")}function xi(h,l,c,b,p){Ni(l,b,p,h,c,7);let M=Number(l&BigInt(4294967295));h[c++]=M,M=M>>8,h[c++]=M,M=M>>8,h[c++]=M,M=M>>8,h[c++]=M;let a=Number(l>>BigInt(32)&BigInt(4294967295));return h[c++]=a,a=a>>8,h[c++]=a,a=a>>8,h[c++]=a,a=a>>8,h[c++]=a,c}function ki(h,l,c,b,p){Ni(l,b,p,h,c,7);let M=Number(l&BigInt(4294967295));h[c+7]=M,M=M>>8,h[c+6]=M,M=M>>8,h[c+5]=M,M=M>>8,h[c+4]=M;let a=Number(l>>BigInt(32)&BigInt(4294967295));return h[c+3]=a,a=a>>8,h[c+2]=a,a=a>>8,h[c+1]=a,a=a>>8,h[c]=a,c+8}function Ti(h,l,c,b,p,M){if(c+b>h.length)throw RangeError("Index out of range");if(c<0)throw RangeError("Index out of range")}function Pi(h,l,c,b,p){if(l=+l,c=c>>>0,!p)Ti(h,l,c,4,340282346638528860000000000000000000000,-340282346638528860000000000000000000000);return Mi(h,l,c,b,23,4),c+4}function qi(h,l,c,b,p){if(l=+l,c=c>>>0,!p)Ti(h,l,c,8,179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,-179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000);return Mi(h,l,c,b,52,8),c+8}function wi(h){let l="",c=h.length,b=h[0]==="-"?1:0;for(;c>=b+4;c-=3)l=`_${h.slice(c-3,c)}${l}`;return`${h.slice(0,c)}${l}`}function ko(h,l,c){if(Ke(l,"offset"),h[l]===void 0||h[l+c]===void 0)Xe(l,h.length-(c+1))}function Ni(h,l,c,b,p,M){if(h>c||h<l){let a=typeof l==="bigint"?"n":"",E;if(M>3)if(l===0||l===BigInt(0))E=`>= 0${a} and < 2${a} ** ${(M+1)*8}${a}`;else E=`>= -(2${a} ** ${(M+1)*8-1}${a}) and < 2 ** ${(M+1)*8-1}${a}`;else E=`>= ${l}${a} and <= ${c}${a}`;throw new qr("value",E,h)}ko(b,p,M)}function Ke(h,l){if(typeof h!=="number")throw new co(l,"number",h)}function Xe(h,l,c){if(Math.floor(h)!==h)throw Ke(h,c),new qr(c||"offset","an integer",h);if(l<0)throw new uo;throw new qr(c||"offset",`>= ${c?1:0} and <= ${l}`,h)}function Po(h){if(h=h.split("=")[0],h=h.trim().replace(To,""),h.length<2)return"";while(h.length%4!==0)h=h+"=";return h}function Or(h,l){l=l||1/0;let c,b=h.length,p=null,M=[];for(let a=0;a<b;++a){if(c=h.charCodeAt(a),c>55295&&c<57344){if(!p){if(c>56319){if((l-=3)>-1)M.push(239,191,189);continue}else if(a+1===b){if((l-=3)>-1)M.push(239,191,189);continue}p=c;continue}if(c<56320){if((l-=3)>-1)M.push(239,191,189);p=c;continue}c=(p-55296<<10|c-56320)+65536}else if(p){if((l-=3)>-1)M.push(239,191,189)}if(p=null,c<128){if((l-=1)<0)break;M.push(c)}else if(c<2048){if((l-=2)<0)break;M.push(c>>6|192,c&63|128)}else if(c<65536){if((l-=3)<0)break;M.push(c>>12|224,c>>6&63|128,c&63|128)}else if(c<1114112){if((l-=4)<0)break;M.push(c>>18|240,c>>12&63|128,c>>6&63|128,c&63|128)}else throw Error("Invalid code point")}return M}function qo(h){let l=[];for(let c=0;c<h.length;++c)l.push(h.charCodeAt(c)&255);return l}function No(h,l){let c,b,p,M=[];for(let a=0;a<h.length;++a){if((l-=2)<0)break;c=h.charCodeAt(a),b=c>>8,p=c%256,M.push(p),M.push(b)}return M}function Di(h){return io(Po(h))}function cr(h,l,c,b){let p;for(p=0;p<b;++p){if(p+c>=l.length||p>=h.length)break;l[p+c]=h[p]}return p}function ke(h,l){return h instanceof l||h!=null&&h.constructor!=null&&h.constructor.name!=null&&h.constructor.name===l.name}function Oe(h){return typeof BigInt>"u"?Oo:h}function Oo(){throw Error("BigInt not supported")}function Fr(h){return()=>{throw Error(h+" is not implemented for node:buffer browser polyfill")}}var xe,Be,Pr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Fe,yi,mi,_i=50,Ye=2147483647,Si=536870888,ao,so,ho,fo,lo,uo,co,qr,gi=4096,To,Do,Lo,Co,Uo=(h)=>{for(let l of h)if(l.charCodeAt(0)>127)return!1;return!0},Fo,jo;var ye=ur(()=>{xe=[],Be=[];for(Fe=0,yi=Pr.length;Fe<yi;++Fe)xe[Fe]=Pr[Fe],Be[Pr.charCodeAt(Fe)]=Fe;Be[45]=62;Be[95]=63;mi=typeof Symbol==="function"&&typeof Symbol.for==="function"?Symbol.for("nodejs.util.inspect.custom"):null,ao=globalThis.btoa,so=globalThis.atob,ho=globalThis.File,fo=globalThis.Blob,lo={MAX_LENGTH:Ye,MAX_STRING_LENGTH:Si};uo=Lr("ERR_BUFFER_OUT_OF_BOUNDS",function(h){if(h)return`${h} is outside of buffer bounds`;return"Attempt to access memory outside buffer bounds"},RangeError),co=Lr("ERR_INVALID_ARG_TYPE",function(h,l){return`The "${h}" argument must be of type number. Received type ${typeof l}`},TypeError),qr=Lr("ERR_OUT_OF_RANGE",function(h,l,c){let b=`The value of "${h}" is out of range.`,p=c;if(Number.isInteger(c)&&Math.abs(c)>4294967296)p=wi(String(c));else if(typeof c==="bigint"){if(p=String(c),c>BigInt(2)**BigInt(32)||c<-(BigInt(2)**BigInt(32)))p=wi(p);p+="n"}return b+=` It must be ${l}. Received ${p}`,b},RangeError);Object.defineProperty(lt.prototype,"parent",{enumerable:!0,get:function(){if(!lt.isBuffer(this))return;return this.buffer}});Object.defineProperty(lt.prototype,"offset",{enumerable:!0,get:function(){if(!lt.isBuffer(this))return;return this.byteOffset}});lt.poolSize=8192;lt.from=function(h,l,c){return Ai(h,l,c)};Object.setPrototypeOf(lt.prototype,Uint8Array.prototype);Object.setPrototypeOf(lt,Uint8Array);lt.alloc=function(h,l,c){return po(h,l,c)};lt.allocUnsafe=function(h){return Cr(h)};lt.allocUnsafeSlow=function(h){return Cr(h)};lt.isBuffer=function(h){return h!=null&&h._isBuffer===!0&&h!==lt.prototype};lt.compare=function(h,l){if(ke(h,Uint8Array))h=lt.from(h,h.offset,h.byteLength);if(ke(l,Uint8Array))l=lt.from(l,l.offset,l.byteLength);if(!lt.isBuffer(h)||!lt.isBuffer(l))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(h===l)return 0;let c=h.length,b=l.length;for(let p=0,M=Math.min(c,b);p<M;++p)if(h[p]!==l[p]){c=h[p],b=l[p];break}if(c<b)return-1;if(b<c)return 1;return 0};lt.isEncoding=function(h){switch(String(h).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};lt.concat=function(h,l){if(!Array.isArray(h))throw TypeError('"list" argument must be an Array of Buffers');if(h.length===0)return lt.alloc(0);let c;if(l===void 0){l=0;for(c=0;c<h.length;++c)l+=h[c].length}let b=lt.allocUnsafe(l),p=0;for(c=0;c<h.length;++c){let M=h[c];if(ke(M,Uint8Array))if(p+M.length>b.length){if(!lt.isBuffer(M))M=lt.from(M);M.copy(b,p)}else Uint8Array.prototype.set.call(b,M,p);else if(!lt.isBuffer(M))throw TypeError('"list" argument must be an Array of Buffers');else M.copy(b,p);p+=M.length}return b};lt.byteLength=Ri;lt.prototype._isBuffer=!0;lt.prototype.swap16=function(){let h=this.length;if(h%2!==0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let l=0;l<h;l+=2)je(this,l,l+1);return this};lt.prototype.swap32=function(){let h=this.length;if(h%4!==0)throw RangeError("Buffer size must be a multiple of 32-bits");for(let l=0;l<h;l+=4)je(this,l,l+3),je(this,l+1,l+2);return this};lt.prototype.swap64=function(){let h=this.length;if(h%8!==0)throw RangeError("Buffer size must be a multiple of 64-bits");for(let l=0;l<h;l+=8)je(this,l,l+7),je(this,l+1,l+6),je(this,l+2,l+5),je(this,l+3,l+4);return this};lt.prototype.toString=function(){let h=this.length;if(h===0)return"";if(arguments.length===0)return Ii(this,0,h);return vo.apply(this,arguments)};lt.prototype.toLocaleString=lt.prototype.toString;lt.prototype.equals=function(h){if(!lt.isBuffer(h))throw TypeError("Argument must be a Buffer");if(this===h)return!0;return lt.compare(this,h)===0};lt.prototype.inspect=function(){let h="",l=_i;if(h=this.toString("hex",0,l).replace(/(.{2})/g,"$1 ").trim(),this.length>l)h+=" ... ";return"<Buffer "+h+">"};if(mi)lt.prototype[mi]=lt.prototype.inspect;lt.prototype.compare=function(h,l,c,b,p){if(ke(h,Uint8Array))h=lt.from(h,h.offset,h.byteLength);if(!lt.isBuffer(h))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof h);if(l===void 0)l=0;if(c===void 0)c=h?h.length:0;if(b===void 0)b=0;if(p===void 0)p=this.length;if(l<0||c>h.length||b<0||p>this.length)throw RangeError("out of range index");if(b>=p&&l>=c)return 0;if(b>=p)return-1;if(l>=c)return 1;if(l>>>=0,c>>>=0,b>>>=0,p>>>=0,this===h)return 0;let M=p-b,a=c-l,E=Math.min(M,a),R=this.slice(b,p),w=h.slice(l,c);for(let g=0;g<E;++g)if(R[g]!==w[g]){M=R[g],a=w[g];break}if(M<a)return-1;if(a<M)return 1;return 0};lt.prototype.includes=function(h,l,c){return this.indexOf(h,l,c)!==-1};lt.prototype.indexOf=function(h,l,c){return Bi(this,h,l,c,!0)};lt.prototype.lastIndexOf=function(h,l,c){return Bi(this,h,l,c,!1)};lt.prototype.write=function(h,l,c,b){if(l===void 0)b="utf8",c=this.length,l=0;else if(c===void 0&&typeof l==="string")b=l,c=this.length,l=0;else if(isFinite(l))if(l=l>>>0,isFinite(c)){if(c=c>>>0,b===void 0)b="utf8"}else b=c,c=void 0;else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let p=this.length-l;if(c===void 0||c>p)c=p;if(h.length>0&&(c<0||l<0)||l>this.length)throw RangeError("Attempt to write outside buffer bounds");if(!b)b="utf8";let M=!1;for(;;)switch(b){case"hex":return go(this,h,l,c);case"utf8":case"utf-8":return wo(this,h,l,c);case"ascii":case"latin1":case"binary":return Mo(this,h,l,c);case"base64":return _o(this,h,l,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return So(this,h,l,c);default:if(M)throw TypeError("Unknown encoding: "+b);b=(""+b).toLowerCase(),M=!0}};lt.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};lt.prototype.slice=function(h,l){let c=this.length;if(h=~~h,l=l===void 0?c:~~l,h<0){if(h+=c,h<0)h=0}else if(h>c)h=c;if(l<0){if(l+=c,l<0)l=0}else if(l>c)l=c;if(l<h)l=h;let b=this.subarray(h,l);return Object.setPrototypeOf(b,lt.prototype),b};lt.prototype.readUintLE=lt.prototype.readUIntLE=function(h,l,c){if(h=h>>>0,l=l>>>0,!c)ce(h,l,this.length);let b=this[h],p=1,M=0;while(++M<l&&(p*=256))b+=this[h+M]*p;return b};lt.prototype.readUintBE=lt.prototype.readUIntBE=function(h,l,c){if(h=h>>>0,l=l>>>0,!c)ce(h,l,this.length);let b=this[h+--l],p=1;while(l>0&&(p*=256))b+=this[h+--l]*p;return b};lt.prototype.readUint8=lt.prototype.readUInt8=function(h,l){if(h=h>>>0,!l)ce(h,1,this.length);return this[h]};lt.prototype.readUint16LE=lt.prototype.readUInt16LE=function(h,l){if(h=h>>>0,!l)ce(h,2,this.length);return this[h]|this[h+1]<<8};lt.prototype.readUint16BE=lt.prototype.readUInt16BE=function(h,l){if(h=h>>>0,!l)ce(h,2,this.length);return this[h]<<8|this[h+1]};lt.prototype.readUint32LE=lt.prototype.readUInt32LE=function(h,l){if(h=h>>>0,!l)ce(h,4,this.length);return(this[h]|this[h+1]<<8|this[h+2]<<16)+this[h+3]*16777216};lt.prototype.readUint32BE=lt.prototype.readUInt32BE=function(h,l){if(h=h>>>0,!l)ce(h,4,this.length);return this[h]*16777216+(this[h+1]<<16|this[h+2]<<8|this[h+3])};lt.prototype.readBigUInt64LE=Oe(function(h){h=h>>>0,Ke(h,"offset");let l=this[h],c=this[h+7];if(l===void 0||c===void 0)Xe(h,this.length-8);let b=l+this[++h]*256+this[++h]*65536+this[++h]*16777216,p=this[++h]+this[++h]*256+this[++h]*65536+c*16777216;return BigInt(b)+(BigInt(p)<<BigInt(32))});lt.prototype.readBigUInt64BE=Oe(function(h){h=h>>>0,Ke(h,"offset");let l=this[h],c=this[h+7];if(l===void 0||c===void 0)Xe(h,this.length-8);let b=l*16777216+this[++h]*65536+this[++h]*256+this[++h],p=this[++h]*16777216+this[++h]*65536+this[++h]*256+c;return(BigInt(b)<<BigInt(32))+BigInt(p)});lt.prototype.readIntLE=function(h,l,c){if(h=h>>>0,l=l>>>0,!c)ce(h,l,this.length);let b=this[h],p=1,M=0;while(++M<l&&(p*=256))b+=this[h+M]*p;if(p*=128,b>=p)b-=Math.pow(2,8*l);return b};lt.prototype.readIntBE=function(h,l,c){if(h=h>>>0,l=l>>>0,!c)ce(h,l,this.length);let b=l,p=1,M=this[h+--b];while(b>0&&(p*=256))M+=this[h+--b]*p;if(p*=128,M>=p)M-=Math.pow(2,8*l);return M};lt.prototype.readInt8=function(h,l){if(h=h>>>0,!l)ce(h,1,this.length);if(!(this[h]&128))return this[h];return(255-this[h]+1)*-1};lt.prototype.readInt16LE=function(h,l){if(h=h>>>0,!l)ce(h,2,this.length);let c=this[h]|this[h+1]<<8;return c&32768?c|4294901760:c};lt.prototype.readInt16BE=function(h,l){if(h=h>>>0,!l)ce(h,2,this.length);let c=this[h+1]|this[h]<<8;return c&32768?c|4294901760:c};lt.prototype.readInt32LE=function(h,l){if(h=h>>>0,!l)ce(h,4,this.length);return this[h]|this[h+1]<<8|this[h+2]<<16|this[h+3]<<24};lt.prototype.readInt32BE=function(h,l){if(h=h>>>0,!l)ce(h,4,this.length);return this[h]<<24|this[h+1]<<16|this[h+2]<<8|this[h+3]};lt.prototype.readBigInt64LE=Oe(function(h){h=h>>>0,Ke(h,"offset");let l=this[h],c=this[h+7];if(l===void 0||c===void 0)Xe(h,this.length-8);let b=this[h+4]+this[h+5]*256+this[h+6]*65536+(c<<24);return(BigInt(b)<<BigInt(32))+BigInt(l+this[++h]*256+this[++h]*65536+this[++h]*16777216)});lt.prototype.readBigInt64BE=Oe(function(h){h=h>>>0,Ke(h,"offset");let l=this[h],c=this[h+7];if(l===void 0||c===void 0)Xe(h,this.length-8);let b=(l<<24)+this[++h]*65536+this[++h]*256+this[++h];return(BigInt(b)<<BigInt(32))+BigInt(this[++h]*16777216+this[++h]*65536+this[++h]*256+c)});lt.prototype.readFloatLE=function(h,l){if(h=h>>>0,!l)ce(h,4,this.length);return dr(this,h,!0,23,4)};lt.prototype.readFloatBE=function(h,l){if(h=h>>>0,!l)ce(h,4,this.length);return dr(this,h,!1,23,4)};lt.prototype.readDoubleLE=function(h,l){if(h=h>>>0,!l)ce(h,8,this.length);return dr(this,h,!0,52,8)};lt.prototype.readDoubleBE=function(h,l){if(h=h>>>0,!l)ce(h,8,this.length);return dr(this,h,!1,52,8)};lt.prototype.writeUintLE=lt.prototype.writeUIntLE=function(h,l,c,b){if(h=+h,l=l>>>0,c=c>>>0,!b){let a=Math.pow(2,8*c)-1;_e(this,h,l,c,a,0)}let p=1,M=0;this[l]=h&255;while(++M<c&&(p*=256))this[l+M]=h/p&255;return l+c};lt.prototype.writeUintBE=lt.prototype.writeUIntBE=function(h,l,c,b){if(h=+h,l=l>>>0,c=c>>>0,!b){let a=Math.pow(2,8*c)-1;_e(this,h,l,c,a,0)}let p=c-1,M=1;this[l+p]=h&255;while(--p>=0&&(M*=256))this[l+p]=h/M&255;return l+c};lt.prototype.writeUint8=lt.prototype.writeUInt8=function(h,l,c){if(h=+h,l=l>>>0,!c)_e(this,h,l,1,255,0);return this[l]=h&255,l+1};lt.prototype.writeUint16LE=lt.prototype.writeUInt16LE=function(h,l,c){if(h=+h,l=l>>>0,!c)_e(this,h,l,2,65535,0);return this[l]=h&255,this[l+1]=h>>>8,l+2};lt.prototype.writeUint16BE=lt.prototype.writeUInt16BE=function(h,l,c){if(h=+h,l=l>>>0,!c)_e(this,h,l,2,65535,0);return this[l]=h>>>8,this[l+1]=h&255,l+2};lt.prototype.writeUint32LE=lt.prototype.writeUInt32LE=function(h,l,c){if(h=+h,l=l>>>0,!c)_e(this,h,l,4,4294967295,0);return this[l+3]=h>>>24,this[l+2]=h>>>16,this[l+1]=h>>>8,this[l]=h&255,l+4};lt.prototype.writeUint32BE=lt.prototype.writeUInt32BE=function(h,l,c){if(h=+h,l=l>>>0,!c)_e(this,h,l,4,4294967295,0);return this[l]=h>>>24,this[l+1]=h>>>16,this[l+2]=h>>>8,this[l+3]=h&255,l+4};lt.prototype.writeBigUInt64LE=Oe(function(h,l=0){return xi(this,h,l,BigInt(0),BigInt("0xffffffffffffffff"))});lt.prototype.writeBigUInt64BE=Oe(function(h,l=0){return ki(this,h,l,BigInt(0),BigInt("0xffffffffffffffff"))});lt.prototype.writeIntLE=function(h,l,c,b){if(h=+h,l=l>>>0,!b){let E=Math.pow(2,8*c-1);_e(this,h,l,c,E-1,-E)}let p=0,M=1,a=0;this[l]=h&255;while(++p<c&&(M*=256)){if(h<0&&a===0&&this[l+p-1]!==0)a=1;this[l+p]=(h/M>>0)-a&255}return l+c};lt.prototype.writeIntBE=function(h,l,c,b){if(h=+h,l=l>>>0,!b){let E=Math.pow(2,8*c-1);_e(this,h,l,c,E-1,-E)}let p=c-1,M=1,a=0;this[l+p]=h&255;while(--p>=0&&(M*=256)){if(h<0&&a===0&&this[l+p+1]!==0)a=1;this[l+p]=(h/M>>0)-a&255}return l+c};lt.prototype.writeInt8=function(h,l,c){if(h=+h,l=l>>>0,!c)_e(this,h,l,1,127,-128);if(h<0)h=255+h+1;return this[l]=h&255,l+1};lt.prototype.writeInt16LE=function(h,l,c){if(h=+h,l=l>>>0,!c)_e(this,h,l,2,32767,-32768);return this[l]=h&255,this[l+1]=h>>>8,l+2};lt.prototype.writeInt16BE=function(h,l,c){if(h=+h,l=l>>>0,!c)_e(this,h,l,2,32767,-32768);return this[l]=h>>>8,this[l+1]=h&255,l+2};lt.prototype.writeInt32LE=function(h,l,c){if(h=+h,l=l>>>0,!c)_e(this,h,l,4,2147483647,-2147483648);return this[l]=h&255,this[l+1]=h>>>8,this[l+2]=h>>>16,this[l+3]=h>>>24,l+4};lt.prototype.writeInt32BE=function(h,l,c){if(h=+h,l=l>>>0,!c)_e(this,h,l,4,2147483647,-2147483648);if(h<0)h=4294967295+h+1;return this[l]=h>>>24,this[l+1]=h>>>16,this[l+2]=h>>>8,this[l+3]=h&255,l+4};lt.prototype.writeBigInt64LE=Oe(function(h,l=0){return xi(this,h,l,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});lt.prototype.writeBigInt64BE=Oe(function(h,l=0){return ki(this,h,l,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});lt.prototype.writeFloatLE=function(h,l,c){return Pi(this,h,l,!0,c)};lt.prototype.writeFloatBE=function(h,l,c){return Pi(this,h,l,!1,c)};lt.prototype.writeDoubleLE=function(h,l,c){return qi(this,h,l,!0,c)};lt.prototype.writeDoubleBE=function(h,l,c){return qi(this,h,l,!1,c)};lt.prototype.copy=function(h,l,c,b){if(!lt.isBuffer(h))throw TypeError("argument should be a Buffer");if(!c)c=0;if(!b&&b!==0)b=this.length;if(l>=h.length)l=h.length;if(!l)l=0;if(b>0&&b<c)b=c;if(b===c)return 0;if(h.length===0||this.length===0)return 0;if(l<0)throw RangeError("targetStart out of bounds");if(c<0||c>=this.length)throw RangeError("Index out of range");if(b<0)throw RangeError("sourceEnd out of bounds");if(b>this.length)b=this.length;if(h.length-l<b-c)b=h.length-l+c;let p=b-c;if(this===h&&typeof Uint8Array.prototype.copyWithin==="function")this.copyWithin(l,c,b);else Uint8Array.prototype.set.call(h,this.subarray(c,b),l);return p};lt.prototype.fill=function(h,l,c,b){if(typeof h==="string"){if(typeof l==="string")b=l,l=0,c=this.length;else if(typeof c==="string")b=c,c=this.length;if(b!==void 0&&typeof b!=="string")throw TypeError("encoding must be a string");if(typeof b==="string"&&!lt.isEncoding(b))throw TypeError("Unknown encoding: "+b);if(h.length===1){let M=h.charCodeAt(0);if(b==="utf8"&&M<128||b==="latin1")h=M}}else if(typeof h==="number")h=h&255;else if(typeof h==="boolean")h=Number(h);if(l<0||this.length<l||this.length<c)throw RangeError("Out of range index");if(c<=l)return this;if(l=l>>>0,c=c===void 0?this.length:c>>>0,!h)h=0;let p;if(typeof h==="number")for(p=l;p<c;++p)this[p]=h;else{let M=lt.isBuffer(h)?h:lt.from(h,b),a=M.length;if(a===0)throw TypeError('The value "'+h+'" is invalid for argument "value"');for(p=0;p<c-l;++p)this[p+l]=M[p%a]}return this};To=/[^+/0-9A-Za-z-_]/g;Do=function(){let h=Array(256);for(let l=0;l<16;++l){let c=l*16;for(let b=0;b<16;++b)h[c+b]="0123456789abcdef"[l]+"0123456789abcdef"[b]}return h}();Lo=Fr("resolveObjectURL"),Co=Fr("isUtf8"),Fo=Fr("transcode"),jo=lt});var $i={};lr($i,{TextDecoder:()=>Wi,TextEncoder:()=>Hi,_extend:()=>Gr,callbackify:()=>zi,callbackifyOnRejected:()=>Vr,debuglog:()=>Wo,default:()=>na,deprecate:()=>Ho,format:()=>$r,inherits:()=>Ui,inspect:()=>ze,isArray:()=>Oi,isBoolean:()=>Kr,isBuffer:()=>ea,isDate:()=>Wr,isError:()=>yr,isFunction:()=>br,isNull:()=>vr,isNullOrUndefined:()=>Xo,isNumber:()=>Li,isObject:()=>Ge,isPrimitive:()=>ta,isRegExp:()=>pr,isString:()=>gr,isSymbol:()=>Qo,isUndefined:()=>Ze,log:()=>Ci,promisify:()=>ji,types:()=>Yo});function $r(h,...l){if(!gr(h)){var c=[h];for(var b=0;b<l.length;b++)c.push(ze(l[b]));return c.join(" ")}var b=0,p=l.length,M=String(h).replace(zo,function(E){if(E==="%%")return"%";if(b>=p)return E;switch(E){case"%s":return String(l[b++]);case"%d":return Number(l[b++]);case"%j":try{return JSON.stringify(l[b++])}catch(R){return"[Circular]"}default:return E}});for(var a=l[b];b<p;a=l[++b])if(vr(a)||!Ge(a))M+=" "+a;else M+=" "+ze(a);return M}function Ho(h,l){if(typeof process>"u"||process?.noDeprecation===!0)return h;var c=!1;function b(...p){if(!c){if(process.throwDeprecation)throw Error(l);else if(process.traceDeprecation)console.trace(l);else console.error(l);c=!0}return h.apply(this,...p)}return b}function $o(h,l){var c=ze.styles[l];if(c)return"\x1B["+ze.colors[c][0]+"m"+h+"\x1B["+ze.colors[c][1]+"m";else return h}function Ko(h,l){return h}function Zo(h){var l={};return h.forEach(function(c,b){l[c]=!0}),l}function mr(h,l,c){if(h.customInspect&&l&&br(l.inspect)&&l.inspect!==ze&&!(l.constructor&&l.constructor.prototype===l)){var b=l.inspect(c,h);if(!gr(b))b=mr(h,b,c);return b}var p=Go(h,l);if(p)return p;var M=Object.keys(l),a=Zo(M);if(h.showHidden)M=Object.getOwnPropertyNames(l);if(yr(l)&&(M.indexOf("message")>=0||M.indexOf("description")>=0))return jr(l);if(M.length===0){if(br(l)){var E=l.name?": "+l.name:"";return h.stylize("[Function"+E+"]","special")}if(pr(l))return h.stylize(RegExp.prototype.toString.call(l),"regexp");if(Wr(l))return h.stylize(Date.prototype.toString.call(l),"date");if(yr(l))return jr(l)}var R="",w=!1,g=["{","}"];if(Oi(l))w=!0,g=["[","]"];if(br(l)){var y=l.name?": "+l.name:"";R=" [Function"+y+"]"}if(pr(l))R=" "+RegExp.prototype.toString.call(l);if(Wr(l))R=" "+Date.prototype.toUTCString.call(l);if(yr(l))R=" "+jr(l);if(M.length===0&&(!w||l.length==0))return g[0]+R+g[1];if(c<0)if(pr(l))return h.stylize(RegExp.prototype.toString.call(l),"regexp");else return h.stylize("[Object]","special");h.seen.push(l);var v;if(w)v=Vo(h,l,c,a,M);else v=M.map(function(S){return Hr(h,l,c,a,S,w)});return h.seen.pop(),Jo(v,R,g)}function Go(h,l){if(Ze(l))return h.stylize("undefined","undefined");if(gr(l)){var c="'"+JSON.stringify(l).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return h.stylize(c,"string")}if(Li(l))return h.stylize(""+l,"number");if(Kr(l))return h.stylize(""+l,"boolean");if(vr(l))return h.stylize("null","null")}function jr(h){return"["+Error.prototype.toString.call(h)+"]"}function Vo(h,l,c,b,p){var M=[];for(var a=0,E=l.length;a<E;++a)if(Fi(l,String(a)))M.push(Hr(h,l,c,b,String(a),!0));else M.push("");return p.forEach(function(R){if(!R.match(/^\d+$/))M.push(Hr(h,l,c,b,R,!0))}),M}function Hr(h,l,c,b,p,M){var a,E,R;if(R=Object.getOwnPropertyDescriptor(l,p)||{value:l[p]},R.get)if(R.set)E=h.stylize("[Getter/Setter]","special");else E=h.stylize("[Getter]","special");else if(R.set)E=h.stylize("[Setter]","special");if(!Fi(b,p))a="["+p+"]";if(!E)if(h.seen.indexOf(R.value)<0){if(vr(c))E=mr(h,R.value,null);else E=mr(h,R.value,c-1);if(E.indexOf(`
|
|
2
|
+
`)>-1)if(M)E=E.split(`
|
|
3
|
+
`).map(function(w){return" "+w}).join(`
|
|
4
|
+
`).slice(2);else E=`
|
|
5
|
+
`+E.split(`
|
|
6
|
+
`).map(function(w){return" "+w}).join(`
|
|
7
|
+
`)}else E=h.stylize("[Circular]","special");if(Ze(a)){if(M&&p.match(/^\d+$/))return E;if(a=JSON.stringify(""+p),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/))a=a.slice(1,-1),a=h.stylize(a,"name");else a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=h.stylize(a,"string")}return a+": "+E}function Jo(h,l,c){var b=0,p=h.reduce(function(M,a){if(b++,a.indexOf(`
|
|
8
|
+
`)>=0)b++;return M+a.replace(/\u001b\[\d\d?m/g,"").length+1},0);if(p>60)return c[0]+(l===""?"":l+`
|
|
9
|
+
`)+" "+h.join(`,
|
|
10
|
+
`)+" "+c[1];return c[0]+l+" "+h.join(", ")+" "+c[1]}function Oi(h){return Array.isArray(h)}function Kr(h){return typeof h==="boolean"}function vr(h){return h===null}function Xo(h){return h==null}function Li(h){return typeof h==="number"}function gr(h){return typeof h==="string"}function Qo(h){return typeof h==="symbol"}function Ze(h){return h===void 0}function pr(h){return Ge(h)&&Zr(h)==="[object RegExp]"}function Ge(h){return typeof h==="object"&&h!==null}function Wr(h){return Ge(h)&&Zr(h)==="[object Date]"}function yr(h){return Ge(h)&&(Zr(h)==="[object Error]"||h instanceof Error)}function br(h){return typeof h==="function"}function ta(h){return h===null||typeof h==="boolean"||typeof h==="number"||typeof h==="string"||typeof h==="symbol"||typeof h>"u"}function ea(h){return h instanceof Buffer}function Zr(h){return Object.prototype.toString.call(h)}function zr(h){return h<10?"0"+h.toString(10):h.toString(10)}function ia(){var h=new Date,l=[zr(h.getHours()),zr(h.getMinutes()),zr(h.getSeconds())].join(":");return[h.getDate(),ra[h.getMonth()],l].join(" ")}function Ci(...h){console.log("%s - %s",ia(),$r.apply(null,h))}function Ui(h,l){if(l)h.super_=l,h.prototype=Object.create(l.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}})}function Gr(h,l){if(!l||!Ge(l))return h;var c=Object.keys(l),b=c.length;while(b--)h[c[b]]=l[c[b]];return h}function Fi(h,l){return Object.prototype.hasOwnProperty.call(h,l)}function Vr(h,l){if(!h){var c=Error("Promise was rejected with a falsy value");c.reason=h,h=c}return l(h)}function zi(h){if(typeof h!=="function")throw TypeError('The "original" argument must be of type Function');function l(...c){var b=c.pop();if(typeof b!=="function")throw TypeError("The last argument must be of type Function");var p=this,M=function(...a){return b.apply(p,...a)};h.apply(this,c).then(function(a){process.nextTick(M.bind(null,null,a))},function(a){process.nextTick(Vr.bind(null,a,M))})}return Object.setPrototypeOf(l,Object.getPrototypeOf(h)),Object.defineProperties(l,Object.getOwnPropertyDescriptors(h)),l}var zo,Wo,ze,Yo=()=>{},ra,ji,Hi,Wi,na;var Ki=ur(()=>{zo=/%[sdj%]/g;Wo=((h={},l={},c)=>((c=typeof process<"u"&&!1)&&(c=c.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase()),l=new RegExp("^"+c+"$","i"),(b)=>{if(b=b.toUpperCase(),!h[b])if(l.test(b))h[b]=function(...p){console.error("%s: %s",b,pid,$r.apply(null,...p))};else h[b]=function(){};return h[b]}))(),ze=((h)=>(h.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},h.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},h.custom=Symbol.for("nodejs.util.inspect.custom"),h))(function(h,l,...c){var b={seen:[],stylize:Ko};if(c.length>=1)b.depth=c[0];if(c.length>=2)b.colors=c[1];if(Kr(l))b.showHidden=l;else if(l)Gr(b,l);if(Ze(b.showHidden))b.showHidden=!1;if(Ze(b.depth))b.depth=2;if(Ze(b.colors))b.colors=!1;if(b.colors)b.stylize=$o;return mr(b,h,b.depth)});ra=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];ji=((h)=>(h.custom=Symbol.for("nodejs.util.promisify.custom"),h))(function(h){if(typeof h!=="function")throw TypeError('The "original" argument must be of type Function');if(kCustomPromisifiedSymbol&&h[kCustomPromisifiedSymbol]){var l=h[kCustomPromisifiedSymbol];if(typeof l!=="function")throw TypeError('The "nodejs.util.promisify.custom" argument must be of type Function');return Object.defineProperty(l,kCustomPromisifiedSymbol,{value:l,enumerable:!1,writable:!1,configurable:!0}),l}function l(...c){var b,p,M=new Promise(function(a,E){b=a,p=E});c.push(function(a,E){if(a)p(a);else b(E)});try{h.apply(this,c)}catch(a){p(a)}return M}if(Object.setPrototypeOf(l,Object.getPrototypeOf(h)),kCustomPromisifiedSymbol)Object.defineProperty(l,kCustomPromisifiedSymbol,{value:l,enumerable:!1,writable:!1,configurable:!0});return Object.defineProperties(l,Object.getOwnPropertyDescriptors(h))});({TextEncoder:Hi,TextDecoder:Wi}=globalThis),na={TextEncoder:Hi,TextDecoder:Wi,promisify:ji,log:Ci,inherits:Ui,_extend:Gr,callbackifyOnRejected:Vr,callbackify:zi}});var tr={};lr(tr,{EventEmitter:()=>Le,addAbortListener:()=>hn,captureRejectionSymbol:()=>Yi,default:()=>ca,getEventListeners:()=>rn,getMaxListeners:()=>sn,init:()=>Le,listenerCount:()=>on,once:()=>en,setMaxListeners:()=>nn});function Xi(h,l){var{_events:c}=h;if(l[0]??=Error("Unhandled error."),!c)throw l[0];var b=c[Ji];if(b)for(var p of Gi.call(b))p.apply(h,l);var M=c.error;if(!M)throw l[0];for(var p of Gi.call(M))p.apply(h,l);return!0}function sa(h,l,c,b){l.then(void 0,function(p){queueMicrotask(()=>ha(h,p,c,b))})}function ha(h,l,c,b){if(typeof h[Zi]==="function")h[Zi](l,c,...b);else try{h[He]=!1,h.emit("error",l)}finally{h[He]=!0}}function Qi(h,l,c){c.warned=!0;let b=Error(`Possible EventEmitter memory leak detected. ${c.length} ${String(l)} listeners added to [${h.constructor.name}]. Use emitter.setMaxListeners() to increase limit`);b.name="MaxListenersExceededWarning",b.emitter=h,b.type=l,b.count=c.length,console.warn(b)}function tn(h,l,...c){this.removeListener(h,l),l.apply(this,c)}function en(h,l,c){var b=c?.signal;if(an(b,"options.signal"),b?.aborted)throw new Jr(void 0,{cause:b?.reason});let{resolve:p,reject:M,promise:a}=$newPromiseCapability(Promise),E=(g)=>{if(h.removeListener(l,R),b!=null)wr(b,"abort",w);M(g)},R=(...g)=>{if(typeof h.removeListener==="function")h.removeListener("error",E);if(b!=null)wr(b,"abort",w);p(g)};if(Vi(h,l,R,{once:!0}),l!=="error"&&typeof h.once==="function")h.once("error",E);function w(){wr(h,l,R),wr(h,"error",E),M(new Jr(void 0,{cause:b?.reason}))}if(b!=null)Vi(b,"abort",w,{once:!0});return a}function rn(h,l){return h.listeners(l)}function nn(h,...l){Xr(h,"setMaxListeners",0);var c;if(l&&(c=l.length))for(let b=0;b<c;b++)l[b].setMaxListeners(h);else We=h}function on(h,l){return h.listenerCount(l)}function wr(h,l,c,b){if(typeof h.removeListener==="function")h.removeListener(l,c);else h.removeEventListener(l,c,b)}function Vi(h,l,c,b){if(typeof h.on==="function")if(b.once)h.once(l,c);else h.on(l,c);else h.addEventListener(l,c,b)}function Ve(h,l,c){let b=TypeError(`The "${h}" argument must be of type ${l}. Received ${c}`);return b.code="ERR_INVALID_ARG_TYPE",b}function ua(h,l,c){let b=RangeError(`The "${h}" argument is out of range. It must be ${l}. Received ${c}`);return b.code="ERR_OUT_OF_RANGE",b}function an(h,l){if(h!==void 0&&(h===null||typeof h!=="object"||!("aborted"in h)))throw Ve(l,"AbortSignal",h)}function Xr(h,l,c,b){if(typeof h!=="number")throw Ve(l,"number",h);if(c!=null&&h<c||b!=null&&h>b||(c!=null||b!=null)&&Number.isNaN(h))throw ua(l,`${c!=null?`>= ${c}`:""}${c!=null&&b!=null?" && ":""}${b!=null?`<= ${b}`:""}`,h)}function Qe(h){if(typeof h!=="function")throw TypeError("The listener must be a function")}function da(h,l){if(typeof h!=="boolean")throw Ve(l,"boolean",h)}function sn(h){return h?._maxListeners??We}function hn(h,l){if(h===void 0)throw Ve("signal","AbortSignal",h);if(an(h,"signal"),typeof l!=="function")throw Ve("listener","function",l);let c;if(h.aborted)queueMicrotask(()=>l());else h.addEventListener("abort",l,{__proto__:null,once:!0}),c=()=>{h.removeEventListener("abort",l)};return{__proto__:null,[Symbol.dispose](){c?.()}}}var Yr,He,Ji,oa,aa,Zi,Yi,Gi,We=10,Le=function(h){if(this._events===void 0||this._events===this.__proto__._events)this._events={__proto__:null},this._eventsCount=0;if(this._maxListeners??=void 0,this[He]=h?.captureRejections?Boolean(h?.captureRejections):$t[He])this.emit=la},$t,fa=function(h,...l){if(h==="error")return Xi(this,l);var{_events:c}=this;if(c===void 0)return!1;var b=c[h];if(b===void 0)return!1;let p=b.length>1?b.slice():b;for(let M=0,{length:a}=p;M<a;M++){let E=p[M];switch(l.length){case 0:E.call(this);break;case 1:E.call(this,l[0]);break;case 2:E.call(this,l[0],l[1]);break;case 3:E.call(this,l[0],l[1],l[2]);break;default:E.apply(this,l);break}}return!0},la=function(h,...l){if(h==="error")return Xi(this,l);var{_events:c}=this;if(c===void 0)return!1;var b=c[h];if(b===void 0)return!1;let p=b.length>1?b.slice():b;for(let M=0,{length:a}=p;M<a;M++){let E=p[M],R;switch(l.length){case 0:R=E.call(this);break;case 1:R=E.call(this,l[0]);break;case 2:R=E.call(this,l[0],l[1]);break;case 3:R=E.call(this,l[0],l[1],l[2]);break;default:R=E.apply(this,l);break}if(R!==void 0&&typeof R?.then==="function"&&R.then===Promise.prototype.then)sa(this,R,h,l)}return!0},Jr,ca;var er=ur(()=>{Yr=Symbol.for,He=Symbol("kCapture"),Ji=Yr("events.errorMonitor"),oa=Symbol("events.maxEventTargetListeners"),aa=Symbol("events.maxEventTargetListenersWarned"),Zi=Yr("nodejs.rejection"),Yi=Yr("nodejs.rejection"),Gi=Array.prototype.slice,$t=Le.prototype={};$t._events=void 0;$t._eventsCount=0;$t._maxListeners=void 0;$t.setMaxListeners=function(h){return Xr(h,"setMaxListeners",0),this._maxListeners=h,this};$t.constructor=Le;$t.getMaxListeners=function(){return this?._maxListeners??We};$t.emit=fa;$t.addListener=function(h,l){Qe(l);var c=this._events;if(!c)c=this._events={__proto__:null},this._eventsCount=0;else if(c.newListener)this.emit("newListener",h,l.listener??l);var b=c[h];if(!b)c[h]=[l],this._eventsCount++;else{b.push(l);var p=this._maxListeners??We;if(p>0&&b.length>p&&!b.warned)Qi(this,h,b)}return this};$t.on=$t.addListener;$t.prependListener=function(h,l){Qe(l);var c=this._events;if(!c)c=this._events={__proto__:null},this._eventsCount=0;else if(c.newListener)this.emit("newListener",h,l.listener??l);var b=c[h];if(!b)c[h]=[l],this._eventsCount++;else{b.unshift(l);var p=this._maxListeners??We;if(p>0&&b.length>p&&!b.warned)Qi(this,h,b)}return this};$t.once=function(h,l){Qe(l);let c=tn.bind(this,h,l);return c.listener=l,this.addListener(h,c),this};$t.prependOnceListener=function(h,l){Qe(l);let c=tn.bind(this,h,l);return c.listener=l,this.prependListener(h,c),this};$t.removeListener=function(h,l){Qe(l);var{_events:c}=this;if(!c)return this;var b=c[h];if(!b)return this;var p=b.length;let M=-1;for(let a=p-1;a>=0;a--)if(b[a]===l||b[a].listener===l){M=a;break}if(M<0)return this;if(M===0)b.shift();else b.splice(M,1);if(b.length===0)delete c[h],this._eventsCount--;return this};$t.off=$t.removeListener;$t.removeAllListeners=function(h){var{_events:l}=this;if(h&&l){if(l[h])delete l[h],this._eventsCount--}else this._events={__proto__:null};return this};$t.listeners=function(h){var{_events:l}=this;if(!l)return[];var c=l[h];if(!c)return[];return c.map((b)=>b.listener??b)};$t.rawListeners=function(h){var{_events:l}=this;if(!l)return[];var c=l[h];if(!c)return[];return c.slice()};$t.listenerCount=function(h){var{_events:l}=this;if(!l)return 0;return l[h]?.length??0};$t.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};$t[He]=!1;Jr=class Jr extends Error{constructor(h="The operation was aborted",l=void 0){if(l!==void 0&&typeof l!=="object")throw Ve("options","Object",l);super(h,l);this.code="ABORT_ERR",this.name="AbortError"}};Object.defineProperties(Le,{captureRejections:{get(){return $t[He]},set(h){da(h,"EventEmitter.captureRejections"),$t[He]=h},enumerable:!0},defaultMaxListeners:{enumerable:!0,get:()=>We,set:(h)=>{Xr(h,"defaultMaxListeners",0),We=h}},kMaxEventTargetListeners:{value:oa,enumerable:!1,configurable:!1,writable:!1},kMaxEventTargetListenersWarned:{value:aa,enumerable:!1,configurable:!1,writable:!1}});Object.assign(Le,{once:en,getEventListeners:rn,getMaxListeners:sn,setMaxListeners:nn,EventEmitter:Le,usingDomains:!1,captureRejectionSymbol:Yi,errorMonitor:Ji,addAbortListener:hn,init:Le,listenerCount:on});ca=Le});var ri=Yn(function(Qh,bn){var zt=(h,l)=>()=>(l||h((l={exports:{}}).exports,l),l.exports),Kt=zt((h,l)=>{class c extends Error{constructor(b){if(!Array.isArray(b))throw TypeError(`Expected input to be an Array, got ${typeof b}`);let p="";for(let M=0;M<b.length;M++)p+=` ${b[M].stack}
|
|
11
|
+
`;super(p);this.name="AggregateError",this.errors=b}}l.exports={AggregateError:c,ArrayIsArray(b){return Array.isArray(b)},ArrayPrototypeIncludes(b,p){return b.includes(p)},ArrayPrototypeIndexOf(b,p){return b.indexOf(p)},ArrayPrototypeJoin(b,p){return b.join(p)},ArrayPrototypeMap(b,p){return b.map(p)},ArrayPrototypePop(b,p){return b.pop(p)},ArrayPrototypePush(b,p){return b.push(p)},ArrayPrototypeSlice(b,p,M){return b.slice(p,M)},Error,FunctionPrototypeCall(b,p,...M){return b.call(p,...M)},FunctionPrototypeSymbolHasInstance(b,p){return Function.prototype[Symbol.hasInstance].call(b,p)},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(b,p){return Object.defineProperties(b,p)},ObjectDefineProperty(b,p,M){return Object.defineProperty(b,p,M)},ObjectGetOwnPropertyDescriptor(b,p){return Object.getOwnPropertyDescriptor(b,p)},ObjectKeys(b){return Object.keys(b)},ObjectSetPrototypeOf(b,p){return Object.setPrototypeOf(b,p)},Promise,PromisePrototypeCatch(b,p){return b.catch(p)},PromisePrototypeThen(b,p,M){return b.then(p,M)},PromiseReject(b){return Promise.reject(b)},PromiseResolve(b){return Promise.resolve(b)},ReflectApply:Reflect.apply,RegExpPrototypeTest(b,p){return b.test(p)},SafeSet:Set,String,StringPrototypeSlice(b,p,M){return b.slice(p,M)},StringPrototypeToLowerCase(b){return b.toLowerCase()},StringPrototypeToUpperCase(b){return b.toUpperCase()},StringPrototypeTrim(b){return b.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet(b,p,M){return b.set(p,M)},Boolean,Uint8Array}}),fn=zt((h,l)=>{l.exports={format(c,...b){return c.replace(/%([sdifj])/g,function(...[p,M]){let a=b.shift();if(M==="f")return a.toFixed(6);else if(M==="j")return JSON.stringify(a);else if(M==="s"&&typeof a==="object")return`${a.constructor!==Object?a.constructor.name:""} {}`.trim();else return a.toString()})},inspect(c){switch(typeof c){case"string":if(c.includes("'")){if(!c.includes('"'))return`"${c}"`;else if(!c.includes("`")&&!c.includes("${"))return`\`${c}\``}return`'${c}'`;case"number":if(isNaN(c))return"NaN";else if(Object.is(c,-0))return String(c);return c;case"bigint":return`${String(c)}n`;case"boolean":case"undefined":return String(c);case"object":return"{}"}}}}),we=zt((h,l)=>{var{format:c,inspect:b}=fn(),{AggregateError:p}=Kt(),M=globalThis.AggregateError||p,a=Symbol("kIsNodeError"),E=["string","function","number","object","Function","Object","boolean","bigint","symbol"],R=/^([A-Z][a-z0-9]*)+$/,w={};function g(T,k){if(!T)throw new w.ERR_INTERNAL_ASSERTION(k)}function y(T){let k="",P=T.length,D=T[0]==="-"?1:0;for(;P>=D+4;P-=3)k=`_${T.slice(P-3,P)}${k}`;return`${T.slice(0,P)}${k}`}function v(T,k,P){if(typeof k==="function")return g(k.length<=P.length,`Code: ${T}; The provided arguments length (${P.length}) does not match the required ones (${k.length}).`),k(...P);let D=(k.match(/%[dfijoOs]/g)||[]).length;if(g(D===P.length,`Code: ${T}; The provided arguments length (${P.length}) does not match the required ones (${D}).`),P.length===0)return k;return c(k,...P)}function S(T,k,P){if(!P)P=Error;class D extends P{constructor(...O){super(v(T,k,O))}toString(){return`${this.name} [${T}]: ${this.message}`}}Object.defineProperties(D.prototype,{name:{value:P.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${T}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),D.prototype.code=T,D.prototype[a]=!0,w[T]=D}function A(T){let k="__node_internal_"+T.name;return Object.defineProperty(T,"name",{value:k}),T}function x(T,k){if(T&&k&&T!==k){if(Array.isArray(k.errors))return k.errors.push(T),k;let P=new M([k,T],k.message);return P.code=k.code,P}return T||k}class B extends Error{constructor(T="The operation was aborted",k=void 0){if(k!==void 0&&typeof k!=="object")throw new w.ERR_INVALID_ARG_TYPE("options","Object",k);super(T,k);this.code="ABORT_ERR",this.name="AbortError"}}S("ERR_ASSERTION","%s",Error),S("ERR_INVALID_ARG_TYPE",(T,k,P)=>{if(g(typeof T==="string","'name' must be a string"),!Array.isArray(k))k=[k];let D="The ";if(T.endsWith(" argument"))D+=`${T} `;else D+=`"${T}" ${T.includes(".")?"property":"argument"} `;D+="must be ";let O=[],W=[],at=[];for(let st of k)if(g(typeof st==="string","All expected entries have to be of type string"),E.includes(st))O.push(st.toLowerCase());else if(R.test(st))W.push(st);else g(st!=="object",'The value "object" should be written as "Object"'),at.push(st);if(W.length>0){let st=O.indexOf("object");if(st!==-1)O.splice(O,st,1),W.push("Object")}if(O.length>0){switch(O.length){case 1:D+=`of type ${O[0]}`;break;case 2:D+=`one of type ${O[0]} or ${O[1]}`;break;default:{let st=O.pop();D+=`one of type ${O.join(", ")}, or ${st}`}}if(W.length>0||at.length>0)D+=" or "}if(W.length>0){switch(W.length){case 1:D+=`an instance of ${W[0]}`;break;case 2:D+=`an instance of ${W[0]} or ${W[1]}`;break;default:{let st=W.pop();D+=`an instance of ${W.join(", ")}, or ${st}`}}if(at.length>0)D+=" or "}switch(at.length){case 0:break;case 1:if(at[0].toLowerCase()!==at[0])D+="an ";D+=`${at[0]}`;break;case 2:D+=`one of ${at[0]} or ${at[1]}`;break;default:{let st=at.pop();D+=`one of ${at.join(", ")}, or ${st}`}}if(P==null)D+=`. Received ${P}`;else if(typeof P==="function"&&P.name)D+=`. Received function ${P.name}`;else if(typeof P==="object"){var ft;if((ft=P.constructor)!==null&&ft!==void 0&&ft.name)D+=`. Received an instance of ${P.constructor.name}`;else{let st=b(P,{depth:-1});D+=`. Received ${st}`}}else{let st=b(P,{colors:!1});if(st.length>25)st=`${st.slice(0,25)}...`;D+=`. Received type ${typeof P} (${st})`}return D},TypeError),S("ERR_INVALID_ARG_VALUE",(T,k,P="is invalid")=>{let D=b(k);if(D.length>128)D=D.slice(0,128)+"...";return`The ${T.includes(".")?"property":"argument"} '${T}' ${P}. Received ${D}`},TypeError),S("ERR_INVALID_RETURN_VALUE",(T,k,P)=>{var D;let O=P!==null&&P!==void 0&&(D=P.constructor)!==null&&D!==void 0&&D.name?`instance of ${P.constructor.name}`:`type ${typeof P}`;return`Expected ${T} to be returned from the "${k}" function but got ${O}.`},TypeError),S("ERR_MISSING_ARGS",(...T)=>{g(T.length>0,"At least one arg needs to be specified");let k,P=T.length;switch(T=(Array.isArray(T)?T:[T]).map((D)=>`"${D}"`).join(" or "),P){case 1:k+=`The ${T[0]} argument`;break;case 2:k+=`The ${T[0]} and ${T[1]} arguments`;break;default:{let D=T.pop();k+=`The ${T.join(", ")}, and ${D} arguments`}break}return`${k} must be specified`},TypeError),S("ERR_OUT_OF_RANGE",(T,k,P)=>{g(k,'Missing "range" argument');let D;if(Number.isInteger(P)&&Math.abs(P)>4294967296)D=y(String(P));else if(typeof P==="bigint"){D=String(P);let O=BigInt(2)**BigInt(32);if(P>O||P<-O)D=y(D);D+="n"}else D=b(P);return`The value of "${T}" is out of range. It must be ${k}. Received ${D}`},RangeError),S("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),S("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),S("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),S("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),S("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),S("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),S("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),S("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),S("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),S("ERR_STREAM_WRITE_AFTER_END","write after end",Error),S("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),l.exports={AbortError:B,aggregateTwoErrors:A(x),hideStackFrames:A,codes:w}}),pa=zt((h,l)=>{Object.defineProperty(h,"__esModule",{value:!0});var c=new WeakMap,b=new WeakMap;function p(j){let rt=c.get(j);return console.assert(rt!=null,"'this' is expected an Event object, but got",j),rt}function M(j){if(j.passiveListener!=null){if(typeof console<"u"&&typeof console.error==="function")console.error("Unable to preventDefault inside passive event listener invocation.",j.passiveListener);return}if(!j.event.cancelable)return;if(j.canceled=!0,typeof j.event.preventDefault==="function")j.event.preventDefault()}function a(j,rt){c.set(this,{eventTarget:j,event:rt,eventPhase:2,currentTarget:j,canceled:!1,stopped:!1,immediateStopped:!1,passiveListener:null,timeStamp:rt.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});let t=Object.keys(rt);for(let i=0;i<t.length;++i){let o=t[i];if(!(o in this))Object.defineProperty(this,o,E(o))}}if(a.prototype={get type(){return p(this).event.type},get target(){return p(this).eventTarget},get currentTarget(){return p(this).currentTarget},composedPath(){let j=p(this).currentTarget;if(j==null)return[];return[j]},get NONE(){return 0},get CAPTURING_PHASE(){return 1},get AT_TARGET(){return 2},get BUBBLING_PHASE(){return 3},get eventPhase(){return p(this).eventPhase},stopPropagation(){let j=p(this);if(j.stopped=!0,typeof j.event.stopPropagation==="function")j.event.stopPropagation()},stopImmediatePropagation(){let j=p(this);if(j.stopped=!0,j.immediateStopped=!0,typeof j.event.stopImmediatePropagation==="function")j.event.stopImmediatePropagation()},get bubbles(){return Boolean(p(this).event.bubbles)},get cancelable(){return Boolean(p(this).event.cancelable)},preventDefault(){M(p(this))},get defaultPrevented(){return p(this).canceled},get composed(){return Boolean(p(this).event.composed)},get timeStamp(){return p(this).timeStamp},get srcElement(){return p(this).eventTarget},get cancelBubble(){return p(this).stopped},set cancelBubble(j){if(!j)return;let rt=p(this);if(rt.stopped=!0,typeof rt.event.cancelBubble==="boolean")rt.event.cancelBubble=!0},get returnValue(){return!p(this).canceled},set returnValue(j){if(!j)M(p(this))},initEvent(){}},Object.defineProperty(a.prototype,"constructor",{value:a,configurable:!0,writable:!0}),typeof window<"u"&&typeof window.Event<"u")Object.setPrototypeOf(a.prototype,window.Event.prototype),b.set(window.Event.prototype,a);function E(j){return{get(){return p(this).event[j]},set(rt){p(this).event[j]=rt},configurable:!0,enumerable:!0}}function R(j){return{value(){let rt=p(this).event;return rt[j].apply(rt,arguments)},configurable:!0,enumerable:!0}}function w(j,rt){let t=Object.keys(rt);if(t.length===0)return j;function i(o,r){j.call(this,o,r)}i.prototype=Object.create(j.prototype,{constructor:{value:i,configurable:!0,writable:!0}});for(let o=0;o<t.length;++o){let r=t[o];if(!(r in j.prototype)){let n=typeof Object.getOwnPropertyDescriptor(rt,r).value==="function";Object.defineProperty(i.prototype,r,n?R(r):E(r))}}return i}function g(j){if(j==null||j===Object.prototype)return a;let rt=b.get(j);if(rt==null)rt=w(g(Object.getPrototypeOf(j)),j),b.set(j,rt);return rt}function y(j,rt){return new(g(Object.getPrototypeOf(rt)))(j,rt)}function v(j){return p(j).immediateStopped}function S(j,rt){p(j).eventPhase=rt}function A(j,rt){p(j).currentTarget=rt}function x(j,rt){p(j).passiveListener=rt}var B=new WeakMap,T=1,k=2,P=3;function D(j){return j!==null&&typeof j==="object"}function O(j){let rt=B.get(j);if(rt==null)throw TypeError("'this' is expected an EventTarget object, but got another value.");return rt}function W(j){return{get(){let rt=O(this).get(j);while(rt!=null){if(rt.listenerType===P)return rt.listener;rt=rt.next}return null},set(rt){if(typeof rt!=="function"&&!D(rt))rt=null;let t=O(this),i=null,o=t.get(j);while(o!=null){if(o.listenerType===P)if(i!==null)i.next=o.next;else if(o.next!==null)t.set(j,o.next);else t.delete(j);else i=o;o=o.next}if(rt!==null){let r={listener:rt,listenerType:P,passive:!1,once:!1,next:null};if(i===null)t.set(j,r);else i.next=r}},configurable:!0,enumerable:!0}}function at(j,rt){Object.defineProperty(j,`on${rt}`,W(rt))}function ft(j){function rt(){st.call(this)}rt.prototype=Object.create(st.prototype,{constructor:{value:rt,configurable:!0,writable:!0}});for(let t=0;t<j.length;++t)at(rt.prototype,j[t]);return rt}function st(){if(this instanceof st){B.set(this,new Map);return}if(arguments.length===1&&Array.isArray(arguments[0]))return ft(arguments[0]);if(arguments.length>0){let j=Array(arguments.length);for(let rt=0;rt<arguments.length;++rt)j[rt]=arguments[rt];return ft(j)}throw TypeError("Cannot call a class as a function")}if(st.prototype={addEventListener(j,rt,t){if(rt==null)return;if(typeof rt!=="function"&&!D(rt))throw TypeError("'listener' should be a function or an object.");let i=O(this),o=D(t),r=(o?Boolean(t.capture):Boolean(t))?T:k,n={listener:rt,listenerType:r,passive:o&&Boolean(t.passive),once:o&&Boolean(t.once),next:null},u=i.get(j);if(u===void 0){i.set(j,n);return}let d=null;while(u!=null){if(u.listener===rt&&u.listenerType===r)return;d=u,u=u.next}d.next=n},removeEventListener(j,rt,t){if(rt==null)return;let i=O(this),o=(D(t)?Boolean(t.capture):Boolean(t))?T:k,r=null,n=i.get(j);while(n!=null){if(n.listener===rt&&n.listenerType===o){if(r!==null)r.next=n.next;else if(n.next!==null)i.set(j,n.next);else i.delete(j);return}r=n,n=n.next}},dispatchEvent(j){if(j==null||typeof j.type!=="string")throw TypeError('"event.type" should be a string.');let rt=O(this),t=j.type,i=rt.get(t);if(i==null)return!0;let o=y(this,j),r=null;while(i!=null){if(i.once)if(r!==null)r.next=i.next;else if(i.next!==null)rt.set(t,i.next);else rt.delete(t);else r=i;if(x(o,i.passive?i.listener:null),typeof i.listener==="function")try{i.listener.call(this,o)}catch(n){if(typeof console<"u"&&typeof console.error==="function")console.error(n)}else if(i.listenerType!==P&&typeof i.listener.handleEvent==="function")i.listener.handleEvent(o);if(v(o))break;i=i.next}return x(o,null),S(o,0),A(o,null),!o.defaultPrevented}},Object.defineProperty(st.prototype,"constructor",{value:st,configurable:!0,writable:!0}),typeof window<"u"&&typeof window.EventTarget<"u")Object.setPrototypeOf(st.prototype,window.EventTarget.prototype);h.defineEventAttribute=at,h.EventTarget=st,h.default=st,l.exports=st,l.exports.EventTarget=l.exports.default=st,l.exports.defineEventAttribute=at}),rr=zt((h,l)=>{Object.defineProperty(h,"__esModule",{value:!0});var c=pa();class b extends c.EventTarget{constructor(){super();throw TypeError("AbortSignal cannot be constructed directly")}get aborted(){let g=a.get(this);if(typeof g!=="boolean")throw TypeError(`Expected 'this' to be an 'AbortSignal' object, but got ${this===null?"null":typeof this}`);return g}}c.defineEventAttribute(b.prototype,"abort");function p(){let g=Object.create(b.prototype);return c.EventTarget.call(g),a.set(g,!1),g}function M(g){if(a.get(g)!==!1)return;a.set(g,!0),g.dispatchEvent({type:"abort"})}var a=new WeakMap;if(Object.defineProperties(b.prototype,{aborted:{enumerable:!0}}),typeof Symbol==="function"&&typeof Symbol.toStringTag==="symbol")Object.defineProperty(b.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortSignal"});class E{constructor(){R.set(this,p())}get signal(){return w(this)}abort(){M(w(this))}}var R=new WeakMap;function w(g){let y=R.get(g);if(y==null)throw TypeError(`Expected 'this' to be an 'AbortController' object, but got ${g===null?"null":typeof g}`);return y}if(Object.defineProperties(E.prototype,{signal:{enumerable:!0},abort:{enumerable:!0}}),typeof Symbol==="function"&&typeof Symbol.toStringTag==="symbol")Object.defineProperty(E.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortController"});h.AbortController=E,h.AbortSignal=b,h.default=E,l.exports=E,l.exports.AbortController=l.exports.default=E,l.exports.AbortSignal=b}),Se=zt((h,l)=>{var c=(ye(),jt(pe)),{format:b,inspect:p}=fn(),{codes:{ERR_INVALID_ARG_TYPE:M}}=we(),{kResistStopPropagation:a,AggregateError:E,SymbolDispose:R}=Kt(),w=globalThis.AbortSignal||rr().AbortSignal,g=globalThis.AbortController||rr().AbortController,y=Object.getPrototypeOf(async function(){}).constructor,v=globalThis.Blob||c.Blob,S=typeof v<"u"?function(B){return B instanceof v}:function(B){return!1},A=(B,T)=>{if(B!==void 0&&(B===null||typeof B!=="object"||!("aborted"in B)))throw new M(T,"AbortSignal",B)},x=(B,T)=>{if(typeof B!=="function")throw new M(T,"Function",B)};l.exports={AggregateError:E,kEmptyObject:Object.freeze({}),once(B){let T=!1;return function(...k){if(T)return;T=!0,B.apply(this,k)}},createDeferredPromise:function(){let B,T;return{promise:new Promise((k,P)=>{B=k,T=P}),resolve:B,reject:T}},promisify(B){return new Promise((T,k)=>{B((P,...D)=>{if(P)return k(P);return T(...D)})})},debuglog(){return function(){}},format:b,inspect:p,types:{isAsyncFunction(B){return B instanceof y},isArrayBufferView(B){return ArrayBuffer.isView(B)}},isBlob:S,deprecate(B,T){return B},addAbortListener:(er(),jt(tr)).addAbortListener||function(B,T){if(B===void 0)throw new M("signal","AbortSignal",B);A(B,"signal"),x(T,"listener");let k;if(B.aborted)queueMicrotask(()=>T());else B.addEventListener("abort",T,{__proto__:null,once:!0,[a]:!0}),k=()=>{B.removeEventListener("abort",T)};return{__proto__:null,[R](){var P;(P=k)===null||P===void 0||P()}}},AbortSignalAny:w.any||function(B){if(B.length===1)return B[0];let T=new g,k=()=>T.abort();return B.forEach((P)=>{A(P,"signals"),P.addEventListener("abort",k,{once:!0})}),T.signal.addEventListener("abort",()=>{B.forEach((P)=>P.removeEventListener("abort",k))},{once:!0}),T.signal}},l.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")}),ir=zt((h,l)=>{var{ArrayIsArray:c,ArrayPrototypeIncludes:b,ArrayPrototypeJoin:p,ArrayPrototypeMap:M,NumberIsInteger:a,NumberIsNaN:E,NumberMAX_SAFE_INTEGER:R,NumberMIN_SAFE_INTEGER:w,NumberParseInt:g,ObjectPrototypeHasOwnProperty:y,RegExpPrototypeExec:v,String:S,StringPrototypeToUpperCase:A,StringPrototypeTrim:x}=Kt(),{hideStackFrames:B,codes:{ERR_SOCKET_BAD_PORT:T,ERR_INVALID_ARG_TYPE:k,ERR_INVALID_ARG_VALUE:P,ERR_OUT_OF_RANGE:D,ERR_UNKNOWN_SIGNAL:O}}=we(),{normalizeEncoding:W}=Se(),{isAsyncFunction:at,isArrayBufferView:ft}=Se().types,st={};function j(C){return C===(C|0)}function rt(C){return C===C>>>0}var t=/^[0-7]+$/,i="must be a 32-bit unsigned integer or an octal string";function o(C,K,Nt){if(typeof C>"u")C=Nt;if(typeof C==="string"){if(v(t,C)===null)throw new P(K,C,i);C=g(C,8)}return u(C,K),C}var r=B((C,K,Nt=w,V=R)=>{if(typeof C!=="number")throw new k(K,"number",C);if(!a(C))throw new D(K,"an integer",C);if(C<Nt||C>V)throw new D(K,`>= ${Nt} && <= ${V}`,C)}),n=B((C,K,Nt=-2147483648,V=2147483647)=>{if(typeof C!=="number")throw new k(K,"number",C);if(!a(C))throw new D(K,"an integer",C);if(C<Nt||C>V)throw new D(K,`>= ${Nt} && <= ${V}`,C)}),u=B((C,K,Nt=!1)=>{if(typeof C!=="number")throw new k(K,"number",C);if(!a(C))throw new D(K,"an integer",C);let V=Nt?1:0,it=4294967295;if(C<V||C>it)throw new D(K,`>= ${V} && <= ${it}`,C)});function d(C,K){if(typeof C!=="string")throw new k(K,"string",C)}function s(C,K,Nt=void 0,V){if(typeof C!=="number")throw new k(K,"number",C);if(Nt!=null&&C<Nt||V!=null&&C>V||(Nt!=null||V!=null)&&E(C))throw new D(K,`${Nt!=null?`>= ${Nt}`:""}${Nt!=null&&V!=null?" && ":""}${V!=null?`<= ${V}`:""}`,C)}var e=B((C,K,Nt)=>{if(!b(Nt,C)){let V="must be one of: "+p(M(Nt,(it)=>typeof it==="string"?`'${it}'`:S(it)),", ");throw new P(K,C,V)}});function f(C,K){if(typeof C!=="boolean")throw new k(K,"boolean",C)}function _(C,K,Nt){return C==null||!y(C,K)?Nt:C[K]}var m=B((C,K,Nt=null)=>{let V=_(Nt,"allowArray",!1),it=_(Nt,"allowFunction",!1);if(!_(Nt,"nullable",!1)&&C===null||!V&&c(C)||typeof C!=="object"&&(!it||typeof C!=="function"))throw new k(K,"Object",C)}),I=B((C,K)=>{if(C!=null&&typeof C!=="object"&&typeof C!=="function")throw new k(K,"a dictionary",C)}),N=B((C,K,Nt=0)=>{if(!c(C))throw new k(K,"Array",C);if(C.length<Nt){let V=`must be longer than ${Nt}`;throw new P(K,C,V)}});function U(C,K){N(C,K);for(let Nt=0;Nt<C.length;Nt++)d(C[Nt],`${K}[${Nt}]`)}function Z(C,K){N(C,K);for(let Nt=0;Nt<C.length;Nt++)f(C[Nt],`${K}[${Nt}]`)}function ut(C,K){N(C,K);for(let Nt=0;Nt<C.length;Nt++){let V=C[Nt],it=`${K}[${Nt}]`;if(V==null)throw new k(it,"AbortSignal",V);tt(V,it)}}function Y(C,K="signal"){if(d(C,K),st[C]===void 0){if(st[A(C)]!==void 0)throw new O(C+" (signals must use all capital letters)");throw new O(C)}}var H=B((C,K="buffer")=>{if(!ft(C))throw new k(K,["Buffer","TypedArray","DataView"],C)});function nt(C,K){let Nt=W(K),V=C.length;if(Nt==="hex"&&V%2!==0)throw new P("encoding",K,`is invalid for data of length ${V}`)}function G(C,K="Port",Nt=!0){if(typeof C!=="number"&&typeof C!=="string"||typeof C==="string"&&x(C).length===0||+C!==+C>>>0||C>65535||C===0&&!Nt)throw new T(K,C,Nt);return C|0}var tt=B((C,K)=>{if(C!==void 0&&(C===null||typeof C!=="object"||!("aborted"in C)))throw new k(K,"AbortSignal",C)}),Dt=B((C,K)=>{if(typeof C!=="function")throw new k(K,"Function",C)}),L=B((C,K)=>{if(typeof C!=="function"||at(C))throw new k(K,"Function",C)}),F=B((C,K)=>{if(C!==void 0)throw new k(K,"undefined",C)});function ot(C,K,Nt){if(!b(Nt,C))throw new k(K,`('${p(Nt,"|")}')`,C)}var J=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function Q(C,K){if(typeof C>"u"||!v(J,C))throw new P(K,C,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}function Mt(C){if(typeof C==="string")return Q(C,"hints"),C;else if(c(C)){let K=C.length,Nt="";if(K===0)return Nt;for(let V=0;V<K;V++){let it=C[V];if(Q(it,"hints"),Nt+=it,V!==K-1)Nt+=", "}return Nt}throw new P("hints",C,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}l.exports={isInt32:j,isUint32:rt,parseFileMode:o,validateArray:N,validateStringArray:U,validateBooleanArray:Z,validateAbortSignalArray:ut,validateBoolean:f,validateBuffer:H,validateDictionary:I,validateEncoding:nt,validateFunction:Dt,validateInt32:n,validateInteger:r,validateNumber:s,validateObject:m,validateOneOf:e,validatePlainFunction:L,validatePort:G,validateSignalName:Y,validateString:d,validateUint32:u,validateUndefined:F,validateUnion:ot,validateAbortSignal:tt,validateLinkHeaderValue:Mt}}),$e=zt((h,l)=>{l.exports=globalThis.process}),Ne=zt((h,l)=>{var{SymbolAsyncIterator:c,SymbolIterator:b,SymbolFor:p}=Kt(),M=p("nodejs.stream.destroyed"),a=p("nodejs.stream.errored"),E=p("nodejs.stream.readable"),R=p("nodejs.stream.writable"),w=p("nodejs.stream.disturbed"),g=p("nodejs.webstream.isClosedPromise"),y=p("nodejs.webstream.controllerErrorFunction");function v(_,m=!1){var I;return!!(_&&typeof _.pipe==="function"&&typeof _.on==="function"&&(!m||typeof _.pause==="function"&&typeof _.resume==="function")&&(!_._writableState||((I=_._readableState)===null||I===void 0?void 0:I.readable)!==!1)&&(!_._writableState||_._readableState))}function S(_){var m;return!!(_&&typeof _.write==="function"&&typeof _.on==="function"&&(!_._readableState||((m=_._writableState)===null||m===void 0?void 0:m.writable)!==!1))}function A(_){return!!(_&&typeof _.pipe==="function"&&_._readableState&&typeof _.on==="function"&&typeof _.write==="function")}function x(_){return _&&(_._readableState||_._writableState||typeof _.write==="function"&&typeof _.on==="function"||typeof _.pipe==="function"&&typeof _.on==="function")}function B(_){return!!(_&&!x(_)&&typeof _.pipeThrough==="function"&&typeof _.getReader==="function"&&typeof _.cancel==="function")}function T(_){return!!(_&&!x(_)&&typeof _.getWriter==="function"&&typeof _.abort==="function")}function k(_){return!!(_&&!x(_)&&typeof _.readable==="object"&&typeof _.writable==="object")}function P(_){return B(_)||T(_)||k(_)}function D(_,m){if(_==null)return!1;if(m===!0)return typeof _[c]==="function";if(m===!1)return typeof _[b]==="function";return typeof _[c]==="function"||typeof _[b]==="function"}function O(_){if(!x(_))return null;let{_writableState:m,_readableState:I}=_,N=m||I;return!!(_.destroyed||_[M]||N!==null&&N!==void 0&&N.destroyed)}function W(_){if(!S(_))return null;if(_.writableEnded===!0)return!0;let m=_._writableState;if(m!==null&&m!==void 0&&m.errored)return!1;if(typeof(m===null||m===void 0?void 0:m.ended)!=="boolean")return null;return m.ended}function at(_,m){if(!S(_))return null;if(_.writableFinished===!0)return!0;let I=_._writableState;if(I!==null&&I!==void 0&&I.errored)return!1;if(typeof(I===null||I===void 0?void 0:I.finished)!=="boolean")return null;return!!(I.finished||m===!1&&I.ended===!0&&I.length===0)}function ft(_){if(!v(_))return null;if(_.readableEnded===!0)return!0;let m=_._readableState;if(!m||m.errored)return!1;if(typeof(m===null||m===void 0?void 0:m.ended)!=="boolean")return null;return m.ended}function st(_,m){if(!v(_))return null;let I=_._readableState;if(I!==null&&I!==void 0&&I.errored)return!1;if(typeof(I===null||I===void 0?void 0:I.endEmitted)!=="boolean")return null;return!!(I.endEmitted||m===!1&&I.ended===!0&&I.length===0)}function j(_){if(_&&_[E]!=null)return _[E];if(typeof(_===null||_===void 0?void 0:_.readable)!=="boolean")return null;if(O(_))return!1;return v(_)&&_.readable&&!st(_)}function rt(_){if(_&&_[R]!=null)return _[R];if(typeof(_===null||_===void 0?void 0:_.writable)!=="boolean")return null;if(O(_))return!1;return S(_)&&_.writable&&!W(_)}function t(_,m){if(!x(_))return null;if(O(_))return!0;if((m===null||m===void 0?void 0:m.readable)!==!1&&j(_))return!1;if((m===null||m===void 0?void 0:m.writable)!==!1&&rt(_))return!1;return!0}function i(_){var m,I;if(!x(_))return null;if(_.writableErrored)return _.writableErrored;return(m=(I=_._writableState)===null||I===void 0?void 0:I.errored)!==null&&m!==void 0?m:null}function o(_){var m,I;if(!x(_))return null;if(_.readableErrored)return _.readableErrored;return(m=(I=_._readableState)===null||I===void 0?void 0:I.errored)!==null&&m!==void 0?m:null}function r(_){if(!x(_))return null;if(typeof _.closed==="boolean")return _.closed;let{_writableState:m,_readableState:I}=_;if(typeof(m===null||m===void 0?void 0:m.closed)==="boolean"||typeof(I===null||I===void 0?void 0:I.closed)==="boolean")return(m===null||m===void 0?void 0:m.closed)||(I===null||I===void 0?void 0:I.closed);if(typeof _._closed==="boolean"&&n(_))return _._closed;return null}function n(_){return typeof _._closed==="boolean"&&typeof _._defaultKeepAlive==="boolean"&&typeof _._removedConnection==="boolean"&&typeof _._removedContLen==="boolean"}function u(_){return typeof _._sent100==="boolean"&&n(_)}function d(_){var m;return typeof _._consuming==="boolean"&&typeof _._dumped==="boolean"&&((m=_.req)===null||m===void 0?void 0:m.upgradeOrConnect)===void 0}function s(_){if(!x(_))return null;let{_writableState:m,_readableState:I}=_,N=m||I;return!N&&u(_)||!!(N&&N.autoDestroy&&N.emitClose&&N.closed===!1)}function e(_){var m;return!!(_&&((m=_[w])!==null&&m!==void 0?m:_.readableDidRead||_.readableAborted))}function f(_){var m,I,N,U,Z,ut,Y,H,nt,G;return!!(_&&((m=(I=(N=(U=(Z=(ut=_[a])!==null&&ut!==void 0?ut:_.readableErrored)!==null&&Z!==void 0?Z:_.writableErrored)!==null&&U!==void 0?U:(Y=_._readableState)===null||Y===void 0?void 0:Y.errorEmitted)!==null&&N!==void 0?N:(H=_._writableState)===null||H===void 0?void 0:H.errorEmitted)!==null&&I!==void 0?I:(nt=_._readableState)===null||nt===void 0?void 0:nt.errored)!==null&&m!==void 0?m:(G=_._writableState)===null||G===void 0?void 0:G.errored))}l.exports={isDestroyed:O,kIsDestroyed:M,isDisturbed:e,kIsDisturbed:w,isErrored:f,kIsErrored:a,isReadable:j,kIsReadable:E,kIsClosedPromise:g,kControllerErrorFunction:y,kIsWritable:R,isClosed:r,isDuplexNodeStream:A,isFinished:t,isIterable:D,isReadableNodeStream:v,isReadableStream:B,isReadableEnded:ft,isReadableFinished:st,isReadableErrored:o,isNodeStream:x,isWebStream:P,isWritable:rt,isWritableNodeStream:S,isWritableStream:T,isWritableEnded:W,isWritableFinished:at,isWritableErrored:i,isServerRequest:d,isServerResponse:u,willEmitClose:s,isTransformStream:k}}),Ce=zt((h,l)=>{var c=$e(),{AbortError:b,codes:p}=we(),{ERR_INVALID_ARG_TYPE:M,ERR_STREAM_PREMATURE_CLOSE:a}=p,{kEmptyObject:E,once:R}=Se(),{validateAbortSignal:w,validateFunction:g,validateObject:y,validateBoolean:v}=ir(),{Promise:S,PromisePrototypeThen:A,SymbolDispose:x}=Kt(),{isClosed:B,isReadable:T,isReadableNodeStream:k,isReadableStream:P,isReadableFinished:D,isReadableErrored:O,isWritable:W,isWritableNodeStream:at,isWritableStream:ft,isWritableFinished:st,isWritableErrored:j,isNodeStream:rt,willEmitClose:t,kIsClosedPromise:i}=Ne(),o;function r(e){return e.setHeader&&typeof e.abort==="function"}var n=()=>{};function u(e,f,_){var m,I;if(arguments.length===2)_=f,f=E;else if(f==null)f=E;else y(f,"options");if(g(_,"callback"),w(f.signal,"options.signal"),_=R(_),P(e)||ft(e))return d(e,f,_);if(!rt(e))throw new M("stream",["ReadableStream","WritableStream","Stream"],e);let N=(m=f.readable)!==null&&m!==void 0?m:k(e),U=(I=f.writable)!==null&&I!==void 0?I:at(e),Z=e._writableState,ut=e._readableState,Y=()=>{if(!e.writable)G()},H=t(e)&&k(e)===N&&at(e)===U,nt=st(e,!1),G=()=>{if(nt=!0,e.destroyed)H=!1;if(H&&(!e.readable||N))return;if(!N||tt)_.call(e)},tt=D(e,!1),Dt=()=>{if(tt=!0,e.destroyed)H=!1;if(H&&(!e.writable||U))return;if(!U||nt)_.call(e)},L=(C)=>{_.call(e,C)},F=B(e),ot=()=>{F=!0;let C=j(e)||O(e);if(C&&typeof C!=="boolean")return _.call(e,C);if(N&&!tt&&k(e,!0)){if(!D(e,!1))return _.call(e,new a)}if(U&&!nt){if(!st(e,!1))return _.call(e,new a)}_.call(e)},J=()=>{F=!0;let C=j(e)||O(e);if(C&&typeof C!=="boolean")return _.call(e,C);_.call(e)},Q=()=>{e.req.on("finish",G)};if(r(e)){if(e.on("complete",G),!H)e.on("abort",ot);if(e.req)Q();else e.on("request",Q)}else if(U&&!Z)e.on("end",Y),e.on("close",Y);if(!H&&typeof e.aborted==="boolean")e.on("aborted",ot);if(e.on("end",Dt),e.on("finish",G),f.error!==!1)e.on("error",L);if(e.on("close",ot),F)c.nextTick(ot);else if(Z!==null&&Z!==void 0&&Z.errorEmitted||ut!==null&&ut!==void 0&&ut.errorEmitted){if(!H)c.nextTick(J)}else if(!N&&(!H||T(e))&&(nt||W(e)===!1))c.nextTick(J);else if(!U&&(!H||W(e))&&(tt||T(e)===!1))c.nextTick(J);else if(ut&&e.req&&e.aborted)c.nextTick(J);let Mt=()=>{if(_=n,e.removeListener("aborted",ot),e.removeListener("complete",G),e.removeListener("abort",ot),e.removeListener("request",Q),e.req)e.req.removeListener("finish",G);e.removeListener("end",Y),e.removeListener("close",Y),e.removeListener("finish",G),e.removeListener("end",Dt),e.removeListener("error",L),e.removeListener("close",ot)};if(f.signal&&!F){let C=()=>{let K=_;Mt(),K.call(e,new b(void 0,{cause:f.signal.reason}))};if(f.signal.aborted)c.nextTick(C);else{o=o||Se().addAbortListener;let K=o(f.signal,C),Nt=_;_=R((...V)=>{K[x](),Nt.apply(e,V)})}}return Mt}function d(e,f,_){let m=!1,I=n;if(f.signal)if(I=()=>{m=!0,_.call(e,new b(void 0,{cause:f.signal.reason}))},f.signal.aborted)c.nextTick(I);else{o=o||Se().addAbortListener;let U=o(f.signal,I),Z=_;_=R((...ut)=>{U[x](),Z.apply(e,ut)})}let N=(...U)=>{if(!m)c.nextTick(()=>_.apply(e,U))};return A(e[i].promise,N,N),n}function s(e,f){var _;let m=!1;if(f===null)f=E;if((_=f)!==null&&_!==void 0&&_.cleanup)v(f.cleanup,"cleanup"),m=f.cleanup;return new S((I,N)=>{let U=u(e,f,(Z)=>{if(m)U();if(Z)N(Z);else I()})})}l.exports=u,l.exports.finished=s}),Je=zt((h,l)=>{var c=$e(),{aggregateTwoErrors:b,codes:{ERR_MULTIPLE_CALLBACK:p},AbortError:M}=we(),{Symbol:a}=Kt(),{kIsDestroyed:E,isDestroyed:R,isFinished:w,isServerRequest:g}=Ne(),y=a("kDestroy"),v=a("kConstruct");function S(t,i,o){if(t){if(t.stack,i&&!i.errored)i.errored=t;if(o&&!o.errored)o.errored=t}}function A(t,i){let o=this._readableState,r=this._writableState,n=r||o;if(r!==null&&r!==void 0&&r.destroyed||o!==null&&o!==void 0&&o.destroyed){if(typeof i==="function")i();return this}if(S(t,r,o),r)r.destroyed=!0;if(o)o.destroyed=!0;if(!n.constructed)this.once(y,function(u){x(this,b(u,t),i)});else x(this,t,i);return this}function x(t,i,o){let r=!1;function n(u){if(r)return;r=!0;let{_readableState:d,_writableState:s}=t;if(S(u,s,d),s)s.closed=!0;if(d)d.closed=!0;if(typeof o==="function")o(u);if(u)c.nextTick(B,t,u);else c.nextTick(T,t)}try{t._destroy(i||null,n)}catch(u){n(u)}}function B(t,i){k(t,i),T(t)}function T(t){let{_readableState:i,_writableState:o}=t;if(o)o.closeEmitted=!0;if(i)i.closeEmitted=!0;if(o!==null&&o!==void 0&&o.emitClose||i!==null&&i!==void 0&&i.emitClose)t.emit("close")}function k(t,i){let{_readableState:o,_writableState:r}=t;if(r!==null&&r!==void 0&&r.errorEmitted||o!==null&&o!==void 0&&o.errorEmitted)return;if(r)r.errorEmitted=!0;if(o)o.errorEmitted=!0;t.emit("error",i)}function P(){let t=this._readableState,i=this._writableState;if(t)t.constructed=!0,t.closed=!1,t.closeEmitted=!1,t.destroyed=!1,t.errored=null,t.errorEmitted=!1,t.reading=!1,t.ended=t.readable===!1,t.endEmitted=t.readable===!1;if(i)i.constructed=!0,i.destroyed=!1,i.closed=!1,i.closeEmitted=!1,i.errored=null,i.errorEmitted=!1,i.finalCalled=!1,i.prefinished=!1,i.ended=i.writable===!1,i.ending=i.writable===!1,i.finished=i.writable===!1}function D(t,i,o){let{_readableState:r,_writableState:n}=t;if(n!==null&&n!==void 0&&n.destroyed||r!==null&&r!==void 0&&r.destroyed)return this;if(r!==null&&r!==void 0&&r.autoDestroy||n!==null&&n!==void 0&&n.autoDestroy)t.destroy(i);else if(i){if(i.stack,n&&!n.errored)n.errored=i;if(r&&!r.errored)r.errored=i;if(o)c.nextTick(k,t,i);else k(t,i)}}function O(t,i){if(typeof t._construct!=="function")return;let{_readableState:o,_writableState:r}=t;if(o)o.constructed=!1;if(r)r.constructed=!1;if(t.once(v,i),t.listenerCount(v)>1)return;c.nextTick(W,t)}function W(t){let i=!1;function o(r){if(i){D(t,r!==null&&r!==void 0?r:new p);return}i=!0;let{_readableState:n,_writableState:u}=t,d=u||n;if(n)n.constructed=!0;if(u)u.constructed=!0;if(d.destroyed)t.emit(y,r);else if(r)D(t,r,!0);else c.nextTick(at,t)}try{t._construct((r)=>{c.nextTick(o,r)})}catch(r){c.nextTick(o,r)}}function at(t){t.emit(v)}function ft(t){return(t===null||t===void 0?void 0:t.setHeader)&&typeof t.abort==="function"}function st(t){t.emit("close")}function j(t,i){t.emit("error",i),c.nextTick(st,t)}function rt(t,i){if(!t||R(t))return;if(!i&&!w(t))i=new M;if(g(t))t.socket=null,t.destroy(i);else if(ft(t))t.abort();else if(ft(t.req))t.req.abort();else if(typeof t.destroy==="function")t.destroy(i);else if(typeof t.close==="function")t.close();else if(i)c.nextTick(j,t,i);else c.nextTick(st,t);if(!t.destroyed)t[E]=!0}l.exports={construct:O,destroyer:rt,destroy:A,undestroy:P,errorOrDestroy:D}}),Qr=zt((h,l)=>{var{ArrayIsArray:c,ObjectSetPrototypeOf:b}=Kt(),{EventEmitter:p}=(er(),jt(tr));function M(E){p.call(this,E)}b(M.prototype,p.prototype),b(M,p),M.prototype.pipe=function(E,R){let w=this;function g(T){if(E.writable&&E.write(T)===!1&&w.pause)w.pause()}w.on("data",g);function y(){if(w.readable&&w.resume)w.resume()}if(E.on("drain",y),!E._isStdio&&(!R||R.end!==!1))w.on("end",S),w.on("close",A);let v=!1;function S(){if(v)return;v=!0,E.end()}function A(){if(v)return;if(v=!0,typeof E.destroy==="function")E.destroy()}function x(T){if(B(),p.listenerCount(this,"error")===0)this.emit("error",T)}a(w,"error",x),a(E,"error",x);function B(){w.removeListener("data",g),E.removeListener("drain",y),w.removeListener("end",S),w.removeListener("close",A),w.removeListener("error",x),E.removeListener("error",x),w.removeListener("end",B),w.removeListener("close",B),E.removeListener("close",B)}return w.on("end",B),w.on("close",B),E.on("close",B),E.emit("pipe",w),E};function a(E,R,w){if(typeof E.prependListener==="function")return E.prependListener(R,w);if(!E._events||!E._events[R])E.on(R,w);else if(c(E._events[R]))E._events[R].unshift(w);else E._events[R]=[w,E._events[R]]}l.exports={Stream:M,prependListener:a}}),Mr=zt((h,l)=>{var{SymbolDispose:c}=Kt(),{AbortError:b,codes:p}=we(),{isNodeStream:M,isWebStream:a,kControllerErrorFunction:E}=Ne(),R=Ce(),{ERR_INVALID_ARG_TYPE:w}=p,g,y=(v,S)=>{if(typeof v!=="object"||!("aborted"in v))throw new w(S,"AbortSignal",v)};l.exports.addAbortSignal=function(v,S){if(y(v,"signal"),!M(S)&&!a(S))throw new w("stream",["ReadableStream","WritableStream","Stream"],S);return l.exports.addAbortSignalNoValidate(v,S)},l.exports.addAbortSignalNoValidate=function(v,S){if(typeof v!=="object"||!("aborted"in v))return S;let A=M(S)?()=>{S.destroy(new b(void 0,{cause:v.reason}))}:()=>{S[E](new b(void 0,{cause:v.reason}))};if(v.aborted)A();else{g=g||Se().addAbortListener;let x=g(v,A);R(S,x[c])}return S}}),ya=zt((h,l)=>{var{StringPrototypeSlice:c,SymbolIterator:b,TypedArrayPrototypeSet:p,Uint8Array:M}=Kt(),{Buffer:a}=(ye(),jt(pe)),{inspect:E}=Se();l.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(R){let w={data:R,next:null};if(this.length>0)this.tail.next=w;else this.head=w;this.tail=w,++this.length}unshift(R){let w={data:R,next:this.head};if(this.length===0)this.tail=w;this.head=w,++this.length}shift(){if(this.length===0)return;let R=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--this.length,R}clear(){this.head=this.tail=null,this.length=0}join(R){if(this.length===0)return"";let w=this.head,g=""+w.data;while((w=w.next)!==null)g+=R+w.data;return g}concat(R){if(this.length===0)return a.alloc(0);let w=a.allocUnsafe(R>>>0),g=this.head,y=0;while(g)p(w,g.data,y),y+=g.data.length,g=g.next;return w}consume(R,w){let g=this.head.data;if(R<g.length){let y=g.slice(0,R);return this.head.data=g.slice(R),y}if(R===g.length)return this.shift();return w?this._getString(R):this._getBuffer(R)}first(){return this.head.data}*[b](){for(let R=this.head;R;R=R.next)yield R.data}_getString(R){let w="",g=this.head,y=0;do{let v=g.data;if(R>v.length)w+=v,R-=v.length;else{if(R===v.length)if(w+=v,++y,g.next)this.head=g.next;else this.head=this.tail=null;else w+=c(v,0,R),this.head=g,g.data=c(v,R);break}++y}while((g=g.next)!==null);return this.length-=y,w}_getBuffer(R){let w=a.allocUnsafe(R),g=R,y=this.head,v=0;do{let S=y.data;if(R>S.length)p(w,S,g-R),R-=S.length;else{if(R===S.length)if(p(w,S,g-R),++v,y.next)this.head=y.next;else this.head=this.tail=null;else p(w,new M(S.buffer,S.byteOffset,R),g-R),this.head=y,y.data=S.slice(R);break}++v}while((y=y.next)!==null);return this.length-=v,w}[Symbol.for("nodejs.util.inspect.custom")](R,w){return E(this,{...w,depth:0,customInspect:!1})}}}),_r=zt((h,l)=>{var{MathFloor:c,NumberIsInteger:b}=Kt(),{validateInteger:p}=ir(),{ERR_INVALID_ARG_VALUE:M}=we().codes,a=16384,E=16;function R(v,S,A){return v.highWaterMark!=null?v.highWaterMark:S?v[A]:null}function w(v){return v?E:a}function g(v,S){if(p(S,"value",0),v)E=S;else a=S}function y(v,S,A,x){let B=R(S,x,A);if(B!=null){if(!b(B)||B<0){let T=x?`options.${A}`:"options.highWaterMark";throw new M(T,B)}return c(B)}return w(v.objectMode)}l.exports={getHighWaterMark:y,getDefaultHighWaterMark:w,setDefaultHighWaterMark:g}}),ba=zt((h,l)=>{/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var c=(ye(),jt(pe)),b=c.Buffer;function p(a,E){for(var R in a)E[R]=a[R]}if(b.from&&b.alloc&&b.allocUnsafe&&b.allocUnsafeSlow)l.exports=c;else p(c,h),h.Buffer=M;function M(a,E,R){return b(a,E,R)}M.prototype=Object.create(b.prototype),p(b,M),M.from=function(a,E,R){if(typeof a==="number")throw TypeError("Argument must not be a number");return b(a,E,R)},M.alloc=function(a,E,R){if(typeof a!=="number")throw TypeError("Argument must be a number");var w=b(a);if(E!==void 0)if(typeof R==="string")w.fill(E,R);else w.fill(E);else w.fill(0);return w},M.allocUnsafe=function(a){if(typeof a!=="number")throw TypeError("Argument must be a number");return b(a)},M.allocUnsafeSlow=function(a){if(typeof a!=="number")throw TypeError("Argument must be a number");return c.SlowBuffer(a)}}),ma=zt((h)=>{var l=ba().Buffer,c=l.isEncoding||function(k){switch(k=""+k,k&&k.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function b(k){if(!k)return"utf8";var P;while(!0)switch(k){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return k;default:if(P)return;k=(""+k).toLowerCase(),P=!0}}function p(k){var P=b(k);if(typeof P!=="string"&&(l.isEncoding===c||!c(k)))throw Error("Unknown encoding: "+k);return P||k}h.StringDecoder=M;function M(k){this.encoding=p(k);var P;switch(this.encoding){case"utf16le":this.text=v,this.end=S,P=4;break;case"utf8":this.fillLast=w,P=4;break;case"base64":this.text=A,this.end=x,P=3;break;default:this.write=B,this.end=T;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=l.allocUnsafe(P)}M.prototype.write=function(k){if(k.length===0)return"";var P,D;if(this.lastNeed){if(P=this.fillLast(k),P===void 0)return"";D=this.lastNeed,this.lastNeed=0}else D=0;if(D<k.length)return P?P+this.text(k,D):this.text(k,D);return P||""},M.prototype.end=y,M.prototype.text=g,M.prototype.fillLast=function(k){if(this.lastNeed<=k.length)return k.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);k.copy(this.lastChar,this.lastTotal-this.lastNeed,0,k.length),this.lastNeed-=k.length};function a(k){if(k<=127)return 0;else if(k>>5===6)return 2;else if(k>>4===14)return 3;else if(k>>3===30)return 4;return k>>6===2?-1:-2}function E(k,P,D){var O=P.length-1;if(O<D)return 0;var W=a(P[O]);if(W>=0){if(W>0)k.lastNeed=W-1;return W}if(--O<D||W===-2)return 0;if(W=a(P[O]),W>=0){if(W>0)k.lastNeed=W-2;return W}if(--O<D||W===-2)return 0;if(W=a(P[O]),W>=0){if(W>0)if(W===2)W=0;else k.lastNeed=W-3;return W}return 0}function R(k,P,D){if((P[0]&192)!==128)return k.lastNeed=0,"�";if(k.lastNeed>1&&P.length>1){if((P[1]&192)!==128)return k.lastNeed=1,"�";if(k.lastNeed>2&&P.length>2){if((P[2]&192)!==128)return k.lastNeed=2,"�"}}}function w(k){var P=this.lastTotal-this.lastNeed,D=R(this,k,P);if(D!==void 0)return D;if(this.lastNeed<=k.length)return k.copy(this.lastChar,P,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);k.copy(this.lastChar,P,0,k.length),this.lastNeed-=k.length}function g(k,P){var D=E(this,k,P);if(!this.lastNeed)return k.toString("utf8",P);this.lastTotal=D;var O=k.length-(D-this.lastNeed);return k.copy(this.lastChar,0,O),k.toString("utf8",P,O)}function y(k){var P=k&&k.length?this.write(k):"";if(this.lastNeed)return P+"�";return P}function v(k,P){if((k.length-P)%2===0){var D=k.toString("utf16le",P);if(D){var O=D.charCodeAt(D.length-1);if(O>=55296&&O<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=k[k.length-2],this.lastChar[1]=k[k.length-1],D.slice(0,-1)}return D}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=k[k.length-1],k.toString("utf16le",P,k.length-1)}function S(k){var P=k&&k.length?this.write(k):"";if(this.lastNeed){var D=this.lastTotal-this.lastNeed;return P+this.lastChar.toString("utf16le",0,D)}return P}function A(k,P){var D=(k.length-P)%3;if(D===0)return k.toString("base64",P);if(this.lastNeed=3-D,this.lastTotal=3,D===1)this.lastChar[0]=k[k.length-1];else this.lastChar[0]=k[k.length-2],this.lastChar[1]=k[k.length-1];return k.toString("base64",P,k.length-D)}function x(k){var P=k&&k.length?this.write(k):"";if(this.lastNeed)return P+this.lastChar.toString("base64",0,3-this.lastNeed);return P}function B(k){return k.toString(this.encoding)}function T(k){return k&&k.length?this.write(k):""}}),ln=zt((h,l)=>{var c=$e(),{PromisePrototypeThen:b,SymbolAsyncIterator:p,SymbolIterator:M}=Kt(),{Buffer:a}=(ye(),jt(pe)),{ERR_INVALID_ARG_TYPE:E,ERR_STREAM_NULL_VALUES:R}=we().codes;function w(g,y,v){let S;if(typeof y==="string"||y instanceof a)return new g({objectMode:!0,...v,read(){this.push(y),this.push(null)}});let A;if(y&&y[p])A=!0,S=y[p]();else if(y&&y[M])A=!1,S=y[M]();else throw new E("iterable",["Iterable"],y);let x=new g({objectMode:!0,highWaterMark:1,...v}),B=!1;x._read=function(){if(!B)B=!0,k()},x._destroy=function(P,D){b(T(P),()=>c.nextTick(D,P),(O)=>c.nextTick(D,O||P))};async function T(P){let D=P!==void 0&&P!==null,O=typeof S.throw==="function";if(D&&O){let{value:W,done:at}=await S.throw(P);if(await W,at)return}if(typeof S.return==="function"){let{value:W}=await S.return();await W}}async function k(){for(;;){try{let{value:P,done:D}=A?await S.next():S.next();if(D)x.push(null);else{let O=P&&typeof P.then==="function"?await P:P;if(O===null)throw B=!1,new R;else if(x.push(O))continue;else B=!1}}catch(P){x.destroy(P)}break}}return x}l.exports=w}),Sr=zt((h,l)=>{var c=$e(),{ArrayPrototypeIndexOf:b,NumberIsInteger:p,NumberIsNaN:M,NumberParseInt:a,ObjectDefineProperties:E,ObjectKeys:R,ObjectSetPrototypeOf:w,Promise:g,SafeSet:y,SymbolAsyncDispose:v,SymbolAsyncIterator:S,Symbol:A}=Kt();l.exports=V,V.ReadableState=Nt;var{EventEmitter:x}=(er(),jt(tr)),{Stream:B,prependListener:T}=Qr(),{Buffer:k}=(ye(),jt(pe)),{addAbortSignal:P}=Mr(),D=Ce(),O=Se().debuglog("stream",(q)=>{O=q}),W=ya(),at=Je(),{getHighWaterMark:ft,getDefaultHighWaterMark:st}=_r(),{aggregateTwoErrors:j,codes:{ERR_INVALID_ARG_TYPE:rt,ERR_METHOD_NOT_IMPLEMENTED:t,ERR_OUT_OF_RANGE:i,ERR_STREAM_PUSH_AFTER_EOF:o,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:r},AbortError:n}=we(),{validateObject:u}=ir(),d=A("kPaused"),{StringDecoder:s}=ma(),e=ln();w(V.prototype,B.prototype),w(V,B);var f=()=>{},{errorOrDestroy:_}=at,m=1,I=2,N=4,U=8,Z=16,ut=32,Y=64,H=128,nt=256,G=512,tt=1024,Dt=2048,L=4096,F=8192,ot=16384,J=32768,Q=65536,Mt=131072,C=262144;function K(q){return{enumerable:!1,get(){return(this.state&q)!==0},set(z){if(z)this.state|=q;else this.state&=~q}}}E(Nt.prototype,{objectMode:K(m),ended:K(I),endEmitted:K(N),reading:K(U),constructed:K(Z),sync:K(ut),needReadable:K(Y),emittedReadable:K(H),readableListening:K(nt),resumeScheduled:K(G),errorEmitted:K(tt),emitClose:K(Dt),autoDestroy:K(L),destroyed:K(F),closed:K(ot),closeEmitted:K(J),multiAwaitDrain:K(Q),readingMore:K(Mt),dataEmitted:K(C)});function Nt(q,z,X){if(typeof X!=="boolean")X=z instanceof qe();if(this.state=Dt|L|Z|ut,q&&q.objectMode)this.state|=m;if(X&&q&&q.readableObjectMode)this.state|=m;if(this.highWaterMark=q?ft(this,q,"readableHighWaterMark",X):st(!1),this.buffer=new W,this.length=0,this.pipes=[],this.flowing=null,this[d]=null,q&&q.emitClose===!1)this.state&=~Dt;if(q&&q.autoDestroy===!1)this.state&=~L;if(this.errored=null,this.defaultEncoding=q&&q.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,q&&q.encoding)this.decoder=new s(q.encoding),this.encoding=q.encoding}function V(q){if(!(this instanceof V))return new V(q);let z=this instanceof qe();if(this._readableState=new Nt(q,this,z),q){if(typeof q.read==="function")this._read=q.read;if(typeof q.destroy==="function")this._destroy=q.destroy;if(typeof q.construct==="function")this._construct=q.construct;if(q.signal&&!z)P(q.signal,this)}B.call(this,q),at.construct(this,()=>{if(this._readableState.needReadable)gt(this,this._readableState)})}V.prototype.destroy=at.destroy,V.prototype._undestroy=at.undestroy,V.prototype._destroy=function(q,z){z(q)},V.prototype[x.captureRejectionSymbol]=function(q){this.destroy(q)},V.prototype[v]=function(){let q;if(!this.destroyed)q=this.readableEnded?null:new n,this.destroy(q);return new g((z,X)=>D(this,(et)=>et&&et!==q?X(et):z(null)))},V.prototype.push=function(q,z){return it(this,q,z,!1)},V.prototype.unshift=function(q,z){return it(this,q,z,!0)};function it(q,z,X,et){O("readableAddChunk",z);let Ot=q._readableState,ct;if((Ot.state&m)===0){if(typeof z==="string"){if(X=X||Ot.defaultEncoding,Ot.encoding!==X)if(et&&Ot.encoding)z=k.from(z,X).toString(Ot.encoding);else z=k.from(z,X),X=""}else if(z instanceof k)X="";else if(B._isUint8Array(z))z=B._uint8ArrayToBuffer(z),X="";else if(z!=null)ct=new rt("chunk",["string","Buffer","Uint8Array"],z)}if(ct)_(q,ct);else if(z===null)Ot.state&=~U,dt(q,Ot);else if((Ot.state&m)!==0||z&&z.length>0)if(et)if((Ot.state&N)!==0)_(q,new r);else if(Ot.destroyed||Ot.errored)return!1;else Lt(q,Ot,z,!0);else if(Ot.ended)_(q,new o);else if(Ot.destroyed||Ot.errored)return!1;else if(Ot.state&=~U,Ot.decoder&&!X)if(z=Ot.decoder.write(z),Ot.objectMode||z.length!==0)Lt(q,Ot,z,!1);else gt(q,Ot);else Lt(q,Ot,z,!1);else if(!et)Ot.state&=~U,gt(q,Ot);return!Ot.ended&&(Ot.length<Ot.highWaterMark||Ot.length===0)}function Lt(q,z,X,et){if(z.flowing&&z.length===0&&!z.sync&&q.listenerCount("data")>0){if((z.state&Q)!==0)z.awaitDrainWriters.clear();else z.awaitDrainWriters=null;z.dataEmitted=!0,q.emit("data",X)}else{if(z.length+=z.objectMode?1:X.length,et)z.buffer.unshift(X);else z.buffer.push(X);if((z.state&Y)!==0)bt(q)}gt(q,z)}V.prototype.isPaused=function(){let q=this._readableState;return q[d]===!0||q.flowing===!1},V.prototype.setEncoding=function(q){let z=new s(q);this._readableState.decoder=z,this._readableState.encoding=this._readableState.decoder.encoding;let X=this._readableState.buffer,et="";for(let Ot of X)et+=z.write(Ot);if(X.clear(),et!=="")X.push(et);return this._readableState.length=et.length,this};var pt=1073741824;function yt(q){if(q>pt)throw new i("size","<= 1GiB",q);else q--,q|=q>>>1,q|=q>>>2,q|=q>>>4,q|=q>>>8,q|=q>>>16,q++;return q}function Zt(q,z){if(q<=0||z.length===0&&z.ended)return 0;if((z.state&m)!==0)return 1;if(M(q)){if(z.flowing&&z.length)return z.buffer.first().length;return z.length}if(q<=z.length)return q;return z.ended?z.length:0}V.prototype.read=function(q){if(O("read",q),q===void 0)q=NaN;else if(!p(q))q=a(q,10);let z=this._readableState,X=q;if(q>z.highWaterMark)z.highWaterMark=yt(q);if(q!==0)z.state&=~H;if(q===0&&z.needReadable&&((z.highWaterMark!==0?z.length>=z.highWaterMark:z.length>0)||z.ended)){if(O("read: emitReadable",z.length,z.ended),z.length===0&&z.ended)ue(this);else bt(this);return null}if(q=Zt(q,z),q===0&&z.ended){if(z.length===0)ue(this);return null}let et=(z.state&Y)!==0;if(O("need readable",et),z.length===0||z.length-q<z.highWaterMark)et=!0,O("length less than watermark",et);if(z.ended||z.reading||z.destroyed||z.errored||!z.constructed)et=!1,O("reading, ended or constructing",et);else if(et){if(O("do read"),z.state|=U|ut,z.length===0)z.state|=Y;try{this._read(z.highWaterMark)}catch(ct){_(this,ct)}if(z.state&=~ut,!z.reading)q=Zt(X,z)}let Ot;if(q>0)Ot=At(q,z);else Ot=null;if(Ot===null)z.needReadable=z.length<=z.highWaterMark,q=0;else if(z.length-=q,z.multiAwaitDrain)z.awaitDrainWriters.clear();else z.awaitDrainWriters=null;if(z.length===0){if(!z.ended)z.needReadable=!0;if(X!==q&&z.ended)ue(this)}if(Ot!==null&&!z.errorEmitted&&!z.closeEmitted)z.dataEmitted=!0,this.emit("data",Ot);return Ot};function dt(q,z){if(O("onEofChunk"),z.ended)return;if(z.decoder){let X=z.decoder.end();if(X&&X.length)z.buffer.push(X),z.length+=z.objectMode?1:X.length}if(z.ended=!0,z.sync)bt(q);else z.needReadable=!1,z.emittedReadable=!0,Jt(q)}function bt(q){let z=q._readableState;if(O("emitReadable",z.needReadable,z.emittedReadable),z.needReadable=!1,!z.emittedReadable)O("emitReadable",z.flowing),z.emittedReadable=!0,c.nextTick(Jt,q)}function Jt(q){let z=q._readableState;if(O("emitReadable_",z.destroyed,z.length,z.ended),!z.destroyed&&!z.errored&&(z.length||z.ended))q.emit("readable"),z.emittedReadable=!1;z.needReadable=!z.flowing&&!z.ended&&z.length<=z.highWaterMark,St(q)}function gt(q,z){if(!z.readingMore&&z.constructed)z.readingMore=!0,c.nextTick(vt,q,z)}function vt(q,z){while(!z.reading&&!z.ended&&(z.length<z.highWaterMark||z.flowing&&z.length===0)){let X=z.length;if(O("maybeReadMore read 0"),q.read(0),X===z.length)break}z.readingMore=!1}V.prototype._read=function(q){throw new t("_read()")},V.prototype.pipe=function(q,z){let X=this,et=this._readableState;if(et.pipes.length===1){if(!et.multiAwaitDrain)et.multiAwaitDrain=!0,et.awaitDrainWriters=new y(et.awaitDrainWriters?[et.awaitDrainWriters]:[])}et.pipes.push(q),O("pipe count=%d opts=%j",et.pipes.length,z);let Ot=(!z||z.end!==!1)&&q!==c.stdout&&q!==c.stderr?mt:Ct;if(et.endEmitted)c.nextTick(Ot);else X.once("end",Ot);q.on("unpipe",ct);function ct(Wt,Ht){if(O("onunpipe"),Wt===X){if(Ht&&Ht.hasUnpiped===!1)Ht.hasUnpiped=!0,qt()}}function mt(){O("onend"),q.end()}let Gt,Rt=!1;function qt(){if(O("cleanup"),q.removeListener("close",Vt),q.removeListener("finish",Ut),Gt)q.removeListener("drain",Gt);if(q.removeListener("error",wt),q.removeListener("unpipe",ct),X.removeListener("end",mt),X.removeListener("end",Ct),X.removeListener("data",Bt),Rt=!0,Gt&&et.awaitDrainWriters&&(!q._writableState||q._writableState.needDrain))Gt()}function me(){if(!Rt){if(et.pipes.length===1&&et.pipes[0]===q)O("false write response, pause",0),et.awaitDrainWriters=q,et.multiAwaitDrain=!1;else if(et.pipes.length>1&&et.pipes.includes(q))O("false write response, pause",et.awaitDrainWriters.size),et.awaitDrainWriters.add(q);X.pause()}if(!Gt)Gt=ve(X,q),q.on("drain",Gt)}X.on("data",Bt);function Bt(Wt){O("ondata");let Ht=q.write(Wt);if(O("dest.write",Ht),Ht===!1)me()}function wt(Wt){if(O("onerror",Wt),Ct(),q.removeListener("error",wt),q.listenerCount("error")===0){let Ht=q._writableState||q._readableState;if(Ht&&!Ht.errorEmitted)_(q,Wt);else q.emit("error",Wt)}}T(q,"error",wt);function Vt(){q.removeListener("finish",Ut),Ct()}q.once("close",Vt);function Ut(){O("onfinish"),q.removeListener("close",Vt),Ct()}q.once("finish",Ut);function Ct(){O("unpipe"),X.unpipe(q)}if(q.emit("pipe",X),q.writableNeedDrain===!0)me();else if(!et.flowing)O("pipe resume"),X.resume();return q};function ve(q,z){return function(){let X=q._readableState;if(X.awaitDrainWriters===z)O("pipeOnDrain",1),X.awaitDrainWriters=null;else if(X.multiAwaitDrain)O("pipeOnDrain",X.awaitDrainWriters.size),X.awaitDrainWriters.delete(z);if((!X.awaitDrainWriters||X.awaitDrainWriters.size===0)&&q.listenerCount("data"))q.resume()}}V.prototype.unpipe=function(q){let z=this._readableState,X={hasUnpiped:!1};if(z.pipes.length===0)return this;if(!q){let Ot=z.pipes;z.pipes=[],this.pause();for(let ct=0;ct<Ot.length;ct++)Ot[ct].emit("unpipe",this,{hasUnpiped:!1});return this}let et=b(z.pipes,q);if(et===-1)return this;if(z.pipes.splice(et,1),z.pipes.length===0)this.pause();return q.emit("unpipe",this,X),this},V.prototype.on=function(q,z){let X=B.prototype.on.call(this,q,z),et=this._readableState;if(q==="data"){if(et.readableListening=this.listenerCount("readable")>0,et.flowing!==!1)this.resume()}else if(q==="readable"){if(!et.endEmitted&&!et.readableListening){if(et.readableListening=et.needReadable=!0,et.flowing=!1,et.emittedReadable=!1,O("on readable",et.length,et.reading),et.length)bt(this);else if(!et.reading)c.nextTick(It,this)}}return X},V.prototype.addListener=V.prototype.on,V.prototype.removeListener=function(q,z){let X=B.prototype.removeListener.call(this,q,z);if(q==="readable")c.nextTick(_t,this);return X},V.prototype.off=V.prototype.removeListener,V.prototype.removeAllListeners=function(q){let z=B.prototype.removeAllListeners.apply(this,arguments);if(q==="readable"||q===void 0)c.nextTick(_t,this);return z};function _t(q){let z=q._readableState;if(z.readableListening=q.listenerCount("readable")>0,z.resumeScheduled&&z[d]===!1)z.flowing=!0;else if(q.listenerCount("data")>0)q.resume();else if(!z.readableListening)z.flowing=null}function It(q){O("readable nexttick read 0"),q.read(0)}V.prototype.resume=function(){let q=this._readableState;if(!q.flowing)O("resume"),q.flowing=!q.readableListening,ge(this,q);return q[d]=!1,this};function ge(q,z){if(!z.resumeScheduled)z.resumeScheduled=!0,c.nextTick(xt,q,z)}function xt(q,z){if(O("resume",z.reading),!z.reading)q.read(0);if(z.resumeScheduled=!1,q.emit("resume"),St(q),z.flowing&&!z.reading)q.read(0)}V.prototype.pause=function(){if(O("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1)O("pause"),this._readableState.flowing=!1,this.emit("pause");return this._readableState[d]=!0,this};function St(q){let z=q._readableState;O("flow",z.flowing);while(z.flowing&&q.read()!==null);}V.prototype.wrap=function(q){let z=!1;q.on("data",(et)=>{if(!this.push(et)&&q.pause)z=!0,q.pause()}),q.on("end",()=>{this.push(null)}),q.on("error",(et)=>{_(this,et)}),q.on("close",()=>{this.destroy()}),q.on("destroy",()=>{this.destroy()}),this._read=()=>{if(z&&q.resume)z=!1,q.resume()};let X=R(q);for(let et=1;et<X.length;et++){let Ot=X[et];if(this[Ot]===void 0&&typeof q[Ot]==="function")this[Ot]=q[Ot].bind(q)}return this},V.prototype[S]=function(){return be(this)},V.prototype.iterator=function(q){if(q!==void 0)u(q,"options");return be(this,q)};function be(q,z){if(typeof q.read!=="function")q=V.wrap(q,{objectMode:!0});let X=kt(q,z);return X.stream=q,X}async function*kt(q,z){let X=f;function et(mt){if(this===q)X(),X=f;else X=mt}q.on("readable",et);let Ot,ct=D(q,{writable:!1},(mt)=>{Ot=mt?j(Ot,mt):null,X(),X=f});try{while(!0){let mt=q.destroyed?null:q.read();if(mt!==null)yield mt;else if(Ot)throw Ot;else if(Ot===null)return;else await new g(et)}}catch(mt){throw Ot=j(Ot,mt),Ot}finally{if((Ot||(z===null||z===void 0?void 0:z.destroyOnReturn)!==!1)&&(Ot===void 0||q._readableState.autoDestroy))at.destroyer(q,null);else q.off("readable",et),ct()}}E(V.prototype,{readable:{__proto__:null,get(){let q=this._readableState;return!!q&&q.readable!==!1&&!q.destroyed&&!q.errorEmitted&&!q.endEmitted},set(q){if(this._readableState)this._readableState.readable=!!q}},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(q){if(this._readableState)this._readableState.flowing=q}},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(q){if(!this._readableState)return;this._readableState.destroyed=q}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),E(Nt.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[d]!==!1},set(q){this[d]=!!q}}}),V._fromList=At;function At(q,z){if(z.length===0)return null;let X;if(z.objectMode)X=z.buffer.shift();else if(!q||q>=z.length){if(z.decoder)X=z.buffer.join("");else if(z.buffer.length===1)X=z.buffer.first();else X=z.buffer.concat(z.length);z.buffer.clear()}else X=z.buffer.consume(q,z.decoder);return X}function ue(q){let z=q._readableState;if(O("endReadable",z.endEmitted),!z.endEmitted)z.ended=!0,c.nextTick(Tt,z,q)}function Tt(q,z){if(O("endReadableNT",q.endEmitted,q.length),!q.errored&&!q.closeEmitted&&!q.endEmitted&&q.length===0){if(q.endEmitted=!0,z.emit("end"),z.writable&&z.allowHalfOpen===!1)c.nextTick(Pt,z);else if(q.autoDestroy){let X=z._writableState;if(!X||X.autoDestroy&&(X.finished||X.writable===!1))z.destroy()}}}function Pt(q){if(q.writable&&!q.writableEnded&&!q.destroyed)q.end()}V.from=function(q,z){return e(V,q,z)};var de;function Et(){if(de===void 0)de={};return de}V.fromWeb=function(q,z){return Et().newStreamReadableFromReadableStream(q,z)},V.toWeb=function(q,z){return Et().newReadableStreamFromStreamReadable(q,z)},V.wrap=function(q,z){var X,et;return new V({objectMode:(X=(et=q.readableObjectMode)!==null&&et!==void 0?et:q.objectMode)!==null&&X!==void 0?X:!0,...z,destroy(Ot,ct){at.destroyer(q,Ot),ct(Ot)}}).wrap(q)}}),ti=zt((h,l)=>{var c=$e(),{ArrayPrototypeSlice:b,Error:p,FunctionPrototypeSymbolHasInstance:M,ObjectDefineProperty:a,ObjectDefineProperties:E,ObjectSetPrototypeOf:R,StringPrototypeToLowerCase:w,Symbol:g,SymbolHasInstance:y}=Kt();l.exports=u,u.WritableState=r;var{EventEmitter:v}=(er(),jt(tr)),S=Qr().Stream,{Buffer:A}=(ye(),jt(pe)),x=Je(),{addAbortSignal:B}=Mr(),{getHighWaterMark:T,getDefaultHighWaterMark:k}=_r(),{ERR_INVALID_ARG_TYPE:P,ERR_METHOD_NOT_IMPLEMENTED:D,ERR_MULTIPLE_CALLBACK:O,ERR_STREAM_CANNOT_PIPE:W,ERR_STREAM_DESTROYED:at,ERR_STREAM_ALREADY_FINISHED:ft,ERR_STREAM_NULL_VALUES:st,ERR_STREAM_WRITE_AFTER_END:j,ERR_UNKNOWN_ENCODING:rt}=we().codes,{errorOrDestroy:t}=x;R(u.prototype,S.prototype),R(u,S);function i(){}var o=g("kOnFinished");function r(L,F,ot){if(typeof ot!=="boolean")ot=F instanceof qe();if(this.objectMode=!!(L&&L.objectMode),ot)this.objectMode=this.objectMode||!!(L&&L.writableObjectMode);this.highWaterMark=L?T(this,L,"writableHighWaterMark",ot):k(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;let J=!!(L&&L.decodeStrings===!1);this.decodeStrings=!J,this.defaultEncoding=L&&L.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=_.bind(void 0,F),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,n(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!L||L.emitClose!==!1,this.autoDestroy=!L||L.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[o]=[]}function n(L){L.buffered=[],L.bufferedIndex=0,L.allBuffers=!0,L.allNoop=!0}r.prototype.getBuffer=function(){return b(this.buffered,this.bufferedIndex)},a(r.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function u(L){let F=this instanceof qe();if(!F&&!M(u,this))return new u(L);if(this._writableState=new r(L,this,F),L){if(typeof L.write==="function")this._write=L.write;if(typeof L.writev==="function")this._writev=L.writev;if(typeof L.destroy==="function")this._destroy=L.destroy;if(typeof L.final==="function")this._final=L.final;if(typeof L.construct==="function")this._construct=L.construct;if(L.signal)B(L.signal,this)}S.call(this,L),x.construct(this,()=>{let ot=this._writableState;if(!ot.writing)U(this,ot);H(this,ot)})}a(u,y,{__proto__:null,value:function(L){if(M(this,L))return!0;if(this!==u)return!1;return L&&L._writableState instanceof r}}),u.prototype.pipe=function(){t(this,new W)};function d(L,F,ot,J){let Q=L._writableState;if(typeof ot==="function")J=ot,ot=Q.defaultEncoding;else{if(!ot)ot=Q.defaultEncoding;else if(ot!=="buffer"&&!A.isEncoding(ot))throw new rt(ot);if(typeof J!=="function")J=i}if(F===null)throw new st;else if(!Q.objectMode)if(typeof F==="string"){if(Q.decodeStrings!==!1)F=A.from(F,ot),ot="buffer"}else if(F instanceof A)ot="buffer";else if(S._isUint8Array(F))F=S._uint8ArrayToBuffer(F),ot="buffer";else throw new P("chunk",["string","Buffer","Uint8Array"],F);let Mt;if(Q.ending)Mt=new j;else if(Q.destroyed)Mt=new at("write");if(Mt)return c.nextTick(J,Mt),t(L,Mt,!0),Mt;return Q.pendingcb++,s(L,Q,F,ot,J)}u.prototype.write=function(L,F,ot){return d(this,L,F,ot)===!0},u.prototype.cork=function(){this._writableState.corked++},u.prototype.uncork=function(){let L=this._writableState;if(L.corked){if(L.corked--,!L.writing)U(this,L)}},u.prototype.setDefaultEncoding=function(L){if(typeof L==="string")L=w(L);if(!A.isEncoding(L))throw new rt(L);return this._writableState.defaultEncoding=L,this};function s(L,F,ot,J,Q){let Mt=F.objectMode?1:ot.length;F.length+=Mt;let C=F.length<F.highWaterMark;if(!C)F.needDrain=!0;if(F.writing||F.corked||F.errored||!F.constructed){if(F.buffered.push({chunk:ot,encoding:J,callback:Q}),F.allBuffers&&J!=="buffer")F.allBuffers=!1;if(F.allNoop&&Q!==i)F.allNoop=!1}else F.writelen=Mt,F.writecb=Q,F.writing=!0,F.sync=!0,L._write(ot,J,F.onwrite),F.sync=!1;return C&&!F.errored&&!F.destroyed}function e(L,F,ot,J,Q,Mt,C){if(F.writelen=J,F.writecb=C,F.writing=!0,F.sync=!0,F.destroyed)F.onwrite(new at("write"));else if(ot)L._writev(Q,F.onwrite);else L._write(Q,Mt,F.onwrite);F.sync=!1}function f(L,F,ot,J){--F.pendingcb,J(ot),N(F),t(L,ot)}function _(L,F){let ot=L._writableState,J=ot.sync,Q=ot.writecb;if(typeof Q!=="function"){t(L,new O);return}if(ot.writing=!1,ot.writecb=null,ot.length-=ot.writelen,ot.writelen=0,F){if(F.stack,!ot.errored)ot.errored=F;if(L._readableState&&!L._readableState.errored)L._readableState.errored=F;if(J)c.nextTick(f,L,ot,F,Q);else f(L,ot,F,Q)}else{if(ot.buffered.length>ot.bufferedIndex)U(L,ot);if(J)if(ot.afterWriteTickInfo!==null&&ot.afterWriteTickInfo.cb===Q)ot.afterWriteTickInfo.count++;else ot.afterWriteTickInfo={count:1,cb:Q,stream:L,state:ot},c.nextTick(m,ot.afterWriteTickInfo);else I(L,ot,1,Q)}}function m({stream:L,state:F,count:ot,cb:J}){return F.afterWriteTickInfo=null,I(L,F,ot,J)}function I(L,F,ot,J){if(!F.ending&&!L.destroyed&&F.length===0&&F.needDrain)F.needDrain=!1,L.emit("drain");while(ot-- >0)F.pendingcb--,J();if(F.destroyed)N(F);H(L,F)}function N(L){if(L.writing)return;for(let Q=L.bufferedIndex;Q<L.buffered.length;++Q){var F;let{chunk:Mt,callback:C}=L.buffered[Q],K=L.objectMode?1:Mt.length;L.length-=K,C((F=L.errored)!==null&&F!==void 0?F:new at("write"))}let ot=L[o].splice(0);for(let Q=0;Q<ot.length;Q++){var J;ot[Q]((J=L.errored)!==null&&J!==void 0?J:new at("end"))}n(L)}function U(L,F){if(F.corked||F.bufferProcessing||F.destroyed||!F.constructed)return;let{buffered:ot,bufferedIndex:J,objectMode:Q}=F,Mt=ot.length-J;if(!Mt)return;let C=J;if(F.bufferProcessing=!0,Mt>1&&L._writev){F.pendingcb-=Mt-1;let K=F.allNoop?i:(V)=>{for(let it=C;it<ot.length;++it)ot[it].callback(V)},Nt=F.allNoop&&C===0?ot:b(ot,C);Nt.allBuffers=F.allBuffers,e(L,F,!0,F.length,Nt,"",K),n(F)}else{do{let{chunk:K,encoding:Nt,callback:V}=ot[C];ot[C++]=null;let it=Q?1:K.length;e(L,F,!1,it,K,Nt,V)}while(C<ot.length&&!F.writing);if(C===ot.length)n(F);else if(C>256)ot.splice(0,C),F.bufferedIndex=0;else F.bufferedIndex=C}F.bufferProcessing=!1}u.prototype._write=function(L,F,ot){if(this._writev)this._writev([{chunk:L,encoding:F}],ot);else throw new D("_write()")},u.prototype._writev=null,u.prototype.end=function(L,F,ot){let J=this._writableState;if(typeof L==="function")ot=L,L=null,F=null;else if(typeof F==="function")ot=F,F=null;let Q;if(L!==null&&L!==void 0){let Mt=d(this,L,F);if(Mt instanceof p)Q=Mt}if(J.corked)J.corked=1,this.uncork();if(Q);else if(!J.errored&&!J.ending)J.ending=!0,H(this,J,!0),J.ended=!0;else if(J.finished)Q=new ft("end");else if(J.destroyed)Q=new at("end");if(typeof ot==="function")if(Q||J.finished)c.nextTick(ot,Q);else J[o].push(ot);return this};function Z(L){return L.ending&&!L.destroyed&&L.constructed&&L.length===0&&!L.errored&&L.buffered.length===0&&!L.finished&&!L.writing&&!L.errorEmitted&&!L.closeEmitted}function ut(L,F){let ot=!1;function J(Q){if(ot){t(L,Q!==null&&Q!==void 0?Q:O());return}if(ot=!0,F.pendingcb--,Q){let Mt=F[o].splice(0);for(let C=0;C<Mt.length;C++)Mt[C](Q);t(L,Q,F.sync)}else if(Z(F))F.prefinished=!0,L.emit("prefinish"),F.pendingcb++,c.nextTick(nt,L,F)}F.sync=!0,F.pendingcb++;try{L._final(J)}catch(Q){J(Q)}F.sync=!1}function Y(L,F){if(!F.prefinished&&!F.finalCalled)if(typeof L._final==="function"&&!F.destroyed)F.finalCalled=!0,ut(L,F);else F.prefinished=!0,L.emit("prefinish")}function H(L,F,ot){if(Z(F)){if(Y(L,F),F.pendingcb===0){if(ot)F.pendingcb++,c.nextTick((J,Q)=>{if(Z(Q))nt(J,Q);else Q.pendingcb--},L,F);else if(Z(F))F.pendingcb++,nt(L,F)}}}function nt(L,F){F.pendingcb--,F.finished=!0;let ot=F[o].splice(0);for(let J=0;J<ot.length;J++)ot[J]();if(L.emit("finish"),F.autoDestroy){let J=L._readableState;if(!J||J.autoDestroy&&(J.endEmitted||J.readable===!1))L.destroy()}}E(u.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(L){if(this._writableState)this._writableState.destroyed=L}},writable:{__proto__:null,get(){let L=this._writableState;return!!L&&L.writable!==!1&&!L.destroyed&&!L.errored&&!L.ending&&!L.ended},set(L){if(this._writableState)this._writableState.writable=!!L}},writableFinished:{__proto__:null,get(){return this._writableState?this._writableState.finished:!1}},writableObjectMode:{__proto__:null,get(){return this._writableState?this._writableState.objectMode:!1}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return this._writableState?this._writableState.ending:!1}},writableNeedDrain:{__proto__:null,get(){let L=this._writableState;if(!L)return!1;return!L.destroyed&&!L.ending&&L.needDrain}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._writableState.writable!==!1&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});var G=x.destroy;u.prototype.destroy=function(L,F){let ot=this._writableState;if(!ot.destroyed&&(ot.bufferedIndex<ot.buffered.length||ot[o].length))c.nextTick(N,ot);return G.call(this,L,F),this},u.prototype._undestroy=x.undestroy,u.prototype._destroy=function(L,F){F(L)},u.prototype[v.captureRejectionSymbol]=function(L){this.destroy(L)};var tt;function Dt(){if(tt===void 0)tt={};return tt}u.fromWeb=function(L,F){return Dt().newStreamWritableFromWritableStream(L,F)},u.toWeb=function(L){return Dt().newWritableStreamFromStreamWritable(L)}}),va=zt((h,l)=>{var c=$e(),b=(ye(),jt(pe)),{isReadable:p,isWritable:M,isIterable:a,isNodeStream:E,isReadableNodeStream:R,isWritableNodeStream:w,isDuplexNodeStream:g,isReadableStream:y,isWritableStream:v}=Ne(),S=Ce(),{AbortError:A,codes:{ERR_INVALID_ARG_TYPE:x,ERR_INVALID_RETURN_VALUE:B}}=we(),{destroyer:T}=Je(),k=qe(),P=Sr(),D=ti(),{createDeferredPromise:O}=Se(),W=ln(),at=globalThis.Blob||b.Blob,ft=typeof at<"u"?function(o){return o instanceof at}:function(o){return!1},st=globalThis.AbortController||rr().AbortController,{FunctionPrototypeCall:j}=Kt();class rt extends k{constructor(o){super(o);if((o===null||o===void 0?void 0:o.readable)===!1)this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0;if((o===null||o===void 0?void 0:o.writable)===!1)this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0}}l.exports=function o(r,n){if(g(r))return r;if(R(r))return i({readable:r});if(w(r))return i({writable:r});if(E(r))return i({writable:!1,readable:!1});if(y(r))return i({readable:P.fromWeb(r)});if(v(r))return i({writable:D.fromWeb(r)});if(typeof r==="function"){let{value:d,write:s,final:e,destroy:f}=t(r);if(a(d))return W(rt,d,{objectMode:!0,write:s,final:e,destroy:f});let _=d===null||d===void 0?void 0:d.then;if(typeof _==="function"){let m,I=j(_,d,(N)=>{if(N!=null)throw new B("nully","body",N)},(N)=>{T(m,N)});return m=new rt({objectMode:!0,readable:!1,write:s,final(N){e(async()=>{try{await I,c.nextTick(N,null)}catch(U){c.nextTick(N,U)}})},destroy:f})}throw new B("Iterable, AsyncIterable or AsyncFunction",n,d)}if(ft(r))return o(r.arrayBuffer());if(a(r))return W(rt,r,{objectMode:!0,writable:!1});if(y(r===null||r===void 0?void 0:r.readable)&&v(r===null||r===void 0?void 0:r.writable))return rt.fromWeb(r);if(typeof(r===null||r===void 0?void 0:r.writable)==="object"||typeof(r===null||r===void 0?void 0:r.readable)==="object"){let d=r!==null&&r!==void 0&&r.readable?R(r===null||r===void 0?void 0:r.readable)?r===null||r===void 0?void 0:r.readable:o(r.readable):void 0,s=r!==null&&r!==void 0&&r.writable?w(r===null||r===void 0?void 0:r.writable)?r===null||r===void 0?void 0:r.writable:o(r.writable):void 0;return i({readable:d,writable:s})}let u=r===null||r===void 0?void 0:r.then;if(typeof u==="function"){let d;return j(u,r,(s)=>{if(s!=null)d.push(s);d.push(null)},(s)=>{T(d,s)}),d=new rt({objectMode:!0,writable:!1,read(){}})}throw new x(n,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],r)};function t(o){let{promise:r,resolve:n}=O(),u=new st,d=u.signal;return{value:o(async function*(){while(!0){let s=r;r=null;let{chunk:e,done:f,cb:_}=await s;if(c.nextTick(_),f)return;if(d.aborted)throw new A(void 0,{cause:d.reason});({promise:r,resolve:n}=O()),yield e}}(),{signal:d}),write(s,e,f){let _=n;n=null,_({chunk:s,done:!1,cb:f})},final(s){let e=n;n=null,e({done:!0,cb:s})},destroy(s,e){u.abort(),e(s)}}}function i(o){let r=o.readable&&typeof o.readable.read!=="function"?P.wrap(o.readable):o.readable,n=o.writable,u=!!p(r),d=!!M(n),s,e,f,_,m;function I(N){let U=_;if(_=null,U)U(N);else if(N)m.destroy(N)}if(m=new rt({readableObjectMode:!!(r!==null&&r!==void 0&&r.readableObjectMode),writableObjectMode:!!(n!==null&&n!==void 0&&n.writableObjectMode),readable:u,writable:d}),d)S(n,(N)=>{if(d=!1,N)T(r,N);I(N)}),m._write=function(N,U,Z){if(n.write(N,U))Z();else s=Z},m._final=function(N){n.end(),e=N},n.on("drain",function(){if(s){let N=s;s=null,N()}}),n.on("finish",function(){if(e){let N=e;e=null,N()}});if(u)S(r,(N)=>{if(u=!1,N)T(r,N);I(N)}),r.on("readable",function(){if(f){let N=f;f=null,N()}}),r.on("end",function(){m.push(null)}),m._read=function(){while(!0){let N=r.read();if(N===null){f=m._read;return}if(!m.push(N))return}};return m._destroy=function(N,U){if(!N&&_!==null)N=new A;if(f=null,s=null,e=null,_===null)U(N);else _=U,T(n,N),T(r,N)},m}}),qe=zt((h,l)=>{var{ObjectDefineProperties:c,ObjectGetOwnPropertyDescriptor:b,ObjectKeys:p,ObjectSetPrototypeOf:M}=Kt();l.exports=R;var a=Sr(),E=ti();M(R.prototype,a.prototype),M(R,a);{let v=p(E.prototype);for(let S=0;S<v.length;S++){let A=v[S];if(!R.prototype[A])R.prototype[A]=E.prototype[A]}}function R(v){if(!(this instanceof R))return new R(v);if(a.call(this,v),E.call(this,v),v){if(this.allowHalfOpen=v.allowHalfOpen!==!1,v.readable===!1)this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0;if(v.writable===!1)this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0}else this.allowHalfOpen=!0}c(R.prototype,{writable:{__proto__:null,...b(E.prototype,"writable")},writableHighWaterMark:{__proto__:null,...b(E.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...b(E.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...b(E.prototype,"writableBuffer")},writableLength:{__proto__:null,...b(E.prototype,"writableLength")},writableFinished:{__proto__:null,...b(E.prototype,"writableFinished")},writableCorked:{__proto__:null,...b(E.prototype,"writableCorked")},writableEnded:{__proto__:null,...b(E.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...b(E.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){if(this._readableState===void 0||this._writableState===void 0)return!1;return this._readableState.destroyed&&this._writableState.destroyed},set(v){if(this._readableState&&this._writableState)this._readableState.destroyed=v,this._writableState.destroyed=v}}});var w;function g(){if(w===void 0)w={};return w}R.fromWeb=function(v,S){return g().newStreamDuplexFromReadableWritablePair(v,S)},R.toWeb=function(v){return g().newReadableWritablePairFromDuplex(v)};var y;R.from=function(v){if(!y)y=va();return y(v,"body")}}),un=zt((h,l)=>{var{ObjectSetPrototypeOf:c,Symbol:b}=Kt();l.exports=R;var{ERR_METHOD_NOT_IMPLEMENTED:p}=we().codes,M=qe(),{getHighWaterMark:a}=_r();c(R.prototype,M.prototype),c(R,M);var E=b("kCallback");function R(y){if(!(this instanceof R))return new R(y);let v=y?a(this,y,"readableHighWaterMark",!0):null;if(v===0)y={...y,highWaterMark:null,readableHighWaterMark:v,writableHighWaterMark:y.writableHighWaterMark||0};if(M.call(this,y),this._readableState.sync=!1,this[E]=null,y){if(typeof y.transform==="function")this._transform=y.transform;if(typeof y.flush==="function")this._flush=y.flush}this.on("prefinish",g)}function w(y){if(typeof this._flush==="function"&&!this.destroyed)this._flush((v,S)=>{if(v){if(y)y(v);else this.destroy(v);return}if(S!=null)this.push(S);if(this.push(null),y)y()});else if(this.push(null),y)y()}function g(){if(this._final!==w)w.call(this)}R.prototype._final=w,R.prototype._transform=function(y,v,S){throw new p("_transform()")},R.prototype._write=function(y,v,S){let A=this._readableState,x=this._writableState,B=A.length;this._transform(y,v,(T,k)=>{if(T){S(T);return}if(k!=null)this.push(k);if(x.ended||B===A.length||A.length<A.highWaterMark)S();else this[E]=S})},R.prototype._read=function(){if(this[E]){let y=this[E];this[E]=null,y()}}}),dn=zt((h,l)=>{var{ObjectSetPrototypeOf:c}=Kt();l.exports=p;var b=un();c(p.prototype,b.prototype),c(p,b);function p(M){if(!(this instanceof p))return new p(M);b.call(this,M)}p.prototype._transform=function(M,a,E){E(null,M)}}),ei=zt((h,l)=>{var c=$e(),{ArrayIsArray:b,Promise:p,SymbolAsyncIterator:M,SymbolDispose:a}=Kt(),E=Ce(),{once:R}=Se(),w=Je(),g=qe(),{aggregateTwoErrors:y,codes:{ERR_INVALID_ARG_TYPE:v,ERR_INVALID_RETURN_VALUE:S,ERR_MISSING_ARGS:A,ERR_STREAM_DESTROYED:x,ERR_STREAM_PREMATURE_CLOSE:B},AbortError:T}=we(),{validateFunction:k,validateAbortSignal:P}=ir(),{isIterable:D,isReadable:O,isReadableNodeStream:W,isNodeStream:at,isTransformStream:ft,isWebStream:st,isReadableStream:j,isReadableFinished:rt}=Ne(),t=globalThis.AbortController||rr().AbortController,i,o,r;function n(N,U,Z){let ut=!1;N.on("close",()=>{ut=!0});let Y=E(N,{readable:U,writable:Z},(H)=>{ut=!H});return{destroy:(H)=>{if(ut)return;ut=!0,w.destroyer(N,H||new x("pipe"))},cleanup:Y}}function u(N){return k(N[N.length-1],"streams[stream.length - 1]"),N.pop()}function d(N){if(D(N))return N;else if(W(N))return s(N);throw new v("val",["Readable","Iterable","AsyncIterable"],N)}async function*s(N){if(!o)o=Sr();yield*o.prototype[M].call(N)}async function e(N,U,Z,{end:ut}){let Y,H=null,nt=(Dt)=>{if(Dt)Y=Dt;if(H){let L=H;H=null,L()}},G=()=>new p((Dt,L)=>{if(Y)L(Y);else H=()=>{if(Y)L(Y);else Dt()}});U.on("drain",nt);let tt=E(U,{readable:!1},nt);try{if(U.writableNeedDrain)await G();for await(let Dt of N)if(!U.write(Dt))await G();if(ut)U.end(),await G();Z()}catch(Dt){Z(Y!==Dt?y(Y,Dt):Dt)}finally{tt(),U.off("drain",nt)}}async function f(N,U,Z,{end:ut}){if(ft(U))U=U.writable;let Y=U.getWriter();try{for await(let H of N)await Y.ready,Y.write(H).catch(()=>{});if(await Y.ready,ut)await Y.close();Z()}catch(H){try{await Y.abort(H),Z(H)}catch(nt){Z(nt)}}}function _(...N){return m(N,R(u(N)))}function m(N,U,Z){if(N.length===1&&b(N[0]))N=N[0];if(N.length<2)throw new A("streams");let ut=new t,Y=ut.signal,H=Z===null||Z===void 0?void 0:Z.signal,nt=[];P(H,"options.signal");function G(){Q(new T)}r=r||Se().addAbortListener;let tt;if(H)tt=r(H,G);let Dt,L,F=[],ot=0;function J(V){Q(V,--ot===0)}function Q(V,it){var Lt;if(V&&(!Dt||Dt.code==="ERR_STREAM_PREMATURE_CLOSE"))Dt=V;if(!Dt&&!it)return;while(F.length)F.shift()(Dt);if((Lt=tt)===null||Lt===void 0||Lt[a](),ut.abort(),it){if(!Dt)nt.forEach((pt)=>pt());c.nextTick(U,Dt,L)}}let Mt;for(let V=0;V<N.length;V++){let it=N[V],Lt=V<N.length-1,pt=V>0,yt=Lt||(Z===null||Z===void 0?void 0:Z.end)!==!1,Zt=V===N.length-1;if(at(it)){let dt=function(bt){if(bt&&bt.name!=="AbortError"&&bt.code!=="ERR_STREAM_PREMATURE_CLOSE")J(bt)};var C=dt;if(yt){let{destroy:bt,cleanup:Jt}=n(it,Lt,pt);if(F.push(bt),O(it)&&Zt)nt.push(Jt)}if(it.on("error",dt),O(it)&&Zt)nt.push(()=>{it.removeListener("error",dt)})}if(V===0)if(typeof it==="function"){if(Mt=it({signal:Y}),!D(Mt))throw new S("Iterable, AsyncIterable or Stream","source",Mt)}else if(D(it)||W(it)||ft(it))Mt=it;else Mt=g.from(it);else if(typeof it==="function"){if(ft(Mt)){var K;Mt=d((K=Mt)===null||K===void 0?void 0:K.readable)}else Mt=d(Mt);if(Mt=it(Mt,{signal:Y}),Lt){if(!D(Mt,!0))throw new S("AsyncIterable",`transform[${V-1}]`,Mt)}else{var Nt;if(!i)i=dn();let dt=new i({objectMode:!0}),bt=(Nt=Mt)===null||Nt===void 0?void 0:Nt.then;if(typeof bt==="function")ot++,bt.call(Mt,(vt)=>{if(L=vt,vt!=null)dt.write(vt);if(yt)dt.end();c.nextTick(J)},(vt)=>{dt.destroy(vt),c.nextTick(J,vt)});else if(D(Mt,!0))ot++,e(Mt,dt,J,{end:yt});else if(j(Mt)||ft(Mt)){let vt=Mt.readable||Mt;ot++,e(vt,dt,J,{end:yt})}else throw new S("AsyncIterable or Promise","destination",Mt);Mt=dt;let{destroy:Jt,cleanup:gt}=n(Mt,!1,!0);if(F.push(Jt),Zt)nt.push(gt)}}else if(at(it)){if(W(Mt)){ot+=2;let dt=I(Mt,it,J,{end:yt});if(O(it)&&Zt)nt.push(dt)}else if(ft(Mt)||j(Mt)){let dt=Mt.readable||Mt;ot++,e(dt,it,J,{end:yt})}else if(D(Mt))ot++,e(Mt,it,J,{end:yt});else throw new v("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],Mt);Mt=it}else if(st(it)){if(W(Mt))ot++,f(d(Mt),it,J,{end:yt});else if(j(Mt)||D(Mt))ot++,f(Mt,it,J,{end:yt});else if(ft(Mt))ot++,f(Mt.readable,it,J,{end:yt});else throw new v("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],Mt);Mt=it}else Mt=g.from(it)}if(Y!==null&&Y!==void 0&&Y.aborted||H!==null&&H!==void 0&&H.aborted)c.nextTick(G);return Mt}function I(N,U,Z,{end:ut}){let Y=!1;if(U.on("close",()=>{if(!Y)Z(new B)}),N.pipe(U,{end:!1}),ut){let nt=function(){Y=!0,U.end()};var H=nt;if(rt(N))c.nextTick(nt);else N.once("end",nt)}else Z();return E(N,{readable:!0,writable:!1},(nt)=>{let G=N._readableState;if(nt&&nt.code==="ERR_STREAM_PREMATURE_CLOSE"&&G&&G.ended&&!G.errored&&!G.errorEmitted)N.once("end",Z).once("error",Z);else Z(nt)}),E(U,{readable:!1,writable:!0},Z)}l.exports={pipelineImpl:m,pipeline:_}}),cn=zt((h,l)=>{var{pipeline:c}=ei(),b=qe(),{destroyer:p}=Je(),{isNodeStream:M,isReadable:a,isWritable:E,isWebStream:R,isTransformStream:w,isWritableStream:g,isReadableStream:y}=Ne(),{AbortError:v,codes:{ERR_INVALID_ARG_VALUE:S,ERR_MISSING_ARGS:A}}=we(),x=Ce();l.exports=function(...B){if(B.length===0)throw new A("streams");if(B.length===1)return b.from(B[0]);let T=[...B];if(typeof B[0]==="function")B[0]=b.from(B[0]);if(typeof B[B.length-1]==="function"){let t=B.length-1;B[t]=b.from(B[t])}for(let t=0;t<B.length;++t){if(!M(B[t])&&!R(B[t]))continue;if(t<B.length-1&&!(a(B[t])||y(B[t])||w(B[t])))throw new S(`streams[${t}]`,T[t],"must be readable");if(t>0&&!(E(B[t])||g(B[t])||w(B[t])))throw new S(`streams[${t}]`,T[t],"must be writable")}let k,P,D,O,W;function at(t){let i=O;if(O=null,i)i(t);else if(t)W.destroy(t);else if(!rt&&!j)W.destroy()}let ft=B[0],st=c(B,at),j=!!(E(ft)||g(ft)||w(ft)),rt=!!(a(st)||y(st)||w(st));if(W=new b({writableObjectMode:!!(ft!==null&&ft!==void 0&&ft.writableObjectMode),readableObjectMode:!!(st!==null&&st!==void 0&&st.readableObjectMode),writable:j,readable:rt}),j){if(M(ft))W._write=function(i,o,r){if(ft.write(i,o))r();else k=r},W._final=function(i){ft.end(),P=i},ft.on("drain",function(){if(k){let i=k;k=null,i()}});else if(R(ft)){let i=(w(ft)?ft.writable:ft).getWriter();W._write=async function(o,r,n){try{await i.ready,i.write(o).catch(()=>{}),n()}catch(u){n(u)}},W._final=async function(o){try{await i.ready,i.close().catch(()=>{}),P=o}catch(r){o(r)}}}let t=w(st)?st.readable:st;x(t,()=>{if(P){let i=P;P=null,i()}})}if(rt){if(M(st))st.on("readable",function(){if(D){let t=D;D=null,t()}}),st.on("end",function(){W.push(null)}),W._read=function(){while(!0){let t=st.read();if(t===null){D=W._read;return}if(!W.push(t))return}};else if(R(st)){let t=(w(st)?st.readable:st).getReader();W._read=async function(){while(!0)try{let{value:i,done:o}=await t.read();if(!W.push(i))return;if(o){W.push(null);return}}catch{return}}}}return W._destroy=function(t,i){if(!t&&O!==null)t=new v;if(D=null,k=null,P=null,O===null)i(t);else if(O=i,M(st))p(st,t)},W}}),ga=zt((h,l)=>{var c=globalThis.AbortController||rr().AbortController,{codes:{ERR_INVALID_ARG_VALUE:b,ERR_INVALID_ARG_TYPE:p,ERR_MISSING_ARGS:M,ERR_OUT_OF_RANGE:a},AbortError:E}=we(),{validateAbortSignal:R,validateInteger:w,validateObject:g}=ir(),y=Kt().Symbol("kWeak"),v=Kt().Symbol("kResistStopPropagation"),{finished:S}=Ce(),A=cn(),{addAbortSignalNoValidate:x}=Mr(),{isWritable:B,isNodeStream:T}=Ne(),{deprecate:k}=Se(),{ArrayPrototypePush:P,Boolean:D,MathFloor:O,Number:W,NumberIsNaN:at,Promise:ft,PromiseReject:st,PromiseResolve:j,PromisePrototypeThen:rt,Symbol:t}=Kt(),i=t("kEmpty"),o=t("kEof");function r(H,nt){if(nt!=null)g(nt,"options");if((nt===null||nt===void 0?void 0:nt.signal)!=null)R(nt.signal,"options.signal");if(T(H)&&!B(H))throw new b("stream",H,"must be writable");let G=A(this,H);if(nt!==null&&nt!==void 0&&nt.signal)x(nt.signal,G);return G}function n(H,nt){if(typeof H!=="function")throw new p("fn",["Function","AsyncFunction"],H);if(nt!=null)g(nt,"options");if((nt===null||nt===void 0?void 0:nt.signal)!=null)R(nt.signal,"options.signal");let G=1;if((nt===null||nt===void 0?void 0:nt.concurrency)!=null)G=O(nt.concurrency);let tt=G-1;if((nt===null||nt===void 0?void 0:nt.highWaterMark)!=null)tt=O(nt.highWaterMark);return w(G,"options.concurrency",1),w(tt,"options.highWaterMark",0),tt+=G,async function*(){let Dt=Se().AbortSignalAny([nt===null||nt===void 0?void 0:nt.signal].filter(D)),L=this,F=[],ot={signal:Dt},J,Q,Mt=!1,C=0;function K(){Mt=!0,Nt()}function Nt(){C-=1,V()}function V(){if(Q&&!Mt&&C<G&&F.length<tt)Q(),Q=null}async function it(){try{for await(let Lt of L){if(Mt)return;if(Dt.aborted)throw new E;try{if(Lt=H(Lt,ot),Lt===i)continue;Lt=j(Lt)}catch(pt){Lt=st(pt)}if(C+=1,rt(Lt,Nt,K),F.push(Lt),J)J(),J=null;if(!Mt&&(F.length>=tt||C>=G))await new ft((pt)=>{Q=pt})}F.push(o)}catch(Lt){let pt=st(Lt);rt(pt,Nt,K),F.push(pt)}finally{if(Mt=!0,J)J(),J=null}}it();try{while(!0){while(F.length>0){let Lt=await F[0];if(Lt===o)return;if(Dt.aborted)throw new E;if(Lt!==i)yield Lt;F.shift(),V()}await new ft((Lt)=>{J=Lt})}}finally{if(Mt=!0,Q)Q(),Q=null}}.call(this)}function u(H=void 0){if(H!=null)g(H,"options");if((H===null||H===void 0?void 0:H.signal)!=null)R(H.signal,"options.signal");return async function*(){let nt=0;for await(let tt of this){var G;if(H!==null&&H!==void 0&&(G=H.signal)!==null&&G!==void 0&&G.aborted)throw new E({cause:H.signal.reason});yield[nt++,tt]}}.call(this)}async function d(H,nt=void 0){for await(let G of _.call(this,H,nt))return!0;return!1}async function s(H,nt=void 0){if(typeof H!=="function")throw new p("fn",["Function","AsyncFunction"],H);return!await d.call(this,async(...G)=>!await H(...G),nt)}async function e(H,nt){for await(let G of _.call(this,H,nt))return G;return}async function f(H,nt){if(typeof H!=="function")throw new p("fn",["Function","AsyncFunction"],H);async function G(tt,Dt){return await H(tt,Dt),i}for await(let tt of n.call(this,G,nt));}function _(H,nt){if(typeof H!=="function")throw new p("fn",["Function","AsyncFunction"],H);async function G(tt,Dt){if(await H(tt,Dt))return tt;return i}return n.call(this,G,nt)}class m extends M{constructor(){super("reduce");this.message="Reduce of an empty stream requires an initial value"}}async function I(H,nt,G){var tt;if(typeof H!=="function")throw new p("reducer",["Function","AsyncFunction"],H);if(G!=null)g(G,"options");if((G===null||G===void 0?void 0:G.signal)!=null)R(G.signal,"options.signal");let Dt=arguments.length>1;if(G!==null&&G!==void 0&&(tt=G.signal)!==null&&tt!==void 0&&tt.aborted){let Q=new E(void 0,{cause:G.signal.reason});throw this.once("error",()=>{}),await S(this.destroy(Q)),Q}let L=new c,F=L.signal;if(G!==null&&G!==void 0&&G.signal){let Q={once:!0,[y]:this,[v]:!0};G.signal.addEventListener("abort",()=>L.abort(),Q)}let ot=!1;try{for await(let Q of this){var J;if(ot=!0,G!==null&&G!==void 0&&(J=G.signal)!==null&&J!==void 0&&J.aborted)throw new E;if(!Dt)nt=Q,Dt=!0;else nt=await H(nt,Q,{signal:F})}if(!ot&&!Dt)throw new m}finally{L.abort()}return nt}async function N(H){if(H!=null)g(H,"options");if((H===null||H===void 0?void 0:H.signal)!=null)R(H.signal,"options.signal");let nt=[];for await(let tt of this){var G;if(H!==null&&H!==void 0&&(G=H.signal)!==null&&G!==void 0&&G.aborted)throw new E(void 0,{cause:H.signal.reason});P(nt,tt)}return nt}function U(H,nt){let G=n.call(this,H,nt);return async function*(){for await(let tt of G)yield*tt}.call(this)}function Z(H){if(H=W(H),at(H))return 0;if(H<0)throw new a("number",">= 0",H);return H}function ut(H,nt=void 0){if(nt!=null)g(nt,"options");if((nt===null||nt===void 0?void 0:nt.signal)!=null)R(nt.signal,"options.signal");return H=Z(H),async function*(){var G;if(nt!==null&&nt!==void 0&&(G=nt.signal)!==null&&G!==void 0&&G.aborted)throw new E;for await(let Dt of this){var tt;if(nt!==null&&nt!==void 0&&(tt=nt.signal)!==null&&tt!==void 0&&tt.aborted)throw new E;if(H--<=0)yield Dt}}.call(this)}function Y(H,nt=void 0){if(nt!=null)g(nt,"options");if((nt===null||nt===void 0?void 0:nt.signal)!=null)R(nt.signal,"options.signal");return H=Z(H),async function*(){var G;if(nt!==null&&nt!==void 0&&(G=nt.signal)!==null&&G!==void 0&&G.aborted)throw new E;for await(let Dt of this){var tt;if(nt!==null&&nt!==void 0&&(tt=nt.signal)!==null&&tt!==void 0&&tt.aborted)throw new E;if(H-- >0)yield Dt;if(H<=0)return}}.call(this)}l.exports.streamReturningOperators={asIndexedPairs:k(u,"readable.asIndexedPairs will be removed in a future version."),drop:ut,filter:_,flatMap:U,map:n,take:Y,compose:r},l.exports.promiseReturningOperators={every:s,forEach:f,reduce:I,toArray:N,some:d,find:e}}),pn=zt((h,l)=>{var{ArrayPrototypePop:c,Promise:b}=Kt(),{isIterable:p,isNodeStream:M,isWebStream:a}=Ne(),{pipelineImpl:E}=ei(),{finished:R}=Ce();yn();function w(...g){return new b((y,v)=>{let S,A,x=g[g.length-1];if(x&&typeof x==="object"&&!M(x)&&!p(x)&&!a(x)){let B=c(g);S=B.signal,A=B.end}E(g,(B,T)=>{if(B)v(B);else y(T)},{signal:S,end:A})})}l.exports={finished:R,pipeline:w}}),yn=zt((h,l)=>{var{Buffer:c}=(ye(),jt(pe)),{ObjectDefineProperty:b,ObjectKeys:p,ReflectApply:M}=Kt(),{promisify:{custom:a}}=Se(),{streamReturningOperators:E,promiseReturningOperators:R}=ga(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:w}}=we(),g=cn(),{setDefaultHighWaterMark:y,getDefaultHighWaterMark:v}=_r(),{pipeline:S}=ei(),{destroyer:A}=Je(),x=Ce(),B=pn(),T=Ne(),k=l.exports=Qr().Stream;k.isDestroyed=T.isDestroyed,k.isDisturbed=T.isDisturbed,k.isErrored=T.isErrored,k.isReadable=T.isReadable,k.isWritable=T.isWritable,k.Readable=Sr();for(let D of p(E)){let O=function(...at){if(new.target)throw w();return k.Readable.from(M(W,this,at))},W=E[D];b(O,"name",{__proto__:null,value:W.name}),b(O,"length",{__proto__:null,value:W.length}),b(k.Readable.prototype,D,{__proto__:null,value:O,enumerable:!1,configurable:!0,writable:!0})}for(let D of p(R)){let O=function(...at){if(new.target)throw w();return M(W,this,at)},W=R[D];b(O,"name",{__proto__:null,value:W.name}),b(O,"length",{__proto__:null,value:W.length}),b(k.Readable.prototype,D,{__proto__:null,value:O,enumerable:!1,configurable:!0,writable:!0})}k.Writable=ti(),k.Duplex=qe(),k.Transform=un(),k.PassThrough=dn(),k.pipeline=S;var{addAbortSignal:P}=Mr();k.addAbortSignal=P,k.finished=x,k.destroy=A,k.compose=g,k.setDefaultHighWaterMark=y,k.getDefaultHighWaterMark=v,b(k,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return B}}),b(S,a,{__proto__:null,enumerable:!0,get(){return B.pipeline}}),b(x,a,{__proto__:null,enumerable:!0,get(){return B.finished}}),k.Stream=k,k._isUint8Array=function(D){return D instanceof Uint8Array},k._uint8ArrayToBuffer=function(D){return c.from(D.buffer,D.byteOffset,D.byteLength)}}),wa=zt((h,l)=>{var c=ri();{let b=yn(),p=pn(),M=b.Readable.destroy;l.exports=b.Readable,l.exports._uint8ArrayToBuffer=b._uint8ArrayToBuffer,l.exports._isUint8Array=b._isUint8Array,l.exports.isDisturbed=b.isDisturbed,l.exports.isErrored=b.isErrored,l.exports.isReadable=b.isReadable,l.exports.Readable=b.Readable,l.exports.Writable=b.Writable,l.exports.Duplex=b.Duplex,l.exports.Transform=b.Transform,l.exports.PassThrough=b.PassThrough,l.exports.addAbortSignal=b.addAbortSignal,l.exports.finished=b.finished,l.exports.destroy=b.destroy,l.exports.destroy=M,l.exports.pipeline=b.pipeline,l.exports.compose=b.compose,Object.defineProperty(b,"promises",{configurable:!0,enumerable:!0,get(){return p}}),l.exports.Stream=b.Stream}l.exports.default=l.exports});bn.exports=wa()});var Re={};lr(Re,{Cipher:()=>mh,Cipheriv:()=>gh,DEFAULT_ENCODING:()=>$h,Decipher:()=>Mh,Decipheriv:()=>Sh,DiffieHellman:()=>Th,DiffieHellmanGroup:()=>Bh,Hash:()=>lh,Hmac:()=>dh,Sign:()=>qh,Verify:()=>Dh,constants:()=>Wh,createCipher:()=>vh,createCipheriv:()=>wh,createCredentials:()=>Hh,createDecipher:()=>_h,createDecipheriv:()=>Ah,createDiffieHellman:()=>kh,createDiffieHellmanGroup:()=>Ih,createECDH:()=>Oh,createHash:()=>uh,createHmac:()=>ch,createSign:()=>Ph,createVerify:()=>Nh,default:()=>ci,getCiphers:()=>Eh,getCurves:()=>Vh,getDiffieHellman:()=>xh,getHashes:()=>ph,getRandomValues:()=>Kh,listCiphers:()=>Rh,pbkdf2:()=>yh,pbkdf2Sync:()=>bh,privateDecrypt:()=>Fh,privateEncrypt:()=>Ch,prng:()=>ah,pseudoRandomBytes:()=>sh,publicDecrypt:()=>Uh,publicEncrypt:()=>Lh,randomBytes:()=>fh,randomFill:()=>jh,randomFillSync:()=>zh,randomUUID:()=>Zh,rng:()=>hh,webcrypto:()=>Jh});function Ea(h){return this[h]}function Vh(){return Gh}var Ma,_a,mn,Sa,Aa,Ra,Ba,Ia=(h,l,c)=>{var b=h!=null&&typeof h==="object";if(b){var p=l?Ra??=new WeakMap:Ba??=new WeakMap,M=p.get(h);if(M)return M}c=h!=null?Ma(_a(h)):{};let a=l||!h||!h.__esModule?mn(c,"default",{value:h,enumerable:!0}):c;for(let E of Sa(h))if(!Aa.call(a,E))mn(a,E,{get:Ea.bind(h,E),enumerable:!0});if(b)p.set(h,a);return a},ht=(h,l)=>()=>(l||h((l={exports:{}}).exports,l),l.exports),Ar,Er,gn,xa,ni,oi,Me,ka,or,wn,Ta,Pa,qa,Na,Mn,Da,Oa,La,Ca,Ua,Fa,ja,za,Ha,Wa,ar,Rr,_n,$a,Sn,An,Ka,sr,ai,si,Za,En,hi,Ga,Rn,Va,Bn,In,Ja,Ya,Xa,Qa,ts,es,rs,is,ns,os,as,ss,hs,fs,fi,xn,ls,kn,us,ds,cs,ps,De,Ue,Tn,Ie,Pn,Br,ys,Ee,bs,ms,vs,qn,Te,hr,Nn,gs,Dn,ws,On,Ms,_s,Ss,As,li,Es,ui,Rs,Bs,Is,xs,ks,Ts,Ps,qs,Ns,Ds,Os,Ls,Cs,Us,vn,Fs,nr,js,Ln,Cn,zs,Hs,Un,Ws,$s,fr,Ks,Zs,Gs,Vs,Js,Ys,Fn,Xs,jn,zn,Hn,di,Wn,Qs,$n,th,eh,ii,rh,ih,nh,oh,Ft,ah,sh,hh,fh,lh,uh,dh,ch,ph,yh,bh,mh,vh,gh,wh,Mh,_h,Sh,Ah,Eh,Rh,Bh,Ih,xh,kh,Th,Ph,qh,Nh,Dh,Oh,Lh,Ch,Uh,Fh,jh,zh,Hh,Wh,$h="buffer",Kh=(h)=>crypto.getRandomValues(h),Zh=()=>crypto.randomUUID(),Gh,Jh,ci;var Ae=ur(()=>{Ma=Object.create,{getPrototypeOf:_a,defineProperty:mn,getOwnPropertyNames:Sa}=Object,Aa=Object.prototype.hasOwnProperty;Ar=ht((h,l)=>{l.exports=(Ae(),jt(Re)).randomBytes}),Er=ht((h,l)=>{l.exports=(Ae(),jt(Re)).createHash}),gn=ht((h,l)=>{l.exports=(Ae(),jt(Re)).createHmac}),xa=ht((h,l)=>{l.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"}}}),ni=ht((h,l)=>{var c=isFinite,b=Math.pow(2,30)-1;l.exports=function(p,M){if(typeof p!=="number")throw TypeError("Iterations not a number");if(p<0||!c(p))throw TypeError("Bad iterations");if(typeof M!=="number")throw TypeError("Key length not a number");if(M<0||M>b||M!==M)throw TypeError("Bad key length")}}),oi=ht((h,l)=>{var c;if(globalThis.process&&globalThis.process.browser)c="utf-8";else if(globalThis.process&&globalThis.process.version)b=parseInt(process.version.split(".")[0].slice(1),10),c=b>=6?"utf-8":"binary";else c="utf-8";var b;l.exports=c}),Me=ht((h,l)=>{/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var c=(ye(),jt(pe)),b=c.Buffer;function p(a,E){for(var R in a)E[R]=a[R]}if(b.from&&b.alloc&&b.allocUnsafe&&b.allocUnsafeSlow)l.exports=c;else p(c,h),h.Buffer=M;function M(a,E,R){return b(a,E,R)}M.prototype=Object.create(b.prototype),p(b,M),M.from=function(a,E,R){if(typeof a==="number")throw TypeError("Argument must not be a number");return b(a,E,R)},M.alloc=function(a,E,R){if(typeof a!=="number")throw TypeError("Argument must be a number");var w=b(a);if(E!==void 0)if(typeof R==="string")w.fill(E,R);else w.fill(E);else w.fill(0);return w},M.allocUnsafe=function(a){if(typeof a!=="number")throw TypeError("Argument must be a number");return b(a)},M.allocUnsafeSlow=function(a){if(typeof a!=="number")throw TypeError("Argument must be a number");return c.SlowBuffer(a)}}),ka=ht((h,l)=>{var c={}.toString;l.exports=Array.isArray||function(b){return c.call(b)=="[object Array]"}}),or=ht((h,l)=>{l.exports=TypeError}),wn=ht((h,l)=>{l.exports=Object}),Ta=ht((h,l)=>{l.exports=Error}),Pa=ht((h,l)=>{l.exports=EvalError}),qa=ht((h,l)=>{l.exports=RangeError}),Na=ht((h,l)=>{l.exports=ReferenceError}),Mn=ht((h,l)=>{l.exports=SyntaxError}),Da=ht((h,l)=>{l.exports=URIError}),Oa=ht((h,l)=>{l.exports=Math.abs}),La=ht((h,l)=>{l.exports=Math.floor}),Ca=ht((h,l)=>{l.exports=Math.max}),Ua=ht((h,l)=>{l.exports=Math.min}),Fa=ht((h,l)=>{l.exports=Math.pow}),ja=ht((h,l)=>{l.exports=Math.round}),za=ht((h,l)=>{l.exports=Number.isNaN||function(c){return c!==c}}),Ha=ht((h,l)=>{var c=za();l.exports=function(b){if(c(b)||b===0)return b;return b<0?-1:1}}),Wa=ht((h,l)=>{l.exports=Object.getOwnPropertyDescriptor}),ar=ht((h,l)=>{var c=Wa();if(c)try{c([],"length")}catch(b){c=null}l.exports=c}),Rr=ht((h,l)=>{var c=Object.defineProperty||!1;if(c)try{c({},"a",{value:1})}catch(b){c=!1}l.exports=c}),_n=ht((h,l)=>{l.exports=function(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function")return!1;if(typeof Symbol.iterator==="symbol")return!0;var c={},b=Symbol("test"),p=Object(b);if(typeof b==="string")return!1;if(Object.prototype.toString.call(b)!=="[object Symbol]")return!1;if(Object.prototype.toString.call(p)!=="[object Symbol]")return!1;var M=42;c[b]=M;for(var a in c)return!1;if(typeof Object.keys==="function"&&Object.keys(c).length!==0)return!1;if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames(c).length!==0)return!1;var E=Object.getOwnPropertySymbols(c);if(E.length!==1||E[0]!==b)return!1;if(!Object.prototype.propertyIsEnumerable.call(c,b))return!1;if(typeof Object.getOwnPropertyDescriptor==="function"){var R=Object.getOwnPropertyDescriptor(c,b);if(R.value!==M||R.enumerable!==!0)return!1}return!0}}),$a=ht((h,l)=>{var c=typeof Symbol<"u"&&Symbol,b=_n();l.exports=function(){if(typeof c!=="function")return!1;if(typeof Symbol!=="function")return!1;if(typeof c("foo")!=="symbol")return!1;if(typeof Symbol("bar")!=="symbol")return!1;return b()}}),Sn=ht((h,l)=>{l.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null}),An=ht((h,l)=>{var c=wn();l.exports=c.getPrototypeOf||null}),Ka=ht((h,l)=>{var c="Function.prototype.bind called on incompatible ",b=Object.prototype.toString,p=Math.max,M="[object Function]",a=function(w,g){var y=[];for(var v=0;v<w.length;v+=1)y[v]=w[v];for(var S=0;S<g.length;S+=1)y[S+w.length]=g[S];return y},E=function(w,g){var y=[];for(var v=g||0,S=0;v<w.length;v+=1,S+=1)y[S]=w[v];return y},R=function(w,g){var y="";for(var v=0;v<w.length;v+=1)if(y+=w[v],v+1<w.length)y+=g;return y};l.exports=function(w){var g=this;if(typeof g!=="function"||b.apply(g)!==M)throw TypeError(c+g);var y=E(arguments,1),v,S=function(){if(this instanceof v){var k=g.apply(this,a(y,arguments));if(Object(k)===k)return k;return this}return g.apply(w,a(y,arguments))},A=p(0,g.length-y.length),x=[];for(var B=0;B<A;B++)x[B]="$"+B;if(v=Function("binder","return function ("+R(x,",")+"){ return binder.apply(this,arguments); }")(S),g.prototype){var T=function(){};T.prototype=g.prototype,v.prototype=new T,T.prototype=null}return v}}),sr=ht((h,l)=>{var c=Ka();l.exports=Function.prototype.bind||c}),ai=ht((h,l)=>{l.exports=Function.prototype.call}),si=ht((h,l)=>{l.exports=Function.prototype.apply}),Za=ht((h,l)=>{l.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply}),En=ht((h,l)=>{var c=sr(),b=si(),p=ai(),M=Za();l.exports=M||c.call(p,b)}),hi=ht((h,l)=>{var c=sr(),b=or(),p=ai(),M=En();l.exports=function(a){if(a.length<1||typeof a[0]!=="function")throw new b("a function is required");return M(c,p,a)}}),Ga=ht((h,l)=>{var c=hi(),b=ar(),p;try{p=[].__proto__===Array.prototype}catch(R){if(!R||typeof R!=="object"||!("code"in R)||R.code!=="ERR_PROTO_ACCESS")throw R}var M=!!p&&b&&b(Object.prototype,"__proto__"),a=Object,E=a.getPrototypeOf;l.exports=M&&typeof M.get==="function"?c([M.get]):typeof E==="function"?function(R){return E(R==null?R:a(R))}:!1}),Rn=ht((h,l)=>{var c=Sn(),b=An(),p=Ga();l.exports=c?function(M){return c(M)}:b?function(M){if(!M||typeof M!=="object"&&typeof M!=="function")throw TypeError("getProto: not an object");return b(M)}:p?function(M){return p(M)}:null}),Va=ht((h,l)=>{var c=Function.prototype.call,b=Object.prototype.hasOwnProperty,p=sr();l.exports=p.call(c,b)}),Bn=ht((h,l)=>{var c,b=wn(),p=Ta(),M=Pa(),a=qa(),E=Na(),R=Mn(),w=or(),g=Da(),y=Oa(),v=La(),S=Ca(),A=Ua(),x=Fa(),B=ja(),T=Ha(),k=Function,P=function(nt){try{return k('"use strict"; return ('+nt+").constructor;")()}catch(G){}},D=ar(),O=Rr(),W=function(){throw new w},at=D?function(){try{return arguments.callee,W}catch(nt){try{return D(arguments,"callee").get}catch(G){return W}}}():W,ft=$a()(),st=Rn(),j=An(),rt=Sn(),t=si(),i=ai(),o={},r=typeof Uint8Array>"u"||!st?c:st(Uint8Array),n={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?c:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?c:ArrayBuffer,"%ArrayIteratorPrototype%":ft&&st?st([][Symbol.iterator]()):c,"%AsyncFromSyncIteratorPrototype%":c,"%AsyncFunction%":o,"%AsyncGenerator%":o,"%AsyncGeneratorFunction%":o,"%AsyncIteratorPrototype%":o,"%Atomics%":typeof Atomics>"u"?c:Atomics,"%BigInt%":typeof BigInt>"u"?c:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?c:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?c:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?c:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":p,"%eval%":eval,"%EvalError%":M,"%Float16Array%":typeof Float16Array>"u"?c:Float16Array,"%Float32Array%":typeof Float32Array>"u"?c:Float32Array,"%Float64Array%":typeof Float64Array>"u"?c:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?c:FinalizationRegistry,"%Function%":k,"%GeneratorFunction%":o,"%Int8Array%":typeof Int8Array>"u"?c:Int8Array,"%Int16Array%":typeof Int16Array>"u"?c:Int16Array,"%Int32Array%":typeof Int32Array>"u"?c:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ft&&st?st(st([][Symbol.iterator]())):c,"%JSON%":typeof JSON==="object"?JSON:c,"%Map%":typeof Map>"u"?c:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ft||!st?c:st(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":b,"%Object.getOwnPropertyDescriptor%":D,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?c:Promise,"%Proxy%":typeof Proxy>"u"?c:Proxy,"%RangeError%":a,"%ReferenceError%":E,"%Reflect%":typeof Reflect>"u"?c:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?c:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ft||!st?c:st(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?c:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ft&&st?st(""[Symbol.iterator]()):c,"%Symbol%":ft?Symbol:c,"%SyntaxError%":R,"%ThrowTypeError%":at,"%TypedArray%":r,"%TypeError%":w,"%Uint8Array%":typeof Uint8Array>"u"?c:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?c:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?c:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?c:Uint32Array,"%URIError%":g,"%WeakMap%":typeof WeakMap>"u"?c:WeakMap,"%WeakRef%":typeof WeakRef>"u"?c:WeakRef,"%WeakSet%":typeof WeakSet>"u"?c:WeakSet,"%Function.prototype.call%":i,"%Function.prototype.apply%":t,"%Object.defineProperty%":O,"%Object.getPrototypeOf%":j,"%Math.abs%":y,"%Math.floor%":v,"%Math.max%":S,"%Math.min%":A,"%Math.pow%":x,"%Math.round%":B,"%Math.sign%":T,"%Reflect.getPrototypeOf%":rt};if(st)try{null.error}catch(nt){u=st(st(nt)),n["%Error.prototype%"]=u}var u,d=function nt(G){var tt;if(G==="%AsyncFunction%")tt=P("async function () {}");else if(G==="%GeneratorFunction%")tt=P("function* () {}");else if(G==="%AsyncGeneratorFunction%")tt=P("async function* () {}");else if(G==="%AsyncGenerator%"){var Dt=nt("%AsyncGeneratorFunction%");if(Dt)tt=Dt.prototype}else if(G==="%AsyncIteratorPrototype%"){var L=nt("%AsyncGenerator%");if(L&&st)tt=st(L.prototype)}return n[G]=tt,tt},s={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},e=sr(),f=Va(),_=e.call(i,Array.prototype.concat),m=e.call(t,Array.prototype.splice),I=e.call(i,String.prototype.replace),N=e.call(i,String.prototype.slice),U=e.call(i,RegExp.prototype.exec),Z=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ut=/\\(\\)?/g,Y=function(nt){var G=N(nt,0,1),tt=N(nt,-1);if(G==="%"&&tt!=="%")throw new R("invalid intrinsic syntax, expected closing `%`");else if(tt==="%"&&G!=="%")throw new R("invalid intrinsic syntax, expected opening `%`");var Dt=[];return I(nt,Z,function(L,F,ot,J){Dt[Dt.length]=ot?I(J,ut,"$1"):F||L}),Dt},H=function(nt,G){var tt=nt,Dt;if(f(s,tt))Dt=s[tt],tt="%"+Dt[0]+"%";if(f(n,tt)){var L=n[tt];if(L===o)L=d(tt);if(typeof L>"u"&&!G)throw new w("intrinsic "+nt+" exists, but is not available. Please file an issue!");return{alias:Dt,name:tt,value:L}}throw new R("intrinsic "+nt+" does not exist!")};l.exports=function(nt,G){if(typeof nt!=="string"||nt.length===0)throw new w("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof G!=="boolean")throw new w('"allowMissing" argument must be a boolean');if(U(/^%?[^%]*%?$/,nt)===null)throw new R("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var tt=Y(nt),Dt=tt.length>0?tt[0]:"",L=H("%"+Dt+"%",G),F=L.name,ot=L.value,J=!1,Q=L.alias;if(Q)Dt=Q[0],m(tt,_([0,1],Q));for(var Mt=1,C=!0;Mt<tt.length;Mt+=1){var K=tt[Mt],Nt=N(K,0,1),V=N(K,-1);if((Nt==='"'||Nt==="'"||Nt==="`"||(V==='"'||V==="'"||V==="`"))&&Nt!==V)throw new R("property names with quotes must have matching quotes");if(K==="constructor"||!C)J=!0;if(Dt+="."+K,F="%"+Dt+"%",f(n,F))ot=n[F];else if(ot!=null){if(!(K in ot)){if(!G)throw new w("base intrinsic for "+nt+" exists, but the property is not available.");return}if(D&&Mt+1>=tt.length){var it=D(ot,K);if(C=!!it,C&&"get"in it&&!("originalValue"in it.get))ot=it.get;else ot=ot[K]}else C=f(ot,K),ot=ot[K];if(C&&!J)n[F]=ot}}return ot}}),In=ht((h,l)=>{var c=Bn(),b=hi(),p=b([c("%String.prototype.indexOf%")]);l.exports=function(M,a){var E=c(M,!!a);if(typeof E==="function"&&p(M,".prototype.")>-1)return b([E]);return E}}),Ja=ht((h,l)=>{var c=Function.prototype.toString,b=typeof Reflect==="object"&&Reflect!==null&&Reflect.apply,p,M;if(typeof b==="function"&&typeof Object.defineProperty==="function")try{p=Object.defineProperty({},"length",{get:function(){throw M}}),M={},b(function(){throw 42},null,p)}catch(D){if(D!==M)b=null}else b=null;var a=/^\s*class\b/,E=function(D){try{var O=c.call(D);return a.test(O)}catch(W){return!1}},R=function(D){try{if(E(D))return!1;return c.call(D),!0}catch(O){return!1}},w=Object.prototype.toString,g="[object Object]",y="[object Function]",v="[object GeneratorFunction]",S="[object HTMLAllCollection]",A="[object HTML document.all class]",x="[object HTMLCollection]",B=typeof Symbol==="function"&&!!Symbol.toStringTag,T=!(0 in[,]),k=function(){return!1};if(typeof document==="object"){if(P=document.all,w.call(P)===w.call(document.all))k=function(D){if((T||!D)&&(typeof D>"u"||typeof D==="object"))try{var O=w.call(D);return(O===S||O===A||O===x||O===g)&&D("")==null}catch(W){}return!1}}var P;l.exports=b?function(D){if(k(D))return!0;if(!D)return!1;if(typeof D!=="function"&&typeof D!=="object")return!1;try{b(D,null,p)}catch(O){if(O!==M)return!1}return!E(D)&&R(D)}:function(D){if(k(D))return!0;if(!D)return!1;if(typeof D!=="function"&&typeof D!=="object")return!1;if(B)return R(D);if(E(D))return!1;var O=w.call(D);if(O!==y&&O!==v&&!/^\[object HTML/.test(O))return!1;return R(D)}}),Ya=ht((h,l)=>{var c=Ja(),b=Object.prototype.toString,p=Object.prototype.hasOwnProperty,M=function(w,g,y){for(var v=0,S=w.length;v<S;v++)if(p.call(w,v))if(y==null)g(w[v],v,w);else g.call(y,w[v],v,w)},a=function(w,g,y){for(var v=0,S=w.length;v<S;v++)if(y==null)g(w.charAt(v),v,w);else g.call(y,w.charAt(v),v,w)},E=function(w,g,y){for(var v in w)if(p.call(w,v))if(y==null)g(w[v],v,w);else g.call(y,w[v],v,w)};function R(w){return b.call(w)==="[object Array]"}l.exports=function(w,g,y){if(!c(g))throw TypeError("iterator must be a function");var v;if(arguments.length>=3)v=y;if(R(w))M(w,g,v);else if(typeof w==="string")a(w,g,v);else E(w,g,v)}}),Xa=ht((h,l)=>{l.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]}),Qa=ht((h,l)=>{var c=Xa(),b=typeof globalThis>"u"?globalThis:globalThis;l.exports=function(){var p=[];for(var M=0;M<c.length;M++)if(typeof b[c[M]]==="function")p[p.length]=c[M];return p}}),ts=ht((h,l)=>{var c=Rr(),b=Mn(),p=or(),M=ar();l.exports=function(a,E,R){if(!a||typeof a!=="object"&&typeof a!=="function")throw new p("`obj` must be an object or a function`");if(typeof E!=="string"&&typeof E!=="symbol")throw new p("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!=="boolean"&&arguments[3]!==null)throw new p("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!=="boolean"&&arguments[4]!==null)throw new p("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!=="boolean"&&arguments[5]!==null)throw new p("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!=="boolean")throw new p("`loose`, if provided, must be a boolean");var w=arguments.length>3?arguments[3]:null,g=arguments.length>4?arguments[4]:null,y=arguments.length>5?arguments[5]:null,v=arguments.length>6?arguments[6]:!1,S=!!M&&M(a,E);if(c)c(a,E,{configurable:y===null&&S?S.configurable:!y,enumerable:w===null&&S?S.enumerable:!w,value:R,writable:g===null&&S?S.writable:!g});else if(v||!w&&!g&&!y)a[E]=R;else throw new b("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}}),es=ht((h,l)=>{var c=Rr(),b=function(){return!!c};b.hasArrayLengthDefineBug=function(){if(!c)return null;try{return c([],"length",{value:1}).length!==1}catch(p){return!0}},l.exports=b}),rs=ht((h,l)=>{var c=Bn(),b=ts(),p=es()(),M=ar(),a=or(),E=c("%Math.floor%");l.exports=function(R,w){if(typeof R!=="function")throw new a("`fn` is not a function");if(typeof w!=="number"||w<0||w>4294967295||E(w)!==w)throw new a("`length` must be a positive 32-bit integer");var g=arguments.length>2&&!!arguments[2],y=!0,v=!0;if("length"in R&&M){var S=M(R,"length");if(S&&!S.configurable)y=!1;if(S&&!S.writable)v=!1}if(y||v||!g)if(p)b(R,"length",w,!0,!0);else b(R,"length",w);return R}}),is=ht((h,l)=>{var c=sr(),b=si(),p=En();l.exports=function(){return p(c,b,arguments)}}),ns=ht((h,l)=>{var c=rs(),b=Rr(),p=hi(),M=is();if(l.exports=function(a){var E=p(arguments),R=a.length-(arguments.length-1);return c(E,1+(R>0?R:0),!0)},b)b(l.exports,"apply",{value:M});else l.exports.apply=M}),os=ht((h,l)=>{var c=_n();l.exports=function(){return c()&&!!Symbol.toStringTag}}),as=ht((h,l)=>{var c=Ya(),b=Qa(),p=ns(),M=In(),a=ar(),E=Rn(),R=M("Object.prototype.toString"),w=os()(),g=typeof globalThis>"u"?globalThis:globalThis,y=b(),v=M("String.prototype.slice"),S=M("Array.prototype.indexOf",!0)||function(T,k){for(var P=0;P<T.length;P+=1)if(T[P]===k)return P;return-1},A={__proto__:null};if(w&&a&&E)c(y,function(T){var k=new g[T];if(Symbol.toStringTag in k&&E){var P=E(k),D=a(P,Symbol.toStringTag);if(!D&&P){var O=E(P);D=a(O,Symbol.toStringTag)}A["$"+T]=p(D.get)}});else c(y,function(T){var k=new g[T],P=k.slice||k.set;if(P)A["$"+T]=p(P)});var x=function(T){var k=!1;return c(A,function(P,D){if(!k)try{if("$"+P(T)===D)k=v(D,1)}catch(O){}}),k},B=function(T){var k=!1;return c(A,function(P,D){if(!k)try{P(T),k=v(D,1)}catch(O){}}),k};l.exports=function(T){if(!T||typeof T!=="object")return!1;if(!w){var k=v(R(T),8,-1);if(S(y,k)>-1)return k;if(k!=="Object")return!1;return B(T)}if(!a)return null;return x(T)}}),ss=ht((h,l)=>{var c=as();l.exports=function(b){return!!c(b)}}),hs=ht((h,l)=>{var c=or(),b=In(),p=b("TypedArray.prototype.buffer",!0),M=ss();l.exports=p||function(a){if(!M(a))throw new c("Not a Typed Array");return a.buffer}}),fs=ht((h,l)=>{var c=Me().Buffer,b=ka(),p=hs(),M=ArrayBuffer.isView||function(w){try{return p(w),!0}catch(g){return!1}},a=typeof Uint8Array<"u",E=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",R=E&&(c.prototype instanceof Uint8Array||c.TYPED_ARRAY_SUPPORT);l.exports=function(w,g){if(c.isBuffer(w)){if(w.constructor&&!("isBuffer"in w))return c.from(w);return w}if(typeof w==="string")return c.from(w,g);if(E&&M(w)){if(w.byteLength===0)return c.alloc(0);if(R){var y=c.from(w.buffer,w.byteOffset,w.byteLength);if(y.byteLength===w.byteLength)return y}var v=w instanceof Uint8Array?w:new Uint8Array(w.buffer,w.byteOffset,w.byteLength),S=c.from(v);if(S.length===w.byteLength)return S}if(a&&w instanceof Uint8Array)return c.from(w);var A=b(w);if(A)for(var x=0;x<w.length;x+=1){var B=w[x];if(typeof B!=="number"||B<0||B>255||~~B!==B)throw RangeError("Array items must be numbers in the range 0-255.")}if(A||c.isBuffer(w)&&w.constructor&&typeof w.constructor.isBuffer==="function"&&w.constructor.isBuffer(w))return c.from(w);throw TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')}}),fi=ht((h,l)=>{var c=Me().Buffer,b=fs(),p=typeof Uint8Array<"u",M=p&&typeof ArrayBuffer<"u",a=M&&ArrayBuffer.isView;l.exports=function(E,R,w){if(typeof E==="string"||c.isBuffer(E)||p&&E instanceof Uint8Array||a&&a(E))return b(E,R);throw TypeError(w+" must be a string, a Buffer, a Uint8Array, or a DataView")}}),xn=ht((h,l)=>{var c={__proto__:null,md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,"sha512-256":32,rmd160:20,ripemd160:20},b={__proto__:null,"sha-1":"sha1","sha-224":"sha224","sha-256":"sha256","sha-384":"sha384","sha-512":"sha512","ripemd-160":"ripemd160"},p=gn(),M=Me().Buffer,a=ni(),E=oi(),R=fi();function w(g,y,v,S,A){a(v,S),g=R(g,E,"Password"),y=R(y,E,"Salt");var x=(A||"sha1").toLowerCase(),B=b[x]||x,T=c[B];if(typeof T!=="number"||!T)throw TypeError("Digest algorithm not supported: "+A);var k=M.allocUnsafe(S),P=M.allocUnsafe(y.length+4);y.copy(P,0,0,y.length);var D=0,O=T,W=Math.ceil(S/O);for(var at=1;at<=W;at++){P.writeUInt32BE(at,y.length);var ft=p(B,g).update(P).digest(),st=ft;for(var j=1;j<v;j++){st=p(B,g).update(st).digest();for(var rt=0;rt<O;rt++)ft[rt]^=st[rt]}ft.copy(k,D),D+=O}return k}l.exports=w}),ls=ht((h,l)=>{var c=Me().Buffer,b=ni(),p=oi(),M=xn(),a=fi(),E,R=globalThis.crypto&&globalThis.crypto.subtle,w={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"},g=[],y;function v(){if(y)return y;if(globalThis.process&&globalThis.process.nextTick)y=globalThis.process.nextTick;else if(globalThis.queueMicrotask)y=globalThis.queueMicrotask;else if(globalThis.setImmediate)y=globalThis.setImmediate;else y=globalThis.setTimeout;return y}function S(B,T,k,P,D){return R.importKey("raw",B,{name:"PBKDF2"},!1,["deriveBits"]).then(function(O){return R.deriveBits({name:"PBKDF2",salt:T,iterations:k,hash:{name:D}},O,P<<3)}).then(function(O){return c.from(O)})}function A(B){if(globalThis.process&&!globalThis.process.browser)return Promise.resolve(!1);if(!R||!R.importKey||!R.deriveBits)return Promise.resolve(!1);if(g[B]!==void 0)return g[B];E=E||c.alloc(8);var T=S(E,E,10,128,B).then(function(){return!0},function(){return!1});return g[B]=T,T}function x(B,T){B.then(function(k){v()(function(){T(null,k)})},function(k){v()(function(){T(k)})})}l.exports=function(B,T,k,P,D,O){if(typeof D==="function")O=D,D=void 0;if(b(k,P),B=a(B,p,"Password"),T=a(T,p,"Salt"),typeof O!=="function")throw Error("No callback provided to pbkdf2");D=D||"sha1";var W=w[D.toLowerCase()];if(!W||typeof globalThis.Promise!=="function"){v()(function(){var at;try{at=M(B,T,k,P,D)}catch(ft){O(ft);return}O(null,at)});return}x(A(W).then(function(at){if(at)return S(B,T,k,P,W);return M(B,T,k,P,D)}),O)}}),kn=ht((h)=>{var l=(Ae(),jt(Re)),c=ni(),b=oi(),p=fi();function M(E,R,w,g,y,v){if(c(w,g),E=p(E,b,"Password"),R=p(R,b,"Salt"),typeof y==="function")v=y,y="sha1";if(typeof v!=="function")throw Error("No callback provided to pbkdf2");return l.pbkdf2(E,R,w,g,y,v)}function a(E,R,w,g,y){return c(w,g),E=p(E,b,"Password"),R=p(R,b,"Salt"),y=y||"sha1",l.pbkdf2Sync(E,R,w,g,y)}if(!l.pbkdf2Sync||l.pbkdf2Sync.toString().indexOf("keylen, digest")===-1)h.pbkdf2Sync=xn(),h.pbkdf2=ls();else h.pbkdf2Sync=a,h.pbkdf2=M}),us=ht((h)=>{var l=(Ae(),jt(Re));h.createCipher=h.Cipher=l.createCipher,h.createCipheriv=h.Cipheriv=l.createCipheriv,h.createDecipher=h.Decipher=l.createDecipher,h.createDecipheriv=h.Decipheriv=l.createDecipheriv,h.listCiphers=h.getCiphers=l.getCiphers}),ds=ht((h)=>{var l=(Ae(),jt(Re));h.DiffieHellmanGroup=l.DiffieHellmanGroup,h.createDiffieHellmanGroup=l.createDiffieHellmanGroup,h.getDiffieHellman=l.getDiffieHellman,h.createDiffieHellman=l.createDiffieHellman,h.DiffieHellman=l.DiffieHellman}),cs=ht((h)=>{var l=(Ae(),jt(Re));h.createSign=l.createSign,h.Sign=l.Sign,h.createVerify=l.createVerify,h.Verify=l.Verify}),ps=ht((h,l)=>{l.exports={name:"elliptic",version:"6.6.1",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 <fedor@indutny.com>",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"}}}),De=ht((h,l)=>{(function(c,b){function p(t,i){if(!t)throw Error(i||"Assertion failed")}function M(t,i){t.super_=i;var o=function(){};o.prototype=i.prototype,t.prototype=new o,t.prototype.constructor=t}function a(t,i,o){if(a.isBN(t))return t;if(this.negative=0,this.words=null,this.length=0,this.red=null,t!==null){if(i==="le"||i==="be")o=i,i=10;this._init(t||0,i||10,o||"be")}}if(typeof c==="object")c.exports=a;else b.BN=a;a.BN=a,a.wordSize=26;var E;try{if(typeof window<"u"&&typeof window.Buffer<"u")E=window.Buffer;else E=(ye(),jt(pe)).Buffer}catch(t){}a.isBN=function(t){if(t instanceof a)return!0;return t!==null&&typeof t==="object"&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,i){if(t.cmp(i)>0)return t;return i},a.min=function(t,i){if(t.cmp(i)<0)return t;return i},a.prototype._init=function(t,i,o){if(typeof t==="number")return this._initNumber(t,i,o);if(typeof t==="object")return this._initArray(t,i,o);if(i==="hex")i=16;p(i===(i|0)&&i>=2&&i<=36),t=t.toString().replace(/\s+/g,"");var r=0;if(t[0]==="-")r++,this.negative=1;if(r<t.length){if(i===16)this._parseHex(t,r,o);else if(this._parseBase(t,i,r),o==="le")this._initArray(this.toArray(),i,o)}},a.prototype._initNumber=function(t,i,o){if(t<0)this.negative=1,t=-t;if(t<67108864)this.words=[t&67108863],this.length=1;else if(t<4503599627370496)this.words=[t&67108863,t/67108864&67108863],this.length=2;else p(t<9007199254740992),this.words=[t&67108863,t/67108864&67108863,1],this.length=3;if(o!=="le")return;this._initArray(this.toArray(),i,o)},a.prototype._initArray=function(t,i,o){if(p(typeof t.length==="number"),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,u,d=0;if(o==="be"){for(r=t.length-1,n=0;r>=0;r-=3)if(u=t[r]|t[r-1]<<8|t[r-2]<<16,this.words[n]|=u<<d&67108863,this.words[n+1]=u>>>26-d&67108863,d+=24,d>=26)d-=26,n++}else if(o==="le"){for(r=0,n=0;r<t.length;r+=3)if(u=t[r]|t[r+1]<<8|t[r+2]<<16,this.words[n]|=u<<d&67108863,this.words[n+1]=u>>>26-d&67108863,d+=24,d>=26)d-=26,n++}return this.strip()};function R(t,i){var o=t.charCodeAt(i);if(o>=65&&o<=70)return o-55;else if(o>=97&&o<=102)return o-87;else return o-48&15}function w(t,i,o){var r=R(t,o);if(o-1>=i)r|=R(t,o-1)<<4;return r}a.prototype._parseHex=function(t,i,o){this.length=Math.ceil((t.length-i)/6),this.words=Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n=0,u=0,d;if(o==="be")for(r=t.length-1;r>=i;r-=2)if(d=w(t,i,r)<<n,this.words[u]|=d&67108863,n>=18)n-=18,u+=1,this.words[u]|=d>>>26;else n+=8;else{var s=t.length-i;for(r=s%2===0?i+1:i;r<t.length;r+=2)if(d=w(t,i,r)<<n,this.words[u]|=d&67108863,n>=18)n-=18,u+=1,this.words[u]|=d>>>26;else n+=8}this.strip()};function g(t,i,o,r){var n=0,u=Math.min(t.length,o);for(var d=i;d<u;d++){var s=t.charCodeAt(d)-48;if(n*=r,s>=49)n+=s-49+10;else if(s>=17)n+=s-17+10;else n+=s}return n}a.prototype._parseBase=function(t,i,o){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=i)r++;r--,n=n/i|0;var u=t.length-o,d=u%r,s=Math.min(u,u-d)+o,e=0;for(var f=o;f<s;f+=r)if(e=g(t,f,f+r,i),this.imuln(n),this.words[0]+e<67108864)this.words[0]+=e;else this._iaddn(e);if(d!==0){var _=1;e=g(t,f,t.length,i);for(f=0;f<d;f++)_*=i;if(this.imuln(_),this.words[0]+e<67108864)this.words[0]+=e;else this._iaddn(e)}this.strip()},a.prototype.copy=function(t){t.words=Array(this.length);for(var i=0;i<this.length;i++)t.words[i]=this.words[i];t.length=this.length,t.negative=this.negative,t.red=this.red},a.prototype.clone=function(){var t=new a(null);return this.copy(t),t},a.prototype._expand=function(t){while(this.length<t)this.words[this.length++]=0;return this},a.prototype.strip=function(){while(this.length>1&&this.words[this.length-1]===0)this.length--;return this._normSign()},a.prototype._normSign=function(){if(this.length===1&&this.words[0]===0)this.negative=0;return this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var y=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],v=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],S=[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];if(a.prototype.toString=function(t,i){t=t||10,i=i|0||1;var o;if(t===16||t==="hex"){o="";var r=0,n=0;for(var u=0;u<this.length;u++){var d=this.words[u],s=((d<<r|n)&16777215).toString(16);if(n=d>>>24-r&16777215,r+=2,r>=26)r-=26,u--;if(n!==0||u!==this.length-1)o=y[6-s.length]+s+o;else o=s+o}if(n!==0)o=n.toString(16)+o;while(o.length%i!==0)o="0"+o;if(this.negative!==0)o="-"+o;return o}if(t===(t|0)&&t>=2&&t<=36){var e=v[t],f=S[t];o="";var _=this.clone();_.negative=0;while(!_.isZero()){var m=_.modn(f).toString(t);if(_=_.idivn(f),!_.isZero())o=y[e-m.length]+m+o;else o=m+o}if(this.isZero())o="0"+o;while(o.length%i!==0)o="0"+o;if(this.negative!==0)o="-"+o;return o}p(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];if(this.length===2)t+=this.words[1]*67108864;else if(this.length===3&&this.words[2]===1)t+=4503599627370496+this.words[1]*67108864;else if(this.length>2)p(!1,"Number can only safely store up to 53 bits");return this.negative!==0?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,i){return p(typeof E<"u"),this.toArrayLike(E,t,i)},a.prototype.toArray=function(t,i){return this.toArrayLike(Array,t,i)},a.prototype.toArrayLike=function(t,i,o){var r=this.byteLength(),n=o||Math.max(1,r);p(r<=n,"byte array longer than desired length"),p(n>0,"Requested array length <= 0"),this.strip();var u=i==="le",d=new t(n),s,e,f=this.clone();if(!u){for(e=0;e<n-r;e++)d[e]=0;for(e=0;!f.isZero();e++)s=f.andln(255),f.iushrn(8),d[n-e-1]=s}else{for(e=0;!f.isZero();e++)s=f.andln(255),f.iushrn(8),d[e]=s;for(;e<n;e++)d[e]=0}return d},Math.clz32)a.prototype._countBits=function(t){return 32-Math.clz32(t)};else a.prototype._countBits=function(t){var i=t,o=0;if(i>=4096)o+=13,i>>>=13;if(i>=64)o+=7,i>>>=7;if(i>=8)o+=4,i>>>=4;if(i>=2)o+=2,i>>>=2;return o+i};a.prototype._zeroBits=function(t){if(t===0)return 26;var i=t,o=0;if((i&8191)===0)o+=13,i>>>=13;if((i&127)===0)o+=7,i>>>=7;if((i&15)===0)o+=4,i>>>=4;if((i&3)===0)o+=2,i>>>=2;if((i&1)===0)o++;return o},a.prototype.bitLength=function(){var t=this.words[this.length-1],i=this._countBits(t);return(this.length-1)*26+i};function A(t){var i=Array(t.bitLength());for(var o=0;o<i.length;o++){var r=o/26|0,n=o%26;i[o]=(t.words[r]&1<<n)>>>n}return i}a.prototype.zeroBits=function(){if(this.isZero())return 0;var t=0;for(var i=0;i<this.length;i++){var o=this._zeroBits(this.words[i]);if(t+=o,o!==26)break}return t},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(t){if(this.negative!==0)return this.abs().inotn(t).iaddn(1);return this.clone()},a.prototype.fromTwos=function(t){if(this.testn(t-1))return this.notn(t).iaddn(1).ineg();return this.clone()},a.prototype.isNeg=function(){return this.negative!==0},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){if(!this.isZero())this.negative^=1;return this},a.prototype.iuor=function(t){while(this.length<t.length)this.words[this.length++]=0;for(var i=0;i<t.length;i++)this.words[i]=this.words[i]|t.words[i];return this.strip()},a.prototype.ior=function(t){return p((this.negative|t.negative)===0),this.iuor(t)},a.prototype.or=function(t){if(this.length>t.length)return this.clone().ior(t);return t.clone().ior(this)},a.prototype.uor=function(t){if(this.length>t.length)return this.clone().iuor(t);return t.clone().iuor(this)},a.prototype.iuand=function(t){var i;if(this.length>t.length)i=t;else i=this;for(var o=0;o<i.length;o++)this.words[o]=this.words[o]&t.words[o];return this.length=i.length,this.strip()},a.prototype.iand=function(t){return p((this.negative|t.negative)===0),this.iuand(t)},a.prototype.and=function(t){if(this.length>t.length)return this.clone().iand(t);return t.clone().iand(this)},a.prototype.uand=function(t){if(this.length>t.length)return this.clone().iuand(t);return t.clone().iuand(this)},a.prototype.iuxor=function(t){var i,o;if(this.length>t.length)i=this,o=t;else i=t,o=this;for(var r=0;r<o.length;r++)this.words[r]=i.words[r]^o.words[r];if(this!==i)for(;r<i.length;r++)this.words[r]=i.words[r];return this.length=i.length,this.strip()},a.prototype.ixor=function(t){return p((this.negative|t.negative)===0),this.iuxor(t)},a.prototype.xor=function(t){if(this.length>t.length)return this.clone().ixor(t);return t.clone().ixor(this)},a.prototype.uxor=function(t){if(this.length>t.length)return this.clone().iuxor(t);return t.clone().iuxor(this)},a.prototype.inotn=function(t){p(typeof t==="number"&&t>=0);var i=Math.ceil(t/26)|0,o=t%26;if(this._expand(i),o>0)i--;for(var r=0;r<i;r++)this.words[r]=~this.words[r]&67108863;if(o>0)this.words[r]=~this.words[r]&67108863>>26-o;return this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,i){p(typeof t==="number"&&t>=0);var o=t/26|0,r=t%26;if(this._expand(o+1),i)this.words[o]=this.words[o]|1<<r;else this.words[o]=this.words[o]&~(1<<r);return this.strip()},a.prototype.iadd=function(t){var i;if(this.negative!==0&&t.negative===0)return this.negative=0,i=this.isub(t),this.negative^=1,this._normSign();else if(this.negative===0&&t.negative!==0)return t.negative=0,i=this.isub(t),t.negative=1,i._normSign();var o,r;if(this.length>t.length)o=this,r=t;else o=t,r=this;var n=0;for(var u=0;u<r.length;u++)i=(o.words[u]|0)+(r.words[u]|0)+n,this.words[u]=i&67108863,n=i>>>26;for(;n!==0&&u<o.length;u++)i=(o.words[u]|0)+n,this.words[u]=i&67108863,n=i>>>26;if(this.length=o.length,n!==0)this.words[this.length]=n,this.length++;else if(o!==this)for(;u<o.length;u++)this.words[u]=o.words[u];return this},a.prototype.add=function(t){var i;if(t.negative!==0&&this.negative===0)return t.negative=0,i=this.sub(t),t.negative^=1,i;else if(t.negative===0&&this.negative!==0)return this.negative=0,i=t.sub(this),this.negative=1,i;if(this.length>t.length)return this.clone().iadd(t);return t.clone().iadd(this)},a.prototype.isub=function(t){if(t.negative!==0){t.negative=0;var i=this.iadd(t);return t.negative=1,i._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var o=this.cmp(t);if(o===0)return this.negative=0,this.length=1,this.words[0]=0,this;var r,n;if(o>0)r=this,n=t;else r=t,n=this;var u=0;for(var d=0;d<n.length;d++)i=(r.words[d]|0)-(n.words[d]|0)+u,u=i>>26,this.words[d]=i&67108863;for(;u!==0&&d<r.length;d++)i=(r.words[d]|0)+u,u=i>>26,this.words[d]=i&67108863;if(u===0&&d<r.length&&r!==this)for(;d<r.length;d++)this.words[d]=r.words[d];if(this.length=Math.max(this.length,d),r!==this)this.negative=1;return this.strip()},a.prototype.sub=function(t){return this.clone().isub(t)};function x(t,i,o){o.negative=i.negative^t.negative;var r=t.length+i.length|0;o.length=r,r=r-1|0;var n=t.words[0]|0,u=i.words[0]|0,d=n*u,s=d&67108863,e=d/67108864|0;o.words[0]=s;for(var f=1;f<r;f++){var _=e>>>26,m=e&67108863,I=Math.min(f,i.length-1);for(var N=Math.max(0,f-t.length+1);N<=I;N++){var U=f-N|0;n=t.words[U]|0,u=i.words[N]|0,d=n*u+m,_+=d/67108864|0,m=d&67108863}o.words[f]=m|0,e=_|0}if(e!==0)o.words[f]=e|0;else o.length--;return o.strip()}var B=function(t,i,o){var r=t.words,n=i.words,u=o.words,d=0,s,e,f,_=r[0]|0,m=_&8191,I=_>>>13,N=r[1]|0,U=N&8191,Z=N>>>13,ut=r[2]|0,Y=ut&8191,H=ut>>>13,nt=r[3]|0,G=nt&8191,tt=nt>>>13,Dt=r[4]|0,L=Dt&8191,F=Dt>>>13,ot=r[5]|0,J=ot&8191,Q=ot>>>13,Mt=r[6]|0,C=Mt&8191,K=Mt>>>13,Nt=r[7]|0,V=Nt&8191,it=Nt>>>13,Lt=r[8]|0,pt=Lt&8191,yt=Lt>>>13,Zt=r[9]|0,dt=Zt&8191,bt=Zt>>>13,Jt=n[0]|0,gt=Jt&8191,vt=Jt>>>13,ve=n[1]|0,_t=ve&8191,It=ve>>>13,ge=n[2]|0,xt=ge&8191,St=ge>>>13,be=n[3]|0,kt=be&8191,At=be>>>13,ue=n[4]|0,Tt=ue&8191,Pt=ue>>>13,de=n[5]|0,Et=de&8191,q=de>>>13,z=n[6]|0,X=z&8191,et=z>>>13,Ot=n[7]|0,ct=Ot&8191,mt=Ot>>>13,Gt=n[8]|0,Rt=Gt&8191,qt=Gt>>>13,me=n[9]|0,Bt=me&8191,wt=me>>>13;o.negative=t.negative^i.negative,o.length=19,s=Math.imul(m,gt),e=Math.imul(m,vt),e=e+Math.imul(I,gt)|0,f=Math.imul(I,vt);var Vt=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(Vt>>>26)|0,Vt&=67108863,s=Math.imul(U,gt),e=Math.imul(U,vt),e=e+Math.imul(Z,gt)|0,f=Math.imul(Z,vt),s=s+Math.imul(m,_t)|0,e=e+Math.imul(m,It)|0,e=e+Math.imul(I,_t)|0,f=f+Math.imul(I,It)|0;var Ut=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,s=Math.imul(Y,gt),e=Math.imul(Y,vt),e=e+Math.imul(H,gt)|0,f=Math.imul(H,vt),s=s+Math.imul(U,_t)|0,e=e+Math.imul(U,It)|0,e=e+Math.imul(Z,_t)|0,f=f+Math.imul(Z,It)|0,s=s+Math.imul(m,xt)|0,e=e+Math.imul(m,St)|0,e=e+Math.imul(I,xt)|0,f=f+Math.imul(I,St)|0;var Ct=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,s=Math.imul(G,gt),e=Math.imul(G,vt),e=e+Math.imul(tt,gt)|0,f=Math.imul(tt,vt),s=s+Math.imul(Y,_t)|0,e=e+Math.imul(Y,It)|0,e=e+Math.imul(H,_t)|0,f=f+Math.imul(H,It)|0,s=s+Math.imul(U,xt)|0,e=e+Math.imul(U,St)|0,e=e+Math.imul(Z,xt)|0,f=f+Math.imul(Z,St)|0,s=s+Math.imul(m,kt)|0,e=e+Math.imul(m,At)|0,e=e+Math.imul(I,kt)|0,f=f+Math.imul(I,At)|0;var Wt=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(Wt>>>26)|0,Wt&=67108863,s=Math.imul(L,gt),e=Math.imul(L,vt),e=e+Math.imul(F,gt)|0,f=Math.imul(F,vt),s=s+Math.imul(G,_t)|0,e=e+Math.imul(G,It)|0,e=e+Math.imul(tt,_t)|0,f=f+Math.imul(tt,It)|0,s=s+Math.imul(Y,xt)|0,e=e+Math.imul(Y,St)|0,e=e+Math.imul(H,xt)|0,f=f+Math.imul(H,St)|0,s=s+Math.imul(U,kt)|0,e=e+Math.imul(U,At)|0,e=e+Math.imul(Z,kt)|0,f=f+Math.imul(Z,At)|0,s=s+Math.imul(m,Tt)|0,e=e+Math.imul(m,Pt)|0,e=e+Math.imul(I,Tt)|0,f=f+Math.imul(I,Pt)|0;var Ht=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(Ht>>>26)|0,Ht&=67108863,s=Math.imul(J,gt),e=Math.imul(J,vt),e=e+Math.imul(Q,gt)|0,f=Math.imul(Q,vt),s=s+Math.imul(L,_t)|0,e=e+Math.imul(L,It)|0,e=e+Math.imul(F,_t)|0,f=f+Math.imul(F,It)|0,s=s+Math.imul(G,xt)|0,e=e+Math.imul(G,St)|0,e=e+Math.imul(tt,xt)|0,f=f+Math.imul(tt,St)|0,s=s+Math.imul(Y,kt)|0,e=e+Math.imul(Y,At)|0,e=e+Math.imul(H,kt)|0,f=f+Math.imul(H,At)|0,s=s+Math.imul(U,Tt)|0,e=e+Math.imul(U,Pt)|0,e=e+Math.imul(Z,Tt)|0,f=f+Math.imul(Z,Pt)|0,s=s+Math.imul(m,Et)|0,e=e+Math.imul(m,q)|0,e=e+Math.imul(I,Et)|0,f=f+Math.imul(I,q)|0;var Yt=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,s=Math.imul(C,gt),e=Math.imul(C,vt),e=e+Math.imul(K,gt)|0,f=Math.imul(K,vt),s=s+Math.imul(J,_t)|0,e=e+Math.imul(J,It)|0,e=e+Math.imul(Q,_t)|0,f=f+Math.imul(Q,It)|0,s=s+Math.imul(L,xt)|0,e=e+Math.imul(L,St)|0,e=e+Math.imul(F,xt)|0,f=f+Math.imul(F,St)|0,s=s+Math.imul(G,kt)|0,e=e+Math.imul(G,At)|0,e=e+Math.imul(tt,kt)|0,f=f+Math.imul(tt,At)|0,s=s+Math.imul(Y,Tt)|0,e=e+Math.imul(Y,Pt)|0,e=e+Math.imul(H,Tt)|0,f=f+Math.imul(H,Pt)|0,s=s+Math.imul(U,Et)|0,e=e+Math.imul(U,q)|0,e=e+Math.imul(Z,Et)|0,f=f+Math.imul(Z,q)|0,s=s+Math.imul(m,X)|0,e=e+Math.imul(m,et)|0,e=e+Math.imul(I,X)|0,f=f+Math.imul(I,et)|0;var Xt=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(Xt>>>26)|0,Xt&=67108863,s=Math.imul(V,gt),e=Math.imul(V,vt),e=e+Math.imul(it,gt)|0,f=Math.imul(it,vt),s=s+Math.imul(C,_t)|0,e=e+Math.imul(C,It)|0,e=e+Math.imul(K,_t)|0,f=f+Math.imul(K,It)|0,s=s+Math.imul(J,xt)|0,e=e+Math.imul(J,St)|0,e=e+Math.imul(Q,xt)|0,f=f+Math.imul(Q,St)|0,s=s+Math.imul(L,kt)|0,e=e+Math.imul(L,At)|0,e=e+Math.imul(F,kt)|0,f=f+Math.imul(F,At)|0,s=s+Math.imul(G,Tt)|0,e=e+Math.imul(G,Pt)|0,e=e+Math.imul(tt,Tt)|0,f=f+Math.imul(tt,Pt)|0,s=s+Math.imul(Y,Et)|0,e=e+Math.imul(Y,q)|0,e=e+Math.imul(H,Et)|0,f=f+Math.imul(H,q)|0,s=s+Math.imul(U,X)|0,e=e+Math.imul(U,et)|0,e=e+Math.imul(Z,X)|0,f=f+Math.imul(Z,et)|0,s=s+Math.imul(m,ct)|0,e=e+Math.imul(m,mt)|0,e=e+Math.imul(I,ct)|0,f=f+Math.imul(I,mt)|0;var Qt=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,s=Math.imul(pt,gt),e=Math.imul(pt,vt),e=e+Math.imul(yt,gt)|0,f=Math.imul(yt,vt),s=s+Math.imul(V,_t)|0,e=e+Math.imul(V,It)|0,e=e+Math.imul(it,_t)|0,f=f+Math.imul(it,It)|0,s=s+Math.imul(C,xt)|0,e=e+Math.imul(C,St)|0,e=e+Math.imul(K,xt)|0,f=f+Math.imul(K,St)|0,s=s+Math.imul(J,kt)|0,e=e+Math.imul(J,At)|0,e=e+Math.imul(Q,kt)|0,f=f+Math.imul(Q,At)|0,s=s+Math.imul(L,Tt)|0,e=e+Math.imul(L,Pt)|0,e=e+Math.imul(F,Tt)|0,f=f+Math.imul(F,Pt)|0,s=s+Math.imul(G,Et)|0,e=e+Math.imul(G,q)|0,e=e+Math.imul(tt,Et)|0,f=f+Math.imul(tt,q)|0,s=s+Math.imul(Y,X)|0,e=e+Math.imul(Y,et)|0,e=e+Math.imul(H,X)|0,f=f+Math.imul(H,et)|0,s=s+Math.imul(U,ct)|0,e=e+Math.imul(U,mt)|0,e=e+Math.imul(Z,ct)|0,f=f+Math.imul(Z,mt)|0,s=s+Math.imul(m,Rt)|0,e=e+Math.imul(m,qt)|0,e=e+Math.imul(I,Rt)|0,f=f+Math.imul(I,qt)|0;var te=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(te>>>26)|0,te&=67108863,s=Math.imul(dt,gt),e=Math.imul(dt,vt),e=e+Math.imul(bt,gt)|0,f=Math.imul(bt,vt),s=s+Math.imul(pt,_t)|0,e=e+Math.imul(pt,It)|0,e=e+Math.imul(yt,_t)|0,f=f+Math.imul(yt,It)|0,s=s+Math.imul(V,xt)|0,e=e+Math.imul(V,St)|0,e=e+Math.imul(it,xt)|0,f=f+Math.imul(it,St)|0,s=s+Math.imul(C,kt)|0,e=e+Math.imul(C,At)|0,e=e+Math.imul(K,kt)|0,f=f+Math.imul(K,At)|0,s=s+Math.imul(J,Tt)|0,e=e+Math.imul(J,Pt)|0,e=e+Math.imul(Q,Tt)|0,f=f+Math.imul(Q,Pt)|0,s=s+Math.imul(L,Et)|0,e=e+Math.imul(L,q)|0,e=e+Math.imul(F,Et)|0,f=f+Math.imul(F,q)|0,s=s+Math.imul(G,X)|0,e=e+Math.imul(G,et)|0,e=e+Math.imul(tt,X)|0,f=f+Math.imul(tt,et)|0,s=s+Math.imul(Y,ct)|0,e=e+Math.imul(Y,mt)|0,e=e+Math.imul(H,ct)|0,f=f+Math.imul(H,mt)|0,s=s+Math.imul(U,Rt)|0,e=e+Math.imul(U,qt)|0,e=e+Math.imul(Z,Rt)|0,f=f+Math.imul(Z,qt)|0,s=s+Math.imul(m,Bt)|0,e=e+Math.imul(m,wt)|0,e=e+Math.imul(I,Bt)|0,f=f+Math.imul(I,wt)|0;var ee=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(ee>>>26)|0,ee&=67108863,s=Math.imul(dt,_t),e=Math.imul(dt,It),e=e+Math.imul(bt,_t)|0,f=Math.imul(bt,It),s=s+Math.imul(pt,xt)|0,e=e+Math.imul(pt,St)|0,e=e+Math.imul(yt,xt)|0,f=f+Math.imul(yt,St)|0,s=s+Math.imul(V,kt)|0,e=e+Math.imul(V,At)|0,e=e+Math.imul(it,kt)|0,f=f+Math.imul(it,At)|0,s=s+Math.imul(C,Tt)|0,e=e+Math.imul(C,Pt)|0,e=e+Math.imul(K,Tt)|0,f=f+Math.imul(K,Pt)|0,s=s+Math.imul(J,Et)|0,e=e+Math.imul(J,q)|0,e=e+Math.imul(Q,Et)|0,f=f+Math.imul(Q,q)|0,s=s+Math.imul(L,X)|0,e=e+Math.imul(L,et)|0,e=e+Math.imul(F,X)|0,f=f+Math.imul(F,et)|0,s=s+Math.imul(G,ct)|0,e=e+Math.imul(G,mt)|0,e=e+Math.imul(tt,ct)|0,f=f+Math.imul(tt,mt)|0,s=s+Math.imul(Y,Rt)|0,e=e+Math.imul(Y,qt)|0,e=e+Math.imul(H,Rt)|0,f=f+Math.imul(H,qt)|0,s=s+Math.imul(U,Bt)|0,e=e+Math.imul(U,wt)|0,e=e+Math.imul(Z,Bt)|0,f=f+Math.imul(Z,wt)|0;var re=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(re>>>26)|0,re&=67108863,s=Math.imul(dt,xt),e=Math.imul(dt,St),e=e+Math.imul(bt,xt)|0,f=Math.imul(bt,St),s=s+Math.imul(pt,kt)|0,e=e+Math.imul(pt,At)|0,e=e+Math.imul(yt,kt)|0,f=f+Math.imul(yt,At)|0,s=s+Math.imul(V,Tt)|0,e=e+Math.imul(V,Pt)|0,e=e+Math.imul(it,Tt)|0,f=f+Math.imul(it,Pt)|0,s=s+Math.imul(C,Et)|0,e=e+Math.imul(C,q)|0,e=e+Math.imul(K,Et)|0,f=f+Math.imul(K,q)|0,s=s+Math.imul(J,X)|0,e=e+Math.imul(J,et)|0,e=e+Math.imul(Q,X)|0,f=f+Math.imul(Q,et)|0,s=s+Math.imul(L,ct)|0,e=e+Math.imul(L,mt)|0,e=e+Math.imul(F,ct)|0,f=f+Math.imul(F,mt)|0,s=s+Math.imul(G,Rt)|0,e=e+Math.imul(G,qt)|0,e=e+Math.imul(tt,Rt)|0,f=f+Math.imul(tt,qt)|0,s=s+Math.imul(Y,Bt)|0,e=e+Math.imul(Y,wt)|0,e=e+Math.imul(H,Bt)|0,f=f+Math.imul(H,wt)|0;var ie=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(ie>>>26)|0,ie&=67108863,s=Math.imul(dt,kt),e=Math.imul(dt,At),e=e+Math.imul(bt,kt)|0,f=Math.imul(bt,At),s=s+Math.imul(pt,Tt)|0,e=e+Math.imul(pt,Pt)|0,e=e+Math.imul(yt,Tt)|0,f=f+Math.imul(yt,Pt)|0,s=s+Math.imul(V,Et)|0,e=e+Math.imul(V,q)|0,e=e+Math.imul(it,Et)|0,f=f+Math.imul(it,q)|0,s=s+Math.imul(C,X)|0,e=e+Math.imul(C,et)|0,e=e+Math.imul(K,X)|0,f=f+Math.imul(K,et)|0,s=s+Math.imul(J,ct)|0,e=e+Math.imul(J,mt)|0,e=e+Math.imul(Q,ct)|0,f=f+Math.imul(Q,mt)|0,s=s+Math.imul(L,Rt)|0,e=e+Math.imul(L,qt)|0,e=e+Math.imul(F,Rt)|0,f=f+Math.imul(F,qt)|0,s=s+Math.imul(G,Bt)|0,e=e+Math.imul(G,wt)|0,e=e+Math.imul(tt,Bt)|0,f=f+Math.imul(tt,wt)|0;var ne=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(ne>>>26)|0,ne&=67108863,s=Math.imul(dt,Tt),e=Math.imul(dt,Pt),e=e+Math.imul(bt,Tt)|0,f=Math.imul(bt,Pt),s=s+Math.imul(pt,Et)|0,e=e+Math.imul(pt,q)|0,e=e+Math.imul(yt,Et)|0,f=f+Math.imul(yt,q)|0,s=s+Math.imul(V,X)|0,e=e+Math.imul(V,et)|0,e=e+Math.imul(it,X)|0,f=f+Math.imul(it,et)|0,s=s+Math.imul(C,ct)|0,e=e+Math.imul(C,mt)|0,e=e+Math.imul(K,ct)|0,f=f+Math.imul(K,mt)|0,s=s+Math.imul(J,Rt)|0,e=e+Math.imul(J,qt)|0,e=e+Math.imul(Q,Rt)|0,f=f+Math.imul(Q,qt)|0,s=s+Math.imul(L,Bt)|0,e=e+Math.imul(L,wt)|0,e=e+Math.imul(F,Bt)|0,f=f+Math.imul(F,wt)|0;var oe=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(oe>>>26)|0,oe&=67108863,s=Math.imul(dt,Et),e=Math.imul(dt,q),e=e+Math.imul(bt,Et)|0,f=Math.imul(bt,q),s=s+Math.imul(pt,X)|0,e=e+Math.imul(pt,et)|0,e=e+Math.imul(yt,X)|0,f=f+Math.imul(yt,et)|0,s=s+Math.imul(V,ct)|0,e=e+Math.imul(V,mt)|0,e=e+Math.imul(it,ct)|0,f=f+Math.imul(it,mt)|0,s=s+Math.imul(C,Rt)|0,e=e+Math.imul(C,qt)|0,e=e+Math.imul(K,Rt)|0,f=f+Math.imul(K,qt)|0,s=s+Math.imul(J,Bt)|0,e=e+Math.imul(J,wt)|0,e=e+Math.imul(Q,Bt)|0,f=f+Math.imul(Q,wt)|0;var ae=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(ae>>>26)|0,ae&=67108863,s=Math.imul(dt,X),e=Math.imul(dt,et),e=e+Math.imul(bt,X)|0,f=Math.imul(bt,et),s=s+Math.imul(pt,ct)|0,e=e+Math.imul(pt,mt)|0,e=e+Math.imul(yt,ct)|0,f=f+Math.imul(yt,mt)|0,s=s+Math.imul(V,Rt)|0,e=e+Math.imul(V,qt)|0,e=e+Math.imul(it,Rt)|0,f=f+Math.imul(it,qt)|0,s=s+Math.imul(C,Bt)|0,e=e+Math.imul(C,wt)|0,e=e+Math.imul(K,Bt)|0,f=f+Math.imul(K,wt)|0;var se=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(se>>>26)|0,se&=67108863,s=Math.imul(dt,ct),e=Math.imul(dt,mt),e=e+Math.imul(bt,ct)|0,f=Math.imul(bt,mt),s=s+Math.imul(pt,Rt)|0,e=e+Math.imul(pt,qt)|0,e=e+Math.imul(yt,Rt)|0,f=f+Math.imul(yt,qt)|0,s=s+Math.imul(V,Bt)|0,e=e+Math.imul(V,wt)|0,e=e+Math.imul(it,Bt)|0,f=f+Math.imul(it,wt)|0;var he=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(he>>>26)|0,he&=67108863,s=Math.imul(dt,Rt),e=Math.imul(dt,qt),e=e+Math.imul(bt,Rt)|0,f=Math.imul(bt,qt),s=s+Math.imul(pt,Bt)|0,e=e+Math.imul(pt,wt)|0,e=e+Math.imul(yt,Bt)|0,f=f+Math.imul(yt,wt)|0;var fe=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(fe>>>26)|0,fe&=67108863,s=Math.imul(dt,Bt),e=Math.imul(dt,wt),e=e+Math.imul(bt,Bt)|0,f=Math.imul(bt,wt);var le=(d+s|0)+((e&8191)<<13)|0;if(d=(f+(e>>>13)|0)+(le>>>26)|0,le&=67108863,u[0]=Vt,u[1]=Ut,u[2]=Ct,u[3]=Wt,u[4]=Ht,u[5]=Yt,u[6]=Xt,u[7]=Qt,u[8]=te,u[9]=ee,u[10]=re,u[11]=ie,u[12]=ne,u[13]=oe,u[14]=ae,u[15]=se,u[16]=he,u[17]=fe,u[18]=le,d!==0)u[19]=d,o.length++;return o};if(!Math.imul)B=x;function T(t,i,o){o.negative=i.negative^t.negative,o.length=t.length+i.length;var r=0,n=0;for(var u=0;u<o.length-1;u++){var d=n;n=0;var s=r&67108863,e=Math.min(u,i.length-1);for(var f=Math.max(0,u-t.length+1);f<=e;f++){var _=u-f,m=t.words[_]|0,I=i.words[f]|0,N=m*I,U=N&67108863;d=d+(N/67108864|0)|0,U=U+s|0,s=U&67108863,d=d+(U>>>26)|0,n+=d>>>26,d&=67108863}o.words[u]=s,r=d,d=n}if(r!==0)o.words[u]=r;else o.length--;return o.strip()}function k(t,i,o){var r=new P;return r.mulp(t,i,o)}a.prototype.mulTo=function(t,i){var o,r=this.length+t.length;if(this.length===10&&t.length===10)o=B(this,t,i);else if(r<63)o=x(this,t,i);else if(r<1024)o=T(this,t,i);else o=k(this,t,i);return o};function P(t,i){this.x=t,this.y=i}P.prototype.makeRBT=function(t){var i=Array(t),o=a.prototype._countBits(t)-1;for(var r=0;r<t;r++)i[r]=this.revBin(r,o,t);return i},P.prototype.revBin=function(t,i,o){if(t===0||t===o-1)return t;var r=0;for(var n=0;n<i;n++)r|=(t&1)<<i-n-1,t>>=1;return r},P.prototype.permute=function(t,i,o,r,n,u){for(var d=0;d<u;d++)r[d]=i[t[d]],n[d]=o[t[d]]},P.prototype.transform=function(t,i,o,r,n,u){this.permute(u,t,i,o,r,n);for(var d=1;d<n;d<<=1){var s=d<<1,e=Math.cos(2*Math.PI/s),f=Math.sin(2*Math.PI/s);for(var _=0;_<n;_+=s){var m=e,I=f;for(var N=0;N<d;N++){var U=o[_+N],Z=r[_+N],ut=o[_+N+d],Y=r[_+N+d],H=m*ut-I*Y;if(Y=m*Y+I*ut,ut=H,o[_+N]=U+ut,r[_+N]=Z+Y,o[_+N+d]=U-ut,r[_+N+d]=Z-Y,N!==s)H=e*m-f*I,I=e*I+f*m,m=H}}}},P.prototype.guessLen13b=function(t,i){var o=Math.max(i,t)|1,r=o&1,n=0;for(o=o/2|0;o;o=o>>>1)n++;return 1<<n+1+r},P.prototype.conjugate=function(t,i,o){if(o<=1)return;for(var r=0;r<o/2;r++){var n=t[r];t[r]=t[o-r-1],t[o-r-1]=n,n=i[r],i[r]=-i[o-r-1],i[o-r-1]=-n}},P.prototype.normalize13b=function(t,i){var o=0;for(var r=0;r<i/2;r++){var n=Math.round(t[2*r+1]/i)*8192+Math.round(t[2*r]/i)+o;if(t[r]=n&67108863,n<67108864)o=0;else o=n/67108864|0}return t},P.prototype.convert13b=function(t,i,o,r){var n=0;for(var u=0;u<i;u++)n=n+(t[u]|0),o[2*u]=n&8191,n=n>>>13,o[2*u+1]=n&8191,n=n>>>13;for(u=2*i;u<r;++u)o[u]=0;p(n===0),p((n&-8192)===0)},P.prototype.stub=function(t){var i=Array(t);for(var o=0;o<t;o++)i[o]=0;return i},P.prototype.mulp=function(t,i,o){var r=2*this.guessLen13b(t.length,i.length),n=this.makeRBT(r),u=this.stub(r),d=Array(r),s=Array(r),e=Array(r),f=Array(r),_=Array(r),m=Array(r),I=o.words;I.length=r,this.convert13b(t.words,t.length,d,r),this.convert13b(i.words,i.length,f,r),this.transform(d,u,s,e,r,n),this.transform(f,u,_,m,r,n);for(var N=0;N<r;N++){var U=s[N]*_[N]-e[N]*m[N];e[N]=s[N]*m[N]+e[N]*_[N],s[N]=U}return this.conjugate(s,e,r),this.transform(s,e,I,u,r,n),this.conjugate(I,u,r),this.normalize13b(I,r),o.negative=t.negative^i.negative,o.length=t.length+i.length,o.strip()},a.prototype.mul=function(t){var i=new a(null);return i.words=Array(this.length+t.length),this.mulTo(t,i)},a.prototype.mulf=function(t){var i=new a(null);return i.words=Array(this.length+t.length),k(this,t,i)},a.prototype.imul=function(t){return this.clone().mulTo(t,this)},a.prototype.imuln=function(t){p(typeof t==="number"),p(t<67108864);var i=0;for(var o=0;o<this.length;o++){var r=(this.words[o]|0)*t,n=(r&67108863)+(i&67108863);i>>=26,i+=r/67108864|0,i+=n>>>26,this.words[o]=n&67108863}if(i!==0)this.words[o]=i,this.length++;return this.length=t===0?1:this.length,this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var i=A(t);if(i.length===0)return new a(1);var o=this;for(var r=0;r<i.length;r++,o=o.sqr())if(i[r]!==0)break;if(++r<i.length)for(var n=o.sqr();r<i.length;r++,n=n.sqr()){if(i[r]===0)continue;o=o.mul(n)}return o},a.prototype.iushln=function(t){p(typeof t==="number"&&t>=0);var i=t%26,o=(t-i)/26,r=67108863>>>26-i<<26-i,n;if(i!==0){var u=0;for(n=0;n<this.length;n++){var d=this.words[n]&r,s=(this.words[n]|0)-d<<i;this.words[n]=s|u,u=d>>>26-i}if(u)this.words[n]=u,this.length++}if(o!==0){for(n=this.length-1;n>=0;n--)this.words[n+o]=this.words[n];for(n=0;n<o;n++)this.words[n]=0;this.length+=o}return this.strip()},a.prototype.ishln=function(t){return p(this.negative===0),this.iushln(t)},a.prototype.iushrn=function(t,i,o){p(typeof t==="number"&&t>=0);var r;if(i)r=(i-i%26)/26;else r=0;var n=t%26,u=Math.min((t-n)/26,this.length),d=67108863^67108863>>>n<<n,s=o;if(r-=u,r=Math.max(0,r),s){for(var e=0;e<u;e++)s.words[e]=this.words[e];s.length=u}if(u===0);else if(this.length>u){this.length-=u;for(e=0;e<this.length;e++)this.words[e]=this.words[e+u]}else this.words[0]=0,this.length=1;var f=0;for(e=this.length-1;e>=0&&(f!==0||e>=r);e--){var _=this.words[e]|0;this.words[e]=f<<26-n|_>>>n,f=_&d}if(s&&f!==0)s.words[s.length++]=f;if(this.length===0)this.words[0]=0,this.length=1;return this.strip()},a.prototype.ishrn=function(t,i,o){return p(this.negative===0),this.iushrn(t,i,o)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){p(typeof t==="number"&&t>=0);var i=t%26,o=(t-i)/26,r=1<<i;if(this.length<=o)return!1;var n=this.words[o];return!!(n&r)},a.prototype.imaskn=function(t){p(typeof t==="number"&&t>=0);var i=t%26,o=(t-i)/26;if(p(this.negative===0,"imaskn works only with positive numbers"),this.length<=o)return this;if(i!==0)o++;if(this.length=Math.min(o,this.length),i!==0){var r=67108863^67108863>>>i<<i;this.words[this.length-1]&=r}return this.strip()},a.prototype.maskn=function(t){return this.clone().imaskn(t)},a.prototype.iaddn=function(t){if(p(typeof t==="number"),p(t<67108864),t<0)return this.isubn(-t);if(this.negative!==0){if(this.length===1&&(this.words[0]|0)<t)return this.words[0]=t-(this.words[0]|0),this.negative=0,this;return this.negative=0,this.isubn(t),this.negative=1,this}return this._iaddn(t)},a.prototype._iaddn=function(t){this.words[0]+=t;for(var i=0;i<this.length&&this.words[i]>=67108864;i++)if(this.words[i]-=67108864,i===this.length-1)this.words[i+1]=1;else this.words[i+1]++;return this.length=Math.max(this.length,i+1),this},a.prototype.isubn=function(t){if(p(typeof t==="number"),p(t<67108864),t<0)return this.iaddn(-t);if(this.negative!==0)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var i=0;i<this.length&&this.words[i]<0;i++)this.words[i]+=67108864,this.words[i+1]-=1;return this.strip()},a.prototype.addn=function(t){return this.clone().iaddn(t)},a.prototype.subn=function(t){return this.clone().isubn(t)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(t,i,o){var r=t.length+o,n;this._expand(r);var u,d=0;for(n=0;n<t.length;n++){u=(this.words[n+o]|0)+d;var s=(t.words[n]|0)*i;u-=s&67108863,d=(u>>26)-(s/67108864|0),this.words[n+o]=u&67108863}for(;n<this.length-o;n++)u=(this.words[n+o]|0)+d,d=u>>26,this.words[n+o]=u&67108863;if(d===0)return this.strip();p(d===-1),d=0;for(n=0;n<this.length;n++)u=-(this.words[n]|0)+d,d=u>>26,this.words[n]=u&67108863;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,i){var o=this.length-t.length,r=this.clone(),n=t,u=n.words[n.length-1]|0,d=this._countBits(u);if(o=26-d,o!==0)n=n.ushln(o),r.iushln(o),u=n.words[n.length-1]|0;var s=r.length-n.length,e;if(i!=="mod"){e=new a(null),e.length=s+1,e.words=Array(e.length);for(var f=0;f<e.length;f++)e.words[f]=0}var _=r.clone()._ishlnsubmul(n,1,s);if(_.negative===0){if(r=_,e)e.words[s]=1}for(var m=s-1;m>=0;m--){var I=(r.words[n.length+m]|0)*67108864+(r.words[n.length+m-1]|0);I=Math.min(I/u|0,67108863),r._ishlnsubmul(n,I,m);while(r.negative!==0)if(I--,r.negative=0,r._ishlnsubmul(n,1,m),!r.isZero())r.negative^=1;if(e)e.words[m]=I}if(e)e.strip();if(r.strip(),i!=="div"&&o!==0)r.iushrn(o);return{div:e||null,mod:r}},a.prototype.divmod=function(t,i,o){if(p(!t.isZero()),this.isZero())return{div:new a(0),mod:new a(0)};var r,n,u;if(this.negative!==0&&t.negative===0){if(u=this.neg().divmod(t,i),i!=="mod")r=u.div.neg();if(i!=="div"){if(n=u.mod.neg(),o&&n.negative!==0)n.iadd(t)}return{div:r,mod:n}}if(this.negative===0&&t.negative!==0){if(u=this.divmod(t.neg(),i),i!=="mod")r=u.div.neg();return{div:r,mod:u.mod}}if((this.negative&t.negative)!==0){if(u=this.neg().divmod(t.neg(),i),i!=="div"){if(n=u.mod.neg(),o&&n.negative!==0)n.isub(t)}return{div:u.div,mod:n}}if(t.length>this.length||this.cmp(t)<0)return{div:new a(0),mod:this};if(t.length===1){if(i==="div")return{div:this.divn(t.words[0]),mod:null};if(i==="mod")return{div:null,mod:new a(this.modn(t.words[0]))};return{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}}return this._wordDiv(t,i)},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var i=this.divmod(t);if(i.mod.isZero())return i.div;var o=i.div.negative!==0?i.mod.isub(t):i.mod,r=t.ushrn(1),n=t.andln(1),u=o.cmp(r);if(u<0||n===1&&u===0)return i.div;return i.div.negative!==0?i.div.isubn(1):i.div.iaddn(1)},a.prototype.modn=function(t){p(t<=67108863);var i=67108864%t,o=0;for(var r=this.length-1;r>=0;r--)o=(i*o+(this.words[r]|0))%t;return o},a.prototype.idivn=function(t){p(t<=67108863);var i=0;for(var o=this.length-1;o>=0;o--){var r=(this.words[o]|0)+i*67108864;this.words[o]=r/t|0,i=r%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){p(t.negative===0),p(!t.isZero());var i=this,o=t.clone();if(i.negative!==0)i=i.umod(t);else i=i.clone();var r=new a(1),n=new a(0),u=new a(0),d=new a(1),s=0;while(i.isEven()&&o.isEven())i.iushrn(1),o.iushrn(1),++s;var e=o.clone(),f=i.clone();while(!i.isZero()){for(var _=0,m=1;(i.words[0]&m)===0&&_<26;++_,m<<=1);if(_>0){i.iushrn(_);while(_-- >0){if(r.isOdd()||n.isOdd())r.iadd(e),n.isub(f);r.iushrn(1),n.iushrn(1)}}for(var I=0,N=1;(o.words[0]&N)===0&&I<26;++I,N<<=1);if(I>0){o.iushrn(I);while(I-- >0){if(u.isOdd()||d.isOdd())u.iadd(e),d.isub(f);u.iushrn(1),d.iushrn(1)}}if(i.cmp(o)>=0)i.isub(o),r.isub(u),n.isub(d);else o.isub(i),u.isub(r),d.isub(n)}return{a:u,b:d,gcd:o.iushln(s)}},a.prototype._invmp=function(t){p(t.negative===0),p(!t.isZero());var i=this,o=t.clone();if(i.negative!==0)i=i.umod(t);else i=i.clone();var r=new a(1),n=new a(0),u=o.clone();while(i.cmpn(1)>0&&o.cmpn(1)>0){for(var d=0,s=1;(i.words[0]&s)===0&&d<26;++d,s<<=1);if(d>0){i.iushrn(d);while(d-- >0){if(r.isOdd())r.iadd(u);r.iushrn(1)}}for(var e=0,f=1;(o.words[0]&f)===0&&e<26;++e,f<<=1);if(e>0){o.iushrn(e);while(e-- >0){if(n.isOdd())n.iadd(u);n.iushrn(1)}}if(i.cmp(o)>=0)i.isub(o),r.isub(n);else o.isub(i),n.isub(r)}var _;if(i.cmpn(1)===0)_=r;else _=n;if(_.cmpn(0)<0)_.iadd(t);return _},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var i=this.clone(),o=t.clone();i.negative=0,o.negative=0;for(var r=0;i.isEven()&&o.isEven();r++)i.iushrn(1),o.iushrn(1);do{while(i.isEven())i.iushrn(1);while(o.isEven())o.iushrn(1);var n=i.cmp(o);if(n<0){var u=i;i=o,o=u}else if(n===0||o.cmpn(1)===0)break;i.isub(o)}while(!0);return o.iushln(r)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return(this.words[0]&1)===0},a.prototype.isOdd=function(){return(this.words[0]&1)===1},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){p(typeof t==="number");var i=t%26,o=(t-i)/26,r=1<<i;if(this.length<=o)return this._expand(o+1),this.words[o]|=r,this;var n=r;for(var u=o;n!==0&&u<this.length;u++){var d=this.words[u]|0;d+=n,n=d>>>26,d&=67108863,this.words[u]=d}if(n!==0)this.words[u]=n,this.length++;return this},a.prototype.isZero=function(){return this.length===1&&this.words[0]===0},a.prototype.cmpn=function(t){var i=t<0;if(this.negative!==0&&!i)return-1;if(this.negative===0&&i)return 1;this.strip();var o;if(this.length>1)o=1;else{if(i)t=-t;p(t<=67108863,"Number is too big");var r=this.words[0]|0;o=r===t?0:r<t?-1:1}if(this.negative!==0)return-o|0;return o},a.prototype.cmp=function(t){if(this.negative!==0&&t.negative===0)return-1;if(this.negative===0&&t.negative!==0)return 1;var i=this.ucmp(t);if(this.negative!==0)return-i|0;return i},a.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;var i=0;for(var o=this.length-1;o>=0;o--){var r=this.words[o]|0,n=t.words[o]|0;if(r===n)continue;if(r<n)i=-1;else if(r>n)i=1;break}return i},a.prototype.gtn=function(t){return this.cmpn(t)===1},a.prototype.gt=function(t){return this.cmp(t)===1},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return this.cmpn(t)===-1},a.prototype.lt=function(t){return this.cmp(t)===-1},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return this.cmpn(t)===0},a.prototype.eq=function(t){return this.cmp(t)===0},a.red=function(t){return new j(t)},a.prototype.toRed=function(t){return p(!this.red,"Already a number in reduction context"),p(this.negative===0,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return p(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return p(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return p(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return p(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return p(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return p(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return p(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return p(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return p(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return p(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return p(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return p(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return p(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var D={k256:null,p224:null,p192:null,p25519:null};function O(t,i){this.name=t,this.p=new a(i,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}O.prototype._tmp=function(){var t=new a(null);return t.words=Array(Math.ceil(this.n/13)),t},O.prototype.ireduce=function(t){var i=t,o;do this.split(i,this.tmp),i=this.imulK(i),i=i.iadd(this.tmp),o=i.bitLength();while(o>this.n);var r=o<this.n?-1:i.ucmp(this.p);if(r===0)i.words[0]=0,i.length=1;else if(r>0)i.isub(this.p);else if(i.strip!==void 0)i.strip();else i._strip();return i},O.prototype.split=function(t,i){t.iushrn(this.n,0,i)},O.prototype.imulK=function(t){return t.imul(this.k)};function W(){O.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}M(W,O),W.prototype.split=function(t,i){var o=4194303,r=Math.min(t.length,9);for(var n=0;n<r;n++)i.words[n]=t.words[n];if(i.length=r,t.length<=9){t.words[0]=0,t.length=1;return}var u=t.words[9];i.words[i.length++]=u&o;for(n=10;n<t.length;n++){var d=t.words[n]|0;t.words[n-10]=(d&o)<<4|u>>>22,u=d}if(u>>>=22,t.words[n-10]=u,u===0&&t.length>10)t.length-=10;else t.length-=9},W.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;var i=0;for(var o=0;o<t.length;o++){var r=t.words[o]|0;i+=r*977,t.words[o]=i&67108863,i=r*64+(i/67108864|0)}if(t.words[t.length-1]===0){if(t.length--,t.words[t.length-1]===0)t.length--}return t};function at(){O.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}M(at,O);function ft(){O.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}M(ft,O);function st(){O.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}M(st,O),st.prototype.imulK=function(t){var i=0;for(var o=0;o<t.length;o++){var r=(t.words[o]|0)*19+i,n=r&67108863;r>>>=26,t.words[o]=n,i=r}if(i!==0)t.words[t.length++]=i;return t},a._prime=function(t){if(D[t])return D[t];var i;if(t==="k256")i=new W;else if(t==="p224")i=new at;else if(t==="p192")i=new ft;else if(t==="p25519")i=new st;else throw Error("Unknown prime "+t);return D[t]=i,i};function j(t){if(typeof t==="string"){var i=a._prime(t);this.m=i.p,this.prime=i}else p(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}j.prototype._verify1=function(t){p(t.negative===0,"red works only with positives"),p(t.red,"red works only with red numbers")},j.prototype._verify2=function(t,i){p((t.negative|i.negative)===0,"red works only with positives"),p(t.red&&t.red===i.red,"red works only with red numbers")},j.prototype.imod=function(t){if(this.prime)return this.prime.ireduce(t)._forceRed(this);return t.umod(this.m)._forceRed(this)},j.prototype.neg=function(t){if(t.isZero())return t.clone();return this.m.sub(t)._forceRed(this)},j.prototype.add=function(t,i){this._verify2(t,i);var o=t.add(i);if(o.cmp(this.m)>=0)o.isub(this.m);return o._forceRed(this)},j.prototype.iadd=function(t,i){this._verify2(t,i);var o=t.iadd(i);if(o.cmp(this.m)>=0)o.isub(this.m);return o},j.prototype.sub=function(t,i){this._verify2(t,i);var o=t.sub(i);if(o.cmpn(0)<0)o.iadd(this.m);return o._forceRed(this)},j.prototype.isub=function(t,i){this._verify2(t,i);var o=t.isub(i);if(o.cmpn(0)<0)o.iadd(this.m);return o},j.prototype.shl=function(t,i){return this._verify1(t),this.imod(t.ushln(i))},j.prototype.imul=function(t,i){return this._verify2(t,i),this.imod(t.imul(i))},j.prototype.mul=function(t,i){return this._verify2(t,i),this.imod(t.mul(i))},j.prototype.isqr=function(t){return this.imul(t,t.clone())},j.prototype.sqr=function(t){return this.mul(t,t)},j.prototype.sqrt=function(t){if(t.isZero())return t.clone();var i=this.m.andln(3);if(p(i%2===1),i===3){var o=this.m.add(new a(1)).iushrn(2);return this.pow(t,o)}var r=this.m.subn(1),n=0;while(!r.isZero()&&r.andln(1)===0)n++,r.iushrn(1);p(!r.isZero());var u=new a(1).toRed(this),d=u.redNeg(),s=this.m.subn(1).iushrn(1),e=this.m.bitLength();e=new a(2*e*e).toRed(this);while(this.pow(e,s).cmp(d)!==0)e.redIAdd(d);var f=this.pow(e,r),_=this.pow(t,r.addn(1).iushrn(1)),m=this.pow(t,r),I=n;while(m.cmp(u)!==0){var N=m;for(var U=0;N.cmp(u)!==0;U++)N=N.redSqr();p(U<I);var Z=this.pow(f,new a(1).iushln(I-U-1));_=_.redMul(Z),f=Z.redSqr(),m=m.redMul(f),I=U}return _},j.prototype.invm=function(t){var i=t._invmp(this.m);if(i.negative!==0)return i.negative=0,this.imod(i).redNeg();else return this.imod(i)},j.prototype.pow=function(t,i){if(i.isZero())return new a(1).toRed(this);if(i.cmpn(1)===0)return t.clone();var o=4,r=Array(1<<o);r[0]=new a(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var u=r[0],d=0,s=0,e=i.bitLength()%26;if(e===0)e=26;for(n=i.length-1;n>=0;n--){var f=i.words[n];for(var _=e-1;_>=0;_--){var m=f>>_&1;if(u!==r[0])u=this.sqr(u);if(m===0&&d===0){s=0;continue}if(d<<=1,d|=m,s++,s!==o&&(n!==0||_!==0))continue;u=this.mul(u,r[d]),s=0,d=0}e=26}return u},j.prototype.convertTo=function(t){var i=t.umod(this.m);return i===t?i.clone():i},j.prototype.convertFrom=function(t){var i=t.clone();return i.red=null,i},a.mont=function(t){return new rt(t)};function rt(t){if(j.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0)this.shift+=26-this.shift%26;this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}M(rt,j),rt.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},rt.prototype.convertFrom=function(t){var i=this.imod(t.mul(this.rinv));return i.red=null,i},rt.prototype.imul=function(t,i){if(t.isZero()||i.isZero())return t.words[0]=0,t.length=1,t;var o=t.imul(i),r=o.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=o.isub(r).iushrn(this.shift),u=n;if(n.cmp(this.m)>=0)u=n.isub(this.m);else if(n.cmpn(0)<0)u=n.iadd(this.m);return u._forceRed(this)},rt.prototype.mul=function(t,i){if(t.isZero()||i.isZero())return new a(0)._forceRed(this);var o=t.mul(i),r=o.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=o.isub(r).iushrn(this.shift),u=n;if(n.cmp(this.m)>=0)u=n.isub(this.m);else if(n.cmpn(0)<0)u=n.iadd(this.m);return u._forceRed(this)},rt.prototype.invm=function(t){var i=this.imod(t._invmp(this.m).mul(this.r2));return i._forceRed(this)}})(typeof l>"u"||l,h)}),Ue=ht((h,l)=>{l.exports=c;function c(b,p){if(!b)throw Error(p||"Assertion failed")}c.equal=function(b,p,M){if(b!=p)throw Error(M||"Assertion failed: "+b+" != "+p)}}),Tn=ht((h)=>{var l=h;function c(M,a){if(Array.isArray(M))return M.slice();if(!M)return[];var E=[];if(typeof M!=="string"){for(var R=0;R<M.length;R++)E[R]=M[R]|0;return E}if(a==="hex"){if(M=M.replace(/[^a-z0-9]+/ig,""),M.length%2!==0)M="0"+M;for(var R=0;R<M.length;R+=2)E.push(parseInt(M[R]+M[R+1],16))}else for(var R=0;R<M.length;R++){var w=M.charCodeAt(R),g=w>>8,y=w&255;if(g)E.push(g,y);else E.push(y)}return E}l.toArray=c;function b(M){if(M.length===1)return"0"+M;else return M}l.zero2=b;function p(M){var a="";for(var E=0;E<M.length;E++)a+=b(M[E].toString(16));return a}l.toHex=p,l.encode=function(M,a){if(a==="hex")return p(M);else return M}}),Ie=ht((h)=>{var l=h,c=De(),b=Ue(),p=Tn();l.assert=b,l.toArray=p.toArray,l.zero2=p.zero2,l.toHex=p.toHex,l.encode=p.encode;function M(g,y,v){var S=Array(Math.max(g.bitLength(),v)+1),A;for(A=0;A<S.length;A+=1)S[A]=0;var x=1<<y+1,B=g.clone();for(A=0;A<S.length;A++){var T,k=B.andln(x-1);if(B.isOdd()){if(k>(x>>1)-1)T=(x>>1)-k;else T=k;B.isubn(T)}else T=0;S[A]=T,B.iushrn(1)}return S}l.getNAF=M;function a(g,y){var v=[[],[]];g=g.clone(),y=y.clone();var S=0,A=0,x;while(g.cmpn(-S)>0||y.cmpn(-A)>0){var B=g.andln(3)+S&3,T=y.andln(3)+A&3;if(B===3)B=-1;if(T===3)T=-1;var k;if((B&1)===0)k=0;else if(x=g.andln(7)+S&7,(x===3||x===5)&&T===2)k=-B;else k=B;v[0].push(k);var P;if((T&1)===0)P=0;else if(x=y.andln(7)+A&7,(x===3||x===5)&&B===2)P=-T;else P=T;if(v[1].push(P),2*S===k+1)S=1-S;if(2*A===P+1)A=1-A;g.iushrn(1),y.iushrn(1)}return v}l.getJSF=a;function E(g,y,v){var S="_"+y;g.prototype[y]=function(){return this[S]!==void 0?this[S]:this[S]=v.call(this)}}l.cachedProperty=E;function R(g){return typeof g==="string"?l.toArray(g,"hex"):g}l.parseBytes=R;function w(g){return new c(g,"hex","le")}l.intFromLE=w}),Pn=ht((h,l)=>{var c;l.exports=function(M){if(!c)c=new b(null);return c.generate(M)};function b(M){this.rand=M}if(l.exports.Rand=b,b.prototype.generate=function(M){return this._rand(M)},b.prototype._rand=function(M){if(this.rand.getBytes)return this.rand.getBytes(M);var a=new Uint8Array(M);for(var E=0;E<a.length;E++)a[E]=this.rand.getByte();return a},typeof self==="object"){if(self.crypto&&self.crypto.getRandomValues)b.prototype._rand=function(M){var a=new Uint8Array(M);return self.crypto.getRandomValues(a),a};else if(self.msCrypto&&self.msCrypto.getRandomValues)b.prototype._rand=function(M){var a=new Uint8Array(M);return self.msCrypto.getRandomValues(a),a};else if(typeof window==="object")b.prototype._rand=function(){throw Error("Not implemented yet")}}else try{if(p=(Ae(),jt(Re)),typeof p.randomBytes!=="function")throw Error("Not supported");b.prototype._rand=function(M){return p.randomBytes(M)}}catch(M){}var p}),Br=ht((h,l)=>{var c=De(),b=Ie(),p=b.getNAF,M=b.getJSF,a=b.assert;function E(w,g){this.type=w,this.p=new c(g.p,16),this.red=g.prime?c.red(g.prime):c.mont(this.p),this.zero=new c(0).toRed(this.red),this.one=new c(1).toRed(this.red),this.two=new c(2).toRed(this.red),this.n=g.n&&new c(g.n,16),this.g=g.g&&this.pointFromJSON(g.g,g.gRed),this._wnafT1=[,,,,],this._wnafT2=[,,,,],this._wnafT3=[,,,,],this._wnafT4=[,,,,],this._bitLength=this.n?this.n.bitLength():0;var y=this.n&&this.p.div(this.n);if(!y||y.cmpn(100)>0)this.redN=null;else this._maxwellTrick=!0,this.redN=this.n.toRed(this.red)}l.exports=E,E.prototype.point=function(){throw Error("Not implemented")},E.prototype.validate=function(){throw Error("Not implemented")},E.prototype._fixedNafMul=function(w,g){a(w.precomputed);var y=w._getDoubles(),v=p(g,1,this._bitLength),S=(1<<y.step+1)-(y.step%2===0?2:1);S/=3;var A=[],x,B;for(x=0;x<v.length;x+=y.step){B=0;for(var T=x+y.step-1;T>=x;T--)B=(B<<1)+v[T];A.push(B)}var k=this.jpoint(null,null,null),P=this.jpoint(null,null,null);for(var D=S;D>0;D--){for(x=0;x<A.length;x++)if(B=A[x],B===D)P=P.mixedAdd(y.points[x]);else if(B===-D)P=P.mixedAdd(y.points[x].neg());k=k.add(P)}return k.toP()},E.prototype._wnafMul=function(w,g){var y=4,v=w._getNAFPoints(y);y=v.wnd;var S=v.points,A=p(g,y,this._bitLength),x=this.jpoint(null,null,null);for(var B=A.length-1;B>=0;B--){for(var T=0;B>=0&&A[B]===0;B--)T++;if(B>=0)T++;if(x=x.dblp(T),B<0)break;var k=A[B];if(a(k!==0),w.type==="affine")if(k>0)x=x.mixedAdd(S[k-1>>1]);else x=x.mixedAdd(S[-k-1>>1].neg());else if(k>0)x=x.add(S[k-1>>1]);else x=x.add(S[-k-1>>1].neg())}return w.type==="affine"?x.toP():x},E.prototype._wnafMulAdd=function(w,g,y,v,S){var A=this._wnafT1,x=this._wnafT2,B=this._wnafT3,T=0,k,P,D;for(k=0;k<v;k++){D=g[k];var O=D._getNAFPoints(w);A[k]=O.wnd,x[k]=O.points}for(k=v-1;k>=1;k-=2){var W=k-1,at=k;if(A[W]!==1||A[at]!==1){B[W]=p(y[W],A[W],this._bitLength),B[at]=p(y[at],A[at],this._bitLength),T=Math.max(B[W].length,T),T=Math.max(B[at].length,T);continue}var ft=[g[W],null,null,g[at]];if(g[W].y.cmp(g[at].y)===0)ft[1]=g[W].add(g[at]),ft[2]=g[W].toJ().mixedAdd(g[at].neg());else if(g[W].y.cmp(g[at].y.redNeg())===0)ft[1]=g[W].toJ().mixedAdd(g[at]),ft[2]=g[W].add(g[at].neg());else ft[1]=g[W].toJ().mixedAdd(g[at]),ft[2]=g[W].toJ().mixedAdd(g[at].neg());var st=[-3,-1,-5,-7,0,7,5,1,3],j=M(y[W],y[at]);T=Math.max(j[0].length,T),B[W]=Array(T),B[at]=Array(T);for(P=0;P<T;P++){var rt=j[0][P]|0,t=j[1][P]|0;B[W][P]=st[(rt+1)*3+(t+1)],B[at][P]=0,x[W]=ft}}var i=this.jpoint(null,null,null),o=this._wnafT4;for(k=T;k>=0;k--){var r=0;while(k>=0){var n=!0;for(P=0;P<v;P++)if(o[P]=B[P][k]|0,o[P]!==0)n=!1;if(!n)break;r++,k--}if(k>=0)r++;if(i=i.dblp(r),k<0)break;for(P=0;P<v;P++){var u=o[P];if(u===0)continue;else if(u>0)D=x[P][u-1>>1];else if(u<0)D=x[P][-u-1>>1].neg();if(D.type==="affine")i=i.mixedAdd(D);else i=i.add(D)}}for(k=0;k<v;k++)x[k]=null;if(S)return i;else return i.toP()};function R(w,g){this.curve=w,this.type=g,this.precomputed=null}E.BasePoint=R,R.prototype.eq=function(){throw Error("Not implemented")},R.prototype.validate=function(){return this.curve.validate(this)},E.prototype.decodePoint=function(w,g){w=b.toArray(w,g);var y=this.p.byteLength();if((w[0]===4||w[0]===6||w[0]===7)&&w.length-1===2*y){if(w[0]===6)a(w[w.length-1]%2===0);else if(w[0]===7)a(w[w.length-1]%2===1);var v=this.point(w.slice(1,1+y),w.slice(1+y,1+2*y));return v}else if((w[0]===2||w[0]===3)&&w.length-1===y)return this.pointFromX(w.slice(1,1+y),w[0]===3);throw Error("Unknown point format")},R.prototype.encodeCompressed=function(w){return this.encode(w,!0)},R.prototype._encode=function(w){var g=this.curve.p.byteLength(),y=this.getX().toArray("be",g);if(w)return[this.getY().isEven()?2:3].concat(y);return[4].concat(y,this.getY().toArray("be",g))},R.prototype.encode=function(w,g){return b.encode(this._encode(g),w)},R.prototype.precompute=function(w){if(this.precomputed)return this;var g={doubles:null,naf:null,beta:null};return g.naf=this._getNAFPoints(8),g.doubles=this._getDoubles(4,w),g.beta=this._getBeta(),this.precomputed=g,this},R.prototype._hasDoubles=function(w){if(!this.precomputed)return!1;var g=this.precomputed.doubles;if(!g)return!1;return g.points.length>=Math.ceil((w.bitLength()+1)/g.step)},R.prototype._getDoubles=function(w,g){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;var y=[this],v=this;for(var S=0;S<g;S+=w){for(var A=0;A<w;A++)v=v.dbl();y.push(v)}return{step:w,points:y}},R.prototype._getNAFPoints=function(w){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;var g=[this],y=(1<<w)-1,v=y===1?null:this.dbl();for(var S=1;S<y;S++)g[S]=g[S-1].add(v);return{wnd:w,points:g}},R.prototype._getBeta=function(){return null},R.prototype.dblp=function(w){var g=this;for(var y=0;y<w;y++)g=g.dbl();return g}}),ys=ht((h,l)=>{if(typeof Object.create==="function")l.exports=function(c,b){if(b)c.super_=b,c.prototype=Object.create(b.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}})};else l.exports=function(c,b){if(b){c.super_=b;var p=function(){};p.prototype=b.prototype,c.prototype=new p,c.prototype.constructor=c}}}),Ee=ht((h,l)=>{try{if(c=(Ki(),jt($i)),typeof c.inherits!=="function")throw"";l.exports=c.inherits}catch(b){l.exports=ys()}var c}),bs=ht((h,l)=>{var c=Ie(),b=De(),p=Ee(),M=Br(),a=c.assert;function E(g){M.call(this,"short",g),this.a=new b(g.a,16).toRed(this.red),this.b=new b(g.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(g),this._endoWnafT1=[,,,,],this._endoWnafT2=[,,,,]}p(E,M),l.exports=E,E.prototype._getEndomorphism=function(g){if(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)return;var y,v;if(g.beta)y=new b(g.beta,16).toRed(this.red);else{var S=this._getEndoRoots(this.p);y=S[0].cmp(S[1])<0?S[0]:S[1],y=y.toRed(this.red)}if(g.lambda)v=new b(g.lambda,16);else{var A=this._getEndoRoots(this.n);if(this.g.mul(A[0]).x.cmp(this.g.x.redMul(y))===0)v=A[0];else v=A[1],a(this.g.mul(v).x.cmp(this.g.x.redMul(y))===0)}var x;if(g.basis)x=g.basis.map(function(B){return{a:new b(B.a,16),b:new b(B.b,16)}});else x=this._getEndoBasis(v);return{beta:y,lambda:v,basis:x}},E.prototype._getEndoRoots=function(g){var y=g===this.p?this.red:b.mont(g),v=new b(2).toRed(y).redInvm(),S=v.redNeg(),A=new b(3).toRed(y).redNeg().redSqrt().redMul(v),x=S.redAdd(A).fromRed(),B=S.redSub(A).fromRed();return[x,B]},E.prototype._getEndoBasis=function(g){var y=this.n.ushrn(Math.floor(this.n.bitLength()/2)),v=g,S=this.n.clone(),A=new b(1),x=new b(0),B=new b(0),T=new b(1),k,P,D,O,W,at,ft,st=0,j,rt;while(v.cmpn(0)!==0){var t=S.div(v);j=S.sub(t.mul(v)),rt=B.sub(t.mul(A));var i=T.sub(t.mul(x));if(!D&&j.cmp(y)<0)k=ft.neg(),P=A,D=j.neg(),O=rt;else if(D&&++st===2)break;ft=j,S=v,v=j,B=A,A=rt,T=x,x=i}W=j.neg(),at=rt;var o=D.sqr().add(O.sqr()),r=W.sqr().add(at.sqr());if(r.cmp(o)>=0)W=k,at=P;if(D.negative)D=D.neg(),O=O.neg();if(W.negative)W=W.neg(),at=at.neg();return[{a:D,b:O},{a:W,b:at}]},E.prototype._endoSplit=function(g){var y=this.endo.basis,v=y[0],S=y[1],A=S.b.mul(g).divRound(this.n),x=v.b.neg().mul(g).divRound(this.n),B=A.mul(v.a),T=x.mul(S.a),k=A.mul(v.b),P=x.mul(S.b),D=g.sub(B).sub(T),O=k.add(P).neg();return{k1:D,k2:O}},E.prototype.pointFromX=function(g,y){if(g=new b(g,16),!g.red)g=g.toRed(this.red);var v=g.redSqr().redMul(g).redIAdd(g.redMul(this.a)).redIAdd(this.b),S=v.redSqrt();if(S.redSqr().redSub(v).cmp(this.zero)!==0)throw Error("invalid point");var A=S.fromRed().isOdd();if(y&&!A||!y&&A)S=S.redNeg();return this.point(g,S)},E.prototype.validate=function(g){if(g.inf)return!0;var{x:y,y:v}=g,S=this.a.redMul(y),A=y.redSqr().redMul(y).redIAdd(S).redIAdd(this.b);return v.redSqr().redISub(A).cmpn(0)===0},E.prototype._endoWnafMulAdd=function(g,y,v){var S=this._endoWnafT1,A=this._endoWnafT2;for(var x=0;x<g.length;x++){var B=this._endoSplit(y[x]),T=g[x],k=T._getBeta();if(B.k1.negative)B.k1.ineg(),T=T.neg(!0);if(B.k2.negative)B.k2.ineg(),k=k.neg(!0);S[x*2]=T,S[x*2+1]=k,A[x*2]=B.k1,A[x*2+1]=B.k2}var P=this._wnafMulAdd(1,S,A,x*2,v);for(var D=0;D<x*2;D++)S[D]=null,A[D]=null;return P};function R(g,y,v,S){if(M.BasePoint.call(this,g,"affine"),y===null&&v===null)this.x=null,this.y=null,this.inf=!0;else{if(this.x=new b(y,16),this.y=new b(v,16),S)this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red);if(!this.x.red)this.x=this.x.toRed(this.curve.red);if(!this.y.red)this.y=this.y.toRed(this.curve.red);this.inf=!1}}p(R,M.BasePoint),E.prototype.point=function(g,y,v){return new R(this,g,y,v)},E.prototype.pointFromJSON=function(g,y){return R.fromJSON(this,g,y)},R.prototype._getBeta=function(){if(!this.curve.endo)return;var g=this.precomputed;if(g&&g.beta)return g.beta;var y=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(g){var v=this.curve,S=function(A){return v.point(A.x.redMul(v.endo.beta),A.y)};g.beta=y,y.precomputed={beta:null,naf:g.naf&&{wnd:g.naf.wnd,points:g.naf.points.map(S)},doubles:g.doubles&&{step:g.doubles.step,points:g.doubles.points.map(S)}}}return y},R.prototype.toJSON=function(){if(!this.precomputed)return[this.x,this.y];return[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]},R.fromJSON=function(g,y,v){if(typeof y==="string")y=JSON.parse(y);var S=g.point(y[0],y[1],v);if(!y[2])return S;function A(B){return g.point(B[0],B[1],v)}var x=y[2];return S.precomputed={beta:null,doubles:x.doubles&&{step:x.doubles.step,points:[S].concat(x.doubles.points.map(A))},naf:x.naf&&{wnd:x.naf.wnd,points:[S].concat(x.naf.points.map(A))}},S},R.prototype.inspect=function(){if(this.isInfinity())return"<EC Point Infinity>";return"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},R.prototype.isInfinity=function(){return this.inf},R.prototype.add=function(g){if(this.inf)return g;if(g.inf)return this;if(this.eq(g))return this.dbl();if(this.neg().eq(g))return this.curve.point(null,null);if(this.x.cmp(g.x)===0)return this.curve.point(null,null);var y=this.y.redSub(g.y);if(y.cmpn(0)!==0)y=y.redMul(this.x.redSub(g.x).redInvm());var v=y.redSqr().redISub(this.x).redISub(g.x),S=y.redMul(this.x.redSub(v)).redISub(this.y);return this.curve.point(v,S)},R.prototype.dbl=function(){if(this.inf)return this;var g=this.y.redAdd(this.y);if(g.cmpn(0)===0)return this.curve.point(null,null);var y=this.curve.a,v=this.x.redSqr(),S=g.redInvm(),A=v.redAdd(v).redIAdd(v).redIAdd(y).redMul(S),x=A.redSqr().redISub(this.x.redAdd(this.x)),B=A.redMul(this.x.redSub(x)).redISub(this.y);return this.curve.point(x,B)},R.prototype.getX=function(){return this.x.fromRed()},R.prototype.getY=function(){return this.y.fromRed()},R.prototype.mul=function(g){if(g=new b(g,16),this.isInfinity())return this;else if(this._hasDoubles(g))return this.curve._fixedNafMul(this,g);else if(this.curve.endo)return this.curve._endoWnafMulAdd([this],[g]);else return this.curve._wnafMul(this,g)},R.prototype.mulAdd=function(g,y,v){var S=[this,y],A=[g,v];if(this.curve.endo)return this.curve._endoWnafMulAdd(S,A);else return this.curve._wnafMulAdd(1,S,A,2)},R.prototype.jmulAdd=function(g,y,v){var S=[this,y],A=[g,v];if(this.curve.endo)return this.curve._endoWnafMulAdd(S,A,!0);else return this.curve._wnafMulAdd(1,S,A,2,!0)},R.prototype.eq=function(g){return this===g||this.inf===g.inf&&(this.inf||this.x.cmp(g.x)===0&&this.y.cmp(g.y)===0)},R.prototype.neg=function(g){if(this.inf)return this;var y=this.curve.point(this.x,this.y.redNeg());if(g&&this.precomputed){var v=this.precomputed,S=function(A){return A.neg()};y.precomputed={naf:v.naf&&{wnd:v.naf.wnd,points:v.naf.points.map(S)},doubles:v.doubles&&{step:v.doubles.step,points:v.doubles.points.map(S)}}}return y},R.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var g=this.curve.jpoint(this.x,this.y,this.curve.one);return g};function w(g,y,v,S){if(M.BasePoint.call(this,g,"jacobian"),y===null&&v===null&&S===null)this.x=this.curve.one,this.y=this.curve.one,this.z=new b(0);else this.x=new b(y,16),this.y=new b(v,16),this.z=new b(S,16);if(!this.x.red)this.x=this.x.toRed(this.curve.red);if(!this.y.red)this.y=this.y.toRed(this.curve.red);if(!this.z.red)this.z=this.z.toRed(this.curve.red);this.zOne=this.z===this.curve.one}p(w,M.BasePoint),E.prototype.jpoint=function(g,y,v){return new w(this,g,y,v)},w.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var g=this.z.redInvm(),y=g.redSqr(),v=this.x.redMul(y),S=this.y.redMul(y).redMul(g);return this.curve.point(v,S)},w.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},w.prototype.add=function(g){if(this.isInfinity())return g;if(g.isInfinity())return this;var y=g.z.redSqr(),v=this.z.redSqr(),S=this.x.redMul(y),A=g.x.redMul(v),x=this.y.redMul(y.redMul(g.z)),B=g.y.redMul(v.redMul(this.z)),T=S.redSub(A),k=x.redSub(B);if(T.cmpn(0)===0)if(k.cmpn(0)!==0)return this.curve.jpoint(null,null,null);else return this.dbl();var P=T.redSqr(),D=P.redMul(T),O=S.redMul(P),W=k.redSqr().redIAdd(D).redISub(O).redISub(O),at=k.redMul(O.redISub(W)).redISub(x.redMul(D)),ft=this.z.redMul(g.z).redMul(T);return this.curve.jpoint(W,at,ft)},w.prototype.mixedAdd=function(g){if(this.isInfinity())return g.toJ();if(g.isInfinity())return this;var y=this.z.redSqr(),v=this.x,S=g.x.redMul(y),A=this.y,x=g.y.redMul(y).redMul(this.z),B=v.redSub(S),T=A.redSub(x);if(B.cmpn(0)===0)if(T.cmpn(0)!==0)return this.curve.jpoint(null,null,null);else return this.dbl();var k=B.redSqr(),P=k.redMul(B),D=v.redMul(k),O=T.redSqr().redIAdd(P).redISub(D).redISub(D),W=T.redMul(D.redISub(O)).redISub(A.redMul(P)),at=this.z.redMul(B);return this.curve.jpoint(O,W,at)},w.prototype.dblp=function(g){if(g===0)return this;if(this.isInfinity())return this;if(!g)return this.dbl();var y;if(this.curve.zeroA||this.curve.threeA){var v=this;for(y=0;y<g;y++)v=v.dbl();return v}var S=this.curve.a,A=this.curve.tinv,x=this.x,B=this.y,T=this.z,k=T.redSqr().redSqr(),P=B.redAdd(B);for(y=0;y<g;y++){var D=x.redSqr(),O=P.redSqr(),W=O.redSqr(),at=D.redAdd(D).redIAdd(D).redIAdd(S.redMul(k)),ft=x.redMul(O),st=at.redSqr().redISub(ft.redAdd(ft)),j=ft.redISub(st),rt=at.redMul(j);rt=rt.redIAdd(rt).redISub(W);var t=P.redMul(T);if(y+1<g)k=k.redMul(W);x=st,T=t,P=rt}return this.curve.jpoint(x,P.redMul(A),T)},w.prototype.dbl=function(){if(this.isInfinity())return this;if(this.curve.zeroA)return this._zeroDbl();else if(this.curve.threeA)return this._threeDbl();else return this._dbl()},w.prototype._zeroDbl=function(){var g,y,v;if(this.zOne){var S=this.x.redSqr(),A=this.y.redSqr(),x=A.redSqr(),B=this.x.redAdd(A).redSqr().redISub(S).redISub(x);B=B.redIAdd(B);var T=S.redAdd(S).redIAdd(S),k=T.redSqr().redISub(B).redISub(B),P=x.redIAdd(x);P=P.redIAdd(P),P=P.redIAdd(P),g=k,y=T.redMul(B.redISub(k)).redISub(P),v=this.y.redAdd(this.y)}else{var D=this.x.redSqr(),O=this.y.redSqr(),W=O.redSqr(),at=this.x.redAdd(O).redSqr().redISub(D).redISub(W);at=at.redIAdd(at);var ft=D.redAdd(D).redIAdd(D),st=ft.redSqr(),j=W.redIAdd(W);j=j.redIAdd(j),j=j.redIAdd(j),g=st.redISub(at).redISub(at),y=ft.redMul(at.redISub(g)).redISub(j),v=this.y.redMul(this.z),v=v.redIAdd(v)}return this.curve.jpoint(g,y,v)},w.prototype._threeDbl=function(){var g,y,v;if(this.zOne){var S=this.x.redSqr(),A=this.y.redSqr(),x=A.redSqr(),B=this.x.redAdd(A).redSqr().redISub(S).redISub(x);B=B.redIAdd(B);var T=S.redAdd(S).redIAdd(S).redIAdd(this.curve.a),k=T.redSqr().redISub(B).redISub(B);g=k;var P=x.redIAdd(x);P=P.redIAdd(P),P=P.redIAdd(P),y=T.redMul(B.redISub(k)).redISub(P),v=this.y.redAdd(this.y)}else{var D=this.z.redSqr(),O=this.y.redSqr(),W=this.x.redMul(O),at=this.x.redSub(D).redMul(this.x.redAdd(D));at=at.redAdd(at).redIAdd(at);var ft=W.redIAdd(W);ft=ft.redIAdd(ft);var st=ft.redAdd(ft);g=at.redSqr().redISub(st),v=this.y.redAdd(this.z).redSqr().redISub(O).redISub(D);var j=O.redSqr();j=j.redIAdd(j),j=j.redIAdd(j),j=j.redIAdd(j),y=at.redMul(ft.redISub(g)).redISub(j)}return this.curve.jpoint(g,y,v)},w.prototype._dbl=function(){var g=this.curve.a,y=this.x,v=this.y,S=this.z,A=S.redSqr().redSqr(),x=y.redSqr(),B=v.redSqr(),T=x.redAdd(x).redIAdd(x).redIAdd(g.redMul(A)),k=y.redAdd(y);k=k.redIAdd(k);var P=k.redMul(B),D=T.redSqr().redISub(P.redAdd(P)),O=P.redISub(D),W=B.redSqr();W=W.redIAdd(W),W=W.redIAdd(W),W=W.redIAdd(W);var at=T.redMul(O).redISub(W),ft=v.redAdd(v).redMul(S);return this.curve.jpoint(D,at,ft)},w.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var g=this.x.redSqr(),y=this.y.redSqr(),v=this.z.redSqr(),S=y.redSqr(),A=g.redAdd(g).redIAdd(g),x=A.redSqr(),B=this.x.redAdd(y).redSqr().redISub(g).redISub(S);B=B.redIAdd(B),B=B.redAdd(B).redIAdd(B),B=B.redISub(x);var T=B.redSqr(),k=S.redIAdd(S);k=k.redIAdd(k),k=k.redIAdd(k),k=k.redIAdd(k);var P=A.redIAdd(B).redSqr().redISub(x).redISub(T).redISub(k),D=y.redMul(P);D=D.redIAdd(D),D=D.redIAdd(D);var O=this.x.redMul(T).redISub(D);O=O.redIAdd(O),O=O.redIAdd(O);var W=this.y.redMul(P.redMul(k.redISub(P)).redISub(B.redMul(T)));W=W.redIAdd(W),W=W.redIAdd(W),W=W.redIAdd(W);var at=this.z.redAdd(B).redSqr().redISub(v).redISub(T);return this.curve.jpoint(O,W,at)},w.prototype.mul=function(g,y){return g=new b(g,y),this.curve._wnafMul(this,g)},w.prototype.eq=function(g){if(g.type==="affine")return this.eq(g.toJ());if(this===g)return!0;var y=this.z.redSqr(),v=g.z.redSqr();if(this.x.redMul(v).redISub(g.x.redMul(y)).cmpn(0)!==0)return!1;var S=y.redMul(this.z),A=v.redMul(g.z);return this.y.redMul(A).redISub(g.y.redMul(S)).cmpn(0)===0},w.prototype.eqXToP=function(g){var y=this.z.redSqr(),v=g.toRed(this.curve.red).redMul(y);if(this.x.cmp(v)===0)return!0;var S=g.clone(),A=this.curve.redN.redMul(y);for(;;){if(S.iadd(this.curve.n),S.cmp(this.curve.p)>=0)return!1;if(v.redIAdd(A),this.x.cmp(v)===0)return!0}},w.prototype.inspect=function(){if(this.isInfinity())return"<EC JPoint Infinity>";return"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},w.prototype.isInfinity=function(){return this.z.cmpn(0)===0}}),ms=ht((h,l)=>{var c=De(),b=Ee(),p=Br(),M=Ie();function a(R){p.call(this,"mont",R),this.a=new c(R.a,16).toRed(this.red),this.b=new c(R.b,16).toRed(this.red),this.i4=new c(4).toRed(this.red).redInvm(),this.two=new c(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}b(a,p),l.exports=a,a.prototype.validate=function(R){var w=R.normalize().x,g=w.redSqr(),y=g.redMul(w).redAdd(g.redMul(this.a)).redAdd(w),v=y.redSqrt();return v.redSqr().cmp(y)===0};function E(R,w,g){if(p.BasePoint.call(this,R,"projective"),w===null&&g===null)this.x=this.curve.one,this.z=this.curve.zero;else{if(this.x=new c(w,16),this.z=new c(g,16),!this.x.red)this.x=this.x.toRed(this.curve.red);if(!this.z.red)this.z=this.z.toRed(this.curve.red)}}b(E,p.BasePoint),a.prototype.decodePoint=function(R,w){return this.point(M.toArray(R,w),1)},a.prototype.point=function(R,w){return new E(this,R,w)},a.prototype.pointFromJSON=function(R){return E.fromJSON(this,R)},E.prototype.precompute=function(){},E.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},E.fromJSON=function(R,w){return new E(R,w[0],w[1]||R.one)},E.prototype.inspect=function(){if(this.isInfinity())return"<EC Point Infinity>";return"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},E.prototype.isInfinity=function(){return this.z.cmpn(0)===0},E.prototype.dbl=function(){var R=this.x.redAdd(this.z),w=R.redSqr(),g=this.x.redSub(this.z),y=g.redSqr(),v=w.redSub(y),S=w.redMul(y),A=v.redMul(y.redAdd(this.curve.a24.redMul(v)));return this.curve.point(S,A)},E.prototype.add=function(){throw Error("Not supported on Montgomery curve")},E.prototype.diffAdd=function(R,w){var g=this.x.redAdd(this.z),y=this.x.redSub(this.z),v=R.x.redAdd(R.z),S=R.x.redSub(R.z),A=S.redMul(g),x=v.redMul(y),B=w.z.redMul(A.redAdd(x).redSqr()),T=w.x.redMul(A.redISub(x).redSqr());return this.curve.point(B,T)},E.prototype.mul=function(R){var w=R.clone(),g=this,y=this.curve.point(null,null),v=this;for(var S=[];w.cmpn(0)!==0;w.iushrn(1))S.push(w.andln(1));for(var A=S.length-1;A>=0;A--)if(S[A]===0)g=g.diffAdd(y,v),y=y.dbl();else y=g.diffAdd(y,v),g=g.dbl();return y},E.prototype.mulAdd=function(){throw Error("Not supported on Montgomery curve")},E.prototype.jumlAdd=function(){throw Error("Not supported on Montgomery curve")},E.prototype.eq=function(R){return this.getX().cmp(R.getX())===0},E.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},E.prototype.getX=function(){return this.normalize(),this.x.fromRed()}}),vs=ht((h,l)=>{var c=Ie(),b=De(),p=Ee(),M=Br(),a=c.assert;function E(w){this.twisted=(w.a|0)!==1,this.mOneA=this.twisted&&(w.a|0)===-1,this.extended=this.mOneA,M.call(this,"edwards",w),this.a=new b(w.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new b(w.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new b(w.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),a(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(w.c|0)===1}p(E,M),l.exports=E,E.prototype._mulA=function(w){if(this.mOneA)return w.redNeg();else return this.a.redMul(w)},E.prototype._mulC=function(w){if(this.oneC)return w;else return this.c.redMul(w)},E.prototype.jpoint=function(w,g,y,v){return this.point(w,g,y,v)},E.prototype.pointFromX=function(w,g){if(w=new b(w,16),!w.red)w=w.toRed(this.red);var y=w.redSqr(),v=this.c2.redSub(this.a.redMul(y)),S=this.one.redSub(this.c2.redMul(this.d).redMul(y)),A=v.redMul(S.redInvm()),x=A.redSqrt();if(x.redSqr().redSub(A).cmp(this.zero)!==0)throw Error("invalid point");var B=x.fromRed().isOdd();if(g&&!B||!g&&B)x=x.redNeg();return this.point(w,x)},E.prototype.pointFromY=function(w,g){if(w=new b(w,16),!w.red)w=w.toRed(this.red);var y=w.redSqr(),v=y.redSub(this.c2),S=y.redMul(this.d).redMul(this.c2).redSub(this.a),A=v.redMul(S.redInvm());if(A.cmp(this.zero)===0)if(g)throw Error("invalid point");else return this.point(this.zero,w);var x=A.redSqrt();if(x.redSqr().redSub(A).cmp(this.zero)!==0)throw Error("invalid point");if(x.fromRed().isOdd()!==g)x=x.redNeg();return this.point(x,w)},E.prototype.validate=function(w){if(w.isInfinity())return!0;w.normalize();var g=w.x.redSqr(),y=w.y.redSqr(),v=g.redMul(this.a).redAdd(y),S=this.c2.redMul(this.one.redAdd(this.d.redMul(g).redMul(y)));return v.cmp(S)===0};function R(w,g,y,v,S){if(M.BasePoint.call(this,w,"projective"),g===null&&y===null&&v===null)this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0;else{if(this.x=new b(g,16),this.y=new b(y,16),this.z=v?new b(v,16):this.curve.one,this.t=S&&new b(S,16),!this.x.red)this.x=this.x.toRed(this.curve.red);if(!this.y.red)this.y=this.y.toRed(this.curve.red);if(!this.z.red)this.z=this.z.toRed(this.curve.red);if(this.t&&!this.t.red)this.t=this.t.toRed(this.curve.red);if(this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t){if(this.t=this.x.redMul(this.y),!this.zOne)this.t=this.t.redMul(this.z.redInvm())}}}p(R,M.BasePoint),E.prototype.pointFromJSON=function(w){return R.fromJSON(this,w)},E.prototype.point=function(w,g,y,v){return new R(this,w,g,y,v)},R.fromJSON=function(w,g){return new R(w,g[0],g[1],g[2])},R.prototype.inspect=function(){if(this.isInfinity())return"<EC Point Infinity>";return"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},R.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},R.prototype._extDbl=function(){var w=this.x.redSqr(),g=this.y.redSqr(),y=this.z.redSqr();y=y.redIAdd(y);var v=this.curve._mulA(w),S=this.x.redAdd(this.y).redSqr().redISub(w).redISub(g),A=v.redAdd(g),x=A.redSub(y),B=v.redSub(g),T=S.redMul(x),k=A.redMul(B),P=S.redMul(B),D=x.redMul(A);return this.curve.point(T,k,D,P)},R.prototype._projDbl=function(){var w=this.x.redAdd(this.y).redSqr(),g=this.x.redSqr(),y=this.y.redSqr(),v,S,A,x,B,T;if(this.curve.twisted){x=this.curve._mulA(g);var k=x.redAdd(y);if(this.zOne)v=w.redSub(g).redSub(y).redMul(k.redSub(this.curve.two)),S=k.redMul(x.redSub(y)),A=k.redSqr().redSub(k).redSub(k);else B=this.z.redSqr(),T=k.redSub(B).redISub(B),v=w.redSub(g).redISub(y).redMul(T),S=k.redMul(x.redSub(y)),A=k.redMul(T)}else x=g.redAdd(y),B=this.curve._mulC(this.z).redSqr(),T=x.redSub(B).redSub(B),v=this.curve._mulC(w.redISub(x)).redMul(T),S=this.curve._mulC(x).redMul(g.redISub(y)),A=x.redMul(T);return this.curve.point(v,S,A)},R.prototype.dbl=function(){if(this.isInfinity())return this;if(this.curve.extended)return this._extDbl();else return this._projDbl()},R.prototype._extAdd=function(w){var g=this.y.redSub(this.x).redMul(w.y.redSub(w.x)),y=this.y.redAdd(this.x).redMul(w.y.redAdd(w.x)),v=this.t.redMul(this.curve.dd).redMul(w.t),S=this.z.redMul(w.z.redAdd(w.z)),A=y.redSub(g),x=S.redSub(v),B=S.redAdd(v),T=y.redAdd(g),k=A.redMul(x),P=B.redMul(T),D=A.redMul(T),O=x.redMul(B);return this.curve.point(k,P,O,D)},R.prototype._projAdd=function(w){var g=this.z.redMul(w.z),y=g.redSqr(),v=this.x.redMul(w.x),S=this.y.redMul(w.y),A=this.curve.d.redMul(v).redMul(S),x=y.redSub(A),B=y.redAdd(A),T=this.x.redAdd(this.y).redMul(w.x.redAdd(w.y)).redISub(v).redISub(S),k=g.redMul(x).redMul(T),P,D;if(this.curve.twisted)P=g.redMul(B).redMul(S.redSub(this.curve._mulA(v))),D=x.redMul(B);else P=g.redMul(B).redMul(S.redSub(v)),D=this.curve._mulC(x).redMul(B);return this.curve.point(k,P,D)},R.prototype.add=function(w){if(this.isInfinity())return w;if(w.isInfinity())return this;if(this.curve.extended)return this._extAdd(w);else return this._projAdd(w)},R.prototype.mul=function(w){if(this._hasDoubles(w))return this.curve._fixedNafMul(this,w);else return this.curve._wnafMul(this,w)},R.prototype.mulAdd=function(w,g,y){return this.curve._wnafMulAdd(1,[this,g],[w,y],2,!1)},R.prototype.jmulAdd=function(w,g,y){return this.curve._wnafMulAdd(1,[this,g],[w,y],2,!0)},R.prototype.normalize=function(){if(this.zOne)return this;var w=this.z.redInvm();if(this.x=this.x.redMul(w),this.y=this.y.redMul(w),this.t)this.t=this.t.redMul(w);return this.z=this.curve.one,this.zOne=!0,this},R.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},R.prototype.getX=function(){return this.normalize(),this.x.fromRed()},R.prototype.getY=function(){return this.normalize(),this.y.fromRed()},R.prototype.eq=function(w){return this===w||this.getX().cmp(w.getX())===0&&this.getY().cmp(w.getY())===0},R.prototype.eqXToP=function(w){var g=w.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(g)===0)return!0;var y=w.clone(),v=this.curve.redN.redMul(this.z);for(;;){if(y.iadd(this.curve.n),y.cmp(this.curve.p)>=0)return!1;if(g.redIAdd(v),this.x.cmp(g)===0)return!0}},R.prototype.toP=R.prototype.normalize,R.prototype.mixedAdd=R.prototype.add}),qn=ht((h)=>{var l=h;l.base=Br(),l.short=bs(),l.mont=ms(),l.edwards=vs()}),Te=ht((h)=>{var l=Ue(),c=Ee();h.inherits=c;function b(i,o){if((i.charCodeAt(o)&64512)!==55296)return!1;if(o<0||o+1>=i.length)return!1;return(i.charCodeAt(o+1)&64512)===56320}function p(i,o){if(Array.isArray(i))return i.slice();if(!i)return[];var r=[];if(typeof i==="string"){if(!o){var n=0;for(var u=0;u<i.length;u++){var d=i.charCodeAt(u);if(d<128)r[n++]=d;else if(d<2048)r[n++]=d>>6|192,r[n++]=d&63|128;else if(b(i,u))d=65536+((d&1023)<<10)+(i.charCodeAt(++u)&1023),r[n++]=d>>18|240,r[n++]=d>>12&63|128,r[n++]=d>>6&63|128,r[n++]=d&63|128;else r[n++]=d>>12|224,r[n++]=d>>6&63|128,r[n++]=d&63|128}}else if(o==="hex"){if(i=i.replace(/[^a-z0-9]+/ig,""),i.length%2!==0)i="0"+i;for(u=0;u<i.length;u+=2)r.push(parseInt(i[u]+i[u+1],16))}}else for(u=0;u<i.length;u++)r[u]=i[u]|0;return r}h.toArray=p;function M(i){var o="";for(var r=0;r<i.length;r++)o+=R(i[r].toString(16));return o}h.toHex=M;function a(i){var o=i>>>24|i>>>8&65280|i<<8&16711680|(i&255)<<24;return o>>>0}h.htonl=a;function E(i,o){var r="";for(var n=0;n<i.length;n++){var u=i[n];if(o==="little")u=a(u);r+=w(u.toString(16))}return r}h.toHex32=E;function R(i){if(i.length===1)return"0"+i;else return i}h.zero2=R;function w(i){if(i.length===7)return"0"+i;else if(i.length===6)return"00"+i;else if(i.length===5)return"000"+i;else if(i.length===4)return"0000"+i;else if(i.length===3)return"00000"+i;else if(i.length===2)return"000000"+i;else if(i.length===1)return"0000000"+i;else return i}h.zero8=w;function g(i,o,r,n){var u=r-o;l(u%4===0);var d=Array(u/4);for(var s=0,e=o;s<d.length;s++,e+=4){var f;if(n==="big")f=i[e]<<24|i[e+1]<<16|i[e+2]<<8|i[e+3];else f=i[e+3]<<24|i[e+2]<<16|i[e+1]<<8|i[e];d[s]=f>>>0}return d}h.join32=g;function y(i,o){var r=Array(i.length*4);for(var n=0,u=0;n<i.length;n++,u+=4){var d=i[n];if(o==="big")r[u]=d>>>24,r[u+1]=d>>>16&255,r[u+2]=d>>>8&255,r[u+3]=d&255;else r[u+3]=d>>>24,r[u+2]=d>>>16&255,r[u+1]=d>>>8&255,r[u]=d&255}return r}h.split32=y;function v(i,o){return i>>>o|i<<32-o}h.rotr32=v;function S(i,o){return i<<o|i>>>32-o}h.rotl32=S;function A(i,o){return i+o>>>0}h.sum32=A;function x(i,o,r){return i+o+r>>>0}h.sum32_3=x;function B(i,o,r,n){return i+o+r+n>>>0}h.sum32_4=B;function T(i,o,r,n,u){return i+o+r+n+u>>>0}h.sum32_5=T;function k(i,o,r,n){var u=i[o],d=i[o+1],s=n+d>>>0,e=(s<n?1:0)+r+u;i[o]=e>>>0,i[o+1]=s}h.sum64=k;function P(i,o,r,n){var u=o+n>>>0,d=(u<o?1:0)+i+r;return d>>>0}h.sum64_hi=P;function D(i,o,r,n){var u=o+n;return u>>>0}h.sum64_lo=D;function O(i,o,r,n,u,d,s,e){var f=0,_=o;_=_+n>>>0,f+=_<o?1:0,_=_+d>>>0,f+=_<d?1:0,_=_+e>>>0,f+=_<e?1:0;var m=i+r+u+s+f;return m>>>0}h.sum64_4_hi=O;function W(i,o,r,n,u,d,s,e){var f=o+n+d+e;return f>>>0}h.sum64_4_lo=W;function at(i,o,r,n,u,d,s,e,f,_){var m=0,I=o;I=I+n>>>0,m+=I<o?1:0,I=I+d>>>0,m+=I<d?1:0,I=I+e>>>0,m+=I<e?1:0,I=I+_>>>0,m+=I<_?1:0;var N=i+r+u+s+f+m;return N>>>0}h.sum64_5_hi=at;function ft(i,o,r,n,u,d,s,e,f,_){var m=o+n+d+e+_;return m>>>0}h.sum64_5_lo=ft;function st(i,o,r){var n=o<<32-r|i>>>r;return n>>>0}h.rotr64_hi=st;function j(i,o,r){var n=i<<32-r|o>>>r;return n>>>0}h.rotr64_lo=j;function rt(i,o,r){return i>>>r}h.shr64_hi=rt;function t(i,o,r){var n=i<<32-r|o>>>r;return n>>>0}h.shr64_lo=t}),hr=ht((h)=>{var l=Te(),c=Ue();function b(){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}h.BlockHash=b,b.prototype.update=function(p,M){if(p=l.toArray(p,M),!this.pending)this.pending=p;else this.pending=this.pending.concat(p);if(this.pendingTotal+=p.length,this.pending.length>=this._delta8){p=this.pending;var a=p.length%this._delta8;if(this.pending=p.slice(p.length-a,p.length),this.pending.length===0)this.pending=null;p=l.join32(p,0,p.length-a,this.endian);for(var E=0;E<p.length;E+=this._delta32)this._update(p,E,E+this._delta32)}return this},b.prototype.digest=function(p){return this.update(this._pad()),c(this.pending===null),this._digest(p)},b.prototype._pad=function(){var p=this.pendingTotal,M=this._delta8,a=M-(p+this.padLength)%M,E=Array(a+this.padLength);E[0]=128;for(var R=1;R<a;R++)E[R]=0;if(p<<=3,this.endian==="big"){for(var w=8;w<this.padLength;w++)E[R++]=0;E[R++]=0,E[R++]=0,E[R++]=0,E[R++]=0,E[R++]=p>>>24&255,E[R++]=p>>>16&255,E[R++]=p>>>8&255,E[R++]=p&255}else{E[R++]=p&255,E[R++]=p>>>8&255,E[R++]=p>>>16&255,E[R++]=p>>>24&255,E[R++]=0,E[R++]=0,E[R++]=0,E[R++]=0;for(w=8;w<this.padLength;w++)E[R++]=0}return E}}),Nn=ht((h)=>{var l=Te(),c=l.rotr32;function b(y,v,S,A){if(y===0)return p(v,S,A);if(y===1||y===3)return a(v,S,A);if(y===2)return M(v,S,A)}h.ft_1=b;function p(y,v,S){return y&v^~y&S}h.ch32=p;function M(y,v,S){return y&v^y&S^v&S}h.maj32=M;function a(y,v,S){return y^v^S}h.p32=a;function E(y){return c(y,2)^c(y,13)^c(y,22)}h.s0_256=E;function R(y){return c(y,6)^c(y,11)^c(y,25)}h.s1_256=R;function w(y){return c(y,7)^c(y,18)^y>>>3}h.g0_256=w;function g(y){return c(y,17)^c(y,19)^y>>>10}h.g1_256=g}),gs=ht((h,l)=>{var c=Te(),b=hr(),p=Nn(),M=c.rotl32,a=c.sum32,E=c.sum32_5,R=p.ft_1,w=b.BlockHash,g=[1518500249,1859775393,2400959708,3395469782];function y(){if(!(this instanceof y))return new y;w.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=Array(80)}c.inherits(y,w),l.exports=y,y.blockSize=512,y.outSize=160,y.hmacStrength=80,y.padLength=64,y.prototype._update=function(v,S){var A=this.W;for(var x=0;x<16;x++)A[x]=v[S+x];for(;x<A.length;x++)A[x]=M(A[x-3]^A[x-8]^A[x-14]^A[x-16],1);var B=this.h[0],T=this.h[1],k=this.h[2],P=this.h[3],D=this.h[4];for(x=0;x<A.length;x++){var O=~~(x/20),W=E(M(B,5),R(O,T,k,P),D,A[x],g[O]);D=P,P=k,k=M(T,30),T=B,B=W}this.h[0]=a(this.h[0],B),this.h[1]=a(this.h[1],T),this.h[2]=a(this.h[2],k),this.h[3]=a(this.h[3],P),this.h[4]=a(this.h[4],D)},y.prototype._digest=function(v){if(v==="hex")return c.toHex32(this.h,"big");else return c.split32(this.h,"big")}}),Dn=ht((h,l)=>{var c=Te(),b=hr(),p=Nn(),M=Ue(),a=c.sum32,E=c.sum32_4,R=c.sum32_5,w=p.ch32,g=p.maj32,y=p.s0_256,v=p.s1_256,S=p.g0_256,A=p.g1_256,x=b.BlockHash,B=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function T(){if(!(this instanceof T))return new T;x.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=B,this.W=Array(64)}c.inherits(T,x),l.exports=T,T.blockSize=512,T.outSize=256,T.hmacStrength=192,T.padLength=64,T.prototype._update=function(k,P){var D=this.W;for(var O=0;O<16;O++)D[O]=k[P+O];for(;O<D.length;O++)D[O]=E(A(D[O-2]),D[O-7],S(D[O-15]),D[O-16]);var W=this.h[0],at=this.h[1],ft=this.h[2],st=this.h[3],j=this.h[4],rt=this.h[5],t=this.h[6],i=this.h[7];M(this.k.length===D.length);for(O=0;O<D.length;O++){var o=R(i,v(j),w(j,rt,t),this.k[O],D[O]),r=a(y(W),g(W,at,ft));i=t,t=rt,rt=j,j=a(st,o),st=ft,ft=at,at=W,W=a(o,r)}this.h[0]=a(this.h[0],W),this.h[1]=a(this.h[1],at),this.h[2]=a(this.h[2],ft),this.h[3]=a(this.h[3],st),this.h[4]=a(this.h[4],j),this.h[5]=a(this.h[5],rt),this.h[6]=a(this.h[6],t),this.h[7]=a(this.h[7],i)},T.prototype._digest=function(k){if(k==="hex")return c.toHex32(this.h,"big");else return c.split32(this.h,"big")}}),ws=ht((h,l)=>{var c=Te(),b=Dn();function p(){if(!(this instanceof p))return new p;b.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}c.inherits(p,b),l.exports=p,p.blockSize=512,p.outSize=224,p.hmacStrength=192,p.padLength=64,p.prototype._digest=function(M){if(M==="hex")return c.toHex32(this.h.slice(0,7),"big");else return c.split32(this.h.slice(0,7),"big")}}),On=ht((h,l)=>{var c=Te(),b=hr(),p=Ue(),M=c.rotr64_hi,a=c.rotr64_lo,E=c.shr64_hi,R=c.shr64_lo,w=c.sum64,g=c.sum64_hi,y=c.sum64_lo,v=c.sum64_4_hi,S=c.sum64_4_lo,A=c.sum64_5_hi,x=c.sum64_5_lo,B=b.BlockHash,T=[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 k(){if(!(this instanceof k))return new k;B.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=T,this.W=Array(160)}c.inherits(k,B),l.exports=k,k.blockSize=1024,k.outSize=512,k.hmacStrength=192,k.padLength=128,k.prototype._prepareBlock=function(r,n){var u=this.W;for(var d=0;d<32;d++)u[d]=r[n+d];for(;d<u.length;d+=2){var s=i(u[d-4],u[d-3]),e=o(u[d-4],u[d-3]),f=u[d-14],_=u[d-13],m=rt(u[d-30],u[d-29]),I=t(u[d-30],u[d-29]),N=u[d-32],U=u[d-31];u[d]=v(s,e,f,_,m,I,N,U),u[d+1]=S(s,e,f,_,m,I,N,U)}},k.prototype._update=function(r,n){this._prepareBlock(r,n);var u=this.W,d=this.h[0],s=this.h[1],e=this.h[2],f=this.h[3],_=this.h[4],m=this.h[5],I=this.h[6],N=this.h[7],U=this.h[8],Z=this.h[9],ut=this.h[10],Y=this.h[11],H=this.h[12],nt=this.h[13],G=this.h[14],tt=this.h[15];p(this.k.length===u.length);for(var Dt=0;Dt<u.length;Dt+=2){var L=G,F=tt,ot=st(U,Z),J=j(U,Z),Q=P(U,Z,ut,Y,H,nt),Mt=D(U,Z,ut,Y,H,nt),C=this.k[Dt],K=this.k[Dt+1],Nt=u[Dt],V=u[Dt+1],it=A(L,F,ot,J,Q,Mt,C,K,Nt,V),Lt=x(L,F,ot,J,Q,Mt,C,K,Nt,V);L=at(d,s),F=ft(d,s),ot=O(d,s,e,f,_,m),J=W(d,s,e,f,_,m);var pt=g(L,F,ot,J),yt=y(L,F,ot,J);G=H,tt=nt,H=ut,nt=Y,ut=U,Y=Z,U=g(I,N,it,Lt),Z=y(N,N,it,Lt),I=_,N=m,_=e,m=f,e=d,f=s,d=g(it,Lt,pt,yt),s=y(it,Lt,pt,yt)}w(this.h,0,d,s),w(this.h,2,e,f),w(this.h,4,_,m),w(this.h,6,I,N),w(this.h,8,U,Z),w(this.h,10,ut,Y),w(this.h,12,H,nt),w(this.h,14,G,tt)},k.prototype._digest=function(r){if(r==="hex")return c.toHex32(this.h,"big");else return c.split32(this.h,"big")};function P(r,n,u,d,s){var e=r&u^~r&s;if(e<0)e+=4294967296;return e}function D(r,n,u,d,s,e){var f=n&d^~n&e;if(f<0)f+=4294967296;return f}function O(r,n,u,d,s){var e=r&u^r&s^u&s;if(e<0)e+=4294967296;return e}function W(r,n,u,d,s,e){var f=n&d^n&e^d&e;if(f<0)f+=4294967296;return f}function at(r,n){var u=M(r,n,28),d=M(n,r,2),s=M(n,r,7),e=u^d^s;if(e<0)e+=4294967296;return e}function ft(r,n){var u=a(r,n,28),d=a(n,r,2),s=a(n,r,7),e=u^d^s;if(e<0)e+=4294967296;return e}function st(r,n){var u=M(r,n,14),d=M(r,n,18),s=M(n,r,9),e=u^d^s;if(e<0)e+=4294967296;return e}function j(r,n){var u=a(r,n,14),d=a(r,n,18),s=a(n,r,9),e=u^d^s;if(e<0)e+=4294967296;return e}function rt(r,n){var u=M(r,n,1),d=M(r,n,8),s=E(r,n,7),e=u^d^s;if(e<0)e+=4294967296;return e}function t(r,n){var u=a(r,n,1),d=a(r,n,8),s=R(r,n,7),e=u^d^s;if(e<0)e+=4294967296;return e}function i(r,n){var u=M(r,n,19),d=M(n,r,29),s=E(r,n,6),e=u^d^s;if(e<0)e+=4294967296;return e}function o(r,n){var u=a(r,n,19),d=a(n,r,29),s=R(r,n,6),e=u^d^s;if(e<0)e+=4294967296;return e}}),Ms=ht((h,l)=>{var c=Te(),b=On();function p(){if(!(this instanceof p))return new p;b.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}c.inherits(p,b),l.exports=p,p.blockSize=1024,p.outSize=384,p.hmacStrength=192,p.padLength=128,p.prototype._digest=function(M){if(M==="hex")return c.toHex32(this.h.slice(0,12),"big");else return c.split32(this.h.slice(0,12),"big")}}),_s=ht((h)=>{h.sha1=gs(),h.sha224=ws(),h.sha256=Dn(),h.sha384=Ms(),h.sha512=On()}),Ss=ht((h)=>{var l=Te(),c=hr(),b=l.rotl32,p=l.sum32,M=l.sum32_3,a=l.sum32_4,E=c.BlockHash;function R(){if(!(this instanceof R))return new R;E.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}l.inherits(R,E),h.ripemd160=R,R.blockSize=512,R.outSize=160,R.hmacStrength=192,R.padLength=64,R.prototype._update=function(B,T){var k=this.h[0],P=this.h[1],D=this.h[2],O=this.h[3],W=this.h[4],at=k,ft=P,st=D,j=O,rt=W;for(var t=0;t<80;t++){var i=p(b(a(k,w(t,P,D,O),B[v[t]+T],g(t)),A[t]),W);k=W,W=O,O=b(D,10),D=P,P=i,i=p(b(a(at,w(79-t,ft,st,j),B[S[t]+T],y(t)),x[t]),rt),at=rt,rt=j,j=b(st,10),st=ft,ft=i}i=M(this.h[1],D,j),this.h[1]=M(this.h[2],O,rt),this.h[2]=M(this.h[3],W,at),this.h[3]=M(this.h[4],k,ft),this.h[4]=M(this.h[0],P,st),this.h[0]=i},R.prototype._digest=function(B){if(B==="hex")return l.toHex32(this.h,"little");else return l.split32(this.h,"little")};function w(B,T,k,P){if(B<=15)return T^k^P;else if(B<=31)return T&k|~T&P;else if(B<=47)return(T|~k)^P;else if(B<=63)return T&P|k&~P;else return T^(k|~P)}function g(B){if(B<=15)return 0;else if(B<=31)return 1518500249;else if(B<=47)return 1859775393;else if(B<=63)return 2400959708;else return 2840853838}function y(B){if(B<=15)return 1352829926;else if(B<=31)return 1548603684;else if(B<=47)return 1836072691;else if(B<=63)return 2053994217;else return 0}var v=[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],S=[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],A=[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],x=[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]}),As=ht((h,l)=>{var c=Te(),b=Ue();function p(M,a,E){if(!(this instanceof p))return new p(M,a,E);this.Hash=M,this.blockSize=M.blockSize/8,this.outSize=M.outSize/8,this.inner=null,this.outer=null,this._init(c.toArray(a,E))}l.exports=p,p.prototype._init=function(M){if(M.length>this.blockSize)M=new this.Hash().update(M).digest();b(M.length<=this.blockSize);for(var a=M.length;a<this.blockSize;a++)M.push(0);for(a=0;a<M.length;a++)M[a]^=54;this.inner=new this.Hash().update(M);for(a=0;a<M.length;a++)M[a]^=106;this.outer=new this.Hash().update(M)},p.prototype.update=function(M,a){return this.inner.update(M,a),this},p.prototype.digest=function(M){return this.outer.update(this.inner.digest()),this.outer.digest(M)}}),li=ht((h)=>{var l=h;l.utils=Te(),l.common=hr(),l.sha=_s(),l.ripemd=Ss(),l.hmac=As(),l.sha1=l.sha.sha1,l.sha256=l.sha.sha256,l.sha224=l.sha.sha224,l.sha384=l.sha.sha384,l.sha512=l.sha.sha512,l.ripemd160=l.ripemd.ripemd160}),Es=ht((h,l)=>{l.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"]]}}}),ui=ht((h)=>{var l=h,c=li(),b=qn(),p=Ie(),M=p.assert;function a(w){if(w.type==="short")this.curve=new b.short(w);else if(w.type==="edwards")this.curve=new b.edwards(w);else this.curve=new b.mont(w);this.g=this.curve.g,this.n=this.curve.n,this.hash=w.hash,M(this.g.validate(),"Invalid curve"),M(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}l.PresetCurve=a;function E(w,g){Object.defineProperty(l,w,{configurable:!0,enumerable:!0,get:function(){var y=new a(g);return Object.defineProperty(l,w,{configurable:!0,enumerable:!0,value:y}),y}})}E("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:c.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),E("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:c.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),E("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:c.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),E("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:c.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"]}),E("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:c.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"]}),E("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:c.sha256,gRed:!1,g:["9"]}),E("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:c.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var R;try{R=Es()}catch(w){R=void 0}E("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:c.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",R]})}),Rs=ht((h,l)=>{var c=li(),b=Tn(),p=Ue();function M(a){if(!(this instanceof M))return new M(a);this.hash=a.hash,this.predResist=!!a.predResist,this.outLen=this.hash.outSize,this.minEntropy=a.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var E=b.toArray(a.entropy,a.entropyEnc||"hex"),R=b.toArray(a.nonce,a.nonceEnc||"hex"),w=b.toArray(a.pers,a.persEnc||"hex");p(E.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(E,R,w)}l.exports=M,M.prototype._init=function(a,E,R){var w=a.concat(E).concat(R);this.K=Array(this.outLen/8),this.V=Array(this.outLen/8);for(var g=0;g<this.V.length;g++)this.K[g]=0,this.V[g]=1;this._update(w),this._reseed=1,this.reseedInterval=281474976710656},M.prototype._hmac=function(){return new c.hmac(this.hash,this.K)},M.prototype._update=function(a){var E=this._hmac().update(this.V).update([0]);if(a)E=E.update(a);if(this.K=E.digest(),this.V=this._hmac().update(this.V).digest(),!a)return;this.K=this._hmac().update(this.V).update([1]).update(a).digest(),this.V=this._hmac().update(this.V).digest()},M.prototype.reseed=function(a,E,R,w){if(typeof E!=="string")w=R,R=E,E=null;a=b.toArray(a,E),R=b.toArray(R,w),p(a.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(a.concat(R||[])),this._reseed=1},M.prototype.generate=function(a,E,R,w){if(this._reseed>this.reseedInterval)throw Error("Reseed is required");if(typeof E!=="string")w=R,R=E,E=null;if(R)R=b.toArray(R,w||"hex"),this._update(R);var g=[];while(g.length<a)this.V=this._hmac().update(this.V).digest(),g=g.concat(this.V);var y=g.slice(0,a);return this._update(R),this._reseed++,b.encode(y,E)}}),Bs=ht((h,l)=>{var c=De(),b=Ie(),p=b.assert;function M(a,E){if(this.ec=a,this.priv=null,this.pub=null,E.priv)this._importPrivate(E.priv,E.privEnc);if(E.pub)this._importPublic(E.pub,E.pubEnc)}l.exports=M,M.fromPublic=function(a,E,R){if(E instanceof M)return E;return new M(a,{pub:E,pubEnc:R})},M.fromPrivate=function(a,E,R){if(E instanceof M)return E;return new M(a,{priv:E,privEnc:R})},M.prototype.validate=function(){var a=this.getPublic();if(a.isInfinity())return{result:!1,reason:"Invalid public key"};if(!a.validate())return{result:!1,reason:"Public key is not a point"};if(!a.mul(this.ec.curve.n).isInfinity())return{result:!1,reason:"Public key * N != O"};return{result:!0,reason:null}},M.prototype.getPublic=function(a,E){if(typeof a==="string")E=a,a=null;if(!this.pub)this.pub=this.ec.g.mul(this.priv);if(!E)return this.pub;return this.pub.encode(E,a)},M.prototype.getPrivate=function(a){if(a==="hex")return this.priv.toString(16,2);else return this.priv},M.prototype._importPrivate=function(a,E){this.priv=new c(a,E||16),this.priv=this.priv.umod(this.ec.curve.n)},M.prototype._importPublic=function(a,E){if(a.x||a.y){if(this.ec.curve.type==="mont")p(a.x,"Need x coordinate");else if(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")p(a.x&&a.y,"Need both x and y coordinate");this.pub=this.ec.curve.point(a.x,a.y);return}this.pub=this.ec.curve.decodePoint(a,E)},M.prototype.derive=function(a){if(!a.validate())p(a.validate(),"public point not validated");return a.mul(this.priv).getX()},M.prototype.sign=function(a,E,R){return this.ec.sign(a,this,E,R)},M.prototype.verify=function(a,E,R){return this.ec.verify(a,E,this,void 0,R)},M.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}}),Is=ht((h,l)=>{var c=De(),b=Ie(),p=b.assert;function M(g,y){if(g instanceof M)return g;if(this._importDER(g,y))return;if(p(g.r&&g.s,"Signature without r or s"),this.r=new c(g.r,16),this.s=new c(g.s,16),g.recoveryParam===void 0)this.recoveryParam=null;else this.recoveryParam=g.recoveryParam}l.exports=M;function a(){this.place=0}function E(g,y){var v=g[y.place++];if(!(v&128))return v;var S=v&15;if(S===0||S>4)return!1;if(g[y.place]===0)return!1;var A=0;for(var x=0,B=y.place;x<S;x++,B++)A<<=8,A|=g[B],A>>>=0;if(A<=127)return!1;return y.place=B,A}function R(g){var y=0,v=g.length-1;while(!g[y]&&!(g[y+1]&128)&&y<v)y++;if(y===0)return g;return g.slice(y)}M.prototype._importDER=function(g,y){g=b.toArray(g,y);var v=new a;if(g[v.place++]!==48)return!1;var S=E(g,v);if(S===!1)return!1;if(S+v.place!==g.length)return!1;if(g[v.place++]!==2)return!1;var A=E(g,v);if(A===!1)return!1;if((g[v.place]&128)!==0)return!1;var x=g.slice(v.place,A+v.place);if(v.place+=A,g[v.place++]!==2)return!1;var B=E(g,v);if(B===!1)return!1;if(g.length!==B+v.place)return!1;if((g[v.place]&128)!==0)return!1;var T=g.slice(v.place,B+v.place);if(x[0]===0)if(x[1]&128)x=x.slice(1);else return!1;if(T[0]===0)if(T[1]&128)T=T.slice(1);else return!1;return this.r=new c(x),this.s=new c(T),this.recoveryParam=null,!0};function w(g,y){if(y<128){g.push(y);return}var v=1+(Math.log(y)/Math.LN2>>>3);g.push(v|128);while(--v)g.push(y>>>(v<<3)&255);g.push(y)}M.prototype.toDER=function(g){var y=this.r.toArray(),v=this.s.toArray();if(y[0]&128)y=[0].concat(y);if(v[0]&128)v=[0].concat(v);y=R(y),v=R(v);while(!v[0]&&!(v[1]&128))v=v.slice(1);var S=[2];w(S,y.length),S=S.concat(y),S.push(2),w(S,v.length);var A=S.concat(v),x=[48];return w(x,A.length),x=x.concat(A),b.encode(x,g)}}),xs=ht((h,l)=>{var c=De(),b=Rs(),p=Ie(),M=ui(),a=Pn(),E=p.assert,R=Bs(),w=Is();function g(y){if(!(this instanceof g))return new g(y);if(typeof y==="string")E(Object.prototype.hasOwnProperty.call(M,y),"Unknown curve "+y),y=M[y];if(y instanceof M.PresetCurve)y={curve:y};this.curve=y.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=y.curve.g,this.g.precompute(y.curve.n.bitLength()+1),this.hash=y.hash||y.curve.hash}l.exports=g,g.prototype.keyPair=function(y){return new R(this,y)},g.prototype.keyFromPrivate=function(y,v){return R.fromPrivate(this,y,v)},g.prototype.keyFromPublic=function(y,v){return R.fromPublic(this,y,v)},g.prototype.genKeyPair=function(y){if(!y)y={};var v=new b({hash:this.hash,pers:y.pers,persEnc:y.persEnc||"utf8",entropy:y.entropy||a(this.hash.hmacStrength),entropyEnc:y.entropy&&y.entropyEnc||"utf8",nonce:this.n.toArray()}),S=this.n.byteLength(),A=this.n.sub(new c(2));for(;;){var x=new c(v.generate(S));if(x.cmp(A)>0)continue;return x.iaddn(1),this.keyFromPrivate(x)}},g.prototype._truncateToN=function(y,v,S){var A;if(c.isBN(y)||typeof y==="number")y=new c(y,16),A=y.byteLength();else if(typeof y==="object")A=y.length,y=new c(y,16);else{var x=y.toString();A=x.length+1>>>1,y=new c(x,16)}if(typeof S!=="number")S=A*8;var B=S-this.n.bitLength();if(B>0)y=y.ushrn(B);if(!v&&y.cmp(this.n)>=0)return y.sub(this.n);else return y},g.prototype.sign=function(y,v,S,A){if(typeof S==="object")A=S,S=null;if(!A)A={};if(typeof y!=="string"&&typeof y!=="number"&&!c.isBN(y)){E(typeof y==="object"&&y&&typeof y.length==="number","Expected message to be an array-like, a hex string, or a BN instance"),E(y.length>>>0===y.length);for(var x=0;x<y.length;x++)E((y[x]&255)===y[x])}v=this.keyFromPrivate(v,S),y=this._truncateToN(y,!1,A.msgBitLength),E(!y.isNeg(),"Can not sign a negative message");var B=this.n.byteLength(),T=v.getPrivate().toArray("be",B),k=y.toArray("be",B);E(new c(k).eq(y),"Can not sign message");var P=new b({hash:this.hash,entropy:T,nonce:k,pers:A.pers,persEnc:A.persEnc||"utf8"}),D=this.n.sub(new c(1));for(var O=0;;O++){var W=A.k?A.k(O):new c(P.generate(this.n.byteLength()));if(W=this._truncateToN(W,!0),W.cmpn(1)<=0||W.cmp(D)>=0)continue;var at=this.g.mul(W);if(at.isInfinity())continue;var ft=at.getX(),st=ft.umod(this.n);if(st.cmpn(0)===0)continue;var j=W.invm(this.n).mul(st.mul(v.getPrivate()).iadd(y));if(j=j.umod(this.n),j.cmpn(0)===0)continue;var rt=(at.getY().isOdd()?1:0)|(ft.cmp(st)!==0?2:0);if(A.canonical&&j.cmp(this.nh)>0)j=this.n.sub(j),rt^=1;return new w({r:st,s:j,recoveryParam:rt})}},g.prototype.verify=function(y,v,S,A,x){if(!x)x={};y=this._truncateToN(y,!1,x.msgBitLength),S=this.keyFromPublic(S,A),v=new w(v,"hex");var{r:B,s:T}=v;if(B.cmpn(1)<0||B.cmp(this.n)>=0)return!1;if(T.cmpn(1)<0||T.cmp(this.n)>=0)return!1;var k=T.invm(this.n),P=k.mul(y).umod(this.n),D=k.mul(B).umod(this.n),O;if(!this.curve._maxwellTrick){if(O=this.g.mulAdd(P,S.getPublic(),D),O.isInfinity())return!1;return O.getX().umod(this.n).cmp(B)===0}if(O=this.g.jmulAdd(P,S.getPublic(),D),O.isInfinity())return!1;return O.eqXToP(B)},g.prototype.recoverPubKey=function(y,v,S,A){E((3&S)===S,"The recovery param is more than two bits"),v=new w(v,A);var x=this.n,B=new c(y),T=v.r,k=v.s,P=S&1,D=S>>1;if(T.cmp(this.curve.p.umod(this.curve.n))>=0&&D)throw Error("Unable to find sencond key candinate");if(D)T=this.curve.pointFromX(T.add(this.curve.n),P);else T=this.curve.pointFromX(T,P);var O=v.r.invm(x),W=x.sub(B).mul(O).umod(x),at=k.mul(O).umod(x);return this.g.mulAdd(W,T,at)},g.prototype.getKeyRecoveryParam=function(y,v,S,A){if(v=new w(v,A),v.recoveryParam!==null)return v.recoveryParam;for(var x=0;x<4;x++){var B;try{B=this.recoverPubKey(y,v,x)}catch(T){continue}if(B.eq(S))return x}throw Error("Unable to find valid recovery factor")}}),ks=ht((h,l)=>{var c=Ie(),b=c.assert,p=c.parseBytes,M=c.cachedProperty;function a(E,R){if(this.eddsa=E,this._secret=p(R.secret),E.isPoint(R.pub))this._pub=R.pub;else this._pubBytes=p(R.pub)}a.fromPublic=function(E,R){if(R instanceof a)return R;return new a(E,{pub:R})},a.fromSecret=function(E,R){if(R instanceof a)return R;return new a(E,{secret:R})},a.prototype.secret=function(){return this._secret},M(a,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),M(a,"pub",function(){if(this._pubBytes)return this.eddsa.decodePoint(this._pubBytes);return this.eddsa.g.mul(this.priv())}),M(a,"privBytes",function(){var E=this.eddsa,R=this.hash(),w=E.encodingLength-1,g=R.slice(0,E.encodingLength);return g[0]&=248,g[w]&=127,g[w]|=64,g}),M(a,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),M(a,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),M(a,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),a.prototype.sign=function(E){return b(this._secret,"KeyPair can only verify"),this.eddsa.sign(E,this)},a.prototype.verify=function(E,R){return this.eddsa.verify(E,R,this)},a.prototype.getSecret=function(E){return b(this._secret,"KeyPair is public only"),c.encode(this.secret(),E)},a.prototype.getPublic=function(E){return c.encode(this.pubBytes(),E)},l.exports=a}),Ts=ht((h,l)=>{var c=De(),b=Ie(),p=b.assert,M=b.cachedProperty,a=b.parseBytes;function E(R,w){if(this.eddsa=R,typeof w!=="object")w=a(w);if(Array.isArray(w))p(w.length===R.encodingLength*2,"Signature has invalid size"),w={R:w.slice(0,R.encodingLength),S:w.slice(R.encodingLength)};if(p(w.R&&w.S,"Signature without R or S"),R.isPoint(w.R))this._R=w.R;if(w.S instanceof c)this._S=w.S;this._Rencoded=Array.isArray(w.R)?w.R:w.Rencoded,this._Sencoded=Array.isArray(w.S)?w.S:w.Sencoded}M(E,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),M(E,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),M(E,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),M(E,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),E.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},E.prototype.toHex=function(){return b.encode(this.toBytes(),"hex").toUpperCase()},l.exports=E}),Ps=ht((h,l)=>{var c=li(),b=ui(),p=Ie(),M=p.assert,a=p.parseBytes,E=ks(),R=Ts();function w(g){if(M(g==="ed25519","only tested with ed25519 so far"),!(this instanceof w))return new w(g);g=b[g].curve,this.curve=g,this.g=g.g,this.g.precompute(g.n.bitLength()+1),this.pointClass=g.point().constructor,this.encodingLength=Math.ceil(g.n.bitLength()/8),this.hash=c.sha512}l.exports=w,w.prototype.sign=function(g,y){g=a(g);var v=this.keyFromSecret(y),S=this.hashInt(v.messagePrefix(),g),A=this.g.mul(S),x=this.encodePoint(A),B=this.hashInt(x,v.pubBytes(),g).mul(v.priv()),T=S.add(B).umod(this.curve.n);return this.makeSignature({R:A,S:T,Rencoded:x})},w.prototype.verify=function(g,y,v){if(g=a(g),y=this.makeSignature(y),y.S().gte(y.eddsa.curve.n)||y.S().isNeg())return!1;var S=this.keyFromPublic(v),A=this.hashInt(y.Rencoded(),S.pubBytes(),g),x=this.g.mul(y.S()),B=y.R().add(S.pub().mul(A));return B.eq(x)},w.prototype.hashInt=function(){var g=this.hash();for(var y=0;y<arguments.length;y++)g.update(arguments[y]);return p.intFromLE(g.digest()).umod(this.curve.n)},w.prototype.keyFromPublic=function(g){return E.fromPublic(this,g)},w.prototype.keyFromSecret=function(g){return E.fromSecret(this,g)},w.prototype.makeSignature=function(g){if(g instanceof R)return g;return new R(this,g)},w.prototype.encodePoint=function(g){var y=g.getY().toArray("le",this.encodingLength);return y[this.encodingLength-1]|=g.getX().isOdd()?128:0,y},w.prototype.decodePoint=function(g){g=p.parseBytes(g);var y=g.length-1,v=g.slice(0,y).concat(g[y]&-129),S=(g[y]&128)!==0,A=p.intFromLE(v);return this.curve.pointFromY(A,S)},w.prototype.encodeInt=function(g){return g.toArray("le",this.encodingLength)},w.prototype.decodeInt=function(g){return p.intFromLE(g)},w.prototype.isPoint=function(g){return g instanceof this.pointClass}}),qs=ht((h)=>{var l=h;l.version=ps().version,l.utils=Ie(),l.rand=Pn(),l.curve=qn(),l.curves=ui(),l.ec=xs(),l.eddsa=Ps()}),Ns=ht((h,l)=>{(function(c,b){function p(t,i){if(!t)throw Error(i||"Assertion failed")}function M(t,i){t.super_=i;var o=function(){};o.prototype=i.prototype,t.prototype=new o,t.prototype.constructor=t}function a(t,i,o){if(a.isBN(t))return t;if(this.negative=0,this.words=null,this.length=0,this.red=null,t!==null){if(i==="le"||i==="be")o=i,i=10;this._init(t||0,i||10,o||"be")}}if(typeof c==="object")c.exports=a;else b.BN=a;a.BN=a,a.wordSize=26;var E;try{if(typeof window<"u"&&typeof window.Buffer<"u")E=window.Buffer;else E=(ye(),jt(pe)).Buffer}catch(t){}a.isBN=function(t){if(t instanceof a)return!0;return t!==null&&typeof t==="object"&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,i){if(t.cmp(i)>0)return t;return i},a.min=function(t,i){if(t.cmp(i)<0)return t;return i},a.prototype._init=function(t,i,o){if(typeof t==="number")return this._initNumber(t,i,o);if(typeof t==="object")return this._initArray(t,i,o);if(i==="hex")i=16;p(i===(i|0)&&i>=2&&i<=36),t=t.toString().replace(/\s+/g,"");var r=0;if(t[0]==="-")r++,this.negative=1;if(r<t.length){if(i===16)this._parseHex(t,r,o);else if(this._parseBase(t,i,r),o==="le")this._initArray(this.toArray(),i,o)}},a.prototype._initNumber=function(t,i,o){if(t<0)this.negative=1,t=-t;if(t<67108864)this.words=[t&67108863],this.length=1;else if(t<4503599627370496)this.words=[t&67108863,t/67108864&67108863],this.length=2;else p(t<9007199254740992),this.words=[t&67108863,t/67108864&67108863,1],this.length=3;if(o!=="le")return;this._initArray(this.toArray(),i,o)},a.prototype._initArray=function(t,i,o){if(p(typeof t.length==="number"),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,u,d=0;if(o==="be"){for(r=t.length-1,n=0;r>=0;r-=3)if(u=t[r]|t[r-1]<<8|t[r-2]<<16,this.words[n]|=u<<d&67108863,this.words[n+1]=u>>>26-d&67108863,d+=24,d>=26)d-=26,n++}else if(o==="le"){for(r=0,n=0;r<t.length;r+=3)if(u=t[r]|t[r+1]<<8|t[r+2]<<16,this.words[n]|=u<<d&67108863,this.words[n+1]=u>>>26-d&67108863,d+=24,d>=26)d-=26,n++}return this.strip()};function R(t,i){var o=t.charCodeAt(i);if(o>=65&&o<=70)return o-55;else if(o>=97&&o<=102)return o-87;else return o-48&15}function w(t,i,o){var r=R(t,o);if(o-1>=i)r|=R(t,o-1)<<4;return r}a.prototype._parseHex=function(t,i,o){this.length=Math.ceil((t.length-i)/6),this.words=Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n=0,u=0,d;if(o==="be")for(r=t.length-1;r>=i;r-=2)if(d=w(t,i,r)<<n,this.words[u]|=d&67108863,n>=18)n-=18,u+=1,this.words[u]|=d>>>26;else n+=8;else{var s=t.length-i;for(r=s%2===0?i+1:i;r<t.length;r+=2)if(d=w(t,i,r)<<n,this.words[u]|=d&67108863,n>=18)n-=18,u+=1,this.words[u]|=d>>>26;else n+=8}this.strip()};function g(t,i,o,r){var n=0,u=Math.min(t.length,o);for(var d=i;d<u;d++){var s=t.charCodeAt(d)-48;if(n*=r,s>=49)n+=s-49+10;else if(s>=17)n+=s-17+10;else n+=s}return n}a.prototype._parseBase=function(t,i,o){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=i)r++;r--,n=n/i|0;var u=t.length-o,d=u%r,s=Math.min(u,u-d)+o,e=0;for(var f=o;f<s;f+=r)if(e=g(t,f,f+r,i),this.imuln(n),this.words[0]+e<67108864)this.words[0]+=e;else this._iaddn(e);if(d!==0){var _=1;e=g(t,f,t.length,i);for(f=0;f<d;f++)_*=i;if(this.imuln(_),this.words[0]+e<67108864)this.words[0]+=e;else this._iaddn(e)}this.strip()},a.prototype.copy=function(t){t.words=Array(this.length);for(var i=0;i<this.length;i++)t.words[i]=this.words[i];t.length=this.length,t.negative=this.negative,t.red=this.red},a.prototype.clone=function(){var t=new a(null);return this.copy(t),t},a.prototype._expand=function(t){while(this.length<t)this.words[this.length++]=0;return this},a.prototype.strip=function(){while(this.length>1&&this.words[this.length-1]===0)this.length--;return this._normSign()},a.prototype._normSign=function(){if(this.length===1&&this.words[0]===0)this.negative=0;return this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var y=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],v=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],S=[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];if(a.prototype.toString=function(t,i){t=t||10,i=i|0||1;var o;if(t===16||t==="hex"){o="";var r=0,n=0;for(var u=0;u<this.length;u++){var d=this.words[u],s=((d<<r|n)&16777215).toString(16);if(n=d>>>24-r&16777215,r+=2,r>=26)r-=26,u--;if(n!==0||u!==this.length-1)o=y[6-s.length]+s+o;else o=s+o}if(n!==0)o=n.toString(16)+o;while(o.length%i!==0)o="0"+o;if(this.negative!==0)o="-"+o;return o}if(t===(t|0)&&t>=2&&t<=36){var e=v[t],f=S[t];o="";var _=this.clone();_.negative=0;while(!_.isZero()){var m=_.modn(f).toString(t);if(_=_.idivn(f),!_.isZero())o=y[e-m.length]+m+o;else o=m+o}if(this.isZero())o="0"+o;while(o.length%i!==0)o="0"+o;if(this.negative!==0)o="-"+o;return o}p(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];if(this.length===2)t+=this.words[1]*67108864;else if(this.length===3&&this.words[2]===1)t+=4503599627370496+this.words[1]*67108864;else if(this.length>2)p(!1,"Number can only safely store up to 53 bits");return this.negative!==0?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,i){return p(typeof E<"u"),this.toArrayLike(E,t,i)},a.prototype.toArray=function(t,i){return this.toArrayLike(Array,t,i)},a.prototype.toArrayLike=function(t,i,o){var r=this.byteLength(),n=o||Math.max(1,r);p(r<=n,"byte array longer than desired length"),p(n>0,"Requested array length <= 0"),this.strip();var u=i==="le",d=new t(n),s,e,f=this.clone();if(!u){for(e=0;e<n-r;e++)d[e]=0;for(e=0;!f.isZero();e++)s=f.andln(255),f.iushrn(8),d[n-e-1]=s}else{for(e=0;!f.isZero();e++)s=f.andln(255),f.iushrn(8),d[e]=s;for(;e<n;e++)d[e]=0}return d},Math.clz32)a.prototype._countBits=function(t){return 32-Math.clz32(t)};else a.prototype._countBits=function(t){var i=t,o=0;if(i>=4096)o+=13,i>>>=13;if(i>=64)o+=7,i>>>=7;if(i>=8)o+=4,i>>>=4;if(i>=2)o+=2,i>>>=2;return o+i};a.prototype._zeroBits=function(t){if(t===0)return 26;var i=t,o=0;if((i&8191)===0)o+=13,i>>>=13;if((i&127)===0)o+=7,i>>>=7;if((i&15)===0)o+=4,i>>>=4;if((i&3)===0)o+=2,i>>>=2;if((i&1)===0)o++;return o},a.prototype.bitLength=function(){var t=this.words[this.length-1],i=this._countBits(t);return(this.length-1)*26+i};function A(t){var i=Array(t.bitLength());for(var o=0;o<i.length;o++){var r=o/26|0,n=o%26;i[o]=(t.words[r]&1<<n)>>>n}return i}a.prototype.zeroBits=function(){if(this.isZero())return 0;var t=0;for(var i=0;i<this.length;i++){var o=this._zeroBits(this.words[i]);if(t+=o,o!==26)break}return t},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(t){if(this.negative!==0)return this.abs().inotn(t).iaddn(1);return this.clone()},a.prototype.fromTwos=function(t){if(this.testn(t-1))return this.notn(t).iaddn(1).ineg();return this.clone()},a.prototype.isNeg=function(){return this.negative!==0},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){if(!this.isZero())this.negative^=1;return this},a.prototype.iuor=function(t){while(this.length<t.length)this.words[this.length++]=0;for(var i=0;i<t.length;i++)this.words[i]=this.words[i]|t.words[i];return this.strip()},a.prototype.ior=function(t){return p((this.negative|t.negative)===0),this.iuor(t)},a.prototype.or=function(t){if(this.length>t.length)return this.clone().ior(t);return t.clone().ior(this)},a.prototype.uor=function(t){if(this.length>t.length)return this.clone().iuor(t);return t.clone().iuor(this)},a.prototype.iuand=function(t){var i;if(this.length>t.length)i=t;else i=this;for(var o=0;o<i.length;o++)this.words[o]=this.words[o]&t.words[o];return this.length=i.length,this.strip()},a.prototype.iand=function(t){return p((this.negative|t.negative)===0),this.iuand(t)},a.prototype.and=function(t){if(this.length>t.length)return this.clone().iand(t);return t.clone().iand(this)},a.prototype.uand=function(t){if(this.length>t.length)return this.clone().iuand(t);return t.clone().iuand(this)},a.prototype.iuxor=function(t){var i,o;if(this.length>t.length)i=this,o=t;else i=t,o=this;for(var r=0;r<o.length;r++)this.words[r]=i.words[r]^o.words[r];if(this!==i)for(;r<i.length;r++)this.words[r]=i.words[r];return this.length=i.length,this.strip()},a.prototype.ixor=function(t){return p((this.negative|t.negative)===0),this.iuxor(t)},a.prototype.xor=function(t){if(this.length>t.length)return this.clone().ixor(t);return t.clone().ixor(this)},a.prototype.uxor=function(t){if(this.length>t.length)return this.clone().iuxor(t);return t.clone().iuxor(this)},a.prototype.inotn=function(t){p(typeof t==="number"&&t>=0);var i=Math.ceil(t/26)|0,o=t%26;if(this._expand(i),o>0)i--;for(var r=0;r<i;r++)this.words[r]=~this.words[r]&67108863;if(o>0)this.words[r]=~this.words[r]&67108863>>26-o;return this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,i){p(typeof t==="number"&&t>=0);var o=t/26|0,r=t%26;if(this._expand(o+1),i)this.words[o]=this.words[o]|1<<r;else this.words[o]=this.words[o]&~(1<<r);return this.strip()},a.prototype.iadd=function(t){var i;if(this.negative!==0&&t.negative===0)return this.negative=0,i=this.isub(t),this.negative^=1,this._normSign();else if(this.negative===0&&t.negative!==0)return t.negative=0,i=this.isub(t),t.negative=1,i._normSign();var o,r;if(this.length>t.length)o=this,r=t;else o=t,r=this;var n=0;for(var u=0;u<r.length;u++)i=(o.words[u]|0)+(r.words[u]|0)+n,this.words[u]=i&67108863,n=i>>>26;for(;n!==0&&u<o.length;u++)i=(o.words[u]|0)+n,this.words[u]=i&67108863,n=i>>>26;if(this.length=o.length,n!==0)this.words[this.length]=n,this.length++;else if(o!==this)for(;u<o.length;u++)this.words[u]=o.words[u];return this},a.prototype.add=function(t){var i;if(t.negative!==0&&this.negative===0)return t.negative=0,i=this.sub(t),t.negative^=1,i;else if(t.negative===0&&this.negative!==0)return this.negative=0,i=t.sub(this),this.negative=1,i;if(this.length>t.length)return this.clone().iadd(t);return t.clone().iadd(this)},a.prototype.isub=function(t){if(t.negative!==0){t.negative=0;var i=this.iadd(t);return t.negative=1,i._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var o=this.cmp(t);if(o===0)return this.negative=0,this.length=1,this.words[0]=0,this;var r,n;if(o>0)r=this,n=t;else r=t,n=this;var u=0;for(var d=0;d<n.length;d++)i=(r.words[d]|0)-(n.words[d]|0)+u,u=i>>26,this.words[d]=i&67108863;for(;u!==0&&d<r.length;d++)i=(r.words[d]|0)+u,u=i>>26,this.words[d]=i&67108863;if(u===0&&d<r.length&&r!==this)for(;d<r.length;d++)this.words[d]=r.words[d];if(this.length=Math.max(this.length,d),r!==this)this.negative=1;return this.strip()},a.prototype.sub=function(t){return this.clone().isub(t)};function x(t,i,o){o.negative=i.negative^t.negative;var r=t.length+i.length|0;o.length=r,r=r-1|0;var n=t.words[0]|0,u=i.words[0]|0,d=n*u,s=d&67108863,e=d/67108864|0;o.words[0]=s;for(var f=1;f<r;f++){var _=e>>>26,m=e&67108863,I=Math.min(f,i.length-1);for(var N=Math.max(0,f-t.length+1);N<=I;N++){var U=f-N|0;n=t.words[U]|0,u=i.words[N]|0,d=n*u+m,_+=d/67108864|0,m=d&67108863}o.words[f]=m|0,e=_|0}if(e!==0)o.words[f]=e|0;else o.length--;return o.strip()}var B=function(t,i,o){var r=t.words,n=i.words,u=o.words,d=0,s,e,f,_=r[0]|0,m=_&8191,I=_>>>13,N=r[1]|0,U=N&8191,Z=N>>>13,ut=r[2]|0,Y=ut&8191,H=ut>>>13,nt=r[3]|0,G=nt&8191,tt=nt>>>13,Dt=r[4]|0,L=Dt&8191,F=Dt>>>13,ot=r[5]|0,J=ot&8191,Q=ot>>>13,Mt=r[6]|0,C=Mt&8191,K=Mt>>>13,Nt=r[7]|0,V=Nt&8191,it=Nt>>>13,Lt=r[8]|0,pt=Lt&8191,yt=Lt>>>13,Zt=r[9]|0,dt=Zt&8191,bt=Zt>>>13,Jt=n[0]|0,gt=Jt&8191,vt=Jt>>>13,ve=n[1]|0,_t=ve&8191,It=ve>>>13,ge=n[2]|0,xt=ge&8191,St=ge>>>13,be=n[3]|0,kt=be&8191,At=be>>>13,ue=n[4]|0,Tt=ue&8191,Pt=ue>>>13,de=n[5]|0,Et=de&8191,q=de>>>13,z=n[6]|0,X=z&8191,et=z>>>13,Ot=n[7]|0,ct=Ot&8191,mt=Ot>>>13,Gt=n[8]|0,Rt=Gt&8191,qt=Gt>>>13,me=n[9]|0,Bt=me&8191,wt=me>>>13;o.negative=t.negative^i.negative,o.length=19,s=Math.imul(m,gt),e=Math.imul(m,vt),e=e+Math.imul(I,gt)|0,f=Math.imul(I,vt);var Vt=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(Vt>>>26)|0,Vt&=67108863,s=Math.imul(U,gt),e=Math.imul(U,vt),e=e+Math.imul(Z,gt)|0,f=Math.imul(Z,vt),s=s+Math.imul(m,_t)|0,e=e+Math.imul(m,It)|0,e=e+Math.imul(I,_t)|0,f=f+Math.imul(I,It)|0;var Ut=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,s=Math.imul(Y,gt),e=Math.imul(Y,vt),e=e+Math.imul(H,gt)|0,f=Math.imul(H,vt),s=s+Math.imul(U,_t)|0,e=e+Math.imul(U,It)|0,e=e+Math.imul(Z,_t)|0,f=f+Math.imul(Z,It)|0,s=s+Math.imul(m,xt)|0,e=e+Math.imul(m,St)|0,e=e+Math.imul(I,xt)|0,f=f+Math.imul(I,St)|0;var Ct=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,s=Math.imul(G,gt),e=Math.imul(G,vt),e=e+Math.imul(tt,gt)|0,f=Math.imul(tt,vt),s=s+Math.imul(Y,_t)|0,e=e+Math.imul(Y,It)|0,e=e+Math.imul(H,_t)|0,f=f+Math.imul(H,It)|0,s=s+Math.imul(U,xt)|0,e=e+Math.imul(U,St)|0,e=e+Math.imul(Z,xt)|0,f=f+Math.imul(Z,St)|0,s=s+Math.imul(m,kt)|0,e=e+Math.imul(m,At)|0,e=e+Math.imul(I,kt)|0,f=f+Math.imul(I,At)|0;var Wt=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(Wt>>>26)|0,Wt&=67108863,s=Math.imul(L,gt),e=Math.imul(L,vt),e=e+Math.imul(F,gt)|0,f=Math.imul(F,vt),s=s+Math.imul(G,_t)|0,e=e+Math.imul(G,It)|0,e=e+Math.imul(tt,_t)|0,f=f+Math.imul(tt,It)|0,s=s+Math.imul(Y,xt)|0,e=e+Math.imul(Y,St)|0,e=e+Math.imul(H,xt)|0,f=f+Math.imul(H,St)|0,s=s+Math.imul(U,kt)|0,e=e+Math.imul(U,At)|0,e=e+Math.imul(Z,kt)|0,f=f+Math.imul(Z,At)|0,s=s+Math.imul(m,Tt)|0,e=e+Math.imul(m,Pt)|0,e=e+Math.imul(I,Tt)|0,f=f+Math.imul(I,Pt)|0;var Ht=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(Ht>>>26)|0,Ht&=67108863,s=Math.imul(J,gt),e=Math.imul(J,vt),e=e+Math.imul(Q,gt)|0,f=Math.imul(Q,vt),s=s+Math.imul(L,_t)|0,e=e+Math.imul(L,It)|0,e=e+Math.imul(F,_t)|0,f=f+Math.imul(F,It)|0,s=s+Math.imul(G,xt)|0,e=e+Math.imul(G,St)|0,e=e+Math.imul(tt,xt)|0,f=f+Math.imul(tt,St)|0,s=s+Math.imul(Y,kt)|0,e=e+Math.imul(Y,At)|0,e=e+Math.imul(H,kt)|0,f=f+Math.imul(H,At)|0,s=s+Math.imul(U,Tt)|0,e=e+Math.imul(U,Pt)|0,e=e+Math.imul(Z,Tt)|0,f=f+Math.imul(Z,Pt)|0,s=s+Math.imul(m,Et)|0,e=e+Math.imul(m,q)|0,e=e+Math.imul(I,Et)|0,f=f+Math.imul(I,q)|0;var Yt=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,s=Math.imul(C,gt),e=Math.imul(C,vt),e=e+Math.imul(K,gt)|0,f=Math.imul(K,vt),s=s+Math.imul(J,_t)|0,e=e+Math.imul(J,It)|0,e=e+Math.imul(Q,_t)|0,f=f+Math.imul(Q,It)|0,s=s+Math.imul(L,xt)|0,e=e+Math.imul(L,St)|0,e=e+Math.imul(F,xt)|0,f=f+Math.imul(F,St)|0,s=s+Math.imul(G,kt)|0,e=e+Math.imul(G,At)|0,e=e+Math.imul(tt,kt)|0,f=f+Math.imul(tt,At)|0,s=s+Math.imul(Y,Tt)|0,e=e+Math.imul(Y,Pt)|0,e=e+Math.imul(H,Tt)|0,f=f+Math.imul(H,Pt)|0,s=s+Math.imul(U,Et)|0,e=e+Math.imul(U,q)|0,e=e+Math.imul(Z,Et)|0,f=f+Math.imul(Z,q)|0,s=s+Math.imul(m,X)|0,e=e+Math.imul(m,et)|0,e=e+Math.imul(I,X)|0,f=f+Math.imul(I,et)|0;var Xt=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(Xt>>>26)|0,Xt&=67108863,s=Math.imul(V,gt),e=Math.imul(V,vt),e=e+Math.imul(it,gt)|0,f=Math.imul(it,vt),s=s+Math.imul(C,_t)|0,e=e+Math.imul(C,It)|0,e=e+Math.imul(K,_t)|0,f=f+Math.imul(K,It)|0,s=s+Math.imul(J,xt)|0,e=e+Math.imul(J,St)|0,e=e+Math.imul(Q,xt)|0,f=f+Math.imul(Q,St)|0,s=s+Math.imul(L,kt)|0,e=e+Math.imul(L,At)|0,e=e+Math.imul(F,kt)|0,f=f+Math.imul(F,At)|0,s=s+Math.imul(G,Tt)|0,e=e+Math.imul(G,Pt)|0,e=e+Math.imul(tt,Tt)|0,f=f+Math.imul(tt,Pt)|0,s=s+Math.imul(Y,Et)|0,e=e+Math.imul(Y,q)|0,e=e+Math.imul(H,Et)|0,f=f+Math.imul(H,q)|0,s=s+Math.imul(U,X)|0,e=e+Math.imul(U,et)|0,e=e+Math.imul(Z,X)|0,f=f+Math.imul(Z,et)|0,s=s+Math.imul(m,ct)|0,e=e+Math.imul(m,mt)|0,e=e+Math.imul(I,ct)|0,f=f+Math.imul(I,mt)|0;var Qt=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,s=Math.imul(pt,gt),e=Math.imul(pt,vt),e=e+Math.imul(yt,gt)|0,f=Math.imul(yt,vt),s=s+Math.imul(V,_t)|0,e=e+Math.imul(V,It)|0,e=e+Math.imul(it,_t)|0,f=f+Math.imul(it,It)|0,s=s+Math.imul(C,xt)|0,e=e+Math.imul(C,St)|0,e=e+Math.imul(K,xt)|0,f=f+Math.imul(K,St)|0,s=s+Math.imul(J,kt)|0,e=e+Math.imul(J,At)|0,e=e+Math.imul(Q,kt)|0,f=f+Math.imul(Q,At)|0,s=s+Math.imul(L,Tt)|0,e=e+Math.imul(L,Pt)|0,e=e+Math.imul(F,Tt)|0,f=f+Math.imul(F,Pt)|0,s=s+Math.imul(G,Et)|0,e=e+Math.imul(G,q)|0,e=e+Math.imul(tt,Et)|0,f=f+Math.imul(tt,q)|0,s=s+Math.imul(Y,X)|0,e=e+Math.imul(Y,et)|0,e=e+Math.imul(H,X)|0,f=f+Math.imul(H,et)|0,s=s+Math.imul(U,ct)|0,e=e+Math.imul(U,mt)|0,e=e+Math.imul(Z,ct)|0,f=f+Math.imul(Z,mt)|0,s=s+Math.imul(m,Rt)|0,e=e+Math.imul(m,qt)|0,e=e+Math.imul(I,Rt)|0,f=f+Math.imul(I,qt)|0;var te=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(te>>>26)|0,te&=67108863,s=Math.imul(dt,gt),e=Math.imul(dt,vt),e=e+Math.imul(bt,gt)|0,f=Math.imul(bt,vt),s=s+Math.imul(pt,_t)|0,e=e+Math.imul(pt,It)|0,e=e+Math.imul(yt,_t)|0,f=f+Math.imul(yt,It)|0,s=s+Math.imul(V,xt)|0,e=e+Math.imul(V,St)|0,e=e+Math.imul(it,xt)|0,f=f+Math.imul(it,St)|0,s=s+Math.imul(C,kt)|0,e=e+Math.imul(C,At)|0,e=e+Math.imul(K,kt)|0,f=f+Math.imul(K,At)|0,s=s+Math.imul(J,Tt)|0,e=e+Math.imul(J,Pt)|0,e=e+Math.imul(Q,Tt)|0,f=f+Math.imul(Q,Pt)|0,s=s+Math.imul(L,Et)|0,e=e+Math.imul(L,q)|0,e=e+Math.imul(F,Et)|0,f=f+Math.imul(F,q)|0,s=s+Math.imul(G,X)|0,e=e+Math.imul(G,et)|0,e=e+Math.imul(tt,X)|0,f=f+Math.imul(tt,et)|0,s=s+Math.imul(Y,ct)|0,e=e+Math.imul(Y,mt)|0,e=e+Math.imul(H,ct)|0,f=f+Math.imul(H,mt)|0,s=s+Math.imul(U,Rt)|0,e=e+Math.imul(U,qt)|0,e=e+Math.imul(Z,Rt)|0,f=f+Math.imul(Z,qt)|0,s=s+Math.imul(m,Bt)|0,e=e+Math.imul(m,wt)|0,e=e+Math.imul(I,Bt)|0,f=f+Math.imul(I,wt)|0;var ee=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(ee>>>26)|0,ee&=67108863,s=Math.imul(dt,_t),e=Math.imul(dt,It),e=e+Math.imul(bt,_t)|0,f=Math.imul(bt,It),s=s+Math.imul(pt,xt)|0,e=e+Math.imul(pt,St)|0,e=e+Math.imul(yt,xt)|0,f=f+Math.imul(yt,St)|0,s=s+Math.imul(V,kt)|0,e=e+Math.imul(V,At)|0,e=e+Math.imul(it,kt)|0,f=f+Math.imul(it,At)|0,s=s+Math.imul(C,Tt)|0,e=e+Math.imul(C,Pt)|0,e=e+Math.imul(K,Tt)|0,f=f+Math.imul(K,Pt)|0,s=s+Math.imul(J,Et)|0,e=e+Math.imul(J,q)|0,e=e+Math.imul(Q,Et)|0,f=f+Math.imul(Q,q)|0,s=s+Math.imul(L,X)|0,e=e+Math.imul(L,et)|0,e=e+Math.imul(F,X)|0,f=f+Math.imul(F,et)|0,s=s+Math.imul(G,ct)|0,e=e+Math.imul(G,mt)|0,e=e+Math.imul(tt,ct)|0,f=f+Math.imul(tt,mt)|0,s=s+Math.imul(Y,Rt)|0,e=e+Math.imul(Y,qt)|0,e=e+Math.imul(H,Rt)|0,f=f+Math.imul(H,qt)|0,s=s+Math.imul(U,Bt)|0,e=e+Math.imul(U,wt)|0,e=e+Math.imul(Z,Bt)|0,f=f+Math.imul(Z,wt)|0;var re=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(re>>>26)|0,re&=67108863,s=Math.imul(dt,xt),e=Math.imul(dt,St),e=e+Math.imul(bt,xt)|0,f=Math.imul(bt,St),s=s+Math.imul(pt,kt)|0,e=e+Math.imul(pt,At)|0,e=e+Math.imul(yt,kt)|0,f=f+Math.imul(yt,At)|0,s=s+Math.imul(V,Tt)|0,e=e+Math.imul(V,Pt)|0,e=e+Math.imul(it,Tt)|0,f=f+Math.imul(it,Pt)|0,s=s+Math.imul(C,Et)|0,e=e+Math.imul(C,q)|0,e=e+Math.imul(K,Et)|0,f=f+Math.imul(K,q)|0,s=s+Math.imul(J,X)|0,e=e+Math.imul(J,et)|0,e=e+Math.imul(Q,X)|0,f=f+Math.imul(Q,et)|0,s=s+Math.imul(L,ct)|0,e=e+Math.imul(L,mt)|0,e=e+Math.imul(F,ct)|0,f=f+Math.imul(F,mt)|0,s=s+Math.imul(G,Rt)|0,e=e+Math.imul(G,qt)|0,e=e+Math.imul(tt,Rt)|0,f=f+Math.imul(tt,qt)|0,s=s+Math.imul(Y,Bt)|0,e=e+Math.imul(Y,wt)|0,e=e+Math.imul(H,Bt)|0,f=f+Math.imul(H,wt)|0;var ie=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(ie>>>26)|0,ie&=67108863,s=Math.imul(dt,kt),e=Math.imul(dt,At),e=e+Math.imul(bt,kt)|0,f=Math.imul(bt,At),s=s+Math.imul(pt,Tt)|0,e=e+Math.imul(pt,Pt)|0,e=e+Math.imul(yt,Tt)|0,f=f+Math.imul(yt,Pt)|0,s=s+Math.imul(V,Et)|0,e=e+Math.imul(V,q)|0,e=e+Math.imul(it,Et)|0,f=f+Math.imul(it,q)|0,s=s+Math.imul(C,X)|0,e=e+Math.imul(C,et)|0,e=e+Math.imul(K,X)|0,f=f+Math.imul(K,et)|0,s=s+Math.imul(J,ct)|0,e=e+Math.imul(J,mt)|0,e=e+Math.imul(Q,ct)|0,f=f+Math.imul(Q,mt)|0,s=s+Math.imul(L,Rt)|0,e=e+Math.imul(L,qt)|0,e=e+Math.imul(F,Rt)|0,f=f+Math.imul(F,qt)|0,s=s+Math.imul(G,Bt)|0,e=e+Math.imul(G,wt)|0,e=e+Math.imul(tt,Bt)|0,f=f+Math.imul(tt,wt)|0;var ne=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(ne>>>26)|0,ne&=67108863,s=Math.imul(dt,Tt),e=Math.imul(dt,Pt),e=e+Math.imul(bt,Tt)|0,f=Math.imul(bt,Pt),s=s+Math.imul(pt,Et)|0,e=e+Math.imul(pt,q)|0,e=e+Math.imul(yt,Et)|0,f=f+Math.imul(yt,q)|0,s=s+Math.imul(V,X)|0,e=e+Math.imul(V,et)|0,e=e+Math.imul(it,X)|0,f=f+Math.imul(it,et)|0,s=s+Math.imul(C,ct)|0,e=e+Math.imul(C,mt)|0,e=e+Math.imul(K,ct)|0,f=f+Math.imul(K,mt)|0,s=s+Math.imul(J,Rt)|0,e=e+Math.imul(J,qt)|0,e=e+Math.imul(Q,Rt)|0,f=f+Math.imul(Q,qt)|0,s=s+Math.imul(L,Bt)|0,e=e+Math.imul(L,wt)|0,e=e+Math.imul(F,Bt)|0,f=f+Math.imul(F,wt)|0;var oe=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(oe>>>26)|0,oe&=67108863,s=Math.imul(dt,Et),e=Math.imul(dt,q),e=e+Math.imul(bt,Et)|0,f=Math.imul(bt,q),s=s+Math.imul(pt,X)|0,e=e+Math.imul(pt,et)|0,e=e+Math.imul(yt,X)|0,f=f+Math.imul(yt,et)|0,s=s+Math.imul(V,ct)|0,e=e+Math.imul(V,mt)|0,e=e+Math.imul(it,ct)|0,f=f+Math.imul(it,mt)|0,s=s+Math.imul(C,Rt)|0,e=e+Math.imul(C,qt)|0,e=e+Math.imul(K,Rt)|0,f=f+Math.imul(K,qt)|0,s=s+Math.imul(J,Bt)|0,e=e+Math.imul(J,wt)|0,e=e+Math.imul(Q,Bt)|0,f=f+Math.imul(Q,wt)|0;var ae=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(ae>>>26)|0,ae&=67108863,s=Math.imul(dt,X),e=Math.imul(dt,et),e=e+Math.imul(bt,X)|0,f=Math.imul(bt,et),s=s+Math.imul(pt,ct)|0,e=e+Math.imul(pt,mt)|0,e=e+Math.imul(yt,ct)|0,f=f+Math.imul(yt,mt)|0,s=s+Math.imul(V,Rt)|0,e=e+Math.imul(V,qt)|0,e=e+Math.imul(it,Rt)|0,f=f+Math.imul(it,qt)|0,s=s+Math.imul(C,Bt)|0,e=e+Math.imul(C,wt)|0,e=e+Math.imul(K,Bt)|0,f=f+Math.imul(K,wt)|0;var se=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(se>>>26)|0,se&=67108863,s=Math.imul(dt,ct),e=Math.imul(dt,mt),e=e+Math.imul(bt,ct)|0,f=Math.imul(bt,mt),s=s+Math.imul(pt,Rt)|0,e=e+Math.imul(pt,qt)|0,e=e+Math.imul(yt,Rt)|0,f=f+Math.imul(yt,qt)|0,s=s+Math.imul(V,Bt)|0,e=e+Math.imul(V,wt)|0,e=e+Math.imul(it,Bt)|0,f=f+Math.imul(it,wt)|0;var he=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(he>>>26)|0,he&=67108863,s=Math.imul(dt,Rt),e=Math.imul(dt,qt),e=e+Math.imul(bt,Rt)|0,f=Math.imul(bt,qt),s=s+Math.imul(pt,Bt)|0,e=e+Math.imul(pt,wt)|0,e=e+Math.imul(yt,Bt)|0,f=f+Math.imul(yt,wt)|0;var fe=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(fe>>>26)|0,fe&=67108863,s=Math.imul(dt,Bt),e=Math.imul(dt,wt),e=e+Math.imul(bt,Bt)|0,f=Math.imul(bt,wt);var le=(d+s|0)+((e&8191)<<13)|0;if(d=(f+(e>>>13)|0)+(le>>>26)|0,le&=67108863,u[0]=Vt,u[1]=Ut,u[2]=Ct,u[3]=Wt,u[4]=Ht,u[5]=Yt,u[6]=Xt,u[7]=Qt,u[8]=te,u[9]=ee,u[10]=re,u[11]=ie,u[12]=ne,u[13]=oe,u[14]=ae,u[15]=se,u[16]=he,u[17]=fe,u[18]=le,d!==0)u[19]=d,o.length++;return o};if(!Math.imul)B=x;function T(t,i,o){o.negative=i.negative^t.negative,o.length=t.length+i.length;var r=0,n=0;for(var u=0;u<o.length-1;u++){var d=n;n=0;var s=r&67108863,e=Math.min(u,i.length-1);for(var f=Math.max(0,u-t.length+1);f<=e;f++){var _=u-f,m=t.words[_]|0,I=i.words[f]|0,N=m*I,U=N&67108863;d=d+(N/67108864|0)|0,U=U+s|0,s=U&67108863,d=d+(U>>>26)|0,n+=d>>>26,d&=67108863}o.words[u]=s,r=d,d=n}if(r!==0)o.words[u]=r;else o.length--;return o.strip()}function k(t,i,o){var r=new P;return r.mulp(t,i,o)}a.prototype.mulTo=function(t,i){var o,r=this.length+t.length;if(this.length===10&&t.length===10)o=B(this,t,i);else if(r<63)o=x(this,t,i);else if(r<1024)o=T(this,t,i);else o=k(this,t,i);return o};function P(t,i){this.x=t,this.y=i}P.prototype.makeRBT=function(t){var i=Array(t),o=a.prototype._countBits(t)-1;for(var r=0;r<t;r++)i[r]=this.revBin(r,o,t);return i},P.prototype.revBin=function(t,i,o){if(t===0||t===o-1)return t;var r=0;for(var n=0;n<i;n++)r|=(t&1)<<i-n-1,t>>=1;return r},P.prototype.permute=function(t,i,o,r,n,u){for(var d=0;d<u;d++)r[d]=i[t[d]],n[d]=o[t[d]]},P.prototype.transform=function(t,i,o,r,n,u){this.permute(u,t,i,o,r,n);for(var d=1;d<n;d<<=1){var s=d<<1,e=Math.cos(2*Math.PI/s),f=Math.sin(2*Math.PI/s);for(var _=0;_<n;_+=s){var m=e,I=f;for(var N=0;N<d;N++){var U=o[_+N],Z=r[_+N],ut=o[_+N+d],Y=r[_+N+d],H=m*ut-I*Y;if(Y=m*Y+I*ut,ut=H,o[_+N]=U+ut,r[_+N]=Z+Y,o[_+N+d]=U-ut,r[_+N+d]=Z-Y,N!==s)H=e*m-f*I,I=e*I+f*m,m=H}}}},P.prototype.guessLen13b=function(t,i){var o=Math.max(i,t)|1,r=o&1,n=0;for(o=o/2|0;o;o=o>>>1)n++;return 1<<n+1+r},P.prototype.conjugate=function(t,i,o){if(o<=1)return;for(var r=0;r<o/2;r++){var n=t[r];t[r]=t[o-r-1],t[o-r-1]=n,n=i[r],i[r]=-i[o-r-1],i[o-r-1]=-n}},P.prototype.normalize13b=function(t,i){var o=0;for(var r=0;r<i/2;r++){var n=Math.round(t[2*r+1]/i)*8192+Math.round(t[2*r]/i)+o;if(t[r]=n&67108863,n<67108864)o=0;else o=n/67108864|0}return t},P.prototype.convert13b=function(t,i,o,r){var n=0;for(var u=0;u<i;u++)n=n+(t[u]|0),o[2*u]=n&8191,n=n>>>13,o[2*u+1]=n&8191,n=n>>>13;for(u=2*i;u<r;++u)o[u]=0;p(n===0),p((n&-8192)===0)},P.prototype.stub=function(t){var i=Array(t);for(var o=0;o<t;o++)i[o]=0;return i},P.prototype.mulp=function(t,i,o){var r=2*this.guessLen13b(t.length,i.length),n=this.makeRBT(r),u=this.stub(r),d=Array(r),s=Array(r),e=Array(r),f=Array(r),_=Array(r),m=Array(r),I=o.words;I.length=r,this.convert13b(t.words,t.length,d,r),this.convert13b(i.words,i.length,f,r),this.transform(d,u,s,e,r,n),this.transform(f,u,_,m,r,n);for(var N=0;N<r;N++){var U=s[N]*_[N]-e[N]*m[N];e[N]=s[N]*m[N]+e[N]*_[N],s[N]=U}return this.conjugate(s,e,r),this.transform(s,e,I,u,r,n),this.conjugate(I,u,r),this.normalize13b(I,r),o.negative=t.negative^i.negative,o.length=t.length+i.length,o.strip()},a.prototype.mul=function(t){var i=new a(null);return i.words=Array(this.length+t.length),this.mulTo(t,i)},a.prototype.mulf=function(t){var i=new a(null);return i.words=Array(this.length+t.length),k(this,t,i)},a.prototype.imul=function(t){return this.clone().mulTo(t,this)},a.prototype.imuln=function(t){p(typeof t==="number"),p(t<67108864);var i=0;for(var o=0;o<this.length;o++){var r=(this.words[o]|0)*t,n=(r&67108863)+(i&67108863);i>>=26,i+=r/67108864|0,i+=n>>>26,this.words[o]=n&67108863}if(i!==0)this.words[o]=i,this.length++;return this.length=t===0?1:this.length,this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var i=A(t);if(i.length===0)return new a(1);var o=this;for(var r=0;r<i.length;r++,o=o.sqr())if(i[r]!==0)break;if(++r<i.length)for(var n=o.sqr();r<i.length;r++,n=n.sqr()){if(i[r]===0)continue;o=o.mul(n)}return o},a.prototype.iushln=function(t){p(typeof t==="number"&&t>=0);var i=t%26,o=(t-i)/26,r=67108863>>>26-i<<26-i,n;if(i!==0){var u=0;for(n=0;n<this.length;n++){var d=this.words[n]&r,s=(this.words[n]|0)-d<<i;this.words[n]=s|u,u=d>>>26-i}if(u)this.words[n]=u,this.length++}if(o!==0){for(n=this.length-1;n>=0;n--)this.words[n+o]=this.words[n];for(n=0;n<o;n++)this.words[n]=0;this.length+=o}return this.strip()},a.prototype.ishln=function(t){return p(this.negative===0),this.iushln(t)},a.prototype.iushrn=function(t,i,o){p(typeof t==="number"&&t>=0);var r;if(i)r=(i-i%26)/26;else r=0;var n=t%26,u=Math.min((t-n)/26,this.length),d=67108863^67108863>>>n<<n,s=o;if(r-=u,r=Math.max(0,r),s){for(var e=0;e<u;e++)s.words[e]=this.words[e];s.length=u}if(u===0);else if(this.length>u){this.length-=u;for(e=0;e<this.length;e++)this.words[e]=this.words[e+u]}else this.words[0]=0,this.length=1;var f=0;for(e=this.length-1;e>=0&&(f!==0||e>=r);e--){var _=this.words[e]|0;this.words[e]=f<<26-n|_>>>n,f=_&d}if(s&&f!==0)s.words[s.length++]=f;if(this.length===0)this.words[0]=0,this.length=1;return this.strip()},a.prototype.ishrn=function(t,i,o){return p(this.negative===0),this.iushrn(t,i,o)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){p(typeof t==="number"&&t>=0);var i=t%26,o=(t-i)/26,r=1<<i;if(this.length<=o)return!1;var n=this.words[o];return!!(n&r)},a.prototype.imaskn=function(t){p(typeof t==="number"&&t>=0);var i=t%26,o=(t-i)/26;if(p(this.negative===0,"imaskn works only with positive numbers"),this.length<=o)return this;if(i!==0)o++;if(this.length=Math.min(o,this.length),i!==0){var r=67108863^67108863>>>i<<i;this.words[this.length-1]&=r}return this.strip()},a.prototype.maskn=function(t){return this.clone().imaskn(t)},a.prototype.iaddn=function(t){if(p(typeof t==="number"),p(t<67108864),t<0)return this.isubn(-t);if(this.negative!==0){if(this.length===1&&(this.words[0]|0)<t)return this.words[0]=t-(this.words[0]|0),this.negative=0,this;return this.negative=0,this.isubn(t),this.negative=1,this}return this._iaddn(t)},a.prototype._iaddn=function(t){this.words[0]+=t;for(var i=0;i<this.length&&this.words[i]>=67108864;i++)if(this.words[i]-=67108864,i===this.length-1)this.words[i+1]=1;else this.words[i+1]++;return this.length=Math.max(this.length,i+1),this},a.prototype.isubn=function(t){if(p(typeof t==="number"),p(t<67108864),t<0)return this.iaddn(-t);if(this.negative!==0)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var i=0;i<this.length&&this.words[i]<0;i++)this.words[i]+=67108864,this.words[i+1]-=1;return this.strip()},a.prototype.addn=function(t){return this.clone().iaddn(t)},a.prototype.subn=function(t){return this.clone().isubn(t)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(t,i,o){var r=t.length+o,n;this._expand(r);var u,d=0;for(n=0;n<t.length;n++){u=(this.words[n+o]|0)+d;var s=(t.words[n]|0)*i;u-=s&67108863,d=(u>>26)-(s/67108864|0),this.words[n+o]=u&67108863}for(;n<this.length-o;n++)u=(this.words[n+o]|0)+d,d=u>>26,this.words[n+o]=u&67108863;if(d===0)return this.strip();p(d===-1),d=0;for(n=0;n<this.length;n++)u=-(this.words[n]|0)+d,d=u>>26,this.words[n]=u&67108863;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,i){var o=this.length-t.length,r=this.clone(),n=t,u=n.words[n.length-1]|0,d=this._countBits(u);if(o=26-d,o!==0)n=n.ushln(o),r.iushln(o),u=n.words[n.length-1]|0;var s=r.length-n.length,e;if(i!=="mod"){e=new a(null),e.length=s+1,e.words=Array(e.length);for(var f=0;f<e.length;f++)e.words[f]=0}var _=r.clone()._ishlnsubmul(n,1,s);if(_.negative===0){if(r=_,e)e.words[s]=1}for(var m=s-1;m>=0;m--){var I=(r.words[n.length+m]|0)*67108864+(r.words[n.length+m-1]|0);I=Math.min(I/u|0,67108863),r._ishlnsubmul(n,I,m);while(r.negative!==0)if(I--,r.negative=0,r._ishlnsubmul(n,1,m),!r.isZero())r.negative^=1;if(e)e.words[m]=I}if(e)e.strip();if(r.strip(),i!=="div"&&o!==0)r.iushrn(o);return{div:e||null,mod:r}},a.prototype.divmod=function(t,i,o){if(p(!t.isZero()),this.isZero())return{div:new a(0),mod:new a(0)};var r,n,u;if(this.negative!==0&&t.negative===0){if(u=this.neg().divmod(t,i),i!=="mod")r=u.div.neg();if(i!=="div"){if(n=u.mod.neg(),o&&n.negative!==0)n.iadd(t)}return{div:r,mod:n}}if(this.negative===0&&t.negative!==0){if(u=this.divmod(t.neg(),i),i!=="mod")r=u.div.neg();return{div:r,mod:u.mod}}if((this.negative&t.negative)!==0){if(u=this.neg().divmod(t.neg(),i),i!=="div"){if(n=u.mod.neg(),o&&n.negative!==0)n.isub(t)}return{div:u.div,mod:n}}if(t.length>this.length||this.cmp(t)<0)return{div:new a(0),mod:this};if(t.length===1){if(i==="div")return{div:this.divn(t.words[0]),mod:null};if(i==="mod")return{div:null,mod:new a(this.modn(t.words[0]))};return{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}}return this._wordDiv(t,i)},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var i=this.divmod(t);if(i.mod.isZero())return i.div;var o=i.div.negative!==0?i.mod.isub(t):i.mod,r=t.ushrn(1),n=t.andln(1),u=o.cmp(r);if(u<0||n===1&&u===0)return i.div;return i.div.negative!==0?i.div.isubn(1):i.div.iaddn(1)},a.prototype.modn=function(t){p(t<=67108863);var i=67108864%t,o=0;for(var r=this.length-1;r>=0;r--)o=(i*o+(this.words[r]|0))%t;return o},a.prototype.idivn=function(t){p(t<=67108863);var i=0;for(var o=this.length-1;o>=0;o--){var r=(this.words[o]|0)+i*67108864;this.words[o]=r/t|0,i=r%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){p(t.negative===0),p(!t.isZero());var i=this,o=t.clone();if(i.negative!==0)i=i.umod(t);else i=i.clone();var r=new a(1),n=new a(0),u=new a(0),d=new a(1),s=0;while(i.isEven()&&o.isEven())i.iushrn(1),o.iushrn(1),++s;var e=o.clone(),f=i.clone();while(!i.isZero()){for(var _=0,m=1;(i.words[0]&m)===0&&_<26;++_,m<<=1);if(_>0){i.iushrn(_);while(_-- >0){if(r.isOdd()||n.isOdd())r.iadd(e),n.isub(f);r.iushrn(1),n.iushrn(1)}}for(var I=0,N=1;(o.words[0]&N)===0&&I<26;++I,N<<=1);if(I>0){o.iushrn(I);while(I-- >0){if(u.isOdd()||d.isOdd())u.iadd(e),d.isub(f);u.iushrn(1),d.iushrn(1)}}if(i.cmp(o)>=0)i.isub(o),r.isub(u),n.isub(d);else o.isub(i),u.isub(r),d.isub(n)}return{a:u,b:d,gcd:o.iushln(s)}},a.prototype._invmp=function(t){p(t.negative===0),p(!t.isZero());var i=this,o=t.clone();if(i.negative!==0)i=i.umod(t);else i=i.clone();var r=new a(1),n=new a(0),u=o.clone();while(i.cmpn(1)>0&&o.cmpn(1)>0){for(var d=0,s=1;(i.words[0]&s)===0&&d<26;++d,s<<=1);if(d>0){i.iushrn(d);while(d-- >0){if(r.isOdd())r.iadd(u);r.iushrn(1)}}for(var e=0,f=1;(o.words[0]&f)===0&&e<26;++e,f<<=1);if(e>0){o.iushrn(e);while(e-- >0){if(n.isOdd())n.iadd(u);n.iushrn(1)}}if(i.cmp(o)>=0)i.isub(o),r.isub(n);else o.isub(i),n.isub(r)}var _;if(i.cmpn(1)===0)_=r;else _=n;if(_.cmpn(0)<0)_.iadd(t);return _},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var i=this.clone(),o=t.clone();i.negative=0,o.negative=0;for(var r=0;i.isEven()&&o.isEven();r++)i.iushrn(1),o.iushrn(1);do{while(i.isEven())i.iushrn(1);while(o.isEven())o.iushrn(1);var n=i.cmp(o);if(n<0){var u=i;i=o,o=u}else if(n===0||o.cmpn(1)===0)break;i.isub(o)}while(!0);return o.iushln(r)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return(this.words[0]&1)===0},a.prototype.isOdd=function(){return(this.words[0]&1)===1},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){p(typeof t==="number");var i=t%26,o=(t-i)/26,r=1<<i;if(this.length<=o)return this._expand(o+1),this.words[o]|=r,this;var n=r;for(var u=o;n!==0&&u<this.length;u++){var d=this.words[u]|0;d+=n,n=d>>>26,d&=67108863,this.words[u]=d}if(n!==0)this.words[u]=n,this.length++;return this},a.prototype.isZero=function(){return this.length===1&&this.words[0]===0},a.prototype.cmpn=function(t){var i=t<0;if(this.negative!==0&&!i)return-1;if(this.negative===0&&i)return 1;this.strip();var o;if(this.length>1)o=1;else{if(i)t=-t;p(t<=67108863,"Number is too big");var r=this.words[0]|0;o=r===t?0:r<t?-1:1}if(this.negative!==0)return-o|0;return o},a.prototype.cmp=function(t){if(this.negative!==0&&t.negative===0)return-1;if(this.negative===0&&t.negative!==0)return 1;var i=this.ucmp(t);if(this.negative!==0)return-i|0;return i},a.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;var i=0;for(var o=this.length-1;o>=0;o--){var r=this.words[o]|0,n=t.words[o]|0;if(r===n)continue;if(r<n)i=-1;else if(r>n)i=1;break}return i},a.prototype.gtn=function(t){return this.cmpn(t)===1},a.prototype.gt=function(t){return this.cmp(t)===1},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return this.cmpn(t)===-1},a.prototype.lt=function(t){return this.cmp(t)===-1},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return this.cmpn(t)===0},a.prototype.eq=function(t){return this.cmp(t)===0},a.red=function(t){return new j(t)},a.prototype.toRed=function(t){return p(!this.red,"Already a number in reduction context"),p(this.negative===0,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return p(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return p(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return p(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return p(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return p(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return p(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return p(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return p(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return p(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return p(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return p(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return p(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return p(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var D={k256:null,p224:null,p192:null,p25519:null};function O(t,i){this.name=t,this.p=new a(i,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}O.prototype._tmp=function(){var t=new a(null);return t.words=Array(Math.ceil(this.n/13)),t},O.prototype.ireduce=function(t){var i=t,o;do this.split(i,this.tmp),i=this.imulK(i),i=i.iadd(this.tmp),o=i.bitLength();while(o>this.n);var r=o<this.n?-1:i.ucmp(this.p);if(r===0)i.words[0]=0,i.length=1;else if(r>0)i.isub(this.p);else if(i.strip!==void 0)i.strip();else i._strip();return i},O.prototype.split=function(t,i){t.iushrn(this.n,0,i)},O.prototype.imulK=function(t){return t.imul(this.k)};function W(){O.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}M(W,O),W.prototype.split=function(t,i){var o=4194303,r=Math.min(t.length,9);for(var n=0;n<r;n++)i.words[n]=t.words[n];if(i.length=r,t.length<=9){t.words[0]=0,t.length=1;return}var u=t.words[9];i.words[i.length++]=u&o;for(n=10;n<t.length;n++){var d=t.words[n]|0;t.words[n-10]=(d&o)<<4|u>>>22,u=d}if(u>>>=22,t.words[n-10]=u,u===0&&t.length>10)t.length-=10;else t.length-=9},W.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;var i=0;for(var o=0;o<t.length;o++){var r=t.words[o]|0;i+=r*977,t.words[o]=i&67108863,i=r*64+(i/67108864|0)}if(t.words[t.length-1]===0){if(t.length--,t.words[t.length-1]===0)t.length--}return t};function at(){O.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}M(at,O);function ft(){O.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}M(ft,O);function st(){O.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}M(st,O),st.prototype.imulK=function(t){var i=0;for(var o=0;o<t.length;o++){var r=(t.words[o]|0)*19+i,n=r&67108863;r>>>=26,t.words[o]=n,i=r}if(i!==0)t.words[t.length++]=i;return t},a._prime=function(t){if(D[t])return D[t];var i;if(t==="k256")i=new W;else if(t==="p224")i=new at;else if(t==="p192")i=new ft;else if(t==="p25519")i=new st;else throw Error("Unknown prime "+t);return D[t]=i,i};function j(t){if(typeof t==="string"){var i=a._prime(t);this.m=i.p,this.prime=i}else p(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}j.prototype._verify1=function(t){p(t.negative===0,"red works only with positives"),p(t.red,"red works only with red numbers")},j.prototype._verify2=function(t,i){p((t.negative|i.negative)===0,"red works only with positives"),p(t.red&&t.red===i.red,"red works only with red numbers")},j.prototype.imod=function(t){if(this.prime)return this.prime.ireduce(t)._forceRed(this);return t.umod(this.m)._forceRed(this)},j.prototype.neg=function(t){if(t.isZero())return t.clone();return this.m.sub(t)._forceRed(this)},j.prototype.add=function(t,i){this._verify2(t,i);var o=t.add(i);if(o.cmp(this.m)>=0)o.isub(this.m);return o._forceRed(this)},j.prototype.iadd=function(t,i){this._verify2(t,i);var o=t.iadd(i);if(o.cmp(this.m)>=0)o.isub(this.m);return o},j.prototype.sub=function(t,i){this._verify2(t,i);var o=t.sub(i);if(o.cmpn(0)<0)o.iadd(this.m);return o._forceRed(this)},j.prototype.isub=function(t,i){this._verify2(t,i);var o=t.isub(i);if(o.cmpn(0)<0)o.iadd(this.m);return o},j.prototype.shl=function(t,i){return this._verify1(t),this.imod(t.ushln(i))},j.prototype.imul=function(t,i){return this._verify2(t,i),this.imod(t.imul(i))},j.prototype.mul=function(t,i){return this._verify2(t,i),this.imod(t.mul(i))},j.prototype.isqr=function(t){return this.imul(t,t.clone())},j.prototype.sqr=function(t){return this.mul(t,t)},j.prototype.sqrt=function(t){if(t.isZero())return t.clone();var i=this.m.andln(3);if(p(i%2===1),i===3){var o=this.m.add(new a(1)).iushrn(2);return this.pow(t,o)}var r=this.m.subn(1),n=0;while(!r.isZero()&&r.andln(1)===0)n++,r.iushrn(1);p(!r.isZero());var u=new a(1).toRed(this),d=u.redNeg(),s=this.m.subn(1).iushrn(1),e=this.m.bitLength();e=new a(2*e*e).toRed(this);while(this.pow(e,s).cmp(d)!==0)e.redIAdd(d);var f=this.pow(e,r),_=this.pow(t,r.addn(1).iushrn(1)),m=this.pow(t,r),I=n;while(m.cmp(u)!==0){var N=m;for(var U=0;N.cmp(u)!==0;U++)N=N.redSqr();p(U<I);var Z=this.pow(f,new a(1).iushln(I-U-1));_=_.redMul(Z),f=Z.redSqr(),m=m.redMul(f),I=U}return _},j.prototype.invm=function(t){var i=t._invmp(this.m);if(i.negative!==0)return i.negative=0,this.imod(i).redNeg();else return this.imod(i)},j.prototype.pow=function(t,i){if(i.isZero())return new a(1).toRed(this);if(i.cmpn(1)===0)return t.clone();var o=4,r=Array(1<<o);r[0]=new a(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var u=r[0],d=0,s=0,e=i.bitLength()%26;if(e===0)e=26;for(n=i.length-1;n>=0;n--){var f=i.words[n];for(var _=e-1;_>=0;_--){var m=f>>_&1;if(u!==r[0])u=this.sqr(u);if(m===0&&d===0){s=0;continue}if(d<<=1,d|=m,s++,s!==o&&(n!==0||_!==0))continue;u=this.mul(u,r[d]),s=0,d=0}e=26}return u},j.prototype.convertTo=function(t){var i=t.umod(this.m);return i===t?i.clone():i},j.prototype.convertFrom=function(t){var i=t.clone();return i.red=null,i},a.mont=function(t){return new rt(t)};function rt(t){if(j.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0)this.shift+=26-this.shift%26;this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}M(rt,j),rt.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},rt.prototype.convertFrom=function(t){var i=this.imod(t.mul(this.rinv));return i.red=null,i},rt.prototype.imul=function(t,i){if(t.isZero()||i.isZero())return t.words[0]=0,t.length=1,t;var o=t.imul(i),r=o.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=o.isub(r).iushrn(this.shift),u=n;if(n.cmp(this.m)>=0)u=n.isub(this.m);else if(n.cmpn(0)<0)u=n.iadd(this.m);return u._forceRed(this)},rt.prototype.mul=function(t,i){if(t.isZero()||i.isZero())return new a(0)._forceRed(this);var o=t.mul(i),r=o.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=o.isub(r).iushrn(this.shift),u=n;if(n.cmp(this.m)>=0)u=n.isub(this.m);else if(n.cmpn(0)<0)u=n.iadd(this.m);return u._forceRed(this)},rt.prototype.invm=function(t){var i=this.imod(t._invmp(this.m).mul(this.r2));return i._forceRed(this)}})(typeof l>"u"||l,h)}),Ds=ht((h,l)=>{var c=qs(),b=Ns();l.exports=function(E){return new M(E)};var p={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}};p.p224=p.secp224r1,p.p256=p.secp256r1=p.prime256v1,p.p192=p.secp192r1=p.prime192v1,p.p384=p.secp384r1,p.p521=p.secp521r1;function M(E){if(this.curveType=p[E],!this.curveType)this.curveType={name:E};this.curve=new c.ec(this.curveType.name),this.keys=void 0}M.prototype.generateKeys=function(E,R){return this.keys=this.curve.genKeyPair(),this.getPublicKey(E,R)},M.prototype.computeSecret=function(E,R,w){if(R=R||"utf8",!Buffer.isBuffer(E))E=new Buffer(E,R);var g=this.curve.keyFromPublic(E).getPublic(),y=g.mul(this.keys.getPrivate()).getX();return a(y,w,this.curveType.byteLength)},M.prototype.getPublicKey=function(E,R){var w=this.keys.getPublic(R==="compressed",!0);if(R==="hybrid")if(w[w.length-1]%2)w[0]=7;else w[0]=6;return a(w,E)},M.prototype.getPrivateKey=function(E){return a(this.keys.getPrivate(),E)},M.prototype.setPublicKey=function(E,R){if(R=R||"utf8",!Buffer.isBuffer(E))E=new Buffer(E,R);return this.keys._importPublic(E),this},M.prototype.setPrivateKey=function(E,R){if(R=R||"utf8",!Buffer.isBuffer(E))E=new Buffer(E,R);var w=new b(E);return w=w.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(w),this};function a(E,R,w){if(!Array.isArray(E))E=E.toArray();var g=new Buffer(E);if(w&&g.length<w){var y=new Buffer(w-g.length);y.fill(0),g=Buffer.concat([y,g])}if(!R)return g;else return g.toString(R)}}),Os=ht((h,l)=>{var c=(Ae(),jt(Re)).createECDH;l.exports=c||Ds()}),Ls=ht((h,l)=>{(function(c,b){function p(t,i){if(!t)throw Error(i||"Assertion failed")}function M(t,i){t.super_=i;var o=function(){};o.prototype=i.prototype,t.prototype=new o,t.prototype.constructor=t}function a(t,i,o){if(a.isBN(t))return t;if(this.negative=0,this.words=null,this.length=0,this.red=null,t!==null){if(i==="le"||i==="be")o=i,i=10;this._init(t||0,i||10,o||"be")}}if(typeof c==="object")c.exports=a;else b.BN=a;a.BN=a,a.wordSize=26;var E;try{if(typeof window<"u"&&typeof window.Buffer<"u")E=window.Buffer;else E=(ye(),jt(pe)).Buffer}catch(t){}a.isBN=function(t){if(t instanceof a)return!0;return t!==null&&typeof t==="object"&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,i){if(t.cmp(i)>0)return t;return i},a.min=function(t,i){if(t.cmp(i)<0)return t;return i},a.prototype._init=function(t,i,o){if(typeof t==="number")return this._initNumber(t,i,o);if(typeof t==="object")return this._initArray(t,i,o);if(i==="hex")i=16;p(i===(i|0)&&i>=2&&i<=36),t=t.toString().replace(/\s+/g,"");var r=0;if(t[0]==="-")r++,this.negative=1;if(r<t.length){if(i===16)this._parseHex(t,r,o);else if(this._parseBase(t,i,r),o==="le")this._initArray(this.toArray(),i,o)}},a.prototype._initNumber=function(t,i,o){if(t<0)this.negative=1,t=-t;if(t<67108864)this.words=[t&67108863],this.length=1;else if(t<4503599627370496)this.words=[t&67108863,t/67108864&67108863],this.length=2;else p(t<9007199254740992),this.words=[t&67108863,t/67108864&67108863,1],this.length=3;if(o!=="le")return;this._initArray(this.toArray(),i,o)},a.prototype._initArray=function(t,i,o){if(p(typeof t.length==="number"),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,u,d=0;if(o==="be"){for(r=t.length-1,n=0;r>=0;r-=3)if(u=t[r]|t[r-1]<<8|t[r-2]<<16,this.words[n]|=u<<d&67108863,this.words[n+1]=u>>>26-d&67108863,d+=24,d>=26)d-=26,n++}else if(o==="le"){for(r=0,n=0;r<t.length;r+=3)if(u=t[r]|t[r+1]<<8|t[r+2]<<16,this.words[n]|=u<<d&67108863,this.words[n+1]=u>>>26-d&67108863,d+=24,d>=26)d-=26,n++}return this.strip()};function R(t,i){var o=t.charCodeAt(i);if(o>=65&&o<=70)return o-55;else if(o>=97&&o<=102)return o-87;else return o-48&15}function w(t,i,o){var r=R(t,o);if(o-1>=i)r|=R(t,o-1)<<4;return r}a.prototype._parseHex=function(t,i,o){this.length=Math.ceil((t.length-i)/6),this.words=Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n=0,u=0,d;if(o==="be")for(r=t.length-1;r>=i;r-=2)if(d=w(t,i,r)<<n,this.words[u]|=d&67108863,n>=18)n-=18,u+=1,this.words[u]|=d>>>26;else n+=8;else{var s=t.length-i;for(r=s%2===0?i+1:i;r<t.length;r+=2)if(d=w(t,i,r)<<n,this.words[u]|=d&67108863,n>=18)n-=18,u+=1,this.words[u]|=d>>>26;else n+=8}this.strip()};function g(t,i,o,r){var n=0,u=Math.min(t.length,o);for(var d=i;d<u;d++){var s=t.charCodeAt(d)-48;if(n*=r,s>=49)n+=s-49+10;else if(s>=17)n+=s-17+10;else n+=s}return n}a.prototype._parseBase=function(t,i,o){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=i)r++;r--,n=n/i|0;var u=t.length-o,d=u%r,s=Math.min(u,u-d)+o,e=0;for(var f=o;f<s;f+=r)if(e=g(t,f,f+r,i),this.imuln(n),this.words[0]+e<67108864)this.words[0]+=e;else this._iaddn(e);if(d!==0){var _=1;e=g(t,f,t.length,i);for(f=0;f<d;f++)_*=i;if(this.imuln(_),this.words[0]+e<67108864)this.words[0]+=e;else this._iaddn(e)}this.strip()},a.prototype.copy=function(t){t.words=Array(this.length);for(var i=0;i<this.length;i++)t.words[i]=this.words[i];t.length=this.length,t.negative=this.negative,t.red=this.red},a.prototype.clone=function(){var t=new a(null);return this.copy(t),t},a.prototype._expand=function(t){while(this.length<t)this.words[this.length++]=0;return this},a.prototype.strip=function(){while(this.length>1&&this.words[this.length-1]===0)this.length--;return this._normSign()},a.prototype._normSign=function(){if(this.length===1&&this.words[0]===0)this.negative=0;return this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var y=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],v=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],S=[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];if(a.prototype.toString=function(t,i){t=t||10,i=i|0||1;var o;if(t===16||t==="hex"){o="";var r=0,n=0;for(var u=0;u<this.length;u++){var d=this.words[u],s=((d<<r|n)&16777215).toString(16);if(n=d>>>24-r&16777215,r+=2,r>=26)r-=26,u--;if(n!==0||u!==this.length-1)o=y[6-s.length]+s+o;else o=s+o}if(n!==0)o=n.toString(16)+o;while(o.length%i!==0)o="0"+o;if(this.negative!==0)o="-"+o;return o}if(t===(t|0)&&t>=2&&t<=36){var e=v[t],f=S[t];o="";var _=this.clone();_.negative=0;while(!_.isZero()){var m=_.modn(f).toString(t);if(_=_.idivn(f),!_.isZero())o=y[e-m.length]+m+o;else o=m+o}if(this.isZero())o="0"+o;while(o.length%i!==0)o="0"+o;if(this.negative!==0)o="-"+o;return o}p(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];if(this.length===2)t+=this.words[1]*67108864;else if(this.length===3&&this.words[2]===1)t+=4503599627370496+this.words[1]*67108864;else if(this.length>2)p(!1,"Number can only safely store up to 53 bits");return this.negative!==0?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,i){return p(typeof E<"u"),this.toArrayLike(E,t,i)},a.prototype.toArray=function(t,i){return this.toArrayLike(Array,t,i)},a.prototype.toArrayLike=function(t,i,o){var r=this.byteLength(),n=o||Math.max(1,r);p(r<=n,"byte array longer than desired length"),p(n>0,"Requested array length <= 0"),this.strip();var u=i==="le",d=new t(n),s,e,f=this.clone();if(!u){for(e=0;e<n-r;e++)d[e]=0;for(e=0;!f.isZero();e++)s=f.andln(255),f.iushrn(8),d[n-e-1]=s}else{for(e=0;!f.isZero();e++)s=f.andln(255),f.iushrn(8),d[e]=s;for(;e<n;e++)d[e]=0}return d},Math.clz32)a.prototype._countBits=function(t){return 32-Math.clz32(t)};else a.prototype._countBits=function(t){var i=t,o=0;if(i>=4096)o+=13,i>>>=13;if(i>=64)o+=7,i>>>=7;if(i>=8)o+=4,i>>>=4;if(i>=2)o+=2,i>>>=2;return o+i};a.prototype._zeroBits=function(t){if(t===0)return 26;var i=t,o=0;if((i&8191)===0)o+=13,i>>>=13;if((i&127)===0)o+=7,i>>>=7;if((i&15)===0)o+=4,i>>>=4;if((i&3)===0)o+=2,i>>>=2;if((i&1)===0)o++;return o},a.prototype.bitLength=function(){var t=this.words[this.length-1],i=this._countBits(t);return(this.length-1)*26+i};function A(t){var i=Array(t.bitLength());for(var o=0;o<i.length;o++){var r=o/26|0,n=o%26;i[o]=(t.words[r]&1<<n)>>>n}return i}a.prototype.zeroBits=function(){if(this.isZero())return 0;var t=0;for(var i=0;i<this.length;i++){var o=this._zeroBits(this.words[i]);if(t+=o,o!==26)break}return t},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(t){if(this.negative!==0)return this.abs().inotn(t).iaddn(1);return this.clone()},a.prototype.fromTwos=function(t){if(this.testn(t-1))return this.notn(t).iaddn(1).ineg();return this.clone()},a.prototype.isNeg=function(){return this.negative!==0},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){if(!this.isZero())this.negative^=1;return this},a.prototype.iuor=function(t){while(this.length<t.length)this.words[this.length++]=0;for(var i=0;i<t.length;i++)this.words[i]=this.words[i]|t.words[i];return this.strip()},a.prototype.ior=function(t){return p((this.negative|t.negative)===0),this.iuor(t)},a.prototype.or=function(t){if(this.length>t.length)return this.clone().ior(t);return t.clone().ior(this)},a.prototype.uor=function(t){if(this.length>t.length)return this.clone().iuor(t);return t.clone().iuor(this)},a.prototype.iuand=function(t){var i;if(this.length>t.length)i=t;else i=this;for(var o=0;o<i.length;o++)this.words[o]=this.words[o]&t.words[o];return this.length=i.length,this.strip()},a.prototype.iand=function(t){return p((this.negative|t.negative)===0),this.iuand(t)},a.prototype.and=function(t){if(this.length>t.length)return this.clone().iand(t);return t.clone().iand(this)},a.prototype.uand=function(t){if(this.length>t.length)return this.clone().iuand(t);return t.clone().iuand(this)},a.prototype.iuxor=function(t){var i,o;if(this.length>t.length)i=this,o=t;else i=t,o=this;for(var r=0;r<o.length;r++)this.words[r]=i.words[r]^o.words[r];if(this!==i)for(;r<i.length;r++)this.words[r]=i.words[r];return this.length=i.length,this.strip()},a.prototype.ixor=function(t){return p((this.negative|t.negative)===0),this.iuxor(t)},a.prototype.xor=function(t){if(this.length>t.length)return this.clone().ixor(t);return t.clone().ixor(this)},a.prototype.uxor=function(t){if(this.length>t.length)return this.clone().iuxor(t);return t.clone().iuxor(this)},a.prototype.inotn=function(t){p(typeof t==="number"&&t>=0);var i=Math.ceil(t/26)|0,o=t%26;if(this._expand(i),o>0)i--;for(var r=0;r<i;r++)this.words[r]=~this.words[r]&67108863;if(o>0)this.words[r]=~this.words[r]&67108863>>26-o;return this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,i){p(typeof t==="number"&&t>=0);var o=t/26|0,r=t%26;if(this._expand(o+1),i)this.words[o]=this.words[o]|1<<r;else this.words[o]=this.words[o]&~(1<<r);return this.strip()},a.prototype.iadd=function(t){var i;if(this.negative!==0&&t.negative===0)return this.negative=0,i=this.isub(t),this.negative^=1,this._normSign();else if(this.negative===0&&t.negative!==0)return t.negative=0,i=this.isub(t),t.negative=1,i._normSign();var o,r;if(this.length>t.length)o=this,r=t;else o=t,r=this;var n=0;for(var u=0;u<r.length;u++)i=(o.words[u]|0)+(r.words[u]|0)+n,this.words[u]=i&67108863,n=i>>>26;for(;n!==0&&u<o.length;u++)i=(o.words[u]|0)+n,this.words[u]=i&67108863,n=i>>>26;if(this.length=o.length,n!==0)this.words[this.length]=n,this.length++;else if(o!==this)for(;u<o.length;u++)this.words[u]=o.words[u];return this},a.prototype.add=function(t){var i;if(t.negative!==0&&this.negative===0)return t.negative=0,i=this.sub(t),t.negative^=1,i;else if(t.negative===0&&this.negative!==0)return this.negative=0,i=t.sub(this),this.negative=1,i;if(this.length>t.length)return this.clone().iadd(t);return t.clone().iadd(this)},a.prototype.isub=function(t){if(t.negative!==0){t.negative=0;var i=this.iadd(t);return t.negative=1,i._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var o=this.cmp(t);if(o===0)return this.negative=0,this.length=1,this.words[0]=0,this;var r,n;if(o>0)r=this,n=t;else r=t,n=this;var u=0;for(var d=0;d<n.length;d++)i=(r.words[d]|0)-(n.words[d]|0)+u,u=i>>26,this.words[d]=i&67108863;for(;u!==0&&d<r.length;d++)i=(r.words[d]|0)+u,u=i>>26,this.words[d]=i&67108863;if(u===0&&d<r.length&&r!==this)for(;d<r.length;d++)this.words[d]=r.words[d];if(this.length=Math.max(this.length,d),r!==this)this.negative=1;return this.strip()},a.prototype.sub=function(t){return this.clone().isub(t)};function x(t,i,o){o.negative=i.negative^t.negative;var r=t.length+i.length|0;o.length=r,r=r-1|0;var n=t.words[0]|0,u=i.words[0]|0,d=n*u,s=d&67108863,e=d/67108864|0;o.words[0]=s;for(var f=1;f<r;f++){var _=e>>>26,m=e&67108863,I=Math.min(f,i.length-1);for(var N=Math.max(0,f-t.length+1);N<=I;N++){var U=f-N|0;n=t.words[U]|0,u=i.words[N]|0,d=n*u+m,_+=d/67108864|0,m=d&67108863}o.words[f]=m|0,e=_|0}if(e!==0)o.words[f]=e|0;else o.length--;return o.strip()}var B=function(t,i,o){var r=t.words,n=i.words,u=o.words,d=0,s,e,f,_=r[0]|0,m=_&8191,I=_>>>13,N=r[1]|0,U=N&8191,Z=N>>>13,ut=r[2]|0,Y=ut&8191,H=ut>>>13,nt=r[3]|0,G=nt&8191,tt=nt>>>13,Dt=r[4]|0,L=Dt&8191,F=Dt>>>13,ot=r[5]|0,J=ot&8191,Q=ot>>>13,Mt=r[6]|0,C=Mt&8191,K=Mt>>>13,Nt=r[7]|0,V=Nt&8191,it=Nt>>>13,Lt=r[8]|0,pt=Lt&8191,yt=Lt>>>13,Zt=r[9]|0,dt=Zt&8191,bt=Zt>>>13,Jt=n[0]|0,gt=Jt&8191,vt=Jt>>>13,ve=n[1]|0,_t=ve&8191,It=ve>>>13,ge=n[2]|0,xt=ge&8191,St=ge>>>13,be=n[3]|0,kt=be&8191,At=be>>>13,ue=n[4]|0,Tt=ue&8191,Pt=ue>>>13,de=n[5]|0,Et=de&8191,q=de>>>13,z=n[6]|0,X=z&8191,et=z>>>13,Ot=n[7]|0,ct=Ot&8191,mt=Ot>>>13,Gt=n[8]|0,Rt=Gt&8191,qt=Gt>>>13,me=n[9]|0,Bt=me&8191,wt=me>>>13;o.negative=t.negative^i.negative,o.length=19,s=Math.imul(m,gt),e=Math.imul(m,vt),e=e+Math.imul(I,gt)|0,f=Math.imul(I,vt);var Vt=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(Vt>>>26)|0,Vt&=67108863,s=Math.imul(U,gt),e=Math.imul(U,vt),e=e+Math.imul(Z,gt)|0,f=Math.imul(Z,vt),s=s+Math.imul(m,_t)|0,e=e+Math.imul(m,It)|0,e=e+Math.imul(I,_t)|0,f=f+Math.imul(I,It)|0;var Ut=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,s=Math.imul(Y,gt),e=Math.imul(Y,vt),e=e+Math.imul(H,gt)|0,f=Math.imul(H,vt),s=s+Math.imul(U,_t)|0,e=e+Math.imul(U,It)|0,e=e+Math.imul(Z,_t)|0,f=f+Math.imul(Z,It)|0,s=s+Math.imul(m,xt)|0,e=e+Math.imul(m,St)|0,e=e+Math.imul(I,xt)|0,f=f+Math.imul(I,St)|0;var Ct=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,s=Math.imul(G,gt),e=Math.imul(G,vt),e=e+Math.imul(tt,gt)|0,f=Math.imul(tt,vt),s=s+Math.imul(Y,_t)|0,e=e+Math.imul(Y,It)|0,e=e+Math.imul(H,_t)|0,f=f+Math.imul(H,It)|0,s=s+Math.imul(U,xt)|0,e=e+Math.imul(U,St)|0,e=e+Math.imul(Z,xt)|0,f=f+Math.imul(Z,St)|0,s=s+Math.imul(m,kt)|0,e=e+Math.imul(m,At)|0,e=e+Math.imul(I,kt)|0,f=f+Math.imul(I,At)|0;var Wt=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(Wt>>>26)|0,Wt&=67108863,s=Math.imul(L,gt),e=Math.imul(L,vt),e=e+Math.imul(F,gt)|0,f=Math.imul(F,vt),s=s+Math.imul(G,_t)|0,e=e+Math.imul(G,It)|0,e=e+Math.imul(tt,_t)|0,f=f+Math.imul(tt,It)|0,s=s+Math.imul(Y,xt)|0,e=e+Math.imul(Y,St)|0,e=e+Math.imul(H,xt)|0,f=f+Math.imul(H,St)|0,s=s+Math.imul(U,kt)|0,e=e+Math.imul(U,At)|0,e=e+Math.imul(Z,kt)|0,f=f+Math.imul(Z,At)|0,s=s+Math.imul(m,Tt)|0,e=e+Math.imul(m,Pt)|0,e=e+Math.imul(I,Tt)|0,f=f+Math.imul(I,Pt)|0;var Ht=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(Ht>>>26)|0,Ht&=67108863,s=Math.imul(J,gt),e=Math.imul(J,vt),e=e+Math.imul(Q,gt)|0,f=Math.imul(Q,vt),s=s+Math.imul(L,_t)|0,e=e+Math.imul(L,It)|0,e=e+Math.imul(F,_t)|0,f=f+Math.imul(F,It)|0,s=s+Math.imul(G,xt)|0,e=e+Math.imul(G,St)|0,e=e+Math.imul(tt,xt)|0,f=f+Math.imul(tt,St)|0,s=s+Math.imul(Y,kt)|0,e=e+Math.imul(Y,At)|0,e=e+Math.imul(H,kt)|0,f=f+Math.imul(H,At)|0,s=s+Math.imul(U,Tt)|0,e=e+Math.imul(U,Pt)|0,e=e+Math.imul(Z,Tt)|0,f=f+Math.imul(Z,Pt)|0,s=s+Math.imul(m,Et)|0,e=e+Math.imul(m,q)|0,e=e+Math.imul(I,Et)|0,f=f+Math.imul(I,q)|0;var Yt=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,s=Math.imul(C,gt),e=Math.imul(C,vt),e=e+Math.imul(K,gt)|0,f=Math.imul(K,vt),s=s+Math.imul(J,_t)|0,e=e+Math.imul(J,It)|0,e=e+Math.imul(Q,_t)|0,f=f+Math.imul(Q,It)|0,s=s+Math.imul(L,xt)|0,e=e+Math.imul(L,St)|0,e=e+Math.imul(F,xt)|0,f=f+Math.imul(F,St)|0,s=s+Math.imul(G,kt)|0,e=e+Math.imul(G,At)|0,e=e+Math.imul(tt,kt)|0,f=f+Math.imul(tt,At)|0,s=s+Math.imul(Y,Tt)|0,e=e+Math.imul(Y,Pt)|0,e=e+Math.imul(H,Tt)|0,f=f+Math.imul(H,Pt)|0,s=s+Math.imul(U,Et)|0,e=e+Math.imul(U,q)|0,e=e+Math.imul(Z,Et)|0,f=f+Math.imul(Z,q)|0,s=s+Math.imul(m,X)|0,e=e+Math.imul(m,et)|0,e=e+Math.imul(I,X)|0,f=f+Math.imul(I,et)|0;var Xt=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(Xt>>>26)|0,Xt&=67108863,s=Math.imul(V,gt),e=Math.imul(V,vt),e=e+Math.imul(it,gt)|0,f=Math.imul(it,vt),s=s+Math.imul(C,_t)|0,e=e+Math.imul(C,It)|0,e=e+Math.imul(K,_t)|0,f=f+Math.imul(K,It)|0,s=s+Math.imul(J,xt)|0,e=e+Math.imul(J,St)|0,e=e+Math.imul(Q,xt)|0,f=f+Math.imul(Q,St)|0,s=s+Math.imul(L,kt)|0,e=e+Math.imul(L,At)|0,e=e+Math.imul(F,kt)|0,f=f+Math.imul(F,At)|0,s=s+Math.imul(G,Tt)|0,e=e+Math.imul(G,Pt)|0,e=e+Math.imul(tt,Tt)|0,f=f+Math.imul(tt,Pt)|0,s=s+Math.imul(Y,Et)|0,e=e+Math.imul(Y,q)|0,e=e+Math.imul(H,Et)|0,f=f+Math.imul(H,q)|0,s=s+Math.imul(U,X)|0,e=e+Math.imul(U,et)|0,e=e+Math.imul(Z,X)|0,f=f+Math.imul(Z,et)|0,s=s+Math.imul(m,ct)|0,e=e+Math.imul(m,mt)|0,e=e+Math.imul(I,ct)|0,f=f+Math.imul(I,mt)|0;var Qt=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,s=Math.imul(pt,gt),e=Math.imul(pt,vt),e=e+Math.imul(yt,gt)|0,f=Math.imul(yt,vt),s=s+Math.imul(V,_t)|0,e=e+Math.imul(V,It)|0,e=e+Math.imul(it,_t)|0,f=f+Math.imul(it,It)|0,s=s+Math.imul(C,xt)|0,e=e+Math.imul(C,St)|0,e=e+Math.imul(K,xt)|0,f=f+Math.imul(K,St)|0,s=s+Math.imul(J,kt)|0,e=e+Math.imul(J,At)|0,e=e+Math.imul(Q,kt)|0,f=f+Math.imul(Q,At)|0,s=s+Math.imul(L,Tt)|0,e=e+Math.imul(L,Pt)|0,e=e+Math.imul(F,Tt)|0,f=f+Math.imul(F,Pt)|0,s=s+Math.imul(G,Et)|0,e=e+Math.imul(G,q)|0,e=e+Math.imul(tt,Et)|0,f=f+Math.imul(tt,q)|0,s=s+Math.imul(Y,X)|0,e=e+Math.imul(Y,et)|0,e=e+Math.imul(H,X)|0,f=f+Math.imul(H,et)|0,s=s+Math.imul(U,ct)|0,e=e+Math.imul(U,mt)|0,e=e+Math.imul(Z,ct)|0,f=f+Math.imul(Z,mt)|0,s=s+Math.imul(m,Rt)|0,e=e+Math.imul(m,qt)|0,e=e+Math.imul(I,Rt)|0,f=f+Math.imul(I,qt)|0;var te=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(te>>>26)|0,te&=67108863,s=Math.imul(dt,gt),e=Math.imul(dt,vt),e=e+Math.imul(bt,gt)|0,f=Math.imul(bt,vt),s=s+Math.imul(pt,_t)|0,e=e+Math.imul(pt,It)|0,e=e+Math.imul(yt,_t)|0,f=f+Math.imul(yt,It)|0,s=s+Math.imul(V,xt)|0,e=e+Math.imul(V,St)|0,e=e+Math.imul(it,xt)|0,f=f+Math.imul(it,St)|0,s=s+Math.imul(C,kt)|0,e=e+Math.imul(C,At)|0,e=e+Math.imul(K,kt)|0,f=f+Math.imul(K,At)|0,s=s+Math.imul(J,Tt)|0,e=e+Math.imul(J,Pt)|0,e=e+Math.imul(Q,Tt)|0,f=f+Math.imul(Q,Pt)|0,s=s+Math.imul(L,Et)|0,e=e+Math.imul(L,q)|0,e=e+Math.imul(F,Et)|0,f=f+Math.imul(F,q)|0,s=s+Math.imul(G,X)|0,e=e+Math.imul(G,et)|0,e=e+Math.imul(tt,X)|0,f=f+Math.imul(tt,et)|0,s=s+Math.imul(Y,ct)|0,e=e+Math.imul(Y,mt)|0,e=e+Math.imul(H,ct)|0,f=f+Math.imul(H,mt)|0,s=s+Math.imul(U,Rt)|0,e=e+Math.imul(U,qt)|0,e=e+Math.imul(Z,Rt)|0,f=f+Math.imul(Z,qt)|0,s=s+Math.imul(m,Bt)|0,e=e+Math.imul(m,wt)|0,e=e+Math.imul(I,Bt)|0,f=f+Math.imul(I,wt)|0;var ee=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(ee>>>26)|0,ee&=67108863,s=Math.imul(dt,_t),e=Math.imul(dt,It),e=e+Math.imul(bt,_t)|0,f=Math.imul(bt,It),s=s+Math.imul(pt,xt)|0,e=e+Math.imul(pt,St)|0,e=e+Math.imul(yt,xt)|0,f=f+Math.imul(yt,St)|0,s=s+Math.imul(V,kt)|0,e=e+Math.imul(V,At)|0,e=e+Math.imul(it,kt)|0,f=f+Math.imul(it,At)|0,s=s+Math.imul(C,Tt)|0,e=e+Math.imul(C,Pt)|0,e=e+Math.imul(K,Tt)|0,f=f+Math.imul(K,Pt)|0,s=s+Math.imul(J,Et)|0,e=e+Math.imul(J,q)|0,e=e+Math.imul(Q,Et)|0,f=f+Math.imul(Q,q)|0,s=s+Math.imul(L,X)|0,e=e+Math.imul(L,et)|0,e=e+Math.imul(F,X)|0,f=f+Math.imul(F,et)|0,s=s+Math.imul(G,ct)|0,e=e+Math.imul(G,mt)|0,e=e+Math.imul(tt,ct)|0,f=f+Math.imul(tt,mt)|0,s=s+Math.imul(Y,Rt)|0,e=e+Math.imul(Y,qt)|0,e=e+Math.imul(H,Rt)|0,f=f+Math.imul(H,qt)|0,s=s+Math.imul(U,Bt)|0,e=e+Math.imul(U,wt)|0,e=e+Math.imul(Z,Bt)|0,f=f+Math.imul(Z,wt)|0;var re=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(re>>>26)|0,re&=67108863,s=Math.imul(dt,xt),e=Math.imul(dt,St),e=e+Math.imul(bt,xt)|0,f=Math.imul(bt,St),s=s+Math.imul(pt,kt)|0,e=e+Math.imul(pt,At)|0,e=e+Math.imul(yt,kt)|0,f=f+Math.imul(yt,At)|0,s=s+Math.imul(V,Tt)|0,e=e+Math.imul(V,Pt)|0,e=e+Math.imul(it,Tt)|0,f=f+Math.imul(it,Pt)|0,s=s+Math.imul(C,Et)|0,e=e+Math.imul(C,q)|0,e=e+Math.imul(K,Et)|0,f=f+Math.imul(K,q)|0,s=s+Math.imul(J,X)|0,e=e+Math.imul(J,et)|0,e=e+Math.imul(Q,X)|0,f=f+Math.imul(Q,et)|0,s=s+Math.imul(L,ct)|0,e=e+Math.imul(L,mt)|0,e=e+Math.imul(F,ct)|0,f=f+Math.imul(F,mt)|0,s=s+Math.imul(G,Rt)|0,e=e+Math.imul(G,qt)|0,e=e+Math.imul(tt,Rt)|0,f=f+Math.imul(tt,qt)|0,s=s+Math.imul(Y,Bt)|0,e=e+Math.imul(Y,wt)|0,e=e+Math.imul(H,Bt)|0,f=f+Math.imul(H,wt)|0;var ie=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(ie>>>26)|0,ie&=67108863,s=Math.imul(dt,kt),e=Math.imul(dt,At),e=e+Math.imul(bt,kt)|0,f=Math.imul(bt,At),s=s+Math.imul(pt,Tt)|0,e=e+Math.imul(pt,Pt)|0,e=e+Math.imul(yt,Tt)|0,f=f+Math.imul(yt,Pt)|0,s=s+Math.imul(V,Et)|0,e=e+Math.imul(V,q)|0,e=e+Math.imul(it,Et)|0,f=f+Math.imul(it,q)|0,s=s+Math.imul(C,X)|0,e=e+Math.imul(C,et)|0,e=e+Math.imul(K,X)|0,f=f+Math.imul(K,et)|0,s=s+Math.imul(J,ct)|0,e=e+Math.imul(J,mt)|0,e=e+Math.imul(Q,ct)|0,f=f+Math.imul(Q,mt)|0,s=s+Math.imul(L,Rt)|0,e=e+Math.imul(L,qt)|0,e=e+Math.imul(F,Rt)|0,f=f+Math.imul(F,qt)|0,s=s+Math.imul(G,Bt)|0,e=e+Math.imul(G,wt)|0,e=e+Math.imul(tt,Bt)|0,f=f+Math.imul(tt,wt)|0;var ne=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(ne>>>26)|0,ne&=67108863,s=Math.imul(dt,Tt),e=Math.imul(dt,Pt),e=e+Math.imul(bt,Tt)|0,f=Math.imul(bt,Pt),s=s+Math.imul(pt,Et)|0,e=e+Math.imul(pt,q)|0,e=e+Math.imul(yt,Et)|0,f=f+Math.imul(yt,q)|0,s=s+Math.imul(V,X)|0,e=e+Math.imul(V,et)|0,e=e+Math.imul(it,X)|0,f=f+Math.imul(it,et)|0,s=s+Math.imul(C,ct)|0,e=e+Math.imul(C,mt)|0,e=e+Math.imul(K,ct)|0,f=f+Math.imul(K,mt)|0,s=s+Math.imul(J,Rt)|0,e=e+Math.imul(J,qt)|0,e=e+Math.imul(Q,Rt)|0,f=f+Math.imul(Q,qt)|0,s=s+Math.imul(L,Bt)|0,e=e+Math.imul(L,wt)|0,e=e+Math.imul(F,Bt)|0,f=f+Math.imul(F,wt)|0;var oe=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(oe>>>26)|0,oe&=67108863,s=Math.imul(dt,Et),e=Math.imul(dt,q),e=e+Math.imul(bt,Et)|0,f=Math.imul(bt,q),s=s+Math.imul(pt,X)|0,e=e+Math.imul(pt,et)|0,e=e+Math.imul(yt,X)|0,f=f+Math.imul(yt,et)|0,s=s+Math.imul(V,ct)|0,e=e+Math.imul(V,mt)|0,e=e+Math.imul(it,ct)|0,f=f+Math.imul(it,mt)|0,s=s+Math.imul(C,Rt)|0,e=e+Math.imul(C,qt)|0,e=e+Math.imul(K,Rt)|0,f=f+Math.imul(K,qt)|0,s=s+Math.imul(J,Bt)|0,e=e+Math.imul(J,wt)|0,e=e+Math.imul(Q,Bt)|0,f=f+Math.imul(Q,wt)|0;var ae=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(ae>>>26)|0,ae&=67108863,s=Math.imul(dt,X),e=Math.imul(dt,et),e=e+Math.imul(bt,X)|0,f=Math.imul(bt,et),s=s+Math.imul(pt,ct)|0,e=e+Math.imul(pt,mt)|0,e=e+Math.imul(yt,ct)|0,f=f+Math.imul(yt,mt)|0,s=s+Math.imul(V,Rt)|0,e=e+Math.imul(V,qt)|0,e=e+Math.imul(it,Rt)|0,f=f+Math.imul(it,qt)|0,s=s+Math.imul(C,Bt)|0,e=e+Math.imul(C,wt)|0,e=e+Math.imul(K,Bt)|0,f=f+Math.imul(K,wt)|0;var se=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(se>>>26)|0,se&=67108863,s=Math.imul(dt,ct),e=Math.imul(dt,mt),e=e+Math.imul(bt,ct)|0,f=Math.imul(bt,mt),s=s+Math.imul(pt,Rt)|0,e=e+Math.imul(pt,qt)|0,e=e+Math.imul(yt,Rt)|0,f=f+Math.imul(yt,qt)|0,s=s+Math.imul(V,Bt)|0,e=e+Math.imul(V,wt)|0,e=e+Math.imul(it,Bt)|0,f=f+Math.imul(it,wt)|0;var he=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(he>>>26)|0,he&=67108863,s=Math.imul(dt,Rt),e=Math.imul(dt,qt),e=e+Math.imul(bt,Rt)|0,f=Math.imul(bt,qt),s=s+Math.imul(pt,Bt)|0,e=e+Math.imul(pt,wt)|0,e=e+Math.imul(yt,Bt)|0,f=f+Math.imul(yt,wt)|0;var fe=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(fe>>>26)|0,fe&=67108863,s=Math.imul(dt,Bt),e=Math.imul(dt,wt),e=e+Math.imul(bt,Bt)|0,f=Math.imul(bt,wt);var le=(d+s|0)+((e&8191)<<13)|0;if(d=(f+(e>>>13)|0)+(le>>>26)|0,le&=67108863,u[0]=Vt,u[1]=Ut,u[2]=Ct,u[3]=Wt,u[4]=Ht,u[5]=Yt,u[6]=Xt,u[7]=Qt,u[8]=te,u[9]=ee,u[10]=re,u[11]=ie,u[12]=ne,u[13]=oe,u[14]=ae,u[15]=se,u[16]=he,u[17]=fe,u[18]=le,d!==0)u[19]=d,o.length++;return o};if(!Math.imul)B=x;function T(t,i,o){o.negative=i.negative^t.negative,o.length=t.length+i.length;var r=0,n=0;for(var u=0;u<o.length-1;u++){var d=n;n=0;var s=r&67108863,e=Math.min(u,i.length-1);for(var f=Math.max(0,u-t.length+1);f<=e;f++){var _=u-f,m=t.words[_]|0,I=i.words[f]|0,N=m*I,U=N&67108863;d=d+(N/67108864|0)|0,U=U+s|0,s=U&67108863,d=d+(U>>>26)|0,n+=d>>>26,d&=67108863}o.words[u]=s,r=d,d=n}if(r!==0)o.words[u]=r;else o.length--;return o.strip()}function k(t,i,o){var r=new P;return r.mulp(t,i,o)}a.prototype.mulTo=function(t,i){var o,r=this.length+t.length;if(this.length===10&&t.length===10)o=B(this,t,i);else if(r<63)o=x(this,t,i);else if(r<1024)o=T(this,t,i);else o=k(this,t,i);return o};function P(t,i){this.x=t,this.y=i}P.prototype.makeRBT=function(t){var i=Array(t),o=a.prototype._countBits(t)-1;for(var r=0;r<t;r++)i[r]=this.revBin(r,o,t);return i},P.prototype.revBin=function(t,i,o){if(t===0||t===o-1)return t;var r=0;for(var n=0;n<i;n++)r|=(t&1)<<i-n-1,t>>=1;return r},P.prototype.permute=function(t,i,o,r,n,u){for(var d=0;d<u;d++)r[d]=i[t[d]],n[d]=o[t[d]]},P.prototype.transform=function(t,i,o,r,n,u){this.permute(u,t,i,o,r,n);for(var d=1;d<n;d<<=1){var s=d<<1,e=Math.cos(2*Math.PI/s),f=Math.sin(2*Math.PI/s);for(var _=0;_<n;_+=s){var m=e,I=f;for(var N=0;N<d;N++){var U=o[_+N],Z=r[_+N],ut=o[_+N+d],Y=r[_+N+d],H=m*ut-I*Y;if(Y=m*Y+I*ut,ut=H,o[_+N]=U+ut,r[_+N]=Z+Y,o[_+N+d]=U-ut,r[_+N+d]=Z-Y,N!==s)H=e*m-f*I,I=e*I+f*m,m=H}}}},P.prototype.guessLen13b=function(t,i){var o=Math.max(i,t)|1,r=o&1,n=0;for(o=o/2|0;o;o=o>>>1)n++;return 1<<n+1+r},P.prototype.conjugate=function(t,i,o){if(o<=1)return;for(var r=0;r<o/2;r++){var n=t[r];t[r]=t[o-r-1],t[o-r-1]=n,n=i[r],i[r]=-i[o-r-1],i[o-r-1]=-n}},P.prototype.normalize13b=function(t,i){var o=0;for(var r=0;r<i/2;r++){var n=Math.round(t[2*r+1]/i)*8192+Math.round(t[2*r]/i)+o;if(t[r]=n&67108863,n<67108864)o=0;else o=n/67108864|0}return t},P.prototype.convert13b=function(t,i,o,r){var n=0;for(var u=0;u<i;u++)n=n+(t[u]|0),o[2*u]=n&8191,n=n>>>13,o[2*u+1]=n&8191,n=n>>>13;for(u=2*i;u<r;++u)o[u]=0;p(n===0),p((n&-8192)===0)},P.prototype.stub=function(t){var i=Array(t);for(var o=0;o<t;o++)i[o]=0;return i},P.prototype.mulp=function(t,i,o){var r=2*this.guessLen13b(t.length,i.length),n=this.makeRBT(r),u=this.stub(r),d=Array(r),s=Array(r),e=Array(r),f=Array(r),_=Array(r),m=Array(r),I=o.words;I.length=r,this.convert13b(t.words,t.length,d,r),this.convert13b(i.words,i.length,f,r),this.transform(d,u,s,e,r,n),this.transform(f,u,_,m,r,n);for(var N=0;N<r;N++){var U=s[N]*_[N]-e[N]*m[N];e[N]=s[N]*m[N]+e[N]*_[N],s[N]=U}return this.conjugate(s,e,r),this.transform(s,e,I,u,r,n),this.conjugate(I,u,r),this.normalize13b(I,r),o.negative=t.negative^i.negative,o.length=t.length+i.length,o.strip()},a.prototype.mul=function(t){var i=new a(null);return i.words=Array(this.length+t.length),this.mulTo(t,i)},a.prototype.mulf=function(t){var i=new a(null);return i.words=Array(this.length+t.length),k(this,t,i)},a.prototype.imul=function(t){return this.clone().mulTo(t,this)},a.prototype.imuln=function(t){p(typeof t==="number"),p(t<67108864);var i=0;for(var o=0;o<this.length;o++){var r=(this.words[o]|0)*t,n=(r&67108863)+(i&67108863);i>>=26,i+=r/67108864|0,i+=n>>>26,this.words[o]=n&67108863}if(i!==0)this.words[o]=i,this.length++;return this.length=t===0?1:this.length,this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var i=A(t);if(i.length===0)return new a(1);var o=this;for(var r=0;r<i.length;r++,o=o.sqr())if(i[r]!==0)break;if(++r<i.length)for(var n=o.sqr();r<i.length;r++,n=n.sqr()){if(i[r]===0)continue;o=o.mul(n)}return o},a.prototype.iushln=function(t){p(typeof t==="number"&&t>=0);var i=t%26,o=(t-i)/26,r=67108863>>>26-i<<26-i,n;if(i!==0){var u=0;for(n=0;n<this.length;n++){var d=this.words[n]&r,s=(this.words[n]|0)-d<<i;this.words[n]=s|u,u=d>>>26-i}if(u)this.words[n]=u,this.length++}if(o!==0){for(n=this.length-1;n>=0;n--)this.words[n+o]=this.words[n];for(n=0;n<o;n++)this.words[n]=0;this.length+=o}return this.strip()},a.prototype.ishln=function(t){return p(this.negative===0),this.iushln(t)},a.prototype.iushrn=function(t,i,o){p(typeof t==="number"&&t>=0);var r;if(i)r=(i-i%26)/26;else r=0;var n=t%26,u=Math.min((t-n)/26,this.length),d=67108863^67108863>>>n<<n,s=o;if(r-=u,r=Math.max(0,r),s){for(var e=0;e<u;e++)s.words[e]=this.words[e];s.length=u}if(u===0);else if(this.length>u){this.length-=u;for(e=0;e<this.length;e++)this.words[e]=this.words[e+u]}else this.words[0]=0,this.length=1;var f=0;for(e=this.length-1;e>=0&&(f!==0||e>=r);e--){var _=this.words[e]|0;this.words[e]=f<<26-n|_>>>n,f=_&d}if(s&&f!==0)s.words[s.length++]=f;if(this.length===0)this.words[0]=0,this.length=1;return this.strip()},a.prototype.ishrn=function(t,i,o){return p(this.negative===0),this.iushrn(t,i,o)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){p(typeof t==="number"&&t>=0);var i=t%26,o=(t-i)/26,r=1<<i;if(this.length<=o)return!1;var n=this.words[o];return!!(n&r)},a.prototype.imaskn=function(t){p(typeof t==="number"&&t>=0);var i=t%26,o=(t-i)/26;if(p(this.negative===0,"imaskn works only with positive numbers"),this.length<=o)return this;if(i!==0)o++;if(this.length=Math.min(o,this.length),i!==0){var r=67108863^67108863>>>i<<i;this.words[this.length-1]&=r}return this.strip()},a.prototype.maskn=function(t){return this.clone().imaskn(t)},a.prototype.iaddn=function(t){if(p(typeof t==="number"),p(t<67108864),t<0)return this.isubn(-t);if(this.negative!==0){if(this.length===1&&(this.words[0]|0)<t)return this.words[0]=t-(this.words[0]|0),this.negative=0,this;return this.negative=0,this.isubn(t),this.negative=1,this}return this._iaddn(t)},a.prototype._iaddn=function(t){this.words[0]+=t;for(var i=0;i<this.length&&this.words[i]>=67108864;i++)if(this.words[i]-=67108864,i===this.length-1)this.words[i+1]=1;else this.words[i+1]++;return this.length=Math.max(this.length,i+1),this},a.prototype.isubn=function(t){if(p(typeof t==="number"),p(t<67108864),t<0)return this.iaddn(-t);if(this.negative!==0)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var i=0;i<this.length&&this.words[i]<0;i++)this.words[i]+=67108864,this.words[i+1]-=1;return this.strip()},a.prototype.addn=function(t){return this.clone().iaddn(t)},a.prototype.subn=function(t){return this.clone().isubn(t)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(t,i,o){var r=t.length+o,n;this._expand(r);var u,d=0;for(n=0;n<t.length;n++){u=(this.words[n+o]|0)+d;var s=(t.words[n]|0)*i;u-=s&67108863,d=(u>>26)-(s/67108864|0),this.words[n+o]=u&67108863}for(;n<this.length-o;n++)u=(this.words[n+o]|0)+d,d=u>>26,this.words[n+o]=u&67108863;if(d===0)return this.strip();p(d===-1),d=0;for(n=0;n<this.length;n++)u=-(this.words[n]|0)+d,d=u>>26,this.words[n]=u&67108863;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,i){var o=this.length-t.length,r=this.clone(),n=t,u=n.words[n.length-1]|0,d=this._countBits(u);if(o=26-d,o!==0)n=n.ushln(o),r.iushln(o),u=n.words[n.length-1]|0;var s=r.length-n.length,e;if(i!=="mod"){e=new a(null),e.length=s+1,e.words=Array(e.length);for(var f=0;f<e.length;f++)e.words[f]=0}var _=r.clone()._ishlnsubmul(n,1,s);if(_.negative===0){if(r=_,e)e.words[s]=1}for(var m=s-1;m>=0;m--){var I=(r.words[n.length+m]|0)*67108864+(r.words[n.length+m-1]|0);I=Math.min(I/u|0,67108863),r._ishlnsubmul(n,I,m);while(r.negative!==0)if(I--,r.negative=0,r._ishlnsubmul(n,1,m),!r.isZero())r.negative^=1;if(e)e.words[m]=I}if(e)e.strip();if(r.strip(),i!=="div"&&o!==0)r.iushrn(o);return{div:e||null,mod:r}},a.prototype.divmod=function(t,i,o){if(p(!t.isZero()),this.isZero())return{div:new a(0),mod:new a(0)};var r,n,u;if(this.negative!==0&&t.negative===0){if(u=this.neg().divmod(t,i),i!=="mod")r=u.div.neg();if(i!=="div"){if(n=u.mod.neg(),o&&n.negative!==0)n.iadd(t)}return{div:r,mod:n}}if(this.negative===0&&t.negative!==0){if(u=this.divmod(t.neg(),i),i!=="mod")r=u.div.neg();return{div:r,mod:u.mod}}if((this.negative&t.negative)!==0){if(u=this.neg().divmod(t.neg(),i),i!=="div"){if(n=u.mod.neg(),o&&n.negative!==0)n.isub(t)}return{div:u.div,mod:n}}if(t.length>this.length||this.cmp(t)<0)return{div:new a(0),mod:this};if(t.length===1){if(i==="div")return{div:this.divn(t.words[0]),mod:null};if(i==="mod")return{div:null,mod:new a(this.modn(t.words[0]))};return{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}}return this._wordDiv(t,i)},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var i=this.divmod(t);if(i.mod.isZero())return i.div;var o=i.div.negative!==0?i.mod.isub(t):i.mod,r=t.ushrn(1),n=t.andln(1),u=o.cmp(r);if(u<0||n===1&&u===0)return i.div;return i.div.negative!==0?i.div.isubn(1):i.div.iaddn(1)},a.prototype.modn=function(t){p(t<=67108863);var i=67108864%t,o=0;for(var r=this.length-1;r>=0;r--)o=(i*o+(this.words[r]|0))%t;return o},a.prototype.idivn=function(t){p(t<=67108863);var i=0;for(var o=this.length-1;o>=0;o--){var r=(this.words[o]|0)+i*67108864;this.words[o]=r/t|0,i=r%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){p(t.negative===0),p(!t.isZero());var i=this,o=t.clone();if(i.negative!==0)i=i.umod(t);else i=i.clone();var r=new a(1),n=new a(0),u=new a(0),d=new a(1),s=0;while(i.isEven()&&o.isEven())i.iushrn(1),o.iushrn(1),++s;var e=o.clone(),f=i.clone();while(!i.isZero()){for(var _=0,m=1;(i.words[0]&m)===0&&_<26;++_,m<<=1);if(_>0){i.iushrn(_);while(_-- >0){if(r.isOdd()||n.isOdd())r.iadd(e),n.isub(f);r.iushrn(1),n.iushrn(1)}}for(var I=0,N=1;(o.words[0]&N)===0&&I<26;++I,N<<=1);if(I>0){o.iushrn(I);while(I-- >0){if(u.isOdd()||d.isOdd())u.iadd(e),d.isub(f);u.iushrn(1),d.iushrn(1)}}if(i.cmp(o)>=0)i.isub(o),r.isub(u),n.isub(d);else o.isub(i),u.isub(r),d.isub(n)}return{a:u,b:d,gcd:o.iushln(s)}},a.prototype._invmp=function(t){p(t.negative===0),p(!t.isZero());var i=this,o=t.clone();if(i.negative!==0)i=i.umod(t);else i=i.clone();var r=new a(1),n=new a(0),u=o.clone();while(i.cmpn(1)>0&&o.cmpn(1)>0){for(var d=0,s=1;(i.words[0]&s)===0&&d<26;++d,s<<=1);if(d>0){i.iushrn(d);while(d-- >0){if(r.isOdd())r.iadd(u);r.iushrn(1)}}for(var e=0,f=1;(o.words[0]&f)===0&&e<26;++e,f<<=1);if(e>0){o.iushrn(e);while(e-- >0){if(n.isOdd())n.iadd(u);n.iushrn(1)}}if(i.cmp(o)>=0)i.isub(o),r.isub(n);else o.isub(i),n.isub(r)}var _;if(i.cmpn(1)===0)_=r;else _=n;if(_.cmpn(0)<0)_.iadd(t);return _},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var i=this.clone(),o=t.clone();i.negative=0,o.negative=0;for(var r=0;i.isEven()&&o.isEven();r++)i.iushrn(1),o.iushrn(1);do{while(i.isEven())i.iushrn(1);while(o.isEven())o.iushrn(1);var n=i.cmp(o);if(n<0){var u=i;i=o,o=u}else if(n===0||o.cmpn(1)===0)break;i.isub(o)}while(!0);return o.iushln(r)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return(this.words[0]&1)===0},a.prototype.isOdd=function(){return(this.words[0]&1)===1},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){p(typeof t==="number");var i=t%26,o=(t-i)/26,r=1<<i;if(this.length<=o)return this._expand(o+1),this.words[o]|=r,this;var n=r;for(var u=o;n!==0&&u<this.length;u++){var d=this.words[u]|0;d+=n,n=d>>>26,d&=67108863,this.words[u]=d}if(n!==0)this.words[u]=n,this.length++;return this},a.prototype.isZero=function(){return this.length===1&&this.words[0]===0},a.prototype.cmpn=function(t){var i=t<0;if(this.negative!==0&&!i)return-1;if(this.negative===0&&i)return 1;this.strip();var o;if(this.length>1)o=1;else{if(i)t=-t;p(t<=67108863,"Number is too big");var r=this.words[0]|0;o=r===t?0:r<t?-1:1}if(this.negative!==0)return-o|0;return o},a.prototype.cmp=function(t){if(this.negative!==0&&t.negative===0)return-1;if(this.negative===0&&t.negative!==0)return 1;var i=this.ucmp(t);if(this.negative!==0)return-i|0;return i},a.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;var i=0;for(var o=this.length-1;o>=0;o--){var r=this.words[o]|0,n=t.words[o]|0;if(r===n)continue;if(r<n)i=-1;else if(r>n)i=1;break}return i},a.prototype.gtn=function(t){return this.cmpn(t)===1},a.prototype.gt=function(t){return this.cmp(t)===1},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return this.cmpn(t)===-1},a.prototype.lt=function(t){return this.cmp(t)===-1},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return this.cmpn(t)===0},a.prototype.eq=function(t){return this.cmp(t)===0},a.red=function(t){return new j(t)},a.prototype.toRed=function(t){return p(!this.red,"Already a number in reduction context"),p(this.negative===0,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return p(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return p(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return p(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return p(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return p(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return p(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return p(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return p(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return p(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return p(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return p(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return p(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return p(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var D={k256:null,p224:null,p192:null,p25519:null};function O(t,i){this.name=t,this.p=new a(i,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}O.prototype._tmp=function(){var t=new a(null);return t.words=Array(Math.ceil(this.n/13)),t},O.prototype.ireduce=function(t){var i=t,o;do this.split(i,this.tmp),i=this.imulK(i),i=i.iadd(this.tmp),o=i.bitLength();while(o>this.n);var r=o<this.n?-1:i.ucmp(this.p);if(r===0)i.words[0]=0,i.length=1;else if(r>0)i.isub(this.p);else if(i.strip!==void 0)i.strip();else i._strip();return i},O.prototype.split=function(t,i){t.iushrn(this.n,0,i)},O.prototype.imulK=function(t){return t.imul(this.k)};function W(){O.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}M(W,O),W.prototype.split=function(t,i){var o=4194303,r=Math.min(t.length,9);for(var n=0;n<r;n++)i.words[n]=t.words[n];if(i.length=r,t.length<=9){t.words[0]=0,t.length=1;return}var u=t.words[9];i.words[i.length++]=u&o;for(n=10;n<t.length;n++){var d=t.words[n]|0;t.words[n-10]=(d&o)<<4|u>>>22,u=d}if(u>>>=22,t.words[n-10]=u,u===0&&t.length>10)t.length-=10;else t.length-=9},W.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;var i=0;for(var o=0;o<t.length;o++){var r=t.words[o]|0;i+=r*977,t.words[o]=i&67108863,i=r*64+(i/67108864|0)}if(t.words[t.length-1]===0){if(t.length--,t.words[t.length-1]===0)t.length--}return t};function at(){O.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}M(at,O);function ft(){O.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}M(ft,O);function st(){O.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}M(st,O),st.prototype.imulK=function(t){var i=0;for(var o=0;o<t.length;o++){var r=(t.words[o]|0)*19+i,n=r&67108863;r>>>=26,t.words[o]=n,i=r}if(i!==0)t.words[t.length++]=i;return t},a._prime=function(t){if(D[t])return D[t];var i;if(t==="k256")i=new W;else if(t==="p224")i=new at;else if(t==="p192")i=new ft;else if(t==="p25519")i=new st;else throw Error("Unknown prime "+t);return D[t]=i,i};function j(t){if(typeof t==="string"){var i=a._prime(t);this.m=i.p,this.prime=i}else p(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}j.prototype._verify1=function(t){p(t.negative===0,"red works only with positives"),p(t.red,"red works only with red numbers")},j.prototype._verify2=function(t,i){p((t.negative|i.negative)===0,"red works only with positives"),p(t.red&&t.red===i.red,"red works only with red numbers")},j.prototype.imod=function(t){if(this.prime)return this.prime.ireduce(t)._forceRed(this);return t.umod(this.m)._forceRed(this)},j.prototype.neg=function(t){if(t.isZero())return t.clone();return this.m.sub(t)._forceRed(this)},j.prototype.add=function(t,i){this._verify2(t,i);var o=t.add(i);if(o.cmp(this.m)>=0)o.isub(this.m);return o._forceRed(this)},j.prototype.iadd=function(t,i){this._verify2(t,i);var o=t.iadd(i);if(o.cmp(this.m)>=0)o.isub(this.m);return o},j.prototype.sub=function(t,i){this._verify2(t,i);var o=t.sub(i);if(o.cmpn(0)<0)o.iadd(this.m);return o._forceRed(this)},j.prototype.isub=function(t,i){this._verify2(t,i);var o=t.isub(i);if(o.cmpn(0)<0)o.iadd(this.m);return o},j.prototype.shl=function(t,i){return this._verify1(t),this.imod(t.ushln(i))},j.prototype.imul=function(t,i){return this._verify2(t,i),this.imod(t.imul(i))},j.prototype.mul=function(t,i){return this._verify2(t,i),this.imod(t.mul(i))},j.prototype.isqr=function(t){return this.imul(t,t.clone())},j.prototype.sqr=function(t){return this.mul(t,t)},j.prototype.sqrt=function(t){if(t.isZero())return t.clone();var i=this.m.andln(3);if(p(i%2===1),i===3){var o=this.m.add(new a(1)).iushrn(2);return this.pow(t,o)}var r=this.m.subn(1),n=0;while(!r.isZero()&&r.andln(1)===0)n++,r.iushrn(1);p(!r.isZero());var u=new a(1).toRed(this),d=u.redNeg(),s=this.m.subn(1).iushrn(1),e=this.m.bitLength();e=new a(2*e*e).toRed(this);while(this.pow(e,s).cmp(d)!==0)e.redIAdd(d);var f=this.pow(e,r),_=this.pow(t,r.addn(1).iushrn(1)),m=this.pow(t,r),I=n;while(m.cmp(u)!==0){var N=m;for(var U=0;N.cmp(u)!==0;U++)N=N.redSqr();p(U<I);var Z=this.pow(f,new a(1).iushln(I-U-1));_=_.redMul(Z),f=Z.redSqr(),m=m.redMul(f),I=U}return _},j.prototype.invm=function(t){var i=t._invmp(this.m);if(i.negative!==0)return i.negative=0,this.imod(i).redNeg();else return this.imod(i)},j.prototype.pow=function(t,i){if(i.isZero())return new a(1).toRed(this);if(i.cmpn(1)===0)return t.clone();var o=4,r=Array(1<<o);r[0]=new a(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var u=r[0],d=0,s=0,e=i.bitLength()%26;if(e===0)e=26;for(n=i.length-1;n>=0;n--){var f=i.words[n];for(var _=e-1;_>=0;_--){var m=f>>_&1;if(u!==r[0])u=this.sqr(u);if(m===0&&d===0){s=0;continue}if(d<<=1,d|=m,s++,s!==o&&(n!==0||_!==0))continue;u=this.mul(u,r[d]),s=0,d=0}e=26}return u},j.prototype.convertTo=function(t){var i=t.umod(this.m);return i===t?i.clone():i},j.prototype.convertFrom=function(t){var i=t.clone();return i.red=null,i},a.mont=function(t){return new rt(t)};function rt(t){if(j.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0)this.shift+=26-this.shift%26;this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}M(rt,j),rt.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},rt.prototype.convertFrom=function(t){var i=this.imod(t.mul(this.rinv));return i.red=null,i},rt.prototype.imul=function(t,i){if(t.isZero()||i.isZero())return t.words[0]=0,t.length=1,t;var o=t.imul(i),r=o.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=o.isub(r).iushrn(this.shift),u=n;if(n.cmp(this.m)>=0)u=n.isub(this.m);else if(n.cmpn(0)<0)u=n.iadd(this.m);return u._forceRed(this)},rt.prototype.mul=function(t,i){if(t.isZero()||i.isZero())return new a(0)._forceRed(this);var o=t.mul(i),r=o.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=o.isub(r).iushrn(this.shift),u=n;if(n.cmp(this.m)>=0)u=n.isub(this.m);else if(n.cmpn(0)<0)u=n.iadd(this.m);return u._forceRed(this)},rt.prototype.invm=function(t){var i=this.imod(t._invmp(this.m).mul(this.r2));return i._forceRed(this)}})(typeof l>"u"||l,h)}),Cs=ht((h)=>{var l=fr(),c=Ee(),b=h;b.define=function(M,a){return new p(M,a)};function p(M,a){this.name=M,this.body=a,this.decoders={},this.encoders={}}p.prototype._createNamed=function(M){var a;try{a=(()=>{throw new Error("Cannot require module "+"vm");})().runInThisContext("(function "+this.name+`(entity) {
|
|
12
|
+
this._initNamed(entity);
|
|
13
|
+
})`)}catch(E){a=function(R){this._initNamed(R)}}return c(a,M),a.prototype._initNamed=function(E){M.call(this,E)},new a(this)},p.prototype._getDecoder=function(M){if(M=M||"der",!this.decoders.hasOwnProperty(M))this.decoders[M]=this._createNamed(l.decoders[M]);return this.decoders[M]},p.prototype.decode=function(M,a,E){return this._getDecoder(a).decode(M,E)},p.prototype._getEncoder=function(M){if(M=M||"der",!this.encoders.hasOwnProperty(M))this.encoders[M]=this._createNamed(l.encoders[M]);return this.encoders[M]},p.prototype.encode=function(M,a,E){return this._getEncoder(a).encode(M,E)}}),Us=ht((h)=>{var l=Ee();function c(p){this._reporterState={obj:null,path:[],options:p||{},errors:[]}}h.Reporter=c,c.prototype.isError=function(p){return p instanceof b},c.prototype.save=function(){var p=this._reporterState;return{obj:p.obj,pathLen:p.path.length}},c.prototype.restore=function(p){var M=this._reporterState;M.obj=p.obj,M.path=M.path.slice(0,p.pathLen)},c.prototype.enterKey=function(p){return this._reporterState.path.push(p)},c.prototype.exitKey=function(p){var M=this._reporterState;M.path=M.path.slice(0,p-1)},c.prototype.leaveKey=function(p,M,a){var E=this._reporterState;if(this.exitKey(p),E.obj!==null)E.obj[M]=a},c.prototype.path=function(){return this._reporterState.path.join("/")},c.prototype.enterObject=function(){var p=this._reporterState,M=p.obj;return p.obj={},M},c.prototype.leaveObject=function(p){var M=this._reporterState,a=M.obj;return M.obj=p,a},c.prototype.error=function(p){var M,a=this._reporterState,E=p instanceof b;if(E)M=p;else M=new b(a.path.map(function(R){return"["+JSON.stringify(R)+"]"}).join(""),p.message||p,p.stack);if(!a.options.partial)throw M;if(!E)a.errors.push(M);return M},c.prototype.wrapResult=function(p){var M=this._reporterState;if(!M.options.partial)return p;return{result:this.isError(p)?null:p,errors:M.errors}};function b(p,M){this.path=p,this.rethrow(M)}l(b,Error),b.prototype.rethrow=function(p){if(this.message=p+" at: "+(this.path||"(shallow)"),Error.captureStackTrace)Error.captureStackTrace(this,b);if(!this.stack)try{throw Error(this.message)}catch(M){this.stack=M.stack}return this}}),vn=ht((h)=>{var l=Ee(),c=nr().Reporter,b=(ye(),jt(pe)).Buffer;function p(a,E){if(c.call(this,E),!b.isBuffer(a)){this.error("Input not Buffer");return}this.base=a,this.offset=0,this.length=a.length}l(p,c),h.DecoderBuffer=p,p.prototype.save=function(){return{offset:this.offset,reporter:c.prototype.save.call(this)}},p.prototype.restore=function(a){var E=new p(this.base);return E.offset=a.offset,E.length=this.offset,this.offset=a.offset,c.prototype.restore.call(this,a.reporter),E},p.prototype.isEmpty=function(){return this.offset===this.length},p.prototype.readUInt8=function(a){if(this.offset+1<=this.length)return this.base.readUInt8(this.offset++,!0);else return this.error(a||"DecoderBuffer overrun")},p.prototype.skip=function(a,E){if(!(this.offset+a<=this.length))return this.error(E||"DecoderBuffer overrun");var R=new p(this.base);return R._reporterState=this._reporterState,R.offset=this.offset,R.length=this.offset+a,this.offset+=a,R},p.prototype.raw=function(a){return this.base.slice(a?a.offset:this.offset,this.length)};function M(a,E){if(Array.isArray(a))this.length=0,this.value=a.map(function(R){if(!(R instanceof M))R=new M(R,E);return this.length+=R.length,R},this);else if(typeof a==="number"){if(!(0<=a&&a<=255))return E.error("non-byte EncoderBuffer value");this.value=a,this.length=1}else if(typeof a==="string")this.value=a,this.length=b.byteLength(a);else if(b.isBuffer(a))this.value=a,this.length=a.length;else return E.error("Unsupported type: "+typeof a)}h.EncoderBuffer=M,M.prototype.join=function(a,E){if(!a)a=new b(this.length);if(!E)E=0;if(this.length===0)return a;if(Array.isArray(this.value))this.value.forEach(function(R){R.join(a,E),E+=R.length});else{if(typeof this.value==="number")a[E]=this.value;else if(typeof this.value==="string")a.write(this.value,E);else if(b.isBuffer(this.value))this.value.copy(a,E);E+=this.length}return a}}),Fs=ht((h,l)=>{var c=nr().Reporter,b=nr().EncoderBuffer,p=nr().DecoderBuffer,M=Ue(),a=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],E=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(a),R=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function w(y,v){var S={};if(this._baseState=S,S.enc=y,S.parent=v||null,S.children=null,S.tag=null,S.args=null,S.reverseArgs=null,S.choice=null,S.optional=!1,S.any=!1,S.obj=!1,S.use=null,S.useDecoder=null,S.key=null,S.default=null,S.explicit=null,S.implicit=null,S.contains=null,!S.parent)S.children=[],this._wrap()}l.exports=w;var g=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];w.prototype.clone=function(){var y=this._baseState,v={};g.forEach(function(A){v[A]=y[A]});var S=new this.constructor(v.parent);return S._baseState=v,S},w.prototype._wrap=function(){var y=this._baseState;E.forEach(function(v){this[v]=function(){var S=new this.constructor(this);return y.children.push(S),S[v].apply(S,arguments)}},this)},w.prototype._init=function(y){var v=this._baseState;M(v.parent===null),y.call(this),v.children=v.children.filter(function(S){return S._baseState.parent===this},this),M.equal(v.children.length,1,"Root node can have only one child")},w.prototype._useArgs=function(y){var v=this._baseState,S=y.filter(function(A){return A instanceof this.constructor},this);if(y=y.filter(function(A){return!(A instanceof this.constructor)},this),S.length!==0)M(v.children===null),v.children=S,S.forEach(function(A){A._baseState.parent=this},this);if(y.length!==0)M(v.args===null),v.args=y,v.reverseArgs=y.map(function(A){if(typeof A!=="object"||A.constructor!==Object)return A;var x={};return Object.keys(A).forEach(function(B){if(B==(B|0))B|=0;var T=A[B];x[T]=B}),x})},R.forEach(function(y){w.prototype[y]=function(){var v=this._baseState;throw Error(y+" not implemented for encoding: "+v.enc)}}),a.forEach(function(y){w.prototype[y]=function(){var v=this._baseState,S=Array.prototype.slice.call(arguments);return M(v.tag===null),v.tag=y,this._useArgs(S),this}}),w.prototype.use=function(y){M(y);var v=this._baseState;return M(v.use===null),v.use=y,this},w.prototype.optional=function(){var y=this._baseState;return y.optional=!0,this},w.prototype.def=function(y){var v=this._baseState;return M(v.default===null),v.default=y,v.optional=!0,this},w.prototype.explicit=function(y){var v=this._baseState;return M(v.explicit===null&&v.implicit===null),v.explicit=y,this},w.prototype.implicit=function(y){var v=this._baseState;return M(v.explicit===null&&v.implicit===null),v.implicit=y,this},w.prototype.obj=function(){var y=this._baseState,v=Array.prototype.slice.call(arguments);if(y.obj=!0,v.length!==0)this._useArgs(v);return this},w.prototype.key=function(y){var v=this._baseState;return M(v.key===null),v.key=y,this},w.prototype.any=function(){var y=this._baseState;return y.any=!0,this},w.prototype.choice=function(y){var v=this._baseState;return M(v.choice===null),v.choice=y,this._useArgs(Object.keys(y).map(function(S){return y[S]})),this},w.prototype.contains=function(y){var v=this._baseState;return M(v.use===null),v.contains=y,this},w.prototype._decode=function(y,v){var S=this._baseState;if(S.parent===null)return y.wrapResult(S.children[0]._decode(y,v));var A=S.default,x=!0,B=null;if(S.key!==null)B=y.enterKey(S.key);if(S.optional){var T=null;if(S.explicit!==null)T=S.explicit;else if(S.implicit!==null)T=S.implicit;else if(S.tag!==null)T=S.tag;if(T===null&&!S.any){var k=y.save();try{if(S.choice===null)this._decodeGeneric(S.tag,y,v);else this._decodeChoice(y,v);x=!0}catch(ft){x=!1}y.restore(k)}else if(x=this._peekTag(y,T,S.any),y.isError(x))return x}var P;if(S.obj&&x)P=y.enterObject();if(x){if(S.explicit!==null){var D=this._decodeTag(y,S.explicit);if(y.isError(D))return D;y=D}var O=y.offset;if(S.use===null&&S.choice===null){if(S.any)var k=y.save();var W=this._decodeTag(y,S.implicit!==null?S.implicit:S.tag,S.any);if(y.isError(W))return W;if(S.any)A=y.raw(k);else y=W}if(v&&v.track&&S.tag!==null)v.track(y.path(),O,y.length,"tagged");if(v&&v.track&&S.tag!==null)v.track(y.path(),y.offset,y.length,"content");if(S.any)A=A;else if(S.choice===null)A=this._decodeGeneric(S.tag,y,v);else A=this._decodeChoice(y,v);if(y.isError(A))return A;if(!S.any&&S.choice===null&&S.children!==null)S.children.forEach(function(ft){ft._decode(y,v)});if(S.contains&&(S.tag==="octstr"||S.tag==="bitstr")){var at=new p(A);A=this._getUse(S.contains,y._reporterState.obj)._decode(at,v)}}if(S.obj&&x)A=y.leaveObject(P);if(S.key!==null&&(A!==null||x===!0))y.leaveKey(B,S.key,A);else if(B!==null)y.exitKey(B);return A},w.prototype._decodeGeneric=function(y,v,S){var A=this._baseState;if(y==="seq"||y==="set")return null;if(y==="seqof"||y==="setof")return this._decodeList(v,y,A.args[0],S);else if(/str$/.test(y))return this._decodeStr(v,y,S);else if(y==="objid"&&A.args)return this._decodeObjid(v,A.args[0],A.args[1],S);else if(y==="objid")return this._decodeObjid(v,null,null,S);else if(y==="gentime"||y==="utctime")return this._decodeTime(v,y,S);else if(y==="null_")return this._decodeNull(v,S);else if(y==="bool")return this._decodeBool(v,S);else if(y==="objDesc")return this._decodeStr(v,y,S);else if(y==="int"||y==="enum")return this._decodeInt(v,A.args&&A.args[0],S);if(A.use!==null)return this._getUse(A.use,v._reporterState.obj)._decode(v,S);else return v.error("unknown tag: "+y)},w.prototype._getUse=function(y,v){var S=this._baseState;if(S.useDecoder=this._use(y,v),M(S.useDecoder._baseState.parent===null),S.useDecoder=S.useDecoder._baseState.children[0],S.implicit!==S.useDecoder._baseState.implicit)S.useDecoder=S.useDecoder.clone(),S.useDecoder._baseState.implicit=S.implicit;return S.useDecoder},w.prototype._decodeChoice=function(y,v){var S=this._baseState,A=null,x=!1;if(Object.keys(S.choice).some(function(B){var T=y.save(),k=S.choice[B];try{var P=k._decode(y,v);if(y.isError(P))return!1;A={type:B,value:P},x=!0}catch(D){return y.restore(T),!1}return!0},this),!x)return y.error("Choice not matched");return A},w.prototype._createEncoderBuffer=function(y){return new b(y,this.reporter)},w.prototype._encode=function(y,v,S){var A=this._baseState;if(A.default!==null&&A.default===y)return;var x=this._encodeValue(y,v,S);if(x===void 0)return;if(this._skipDefault(x,v,S))return;return x},w.prototype._encodeValue=function(y,v,S){var A=this._baseState;if(A.parent===null)return A.children[0]._encode(y,v||new c);var k=null;if(this.reporter=v,A.optional&&y===void 0)if(A.default!==null)y=A.default;else return;var x=null,B=!1;if(A.any)k=this._createEncoderBuffer(y);else if(A.choice)k=this._encodeChoice(y,v);else if(A.contains)x=this._getUse(A.contains,S)._encode(y,v),B=!0;else if(A.children)x=A.children.map(function(O){if(O._baseState.tag==="null_")return O._encode(null,v,y);if(O._baseState.key===null)return v.error("Child should have a key");var W=v.enterKey(O._baseState.key);if(typeof y!=="object")return v.error("Child expected, but input is not object");var at=O._encode(y[O._baseState.key],v,y);return v.leaveKey(W),at},this).filter(function(O){return O}),x=this._createEncoderBuffer(x);else if(A.tag==="seqof"||A.tag==="setof"){if(!(A.args&&A.args.length===1))return v.error("Too many args for : "+A.tag);if(!Array.isArray(y))return v.error("seqof/setof, but data is not Array");var T=this.clone();T._baseState.implicit=null,x=this._createEncoderBuffer(y.map(function(O){var W=this._baseState;return this._getUse(W.args[0],y)._encode(O,v)},T))}else if(A.use!==null)k=this._getUse(A.use,S)._encode(y,v);else x=this._encodePrimitive(A.tag,y),B=!0;var k;if(!A.any&&A.choice===null){var P=A.implicit!==null?A.implicit:A.tag,D=A.implicit===null?"universal":"context";if(P===null){if(A.use===null)v.error("Tag could be omitted only for .use()")}else if(A.use===null)k=this._encodeComposite(P,B,D,x)}if(A.explicit!==null)k=this._encodeComposite(A.explicit,!1,"context",k);return k},w.prototype._encodeChoice=function(y,v){var S=this._baseState,A=S.choice[y.type];if(!A)M(!1,y.type+" not found in "+JSON.stringify(Object.keys(S.choice)));return A._encode(y.value,v)},w.prototype._encodePrimitive=function(y,v){var S=this._baseState;if(/str$/.test(y))return this._encodeStr(v,y);else if(y==="objid"&&S.args)return this._encodeObjid(v,S.reverseArgs[0],S.args[1]);else if(y==="objid")return this._encodeObjid(v,null,null);else if(y==="gentime"||y==="utctime")return this._encodeTime(v,y);else if(y==="null_")return this._encodeNull();else if(y==="int"||y==="enum")return this._encodeInt(v,S.args&&S.reverseArgs[0]);else if(y==="bool")return this._encodeBool(v);else if(y==="objDesc")return this._encodeStr(v,y);else throw Error("Unsupported tag: "+y)},w.prototype._isNumstr=function(y){return/^[0-9 ]*$/.test(y)},w.prototype._isPrintstr=function(y){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(y)}}),nr=ht((h)=>{var l=h;l.Reporter=Us().Reporter,l.DecoderBuffer=vn().DecoderBuffer,l.EncoderBuffer=vn().EncoderBuffer,l.Node=Fs()}),js=ht((h)=>{var l=Ln();h.tagClass={0:"universal",1:"application",2:"context",3:"private"},h.tagClassByName=l._reverse(h.tagClass),h.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"},h.tagByName=l._reverse(h.tag)}),Ln=ht((h)=>{var l=h;l._reverse=function(c){var b={};return Object.keys(c).forEach(function(p){if((p|0)==p)p=p|0;var M=c[p];b[M]=p}),b},l.der=js()}),Cn=ht((h,l)=>{var c=Ee(),b=fr(),p=b.base,M=b.bignum,a=b.constants.der;function E(y){this.enc="der",this.name=y.name,this.entity=y,this.tree=new R,this.tree._init(y.body)}l.exports=E,E.prototype.decode=function(y,v){if(!(y instanceof p.DecoderBuffer))y=new p.DecoderBuffer(y,v);return this.tree._decode(y,v)};function R(y){p.Node.call(this,"der",y)}c(R,p.Node),R.prototype._peekTag=function(y,v,S){if(y.isEmpty())return!1;var A=y.save(),x=w(y,'Failed to peek tag: "'+v+'"');if(y.isError(x))return x;return y.restore(A),x.tag===v||x.tagStr===v||x.tagStr+"of"===v||S},R.prototype._decodeTag=function(y,v,S){var A=w(y,'Failed to decode tag of "'+v+'"');if(y.isError(A))return A;var x=g(y,A.primitive,'Failed to get length of "'+v+'"');if(y.isError(x))return x;if(!S&&A.tag!==v&&A.tagStr!==v&&A.tagStr+"of"!==v)return y.error('Failed to match tag: "'+v+'"');if(A.primitive||x!==null)return y.skip(x,'Failed to match body of: "'+v+'"');var B=y.save(),T=this._skipUntilEnd(y,'Failed to skip indefinite length body: "'+this.tag+'"');if(y.isError(T))return T;return x=y.offset-B.offset,y.restore(B),y.skip(x,'Failed to match body of: "'+v+'"')},R.prototype._skipUntilEnd=function(y,v){while(!0){var S=w(y,v);if(y.isError(S))return S;var A=g(y,S.primitive,v);if(y.isError(A))return A;var x;if(S.primitive||A!==null)x=y.skip(A);else x=this._skipUntilEnd(y,v);if(y.isError(x))return x;if(S.tagStr==="end")break}},R.prototype._decodeList=function(y,v,S,A){var x=[];while(!y.isEmpty()){var B=this._peekTag(y,"end");if(y.isError(B))return B;var T=S.decode(y,"der",A);if(y.isError(T)&&B)break;x.push(T)}return x},R.prototype._decodeStr=function(y,v){if(v==="bitstr"){var S=y.readUInt8();if(y.isError(S))return S;return{unused:S,data:y.raw()}}else if(v==="bmpstr"){var A=y.raw();if(A.length%2===1)return y.error("Decoding of string type: bmpstr length mismatch");var x="";for(var B=0;B<A.length/2;B++)x+=String.fromCharCode(A.readUInt16BE(B*2));return x}else if(v==="numstr"){var T=y.raw().toString("ascii");if(!this._isNumstr(T))return y.error("Decoding of string type: numstr unsupported characters");return T}else if(v==="octstr")return y.raw();else if(v==="objDesc")return y.raw();else if(v==="printstr"){var k=y.raw().toString("ascii");if(!this._isPrintstr(k))return y.error("Decoding of string type: printstr unsupported characters");return k}else if(/str$/.test(v))return y.raw().toString();else return y.error("Decoding of string type: "+v+" unsupported")},R.prototype._decodeObjid=function(y,v,S){var A,x=[],B=0;while(!y.isEmpty()){var T=y.readUInt8();if(B<<=7,B|=T&127,(T&128)===0)x.push(B),B=0}if(T&128)x.push(B);var k=x[0]/40|0,P=x[0]%40;if(S)A=x;else A=[k,P].concat(x.slice(1));if(v){var D=v[A.join(" ")];if(D===void 0)D=v[A.join(".")];if(D!==void 0)A=D}return A},R.prototype._decodeTime=function(y,v){var S=y.raw().toString();if(v==="gentime")var A=S.slice(0,4)|0,x=S.slice(4,6)|0,B=S.slice(6,8)|0,T=S.slice(8,10)|0,k=S.slice(10,12)|0,P=S.slice(12,14)|0;else if(v==="utctime"){var A=S.slice(0,2)|0,x=S.slice(2,4)|0,B=S.slice(4,6)|0,T=S.slice(6,8)|0,k=S.slice(8,10)|0,P=S.slice(10,12)|0;if(A<70)A=2000+A;else A=1900+A}else return y.error("Decoding "+v+" time is not supported yet");return Date.UTC(A,x-1,B,T,k,P,0)},R.prototype._decodeNull=function(y){return null},R.prototype._decodeBool=function(y){var v=y.readUInt8();if(y.isError(v))return v;else return v!==0},R.prototype._decodeInt=function(y,v){var S=y.raw(),A=new M(S);if(v)A=v[A.toString(10)]||A;return A},R.prototype._use=function(y,v){if(typeof y==="function")y=y(v);return y._getDecoder("der").tree};function w(y,v){var S=y.readUInt8(v);if(y.isError(S))return S;var A=a.tagClass[S>>6],x=(S&32)===0;if((S&31)===31){var B=S;S=0;while((B&128)===128){if(B=y.readUInt8(v),y.isError(B))return B;S<<=7,S|=B&127}}else S&=31;var T=a.tag[S];return{cls:A,primitive:x,tag:S,tagStr:T}}function g(y,v,S){var A=y.readUInt8(S);if(y.isError(A))return A;if(!v&&A===128)return null;if((A&128)===0)return A;var x=A&127;if(x>4)return y.error("length octect is too long");A=0;for(var B=0;B<x;B++){A<<=8;var T=y.readUInt8(S);if(y.isError(T))return T;A|=T}return A}}),zs=ht((h,l)=>{var c=Ee(),b=(ye(),jt(pe)).Buffer,p=Cn();function M(a){p.call(this,a),this.enc="pem"}c(M,p),l.exports=M,M.prototype.decode=function(a,E){var R=a.toString().split(/[\r\n]+/g),w=E.label.toUpperCase(),g=/^-----(BEGIN|END) ([^-]+)-----$/,y=-1,v=-1;for(var S=0;S<R.length;S++){var A=R[S].match(g);if(A===null)continue;if(A[2]!==w)continue;if(y===-1){if(A[1]!=="BEGIN")break;y=S}else{if(A[1]!=="END")break;v=S;break}}if(y===-1||v===-1)throw Error("PEM section not found for: "+w);var x=R.slice(y+1,v).join("");x.replace(/[^a-z0-9\+\/=]+/gi,"");var B=new b(x,"base64");return p.prototype.decode.call(this,B,E)}}),Hs=ht((h)=>{var l=h;l.der=Cn(),l.pem=zs()}),Un=ht((h,l)=>{var c=Ee(),b=(ye(),jt(pe)).Buffer,p=fr(),M=p.base,a=p.constants.der;function E(y){this.enc="der",this.name=y.name,this.entity=y,this.tree=new R,this.tree._init(y.body)}l.exports=E,E.prototype.encode=function(y,v){return this.tree._encode(y,v).join()};function R(y){M.Node.call(this,"der",y)}c(R,M.Node),R.prototype._encodeComposite=function(y,v,S,A){var x=g(y,v,S,this.reporter);if(A.length<128){var k=new b(2);return k[0]=x,k[1]=A.length,this._createEncoderBuffer([k,A])}var B=1;for(var T=A.length;T>=256;T>>=8)B++;var k=new b(2+B);k[0]=x,k[1]=128|B;for(var T=1+B,P=A.length;P>0;T--,P>>=8)k[T]=P&255;return this._createEncoderBuffer([k,A])},R.prototype._encodeStr=function(y,v){if(v==="bitstr")return this._createEncoderBuffer([y.unused|0,y.data]);else if(v==="bmpstr"){var S=new b(y.length*2);for(var A=0;A<y.length;A++)S.writeUInt16BE(y.charCodeAt(A),A*2);return this._createEncoderBuffer(S)}else if(v==="numstr"){if(!this._isNumstr(y))return this.reporter.error("Encoding of string type: numstr supports only digits and space");return this._createEncoderBuffer(y)}else if(v==="printstr"){if(!this._isPrintstr(y))return this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark");return this._createEncoderBuffer(y)}else if(/str$/.test(v))return this._createEncoderBuffer(y);else if(v==="objDesc")return this._createEncoderBuffer(y);else return this.reporter.error("Encoding of string type: "+v+" unsupported")},R.prototype._encodeObjid=function(y,v,S){if(typeof y==="string"){if(!v)return this.reporter.error("string objid given, but no values map found");if(!v.hasOwnProperty(y))return this.reporter.error("objid not found in values map");y=v[y].split(/[\s\.]+/g);for(var A=0;A<y.length;A++)y[A]|=0}else if(Array.isArray(y)){y=y.slice();for(var A=0;A<y.length;A++)y[A]|=0}if(!Array.isArray(y))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(y));if(!S){if(y[1]>=40)return this.reporter.error("Second objid identifier OOB");y.splice(0,2,y[0]*40+y[1])}var x=0;for(var A=0;A<y.length;A++){var B=y[A];for(x++;B>=128;B>>=7)x++}var T=new b(x),k=T.length-1;for(var A=y.length-1;A>=0;A--){var B=y[A];T[k--]=B&127;while((B>>=7)>0)T[k--]=128|B&127}return this._createEncoderBuffer(T)};function w(y){if(y<10)return"0"+y;else return y}R.prototype._encodeTime=function(y,v){var S,A=new Date(y);if(v==="gentime")S=[w(A.getFullYear()),w(A.getUTCMonth()+1),w(A.getUTCDate()),w(A.getUTCHours()),w(A.getUTCMinutes()),w(A.getUTCSeconds()),"Z"].join("");else if(v==="utctime")S=[w(A.getFullYear()%100),w(A.getUTCMonth()+1),w(A.getUTCDate()),w(A.getUTCHours()),w(A.getUTCMinutes()),w(A.getUTCSeconds()),"Z"].join("");else this.reporter.error("Encoding "+v+" time is not supported yet");return this._encodeStr(S,"octstr")},R.prototype._encodeNull=function(){return this._createEncoderBuffer("")},R.prototype._encodeInt=function(y,v){if(typeof y==="string"){if(!v)return this.reporter.error("String int or enum given, but no values map");if(!v.hasOwnProperty(y))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(y));y=v[y]}if(typeof y!=="number"&&!b.isBuffer(y)){var S=y.toArray();if(!y.sign&&S[0]&128)S.unshift(0);y=new b(S)}if(b.isBuffer(y)){var A=y.length;if(y.length===0)A++;var B=new b(A);if(y.copy(B),y.length===0)B[0]=0;return this._createEncoderBuffer(B)}if(y<128)return this._createEncoderBuffer(y);if(y<256)return this._createEncoderBuffer([0,y]);var A=1;for(var x=y;x>=256;x>>=8)A++;var B=Array(A);for(var x=B.length-1;x>=0;x--)B[x]=y&255,y>>=8;if(B[0]&128)B.unshift(0);return this._createEncoderBuffer(new b(B))},R.prototype._encodeBool=function(y){return this._createEncoderBuffer(y?255:0)},R.prototype._use=function(y,v){if(typeof y==="function")y=y(v);return y._getEncoder("der").tree},R.prototype._skipDefault=function(y,v,S){var A=this._baseState,x;if(A.default===null)return!1;var B=y.join();if(A.defaultBuffer===void 0)A.defaultBuffer=this._encodeValue(A.default,v,S).join();if(B.length!==A.defaultBuffer.length)return!1;for(x=0;x<B.length;x++)if(B[x]!==A.defaultBuffer[x])return!1;return!0};function g(y,v,S,A){var x;if(y==="seqof")y="seq";else if(y==="setof")y="set";if(a.tagByName.hasOwnProperty(y))x=a.tagByName[y];else if(typeof y==="number"&&(y|0)===y)x=y;else return A.error("Unknown tag: "+y);if(x>=31)return A.error("Multi-octet tag encoding unsupported");if(!v)x|=32;return x|=a.tagClassByName[S||"universal"]<<6,x}}),Ws=ht((h,l)=>{var c=Ee(),b=Un();function p(M){b.call(this,M),this.enc="pem"}c(p,b),l.exports=p,p.prototype.encode=function(M,a){var E=b.prototype.encode.call(this,M),R=E.toString("base64"),w=["-----BEGIN "+a.label+"-----"];for(var g=0;g<R.length;g+=64)w.push(R.slice(g,g+64));return w.push("-----END "+a.label+"-----"),w.join(`
|
|
14
|
+
`)}}),$s=ht((h)=>{var l=h;l.der=Un(),l.pem=Ws()}),fr=ht((h)=>{var l=h;l.bignum=Ls(),l.define=Cs().define,l.base=nr(),l.constants=Ln(),l.decoders=Hs(),l.encoders=$s()}),Ks=ht((h,l)=>{var c=fr(),b=c.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),p=c.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),M=c.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),a=c.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(M),this.key("subjectPublicKey").bitstr())}),E=c.define("RelativeDistinguishedName",function(){this.setof(p)}),R=c.define("RDNSequence",function(){this.seqof(E)}),w=c.define("Name",function(){this.choice({rdnSequence:this.use(R)})}),g=c.define("Validity",function(){this.seq().obj(this.key("notBefore").use(b),this.key("notAfter").use(b))}),y=c.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),v=c.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(M),this.key("issuer").use(w),this.key("validity").use(g),this.key("subject").use(w),this.key("subjectPublicKeyInfo").use(a),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(y).optional())}),S=c.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(v),this.key("signatureAlgorithm").use(M),this.key("signatureValue").bitstr())});l.exports=S}),Zs=ht((h)=>{var l=fr();h.certificate=Ks();var c=l.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())});h.RSAPrivateKey=c;var b=l.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});h.RSAPublicKey=b;var p=l.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())}),M=l.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(p),this.key("subjectPublicKey").bitstr())});h.PublicKey=M;var a=l.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(p),this.key("subjectPrivateKey").octstr())});h.PrivateKey=a;var E=l.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())});h.EncryptedPrivateKey=E;var R=l.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())});h.DSAPrivateKey=R,h.DSAparam=l.define("DSAparam",function(){this.int()});var w=l.define("ECParameters",function(){this.choice({namedCurve:this.objid()})}),g=l.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())});h.ECPrivateKey=g,h.signature=l.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})}),Gs=ht((h,l)=>{l.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"}}),Vs=ht((h,l)=>{var c=Me().Buffer,b=ri().Transform,p=Ee();function M(w){b.call(this),this._block=c.allocUnsafe(w),this._blockSize=w,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}p(M,b),M.prototype._transform=function(w,g,y){var v=null;try{this.update(w,g)}catch(S){v=S}y(v)},M.prototype._flush=function(w){var g=null;try{this.push(this.digest())}catch(y){g=y}w(g)};var a=typeof Uint8Array<"u",E=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&ArrayBuffer.isView&&(c.prototype instanceof Uint8Array||c.TYPED_ARRAY_SUPPORT);function R(w,g){if(w instanceof c)return w;if(typeof w==="string")return c.from(w,g);if(E&&ArrayBuffer.isView(w)){if(w.byteLength===0)return c.alloc(0);var y=c.from(w.buffer,w.byteOffset,w.byteLength);if(y.byteLength===w.byteLength)return y}if(a&&w instanceof Uint8Array)return c.from(w);if(c.isBuffer(w)&&w.constructor&&typeof w.constructor.isBuffer==="function"&&w.constructor.isBuffer(w))return c.from(w);throw TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.')}M.prototype.update=function(w,g){if(this._finalized)throw Error("Digest already called");w=R(w,g);var y=this._block,v=0;while(this._blockOffset+w.length-v>=this._blockSize){for(var S=this._blockOffset;S<this._blockSize;)y[S++]=w[v++];this._update(),this._blockOffset=0}while(v<w.length)y[this._blockOffset++]=w[v++];for(var A=0,x=w.length*8;x>0;++A)if(this._length[A]+=x,x=this._length[A]/4294967296|0,x>0)this._length[A]-=4294967296*x;return this},M.prototype._update=function(){throw Error("_update is not implemented")},M.prototype.digest=function(w){if(this._finalized)throw Error("Digest already called");this._finalized=!0;var g=this._digest();if(w!==void 0)g=g.toString(w);this._block.fill(0),this._blockOffset=0;for(var y=0;y<4;++y)this._length[y]=0;return g},M.prototype._digest=function(){throw Error("_digest is not implemented")},l.exports=M}),Js=ht((h,l)=>{var c=Ee(),b=Vs(),p=Me().Buffer,M=Array(16);function a(){b.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}c(a,b),a.prototype._update=function(){var v=M;for(var S=0;S<16;++S)v[S]=this._block.readInt32LE(S*4);var A=this._a,x=this._b,B=this._c,T=this._d;A=R(A,x,B,T,v[0],3614090360,7),T=R(T,A,x,B,v[1],3905402710,12),B=R(B,T,A,x,v[2],606105819,17),x=R(x,B,T,A,v[3],3250441966,22),A=R(A,x,B,T,v[4],4118548399,7),T=R(T,A,x,B,v[5],1200080426,12),B=R(B,T,A,x,v[6],2821735955,17),x=R(x,B,T,A,v[7],4249261313,22),A=R(A,x,B,T,v[8],1770035416,7),T=R(T,A,x,B,v[9],2336552879,12),B=R(B,T,A,x,v[10],4294925233,17),x=R(x,B,T,A,v[11],2304563134,22),A=R(A,x,B,T,v[12],1804603682,7),T=R(T,A,x,B,v[13],4254626195,12),B=R(B,T,A,x,v[14],2792965006,17),x=R(x,B,T,A,v[15],1236535329,22),A=w(A,x,B,T,v[1],4129170786,5),T=w(T,A,x,B,v[6],3225465664,9),B=w(B,T,A,x,v[11],643717713,14),x=w(x,B,T,A,v[0],3921069994,20),A=w(A,x,B,T,v[5],3593408605,5),T=w(T,A,x,B,v[10],38016083,9),B=w(B,T,A,x,v[15],3634488961,14),x=w(x,B,T,A,v[4],3889429448,20),A=w(A,x,B,T,v[9],568446438,5),T=w(T,A,x,B,v[14],3275163606,9),B=w(B,T,A,x,v[3],4107603335,14),x=w(x,B,T,A,v[8],1163531501,20),A=w(A,x,B,T,v[13],2850285829,5),T=w(T,A,x,B,v[2],4243563512,9),B=w(B,T,A,x,v[7],1735328473,14),x=w(x,B,T,A,v[12],2368359562,20),A=g(A,x,B,T,v[5],4294588738,4),T=g(T,A,x,B,v[8],2272392833,11),B=g(B,T,A,x,v[11],1839030562,16),x=g(x,B,T,A,v[14],4259657740,23),A=g(A,x,B,T,v[1],2763975236,4),T=g(T,A,x,B,v[4],1272893353,11),B=g(B,T,A,x,v[7],4139469664,16),x=g(x,B,T,A,v[10],3200236656,23),A=g(A,x,B,T,v[13],681279174,4),T=g(T,A,x,B,v[0],3936430074,11),B=g(B,T,A,x,v[3],3572445317,16),x=g(x,B,T,A,v[6],76029189,23),A=g(A,x,B,T,v[9],3654602809,4),T=g(T,A,x,B,v[12],3873151461,11),B=g(B,T,A,x,v[15],530742520,16),x=g(x,B,T,A,v[2],3299628645,23),A=y(A,x,B,T,v[0],4096336452,6),T=y(T,A,x,B,v[7],1126891415,10),B=y(B,T,A,x,v[14],2878612391,15),x=y(x,B,T,A,v[5],4237533241,21),A=y(A,x,B,T,v[12],1700485571,6),T=y(T,A,x,B,v[3],2399980690,10),B=y(B,T,A,x,v[10],4293915773,15),x=y(x,B,T,A,v[1],2240044497,21),A=y(A,x,B,T,v[8],1873313359,6),T=y(T,A,x,B,v[15],4264355552,10),B=y(B,T,A,x,v[6],2734768916,15),x=y(x,B,T,A,v[13],1309151649,21),A=y(A,x,B,T,v[4],4149444226,6),T=y(T,A,x,B,v[11],3174756917,10),B=y(B,T,A,x,v[2],718787259,15),x=y(x,B,T,A,v[9],3951481745,21),this._a=this._a+A|0,this._b=this._b+x|0,this._c=this._c+B|0,this._d=this._d+T|0},a.prototype._digest=function(){if(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 v=p.allocUnsafe(16);return v.writeInt32LE(this._a,0),v.writeInt32LE(this._b,4),v.writeInt32LE(this._c,8),v.writeInt32LE(this._d,12),v};function E(v,S){return v<<S|v>>>32-S}function R(v,S,A,x,B,T,k){return E(v+(S&A|~S&x)+B+T|0,k)+S|0}function w(v,S,A,x,B,T,k){return E(v+(S&x|A&~x)+B+T|0,k)+S|0}function g(v,S,A,x,B,T,k){return E(v+(S^A^x)+B+T|0,k)+S|0}function y(v,S,A,x,B,T,k){return E(v+(A^(S|~x))+B+T|0,k)+S|0}l.exports=a}),Ys=ht((h,l)=>{var c=Me().Buffer,b=Js();function p(M,a,E,R){if(!c.isBuffer(M))M=c.from(M,"binary");if(a){if(!c.isBuffer(a))a=c.from(a,"binary");if(a.length!==8)throw RangeError("salt should be Buffer with 8 byte length")}var w=E/8,g=c.alloc(w),y=c.alloc(R||0),v=c.alloc(0);while(w>0||R>0){var S=new b;if(S.update(v),S.update(M),a)S.update(a);v=S.digest();var A=0;if(w>0){var x=g.length-w;A=Math.min(w,v.length),v.copy(g,x,0,A),w-=A}if(A<v.length&&R>0){var B=y.length-R,T=Math.min(R,v.length-A);v.copy(y,B,A,A+T),R-=T}}return v.fill(0),{key:g,iv:y}}l.exports=p}),Fn=ht((h)=>{var l=(Ae(),jt(Re));h.createCipher=h.Cipher=l.createCipher,h.createCipheriv=h.Cipheriv=l.createCipheriv,h.createDecipher=h.Decipher=l.createDecipher,h.createDecipheriv=h.Decipheriv=l.createDecipheriv,h.listCiphers=h.getCiphers=l.getCiphers}),Xs=ht((h,l)=>{var c=/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,b=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,p=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,M=Ys(),a=Fn(),E=Me().Buffer;l.exports=function(R,w){var g=R.toString(),y=g.match(c),v;if(!y){var S=g.match(p);v=E.from(S[2].replace(/[\r\n]/g,""),"base64")}else{var A="aes"+y[1],x=E.from(y[2],"hex"),B=E.from(y[3].replace(/[\r\n]/g,""),"base64"),T=M(w,x.slice(0,8),parseInt(y[1],10)).key,k=[],P=a.createDecipheriv(A,T,x);k.push(P.update(B)),k.push(P.final()),v=E.concat(k)}var D=g.match(b)[1];return{tag:D,data:v}}}),jn=ht((h,l)=>{var c=Zs(),b=Gs(),p=Xs(),M=Fn(),a=kn().pbkdf2Sync,E=Me().Buffer;function R(g,y){var v=g.algorithm.decrypt.kde.kdeparams.salt,S=parseInt(g.algorithm.decrypt.kde.kdeparams.iters.toString(),10),A=b[g.algorithm.decrypt.cipher.algo.join(".")],x=g.algorithm.decrypt.cipher.iv,B=g.subjectPrivateKey,T=parseInt(A.split("-")[1],10)/8,k=a(y,v,S,T,"sha1"),P=M.createDecipheriv(A,k,x),D=[];return D.push(P.update(B)),D.push(P.final()),E.concat(D)}function w(g){var y;if(typeof g==="object"&&!E.isBuffer(g))y=g.passphrase,g=g.key;if(typeof g==="string")g=E.from(g);var v=p(g,y),S=v.tag,A=v.data,x,B;switch(S){case"CERTIFICATE":B=c.certificate.decode(A,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":if(!B)B=c.PublicKey.decode(A,"der");switch(x=B.algorithm.algorithm.join("."),x){case"1.2.840.113549.1.1.1":return c.RSAPublicKey.decode(B.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return B.subjectPrivateKey=B.subjectPublicKey,{type:"ec",data:B};case"1.2.840.10040.4.1":return B.algorithm.params.pub_key=c.DSAparam.decode(B.subjectPublicKey.data,"der"),{type:"dsa",data:B.algorithm.params};default:throw Error("unknown key id "+x)}case"ENCRYPTED PRIVATE KEY":A=c.EncryptedPrivateKey.decode(A,"der"),A=R(A,y);case"PRIVATE KEY":switch(B=c.PrivateKey.decode(A,"der"),x=B.algorithm.algorithm.join("."),x){case"1.2.840.113549.1.1.1":return c.RSAPrivateKey.decode(B.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:B.algorithm.curve,privateKey:c.ECPrivateKey.decode(B.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return B.algorithm.params.priv_key=c.DSAparam.decode(B.subjectPrivateKey,"der"),{type:"dsa",params:B.algorithm.params};default:throw Error("unknown key id "+x)}case"RSA PUBLIC KEY":return c.RSAPublicKey.decode(A,"der");case"RSA PRIVATE KEY":return c.RSAPrivateKey.decode(A,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:c.DSAPrivateKey.decode(A,"der")};case"EC PRIVATE KEY":return A=c.ECPrivateKey.decode(A,"der"),{curve:A.parameters.value,privateKey:A.privateKey};default:throw Error("unknown key type "+S)}}w.signature=c.signature,l.exports=w}),zn=ht((h,l)=>{var c=Er(),b=Me().Buffer;l.exports=function(M,a){var E=b.alloc(0),R=0,w;while(E.length<a)w=p(R++),E=b.concat([E,c("sha1").update(M).update(w).digest()]);return E.slice(0,a)};function p(M){var a=b.allocUnsafe(4);return a.writeUInt32BE(M,0),a}}),Hn=ht((h,l)=>{l.exports=function(c,b){var p=c.length,M=-1;while(++M<p)c[M]^=b[M];return c}}),di=ht((h,l)=>{(function(c,b){function p(t,i){if(!t)throw Error(i||"Assertion failed")}function M(t,i){t.super_=i;var o=function(){};o.prototype=i.prototype,t.prototype=new o,t.prototype.constructor=t}function a(t,i,o){if(a.isBN(t))return t;if(this.negative=0,this.words=null,this.length=0,this.red=null,t!==null){if(i==="le"||i==="be")o=i,i=10;this._init(t||0,i||10,o||"be")}}if(typeof c==="object")c.exports=a;else b.BN=a;a.BN=a,a.wordSize=26;var E;try{if(typeof window<"u"&&typeof window.Buffer<"u")E=window.Buffer;else E=(ye(),jt(pe)).Buffer}catch(t){}a.isBN=function(t){if(t instanceof a)return!0;return t!==null&&typeof t==="object"&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,i){if(t.cmp(i)>0)return t;return i},a.min=function(t,i){if(t.cmp(i)<0)return t;return i},a.prototype._init=function(t,i,o){if(typeof t==="number")return this._initNumber(t,i,o);if(typeof t==="object")return this._initArray(t,i,o);if(i==="hex")i=16;p(i===(i|0)&&i>=2&&i<=36),t=t.toString().replace(/\s+/g,"");var r=0;if(t[0]==="-")r++,this.negative=1;if(r<t.length){if(i===16)this._parseHex(t,r,o);else if(this._parseBase(t,i,r),o==="le")this._initArray(this.toArray(),i,o)}},a.prototype._initNumber=function(t,i,o){if(t<0)this.negative=1,t=-t;if(t<67108864)this.words=[t&67108863],this.length=1;else if(t<4503599627370496)this.words=[t&67108863,t/67108864&67108863],this.length=2;else p(t<9007199254740992),this.words=[t&67108863,t/67108864&67108863,1],this.length=3;if(o!=="le")return;this._initArray(this.toArray(),i,o)},a.prototype._initArray=function(t,i,o){if(p(typeof t.length==="number"),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,u,d=0;if(o==="be"){for(r=t.length-1,n=0;r>=0;r-=3)if(u=t[r]|t[r-1]<<8|t[r-2]<<16,this.words[n]|=u<<d&67108863,this.words[n+1]=u>>>26-d&67108863,d+=24,d>=26)d-=26,n++}else if(o==="le"){for(r=0,n=0;r<t.length;r+=3)if(u=t[r]|t[r+1]<<8|t[r+2]<<16,this.words[n]|=u<<d&67108863,this.words[n+1]=u>>>26-d&67108863,d+=24,d>=26)d-=26,n++}return this.strip()};function R(t,i){var o=t.charCodeAt(i);if(o>=65&&o<=70)return o-55;else if(o>=97&&o<=102)return o-87;else return o-48&15}function w(t,i,o){var r=R(t,o);if(o-1>=i)r|=R(t,o-1)<<4;return r}a.prototype._parseHex=function(t,i,o){this.length=Math.ceil((t.length-i)/6),this.words=Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n=0,u=0,d;if(o==="be")for(r=t.length-1;r>=i;r-=2)if(d=w(t,i,r)<<n,this.words[u]|=d&67108863,n>=18)n-=18,u+=1,this.words[u]|=d>>>26;else n+=8;else{var s=t.length-i;for(r=s%2===0?i+1:i;r<t.length;r+=2)if(d=w(t,i,r)<<n,this.words[u]|=d&67108863,n>=18)n-=18,u+=1,this.words[u]|=d>>>26;else n+=8}this.strip()};function g(t,i,o,r){var n=0,u=Math.min(t.length,o);for(var d=i;d<u;d++){var s=t.charCodeAt(d)-48;if(n*=r,s>=49)n+=s-49+10;else if(s>=17)n+=s-17+10;else n+=s}return n}a.prototype._parseBase=function(t,i,o){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=i)r++;r--,n=n/i|0;var u=t.length-o,d=u%r,s=Math.min(u,u-d)+o,e=0;for(var f=o;f<s;f+=r)if(e=g(t,f,f+r,i),this.imuln(n),this.words[0]+e<67108864)this.words[0]+=e;else this._iaddn(e);if(d!==0){var _=1;e=g(t,f,t.length,i);for(f=0;f<d;f++)_*=i;if(this.imuln(_),this.words[0]+e<67108864)this.words[0]+=e;else this._iaddn(e)}this.strip()},a.prototype.copy=function(t){t.words=Array(this.length);for(var i=0;i<this.length;i++)t.words[i]=this.words[i];t.length=this.length,t.negative=this.negative,t.red=this.red},a.prototype.clone=function(){var t=new a(null);return this.copy(t),t},a.prototype._expand=function(t){while(this.length<t)this.words[this.length++]=0;return this},a.prototype.strip=function(){while(this.length>1&&this.words[this.length-1]===0)this.length--;return this._normSign()},a.prototype._normSign=function(){if(this.length===1&&this.words[0]===0)this.negative=0;return this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var y=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],v=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],S=[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];if(a.prototype.toString=function(t,i){t=t||10,i=i|0||1;var o;if(t===16||t==="hex"){o="";var r=0,n=0;for(var u=0;u<this.length;u++){var d=this.words[u],s=((d<<r|n)&16777215).toString(16);if(n=d>>>24-r&16777215,r+=2,r>=26)r-=26,u--;if(n!==0||u!==this.length-1)o=y[6-s.length]+s+o;else o=s+o}if(n!==0)o=n.toString(16)+o;while(o.length%i!==0)o="0"+o;if(this.negative!==0)o="-"+o;return o}if(t===(t|0)&&t>=2&&t<=36){var e=v[t],f=S[t];o="";var _=this.clone();_.negative=0;while(!_.isZero()){var m=_.modn(f).toString(t);if(_=_.idivn(f),!_.isZero())o=y[e-m.length]+m+o;else o=m+o}if(this.isZero())o="0"+o;while(o.length%i!==0)o="0"+o;if(this.negative!==0)o="-"+o;return o}p(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];if(this.length===2)t+=this.words[1]*67108864;else if(this.length===3&&this.words[2]===1)t+=4503599627370496+this.words[1]*67108864;else if(this.length>2)p(!1,"Number can only safely store up to 53 bits");return this.negative!==0?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,i){return p(typeof E<"u"),this.toArrayLike(E,t,i)},a.prototype.toArray=function(t,i){return this.toArrayLike(Array,t,i)},a.prototype.toArrayLike=function(t,i,o){var r=this.byteLength(),n=o||Math.max(1,r);p(r<=n,"byte array longer than desired length"),p(n>0,"Requested array length <= 0"),this.strip();var u=i==="le",d=new t(n),s,e,f=this.clone();if(!u){for(e=0;e<n-r;e++)d[e]=0;for(e=0;!f.isZero();e++)s=f.andln(255),f.iushrn(8),d[n-e-1]=s}else{for(e=0;!f.isZero();e++)s=f.andln(255),f.iushrn(8),d[e]=s;for(;e<n;e++)d[e]=0}return d},Math.clz32)a.prototype._countBits=function(t){return 32-Math.clz32(t)};else a.prototype._countBits=function(t){var i=t,o=0;if(i>=4096)o+=13,i>>>=13;if(i>=64)o+=7,i>>>=7;if(i>=8)o+=4,i>>>=4;if(i>=2)o+=2,i>>>=2;return o+i};a.prototype._zeroBits=function(t){if(t===0)return 26;var i=t,o=0;if((i&8191)===0)o+=13,i>>>=13;if((i&127)===0)o+=7,i>>>=7;if((i&15)===0)o+=4,i>>>=4;if((i&3)===0)o+=2,i>>>=2;if((i&1)===0)o++;return o},a.prototype.bitLength=function(){var t=this.words[this.length-1],i=this._countBits(t);return(this.length-1)*26+i};function A(t){var i=Array(t.bitLength());for(var o=0;o<i.length;o++){var r=o/26|0,n=o%26;i[o]=(t.words[r]&1<<n)>>>n}return i}a.prototype.zeroBits=function(){if(this.isZero())return 0;var t=0;for(var i=0;i<this.length;i++){var o=this._zeroBits(this.words[i]);if(t+=o,o!==26)break}return t},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(t){if(this.negative!==0)return this.abs().inotn(t).iaddn(1);return this.clone()},a.prototype.fromTwos=function(t){if(this.testn(t-1))return this.notn(t).iaddn(1).ineg();return this.clone()},a.prototype.isNeg=function(){return this.negative!==0},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){if(!this.isZero())this.negative^=1;return this},a.prototype.iuor=function(t){while(this.length<t.length)this.words[this.length++]=0;for(var i=0;i<t.length;i++)this.words[i]=this.words[i]|t.words[i];return this.strip()},a.prototype.ior=function(t){return p((this.negative|t.negative)===0),this.iuor(t)},a.prototype.or=function(t){if(this.length>t.length)return this.clone().ior(t);return t.clone().ior(this)},a.prototype.uor=function(t){if(this.length>t.length)return this.clone().iuor(t);return t.clone().iuor(this)},a.prototype.iuand=function(t){var i;if(this.length>t.length)i=t;else i=this;for(var o=0;o<i.length;o++)this.words[o]=this.words[o]&t.words[o];return this.length=i.length,this.strip()},a.prototype.iand=function(t){return p((this.negative|t.negative)===0),this.iuand(t)},a.prototype.and=function(t){if(this.length>t.length)return this.clone().iand(t);return t.clone().iand(this)},a.prototype.uand=function(t){if(this.length>t.length)return this.clone().iuand(t);return t.clone().iuand(this)},a.prototype.iuxor=function(t){var i,o;if(this.length>t.length)i=this,o=t;else i=t,o=this;for(var r=0;r<o.length;r++)this.words[r]=i.words[r]^o.words[r];if(this!==i)for(;r<i.length;r++)this.words[r]=i.words[r];return this.length=i.length,this.strip()},a.prototype.ixor=function(t){return p((this.negative|t.negative)===0),this.iuxor(t)},a.prototype.xor=function(t){if(this.length>t.length)return this.clone().ixor(t);return t.clone().ixor(this)},a.prototype.uxor=function(t){if(this.length>t.length)return this.clone().iuxor(t);return t.clone().iuxor(this)},a.prototype.inotn=function(t){p(typeof t==="number"&&t>=0);var i=Math.ceil(t/26)|0,o=t%26;if(this._expand(i),o>0)i--;for(var r=0;r<i;r++)this.words[r]=~this.words[r]&67108863;if(o>0)this.words[r]=~this.words[r]&67108863>>26-o;return this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,i){p(typeof t==="number"&&t>=0);var o=t/26|0,r=t%26;if(this._expand(o+1),i)this.words[o]=this.words[o]|1<<r;else this.words[o]=this.words[o]&~(1<<r);return this.strip()},a.prototype.iadd=function(t){var i;if(this.negative!==0&&t.negative===0)return this.negative=0,i=this.isub(t),this.negative^=1,this._normSign();else if(this.negative===0&&t.negative!==0)return t.negative=0,i=this.isub(t),t.negative=1,i._normSign();var o,r;if(this.length>t.length)o=this,r=t;else o=t,r=this;var n=0;for(var u=0;u<r.length;u++)i=(o.words[u]|0)+(r.words[u]|0)+n,this.words[u]=i&67108863,n=i>>>26;for(;n!==0&&u<o.length;u++)i=(o.words[u]|0)+n,this.words[u]=i&67108863,n=i>>>26;if(this.length=o.length,n!==0)this.words[this.length]=n,this.length++;else if(o!==this)for(;u<o.length;u++)this.words[u]=o.words[u];return this},a.prototype.add=function(t){var i;if(t.negative!==0&&this.negative===0)return t.negative=0,i=this.sub(t),t.negative^=1,i;else if(t.negative===0&&this.negative!==0)return this.negative=0,i=t.sub(this),this.negative=1,i;if(this.length>t.length)return this.clone().iadd(t);return t.clone().iadd(this)},a.prototype.isub=function(t){if(t.negative!==0){t.negative=0;var i=this.iadd(t);return t.negative=1,i._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var o=this.cmp(t);if(o===0)return this.negative=0,this.length=1,this.words[0]=0,this;var r,n;if(o>0)r=this,n=t;else r=t,n=this;var u=0;for(var d=0;d<n.length;d++)i=(r.words[d]|0)-(n.words[d]|0)+u,u=i>>26,this.words[d]=i&67108863;for(;u!==0&&d<r.length;d++)i=(r.words[d]|0)+u,u=i>>26,this.words[d]=i&67108863;if(u===0&&d<r.length&&r!==this)for(;d<r.length;d++)this.words[d]=r.words[d];if(this.length=Math.max(this.length,d),r!==this)this.negative=1;return this.strip()},a.prototype.sub=function(t){return this.clone().isub(t)};function x(t,i,o){o.negative=i.negative^t.negative;var r=t.length+i.length|0;o.length=r,r=r-1|0;var n=t.words[0]|0,u=i.words[0]|0,d=n*u,s=d&67108863,e=d/67108864|0;o.words[0]=s;for(var f=1;f<r;f++){var _=e>>>26,m=e&67108863,I=Math.min(f,i.length-1);for(var N=Math.max(0,f-t.length+1);N<=I;N++){var U=f-N|0;n=t.words[U]|0,u=i.words[N]|0,d=n*u+m,_+=d/67108864|0,m=d&67108863}o.words[f]=m|0,e=_|0}if(e!==0)o.words[f]=e|0;else o.length--;return o.strip()}var B=function(t,i,o){var r=t.words,n=i.words,u=o.words,d=0,s,e,f,_=r[0]|0,m=_&8191,I=_>>>13,N=r[1]|0,U=N&8191,Z=N>>>13,ut=r[2]|0,Y=ut&8191,H=ut>>>13,nt=r[3]|0,G=nt&8191,tt=nt>>>13,Dt=r[4]|0,L=Dt&8191,F=Dt>>>13,ot=r[5]|0,J=ot&8191,Q=ot>>>13,Mt=r[6]|0,C=Mt&8191,K=Mt>>>13,Nt=r[7]|0,V=Nt&8191,it=Nt>>>13,Lt=r[8]|0,pt=Lt&8191,yt=Lt>>>13,Zt=r[9]|0,dt=Zt&8191,bt=Zt>>>13,Jt=n[0]|0,gt=Jt&8191,vt=Jt>>>13,ve=n[1]|0,_t=ve&8191,It=ve>>>13,ge=n[2]|0,xt=ge&8191,St=ge>>>13,be=n[3]|0,kt=be&8191,At=be>>>13,ue=n[4]|0,Tt=ue&8191,Pt=ue>>>13,de=n[5]|0,Et=de&8191,q=de>>>13,z=n[6]|0,X=z&8191,et=z>>>13,Ot=n[7]|0,ct=Ot&8191,mt=Ot>>>13,Gt=n[8]|0,Rt=Gt&8191,qt=Gt>>>13,me=n[9]|0,Bt=me&8191,wt=me>>>13;o.negative=t.negative^i.negative,o.length=19,s=Math.imul(m,gt),e=Math.imul(m,vt),e=e+Math.imul(I,gt)|0,f=Math.imul(I,vt);var Vt=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(Vt>>>26)|0,Vt&=67108863,s=Math.imul(U,gt),e=Math.imul(U,vt),e=e+Math.imul(Z,gt)|0,f=Math.imul(Z,vt),s=s+Math.imul(m,_t)|0,e=e+Math.imul(m,It)|0,e=e+Math.imul(I,_t)|0,f=f+Math.imul(I,It)|0;var Ut=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,s=Math.imul(Y,gt),e=Math.imul(Y,vt),e=e+Math.imul(H,gt)|0,f=Math.imul(H,vt),s=s+Math.imul(U,_t)|0,e=e+Math.imul(U,It)|0,e=e+Math.imul(Z,_t)|0,f=f+Math.imul(Z,It)|0,s=s+Math.imul(m,xt)|0,e=e+Math.imul(m,St)|0,e=e+Math.imul(I,xt)|0,f=f+Math.imul(I,St)|0;var Ct=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,s=Math.imul(G,gt),e=Math.imul(G,vt),e=e+Math.imul(tt,gt)|0,f=Math.imul(tt,vt),s=s+Math.imul(Y,_t)|0,e=e+Math.imul(Y,It)|0,e=e+Math.imul(H,_t)|0,f=f+Math.imul(H,It)|0,s=s+Math.imul(U,xt)|0,e=e+Math.imul(U,St)|0,e=e+Math.imul(Z,xt)|0,f=f+Math.imul(Z,St)|0,s=s+Math.imul(m,kt)|0,e=e+Math.imul(m,At)|0,e=e+Math.imul(I,kt)|0,f=f+Math.imul(I,At)|0;var Wt=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(Wt>>>26)|0,Wt&=67108863,s=Math.imul(L,gt),e=Math.imul(L,vt),e=e+Math.imul(F,gt)|0,f=Math.imul(F,vt),s=s+Math.imul(G,_t)|0,e=e+Math.imul(G,It)|0,e=e+Math.imul(tt,_t)|0,f=f+Math.imul(tt,It)|0,s=s+Math.imul(Y,xt)|0,e=e+Math.imul(Y,St)|0,e=e+Math.imul(H,xt)|0,f=f+Math.imul(H,St)|0,s=s+Math.imul(U,kt)|0,e=e+Math.imul(U,At)|0,e=e+Math.imul(Z,kt)|0,f=f+Math.imul(Z,At)|0,s=s+Math.imul(m,Tt)|0,e=e+Math.imul(m,Pt)|0,e=e+Math.imul(I,Tt)|0,f=f+Math.imul(I,Pt)|0;var Ht=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(Ht>>>26)|0,Ht&=67108863,s=Math.imul(J,gt),e=Math.imul(J,vt),e=e+Math.imul(Q,gt)|0,f=Math.imul(Q,vt),s=s+Math.imul(L,_t)|0,e=e+Math.imul(L,It)|0,e=e+Math.imul(F,_t)|0,f=f+Math.imul(F,It)|0,s=s+Math.imul(G,xt)|0,e=e+Math.imul(G,St)|0,e=e+Math.imul(tt,xt)|0,f=f+Math.imul(tt,St)|0,s=s+Math.imul(Y,kt)|0,e=e+Math.imul(Y,At)|0,e=e+Math.imul(H,kt)|0,f=f+Math.imul(H,At)|0,s=s+Math.imul(U,Tt)|0,e=e+Math.imul(U,Pt)|0,e=e+Math.imul(Z,Tt)|0,f=f+Math.imul(Z,Pt)|0,s=s+Math.imul(m,Et)|0,e=e+Math.imul(m,q)|0,e=e+Math.imul(I,Et)|0,f=f+Math.imul(I,q)|0;var Yt=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,s=Math.imul(C,gt),e=Math.imul(C,vt),e=e+Math.imul(K,gt)|0,f=Math.imul(K,vt),s=s+Math.imul(J,_t)|0,e=e+Math.imul(J,It)|0,e=e+Math.imul(Q,_t)|0,f=f+Math.imul(Q,It)|0,s=s+Math.imul(L,xt)|0,e=e+Math.imul(L,St)|0,e=e+Math.imul(F,xt)|0,f=f+Math.imul(F,St)|0,s=s+Math.imul(G,kt)|0,e=e+Math.imul(G,At)|0,e=e+Math.imul(tt,kt)|0,f=f+Math.imul(tt,At)|0,s=s+Math.imul(Y,Tt)|0,e=e+Math.imul(Y,Pt)|0,e=e+Math.imul(H,Tt)|0,f=f+Math.imul(H,Pt)|0,s=s+Math.imul(U,Et)|0,e=e+Math.imul(U,q)|0,e=e+Math.imul(Z,Et)|0,f=f+Math.imul(Z,q)|0,s=s+Math.imul(m,X)|0,e=e+Math.imul(m,et)|0,e=e+Math.imul(I,X)|0,f=f+Math.imul(I,et)|0;var Xt=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(Xt>>>26)|0,Xt&=67108863,s=Math.imul(V,gt),e=Math.imul(V,vt),e=e+Math.imul(it,gt)|0,f=Math.imul(it,vt),s=s+Math.imul(C,_t)|0,e=e+Math.imul(C,It)|0,e=e+Math.imul(K,_t)|0,f=f+Math.imul(K,It)|0,s=s+Math.imul(J,xt)|0,e=e+Math.imul(J,St)|0,e=e+Math.imul(Q,xt)|0,f=f+Math.imul(Q,St)|0,s=s+Math.imul(L,kt)|0,e=e+Math.imul(L,At)|0,e=e+Math.imul(F,kt)|0,f=f+Math.imul(F,At)|0,s=s+Math.imul(G,Tt)|0,e=e+Math.imul(G,Pt)|0,e=e+Math.imul(tt,Tt)|0,f=f+Math.imul(tt,Pt)|0,s=s+Math.imul(Y,Et)|0,e=e+Math.imul(Y,q)|0,e=e+Math.imul(H,Et)|0,f=f+Math.imul(H,q)|0,s=s+Math.imul(U,X)|0,e=e+Math.imul(U,et)|0,e=e+Math.imul(Z,X)|0,f=f+Math.imul(Z,et)|0,s=s+Math.imul(m,ct)|0,e=e+Math.imul(m,mt)|0,e=e+Math.imul(I,ct)|0,f=f+Math.imul(I,mt)|0;var Qt=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,s=Math.imul(pt,gt),e=Math.imul(pt,vt),e=e+Math.imul(yt,gt)|0,f=Math.imul(yt,vt),s=s+Math.imul(V,_t)|0,e=e+Math.imul(V,It)|0,e=e+Math.imul(it,_t)|0,f=f+Math.imul(it,It)|0,s=s+Math.imul(C,xt)|0,e=e+Math.imul(C,St)|0,e=e+Math.imul(K,xt)|0,f=f+Math.imul(K,St)|0,s=s+Math.imul(J,kt)|0,e=e+Math.imul(J,At)|0,e=e+Math.imul(Q,kt)|0,f=f+Math.imul(Q,At)|0,s=s+Math.imul(L,Tt)|0,e=e+Math.imul(L,Pt)|0,e=e+Math.imul(F,Tt)|0,f=f+Math.imul(F,Pt)|0,s=s+Math.imul(G,Et)|0,e=e+Math.imul(G,q)|0,e=e+Math.imul(tt,Et)|0,f=f+Math.imul(tt,q)|0,s=s+Math.imul(Y,X)|0,e=e+Math.imul(Y,et)|0,e=e+Math.imul(H,X)|0,f=f+Math.imul(H,et)|0,s=s+Math.imul(U,ct)|0,e=e+Math.imul(U,mt)|0,e=e+Math.imul(Z,ct)|0,f=f+Math.imul(Z,mt)|0,s=s+Math.imul(m,Rt)|0,e=e+Math.imul(m,qt)|0,e=e+Math.imul(I,Rt)|0,f=f+Math.imul(I,qt)|0;var te=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(te>>>26)|0,te&=67108863,s=Math.imul(dt,gt),e=Math.imul(dt,vt),e=e+Math.imul(bt,gt)|0,f=Math.imul(bt,vt),s=s+Math.imul(pt,_t)|0,e=e+Math.imul(pt,It)|0,e=e+Math.imul(yt,_t)|0,f=f+Math.imul(yt,It)|0,s=s+Math.imul(V,xt)|0,e=e+Math.imul(V,St)|0,e=e+Math.imul(it,xt)|0,f=f+Math.imul(it,St)|0,s=s+Math.imul(C,kt)|0,e=e+Math.imul(C,At)|0,e=e+Math.imul(K,kt)|0,f=f+Math.imul(K,At)|0,s=s+Math.imul(J,Tt)|0,e=e+Math.imul(J,Pt)|0,e=e+Math.imul(Q,Tt)|0,f=f+Math.imul(Q,Pt)|0,s=s+Math.imul(L,Et)|0,e=e+Math.imul(L,q)|0,e=e+Math.imul(F,Et)|0,f=f+Math.imul(F,q)|0,s=s+Math.imul(G,X)|0,e=e+Math.imul(G,et)|0,e=e+Math.imul(tt,X)|0,f=f+Math.imul(tt,et)|0,s=s+Math.imul(Y,ct)|0,e=e+Math.imul(Y,mt)|0,e=e+Math.imul(H,ct)|0,f=f+Math.imul(H,mt)|0,s=s+Math.imul(U,Rt)|0,e=e+Math.imul(U,qt)|0,e=e+Math.imul(Z,Rt)|0,f=f+Math.imul(Z,qt)|0,s=s+Math.imul(m,Bt)|0,e=e+Math.imul(m,wt)|0,e=e+Math.imul(I,Bt)|0,f=f+Math.imul(I,wt)|0;var ee=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(ee>>>26)|0,ee&=67108863,s=Math.imul(dt,_t),e=Math.imul(dt,It),e=e+Math.imul(bt,_t)|0,f=Math.imul(bt,It),s=s+Math.imul(pt,xt)|0,e=e+Math.imul(pt,St)|0,e=e+Math.imul(yt,xt)|0,f=f+Math.imul(yt,St)|0,s=s+Math.imul(V,kt)|0,e=e+Math.imul(V,At)|0,e=e+Math.imul(it,kt)|0,f=f+Math.imul(it,At)|0,s=s+Math.imul(C,Tt)|0,e=e+Math.imul(C,Pt)|0,e=e+Math.imul(K,Tt)|0,f=f+Math.imul(K,Pt)|0,s=s+Math.imul(J,Et)|0,e=e+Math.imul(J,q)|0,e=e+Math.imul(Q,Et)|0,f=f+Math.imul(Q,q)|0,s=s+Math.imul(L,X)|0,e=e+Math.imul(L,et)|0,e=e+Math.imul(F,X)|0,f=f+Math.imul(F,et)|0,s=s+Math.imul(G,ct)|0,e=e+Math.imul(G,mt)|0,e=e+Math.imul(tt,ct)|0,f=f+Math.imul(tt,mt)|0,s=s+Math.imul(Y,Rt)|0,e=e+Math.imul(Y,qt)|0,e=e+Math.imul(H,Rt)|0,f=f+Math.imul(H,qt)|0,s=s+Math.imul(U,Bt)|0,e=e+Math.imul(U,wt)|0,e=e+Math.imul(Z,Bt)|0,f=f+Math.imul(Z,wt)|0;var re=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(re>>>26)|0,re&=67108863,s=Math.imul(dt,xt),e=Math.imul(dt,St),e=e+Math.imul(bt,xt)|0,f=Math.imul(bt,St),s=s+Math.imul(pt,kt)|0,e=e+Math.imul(pt,At)|0,e=e+Math.imul(yt,kt)|0,f=f+Math.imul(yt,At)|0,s=s+Math.imul(V,Tt)|0,e=e+Math.imul(V,Pt)|0,e=e+Math.imul(it,Tt)|0,f=f+Math.imul(it,Pt)|0,s=s+Math.imul(C,Et)|0,e=e+Math.imul(C,q)|0,e=e+Math.imul(K,Et)|0,f=f+Math.imul(K,q)|0,s=s+Math.imul(J,X)|0,e=e+Math.imul(J,et)|0,e=e+Math.imul(Q,X)|0,f=f+Math.imul(Q,et)|0,s=s+Math.imul(L,ct)|0,e=e+Math.imul(L,mt)|0,e=e+Math.imul(F,ct)|0,f=f+Math.imul(F,mt)|0,s=s+Math.imul(G,Rt)|0,e=e+Math.imul(G,qt)|0,e=e+Math.imul(tt,Rt)|0,f=f+Math.imul(tt,qt)|0,s=s+Math.imul(Y,Bt)|0,e=e+Math.imul(Y,wt)|0,e=e+Math.imul(H,Bt)|0,f=f+Math.imul(H,wt)|0;var ie=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(ie>>>26)|0,ie&=67108863,s=Math.imul(dt,kt),e=Math.imul(dt,At),e=e+Math.imul(bt,kt)|0,f=Math.imul(bt,At),s=s+Math.imul(pt,Tt)|0,e=e+Math.imul(pt,Pt)|0,e=e+Math.imul(yt,Tt)|0,f=f+Math.imul(yt,Pt)|0,s=s+Math.imul(V,Et)|0,e=e+Math.imul(V,q)|0,e=e+Math.imul(it,Et)|0,f=f+Math.imul(it,q)|0,s=s+Math.imul(C,X)|0,e=e+Math.imul(C,et)|0,e=e+Math.imul(K,X)|0,f=f+Math.imul(K,et)|0,s=s+Math.imul(J,ct)|0,e=e+Math.imul(J,mt)|0,e=e+Math.imul(Q,ct)|0,f=f+Math.imul(Q,mt)|0,s=s+Math.imul(L,Rt)|0,e=e+Math.imul(L,qt)|0,e=e+Math.imul(F,Rt)|0,f=f+Math.imul(F,qt)|0,s=s+Math.imul(G,Bt)|0,e=e+Math.imul(G,wt)|0,e=e+Math.imul(tt,Bt)|0,f=f+Math.imul(tt,wt)|0;var ne=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(ne>>>26)|0,ne&=67108863,s=Math.imul(dt,Tt),e=Math.imul(dt,Pt),e=e+Math.imul(bt,Tt)|0,f=Math.imul(bt,Pt),s=s+Math.imul(pt,Et)|0,e=e+Math.imul(pt,q)|0,e=e+Math.imul(yt,Et)|0,f=f+Math.imul(yt,q)|0,s=s+Math.imul(V,X)|0,e=e+Math.imul(V,et)|0,e=e+Math.imul(it,X)|0,f=f+Math.imul(it,et)|0,s=s+Math.imul(C,ct)|0,e=e+Math.imul(C,mt)|0,e=e+Math.imul(K,ct)|0,f=f+Math.imul(K,mt)|0,s=s+Math.imul(J,Rt)|0,e=e+Math.imul(J,qt)|0,e=e+Math.imul(Q,Rt)|0,f=f+Math.imul(Q,qt)|0,s=s+Math.imul(L,Bt)|0,e=e+Math.imul(L,wt)|0,e=e+Math.imul(F,Bt)|0,f=f+Math.imul(F,wt)|0;var oe=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(oe>>>26)|0,oe&=67108863,s=Math.imul(dt,Et),e=Math.imul(dt,q),e=e+Math.imul(bt,Et)|0,f=Math.imul(bt,q),s=s+Math.imul(pt,X)|0,e=e+Math.imul(pt,et)|0,e=e+Math.imul(yt,X)|0,f=f+Math.imul(yt,et)|0,s=s+Math.imul(V,ct)|0,e=e+Math.imul(V,mt)|0,e=e+Math.imul(it,ct)|0,f=f+Math.imul(it,mt)|0,s=s+Math.imul(C,Rt)|0,e=e+Math.imul(C,qt)|0,e=e+Math.imul(K,Rt)|0,f=f+Math.imul(K,qt)|0,s=s+Math.imul(J,Bt)|0,e=e+Math.imul(J,wt)|0,e=e+Math.imul(Q,Bt)|0,f=f+Math.imul(Q,wt)|0;var ae=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(ae>>>26)|0,ae&=67108863,s=Math.imul(dt,X),e=Math.imul(dt,et),e=e+Math.imul(bt,X)|0,f=Math.imul(bt,et),s=s+Math.imul(pt,ct)|0,e=e+Math.imul(pt,mt)|0,e=e+Math.imul(yt,ct)|0,f=f+Math.imul(yt,mt)|0,s=s+Math.imul(V,Rt)|0,e=e+Math.imul(V,qt)|0,e=e+Math.imul(it,Rt)|0,f=f+Math.imul(it,qt)|0,s=s+Math.imul(C,Bt)|0,e=e+Math.imul(C,wt)|0,e=e+Math.imul(K,Bt)|0,f=f+Math.imul(K,wt)|0;var se=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(se>>>26)|0,se&=67108863,s=Math.imul(dt,ct),e=Math.imul(dt,mt),e=e+Math.imul(bt,ct)|0,f=Math.imul(bt,mt),s=s+Math.imul(pt,Rt)|0,e=e+Math.imul(pt,qt)|0,e=e+Math.imul(yt,Rt)|0,f=f+Math.imul(yt,qt)|0,s=s+Math.imul(V,Bt)|0,e=e+Math.imul(V,wt)|0,e=e+Math.imul(it,Bt)|0,f=f+Math.imul(it,wt)|0;var he=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(he>>>26)|0,he&=67108863,s=Math.imul(dt,Rt),e=Math.imul(dt,qt),e=e+Math.imul(bt,Rt)|0,f=Math.imul(bt,qt),s=s+Math.imul(pt,Bt)|0,e=e+Math.imul(pt,wt)|0,e=e+Math.imul(yt,Bt)|0,f=f+Math.imul(yt,wt)|0;var fe=(d+s|0)+((e&8191)<<13)|0;d=(f+(e>>>13)|0)+(fe>>>26)|0,fe&=67108863,s=Math.imul(dt,Bt),e=Math.imul(dt,wt),e=e+Math.imul(bt,Bt)|0,f=Math.imul(bt,wt);var le=(d+s|0)+((e&8191)<<13)|0;if(d=(f+(e>>>13)|0)+(le>>>26)|0,le&=67108863,u[0]=Vt,u[1]=Ut,u[2]=Ct,u[3]=Wt,u[4]=Ht,u[5]=Yt,u[6]=Xt,u[7]=Qt,u[8]=te,u[9]=ee,u[10]=re,u[11]=ie,u[12]=ne,u[13]=oe,u[14]=ae,u[15]=se,u[16]=he,u[17]=fe,u[18]=le,d!==0)u[19]=d,o.length++;return o};if(!Math.imul)B=x;function T(t,i,o){o.negative=i.negative^t.negative,o.length=t.length+i.length;var r=0,n=0;for(var u=0;u<o.length-1;u++){var d=n;n=0;var s=r&67108863,e=Math.min(u,i.length-1);for(var f=Math.max(0,u-t.length+1);f<=e;f++){var _=u-f,m=t.words[_]|0,I=i.words[f]|0,N=m*I,U=N&67108863;d=d+(N/67108864|0)|0,U=U+s|0,s=U&67108863,d=d+(U>>>26)|0,n+=d>>>26,d&=67108863}o.words[u]=s,r=d,d=n}if(r!==0)o.words[u]=r;else o.length--;return o.strip()}function k(t,i,o){var r=new P;return r.mulp(t,i,o)}a.prototype.mulTo=function(t,i){var o,r=this.length+t.length;if(this.length===10&&t.length===10)o=B(this,t,i);else if(r<63)o=x(this,t,i);else if(r<1024)o=T(this,t,i);else o=k(this,t,i);return o};function P(t,i){this.x=t,this.y=i}P.prototype.makeRBT=function(t){var i=Array(t),o=a.prototype._countBits(t)-1;for(var r=0;r<t;r++)i[r]=this.revBin(r,o,t);return i},P.prototype.revBin=function(t,i,o){if(t===0||t===o-1)return t;var r=0;for(var n=0;n<i;n++)r|=(t&1)<<i-n-1,t>>=1;return r},P.prototype.permute=function(t,i,o,r,n,u){for(var d=0;d<u;d++)r[d]=i[t[d]],n[d]=o[t[d]]},P.prototype.transform=function(t,i,o,r,n,u){this.permute(u,t,i,o,r,n);for(var d=1;d<n;d<<=1){var s=d<<1,e=Math.cos(2*Math.PI/s),f=Math.sin(2*Math.PI/s);for(var _=0;_<n;_+=s){var m=e,I=f;for(var N=0;N<d;N++){var U=o[_+N],Z=r[_+N],ut=o[_+N+d],Y=r[_+N+d],H=m*ut-I*Y;if(Y=m*Y+I*ut,ut=H,o[_+N]=U+ut,r[_+N]=Z+Y,o[_+N+d]=U-ut,r[_+N+d]=Z-Y,N!==s)H=e*m-f*I,I=e*I+f*m,m=H}}}},P.prototype.guessLen13b=function(t,i){var o=Math.max(i,t)|1,r=o&1,n=0;for(o=o/2|0;o;o=o>>>1)n++;return 1<<n+1+r},P.prototype.conjugate=function(t,i,o){if(o<=1)return;for(var r=0;r<o/2;r++){var n=t[r];t[r]=t[o-r-1],t[o-r-1]=n,n=i[r],i[r]=-i[o-r-1],i[o-r-1]=-n}},P.prototype.normalize13b=function(t,i){var o=0;for(var r=0;r<i/2;r++){var n=Math.round(t[2*r+1]/i)*8192+Math.round(t[2*r]/i)+o;if(t[r]=n&67108863,n<67108864)o=0;else o=n/67108864|0}return t},P.prototype.convert13b=function(t,i,o,r){var n=0;for(var u=0;u<i;u++)n=n+(t[u]|0),o[2*u]=n&8191,n=n>>>13,o[2*u+1]=n&8191,n=n>>>13;for(u=2*i;u<r;++u)o[u]=0;p(n===0),p((n&-8192)===0)},P.prototype.stub=function(t){var i=Array(t);for(var o=0;o<t;o++)i[o]=0;return i},P.prototype.mulp=function(t,i,o){var r=2*this.guessLen13b(t.length,i.length),n=this.makeRBT(r),u=this.stub(r),d=Array(r),s=Array(r),e=Array(r),f=Array(r),_=Array(r),m=Array(r),I=o.words;I.length=r,this.convert13b(t.words,t.length,d,r),this.convert13b(i.words,i.length,f,r),this.transform(d,u,s,e,r,n),this.transform(f,u,_,m,r,n);for(var N=0;N<r;N++){var U=s[N]*_[N]-e[N]*m[N];e[N]=s[N]*m[N]+e[N]*_[N],s[N]=U}return this.conjugate(s,e,r),this.transform(s,e,I,u,r,n),this.conjugate(I,u,r),this.normalize13b(I,r),o.negative=t.negative^i.negative,o.length=t.length+i.length,o.strip()},a.prototype.mul=function(t){var i=new a(null);return i.words=Array(this.length+t.length),this.mulTo(t,i)},a.prototype.mulf=function(t){var i=new a(null);return i.words=Array(this.length+t.length),k(this,t,i)},a.prototype.imul=function(t){return this.clone().mulTo(t,this)},a.prototype.imuln=function(t){p(typeof t==="number"),p(t<67108864);var i=0;for(var o=0;o<this.length;o++){var r=(this.words[o]|0)*t,n=(r&67108863)+(i&67108863);i>>=26,i+=r/67108864|0,i+=n>>>26,this.words[o]=n&67108863}if(i!==0)this.words[o]=i,this.length++;return this.length=t===0?1:this.length,this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var i=A(t);if(i.length===0)return new a(1);var o=this;for(var r=0;r<i.length;r++,o=o.sqr())if(i[r]!==0)break;if(++r<i.length)for(var n=o.sqr();r<i.length;r++,n=n.sqr()){if(i[r]===0)continue;o=o.mul(n)}return o},a.prototype.iushln=function(t){p(typeof t==="number"&&t>=0);var i=t%26,o=(t-i)/26,r=67108863>>>26-i<<26-i,n;if(i!==0){var u=0;for(n=0;n<this.length;n++){var d=this.words[n]&r,s=(this.words[n]|0)-d<<i;this.words[n]=s|u,u=d>>>26-i}if(u)this.words[n]=u,this.length++}if(o!==0){for(n=this.length-1;n>=0;n--)this.words[n+o]=this.words[n];for(n=0;n<o;n++)this.words[n]=0;this.length+=o}return this.strip()},a.prototype.ishln=function(t){return p(this.negative===0),this.iushln(t)},a.prototype.iushrn=function(t,i,o){p(typeof t==="number"&&t>=0);var r;if(i)r=(i-i%26)/26;else r=0;var n=t%26,u=Math.min((t-n)/26,this.length),d=67108863^67108863>>>n<<n,s=o;if(r-=u,r=Math.max(0,r),s){for(var e=0;e<u;e++)s.words[e]=this.words[e];s.length=u}if(u===0);else if(this.length>u){this.length-=u;for(e=0;e<this.length;e++)this.words[e]=this.words[e+u]}else this.words[0]=0,this.length=1;var f=0;for(e=this.length-1;e>=0&&(f!==0||e>=r);e--){var _=this.words[e]|0;this.words[e]=f<<26-n|_>>>n,f=_&d}if(s&&f!==0)s.words[s.length++]=f;if(this.length===0)this.words[0]=0,this.length=1;return this.strip()},a.prototype.ishrn=function(t,i,o){return p(this.negative===0),this.iushrn(t,i,o)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){p(typeof t==="number"&&t>=0);var i=t%26,o=(t-i)/26,r=1<<i;if(this.length<=o)return!1;var n=this.words[o];return!!(n&r)},a.prototype.imaskn=function(t){p(typeof t==="number"&&t>=0);var i=t%26,o=(t-i)/26;if(p(this.negative===0,"imaskn works only with positive numbers"),this.length<=o)return this;if(i!==0)o++;if(this.length=Math.min(o,this.length),i!==0){var r=67108863^67108863>>>i<<i;this.words[this.length-1]&=r}return this.strip()},a.prototype.maskn=function(t){return this.clone().imaskn(t)},a.prototype.iaddn=function(t){if(p(typeof t==="number"),p(t<67108864),t<0)return this.isubn(-t);if(this.negative!==0){if(this.length===1&&(this.words[0]|0)<t)return this.words[0]=t-(this.words[0]|0),this.negative=0,this;return this.negative=0,this.isubn(t),this.negative=1,this}return this._iaddn(t)},a.prototype._iaddn=function(t){this.words[0]+=t;for(var i=0;i<this.length&&this.words[i]>=67108864;i++)if(this.words[i]-=67108864,i===this.length-1)this.words[i+1]=1;else this.words[i+1]++;return this.length=Math.max(this.length,i+1),this},a.prototype.isubn=function(t){if(p(typeof t==="number"),p(t<67108864),t<0)return this.iaddn(-t);if(this.negative!==0)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var i=0;i<this.length&&this.words[i]<0;i++)this.words[i]+=67108864,this.words[i+1]-=1;return this.strip()},a.prototype.addn=function(t){return this.clone().iaddn(t)},a.prototype.subn=function(t){return this.clone().isubn(t)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(t,i,o){var r=t.length+o,n;this._expand(r);var u,d=0;for(n=0;n<t.length;n++){u=(this.words[n+o]|0)+d;var s=(t.words[n]|0)*i;u-=s&67108863,d=(u>>26)-(s/67108864|0),this.words[n+o]=u&67108863}for(;n<this.length-o;n++)u=(this.words[n+o]|0)+d,d=u>>26,this.words[n+o]=u&67108863;if(d===0)return this.strip();p(d===-1),d=0;for(n=0;n<this.length;n++)u=-(this.words[n]|0)+d,d=u>>26,this.words[n]=u&67108863;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,i){var o=this.length-t.length,r=this.clone(),n=t,u=n.words[n.length-1]|0,d=this._countBits(u);if(o=26-d,o!==0)n=n.ushln(o),r.iushln(o),u=n.words[n.length-1]|0;var s=r.length-n.length,e;if(i!=="mod"){e=new a(null),e.length=s+1,e.words=Array(e.length);for(var f=0;f<e.length;f++)e.words[f]=0}var _=r.clone()._ishlnsubmul(n,1,s);if(_.negative===0){if(r=_,e)e.words[s]=1}for(var m=s-1;m>=0;m--){var I=(r.words[n.length+m]|0)*67108864+(r.words[n.length+m-1]|0);I=Math.min(I/u|0,67108863),r._ishlnsubmul(n,I,m);while(r.negative!==0)if(I--,r.negative=0,r._ishlnsubmul(n,1,m),!r.isZero())r.negative^=1;if(e)e.words[m]=I}if(e)e.strip();if(r.strip(),i!=="div"&&o!==0)r.iushrn(o);return{div:e||null,mod:r}},a.prototype.divmod=function(t,i,o){if(p(!t.isZero()),this.isZero())return{div:new a(0),mod:new a(0)};var r,n,u;if(this.negative!==0&&t.negative===0){if(u=this.neg().divmod(t,i),i!=="mod")r=u.div.neg();if(i!=="div"){if(n=u.mod.neg(),o&&n.negative!==0)n.iadd(t)}return{div:r,mod:n}}if(this.negative===0&&t.negative!==0){if(u=this.divmod(t.neg(),i),i!=="mod")r=u.div.neg();return{div:r,mod:u.mod}}if((this.negative&t.negative)!==0){if(u=this.neg().divmod(t.neg(),i),i!=="div"){if(n=u.mod.neg(),o&&n.negative!==0)n.isub(t)}return{div:u.div,mod:n}}if(t.length>this.length||this.cmp(t)<0)return{div:new a(0),mod:this};if(t.length===1){if(i==="div")return{div:this.divn(t.words[0]),mod:null};if(i==="mod")return{div:null,mod:new a(this.modn(t.words[0]))};return{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}}return this._wordDiv(t,i)},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var i=this.divmod(t);if(i.mod.isZero())return i.div;var o=i.div.negative!==0?i.mod.isub(t):i.mod,r=t.ushrn(1),n=t.andln(1),u=o.cmp(r);if(u<0||n===1&&u===0)return i.div;return i.div.negative!==0?i.div.isubn(1):i.div.iaddn(1)},a.prototype.modn=function(t){p(t<=67108863);var i=67108864%t,o=0;for(var r=this.length-1;r>=0;r--)o=(i*o+(this.words[r]|0))%t;return o},a.prototype.idivn=function(t){p(t<=67108863);var i=0;for(var o=this.length-1;o>=0;o--){var r=(this.words[o]|0)+i*67108864;this.words[o]=r/t|0,i=r%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){p(t.negative===0),p(!t.isZero());var i=this,o=t.clone();if(i.negative!==0)i=i.umod(t);else i=i.clone();var r=new a(1),n=new a(0),u=new a(0),d=new a(1),s=0;while(i.isEven()&&o.isEven())i.iushrn(1),o.iushrn(1),++s;var e=o.clone(),f=i.clone();while(!i.isZero()){for(var _=0,m=1;(i.words[0]&m)===0&&_<26;++_,m<<=1);if(_>0){i.iushrn(_);while(_-- >0){if(r.isOdd()||n.isOdd())r.iadd(e),n.isub(f);r.iushrn(1),n.iushrn(1)}}for(var I=0,N=1;(o.words[0]&N)===0&&I<26;++I,N<<=1);if(I>0){o.iushrn(I);while(I-- >0){if(u.isOdd()||d.isOdd())u.iadd(e),d.isub(f);u.iushrn(1),d.iushrn(1)}}if(i.cmp(o)>=0)i.isub(o),r.isub(u),n.isub(d);else o.isub(i),u.isub(r),d.isub(n)}return{a:u,b:d,gcd:o.iushln(s)}},a.prototype._invmp=function(t){p(t.negative===0),p(!t.isZero());var i=this,o=t.clone();if(i.negative!==0)i=i.umod(t);else i=i.clone();var r=new a(1),n=new a(0),u=o.clone();while(i.cmpn(1)>0&&o.cmpn(1)>0){for(var d=0,s=1;(i.words[0]&s)===0&&d<26;++d,s<<=1);if(d>0){i.iushrn(d);while(d-- >0){if(r.isOdd())r.iadd(u);r.iushrn(1)}}for(var e=0,f=1;(o.words[0]&f)===0&&e<26;++e,f<<=1);if(e>0){o.iushrn(e);while(e-- >0){if(n.isOdd())n.iadd(u);n.iushrn(1)}}if(i.cmp(o)>=0)i.isub(o),r.isub(n);else o.isub(i),n.isub(r)}var _;if(i.cmpn(1)===0)_=r;else _=n;if(_.cmpn(0)<0)_.iadd(t);return _},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var i=this.clone(),o=t.clone();i.negative=0,o.negative=0;for(var r=0;i.isEven()&&o.isEven();r++)i.iushrn(1),o.iushrn(1);do{while(i.isEven())i.iushrn(1);while(o.isEven())o.iushrn(1);var n=i.cmp(o);if(n<0){var u=i;i=o,o=u}else if(n===0||o.cmpn(1)===0)break;i.isub(o)}while(!0);return o.iushln(r)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return(this.words[0]&1)===0},a.prototype.isOdd=function(){return(this.words[0]&1)===1},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){p(typeof t==="number");var i=t%26,o=(t-i)/26,r=1<<i;if(this.length<=o)return this._expand(o+1),this.words[o]|=r,this;var n=r;for(var u=o;n!==0&&u<this.length;u++){var d=this.words[u]|0;d+=n,n=d>>>26,d&=67108863,this.words[u]=d}if(n!==0)this.words[u]=n,this.length++;return this},a.prototype.isZero=function(){return this.length===1&&this.words[0]===0},a.prototype.cmpn=function(t){var i=t<0;if(this.negative!==0&&!i)return-1;if(this.negative===0&&i)return 1;this.strip();var o;if(this.length>1)o=1;else{if(i)t=-t;p(t<=67108863,"Number is too big");var r=this.words[0]|0;o=r===t?0:r<t?-1:1}if(this.negative!==0)return-o|0;return o},a.prototype.cmp=function(t){if(this.negative!==0&&t.negative===0)return-1;if(this.negative===0&&t.negative!==0)return 1;var i=this.ucmp(t);if(this.negative!==0)return-i|0;return i},a.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;var i=0;for(var o=this.length-1;o>=0;o--){var r=this.words[o]|0,n=t.words[o]|0;if(r===n)continue;if(r<n)i=-1;else if(r>n)i=1;break}return i},a.prototype.gtn=function(t){return this.cmpn(t)===1},a.prototype.gt=function(t){return this.cmp(t)===1},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return this.cmpn(t)===-1},a.prototype.lt=function(t){return this.cmp(t)===-1},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return this.cmpn(t)===0},a.prototype.eq=function(t){return this.cmp(t)===0},a.red=function(t){return new j(t)},a.prototype.toRed=function(t){return p(!this.red,"Already a number in reduction context"),p(this.negative===0,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return p(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return p(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return p(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return p(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return p(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return p(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return p(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return p(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return p(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return p(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return p(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return p(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return p(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var D={k256:null,p224:null,p192:null,p25519:null};function O(t,i){this.name=t,this.p=new a(i,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}O.prototype._tmp=function(){var t=new a(null);return t.words=Array(Math.ceil(this.n/13)),t},O.prototype.ireduce=function(t){var i=t,o;do this.split(i,this.tmp),i=this.imulK(i),i=i.iadd(this.tmp),o=i.bitLength();while(o>this.n);var r=o<this.n?-1:i.ucmp(this.p);if(r===0)i.words[0]=0,i.length=1;else if(r>0)i.isub(this.p);else if(i.strip!==void 0)i.strip();else i._strip();return i},O.prototype.split=function(t,i){t.iushrn(this.n,0,i)},O.prototype.imulK=function(t){return t.imul(this.k)};function W(){O.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}M(W,O),W.prototype.split=function(t,i){var o=4194303,r=Math.min(t.length,9);for(var n=0;n<r;n++)i.words[n]=t.words[n];if(i.length=r,t.length<=9){t.words[0]=0,t.length=1;return}var u=t.words[9];i.words[i.length++]=u&o;for(n=10;n<t.length;n++){var d=t.words[n]|0;t.words[n-10]=(d&o)<<4|u>>>22,u=d}if(u>>>=22,t.words[n-10]=u,u===0&&t.length>10)t.length-=10;else t.length-=9},W.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;var i=0;for(var o=0;o<t.length;o++){var r=t.words[o]|0;i+=r*977,t.words[o]=i&67108863,i=r*64+(i/67108864|0)}if(t.words[t.length-1]===0){if(t.length--,t.words[t.length-1]===0)t.length--}return t};function at(){O.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}M(at,O);function ft(){O.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}M(ft,O);function st(){O.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}M(st,O),st.prototype.imulK=function(t){var i=0;for(var o=0;o<t.length;o++){var r=(t.words[o]|0)*19+i,n=r&67108863;r>>>=26,t.words[o]=n,i=r}if(i!==0)t.words[t.length++]=i;return t},a._prime=function(t){if(D[t])return D[t];var i;if(t==="k256")i=new W;else if(t==="p224")i=new at;else if(t==="p192")i=new ft;else if(t==="p25519")i=new st;else throw Error("Unknown prime "+t);return D[t]=i,i};function j(t){if(typeof t==="string"){var i=a._prime(t);this.m=i.p,this.prime=i}else p(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}j.prototype._verify1=function(t){p(t.negative===0,"red works only with positives"),p(t.red,"red works only with red numbers")},j.prototype._verify2=function(t,i){p((t.negative|i.negative)===0,"red works only with positives"),p(t.red&&t.red===i.red,"red works only with red numbers")},j.prototype.imod=function(t){if(this.prime)return this.prime.ireduce(t)._forceRed(this);return t.umod(this.m)._forceRed(this)},j.prototype.neg=function(t){if(t.isZero())return t.clone();return this.m.sub(t)._forceRed(this)},j.prototype.add=function(t,i){this._verify2(t,i);var o=t.add(i);if(o.cmp(this.m)>=0)o.isub(this.m);return o._forceRed(this)},j.prototype.iadd=function(t,i){this._verify2(t,i);var o=t.iadd(i);if(o.cmp(this.m)>=0)o.isub(this.m);return o},j.prototype.sub=function(t,i){this._verify2(t,i);var o=t.sub(i);if(o.cmpn(0)<0)o.iadd(this.m);return o._forceRed(this)},j.prototype.isub=function(t,i){this._verify2(t,i);var o=t.isub(i);if(o.cmpn(0)<0)o.iadd(this.m);return o},j.prototype.shl=function(t,i){return this._verify1(t),this.imod(t.ushln(i))},j.prototype.imul=function(t,i){return this._verify2(t,i),this.imod(t.imul(i))},j.prototype.mul=function(t,i){return this._verify2(t,i),this.imod(t.mul(i))},j.prototype.isqr=function(t){return this.imul(t,t.clone())},j.prototype.sqr=function(t){return this.mul(t,t)},j.prototype.sqrt=function(t){if(t.isZero())return t.clone();var i=this.m.andln(3);if(p(i%2===1),i===3){var o=this.m.add(new a(1)).iushrn(2);return this.pow(t,o)}var r=this.m.subn(1),n=0;while(!r.isZero()&&r.andln(1)===0)n++,r.iushrn(1);p(!r.isZero());var u=new a(1).toRed(this),d=u.redNeg(),s=this.m.subn(1).iushrn(1),e=this.m.bitLength();e=new a(2*e*e).toRed(this);while(this.pow(e,s).cmp(d)!==0)e.redIAdd(d);var f=this.pow(e,r),_=this.pow(t,r.addn(1).iushrn(1)),m=this.pow(t,r),I=n;while(m.cmp(u)!==0){var N=m;for(var U=0;N.cmp(u)!==0;U++)N=N.redSqr();p(U<I);var Z=this.pow(f,new a(1).iushln(I-U-1));_=_.redMul(Z),f=Z.redSqr(),m=m.redMul(f),I=U}return _},j.prototype.invm=function(t){var i=t._invmp(this.m);if(i.negative!==0)return i.negative=0,this.imod(i).redNeg();else return this.imod(i)},j.prototype.pow=function(t,i){if(i.isZero())return new a(1).toRed(this);if(i.cmpn(1)===0)return t.clone();var o=4,r=Array(1<<o);r[0]=new a(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var u=r[0],d=0,s=0,e=i.bitLength()%26;if(e===0)e=26;for(n=i.length-1;n>=0;n--){var f=i.words[n];for(var _=e-1;_>=0;_--){var m=f>>_&1;if(u!==r[0])u=this.sqr(u);if(m===0&&d===0){s=0;continue}if(d<<=1,d|=m,s++,s!==o&&(n!==0||_!==0))continue;u=this.mul(u,r[d]),s=0,d=0}e=26}return u},j.prototype.convertTo=function(t){var i=t.umod(this.m);return i===t?i.clone():i},j.prototype.convertFrom=function(t){var i=t.clone();return i.red=null,i},a.mont=function(t){return new rt(t)};function rt(t){if(j.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0)this.shift+=26-this.shift%26;this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}M(rt,j),rt.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},rt.prototype.convertFrom=function(t){var i=this.imod(t.mul(this.rinv));return i.red=null,i},rt.prototype.imul=function(t,i){if(t.isZero()||i.isZero())return t.words[0]=0,t.length=1,t;var o=t.imul(i),r=o.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=o.isub(r).iushrn(this.shift),u=n;if(n.cmp(this.m)>=0)u=n.isub(this.m);else if(n.cmpn(0)<0)u=n.iadd(this.m);return u._forceRed(this)},rt.prototype.mul=function(t,i){if(t.isZero()||i.isZero())return new a(0)._forceRed(this);var o=t.mul(i),r=o.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=o.isub(r).iushrn(this.shift),u=n;if(n.cmp(this.m)>=0)u=n.isub(this.m);else if(n.cmpn(0)<0)u=n.iadd(this.m);return u._forceRed(this)},rt.prototype.invm=function(t){var i=this.imod(t._invmp(this.m).mul(this.r2));return i._forceRed(this)}})(typeof l>"u"||l,h)}),Wn=ht((h,l)=>{var c=di(),b=Me().Buffer;function p(M,a){return b.from(M.toRed(c.mont(a.modulus)).redPow(new c(a.publicExponent)).fromRed().toArray())}l.exports=p}),Qs=ht((h,l)=>{(function(c,b){function p(r,n){if(!r)throw Error(n||"Assertion failed")}function M(r,n){r.super_=n;var u=function(){};u.prototype=n.prototype,r.prototype=new u,r.prototype.constructor=r}function a(r,n,u){if(a.isBN(r))return r;if(this.negative=0,this.words=null,this.length=0,this.red=null,r!==null){if(n==="le"||n==="be")u=n,n=10;this._init(r||0,n||10,u||"be")}}if(typeof c==="object")c.exports=a;else b.BN=a;a.BN=a,a.wordSize=26;var E;try{if(typeof window<"u"&&typeof window.Buffer<"u")E=window.Buffer;else E=(ye(),jt(pe)).Buffer}catch(r){}a.isBN=function(r){if(r instanceof a)return!0;return r!==null&&typeof r==="object"&&r.constructor.wordSize===a.wordSize&&Array.isArray(r.words)},a.max=function(r,n){if(r.cmp(n)>0)return r;return n},a.min=function(r,n){if(r.cmp(n)<0)return r;return n},a.prototype._init=function(r,n,u){if(typeof r==="number")return this._initNumber(r,n,u);if(typeof r==="object")return this._initArray(r,n,u);if(n==="hex")n=16;p(n===(n|0)&&n>=2&&n<=36),r=r.toString().replace(/\s+/g,"");var d=0;if(r[0]==="-")d++,this.negative=1;if(d<r.length){if(n===16)this._parseHex(r,d,u);else if(this._parseBase(r,n,d),u==="le")this._initArray(this.toArray(),n,u)}},a.prototype._initNumber=function(r,n,u){if(r<0)this.negative=1,r=-r;if(r<67108864)this.words=[r&67108863],this.length=1;else if(r<4503599627370496)this.words=[r&67108863,r/67108864&67108863],this.length=2;else p(r<9007199254740992),this.words=[r&67108863,r/67108864&67108863,1],this.length=3;if(u!=="le")return;this._initArray(this.toArray(),n,u)},a.prototype._initArray=function(r,n,u){if(p(typeof r.length==="number"),r.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(r.length/3),this.words=Array(this.length);for(var d=0;d<this.length;d++)this.words[d]=0;var s,e,f=0;if(u==="be"){for(d=r.length-1,s=0;d>=0;d-=3)if(e=r[d]|r[d-1]<<8|r[d-2]<<16,this.words[s]|=e<<f&67108863,this.words[s+1]=e>>>26-f&67108863,f+=24,f>=26)f-=26,s++}else if(u==="le"){for(d=0,s=0;d<r.length;d+=3)if(e=r[d]|r[d+1]<<8|r[d+2]<<16,this.words[s]|=e<<f&67108863,this.words[s+1]=e>>>26-f&67108863,f+=24,f>=26)f-=26,s++}return this._strip()};function R(r,n){var u=r.charCodeAt(n);if(u>=48&&u<=57)return u-48;else if(u>=65&&u<=70)return u-55;else if(u>=97&&u<=102)return u-87;else p(!1,"Invalid character in "+r)}function w(r,n,u){var d=R(r,u);if(u-1>=n)d|=R(r,u-1)<<4;return d}a.prototype._parseHex=function(r,n,u){this.length=Math.ceil((r.length-n)/6),this.words=Array(this.length);for(var d=0;d<this.length;d++)this.words[d]=0;var s=0,e=0,f;if(u==="be")for(d=r.length-1;d>=n;d-=2)if(f=w(r,n,d)<<s,this.words[e]|=f&67108863,s>=18)s-=18,e+=1,this.words[e]|=f>>>26;else s+=8;else{var _=r.length-n;for(d=_%2===0?n+1:n;d<r.length;d+=2)if(f=w(r,n,d)<<s,this.words[e]|=f&67108863,s>=18)s-=18,e+=1,this.words[e]|=f>>>26;else s+=8}this._strip()};function g(r,n,u,d){var s=0,e=0,f=Math.min(r.length,u);for(var _=n;_<f;_++){var m=r.charCodeAt(_)-48;if(s*=d,m>=49)e=m-49+10;else if(m>=17)e=m-17+10;else e=m;p(m>=0&&e<d,"Invalid character"),s+=e}return s}a.prototype._parseBase=function(r,n,u){this.words=[0],this.length=1;for(var d=0,s=1;s<=67108863;s*=n)d++;d--,s=s/n|0;var e=r.length-u,f=e%d,_=Math.min(e,e-f)+u,m=0;for(var I=u;I<_;I+=d)if(m=g(r,I,I+d,n),this.imuln(s),this.words[0]+m<67108864)this.words[0]+=m;else this._iaddn(m);if(f!==0){var N=1;m=g(r,I,r.length,n);for(I=0;I<f;I++)N*=n;if(this.imuln(N),this.words[0]+m<67108864)this.words[0]+=m;else this._iaddn(m)}this._strip()},a.prototype.copy=function(r){r.words=Array(this.length);for(var n=0;n<this.length;n++)r.words[n]=this.words[n];r.length=this.length,r.negative=this.negative,r.red=this.red};function y(r,n){r.words=n.words,r.length=n.length,r.negative=n.negative,r.red=n.red}if(a.prototype._move=function(r){y(r,this)},a.prototype.clone=function(){var r=new a(null);return this.copy(r),r},a.prototype._expand=function(r){while(this.length<r)this.words[this.length++]=0;return this},a.prototype._strip=function(){while(this.length>1&&this.words[this.length-1]===0)this.length--;return this._normSign()},a.prototype._normSign=function(){if(this.length===1&&this.words[0]===0)this.negative=0;return this},typeof Symbol<"u"&&typeof Symbol.for==="function")try{a.prototype[Symbol.for("nodejs.util.inspect.custom")]=v}catch(r){a.prototype.inspect=v}else a.prototype.inspect=v;function v(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var S=["","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"],A=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],x=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];if(a.prototype.toString=function(r,n){r=r||10,n=n|0||1;var u;if(r===16||r==="hex"){u="";var d=0,s=0;for(var e=0;e<this.length;e++){var f=this.words[e],_=((f<<d|s)&16777215).toString(16);if(s=f>>>24-d&16777215,d+=2,d>=26)d-=26,e--;if(s!==0||e!==this.length-1)u=S[6-_.length]+_+u;else u=_+u}if(s!==0)u=s.toString(16)+u;while(u.length%n!==0)u="0"+u;if(this.negative!==0)u="-"+u;return u}if(r===(r|0)&&r>=2&&r<=36){var m=A[r],I=x[r];u="";var N=this.clone();N.negative=0;while(!N.isZero()){var U=N.modrn(I).toString(r);if(N=N.idivn(I),!N.isZero())u=S[m-U.length]+U+u;else u=U+u}if(this.isZero())u="0"+u;while(u.length%n!==0)u="0"+u;if(this.negative!==0)u="-"+u;return u}p(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var r=this.words[0];if(this.length===2)r+=this.words[1]*67108864;else if(this.length===3&&this.words[2]===1)r+=4503599627370496+this.words[1]*67108864;else if(this.length>2)p(!1,"Number can only safely store up to 53 bits");return this.negative!==0?-r:r},a.prototype.toJSON=function(){return this.toString(16,2)},E)a.prototype.toBuffer=function(r,n){return this.toArrayLike(E,r,n)};a.prototype.toArray=function(r,n){return this.toArrayLike(Array,r,n)};var B=function(r,n){if(r.allocUnsafe)return r.allocUnsafe(n);return new r(n)};if(a.prototype.toArrayLike=function(r,n,u){this._strip();var d=this.byteLength(),s=u||Math.max(1,d);p(d<=s,"byte array longer than desired length"),p(s>0,"Requested array length <= 0");var e=B(r,s),f=n==="le"?"LE":"BE";return this["_toArrayLike"+f](e,d),e},a.prototype._toArrayLikeLE=function(r,n){var u=0,d=0;for(var s=0,e=0;s<this.length;s++){var f=this.words[s]<<e|d;if(r[u++]=f&255,u<r.length)r[u++]=f>>8&255;if(u<r.length)r[u++]=f>>16&255;if(e===6){if(u<r.length)r[u++]=f>>24&255;d=0,e=0}else d=f>>>24,e+=2}if(u<r.length){r[u++]=d;while(u<r.length)r[u++]=0}},a.prototype._toArrayLikeBE=function(r,n){var u=r.length-1,d=0;for(var s=0,e=0;s<this.length;s++){var f=this.words[s]<<e|d;if(r[u--]=f&255,u>=0)r[u--]=f>>8&255;if(u>=0)r[u--]=f>>16&255;if(e===6){if(u>=0)r[u--]=f>>24&255;d=0,e=0}else d=f>>>24,e+=2}if(u>=0){r[u--]=d;while(u>=0)r[u--]=0}},Math.clz32)a.prototype._countBits=function(r){return 32-Math.clz32(r)};else a.prototype._countBits=function(r){var n=r,u=0;if(n>=4096)u+=13,n>>>=13;if(n>=64)u+=7,n>>>=7;if(n>=8)u+=4,n>>>=4;if(n>=2)u+=2,n>>>=2;return u+n};a.prototype._zeroBits=function(r){if(r===0)return 26;var n=r,u=0;if((n&8191)===0)u+=13,n>>>=13;if((n&127)===0)u+=7,n>>>=7;if((n&15)===0)u+=4,n>>>=4;if((n&3)===0)u+=2,n>>>=2;if((n&1)===0)u++;return u},a.prototype.bitLength=function(){var r=this.words[this.length-1],n=this._countBits(r);return(this.length-1)*26+n};function T(r){var n=Array(r.bitLength());for(var u=0;u<n.length;u++){var d=u/26|0,s=u%26;n[u]=r.words[d]>>>s&1}return n}a.prototype.zeroBits=function(){if(this.isZero())return 0;var r=0;for(var n=0;n<this.length;n++){var u=this._zeroBits(this.words[n]);if(r+=u,u!==26)break}return r},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(r){if(this.negative!==0)return this.abs().inotn(r).iaddn(1);return this.clone()},a.prototype.fromTwos=function(r){if(this.testn(r-1))return this.notn(r).iaddn(1).ineg();return this.clone()},a.prototype.isNeg=function(){return this.negative!==0},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){if(!this.isZero())this.negative^=1;return this},a.prototype.iuor=function(r){while(this.length<r.length)this.words[this.length++]=0;for(var n=0;n<r.length;n++)this.words[n]=this.words[n]|r.words[n];return this._strip()},a.prototype.ior=function(r){return p((this.negative|r.negative)===0),this.iuor(r)},a.prototype.or=function(r){if(this.length>r.length)return this.clone().ior(r);return r.clone().ior(this)},a.prototype.uor=function(r){if(this.length>r.length)return this.clone().iuor(r);return r.clone().iuor(this)},a.prototype.iuand=function(r){var n;if(this.length>r.length)n=r;else n=this;for(var u=0;u<n.length;u++)this.words[u]=this.words[u]&r.words[u];return this.length=n.length,this._strip()},a.prototype.iand=function(r){return p((this.negative|r.negative)===0),this.iuand(r)},a.prototype.and=function(r){if(this.length>r.length)return this.clone().iand(r);return r.clone().iand(this)},a.prototype.uand=function(r){if(this.length>r.length)return this.clone().iuand(r);return r.clone().iuand(this)},a.prototype.iuxor=function(r){var n,u;if(this.length>r.length)n=this,u=r;else n=r,u=this;for(var d=0;d<u.length;d++)this.words[d]=n.words[d]^u.words[d];if(this!==n)for(;d<n.length;d++)this.words[d]=n.words[d];return this.length=n.length,this._strip()},a.prototype.ixor=function(r){return p((this.negative|r.negative)===0),this.iuxor(r)},a.prototype.xor=function(r){if(this.length>r.length)return this.clone().ixor(r);return r.clone().ixor(this)},a.prototype.uxor=function(r){if(this.length>r.length)return this.clone().iuxor(r);return r.clone().iuxor(this)},a.prototype.inotn=function(r){p(typeof r==="number"&&r>=0);var n=Math.ceil(r/26)|0,u=r%26;if(this._expand(n),u>0)n--;for(var d=0;d<n;d++)this.words[d]=~this.words[d]&67108863;if(u>0)this.words[d]=~this.words[d]&67108863>>26-u;return this._strip()},a.prototype.notn=function(r){return this.clone().inotn(r)},a.prototype.setn=function(r,n){p(typeof r==="number"&&r>=0);var u=r/26|0,d=r%26;if(this._expand(u+1),n)this.words[u]=this.words[u]|1<<d;else this.words[u]=this.words[u]&~(1<<d);return this._strip()},a.prototype.iadd=function(r){var n;if(this.negative!==0&&r.negative===0)return this.negative=0,n=this.isub(r),this.negative^=1,this._normSign();else if(this.negative===0&&r.negative!==0)return r.negative=0,n=this.isub(r),r.negative=1,n._normSign();var u,d;if(this.length>r.length)u=this,d=r;else u=r,d=this;var s=0;for(var e=0;e<d.length;e++)n=(u.words[e]|0)+(d.words[e]|0)+s,this.words[e]=n&67108863,s=n>>>26;for(;s!==0&&e<u.length;e++)n=(u.words[e]|0)+s,this.words[e]=n&67108863,s=n>>>26;if(this.length=u.length,s!==0)this.words[this.length]=s,this.length++;else if(u!==this)for(;e<u.length;e++)this.words[e]=u.words[e];return this},a.prototype.add=function(r){var n;if(r.negative!==0&&this.negative===0)return r.negative=0,n=this.sub(r),r.negative^=1,n;else if(r.negative===0&&this.negative!==0)return this.negative=0,n=r.sub(this),this.negative=1,n;if(this.length>r.length)return this.clone().iadd(r);return r.clone().iadd(this)},a.prototype.isub=function(r){if(r.negative!==0){r.negative=0;var n=this.iadd(r);return r.negative=1,n._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(r),this.negative=1,this._normSign();var u=this.cmp(r);if(u===0)return this.negative=0,this.length=1,this.words[0]=0,this;var d,s;if(u>0)d=this,s=r;else d=r,s=this;var e=0;for(var f=0;f<s.length;f++)n=(d.words[f]|0)-(s.words[f]|0)+e,e=n>>26,this.words[f]=n&67108863;for(;e!==0&&f<d.length;f++)n=(d.words[f]|0)+e,e=n>>26,this.words[f]=n&67108863;if(e===0&&f<d.length&&d!==this)for(;f<d.length;f++)this.words[f]=d.words[f];if(this.length=Math.max(this.length,f),d!==this)this.negative=1;return this._strip()},a.prototype.sub=function(r){return this.clone().isub(r)};function k(r,n,u){u.negative=n.negative^r.negative;var d=r.length+n.length|0;u.length=d,d=d-1|0;var s=r.words[0]|0,e=n.words[0]|0,f=s*e,_=f&67108863,m=f/67108864|0;u.words[0]=_;for(var I=1;I<d;I++){var N=m>>>26,U=m&67108863,Z=Math.min(I,n.length-1);for(var ut=Math.max(0,I-r.length+1);ut<=Z;ut++){var Y=I-ut|0;s=r.words[Y]|0,e=n.words[ut]|0,f=s*e+U,N+=f/67108864|0,U=f&67108863}u.words[I]=U|0,m=N|0}if(m!==0)u.words[I]=m|0;else u.length--;return u._strip()}var P=function(r,n,u){var d=r.words,s=n.words,e=u.words,f=0,_,m,I,N=d[0]|0,U=N&8191,Z=N>>>13,ut=d[1]|0,Y=ut&8191,H=ut>>>13,nt=d[2]|0,G=nt&8191,tt=nt>>>13,Dt=d[3]|0,L=Dt&8191,F=Dt>>>13,ot=d[4]|0,J=ot&8191,Q=ot>>>13,Mt=d[5]|0,C=Mt&8191,K=Mt>>>13,Nt=d[6]|0,V=Nt&8191,it=Nt>>>13,Lt=d[7]|0,pt=Lt&8191,yt=Lt>>>13,Zt=d[8]|0,dt=Zt&8191,bt=Zt>>>13,Jt=d[9]|0,gt=Jt&8191,vt=Jt>>>13,ve=s[0]|0,_t=ve&8191,It=ve>>>13,ge=s[1]|0,xt=ge&8191,St=ge>>>13,be=s[2]|0,kt=be&8191,At=be>>>13,ue=s[3]|0,Tt=ue&8191,Pt=ue>>>13,de=s[4]|0,Et=de&8191,q=de>>>13,z=s[5]|0,X=z&8191,et=z>>>13,Ot=s[6]|0,ct=Ot&8191,mt=Ot>>>13,Gt=s[7]|0,Rt=Gt&8191,qt=Gt>>>13,me=s[8]|0,Bt=me&8191,wt=me>>>13,Vt=s[9]|0,Ut=Vt&8191,Ct=Vt>>>13;u.negative=r.negative^n.negative,u.length=19,_=Math.imul(U,_t),m=Math.imul(U,It),m=m+Math.imul(Z,_t)|0,I=Math.imul(Z,It);var Wt=(f+_|0)+((m&8191)<<13)|0;f=(I+(m>>>13)|0)+(Wt>>>26)|0,Wt&=67108863,_=Math.imul(Y,_t),m=Math.imul(Y,It),m=m+Math.imul(H,_t)|0,I=Math.imul(H,It),_=_+Math.imul(U,xt)|0,m=m+Math.imul(U,St)|0,m=m+Math.imul(Z,xt)|0,I=I+Math.imul(Z,St)|0;var Ht=(f+_|0)+((m&8191)<<13)|0;f=(I+(m>>>13)|0)+(Ht>>>26)|0,Ht&=67108863,_=Math.imul(G,_t),m=Math.imul(G,It),m=m+Math.imul(tt,_t)|0,I=Math.imul(tt,It),_=_+Math.imul(Y,xt)|0,m=m+Math.imul(Y,St)|0,m=m+Math.imul(H,xt)|0,I=I+Math.imul(H,St)|0,_=_+Math.imul(U,kt)|0,m=m+Math.imul(U,At)|0,m=m+Math.imul(Z,kt)|0,I=I+Math.imul(Z,At)|0;var Yt=(f+_|0)+((m&8191)<<13)|0;f=(I+(m>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,_=Math.imul(L,_t),m=Math.imul(L,It),m=m+Math.imul(F,_t)|0,I=Math.imul(F,It),_=_+Math.imul(G,xt)|0,m=m+Math.imul(G,St)|0,m=m+Math.imul(tt,xt)|0,I=I+Math.imul(tt,St)|0,_=_+Math.imul(Y,kt)|0,m=m+Math.imul(Y,At)|0,m=m+Math.imul(H,kt)|0,I=I+Math.imul(H,At)|0,_=_+Math.imul(U,Tt)|0,m=m+Math.imul(U,Pt)|0,m=m+Math.imul(Z,Tt)|0,I=I+Math.imul(Z,Pt)|0;var Xt=(f+_|0)+((m&8191)<<13)|0;f=(I+(m>>>13)|0)+(Xt>>>26)|0,Xt&=67108863,_=Math.imul(J,_t),m=Math.imul(J,It),m=m+Math.imul(Q,_t)|0,I=Math.imul(Q,It),_=_+Math.imul(L,xt)|0,m=m+Math.imul(L,St)|0,m=m+Math.imul(F,xt)|0,I=I+Math.imul(F,St)|0,_=_+Math.imul(G,kt)|0,m=m+Math.imul(G,At)|0,m=m+Math.imul(tt,kt)|0,I=I+Math.imul(tt,At)|0,_=_+Math.imul(Y,Tt)|0,m=m+Math.imul(Y,Pt)|0,m=m+Math.imul(H,Tt)|0,I=I+Math.imul(H,Pt)|0,_=_+Math.imul(U,Et)|0,m=m+Math.imul(U,q)|0,m=m+Math.imul(Z,Et)|0,I=I+Math.imul(Z,q)|0;var Qt=(f+_|0)+((m&8191)<<13)|0;f=(I+(m>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,_=Math.imul(C,_t),m=Math.imul(C,It),m=m+Math.imul(K,_t)|0,I=Math.imul(K,It),_=_+Math.imul(J,xt)|0,m=m+Math.imul(J,St)|0,m=m+Math.imul(Q,xt)|0,I=I+Math.imul(Q,St)|0,_=_+Math.imul(L,kt)|0,m=m+Math.imul(L,At)|0,m=m+Math.imul(F,kt)|0,I=I+Math.imul(F,At)|0,_=_+Math.imul(G,Tt)|0,m=m+Math.imul(G,Pt)|0,m=m+Math.imul(tt,Tt)|0,I=I+Math.imul(tt,Pt)|0,_=_+Math.imul(Y,Et)|0,m=m+Math.imul(Y,q)|0,m=m+Math.imul(H,Et)|0,I=I+Math.imul(H,q)|0,_=_+Math.imul(U,X)|0,m=m+Math.imul(U,et)|0,m=m+Math.imul(Z,X)|0,I=I+Math.imul(Z,et)|0;var te=(f+_|0)+((m&8191)<<13)|0;f=(I+(m>>>13)|0)+(te>>>26)|0,te&=67108863,_=Math.imul(V,_t),m=Math.imul(V,It),m=m+Math.imul(it,_t)|0,I=Math.imul(it,It),_=_+Math.imul(C,xt)|0,m=m+Math.imul(C,St)|0,m=m+Math.imul(K,xt)|0,I=I+Math.imul(K,St)|0,_=_+Math.imul(J,kt)|0,m=m+Math.imul(J,At)|0,m=m+Math.imul(Q,kt)|0,I=I+Math.imul(Q,At)|0,_=_+Math.imul(L,Tt)|0,m=m+Math.imul(L,Pt)|0,m=m+Math.imul(F,Tt)|0,I=I+Math.imul(F,Pt)|0,_=_+Math.imul(G,Et)|0,m=m+Math.imul(G,q)|0,m=m+Math.imul(tt,Et)|0,I=I+Math.imul(tt,q)|0,_=_+Math.imul(Y,X)|0,m=m+Math.imul(Y,et)|0,m=m+Math.imul(H,X)|0,I=I+Math.imul(H,et)|0,_=_+Math.imul(U,ct)|0,m=m+Math.imul(U,mt)|0,m=m+Math.imul(Z,ct)|0,I=I+Math.imul(Z,mt)|0;var ee=(f+_|0)+((m&8191)<<13)|0;f=(I+(m>>>13)|0)+(ee>>>26)|0,ee&=67108863,_=Math.imul(pt,_t),m=Math.imul(pt,It),m=m+Math.imul(yt,_t)|0,I=Math.imul(yt,It),_=_+Math.imul(V,xt)|0,m=m+Math.imul(V,St)|0,m=m+Math.imul(it,xt)|0,I=I+Math.imul(it,St)|0,_=_+Math.imul(C,kt)|0,m=m+Math.imul(C,At)|0,m=m+Math.imul(K,kt)|0,I=I+Math.imul(K,At)|0,_=_+Math.imul(J,Tt)|0,m=m+Math.imul(J,Pt)|0,m=m+Math.imul(Q,Tt)|0,I=I+Math.imul(Q,Pt)|0,_=_+Math.imul(L,Et)|0,m=m+Math.imul(L,q)|0,m=m+Math.imul(F,Et)|0,I=I+Math.imul(F,q)|0,_=_+Math.imul(G,X)|0,m=m+Math.imul(G,et)|0,m=m+Math.imul(tt,X)|0,I=I+Math.imul(tt,et)|0,_=_+Math.imul(Y,ct)|0,m=m+Math.imul(Y,mt)|0,m=m+Math.imul(H,ct)|0,I=I+Math.imul(H,mt)|0,_=_+Math.imul(U,Rt)|0,m=m+Math.imul(U,qt)|0,m=m+Math.imul(Z,Rt)|0,I=I+Math.imul(Z,qt)|0;var re=(f+_|0)+((m&8191)<<13)|0;f=(I+(m>>>13)|0)+(re>>>26)|0,re&=67108863,_=Math.imul(dt,_t),m=Math.imul(dt,It),m=m+Math.imul(bt,_t)|0,I=Math.imul(bt,It),_=_+Math.imul(pt,xt)|0,m=m+Math.imul(pt,St)|0,m=m+Math.imul(yt,xt)|0,I=I+Math.imul(yt,St)|0,_=_+Math.imul(V,kt)|0,m=m+Math.imul(V,At)|0,m=m+Math.imul(it,kt)|0,I=I+Math.imul(it,At)|0,_=_+Math.imul(C,Tt)|0,m=m+Math.imul(C,Pt)|0,m=m+Math.imul(K,Tt)|0,I=I+Math.imul(K,Pt)|0,_=_+Math.imul(J,Et)|0,m=m+Math.imul(J,q)|0,m=m+Math.imul(Q,Et)|0,I=I+Math.imul(Q,q)|0,_=_+Math.imul(L,X)|0,m=m+Math.imul(L,et)|0,m=m+Math.imul(F,X)|0,I=I+Math.imul(F,et)|0,_=_+Math.imul(G,ct)|0,m=m+Math.imul(G,mt)|0,m=m+Math.imul(tt,ct)|0,I=I+Math.imul(tt,mt)|0,_=_+Math.imul(Y,Rt)|0,m=m+Math.imul(Y,qt)|0,m=m+Math.imul(H,Rt)|0,I=I+Math.imul(H,qt)|0,_=_+Math.imul(U,Bt)|0,m=m+Math.imul(U,wt)|0,m=m+Math.imul(Z,Bt)|0,I=I+Math.imul(Z,wt)|0;var ie=(f+_|0)+((m&8191)<<13)|0;f=(I+(m>>>13)|0)+(ie>>>26)|0,ie&=67108863,_=Math.imul(gt,_t),m=Math.imul(gt,It),m=m+Math.imul(vt,_t)|0,I=Math.imul(vt,It),_=_+Math.imul(dt,xt)|0,m=m+Math.imul(dt,St)|0,m=m+Math.imul(bt,xt)|0,I=I+Math.imul(bt,St)|0,_=_+Math.imul(pt,kt)|0,m=m+Math.imul(pt,At)|0,m=m+Math.imul(yt,kt)|0,I=I+Math.imul(yt,At)|0,_=_+Math.imul(V,Tt)|0,m=m+Math.imul(V,Pt)|0,m=m+Math.imul(it,Tt)|0,I=I+Math.imul(it,Pt)|0,_=_+Math.imul(C,Et)|0,m=m+Math.imul(C,q)|0,m=m+Math.imul(K,Et)|0,I=I+Math.imul(K,q)|0,_=_+Math.imul(J,X)|0,m=m+Math.imul(J,et)|0,m=m+Math.imul(Q,X)|0,I=I+Math.imul(Q,et)|0,_=_+Math.imul(L,ct)|0,m=m+Math.imul(L,mt)|0,m=m+Math.imul(F,ct)|0,I=I+Math.imul(F,mt)|0,_=_+Math.imul(G,Rt)|0,m=m+Math.imul(G,qt)|0,m=m+Math.imul(tt,Rt)|0,I=I+Math.imul(tt,qt)|0,_=_+Math.imul(Y,Bt)|0,m=m+Math.imul(Y,wt)|0,m=m+Math.imul(H,Bt)|0,I=I+Math.imul(H,wt)|0,_=_+Math.imul(U,Ut)|0,m=m+Math.imul(U,Ct)|0,m=m+Math.imul(Z,Ut)|0,I=I+Math.imul(Z,Ct)|0;var ne=(f+_|0)+((m&8191)<<13)|0;f=(I+(m>>>13)|0)+(ne>>>26)|0,ne&=67108863,_=Math.imul(gt,xt),m=Math.imul(gt,St),m=m+Math.imul(vt,xt)|0,I=Math.imul(vt,St),_=_+Math.imul(dt,kt)|0,m=m+Math.imul(dt,At)|0,m=m+Math.imul(bt,kt)|0,I=I+Math.imul(bt,At)|0,_=_+Math.imul(pt,Tt)|0,m=m+Math.imul(pt,Pt)|0,m=m+Math.imul(yt,Tt)|0,I=I+Math.imul(yt,Pt)|0,_=_+Math.imul(V,Et)|0,m=m+Math.imul(V,q)|0,m=m+Math.imul(it,Et)|0,I=I+Math.imul(it,q)|0,_=_+Math.imul(C,X)|0,m=m+Math.imul(C,et)|0,m=m+Math.imul(K,X)|0,I=I+Math.imul(K,et)|0,_=_+Math.imul(J,ct)|0,m=m+Math.imul(J,mt)|0,m=m+Math.imul(Q,ct)|0,I=I+Math.imul(Q,mt)|0,_=_+Math.imul(L,Rt)|0,m=m+Math.imul(L,qt)|0,m=m+Math.imul(F,Rt)|0,I=I+Math.imul(F,qt)|0,_=_+Math.imul(G,Bt)|0,m=m+Math.imul(G,wt)|0,m=m+Math.imul(tt,Bt)|0,I=I+Math.imul(tt,wt)|0,_=_+Math.imul(Y,Ut)|0,m=m+Math.imul(Y,Ct)|0,m=m+Math.imul(H,Ut)|0,I=I+Math.imul(H,Ct)|0;var oe=(f+_|0)+((m&8191)<<13)|0;f=(I+(m>>>13)|0)+(oe>>>26)|0,oe&=67108863,_=Math.imul(gt,kt),m=Math.imul(gt,At),m=m+Math.imul(vt,kt)|0,I=Math.imul(vt,At),_=_+Math.imul(dt,Tt)|0,m=m+Math.imul(dt,Pt)|0,m=m+Math.imul(bt,Tt)|0,I=I+Math.imul(bt,Pt)|0,_=_+Math.imul(pt,Et)|0,m=m+Math.imul(pt,q)|0,m=m+Math.imul(yt,Et)|0,I=I+Math.imul(yt,q)|0,_=_+Math.imul(V,X)|0,m=m+Math.imul(V,et)|0,m=m+Math.imul(it,X)|0,I=I+Math.imul(it,et)|0,_=_+Math.imul(C,ct)|0,m=m+Math.imul(C,mt)|0,m=m+Math.imul(K,ct)|0,I=I+Math.imul(K,mt)|0,_=_+Math.imul(J,Rt)|0,m=m+Math.imul(J,qt)|0,m=m+Math.imul(Q,Rt)|0,I=I+Math.imul(Q,qt)|0,_=_+Math.imul(L,Bt)|0,m=m+Math.imul(L,wt)|0,m=m+Math.imul(F,Bt)|0,I=I+Math.imul(F,wt)|0,_=_+Math.imul(G,Ut)|0,m=m+Math.imul(G,Ct)|0,m=m+Math.imul(tt,Ut)|0,I=I+Math.imul(tt,Ct)|0;var ae=(f+_|0)+((m&8191)<<13)|0;f=(I+(m>>>13)|0)+(ae>>>26)|0,ae&=67108863,_=Math.imul(gt,Tt),m=Math.imul(gt,Pt),m=m+Math.imul(vt,Tt)|0,I=Math.imul(vt,Pt),_=_+Math.imul(dt,Et)|0,m=m+Math.imul(dt,q)|0,m=m+Math.imul(bt,Et)|0,I=I+Math.imul(bt,q)|0,_=_+Math.imul(pt,X)|0,m=m+Math.imul(pt,et)|0,m=m+Math.imul(yt,X)|0,I=I+Math.imul(yt,et)|0,_=_+Math.imul(V,ct)|0,m=m+Math.imul(V,mt)|0,m=m+Math.imul(it,ct)|0,I=I+Math.imul(it,mt)|0,_=_+Math.imul(C,Rt)|0,m=m+Math.imul(C,qt)|0,m=m+Math.imul(K,Rt)|0,I=I+Math.imul(K,qt)|0,_=_+Math.imul(J,Bt)|0,m=m+Math.imul(J,wt)|0,m=m+Math.imul(Q,Bt)|0,I=I+Math.imul(Q,wt)|0,_=_+Math.imul(L,Ut)|0,m=m+Math.imul(L,Ct)|0,m=m+Math.imul(F,Ut)|0,I=I+Math.imul(F,Ct)|0;var se=(f+_|0)+((m&8191)<<13)|0;f=(I+(m>>>13)|0)+(se>>>26)|0,se&=67108863,_=Math.imul(gt,Et),m=Math.imul(gt,q),m=m+Math.imul(vt,Et)|0,I=Math.imul(vt,q),_=_+Math.imul(dt,X)|0,m=m+Math.imul(dt,et)|0,m=m+Math.imul(bt,X)|0,I=I+Math.imul(bt,et)|0,_=_+Math.imul(pt,ct)|0,m=m+Math.imul(pt,mt)|0,m=m+Math.imul(yt,ct)|0,I=I+Math.imul(yt,mt)|0,_=_+Math.imul(V,Rt)|0,m=m+Math.imul(V,qt)|0,m=m+Math.imul(it,Rt)|0,I=I+Math.imul(it,qt)|0,_=_+Math.imul(C,Bt)|0,m=m+Math.imul(C,wt)|0,m=m+Math.imul(K,Bt)|0,I=I+Math.imul(K,wt)|0,_=_+Math.imul(J,Ut)|0,m=m+Math.imul(J,Ct)|0,m=m+Math.imul(Q,Ut)|0,I=I+Math.imul(Q,Ct)|0;var he=(f+_|0)+((m&8191)<<13)|0;f=(I+(m>>>13)|0)+(he>>>26)|0,he&=67108863,_=Math.imul(gt,X),m=Math.imul(gt,et),m=m+Math.imul(vt,X)|0,I=Math.imul(vt,et),_=_+Math.imul(dt,ct)|0,m=m+Math.imul(dt,mt)|0,m=m+Math.imul(bt,ct)|0,I=I+Math.imul(bt,mt)|0,_=_+Math.imul(pt,Rt)|0,m=m+Math.imul(pt,qt)|0,m=m+Math.imul(yt,Rt)|0,I=I+Math.imul(yt,qt)|0,_=_+Math.imul(V,Bt)|0,m=m+Math.imul(V,wt)|0,m=m+Math.imul(it,Bt)|0,I=I+Math.imul(it,wt)|0,_=_+Math.imul(C,Ut)|0,m=m+Math.imul(C,Ct)|0,m=m+Math.imul(K,Ut)|0,I=I+Math.imul(K,Ct)|0;var fe=(f+_|0)+((m&8191)<<13)|0;f=(I+(m>>>13)|0)+(fe>>>26)|0,fe&=67108863,_=Math.imul(gt,ct),m=Math.imul(gt,mt),m=m+Math.imul(vt,ct)|0,I=Math.imul(vt,mt),_=_+Math.imul(dt,Rt)|0,m=m+Math.imul(dt,qt)|0,m=m+Math.imul(bt,Rt)|0,I=I+Math.imul(bt,qt)|0,_=_+Math.imul(pt,Bt)|0,m=m+Math.imul(pt,wt)|0,m=m+Math.imul(yt,Bt)|0,I=I+Math.imul(yt,wt)|0,_=_+Math.imul(V,Ut)|0,m=m+Math.imul(V,Ct)|0,m=m+Math.imul(it,Ut)|0,I=I+Math.imul(it,Ct)|0;var le=(f+_|0)+((m&8191)<<13)|0;f=(I+(m>>>13)|0)+(le>>>26)|0,le&=67108863,_=Math.imul(gt,Rt),m=Math.imul(gt,qt),m=m+Math.imul(vt,Rt)|0,I=Math.imul(vt,qt),_=_+Math.imul(dt,Bt)|0,m=m+Math.imul(dt,wt)|0,m=m+Math.imul(bt,Bt)|0,I=I+Math.imul(bt,wt)|0,_=_+Math.imul(pt,Ut)|0,m=m+Math.imul(pt,Ct)|0,m=m+Math.imul(yt,Ut)|0,I=I+Math.imul(yt,Ct)|0;var Ir=(f+_|0)+((m&8191)<<13)|0;f=(I+(m>>>13)|0)+(Ir>>>26)|0,Ir&=67108863,_=Math.imul(gt,Bt),m=Math.imul(gt,wt),m=m+Math.imul(vt,Bt)|0,I=Math.imul(vt,wt),_=_+Math.imul(dt,Ut)|0,m=m+Math.imul(dt,Ct)|0,m=m+Math.imul(bt,Ut)|0,I=I+Math.imul(bt,Ct)|0;var xr=(f+_|0)+((m&8191)<<13)|0;f=(I+(m>>>13)|0)+(xr>>>26)|0,xr&=67108863,_=Math.imul(gt,Ut),m=Math.imul(gt,Ct),m=m+Math.imul(vt,Ut)|0,I=Math.imul(vt,Ct);var kr=(f+_|0)+((m&8191)<<13)|0;if(f=(I+(m>>>13)|0)+(kr>>>26)|0,kr&=67108863,e[0]=Wt,e[1]=Ht,e[2]=Yt,e[3]=Xt,e[4]=Qt,e[5]=te,e[6]=ee,e[7]=re,e[8]=ie,e[9]=ne,e[10]=oe,e[11]=ae,e[12]=se,e[13]=he,e[14]=fe,e[15]=le,e[16]=Ir,e[17]=xr,e[18]=kr,f!==0)e[19]=f,u.length++;return u};if(!Math.imul)P=k;function D(r,n,u){u.negative=n.negative^r.negative,u.length=r.length+n.length;var d=0,s=0;for(var e=0;e<u.length-1;e++){var f=s;s=0;var _=d&67108863,m=Math.min(e,n.length-1);for(var I=Math.max(0,e-r.length+1);I<=m;I++){var N=e-I,U=r.words[N]|0,Z=n.words[I]|0,ut=U*Z,Y=ut&67108863;f=f+(ut/67108864|0)|0,Y=Y+_|0,_=Y&67108863,f=f+(Y>>>26)|0,s+=f>>>26,f&=67108863}u.words[e]=_,d=f,f=s}if(d!==0)u.words[e]=d;else u.length--;return u._strip()}function O(r,n,u){return D(r,n,u)}a.prototype.mulTo=function(r,n){var u,d=this.length+r.length;if(this.length===10&&r.length===10)u=P(this,r,n);else if(d<63)u=k(this,r,n);else if(d<1024)u=D(this,r,n);else u=O(this,r,n);return u};function W(r,n){this.x=r,this.y=n}W.prototype.makeRBT=function(r){var n=Array(r),u=a.prototype._countBits(r)-1;for(var d=0;d<r;d++)n[d]=this.revBin(d,u,r);return n},W.prototype.revBin=function(r,n,u){if(r===0||r===u-1)return r;var d=0;for(var s=0;s<n;s++)d|=(r&1)<<n-s-1,r>>=1;return d},W.prototype.permute=function(r,n,u,d,s,e){for(var f=0;f<e;f++)d[f]=n[r[f]],s[f]=u[r[f]]},W.prototype.transform=function(r,n,u,d,s,e){this.permute(e,r,n,u,d,s);for(var f=1;f<s;f<<=1){var _=f<<1,m=Math.cos(2*Math.PI/_),I=Math.sin(2*Math.PI/_);for(var N=0;N<s;N+=_){var U=m,Z=I;for(var ut=0;ut<f;ut++){var Y=u[N+ut],H=d[N+ut],nt=u[N+ut+f],G=d[N+ut+f],tt=U*nt-Z*G;if(G=U*G+Z*nt,nt=tt,u[N+ut]=Y+nt,d[N+ut]=H+G,u[N+ut+f]=Y-nt,d[N+ut+f]=H-G,ut!==_)tt=m*U-I*Z,Z=m*Z+I*U,U=tt}}}},W.prototype.guessLen13b=function(r,n){var u=Math.max(n,r)|1,d=u&1,s=0;for(u=u/2|0;u;u=u>>>1)s++;return 1<<s+1+d},W.prototype.conjugate=function(r,n,u){if(u<=1)return;for(var d=0;d<u/2;d++){var s=r[d];r[d]=r[u-d-1],r[u-d-1]=s,s=n[d],n[d]=-n[u-d-1],n[u-d-1]=-s}},W.prototype.normalize13b=function(r,n){var u=0;for(var d=0;d<n/2;d++){var s=Math.round(r[2*d+1]/n)*8192+Math.round(r[2*d]/n)+u;if(r[d]=s&67108863,s<67108864)u=0;else u=s/67108864|0}return r},W.prototype.convert13b=function(r,n,u,d){var s=0;for(var e=0;e<n;e++)s=s+(r[e]|0),u[2*e]=s&8191,s=s>>>13,u[2*e+1]=s&8191,s=s>>>13;for(e=2*n;e<d;++e)u[e]=0;p(s===0),p((s&-8192)===0)},W.prototype.stub=function(r){var n=Array(r);for(var u=0;u<r;u++)n[u]=0;return n},W.prototype.mulp=function(r,n,u){var d=2*this.guessLen13b(r.length,n.length),s=this.makeRBT(d),e=this.stub(d),f=Array(d),_=Array(d),m=Array(d),I=Array(d),N=Array(d),U=Array(d),Z=u.words;Z.length=d,this.convert13b(r.words,r.length,f,d),this.convert13b(n.words,n.length,I,d),this.transform(f,e,_,m,d,s),this.transform(I,e,N,U,d,s);for(var ut=0;ut<d;ut++){var Y=_[ut]*N[ut]-m[ut]*U[ut];m[ut]=_[ut]*U[ut]+m[ut]*N[ut],_[ut]=Y}return this.conjugate(_,m,d),this.transform(_,m,Z,e,d,s),this.conjugate(Z,e,d),this.normalize13b(Z,d),u.negative=r.negative^n.negative,u.length=r.length+n.length,u._strip()},a.prototype.mul=function(r){var n=new a(null);return n.words=Array(this.length+r.length),this.mulTo(r,n)},a.prototype.mulf=function(r){var n=new a(null);return n.words=Array(this.length+r.length),O(this,r,n)},a.prototype.imul=function(r){return this.clone().mulTo(r,this)},a.prototype.imuln=function(r){var n=r<0;if(n)r=-r;p(typeof r==="number"),p(r<67108864);var u=0;for(var d=0;d<this.length;d++){var s=(this.words[d]|0)*r,e=(s&67108863)+(u&67108863);u>>=26,u+=s/67108864|0,u+=e>>>26,this.words[d]=e&67108863}if(u!==0)this.words[d]=u,this.length++;return this.length=r===0?1:this.length,n?this.ineg():this},a.prototype.muln=function(r){return this.clone().imuln(r)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(r){var n=T(r);if(n.length===0)return new a(1);var u=this;for(var d=0;d<n.length;d++,u=u.sqr())if(n[d]!==0)break;if(++d<n.length)for(var s=u.sqr();d<n.length;d++,s=s.sqr()){if(n[d]===0)continue;u=u.mul(s)}return u},a.prototype.iushln=function(r){p(typeof r==="number"&&r>=0);var n=r%26,u=(r-n)/26,d=67108863>>>26-n<<26-n,s;if(n!==0){var e=0;for(s=0;s<this.length;s++){var f=this.words[s]&d,_=(this.words[s]|0)-f<<n;this.words[s]=_|e,e=f>>>26-n}if(e)this.words[s]=e,this.length++}if(u!==0){for(s=this.length-1;s>=0;s--)this.words[s+u]=this.words[s];for(s=0;s<u;s++)this.words[s]=0;this.length+=u}return this._strip()},a.prototype.ishln=function(r){return p(this.negative===0),this.iushln(r)},a.prototype.iushrn=function(r,n,u){p(typeof r==="number"&&r>=0);var d;if(n)d=(n-n%26)/26;else d=0;var s=r%26,e=Math.min((r-s)/26,this.length),f=67108863^67108863>>>s<<s,_=u;if(d-=e,d=Math.max(0,d),_){for(var m=0;m<e;m++)_.words[m]=this.words[m];_.length=e}if(e===0);else if(this.length>e){this.length-=e;for(m=0;m<this.length;m++)this.words[m]=this.words[m+e]}else this.words[0]=0,this.length=1;var I=0;for(m=this.length-1;m>=0&&(I!==0||m>=d);m--){var N=this.words[m]|0;this.words[m]=I<<26-s|N>>>s,I=N&f}if(_&&I!==0)_.words[_.length++]=I;if(this.length===0)this.words[0]=0,this.length=1;return this._strip()},a.prototype.ishrn=function(r,n,u){return p(this.negative===0),this.iushrn(r,n,u)},a.prototype.shln=function(r){return this.clone().ishln(r)},a.prototype.ushln=function(r){return this.clone().iushln(r)},a.prototype.shrn=function(r){return this.clone().ishrn(r)},a.prototype.ushrn=function(r){return this.clone().iushrn(r)},a.prototype.testn=function(r){p(typeof r==="number"&&r>=0);var n=r%26,u=(r-n)/26,d=1<<n;if(this.length<=u)return!1;var s=this.words[u];return!!(s&d)},a.prototype.imaskn=function(r){p(typeof r==="number"&&r>=0);var n=r%26,u=(r-n)/26;if(p(this.negative===0,"imaskn works only with positive numbers"),this.length<=u)return this;if(n!==0)u++;if(this.length=Math.min(u,this.length),n!==0){var d=67108863^67108863>>>n<<n;this.words[this.length-1]&=d}return this._strip()},a.prototype.maskn=function(r){return this.clone().imaskn(r)},a.prototype.iaddn=function(r){if(p(typeof r==="number"),p(r<67108864),r<0)return this.isubn(-r);if(this.negative!==0){if(this.length===1&&(this.words[0]|0)<=r)return this.words[0]=r-(this.words[0]|0),this.negative=0,this;return this.negative=0,this.isubn(r),this.negative=1,this}return this._iaddn(r)},a.prototype._iaddn=function(r){this.words[0]+=r;for(var n=0;n<this.length&&this.words[n]>=67108864;n++)if(this.words[n]-=67108864,n===this.length-1)this.words[n+1]=1;else this.words[n+1]++;return this.length=Math.max(this.length,n+1),this},a.prototype.isubn=function(r){if(p(typeof r==="number"),p(r<67108864),r<0)return this.iaddn(-r);if(this.negative!==0)return this.negative=0,this.iaddn(r),this.negative=1,this;if(this.words[0]-=r,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var n=0;n<this.length&&this.words[n]<0;n++)this.words[n]+=67108864,this.words[n+1]-=1;return this._strip()},a.prototype.addn=function(r){return this.clone().iaddn(r)},a.prototype.subn=function(r){return this.clone().isubn(r)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(r,n,u){var d=r.length+u,s;this._expand(d);var e,f=0;for(s=0;s<r.length;s++){e=(this.words[s+u]|0)+f;var _=(r.words[s]|0)*n;e-=_&67108863,f=(e>>26)-(_/67108864|0),this.words[s+u]=e&67108863}for(;s<this.length-u;s++)e=(this.words[s+u]|0)+f,f=e>>26,this.words[s+u]=e&67108863;if(f===0)return this._strip();p(f===-1),f=0;for(s=0;s<this.length;s++)e=-(this.words[s]|0)+f,f=e>>26,this.words[s]=e&67108863;return this.negative=1,this._strip()},a.prototype._wordDiv=function(r,n){var u=this.length-r.length,d=this.clone(),s=r,e=s.words[s.length-1]|0,f=this._countBits(e);if(u=26-f,u!==0)s=s.ushln(u),d.iushln(u),e=s.words[s.length-1]|0;var _=d.length-s.length,m;if(n!=="mod"){m=new a(null),m.length=_+1,m.words=Array(m.length);for(var I=0;I<m.length;I++)m.words[I]=0}var N=d.clone()._ishlnsubmul(s,1,_);if(N.negative===0){if(d=N,m)m.words[_]=1}for(var U=_-1;U>=0;U--){var Z=(d.words[s.length+U]|0)*67108864+(d.words[s.length+U-1]|0);Z=Math.min(Z/e|0,67108863),d._ishlnsubmul(s,Z,U);while(d.negative!==0)if(Z--,d.negative=0,d._ishlnsubmul(s,1,U),!d.isZero())d.negative^=1;if(m)m.words[U]=Z}if(m)m._strip();if(d._strip(),n!=="div"&&u!==0)d.iushrn(u);return{div:m||null,mod:d}},a.prototype.divmod=function(r,n,u){if(p(!r.isZero()),this.isZero())return{div:new a(0),mod:new a(0)};var d,s,e;if(this.negative!==0&&r.negative===0){if(e=this.neg().divmod(r,n),n!=="mod")d=e.div.neg();if(n!=="div"){if(s=e.mod.neg(),u&&s.negative!==0)s.iadd(r)}return{div:d,mod:s}}if(this.negative===0&&r.negative!==0){if(e=this.divmod(r.neg(),n),n!=="mod")d=e.div.neg();return{div:d,mod:e.mod}}if((this.negative&r.negative)!==0){if(e=this.neg().divmod(r.neg(),n),n!=="div"){if(s=e.mod.neg(),u&&s.negative!==0)s.isub(r)}return{div:e.div,mod:s}}if(r.length>this.length||this.cmp(r)<0)return{div:new a(0),mod:this};if(r.length===1){if(n==="div")return{div:this.divn(r.words[0]),mod:null};if(n==="mod")return{div:null,mod:new a(this.modrn(r.words[0]))};return{div:this.divn(r.words[0]),mod:new a(this.modrn(r.words[0]))}}return this._wordDiv(r,n)},a.prototype.div=function(r){return this.divmod(r,"div",!1).div},a.prototype.mod=function(r){return this.divmod(r,"mod",!1).mod},a.prototype.umod=function(r){return this.divmod(r,"mod",!0).mod},a.prototype.divRound=function(r){var n=this.divmod(r);if(n.mod.isZero())return n.div;var u=n.div.negative!==0?n.mod.isub(r):n.mod,d=r.ushrn(1),s=r.andln(1),e=u.cmp(d);if(e<0||s===1&&e===0)return n.div;return n.div.negative!==0?n.div.isubn(1):n.div.iaddn(1)},a.prototype.modrn=function(r){var n=r<0;if(n)r=-r;p(r<=67108863);var u=67108864%r,d=0;for(var s=this.length-1;s>=0;s--)d=(u*d+(this.words[s]|0))%r;return n?-d:d},a.prototype.modn=function(r){return this.modrn(r)},a.prototype.idivn=function(r){var n=r<0;if(n)r=-r;p(r<=67108863);var u=0;for(var d=this.length-1;d>=0;d--){var s=(this.words[d]|0)+u*67108864;this.words[d]=s/r|0,u=s%r}return this._strip(),n?this.ineg():this},a.prototype.divn=function(r){return this.clone().idivn(r)},a.prototype.egcd=function(r){p(r.negative===0),p(!r.isZero());var n=this,u=r.clone();if(n.negative!==0)n=n.umod(r);else n=n.clone();var d=new a(1),s=new a(0),e=new a(0),f=new a(1),_=0;while(n.isEven()&&u.isEven())n.iushrn(1),u.iushrn(1),++_;var m=u.clone(),I=n.clone();while(!n.isZero()){for(var N=0,U=1;(n.words[0]&U)===0&&N<26;++N,U<<=1);if(N>0){n.iushrn(N);while(N-- >0){if(d.isOdd()||s.isOdd())d.iadd(m),s.isub(I);d.iushrn(1),s.iushrn(1)}}for(var Z=0,ut=1;(u.words[0]&ut)===0&&Z<26;++Z,ut<<=1);if(Z>0){u.iushrn(Z);while(Z-- >0){if(e.isOdd()||f.isOdd())e.iadd(m),f.isub(I);e.iushrn(1),f.iushrn(1)}}if(n.cmp(u)>=0)n.isub(u),d.isub(e),s.isub(f);else u.isub(n),e.isub(d),f.isub(s)}return{a:e,b:f,gcd:u.iushln(_)}},a.prototype._invmp=function(r){p(r.negative===0),p(!r.isZero());var n=this,u=r.clone();if(n.negative!==0)n=n.umod(r);else n=n.clone();var d=new a(1),s=new a(0),e=u.clone();while(n.cmpn(1)>0&&u.cmpn(1)>0){for(var f=0,_=1;(n.words[0]&_)===0&&f<26;++f,_<<=1);if(f>0){n.iushrn(f);while(f-- >0){if(d.isOdd())d.iadd(e);d.iushrn(1)}}for(var m=0,I=1;(u.words[0]&I)===0&&m<26;++m,I<<=1);if(m>0){u.iushrn(m);while(m-- >0){if(s.isOdd())s.iadd(e);s.iushrn(1)}}if(n.cmp(u)>=0)n.isub(u),d.isub(s);else u.isub(n),s.isub(d)}var N;if(n.cmpn(1)===0)N=d;else N=s;if(N.cmpn(0)<0)N.iadd(r);return N},a.prototype.gcd=function(r){if(this.isZero())return r.abs();if(r.isZero())return this.abs();var n=this.clone(),u=r.clone();n.negative=0,u.negative=0;for(var d=0;n.isEven()&&u.isEven();d++)n.iushrn(1),u.iushrn(1);do{while(n.isEven())n.iushrn(1);while(u.isEven())u.iushrn(1);var s=n.cmp(u);if(s<0){var e=n;n=u,u=e}else if(s===0||u.cmpn(1)===0)break;n.isub(u)}while(!0);return u.iushln(d)},a.prototype.invm=function(r){return this.egcd(r).a.umod(r)},a.prototype.isEven=function(){return(this.words[0]&1)===0},a.prototype.isOdd=function(){return(this.words[0]&1)===1},a.prototype.andln=function(r){return this.words[0]&r},a.prototype.bincn=function(r){p(typeof r==="number");var n=r%26,u=(r-n)/26,d=1<<n;if(this.length<=u)return this._expand(u+1),this.words[u]|=d,this;var s=d;for(var e=u;s!==0&&e<this.length;e++){var f=this.words[e]|0;f+=s,s=f>>>26,f&=67108863,this.words[e]=f}if(s!==0)this.words[e]=s,this.length++;return this},a.prototype.isZero=function(){return this.length===1&&this.words[0]===0},a.prototype.cmpn=function(r){var n=r<0;if(this.negative!==0&&!n)return-1;if(this.negative===0&&n)return 1;this._strip();var u;if(this.length>1)u=1;else{if(n)r=-r;p(r<=67108863,"Number is too big");var d=this.words[0]|0;u=d===r?0:d<r?-1:1}if(this.negative!==0)return-u|0;return u},a.prototype.cmp=function(r){if(this.negative!==0&&r.negative===0)return-1;if(this.negative===0&&r.negative!==0)return 1;var n=this.ucmp(r);if(this.negative!==0)return-n|0;return n},a.prototype.ucmp=function(r){if(this.length>r.length)return 1;if(this.length<r.length)return-1;var n=0;for(var u=this.length-1;u>=0;u--){var d=this.words[u]|0,s=r.words[u]|0;if(d===s)continue;if(d<s)n=-1;else if(d>s)n=1;break}return n},a.prototype.gtn=function(r){return this.cmpn(r)===1},a.prototype.gt=function(r){return this.cmp(r)===1},a.prototype.gten=function(r){return this.cmpn(r)>=0},a.prototype.gte=function(r){return this.cmp(r)>=0},a.prototype.ltn=function(r){return this.cmpn(r)===-1},a.prototype.lt=function(r){return this.cmp(r)===-1},a.prototype.lten=function(r){return this.cmpn(r)<=0},a.prototype.lte=function(r){return this.cmp(r)<=0},a.prototype.eqn=function(r){return this.cmpn(r)===0},a.prototype.eq=function(r){return this.cmp(r)===0},a.red=function(r){return new i(r)},a.prototype.toRed=function(r){return p(!this.red,"Already a number in reduction context"),p(this.negative===0,"red works only with positives"),r.convertTo(this)._forceRed(r)},a.prototype.fromRed=function(){return p(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(r){return this.red=r,this},a.prototype.forceRed=function(r){return p(!this.red,"Already a number in reduction context"),this._forceRed(r)},a.prototype.redAdd=function(r){return p(this.red,"redAdd works only with red numbers"),this.red.add(this,r)},a.prototype.redIAdd=function(r){return p(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,r)},a.prototype.redSub=function(r){return p(this.red,"redSub works only with red numbers"),this.red.sub(this,r)},a.prototype.redISub=function(r){return p(this.red,"redISub works only with red numbers"),this.red.isub(this,r)},a.prototype.redShl=function(r){return p(this.red,"redShl works only with red numbers"),this.red.shl(this,r)},a.prototype.redMul=function(r){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,r),this.red.mul(this,r)},a.prototype.redIMul=function(r){return p(this.red,"redMul works only with red numbers"),this.red._verify2(this,r),this.red.imul(this,r)},a.prototype.redSqr=function(){return p(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return p(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return p(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return p(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return p(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(r){return p(this.red&&!r.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,r)};var at={k256:null,p224:null,p192:null,p25519:null};function ft(r,n){this.name=r,this.p=new a(n,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}ft.prototype._tmp=function(){var r=new a(null);return r.words=Array(Math.ceil(this.n/13)),r},ft.prototype.ireduce=function(r){var n=r,u;do this.split(n,this.tmp),n=this.imulK(n),n=n.iadd(this.tmp),u=n.bitLength();while(u>this.n);var d=u<this.n?-1:n.ucmp(this.p);if(d===0)n.words[0]=0,n.length=1;else if(d>0)n.isub(this.p);else if(n.strip!==void 0)n.strip();else n._strip();return n},ft.prototype.split=function(r,n){r.iushrn(this.n,0,n)},ft.prototype.imulK=function(r){return r.imul(this.k)};function st(){ft.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}M(st,ft),st.prototype.split=function(r,n){var u=4194303,d=Math.min(r.length,9);for(var s=0;s<d;s++)n.words[s]=r.words[s];if(n.length=d,r.length<=9){r.words[0]=0,r.length=1;return}var e=r.words[9];n.words[n.length++]=e&u;for(s=10;s<r.length;s++){var f=r.words[s]|0;r.words[s-10]=(f&u)<<4|e>>>22,e=f}if(e>>>=22,r.words[s-10]=e,e===0&&r.length>10)r.length-=10;else r.length-=9},st.prototype.imulK=function(r){r.words[r.length]=0,r.words[r.length+1]=0,r.length+=2;var n=0;for(var u=0;u<r.length;u++){var d=r.words[u]|0;n+=d*977,r.words[u]=n&67108863,n=d*64+(n/67108864|0)}if(r.words[r.length-1]===0){if(r.length--,r.words[r.length-1]===0)r.length--}return r};function j(){ft.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}M(j,ft);function rt(){ft.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}M(rt,ft);function t(){ft.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}M(t,ft),t.prototype.imulK=function(r){var n=0;for(var u=0;u<r.length;u++){var d=(r.words[u]|0)*19+n,s=d&67108863;d>>>=26,r.words[u]=s,n=d}if(n!==0)r.words[r.length++]=n;return r},a._prime=function(r){if(at[r])return at[r];var n;if(r==="k256")n=new st;else if(r==="p224")n=new j;else if(r==="p192")n=new rt;else if(r==="p25519")n=new t;else throw Error("Unknown prime "+r);return at[r]=n,n};function i(r){if(typeof r==="string"){var n=a._prime(r);this.m=n.p,this.prime=n}else p(r.gtn(1),"modulus must be greater than 1"),this.m=r,this.prime=null}i.prototype._verify1=function(r){p(r.negative===0,"red works only with positives"),p(r.red,"red works only with red numbers")},i.prototype._verify2=function(r,n){p((r.negative|n.negative)===0,"red works only with positives"),p(r.red&&r.red===n.red,"red works only with red numbers")},i.prototype.imod=function(r){if(this.prime)return this.prime.ireduce(r)._forceRed(this);return y(r,r.umod(this.m)._forceRed(this)),r},i.prototype.neg=function(r){if(r.isZero())return r.clone();return this.m.sub(r)._forceRed(this)},i.prototype.add=function(r,n){this._verify2(r,n);var u=r.add(n);if(u.cmp(this.m)>=0)u.isub(this.m);return u._forceRed(this)},i.prototype.iadd=function(r,n){this._verify2(r,n);var u=r.iadd(n);if(u.cmp(this.m)>=0)u.isub(this.m);return u},i.prototype.sub=function(r,n){this._verify2(r,n);var u=r.sub(n);if(u.cmpn(0)<0)u.iadd(this.m);return u._forceRed(this)},i.prototype.isub=function(r,n){this._verify2(r,n);var u=r.isub(n);if(u.cmpn(0)<0)u.iadd(this.m);return u},i.prototype.shl=function(r,n){return this._verify1(r),this.imod(r.ushln(n))},i.prototype.imul=function(r,n){return this._verify2(r,n),this.imod(r.imul(n))},i.prototype.mul=function(r,n){return this._verify2(r,n),this.imod(r.mul(n))},i.prototype.isqr=function(r){return this.imul(r,r.clone())},i.prototype.sqr=function(r){return this.mul(r,r)},i.prototype.sqrt=function(r){if(r.isZero())return r.clone();var n=this.m.andln(3);if(p(n%2===1),n===3){var u=this.m.add(new a(1)).iushrn(2);return this.pow(r,u)}var d=this.m.subn(1),s=0;while(!d.isZero()&&d.andln(1)===0)s++,d.iushrn(1);p(!d.isZero());var e=new a(1).toRed(this),f=e.redNeg(),_=this.m.subn(1).iushrn(1),m=this.m.bitLength();m=new a(2*m*m).toRed(this);while(this.pow(m,_).cmp(f)!==0)m.redIAdd(f);var I=this.pow(m,d),N=this.pow(r,d.addn(1).iushrn(1)),U=this.pow(r,d),Z=s;while(U.cmp(e)!==0){var ut=U;for(var Y=0;ut.cmp(e)!==0;Y++)ut=ut.redSqr();p(Y<Z);var H=this.pow(I,new a(1).iushln(Z-Y-1));N=N.redMul(H),I=H.redSqr(),U=U.redMul(I),Z=Y}return N},i.prototype.invm=function(r){var n=r._invmp(this.m);if(n.negative!==0)return n.negative=0,this.imod(n).redNeg();else return this.imod(n)},i.prototype.pow=function(r,n){if(n.isZero())return new a(1).toRed(this);if(n.cmpn(1)===0)return r.clone();var u=4,d=Array(1<<u);d[0]=new a(1).toRed(this),d[1]=r;for(var s=2;s<d.length;s++)d[s]=this.mul(d[s-1],r);var e=d[0],f=0,_=0,m=n.bitLength()%26;if(m===0)m=26;for(s=n.length-1;s>=0;s--){var I=n.words[s];for(var N=m-1;N>=0;N--){var U=I>>N&1;if(e!==d[0])e=this.sqr(e);if(U===0&&f===0){_=0;continue}if(f<<=1,f|=U,_++,_!==u&&(s!==0||N!==0))continue;e=this.mul(e,d[f]),_=0,f=0}m=26}return e},i.prototype.convertTo=function(r){var n=r.umod(this.m);return n===r?n.clone():n},i.prototype.convertFrom=function(r){var n=r.clone();return n.red=null,n},a.mont=function(r){return new o(r)};function o(r){if(i.call(this,r),this.shift=this.m.bitLength(),this.shift%26!==0)this.shift+=26-this.shift%26;this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}M(o,i),o.prototype.convertTo=function(r){return this.imod(r.ushln(this.shift))},o.prototype.convertFrom=function(r){var n=this.imod(r.mul(this.rinv));return n.red=null,n},o.prototype.imul=function(r,n){if(r.isZero()||n.isZero())return r.words[0]=0,r.length=1,r;var u=r.imul(n),d=u.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=u.isub(d).iushrn(this.shift),e=s;if(s.cmp(this.m)>=0)e=s.isub(this.m);else if(s.cmpn(0)<0)e=s.iadd(this.m);return e._forceRed(this)},o.prototype.mul=function(r,n){if(r.isZero()||n.isZero())return new a(0)._forceRed(this);var u=r.mul(n),d=u.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=u.isub(d).iushrn(this.shift),e=s;if(s.cmp(this.m)>=0)e=s.isub(this.m);else if(s.cmpn(0)<0)e=s.iadd(this.m);return e._forceRed(this)},o.prototype.invm=function(r){var n=this.imod(r._invmp(this.m).mul(this.r2));return n._forceRed(this)}})(typeof l>"u"||l,h)}),$n=ht((h,l)=>{var c=Qs(),b=Ar(),p=Me().Buffer;function M(R){var w=R.modulus.byteLength(),g;do g=new c(b(w));while(g.cmp(R.modulus)>=0||!g.umod(R.prime1)||!g.umod(R.prime2));return g}function a(R){var w=M(R),g=w.toRed(c.mont(R.modulus)).redPow(new c(R.publicExponent)).fromRed();return{blinder:g,unblinder:w.invm(R.modulus)}}function E(R,w){var g=a(w),y=w.modulus.byteLength(),v=new c(R).mul(g.blinder).umod(w.modulus),S=v.toRed(c.mont(w.prime1)),A=v.toRed(c.mont(w.prime2)),x=w.coefficient,B=w.prime1,T=w.prime2,k=S.redPow(w.exponent1).fromRed(),P=A.redPow(w.exponent2).fromRed(),D=k.isub(P).imul(x).umod(B).imul(T);return P.iadd(D).imul(g.unblinder).umod(w.modulus).toArrayLike(p,"be",y)}E.getr=M,l.exports=E}),th=ht((h,l)=>{var c=jn(),b=Ar(),p=Er(),M=zn(),a=Hn(),E=di(),R=Wn(),w=$n(),g=Me().Buffer;l.exports=function(A,x,B){var T;if(A.padding)T=A.padding;else if(B)T=1;else T=4;var k=c(A),P;if(T===4)P=y(k,x);else if(T===1)P=v(k,x,B);else if(T===3){if(P=new E(x),P.cmp(k.modulus)>=0)throw Error("data too long for modulus")}else throw Error("unknown padding");if(B)return w(P,k);else return R(P,k)};function y(A,x){var B=A.modulus.byteLength(),T=x.length,k=p("sha1").update(g.alloc(0)).digest(),P=k.length,D=2*P;if(T>B-D-2)throw Error("message too long");var O=g.alloc(B-T-D-2),W=B-P-1,at=b(P),ft=a(g.concat([k,O,g.alloc(1,1),x],W),M(at,W)),st=a(at,M(ft,P));return new E(g.concat([g.alloc(1),st,ft],B))}function v(A,x,B){var T=x.length,k=A.modulus.byteLength();if(T>k-11)throw Error("message too long");var P;if(B)P=g.alloc(k-T-3,255);else P=S(k-T-3);return new E(g.concat([g.from([0,B?1:2]),P,g.alloc(1),x],k))}function S(A){var x=g.allocUnsafe(A),B=0,T=b(A*2),k=0,P;while(B<A){if(k===T.length)T=b(A*2),k=0;if(P=T[k++],P)x[B++]=P}return x}}),eh=ht((h,l)=>{var c=jn(),b=zn(),p=Hn(),M=di(),a=$n(),E=Er(),R=Wn(),w=Me().Buffer;l.exports=function(S,A,x){var B;if(S.padding)B=S.padding;else if(x)B=1;else B=4;var T=c(S),k=T.modulus.byteLength();if(A.length>k||new M(A).cmp(T.modulus)>=0)throw Error("decryption error");var P;if(x)P=R(new M(A),T);else P=a(A,T);var D=w.alloc(k-P.length);if(P=w.concat([D,P],k),B===4)return g(T,P);else if(B===1)return y(T,P,x);else if(B===3)return P;else throw Error("unknown padding")};function g(S,A){var x=S.modulus.byteLength(),B=E("sha1").update(w.alloc(0)).digest(),T=B.length;if(A[0]!==0)throw Error("decryption error");var k=A.slice(1,T+1),P=A.slice(T+1),D=p(k,b(P,T)),O=p(P,b(D,x-T-1));if(v(B,O.slice(0,T)))throw Error("decryption error");var W=T;while(O[W]===0)W++;if(O[W++]!==1)throw Error("decryption error");return O.slice(W)}function y(S,A,x){var B=A.slice(0,2),T=2,k=0;while(A[T++]!==0)if(T>=A.length){k++;break}var P=A.slice(2,T-1);if(B.toString("hex")!=="0002"&&!x||B.toString("hex")!=="0001"&&x)k++;if(P.length<8)k++;if(k)throw Error("decryption error");return A.slice(T)}function v(S,A){S=w.from(S),A=w.from(A);var x=0,B=S.length;if(S.length!==A.length)x++,B=Math.min(S.length,A.length);var T=-1;while(++T<B)x+=S[T]^A[T];return x}}),ii=ht((h)=>{h.publicEncrypt=th(),h.privateDecrypt=eh(),h.privateEncrypt=function(l,c){return h.publicEncrypt(l,c,!0)},h.publicDecrypt=function(l,c){return h.privateDecrypt(l,c,!0)}}),rh=ht((h)=>{var l=(Ae(),jt(Re));if(typeof l.publicEncrypt!=="function")l=ii();if(h.publicEncrypt=l.publicEncrypt,h.privateDecrypt=l.privateDecrypt,typeof l.privateEncrypt!=="function")h.privateEncrypt=ii().privateEncrypt;else h.privateEncrypt=l.privateEncrypt;if(typeof l.publicDecrypt!=="function")h.publicDecrypt=ii().publicDecrypt;else h.publicDecrypt=l.publicDecrypt}),ih=ht((h)=>{var l=Me(),c=Ar(),b=l.Buffer,p=l.kMaxLength,M=globalThis.crypto||globalThis.msCrypto,a=Math.pow(2,32)-1;function E(v,S){if(typeof v!=="number"||v!==v)throw TypeError("offset must be a number");if(v>a||v<0)throw TypeError("offset must be a uint32");if(v>p||v>S)throw RangeError("offset out of range")}function R(v,S,A){if(typeof v!=="number"||v!==v)throw TypeError("size must be a number");if(v>a||v<0)throw TypeError("size must be a uint32");if(v+S>A||v>p)throw RangeError("buffer too small")}M&&M.getRandomValues,h.randomFill=w,h.randomFillSync=y;function w(v,S,A,x){if(!b.isBuffer(v)&&!(v instanceof globalThis.Uint8Array))throw TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof S==="function")x=S,S=0,A=v.length;else if(typeof A==="function")x=A,A=v.length-S;else if(typeof x!=="function")throw TypeError('"cb" argument must be a function');return E(S,v.length),R(A,S,v.length),g(v,S,A,x)}function g(v,S,A,x){if(!1)var B,T;if(x){c(A,function(P,D){if(P)return x(P);D.copy(v,S),x(null,v)});return}var k=c(A);return k.copy(v,S),v}function y(v,S,A){if(typeof S>"u")S=0;if(!b.isBuffer(v)&&!(v instanceof globalThis.Uint8Array))throw TypeError('"buf" argument must be a Buffer or Uint8Array');if(E(S,v.length),A===void 0)A=v.length-S;return R(A,S,v.length),g(v,S,A)}}),nh=ht((h,l)=>{var c=(Ae(),jt(Re));if(typeof c.randomFill==="function"&&typeof c.randomFillSync==="function")h.randomFill=c.randomFill,h.randomFillSync=c.randomFillSync;else l.exports=ih()}),oh=ht((h)=>{h.randomBytes=h.rng=h.pseudoRandomBytes=h.prng=Ar(),h.createHash=h.Hash=Er(),h.createHmac=h.Hmac=gn();var l=xa(),c=Object.keys(l),b=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(c);h.getHashes=function(){return b};var p=kn();h.pbkdf2=p.pbkdf2,h.pbkdf2Sync=p.pbkdf2Sync;var M=us();h.Cipher=M.Cipher,h.createCipher=M.createCipher,h.Cipheriv=M.Cipheriv,h.createCipheriv=M.createCipheriv,h.Decipher=M.Decipher,h.createDecipher=M.createDecipher,h.Decipheriv=M.Decipheriv,h.createDecipheriv=M.createDecipheriv,h.getCiphers=M.getCiphers,h.listCiphers=M.listCiphers;var a=ds();h.DiffieHellmanGroup=a.DiffieHellmanGroup,h.createDiffieHellmanGroup=a.createDiffieHellmanGroup,h.getDiffieHellman=a.getDiffieHellman,h.createDiffieHellman=a.createDiffieHellman,h.DiffieHellman=a.DiffieHellman;var E=cs();h.createSign=E.createSign,h.Sign=E.Sign,h.createVerify=E.createVerify,h.Verify=E.Verify,h.createECDH=Os();var R=rh();h.publicEncrypt=R.publicEncrypt,h.privateEncrypt=R.privateEncrypt,h.publicDecrypt=R.publicDecrypt,h.privateDecrypt=R.privateDecrypt;var w=nh();h.randomFill=w.randomFill,h.randomFillSync=w.randomFillSync,h.createCredentials=function(){throw Error(`sorry, createCredentials is not implemented yet
|
|
15
|
+
we accept pull requests
|
|
16
|
+
https://github.com/browserify/crypto-browserify`)},h.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}}),Ft=Ia(oh(),1),ah=Ft.prng,sh=Ft.pseudoRandomBytes,hh=Ft.rng,fh=Ft.randomBytes,lh=Ft.Hash,uh=Ft.createHash,dh=Ft.Hmac,ch=Ft.createHmac,ph=Ft.getHashes,yh=Ft.pbkdf2,bh=Ft.pbkdf2Sync,mh=Ft.Cipher,vh=Ft.createCipher,gh=Ft.Cipheriv,wh=Ft.createCipheriv,Mh=Ft.Decipher,_h=Ft.createDecipher,Sh=Ft.Decipheriv,Ah=Ft.createDecipheriv,Eh=Ft.getCiphers,Rh=Ft.listCiphers,Bh=Ft.DiffieHellmanGroup,Ih=Ft.createDiffieHellmanGroup,xh=Ft.getDiffieHellman,kh=Ft.createDiffieHellman,Th=Ft.DiffieHellman,Ph=Ft.createSign,qh=Ft.Sign,Nh=Ft.createVerify,Dh=Ft.Verify,Oh=Ft.createECDH,Lh=Ft.publicEncrypt,Ch=Ft.privateEncrypt,Uh=Ft.publicDecrypt,Fh=Ft.privateDecrypt,jh=Ft.randomFill,zh=Ft.randomFillSync,Hh=Ft.createCredentials,Wh=Ft.constants,Gh=["p192","p224","p256","p384","p521","curve25519","ed25519","secp256k1","secp224r1","prime256v1","prime192v1","ed25519","secp384r1","secp521r1"];Jh=crypto,ci=crypto});Ae();class Kn{baseCrypt=(h,l)=>{let c=Buffer.from(h,"ascii"),b=Buffer.from(l,"ascii"),p=Buffer.alloc(c.length);for(let M=0;M<c.length;M++)p[M]=c[M]^b[M%b.length];return p};encrypt=(h,l,c="base64")=>this.baseCrypt(h,l).toString(c);decrypt=(h,l,c="base64")=>{let b=Buffer.from(h,c);return this.baseCrypt(b,l).toString("ascii")};hexToAscii=(h)=>Buffer.from(h,"hex").toString("ascii");asciiToHex=(h)=>Buffer.from(h,"ascii").toString("hex");md5=(h,l)=>{if(!l)l="hex";return ci.createHash("md5").update(h).digest(l)}}var i0=Kn;export{i0 as default};
|