@ohos-ports/parcel-resolver 0.0.0-stage → 0.14.2-beta.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 +21 -0
- package/dist/index.js +1 -0
- package/dist/polyfills/assert.js +11 -0
- package/dist/polyfills/buffer.js +14 -0
- package/dist/polyfills/console.js +11 -0
- package/dist/polyfills/constants.js +1 -0
- package/dist/polyfills/crc-32/crc32c.js +6 -0
- package/dist/polyfills/crc-32.js +6 -0
- package/dist/polyfills/crypto.js +17 -0
- package/dist/polyfills/domain.js +1 -0
- package/dist/polyfills/events.js +1 -0
- package/dist/polyfills/http.js +20 -0
- package/dist/polyfills/https.js +20 -0
- package/dist/polyfills/os.js +1 -0
- package/dist/polyfills/path.js +1 -0
- package/dist/polyfills/process.js +1 -0
- package/dist/polyfills/punycode.js +1 -0
- package/dist/polyfills/querystring.js +1 -0
- package/dist/polyfills/react-refresh/runtime.js +14 -0
- package/dist/polyfills/react-refresh.js +14 -0
- package/dist/polyfills/stream.js +17 -0
- package/dist/polyfills/string_decoder.js +17 -0
- package/dist/polyfills/sys.js +1 -0
- package/dist/polyfills/timers.js +1 -0
- package/dist/polyfills/tty.js +1 -0
- package/dist/polyfills/url.js +6 -0
- package/dist/polyfills/util.js +1 -0
- package/dist/polyfills/vm.js +1 -0
- package/dist/polyfills/zlib.js +25 -0
- package/package.json +28 -4
- package/README.md +0 -3
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var U3=Object.create;var ja=Object.defineProperty;var z3=Object.getOwnPropertyDescriptor;var K3=Object.getOwnPropertyNames;var H3=Object.getPrototypeOf,W3=Object.prototype.hasOwnProperty;var q=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),V3=(t,e)=>{for(var r in e)ja(t,r,{get:e[r],enumerable:!0})},Oa=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of K3(e))!W3.call(t,n)&&n!==r&&ja(t,n,{get:()=>e[n],enumerable:!(i=z3(e,n))||i.enumerable});return t},Of=(t,e,r)=>(Oa(t,e,"default"),r&&Oa(r,e,"default")),yu=(t,e,r)=>(r=t!=null?U3(H3(t)):{},Oa(e||!t||!t.__esModule?ja(r,"default",{value:t,enumerable:!0}):r,t)),G3=t=>Oa(ja({},"__esModule",{value:!0}),t);var _u=q(Fa=>{"use strict";Fa.byteLength=J3;Fa.toByteArray=Z3;Fa.fromByteArray=e4;var gr=[],kt=[],X3=typeof Uint8Array<"u"?Uint8Array:Array,Xo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(Ci=0,gu=Xo.length;Ci<gu;++Ci)gr[Ci]=Xo[Ci],kt[Xo.charCodeAt(Ci)]=Ci;var Ci,gu;kt[45]=62;kt[95]=63;function mu(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var i=r===e?0:4-r%4;return[r,i]}function J3(t){var e=mu(t),r=e[0],i=e[1];return(r+i)*3/4-i}function Y3(t,e,r){return(e+r)*3/4-r}function Z3(t){var e,r=mu(t),i=r[0],n=r[1],f=new X3(Y3(t,i,n)),a=0,o=n>0?i-4:i,u;for(u=0;u<o;u+=4)e=kt[t.charCodeAt(u)]<<18|kt[t.charCodeAt(u+1)]<<12|kt[t.charCodeAt(u+2)]<<6|kt[t.charCodeAt(u+3)],f[a++]=e>>16&255,f[a++]=e>>8&255,f[a++]=e&255;return n===2&&(e=kt[t.charCodeAt(u)]<<2|kt[t.charCodeAt(u+1)]>>4,f[a++]=e&255),n===1&&(e=kt[t.charCodeAt(u)]<<10|kt[t.charCodeAt(u+1)]<<4|kt[t.charCodeAt(u+2)]>>2,f[a++]=e>>8&255,f[a++]=e&255),f}function $3(t){return gr[t>>18&63]+gr[t>>12&63]+gr[t>>6&63]+gr[t&63]}function Q3(t,e,r){for(var i,n=[],f=e;f<r;f+=3)i=(t[f]<<16&16711680)+(t[f+1]<<8&65280)+(t[f+2]&255),n.push($3(i));return n.join("")}function e4(t){for(var e,r=t.length,i=r%3,n=[],f=16383,a=0,o=r-i;a<o;a+=f)n.push(Q3(t,a,a+f>o?o:a+f));return i===1?(e=t[r-1],n.push(gr[e>>2]+gr[e<<4&63]+"==")):i===2&&(e=(t[r-2]<<8)+t[r-1],n.push(gr[e>>10]+gr[e>>4&63]+gr[e<<2&63]+"=")),n.join("")}});var wu=q(Jo=>{Jo.read=function(t,e,r,i,n){var f,a,o=n*8-i-1,u=(1<<o)-1,g=u>>1,_=-7,x=r?n-1:0,E=r?-1:1,B=t[e+x];for(x+=E,f=B&(1<<-_)-1,B>>=-_,_+=o;_>0;f=f*256+t[e+x],x+=E,_-=8);for(a=f&(1<<-_)-1,f>>=-_,_+=i;_>0;a=a*256+t[e+x],x+=E,_-=8);if(f===0)f=1-g;else{if(f===u)return a?NaN:(B?-1:1)*(1/0);a=a+Math.pow(2,i),f=f-g}return(B?-1:1)*a*Math.pow(2,f-i)};Jo.write=function(t,e,r,i,n,f){var a,o,u,g=f*8-n-1,_=(1<<g)-1,x=_>>1,E=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,B=i?0:f-1,I=i?1:-1,R=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(o=isNaN(e)?1:0,a=_):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),a+x>=1?e+=E/u:e+=E*Math.pow(2,1-x),e*u>=2&&(a++,u/=2),a+x>=_?(o=0,a=_):a+x>=1?(o=(e*u-1)*Math.pow(2,n),a=a+x):(o=e*Math.pow(2,x-1)*Math.pow(2,n),a=0));n>=8;t[r+B]=o&255,B+=I,o/=256,n-=8);for(a=a<<n|o,g+=n;g>0;t[r+B]=a&255,B+=I,a/=256,g-=8);t[r+B-I]|=R*128}});var Pt=q(wn=>{"use strict";var Yo=_u(),mn=wu(),xu=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;wn.Buffer=k;wn.SlowBuffer=a4;wn.INSPECT_MAX_BYTES=50;var Ua=2147483647;wn.kMaxLength=Ua;k.TYPED_ARRAY_SUPPORT=t4();!k.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function t4(){try{let t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),t.foo()===42}catch(t){return!1}}Object.defineProperty(k.prototype,"parent",{enumerable:!0,get:function(){if(k.isBuffer(this))return this.buffer}});Object.defineProperty(k.prototype,"offset",{enumerable:!0,get:function(){if(k.isBuffer(this))return this.byteOffset}});function Tr(t){if(t>Ua)throw new RangeError('The value "'+t+'" is invalid for option "size"');let e=new Uint8Array(t);return Object.setPrototypeOf(e,k.prototype),e}function k(t,e,r){if(typeof t=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return e0(t)}return Au(t,e,r)}k.poolSize=8192;function Au(t,e,r){if(typeof t=="string")return i4(t,e);if(ArrayBuffer.isView(t))return n4(t);if(t==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(mr(t,ArrayBuffer)||t&&mr(t.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(mr(t,SharedArrayBuffer)||t&&mr(t.buffer,SharedArrayBuffer)))return $o(t,e,r);if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let i=t.valueOf&&t.valueOf();if(i!=null&&i!==t)return k.from(i,e,r);let n=f4(t);if(n)return n;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof t[Symbol.toPrimitive]=="function")return k.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}k.from=function(t,e,r){return Au(t,e,r)};Object.setPrototypeOf(k.prototype,Uint8Array.prototype);Object.setPrototypeOf(k,Uint8Array);function Bu(t){if(typeof t!="number")throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function r4(t,e,r){return Bu(t),t<=0?Tr(t):e!==void 0?typeof r=="string"?Tr(t).fill(e,r):Tr(t).fill(e):Tr(t)}k.alloc=function(t,e,r){return r4(t,e,r)};function e0(t){return Bu(t),Tr(t<0?0:t0(t)|0)}k.allocUnsafe=function(t){return e0(t)};k.allocUnsafeSlow=function(t){return e0(t)};function i4(t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!k.isEncoding(e))throw new TypeError("Unknown encoding: "+e);let r=qu(t,e)|0,i=Tr(r),n=i.write(t,e);return n!==r&&(i=i.slice(0,n)),i}function Zo(t){let e=t.length<0?0:t0(t.length)|0,r=Tr(e);for(let i=0;i<e;i+=1)r[i]=t[i]&255;return r}function n4(t){if(mr(t,Uint8Array)){let e=new Uint8Array(t);return $o(e.buffer,e.byteOffset,e.byteLength)}return Zo(t)}function $o(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');let i;return e===void 0&&r===void 0?i=new Uint8Array(t):r===void 0?i=new Uint8Array(t,e):i=new Uint8Array(t,e,r),Object.setPrototypeOf(i,k.prototype),i}function f4(t){if(k.isBuffer(t)){let e=t0(t.length)|0,r=Tr(e);return r.length===0||t.copy(r,0,0,e),r}if(t.length!==void 0)return typeof t.length!="number"||i0(t.length)?Tr(0):Zo(t);if(t.type==="Buffer"&&Array.isArray(t.data))return Zo(t.data)}function t0(t){if(t>=Ua)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Ua.toString(16)+" bytes");return t|0}function a4(t){return+t!=t&&(t=0),k.alloc(+t)}k.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==k.prototype};k.compare=function(e,r){if(mr(e,Uint8Array)&&(e=k.from(e,e.offset,e.byteLength)),mr(r,Uint8Array)&&(r=k.from(r,r.offset,r.byteLength)),!k.isBuffer(e)||!k.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===r)return 0;let i=e.length,n=r.length;for(let f=0,a=Math.min(i,n);f<a;++f)if(e[f]!==r[f]){i=e[f],n=r[f];break}return i<n?-1:n<i?1:0};k.isEncoding=function(e){switch(String(e).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}};k.concat=function(e,r){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return k.alloc(0);let i;if(r===void 0)for(r=0,i=0;i<e.length;++i)r+=e[i].length;let n=k.allocUnsafe(r),f=0;for(i=0;i<e.length;++i){let a=e[i];if(mr(a,Uint8Array))f+a.length>n.length?(k.isBuffer(a)||(a=k.from(a)),a.copy(n,f)):Uint8Array.prototype.set.call(n,a,f);else if(k.isBuffer(a))a.copy(n,f);else throw new TypeError('"list" argument must be an Array of Buffers');f+=a.length}return n};function qu(t,e){if(k.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||mr(t,ArrayBuffer))return t.byteLength;if(typeof t!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);let r=t.length,i=arguments.length>2&&arguments[2]===!0;if(!i&&r===0)return 0;let n=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return Qo(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return Lu(t).length;default:if(n)return i?-1:Qo(t).length;e=(""+e).toLowerCase(),n=!0}}k.byteLength=qu;function s4(t,e,r){let i=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,e>>>=0,r<=e))return"";for(t||(t="utf8");;)switch(t){case"hex":return y4(this,e,r);case"utf8":case"utf-8":return Ru(this,e,r);case"ascii":return p4(this,e,r);case"latin1":case"binary":return v4(this,e,r);case"base64":return l4(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return g4(this,e,r);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}k.prototype._isBuffer=!0;function Ti(t,e,r){let i=t[e];t[e]=t[r],t[r]=i}k.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let r=0;r<e;r+=2)Ti(this,r,r+1);return this};k.prototype.swap32=function(){let e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let r=0;r<e;r+=4)Ti(this,r,r+3),Ti(this,r+1,r+2);return this};k.prototype.swap64=function(){let e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let r=0;r<e;r+=8)Ti(this,r,r+7),Ti(this,r+1,r+6),Ti(this,r+2,r+5),Ti(this,r+3,r+4);return this};k.prototype.toString=function(){let e=this.length;return e===0?"":arguments.length===0?Ru(this,0,e):s4.apply(this,arguments)};k.prototype.toLocaleString=k.prototype.toString;k.prototype.equals=function(e){if(!k.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:k.compare(this,e)===0};k.prototype.inspect=function(){let e="",r=wn.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"};xu&&(k.prototype[xu]=k.prototype.inspect);k.prototype.compare=function(e,r,i,n,f){if(mr(e,Uint8Array)&&(e=k.from(e,e.offset,e.byteLength)),!k.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(r===void 0&&(r=0),i===void 0&&(i=e?e.length:0),n===void 0&&(n=0),f===void 0&&(f=this.length),r<0||i>e.length||n<0||f>this.length)throw new RangeError("out of range index");if(n>=f&&r>=i)return 0;if(n>=f)return-1;if(r>=i)return 1;if(r>>>=0,i>>>=0,n>>>=0,f>>>=0,this===e)return 0;let a=f-n,o=i-r,u=Math.min(a,o),g=this.slice(n,f),_=e.slice(r,i);for(let x=0;x<u;++x)if(g[x]!==_[x]){a=g[x],o=_[x];break}return a<o?-1:o<a?1:0};function Iu(t,e,r,i,n){if(t.length===0)return-1;if(typeof r=="string"?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,i0(r)&&(r=n?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(n)return-1;r=t.length-1}else if(r<0)if(n)r=0;else return-1;if(typeof e=="string"&&(e=k.from(e,i)),k.isBuffer(e))return e.length===0?-1:Su(t,e,r,i,n);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?n?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):Su(t,[e],r,i,n);throw new TypeError("val must be string, number or Buffer")}function Su(t,e,r,i,n){let f=1,a=t.length,o=e.length;if(i!==void 0&&(i=String(i).toLowerCase(),i==="ucs2"||i==="ucs-2"||i==="utf16le"||i==="utf-16le")){if(t.length<2||e.length<2)return-1;f=2,a/=2,o/=2,r/=2}function u(_,x){return f===1?_[x]:_.readUInt16BE(x*f)}let g;if(n){let _=-1;for(g=r;g<a;g++)if(u(t,g)===u(e,_===-1?0:g-_)){if(_===-1&&(_=g),g-_+1===o)return _*f}else _!==-1&&(g-=g-_),_=-1}else for(r+o>a&&(r=a-o),g=r;g>=0;g--){let _=!0;for(let x=0;x<o;x++)if(u(t,g+x)!==u(e,x)){_=!1;break}if(_)return g}return-1}k.prototype.includes=function(e,r,i){return this.indexOf(e,r,i)!==-1};k.prototype.indexOf=function(e,r,i){return Iu(this,e,r,i,!0)};k.prototype.lastIndexOf=function(e,r,i){return Iu(this,e,r,i,!1)};function o4(t,e,r,i){r=Number(r)||0;let n=t.length-r;i?(i=Number(i),i>n&&(i=n)):i=n;let f=e.length;i>f/2&&(i=f/2);let a;for(a=0;a<i;++a){let o=parseInt(e.substr(a*2,2),16);if(i0(o))return a;t[r+a]=o}return a}function d4(t,e,r,i){return za(Qo(e,t.length-r),t,r,i)}function c4(t,e,r,i){return za(x4(e),t,r,i)}function u4(t,e,r,i){return za(Lu(e),t,r,i)}function h4(t,e,r,i){return za(S4(e,t.length-r),t,r,i)}k.prototype.write=function(e,r,i,n){if(r===void 0)n="utf8",i=this.length,r=0;else if(i===void 0&&typeof r=="string")n=r,i=this.length,r=0;else if(isFinite(r))r=r>>>0,isFinite(i)?(i=i>>>0,n===void 0&&(n="utf8")):(n=i,i=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let f=this.length-r;if((i===void 0||i>f)&&(i=f),e.length>0&&(i<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let a=!1;for(;;)switch(n){case"hex":return o4(this,e,r,i);case"utf8":case"utf-8":return d4(this,e,r,i);case"ascii":case"latin1":case"binary":return c4(this,e,r,i);case"base64":return u4(this,e,r,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return h4(this,e,r,i);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}};k.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function l4(t,e,r){return e===0&&r===t.length?Yo.fromByteArray(t):Yo.fromByteArray(t.slice(e,r))}function Ru(t,e,r){r=Math.min(t.length,r);let i=[],n=e;for(;n<r;){let f=t[n],a=null,o=f>239?4:f>223?3:f>191?2:1;if(n+o<=r){let u,g,_,x;switch(o){case 1:f<128&&(a=f);break;case 2:u=t[n+1],(u&192)===128&&(x=(f&31)<<6|u&63,x>127&&(a=x));break;case 3:u=t[n+1],g=t[n+2],(u&192)===128&&(g&192)===128&&(x=(f&15)<<12|(u&63)<<6|g&63,x>2047&&(x<55296||x>57343)&&(a=x));break;case 4:u=t[n+1],g=t[n+2],_=t[n+3],(u&192)===128&&(g&192)===128&&(_&192)===128&&(x=(f&15)<<18|(u&63)<<12|(g&63)<<6|_&63,x>65535&&x<1114112&&(a=x))}}a===null?(a=65533,o=1):a>65535&&(a-=65536,i.push(a>>>10&1023|55296),a=56320|a&1023),i.push(a),n+=o}return b4(i)}var Mu=4096;function b4(t){let e=t.length;if(e<=Mu)return String.fromCharCode.apply(String,t);let r="",i=0;for(;i<e;)r+=String.fromCharCode.apply(String,t.slice(i,i+=Mu));return r}function p4(t,e,r){let i="";r=Math.min(t.length,r);for(let n=e;n<r;++n)i+=String.fromCharCode(t[n]&127);return i}function v4(t,e,r){let i="";r=Math.min(t.length,r);for(let n=e;n<r;++n)i+=String.fromCharCode(t[n]);return i}function y4(t,e,r){let i=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>i)&&(r=i);let n="";for(let f=e;f<r;++f)n+=M4[t[f]];return n}function g4(t,e,r){let i=t.slice(e,r),n="";for(let f=0;f<i.length-1;f+=2)n+=String.fromCharCode(i[f]+i[f+1]*256);return n}k.prototype.slice=function(e,r){let i=this.length;e=~~e,r=r===void 0?i:~~r,e<0?(e+=i,e<0&&(e=0)):e>i&&(e=i),r<0?(r+=i,r<0&&(r=0)):r>i&&(r=i),r<e&&(r=e);let n=this.subarray(e,r);return Object.setPrototypeOf(n,k.prototype),n};function Ye(t,e,r){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}k.prototype.readUintLE=k.prototype.readUIntLE=function(e,r,i){e=e>>>0,r=r>>>0,i||Ye(e,r,this.length);let n=this[e],f=1,a=0;for(;++a<r&&(f*=256);)n+=this[e+a]*f;return n};k.prototype.readUintBE=k.prototype.readUIntBE=function(e,r,i){e=e>>>0,r=r>>>0,i||Ye(e,r,this.length);let n=this[e+--r],f=1;for(;r>0&&(f*=256);)n+=this[e+--r]*f;return n};k.prototype.readUint8=k.prototype.readUInt8=function(e,r){return e=e>>>0,r||Ye(e,1,this.length),this[e]};k.prototype.readUint16LE=k.prototype.readUInt16LE=function(e,r){return e=e>>>0,r||Ye(e,2,this.length),this[e]|this[e+1]<<8};k.prototype.readUint16BE=k.prototype.readUInt16BE=function(e,r){return e=e>>>0,r||Ye(e,2,this.length),this[e]<<8|this[e+1]};k.prototype.readUint32LE=k.prototype.readUInt32LE=function(e,r){return e=e>>>0,r||Ye(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};k.prototype.readUint32BE=k.prototype.readUInt32BE=function(e,r){return e=e>>>0,r||Ye(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};k.prototype.readBigUInt64LE=Qr(function(e){e=e>>>0,_n(e,"offset");let r=this[e],i=this[e+7];(r===void 0||i===void 0)&&jf(e,this.length-8);let n=r+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,f=this[++e]+this[++e]*2**8+this[++e]*2**16+i*2**24;return BigInt(n)+(BigInt(f)<<BigInt(32))});k.prototype.readBigUInt64BE=Qr(function(e){e=e>>>0,_n(e,"offset");let r=this[e],i=this[e+7];(r===void 0||i===void 0)&&jf(e,this.length-8);let n=r*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],f=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+i;return(BigInt(n)<<BigInt(32))+BigInt(f)});k.prototype.readIntLE=function(e,r,i){e=e>>>0,r=r>>>0,i||Ye(e,r,this.length);let n=this[e],f=1,a=0;for(;++a<r&&(f*=256);)n+=this[e+a]*f;return f*=128,n>=f&&(n-=Math.pow(2,8*r)),n};k.prototype.readIntBE=function(e,r,i){e=e>>>0,r=r>>>0,i||Ye(e,r,this.length);let n=r,f=1,a=this[e+--n];for(;n>0&&(f*=256);)a+=this[e+--n]*f;return f*=128,a>=f&&(a-=Math.pow(2,8*r)),a};k.prototype.readInt8=function(e,r){return e=e>>>0,r||Ye(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};k.prototype.readInt16LE=function(e,r){e=e>>>0,r||Ye(e,2,this.length);let i=this[e]|this[e+1]<<8;return i&32768?i|4294901760:i};k.prototype.readInt16BE=function(e,r){e=e>>>0,r||Ye(e,2,this.length);let i=this[e+1]|this[e]<<8;return i&32768?i|4294901760:i};k.prototype.readInt32LE=function(e,r){return e=e>>>0,r||Ye(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};k.prototype.readInt32BE=function(e,r){return e=e>>>0,r||Ye(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};k.prototype.readBigInt64LE=Qr(function(e){e=e>>>0,_n(e,"offset");let r=this[e],i=this[e+7];(r===void 0||i===void 0)&&jf(e,this.length-8);let n=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(i<<24);return(BigInt(n)<<BigInt(32))+BigInt(r+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24)});k.prototype.readBigInt64BE=Qr(function(e){e=e>>>0,_n(e,"offset");let r=this[e],i=this[e+7];(r===void 0||i===void 0)&&jf(e,this.length-8);let n=(r<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+i)});k.prototype.readFloatLE=function(e,r){return e=e>>>0,r||Ye(e,4,this.length),mn.read(this,e,!0,23,4)};k.prototype.readFloatBE=function(e,r){return e=e>>>0,r||Ye(e,4,this.length),mn.read(this,e,!1,23,4)};k.prototype.readDoubleLE=function(e,r){return e=e>>>0,r||Ye(e,8,this.length),mn.read(this,e,!0,52,8)};k.prototype.readDoubleBE=function(e,r){return e=e>>>0,r||Ye(e,8,this.length),mn.read(this,e,!1,52,8)};function mt(t,e,r,i,n,f){if(!k.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>n||e<f)throw new RangeError('"value" argument is out of bounds');if(r+i>t.length)throw new RangeError("Index out of range")}k.prototype.writeUintLE=k.prototype.writeUIntLE=function(e,r,i,n){if(e=+e,r=r>>>0,i=i>>>0,!n){let o=Math.pow(2,8*i)-1;mt(this,e,r,i,o,0)}let f=1,a=0;for(this[r]=e&255;++a<i&&(f*=256);)this[r+a]=e/f&255;return r+i};k.prototype.writeUintBE=k.prototype.writeUIntBE=function(e,r,i,n){if(e=+e,r=r>>>0,i=i>>>0,!n){let o=Math.pow(2,8*i)-1;mt(this,e,r,i,o,0)}let f=i-1,a=1;for(this[r+f]=e&255;--f>=0&&(a*=256);)this[r+f]=e/a&255;return r+i};k.prototype.writeUint8=k.prototype.writeUInt8=function(e,r,i){return e=+e,r=r>>>0,i||mt(this,e,r,1,255,0),this[r]=e&255,r+1};k.prototype.writeUint16LE=k.prototype.writeUInt16LE=function(e,r,i){return e=+e,r=r>>>0,i||mt(this,e,r,2,65535,0),this[r]=e&255,this[r+1]=e>>>8,r+2};k.prototype.writeUint16BE=k.prototype.writeUInt16BE=function(e,r,i){return e=+e,r=r>>>0,i||mt(this,e,r,2,65535,0),this[r]=e>>>8,this[r+1]=e&255,r+2};k.prototype.writeUint32LE=k.prototype.writeUInt32LE=function(e,r,i){return e=+e,r=r>>>0,i||mt(this,e,r,4,4294967295,0),this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=e&255,r+4};k.prototype.writeUint32BE=k.prototype.writeUInt32BE=function(e,r,i){return e=+e,r=r>>>0,i||mt(this,e,r,4,4294967295,0),this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255,r+4};function ku(t,e,r,i,n){Nu(e,i,n,t,r,7);let f=Number(e&BigInt(4294967295));t[r++]=f,f=f>>8,t[r++]=f,f=f>>8,t[r++]=f,f=f>>8,t[r++]=f;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=a,a=a>>8,t[r++]=a,a=a>>8,t[r++]=a,a=a>>8,t[r++]=a,r}function Pu(t,e,r,i,n){Nu(e,i,n,t,r,7);let f=Number(e&BigInt(4294967295));t[r+7]=f,f=f>>8,t[r+6]=f,f=f>>8,t[r+5]=f,f=f>>8,t[r+4]=f;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=a,a=a>>8,t[r+2]=a,a=a>>8,t[r+1]=a,a=a>>8,t[r]=a,r+8}k.prototype.writeBigUInt64LE=Qr(function(e,r=0){return ku(this,e,r,BigInt(0),BigInt("0xffffffffffffffff"))});k.prototype.writeBigUInt64BE=Qr(function(e,r=0){return Pu(this,e,r,BigInt(0),BigInt("0xffffffffffffffff"))});k.prototype.writeIntLE=function(e,r,i,n){if(e=+e,r=r>>>0,!n){let u=Math.pow(2,8*i-1);mt(this,e,r,i,u-1,-u)}let f=0,a=1,o=0;for(this[r]=e&255;++f<i&&(a*=256);)e<0&&o===0&&this[r+f-1]!==0&&(o=1),this[r+f]=(e/a>>0)-o&255;return r+i};k.prototype.writeIntBE=function(e,r,i,n){if(e=+e,r=r>>>0,!n){let u=Math.pow(2,8*i-1);mt(this,e,r,i,u-1,-u)}let f=i-1,a=1,o=0;for(this[r+f]=e&255;--f>=0&&(a*=256);)e<0&&o===0&&this[r+f+1]!==0&&(o=1),this[r+f]=(e/a>>0)-o&255;return r+i};k.prototype.writeInt8=function(e,r,i){return e=+e,r=r>>>0,i||mt(this,e,r,1,127,-128),e<0&&(e=255+e+1),this[r]=e&255,r+1};k.prototype.writeInt16LE=function(e,r,i){return e=+e,r=r>>>0,i||mt(this,e,r,2,32767,-32768),this[r]=e&255,this[r+1]=e>>>8,r+2};k.prototype.writeInt16BE=function(e,r,i){return e=+e,r=r>>>0,i||mt(this,e,r,2,32767,-32768),this[r]=e>>>8,this[r+1]=e&255,r+2};k.prototype.writeInt32LE=function(e,r,i){return e=+e,r=r>>>0,i||mt(this,e,r,4,2147483647,-2147483648),this[r]=e&255,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24,r+4};k.prototype.writeInt32BE=function(e,r,i){return e=+e,r=r>>>0,i||mt(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255,r+4};k.prototype.writeBigInt64LE=Qr(function(e,r=0){return ku(this,e,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});k.prototype.writeBigInt64BE=Qr(function(e,r=0){return Pu(this,e,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Cu(t,e,r,i,n,f){if(r+i>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Tu(t,e,r,i,n){return e=+e,r=r>>>0,n||Cu(t,e,r,4,34028234663852886e22,-34028234663852886e22),mn.write(t,e,r,i,23,4),r+4}k.prototype.writeFloatLE=function(e,r,i){return Tu(this,e,r,!0,i)};k.prototype.writeFloatBE=function(e,r,i){return Tu(this,e,r,!1,i)};function Du(t,e,r,i,n){return e=+e,r=r>>>0,n||Cu(t,e,r,8,17976931348623157e292,-17976931348623157e292),mn.write(t,e,r,i,52,8),r+8}k.prototype.writeDoubleLE=function(e,r,i){return Du(this,e,r,!0,i)};k.prototype.writeDoubleBE=function(e,r,i){return Du(this,e,r,!1,i)};k.prototype.copy=function(e,r,i,n){if(!k.isBuffer(e))throw new TypeError("argument should be a Buffer");if(i||(i=0),!n&&n!==0&&(n=this.length),r>=e.length&&(r=e.length),r||(r=0),n>0&&n<i&&(n=i),n===i||e.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-r<n-i&&(n=e.length-r+i);let f=n-i;return this===e&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(r,i,n):Uint8Array.prototype.set.call(e,this.subarray(i,n),r),f};k.prototype.fill=function(e,r,i,n){if(typeof e=="string"){if(typeof r=="string"?(n=r,r=0,i=this.length):typeof i=="string"&&(n=i,i=this.length),n!==void 0&&typeof n!="string")throw new TypeError("encoding must be a string");if(typeof n=="string"&&!k.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(e.length===1){let a=e.charCodeAt(0);(n==="utf8"&&a<128||n==="latin1")&&(e=a)}}else typeof e=="number"?e=e&255:typeof e=="boolean"&&(e=Number(e));if(r<0||this.length<r||this.length<i)throw new RangeError("Out of range index");if(i<=r)return this;r=r>>>0,i=i===void 0?this.length:i>>>0,e||(e=0);let f;if(typeof e=="number")for(f=r;f<i;++f)this[f]=e;else{let a=k.isBuffer(e)?e:k.from(e,n),o=a.length;if(o===0)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(f=0;f<i-r;++f)this[f+r]=a[f%o]}return this};var gn={};function r0(t,e,r){gn[t]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name="".concat(this.name," [").concat(t,"]"),this.stack,delete this.name}get code(){return t}set code(n){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:n,writable:!0})}toString(){return"".concat(this.name," [").concat(t,"]: ").concat(this.message)}}}r0("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?"".concat(t," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"},RangeError);r0("ERR_INVALID_ARG_TYPE",function(t,e){return'The "'.concat(t,'" argument must be of type number. Received type ').concat(typeof e)},TypeError);r0("ERR_OUT_OF_RANGE",function(t,e,r){let i='The value of "'.concat(t,'" is out of range.'),n=r;return Number.isInteger(r)&&Math.abs(r)>2**32?n=Eu(String(r)):typeof r=="bigint"&&(n=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(n=Eu(n)),n+="n"),i+=" It must be ".concat(e,". Received ").concat(n),i},RangeError);function Eu(t){let e="",r=t.length,i=t[0]==="-"?1:0;for(;r>=i+4;r-=3)e="_".concat(t.slice(r-3,r)).concat(e);return"".concat(t.slice(0,r)).concat(e)}function m4(t,e,r){_n(e,"offset"),(t[e]===void 0||t[e+r]===void 0)&&jf(e,t.length-(r+1))}function Nu(t,e,r,i,n,f){if(t>r||t<e){let a=typeof e=="bigint"?"n":"",o;throw f>3?e===0||e===BigInt(0)?o=">= 0".concat(a," and < 2").concat(a," ** ").concat((f+1)*8).concat(a):o=">= -(2".concat(a," ** ").concat((f+1)*8-1).concat(a,") and < 2 ** ")+"".concat((f+1)*8-1).concat(a):o=">= ".concat(e).concat(a," and <= ").concat(r).concat(a),new gn.ERR_OUT_OF_RANGE("value",o,t)}m4(i,n,f)}function _n(t,e){if(typeof t!="number")throw new gn.ERR_INVALID_ARG_TYPE(e,"number",t)}function jf(t,e,r){throw Math.floor(t)!==t?(_n(t,r),new gn.ERR_OUT_OF_RANGE(r||"offset","an integer",t)):e<0?new gn.ERR_BUFFER_OUT_OF_BOUNDS:new gn.ERR_OUT_OF_RANGE(r||"offset",">= ".concat(r?1:0," and <= ").concat(e),t)}var _4=/[^+/0-9A-Za-z-_]/g;function w4(t){if(t=t.split("=")[0],t=t.trim().replace(_4,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function Qo(t,e){e=e||1/0;let r,i=t.length,n=null,f=[];for(let a=0;a<i;++a){if(r=t.charCodeAt(a),r>55295&&r<57344){if(!n){if(r>56319){(e-=3)>-1&&f.push(239,191,189);continue}else if(a+1===i){(e-=3)>-1&&f.push(239,191,189);continue}n=r;continue}if(r<56320){(e-=3)>-1&&f.push(239,191,189),n=r;continue}r=(n-55296<<10|r-56320)+65536}else n&&(e-=3)>-1&&f.push(239,191,189);if(n=null,r<128){if((e-=1)<0)break;f.push(r)}else if(r<2048){if((e-=2)<0)break;f.push(r>>6|192,r&63|128)}else if(r<65536){if((e-=3)<0)break;f.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((e-=4)<0)break;f.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return f}function x4(t){let e=[];for(let r=0;r<t.length;++r)e.push(t.charCodeAt(r)&255);return e}function S4(t,e){let r,i,n,f=[];for(let a=0;a<t.length&&!((e-=2)<0);++a)r=t.charCodeAt(a),i=r>>8,n=r%256,f.push(n),f.push(i);return f}function Lu(t){return Yo.toByteArray(w4(t))}function za(t,e,r,i){let n;for(n=0;n<i&&!(n+r>=e.length||n>=t.length);++n)e[n+r]=t[n];return n}function mr(t,e){return t instanceof e||t!=null&&t.constructor!=null&&t.constructor.name!=null&&t.constructor.name===e.name}function i0(t){return t!==t}var M4=function(){let t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){let i=r*16;for(let n=0;n<16;++n)e[i+n]=t[r]+t[n]}return e}();function Qr(t){return typeof BigInt>"u"?E4:t}function E4(){throw new Error("BigInt not supported")}});var H=q((n0,ju)=>{var Ka=Pt(),_r=Ka.Buffer;function Ou(t,e){for(var r in t)e[r]=t[r]}_r.from&&_r.alloc&&_r.allocUnsafe&&_r.allocUnsafeSlow?ju.exports=Ka:(Ou(Ka,n0),n0.Buffer=Di);function Di(t,e,r){return _r(t,e,r)}Di.prototype=Object.create(_r.prototype);Ou(_r,Di);Di.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return _r(t,e,r)};Di.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=_r(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};Di.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return _r(t)};Di.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Ka.SlowBuffer(t)}});var Ni=q((eM,a0)=>{"use strict";var f0=65536,A4=4294967295;function B4(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}var q4=H().Buffer,Ha=global.crypto||global.msCrypto;Ha&&Ha.getRandomValues?a0.exports=I4:a0.exports=B4;function I4(t,e){if(t>A4)throw new RangeError("requested too many random bytes");var r=q4.allocUnsafe(t);if(t>0)if(t>f0)for(var i=0;i<t;i+=f0)Ha.getRandomValues(r.slice(i,i+f0));else Ha.getRandomValues(r);return typeof e=="function"?process.nextTick(function(){e(null,r)}):r}});var F=q((tM,s0)=>{typeof Object.create=="function"?s0.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:s0.exports=function(e,r){if(r){e.super_=r;var i=function(){};i.prototype=r.prototype,e.prototype=new i,e.prototype.constructor=e}}});var Sn=q((rM,o0)=>{"use strict";var xn=typeof Reflect=="object"?Reflect:null,Fu=xn&&typeof xn.apply=="function"?xn.apply:function(e,r,i){return Function.prototype.apply.call(e,r,i)},Wa;xn&&typeof xn.ownKeys=="function"?Wa=xn.ownKeys:Object.getOwnPropertySymbols?Wa=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Wa=function(e){return Object.getOwnPropertyNames(e)};function R4(t){console&&console.warn&&console.warn(t)}var zu=Number.isNaN||function(e){return e!==e};function Ce(){Ce.init.call(this)}o0.exports=Ce;o0.exports.once=T4;Ce.EventEmitter=Ce;Ce.prototype._events=void 0;Ce.prototype._eventsCount=0;Ce.prototype._maxListeners=void 0;var Uu=10;function Va(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}Object.defineProperty(Ce,"defaultMaxListeners",{enumerable:!0,get:function(){return Uu},set:function(t){if(typeof t!="number"||t<0||zu(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");Uu=t}});Ce.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};Ce.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||zu(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function Ku(t){return t._maxListeners===void 0?Ce.defaultMaxListeners:t._maxListeners}Ce.prototype.getMaxListeners=function(){return Ku(this)};Ce.prototype.emit=function(e){for(var r=[],i=1;i<arguments.length;i++)r.push(arguments[i]);var n=e==="error",f=this._events;if(f!==void 0)n=n&&f.error===void 0;else if(!n)return!1;if(n){var a;if(r.length>0&&(a=r[0]),a instanceof Error)throw a;var o=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw o.context=a,o}var u=f[e];if(u===void 0)return!1;if(typeof u=="function")Fu(u,this,r);else for(var g=u.length,_=Xu(u,g),i=0;i<g;++i)Fu(_[i],this,r);return!0};function Hu(t,e,r,i){var n,f,a;if(Va(r),f=t._events,f===void 0?(f=t._events=Object.create(null),t._eventsCount=0):(f.newListener!==void 0&&(t.emit("newListener",e,r.listener?r.listener:r),f=t._events),a=f[e]),a===void 0)a=f[e]=r,++t._eventsCount;else if(typeof a=="function"?a=f[e]=i?[r,a]:[a,r]:i?a.unshift(r):a.push(r),n=Ku(t),n>0&&a.length>n&&!a.warned){a.warned=!0;var o=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");o.name="MaxListenersExceededWarning",o.emitter=t,o.type=e,o.count=a.length,R4(o)}return t}Ce.prototype.addListener=function(e,r){return Hu(this,e,r,!1)};Ce.prototype.on=Ce.prototype.addListener;Ce.prototype.prependListener=function(e,r){return Hu(this,e,r,!0)};function k4(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Wu(t,e,r){var i={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},n=k4.bind(i);return n.listener=r,i.wrapFn=n,n}Ce.prototype.once=function(e,r){return Va(r),this.on(e,Wu(this,e,r)),this};Ce.prototype.prependOnceListener=function(e,r){return Va(r),this.prependListener(e,Wu(this,e,r)),this};Ce.prototype.removeListener=function(e,r){var i,n,f,a,o;if(Va(r),n=this._events,n===void 0)return this;if(i=n[e],i===void 0)return this;if(i===r||i.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,i.listener||r));else if(typeof i!="function"){for(f=-1,a=i.length-1;a>=0;a--)if(i[a]===r||i[a].listener===r){o=i[a].listener,f=a;break}if(f<0)return this;f===0?i.shift():P4(i,f),i.length===1&&(n[e]=i[0]),n.removeListener!==void 0&&this.emit("removeListener",e,o||r)}return this};Ce.prototype.off=Ce.prototype.removeListener;Ce.prototype.removeAllListeners=function(e){var r,i,n;if(i=this._events,i===void 0)return this;if(i.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):i[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete i[e]),this;if(arguments.length===0){var f=Object.keys(i),a;for(n=0;n<f.length;++n)a=f[n],a!=="removeListener"&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(r=i[e],typeof r=="function")this.removeListener(e,r);else if(r!==void 0)for(n=r.length-1;n>=0;n--)this.removeListener(e,r[n]);return this};function Vu(t,e,r){var i=t._events;if(i===void 0)return[];var n=i[e];return n===void 0?[]:typeof n=="function"?r?[n.listener||n]:[n]:r?C4(n):Xu(n,n.length)}Ce.prototype.listeners=function(e){return Vu(this,e,!0)};Ce.prototype.rawListeners=function(e){return Vu(this,e,!1)};Ce.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):Gu.call(t,e)};Ce.prototype.listenerCount=Gu;function Gu(t){var e=this._events;if(e!==void 0){var r=e[t];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}Ce.prototype.eventNames=function(){return this._eventsCount>0?Wa(this._events):[]};function Xu(t,e){for(var r=new Array(e),i=0;i<e;++i)r[i]=t[i];return r}function P4(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}function C4(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}function T4(t,e){return new Promise(function(r,i){function n(a){t.removeListener(e,f),i(a)}function f(){typeof t.removeListener=="function"&&t.removeListener("error",n),r([].slice.call(arguments))}Ju(t,e,f,{once:!0}),e!=="error"&&D4(t,n,{once:!0})})}function D4(t,e,r){typeof t.on=="function"&&Ju(t,"error",e,r)}function Ju(t,e,r,i){if(typeof t.on=="function")i.once?t.once(e,r):t.on(e,r);else if(typeof t.addEventListener=="function")t.addEventListener(e,function n(f){i.once&&t.removeEventListener(e,n),r(f)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t)}});var d0=q((iM,Yu)=>{Yu.exports=Sn().EventEmitter});var Ff=q(()=>{});var rh=q((aM,th)=>{"use strict";function Zu(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function $u(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Zu(Object(r),!0).forEach(function(i){N4(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Zu(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function N4(t,e,r){return e=eh(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function L4(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Qu(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,eh(i.key),i)}}function O4(t,e,r){return e&&Qu(t.prototype,e),r&&Qu(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function eh(t){var e=j4(t,"string");return typeof e=="symbol"?e:String(e)}function j4(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var F4=Pt(),Ga=F4.Buffer,U4=Ff(),c0=U4.inspect,z4=c0&&c0.custom||"inspect";function K4(t,e,r){Ga.prototype.copy.call(t,e,r)}th.exports=function(){function t(){L4(this,t),this.head=null,this.tail=null,this.length=0}return O4(t,[{key:"push",value:function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n}},{key:"concat",value:function(r){if(this.length===0)return Ga.alloc(0);for(var i=Ga.allocUnsafe(r>>>0),n=this.head,f=0;n;)K4(n.data,i,f),f+=n.data.length,n=n.next;return i}},{key:"consume",value:function(r,i){var n;return r<this.head.data.length?(n=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?n=this.shift():n=i?this._getString(r):this._getBuffer(r),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var i=this.head,n=1,f=i.data;for(r-=f.length;i=i.next;){var a=i.data,o=r>a.length?a.length:r;if(o===a.length?f+=a:f+=a.slice(0,r),r-=o,r===0){o===a.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=a.slice(o));break}++n}return this.length-=n,f}},{key:"_getBuffer",value:function(r){var i=Ga.allocUnsafe(r),n=this.head,f=1;for(n.data.copy(i),r-=n.data.length;n=n.next;){var a=n.data,o=r>a.length?a.length:r;if(a.copy(i,i.length-r,0,o),r-=o,r===0){o===a.length?(++f,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=a.slice(o));break}++f}return this.length-=f,i}},{key:z4,value:function(r,i){return c0(this,$u($u({},i),{},{depth:0,customInspect:!1}))}}]),t}()});var h0=q((sM,nh)=>{"use strict";function H4(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(u0,this,t)):process.nextTick(u0,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(f){!e&&f?r._writableState?r._writableState.errorEmitted?process.nextTick(Xa,r):(r._writableState.errorEmitted=!0,process.nextTick(ih,r,f)):process.nextTick(ih,r,f):e?(process.nextTick(Xa,r),e(f)):process.nextTick(Xa,r)}),this)}function ih(t,e){u0(t,e),Xa(t)}function Xa(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function W4(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function u0(t,e){t.emit("error",e)}function V4(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}nh.exports={destroy:H4,undestroy:W4,errorOrDestroy:V4}});var Li=q((oM,sh)=>{"use strict";function G4(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var ah={};function Ct(t,e,r){r||(r=Error);function i(f,a,o){return typeof e=="string"?e:e(f,a,o)}var n=function(f){G4(a,f);function a(o,u,g){return f.call(this,i(o,u,g))||this}return a}(r);n.prototype.name=r.name,n.prototype.code=t,ah[t]=n}function fh(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map(function(i){return String(i)}),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:r===2?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}else return"of ".concat(e," ").concat(String(t))}function X4(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function J4(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function Y4(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}Ct("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);Ct("ERR_INVALID_ARG_TYPE",function(t,e,r){var i;typeof e=="string"&&X4(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be";var n;if(J4(t," argument"))n="The ".concat(t," ").concat(i," ").concat(fh(e,"type"));else{var f=Y4(t,".")?"property":"argument";n='The "'.concat(t,'" ').concat(f," ").concat(i," ").concat(fh(e,"type"))}return n+=". Received type ".concat(typeof r),n},TypeError);Ct("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Ct("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});Ct("ERR_STREAM_PREMATURE_CLOSE","Premature close");Ct("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});Ct("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Ct("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Ct("ERR_STREAM_WRITE_AFTER_END","write after end");Ct("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Ct("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);Ct("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");sh.exports.codes=ah});var l0=q((dM,oh)=>{"use strict";var Z4=Li().codes.ERR_INVALID_OPT_VALUE;function $4(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function Q4(t,e,r,i){var n=$4(e,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var f=i?r:"highWaterMark";throw new Z4(f,n)}return Math.floor(n)}return t.objectMode?16:16*1024}oh.exports={getHighWaterMark:Q4}});var p0=q((cM,dh)=>{dh.exports=e8;function e8(t,e){if(b0("noDeprecation"))return t;var r=!1;function i(){if(!r){if(b0("throwDeprecation"))throw new Error(e);b0("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}return i}function b0(t){try{if(!global.localStorage)return!1}catch(r){return!1}var e=global.localStorage[t];return e==null?!1:String(e).toLowerCase()==="true"}});var Za=q((uM,ph)=>{"use strict";ph.exports=He;function uh(t){var e=this;this.next=null,this.entry=null,this.finish=function(){B8(e,t)}}var Mn;He.WritableState=zf;var t8={deprecate:p0()},hh=d0(),Ya=Pt().Buffer,r8=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function i8(t){return Ya.from(t)}function n8(t){return Ya.isBuffer(t)||t instanceof r8}var y0=h0(),f8=l0(),a8=f8.getHighWaterMark,ei=Li().codes,s8=ei.ERR_INVALID_ARG_TYPE,o8=ei.ERR_METHOD_NOT_IMPLEMENTED,d8=ei.ERR_MULTIPLE_CALLBACK,c8=ei.ERR_STREAM_CANNOT_PIPE,u8=ei.ERR_STREAM_DESTROYED,h8=ei.ERR_STREAM_NULL_VALUES,l8=ei.ERR_STREAM_WRITE_AFTER_END,b8=ei.ERR_UNKNOWN_ENCODING,En=y0.errorOrDestroy;F()(He,hh);function p8(){}function zf(t,e,r){Mn=Mn||ti(),t=t||{},typeof r!="boolean"&&(r=e instanceof Mn),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=a8(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=t.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(n){x8(e,n)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new uh(this)}zf.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(zf.prototype,"buffer",{get:t8.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}})();var Ja;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Ja=Function.prototype[Symbol.hasInstance],Object.defineProperty(He,Symbol.hasInstance,{value:function(e){return Ja.call(this,e)?!0:this!==He?!1:e&&e._writableState instanceof zf}})):Ja=function(e){return e instanceof this};function He(t){Mn=Mn||ti();var e=this instanceof Mn;if(!e&&!Ja.call(He,this))return new He(t);this._writableState=new zf(t,this,e),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),hh.call(this)}He.prototype.pipe=function(){En(this,new c8)};function v8(t,e){var r=new l8;En(t,r),process.nextTick(e,r)}function y8(t,e,r,i){var n;return r===null?n=new h8:typeof r!="string"&&!e.objectMode&&(n=new s8("chunk",["string","Buffer"],r)),n?(En(t,n),process.nextTick(i,n),!1):!0}He.prototype.write=function(t,e,r){var i=this._writableState,n=!1,f=!i.objectMode&&n8(t);return f&&!Ya.isBuffer(t)&&(t=i8(t)),typeof e=="function"&&(r=e,e=null),f?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=p8),i.ending?v8(this,r):(f||y8(this,i,t,r))&&(i.pendingcb++,n=m8(this,i,f,t,e,r)),n};He.prototype.cork=function(){this._writableState.corked++};He.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&lh(this,t))};He.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new b8(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(He.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function g8(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=Ya.from(e,r)),e}Object.defineProperty(He.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function m8(t,e,r,i,n,f){if(!r){var a=g8(e,i,n);i!==a&&(r=!0,n="buffer",i=a)}var o=e.objectMode?1:i.length;e.length+=o;var u=e.length<e.highWaterMark;if(u||(e.needDrain=!0),e.writing||e.corked){var g=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:f,next:null},g?g.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else v0(t,e,!1,o,i,n,f);return u}function v0(t,e,r,i,n,f,a){e.writelen=i,e.writecb=a,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new u8("write")):r?t._writev(n,e.onwrite):t._write(n,f,e.onwrite),e.sync=!1}function _8(t,e,r,i,n){--e.pendingcb,r?(process.nextTick(n,i),process.nextTick(Uf,t,e),t._writableState.errorEmitted=!0,En(t,i)):(n(i),t._writableState.errorEmitted=!0,En(t,i),Uf(t,e))}function w8(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function x8(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new d8;if(w8(r),e)_8(t,r,i,e,n);else{var f=bh(r)||t.destroyed;!f&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&lh(t,r),i?process.nextTick(ch,t,r,f,n):ch(t,r,f,n)}}function ch(t,e,r,i){r||S8(t,e),e.pendingcb--,i(),Uf(t,e)}function S8(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function lh(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),f=e.corkedRequestsFree;f.entry=r;for(var a=0,o=!0;r;)n[a]=r,r.isBuf||(o=!1),r=r.next,a+=1;n.allBuffers=o,v0(t,e,!0,e.length,n,"",f.finish),e.pendingcb++,e.lastBufferedRequest=null,f.next?(e.corkedRequestsFree=f.next,f.next=null):e.corkedRequestsFree=new uh(e),e.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,g=r.encoding,_=r.callback,x=e.objectMode?1:u.length;if(v0(t,e,!1,x,u,g,_),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}He.prototype._write=function(t,e,r){r(new o8("_write()"))};He.prototype._writev=null;He.prototype.end=function(t,e,r){var i=this._writableState;return typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||A8(this,i,r),this};Object.defineProperty(He.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function bh(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function M8(t,e){t._final(function(r){e.pendingcb--,r&&En(t,r),e.prefinished=!0,t.emit("prefinish"),Uf(t,e)})}function E8(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(M8,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function Uf(t,e){var r=bh(e);if(r&&(E8(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}function A8(t,e,r){e.ending=!0,Uf(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function B8(t,e,r){var i=t.entry;for(t.entry=null;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree.next=t}Object.defineProperty(He.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});He.prototype.destroy=y0.destroy;He.prototype._undestroy=y0.undestroy;He.prototype._destroy=function(t,e){e(t)}});var ti=q((hM,yh)=>{"use strict";var q8=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};yh.exports=wr;var vh=es(),m0=Za();F()(wr,vh);for(g0=q8(m0.prototype),$a=0;$a<g0.length;$a++)Qa=g0[$a],wr.prototype[Qa]||(wr.prototype[Qa]=m0.prototype[Qa]);var g0,Qa,$a;function wr(t){if(!(this instanceof wr))return new wr(t);vh.call(this,t),m0.call(this,t),this.allowHalfOpen=!0,t&&(t.readable===!1&&(this.readable=!1),t.writable===!1&&(this.writable=!1),t.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",I8)))}Object.defineProperty(wr.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(wr.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(wr.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function I8(){this._writableState.ended||process.nextTick(R8,this)}function R8(t){t.end()}Object.defineProperty(wr.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})});var ts=q(mh=>{"use strict";var w0=H().Buffer,gh=w0.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function k8(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function P8(t){var e=k8(t);if(typeof e!="string"&&(w0.isEncoding===gh||!gh(t)))throw new Error("Unknown encoding: "+t);return e||t}mh.StringDecoder=Kf;function Kf(t){this.encoding=P8(t);var e;switch(this.encoding){case"utf16le":this.text=O8,this.end=j8,e=4;break;case"utf8":this.fillLast=D8,e=4;break;case"base64":this.text=F8,this.end=U8,e=3;break;default:this.write=z8,this.end=K8;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=w0.allocUnsafe(e)}Kf.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""};Kf.prototype.end=L8;Kf.prototype.text=N8;Kf.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function _0(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function C8(t,e,r){var i=e.length-1;if(i<r)return 0;var n=_0(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||n===-2?0:(n=_0(e[i]),n>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||n===-2?0:(n=_0(e[i]),n>=0?(n>0&&(n===2?n=0:t.lastNeed=n-3),n):0))}function T8(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function D8(t){var e=this.lastTotal-this.lastNeed,r=T8(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function N8(t,e){var r=C8(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)}function L8(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function O8(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function j8(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function F8(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function U8(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function z8(t){return t.toString(this.encoding)}function K8(t){return t&&t.length?this.write(t):""}});var Hf=q((bM,xh)=>{"use strict";var _h=Li().codes.ERR_STREAM_PREMATURE_CLOSE;function H8(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];t.apply(this,i)}}}function W8(){}function V8(t){return t.setHeader&&typeof t.abort=="function"}function wh(t,e,r){if(typeof e=="function")return wh(t,null,e);e||(e={}),r=H8(r||W8);var i=e.readable||e.readable!==!1&&t.readable,n=e.writable||e.writable!==!1&&t.writable,f=function(){t.writable||o()},a=t._writableState&&t._writableState.finished,o=function(){n=!1,a=!0,i||r.call(t)},u=t._readableState&&t._readableState.endEmitted,g=function(){i=!1,u=!0,n||r.call(t)},_=function(I){r.call(t,I)},x=function(){var I;if(i&&!u)return(!t._readableState||!t._readableState.ended)&&(I=new _h),r.call(t,I);if(n&&!a)return(!t._writableState||!t._writableState.ended)&&(I=new _h),r.call(t,I)},E=function(){t.req.on("finish",o)};return V8(t)?(t.on("complete",o),t.on("abort",x),t.req?E():t.on("request",E)):n&&!t._writableState&&(t.on("end",f),t.on("close",f)),t.on("end",g),t.on("finish",o),e.error!==!1&&t.on("error",_),t.on("close",x),function(){t.removeListener("complete",o),t.removeListener("abort",x),t.removeListener("request",E),t.req&&t.req.removeListener("finish",o),t.removeListener("end",f),t.removeListener("close",f),t.removeListener("finish",o),t.removeListener("end",g),t.removeListener("error",_),t.removeListener("close",x)}}xh.exports=wh});var Mh=q((pM,Sh)=>{"use strict";var rs;function ri(t,e,r){return e=G8(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function G8(t){var e=X8(t,"string");return typeof e=="symbol"?e:String(e)}function X8(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var J8=Hf(),ii=Symbol("lastResolve"),Oi=Symbol("lastReject"),Wf=Symbol("error"),is=Symbol("ended"),ji=Symbol("lastPromise"),x0=Symbol("handlePromise"),Fi=Symbol("stream");function ni(t,e){return{value:t,done:e}}function Y8(t){var e=t[ii];if(e!==null){var r=t[Fi].read();r!==null&&(t[ji]=null,t[ii]=null,t[Oi]=null,e(ni(r,!1)))}}function Z8(t){process.nextTick(Y8,t)}function $8(t,e){return function(r,i){t.then(function(){if(e[is]){r(ni(void 0,!0));return}e[x0](r,i)},i)}}var Q8=Object.getPrototypeOf(function(){}),e5=Object.setPrototypeOf((rs={get stream(){return this[Fi]},next:function(){var e=this,r=this[Wf];if(r!==null)return Promise.reject(r);if(this[is])return Promise.resolve(ni(void 0,!0));if(this[Fi].destroyed)return new Promise(function(a,o){process.nextTick(function(){e[Wf]?o(e[Wf]):a(ni(void 0,!0))})});var i=this[ji],n;if(i)n=new Promise($8(i,this));else{var f=this[Fi].read();if(f!==null)return Promise.resolve(ni(f,!1));n=new Promise(this[x0])}return this[ji]=n,n}},ri(rs,Symbol.asyncIterator,function(){return this}),ri(rs,"return",function(){var e=this;return new Promise(function(r,i){e[Fi].destroy(null,function(n){if(n){i(n);return}r(ni(void 0,!0))})})}),rs),Q8),t5=function(e){var r,i=Object.create(e5,(r={},ri(r,Fi,{value:e,writable:!0}),ri(r,ii,{value:null,writable:!0}),ri(r,Oi,{value:null,writable:!0}),ri(r,Wf,{value:null,writable:!0}),ri(r,is,{value:e._readableState.endEmitted,writable:!0}),ri(r,x0,{value:function(f,a){var o=i[Fi].read();o?(i[ji]=null,i[ii]=null,i[Oi]=null,f(ni(o,!1))):(i[ii]=f,i[Oi]=a)},writable:!0}),r));return i[ji]=null,J8(e,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var f=i[Oi];f!==null&&(i[ji]=null,i[ii]=null,i[Oi]=null,f(n)),i[Wf]=n;return}var a=i[ii];a!==null&&(i[ji]=null,i[ii]=null,i[Oi]=null,a(ni(void 0,!0))),i[is]=!0}),e.on("readable",Z8.bind(null,i)),i};Sh.exports=t5});var Ah=q((vM,Eh)=>{Eh.exports=function(){throw new Error("Readable.from is not available in the browser")}});var es=q((gM,Nh)=>{"use strict";Nh.exports=Re;var An;Re.ReadableState=Rh;var yM=Sn().EventEmitter,Ih=function(e,r){return e.listeners(r).length},Gf=d0(),ns=Pt().Buffer,r5=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function i5(t){return ns.from(t)}function n5(t){return ns.isBuffer(t)||t instanceof r5}var S0=Ff(),Ae;S0&&S0.debuglog?Ae=S0.debuglog("stream"):Ae=function(){};var f5=rh(),R0=h0(),a5=l0(),s5=a5.getHighWaterMark,fs=Li().codes,o5=fs.ERR_INVALID_ARG_TYPE,d5=fs.ERR_STREAM_PUSH_AFTER_EOF,c5=fs.ERR_METHOD_NOT_IMPLEMENTED,u5=fs.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Bn,M0,E0;F()(Re,Gf);var Vf=R0.errorOrDestroy,A0=["error","close","destroy","pause","resume"];function h5(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function Rh(t,e,r){An=An||ti(),t=t||{},typeof r!="boolean"&&(r=e instanceof An),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=s5(this,t,"readableHighWaterMark",r),this.buffer=new f5,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(Bn||(Bn=ts().StringDecoder),this.decoder=new Bn(t.encoding),this.encoding=t.encoding)}function Re(t){if(An=An||ti(),!(this instanceof Re))return new Re(t);var e=this instanceof An;this._readableState=new Rh(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),Gf.call(this)}Object.defineProperty(Re.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});Re.prototype.destroy=R0.destroy;Re.prototype._undestroy=R0.undestroy;Re.prototype._destroy=function(t,e){e(t)};Re.prototype.push=function(t,e){var r=this._readableState,i;return r.objectMode?i=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=ns.from(t,e),e=""),i=!0),kh(this,t,e,!1,i)};Re.prototype.unshift=function(t){return kh(this,t,null,!0,!1)};function kh(t,e,r,i,n){Ae("readableAddChunk",e);var f=t._readableState;if(e===null)f.reading=!1,p5(t,f);else{var a;if(n||(a=l5(f,e)),a)Vf(t,a);else if(f.objectMode||e&&e.length>0)if(typeof e!="string"&&!f.objectMode&&Object.getPrototypeOf(e)!==ns.prototype&&(e=i5(e)),i)f.endEmitted?Vf(t,new u5):B0(t,f,e,!0);else if(f.ended)Vf(t,new d5);else{if(f.destroyed)return!1;f.reading=!1,f.decoder&&!r?(e=f.decoder.write(e),f.objectMode||e.length!==0?B0(t,f,e,!1):I0(t,f)):B0(t,f,e,!1)}else i||(f.reading=!1,I0(t,f))}return!f.ended&&(f.length<f.highWaterMark||f.length===0)}function B0(t,e,r,i){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&as(t)),I0(t,e)}function l5(t,e){var r;return!n5(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new o5("chunk",["string","Buffer","Uint8Array"],e)),r}Re.prototype.isPaused=function(){return this._readableState.flowing===!1};Re.prototype.setEncoding=function(t){Bn||(Bn=ts().StringDecoder);var e=new Bn(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";r!==null;)i+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),i!==""&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var Bh=1073741824;function b5(t){return t>=Bh?t=Bh:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function qh(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=b5(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}Re.prototype.read=function(t){Ae("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return Ae("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?q0(this):as(this),null;if(t=qh(t,e),t===0&&e.ended)return e.length===0&&q0(this),null;var i=e.needReadable;Ae("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,Ae("length less than watermark",i)),e.ended||e.reading?(i=!1,Ae("reading or ended",i)):i&&(Ae("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=qh(r,e)));var n;return t>0?n=Th(t,e):n=null,n===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&q0(this)),n!==null&&this.emit("data",n),n};function p5(t,e){if(Ae("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?as(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,Ph(t)))}}function as(t){var e=t._readableState;Ae("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(Ae("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(Ph,t))}function Ph(t){var e=t._readableState;Ae("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,k0(t)}function I0(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(v5,t,e))}function v5(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(Ae("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}Re.prototype._read=function(t){Vf(this,new c5("_read()"))};Re.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t);break}i.pipesCount+=1,Ae("pipe count=%d opts=%j",i.pipesCount,e);var n=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,f=n?o:R;i.endEmitted?process.nextTick(f):r.once("end",f),t.on("unpipe",a);function a(N,P){Ae("onunpipe"),N===r&&P&&P.hasUnpiped===!1&&(P.hasUnpiped=!0,_())}function o(){Ae("onend"),t.end()}var u=y5(r);t.on("drain",u);var g=!1;function _(){Ae("cleanup"),t.removeListener("close",B),t.removeListener("finish",I),t.removeListener("drain",u),t.removeListener("error",E),t.removeListener("unpipe",a),r.removeListener("end",o),r.removeListener("end",R),r.removeListener("data",x),g=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&u()}r.on("data",x);function x(N){Ae("ondata");var P=t.write(N);Ae("dest.write",P),P===!1&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&Dh(i.pipes,t)!==-1)&&!g&&(Ae("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function E(N){Ae("onerror",N),R(),t.removeListener("error",E),Ih(t,"error")===0&&Vf(t,N)}h5(t,"error",E);function B(){t.removeListener("finish",I),R()}t.once("close",B);function I(){Ae("onfinish"),t.removeListener("close",B),R()}t.once("finish",I);function R(){Ae("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(Ae("pipe resume"),r.resume()),t};function y5(t){return function(){var r=t._readableState;Ae("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&Ih(t,"data")&&(r.flowing=!0,k0(t))}}Re.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var f=0;f<n;f++)i[f].emit("unpipe",this,{hasUnpiped:!1});return this}var a=Dh(e.pipes,t);return a===-1?this:(e.pipes.splice(a,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};Re.prototype.on=function(t,e){var r=Gf.prototype.on.call(this,t,e),i=this._readableState;return t==="data"?(i.readableListening=this.listenerCount("readable")>0,i.flowing!==!1&&this.resume()):t==="readable"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,Ae("on readable",i.length,i.reading),i.length?as(this):i.reading||process.nextTick(g5,this)),r};Re.prototype.addListener=Re.prototype.on;Re.prototype.removeListener=function(t,e){var r=Gf.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(Ch,this),r};Re.prototype.removeAllListeners=function(t){var e=Gf.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(Ch,this),e};function Ch(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function g5(t){Ae("readable nexttick read 0"),t.read(0)}Re.prototype.resume=function(){var t=this._readableState;return t.flowing||(Ae("resume"),t.flowing=!t.readableListening,m5(this,t)),t.paused=!1,this};function m5(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(_5,t,e))}function _5(t,e){Ae("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),k0(t),e.flowing&&!e.reading&&t.read(0)}Re.prototype.pause=function(){return Ae("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Ae("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function k0(t){var e=t._readableState;for(Ae("flow",e.flowing);e.flowing&&t.read()!==null;);}Re.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(Ae("wrapped end"),r.decoder&&!r.ended){var a=r.decoder.end();a&&a.length&&e.push(a)}e.push(null)}),t.on("data",function(a){if(Ae("wrapped data"),r.decoder&&(a=r.decoder.write(a)),!(r.objectMode&&a==null)&&!(!r.objectMode&&(!a||!a.length))){var o=e.push(a);o||(i=!0,t.pause())}});for(var n in t)this[n]===void 0&&typeof t[n]=="function"&&(this[n]=function(o){return function(){return t[o].apply(t,arguments)}}(n));for(var f=0;f<A0.length;f++)t.on(A0[f],this.emit.bind(this,A0[f]));return this._read=function(a){Ae("wrapped _read",a),i&&(i=!1,t.resume())},this};typeof Symbol=="function"&&(Re.prototype[Symbol.asyncIterator]=function(){return M0===void 0&&(M0=Mh()),M0(this)});Object.defineProperty(Re.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(Re.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(Re.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});Re._fromList=Th;Object.defineProperty(Re.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function Th(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function q0(t){var e=t._readableState;Ae("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(w5,e,t))}function w5(t,e){if(Ae("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}typeof Symbol=="function"&&(Re.from=function(t,e){return E0===void 0&&(E0=Ah()),E0(Re,t,e)});function Dh(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var ds=q((mM,Oh)=>{"use strict";Oh.exports=Dr;var ss=Li().codes,x5=ss.ERR_METHOD_NOT_IMPLEMENTED,S5=ss.ERR_MULTIPLE_CALLBACK,M5=ss.ERR_TRANSFORM_ALREADY_TRANSFORMING,E5=ss.ERR_TRANSFORM_WITH_LENGTH_0,os=ti();F()(Dr,os);function A5(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(i===null)return this.emit("error",new S5);r.writechunk=null,r.writecb=null,e!=null&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function Dr(t){if(!(this instanceof Dr))return new Dr(t);os.call(this,t),this._transformState={afterTransform:A5.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",B5)}function B5(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(e,r){Lh(t,e,r)}):Lh(this,null,null)}Dr.prototype.push=function(t,e){return this._transformState.needTransform=!1,os.prototype.push.call(this,t,e)};Dr.prototype._transform=function(t,e,r){r(new x5("_transform()"))};Dr.prototype._write=function(t,e,r){var i=this._transformState;if(i.writecb=r,i.writechunk=t,i.writeencoding=e,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};Dr.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};Dr.prototype._destroy=function(t,e){os.prototype._destroy.call(this,t,function(r){e(r)})};function Lh(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new E5;if(t._transformState.transforming)throw new M5;return t.push(null)}});var P0=q((_M,Fh)=>{"use strict";Fh.exports=Xf;var jh=ds();F()(Xf,jh);function Xf(t){if(!(this instanceof Xf))return new Xf(t);jh.call(this,t)}Xf.prototype._transform=function(t,e,r){r(null,t)}});var T0=q((wM,Hh)=>{"use strict";var C0;function q5(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var Kh=Li().codes,I5=Kh.ERR_MISSING_ARGS,R5=Kh.ERR_STREAM_DESTROYED;function Uh(t){if(t)throw t}function k5(t){return t.setHeader&&typeof t.abort=="function"}function P5(t,e,r,i){i=q5(i);var n=!1;t.on("close",function(){n=!0}),C0===void 0&&(C0=Hf()),C0(t,{readable:e,writable:r},function(a){if(a)return i(a);n=!0,i()});var f=!1;return function(a){if(!n&&!f){if(f=!0,k5(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();i(a||new R5("pipe"))}}}function zh(t){t()}function C5(t,e){return t.pipe(e)}function T5(t){return!t.length||typeof t[t.length-1]!="function"?Uh:t.pop()}function D5(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var i=T5(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new I5("streams");var n,f=e.map(function(a,o){var u=o<e.length-1,g=o>0;return P5(a,u,g,function(_){n||(n=_),_&&f.forEach(zh),!u&&(f.forEach(zh),i(n))})});return e.reduce(C5)}Hh.exports=D5});var Vh=q((Tt,Wh)=>{Tt=Wh.exports=es();Tt.Stream=Tt;Tt.Readable=Tt;Tt.Writable=Za();Tt.Duplex=ti();Tt.Transform=ds();Tt.PassThrough=P0();Tt.finished=Hf();Tt.pipeline=T0()});var D0=q((xM,Xh)=>{"use strict";var cs=H().Buffer,Gh=Vh().Transform,N5=F();function L5(t,e){if(!cs.isBuffer(t)&&typeof t!="string")throw new TypeError(e+" must be a string or a buffer")}function fi(t){Gh.call(this),this._block=cs.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}N5(fi,Gh);fi.prototype._transform=function(t,e,r){var i=null;try{this.update(t,e)}catch(n){i=n}r(i)};fi.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(r){e=r}t(e)};fi.prototype.update=function(t,e){if(L5(t,"Data"),this._finalized)throw new Error("Digest already called");cs.isBuffer(t)||(t=cs.from(t,e));for(var r=this._block,i=0;this._blockOffset+t.length-i>=this._blockSize;){for(var n=this._blockOffset;n<this._blockSize;)r[n++]=t[i++];this._update(),this._blockOffset=0}for(;i<t.length;)r[this._blockOffset++]=t[i++];for(var f=0,a=t.length*8;a>0;++f)this._length[f]+=a,a=this._length[f]/4294967296|0,a>0&&(this._length[f]-=4294967296*a);return this};fi.prototype._update=function(){throw new Error("_update is not implemented")};fi.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();t!==void 0&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e};fi.prototype._digest=function(){throw new Error("_digest is not implemented")};Xh.exports=fi});var ls=q((SM,Yh)=>{"use strict";var O5=F(),Jh=D0(),j5=H().Buffer,F5=new Array(16);function us(){Jh.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}O5(us,Jh);us.prototype._update=function(){for(var t=F5,e=0;e<16;++e)t[e]=this._block.readInt32LE(e*4);var r=this._a,i=this._b,n=this._c,f=this._d;r=ot(r,i,n,f,t[0],3614090360,7),f=ot(f,r,i,n,t[1],3905402710,12),n=ot(n,f,r,i,t[2],606105819,17),i=ot(i,n,f,r,t[3],3250441966,22),r=ot(r,i,n,f,t[4],4118548399,7),f=ot(f,r,i,n,t[5],1200080426,12),n=ot(n,f,r,i,t[6],2821735955,17),i=ot(i,n,f,r,t[7],4249261313,22),r=ot(r,i,n,f,t[8],1770035416,7),f=ot(f,r,i,n,t[9],2336552879,12),n=ot(n,f,r,i,t[10],4294925233,17),i=ot(i,n,f,r,t[11],2304563134,22),r=ot(r,i,n,f,t[12],1804603682,7),f=ot(f,r,i,n,t[13],4254626195,12),n=ot(n,f,r,i,t[14],2792965006,17),i=ot(i,n,f,r,t[15],1236535329,22),r=dt(r,i,n,f,t[1],4129170786,5),f=dt(f,r,i,n,t[6],3225465664,9),n=dt(n,f,r,i,t[11],643717713,14),i=dt(i,n,f,r,t[0],3921069994,20),r=dt(r,i,n,f,t[5],3593408605,5),f=dt(f,r,i,n,t[10],38016083,9),n=dt(n,f,r,i,t[15],3634488961,14),i=dt(i,n,f,r,t[4],3889429448,20),r=dt(r,i,n,f,t[9],568446438,5),f=dt(f,r,i,n,t[14],3275163606,9),n=dt(n,f,r,i,t[3],4107603335,14),i=dt(i,n,f,r,t[8],1163531501,20),r=dt(r,i,n,f,t[13],2850285829,5),f=dt(f,r,i,n,t[2],4243563512,9),n=dt(n,f,r,i,t[7],1735328473,14),i=dt(i,n,f,r,t[12],2368359562,20),r=ct(r,i,n,f,t[5],4294588738,4),f=ct(f,r,i,n,t[8],2272392833,11),n=ct(n,f,r,i,t[11],1839030562,16),i=ct(i,n,f,r,t[14],4259657740,23),r=ct(r,i,n,f,t[1],2763975236,4),f=ct(f,r,i,n,t[4],1272893353,11),n=ct(n,f,r,i,t[7],4139469664,16),i=ct(i,n,f,r,t[10],3200236656,23),r=ct(r,i,n,f,t[13],681279174,4),f=ct(f,r,i,n,t[0],3936430074,11),n=ct(n,f,r,i,t[3],3572445317,16),i=ct(i,n,f,r,t[6],76029189,23),r=ct(r,i,n,f,t[9],3654602809,4),f=ct(f,r,i,n,t[12],3873151461,11),n=ct(n,f,r,i,t[15],530742520,16),i=ct(i,n,f,r,t[2],3299628645,23),r=ut(r,i,n,f,t[0],4096336452,6),f=ut(f,r,i,n,t[7],1126891415,10),n=ut(n,f,r,i,t[14],2878612391,15),i=ut(i,n,f,r,t[5],4237533241,21),r=ut(r,i,n,f,t[12],1700485571,6),f=ut(f,r,i,n,t[3],2399980690,10),n=ut(n,f,r,i,t[10],4293915773,15),i=ut(i,n,f,r,t[1],2240044497,21),r=ut(r,i,n,f,t[8],1873313359,6),f=ut(f,r,i,n,t[15],4264355552,10),n=ut(n,f,r,i,t[6],2734768916,15),i=ut(i,n,f,r,t[13],1309151649,21),r=ut(r,i,n,f,t[4],4149444226,6),f=ut(f,r,i,n,t[11],3174756917,10),n=ut(n,f,r,i,t[2],718787259,15),i=ut(i,n,f,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+i|0,this._c=this._c+n|0,this._d=this._d+f|0};us.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=j5.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t};function hs(t,e){return t<<e|t>>>32-e}function ot(t,e,r,i,n,f,a){return hs(t+(e&r|~e&i)+n+f|0,a)+e|0}function dt(t,e,r,i,n,f,a){return hs(t+(e&i|r&~i)+n+f|0,a)+e|0}function ct(t,e,r,i,n,f,a){return hs(t+(e^r^i)+n+f|0,a)+e|0}function ut(t,e,r,i,n,f,a){return hs(t+(r^(e|~i))+n+f|0,a)+e|0}Yh.exports=us});var ps=q((MM,il)=>{"use strict";var N0=Pt().Buffer,U5=F(),rl=D0(),z5=new Array(16),Jf=[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],Yf=[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],Zf=[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],$f=[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],Qf=[0,1518500249,1859775393,2400959708,2840853838],ea=[1352829926,1548603684,1836072691,2053994217,0];function bs(){rl.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}U5(bs,rl);bs.prototype._update=function(){for(var t=z5,e=0;e<16;++e)t[e]=this._block.readInt32LE(e*4);for(var r=this._a|0,i=this._b|0,n=this._c|0,f=this._d|0,a=this._e|0,o=this._a|0,u=this._b|0,g=this._c|0,_=this._d|0,x=this._e|0,E=0;E<80;E+=1){var B,I;E<16?(B=Zh(r,i,n,f,a,t[Jf[E]],Qf[0],Zf[E]),I=tl(o,u,g,_,x,t[Yf[E]],ea[0],$f[E])):E<32?(B=$h(r,i,n,f,a,t[Jf[E]],Qf[1],Zf[E]),I=el(o,u,g,_,x,t[Yf[E]],ea[1],$f[E])):E<48?(B=Qh(r,i,n,f,a,t[Jf[E]],Qf[2],Zf[E]),I=Qh(o,u,g,_,x,t[Yf[E]],ea[2],$f[E])):E<64?(B=el(r,i,n,f,a,t[Jf[E]],Qf[3],Zf[E]),I=$h(o,u,g,_,x,t[Yf[E]],ea[3],$f[E])):(B=tl(r,i,n,f,a,t[Jf[E]],Qf[4],Zf[E]),I=Zh(o,u,g,_,x,t[Yf[E]],ea[4],$f[E])),r=a,a=f,f=Ui(n,10),n=i,i=B,o=x,x=_,_=Ui(g,10),g=u,u=I}var R=this._b+n+_|0;this._b=this._c+f+x|0,this._c=this._d+a+o|0,this._d=this._e+r+u|0,this._e=this._a+i+g|0,this._a=R};bs.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=N0.alloc?N0.alloc(20):new N0(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t};function Ui(t,e){return t<<e|t>>>32-e}function Zh(t,e,r,i,n,f,a,o){return Ui(t+(e^r^i)+f+a|0,o)+n|0}function $h(t,e,r,i,n,f,a,o){return Ui(t+(e&r|~e&i)+f+a|0,o)+n|0}function Qh(t,e,r,i,n,f,a,o){return Ui(t+((e|~r)^i)+f+a|0,o)+n|0}function el(t,e,r,i,n,f,a,o){return Ui(t+(e&i|r&~i)+f+a|0,o)+n|0}function tl(t,e,r,i,n,f,a,o){return Ui(t+(e^(r|~i))+f+a|0,o)+n|0}il.exports=bs});var zi=q((EM,fl)=>{var nl=H().Buffer;function vs(t,e){this._block=nl.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}vs.prototype.update=function(t,e){typeof t=="string"&&(e=e||"utf8",t=nl.from(t,e));for(var r=this._block,i=this._blockSize,n=t.length,f=this._len,a=0;a<n;){for(var o=f%i,u=Math.min(n-a,i-o),g=0;g<u;g++)r[o+g]=t[a+g];f+=u,a+=u,f%i===0&&this._update(r)}return this._len+=n,this};vs.prototype.digest=function(t){var e=this._len%this._blockSize;this._block[e]=128,this._block.fill(0,e+1),e>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=this._len*8;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var i=(r&4294967295)>>>0,n=(r-i)/4294967296;this._block.writeUInt32BE(n,this._blockSize-8),this._block.writeUInt32BE(i,this._blockSize-4)}this._update(this._block);var f=this._hash();return t?f.toString(t):f};vs.prototype._update=function(){throw new Error("_update must be implemented by subclass")};fl.exports=vs});var ol=q((AM,sl)=>{var K5=F(),al=zi(),H5=H().Buffer,W5=[1518500249,1859775393,-1894007588,-899497514],V5=new Array(80);function ta(){this.init(),this._w=V5,al.call(this,64,56)}K5(ta,al);ta.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function G5(t){return t<<5|t>>>27}function X5(t){return t<<30|t>>>2}function J5(t,e,r,i){return t===0?e&r|~e&i:t===2?e&r|e&i|r&i:e^r^i}ta.prototype._update=function(t){for(var e=this._w,r=this._a|0,i=this._b|0,n=this._c|0,f=this._d|0,a=this._e|0,o=0;o<16;++o)e[o]=t.readInt32BE(o*4);for(;o<80;++o)e[o]=e[o-3]^e[o-8]^e[o-14]^e[o-16];for(var u=0;u<80;++u){var g=~~(u/20),_=G5(r)+J5(g,i,n,f)+a+e[u]+W5[g]|0;a=f,f=n,n=X5(i),i=r,r=_}this._a=r+this._a|0,this._b=i+this._b|0,this._c=n+this._c|0,this._d=f+this._d|0,this._e=a+this._e|0};ta.prototype._hash=function(){var t=H5.allocUnsafe(20);return t.writeInt32BE(this._a|0,0),t.writeInt32BE(this._b|0,4),t.writeInt32BE(this._c|0,8),t.writeInt32BE(this._d|0,12),t.writeInt32BE(this._e|0,16),t};sl.exports=ta});var ul=q((BM,cl)=>{var Y5=F(),dl=zi(),Z5=H().Buffer,$5=[1518500249,1859775393,-1894007588,-899497514],Q5=new Array(80);function ra(){this.init(),this._w=Q5,dl.call(this,64,56)}Y5(ra,dl);ra.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function e9(t){return t<<1|t>>>31}function t9(t){return t<<5|t>>>27}function r9(t){return t<<30|t>>>2}function i9(t,e,r,i){return t===0?e&r|~e&i:t===2?e&r|e&i|r&i:e^r^i}ra.prototype._update=function(t){for(var e=this._w,r=this._a|0,i=this._b|0,n=this._c|0,f=this._d|0,a=this._e|0,o=0;o<16;++o)e[o]=t.readInt32BE(o*4);for(;o<80;++o)e[o]=e9(e[o-3]^e[o-8]^e[o-14]^e[o-16]);for(var u=0;u<80;++u){var g=~~(u/20),_=t9(r)+i9(g,i,n,f)+a+e[u]+$5[g]|0;a=f,f=n,n=r9(i),i=r,r=_}this._a=r+this._a|0,this._b=i+this._b|0,this._c=n+this._c|0,this._d=f+this._d|0,this._e=a+this._e|0};ra.prototype._hash=function(){var t=Z5.allocUnsafe(20);return t.writeInt32BE(this._a|0,0),t.writeInt32BE(this._b|0,4),t.writeInt32BE(this._c|0,8),t.writeInt32BE(this._d|0,12),t.writeInt32BE(this._e|0,16),t};cl.exports=ra});var L0=q((qM,ll)=>{var n9=F(),hl=zi(),f9=H().Buffer,a9=[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],s9=new Array(64);function ia(){this.init(),this._w=s9,hl.call(this,64,56)}n9(ia,hl);ia.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function o9(t,e,r){return r^t&(e^r)}function d9(t,e,r){return t&e|r&(t|e)}function c9(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function u9(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function h9(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function l9(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10}ia.prototype._update=function(t){for(var e=this._w,r=this._a|0,i=this._b|0,n=this._c|0,f=this._d|0,a=this._e|0,o=this._f|0,u=this._g|0,g=this._h|0,_=0;_<16;++_)e[_]=t.readInt32BE(_*4);for(;_<64;++_)e[_]=l9(e[_-2])+e[_-7]+h9(e[_-15])+e[_-16]|0;for(var x=0;x<64;++x){var E=g+u9(a)+o9(a,o,u)+a9[x]+e[x]|0,B=c9(r)+d9(r,i,n)|0;g=u,u=o,o=a,a=f+E|0,f=n,n=i,i=r,r=E+B|0}this._a=r+this._a|0,this._b=i+this._b|0,this._c=n+this._c|0,this._d=f+this._d|0,this._e=a+this._e|0,this._f=o+this._f|0,this._g=u+this._g|0,this._h=g+this._h|0};ia.prototype._hash=function(){var t=f9.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t};ll.exports=ia});var pl=q((IM,bl)=>{var b9=F(),p9=L0(),v9=zi(),y9=H().Buffer,g9=new Array(64);function ys(){this.init(),this._w=g9,v9.call(this,64,56)}b9(ys,p9);ys.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this};ys.prototype._hash=function(){var t=y9.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t};bl.exports=ys});var O0=q((RM,xl)=>{var m9=F(),wl=zi(),_9=H().Buffer,vl=[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],w9=new Array(160);function na(){this.init(),this._w=w9,wl.call(this,128,112)}m9(na,wl);na.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function yl(t,e,r){return r^t&(e^r)}function gl(t,e,r){return t&e|r&(t|e)}function ml(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function _l(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function x9(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function S9(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function M9(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function E9(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function Ze(t,e){return t>>>0<e>>>0?1:0}na.prototype._update=function(t){for(var e=this._w,r=this._ah|0,i=this._bh|0,n=this._ch|0,f=this._dh|0,a=this._eh|0,o=this._fh|0,u=this._gh|0,g=this._hh|0,_=this._al|0,x=this._bl|0,E=this._cl|0,B=this._dl|0,I=this._el|0,R=this._fl|0,N=this._gl|0,P=this._hl|0,L=0;L<32;L+=2)e[L]=t.readInt32BE(L*4),e[L+1]=t.readInt32BE(L*4+4);for(;L<160;L+=2){var W=e[L-30],Be=e[L-15*2+1],qe=x9(W,Be),Ie=S9(Be,W);W=e[L-2*2],Be=e[L-2*2+1];var Ue=M9(W,Be),Ee=E9(Be,W),Ne=e[L-7*2],A=e[L-7*2+1],h=e[L-16*2],m=e[L-16*2+1],b=Ie+A|0,s=qe+Ne+Ze(b,Ie)|0;b=b+Ee|0,s=s+Ue+Ze(b,Ee)|0,b=b+m|0,s=s+h+Ze(b,m)|0,e[L]=s,e[L+1]=b}for(var c=0;c<160;c+=2){s=e[c],b=e[c+1];var p=gl(r,i,n),y=gl(_,x,E),v=ml(r,_),d=ml(_,r),w=_l(a,I),S=_l(I,a),l=vl[c],M=vl[c+1],C=yl(a,o,u),D=yl(I,R,N),T=P+S|0,j=g+w+Ze(T,P)|0;T=T+D|0,j=j+C+Ze(T,D)|0,T=T+M|0,j=j+l+Ze(T,M)|0,T=T+b|0,j=j+s+Ze(T,b)|0;var O=d+y|0,U=v+p+Ze(O,d)|0;g=u,P=N,u=o,N=R,o=a,R=I,I=B+T|0,a=f+j+Ze(I,B)|0,f=n,B=E,n=i,E=x,i=r,x=_,_=T+O|0,r=j+U+Ze(_,T)|0}this._al=this._al+_|0,this._bl=this._bl+x|0,this._cl=this._cl+E|0,this._dl=this._dl+B|0,this._el=this._el+I|0,this._fl=this._fl+R|0,this._gl=this._gl+N|0,this._hl=this._hl+P|0,this._ah=this._ah+r+Ze(this._al,_)|0,this._bh=this._bh+i+Ze(this._bl,x)|0,this._ch=this._ch+n+Ze(this._cl,E)|0,this._dh=this._dh+f+Ze(this._dl,B)|0,this._eh=this._eh+a+Ze(this._el,I)|0,this._fh=this._fh+o+Ze(this._fl,R)|0,this._gh=this._gh+u+Ze(this._gl,N)|0,this._hh=this._hh+g+Ze(this._hl,P)|0};na.prototype._hash=function(){var t=_9.allocUnsafe(64);function e(r,i,n){t.writeInt32BE(r,n),t.writeInt32BE(i,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t};xl.exports=na});var Ml=q((kM,Sl)=>{var A9=F(),B9=O0(),q9=zi(),I9=H().Buffer,R9=new Array(160);function gs(){this.init(),this._w=R9,q9.call(this,128,112)}A9(gs,B9);gs.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this};gs.prototype._hash=function(){var t=I9.allocUnsafe(48);function e(r,i,n){t.writeInt32BE(r,n),t.writeInt32BE(i,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t};Sl.exports=gs});var ms=q((Nr,El)=>{var Nr=El.exports=function(e){e=e.toLowerCase();var r=Nr[e];if(!r)throw new Error(e+" is not supported (we accept pull requests)");return new r};Nr.sha=ol();Nr.sha1=ul();Nr.sha224=pl();Nr.sha256=L0();Nr.sha384=Ml();Nr.sha512=O0()});var Bl=q((PM,Al)=>{Al.exports=Dt;var j0=Sn().EventEmitter,k9=F();k9(Dt,j0);Dt.Readable=es();Dt.Writable=Za();Dt.Duplex=ti();Dt.Transform=ds();Dt.PassThrough=P0();Dt.finished=Hf();Dt.pipeline=T0();Dt.Stream=Dt;function Dt(){j0.call(this)}Dt.prototype.pipe=function(t,e){var r=this;function i(_){t.writable&&t.write(_)===!1&&r.pause&&r.pause()}r.on("data",i);function n(){r.readable&&r.resume&&r.resume()}t.on("drain",n),!t._isStdio&&(!e||e.end!==!1)&&(r.on("end",a),r.on("close",o));var f=!1;function a(){f||(f=!0,t.end())}function o(){f||(f=!0,typeof t.destroy=="function"&&t.destroy())}function u(_){if(g(),j0.listenerCount(this,"error")===0)throw _}r.on("error",u),t.on("error",u);function g(){r.removeListener("data",i),t.removeListener("drain",n),r.removeListener("end",a),r.removeListener("close",o),r.removeListener("error",u),t.removeListener("error",u),r.removeListener("end",g),r.removeListener("close",g),t.removeListener("close",g)}return r.on("end",g),r.on("close",g),t.on("close",g),t.emit("pipe",r),t}});var Lr=q((CM,Rl)=>{var ql=H().Buffer,Il=Bl().Transform,P9=ts().StringDecoder,C9=F();function er(t){Il.call(this),this.hashMode=typeof t=="string",this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}C9(er,Il);er.prototype.update=function(t,e,r){typeof t=="string"&&(t=ql.from(t,e));var i=this._update(t);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)};er.prototype.setAutoPadding=function(){};er.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")};er.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")};er.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")};er.prototype._transform=function(t,e,r){var i;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(n){i=n}finally{r(i)}};er.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(r){e=r}t(e)};er.prototype._finalOrDigest=function(t){var e=this.__final()||ql.alloc(0);return t&&(e=this._toString(e,t,!0)),e};er.prototype._toString=function(t,e,r){if(this._decoder||(this._decoder=new P9(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var i=this._decoder.write(t);return r&&(i+=this._decoder.end()),i};Rl.exports=er});var qn=q((TM,Pl)=>{"use strict";var T9=F(),D9=ls(),N9=ps(),L9=ms(),kl=Lr();function _s(t){kl.call(this,"digest"),this._hash=t}T9(_s,kl);_s.prototype._update=function(t){this._hash.update(t)};_s.prototype._final=function(){return this._hash.digest()};Pl.exports=function(e){return e=e.toLowerCase(),e==="md5"?new D9:e==="rmd160"||e==="ripemd160"?new N9:new _s(L9(e))}});var Dl=q((DM,Tl)=>{"use strict";var O9=F(),Ki=H().Buffer,Cl=Lr(),j9=Ki.alloc(128),In=64;function ws(t,e){Cl.call(this,"digest"),typeof e=="string"&&(e=Ki.from(e)),this._alg=t,this._key=e,e.length>In?e=t(e):e.length<In&&(e=Ki.concat([e,j9],In));for(var r=this._ipad=Ki.allocUnsafe(In),i=this._opad=Ki.allocUnsafe(In),n=0;n<In;n++)r[n]=e[n]^54,i[n]=e[n]^92;this._hash=[r]}O9(ws,Cl);ws.prototype._update=function(t){this._hash.push(t)};ws.prototype._final=function(){var t=this._alg(Ki.concat(this._hash));return this._alg(Ki.concat([this._opad,t]))};Tl.exports=ws});var F0=q((NM,Nl)=>{var F9=ls();Nl.exports=function(t){return new F9().update(t).digest()}});var K0=q((LM,Ol)=>{"use strict";var U9=F(),z9=Dl(),Ll=Lr(),fa=H().Buffer,K9=F0(),U0=ps(),z0=ms(),H9=fa.alloc(128);function aa(t,e){Ll.call(this,"digest"),typeof e=="string"&&(e=fa.from(e));var r=t==="sha512"||t==="sha384"?128:64;if(this._alg=t,this._key=e,e.length>r){var i=t==="rmd160"?new U0:z0(t);e=i.update(e).digest()}else e.length<r&&(e=fa.concat([e,H9],r));for(var n=this._ipad=fa.allocUnsafe(r),f=this._opad=fa.allocUnsafe(r),a=0;a<r;a++)n[a]=e[a]^54,f[a]=e[a]^92;this._hash=t==="rmd160"?new U0:z0(t),this._hash.update(n)}U9(aa,Ll);aa.prototype._update=function(t){this._hash.update(t)};aa.prototype._final=function(){var t=this._hash.digest(),e=this._alg==="rmd160"?new U0:z0(this._alg);return e.update(this._opad).update(t).digest()};Ol.exports=function(e,r){return e=e.toLowerCase(),e==="rmd160"||e==="ripemd160"?new aa("rmd160",r):e==="md5"?new z9(K9,r):new aa(e,r)}});var H0=q((OM,W9)=>{W9.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"}}});var Fl=q((jM,jl)=>{"use strict";jl.exports=H0()});var W0=q((FM,Ul)=>{var V9=Math.pow(2,30)-1;Ul.exports=function(t,e){if(typeof t!="number")throw new TypeError("Iterations not a number");if(t<0)throw new TypeError("Bad iterations");if(typeof e!="number")throw new TypeError("Key length not a number");if(e<0||e>V9||e!==e)throw new TypeError("Bad key length")}});var V0=q((UM,Kl)=>{var xs;global.process&&global.process.browser?xs="utf-8":global.process&&global.process.version?(zl=parseInt(process.version.split(".")[0].slice(1),10),xs=zl>=6?"utf-8":"binary"):xs="utf-8";var zl;Kl.exports=xs});var X0=q((zM,Hl)=>{var G0=H().Buffer;Hl.exports=function(t,e,r){if(G0.isBuffer(t))return t;if(typeof t=="string")return G0.from(t,e);if(ArrayBuffer.isView(t))return G0.from(t.buffer);throw new TypeError(r+" must be a string, a Buffer, a typed array or a DataView")}});var J0=q((KM,Xl)=>{var G9=F0(),X9=ps(),J9=ms(),Hi=H().Buffer,Y9=W0(),Wl=V0(),Vl=X0(),Z9=Hi.alloc(128),Ss={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function Gl(t,e,r){var i=$9(t),n=t==="sha512"||t==="sha384"?128:64;e.length>n?e=i(e):e.length<n&&(e=Hi.concat([e,Z9],n));for(var f=Hi.allocUnsafe(n+Ss[t]),a=Hi.allocUnsafe(n+Ss[t]),o=0;o<n;o++)f[o]=e[o]^54,a[o]=e[o]^92;var u=Hi.allocUnsafe(n+r+4);f.copy(u,0,0,n),this.ipad1=u,this.ipad2=f,this.opad=a,this.alg=t,this.blocksize=n,this.hash=i,this.size=Ss[t]}Gl.prototype.run=function(t,e){t.copy(e,this.blocksize);var r=this.hash(e);return r.copy(this.opad,this.blocksize),this.hash(this.opad)};function $9(t){function e(i){return J9(t).update(i).digest()}function r(i){return new X9().update(i).digest()}return t==="rmd160"||t==="ripemd160"?r:t==="md5"?G9:e}function Q9(t,e,r,i,n){Y9(r,i),t=Vl(t,Wl,"Password"),e=Vl(e,Wl,"Salt"),n=n||"sha1";var f=new Gl(n,t,e.length),a=Hi.allocUnsafe(i),o=Hi.allocUnsafe(e.length+4);e.copy(o,0,0,e.length);for(var u=0,g=Ss[n],_=Math.ceil(i/g),x=1;x<=_;x++){o.writeUInt32BE(x,e.length);for(var E=f.run(o,f.ipad1),B=E,I=1;I<r;I++){B=f.run(B,f.ipad2);for(var R=0;R<g;R++)E[R]^=B[R]}E.copy(a,u),u+=g}return a}Xl.exports=Q9});var t1=q((HM,e1)=>{var $l=H().Buffer,e7=W0(),Jl=V0(),Yl=J0(),Zl=X0(),Ms,sa=global.crypto&&global.crypto.subtle,t7={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"},Y0=[];function r7(t){if(global.process&&!global.process.browser||!sa||!sa.importKey||!sa.deriveBits)return Promise.resolve(!1);if(Y0[t]!==void 0)return Y0[t];Ms=Ms||$l.alloc(8);var e=Ql(Ms,Ms,10,128,t).then(function(){return!0}).catch(function(){return!1});return Y0[t]=e,e}var Wi;function Z0(){return Wi||(global.process&&global.process.nextTick?Wi=global.process.nextTick:global.queueMicrotask?Wi=global.queueMicrotask:global.setImmediate?Wi=global.setImmediate:Wi=global.setTimeout,Wi)}function Ql(t,e,r,i,n){return sa.importKey("raw",t,{name:"PBKDF2"},!1,["deriveBits"]).then(function(f){return sa.deriveBits({name:"PBKDF2",salt:e,iterations:r,hash:{name:n}},f,i<<3)}).then(function(f){return $l.from(f)})}function i7(t,e){t.then(function(r){Z0()(function(){e(null,r)})},function(r){Z0()(function(){e(r)})})}e1.exports=function(t,e,r,i,n,f){typeof n=="function"&&(f=n,n=void 0),n=n||"sha1";var a=t7[n.toLowerCase()];if(!a||typeof global.Promise!="function"){Z0()(function(){var o;try{o=Yl(t,e,r,i,n)}catch(u){return f(u)}f(null,o)});return}if(e7(r,i),t=Zl(t,Jl,"Password"),e=Zl(e,Jl,"Salt"),typeof f!="function")throw new Error("No callback provided to pbkdf2");i7(r7(a).then(function(o){return o?Ql(t,e,r,i,a):Yl(t,e,r,i,n)}),f)}});var Es=q($0=>{$0.pbkdf2=t1();$0.pbkdf2Sync=J0()});var Q0=q(Nt=>{"use strict";Nt.readUInt32BE=function(e,r){var i=e[0+r]<<24|e[1+r]<<16|e[2+r]<<8|e[3+r];return i>>>0};Nt.writeUInt32BE=function(e,r,i){e[0+i]=r>>>24,e[1+i]=r>>>16&255,e[2+i]=r>>>8&255,e[3+i]=r&255};Nt.ip=function(e,r,i,n){for(var f=0,a=0,o=6;o>=0;o-=2){for(var u=0;u<=24;u+=8)f<<=1,f|=r>>>u+o&1;for(var u=0;u<=24;u+=8)f<<=1,f|=e>>>u+o&1}for(var o=6;o>=0;o-=2){for(var u=1;u<=25;u+=8)a<<=1,a|=r>>>u+o&1;for(var u=1;u<=25;u+=8)a<<=1,a|=e>>>u+o&1}i[n+0]=f>>>0,i[n+1]=a>>>0};Nt.rip=function(e,r,i,n){for(var f=0,a=0,o=0;o<4;o++)for(var u=24;u>=0;u-=8)f<<=1,f|=r>>>u+o&1,f<<=1,f|=e>>>u+o&1;for(var o=4;o<8;o++)for(var u=24;u>=0;u-=8)a<<=1,a|=r>>>u+o&1,a<<=1,a|=e>>>u+o&1;i[n+0]=f>>>0,i[n+1]=a>>>0};Nt.pc1=function(e,r,i,n){for(var f=0,a=0,o=7;o>=5;o--){for(var u=0;u<=24;u+=8)f<<=1,f|=r>>u+o&1;for(var u=0;u<=24;u+=8)f<<=1,f|=e>>u+o&1}for(var u=0;u<=24;u+=8)f<<=1,f|=r>>u+o&1;for(var o=1;o<=3;o++){for(var u=0;u<=24;u+=8)a<<=1,a|=r>>u+o&1;for(var u=0;u<=24;u+=8)a<<=1,a|=e>>u+o&1}for(var u=0;u<=24;u+=8)a<<=1,a|=e>>u+o&1;i[n+0]=f>>>0,i[n+1]=a>>>0};Nt.r28shl=function(e,r){return e<<r&268435455|e>>>28-r};var As=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];Nt.pc2=function(e,r,i,n){for(var f=0,a=0,o=As.length>>>1,u=0;u<o;u++)f<<=1,f|=e>>>As[u]&1;for(var u=o;u<As.length;u++)a<<=1,a|=r>>>As[u]&1;i[n+0]=f>>>0,i[n+1]=a>>>0};Nt.expand=function(e,r,i){var n=0,f=0;n=(e&1)<<5|e>>>27;for(var a=23;a>=15;a-=4)n<<=6,n|=e>>>a&63;for(var a=11;a>=3;a-=4)f|=e>>>a&63,f<<=6;f|=(e&31)<<1|e>>>31,r[i+0]=n>>>0,r[i+1]=f>>>0};var r1=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];Nt.substitute=function(e,r){for(var i=0,n=0;n<4;n++){var f=e>>>18-n*6&63,a=r1[n*64+f];i<<=4,i|=a}for(var n=0;n<4;n++){var f=r>>>18-n*6&63,a=r1[4*64+n*64+f];i<<=4,i|=a}return i>>>0};var i1=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];Nt.permute=function(e){for(var r=0,i=0;i<i1.length;i++)r<<=1,r|=e>>>i1[i]&1;return r>>>0};Nt.padSplit=function(e,r,i){for(var n=e.toString(2);n.length<r;)n="0"+n;for(var f=[],a=0;a<r;a+=i)f.push(n.slice(a,a+i));return f.join(" ")}});var vt=q((GM,f1)=>{f1.exports=n1;function n1(t,e){if(!t)throw new Error(e||"Assertion failed")}n1.equal=function(e,r,i){if(e!=r)throw new Error(i||"Assertion failed: "+e+" != "+r)}});var Bs=q((XM,a1)=>{"use strict";var n7=vt();function Lt(t){this.options=t,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}a1.exports=Lt;Lt.prototype._init=function(){};Lt.prototype.update=function(e){return e.length===0?[]:this.type==="decrypt"?this._updateDecrypt(e):this._updateEncrypt(e)};Lt.prototype._buffer=function(e,r){for(var i=Math.min(this.buffer.length-this.bufferOff,e.length-r),n=0;n<i;n++)this.buffer[this.bufferOff+n]=e[r+n];return this.bufferOff+=i,i};Lt.prototype._flushBuffer=function(e,r){return this._update(this.buffer,0,e,r),this.bufferOff=0,this.blockSize};Lt.prototype._updateEncrypt=function(e){var r=0,i=0,n=(this.bufferOff+e.length)/this.blockSize|0,f=new Array(n*this.blockSize);this.bufferOff!==0&&(r+=this._buffer(e,r),this.bufferOff===this.buffer.length&&(i+=this._flushBuffer(f,i)));for(var a=e.length-(e.length-r)%this.blockSize;r<a;r+=this.blockSize)this._update(e,r,f,i),i+=this.blockSize;for(;r<e.length;r++,this.bufferOff++)this.buffer[this.bufferOff]=e[r];return f};Lt.prototype._updateDecrypt=function(e){for(var r=0,i=0,n=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,f=new Array(n*this.blockSize);n>0;n--)r+=this._buffer(e,r),i+=this._flushBuffer(f,i);return r+=this._buffer(e,r),f};Lt.prototype.final=function(e){var r;e&&(r=this.update(e));var i;return this.type==="encrypt"?i=this._finalEncrypt():i=this._finalDecrypt(),r?r.concat(i):i};Lt.prototype._pad=function(e,r){if(r===0)return!1;for(;r<e.length;)e[r++]=0;return!0};Lt.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var e=new Array(this.blockSize);return this._update(this.buffer,0,e,0),e};Lt.prototype._unpad=function(e){return e};Lt.prototype._finalDecrypt=function(){n7.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)}});var ed=q((JM,d1)=>{"use strict";var s1=vt(),f7=F(),Je=Q0(),o1=Bs();function a7(){this.tmp=new Array(2),this.keys=null}function xr(t){o1.call(this,t);var e=new a7;this._desState=e,this.deriveKeys(e,t.key)}f7(xr,o1);d1.exports=xr;xr.create=function(e){return new xr(e)};var s7=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];xr.prototype.deriveKeys=function(e,r){e.keys=new Array(16*2),s1.equal(r.length,this.blockSize,"Invalid key length");var i=Je.readUInt32BE(r,0),n=Je.readUInt32BE(r,4);Je.pc1(i,n,e.tmp,0),i=e.tmp[0],n=e.tmp[1];for(var f=0;f<e.keys.length;f+=2){var a=s7[f>>>1];i=Je.r28shl(i,a),n=Je.r28shl(n,a),Je.pc2(i,n,e.keys,f)}};xr.prototype._update=function(e,r,i,n){var f=this._desState,a=Je.readUInt32BE(e,r),o=Je.readUInt32BE(e,r+4);Je.ip(a,o,f.tmp,0),a=f.tmp[0],o=f.tmp[1],this.type==="encrypt"?this._encrypt(f,a,o,f.tmp,0):this._decrypt(f,a,o,f.tmp,0),a=f.tmp[0],o=f.tmp[1],Je.writeUInt32BE(i,a,n),Je.writeUInt32BE(i,o,n+4)};xr.prototype._pad=function(e,r){for(var i=e.length-r,n=r;n<e.length;n++)e[n]=i;return!0};xr.prototype._unpad=function(e){for(var r=e[e.length-1],i=e.length-r;i<e.length;i++)s1.equal(e[i],r);return e.slice(0,e.length-r)};xr.prototype._encrypt=function(e,r,i,n,f){for(var a=r,o=i,u=0;u<e.keys.length;u+=2){var g=e.keys[u],_=e.keys[u+1];Je.expand(o,e.tmp,0),g^=e.tmp[0],_^=e.tmp[1];var x=Je.substitute(g,_),E=Je.permute(x),B=o;o=(a^E)>>>0,a=B}Je.rip(o,a,n,f)};xr.prototype._decrypt=function(e,r,i,n,f){for(var a=i,o=r,u=e.keys.length-2;u>=0;u-=2){var g=e.keys[u],_=e.keys[u+1];Je.expand(a,e.tmp,0),g^=e.tmp[0],_^=e.tmp[1];var x=Je.substitute(g,_),E=Je.permute(x),B=a;a=(o^E)>>>0,o=B}Je.rip(a,o,n,f)}});var u1=q(c1=>{"use strict";var o7=vt(),d7=F(),qs={};function c7(t){o7.equal(t.length,8,"Invalid IV length"),this.iv=new Array(8);for(var e=0;e<this.iv.length;e++)this.iv[e]=t[e]}function u7(t){function e(f){t.call(this,f),this._cbcInit()}d7(e,t);for(var r=Object.keys(qs),i=0;i<r.length;i++){var n=r[i];e.prototype[n]=qs[n]}return e.create=function(a){return new e(a)},e}c1.instantiate=u7;qs._cbcInit=function(){var e=new c7(this.options.iv);this._cbcState=e};qs._update=function(e,r,i,n){var f=this._cbcState,a=this.constructor.super_.prototype,o=f.iv;if(this.type==="encrypt"){for(var u=0;u<this.blockSize;u++)o[u]^=e[r+u];a._update.call(this,o,0,i,n);for(var u=0;u<this.blockSize;u++)o[u]=i[n+u]}else{a._update.call(this,e,r,i,n);for(var u=0;u<this.blockSize;u++)i[n+u]^=o[u];for(var u=0;u<this.blockSize;u++)o[u]=e[r+u]}}});var b1=q((ZM,l1)=>{"use strict";var h7=vt(),l7=F(),h1=Bs(),ai=ed();function b7(t,e){h7.equal(e.length,24,"Invalid key length");var r=e.slice(0,8),i=e.slice(8,16),n=e.slice(16,24);t==="encrypt"?this.ciphers=[ai.create({type:"encrypt",key:r}),ai.create({type:"decrypt",key:i}),ai.create({type:"encrypt",key:n})]:this.ciphers=[ai.create({type:"decrypt",key:n}),ai.create({type:"encrypt",key:i}),ai.create({type:"decrypt",key:r})]}function Vi(t){h1.call(this,t);var e=new b7(this.type,this.options.key);this._edeState=e}l7(Vi,h1);l1.exports=Vi;Vi.create=function(e){return new Vi(e)};Vi.prototype._update=function(e,r,i,n){var f=this._edeState;f.ciphers[0]._update(e,r,i,n),f.ciphers[1]._update(i,n,i,n),f.ciphers[2]._update(i,n,i,n)};Vi.prototype._pad=ai.prototype._pad;Vi.prototype._unpad=ai.prototype._unpad});var p1=q(Rn=>{"use strict";Rn.utils=Q0();Rn.Cipher=Bs();Rn.DES=ed();Rn.CBC=u1();Rn.EDE=b1()});var g1=q((QM,y1)=>{var v1=Lr(),Or=p1(),p7=F(),Gi=H().Buffer,oa={"des-ede3-cbc":Or.CBC.instantiate(Or.EDE),"des-ede3":Or.EDE,"des-ede-cbc":Or.CBC.instantiate(Or.EDE),"des-ede":Or.EDE,"des-cbc":Or.CBC.instantiate(Or.DES),"des-ecb":Or.DES};oa.des=oa["des-cbc"];oa.des3=oa["des-ede3-cbc"];y1.exports=Is;p7(Is,v1);function Is(t){v1.call(this);var e=t.mode.toLowerCase(),r=oa[e],i;t.decrypt?i="decrypt":i="encrypt";var n=t.key;Gi.isBuffer(n)||(n=Gi.from(n)),(e==="des-ede"||e==="des-ede-cbc")&&(n=Gi.concat([n,n.slice(0,8)]));var f=t.iv;Gi.isBuffer(f)||(f=Gi.from(f)),this._des=r.create({key:n,iv:f,type:i})}Is.prototype._update=function(t){return Gi.from(this._des.update(t))};Is.prototype._final=function(){return Gi.from(this._des.final())}});var m1=q(td=>{td.encrypt=function(t,e){return t._cipher.encryptBlock(e)};td.decrypt=function(t,e){return t._cipher.decryptBlock(e)}});var kn=q((tE,_1)=>{_1.exports=function(e,r){for(var i=Math.min(e.length,r.length),n=new Buffer(i),f=0;f<i;++f)n[f]=e[f]^r[f];return n}});var x1=q(rd=>{var w1=kn();rd.encrypt=function(t,e){var r=w1(e,t._prev);return t._prev=t._cipher.encryptBlock(r),t._prev};rd.decrypt=function(t,e){var r=t._prev;t._prev=e;var i=t._cipher.decryptBlock(e);return w1(i,r)}});var E1=q(M1=>{var da=H().Buffer,v7=kn();function S1(t,e,r){var i=e.length,n=v7(e,t._cache);return t._cache=t._cache.slice(i),t._prev=da.concat([t._prev,r?e:n]),n}M1.encrypt=function(t,e,r){for(var i=da.allocUnsafe(0),n;e.length;)if(t._cache.length===0&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=da.allocUnsafe(0)),t._cache.length<=e.length)n=t._cache.length,i=da.concat([i,S1(t,e.slice(0,n),r)]),e=e.slice(n);else{i=da.concat([i,S1(t,e,r)]);break}return i}});var B1=q(A1=>{var id=H().Buffer;function y7(t,e,r){var i=t._cipher.encryptBlock(t._prev),n=i[0]^e;return t._prev=id.concat([t._prev.slice(1),id.from([r?e:n])]),n}A1.encrypt=function(t,e,r){for(var i=e.length,n=id.allocUnsafe(i),f=-1;++f<i;)n[f]=y7(t,e[f],r);return n}});var I1=q(q1=>{var Rs=H().Buffer;function g7(t,e,r){for(var i,n=-1,f=8,a=0,o,u;++n<f;)i=t._cipher.encryptBlock(t._prev),o=e&1<<7-n?128:0,u=i[0]^o,a+=(u&128)>>n%8,t._prev=m7(t._prev,r?o:u);return a}function m7(t,e){var r=t.length,i=-1,n=Rs.allocUnsafe(t.length);for(t=Rs.concat([t,Rs.from([e])]);++i<r;)n[i]=t[i]<<1|t[i+1]>>7;return n}q1.encrypt=function(t,e,r){for(var i=e.length,n=Rs.allocUnsafe(i),f=-1;++f<i;)n[f]=g7(t,e[f],r);return n}});var k1=q(R1=>{var _7=kn();function w7(t){return t._prev=t._cipher.encryptBlock(t._prev),t._prev}R1.encrypt=function(t,e){for(;t._cache.length<e.length;)t._cache=Buffer.concat([t._cache,w7(t)]);var r=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),_7(e,r)}});var nd=q((sE,P1)=>{function x7(t){for(var e=t.length,r;e--;)if(r=t.readUInt8(e),r===255)t.writeUInt8(0,e);else{r++,t.writeUInt8(r,e);break}}P1.exports=x7});var ad=q(T1=>{var S7=kn(),C1=H().Buffer,M7=nd();function E7(t){var e=t._cipher.encryptBlockRaw(t._prev);return M7(t._prev),e}var fd=16;T1.encrypt=function(t,e){var r=Math.ceil(e.length/fd),i=t._cache.length;t._cache=C1.concat([t._cache,C1.allocUnsafe(r*fd)]);for(var n=0;n<r;n++){var f=E7(t),a=i+n*fd;t._cache.writeUInt32BE(f[0],a+0),t._cache.writeUInt32BE(f[1],a+4),t._cache.writeUInt32BE(f[2],a+8),t._cache.writeUInt32BE(f[3],a+12)}var o=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),S7(e,o)}});var sd=q((dE,A7)=>{A7.exports={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128:{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192:{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256:{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}}});var Ps=q((cE,D1)=>{var B7={ECB:m1(),CBC:x1(),CFB:E1(),CFB8:B1(),CFB1:I1(),OFB:k1(),CTR:ad(),GCM:ad()},ks=sd();for(od in ks)ks[od].module=B7[ks[od].mode];var od;D1.exports=ks});var ca=q((uE,L1)=>{var Cs=H().Buffer;function cd(t){Cs.isBuffer(t)||(t=Cs.from(t));for(var e=t.length/4|0,r=new Array(e),i=0;i<e;i++)r[i]=t.readUInt32BE(i*4);return r}function dd(t){for(var e=0;e<t.length;t++)t[e]=0}function N1(t,e,r,i,n){for(var f=r[0],a=r[1],o=r[2],u=r[3],g=t[0]^e[0],_=t[1]^e[1],x=t[2]^e[2],E=t[3]^e[3],B,I,R,N,P=4,L=1;L<n;L++)B=f[g>>>24]^a[_>>>16&255]^o[x>>>8&255]^u[E&255]^e[P++],I=f[_>>>24]^a[x>>>16&255]^o[E>>>8&255]^u[g&255]^e[P++],R=f[x>>>24]^a[E>>>16&255]^o[g>>>8&255]^u[_&255]^e[P++],N=f[E>>>24]^a[g>>>16&255]^o[_>>>8&255]^u[x&255]^e[P++],g=B,_=I,x=R,E=N;return B=(i[g>>>24]<<24|i[_>>>16&255]<<16|i[x>>>8&255]<<8|i[E&255])^e[P++],I=(i[_>>>24]<<24|i[x>>>16&255]<<16|i[E>>>8&255]<<8|i[g&255])^e[P++],R=(i[x>>>24]<<24|i[E>>>16&255]<<16|i[g>>>8&255]<<8|i[_&255])^e[P++],N=(i[E>>>24]<<24|i[g>>>16&255]<<16|i[_>>>8&255]<<8|i[x&255])^e[P++],B=B>>>0,I=I>>>0,R=R>>>0,N=N>>>0,[B,I,R,N]}var q7=[0,1,2,4,8,16,32,64,128,27,54],Ge=function(){for(var t=new Array(256),e=0;e<256;e++)e<128?t[e]=e<<1:t[e]=e<<1^283;for(var r=[],i=[],n=[[],[],[],[]],f=[[],[],[],[]],a=0,o=0,u=0;u<256;++u){var g=o^o<<1^o<<2^o<<3^o<<4;g=g>>>8^g&255^99,r[a]=g,i[g]=a;var _=t[a],x=t[_],E=t[x],B=t[g]*257^g*16843008;n[0][a]=B<<24|B>>>8,n[1][a]=B<<16|B>>>16,n[2][a]=B<<8|B>>>24,n[3][a]=B,B=E*16843009^x*65537^_*257^a*16843008,f[0][g]=B<<24|B>>>8,f[1][g]=B<<16|B>>>16,f[2][g]=B<<8|B>>>24,f[3][g]=B,a===0?a=o=1:(a=_^t[t[t[E^_]]],o^=t[t[o]])}return{SBOX:r,INV_SBOX:i,SUB_MIX:n,INV_SUB_MIX:f}}();function Ot(t){this._key=cd(t),this._reset()}Ot.blockSize=4*4;Ot.keySize=256/8;Ot.prototype.blockSize=Ot.blockSize;Ot.prototype.keySize=Ot.keySize;Ot.prototype._reset=function(){for(var t=this._key,e=t.length,r=e+6,i=(r+1)*4,n=[],f=0;f<e;f++)n[f]=t[f];for(f=e;f<i;f++){var a=n[f-1];f%e===0?(a=a<<8|a>>>24,a=Ge.SBOX[a>>>24]<<24|Ge.SBOX[a>>>16&255]<<16|Ge.SBOX[a>>>8&255]<<8|Ge.SBOX[a&255],a^=q7[f/e|0]<<24):e>6&&f%e===4&&(a=Ge.SBOX[a>>>24]<<24|Ge.SBOX[a>>>16&255]<<16|Ge.SBOX[a>>>8&255]<<8|Ge.SBOX[a&255]),n[f]=n[f-e]^a}for(var o=[],u=0;u<i;u++){var g=i-u,_=n[g-(u%4?0:4)];u<4||g<=4?o[u]=_:o[u]=Ge.INV_SUB_MIX[0][Ge.SBOX[_>>>24]]^Ge.INV_SUB_MIX[1][Ge.SBOX[_>>>16&255]]^Ge.INV_SUB_MIX[2][Ge.SBOX[_>>>8&255]]^Ge.INV_SUB_MIX[3][Ge.SBOX[_&255]]}this._nRounds=r,this._keySchedule=n,this._invKeySchedule=o};Ot.prototype.encryptBlockRaw=function(t){return t=cd(t),N1(t,this._keySchedule,Ge.SUB_MIX,Ge.SBOX,this._nRounds)};Ot.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),r=Cs.allocUnsafe(16);return r.writeUInt32BE(e[0],0),r.writeUInt32BE(e[1],4),r.writeUInt32BE(e[2],8),r.writeUInt32BE(e[3],12),r};Ot.prototype.decryptBlock=function(t){t=cd(t);var e=t[1];t[1]=t[3],t[3]=e;var r=N1(t,this._invKeySchedule,Ge.INV_SUB_MIX,Ge.INV_SBOX,this._nRounds),i=Cs.allocUnsafe(16);return i.writeUInt32BE(r[0],0),i.writeUInt32BE(r[3],4),i.writeUInt32BE(r[2],8),i.writeUInt32BE(r[1],12),i};Ot.prototype.scrub=function(){dd(this._keySchedule),dd(this._invKeySchedule),dd(this._key)};L1.exports.AES=Ot});var F1=q((hE,j1)=>{var Pn=H().Buffer,I7=Pn.alloc(16,0);function R7(t){return[t.readUInt32BE(0),t.readUInt32BE(4),t.readUInt32BE(8),t.readUInt32BE(12)]}function O1(t){var e=Pn.allocUnsafe(16);return e.writeUInt32BE(t[0]>>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function ua(t){this.h=t,this.state=Pn.alloc(16,0),this.cache=Pn.allocUnsafe(0)}ua.prototype.ghash=function(t){for(var e=-1;++e<t.length;)this.state[e]^=t[e];this._multiply()};ua.prototype._multiply=function(){for(var t=R7(this.h),e=[0,0,0,0],r,i,n,f=-1;++f<128;){for(i=(this.state[~~(f/8)]&1<<7-f%8)!==0,i&&(e[0]^=t[0],e[1]^=t[1],e[2]^=t[2],e[3]^=t[3]),n=(t[3]&1)!==0,r=3;r>0;r--)t[r]=t[r]>>>1|(t[r-1]&1)<<31;t[0]=t[0]>>>1,n&&(t[0]=t[0]^225<<24)}this.state=O1(e)};ua.prototype.update=function(t){this.cache=Pn.concat([this.cache,t]);for(var e;this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)};ua.prototype.final=function(t,e){return this.cache.length&&this.ghash(Pn.concat([this.cache,I7],16)),this.ghash(O1([0,t,0,e])),this.state};j1.exports=ua});var ud=q((lE,K1)=>{var k7=ca(),_t=H().Buffer,U1=Lr(),P7=F(),z1=F1(),C7=kn(),T7=nd();function D7(t,e){var r=0;t.length!==e.length&&r++;for(var i=Math.min(t.length,e.length),n=0;n<i;++n)r+=t[n]^e[n];return r}function N7(t,e,r){if(e.length===12)return t._finID=_t.concat([e,_t.from([0,0,0,1])]),_t.concat([e,_t.from([0,0,0,2])]);var i=new z1(r),n=e.length,f=n%16;i.update(e),f&&(f=16-f,i.update(_t.alloc(f,0))),i.update(_t.alloc(8,0));var a=n*8,o=_t.alloc(8);o.writeUIntBE(a,0,8),i.update(o),t._finID=i.state;var u=_t.from(t._finID);return T7(u),u}function Xi(t,e,r,i){U1.call(this);var n=_t.alloc(4,0);this._cipher=new k7.AES(e);var f=this._cipher.encryptBlock(n);this._ghash=new z1(f),r=N7(this,r,f),this._prev=_t.from(r),this._cache=_t.allocUnsafe(0),this._secCache=_t.allocUnsafe(0),this._decrypt=i,this._alen=0,this._len=0,this._mode=t,this._authTag=null,this._called=!1}P7(Xi,U1);Xi.prototype._update=function(t){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=_t.alloc(e,0),this._ghash.update(e))}this._called=!0;var r=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(r),this._len+=t.length,r};Xi.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=C7(this._ghash.final(this._alen*8,this._len*8),this._cipher.encryptBlock(this._finID));if(this._decrypt&&D7(t,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=t,this._cipher.scrub()};Xi.prototype.getAuthTag=function(){if(this._decrypt||!_t.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag};Xi.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e};Xi.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length};K1.exports=Xi});var ld=q((bE,W1)=>{var L7=ca(),hd=H().Buffer,H1=Lr(),O7=F();function Ts(t,e,r,i){H1.call(this),this._cipher=new L7.AES(e),this._prev=hd.from(r),this._cache=hd.allocUnsafe(0),this._secCache=hd.allocUnsafe(0),this._decrypt=i,this._mode=t}O7(Ts,H1);Ts.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)};Ts.prototype._final=function(){this._cipher.scrub()};W1.exports=Ts});var Cn=q((pE,V1)=>{var Ji=H().Buffer,j7=ls();function F7(t,e,r,i){if(Ji.isBuffer(t)||(t=Ji.from(t,"binary")),e&&(Ji.isBuffer(e)||(e=Ji.from(e,"binary")),e.length!==8))throw new RangeError("salt should be Buffer with 8 byte length");for(var n=r/8,f=Ji.alloc(n),a=Ji.alloc(i||0),o=Ji.alloc(0);n>0||i>0;){var u=new j7;u.update(o),u.update(t),e&&u.update(e),o=u.digest();var g=0;if(n>0){var _=f.length-n;g=Math.min(n,o.length),o.copy(f,_,0,g),n-=g}if(g<o.length&&i>0){var x=a.length-i,E=Math.min(i,o.length-g);o.copy(a,x,g,g+E),i-=E}}return o.fill(0),{key:f,iv:a}}V1.exports=F7});var Y1=q(bd=>{var G1=Ps(),U7=ud(),jr=H().Buffer,z7=ld(),X1=Lr(),K7=ca(),H7=Cn(),W7=F();function ha(t,e,r){X1.call(this),this._cache=new Ds,this._cipher=new K7.AES(e),this._prev=jr.from(r),this._mode=t,this._autopadding=!0}W7(ha,X1);ha.prototype._update=function(t){this._cache.add(t);for(var e,r,i=[];e=this._cache.get();)r=this._mode.encrypt(this,e),i.push(r);return jr.concat(i)};var V7=jr.alloc(16,16);ha.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if(!t.equals(V7))throw this._cipher.scrub(),new Error("data not multiple of block length")};ha.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this};function Ds(){this.cache=jr.allocUnsafe(0)}Ds.prototype.add=function(t){this.cache=jr.concat([this.cache,t])};Ds.prototype.get=function(){if(this.cache.length>15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null};Ds.prototype.flush=function(){for(var t=16-this.cache.length,e=jr.allocUnsafe(t),r=-1;++r<t;)e.writeUInt8(t,r);return jr.concat([this.cache,e])};function J1(t,e,r){var i=G1[t.toLowerCase()];if(!i)throw new TypeError("invalid suite type");if(typeof e=="string"&&(e=jr.from(e)),e.length!==i.key/8)throw new TypeError("invalid key length "+e.length);if(typeof r=="string"&&(r=jr.from(r)),i.mode!=="GCM"&&r.length!==i.iv)throw new TypeError("invalid iv length "+r.length);return i.type==="stream"?new z7(i.module,e,r):i.type==="auth"?new U7(i.module,e,r):new ha(i.module,e,r)}function G7(t,e){var r=G1[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=H7(e,!1,r.key,r.iv);return J1(t,i.key,i.iv)}bd.createCipheriv=J1;bd.createCipher=G7});var eb=q(pd=>{var X7=ud(),Tn=H().Buffer,Z1=Ps(),J7=ld(),$1=Lr(),Y7=ca(),Z7=Cn(),$7=F();function la(t,e,r){$1.call(this),this._cache=new Ns,this._last=void 0,this._cipher=new Y7.AES(e),this._prev=Tn.from(r),this._mode=t,this._autopadding=!0}$7(la,$1);la.prototype._update=function(t){this._cache.add(t);for(var e,r,i=[];e=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,e),i.push(r);return Tn.concat(i)};la.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return Q7(this._mode.decrypt(this,t));if(t)throw new Error("data not multiple of block length")};la.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this};function Ns(){this.cache=Tn.allocUnsafe(0)}Ns.prototype.add=function(t){this.cache=Tn.concat([this.cache,t])};Ns.prototype.get=function(t){var e;if(t){if(this.cache.length>16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null};Ns.prototype.flush=function(){if(this.cache.length)return this.cache};function Q7(t){var e=t[15];if(e<1||e>16)throw new Error("unable to decrypt data");for(var r=-1;++r<e;)if(t[r+(16-e)]!==e)throw new Error("unable to decrypt data");if(e!==16)return t.slice(0,16-e)}function Q1(t,e,r){var i=Z1[t.toLowerCase()];if(!i)throw new TypeError("invalid suite type");if(typeof r=="string"&&(r=Tn.from(r)),i.mode!=="GCM"&&r.length!==i.iv)throw new TypeError("invalid iv length "+r.length);if(typeof e=="string"&&(e=Tn.from(e)),e.length!==i.key/8)throw new TypeError("invalid key length "+e.length);return i.type==="stream"?new J7(i.module,e,r,!0):i.type==="auth"?new X7(i.module,e,r,!0):new la(i.module,e,r)}function ey(t,e){var r=Z1[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=Z7(e,!1,r.key,r.iv);return Q1(t,i.key,i.iv)}pd.createDecipher=ey;pd.createDecipheriv=Q1});var Dn=q(tr=>{var tb=Y1(),rb=eb(),ty=sd();function ry(){return Object.keys(ty)}tr.createCipher=tr.Cipher=tb.createCipher;tr.createCipheriv=tr.Cipheriv=tb.createCipheriv;tr.createDecipher=tr.Decipher=rb.createDecipher;tr.createDecipheriv=tr.Decipheriv=rb.createDecipheriv;tr.listCiphers=tr.getCiphers=ry});var ib=q(Fr=>{Fr["des-ecb"]={key:8,iv:0};Fr["des-cbc"]=Fr.des={key:8,iv:8};Fr["des-ede3-cbc"]=Fr.des3={key:24,iv:8};Fr["des-ede3"]={key:24,iv:0};Fr["des-ede-cbc"]={key:16,iv:8};Fr["des-ede"]={key:16,iv:0}});var ob=q(rr=>{var nb=g1(),vd=Dn(),si=Ps(),Ur=ib(),fb=Cn();function iy(t,e){t=t.toLowerCase();var r,i;if(si[t])r=si[t].key,i=si[t].iv;else if(Ur[t])r=Ur[t].key*8,i=Ur[t].iv;else throw new TypeError("invalid suite type");var n=fb(e,!1,r,i);return ab(t,n.key,n.iv)}function ny(t,e){t=t.toLowerCase();var r,i;if(si[t])r=si[t].key,i=si[t].iv;else if(Ur[t])r=Ur[t].key*8,i=Ur[t].iv;else throw new TypeError("invalid suite type");var n=fb(e,!1,r,i);return sb(t,n.key,n.iv)}function ab(t,e,r){if(t=t.toLowerCase(),si[t])return vd.createCipheriv(t,e,r);if(Ur[t])return new nb({key:e,iv:r,mode:t});throw new TypeError("invalid suite type")}function sb(t,e,r){if(t=t.toLowerCase(),si[t])return vd.createDecipheriv(t,e,r);if(Ur[t])return new nb({key:e,iv:r,mode:t,decrypt:!0});throw new TypeError("invalid suite type")}function fy(){return Object.keys(Ur).concat(vd.getCiphers())}rr.createCipher=rr.Cipher=iy;rr.createCipheriv=rr.Cipheriv=ab;rr.createDecipher=rr.Decipher=ny;rr.createDecipheriv=rr.Decipheriv=sb;rr.listCiphers=rr.getCiphers=fy});var yd=q(()=>{});var Pe=q((db,gd)=>{(function(t,e){"use strict";function r(A,h){if(!A)throw new Error(h||"Assertion failed")}function i(A,h){A.super_=h;var m=function(){};m.prototype=h.prototype,A.prototype=new m,A.prototype.constructor=A}function n(A,h,m){if(n.isBN(A))return A;this.negative=0,this.words=null,this.length=0,this.red=null,A!==null&&((h==="le"||h==="be")&&(m=h,h=10),this._init(A||0,h||10,m||"be"))}typeof t=="object"?t.exports=n:e.BN=n,n.BN=n,n.wordSize=26;var f;try{typeof window<"u"&&typeof window.Buffer<"u"?f=window.Buffer:f=yd().Buffer}catch(A){}n.isBN=function(h){return h instanceof n?!0:h!==null&&typeof h=="object"&&h.constructor.wordSize===n.wordSize&&Array.isArray(h.words)},n.max=function(h,m){return h.cmp(m)>0?h:m},n.min=function(h,m){return h.cmp(m)<0?h:m},n.prototype._init=function(h,m,b){if(typeof h=="number")return this._initNumber(h,m,b);if(typeof h=="object")return this._initArray(h,m,b);m==="hex"&&(m=16),r(m===(m|0)&&m>=2&&m<=36),h=h.toString().replace(/\s+/g,"");var s=0;h[0]==="-"&&(s++,this.negative=1),s<h.length&&(m===16?this._parseHex(h,s,b):(this._parseBase(h,m,s),b==="le"&&this._initArray(this.toArray(),m,b)))},n.prototype._initNumber=function(h,m,b){h<0&&(this.negative=1,h=-h),h<67108864?(this.words=[h&67108863],this.length=1):h<4503599627370496?(this.words=[h&67108863,h/67108864&67108863],this.length=2):(r(h<9007199254740992),this.words=[h&67108863,h/67108864&67108863,1],this.length=3),b==="le"&&this._initArray(this.toArray(),m,b)},n.prototype._initArray=function(h,m,b){if(r(typeof h.length=="number"),h.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(h.length/3),this.words=new Array(this.length);for(var s=0;s<this.length;s++)this.words[s]=0;var c,p,y=0;if(b==="be")for(s=h.length-1,c=0;s>=0;s-=3)p=h[s]|h[s-1]<<8|h[s-2]<<16,this.words[c]|=p<<y&67108863,this.words[c+1]=p>>>26-y&67108863,y+=24,y>=26&&(y-=26,c++);else if(b==="le")for(s=0,c=0;s<h.length;s+=3)p=h[s]|h[s+1]<<8|h[s+2]<<16,this.words[c]|=p<<y&67108863,this.words[c+1]=p>>>26-y&67108863,y+=24,y>=26&&(y-=26,c++);return this.strip()};function a(A,h){var m=A.charCodeAt(h);return m>=65&&m<=70?m-55:m>=97&&m<=102?m-87:m-48&15}function o(A,h,m){var b=a(A,m);return m-1>=h&&(b|=a(A,m-1)<<4),b}n.prototype._parseHex=function(h,m,b){this.length=Math.ceil((h.length-m)/6),this.words=new Array(this.length);for(var s=0;s<this.length;s++)this.words[s]=0;var c=0,p=0,y;if(b==="be")for(s=h.length-1;s>=m;s-=2)y=o(h,m,s)<<c,this.words[p]|=y&67108863,c>=18?(c-=18,p+=1,this.words[p]|=y>>>26):c+=8;else{var v=h.length-m;for(s=v%2===0?m+1:m;s<h.length;s+=2)y=o(h,m,s)<<c,this.words[p]|=y&67108863,c>=18?(c-=18,p+=1,this.words[p]|=y>>>26):c+=8}this.strip()};function u(A,h,m,b){for(var s=0,c=Math.min(A.length,m),p=h;p<c;p++){var y=A.charCodeAt(p)-48;s*=b,y>=49?s+=y-49+10:y>=17?s+=y-17+10:s+=y}return s}n.prototype._parseBase=function(h,m,b){this.words=[0],this.length=1;for(var s=0,c=1;c<=67108863;c*=m)s++;s--,c=c/m|0;for(var p=h.length-b,y=p%s,v=Math.min(p,p-y)+b,d=0,w=b;w<v;w+=s)d=u(h,w,w+s,m),this.imuln(c),this.words[0]+d<67108864?this.words[0]+=d:this._iaddn(d);if(y!==0){var S=1;for(d=u(h,w,h.length,m),w=0;w<y;w++)S*=m;this.imuln(S),this.words[0]+d<67108864?this.words[0]+=d:this._iaddn(d)}this.strip()},n.prototype.copy=function(h){h.words=new Array(this.length);for(var m=0;m<this.length;m++)h.words[m]=this.words[m];h.length=this.length,h.negative=this.negative,h.red=this.red},n.prototype.clone=function(){var h=new n(null);return this.copy(h),h},n.prototype._expand=function(h){for(;this.length<h;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},n.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var g=["","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"],_=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],x=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];n.prototype.toString=function(h,m){h=h||10,m=m|0||1;var b;if(h===16||h==="hex"){b="";for(var s=0,c=0,p=0;p<this.length;p++){var y=this.words[p],v=((y<<s|c)&16777215).toString(16);c=y>>>24-s&16777215,c!==0||p!==this.length-1?b=g[6-v.length]+v+b:b=v+b,s+=2,s>=26&&(s-=26,p--)}for(c!==0&&(b=c.toString(16)+b);b.length%m!==0;)b="0"+b;return this.negative!==0&&(b="-"+b),b}if(h===(h|0)&&h>=2&&h<=36){var d=_[h],w=x[h];b="";var S=this.clone();for(S.negative=0;!S.isZero();){var l=S.modn(w).toString(h);S=S.idivn(w),S.isZero()?b=l+b:b=g[d-l.length]+l+b}for(this.isZero()&&(b="0"+b);b.length%m!==0;)b="0"+b;return this.negative!==0&&(b="-"+b),b}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var h=this.words[0];return this.length===2?h+=this.words[1]*67108864:this.length===3&&this.words[2]===1?h+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-h:h},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(h,m){return r(typeof f<"u"),this.toArrayLike(f,h,m)},n.prototype.toArray=function(h,m){return this.toArrayLike(Array,h,m)},n.prototype.toArrayLike=function(h,m,b){var s=this.byteLength(),c=b||Math.max(1,s);r(s<=c,"byte array longer than desired length"),r(c>0,"Requested array length <= 0"),this.strip();var p=m==="le",y=new h(c),v,d,w=this.clone();if(p){for(d=0;!w.isZero();d++)v=w.andln(255),w.iushrn(8),y[d]=v;for(;d<c;d++)y[d]=0}else{for(d=0;d<c-s;d++)y[d]=0;for(d=0;!w.isZero();d++)v=w.andln(255),w.iushrn(8),y[c-d-1]=v}return y},Math.clz32?n.prototype._countBits=function(h){return 32-Math.clz32(h)}:n.prototype._countBits=function(h){var m=h,b=0;return m>=4096&&(b+=13,m>>>=13),m>=64&&(b+=7,m>>>=7),m>=8&&(b+=4,m>>>=4),m>=2&&(b+=2,m>>>=2),b+m},n.prototype._zeroBits=function(h){if(h===0)return 26;var m=h,b=0;return(m&8191)===0&&(b+=13,m>>>=13),(m&127)===0&&(b+=7,m>>>=7),(m&15)===0&&(b+=4,m>>>=4),(m&3)===0&&(b+=2,m>>>=2),(m&1)===0&&b++,b},n.prototype.bitLength=function(){var h=this.words[this.length-1],m=this._countBits(h);return(this.length-1)*26+m};function E(A){for(var h=new Array(A.bitLength()),m=0;m<h.length;m++){var b=m/26|0,s=m%26;h[m]=(A.words[b]&1<<s)>>>s}return h}n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var h=0,m=0;m<this.length;m++){var b=this._zeroBits(this.words[m]);if(h+=b,b!==26)break}return h},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(h){return this.negative!==0?this.abs().inotn(h).iaddn(1):this.clone()},n.prototype.fromTwos=function(h){return this.testn(h-1)?this.notn(h).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return this.negative!==0},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(h){for(;this.length<h.length;)this.words[this.length++]=0;for(var m=0;m<h.length;m++)this.words[m]=this.words[m]|h.words[m];return this.strip()},n.prototype.ior=function(h){return r((this.negative|h.negative)===0),this.iuor(h)},n.prototype.or=function(h){return this.length>h.length?this.clone().ior(h):h.clone().ior(this)},n.prototype.uor=function(h){return this.length>h.length?this.clone().iuor(h):h.clone().iuor(this)},n.prototype.iuand=function(h){var m;this.length>h.length?m=h:m=this;for(var b=0;b<m.length;b++)this.words[b]=this.words[b]&h.words[b];return this.length=m.length,this.strip()},n.prototype.iand=function(h){return r((this.negative|h.negative)===0),this.iuand(h)},n.prototype.and=function(h){return this.length>h.length?this.clone().iand(h):h.clone().iand(this)},n.prototype.uand=function(h){return this.length>h.length?this.clone().iuand(h):h.clone().iuand(this)},n.prototype.iuxor=function(h){var m,b;this.length>h.length?(m=this,b=h):(m=h,b=this);for(var s=0;s<b.length;s++)this.words[s]=m.words[s]^b.words[s];if(this!==m)for(;s<m.length;s++)this.words[s]=m.words[s];return this.length=m.length,this.strip()},n.prototype.ixor=function(h){return r((this.negative|h.negative)===0),this.iuxor(h)},n.prototype.xor=function(h){return this.length>h.length?this.clone().ixor(h):h.clone().ixor(this)},n.prototype.uxor=function(h){return this.length>h.length?this.clone().iuxor(h):h.clone().iuxor(this)},n.prototype.inotn=function(h){r(typeof h=="number"&&h>=0);var m=Math.ceil(h/26)|0,b=h%26;this._expand(m),b>0&&m--;for(var s=0;s<m;s++)this.words[s]=~this.words[s]&67108863;return b>0&&(this.words[s]=~this.words[s]&67108863>>26-b),this.strip()},n.prototype.notn=function(h){return this.clone().inotn(h)},n.prototype.setn=function(h,m){r(typeof h=="number"&&h>=0);var b=h/26|0,s=h%26;return this._expand(b+1),m?this.words[b]=this.words[b]|1<<s:this.words[b]=this.words[b]&~(1<<s),this.strip()},n.prototype.iadd=function(h){var m;if(this.negative!==0&&h.negative===0)return this.negative=0,m=this.isub(h),this.negative^=1,this._normSign();if(this.negative===0&&h.negative!==0)return h.negative=0,m=this.isub(h),h.negative=1,m._normSign();var b,s;this.length>h.length?(b=this,s=h):(b=h,s=this);for(var c=0,p=0;p<s.length;p++)m=(b.words[p]|0)+(s.words[p]|0)+c,this.words[p]=m&67108863,c=m>>>26;for(;c!==0&&p<b.length;p++)m=(b.words[p]|0)+c,this.words[p]=m&67108863,c=m>>>26;if(this.length=b.length,c!==0)this.words[this.length]=c,this.length++;else if(b!==this)for(;p<b.length;p++)this.words[p]=b.words[p];return this},n.prototype.add=function(h){var m;return h.negative!==0&&this.negative===0?(h.negative=0,m=this.sub(h),h.negative^=1,m):h.negative===0&&this.negative!==0?(this.negative=0,m=h.sub(this),this.negative=1,m):this.length>h.length?this.clone().iadd(h):h.clone().iadd(this)},n.prototype.isub=function(h){if(h.negative!==0){h.negative=0;var m=this.iadd(h);return h.negative=1,m._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(h),this.negative=1,this._normSign();var b=this.cmp(h);if(b===0)return this.negative=0,this.length=1,this.words[0]=0,this;var s,c;b>0?(s=this,c=h):(s=h,c=this);for(var p=0,y=0;y<c.length;y++)m=(s.words[y]|0)-(c.words[y]|0)+p,p=m>>26,this.words[y]=m&67108863;for(;p!==0&&y<s.length;y++)m=(s.words[y]|0)+p,p=m>>26,this.words[y]=m&67108863;if(p===0&&y<s.length&&s!==this)for(;y<s.length;y++)this.words[y]=s.words[y];return this.length=Math.max(this.length,y),s!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(h){return this.clone().isub(h)};function B(A,h,m){m.negative=h.negative^A.negative;var b=A.length+h.length|0;m.length=b,b=b-1|0;var s=A.words[0]|0,c=h.words[0]|0,p=s*c,y=p&67108863,v=p/67108864|0;m.words[0]=y;for(var d=1;d<b;d++){for(var w=v>>>26,S=v&67108863,l=Math.min(d,h.length-1),M=Math.max(0,d-A.length+1);M<=l;M++){var C=d-M|0;s=A.words[C]|0,c=h.words[M]|0,p=s*c+S,w+=p/67108864|0,S=p&67108863}m.words[d]=S|0,v=w|0}return v!==0?m.words[d]=v|0:m.length--,m.strip()}var I=function(h,m,b){var s=h.words,c=m.words,p=b.words,y=0,v,d,w,S=s[0]|0,l=S&8191,M=S>>>13,C=s[1]|0,D=C&8191,T=C>>>13,j=s[2]|0,O=j&8191,U=j>>>13,Qt=s[3]|0,z=Qt&8191,K=Qt>>>13,xf=s[4]|0,V=xf&8191,G=xf>>>13,Sf=s[5]|0,X=Sf&8191,J=Sf>>>13,Mf=s[6]|0,Y=Mf&8191,Z=Mf>>>13,Ef=s[7]|0,$=Ef&8191,Q=Ef>>>13,Af=s[8]|0,ee=Af&8191,te=Af>>>13,Bf=s[9]|0,re=Bf&8191,ie=Bf>>>13,qf=c[0]|0,ne=qf&8191,fe=qf>>>13,If=c[1]|0,ae=If&8191,se=If>>>13,Rf=c[2]|0,oe=Rf&8191,de=Rf>>>13,kf=c[3]|0,ce=kf&8191,ue=kf>>>13,Pf=c[4]|0,he=Pf&8191,le=Pf>>>13,Cf=c[5]|0,be=Cf&8191,pe=Cf>>>13,Tf=c[6]|0,ve=Tf&8191,ye=Tf>>>13,Df=c[7]|0,ge=Df&8191,me=Df>>>13,Nf=c[8]|0,_e=Nf&8191,we=Nf>>>13,Lf=c[9]|0,xe=Lf&8191,Se=Lf>>>13;b.negative=h.negative^m.negative,b.length=19,v=Math.imul(l,ne),d=Math.imul(l,fe),d=d+Math.imul(M,ne)|0,w=Math.imul(M,fe);var yn=(y+v|0)+((d&8191)<<13)|0;y=(w+(d>>>13)|0)+(yn>>>26)|0,yn&=67108863,v=Math.imul(D,ne),d=Math.imul(D,fe),d=d+Math.imul(T,ne)|0,w=Math.imul(T,fe),v=v+Math.imul(l,ae)|0,d=d+Math.imul(l,se)|0,d=d+Math.imul(M,ae)|0,w=w+Math.imul(M,se)|0;var ze=(y+v|0)+((d&8191)<<13)|0;y=(w+(d>>>13)|0)+(ze>>>26)|0,ze&=67108863,v=Math.imul(O,ne),d=Math.imul(O,fe),d=d+Math.imul(U,ne)|0,w=Math.imul(U,fe),v=v+Math.imul(D,ae)|0,d=d+Math.imul(D,se)|0,d=d+Math.imul(T,ae)|0,w=w+Math.imul(T,se)|0,v=v+Math.imul(l,oe)|0,d=d+Math.imul(l,de)|0,d=d+Math.imul(M,oe)|0,w=w+Math.imul(M,de)|0;var Ke=(y+v|0)+((d&8191)<<13)|0;y=(w+(d>>>13)|0)+(Ke>>>26)|0,Ke&=67108863,v=Math.imul(z,ne),d=Math.imul(z,fe),d=d+Math.imul(K,ne)|0,w=Math.imul(K,fe),v=v+Math.imul(O,ae)|0,d=d+Math.imul(O,se)|0,d=d+Math.imul(U,ae)|0,w=w+Math.imul(U,se)|0,v=v+Math.imul(D,oe)|0,d=d+Math.imul(D,de)|0,d=d+Math.imul(T,oe)|0,w=w+Math.imul(T,de)|0,v=v+Math.imul(l,ce)|0,d=d+Math.imul(l,ue)|0,d=d+Math.imul(M,ce)|0,w=w+Math.imul(M,ue)|0;var yi=(y+v|0)+((d&8191)<<13)|0;y=(w+(d>>>13)|0)+(yi>>>26)|0,yi&=67108863,v=Math.imul(V,ne),d=Math.imul(V,fe),d=d+Math.imul(G,ne)|0,w=Math.imul(G,fe),v=v+Math.imul(z,ae)|0,d=d+Math.imul(z,se)|0,d=d+Math.imul(K,ae)|0,w=w+Math.imul(K,se)|0,v=v+Math.imul(O,oe)|0,d=d+Math.imul(O,de)|0,d=d+Math.imul(U,oe)|0,w=w+Math.imul(U,de)|0,v=v+Math.imul(D,ce)|0,d=d+Math.imul(D,ue)|0,d=d+Math.imul(T,ce)|0,w=w+Math.imul(T,ue)|0,v=v+Math.imul(l,he)|0,d=d+Math.imul(l,le)|0,d=d+Math.imul(M,he)|0,w=w+Math.imul(M,le)|0;var gi=(y+v|0)+((d&8191)<<13)|0;y=(w+(d>>>13)|0)+(gi>>>26)|0,gi&=67108863,v=Math.imul(X,ne),d=Math.imul(X,fe),d=d+Math.imul(J,ne)|0,w=Math.imul(J,fe),v=v+Math.imul(V,ae)|0,d=d+Math.imul(V,se)|0,d=d+Math.imul(G,ae)|0,w=w+Math.imul(G,se)|0,v=v+Math.imul(z,oe)|0,d=d+Math.imul(z,de)|0,d=d+Math.imul(K,oe)|0,w=w+Math.imul(K,de)|0,v=v+Math.imul(O,ce)|0,d=d+Math.imul(O,ue)|0,d=d+Math.imul(U,ce)|0,w=w+Math.imul(U,ue)|0,v=v+Math.imul(D,he)|0,d=d+Math.imul(D,le)|0,d=d+Math.imul(T,he)|0,w=w+Math.imul(T,le)|0,v=v+Math.imul(l,be)|0,d=d+Math.imul(l,pe)|0,d=d+Math.imul(M,be)|0,w=w+Math.imul(M,pe)|0;var mi=(y+v|0)+((d&8191)<<13)|0;y=(w+(d>>>13)|0)+(mi>>>26)|0,mi&=67108863,v=Math.imul(Y,ne),d=Math.imul(Y,fe),d=d+Math.imul(Z,ne)|0,w=Math.imul(Z,fe),v=v+Math.imul(X,ae)|0,d=d+Math.imul(X,se)|0,d=d+Math.imul(J,ae)|0,w=w+Math.imul(J,se)|0,v=v+Math.imul(V,oe)|0,d=d+Math.imul(V,de)|0,d=d+Math.imul(G,oe)|0,w=w+Math.imul(G,de)|0,v=v+Math.imul(z,ce)|0,d=d+Math.imul(z,ue)|0,d=d+Math.imul(K,ce)|0,w=w+Math.imul(K,ue)|0,v=v+Math.imul(O,he)|0,d=d+Math.imul(O,le)|0,d=d+Math.imul(U,he)|0,w=w+Math.imul(U,le)|0,v=v+Math.imul(D,be)|0,d=d+Math.imul(D,pe)|0,d=d+Math.imul(T,be)|0,w=w+Math.imul(T,pe)|0,v=v+Math.imul(l,ve)|0,d=d+Math.imul(l,ye)|0,d=d+Math.imul(M,ve)|0,w=w+Math.imul(M,ye)|0;var _i=(y+v|0)+((d&8191)<<13)|0;y=(w+(d>>>13)|0)+(_i>>>26)|0,_i&=67108863,v=Math.imul($,ne),d=Math.imul($,fe),d=d+Math.imul(Q,ne)|0,w=Math.imul(Q,fe),v=v+Math.imul(Y,ae)|0,d=d+Math.imul(Y,se)|0,d=d+Math.imul(Z,ae)|0,w=w+Math.imul(Z,se)|0,v=v+Math.imul(X,oe)|0,d=d+Math.imul(X,de)|0,d=d+Math.imul(J,oe)|0,w=w+Math.imul(J,de)|0,v=v+Math.imul(V,ce)|0,d=d+Math.imul(V,ue)|0,d=d+Math.imul(G,ce)|0,w=w+Math.imul(G,ue)|0,v=v+Math.imul(z,he)|0,d=d+Math.imul(z,le)|0,d=d+Math.imul(K,he)|0,w=w+Math.imul(K,le)|0,v=v+Math.imul(O,be)|0,d=d+Math.imul(O,pe)|0,d=d+Math.imul(U,be)|0,w=w+Math.imul(U,pe)|0,v=v+Math.imul(D,ve)|0,d=d+Math.imul(D,ye)|0,d=d+Math.imul(T,ve)|0,w=w+Math.imul(T,ye)|0,v=v+Math.imul(l,ge)|0,d=d+Math.imul(l,me)|0,d=d+Math.imul(M,ge)|0,w=w+Math.imul(M,me)|0;var wi=(y+v|0)+((d&8191)<<13)|0;y=(w+(d>>>13)|0)+(wi>>>26)|0,wi&=67108863,v=Math.imul(ee,ne),d=Math.imul(ee,fe),d=d+Math.imul(te,ne)|0,w=Math.imul(te,fe),v=v+Math.imul($,ae)|0,d=d+Math.imul($,se)|0,d=d+Math.imul(Q,ae)|0,w=w+Math.imul(Q,se)|0,v=v+Math.imul(Y,oe)|0,d=d+Math.imul(Y,de)|0,d=d+Math.imul(Z,oe)|0,w=w+Math.imul(Z,de)|0,v=v+Math.imul(X,ce)|0,d=d+Math.imul(X,ue)|0,d=d+Math.imul(J,ce)|0,w=w+Math.imul(J,ue)|0,v=v+Math.imul(V,he)|0,d=d+Math.imul(V,le)|0,d=d+Math.imul(G,he)|0,w=w+Math.imul(G,le)|0,v=v+Math.imul(z,be)|0,d=d+Math.imul(z,pe)|0,d=d+Math.imul(K,be)|0,w=w+Math.imul(K,pe)|0,v=v+Math.imul(O,ve)|0,d=d+Math.imul(O,ye)|0,d=d+Math.imul(U,ve)|0,w=w+Math.imul(U,ye)|0,v=v+Math.imul(D,ge)|0,d=d+Math.imul(D,me)|0,d=d+Math.imul(T,ge)|0,w=w+Math.imul(T,me)|0,v=v+Math.imul(l,_e)|0,d=d+Math.imul(l,we)|0,d=d+Math.imul(M,_e)|0,w=w+Math.imul(M,we)|0;var xi=(y+v|0)+((d&8191)<<13)|0;y=(w+(d>>>13)|0)+(xi>>>26)|0,xi&=67108863,v=Math.imul(re,ne),d=Math.imul(re,fe),d=d+Math.imul(ie,ne)|0,w=Math.imul(ie,fe),v=v+Math.imul(ee,ae)|0,d=d+Math.imul(ee,se)|0,d=d+Math.imul(te,ae)|0,w=w+Math.imul(te,se)|0,v=v+Math.imul($,oe)|0,d=d+Math.imul($,de)|0,d=d+Math.imul(Q,oe)|0,w=w+Math.imul(Q,de)|0,v=v+Math.imul(Y,ce)|0,d=d+Math.imul(Y,ue)|0,d=d+Math.imul(Z,ce)|0,w=w+Math.imul(Z,ue)|0,v=v+Math.imul(X,he)|0,d=d+Math.imul(X,le)|0,d=d+Math.imul(J,he)|0,w=w+Math.imul(J,le)|0,v=v+Math.imul(V,be)|0,d=d+Math.imul(V,pe)|0,d=d+Math.imul(G,be)|0,w=w+Math.imul(G,pe)|0,v=v+Math.imul(z,ve)|0,d=d+Math.imul(z,ye)|0,d=d+Math.imul(K,ve)|0,w=w+Math.imul(K,ye)|0,v=v+Math.imul(O,ge)|0,d=d+Math.imul(O,me)|0,d=d+Math.imul(U,ge)|0,w=w+Math.imul(U,me)|0,v=v+Math.imul(D,_e)|0,d=d+Math.imul(D,we)|0,d=d+Math.imul(T,_e)|0,w=w+Math.imul(T,we)|0,v=v+Math.imul(l,xe)|0,d=d+Math.imul(l,Se)|0,d=d+Math.imul(M,xe)|0,w=w+Math.imul(M,Se)|0;var Si=(y+v|0)+((d&8191)<<13)|0;y=(w+(d>>>13)|0)+(Si>>>26)|0,Si&=67108863,v=Math.imul(re,ae),d=Math.imul(re,se),d=d+Math.imul(ie,ae)|0,w=Math.imul(ie,se),v=v+Math.imul(ee,oe)|0,d=d+Math.imul(ee,de)|0,d=d+Math.imul(te,oe)|0,w=w+Math.imul(te,de)|0,v=v+Math.imul($,ce)|0,d=d+Math.imul($,ue)|0,d=d+Math.imul(Q,ce)|0,w=w+Math.imul(Q,ue)|0,v=v+Math.imul(Y,he)|0,d=d+Math.imul(Y,le)|0,d=d+Math.imul(Z,he)|0,w=w+Math.imul(Z,le)|0,v=v+Math.imul(X,be)|0,d=d+Math.imul(X,pe)|0,d=d+Math.imul(J,be)|0,w=w+Math.imul(J,pe)|0,v=v+Math.imul(V,ve)|0,d=d+Math.imul(V,ye)|0,d=d+Math.imul(G,ve)|0,w=w+Math.imul(G,ye)|0,v=v+Math.imul(z,ge)|0,d=d+Math.imul(z,me)|0,d=d+Math.imul(K,ge)|0,w=w+Math.imul(K,me)|0,v=v+Math.imul(O,_e)|0,d=d+Math.imul(O,we)|0,d=d+Math.imul(U,_e)|0,w=w+Math.imul(U,we)|0,v=v+Math.imul(D,xe)|0,d=d+Math.imul(D,Se)|0,d=d+Math.imul(T,xe)|0,w=w+Math.imul(T,Se)|0;var Mi=(y+v|0)+((d&8191)<<13)|0;y=(w+(d>>>13)|0)+(Mi>>>26)|0,Mi&=67108863,v=Math.imul(re,oe),d=Math.imul(re,de),d=d+Math.imul(ie,oe)|0,w=Math.imul(ie,de),v=v+Math.imul(ee,ce)|0,d=d+Math.imul(ee,ue)|0,d=d+Math.imul(te,ce)|0,w=w+Math.imul(te,ue)|0,v=v+Math.imul($,he)|0,d=d+Math.imul($,le)|0,d=d+Math.imul(Q,he)|0,w=w+Math.imul(Q,le)|0,v=v+Math.imul(Y,be)|0,d=d+Math.imul(Y,pe)|0,d=d+Math.imul(Z,be)|0,w=w+Math.imul(Z,pe)|0,v=v+Math.imul(X,ve)|0,d=d+Math.imul(X,ye)|0,d=d+Math.imul(J,ve)|0,w=w+Math.imul(J,ye)|0,v=v+Math.imul(V,ge)|0,d=d+Math.imul(V,me)|0,d=d+Math.imul(G,ge)|0,w=w+Math.imul(G,me)|0,v=v+Math.imul(z,_e)|0,d=d+Math.imul(z,we)|0,d=d+Math.imul(K,_e)|0,w=w+Math.imul(K,we)|0,v=v+Math.imul(O,xe)|0,d=d+Math.imul(O,Se)|0,d=d+Math.imul(U,xe)|0,w=w+Math.imul(U,Se)|0;var Ei=(y+v|0)+((d&8191)<<13)|0;y=(w+(d>>>13)|0)+(Ei>>>26)|0,Ei&=67108863,v=Math.imul(re,ce),d=Math.imul(re,ue),d=d+Math.imul(ie,ce)|0,w=Math.imul(ie,ue),v=v+Math.imul(ee,he)|0,d=d+Math.imul(ee,le)|0,d=d+Math.imul(te,he)|0,w=w+Math.imul(te,le)|0,v=v+Math.imul($,be)|0,d=d+Math.imul($,pe)|0,d=d+Math.imul(Q,be)|0,w=w+Math.imul(Q,pe)|0,v=v+Math.imul(Y,ve)|0,d=d+Math.imul(Y,ye)|0,d=d+Math.imul(Z,ve)|0,w=w+Math.imul(Z,ye)|0,v=v+Math.imul(X,ge)|0,d=d+Math.imul(X,me)|0,d=d+Math.imul(J,ge)|0,w=w+Math.imul(J,me)|0,v=v+Math.imul(V,_e)|0,d=d+Math.imul(V,we)|0,d=d+Math.imul(G,_e)|0,w=w+Math.imul(G,we)|0,v=v+Math.imul(z,xe)|0,d=d+Math.imul(z,Se)|0,d=d+Math.imul(K,xe)|0,w=w+Math.imul(K,Se)|0;var Ai=(y+v|0)+((d&8191)<<13)|0;y=(w+(d>>>13)|0)+(Ai>>>26)|0,Ai&=67108863,v=Math.imul(re,he),d=Math.imul(re,le),d=d+Math.imul(ie,he)|0,w=Math.imul(ie,le),v=v+Math.imul(ee,be)|0,d=d+Math.imul(ee,pe)|0,d=d+Math.imul(te,be)|0,w=w+Math.imul(te,pe)|0,v=v+Math.imul($,ve)|0,d=d+Math.imul($,ye)|0,d=d+Math.imul(Q,ve)|0,w=w+Math.imul(Q,ye)|0,v=v+Math.imul(Y,ge)|0,d=d+Math.imul(Y,me)|0,d=d+Math.imul(Z,ge)|0,w=w+Math.imul(Z,me)|0,v=v+Math.imul(X,_e)|0,d=d+Math.imul(X,we)|0,d=d+Math.imul(J,_e)|0,w=w+Math.imul(J,we)|0,v=v+Math.imul(V,xe)|0,d=d+Math.imul(V,Se)|0,d=d+Math.imul(G,xe)|0,w=w+Math.imul(G,Se)|0;var Bi=(y+v|0)+((d&8191)<<13)|0;y=(w+(d>>>13)|0)+(Bi>>>26)|0,Bi&=67108863,v=Math.imul(re,be),d=Math.imul(re,pe),d=d+Math.imul(ie,be)|0,w=Math.imul(ie,pe),v=v+Math.imul(ee,ve)|0,d=d+Math.imul(ee,ye)|0,d=d+Math.imul(te,ve)|0,w=w+Math.imul(te,ye)|0,v=v+Math.imul($,ge)|0,d=d+Math.imul($,me)|0,d=d+Math.imul(Q,ge)|0,w=w+Math.imul(Q,me)|0,v=v+Math.imul(Y,_e)|0,d=d+Math.imul(Y,we)|0,d=d+Math.imul(Z,_e)|0,w=w+Math.imul(Z,we)|0,v=v+Math.imul(X,xe)|0,d=d+Math.imul(X,Se)|0,d=d+Math.imul(J,xe)|0,w=w+Math.imul(J,Se)|0;var qi=(y+v|0)+((d&8191)<<13)|0;y=(w+(d>>>13)|0)+(qi>>>26)|0,qi&=67108863,v=Math.imul(re,ve),d=Math.imul(re,ye),d=d+Math.imul(ie,ve)|0,w=Math.imul(ie,ye),v=v+Math.imul(ee,ge)|0,d=d+Math.imul(ee,me)|0,d=d+Math.imul(te,ge)|0,w=w+Math.imul(te,me)|0,v=v+Math.imul($,_e)|0,d=d+Math.imul($,we)|0,d=d+Math.imul(Q,_e)|0,w=w+Math.imul(Q,we)|0,v=v+Math.imul(Y,xe)|0,d=d+Math.imul(Y,Se)|0,d=d+Math.imul(Z,xe)|0,w=w+Math.imul(Z,Se)|0;var Ii=(y+v|0)+((d&8191)<<13)|0;y=(w+(d>>>13)|0)+(Ii>>>26)|0,Ii&=67108863,v=Math.imul(re,ge),d=Math.imul(re,me),d=d+Math.imul(ie,ge)|0,w=Math.imul(ie,me),v=v+Math.imul(ee,_e)|0,d=d+Math.imul(ee,we)|0,d=d+Math.imul(te,_e)|0,w=w+Math.imul(te,we)|0,v=v+Math.imul($,xe)|0,d=d+Math.imul($,Se)|0,d=d+Math.imul(Q,xe)|0,w=w+Math.imul(Q,Se)|0;var Ri=(y+v|0)+((d&8191)<<13)|0;y=(w+(d>>>13)|0)+(Ri>>>26)|0,Ri&=67108863,v=Math.imul(re,_e),d=Math.imul(re,we),d=d+Math.imul(ie,_e)|0,w=Math.imul(ie,we),v=v+Math.imul(ee,xe)|0,d=d+Math.imul(ee,Se)|0,d=d+Math.imul(te,xe)|0,w=w+Math.imul(te,Se)|0;var ki=(y+v|0)+((d&8191)<<13)|0;y=(w+(d>>>13)|0)+(ki>>>26)|0,ki&=67108863,v=Math.imul(re,xe),d=Math.imul(re,Se),d=d+Math.imul(ie,xe)|0,w=Math.imul(ie,Se);var Pi=(y+v|0)+((d&8191)<<13)|0;return y=(w+(d>>>13)|0)+(Pi>>>26)|0,Pi&=67108863,p[0]=yn,p[1]=ze,p[2]=Ke,p[3]=yi,p[4]=gi,p[5]=mi,p[6]=_i,p[7]=wi,p[8]=xi,p[9]=Si,p[10]=Mi,p[11]=Ei,p[12]=Ai,p[13]=Bi,p[14]=qi,p[15]=Ii,p[16]=Ri,p[17]=ki,p[18]=Pi,y!==0&&(p[19]=y,b.length++),b};Math.imul||(I=B);function R(A,h,m){m.negative=h.negative^A.negative,m.length=A.length+h.length;for(var b=0,s=0,c=0;c<m.length-1;c++){var p=s;s=0;for(var y=b&67108863,v=Math.min(c,h.length-1),d=Math.max(0,c-A.length+1);d<=v;d++){var w=c-d,S=A.words[w]|0,l=h.words[d]|0,M=S*l,C=M&67108863;p=p+(M/67108864|0)|0,C=C+y|0,y=C&67108863,p=p+(C>>>26)|0,s+=p>>>26,p&=67108863}m.words[c]=y,b=p,p=s}return b!==0?m.words[c]=b:m.length--,m.strip()}function N(A,h,m){var b=new P;return b.mulp(A,h,m)}n.prototype.mulTo=function(h,m){var b,s=this.length+h.length;return this.length===10&&h.length===10?b=I(this,h,m):s<63?b=B(this,h,m):s<1024?b=R(this,h,m):b=N(this,h,m),b};function P(A,h){this.x=A,this.y=h}P.prototype.makeRBT=function(h){for(var m=new Array(h),b=n.prototype._countBits(h)-1,s=0;s<h;s++)m[s]=this.revBin(s,b,h);return m},P.prototype.revBin=function(h,m,b){if(h===0||h===b-1)return h;for(var s=0,c=0;c<m;c++)s|=(h&1)<<m-c-1,h>>=1;return s},P.prototype.permute=function(h,m,b,s,c,p){for(var y=0;y<p;y++)s[y]=m[h[y]],c[y]=b[h[y]]},P.prototype.transform=function(h,m,b,s,c,p){this.permute(p,h,m,b,s,c);for(var y=1;y<c;y<<=1)for(var v=y<<1,d=Math.cos(2*Math.PI/v),w=Math.sin(2*Math.PI/v),S=0;S<c;S+=v)for(var l=d,M=w,C=0;C<y;C++){var D=b[S+C],T=s[S+C],j=b[S+C+y],O=s[S+C+y],U=l*j-M*O;O=l*O+M*j,j=U,b[S+C]=D+j,s[S+C]=T+O,b[S+C+y]=D-j,s[S+C+y]=T-O,C!==v&&(U=d*l-w*M,M=d*M+w*l,l=U)}},P.prototype.guessLen13b=function(h,m){var b=Math.max(m,h)|1,s=b&1,c=0;for(b=b/2|0;b;b=b>>>1)c++;return 1<<c+1+s},P.prototype.conjugate=function(h,m,b){if(!(b<=1))for(var s=0;s<b/2;s++){var c=h[s];h[s]=h[b-s-1],h[b-s-1]=c,c=m[s],m[s]=-m[b-s-1],m[b-s-1]=-c}},P.prototype.normalize13b=function(h,m){for(var b=0,s=0;s<m/2;s++){var c=Math.round(h[2*s+1]/m)*8192+Math.round(h[2*s]/m)+b;h[s]=c&67108863,c<67108864?b=0:b=c/67108864|0}return h},P.prototype.convert13b=function(h,m,b,s){for(var c=0,p=0;p<m;p++)c=c+(h[p]|0),b[2*p]=c&8191,c=c>>>13,b[2*p+1]=c&8191,c=c>>>13;for(p=2*m;p<s;++p)b[p]=0;r(c===0),r((c&-8192)===0)},P.prototype.stub=function(h){for(var m=new Array(h),b=0;b<h;b++)m[b]=0;return m},P.prototype.mulp=function(h,m,b){var s=2*this.guessLen13b(h.length,m.length),c=this.makeRBT(s),p=this.stub(s),y=new Array(s),v=new Array(s),d=new Array(s),w=new Array(s),S=new Array(s),l=new Array(s),M=b.words;M.length=s,this.convert13b(h.words,h.length,y,s),this.convert13b(m.words,m.length,w,s),this.transform(y,p,v,d,s,c),this.transform(w,p,S,l,s,c);for(var C=0;C<s;C++){var D=v[C]*S[C]-d[C]*l[C];d[C]=v[C]*l[C]+d[C]*S[C],v[C]=D}return this.conjugate(v,d,s),this.transform(v,d,M,p,s,c),this.conjugate(M,p,s),this.normalize13b(M,s),b.negative=h.negative^m.negative,b.length=h.length+m.length,b.strip()},n.prototype.mul=function(h){var m=new n(null);return m.words=new Array(this.length+h.length),this.mulTo(h,m)},n.prototype.mulf=function(h){var m=new n(null);return m.words=new Array(this.length+h.length),N(this,h,m)},n.prototype.imul=function(h){return this.clone().mulTo(h,this)},n.prototype.imuln=function(h){r(typeof h=="number"),r(h<67108864);for(var m=0,b=0;b<this.length;b++){var s=(this.words[b]|0)*h,c=(s&67108863)+(m&67108863);m>>=26,m+=s/67108864|0,m+=c>>>26,this.words[b]=c&67108863}return m!==0&&(this.words[b]=m,this.length++),this},n.prototype.muln=function(h){return this.clone().imuln(h)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(h){var m=E(h);if(m.length===0)return new n(1);for(var b=this,s=0;s<m.length&&m[s]===0;s++,b=b.sqr());if(++s<m.length)for(var c=b.sqr();s<m.length;s++,c=c.sqr())m[s]!==0&&(b=b.mul(c));return b},n.prototype.iushln=function(h){r(typeof h=="number"&&h>=0);var m=h%26,b=(h-m)/26,s=67108863>>>26-m<<26-m,c;if(m!==0){var p=0;for(c=0;c<this.length;c++){var y=this.words[c]&s,v=(this.words[c]|0)-y<<m;this.words[c]=v|p,p=y>>>26-m}p&&(this.words[c]=p,this.length++)}if(b!==0){for(c=this.length-1;c>=0;c--)this.words[c+b]=this.words[c];for(c=0;c<b;c++)this.words[c]=0;this.length+=b}return this.strip()},n.prototype.ishln=function(h){return r(this.negative===0),this.iushln(h)},n.prototype.iushrn=function(h,m,b){r(typeof h=="number"&&h>=0);var s;m?s=(m-m%26)/26:s=0;var c=h%26,p=Math.min((h-c)/26,this.length),y=67108863^67108863>>>c<<c,v=b;if(s-=p,s=Math.max(0,s),v){for(var d=0;d<p;d++)v.words[d]=this.words[d];v.length=p}if(p!==0)if(this.length>p)for(this.length-=p,d=0;d<this.length;d++)this.words[d]=this.words[d+p];else this.words[0]=0,this.length=1;var w=0;for(d=this.length-1;d>=0&&(w!==0||d>=s);d--){var S=this.words[d]|0;this.words[d]=w<<26-c|S>>>c,w=S&y}return v&&w!==0&&(v.words[v.length++]=w),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(h,m,b){return r(this.negative===0),this.iushrn(h,m,b)},n.prototype.shln=function(h){return this.clone().ishln(h)},n.prototype.ushln=function(h){return this.clone().iushln(h)},n.prototype.shrn=function(h){return this.clone().ishrn(h)},n.prototype.ushrn=function(h){return this.clone().iushrn(h)},n.prototype.testn=function(h){r(typeof h=="number"&&h>=0);var m=h%26,b=(h-m)/26,s=1<<m;if(this.length<=b)return!1;var c=this.words[b];return!!(c&s)},n.prototype.imaskn=function(h){r(typeof h=="number"&&h>=0);var m=h%26,b=(h-m)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=b)return this;if(m!==0&&b++,this.length=Math.min(b,this.length),m!==0){var s=67108863^67108863>>>m<<m;this.words[this.length-1]&=s}return this.strip()},n.prototype.maskn=function(h){return this.clone().imaskn(h)},n.prototype.iaddn=function(h){return r(typeof h=="number"),r(h<67108864),h<0?this.isubn(-h):this.negative!==0?this.length===1&&(this.words[0]|0)<h?(this.words[0]=h-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(h),this.negative=1,this):this._iaddn(h)},n.prototype._iaddn=function(h){this.words[0]+=h;for(var m=0;m<this.length&&this.words[m]>=67108864;m++)this.words[m]-=67108864,m===this.length-1?this.words[m+1]=1:this.words[m+1]++;return this.length=Math.max(this.length,m+1),this},n.prototype.isubn=function(h){if(r(typeof h=="number"),r(h<67108864),h<0)return this.iaddn(-h);if(this.negative!==0)return this.negative=0,this.iaddn(h),this.negative=1,this;if(this.words[0]-=h,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var m=0;m<this.length&&this.words[m]<0;m++)this.words[m]+=67108864,this.words[m+1]-=1;return this.strip()},n.prototype.addn=function(h){return this.clone().iaddn(h)},n.prototype.subn=function(h){return this.clone().isubn(h)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(h,m,b){var s=h.length+b,c;this._expand(s);var p,y=0;for(c=0;c<h.length;c++){p=(this.words[c+b]|0)+y;var v=(h.words[c]|0)*m;p-=v&67108863,y=(p>>26)-(v/67108864|0),this.words[c+b]=p&67108863}for(;c<this.length-b;c++)p=(this.words[c+b]|0)+y,y=p>>26,this.words[c+b]=p&67108863;if(y===0)return this.strip();for(r(y===-1),y=0,c=0;c<this.length;c++)p=-(this.words[c]|0)+y,y=p>>26,this.words[c]=p&67108863;return this.negative=1,this.strip()},n.prototype._wordDiv=function(h,m){var b=this.length-h.length,s=this.clone(),c=h,p=c.words[c.length-1]|0,y=this._countBits(p);b=26-y,b!==0&&(c=c.ushln(b),s.iushln(b),p=c.words[c.length-1]|0);var v=s.length-c.length,d;if(m!=="mod"){d=new n(null),d.length=v+1,d.words=new Array(d.length);for(var w=0;w<d.length;w++)d.words[w]=0}var S=s.clone()._ishlnsubmul(c,1,v);S.negative===0&&(s=S,d&&(d.words[v]=1));for(var l=v-1;l>=0;l--){var M=(s.words[c.length+l]|0)*67108864+(s.words[c.length+l-1]|0);for(M=Math.min(M/p|0,67108863),s._ishlnsubmul(c,M,l);s.negative!==0;)M--,s.negative=0,s._ishlnsubmul(c,1,l),s.isZero()||(s.negative^=1);d&&(d.words[l]=M)}return d&&d.strip(),s.strip(),m!=="div"&&b!==0&&s.iushrn(b),{div:d||null,mod:s}},n.prototype.divmod=function(h,m,b){if(r(!h.isZero()),this.isZero())return{div:new n(0),mod:new n(0)};var s,c,p;return this.negative!==0&&h.negative===0?(p=this.neg().divmod(h,m),m!=="mod"&&(s=p.div.neg()),m!=="div"&&(c=p.mod.neg(),b&&c.negative!==0&&c.iadd(h)),{div:s,mod:c}):this.negative===0&&h.negative!==0?(p=this.divmod(h.neg(),m),m!=="mod"&&(s=p.div.neg()),{div:s,mod:p.mod}):(this.negative&h.negative)!==0?(p=this.neg().divmod(h.neg(),m),m!=="div"&&(c=p.mod.neg(),b&&c.negative!==0&&c.isub(h)),{div:p.div,mod:c}):h.length>this.length||this.cmp(h)<0?{div:new n(0),mod:this}:h.length===1?m==="div"?{div:this.divn(h.words[0]),mod:null}:m==="mod"?{div:null,mod:new n(this.modn(h.words[0]))}:{div:this.divn(h.words[0]),mod:new n(this.modn(h.words[0]))}:this._wordDiv(h,m)},n.prototype.div=function(h){return this.divmod(h,"div",!1).div},n.prototype.mod=function(h){return this.divmod(h,"mod",!1).mod},n.prototype.umod=function(h){return this.divmod(h,"mod",!0).mod},n.prototype.divRound=function(h){var m=this.divmod(h);if(m.mod.isZero())return m.div;var b=m.div.negative!==0?m.mod.isub(h):m.mod,s=h.ushrn(1),c=h.andln(1),p=b.cmp(s);return p<0||c===1&&p===0?m.div:m.div.negative!==0?m.div.isubn(1):m.div.iaddn(1)},n.prototype.modn=function(h){r(h<=67108863);for(var m=(1<<26)%h,b=0,s=this.length-1;s>=0;s--)b=(m*b+(this.words[s]|0))%h;return b},n.prototype.idivn=function(h){r(h<=67108863);for(var m=0,b=this.length-1;b>=0;b--){var s=(this.words[b]|0)+m*67108864;this.words[b]=s/h|0,m=s%h}return this.strip()},n.prototype.divn=function(h){return this.clone().idivn(h)},n.prototype.egcd=function(h){r(h.negative===0),r(!h.isZero());var m=this,b=h.clone();m.negative!==0?m=m.umod(h):m=m.clone();for(var s=new n(1),c=new n(0),p=new n(0),y=new n(1),v=0;m.isEven()&&b.isEven();)m.iushrn(1),b.iushrn(1),++v;for(var d=b.clone(),w=m.clone();!m.isZero();){for(var S=0,l=1;(m.words[0]&l)===0&&S<26;++S,l<<=1);if(S>0)for(m.iushrn(S);S-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(d),c.isub(w)),s.iushrn(1),c.iushrn(1);for(var M=0,C=1;(b.words[0]&C)===0&&M<26;++M,C<<=1);if(M>0)for(b.iushrn(M);M-- >0;)(p.isOdd()||y.isOdd())&&(p.iadd(d),y.isub(w)),p.iushrn(1),y.iushrn(1);m.cmp(b)>=0?(m.isub(b),s.isub(p),c.isub(y)):(b.isub(m),p.isub(s),y.isub(c))}return{a:p,b:y,gcd:b.iushln(v)}},n.prototype._invmp=function(h){r(h.negative===0),r(!h.isZero());var m=this,b=h.clone();m.negative!==0?m=m.umod(h):m=m.clone();for(var s=new n(1),c=new n(0),p=b.clone();m.cmpn(1)>0&&b.cmpn(1)>0;){for(var y=0,v=1;(m.words[0]&v)===0&&y<26;++y,v<<=1);if(y>0)for(m.iushrn(y);y-- >0;)s.isOdd()&&s.iadd(p),s.iushrn(1);for(var d=0,w=1;(b.words[0]&w)===0&&d<26;++d,w<<=1);if(d>0)for(b.iushrn(d);d-- >0;)c.isOdd()&&c.iadd(p),c.iushrn(1);m.cmp(b)>=0?(m.isub(b),s.isub(c)):(b.isub(m),c.isub(s))}var S;return m.cmpn(1)===0?S=s:S=c,S.cmpn(0)<0&&S.iadd(h),S},n.prototype.gcd=function(h){if(this.isZero())return h.abs();if(h.isZero())return this.abs();var m=this.clone(),b=h.clone();m.negative=0,b.negative=0;for(var s=0;m.isEven()&&b.isEven();s++)m.iushrn(1),b.iushrn(1);do{for(;m.isEven();)m.iushrn(1);for(;b.isEven();)b.iushrn(1);var c=m.cmp(b);if(c<0){var p=m;m=b,b=p}else if(c===0||b.cmpn(1)===0)break;m.isub(b)}while(!0);return b.iushln(s)},n.prototype.invm=function(h){return this.egcd(h).a.umod(h)},n.prototype.isEven=function(){return(this.words[0]&1)===0},n.prototype.isOdd=function(){return(this.words[0]&1)===1},n.prototype.andln=function(h){return this.words[0]&h},n.prototype.bincn=function(h){r(typeof h=="number");var m=h%26,b=(h-m)/26,s=1<<m;if(this.length<=b)return this._expand(b+1),this.words[b]|=s,this;for(var c=s,p=b;c!==0&&p<this.length;p++){var y=this.words[p]|0;y+=c,c=y>>>26,y&=67108863,this.words[p]=y}return c!==0&&(this.words[p]=c,this.length++),this},n.prototype.isZero=function(){return this.length===1&&this.words[0]===0},n.prototype.cmpn=function(h){var m=h<0;if(this.negative!==0&&!m)return-1;if(this.negative===0&&m)return 1;this.strip();var b;if(this.length>1)b=1;else{m&&(h=-h),r(h<=67108863,"Number is too big");var s=this.words[0]|0;b=s===h?0:s<h?-1:1}return this.negative!==0?-b|0:b},n.prototype.cmp=function(h){if(this.negative!==0&&h.negative===0)return-1;if(this.negative===0&&h.negative!==0)return 1;var m=this.ucmp(h);return this.negative!==0?-m|0:m},n.prototype.ucmp=function(h){if(this.length>h.length)return 1;if(this.length<h.length)return-1;for(var m=0,b=this.length-1;b>=0;b--){var s=this.words[b]|0,c=h.words[b]|0;if(s!==c){s<c?m=-1:s>c&&(m=1);break}}return m},n.prototype.gtn=function(h){return this.cmpn(h)===1},n.prototype.gt=function(h){return this.cmp(h)===1},n.prototype.gten=function(h){return this.cmpn(h)>=0},n.prototype.gte=function(h){return this.cmp(h)>=0},n.prototype.ltn=function(h){return this.cmpn(h)===-1},n.prototype.lt=function(h){return this.cmp(h)===-1},n.prototype.lten=function(h){return this.cmpn(h)<=0},n.prototype.lte=function(h){return this.cmp(h)<=0},n.prototype.eqn=function(h){return this.cmpn(h)===0},n.prototype.eq=function(h){return this.cmp(h)===0},n.red=function(h){return new Ee(h)},n.prototype.toRed=function(h){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),h.convertTo(this)._forceRed(h)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(h){return this.red=h,this},n.prototype.forceRed=function(h){return r(!this.red,"Already a number in reduction context"),this._forceRed(h)},n.prototype.redAdd=function(h){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,h)},n.prototype.redIAdd=function(h){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,h)},n.prototype.redSub=function(h){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,h)},n.prototype.redISub=function(h){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,h)},n.prototype.redShl=function(h){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,h)},n.prototype.redMul=function(h){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,h),this.red.mul(this,h)},n.prototype.redIMul=function(h){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,h),this.red.imul(this,h)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(h){return r(this.red&&!h.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,h)};var L={k256:null,p224:null,p192:null,p25519:null};function W(A,h){this.name=A,this.p=new n(h,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}W.prototype._tmp=function(){var h=new n(null);return h.words=new Array(Math.ceil(this.n/13)),h},W.prototype.ireduce=function(h){var m=h,b;do this.split(m,this.tmp),m=this.imulK(m),m=m.iadd(this.tmp),b=m.bitLength();while(b>this.n);var s=b<this.n?-1:m.ucmp(this.p);return s===0?(m.words[0]=0,m.length=1):s>0?m.isub(this.p):m.strip!==void 0?m.strip():m._strip(),m},W.prototype.split=function(h,m){h.iushrn(this.n,0,m)},W.prototype.imulK=function(h){return h.imul(this.k)};function Be(){W.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(Be,W),Be.prototype.split=function(h,m){for(var b=4194303,s=Math.min(h.length,9),c=0;c<s;c++)m.words[c]=h.words[c];if(m.length=s,h.length<=9){h.words[0]=0,h.length=1;return}var p=h.words[9];for(m.words[m.length++]=p&b,c=10;c<h.length;c++){var y=h.words[c]|0;h.words[c-10]=(y&b)<<4|p>>>22,p=y}p>>>=22,h.words[c-10]=p,p===0&&h.length>10?h.length-=10:h.length-=9},Be.prototype.imulK=function(h){h.words[h.length]=0,h.words[h.length+1]=0,h.length+=2;for(var m=0,b=0;b<h.length;b++){var s=h.words[b]|0;m+=s*977,h.words[b]=m&67108863,m=s*64+(m/67108864|0)}return h.words[h.length-1]===0&&(h.length--,h.words[h.length-1]===0&&h.length--),h};function qe(){W.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(qe,W);function Ie(){W.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(Ie,W);function Ue(){W.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(Ue,W),Ue.prototype.imulK=function(h){for(var m=0,b=0;b<h.length;b++){var s=(h.words[b]|0)*19+m,c=s&67108863;s>>>=26,h.words[b]=c,m=s}return m!==0&&(h.words[h.length++]=m),h},n._prime=function(h){if(L[h])return L[h];var m;if(h==="k256")m=new Be;else if(h==="p224")m=new qe;else if(h==="p192")m=new Ie;else if(h==="p25519")m=new Ue;else throw new Error("Unknown prime "+h);return L[h]=m,m};function Ee(A){if(typeof A=="string"){var h=n._prime(A);this.m=h.p,this.prime=h}else r(A.gtn(1),"modulus must be greater than 1"),this.m=A,this.prime=null}Ee.prototype._verify1=function(h){r(h.negative===0,"red works only with positives"),r(h.red,"red works only with red numbers")},Ee.prototype._verify2=function(h,m){r((h.negative|m.negative)===0,"red works only with positives"),r(h.red&&h.red===m.red,"red works only with red numbers")},Ee.prototype.imod=function(h){return this.prime?this.prime.ireduce(h)._forceRed(this):h.umod(this.m)._forceRed(this)},Ee.prototype.neg=function(h){return h.isZero()?h.clone():this.m.sub(h)._forceRed(this)},Ee.prototype.add=function(h,m){this._verify2(h,m);var b=h.add(m);return b.cmp(this.m)>=0&&b.isub(this.m),b._forceRed(this)},Ee.prototype.iadd=function(h,m){this._verify2(h,m);var b=h.iadd(m);return b.cmp(this.m)>=0&&b.isub(this.m),b},Ee.prototype.sub=function(h,m){this._verify2(h,m);var b=h.sub(m);return b.cmpn(0)<0&&b.iadd(this.m),b._forceRed(this)},Ee.prototype.isub=function(h,m){this._verify2(h,m);var b=h.isub(m);return b.cmpn(0)<0&&b.iadd(this.m),b},Ee.prototype.shl=function(h,m){return this._verify1(h),this.imod(h.ushln(m))},Ee.prototype.imul=function(h,m){return this._verify2(h,m),this.imod(h.imul(m))},Ee.prototype.mul=function(h,m){return this._verify2(h,m),this.imod(h.mul(m))},Ee.prototype.isqr=function(h){return this.imul(h,h.clone())},Ee.prototype.sqr=function(h){return this.mul(h,h)},Ee.prototype.sqrt=function(h){if(h.isZero())return h.clone();var m=this.m.andln(3);if(r(m%2===1),m===3){var b=this.m.add(new n(1)).iushrn(2);return this.pow(h,b)}for(var s=this.m.subn(1),c=0;!s.isZero()&&s.andln(1)===0;)c++,s.iushrn(1);r(!s.isZero());var p=new n(1).toRed(this),y=p.redNeg(),v=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new n(2*d*d).toRed(this);this.pow(d,v).cmp(y)!==0;)d.redIAdd(y);for(var w=this.pow(d,s),S=this.pow(h,s.addn(1).iushrn(1)),l=this.pow(h,s),M=c;l.cmp(p)!==0;){for(var C=l,D=0;C.cmp(p)!==0;D++)C=C.redSqr();r(D<M);var T=this.pow(w,new n(1).iushln(M-D-1));S=S.redMul(T),w=T.redSqr(),l=l.redMul(w),M=D}return S},Ee.prototype.invm=function(h){var m=h._invmp(this.m);return m.negative!==0?(m.negative=0,this.imod(m).redNeg()):this.imod(m)},Ee.prototype.pow=function(h,m){if(m.isZero())return new n(1).toRed(this);if(m.cmpn(1)===0)return h.clone();var b=4,s=new Array(1<<b);s[0]=new n(1).toRed(this),s[1]=h;for(var c=2;c<s.length;c++)s[c]=this.mul(s[c-1],h);var p=s[0],y=0,v=0,d=m.bitLength()%26;for(d===0&&(d=26),c=m.length-1;c>=0;c--){for(var w=m.words[c],S=d-1;S>=0;S--){var l=w>>S&1;if(p!==s[0]&&(p=this.sqr(p)),l===0&&y===0){v=0;continue}y<<=1,y|=l,v++,!(v!==b&&(c!==0||S!==0))&&(p=this.mul(p,s[y]),v=0,y=0)}d=26}return p},Ee.prototype.convertTo=function(h){var m=h.umod(this.m);return m===h?m.clone():m},Ee.prototype.convertFrom=function(h){var m=h.clone();return m.red=null,m},n.mont=function(h){return new Ne(h)};function Ne(A){Ee.call(this,A),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new n(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)}i(Ne,Ee),Ne.prototype.convertTo=function(h){return this.imod(h.ushln(this.shift))},Ne.prototype.convertFrom=function(h){var m=this.imod(h.mul(this.rinv));return m.red=null,m},Ne.prototype.imul=function(h,m){if(h.isZero()||m.isZero())return h.words[0]=0,h.length=1,h;var b=h.imul(m),s=b.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),c=b.isub(s).iushrn(this.shift),p=c;return c.cmp(this.m)>=0?p=c.isub(this.m):c.cmpn(0)<0&&(p=c.iadd(this.m)),p._forceRed(this)},Ne.prototype.mul=function(h,m){if(h.isZero()||m.isZero())return new n(0)._forceRed(this);var b=h.mul(m),s=b.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),c=b.isub(s).iushrn(this.shift),p=c;return c.cmp(this.m)>=0?p=c.isub(this.m):c.cmpn(0)<0&&(p=c.iadd(this.m)),p._forceRed(this)},Ne.prototype.invm=function(h){var m=this.imod(h._invmp(this.m).mul(this.r2));return m._forceRed(this)}})(typeof gd>"u"||gd,db)});var cb=q(()=>{});var Nn=q((EE,wd)=>{var md;wd.exports=function(e){return md||(md=new oi(null)),md.generate(e)};function oi(t){this.rand=t}wd.exports.Rand=oi;oi.prototype.generate=function(e){return this._rand(e)};oi.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var r=new Uint8Array(e),i=0;i<r.length;i++)r[i]=this.rand.getByte();return r};if(typeof self=="object")self.crypto&&self.crypto.getRandomValues?oi.prototype._rand=function(e){var r=new Uint8Array(e);return self.crypto.getRandomValues(r),r}:self.msCrypto&&self.msCrypto.getRandomValues?oi.prototype._rand=function(e){var r=new Uint8Array(e);return self.msCrypto.getRandomValues(r),r}:typeof window=="object"&&(oi.prototype._rand=function(){throw new Error("Not implemented yet")});else try{if(_d=cb(),typeof _d.randomBytes!="function")throw new Error("Not supported");oi.prototype._rand=function(e){return _d.randomBytes(e)}}catch(t){}var _d});var xd=q((AE,ub)=>{var Yi=Pe(),ay=Nn();function Zi(t){this.rand=t||new ay.Rand}ub.exports=Zi;Zi.create=function(e){return new Zi(e)};Zi.prototype._randbelow=function(e){var r=e.bitLength(),i=Math.ceil(r/8);do var n=new Yi(this.rand.generate(i));while(n.cmp(e)>=0);return n};Zi.prototype._randrange=function(e,r){var i=r.sub(e);return e.add(this._randbelow(i))};Zi.prototype.test=function(e,r,i){var n=e.bitLength(),f=Yi.mont(e),a=new Yi(1).toRed(f);r||(r=Math.max(1,n/48|0));for(var o=e.subn(1),u=0;!o.testn(u);u++);for(var g=e.shrn(u),_=o.toRed(f),x=!0;r>0;r--){var E=this._randrange(new Yi(2),o);i&&i(E);var B=E.toRed(f).redPow(g);if(!(B.cmp(a)===0||B.cmp(_)===0)){for(var I=1;I<u;I++){if(B=B.redSqr(),B.cmp(a)===0)return!1;if(B.cmp(_)===0)break}if(I===u)return!1}}return x};Zi.prototype.getDivisor=function(e,r){var i=e.bitLength(),n=Yi.mont(e),f=new Yi(1).toRed(n);r||(r=Math.max(1,i/48|0));for(var a=e.subn(1),o=0;!a.testn(o);o++);for(var u=e.shrn(o),g=a.toRed(n);r>0;r--){var _=this._randrange(new Yi(2),a),x=e.gcd(_);if(x.cmpn(1)!==0)return x;var E=_.toRed(n).redPow(u);if(!(E.cmp(f)===0||E.cmp(g)===0)){for(var B=1;B<o;B++){if(E=E.redSqr(),E.cmp(f)===0)return E.fromRed().subn(1).gcd(e);if(E.cmp(g)===0)break}if(B===o)return E=E.redSqr(),E.fromRed().subn(1).gcd(e)}}return!1}});var qd=q((kE,bb)=>{var sy=Ni();bb.exports=Bd;Bd.simpleSieve=Ed;Bd.fermatTest=Ad;var nt=Pe(),oy=new nt(24),dy=xd(),hb=new dy,cy=new nt(1),Md=new nt(2),uy=new nt(5),BE=new nt(16),qE=new nt(8),hy=new nt(10),ly=new nt(3),IE=new nt(7),by=new nt(11),lb=new nt(4),RE=new nt(12),Sd=null;function py(){if(Sd!==null)return Sd;var t=1048576,e=[];e[0]=2;for(var r=1,i=3;i<t;i+=2){for(var n=Math.ceil(Math.sqrt(i)),f=0;f<r&&e[f]<=n&&i%e[f]!==0;f++);r!==f&&e[f]<=n||(e[r++]=i)}return Sd=e,e}function Ed(t){for(var e=py(),r=0;r<e.length;r++)if(t.modn(e[r])===0)return t.cmpn(e[r])===0;return!0}function Ad(t){var e=nt.mont(t);return Md.toRed(e).redPow(t.subn(1)).fromRed().cmpn(1)===0}function Bd(t,e){if(t<16)return e===2||e===5?new nt([140,123]):new nt([140,39]);e=new nt(e);for(var r,i;;){for(r=new nt(sy(Math.ceil(t/8)));r.bitLength()>t;)r.ishrn(1);if(r.isEven()&&r.iadd(cy),r.testn(1)||r.iadd(Md),e.cmp(Md)){if(!e.cmp(uy))for(;r.mod(hy).cmp(ly);)r.iadd(lb)}else for(;r.mod(oy).cmp(by);)r.iadd(lb);if(i=r.shrn(1),Ed(i)&&Ed(r)&&Ad(i)&&Ad(r)&&hb.test(i)&&hb.test(r))return r}}});var pb=q((PE,vy)=>{vy.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}});var mb=q((CE,gb)=>{var jt=Pe(),yy=xd(),vb=new yy,gy=new jt(24),my=new jt(11),_y=new jt(10),wy=new jt(3),xy=new jt(7),yb=qd(),Sy=Ni();gb.exports=zr;function My(t,e){return e=e||"utf8",Buffer.isBuffer(t)||(t=new Buffer(t,e)),this._pub=new jt(t),this}function Ey(t,e){return e=e||"utf8",Buffer.isBuffer(t)||(t=new Buffer(t,e)),this._priv=new jt(t),this}var Ls={};function Ay(t,e){var r=e.toString("hex"),i=[r,t.toString(16)].join("_");if(i in Ls)return Ls[i];var n=0;if(t.isEven()||!yb.simpleSieve||!yb.fermatTest(t)||!vb.test(t))return n+=1,r==="02"||r==="05"?n+=8:n+=4,Ls[i]=n,n;vb.test(t.shrn(1))||(n+=2);var f;switch(r){case"02":t.mod(gy).cmp(my)&&(n+=8);break;case"05":f=t.mod(_y),f.cmp(wy)&&f.cmp(xy)&&(n+=8);break;default:n+=4}return Ls[i]=n,n}function zr(t,e,r){this.setGenerator(e),this.__prime=new jt(t),this._prime=jt.mont(this.__prime),this._primeLen=t.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=My,this.setPrivateKey=Ey):this._primeCode=8}Object.defineProperty(zr.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=Ay(this.__prime,this.__gen)),this._primeCode}});zr.prototype.generateKeys=function(){return this._priv||(this._priv=new jt(Sy(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()};zr.prototype.computeSecret=function(t){t=new jt(t),t=t.toRed(this._prime);var e=t.redPow(this._priv).fromRed(),r=new Buffer(e.toArray()),i=this.getPrime();if(r.length<i.length){var n=new Buffer(i.length-r.length);n.fill(0),r=Buffer.concat([n,r])}return r};zr.prototype.getPublicKey=function(e){return Os(this._pub,e)};zr.prototype.getPrivateKey=function(e){return Os(this._priv,e)};zr.prototype.getPrime=function(t){return Os(this.__prime,t)};zr.prototype.getGenerator=function(t){return Os(this._gen,t)};zr.prototype.setGenerator=function(t,e){return e=e||"utf8",Buffer.isBuffer(t)||(t=new Buffer(t,e)),this.__gen=t,this._gen=new jt(t),this};function Os(t,e){var r=new Buffer(t.toArray());return e?r.toString(e):r}});var xb=q(Ln=>{var By=qd(),_b=pb(),Id=mb();function qy(t){var e=new Buffer(_b[t].prime,"hex"),r=new Buffer(_b[t].gen,"hex");return new Id(e,r)}var Iy={binary:!0,hex:!0,base64:!0};function wb(t,e,r,i){return Buffer.isBuffer(e)||Iy[e]===void 0?wb(t,"binary",e,r):(e=e||"binary",i=i||"binary",r=r||new Buffer([2]),Buffer.isBuffer(r)||(r=new Buffer(r,i)),typeof t=="number"?new Id(By(t,r),r,!0):(Buffer.isBuffer(t)||(t=new Buffer(t,e)),new Id(t,r,!0)))}Ln.DiffieHellmanGroup=Ln.createDiffieHellmanGroup=Ln.getDiffieHellman=qy;Ln.createDiffieHellman=Ln.DiffieHellman=wb});var ba=q((DE,Rd)=>{"use strict";typeof process>"u"||!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0?Rd.exports={nextTick:Ry}:Rd.exports=process;function Ry(t,e,r,i){if(typeof t!="function")throw new TypeError('"callback" argument must be a function');var n=arguments.length,f,a;switch(n){case 0:case 1:return process.nextTick(t);case 2:return process.nextTick(function(){t.call(null,e)});case 3:return process.nextTick(function(){t.call(null,e,r)});case 4:return process.nextTick(function(){t.call(null,e,r,i)});default:for(f=new Array(n-1),a=0;a<f.length;)f[a++]=arguments[a];return process.nextTick(function(){t.apply(null,f)})}}});var Mb=q((NE,Sb)=>{var ky={}.toString;Sb.exports=Array.isArray||function(t){return ky.call(t)=="[object Array]"}});var kd=q((LE,Eb)=>{Eb.exports=Sn().EventEmitter});var pa=q((Pd,Bb)=>{var js=Pt(),Kr=js.Buffer;function Ab(t,e){for(var r in t)e[r]=t[r]}Kr.from&&Kr.alloc&&Kr.allocUnsafe&&Kr.allocUnsafeSlow?Bb.exports=js:(Ab(js,Pd),Pd.Buffer=On);function On(t,e,r){return Kr(t,e,r)}Ab(Kr,On);On.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return Kr(t,e,r)};On.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=Kr(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};On.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Kr(t)};On.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return js.SlowBuffer(t)}});var jn=q(ht=>{function Py(t){return Array.isArray?Array.isArray(t):Fs(t)==="[object Array]"}ht.isArray=Py;function Cy(t){return typeof t=="boolean"}ht.isBoolean=Cy;function Ty(t){return t===null}ht.isNull=Ty;function Dy(t){return t==null}ht.isNullOrUndefined=Dy;function Ny(t){return typeof t=="number"}ht.isNumber=Ny;function Ly(t){return typeof t=="string"}ht.isString=Ly;function Oy(t){return typeof t=="symbol"}ht.isSymbol=Oy;function jy(t){return t===void 0}ht.isUndefined=jy;function Fy(t){return Fs(t)==="[object RegExp]"}ht.isRegExp=Fy;function Uy(t){return typeof t=="object"&&t!==null}ht.isObject=Uy;function zy(t){return Fs(t)==="[object Date]"}ht.isDate=zy;function Ky(t){return Fs(t)==="[object Error]"||t instanceof Error}ht.isError=Ky;function Hy(t){return typeof t=="function"}ht.isFunction=Hy;function Wy(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||typeof t=="symbol"||typeof t>"u"}ht.isPrimitive=Wy;ht.isBuffer=Pt().Buffer.isBuffer;function Fs(t){return Object.prototype.toString.call(t)}});var Ib=q((jE,Cd)=>{"use strict";function Vy(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var qb=pa().Buffer,va=Ff();function Gy(t,e,r){t.copy(e,r)}Cd.exports=function(){function t(){Vy(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length},t.prototype.unshift=function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length},t.prototype.shift=function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n},t.prototype.concat=function(r){if(this.length===0)return qb.alloc(0);for(var i=qb.allocUnsafe(r>>>0),n=this.head,f=0;n;)Gy(n.data,i,f),f+=n.data.length,n=n.next;return i},t}();va&&va.inspect&&va.inspect.custom&&(Cd.exports.prototype[va.inspect.custom]=function(){var t=va.inspect({length:this.length});return this.constructor.name+" "+t})});var Td=q((FE,Rb)=>{"use strict";var Us=ba();function Xy(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,Us.nextTick(zs,this,t)):Us.nextTick(zs,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(f){!e&&f?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,Us.nextTick(zs,r,f)):Us.nextTick(zs,r,f):e&&e(f)}),this)}function Jy(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function zs(t,e){t.emit("error",e)}Rb.exports={destroy:Xy,undestroy:Jy}});var Nd=q((UE,Ob)=>{"use strict";var $i=ba();Ob.exports=Xe;function Pb(t){var e=this;this.next=null,this.entry=null,this.finish=function(){lg(e,t)}}var Yy=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:$i.nextTick,Fn;Xe.WritableState=ga;var Cb=Object.create(jn());Cb.inherits=F();var Zy={deprecate:p0()},Tb=kd(),Hs=pa().Buffer,$y=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Qy(t){return Hs.from(t)}function eg(t){return Hs.isBuffer(t)||t instanceof $y}var Db=Td();Cb.inherits(Xe,Tb);function tg(){}function ga(t,e){Fn=Fn||Qi(),t=t||{};var r=e instanceof Fn;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,n=t.writableHighWaterMark,f=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=f,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=t.decodeStrings===!1;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(o){og(e,o)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new Pb(this)}ga.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(ga.prototype,"buffer",{get:Zy.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}})();var Ks;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Ks=Function.prototype[Symbol.hasInstance],Object.defineProperty(Xe,Symbol.hasInstance,{value:function(t){return Ks.call(this,t)?!0:this!==Xe?!1:t&&t._writableState instanceof ga}})):Ks=function(t){return t instanceof this};function Xe(t){if(Fn=Fn||Qi(),!Ks.call(Xe,this)&&!(this instanceof Fn))return new Xe(t);this._writableState=new ga(t,this),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),Tb.call(this)}Xe.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function rg(t,e){var r=new Error("write after end");t.emit("error",r),$i.nextTick(e,r)}function ig(t,e,r,i){var n=!0,f=!1;return r===null?f=new TypeError("May not write null values to stream"):typeof r!="string"&&r!==void 0&&!e.objectMode&&(f=new TypeError("Invalid non-string/buffer chunk")),f&&(t.emit("error",f),$i.nextTick(i,f),n=!1),n}Xe.prototype.write=function(t,e,r){var i=this._writableState,n=!1,f=!i.objectMode&&eg(t);return f&&!Hs.isBuffer(t)&&(t=Qy(t)),typeof e=="function"&&(r=e,e=null),f?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=tg),i.ended?rg(this,r):(f||ig(this,i,t,r))&&(i.pendingcb++,n=fg(this,i,f,t,e,r)),n};Xe.prototype.cork=function(){var t=this._writableState;t.corked++};Xe.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&Nb(this,t))};Xe.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this};function ng(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=Hs.from(e,r)),e}Object.defineProperty(Xe.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function fg(t,e,r,i,n,f){if(!r){var a=ng(e,i,n);i!==a&&(r=!0,n="buffer",i=a)}var o=e.objectMode?1:i.length;e.length+=o;var u=e.length<e.highWaterMark;if(u||(e.needDrain=!0),e.writing||e.corked){var g=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:f,next:null},g?g.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else Dd(t,e,!1,o,i,n,f);return u}function Dd(t,e,r,i,n,f,a){e.writelen=i,e.writecb=a,e.writing=!0,e.sync=!0,r?t._writev(n,e.onwrite):t._write(n,f,e.onwrite),e.sync=!1}function ag(t,e,r,i,n){--e.pendingcb,r?($i.nextTick(n,i),$i.nextTick(ya,t,e),t._writableState.errorEmitted=!0,t.emit("error",i)):(n(i),t._writableState.errorEmitted=!0,t.emit("error",i),ya(t,e))}function sg(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function og(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(sg(r),e)ag(t,r,i,e,n);else{var f=Lb(r);!f&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&Nb(t,r),i?Yy(kb,t,r,f,n):kb(t,r,f,n)}}function kb(t,e,r,i){r||dg(t,e),e.pendingcb--,i(),ya(t,e)}function dg(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function Nb(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),f=e.corkedRequestsFree;f.entry=r;for(var a=0,o=!0;r;)n[a]=r,r.isBuf||(o=!1),r=r.next,a+=1;n.allBuffers=o,Dd(t,e,!0,e.length,n,"",f.finish),e.pendingcb++,e.lastBufferedRequest=null,f.next?(e.corkedRequestsFree=f.next,f.next=null):e.corkedRequestsFree=new Pb(e),e.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,g=r.encoding,_=r.callback,x=e.objectMode?1:u.length;if(Dd(t,e,!1,x,u,g,_),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}Xe.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))};Xe.prototype._writev=null;Xe.prototype.end=function(t,e,r){var i=this._writableState;typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||hg(this,i,r)};function Lb(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function cg(t,e){t._final(function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),ya(t,e)})}function ug(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"?(e.pendingcb++,e.finalCalled=!0,$i.nextTick(cg,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function ya(t,e){var r=Lb(e);return r&&(ug(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"))),r}function hg(t,e,r){e.ending=!0,ya(t,e),r&&(e.finished?$i.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function lg(t,e,r){var i=t.entry;for(t.entry=null;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree.next=t}Object.defineProperty(Xe.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}});Xe.prototype.destroy=Db.destroy;Xe.prototype._undestroy=Db.undestroy;Xe.prototype._destroy=function(t,e){this.end(),e(t)}});var Qi=q((zE,zb)=>{"use strict";var jb=ba(),bg=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};zb.exports=Hr;var Fb=Object.create(jn());Fb.inherits=F();var Ub=jd(),Od=Nd();Fb.inherits(Hr,Ub);for(Ld=bg(Od.prototype),Ws=0;Ws<Ld.length;Ws++)Vs=Ld[Ws],Hr.prototype[Vs]||(Hr.prototype[Vs]=Od.prototype[Vs]);var Ld,Vs,Ws;function Hr(t){if(!(this instanceof Hr))return new Hr(t);Ub.call(this,t),Od.call(this,t),t&&t.readable===!1&&(this.readable=!1),t&&t.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,t&&t.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",pg)}Object.defineProperty(Hr.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function pg(){this.allowHalfOpen||this._writableState.ended||jb.nextTick(vg,this)}function vg(t){t.end()}Object.defineProperty(Hr.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(t){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=t,this._writableState.destroyed=t)}});Hr.prototype._destroy=function(t,e){this.push(null),this.end(),jb.nextTick(e,t)}});var zd=q(Hb=>{"use strict";var Ud=pa().Buffer,Kb=Ud.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function yg(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function gg(t){var e=yg(t);if(typeof e!="string"&&(Ud.isEncoding===Kb||!Kb(t)))throw new Error("Unknown encoding: "+t);return e||t}Hb.StringDecoder=ma;function ma(t){this.encoding=gg(t);var e;switch(this.encoding){case"utf16le":this.text=Mg,this.end=Eg,e=4;break;case"utf8":this.fillLast=wg,e=4;break;case"base64":this.text=Ag,this.end=Bg,e=3;break;default:this.write=qg,this.end=Ig;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Ud.allocUnsafe(e)}ma.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""};ma.prototype.end=Sg;ma.prototype.text=xg;ma.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function Fd(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function mg(t,e,r){var i=e.length-1;if(i<r)return 0;var n=Fd(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||n===-2?0:(n=Fd(e[i]),n>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||n===-2?0:(n=Fd(e[i]),n>=0?(n>0&&(n===2?n=0:t.lastNeed=n-3),n):0))}function _g(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function wg(t){var e=this.lastTotal-this.lastNeed,r=_g(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function xg(t,e){var r=mg(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)}function Sg(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function Mg(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function Eg(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function Ag(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function Bg(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function qg(t){return t.toString(this.encoding)}function Ig(t){return t&&t.length?this.write(t):""}});var jd=q((WE,r2)=>{"use strict";var zn=ba();r2.exports=Fe;var Rg=Mb(),_a;Fe.ReadableState=Zb;var HE=Sn().EventEmitter,Xb=function(t,e){return t.listeners(e).length},Gd=kd(),wa=pa().Buffer,kg=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Pg(t){return wa.from(t)}function Cg(t){return wa.isBuffer(t)||t instanceof kg}var Jb=Object.create(jn());Jb.inherits=F();var Kd=Ff(),ke=void 0;Kd&&Kd.debuglog?ke=Kd.debuglog("stream"):ke=function(){};var Tg=Ib(),Yb=Td(),Un;Jb.inherits(Fe,Gd);var Hd=["error","close","destroy","pause","resume"];function Dg(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Rg(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function Zb(t,e){_a=_a||Qi(),t=t||{};var r=e instanceof _a;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,n=t.readableHighWaterMark,f=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=f,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new Tg,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(Un||(Un=zd().StringDecoder),this.decoder=new Un(t.encoding),this.encoding=t.encoding)}function Fe(t){if(_a=_a||Qi(),!(this instanceof Fe))return new Fe(t);this._readableState=new Zb(t,this),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),Gd.call(this)}Object.defineProperty(Fe.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});Fe.prototype.destroy=Yb.destroy;Fe.prototype._undestroy=Yb.undestroy;Fe.prototype._destroy=function(t,e){this.push(null),e(t)};Fe.prototype.push=function(t,e){var r=this._readableState,i;return r.objectMode?i=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=wa.from(t,e),e=""),i=!0),$b(this,t,e,!1,i)};Fe.prototype.unshift=function(t){return $b(this,t,null,!0,!1)};function $b(t,e,r,i,n){var f=t._readableState;if(e===null)f.reading=!1,jg(t,f);else{var a;n||(a=Ng(f,e)),a?t.emit("error",a):f.objectMode||e&&e.length>0?(typeof e!="string"&&!f.objectMode&&Object.getPrototypeOf(e)!==wa.prototype&&(e=Pg(e)),i?f.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):Wd(t,f,e,!0):f.ended?t.emit("error",new Error("stream.push() after EOF")):(f.reading=!1,f.decoder&&!r?(e=f.decoder.write(e),f.objectMode||e.length!==0?Wd(t,f,e,!1):Qb(t,f)):Wd(t,f,e,!1))):i||(f.reading=!1)}return Lg(f)}function Wd(t,e,r,i){e.flowing&&e.length===0&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&Gs(t)),Qb(t,e)}function Ng(t,e){var r;return!Cg(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new TypeError("Invalid non-string/buffer chunk")),r}function Lg(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||t.length===0)}Fe.prototype.isPaused=function(){return this._readableState.flowing===!1};Fe.prototype.setEncoding=function(t){return Un||(Un=zd().StringDecoder),this._readableState.decoder=new Un(t),this._readableState.encoding=t,this};var Wb=8388608;function Og(t){return t>=Wb?t=Wb:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function Vb(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=Og(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}Fe.prototype.read=function(t){ke("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return ke("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?Vd(this):Gs(this),null;if(t=Vb(t,e),t===0&&e.ended)return e.length===0&&Vd(this),null;var i=e.needReadable;ke("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,ke("length less than watermark",i)),e.ended||e.reading?(i=!1,ke("reading or ended",i)):i&&(ke("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=Vb(r,e)));var n;return t>0?n=e2(t,e):n=null,n===null?(e.needReadable=!0,t=0):e.length-=t,e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&Vd(this)),n!==null&&this.emit("data",n),n};function jg(t,e){if(!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,Gs(t)}}function Gs(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(ke("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?zn.nextTick(Gb,t):Gb(t))}function Gb(t){ke("emit readable"),t.emit("readable"),Xd(t)}function Qb(t,e){e.readingMore||(e.readingMore=!0,zn.nextTick(Fg,t,e))}function Fg(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(ke("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}Fe.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))};Fe.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t);break}i.pipesCount+=1,ke("pipe count=%d opts=%j",i.pipesCount,e);var n=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,f=n?o:N;i.endEmitted?zn.nextTick(f):r.once("end",f),t.on("unpipe",a);function a(P,L){ke("onunpipe"),P===r&&L&&L.hasUnpiped===!1&&(L.hasUnpiped=!0,_())}function o(){ke("onend"),t.end()}var u=Ug(r);t.on("drain",u);var g=!1;function _(){ke("cleanup"),t.removeListener("close",I),t.removeListener("finish",R),t.removeListener("drain",u),t.removeListener("error",B),t.removeListener("unpipe",a),r.removeListener("end",o),r.removeListener("end",N),r.removeListener("data",E),g=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&u()}var x=!1;r.on("data",E);function E(P){ke("ondata"),x=!1;var L=t.write(P);L===!1&&!x&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&t2(i.pipes,t)!==-1)&&!g&&(ke("false write response, pause",i.awaitDrain),i.awaitDrain++,x=!0),r.pause())}function B(P){ke("onerror",P),N(),t.removeListener("error",B),Xb(t,"error")===0&&t.emit("error",P)}Dg(t,"error",B);function I(){t.removeListener("finish",R),N()}t.once("close",I);function R(){ke("onfinish"),t.removeListener("close",I),N()}t.once("finish",R);function N(){ke("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(ke("pipe resume"),r.resume()),t};function Ug(t){return function(){var e=t._readableState;ke("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,e.awaitDrain===0&&Xb(t,"data")&&(e.flowing=!0,Xd(t))}}Fe.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var f=0;f<n;f++)i[f].emit("unpipe",this,{hasUnpiped:!1});return this}var a=t2(e.pipes,t);return a===-1?this:(e.pipes.splice(a,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};Fe.prototype.on=function(t,e){var r=Gd.prototype.on.call(this,t,e);if(t==="data")this._readableState.flowing!==!1&&this.resume();else if(t==="readable"){var i=this._readableState;!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&Gs(this):zn.nextTick(zg,this))}return r};Fe.prototype.addListener=Fe.prototype.on;function zg(t){ke("readable nexttick read 0"),t.read(0)}Fe.prototype.resume=function(){var t=this._readableState;return t.flowing||(ke("resume"),t.flowing=!0,Kg(this,t)),this};function Kg(t,e){e.resumeScheduled||(e.resumeScheduled=!0,zn.nextTick(Hg,t,e))}function Hg(t,e){e.reading||(ke("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),Xd(t),e.flowing&&!e.reading&&t.read(0)}Fe.prototype.pause=function(){return ke("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(ke("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function Xd(t){var e=t._readableState;for(ke("flow",e.flowing);e.flowing&&t.read()!==null;);}Fe.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(ke("wrapped end"),r.decoder&&!r.ended){var a=r.decoder.end();a&&a.length&&e.push(a)}e.push(null)}),t.on("data",function(a){if(ke("wrapped data"),r.decoder&&(a=r.decoder.write(a)),!(r.objectMode&&a==null)&&!(!r.objectMode&&(!a||!a.length))){var o=e.push(a);o||(i=!0,t.pause())}});for(var n in t)this[n]===void 0&&typeof t[n]=="function"&&(this[n]=function(a){return function(){return t[a].apply(t,arguments)}}(n));for(var f=0;f<Hd.length;f++)t.on(Hd[f],this.emit.bind(this,Hd[f]));return this._read=function(a){ke("wrapped _read",a),i&&(i=!1,t.resume())},this};Object.defineProperty(Fe.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Fe._fromList=e2;function e2(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.head.data:r=e.buffer.concat(e.length),e.buffer.clear()):r=Wg(t,e.buffer,e.decoder),r}function Wg(t,e,r){var i;return t<e.head.data.length?(i=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):t===e.head.data.length?i=e.shift():i=r?Vg(t,e):Gg(t,e),i}function Vg(t,e){var r=e.head,i=1,n=r.data;for(t-=n.length;r=r.next;){var f=r.data,a=t>f.length?f.length:t;if(a===f.length?n+=f:n+=f.slice(0,t),t-=a,t===0){a===f.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=f.slice(a));break}++i}return e.length-=i,n}function Gg(t,e){var r=wa.allocUnsafe(t),i=e.head,n=1;for(i.data.copy(r),t-=i.data.length;i=i.next;){var f=i.data,a=t>f.length?f.length:t;if(f.copy(r,r.length-t,0,a),t-=a,t===0){a===f.length?(++n,i.next?e.head=i.next:e.head=e.tail=null):(e.head=i,i.data=f.slice(a));break}++n}return e.length-=n,r}function Vd(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,zn.nextTick(Xg,e,t))}function Xg(t,e){!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function t2(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var Jd=q((VE,f2)=>{"use strict";f2.exports=Wr;var Xs=Qi(),n2=Object.create(jn());n2.inherits=F();n2.inherits(Wr,Xs);function Jg(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(!i)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,e!=null&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function Wr(t){if(!(this instanceof Wr))return new Wr(t);Xs.call(this,t),this._transformState={afterTransform:Jg.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",Yg)}function Yg(){var t=this;typeof this._flush=="function"?this._flush(function(e,r){i2(t,e,r)}):i2(this,null,null)}Wr.prototype.push=function(t,e){return this._transformState.needTransform=!1,Xs.prototype.push.call(this,t,e)};Wr.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")};Wr.prototype._write=function(t,e,r){var i=this._transformState;if(i.writecb=r,i.writechunk=t,i.writeencoding=e,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};Wr.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};Wr.prototype._destroy=function(t,e){var r=this;Xs.prototype._destroy.call(this,t,function(i){e(i),r.emit("close")})};function i2(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}});var d2=q((GE,o2)=>{"use strict";o2.exports=xa;var a2=Jd(),s2=Object.create(jn());s2.inherits=F();s2.inherits(xa,a2);function xa(t){if(!(this instanceof xa))return new xa(t);a2.call(this,t)}xa.prototype._transform=function(t,e,r){r(null,t)}});var u2=q((Sr,c2)=>{Sr=c2.exports=jd();Sr.Stream=Sr;Sr.Readable=Sr;Sr.Writable=Nd();Sr.Duplex=Qi();Sr.Transform=Jd();Sr.PassThrough=d2()});var Js=q((h2,Yd)=>{(function(t,e){"use strict";function r(b,s){if(!b)throw new Error(s||"Assertion failed")}function i(b,s){b.super_=s;var c=function(){};c.prototype=s.prototype,b.prototype=new c,b.prototype.constructor=b}function n(b,s,c){if(n.isBN(b))return b;this.negative=0,this.words=null,this.length=0,this.red=null,b!==null&&((s==="le"||s==="be")&&(c=s,s=10),this._init(b||0,s||10,c||"be"))}typeof t=="object"?t.exports=n:e.BN=n,n.BN=n,n.wordSize=26;var f;try{typeof window<"u"&&typeof window.Buffer<"u"?f=window.Buffer:f=yd().Buffer}catch(b){}n.isBN=function(s){return s instanceof n?!0:s!==null&&typeof s=="object"&&s.constructor.wordSize===n.wordSize&&Array.isArray(s.words)},n.max=function(s,c){return s.cmp(c)>0?s:c},n.min=function(s,c){return s.cmp(c)<0?s:c},n.prototype._init=function(s,c,p){if(typeof s=="number")return this._initNumber(s,c,p);if(typeof s=="object")return this._initArray(s,c,p);c==="hex"&&(c=16),r(c===(c|0)&&c>=2&&c<=36),s=s.toString().replace(/\s+/g,"");var y=0;s[0]==="-"&&(y++,this.negative=1),y<s.length&&(c===16?this._parseHex(s,y,p):(this._parseBase(s,c,y),p==="le"&&this._initArray(this.toArray(),c,p)))},n.prototype._initNumber=function(s,c,p){s<0&&(this.negative=1,s=-s),s<67108864?(this.words=[s&67108863],this.length=1):s<4503599627370496?(this.words=[s&67108863,s/67108864&67108863],this.length=2):(r(s<9007199254740992),this.words=[s&67108863,s/67108864&67108863,1],this.length=3),p==="le"&&this._initArray(this.toArray(),c,p)},n.prototype._initArray=function(s,c,p){if(r(typeof s.length=="number"),s.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(s.length/3),this.words=new Array(this.length);for(var y=0;y<this.length;y++)this.words[y]=0;var v,d,w=0;if(p==="be")for(y=s.length-1,v=0;y>=0;y-=3)d=s[y]|s[y-1]<<8|s[y-2]<<16,this.words[v]|=d<<w&67108863,this.words[v+1]=d>>>26-w&67108863,w+=24,w>=26&&(w-=26,v++);else if(p==="le")for(y=0,v=0;y<s.length;y+=3)d=s[y]|s[y+1]<<8|s[y+2]<<16,this.words[v]|=d<<w&67108863,this.words[v+1]=d>>>26-w&67108863,w+=24,w>=26&&(w-=26,v++);return this._strip()};function a(b,s){var c=b.charCodeAt(s);if(c>=48&&c<=57)return c-48;if(c>=65&&c<=70)return c-55;if(c>=97&&c<=102)return c-87;r(!1,"Invalid character in "+b)}function o(b,s,c){var p=a(b,c);return c-1>=s&&(p|=a(b,c-1)<<4),p}n.prototype._parseHex=function(s,c,p){this.length=Math.ceil((s.length-c)/6),this.words=new Array(this.length);for(var y=0;y<this.length;y++)this.words[y]=0;var v=0,d=0,w;if(p==="be")for(y=s.length-1;y>=c;y-=2)w=o(s,c,y)<<v,this.words[d]|=w&67108863,v>=18?(v-=18,d+=1,this.words[d]|=w>>>26):v+=8;else{var S=s.length-c;for(y=S%2===0?c+1:c;y<s.length;y+=2)w=o(s,c,y)<<v,this.words[d]|=w&67108863,v>=18?(v-=18,d+=1,this.words[d]|=w>>>26):v+=8}this._strip()};function u(b,s,c,p){for(var y=0,v=0,d=Math.min(b.length,c),w=s;w<d;w++){var S=b.charCodeAt(w)-48;y*=p,S>=49?v=S-49+10:S>=17?v=S-17+10:v=S,r(S>=0&&v<p,"Invalid character"),y+=v}return y}n.prototype._parseBase=function(s,c,p){this.words=[0],this.length=1;for(var y=0,v=1;v<=67108863;v*=c)y++;y--,v=v/c|0;for(var d=s.length-p,w=d%y,S=Math.min(d,d-w)+p,l=0,M=p;M<S;M+=y)l=u(s,M,M+y,c),this.imuln(v),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(w!==0){var C=1;for(l=u(s,M,s.length,c),M=0;M<w;M++)C*=c;this.imuln(C),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}this._strip()},n.prototype.copy=function(s){s.words=new Array(this.length);for(var c=0;c<this.length;c++)s.words[c]=this.words[c];s.length=this.length,s.negative=this.negative,s.red=this.red};function g(b,s){b.words=s.words,b.length=s.length,b.negative=s.negative,b.red=s.red}if(n.prototype._move=function(s){g(s,this)},n.prototype.clone=function(){var s=new n(null);return this.copy(s),s},n.prototype._expand=function(s){for(;this.length<s;)this.words[this.length++]=0;return this},n.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},n.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{n.prototype[Symbol.for("nodejs.util.inspect.custom")]=_}catch(b){n.prototype.inspect=_}else n.prototype.inspect=_;function _(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var x=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],E=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],B=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];n.prototype.toString=function(s,c){s=s||10,c=c|0||1;var p;if(s===16||s==="hex"){p="";for(var y=0,v=0,d=0;d<this.length;d++){var w=this.words[d],S=((w<<y|v)&16777215).toString(16);v=w>>>24-y&16777215,y+=2,y>=26&&(y-=26,d--),v!==0||d!==this.length-1?p=x[6-S.length]+S+p:p=S+p}for(v!==0&&(p=v.toString(16)+p);p.length%c!==0;)p="0"+p;return this.negative!==0&&(p="-"+p),p}if(s===(s|0)&&s>=2&&s<=36){var l=E[s],M=B[s];p="";var C=this.clone();for(C.negative=0;!C.isZero();){var D=C.modrn(M).toString(s);C=C.idivn(M),C.isZero()?p=D+p:p=x[l-D.length]+D+p}for(this.isZero()&&(p="0"+p);p.length%c!==0;)p="0"+p;return this.negative!==0&&(p="-"+p),p}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var s=this.words[0];return this.length===2?s+=this.words[1]*67108864:this.length===3&&this.words[2]===1?s+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-s:s},n.prototype.toJSON=function(){return this.toString(16,2)},f&&(n.prototype.toBuffer=function(s,c){return this.toArrayLike(f,s,c)}),n.prototype.toArray=function(s,c){return this.toArrayLike(Array,s,c)};var I=function(s,c){return s.allocUnsafe?s.allocUnsafe(c):new s(c)};n.prototype.toArrayLike=function(s,c,p){this._strip();var y=this.byteLength(),v=p||Math.max(1,y);r(y<=v,"byte array longer than desired length"),r(v>0,"Requested array length <= 0");var d=I(s,v),w=c==="le"?"LE":"BE";return this["_toArrayLike"+w](d,y),d},n.prototype._toArrayLikeLE=function(s,c){for(var p=0,y=0,v=0,d=0;v<this.length;v++){var w=this.words[v]<<d|y;s[p++]=w&255,p<s.length&&(s[p++]=w>>8&255),p<s.length&&(s[p++]=w>>16&255),d===6?(p<s.length&&(s[p++]=w>>24&255),y=0,d=0):(y=w>>>24,d+=2)}if(p<s.length)for(s[p++]=y;p<s.length;)s[p++]=0},n.prototype._toArrayLikeBE=function(s,c){for(var p=s.length-1,y=0,v=0,d=0;v<this.length;v++){var w=this.words[v]<<d|y;s[p--]=w&255,p>=0&&(s[p--]=w>>8&255),p>=0&&(s[p--]=w>>16&255),d===6?(p>=0&&(s[p--]=w>>24&255),y=0,d=0):(y=w>>>24,d+=2)}if(p>=0)for(s[p--]=y;p>=0;)s[p--]=0},Math.clz32?n.prototype._countBits=function(s){return 32-Math.clz32(s)}:n.prototype._countBits=function(s){var c=s,p=0;return c>=4096&&(p+=13,c>>>=13),c>=64&&(p+=7,c>>>=7),c>=8&&(p+=4,c>>>=4),c>=2&&(p+=2,c>>>=2),p+c},n.prototype._zeroBits=function(s){if(s===0)return 26;var c=s,p=0;return(c&8191)===0&&(p+=13,c>>>=13),(c&127)===0&&(p+=7,c>>>=7),(c&15)===0&&(p+=4,c>>>=4),(c&3)===0&&(p+=2,c>>>=2),(c&1)===0&&p++,p},n.prototype.bitLength=function(){var s=this.words[this.length-1],c=this._countBits(s);return(this.length-1)*26+c};function R(b){for(var s=new Array(b.bitLength()),c=0;c<s.length;c++){var p=c/26|0,y=c%26;s[c]=b.words[p]>>>y&1}return s}n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var s=0,c=0;c<this.length;c++){var p=this._zeroBits(this.words[c]);if(s+=p,p!==26)break}return s},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(s){return this.negative!==0?this.abs().inotn(s).iaddn(1):this.clone()},n.prototype.fromTwos=function(s){return this.testn(s-1)?this.notn(s).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return this.negative!==0},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(s){for(;this.length<s.length;)this.words[this.length++]=0;for(var c=0;c<s.length;c++)this.words[c]=this.words[c]|s.words[c];return this._strip()},n.prototype.ior=function(s){return r((this.negative|s.negative)===0),this.iuor(s)},n.prototype.or=function(s){return this.length>s.length?this.clone().ior(s):s.clone().ior(this)},n.prototype.uor=function(s){return this.length>s.length?this.clone().iuor(s):s.clone().iuor(this)},n.prototype.iuand=function(s){var c;this.length>s.length?c=s:c=this;for(var p=0;p<c.length;p++)this.words[p]=this.words[p]&s.words[p];return this.length=c.length,this._strip()},n.prototype.iand=function(s){return r((this.negative|s.negative)===0),this.iuand(s)},n.prototype.and=function(s){return this.length>s.length?this.clone().iand(s):s.clone().iand(this)},n.prototype.uand=function(s){return this.length>s.length?this.clone().iuand(s):s.clone().iuand(this)},n.prototype.iuxor=function(s){var c,p;this.length>s.length?(c=this,p=s):(c=s,p=this);for(var y=0;y<p.length;y++)this.words[y]=c.words[y]^p.words[y];if(this!==c)for(;y<c.length;y++)this.words[y]=c.words[y];return this.length=c.length,this._strip()},n.prototype.ixor=function(s){return r((this.negative|s.negative)===0),this.iuxor(s)},n.prototype.xor=function(s){return this.length>s.length?this.clone().ixor(s):s.clone().ixor(this)},n.prototype.uxor=function(s){return this.length>s.length?this.clone().iuxor(s):s.clone().iuxor(this)},n.prototype.inotn=function(s){r(typeof s=="number"&&s>=0);var c=Math.ceil(s/26)|0,p=s%26;this._expand(c),p>0&&c--;for(var y=0;y<c;y++)this.words[y]=~this.words[y]&67108863;return p>0&&(this.words[y]=~this.words[y]&67108863>>26-p),this._strip()},n.prototype.notn=function(s){return this.clone().inotn(s)},n.prototype.setn=function(s,c){r(typeof s=="number"&&s>=0);var p=s/26|0,y=s%26;return this._expand(p+1),c?this.words[p]=this.words[p]|1<<y:this.words[p]=this.words[p]&~(1<<y),this._strip()},n.prototype.iadd=function(s){var c;if(this.negative!==0&&s.negative===0)return this.negative=0,c=this.isub(s),this.negative^=1,this._normSign();if(this.negative===0&&s.negative!==0)return s.negative=0,c=this.isub(s),s.negative=1,c._normSign();var p,y;this.length>s.length?(p=this,y=s):(p=s,y=this);for(var v=0,d=0;d<y.length;d++)c=(p.words[d]|0)+(y.words[d]|0)+v,this.words[d]=c&67108863,v=c>>>26;for(;v!==0&&d<p.length;d++)c=(p.words[d]|0)+v,this.words[d]=c&67108863,v=c>>>26;if(this.length=p.length,v!==0)this.words[this.length]=v,this.length++;else if(p!==this)for(;d<p.length;d++)this.words[d]=p.words[d];return this},n.prototype.add=function(s){var c;return s.negative!==0&&this.negative===0?(s.negative=0,c=this.sub(s),s.negative^=1,c):s.negative===0&&this.negative!==0?(this.negative=0,c=s.sub(this),this.negative=1,c):this.length>s.length?this.clone().iadd(s):s.clone().iadd(this)},n.prototype.isub=function(s){if(s.negative!==0){s.negative=0;var c=this.iadd(s);return s.negative=1,c._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(s),this.negative=1,this._normSign();var p=this.cmp(s);if(p===0)return this.negative=0,this.length=1,this.words[0]=0,this;var y,v;p>0?(y=this,v=s):(y=s,v=this);for(var d=0,w=0;w<v.length;w++)c=(y.words[w]|0)-(v.words[w]|0)+d,d=c>>26,this.words[w]=c&67108863;for(;d!==0&&w<y.length;w++)c=(y.words[w]|0)+d,d=c>>26,this.words[w]=c&67108863;if(d===0&&w<y.length&&y!==this)for(;w<y.length;w++)this.words[w]=y.words[w];return this.length=Math.max(this.length,w),y!==this&&(this.negative=1),this._strip()},n.prototype.sub=function(s){return this.clone().isub(s)};function N(b,s,c){c.negative=s.negative^b.negative;var p=b.length+s.length|0;c.length=p,p=p-1|0;var y=b.words[0]|0,v=s.words[0]|0,d=y*v,w=d&67108863,S=d/67108864|0;c.words[0]=w;for(var l=1;l<p;l++){for(var M=S>>>26,C=S&67108863,D=Math.min(l,s.length-1),T=Math.max(0,l-b.length+1);T<=D;T++){var j=l-T|0;y=b.words[j]|0,v=s.words[T]|0,d=y*v+C,M+=d/67108864|0,C=d&67108863}c.words[l]=C|0,S=M|0}return S!==0?c.words[l]=S|0:c.length--,c._strip()}var P=function(s,c,p){var y=s.words,v=c.words,d=p.words,w=0,S,l,M,C=y[0]|0,D=C&8191,T=C>>>13,j=y[1]|0,O=j&8191,U=j>>>13,Qt=y[2]|0,z=Qt&8191,K=Qt>>>13,xf=y[3]|0,V=xf&8191,G=xf>>>13,Sf=y[4]|0,X=Sf&8191,J=Sf>>>13,Mf=y[5]|0,Y=Mf&8191,Z=Mf>>>13,Ef=y[6]|0,$=Ef&8191,Q=Ef>>>13,Af=y[7]|0,ee=Af&8191,te=Af>>>13,Bf=y[8]|0,re=Bf&8191,ie=Bf>>>13,qf=y[9]|0,ne=qf&8191,fe=qf>>>13,If=v[0]|0,ae=If&8191,se=If>>>13,Rf=v[1]|0,oe=Rf&8191,de=Rf>>>13,kf=v[2]|0,ce=kf&8191,ue=kf>>>13,Pf=v[3]|0,he=Pf&8191,le=Pf>>>13,Cf=v[4]|0,be=Cf&8191,pe=Cf>>>13,Tf=v[5]|0,ve=Tf&8191,ye=Tf>>>13,Df=v[6]|0,ge=Df&8191,me=Df>>>13,Nf=v[7]|0,_e=Nf&8191,we=Nf>>>13,Lf=v[8]|0,xe=Lf&8191,Se=Lf>>>13,yn=v[9]|0,ze=yn&8191,Ke=yn>>>13;p.negative=s.negative^c.negative,p.length=19,S=Math.imul(D,ae),l=Math.imul(D,se),l=l+Math.imul(T,ae)|0,M=Math.imul(T,se);var yi=(w+S|0)+((l&8191)<<13)|0;w=(M+(l>>>13)|0)+(yi>>>26)|0,yi&=67108863,S=Math.imul(O,ae),l=Math.imul(O,se),l=l+Math.imul(U,ae)|0,M=Math.imul(U,se),S=S+Math.imul(D,oe)|0,l=l+Math.imul(D,de)|0,l=l+Math.imul(T,oe)|0,M=M+Math.imul(T,de)|0;var gi=(w+S|0)+((l&8191)<<13)|0;w=(M+(l>>>13)|0)+(gi>>>26)|0,gi&=67108863,S=Math.imul(z,ae),l=Math.imul(z,se),l=l+Math.imul(K,ae)|0,M=Math.imul(K,se),S=S+Math.imul(O,oe)|0,l=l+Math.imul(O,de)|0,l=l+Math.imul(U,oe)|0,M=M+Math.imul(U,de)|0,S=S+Math.imul(D,ce)|0,l=l+Math.imul(D,ue)|0,l=l+Math.imul(T,ce)|0,M=M+Math.imul(T,ue)|0;var mi=(w+S|0)+((l&8191)<<13)|0;w=(M+(l>>>13)|0)+(mi>>>26)|0,mi&=67108863,S=Math.imul(V,ae),l=Math.imul(V,se),l=l+Math.imul(G,ae)|0,M=Math.imul(G,se),S=S+Math.imul(z,oe)|0,l=l+Math.imul(z,de)|0,l=l+Math.imul(K,oe)|0,M=M+Math.imul(K,de)|0,S=S+Math.imul(O,ce)|0,l=l+Math.imul(O,ue)|0,l=l+Math.imul(U,ce)|0,M=M+Math.imul(U,ue)|0,S=S+Math.imul(D,he)|0,l=l+Math.imul(D,le)|0,l=l+Math.imul(T,he)|0,M=M+Math.imul(T,le)|0;var _i=(w+S|0)+((l&8191)<<13)|0;w=(M+(l>>>13)|0)+(_i>>>26)|0,_i&=67108863,S=Math.imul(X,ae),l=Math.imul(X,se),l=l+Math.imul(J,ae)|0,M=Math.imul(J,se),S=S+Math.imul(V,oe)|0,l=l+Math.imul(V,de)|0,l=l+Math.imul(G,oe)|0,M=M+Math.imul(G,de)|0,S=S+Math.imul(z,ce)|0,l=l+Math.imul(z,ue)|0,l=l+Math.imul(K,ce)|0,M=M+Math.imul(K,ue)|0,S=S+Math.imul(O,he)|0,l=l+Math.imul(O,le)|0,l=l+Math.imul(U,he)|0,M=M+Math.imul(U,le)|0,S=S+Math.imul(D,be)|0,l=l+Math.imul(D,pe)|0,l=l+Math.imul(T,be)|0,M=M+Math.imul(T,pe)|0;var wi=(w+S|0)+((l&8191)<<13)|0;w=(M+(l>>>13)|0)+(wi>>>26)|0,wi&=67108863,S=Math.imul(Y,ae),l=Math.imul(Y,se),l=l+Math.imul(Z,ae)|0,M=Math.imul(Z,se),S=S+Math.imul(X,oe)|0,l=l+Math.imul(X,de)|0,l=l+Math.imul(J,oe)|0,M=M+Math.imul(J,de)|0,S=S+Math.imul(V,ce)|0,l=l+Math.imul(V,ue)|0,l=l+Math.imul(G,ce)|0,M=M+Math.imul(G,ue)|0,S=S+Math.imul(z,he)|0,l=l+Math.imul(z,le)|0,l=l+Math.imul(K,he)|0,M=M+Math.imul(K,le)|0,S=S+Math.imul(O,be)|0,l=l+Math.imul(O,pe)|0,l=l+Math.imul(U,be)|0,M=M+Math.imul(U,pe)|0,S=S+Math.imul(D,ve)|0,l=l+Math.imul(D,ye)|0,l=l+Math.imul(T,ve)|0,M=M+Math.imul(T,ye)|0;var xi=(w+S|0)+((l&8191)<<13)|0;w=(M+(l>>>13)|0)+(xi>>>26)|0,xi&=67108863,S=Math.imul($,ae),l=Math.imul($,se),l=l+Math.imul(Q,ae)|0,M=Math.imul(Q,se),S=S+Math.imul(Y,oe)|0,l=l+Math.imul(Y,de)|0,l=l+Math.imul(Z,oe)|0,M=M+Math.imul(Z,de)|0,S=S+Math.imul(X,ce)|0,l=l+Math.imul(X,ue)|0,l=l+Math.imul(J,ce)|0,M=M+Math.imul(J,ue)|0,S=S+Math.imul(V,he)|0,l=l+Math.imul(V,le)|0,l=l+Math.imul(G,he)|0,M=M+Math.imul(G,le)|0,S=S+Math.imul(z,be)|0,l=l+Math.imul(z,pe)|0,l=l+Math.imul(K,be)|0,M=M+Math.imul(K,pe)|0,S=S+Math.imul(O,ve)|0,l=l+Math.imul(O,ye)|0,l=l+Math.imul(U,ve)|0,M=M+Math.imul(U,ye)|0,S=S+Math.imul(D,ge)|0,l=l+Math.imul(D,me)|0,l=l+Math.imul(T,ge)|0,M=M+Math.imul(T,me)|0;var Si=(w+S|0)+((l&8191)<<13)|0;w=(M+(l>>>13)|0)+(Si>>>26)|0,Si&=67108863,S=Math.imul(ee,ae),l=Math.imul(ee,se),l=l+Math.imul(te,ae)|0,M=Math.imul(te,se),S=S+Math.imul($,oe)|0,l=l+Math.imul($,de)|0,l=l+Math.imul(Q,oe)|0,M=M+Math.imul(Q,de)|0,S=S+Math.imul(Y,ce)|0,l=l+Math.imul(Y,ue)|0,l=l+Math.imul(Z,ce)|0,M=M+Math.imul(Z,ue)|0,S=S+Math.imul(X,he)|0,l=l+Math.imul(X,le)|0,l=l+Math.imul(J,he)|0,M=M+Math.imul(J,le)|0,S=S+Math.imul(V,be)|0,l=l+Math.imul(V,pe)|0,l=l+Math.imul(G,be)|0,M=M+Math.imul(G,pe)|0,S=S+Math.imul(z,ve)|0,l=l+Math.imul(z,ye)|0,l=l+Math.imul(K,ve)|0,M=M+Math.imul(K,ye)|0,S=S+Math.imul(O,ge)|0,l=l+Math.imul(O,me)|0,l=l+Math.imul(U,ge)|0,M=M+Math.imul(U,me)|0,S=S+Math.imul(D,_e)|0,l=l+Math.imul(D,we)|0,l=l+Math.imul(T,_e)|0,M=M+Math.imul(T,we)|0;var Mi=(w+S|0)+((l&8191)<<13)|0;w=(M+(l>>>13)|0)+(Mi>>>26)|0,Mi&=67108863,S=Math.imul(re,ae),l=Math.imul(re,se),l=l+Math.imul(ie,ae)|0,M=Math.imul(ie,se),S=S+Math.imul(ee,oe)|0,l=l+Math.imul(ee,de)|0,l=l+Math.imul(te,oe)|0,M=M+Math.imul(te,de)|0,S=S+Math.imul($,ce)|0,l=l+Math.imul($,ue)|0,l=l+Math.imul(Q,ce)|0,M=M+Math.imul(Q,ue)|0,S=S+Math.imul(Y,he)|0,l=l+Math.imul(Y,le)|0,l=l+Math.imul(Z,he)|0,M=M+Math.imul(Z,le)|0,S=S+Math.imul(X,be)|0,l=l+Math.imul(X,pe)|0,l=l+Math.imul(J,be)|0,M=M+Math.imul(J,pe)|0,S=S+Math.imul(V,ve)|0,l=l+Math.imul(V,ye)|0,l=l+Math.imul(G,ve)|0,M=M+Math.imul(G,ye)|0,S=S+Math.imul(z,ge)|0,l=l+Math.imul(z,me)|0,l=l+Math.imul(K,ge)|0,M=M+Math.imul(K,me)|0,S=S+Math.imul(O,_e)|0,l=l+Math.imul(O,we)|0,l=l+Math.imul(U,_e)|0,M=M+Math.imul(U,we)|0,S=S+Math.imul(D,xe)|0,l=l+Math.imul(D,Se)|0,l=l+Math.imul(T,xe)|0,M=M+Math.imul(T,Se)|0;var Ei=(w+S|0)+((l&8191)<<13)|0;w=(M+(l>>>13)|0)+(Ei>>>26)|0,Ei&=67108863,S=Math.imul(ne,ae),l=Math.imul(ne,se),l=l+Math.imul(fe,ae)|0,M=Math.imul(fe,se),S=S+Math.imul(re,oe)|0,l=l+Math.imul(re,de)|0,l=l+Math.imul(ie,oe)|0,M=M+Math.imul(ie,de)|0,S=S+Math.imul(ee,ce)|0,l=l+Math.imul(ee,ue)|0,l=l+Math.imul(te,ce)|0,M=M+Math.imul(te,ue)|0,S=S+Math.imul($,he)|0,l=l+Math.imul($,le)|0,l=l+Math.imul(Q,he)|0,M=M+Math.imul(Q,le)|0,S=S+Math.imul(Y,be)|0,l=l+Math.imul(Y,pe)|0,l=l+Math.imul(Z,be)|0,M=M+Math.imul(Z,pe)|0,S=S+Math.imul(X,ve)|0,l=l+Math.imul(X,ye)|0,l=l+Math.imul(J,ve)|0,M=M+Math.imul(J,ye)|0,S=S+Math.imul(V,ge)|0,l=l+Math.imul(V,me)|0,l=l+Math.imul(G,ge)|0,M=M+Math.imul(G,me)|0,S=S+Math.imul(z,_e)|0,l=l+Math.imul(z,we)|0,l=l+Math.imul(K,_e)|0,M=M+Math.imul(K,we)|0,S=S+Math.imul(O,xe)|0,l=l+Math.imul(O,Se)|0,l=l+Math.imul(U,xe)|0,M=M+Math.imul(U,Se)|0,S=S+Math.imul(D,ze)|0,l=l+Math.imul(D,Ke)|0,l=l+Math.imul(T,ze)|0,M=M+Math.imul(T,Ke)|0;var Ai=(w+S|0)+((l&8191)<<13)|0;w=(M+(l>>>13)|0)+(Ai>>>26)|0,Ai&=67108863,S=Math.imul(ne,oe),l=Math.imul(ne,de),l=l+Math.imul(fe,oe)|0,M=Math.imul(fe,de),S=S+Math.imul(re,ce)|0,l=l+Math.imul(re,ue)|0,l=l+Math.imul(ie,ce)|0,M=M+Math.imul(ie,ue)|0,S=S+Math.imul(ee,he)|0,l=l+Math.imul(ee,le)|0,l=l+Math.imul(te,he)|0,M=M+Math.imul(te,le)|0,S=S+Math.imul($,be)|0,l=l+Math.imul($,pe)|0,l=l+Math.imul(Q,be)|0,M=M+Math.imul(Q,pe)|0,S=S+Math.imul(Y,ve)|0,l=l+Math.imul(Y,ye)|0,l=l+Math.imul(Z,ve)|0,M=M+Math.imul(Z,ye)|0,S=S+Math.imul(X,ge)|0,l=l+Math.imul(X,me)|0,l=l+Math.imul(J,ge)|0,M=M+Math.imul(J,me)|0,S=S+Math.imul(V,_e)|0,l=l+Math.imul(V,we)|0,l=l+Math.imul(G,_e)|0,M=M+Math.imul(G,we)|0,S=S+Math.imul(z,xe)|0,l=l+Math.imul(z,Se)|0,l=l+Math.imul(K,xe)|0,M=M+Math.imul(K,Se)|0,S=S+Math.imul(O,ze)|0,l=l+Math.imul(O,Ke)|0,l=l+Math.imul(U,ze)|0,M=M+Math.imul(U,Ke)|0;var Bi=(w+S|0)+((l&8191)<<13)|0;w=(M+(l>>>13)|0)+(Bi>>>26)|0,Bi&=67108863,S=Math.imul(ne,ce),l=Math.imul(ne,ue),l=l+Math.imul(fe,ce)|0,M=Math.imul(fe,ue),S=S+Math.imul(re,he)|0,l=l+Math.imul(re,le)|0,l=l+Math.imul(ie,he)|0,M=M+Math.imul(ie,le)|0,S=S+Math.imul(ee,be)|0,l=l+Math.imul(ee,pe)|0,l=l+Math.imul(te,be)|0,M=M+Math.imul(te,pe)|0,S=S+Math.imul($,ve)|0,l=l+Math.imul($,ye)|0,l=l+Math.imul(Q,ve)|0,M=M+Math.imul(Q,ye)|0,S=S+Math.imul(Y,ge)|0,l=l+Math.imul(Y,me)|0,l=l+Math.imul(Z,ge)|0,M=M+Math.imul(Z,me)|0,S=S+Math.imul(X,_e)|0,l=l+Math.imul(X,we)|0,l=l+Math.imul(J,_e)|0,M=M+Math.imul(J,we)|0,S=S+Math.imul(V,xe)|0,l=l+Math.imul(V,Se)|0,l=l+Math.imul(G,xe)|0,M=M+Math.imul(G,Se)|0,S=S+Math.imul(z,ze)|0,l=l+Math.imul(z,Ke)|0,l=l+Math.imul(K,ze)|0,M=M+Math.imul(K,Ke)|0;var qi=(w+S|0)+((l&8191)<<13)|0;w=(M+(l>>>13)|0)+(qi>>>26)|0,qi&=67108863,S=Math.imul(ne,he),l=Math.imul(ne,le),l=l+Math.imul(fe,he)|0,M=Math.imul(fe,le),S=S+Math.imul(re,be)|0,l=l+Math.imul(re,pe)|0,l=l+Math.imul(ie,be)|0,M=M+Math.imul(ie,pe)|0,S=S+Math.imul(ee,ve)|0,l=l+Math.imul(ee,ye)|0,l=l+Math.imul(te,ve)|0,M=M+Math.imul(te,ye)|0,S=S+Math.imul($,ge)|0,l=l+Math.imul($,me)|0,l=l+Math.imul(Q,ge)|0,M=M+Math.imul(Q,me)|0,S=S+Math.imul(Y,_e)|0,l=l+Math.imul(Y,we)|0,l=l+Math.imul(Z,_e)|0,M=M+Math.imul(Z,we)|0,S=S+Math.imul(X,xe)|0,l=l+Math.imul(X,Se)|0,l=l+Math.imul(J,xe)|0,M=M+Math.imul(J,Se)|0,S=S+Math.imul(V,ze)|0,l=l+Math.imul(V,Ke)|0,l=l+Math.imul(G,ze)|0,M=M+Math.imul(G,Ke)|0;var Ii=(w+S|0)+((l&8191)<<13)|0;w=(M+(l>>>13)|0)+(Ii>>>26)|0,Ii&=67108863,S=Math.imul(ne,be),l=Math.imul(ne,pe),l=l+Math.imul(fe,be)|0,M=Math.imul(fe,pe),S=S+Math.imul(re,ve)|0,l=l+Math.imul(re,ye)|0,l=l+Math.imul(ie,ve)|0,M=M+Math.imul(ie,ye)|0,S=S+Math.imul(ee,ge)|0,l=l+Math.imul(ee,me)|0,l=l+Math.imul(te,ge)|0,M=M+Math.imul(te,me)|0,S=S+Math.imul($,_e)|0,l=l+Math.imul($,we)|0,l=l+Math.imul(Q,_e)|0,M=M+Math.imul(Q,we)|0,S=S+Math.imul(Y,xe)|0,l=l+Math.imul(Y,Se)|0,l=l+Math.imul(Z,xe)|0,M=M+Math.imul(Z,Se)|0,S=S+Math.imul(X,ze)|0,l=l+Math.imul(X,Ke)|0,l=l+Math.imul(J,ze)|0,M=M+Math.imul(J,Ke)|0;var Ri=(w+S|0)+((l&8191)<<13)|0;w=(M+(l>>>13)|0)+(Ri>>>26)|0,Ri&=67108863,S=Math.imul(ne,ve),l=Math.imul(ne,ye),l=l+Math.imul(fe,ve)|0,M=Math.imul(fe,ye),S=S+Math.imul(re,ge)|0,l=l+Math.imul(re,me)|0,l=l+Math.imul(ie,ge)|0,M=M+Math.imul(ie,me)|0,S=S+Math.imul(ee,_e)|0,l=l+Math.imul(ee,we)|0,l=l+Math.imul(te,_e)|0,M=M+Math.imul(te,we)|0,S=S+Math.imul($,xe)|0,l=l+Math.imul($,Se)|0,l=l+Math.imul(Q,xe)|0,M=M+Math.imul(Q,Se)|0,S=S+Math.imul(Y,ze)|0,l=l+Math.imul(Y,Ke)|0,l=l+Math.imul(Z,ze)|0,M=M+Math.imul(Z,Ke)|0;var ki=(w+S|0)+((l&8191)<<13)|0;w=(M+(l>>>13)|0)+(ki>>>26)|0,ki&=67108863,S=Math.imul(ne,ge),l=Math.imul(ne,me),l=l+Math.imul(fe,ge)|0,M=Math.imul(fe,me),S=S+Math.imul(re,_e)|0,l=l+Math.imul(re,we)|0,l=l+Math.imul(ie,_e)|0,M=M+Math.imul(ie,we)|0,S=S+Math.imul(ee,xe)|0,l=l+Math.imul(ee,Se)|0,l=l+Math.imul(te,xe)|0,M=M+Math.imul(te,Se)|0,S=S+Math.imul($,ze)|0,l=l+Math.imul($,Ke)|0,l=l+Math.imul(Q,ze)|0,M=M+Math.imul(Q,Ke)|0;var Pi=(w+S|0)+((l&8191)<<13)|0;w=(M+(l>>>13)|0)+(Pi>>>26)|0,Pi&=67108863,S=Math.imul(ne,_e),l=Math.imul(ne,we),l=l+Math.imul(fe,_e)|0,M=Math.imul(fe,we),S=S+Math.imul(re,xe)|0,l=l+Math.imul(re,Se)|0,l=l+Math.imul(ie,xe)|0,M=M+Math.imul(ie,Se)|0,S=S+Math.imul(ee,ze)|0,l=l+Math.imul(ee,Ke)|0,l=l+Math.imul(te,ze)|0,M=M+Math.imul(te,Ke)|0;var Wo=(w+S|0)+((l&8191)<<13)|0;w=(M+(l>>>13)|0)+(Wo>>>26)|0,Wo&=67108863,S=Math.imul(ne,xe),l=Math.imul(ne,Se),l=l+Math.imul(fe,xe)|0,M=Math.imul(fe,Se),S=S+Math.imul(re,ze)|0,l=l+Math.imul(re,Ke)|0,l=l+Math.imul(ie,ze)|0,M=M+Math.imul(ie,Ke)|0;var Vo=(w+S|0)+((l&8191)<<13)|0;w=(M+(l>>>13)|0)+(Vo>>>26)|0,Vo&=67108863,S=Math.imul(ne,ze),l=Math.imul(ne,Ke),l=l+Math.imul(fe,ze)|0,M=Math.imul(fe,Ke);var Go=(w+S|0)+((l&8191)<<13)|0;return w=(M+(l>>>13)|0)+(Go>>>26)|0,Go&=67108863,d[0]=yi,d[1]=gi,d[2]=mi,d[3]=_i,d[4]=wi,d[5]=xi,d[6]=Si,d[7]=Mi,d[8]=Ei,d[9]=Ai,d[10]=Bi,d[11]=qi,d[12]=Ii,d[13]=Ri,d[14]=ki,d[15]=Pi,d[16]=Wo,d[17]=Vo,d[18]=Go,w!==0&&(d[19]=w,p.length++),p};Math.imul||(P=N);function L(b,s,c){c.negative=s.negative^b.negative,c.length=b.length+s.length;for(var p=0,y=0,v=0;v<c.length-1;v++){var d=y;y=0;for(var w=p&67108863,S=Math.min(v,s.length-1),l=Math.max(0,v-b.length+1);l<=S;l++){var M=v-l,C=b.words[M]|0,D=s.words[l]|0,T=C*D,j=T&67108863;d=d+(T/67108864|0)|0,j=j+w|0,w=j&67108863,d=d+(j>>>26)|0,y+=d>>>26,d&=67108863}c.words[v]=w,p=d,d=y}return p!==0?c.words[v]=p:c.length--,c._strip()}function W(b,s,c){return L(b,s,c)}n.prototype.mulTo=function(s,c){var p,y=this.length+s.length;return this.length===10&&s.length===10?p=P(this,s,c):y<63?p=N(this,s,c):y<1024?p=L(this,s,c):p=W(this,s,c),p};function Be(b,s){this.x=b,this.y=s}Be.prototype.makeRBT=function(s){for(var c=new Array(s),p=n.prototype._countBits(s)-1,y=0;y<s;y++)c[y]=this.revBin(y,p,s);return c},Be.prototype.revBin=function(s,c,p){if(s===0||s===p-1)return s;for(var y=0,v=0;v<c;v++)y|=(s&1)<<c-v-1,s>>=1;return y},Be.prototype.permute=function(s,c,p,y,v,d){for(var w=0;w<d;w++)y[w]=c[s[w]],v[w]=p[s[w]]},Be.prototype.transform=function(s,c,p,y,v,d){this.permute(d,s,c,p,y,v);for(var w=1;w<v;w<<=1)for(var S=w<<1,l=Math.cos(2*Math.PI/S),M=Math.sin(2*Math.PI/S),C=0;C<v;C+=S)for(var D=l,T=M,j=0;j<w;j++){var O=p[C+j],U=y[C+j],Qt=p[C+j+w],z=y[C+j+w],K=D*Qt-T*z;z=D*z+T*Qt,Qt=K,p[C+j]=O+Qt,y[C+j]=U+z,p[C+j+w]=O-Qt,y[C+j+w]=U-z,j!==S&&(K=l*D-M*T,T=l*T+M*D,D=K)}},Be.prototype.guessLen13b=function(s,c){var p=Math.max(c,s)|1,y=p&1,v=0;for(p=p/2|0;p;p=p>>>1)v++;return 1<<v+1+y},Be.prototype.conjugate=function(s,c,p){if(!(p<=1))for(var y=0;y<p/2;y++){var v=s[y];s[y]=s[p-y-1],s[p-y-1]=v,v=c[y],c[y]=-c[p-y-1],c[p-y-1]=-v}},Be.prototype.normalize13b=function(s,c){for(var p=0,y=0;y<c/2;y++){var v=Math.round(s[2*y+1]/c)*8192+Math.round(s[2*y]/c)+p;s[y]=v&67108863,v<67108864?p=0:p=v/67108864|0}return s},Be.prototype.convert13b=function(s,c,p,y){for(var v=0,d=0;d<c;d++)v=v+(s[d]|0),p[2*d]=v&8191,v=v>>>13,p[2*d+1]=v&8191,v=v>>>13;for(d=2*c;d<y;++d)p[d]=0;r(v===0),r((v&-8192)===0)},Be.prototype.stub=function(s){for(var c=new Array(s),p=0;p<s;p++)c[p]=0;return c},Be.prototype.mulp=function(s,c,p){var y=2*this.guessLen13b(s.length,c.length),v=this.makeRBT(y),d=this.stub(y),w=new Array(y),S=new Array(y),l=new Array(y),M=new Array(y),C=new Array(y),D=new Array(y),T=p.words;T.length=y,this.convert13b(s.words,s.length,w,y),this.convert13b(c.words,c.length,M,y),this.transform(w,d,S,l,y,v),this.transform(M,d,C,D,y,v);for(var j=0;j<y;j++){var O=S[j]*C[j]-l[j]*D[j];l[j]=S[j]*D[j]+l[j]*C[j],S[j]=O}return this.conjugate(S,l,y),this.transform(S,l,T,d,y,v),this.conjugate(T,d,y),this.normalize13b(T,y),p.negative=s.negative^c.negative,p.length=s.length+c.length,p._strip()},n.prototype.mul=function(s){var c=new n(null);return c.words=new Array(this.length+s.length),this.mulTo(s,c)},n.prototype.mulf=function(s){var c=new n(null);return c.words=new Array(this.length+s.length),W(this,s,c)},n.prototype.imul=function(s){return this.clone().mulTo(s,this)},n.prototype.imuln=function(s){var c=s<0;c&&(s=-s),r(typeof s=="number"),r(s<67108864);for(var p=0,y=0;y<this.length;y++){var v=(this.words[y]|0)*s,d=(v&67108863)+(p&67108863);p>>=26,p+=v/67108864|0,p+=d>>>26,this.words[y]=d&67108863}return p!==0&&(this.words[y]=p,this.length++),c?this.ineg():this},n.prototype.muln=function(s){return this.clone().imuln(s)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(s){var c=R(s);if(c.length===0)return new n(1);for(var p=this,y=0;y<c.length&&c[y]===0;y++,p=p.sqr());if(++y<c.length)for(var v=p.sqr();y<c.length;y++,v=v.sqr())c[y]!==0&&(p=p.mul(v));return p},n.prototype.iushln=function(s){r(typeof s=="number"&&s>=0);var c=s%26,p=(s-c)/26,y=67108863>>>26-c<<26-c,v;if(c!==0){var d=0;for(v=0;v<this.length;v++){var w=this.words[v]&y,S=(this.words[v]|0)-w<<c;this.words[v]=S|d,d=w>>>26-c}d&&(this.words[v]=d,this.length++)}if(p!==0){for(v=this.length-1;v>=0;v--)this.words[v+p]=this.words[v];for(v=0;v<p;v++)this.words[v]=0;this.length+=p}return this._strip()},n.prototype.ishln=function(s){return r(this.negative===0),this.iushln(s)},n.prototype.iushrn=function(s,c,p){r(typeof s=="number"&&s>=0);var y;c?y=(c-c%26)/26:y=0;var v=s%26,d=Math.min((s-v)/26,this.length),w=67108863^67108863>>>v<<v,S=p;if(y-=d,y=Math.max(0,y),S){for(var l=0;l<d;l++)S.words[l]=this.words[l];S.length=d}if(d!==0)if(this.length>d)for(this.length-=d,l=0;l<this.length;l++)this.words[l]=this.words[l+d];else this.words[0]=0,this.length=1;var M=0;for(l=this.length-1;l>=0&&(M!==0||l>=y);l--){var C=this.words[l]|0;this.words[l]=M<<26-v|C>>>v,M=C&w}return S&&M!==0&&(S.words[S.length++]=M),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},n.prototype.ishrn=function(s,c,p){return r(this.negative===0),this.iushrn(s,c,p)},n.prototype.shln=function(s){return this.clone().ishln(s)},n.prototype.ushln=function(s){return this.clone().iushln(s)},n.prototype.shrn=function(s){return this.clone().ishrn(s)},n.prototype.ushrn=function(s){return this.clone().iushrn(s)},n.prototype.testn=function(s){r(typeof s=="number"&&s>=0);var c=s%26,p=(s-c)/26,y=1<<c;if(this.length<=p)return!1;var v=this.words[p];return!!(v&y)},n.prototype.imaskn=function(s){r(typeof s=="number"&&s>=0);var c=s%26,p=(s-c)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=p)return this;if(c!==0&&p++,this.length=Math.min(p,this.length),c!==0){var y=67108863^67108863>>>c<<c;this.words[this.length-1]&=y}return this._strip()},n.prototype.maskn=function(s){return this.clone().imaskn(s)},n.prototype.iaddn=function(s){return r(typeof s=="number"),r(s<67108864),s<0?this.isubn(-s):this.negative!==0?this.length===1&&(this.words[0]|0)<=s?(this.words[0]=s-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(s),this.negative=1,this):this._iaddn(s)},n.prototype._iaddn=function(s){this.words[0]+=s;for(var c=0;c<this.length&&this.words[c]>=67108864;c++)this.words[c]-=67108864,c===this.length-1?this.words[c+1]=1:this.words[c+1]++;return this.length=Math.max(this.length,c+1),this},n.prototype.isubn=function(s){if(r(typeof s=="number"),r(s<67108864),s<0)return this.iaddn(-s);if(this.negative!==0)return this.negative=0,this.iaddn(s),this.negative=1,this;if(this.words[0]-=s,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var c=0;c<this.length&&this.words[c]<0;c++)this.words[c]+=67108864,this.words[c+1]-=1;return this._strip()},n.prototype.addn=function(s){return this.clone().iaddn(s)},n.prototype.subn=function(s){return this.clone().isubn(s)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(s,c,p){var y=s.length+p,v;this._expand(y);var d,w=0;for(v=0;v<s.length;v++){d=(this.words[v+p]|0)+w;var S=(s.words[v]|0)*c;d-=S&67108863,w=(d>>26)-(S/67108864|0),this.words[v+p]=d&67108863}for(;v<this.length-p;v++)d=(this.words[v+p]|0)+w,w=d>>26,this.words[v+p]=d&67108863;if(w===0)return this._strip();for(r(w===-1),w=0,v=0;v<this.length;v++)d=-(this.words[v]|0)+w,w=d>>26,this.words[v]=d&67108863;return this.negative=1,this._strip()},n.prototype._wordDiv=function(s,c){var p=this.length-s.length,y=this.clone(),v=s,d=v.words[v.length-1]|0,w=this._countBits(d);p=26-w,p!==0&&(v=v.ushln(p),y.iushln(p),d=v.words[v.length-1]|0);var S=y.length-v.length,l;if(c!=="mod"){l=new n(null),l.length=S+1,l.words=new Array(l.length);for(var M=0;M<l.length;M++)l.words[M]=0}var C=y.clone()._ishlnsubmul(v,1,S);C.negative===0&&(y=C,l&&(l.words[S]=1));for(var D=S-1;D>=0;D--){var T=(y.words[v.length+D]|0)*67108864+(y.words[v.length+D-1]|0);for(T=Math.min(T/d|0,67108863),y._ishlnsubmul(v,T,D);y.negative!==0;)T--,y.negative=0,y._ishlnsubmul(v,1,D),y.isZero()||(y.negative^=1);l&&(l.words[D]=T)}return l&&l._strip(),y._strip(),c!=="div"&&p!==0&&y.iushrn(p),{div:l||null,mod:y}},n.prototype.divmod=function(s,c,p){if(r(!s.isZero()),this.isZero())return{div:new n(0),mod:new n(0)};var y,v,d;return this.negative!==0&&s.negative===0?(d=this.neg().divmod(s,c),c!=="mod"&&(y=d.div.neg()),c!=="div"&&(v=d.mod.neg(),p&&v.negative!==0&&v.iadd(s)),{div:y,mod:v}):this.negative===0&&s.negative!==0?(d=this.divmod(s.neg(),c),c!=="mod"&&(y=d.div.neg()),{div:y,mod:d.mod}):(this.negative&s.negative)!==0?(d=this.neg().divmod(s.neg(),c),c!=="div"&&(v=d.mod.neg(),p&&v.negative!==0&&v.isub(s)),{div:d.div,mod:v}):s.length>this.length||this.cmp(s)<0?{div:new n(0),mod:this}:s.length===1?c==="div"?{div:this.divn(s.words[0]),mod:null}:c==="mod"?{div:null,mod:new n(this.modrn(s.words[0]))}:{div:this.divn(s.words[0]),mod:new n(this.modrn(s.words[0]))}:this._wordDiv(s,c)},n.prototype.div=function(s){return this.divmod(s,"div",!1).div},n.prototype.mod=function(s){return this.divmod(s,"mod",!1).mod},n.prototype.umod=function(s){return this.divmod(s,"mod",!0).mod},n.prototype.divRound=function(s){var c=this.divmod(s);if(c.mod.isZero())return c.div;var p=c.div.negative!==0?c.mod.isub(s):c.mod,y=s.ushrn(1),v=s.andln(1),d=p.cmp(y);return d<0||v===1&&d===0?c.div:c.div.negative!==0?c.div.isubn(1):c.div.iaddn(1)},n.prototype.modrn=function(s){var c=s<0;c&&(s=-s),r(s<=67108863);for(var p=(1<<26)%s,y=0,v=this.length-1;v>=0;v--)y=(p*y+(this.words[v]|0))%s;return c?-y:y},n.prototype.modn=function(s){return this.modrn(s)},n.prototype.idivn=function(s){var c=s<0;c&&(s=-s),r(s<=67108863);for(var p=0,y=this.length-1;y>=0;y--){var v=(this.words[y]|0)+p*67108864;this.words[y]=v/s|0,p=v%s}return this._strip(),c?this.ineg():this},n.prototype.divn=function(s){return this.clone().idivn(s)},n.prototype.egcd=function(s){r(s.negative===0),r(!s.isZero());var c=this,p=s.clone();c.negative!==0?c=c.umod(s):c=c.clone();for(var y=new n(1),v=new n(0),d=new n(0),w=new n(1),S=0;c.isEven()&&p.isEven();)c.iushrn(1),p.iushrn(1),++S;for(var l=p.clone(),M=c.clone();!c.isZero();){for(var C=0,D=1;(c.words[0]&D)===0&&C<26;++C,D<<=1);if(C>0)for(c.iushrn(C);C-- >0;)(y.isOdd()||v.isOdd())&&(y.iadd(l),v.isub(M)),y.iushrn(1),v.iushrn(1);for(var T=0,j=1;(p.words[0]&j)===0&&T<26;++T,j<<=1);if(T>0)for(p.iushrn(T);T-- >0;)(d.isOdd()||w.isOdd())&&(d.iadd(l),w.isub(M)),d.iushrn(1),w.iushrn(1);c.cmp(p)>=0?(c.isub(p),y.isub(d),v.isub(w)):(p.isub(c),d.isub(y),w.isub(v))}return{a:d,b:w,gcd:p.iushln(S)}},n.prototype._invmp=function(s){r(s.negative===0),r(!s.isZero());var c=this,p=s.clone();c.negative!==0?c=c.umod(s):c=c.clone();for(var y=new n(1),v=new n(0),d=p.clone();c.cmpn(1)>0&&p.cmpn(1)>0;){for(var w=0,S=1;(c.words[0]&S)===0&&w<26;++w,S<<=1);if(w>0)for(c.iushrn(w);w-- >0;)y.isOdd()&&y.iadd(d),y.iushrn(1);for(var l=0,M=1;(p.words[0]&M)===0&&l<26;++l,M<<=1);if(l>0)for(p.iushrn(l);l-- >0;)v.isOdd()&&v.iadd(d),v.iushrn(1);c.cmp(p)>=0?(c.isub(p),y.isub(v)):(p.isub(c),v.isub(y))}var C;return c.cmpn(1)===0?C=y:C=v,C.cmpn(0)<0&&C.iadd(s),C},n.prototype.gcd=function(s){if(this.isZero())return s.abs();if(s.isZero())return this.abs();var c=this.clone(),p=s.clone();c.negative=0,p.negative=0;for(var y=0;c.isEven()&&p.isEven();y++)c.iushrn(1),p.iushrn(1);do{for(;c.isEven();)c.iushrn(1);for(;p.isEven();)p.iushrn(1);var v=c.cmp(p);if(v<0){var d=c;c=p,p=d}else if(v===0||p.cmpn(1)===0)break;c.isub(p)}while(!0);return p.iushln(y)},n.prototype.invm=function(s){return this.egcd(s).a.umod(s)},n.prototype.isEven=function(){return(this.words[0]&1)===0},n.prototype.isOdd=function(){return(this.words[0]&1)===1},n.prototype.andln=function(s){return this.words[0]&s},n.prototype.bincn=function(s){r(typeof s=="number");var c=s%26,p=(s-c)/26,y=1<<c;if(this.length<=p)return this._expand(p+1),this.words[p]|=y,this;for(var v=y,d=p;v!==0&&d<this.length;d++){var w=this.words[d]|0;w+=v,v=w>>>26,w&=67108863,this.words[d]=w}return v!==0&&(this.words[d]=v,this.length++),this},n.prototype.isZero=function(){return this.length===1&&this.words[0]===0},n.prototype.cmpn=function(s){var c=s<0;if(this.negative!==0&&!c)return-1;if(this.negative===0&&c)return 1;this._strip();var p;if(this.length>1)p=1;else{c&&(s=-s),r(s<=67108863,"Number is too big");var y=this.words[0]|0;p=y===s?0:y<s?-1:1}return this.negative!==0?-p|0:p},n.prototype.cmp=function(s){if(this.negative!==0&&s.negative===0)return-1;if(this.negative===0&&s.negative!==0)return 1;var c=this.ucmp(s);return this.negative!==0?-c|0:c},n.prototype.ucmp=function(s){if(this.length>s.length)return 1;if(this.length<s.length)return-1;for(var c=0,p=this.length-1;p>=0;p--){var y=this.words[p]|0,v=s.words[p]|0;if(y!==v){y<v?c=-1:y>v&&(c=1);break}}return c},n.prototype.gtn=function(s){return this.cmpn(s)===1},n.prototype.gt=function(s){return this.cmp(s)===1},n.prototype.gten=function(s){return this.cmpn(s)>=0},n.prototype.gte=function(s){return this.cmp(s)>=0},n.prototype.ltn=function(s){return this.cmpn(s)===-1},n.prototype.lt=function(s){return this.cmp(s)===-1},n.prototype.lten=function(s){return this.cmpn(s)<=0},n.prototype.lte=function(s){return this.cmp(s)<=0},n.prototype.eqn=function(s){return this.cmpn(s)===0},n.prototype.eq=function(s){return this.cmp(s)===0},n.red=function(s){return new h(s)},n.prototype.toRed=function(s){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),s.convertTo(this)._forceRed(s)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(s){return this.red=s,this},n.prototype.forceRed=function(s){return r(!this.red,"Already a number in reduction context"),this._forceRed(s)},n.prototype.redAdd=function(s){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,s)},n.prototype.redIAdd=function(s){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,s)},n.prototype.redSub=function(s){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,s)},n.prototype.redISub=function(s){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,s)},n.prototype.redShl=function(s){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,s)},n.prototype.redMul=function(s){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,s),this.red.mul(this,s)},n.prototype.redIMul=function(s){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,s),this.red.imul(this,s)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(s){return r(this.red&&!s.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,s)};var qe={k256:null,p224:null,p192:null,p25519:null};function Ie(b,s){this.name=b,this.p=new n(s,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}Ie.prototype._tmp=function(){var s=new n(null);return s.words=new Array(Math.ceil(this.n/13)),s},Ie.prototype.ireduce=function(s){var c=s,p;do this.split(c,this.tmp),c=this.imulK(c),c=c.iadd(this.tmp),p=c.bitLength();while(p>this.n);var y=p<this.n?-1:c.ucmp(this.p);return y===0?(c.words[0]=0,c.length=1):y>0?c.isub(this.p):c.strip!==void 0?c.strip():c._strip(),c},Ie.prototype.split=function(s,c){s.iushrn(this.n,0,c)},Ie.prototype.imulK=function(s){return s.imul(this.k)};function Ue(){Ie.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(Ue,Ie),Ue.prototype.split=function(s,c){for(var p=4194303,y=Math.min(s.length,9),v=0;v<y;v++)c.words[v]=s.words[v];if(c.length=y,s.length<=9){s.words[0]=0,s.length=1;return}var d=s.words[9];for(c.words[c.length++]=d&p,v=10;v<s.length;v++){var w=s.words[v]|0;s.words[v-10]=(w&p)<<4|d>>>22,d=w}d>>>=22,s.words[v-10]=d,d===0&&s.length>10?s.length-=10:s.length-=9},Ue.prototype.imulK=function(s){s.words[s.length]=0,s.words[s.length+1]=0,s.length+=2;for(var c=0,p=0;p<s.length;p++){var y=s.words[p]|0;c+=y*977,s.words[p]=c&67108863,c=y*64+(c/67108864|0)}return s.words[s.length-1]===0&&(s.length--,s.words[s.length-1]===0&&s.length--),s};function Ee(){Ie.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(Ee,Ie);function Ne(){Ie.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(Ne,Ie);function A(){Ie.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(A,Ie),A.prototype.imulK=function(s){for(var c=0,p=0;p<s.length;p++){var y=(s.words[p]|0)*19+c,v=y&67108863;y>>>=26,s.words[p]=v,c=y}return c!==0&&(s.words[s.length++]=c),s},n._prime=function(s){if(qe[s])return qe[s];var c;if(s==="k256")c=new Ue;else if(s==="p224")c=new Ee;else if(s==="p192")c=new Ne;else if(s==="p25519")c=new A;else throw new Error("Unknown prime "+s);return qe[s]=c,c};function h(b){if(typeof b=="string"){var s=n._prime(b);this.m=s.p,this.prime=s}else r(b.gtn(1),"modulus must be greater than 1"),this.m=b,this.prime=null}h.prototype._verify1=function(s){r(s.negative===0,"red works only with positives"),r(s.red,"red works only with red numbers")},h.prototype._verify2=function(s,c){r((s.negative|c.negative)===0,"red works only with positives"),r(s.red&&s.red===c.red,"red works only with red numbers")},h.prototype.imod=function(s){return this.prime?this.prime.ireduce(s)._forceRed(this):(g(s,s.umod(this.m)._forceRed(this)),s)},h.prototype.neg=function(s){return s.isZero()?s.clone():this.m.sub(s)._forceRed(this)},h.prototype.add=function(s,c){this._verify2(s,c);var p=s.add(c);return p.cmp(this.m)>=0&&p.isub(this.m),p._forceRed(this)},h.prototype.iadd=function(s,c){this._verify2(s,c);var p=s.iadd(c);return p.cmp(this.m)>=0&&p.isub(this.m),p},h.prototype.sub=function(s,c){this._verify2(s,c);var p=s.sub(c);return p.cmpn(0)<0&&p.iadd(this.m),p._forceRed(this)},h.prototype.isub=function(s,c){this._verify2(s,c);var p=s.isub(c);return p.cmpn(0)<0&&p.iadd(this.m),p},h.prototype.shl=function(s,c){return this._verify1(s),this.imod(s.ushln(c))},h.prototype.imul=function(s,c){return this._verify2(s,c),this.imod(s.imul(c))},h.prototype.mul=function(s,c){return this._verify2(s,c),this.imod(s.mul(c))},h.prototype.isqr=function(s){return this.imul(s,s.clone())},h.prototype.sqr=function(s){return this.mul(s,s)},h.prototype.sqrt=function(s){if(s.isZero())return s.clone();var c=this.m.andln(3);if(r(c%2===1),c===3){var p=this.m.add(new n(1)).iushrn(2);return this.pow(s,p)}for(var y=this.m.subn(1),v=0;!y.isZero()&&y.andln(1)===0;)v++,y.iushrn(1);r(!y.isZero());var d=new n(1).toRed(this),w=d.redNeg(),S=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new n(2*l*l).toRed(this);this.pow(l,S).cmp(w)!==0;)l.redIAdd(w);for(var M=this.pow(l,y),C=this.pow(s,y.addn(1).iushrn(1)),D=this.pow(s,y),T=v;D.cmp(d)!==0;){for(var j=D,O=0;j.cmp(d)!==0;O++)j=j.redSqr();r(O<T);var U=this.pow(M,new n(1).iushln(T-O-1));C=C.redMul(U),M=U.redSqr(),D=D.redMul(M),T=O}return C},h.prototype.invm=function(s){var c=s._invmp(this.m);return c.negative!==0?(c.negative=0,this.imod(c).redNeg()):this.imod(c)},h.prototype.pow=function(s,c){if(c.isZero())return new n(1).toRed(this);if(c.cmpn(1)===0)return s.clone();var p=4,y=new Array(1<<p);y[0]=new n(1).toRed(this),y[1]=s;for(var v=2;v<y.length;v++)y[v]=this.mul(y[v-1],s);var d=y[0],w=0,S=0,l=c.bitLength()%26;for(l===0&&(l=26),v=c.length-1;v>=0;v--){for(var M=c.words[v],C=l-1;C>=0;C--){var D=M>>C&1;if(d!==y[0]&&(d=this.sqr(d)),D===0&&w===0){S=0;continue}w<<=1,w|=D,S++,!(S!==p&&(v!==0||C!==0))&&(d=this.mul(d,y[w]),S=0,w=0)}l=26}return d},h.prototype.convertTo=function(s){var c=s.umod(this.m);return c===s?c.clone():c},h.prototype.convertFrom=function(s){var c=s.clone();return c.red=null,c},n.mont=function(s){return new m(s)};function m(b){h.call(this,b),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new n(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)}i(m,h),m.prototype.convertTo=function(s){return this.imod(s.ushln(this.shift))},m.prototype.convertFrom=function(s){var c=this.imod(s.mul(this.rinv));return c.red=null,c},m.prototype.imul=function(s,c){if(s.isZero()||c.isZero())return s.words[0]=0,s.length=1,s;var p=s.imul(c),y=p.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),v=p.isub(y).iushrn(this.shift),d=v;return v.cmp(this.m)>=0?d=v.isub(this.m):v.cmpn(0)<0&&(d=v.iadd(this.m)),d._forceRed(this)},m.prototype.mul=function(s,c){if(s.isZero()||c.isZero())return new n(0)._forceRed(this);var p=s.mul(c),y=p.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),v=p.isub(y).iushrn(this.shift),d=v;return v.cmp(this.m)>=0?d=v.isub(this.m):v.cmpn(0)<0&&(d=v.iadd(this.m)),d._forceRed(this)},m.prototype.invm=function(s){var c=this.imod(s._invmp(this.m).mul(this.r2));return c._forceRed(this)}})(typeof Yd>"u"||Yd,h2)});var Ys=q((XE,p2)=>{var Kn=Js(),Zg=Ni();function $g(t){var e=l2(t),r=e.toRed(Kn.mont(t.modulus)).redPow(new Kn(t.publicExponent)).fromRed();return{blinder:r,unblinder:e.invm(t.modulus)}}function l2(t){var e=t.modulus.byteLength(),r;do r=new Kn(Zg(e));while(r.cmp(t.modulus)>=0||!r.umod(t.prime1)||!r.umod(t.prime2));return r}function b2(t,e){var r=$g(e),i=e.modulus.byteLength(),n=new Kn(t).mul(r.blinder).umod(e.modulus),f=n.toRed(Kn.mont(e.prime1)),a=n.toRed(Kn.mont(e.prime2)),o=e.coefficient,u=e.prime1,g=e.prime2,_=f.redPow(e.exponent1).fromRed(),x=a.redPow(e.exponent2).fromRed(),E=_.isub(x).imul(o).umod(u).imul(g);return x.iadd(E).imul(r.unblinder).umod(e.modulus).toArrayLike(Buffer,"be",i)}b2.getr=l2;p2.exports=b2});var v2=q((JE,Qg)=>{Qg.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"}}});var $s=q(m2=>{"use strict";var Zs=m2;function em(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if(typeof t!="string"){for(var i=0;i<t.length;i++)r[i]=t[i]|0;return r}if(e==="hex"){t=t.replace(/[^a-z0-9]+/ig,""),t.length%2!==0&&(t="0"+t);for(var i=0;i<t.length;i+=2)r.push(parseInt(t[i]+t[i+1],16))}else for(var i=0;i<t.length;i++){var n=t.charCodeAt(i),f=n>>8,a=n&255;f?r.push(f,a):r.push(a)}return r}Zs.toArray=em;function y2(t){return t.length===1?"0"+t:t}Zs.zero2=y2;function g2(t){for(var e="",r=0;r<t.length;r++)e+=y2(t[r].toString(16));return e}Zs.toHex=g2;Zs.encode=function(e,r){return r==="hex"?g2(e):e}});var At=q(_2=>{"use strict";var ir=_2,tm=Pe(),rm=vt(),Qs=$s();ir.assert=rm;ir.toArray=Qs.toArray;ir.zero2=Qs.zero2;ir.toHex=Qs.toHex;ir.encode=Qs.encode;function im(t,e,r){var i=new Array(Math.max(t.bitLength(),r)+1),n;for(n=0;n<i.length;n+=1)i[n]=0;var f=1<<e+1,a=t.clone();for(n=0;n<i.length;n++){var o,u=a.andln(f-1);a.isOdd()?(u>(f>>1)-1?o=(f>>1)-u:o=u,a.isubn(o)):o=0,i[n]=o,a.iushrn(1)}return i}ir.getNAF=im;function nm(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var i=0,n=0,f;t.cmpn(-i)>0||e.cmpn(-n)>0;){var a=t.andln(3)+i&3,o=e.andln(3)+n&3;a===3&&(a=-1),o===3&&(o=-1);var u;(a&1)===0?u=0:(f=t.andln(7)+i&7,(f===3||f===5)&&o===2?u=-a:u=a),r[0].push(u);var g;(o&1)===0?g=0:(f=e.andln(7)+n&7,(f===3||f===5)&&a===2?g=-o:g=o),r[1].push(g),2*i===u+1&&(i=1-i),2*n===g+1&&(n=1-n),t.iushrn(1),e.iushrn(1)}return r}ir.getJSF=nm;function fm(t,e,r){var i="_"+e;t.prototype[e]=function(){return this[i]!==void 0?this[i]:this[i]=r.call(this)}}ir.cachedProperty=fm;function am(t){return typeof t=="string"?ir.toArray(t,"hex"):t}ir.parseBytes=am;function sm(t){return new tm(t,"hex","le")}ir.intFromLE=sm});var Ma=q(($E,w2)=>{"use strict";var en=Pe(),Sa=At(),eo=Sa.getNAF,om=Sa.getJSF,to=Sa.assert;function di(t,e){this.type=t,this.p=new en(e.p,16),this.red=e.prime?en.red(e.prime):en.mont(this.p),this.zero=new en(0).toRed(this.red),this.one=new en(1).toRed(this.red),this.two=new en(2).toRed(this.red),this.n=e.n&&new en(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}w2.exports=di;di.prototype.point=function(){throw new Error("Not implemented")};di.prototype.validate=function(){throw new Error("Not implemented")};di.prototype._fixedNafMul=function(e,r){to(e.precomputed);var i=e._getDoubles(),n=eo(r,1,this._bitLength),f=(1<<i.step+1)-(i.step%2===0?2:1);f/=3;var a=[],o,u;for(o=0;o<n.length;o+=i.step){u=0;for(var g=o+i.step-1;g>=o;g--)u=(u<<1)+n[g];a.push(u)}for(var _=this.jpoint(null,null,null),x=this.jpoint(null,null,null),E=f;E>0;E--){for(o=0;o<a.length;o++)u=a[o],u===E?x=x.mixedAdd(i.points[o]):u===-E&&(x=x.mixedAdd(i.points[o].neg()));_=_.add(x)}return _.toP()};di.prototype._wnafMul=function(e,r){var i=4,n=e._getNAFPoints(i);i=n.wnd;for(var f=n.points,a=eo(r,i,this._bitLength),o=this.jpoint(null,null,null),u=a.length-1;u>=0;u--){for(var g=0;u>=0&&a[u]===0;u--)g++;if(u>=0&&g++,o=o.dblp(g),u<0)break;var _=a[u];to(_!==0),e.type==="affine"?_>0?o=o.mixedAdd(f[_-1>>1]):o=o.mixedAdd(f[-_-1>>1].neg()):_>0?o=o.add(f[_-1>>1]):o=o.add(f[-_-1>>1].neg())}return e.type==="affine"?o.toP():o};di.prototype._wnafMulAdd=function(e,r,i,n,f){var a=this._wnafT1,o=this._wnafT2,u=this._wnafT3,g=0,_,x,E;for(_=0;_<n;_++){E=r[_];var B=E._getNAFPoints(e);a[_]=B.wnd,o[_]=B.points}for(_=n-1;_>=1;_-=2){var I=_-1,R=_;if(a[I]!==1||a[R]!==1){u[I]=eo(i[I],a[I],this._bitLength),u[R]=eo(i[R],a[R],this._bitLength),g=Math.max(u[I].length,g),g=Math.max(u[R].length,g);continue}var N=[r[I],null,null,r[R]];r[I].y.cmp(r[R].y)===0?(N[1]=r[I].add(r[R]),N[2]=r[I].toJ().mixedAdd(r[R].neg())):r[I].y.cmp(r[R].y.redNeg())===0?(N[1]=r[I].toJ().mixedAdd(r[R]),N[2]=r[I].add(r[R].neg())):(N[1]=r[I].toJ().mixedAdd(r[R]),N[2]=r[I].toJ().mixedAdd(r[R].neg()));var P=[-3,-1,-5,-7,0,7,5,1,3],L=om(i[I],i[R]);for(g=Math.max(L[0].length,g),u[I]=new Array(g),u[R]=new Array(g),x=0;x<g;x++){var W=L[0][x]|0,Be=L[1][x]|0;u[I][x]=P[(W+1)*3+(Be+1)],u[R][x]=0,o[I]=N}}var qe=this.jpoint(null,null,null),Ie=this._wnafT4;for(_=g;_>=0;_--){for(var Ue=0;_>=0;){var Ee=!0;for(x=0;x<n;x++)Ie[x]=u[x][_]|0,Ie[x]!==0&&(Ee=!1);if(!Ee)break;Ue++,_--}if(_>=0&&Ue++,qe=qe.dblp(Ue),_<0)break;for(x=0;x<n;x++){var Ne=Ie[x];Ne!==0&&(Ne>0?E=o[x][Ne-1>>1]:Ne<0&&(E=o[x][-Ne-1>>1].neg()),E.type==="affine"?qe=qe.mixedAdd(E):qe=qe.add(E))}}for(_=0;_<n;_++)o[_]=null;return f?qe:qe.toP()};function Ft(t,e){this.curve=t,this.type=e,this.precomputed=null}di.BasePoint=Ft;Ft.prototype.eq=function(){throw new Error("Not implemented")};Ft.prototype.validate=function(){return this.curve.validate(this)};di.prototype.decodePoint=function(e,r){e=Sa.toArray(e,r);var i=this.p.byteLength();if((e[0]===4||e[0]===6||e[0]===7)&&e.length-1===2*i){e[0]===6?to(e[e.length-1]%2===0):e[0]===7&&to(e[e.length-1]%2===1);var n=this.point(e.slice(1,1+i),e.slice(1+i,1+2*i));return n}else if((e[0]===2||e[0]===3)&&e.length-1===i)return this.pointFromX(e.slice(1,1+i),e[0]===3);throw new Error("Unknown point format")};Ft.prototype.encodeCompressed=function(e){return this.encode(e,!0)};Ft.prototype._encode=function(e){var r=this.curve.p.byteLength(),i=this.getX().toArray("be",r);return e?[this.getY().isEven()?2:3].concat(i):[4].concat(i,this.getY().toArray("be",r))};Ft.prototype.encode=function(e,r){return Sa.encode(this._encode(r),e)};Ft.prototype.precompute=function(e){if(this.precomputed)return this;var r={doubles:null,naf:null,beta:null};return r.naf=this._getNAFPoints(8),r.doubles=this._getDoubles(4,e),r.beta=this._getBeta(),this.precomputed=r,this};Ft.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var r=this.precomputed.doubles;return r?r.points.length>=Math.ceil((e.bitLength()+1)/r.step):!1};Ft.prototype._getDoubles=function(e,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var i=[this],n=this,f=0;f<r;f+=e){for(var a=0;a<e;a++)n=n.dbl();i.push(n)}return{step:e,points:i}};Ft.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var r=[this],i=(1<<e)-1,n=i===1?null:this.dbl(),f=1;f<i;f++)r[f]=r[f-1].add(n);return{wnd:e,points:r}};Ft.prototype._getBeta=function(){return null};Ft.prototype.dblp=function(e){for(var r=this,i=0;i<e;i++)r=r.dbl();return r}});var S2=q((QE,x2)=>{"use strict";var dm=At(),We=Pe(),Zd=F(),Hn=Ma(),cm=dm.assert;function Ut(t){Hn.call(this,"short",t),this.a=new We(t.a,16).toRed(this.red),this.b=new We(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}Zd(Ut,Hn);x2.exports=Ut;Ut.prototype._getEndomorphism=function(e){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var r,i;if(e.beta)r=new We(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);r=n[0].cmp(n[1])<0?n[0]:n[1],r=r.toRed(this.red)}if(e.lambda)i=new We(e.lambda,16);else{var f=this._getEndoRoots(this.n);this.g.mul(f[0]).x.cmp(this.g.x.redMul(r))===0?i=f[0]:(i=f[1],cm(this.g.mul(i).x.cmp(this.g.x.redMul(r))===0))}var a;return e.basis?a=e.basis.map(function(o){return{a:new We(o.a,16),b:new We(o.b,16)}}):a=this._getEndoBasis(i),{beta:r,lambda:i,basis:a}}};Ut.prototype._getEndoRoots=function(e){var r=e===this.p?this.red:We.mont(e),i=new We(2).toRed(r).redInvm(),n=i.redNeg(),f=new We(3).toRed(r).redNeg().redSqrt().redMul(i),a=n.redAdd(f).fromRed(),o=n.redSub(f).fromRed();return[a,o]};Ut.prototype._getEndoBasis=function(e){for(var r=this.n.ushrn(Math.floor(this.n.bitLength()/2)),i=e,n=this.n.clone(),f=new We(1),a=new We(0),o=new We(0),u=new We(1),g,_,x,E,B,I,R,N=0,P,L;i.cmpn(0)!==0;){var W=n.div(i);P=n.sub(W.mul(i)),L=o.sub(W.mul(f));var Be=u.sub(W.mul(a));if(!x&&P.cmp(r)<0)g=R.neg(),_=f,x=P.neg(),E=L;else if(x&&++N===2)break;R=P,n=i,i=P,o=f,f=L,u=a,a=Be}B=P.neg(),I=L;var qe=x.sqr().add(E.sqr()),Ie=B.sqr().add(I.sqr());return Ie.cmp(qe)>=0&&(B=g,I=_),x.negative&&(x=x.neg(),E=E.neg()),B.negative&&(B=B.neg(),I=I.neg()),[{a:x,b:E},{a:B,b:I}]};Ut.prototype._endoSplit=function(e){var r=this.endo.basis,i=r[0],n=r[1],f=n.b.mul(e).divRound(this.n),a=i.b.neg().mul(e).divRound(this.n),o=f.mul(i.a),u=a.mul(n.a),g=f.mul(i.b),_=a.mul(n.b),x=e.sub(o).sub(u),E=g.add(_).neg();return{k1:x,k2:E}};Ut.prototype.pointFromX=function(e,r){e=new We(e,16),e.red||(e=e.toRed(this.red));var i=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=i.redSqrt();if(n.redSqr().redSub(i).cmp(this.zero)!==0)throw new Error("invalid point");var f=n.fromRed().isOdd();return(r&&!f||!r&&f)&&(n=n.redNeg()),this.point(e,n)};Ut.prototype.validate=function(e){if(e.inf)return!0;var r=e.x,i=e.y,n=this.a.redMul(r),f=r.redSqr().redMul(r).redIAdd(n).redIAdd(this.b);return i.redSqr().redISub(f).cmpn(0)===0};Ut.prototype._endoWnafMulAdd=function(e,r,i){for(var n=this._endoWnafT1,f=this._endoWnafT2,a=0;a<e.length;a++){var o=this._endoSplit(r[a]),u=e[a],g=u._getBeta();o.k1.negative&&(o.k1.ineg(),u=u.neg(!0)),o.k2.negative&&(o.k2.ineg(),g=g.neg(!0)),n[a*2]=u,n[a*2+1]=g,f[a*2]=o.k1,f[a*2+1]=o.k2}for(var _=this._wnafMulAdd(1,n,f,a*2,i),x=0;x<a*2;x++)n[x]=null,f[x]=null;return _};function $e(t,e,r,i){Hn.BasePoint.call(this,t,"affine"),e===null&&r===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new We(e,16),this.y=new We(r,16),i&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}Zd($e,Hn.BasePoint);Ut.prototype.point=function(e,r,i){return new $e(this,e,r,i)};Ut.prototype.pointFromJSON=function(e,r){return $e.fromJSON(this,e,r)};$e.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var r=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var i=this.curve,n=function(f){return i.point(f.x.redMul(i.endo.beta),f.y)};e.beta=r,r.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(n)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(n)}}}return r}};$e.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]};$e.fromJSON=function(e,r,i){typeof r=="string"&&(r=JSON.parse(r));var n=e.point(r[0],r[1],i);if(!r[2])return n;function f(o){return e.point(o[0],o[1],i)}var a=r[2];return n.precomputed={beta:null,doubles:a.doubles&&{step:a.doubles.step,points:[n].concat(a.doubles.points.map(f))},naf:a.naf&&{wnd:a.naf.wnd,points:[n].concat(a.naf.points.map(f))}},n};$e.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"};$e.prototype.isInfinity=function(){return this.inf};$e.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var r=this.y.redSub(e.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(e.x).redInvm()));var i=r.redSqr().redISub(this.x).redISub(e.x),n=r.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,n)};$e.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var r=this.curve.a,i=this.x.redSqr(),n=e.redInvm(),f=i.redAdd(i).redIAdd(i).redIAdd(r).redMul(n),a=f.redSqr().redISub(this.x.redAdd(this.x)),o=f.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,o)};$e.prototype.getX=function(){return this.x.fromRed()};$e.prototype.getY=function(){return this.y.fromRed()};$e.prototype.mul=function(e){return e=new We(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};$e.prototype.mulAdd=function(e,r,i){var n=[this,r],f=[e,i];return this.curve.endo?this.curve._endoWnafMulAdd(n,f):this.curve._wnafMulAdd(1,n,f,2)};$e.prototype.jmulAdd=function(e,r,i){var n=[this,r],f=[e,i];return this.curve.endo?this.curve._endoWnafMulAdd(n,f,!0):this.curve._wnafMulAdd(1,n,f,2,!0)};$e.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};$e.prototype.neg=function(e){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var i=this.precomputed,n=function(f){return f.neg()};r.precomputed={naf:i.naf&&{wnd:i.naf.wnd,points:i.naf.points.map(n)},doubles:i.doubles&&{step:i.doubles.step,points:i.doubles.points.map(n)}}}return r};$e.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function ft(t,e,r,i){Hn.BasePoint.call(this,t,"jacobian"),e===null&&r===null&&i===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new We(0)):(this.x=new We(e,16),this.y=new We(r,16),this.z=new We(i,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}Zd(ft,Hn.BasePoint);Ut.prototype.jpoint=function(e,r,i){return new ft(this,e,r,i)};ft.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),r=e.redSqr(),i=this.x.redMul(r),n=this.y.redMul(r).redMul(e);return this.curve.point(i,n)};ft.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};ft.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var r=e.z.redSqr(),i=this.z.redSqr(),n=this.x.redMul(r),f=e.x.redMul(i),a=this.y.redMul(r.redMul(e.z)),o=e.y.redMul(i.redMul(this.z)),u=n.redSub(f),g=a.redSub(o);if(u.cmpn(0)===0)return g.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var _=u.redSqr(),x=_.redMul(u),E=n.redMul(_),B=g.redSqr().redIAdd(x).redISub(E).redISub(E),I=g.redMul(E.redISub(B)).redISub(a.redMul(x)),R=this.z.redMul(e.z).redMul(u);return this.curve.jpoint(B,I,R)};ft.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var r=this.z.redSqr(),i=this.x,n=e.x.redMul(r),f=this.y,a=e.y.redMul(r).redMul(this.z),o=i.redSub(n),u=f.redSub(a);if(o.cmpn(0)===0)return u.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var g=o.redSqr(),_=g.redMul(o),x=i.redMul(g),E=u.redSqr().redIAdd(_).redISub(x).redISub(x),B=u.redMul(x.redISub(E)).redISub(f.redMul(_)),I=this.z.redMul(o);return this.curve.jpoint(E,B,I)};ft.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var r;if(this.curve.zeroA||this.curve.threeA){var i=this;for(r=0;r<e;r++)i=i.dbl();return i}var n=this.curve.a,f=this.curve.tinv,a=this.x,o=this.y,u=this.z,g=u.redSqr().redSqr(),_=o.redAdd(o);for(r=0;r<e;r++){var x=a.redSqr(),E=_.redSqr(),B=E.redSqr(),I=x.redAdd(x).redIAdd(x).redIAdd(n.redMul(g)),R=a.redMul(E),N=I.redSqr().redISub(R.redAdd(R)),P=R.redISub(N),L=I.redMul(P);L=L.redIAdd(L).redISub(B);var W=_.redMul(u);r+1<e&&(g=g.redMul(B)),a=N,u=W,_=L}return this.curve.jpoint(a,_.redMul(f),u)};ft.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()};ft.prototype._zeroDbl=function(){var e,r,i;if(this.zOne){var n=this.x.redSqr(),f=this.y.redSqr(),a=f.redSqr(),o=this.x.redAdd(f).redSqr().redISub(n).redISub(a);o=o.redIAdd(o);var u=n.redAdd(n).redIAdd(n),g=u.redSqr().redISub(o).redISub(o),_=a.redIAdd(a);_=_.redIAdd(_),_=_.redIAdd(_),e=g,r=u.redMul(o.redISub(g)).redISub(_),i=this.y.redAdd(this.y)}else{var x=this.x.redSqr(),E=this.y.redSqr(),B=E.redSqr(),I=this.x.redAdd(E).redSqr().redISub(x).redISub(B);I=I.redIAdd(I);var R=x.redAdd(x).redIAdd(x),N=R.redSqr(),P=B.redIAdd(B);P=P.redIAdd(P),P=P.redIAdd(P),e=N.redISub(I).redISub(I),r=R.redMul(I.redISub(e)).redISub(P),i=this.y.redMul(this.z),i=i.redIAdd(i)}return this.curve.jpoint(e,r,i)};ft.prototype._threeDbl=function(){var e,r,i;if(this.zOne){var n=this.x.redSqr(),f=this.y.redSqr(),a=f.redSqr(),o=this.x.redAdd(f).redSqr().redISub(n).redISub(a);o=o.redIAdd(o);var u=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),g=u.redSqr().redISub(o).redISub(o);e=g;var _=a.redIAdd(a);_=_.redIAdd(_),_=_.redIAdd(_),r=u.redMul(o.redISub(g)).redISub(_),i=this.y.redAdd(this.y)}else{var x=this.z.redSqr(),E=this.y.redSqr(),B=this.x.redMul(E),I=this.x.redSub(x).redMul(this.x.redAdd(x));I=I.redAdd(I).redIAdd(I);var R=B.redIAdd(B);R=R.redIAdd(R);var N=R.redAdd(R);e=I.redSqr().redISub(N),i=this.y.redAdd(this.z).redSqr().redISub(E).redISub(x);var P=E.redSqr();P=P.redIAdd(P),P=P.redIAdd(P),P=P.redIAdd(P),r=I.redMul(R.redISub(e)).redISub(P)}return this.curve.jpoint(e,r,i)};ft.prototype._dbl=function(){var e=this.curve.a,r=this.x,i=this.y,n=this.z,f=n.redSqr().redSqr(),a=r.redSqr(),o=i.redSqr(),u=a.redAdd(a).redIAdd(a).redIAdd(e.redMul(f)),g=r.redAdd(r);g=g.redIAdd(g);var _=g.redMul(o),x=u.redSqr().redISub(_.redAdd(_)),E=_.redISub(x),B=o.redSqr();B=B.redIAdd(B),B=B.redIAdd(B),B=B.redIAdd(B);var I=u.redMul(E).redISub(B),R=i.redAdd(i).redMul(n);return this.curve.jpoint(x,I,R)};ft.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),r=this.y.redSqr(),i=this.z.redSqr(),n=r.redSqr(),f=e.redAdd(e).redIAdd(e),a=f.redSqr(),o=this.x.redAdd(r).redSqr().redISub(e).redISub(n);o=o.redIAdd(o),o=o.redAdd(o).redIAdd(o),o=o.redISub(a);var u=o.redSqr(),g=n.redIAdd(n);g=g.redIAdd(g),g=g.redIAdd(g),g=g.redIAdd(g);var _=f.redIAdd(o).redSqr().redISub(a).redISub(u).redISub(g),x=r.redMul(_);x=x.redIAdd(x),x=x.redIAdd(x);var E=this.x.redMul(u).redISub(x);E=E.redIAdd(E),E=E.redIAdd(E);var B=this.y.redMul(_.redMul(g.redISub(_)).redISub(o.redMul(u)));B=B.redIAdd(B),B=B.redIAdd(B),B=B.redIAdd(B);var I=this.z.redAdd(o).redSqr().redISub(i).redISub(u);return this.curve.jpoint(E,B,I)};ft.prototype.mul=function(e,r){return e=new We(e,r),this.curve._wnafMul(this,e)};ft.prototype.eq=function(e){if(e.type==="affine")return this.eq(e.toJ());if(this===e)return!0;var r=this.z.redSqr(),i=e.z.redSqr();if(this.x.redMul(i).redISub(e.x.redMul(r)).cmpn(0)!==0)return!1;var n=r.redMul(this.z),f=i.redMul(e.z);return this.y.redMul(f).redISub(e.y.redMul(n)).cmpn(0)===0};ft.prototype.eqXToP=function(e){var r=this.z.redSqr(),i=e.toRed(this.curve.red).redMul(r);if(this.x.cmp(i)===0)return!0;for(var n=e.clone(),f=this.curve.redN.redMul(r);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(i.redIAdd(f),this.x.cmp(i)===0)return!0}};ft.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"};ft.prototype.isInfinity=function(){return this.z.cmpn(0)===0}});var A2=q((eA,E2)=>{"use strict";var Wn=Pe(),M2=F(),ro=Ma(),um=At();function Vn(t){ro.call(this,"mont",t),this.a=new Wn(t.a,16).toRed(this.red),this.b=new Wn(t.b,16).toRed(this.red),this.i4=new Wn(4).toRed(this.red).redInvm(),this.two=new Wn(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}M2(Vn,ro);E2.exports=Vn;Vn.prototype.validate=function(e){var r=e.normalize().x,i=r.redSqr(),n=i.redMul(r).redAdd(i.redMul(this.a)).redAdd(r),f=n.redSqrt();return f.redSqr().cmp(n)===0};function Qe(t,e,r){ro.BasePoint.call(this,t,"projective"),e===null&&r===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new Wn(e,16),this.z=new Wn(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}M2(Qe,ro.BasePoint);Vn.prototype.decodePoint=function(e,r){return this.point(um.toArray(e,r),1)};Vn.prototype.point=function(e,r){return new Qe(this,e,r)};Vn.prototype.pointFromJSON=function(e){return Qe.fromJSON(this,e)};Qe.prototype.precompute=function(){};Qe.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())};Qe.fromJSON=function(e,r){return new Qe(e,r[0],r[1]||e.one)};Qe.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"};Qe.prototype.isInfinity=function(){return this.z.cmpn(0)===0};Qe.prototype.dbl=function(){var e=this.x.redAdd(this.z),r=e.redSqr(),i=this.x.redSub(this.z),n=i.redSqr(),f=r.redSub(n),a=r.redMul(n),o=f.redMul(n.redAdd(this.curve.a24.redMul(f)));return this.curve.point(a,o)};Qe.prototype.add=function(){throw new Error("Not supported on Montgomery curve")};Qe.prototype.diffAdd=function(e,r){var i=this.x.redAdd(this.z),n=this.x.redSub(this.z),f=e.x.redAdd(e.z),a=e.x.redSub(e.z),o=a.redMul(i),u=f.redMul(n),g=r.z.redMul(o.redAdd(u).redSqr()),_=r.x.redMul(o.redISub(u).redSqr());return this.curve.point(g,_)};Qe.prototype.mul=function(e){for(var r=e.clone(),i=this,n=this.curve.point(null,null),f=this,a=[];r.cmpn(0)!==0;r.iushrn(1))a.push(r.andln(1));for(var o=a.length-1;o>=0;o--)a[o]===0?(i=i.diffAdd(n,f),n=n.dbl()):(n=i.diffAdd(n,f),i=i.dbl());return n};Qe.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")};Qe.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")};Qe.prototype.eq=function(e){return this.getX().cmp(e.getX())===0};Qe.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this};Qe.prototype.getX=function(){return this.normalize(),this.x.fromRed()}});var I2=q((tA,q2)=>{"use strict";var hm=At(),Vr=Pe(),B2=F(),io=Ma(),lm=hm.assert;function Mr(t){this.twisted=(t.a|0)!==1,this.mOneA=this.twisted&&(t.a|0)===-1,this.extended=this.mOneA,io.call(this,"edwards",t),this.a=new Vr(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new Vr(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new Vr(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),lm(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(t.c|0)===1}B2(Mr,io);q2.exports=Mr;Mr.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)};Mr.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)};Mr.prototype.jpoint=function(e,r,i,n){return this.point(e,r,i,n)};Mr.prototype.pointFromX=function(e,r){e=new Vr(e,16),e.red||(e=e.toRed(this.red));var i=e.redSqr(),n=this.c2.redSub(this.a.redMul(i)),f=this.one.redSub(this.c2.redMul(this.d).redMul(i)),a=n.redMul(f.redInvm()),o=a.redSqrt();if(o.redSqr().redSub(a).cmp(this.zero)!==0)throw new Error("invalid point");var u=o.fromRed().isOdd();return(r&&!u||!r&&u)&&(o=o.redNeg()),this.point(e,o)};Mr.prototype.pointFromY=function(e,r){e=new Vr(e,16),e.red||(e=e.toRed(this.red));var i=e.redSqr(),n=i.redSub(this.c2),f=i.redMul(this.d).redMul(this.c2).redSub(this.a),a=n.redMul(f.redInvm());if(a.cmp(this.zero)===0){if(r)throw new Error("invalid point");return this.point(this.zero,e)}var o=a.redSqrt();if(o.redSqr().redSub(a).cmp(this.zero)!==0)throw new Error("invalid point");return o.fromRed().isOdd()!==r&&(o=o.redNeg()),this.point(o,e)};Mr.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var r=e.x.redSqr(),i=e.y.redSqr(),n=r.redMul(this.a).redAdd(i),f=this.c2.redMul(this.one.redAdd(this.d.redMul(r).redMul(i)));return n.cmp(f)===0};function Oe(t,e,r,i,n){io.BasePoint.call(this,t,"projective"),e===null&&r===null&&i===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new Vr(e,16),this.y=new Vr(r,16),this.z=i?new Vr(i,16):this.curve.one,this.t=n&&new Vr(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}B2(Oe,io.BasePoint);Mr.prototype.pointFromJSON=function(e){return Oe.fromJSON(this,e)};Mr.prototype.point=function(e,r,i,n){return new Oe(this,e,r,i,n)};Oe.fromJSON=function(e,r){return new Oe(e,r[0],r[1],r[2])};Oe.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"};Oe.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)};Oe.prototype._extDbl=function(){var e=this.x.redSqr(),r=this.y.redSqr(),i=this.z.redSqr();i=i.redIAdd(i);var n=this.curve._mulA(e),f=this.x.redAdd(this.y).redSqr().redISub(e).redISub(r),a=n.redAdd(r),o=a.redSub(i),u=n.redSub(r),g=f.redMul(o),_=a.redMul(u),x=f.redMul(u),E=o.redMul(a);return this.curve.point(g,_,E,x)};Oe.prototype._projDbl=function(){var e=this.x.redAdd(this.y).redSqr(),r=this.x.redSqr(),i=this.y.redSqr(),n,f,a,o,u,g;if(this.curve.twisted){o=this.curve._mulA(r);var _=o.redAdd(i);this.zOne?(n=e.redSub(r).redSub(i).redMul(_.redSub(this.curve.two)),f=_.redMul(o.redSub(i)),a=_.redSqr().redSub(_).redSub(_)):(u=this.z.redSqr(),g=_.redSub(u).redISub(u),n=e.redSub(r).redISub(i).redMul(g),f=_.redMul(o.redSub(i)),a=_.redMul(g))}else o=r.redAdd(i),u=this.curve._mulC(this.z).redSqr(),g=o.redSub(u).redSub(u),n=this.curve._mulC(e.redISub(o)).redMul(g),f=this.curve._mulC(o).redMul(r.redISub(i)),a=o.redMul(g);return this.curve.point(n,f,a)};Oe.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()};Oe.prototype._extAdd=function(e){var r=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),i=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),f=this.z.redMul(e.z.redAdd(e.z)),a=i.redSub(r),o=f.redSub(n),u=f.redAdd(n),g=i.redAdd(r),_=a.redMul(o),x=u.redMul(g),E=a.redMul(g),B=o.redMul(u);return this.curve.point(_,x,B,E)};Oe.prototype._projAdd=function(e){var r=this.z.redMul(e.z),i=r.redSqr(),n=this.x.redMul(e.x),f=this.y.redMul(e.y),a=this.curve.d.redMul(n).redMul(f),o=i.redSub(a),u=i.redAdd(a),g=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(n).redISub(f),_=r.redMul(o).redMul(g),x,E;return this.curve.twisted?(x=r.redMul(u).redMul(f.redSub(this.curve._mulA(n))),E=o.redMul(u)):(x=r.redMul(u).redMul(f.redSub(n)),E=this.curve._mulC(o).redMul(u)),this.curve.point(_,x,E)};Oe.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)};Oe.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)};Oe.prototype.mulAdd=function(e,r,i){return this.curve._wnafMulAdd(1,[this,r],[e,i],2,!1)};Oe.prototype.jmulAdd=function(e,r,i){return this.curve._wnafMulAdd(1,[this,r],[e,i],2,!0)};Oe.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this};Oe.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())};Oe.prototype.getX=function(){return this.normalize(),this.x.fromRed()};Oe.prototype.getY=function(){return this.normalize(),this.y.fromRed()};Oe.prototype.eq=function(e){return this===e||this.getX().cmp(e.getX())===0&&this.getY().cmp(e.getY())===0};Oe.prototype.eqXToP=function(e){var r=e.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(r)===0)return!0;for(var i=e.clone(),n=this.curve.redN.redMul(this.z);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(n),this.x.cmp(r)===0)return!0}};Oe.prototype.toP=Oe.prototype.normalize;Oe.prototype.mixedAdd=Oe.prototype.add});var $d=q(R2=>{"use strict";var no=R2;no.base=Ma();no.short=S2();no.mont=A2();no.edwards=I2()});var nr=q(Le=>{"use strict";var bm=vt(),pm=F();Le.inherits=pm;function vm(t,e){return(t.charCodeAt(e)&64512)!==55296||e<0||e+1>=t.length?!1:(t.charCodeAt(e+1)&64512)===56320}function ym(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if(typeof t=="string")if(e){if(e==="hex")for(t=t.replace(/[^a-z0-9]+/ig,""),t.length%2!==0&&(t="0"+t),n=0;n<t.length;n+=2)r.push(parseInt(t[n]+t[n+1],16))}else for(var i=0,n=0;n<t.length;n++){var f=t.charCodeAt(n);f<128?r[i++]=f:f<2048?(r[i++]=f>>6|192,r[i++]=f&63|128):vm(t,n)?(f=65536+((f&1023)<<10)+(t.charCodeAt(++n)&1023),r[i++]=f>>18|240,r[i++]=f>>12&63|128,r[i++]=f>>6&63|128,r[i++]=f&63|128):(r[i++]=f>>12|224,r[i++]=f>>6&63|128,r[i++]=f&63|128)}else for(n=0;n<t.length;n++)r[n]=t[n]|0;return r}Le.toArray=ym;function gm(t){for(var e="",r=0;r<t.length;r++)e+=P2(t[r].toString(16));return e}Le.toHex=gm;function k2(t){var e=t>>>24|t>>>8&65280|t<<8&16711680|(t&255)<<24;return e>>>0}Le.htonl=k2;function mm(t,e){for(var r="",i=0;i<t.length;i++){var n=t[i];e==="little"&&(n=k2(n)),r+=C2(n.toString(16))}return r}Le.toHex32=mm;function P2(t){return t.length===1?"0"+t:t}Le.zero2=P2;function C2(t){return t.length===7?"0"+t:t.length===6?"00"+t:t.length===5?"000"+t:t.length===4?"0000"+t:t.length===3?"00000"+t:t.length===2?"000000"+t:t.length===1?"0000000"+t:t}Le.zero8=C2;function _m(t,e,r,i){var n=r-e;bm(n%4===0);for(var f=new Array(n/4),a=0,o=e;a<f.length;a++,o+=4){var u;i==="big"?u=t[o]<<24|t[o+1]<<16|t[o+2]<<8|t[o+3]:u=t[o+3]<<24|t[o+2]<<16|t[o+1]<<8|t[o],f[a]=u>>>0}return f}Le.join32=_m;function wm(t,e){for(var r=new Array(t.length*4),i=0,n=0;i<t.length;i++,n+=4){var f=t[i];e==="big"?(r[n]=f>>>24,r[n+1]=f>>>16&255,r[n+2]=f>>>8&255,r[n+3]=f&255):(r[n+3]=f>>>24,r[n+2]=f>>>16&255,r[n+1]=f>>>8&255,r[n]=f&255)}return r}Le.split32=wm;function xm(t,e){return t>>>e|t<<32-e}Le.rotr32=xm;function Sm(t,e){return t<<e|t>>>32-e}Le.rotl32=Sm;function Mm(t,e){return t+e>>>0}Le.sum32=Mm;function Em(t,e,r){return t+e+r>>>0}Le.sum32_3=Em;function Am(t,e,r,i){return t+e+r+i>>>0}Le.sum32_4=Am;function Bm(t,e,r,i,n){return t+e+r+i+n>>>0}Le.sum32_5=Bm;function qm(t,e,r,i){var n=t[e],f=t[e+1],a=i+f>>>0,o=(a<i?1:0)+r+n;t[e]=o>>>0,t[e+1]=a}Le.sum64=qm;function Im(t,e,r,i){var n=e+i>>>0,f=(n<e?1:0)+t+r;return f>>>0}Le.sum64_hi=Im;function Rm(t,e,r,i){var n=e+i;return n>>>0}Le.sum64_lo=Rm;function km(t,e,r,i,n,f,a,o){var u=0,g=e;g=g+i>>>0,u+=g<e?1:0,g=g+f>>>0,u+=g<f?1:0,g=g+o>>>0,u+=g<o?1:0;var _=t+r+n+a+u;return _>>>0}Le.sum64_4_hi=km;function Pm(t,e,r,i,n,f,a,o){var u=e+i+f+o;return u>>>0}Le.sum64_4_lo=Pm;function Cm(t,e,r,i,n,f,a,o,u,g){var _=0,x=e;x=x+i>>>0,_+=x<e?1:0,x=x+f>>>0,_+=x<f?1:0,x=x+o>>>0,_+=x<o?1:0,x=x+g>>>0,_+=x<g?1:0;var E=t+r+n+a+u+_;return E>>>0}Le.sum64_5_hi=Cm;function Tm(t,e,r,i,n,f,a,o,u,g){var _=e+i+f+o+g;return _>>>0}Le.sum64_5_lo=Tm;function Dm(t,e,r){var i=e<<32-r|t>>>r;return i>>>0}Le.rotr64_hi=Dm;function Nm(t,e,r){var i=t<<32-r|e>>>r;return i>>>0}Le.rotr64_lo=Nm;function Lm(t,e,r){return t>>>r}Le.shr64_hi=Lm;function Om(t,e,r){var i=t<<32-r|e>>>r;return i>>>0}Le.shr64_lo=Om});var Gn=q(D2=>{"use strict";var T2=nr(),jm=vt();function fo(){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}D2.BlockHash=fo;fo.prototype.update=function(e,r){if(e=T2.toArray(e,r),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var i=e.length%this._delta8;this.pending=e.slice(e.length-i,e.length),this.pending.length===0&&(this.pending=null),e=T2.join32(e,0,e.length-i,this.endian);for(var n=0;n<e.length;n+=this._delta32)this._update(e,n,n+this._delta32)}return this};fo.prototype.digest=function(e){return this.update(this._pad()),jm(this.pending===null),this._digest(e)};fo.prototype._pad=function(){var e=this.pendingTotal,r=this._delta8,i=r-(e+this.padLength)%r,n=new Array(i+this.padLength);n[0]=128;for(var f=1;f<i;f++)n[f]=0;if(e<<=3,this.endian==="big"){for(var a=8;a<this.padLength;a++)n[f++]=0;n[f++]=0,n[f++]=0,n[f++]=0,n[f++]=0,n[f++]=e>>>24&255,n[f++]=e>>>16&255,n[f++]=e>>>8&255,n[f++]=e&255}else for(n[f++]=e&255,n[f++]=e>>>8&255,n[f++]=e>>>16&255,n[f++]=e>>>24&255,n[f++]=0,n[f++]=0,n[f++]=0,n[f++]=0,a=8;a<this.padLength;a++)n[f++]=0;return n}});var Qd=q(Gr=>{"use strict";var Fm=nr(),Er=Fm.rotr32;function Um(t,e,r,i){if(t===0)return N2(e,r,i);if(t===1||t===3)return O2(e,r,i);if(t===2)return L2(e,r,i)}Gr.ft_1=Um;function N2(t,e,r){return t&e^~t&r}Gr.ch32=N2;function L2(t,e,r){return t&e^t&r^e&r}Gr.maj32=L2;function O2(t,e,r){return t^e^r}Gr.p32=O2;function zm(t){return Er(t,2)^Er(t,13)^Er(t,22)}Gr.s0_256=zm;function Km(t){return Er(t,6)^Er(t,11)^Er(t,25)}Gr.s1_256=Km;function Hm(t){return Er(t,7)^Er(t,18)^t>>>3}Gr.g0_256=Hm;function Wm(t){return Er(t,17)^Er(t,19)^t>>>10}Gr.g1_256=Wm});var U2=q((aA,F2)=>{"use strict";var Xn=nr(),Vm=Gn(),Gm=Qd(),ec=Xn.rotl32,Ea=Xn.sum32,Xm=Xn.sum32_5,Jm=Gm.ft_1,j2=Vm.BlockHash,Ym=[1518500249,1859775393,2400959708,3395469782];function Ar(){if(!(this instanceof Ar))return new Ar;j2.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}Xn.inherits(Ar,j2);F2.exports=Ar;Ar.blockSize=512;Ar.outSize=160;Ar.hmacStrength=80;Ar.padLength=64;Ar.prototype._update=function(e,r){for(var i=this.W,n=0;n<16;n++)i[n]=e[r+n];for(;n<i.length;n++)i[n]=ec(i[n-3]^i[n-8]^i[n-14]^i[n-16],1);var f=this.h[0],a=this.h[1],o=this.h[2],u=this.h[3],g=this.h[4];for(n=0;n<i.length;n++){var _=~~(n/20),x=Xm(ec(f,5),Jm(_,a,o,u),g,i[n],Ym[_]);g=u,u=o,o=ec(a,30),a=f,f=x}this.h[0]=Ea(this.h[0],f),this.h[1]=Ea(this.h[1],a),this.h[2]=Ea(this.h[2],o),this.h[3]=Ea(this.h[3],u),this.h[4]=Ea(this.h[4],g)};Ar.prototype._digest=function(e){return e==="hex"?Xn.toHex32(this.h,"big"):Xn.split32(this.h,"big")}});var tc=q((sA,K2)=>{"use strict";var Jn=nr(),Zm=Gn(),Yn=Qd(),$m=vt(),fr=Jn.sum32,Qm=Jn.sum32_4,e_=Jn.sum32_5,t_=Yn.ch32,r_=Yn.maj32,i_=Yn.s0_256,n_=Yn.s1_256,f_=Yn.g0_256,a_=Yn.g1_256,z2=Zm.BlockHash,s_=[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 Br(){if(!(this instanceof Br))return new Br;z2.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=s_,this.W=new Array(64)}Jn.inherits(Br,z2);K2.exports=Br;Br.blockSize=512;Br.outSize=256;Br.hmacStrength=192;Br.padLength=64;Br.prototype._update=function(e,r){for(var i=this.W,n=0;n<16;n++)i[n]=e[r+n];for(;n<i.length;n++)i[n]=Qm(a_(i[n-2]),i[n-7],f_(i[n-15]),i[n-16]);var f=this.h[0],a=this.h[1],o=this.h[2],u=this.h[3],g=this.h[4],_=this.h[5],x=this.h[6],E=this.h[7];for($m(this.k.length===i.length),n=0;n<i.length;n++){var B=e_(E,n_(g),t_(g,_,x),this.k[n],i[n]),I=fr(i_(f),r_(f,a,o));E=x,x=_,_=g,g=fr(u,B),u=o,o=a,a=f,f=fr(B,I)}this.h[0]=fr(this.h[0],f),this.h[1]=fr(this.h[1],a),this.h[2]=fr(this.h[2],o),this.h[3]=fr(this.h[3],u),this.h[4]=fr(this.h[4],g),this.h[5]=fr(this.h[5],_),this.h[6]=fr(this.h[6],x),this.h[7]=fr(this.h[7],E)};Br.prototype._digest=function(e){return e==="hex"?Jn.toHex32(this.h,"big"):Jn.split32(this.h,"big")}});var V2=q((oA,W2)=>{"use strict";var rc=nr(),H2=tc();function Xr(){if(!(this instanceof Xr))return new Xr;H2.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}rc.inherits(Xr,H2);W2.exports=Xr;Xr.blockSize=512;Xr.outSize=224;Xr.hmacStrength=192;Xr.padLength=64;Xr.prototype._digest=function(e){return e==="hex"?rc.toHex32(this.h.slice(0,7),"big"):rc.split32(this.h.slice(0,7),"big")}});var fc=q((dA,Y2)=>{"use strict";var wt=nr(),o_=Gn(),d_=vt(),qr=wt.rotr64_hi,Ir=wt.rotr64_lo,G2=wt.shr64_hi,X2=wt.shr64_lo,ci=wt.sum64,ic=wt.sum64_hi,nc=wt.sum64_lo,c_=wt.sum64_4_hi,u_=wt.sum64_4_lo,h_=wt.sum64_5_hi,l_=wt.sum64_5_lo,J2=o_.BlockHash,b_=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function ar(){if(!(this instanceof ar))return new ar;J2.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=b_,this.W=new Array(160)}wt.inherits(ar,J2);Y2.exports=ar;ar.blockSize=1024;ar.outSize=512;ar.hmacStrength=192;ar.padLength=128;ar.prototype._prepareBlock=function(e,r){for(var i=this.W,n=0;n<32;n++)i[n]=e[r+n];for(;n<i.length;n+=2){var f=E_(i[n-4],i[n-3]),a=A_(i[n-4],i[n-3]),o=i[n-14],u=i[n-13],g=S_(i[n-30],i[n-29]),_=M_(i[n-30],i[n-29]),x=i[n-32],E=i[n-31];i[n]=c_(f,a,o,u,g,_,x,E),i[n+1]=u_(f,a,o,u,g,_,x,E)}};ar.prototype._update=function(e,r){this._prepareBlock(e,r);var i=this.W,n=this.h[0],f=this.h[1],a=this.h[2],o=this.h[3],u=this.h[4],g=this.h[5],_=this.h[6],x=this.h[7],E=this.h[8],B=this.h[9],I=this.h[10],R=this.h[11],N=this.h[12],P=this.h[13],L=this.h[14],W=this.h[15];d_(this.k.length===i.length);for(var Be=0;Be<i.length;Be+=2){var qe=L,Ie=W,Ue=w_(E,B),Ee=x_(E,B),Ne=p_(E,B,I,R,N,P),A=v_(E,B,I,R,N,P),h=this.k[Be],m=this.k[Be+1],b=i[Be],s=i[Be+1],c=h_(qe,Ie,Ue,Ee,Ne,A,h,m,b,s),p=l_(qe,Ie,Ue,Ee,Ne,A,h,m,b,s);qe=m_(n,f),Ie=__(n,f),Ue=y_(n,f,a,o,u,g),Ee=g_(n,f,a,o,u,g);var y=ic(qe,Ie,Ue,Ee),v=nc(qe,Ie,Ue,Ee);L=N,W=P,N=I,P=R,I=E,R=B,E=ic(_,x,c,p),B=nc(x,x,c,p),_=u,x=g,u=a,g=o,a=n,o=f,n=ic(c,p,y,v),f=nc(c,p,y,v)}ci(this.h,0,n,f),ci(this.h,2,a,o),ci(this.h,4,u,g),ci(this.h,6,_,x),ci(this.h,8,E,B),ci(this.h,10,I,R),ci(this.h,12,N,P),ci(this.h,14,L,W)};ar.prototype._digest=function(e){return e==="hex"?wt.toHex32(this.h,"big"):wt.split32(this.h,"big")};function p_(t,e,r,i,n){var f=t&r^~t&n;return f<0&&(f+=4294967296),f}function v_(t,e,r,i,n,f){var a=e&i^~e&f;return a<0&&(a+=4294967296),a}function y_(t,e,r,i,n){var f=t&r^t&n^r&n;return f<0&&(f+=4294967296),f}function g_(t,e,r,i,n,f){var a=e&i^e&f^i&f;return a<0&&(a+=4294967296),a}function m_(t,e){var r=qr(t,e,28),i=qr(e,t,2),n=qr(e,t,7),f=r^i^n;return f<0&&(f+=4294967296),f}function __(t,e){var r=Ir(t,e,28),i=Ir(e,t,2),n=Ir(e,t,7),f=r^i^n;return f<0&&(f+=4294967296),f}function w_(t,e){var r=qr(t,e,14),i=qr(t,e,18),n=qr(e,t,9),f=r^i^n;return f<0&&(f+=4294967296),f}function x_(t,e){var r=Ir(t,e,14),i=Ir(t,e,18),n=Ir(e,t,9),f=r^i^n;return f<0&&(f+=4294967296),f}function S_(t,e){var r=qr(t,e,1),i=qr(t,e,8),n=G2(t,e,7),f=r^i^n;return f<0&&(f+=4294967296),f}function M_(t,e){var r=Ir(t,e,1),i=Ir(t,e,8),n=X2(t,e,7),f=r^i^n;return f<0&&(f+=4294967296),f}function E_(t,e){var r=qr(t,e,19),i=qr(e,t,29),n=G2(t,e,6),f=r^i^n;return f<0&&(f+=4294967296),f}function A_(t,e){var r=Ir(t,e,19),i=Ir(e,t,29),n=X2(t,e,6),f=r^i^n;return f<0&&(f+=4294967296),f}});var Q2=q((cA,$2)=>{"use strict";var ac=nr(),Z2=fc();function Jr(){if(!(this instanceof Jr))return new Jr;Z2.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}ac.inherits(Jr,Z2);$2.exports=Jr;Jr.blockSize=1024;Jr.outSize=384;Jr.hmacStrength=192;Jr.padLength=128;Jr.prototype._digest=function(e){return e==="hex"?ac.toHex32(this.h.slice(0,12),"big"):ac.split32(this.h.slice(0,12),"big")}});var ep=q(Zn=>{"use strict";Zn.sha1=U2();Zn.sha224=V2();Zn.sha256=tc();Zn.sha384=Q2();Zn.sha512=fc()});var ap=q(fp=>{"use strict";var tn=nr(),B_=Gn(),ao=tn.rotl32,tp=tn.sum32,Aa=tn.sum32_3,rp=tn.sum32_4,np=B_.BlockHash;function Rr(){if(!(this instanceof Rr))return new Rr;np.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}tn.inherits(Rr,np);fp.ripemd160=Rr;Rr.blockSize=512;Rr.outSize=160;Rr.hmacStrength=192;Rr.padLength=64;Rr.prototype._update=function(e,r){for(var i=this.h[0],n=this.h[1],f=this.h[2],a=this.h[3],o=this.h[4],u=i,g=n,_=f,x=a,E=o,B=0;B<80;B++){var I=tp(ao(rp(i,ip(B,n,f,a),e[R_[B]+r],q_(B)),P_[B]),o);i=o,o=a,a=ao(f,10),f=n,n=I,I=tp(ao(rp(u,ip(79-B,g,_,x),e[k_[B]+r],I_(B)),C_[B]),E),u=E,E=x,x=ao(_,10),_=g,g=I}I=Aa(this.h[1],f,x),this.h[1]=Aa(this.h[2],a,E),this.h[2]=Aa(this.h[3],o,u),this.h[3]=Aa(this.h[4],i,g),this.h[4]=Aa(this.h[0],n,_),this.h[0]=I};Rr.prototype._digest=function(e){return e==="hex"?tn.toHex32(this.h,"little"):tn.split32(this.h,"little")};function ip(t,e,r,i){return t<=15?e^r^i:t<=31?e&r|~e&i:t<=47?(e|~r)^i:t<=63?e&i|r&~i:e^(r|~i)}function q_(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function I_(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}var R_=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],k_=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],P_=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],C_=[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]});var op=q((lA,sp)=>{"use strict";var T_=nr(),D_=vt();function $n(t,e,r){if(!(this instanceof $n))return new $n(t,e,r);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(T_.toArray(e,r))}sp.exports=$n;$n.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),D_(e.length<=this.blockSize);for(var r=e.length;r<this.blockSize;r++)e.push(0);for(r=0;r<e.length;r++)e[r]^=54;for(this.inner=new this.Hash().update(e),r=0;r<e.length;r++)e[r]^=106;this.outer=new this.Hash().update(e)};$n.prototype.update=function(e,r){return this.inner.update(e,r),this};$n.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}});var Qn=q(dp=>{var at=dp;at.utils=nr();at.common=Gn();at.sha=ep();at.ripemd=ap();at.hmac=op();at.sha1=at.sha.sha1;at.sha256=at.sha.sha256;at.sha224=at.sha.sha224;at.sha384=at.sha.sha384;at.sha512=at.sha.sha512;at.ripemd160=at.ripemd.ripemd160});var up=q((pA,cp)=>{cp.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"]]}}});var so=q(bp=>{"use strict";var oc=bp,ui=Qn(),sc=$d(),N_=At(),hp=N_.assert;function lp(t){t.type==="short"?this.curve=new sc.short(t):t.type==="edwards"?this.curve=new sc.edwards(t):this.curve=new sc.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,hp(this.g.validate(),"Invalid curve"),hp(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}oc.PresetCurve=lp;function hi(t,e){Object.defineProperty(oc,t,{configurable:!0,enumerable:!0,get:function(){var r=new lp(e);return Object.defineProperty(oc,t,{configurable:!0,enumerable:!0,value:r}),r}})}hi("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:ui.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]});hi("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:ui.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]});hi("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:ui.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]});hi("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:ui.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"]});hi("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:ui.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"]});hi("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:ui.sha256,gRed:!1,g:["9"]});hi("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:ui.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var dc;try{dc=up()}catch(t){dc=void 0}hi("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:ui.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",dc]})});var cc=q((yA,vp)=>{"use strict";var L_=Qn(),rn=$s(),pp=vt();function li(t){if(!(this instanceof li))return new li(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=rn.toArray(t.entropy,t.entropyEnc||"hex"),r=rn.toArray(t.nonce,t.nonceEnc||"hex"),i=rn.toArray(t.pers,t.persEnc||"hex");pp(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,i)}vp.exports=li;li.prototype._init=function(e,r,i){var n=e.concat(r).concat(i);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var f=0;f<this.V.length;f++)this.K[f]=0,this.V[f]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656};li.prototype._hmac=function(){return new L_.hmac(this.hash,this.K)};li.prototype._update=function(e){var r=this._hmac().update(this.V).update([0]);e&&(r=r.update(e)),this.K=r.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())};li.prototype.reseed=function(e,r,i,n){typeof r!="string"&&(n=i,i=r,r=null),e=rn.toArray(e,r),i=rn.toArray(i,n),pp(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(i||[])),this._reseed=1};li.prototype.generate=function(e,r,i,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(n=i,i=r,r=null),i&&(i=rn.toArray(i,n||"hex"),this._update(i));for(var f=[];f.length<e;)this.V=this._hmac().update(this.V).digest(),f=f.concat(this.V);var a=f.slice(0,e);return this._update(i),this._reseed++,rn.encode(a,r)}});var gp=q((gA,yp)=>{"use strict";var O_=Pe(),j_=At(),uc=j_.assert;function lt(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}yp.exports=lt;lt.fromPublic=function(e,r,i){return r instanceof lt?r:new lt(e,{pub:r,pubEnc:i})};lt.fromPrivate=function(e,r,i){return r instanceof lt?r:new lt(e,{priv:r,privEnc:i})};lt.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}};lt.prototype.getPublic=function(e,r){return typeof e=="string"&&(r=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),r?this.pub.encode(r,e):this.pub};lt.prototype.getPrivate=function(e){return e==="hex"?this.priv.toString(16,2):this.priv};lt.prototype._importPrivate=function(e,r){this.priv=new O_(e,r||16),this.priv=this.priv.umod(this.ec.curve.n)};lt.prototype._importPublic=function(e,r){if(e.x||e.y){this.ec.curve.type==="mont"?uc(e.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&uc(e.x&&e.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(e.x,e.y);return}this.pub=this.ec.curve.decodePoint(e,r)};lt.prototype.derive=function(e){return e.validate()||uc(e.validate(),"public point not validated"),e.mul(this.priv).getX()};lt.prototype.sign=function(e,r,i){return this.ec.sign(e,this,r,i)};lt.prototype.verify=function(e,r,i){return this.ec.verify(e,r,this,void 0,i)};lt.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}});var wp=q((mA,_p)=>{"use strict";var oo=Pe(),bc=At(),F_=bc.assert;function co(t,e){if(t instanceof co)return t;this._importDER(t,e)||(F_(t.r&&t.s,"Signature without r or s"),this.r=new oo(t.r,16),this.s=new oo(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}_p.exports=co;function U_(){this.place=0}function hc(t,e){var r=t[e.place++];if(!(r&128))return r;var i=r&15;if(i===0||i>4||t[e.place]===0)return!1;for(var n=0,f=0,a=e.place;f<i;f++,a++)n<<=8,n|=t[a],n>>>=0;return n<=127?!1:(e.place=a,n)}function mp(t){for(var e=0,r=t.length-1;!t[e]&&!(t[e+1]&128)&&e<r;)e++;return e===0?t:t.slice(e)}co.prototype._importDER=function(e,r){e=bc.toArray(e,r);var i=new U_;if(e[i.place++]!==48)return!1;var n=hc(e,i);if(n===!1||n+i.place!==e.length||e[i.place++]!==2)return!1;var f=hc(e,i);if(f===!1||(e[i.place]&128)!==0)return!1;var a=e.slice(i.place,f+i.place);if(i.place+=f,e[i.place++]!==2)return!1;var o=hc(e,i);if(o===!1||e.length!==o+i.place||(e[i.place]&128)!==0)return!1;var u=e.slice(i.place,o+i.place);if(a[0]===0)if(a[1]&128)a=a.slice(1);else return!1;if(u[0]===0)if(u[1]&128)u=u.slice(1);else return!1;return this.r=new oo(a),this.s=new oo(u),this.recoveryParam=null,!0};function lc(t,e){if(e<128){t.push(e);return}var r=1+(Math.log(e)/Math.LN2>>>3);for(t.push(r|128);--r;)t.push(e>>>(r<<3)&255);t.push(e)}co.prototype.toDER=function(e){var r=this.r.toArray(),i=this.s.toArray();for(r[0]&128&&(r=[0].concat(r)),i[0]&128&&(i=[0].concat(i)),r=mp(r),i=mp(i);!i[0]&&!(i[1]&128);)i=i.slice(1);var n=[2];lc(n,r.length),n=n.concat(r),n.push(2),lc(n,i.length);var f=n.concat(i),a=[48];return lc(a,f.length),a=a.concat(f),bc.encode(a,e)}});var Mp=q((_A,Sp)=>{"use strict";var sr=Pe(),xp=cc(),z_=At(),pc=so(),K_=Nn(),nn=z_.assert,vc=gp(),uo=wp();function zt(t){if(!(this instanceof zt))return new zt(t);typeof t=="string"&&(nn(Object.prototype.hasOwnProperty.call(pc,t),"Unknown curve "+t),t=pc[t]),t instanceof pc.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}Sp.exports=zt;zt.prototype.keyPair=function(e){return new vc(this,e)};zt.prototype.keyFromPrivate=function(e,r){return vc.fromPrivate(this,e,r)};zt.prototype.keyFromPublic=function(e,r){return vc.fromPublic(this,e,r)};zt.prototype.genKeyPair=function(e){e||(e={});for(var r=new xp({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||K_(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),i=this.n.byteLength(),n=this.n.sub(new sr(2));;){var f=new sr(r.generate(i));if(!(f.cmp(n)>0))return f.iaddn(1),this.keyFromPrivate(f)}};zt.prototype._truncateToN=function(e,r,i){var n;if(sr.isBN(e)||typeof e=="number")e=new sr(e,16),n=e.byteLength();else if(typeof e=="object")n=e.length,e=new sr(e,16);else{var f=e.toString();n=f.length+1>>>1,e=new sr(f,16)}typeof i!="number"&&(i=n*8);var a=i-this.n.bitLength();return a>0&&(e=e.ushrn(a)),!r&&e.cmp(this.n)>=0?e.sub(this.n):e};zt.prototype.sign=function(e,r,i,n){if(typeof i=="object"&&(n=i,i=null),n||(n={}),typeof e!="string"&&typeof e!="number"&&!sr.isBN(e)){nn(typeof e=="object"&&e&&typeof e.length=="number","Expected message to be an array-like, a hex string, or a BN instance"),nn(e.length>>>0===e.length);for(var f=0;f<e.length;f++)nn((e[f]&255)===e[f])}r=this.keyFromPrivate(r,i),e=this._truncateToN(e,!1,n.msgBitLength),nn(!e.isNeg(),"Can not sign a negative message");var a=this.n.byteLength(),o=r.getPrivate().toArray("be",a),u=e.toArray("be",a);nn(new sr(u).eq(e),"Can not sign message");for(var g=new xp({hash:this.hash,entropy:o,nonce:u,pers:n.pers,persEnc:n.persEnc||"utf8"}),_=this.n.sub(new sr(1)),x=0;;x++){var E=n.k?n.k(x):new sr(g.generate(this.n.byteLength()));if(E=this._truncateToN(E,!0),!(E.cmpn(1)<=0||E.cmp(_)>=0)){var B=this.g.mul(E);if(!B.isInfinity()){var I=B.getX(),R=I.umod(this.n);if(R.cmpn(0)!==0){var N=E.invm(this.n).mul(R.mul(r.getPrivate()).iadd(e));if(N=N.umod(this.n),N.cmpn(0)!==0){var P=(B.getY().isOdd()?1:0)|(I.cmp(R)!==0?2:0);return n.canonical&&N.cmp(this.nh)>0&&(N=this.n.sub(N),P^=1),new uo({r:R,s:N,recoveryParam:P})}}}}}};zt.prototype.verify=function(e,r,i,n,f){f||(f={}),e=this._truncateToN(e,!1,f.msgBitLength),i=this.keyFromPublic(i,n),r=new uo(r,"hex");var a=r.r,o=r.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0||o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var u=o.invm(this.n),g=u.mul(e).umod(this.n),_=u.mul(a).umod(this.n),x;return this.curve._maxwellTrick?(x=this.g.jmulAdd(g,i.getPublic(),_),x.isInfinity()?!1:x.eqXToP(a)):(x=this.g.mulAdd(g,i.getPublic(),_),x.isInfinity()?!1:x.getX().umod(this.n).cmp(a)===0)};zt.prototype.recoverPubKey=function(t,e,r,i){nn((3&r)===r,"The recovery param is more than two bits"),e=new uo(e,i);var n=this.n,f=new sr(t),a=e.r,o=e.s,u=r&1,g=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&g)throw new Error("Unable to find sencond key candinate");g?a=this.curve.pointFromX(a.add(this.curve.n),u):a=this.curve.pointFromX(a,u);var _=e.r.invm(n),x=n.sub(f).mul(_).umod(n),E=o.mul(_).umod(n);return this.g.mulAdd(x,a,E)};zt.prototype.getKeyRecoveryParam=function(t,e,r,i){if(e=new uo(e,i),e.recoveryParam!==null)return e.recoveryParam;for(var n=0;n<4;n++){var f;try{f=this.recoverPubKey(t,e,n)}catch(a){continue}if(f.eq(r))return n}throw new Error("Unable to find valid recovery factor")}});var qp=q((wA,Bp)=>{"use strict";var Ba=At(),Ap=Ba.assert,Ep=Ba.parseBytes,ef=Ba.cachedProperty;function et(t,e){this.eddsa=t,this._secret=Ep(e.secret),t.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=Ep(e.pub)}et.fromPublic=function(e,r){return r instanceof et?r:new et(e,{pub:r})};et.fromSecret=function(e,r){return r instanceof et?r:new et(e,{secret:r})};et.prototype.secret=function(){return this._secret};ef(et,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())});ef(et,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())});ef(et,"privBytes",function(){var e=this.eddsa,r=this.hash(),i=e.encodingLength-1,n=r.slice(0,e.encodingLength);return n[0]&=248,n[i]&=127,n[i]|=64,n});ef(et,"priv",function(){return this.eddsa.decodeInt(this.privBytes())});ef(et,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()});ef(et,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)});et.prototype.sign=function(e){return Ap(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)};et.prototype.verify=function(e,r){return this.eddsa.verify(e,r,this)};et.prototype.getSecret=function(e){return Ap(this._secret,"KeyPair is public only"),Ba.encode(this.secret(),e)};et.prototype.getPublic=function(e){return Ba.encode(this.pubBytes(),e)};Bp.exports=et});var kp=q((xA,Rp)=>{"use strict";var H_=Pe(),ho=At(),Ip=ho.assert,lo=ho.cachedProperty,W_=ho.parseBytes;function fn(t,e){this.eddsa=t,typeof e!="object"&&(e=W_(e)),Array.isArray(e)&&(Ip(e.length===t.encodingLength*2,"Signature has invalid size"),e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),Ip(e.R&&e.S,"Signature without R or S"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof H_&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}lo(fn,"S",function(){return this.eddsa.decodeInt(this.Sencoded())});lo(fn,"R",function(){return this.eddsa.decodePoint(this.Rencoded())});lo(fn,"Rencoded",function(){return this.eddsa.encodePoint(this.R())});lo(fn,"Sencoded",function(){return this.eddsa.encodeInt(this.S())});fn.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())};fn.prototype.toHex=function(){return ho.encode(this.toBytes(),"hex").toUpperCase()};Rp.exports=fn});var Np=q((SA,Dp)=>{"use strict";var V_=Qn(),G_=so(),tf=At(),X_=tf.assert,Cp=tf.parseBytes,Tp=qp(),Pp=kp();function xt(t){if(X_(t==="ed25519","only tested with ed25519 so far"),!(this instanceof xt))return new xt(t);t=G_[t].curve,this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=V_.sha512}Dp.exports=xt;xt.prototype.sign=function(e,r){e=Cp(e);var i=this.keyFromSecret(r),n=this.hashInt(i.messagePrefix(),e),f=this.g.mul(n),a=this.encodePoint(f),o=this.hashInt(a,i.pubBytes(),e).mul(i.priv()),u=n.add(o).umod(this.curve.n);return this.makeSignature({R:f,S:u,Rencoded:a})};xt.prototype.verify=function(e,r,i){if(e=Cp(e),r=this.makeSignature(r),r.S().gte(r.eddsa.curve.n)||r.S().isNeg())return!1;var n=this.keyFromPublic(i),f=this.hashInt(r.Rencoded(),n.pubBytes(),e),a=this.g.mul(r.S()),o=r.R().add(n.pub().mul(f));return o.eq(a)};xt.prototype.hashInt=function(){for(var e=this.hash(),r=0;r<arguments.length;r++)e.update(arguments[r]);return tf.intFromLE(e.digest()).umod(this.curve.n)};xt.prototype.keyFromPublic=function(e){return Tp.fromPublic(this,e)};xt.prototype.keyFromSecret=function(e){return Tp.fromSecret(this,e)};xt.prototype.makeSignature=function(e){return e instanceof Pp?e:new Pp(this,e)};xt.prototype.encodePoint=function(e){var r=e.getY().toArray("le",this.encodingLength);return r[this.encodingLength-1]|=e.getX().isOdd()?128:0,r};xt.prototype.decodePoint=function(e){e=tf.parseBytes(e);var r=e.length-1,i=e.slice(0,r).concat(e[r]&-129),n=(e[r]&128)!==0,f=tf.intFromLE(i);return this.curve.pointFromY(f,n)};xt.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)};xt.prototype.decodeInt=function(e){return tf.intFromLE(e)};xt.prototype.isPoint=function(e){return e instanceof this.pointClass}});var yc=q(Lp=>{"use strict";var an=Lp;an.version=v2().version;an.utils=At();an.rand=Nn();an.curve=$d();an.curves=so();an.ec=Mp();an.eddsa=Np()});var Fp=q(jp=>{var Op=nf(),J_=F(),Y_=jp;Y_.define=function(e,r){return new rf(e,r)};function rf(t,e){this.name=t,this.body=e,this.decoders={},this.encoders={}}rf.prototype._createNamed=function(e){var r;try{r=require("vm").runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(i){r=function(n){this._initNamed(n)}}return J_(r,e),r.prototype._initNamed=function(n){e.call(this,n)},new r(this)};rf.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(Op.decoders[e])),this.decoders[e]};rf.prototype.decode=function(e,r,i){return this._getDecoder(r).decode(e,i)};rf.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(Op.encoders[e])),this.encoders[e]};rf.prototype.encode=function(e,r,i){return this._getEncoder(r).encode(e,i)}});var zp=q(Up=>{var Z_=F();function Kt(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}Up.Reporter=Kt;Kt.prototype.isError=function(e){return e instanceof ff};Kt.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}};Kt.prototype.restore=function(e){var r=this._reporterState;r.obj=e.obj,r.path=r.path.slice(0,e.pathLen)};Kt.prototype.enterKey=function(e){return this._reporterState.path.push(e)};Kt.prototype.exitKey=function(e){var r=this._reporterState;r.path=r.path.slice(0,e-1)};Kt.prototype.leaveKey=function(e,r,i){var n=this._reporterState;this.exitKey(e),n.obj!==null&&(n.obj[r]=i)};Kt.prototype.path=function(){return this._reporterState.path.join("/")};Kt.prototype.enterObject=function(){var e=this._reporterState,r=e.obj;return e.obj={},r};Kt.prototype.leaveObject=function(e){var r=this._reporterState,i=r.obj;return r.obj=e,i};Kt.prototype.error=function(e){var r,i=this._reporterState,n=e instanceof ff;if(n?r=e:r=new ff(i.path.map(function(f){return"["+JSON.stringify(f)+"]"}).join(""),e.message||e,e.stack),!i.options.partial)throw r;return n||i.errors.push(r),r};Kt.prototype.wrapResult=function(e){var r=this._reporterState;return r.options.partial?{result:this.isError(e)?null:e,errors:r.errors}:e};function ff(t,e){this.path=t,this.rethrow(e)}Z_(ff,Error);ff.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,ff),!this.stack)try{throw new Error(this.message)}catch(r){this.stack=r.stack}return this}});var mc=q(gc=>{var $_=F(),po=af().Reporter,qa=Pt().Buffer;function kr(t,e){if(po.call(this,e),!qa.isBuffer(t)){this.error("Input not Buffer");return}this.base=t,this.offset=0,this.length=t.length}$_(kr,po);gc.DecoderBuffer=kr;kr.prototype.save=function(){return{offset:this.offset,reporter:po.prototype.save.call(this)}};kr.prototype.restore=function(e){var r=new kr(this.base);return r.offset=e.offset,r.length=this.offset,this.offset=e.offset,po.prototype.restore.call(this,e.reporter),r};kr.prototype.isEmpty=function(){return this.offset===this.length};kr.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")};kr.prototype.skip=function(e,r){if(!(this.offset+e<=this.length))return this.error(r||"DecoderBuffer overrun");var i=new kr(this.base);return i._reporterState=this._reporterState,i.offset=this.offset,i.length=this.offset+e,this.offset+=e,i};kr.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)};function bo(t,e){if(Array.isArray(t))this.length=0,this.value=t.map(function(r){return r instanceof bo||(r=new bo(r,e)),this.length+=r.length,r},this);else if(typeof t=="number"){if(!(0<=t&&t<=255))return e.error("non-byte EncoderBuffer value");this.value=t,this.length=1}else if(typeof t=="string")this.value=t,this.length=qa.byteLength(t);else if(qa.isBuffer(t))this.value=t,this.length=t.length;else return e.error("Unsupported type: "+typeof t)}gc.EncoderBuffer=bo;bo.prototype.join=function(e,r){return e||(e=new qa(this.length)),r||(r=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(i){i.join(e,r),r+=i.length}):(typeof this.value=="number"?e[r]=this.value:typeof this.value=="string"?e.write(this.value,r):qa.isBuffer(this.value)&&this.value.copy(e,r),r+=this.length)),e}});var Wp=q((qA,Hp)=>{var Q_=af().Reporter,ew=af().EncoderBuffer,tw=af().DecoderBuffer,yt=vt(),Kp=["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"],rw=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(Kp),iw=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function Te(t,e){var r={};this._baseState=r,r.enc=t,r.parent=e||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}Hp.exports=Te;var nw=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];Te.prototype.clone=function(){var e=this._baseState,r={};nw.forEach(function(n){r[n]=e[n]});var i=new this.constructor(r.parent);return i._baseState=r,i};Te.prototype._wrap=function(){var e=this._baseState;rw.forEach(function(r){this[r]=function(){var n=new this.constructor(this);return e.children.push(n),n[r].apply(n,arguments)}},this)};Te.prototype._init=function(e){var r=this._baseState;yt(r.parent===null),e.call(this),r.children=r.children.filter(function(i){return i._baseState.parent===this},this),yt.equal(r.children.length,1,"Root node can have only one child")};Te.prototype._useArgs=function(e){var r=this._baseState,i=e.filter(function(n){return n instanceof this.constructor},this);e=e.filter(function(n){return!(n instanceof this.constructor)},this),i.length!==0&&(yt(r.children===null),r.children=i,i.forEach(function(n){n._baseState.parent=this},this)),e.length!==0&&(yt(r.args===null),r.args=e,r.reverseArgs=e.map(function(n){if(typeof n!="object"||n.constructor!==Object)return n;var f={};return Object.keys(n).forEach(function(a){a==(a|0)&&(a|=0);var o=n[a];f[o]=a}),f}))};iw.forEach(function(t){Te.prototype[t]=function(){var r=this._baseState;throw new Error(t+" not implemented for encoding: "+r.enc)}});Kp.forEach(function(t){Te.prototype[t]=function(){var r=this._baseState,i=Array.prototype.slice.call(arguments);return yt(r.tag===null),r.tag=t,this._useArgs(i),this}});Te.prototype.use=function(e){yt(e);var r=this._baseState;return yt(r.use===null),r.use=e,this};Te.prototype.optional=function(){var e=this._baseState;return e.optional=!0,this};Te.prototype.def=function(e){var r=this._baseState;return yt(r.default===null),r.default=e,r.optional=!0,this};Te.prototype.explicit=function(e){var r=this._baseState;return yt(r.explicit===null&&r.implicit===null),r.explicit=e,this};Te.prototype.implicit=function(e){var r=this._baseState;return yt(r.explicit===null&&r.implicit===null),r.implicit=e,this};Te.prototype.obj=function(){var e=this._baseState,r=Array.prototype.slice.call(arguments);return e.obj=!0,r.length!==0&&this._useArgs(r),this};Te.prototype.key=function(e){var r=this._baseState;return yt(r.key===null),r.key=e,this};Te.prototype.any=function(){var e=this._baseState;return e.any=!0,this};Te.prototype.choice=function(e){var r=this._baseState;return yt(r.choice===null),r.choice=e,this._useArgs(Object.keys(e).map(function(i){return e[i]})),this};Te.prototype.contains=function(e){var r=this._baseState;return yt(r.use===null),r.contains=e,this};Te.prototype._decode=function(e,r){var i=this._baseState;if(i.parent===null)return e.wrapResult(i.children[0]._decode(e,r));var n=i.default,f=!0,a=null;if(i.key!==null&&(a=e.enterKey(i.key)),i.optional){var o=null;if(i.explicit!==null?o=i.explicit:i.implicit!==null?o=i.implicit:i.tag!==null&&(o=i.tag),o===null&&!i.any){var u=e.save();try{i.choice===null?this._decodeGeneric(i.tag,e,r):this._decodeChoice(e,r),f=!0}catch(I){f=!1}e.restore(u)}else if(f=this._peekTag(e,o,i.any),e.isError(f))return f}var g;if(i.obj&&f&&(g=e.enterObject()),f){if(i.explicit!==null){var _=this._decodeTag(e,i.explicit);if(e.isError(_))return _;e=_}var x=e.offset;if(i.use===null&&i.choice===null){if(i.any)var u=e.save();var E=this._decodeTag(e,i.implicit!==null?i.implicit:i.tag,i.any);if(e.isError(E))return E;i.any?n=e.raw(u):e=E}if(r&&r.track&&i.tag!==null&&r.track(e.path(),x,e.length,"tagged"),r&&r.track&&i.tag!==null&&r.track(e.path(),e.offset,e.length,"content"),i.any?n=n:i.choice===null?n=this._decodeGeneric(i.tag,e,r):n=this._decodeChoice(e,r),e.isError(n))return n;if(!i.any&&i.choice===null&&i.children!==null&&i.children.forEach(function(R){R._decode(e,r)}),i.contains&&(i.tag==="octstr"||i.tag==="bitstr")){var B=new tw(n);n=this._getUse(i.contains,e._reporterState.obj)._decode(B,r)}}return i.obj&&f&&(n=e.leaveObject(g)),i.key!==null&&(n!==null||f===!0)?e.leaveKey(a,i.key,n):a!==null&&e.exitKey(a),n};Te.prototype._decodeGeneric=function(e,r,i){var n=this._baseState;return e==="seq"||e==="set"?null:e==="seqof"||e==="setof"?this._decodeList(r,e,n.args[0],i):/str$/.test(e)?this._decodeStr(r,e,i):e==="objid"&&n.args?this._decodeObjid(r,n.args[0],n.args[1],i):e==="objid"?this._decodeObjid(r,null,null,i):e==="gentime"||e==="utctime"?this._decodeTime(r,e,i):e==="null_"?this._decodeNull(r,i):e==="bool"?this._decodeBool(r,i):e==="objDesc"?this._decodeStr(r,e,i):e==="int"||e==="enum"?this._decodeInt(r,n.args&&n.args[0],i):n.use!==null?this._getUse(n.use,r._reporterState.obj)._decode(r,i):r.error("unknown tag: "+e)};Te.prototype._getUse=function(e,r){var i=this._baseState;return i.useDecoder=this._use(e,r),yt(i.useDecoder._baseState.parent===null),i.useDecoder=i.useDecoder._baseState.children[0],i.implicit!==i.useDecoder._baseState.implicit&&(i.useDecoder=i.useDecoder.clone(),i.useDecoder._baseState.implicit=i.implicit),i.useDecoder};Te.prototype._decodeChoice=function(e,r){var i=this._baseState,n=null,f=!1;return Object.keys(i.choice).some(function(a){var o=e.save(),u=i.choice[a];try{var g=u._decode(e,r);if(e.isError(g))return!1;n={type:a,value:g},f=!0}catch(_){return e.restore(o),!1}return!0},this),f?n:e.error("Choice not matched")};Te.prototype._createEncoderBuffer=function(e){return new ew(e,this.reporter)};Te.prototype._encode=function(e,r,i){var n=this._baseState;if(!(n.default!==null&&n.default===e)){var f=this._encodeValue(e,r,i);if(f!==void 0&&!this._skipDefault(f,r,i))return f}};Te.prototype._encodeValue=function(e,r,i){var n=this._baseState;if(n.parent===null)return n.children[0]._encode(e,r||new Q_);var u=null;if(this.reporter=r,n.optional&&e===void 0)if(n.default!==null)e=n.default;else return;var f=null,a=!1;if(n.any)u=this._createEncoderBuffer(e);else if(n.choice)u=this._encodeChoice(e,r);else if(n.contains)f=this._getUse(n.contains,i)._encode(e,r),a=!0;else if(n.children)f=n.children.map(function(x){if(x._baseState.tag==="null_")return x._encode(null,r,e);if(x._baseState.key===null)return r.error("Child should have a key");var E=r.enterKey(x._baseState.key);if(typeof e!="object")return r.error("Child expected, but input is not object");var B=x._encode(e[x._baseState.key],r,e);return r.leaveKey(E),B},this).filter(function(x){return x}),f=this._createEncoderBuffer(f);else if(n.tag==="seqof"||n.tag==="setof"){if(!(n.args&&n.args.length===1))return r.error("Too many args for : "+n.tag);if(!Array.isArray(e))return r.error("seqof/setof, but data is not Array");var o=this.clone();o._baseState.implicit=null,f=this._createEncoderBuffer(e.map(function(x){var E=this._baseState;return this._getUse(E.args[0],e)._encode(x,r)},o))}else n.use!==null?u=this._getUse(n.use,i)._encode(e,r):(f=this._encodePrimitive(n.tag,e),a=!0);var u;if(!n.any&&n.choice===null){var g=n.implicit!==null?n.implicit:n.tag,_=n.implicit===null?"universal":"context";g===null?n.use===null&&r.error("Tag could be omitted only for .use()"):n.use===null&&(u=this._encodeComposite(g,a,_,f))}return n.explicit!==null&&(u=this._encodeComposite(n.explicit,!1,"context",u)),u};Te.prototype._encodeChoice=function(e,r){var i=this._baseState,n=i.choice[e.type];return n||yt(!1,e.type+" not found in "+JSON.stringify(Object.keys(i.choice))),n._encode(e.value,r)};Te.prototype._encodePrimitive=function(e,r){var i=this._baseState;if(/str$/.test(e))return this._encodeStr(r,e);if(e==="objid"&&i.args)return this._encodeObjid(r,i.reverseArgs[0],i.args[1]);if(e==="objid")return this._encodeObjid(r,null,null);if(e==="gentime"||e==="utctime")return this._encodeTime(r,e);if(e==="null_")return this._encodeNull();if(e==="int"||e==="enum")return this._encodeInt(r,i.args&&i.reverseArgs[0]);if(e==="bool")return this._encodeBool(r);if(e==="objDesc")return this._encodeStr(r,e);throw new Error("Unsupported tag: "+e)};Te.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)};Te.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}});var af=q(Vp=>{var vo=Vp;vo.Reporter=zp().Reporter;vo.DecoderBuffer=mc().DecoderBuffer;vo.EncoderBuffer=mc().EncoderBuffer;vo.Node=Wp()});var Xp=q(sn=>{var Gp=_c();sn.tagClass={0:"universal",1:"application",2:"context",3:"private"};sn.tagClassByName=Gp._reverse(sn.tagClass);sn.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"};sn.tagByName=Gp._reverse(sn.tag)});var _c=q(Yp=>{var Jp=Yp;Jp._reverse=function(e){var r={};return Object.keys(e).forEach(function(i){(i|0)==i&&(i=i|0);var n=e[i];r[n]=i}),r};Jp.der=Xp()});var Sc=q((PA,e6)=>{var fw=F(),wc=nf(),yo=wc.base,aw=wc.bignum,Zp=wc.constants.der;function $p(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new Bt,this.tree._init(t.body)}e6.exports=$p;$p.prototype.decode=function(e,r){return e instanceof yo.DecoderBuffer||(e=new yo.DecoderBuffer(e,r)),this.tree._decode(e,r)};function Bt(t){yo.Node.call(this,"der",t)}fw(Bt,yo.Node);Bt.prototype._peekTag=function(e,r,i){if(e.isEmpty())return!1;var n=e.save(),f=xc(e,'Failed to peek tag: "'+r+'"');return e.isError(f)?f:(e.restore(n),f.tag===r||f.tagStr===r||f.tagStr+"of"===r||i)};Bt.prototype._decodeTag=function(e,r,i){var n=xc(e,'Failed to decode tag of "'+r+'"');if(e.isError(n))return n;var f=Qp(e,n.primitive,'Failed to get length of "'+r+'"');if(e.isError(f))return f;if(!i&&n.tag!==r&&n.tagStr!==r&&n.tagStr+"of"!==r)return e.error('Failed to match tag: "'+r+'"');if(n.primitive||f!==null)return e.skip(f,'Failed to match body of: "'+r+'"');var a=e.save(),o=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(o)?o:(f=e.offset-a.offset,e.restore(a),e.skip(f,'Failed to match body of: "'+r+'"'))};Bt.prototype._skipUntilEnd=function(e,r){for(;;){var i=xc(e,r);if(e.isError(i))return i;var n=Qp(e,i.primitive,r);if(e.isError(n))return n;var f;if(i.primitive||n!==null?f=e.skip(n):f=this._skipUntilEnd(e,r),e.isError(f))return f;if(i.tagStr==="end")break}};Bt.prototype._decodeList=function(e,r,i,n){for(var f=[];!e.isEmpty();){var a=this._peekTag(e,"end");if(e.isError(a))return a;var o=i.decode(e,"der",n);if(e.isError(o)&&a)break;f.push(o)}return f};Bt.prototype._decodeStr=function(e,r){if(r==="bitstr"){var i=e.readUInt8();return e.isError(i)?i:{unused:i,data:e.raw()}}else if(r==="bmpstr"){var n=e.raw();if(n.length%2===1)return e.error("Decoding of string type: bmpstr length mismatch");for(var f="",a=0;a<n.length/2;a++)f+=String.fromCharCode(n.readUInt16BE(a*2));return f}else if(r==="numstr"){var o=e.raw().toString("ascii");return this._isNumstr(o)?o:e.error("Decoding of string type: numstr unsupported characters")}else{if(r==="octstr")return e.raw();if(r==="objDesc")return e.raw();if(r==="printstr"){var u=e.raw().toString("ascii");return this._isPrintstr(u)?u:e.error("Decoding of string type: printstr unsupported characters")}else return/str$/.test(r)?e.raw().toString():e.error("Decoding of string type: "+r+" unsupported")}};Bt.prototype._decodeObjid=function(e,r,i){for(var n,f=[],a=0;!e.isEmpty();){var o=e.readUInt8();a<<=7,a|=o&127,(o&128)===0&&(f.push(a),a=0)}o&128&&f.push(a);var u=f[0]/40|0,g=f[0]%40;if(i?n=f:n=[u,g].concat(f.slice(1)),r){var _=r[n.join(" ")];_===void 0&&(_=r[n.join(".")]),_!==void 0&&(n=_)}return n};Bt.prototype._decodeTime=function(e,r){var i=e.raw().toString();if(r==="gentime")var n=i.slice(0,4)|0,f=i.slice(4,6)|0,a=i.slice(6,8)|0,o=i.slice(8,10)|0,u=i.slice(10,12)|0,g=i.slice(12,14)|0;else if(r==="utctime"){var n=i.slice(0,2)|0,f=i.slice(2,4)|0,a=i.slice(4,6)|0,o=i.slice(6,8)|0,u=i.slice(8,10)|0,g=i.slice(10,12)|0;n<70?n=2e3+n:n=1900+n}else return e.error("Decoding "+r+" time is not supported yet");return Date.UTC(n,f-1,a,o,u,g,0)};Bt.prototype._decodeNull=function(e){return null};Bt.prototype._decodeBool=function(e){var r=e.readUInt8();return e.isError(r)?r:r!==0};Bt.prototype._decodeInt=function(e,r){var i=e.raw(),n=new aw(i);return r&&(n=r[n.toString(10)]||n),n};Bt.prototype._use=function(e,r){return typeof e=="function"&&(e=e(r)),e._getDecoder("der").tree};function xc(t,e){var r=t.readUInt8(e);if(t.isError(r))return r;var i=Zp.tagClass[r>>6],n=(r&32)===0;if((r&31)===31){var f=r;for(r=0;(f&128)===128;){if(f=t.readUInt8(e),t.isError(f))return f;r<<=7,r|=f&127}}else r&=31;var a=Zp.tag[r];return{cls:i,primitive:n,tag:r,tagStr:a}}function Qp(t,e,r){var i=t.readUInt8(r);if(t.isError(i))return i;if(!e&&i===128)return null;if((i&128)===0)return i;var n=i&127;if(n>4)return t.error("length octect is too long");i=0;for(var f=0;f<n;f++){i<<=8;var a=t.readUInt8(r);if(t.isError(a))return a;i|=a}return i}});var r6=q((CA,t6)=>{var sw=F(),ow=Pt().Buffer,Mc=Sc();function Ec(t){Mc.call(this,t),this.enc="pem"}sw(Ec,Mc);t6.exports=Ec;Ec.prototype.decode=function(e,r){for(var i=e.toString().split(/[\r\n]+/g),n=r.label.toUpperCase(),f=/^-----(BEGIN|END) ([^-]+)-----$/,a=-1,o=-1,u=0;u<i.length;u++){var g=i[u].match(f);if(g!==null&&g[2]===n)if(a===-1){if(g[1]!=="BEGIN")break;a=u}else{if(g[1]!=="END")break;o=u;break}}if(a===-1||o===-1)throw new Error("PEM section not found for: "+n);var _=i.slice(a+1,o).join("");_.replace(/[^a-z0-9\+\/=]+/gi,"");var x=new ow(_,"base64");return Mc.prototype.decode.call(this,x,r)}});var f6=q(n6=>{var i6=n6;i6.der=Sc();i6.pem=r6()});var Bc=q((DA,d6)=>{var dw=F(),Yr=Pt().Buffer,a6=nf(),s6=a6.base,Ac=a6.constants.der;function o6(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new or,this.tree._init(t.body)}d6.exports=o6;o6.prototype.encode=function(e,r){return this.tree._encode(e,r).join()};function or(t){s6.Node.call(this,"der",t)}dw(or,s6.Node);or.prototype._encodeComposite=function(e,r,i,n){var f=cw(e,r,i,this.reporter);if(n.length<128){var u=new Yr(2);return u[0]=f,u[1]=n.length,this._createEncoderBuffer([u,n])}for(var a=1,o=n.length;o>=256;o>>=8)a++;var u=new Yr(2+a);u[0]=f,u[1]=128|a;for(var o=1+a,g=n.length;g>0;o--,g>>=8)u[o]=g&255;return this._createEncoderBuffer([u,n])};or.prototype._encodeStr=function(e,r){if(r==="bitstr")return this._createEncoderBuffer([e.unused|0,e.data]);if(r==="bmpstr"){for(var i=new Yr(e.length*2),n=0;n<e.length;n++)i.writeUInt16BE(e.charCodeAt(n),n*2);return this._createEncoderBuffer(i)}else return r==="numstr"?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):r==="printstr"?this._isPrintstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(r)?this._createEncoderBuffer(e):r==="objDesc"?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+r+" unsupported")};or.prototype._encodeObjid=function(e,r,i){if(typeof e=="string"){if(!r)return this.reporter.error("string objid given, but no values map found");if(!r.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=r[e].split(/[\s\.]+/g);for(var n=0;n<e.length;n++)e[n]|=0}else if(Array.isArray(e)){e=e.slice();for(var n=0;n<e.length;n++)e[n]|=0}if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!i){if(e[1]>=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,e[0]*40+e[1])}for(var f=0,n=0;n<e.length;n++){var a=e[n];for(f++;a>=128;a>>=7)f++}for(var o=new Yr(f),u=o.length-1,n=e.length-1;n>=0;n--){var a=e[n];for(o[u--]=a&127;(a>>=7)>0;)o[u--]=128|a&127}return this._createEncoderBuffer(o)};function Ht(t){return t<10?"0"+t:t}or.prototype._encodeTime=function(e,r){var i,n=new Date(e);return r==="gentime"?i=[Ht(n.getFullYear()),Ht(n.getUTCMonth()+1),Ht(n.getUTCDate()),Ht(n.getUTCHours()),Ht(n.getUTCMinutes()),Ht(n.getUTCSeconds()),"Z"].join(""):r==="utctime"?i=[Ht(n.getFullYear()%100),Ht(n.getUTCMonth()+1),Ht(n.getUTCDate()),Ht(n.getUTCHours()),Ht(n.getUTCMinutes()),Ht(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+r+" time is not supported yet"),this._encodeStr(i,"octstr")};or.prototype._encodeNull=function(){return this._createEncoderBuffer("")};or.prototype._encodeInt=function(e,r){if(typeof e=="string"){if(!r)return this.reporter.error("String int or enum given, but no values map");if(!r.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=r[e]}if(typeof e!="number"&&!Yr.isBuffer(e)){var i=e.toArray();!e.sign&&i[0]&128&&i.unshift(0),e=new Yr(i)}if(Yr.isBuffer(e)){var n=e.length;e.length===0&&n++;var a=new Yr(n);return e.copy(a),e.length===0&&(a[0]=0),this._createEncoderBuffer(a)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);for(var n=1,f=e;f>=256;f>>=8)n++;for(var a=new Array(n),f=a.length-1;f>=0;f--)a[f]=e&255,e>>=8;return a[0]&128&&a.unshift(0),this._createEncoderBuffer(new Yr(a))};or.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)};or.prototype._use=function(e,r){return typeof e=="function"&&(e=e(r)),e._getEncoder("der").tree};or.prototype._skipDefault=function(e,r,i){var n=this._baseState,f;if(n.default===null)return!1;var a=e.join();if(n.defaultBuffer===void 0&&(n.defaultBuffer=this._encodeValue(n.default,r,i).join()),a.length!==n.defaultBuffer.length)return!1;for(f=0;f<a.length;f++)if(a[f]!==n.defaultBuffer[f])return!1;return!0};function cw(t,e,r,i){var n;if(t==="seqof"?t="seq":t==="setof"&&(t="set"),Ac.tagByName.hasOwnProperty(t))n=Ac.tagByName[t];else if(typeof t=="number"&&(t|0)===t)n=t;else return i.error("Unknown tag: "+t);return n>=31?i.error("Multi-octet tag encoding unsupported"):(e||(n|=32),n|=Ac.tagClassByName[r||"universal"]<<6,n)}});var u6=q((NA,c6)=>{var uw=F(),qc=Bc();function Ic(t){qc.call(this,t),this.enc="pem"}uw(Ic,qc);c6.exports=Ic;Ic.prototype.encode=function(e,r){for(var i=qc.prototype.encode.call(this,e),n=i.toString("base64"),f=["-----BEGIN "+r.label+"-----"],a=0;a<n.length;a+=64)f.push(n.slice(a,a+64));return f.push("-----END "+r.label+"-----"),f.join("\n")}});var b6=q(l6=>{var h6=l6;h6.der=Bc();h6.pem=u6()});var nf=q(p6=>{var sf=p6;sf.bignum=Pe();sf.define=Fp().define;sf.base=af();sf.constants=_c();sf.decoders=f6();sf.encoders=b6()});var m6=q((jA,g6)=>{"use strict";var dr=nf(),v6=dr.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),hw=dr.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),Rc=dr.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),lw=dr.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(Rc),this.key("subjectPublicKey").bitstr())}),bw=dr.define("RelativeDistinguishedName",function(){this.setof(hw)}),pw=dr.define("RDNSequence",function(){this.seqof(bw)}),y6=dr.define("Name",function(){this.choice({rdnSequence:this.use(pw)})}),vw=dr.define("Validity",function(){this.seq().obj(this.key("notBefore").use(v6),this.key("notAfter").use(v6))}),yw=dr.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),gw=dr.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(Rc),this.key("issuer").use(y6),this.key("validity").use(vw),this.key("subject").use(y6),this.key("subjectPublicKeyInfo").use(lw),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(yw).optional())}),mw=dr.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(gw),this.key("signatureAlgorithm").use(Rc),this.key("signatureValue").bitstr())});g6.exports=mw});var w6=q(ur=>{"use strict";var cr=nf();ur.certificate=m6();var _w=cr.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())});ur.RSAPrivateKey=_w;var ww=cr.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});ur.RSAPublicKey=ww;var _6=cr.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())}),xw=cr.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(_6),this.key("subjectPublicKey").bitstr())});ur.PublicKey=xw;var Sw=cr.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(_6),this.key("subjectPrivateKey").octstr())});ur.PrivateKey=Sw;var Mw=cr.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())});ur.EncryptedPrivateKey=Mw;var Ew=cr.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())});ur.DSAPrivateKey=Ew;ur.DSAparam=cr.define("DSAparam",function(){this.int()});var Aw=cr.define("ECParameters",function(){this.choice({namedCurve:this.objid()})}),Bw=cr.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(Aw),this.key("publicKey").optional().explicit(1).bitstr())});ur.ECPrivateKey=Bw;ur.signature=cr.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})});var x6=q((UA,qw)=>{qw.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"}});var M6=q((zA,S6)=>{"use strict";var Iw=/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,Rw=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,kw=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,Pw=Cn(),Cw=Dn(),go=H().Buffer;S6.exports=function(t,e){var r=t.toString(),i=r.match(Iw),n;if(i){var a="aes"+i[1],o=go.from(i[2],"hex"),u=go.from(i[3].replace(/[\r\n]/g,""),"base64"),g=Pw(e,o.slice(0,8),parseInt(i[1],10)).key,_=[],x=Cw.createDecipheriv(a,g,o);_.push(x.update(u)),_.push(x.final()),n=go.concat(_)}else{var f=r.match(kw);n=go.from(f[2].replace(/[\r\n]/g,""),"base64")}var E=r.match(Rw)[1];return{tag:E,data:n}}});var Pc=q((KA,A6)=>{"use strict";var St=w6(),Tw=x6(),Dw=M6(),Nw=Dn(),Lw=Es(),kc=H().Buffer;function Ow(t,e){var r=t.algorithm.decrypt.kde.kdeparams.salt,i=parseInt(t.algorithm.decrypt.kde.kdeparams.iters.toString(),10),n=Tw[t.algorithm.decrypt.cipher.algo.join(".")],f=t.algorithm.decrypt.cipher.iv,a=t.subjectPrivateKey,o=parseInt(n.split("-")[1],10)/8,u=Lw.pbkdf2Sync(e,r,i,o,"sha1"),g=Nw.createDecipheriv(n,u,f),_=[];return _.push(g.update(a)),_.push(g.final()),kc.concat(_)}function E6(t){var e;typeof t=="object"&&!kc.isBuffer(t)&&(e=t.passphrase,t=t.key),typeof t=="string"&&(t=kc.from(t));var r=Dw(t,e),i=r.tag,n=r.data,f,a;switch(i){case"CERTIFICATE":a=St.certificate.decode(n,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(a||(a=St.PublicKey.decode(n,"der")),f=a.algorithm.algorithm.join("."),f){case"1.2.840.113549.1.1.1":return St.RSAPublicKey.decode(a.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return a.subjectPrivateKey=a.subjectPublicKey,{type:"ec",data:a};case"1.2.840.10040.4.1":return a.algorithm.params.pub_key=St.DSAparam.decode(a.subjectPublicKey.data,"der"),{type:"dsa",data:a.algorithm.params};default:throw new Error("unknown key id "+f)}case"ENCRYPTED PRIVATE KEY":n=St.EncryptedPrivateKey.decode(n,"der"),n=Ow(n,e);case"PRIVATE KEY":switch(a=St.PrivateKey.decode(n,"der"),f=a.algorithm.algorithm.join("."),f){case"1.2.840.113549.1.1.1":return St.RSAPrivateKey.decode(a.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:a.algorithm.curve,privateKey:St.ECPrivateKey.decode(a.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return a.algorithm.params.priv_key=St.DSAparam.decode(a.subjectPrivateKey,"der"),{type:"dsa",params:a.algorithm.params};default:throw new Error("unknown key id "+f)}case"RSA PUBLIC KEY":return St.RSAPublicKey.decode(n,"der");case"RSA PRIVATE KEY":return St.RSAPrivateKey.decode(n,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:St.DSAPrivateKey.decode(n,"der")};case"EC PRIVATE KEY":return n=St.ECPrivateKey.decode(n,"der"),{curve:n.parameters.value,privateKey:n.privateKey};default:throw new Error("unknown key type "+i)}}E6.signature=St.signature;A6.exports=E6});var Cc=q((HA,jw)=>{jw.exports={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}});var I6=q((WA,_o)=>{"use strict";var bt=H().Buffer,on=K0(),Fw=Ys(),Uw=yc().ec,mo=Js(),zw=Pc(),Kw=Cc(),Hw=1;function Ww(t,e,r,i,n){var f=zw(e);if(f.curve){if(i!=="ecdsa"&&i!=="ecdsa/rsa")throw new Error("wrong private key type");return Vw(t,f)}else if(f.type==="dsa"){if(i!=="dsa")throw new Error("wrong private key type");return Gw(t,f,r)}if(i!=="rsa"&&i!=="ecdsa/rsa")throw new Error("wrong private key type");if(e.padding!==void 0&&e.padding!==Hw)throw new Error("illegal or unsupported padding mode");t=bt.concat([n,t]);for(var a=f.modulus.byteLength(),o=[0,1];t.length+o.length+1<a;)o.push(255);o.push(0);for(var u=-1;++u<t.length;)o.push(t[u]);var g=Fw(o,f);return g}function Vw(t,e){var r=Kw[e.curve.join(".")];if(!r)throw new Error("unknown curve "+e.curve.join("."));var i=new Uw(r),n=i.keyFromPrivate(e.privateKey),f=n.sign(t);return bt.from(f.toDER())}function Gw(t,e,r){for(var i=e.params.priv_key,n=e.params.p,f=e.params.q,a=e.params.g,o=new mo(0),u,g=Tc(t,f).mod(f),_=!1,x=B6(i,f,t,r);_===!1;)u=q6(f,x,r),o=Yw(a,u,n,f),_=u.invm(f).imul(g.add(i.mul(o))).mod(f),_.cmpn(0)===0&&(_=!1,o=new mo(0));return Xw(o,_)}function Xw(t,e){t=t.toArray(),e=e.toArray(),t[0]&128&&(t=[0].concat(t)),e[0]&128&&(e=[0].concat(e));var r=t.length+e.length+4,i=[48,r,2,t.length];return i=i.concat(t,[2,e.length],e),bt.from(i)}function B6(t,e,r,i){if(t=bt.from(t.toArray()),t.length<e.byteLength()){var n=bt.alloc(e.byteLength()-t.length);t=bt.concat([n,t])}var f=r.length,a=Jw(r,e),o=bt.alloc(f);o.fill(1);var u=bt.alloc(f);return u=on(i,u).update(o).update(bt.from([0])).update(t).update(a).digest(),o=on(i,u).update(o).digest(),u=on(i,u).update(o).update(bt.from([1])).update(t).update(a).digest(),o=on(i,u).update(o).digest(),{k:u,v:o}}function Tc(t,e){var r=new mo(t),i=(t.length<<3)-e.bitLength();return i>0&&r.ishrn(i),r}function Jw(t,e){t=Tc(t,e),t=t.mod(e);var r=bt.from(t.toArray());if(r.length<e.byteLength()){var i=bt.alloc(e.byteLength()-r.length);r=bt.concat([i,r])}return r}function q6(t,e,r){var i,n;do{for(i=bt.alloc(0);i.length*8<t.bitLength();)e.v=on(r,e.k).update(e.v).digest(),i=bt.concat([i,e.v]);n=Tc(i,t),e.k=on(r,e.k).update(e.v).update(bt.from([0])).digest(),e.v=on(r,e.k).update(e.v).digest()}while(n.cmp(t)!==-1);return n}function Yw(t,e,r,i){return t.toRed(mo.mont(r)).redPow(e).fromRed().mod(i)}_o.exports=Ww;_o.exports.getKey=B6;_o.exports.makeKey=q6});var C6=q((VA,P6)=>{"use strict";var Dc=H().Buffer,Ia=Js(),Zw=yc().ec,k6=Pc(),$w=Cc();function Qw(t,e,r,i,n){var f=k6(r);if(f.type==="ec"){if(i!=="ecdsa"&&i!=="ecdsa/rsa")throw new Error("wrong public key type");return ex(t,e,f)}else if(f.type==="dsa"){if(i!=="dsa")throw new Error("wrong public key type");return tx(t,e,f)}if(i!=="rsa"&&i!=="ecdsa/rsa")throw new Error("wrong public key type");e=Dc.concat([n,e]);for(var a=f.modulus.byteLength(),o=[1],u=0;e.length+o.length+2<a;)o.push(255),u+=1;o.push(0);for(var g=-1;++g<e.length;)o.push(e[g]);o=Dc.from(o);var _=Ia.mont(f.modulus);t=new Ia(t).toRed(_),t=t.redPow(new Ia(f.publicExponent)),t=Dc.from(t.fromRed().toArray());var x=u<8?1:0;for(a=Math.min(t.length,o.length),t.length!==o.length&&(x=1),g=-1;++g<a;)x|=t[g]^o[g];return x===0}function ex(t,e,r){var i=$w[r.data.algorithm.curve.join(".")];if(!i)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var n=new Zw(i),f=r.data.subjectPrivateKey.data;return n.verify(e,t,f)}function tx(t,e,r){var i=r.data.p,n=r.data.q,f=r.data.g,a=r.data.pub_key,o=k6.signature.decode(t,"der"),u=o.s,g=o.r;R6(u,n),R6(g,n);var _=Ia.mont(i),x=u.invm(n),E=f.toRed(_).redPow(new Ia(e).mul(x).mod(n)).fromRed().mul(a.toRed(_).redPow(g.mul(x).mod(n)).fromRed()).mod(i).mod(n);return E.cmp(g)===0}function R6(t,e){if(t.cmpn(0)<=0)throw new Error("invalid sig");if(t.cmp(e)>=0)throw new Error("invalid sig")}P6.exports=Qw});var j6=q((GA,O6)=>{"use strict";var wo=H().Buffer,N6=qn(),xo=u2(),L6=F(),rx=I6(),ix=C6(),dn=H0();Object.keys(dn).forEach(function(t){dn[t].id=wo.from(dn[t].id,"hex"),dn[t.toLowerCase()]=dn[t]});function Ra(t){xo.Writable.call(this);var e=dn[t];if(!e)throw new Error("Unknown message digest");this._hashType=e.hash,this._hash=N6(e.hash),this._tag=e.id,this._signType=e.sign}L6(Ra,xo.Writable);Ra.prototype._write=function(e,r,i){this._hash.update(e),i()};Ra.prototype.update=function(e,r){return this._hash.update(typeof e=="string"?wo.from(e,r):e),this};Ra.prototype.sign=function(e,r){this.end();var i=this._hash.digest(),n=rx(i,e,this._hashType,this._signType,this._tag);return r?n.toString(r):n};function ka(t){xo.Writable.call(this);var e=dn[t];if(!e)throw new Error("Unknown message digest");this._hash=N6(e.hash),this._tag=e.id,this._signType=e.sign}L6(ka,xo.Writable);ka.prototype._write=function(e,r,i){this._hash.update(e),i()};ka.prototype.update=function(e,r){return this._hash.update(typeof e=="string"?wo.from(e,r):e),this};ka.prototype.verify=function(e,r,i){var n=typeof r=="string"?wo.from(r,i):r;this.end();var f=this._hash.digest();return ix(n,f,e,this._signType,this._tag)};function T6(t){return new Ra(t)}function D6(t){return new ka(t)}O6.exports={Sign:T6,Verify:D6,createSign:T6,createVerify:D6}});var F6=q((XA,nx)=>{nx.exports={name:"elliptic",version:"6.5.4",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny <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"}}});var qt=q(U6=>{"use strict";var hr=U6,fx=Pe(),ax=vt(),So=$s();hr.assert=ax;hr.toArray=So.toArray;hr.zero2=So.zero2;hr.toHex=So.toHex;hr.encode=So.encode;function sx(t,e,r){var i=new Array(Math.max(t.bitLength(),r)+1);i.fill(0);for(var n=1<<e+1,f=t.clone(),a=0;a<i.length;a++){var o,u=f.andln(n-1);f.isOdd()?(u>(n>>1)-1?o=(n>>1)-u:o=u,f.isubn(o)):o=0,i[a]=o,f.iushrn(1)}return i}hr.getNAF=sx;function ox(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var i=0,n=0,f;t.cmpn(-i)>0||e.cmpn(-n)>0;){var a=t.andln(3)+i&3,o=e.andln(3)+n&3;a===3&&(a=-1),o===3&&(o=-1);var u;(a&1)===0?u=0:(f=t.andln(7)+i&7,(f===3||f===5)&&o===2?u=-a:u=a),r[0].push(u);var g;(o&1)===0?g=0:(f=e.andln(7)+n&7,(f===3||f===5)&&a===2?g=-o:g=o),r[1].push(g),2*i===u+1&&(i=1-i),2*n===g+1&&(n=1-n),t.iushrn(1),e.iushrn(1)}return r}hr.getJSF=ox;function dx(t,e,r){var i="_"+e;t.prototype[e]=function(){return this[i]!==void 0?this[i]:this[i]=r.call(this)}}hr.cachedProperty=dx;function cx(t){return typeof t=="string"?hr.toArray(t,"hex"):t}hr.parseBytes=cx;function ux(t){return new fx(t,"hex","le")}hr.intFromLE=ux});var Ca=q((YA,z6)=>{"use strict";var cn=Pe(),Pa=qt(),Mo=Pa.getNAF,hx=Pa.getJSF,Eo=Pa.assert;function bi(t,e){this.type=t,this.p=new cn(e.p,16),this.red=e.prime?cn.red(e.prime):cn.mont(this.p),this.zero=new cn(0).toRed(this.red),this.one=new cn(1).toRed(this.red),this.two=new cn(2).toRed(this.red),this.n=e.n&&new cn(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}z6.exports=bi;bi.prototype.point=function(){throw new Error("Not implemented")};bi.prototype.validate=function(){throw new Error("Not implemented")};bi.prototype._fixedNafMul=function(e,r){Eo(e.precomputed);var i=e._getDoubles(),n=Mo(r,1,this._bitLength),f=(1<<i.step+1)-(i.step%2===0?2:1);f/=3;var a=[],o,u;for(o=0;o<n.length;o+=i.step){u=0;for(var g=o+i.step-1;g>=o;g--)u=(u<<1)+n[g];a.push(u)}for(var _=this.jpoint(null,null,null),x=this.jpoint(null,null,null),E=f;E>0;E--){for(o=0;o<a.length;o++)u=a[o],u===E?x=x.mixedAdd(i.points[o]):u===-E&&(x=x.mixedAdd(i.points[o].neg()));_=_.add(x)}return _.toP()};bi.prototype._wnafMul=function(e,r){var i=4,n=e._getNAFPoints(i);i=n.wnd;for(var f=n.points,a=Mo(r,i,this._bitLength),o=this.jpoint(null,null,null),u=a.length-1;u>=0;u--){for(var g=0;u>=0&&a[u]===0;u--)g++;if(u>=0&&g++,o=o.dblp(g),u<0)break;var _=a[u];Eo(_!==0),e.type==="affine"?_>0?o=o.mixedAdd(f[_-1>>1]):o=o.mixedAdd(f[-_-1>>1].neg()):_>0?o=o.add(f[_-1>>1]):o=o.add(f[-_-1>>1].neg())}return e.type==="affine"?o.toP():o};bi.prototype._wnafMulAdd=function(e,r,i,n,f){var a=this._wnafT1,o=this._wnafT2,u=this._wnafT3,g=0,_,x,E;for(_=0;_<n;_++){E=r[_];var B=E._getNAFPoints(e);a[_]=B.wnd,o[_]=B.points}for(_=n-1;_>=1;_-=2){var I=_-1,R=_;if(a[I]!==1||a[R]!==1){u[I]=Mo(i[I],a[I],this._bitLength),u[R]=Mo(i[R],a[R],this._bitLength),g=Math.max(u[I].length,g),g=Math.max(u[R].length,g);continue}var N=[r[I],null,null,r[R]];r[I].y.cmp(r[R].y)===0?(N[1]=r[I].add(r[R]),N[2]=r[I].toJ().mixedAdd(r[R].neg())):r[I].y.cmp(r[R].y.redNeg())===0?(N[1]=r[I].toJ().mixedAdd(r[R]),N[2]=r[I].add(r[R].neg())):(N[1]=r[I].toJ().mixedAdd(r[R]),N[2]=r[I].toJ().mixedAdd(r[R].neg()));var P=[-3,-1,-5,-7,0,7,5,1,3],L=hx(i[I],i[R]);for(g=Math.max(L[0].length,g),u[I]=new Array(g),u[R]=new Array(g),x=0;x<g;x++){var W=L[0][x]|0,Be=L[1][x]|0;u[I][x]=P[(W+1)*3+(Be+1)],u[R][x]=0,o[I]=N}}var qe=this.jpoint(null,null,null),Ie=this._wnafT4;for(_=g;_>=0;_--){for(var Ue=0;_>=0;){var Ee=!0;for(x=0;x<n;x++)Ie[x]=u[x][_]|0,Ie[x]!==0&&(Ee=!1);if(!Ee)break;Ue++,_--}if(_>=0&&Ue++,qe=qe.dblp(Ue),_<0)break;for(x=0;x<n;x++){var Ne=Ie[x];Ne!==0&&(Ne>0?E=o[x][Ne-1>>1]:Ne<0&&(E=o[x][-Ne-1>>1].neg()),E.type==="affine"?qe=qe.mixedAdd(E):qe=qe.add(E))}}for(_=0;_<n;_++)o[_]=null;return f?qe:qe.toP()};function Wt(t,e){this.curve=t,this.type=e,this.precomputed=null}bi.BasePoint=Wt;Wt.prototype.eq=function(){throw new Error("Not implemented")};Wt.prototype.validate=function(){return this.curve.validate(this)};bi.prototype.decodePoint=function(e,r){e=Pa.toArray(e,r);var i=this.p.byteLength();if((e[0]===4||e[0]===6||e[0]===7)&&e.length-1===2*i){e[0]===6?Eo(e[e.length-1]%2===0):e[0]===7&&Eo(e[e.length-1]%2===1);var n=this.point(e.slice(1,1+i),e.slice(1+i,1+2*i));return n}else if((e[0]===2||e[0]===3)&&e.length-1===i)return this.pointFromX(e.slice(1,1+i),e[0]===3);throw new Error("Unknown point format")};Wt.prototype.encodeCompressed=function(e){return this.encode(e,!0)};Wt.prototype._encode=function(e){var r=this.curve.p.byteLength(),i=this.getX().toArray("be",r);return e?[this.getY().isEven()?2:3].concat(i):[4].concat(i,this.getY().toArray("be",r))};Wt.prototype.encode=function(e,r){return Pa.encode(this._encode(r),e)};Wt.prototype.precompute=function(e){if(this.precomputed)return this;var r={doubles:null,naf:null,beta:null};return r.naf=this._getNAFPoints(8),r.doubles=this._getDoubles(4,e),r.beta=this._getBeta(),this.precomputed=r,this};Wt.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var r=this.precomputed.doubles;return r?r.points.length>=Math.ceil((e.bitLength()+1)/r.step):!1};Wt.prototype._getDoubles=function(e,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var i=[this],n=this,f=0;f<r;f+=e){for(var a=0;a<e;a++)n=n.dbl();i.push(n)}return{step:e,points:i}};Wt.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var r=[this],i=(1<<e)-1,n=i===1?null:this.dbl(),f=1;f<i;f++)r[f]=r[f-1].add(n);return{wnd:e,points:r}};Wt.prototype._getBeta=function(){return null};Wt.prototype.dblp=function(e){for(var r=this,i=0;i<e;i++)r=r.dbl();return r}});var H6=q((ZA,K6)=>{"use strict";var lx=qt(),Ve=Pe(),Nc=F(),of=Ca(),bx=lx.assert;function Vt(t){of.call(this,"short",t),this.a=new Ve(t.a,16).toRed(this.red),this.b=new Ve(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}Nc(Vt,of);K6.exports=Vt;Vt.prototype._getEndomorphism=function(e){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var r,i;if(e.beta)r=new Ve(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);r=n[0].cmp(n[1])<0?n[0]:n[1],r=r.toRed(this.red)}if(e.lambda)i=new Ve(e.lambda,16);else{var f=this._getEndoRoots(this.n);this.g.mul(f[0]).x.cmp(this.g.x.redMul(r))===0?i=f[0]:(i=f[1],bx(this.g.mul(i).x.cmp(this.g.x.redMul(r))===0))}var a;return e.basis?a=e.basis.map(function(o){return{a:new Ve(o.a,16),b:new Ve(o.b,16)}}):a=this._getEndoBasis(i),{beta:r,lambda:i,basis:a}}};Vt.prototype._getEndoRoots=function(e){var r=e===this.p?this.red:Ve.mont(e),i=new Ve(2).toRed(r).redInvm(),n=i.redNeg(),f=new Ve(3).toRed(r).redNeg().redSqrt().redMul(i),a=n.redAdd(f).fromRed(),o=n.redSub(f).fromRed();return[a,o]};Vt.prototype._getEndoBasis=function(e){for(var r=this.n.ushrn(Math.floor(this.n.bitLength()/2)),i=e,n=this.n.clone(),f=new Ve(1),a=new Ve(0),o=new Ve(0),u=new Ve(1),g,_,x,E,B,I,R,N=0,P,L;i.cmpn(0)!==0;){var W=n.div(i);P=n.sub(W.mul(i)),L=o.sub(W.mul(f));var Be=u.sub(W.mul(a));if(!x&&P.cmp(r)<0)g=R.neg(),_=f,x=P.neg(),E=L;else if(x&&++N===2)break;R=P,n=i,i=P,o=f,f=L,u=a,a=Be}B=P.neg(),I=L;var qe=x.sqr().add(E.sqr()),Ie=B.sqr().add(I.sqr());return Ie.cmp(qe)>=0&&(B=g,I=_),x.negative&&(x=x.neg(),E=E.neg()),B.negative&&(B=B.neg(),I=I.neg()),[{a:x,b:E},{a:B,b:I}]};Vt.prototype._endoSplit=function(e){var r=this.endo.basis,i=r[0],n=r[1],f=n.b.mul(e).divRound(this.n),a=i.b.neg().mul(e).divRound(this.n),o=f.mul(i.a),u=a.mul(n.a),g=f.mul(i.b),_=a.mul(n.b),x=e.sub(o).sub(u),E=g.add(_).neg();return{k1:x,k2:E}};Vt.prototype.pointFromX=function(e,r){e=new Ve(e,16),e.red||(e=e.toRed(this.red));var i=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=i.redSqrt();if(n.redSqr().redSub(i).cmp(this.zero)!==0)throw new Error("invalid point");var f=n.fromRed().isOdd();return(r&&!f||!r&&f)&&(n=n.redNeg()),this.point(e,n)};Vt.prototype.validate=function(e){if(e.inf)return!0;var r=e.x,i=e.y,n=this.a.redMul(r),f=r.redSqr().redMul(r).redIAdd(n).redIAdd(this.b);return i.redSqr().redISub(f).cmpn(0)===0};Vt.prototype._endoWnafMulAdd=function(e,r,i){for(var n=this._endoWnafT1,f=this._endoWnafT2,a=0;a<e.length;a++){var o=this._endoSplit(r[a]),u=e[a],g=u._getBeta();o.k1.negative&&(o.k1.ineg(),u=u.neg(!0)),o.k2.negative&&(o.k2.ineg(),g=g.neg(!0)),n[a*2]=u,n[a*2+1]=g,f[a*2]=o.k1,f[a*2+1]=o.k2}for(var _=this._wnafMulAdd(1,n,f,a*2,i),x=0;x<a*2;x++)n[x]=null,f[x]=null;return _};function tt(t,e,r,i){of.BasePoint.call(this,t,"affine"),e===null&&r===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new Ve(e,16),this.y=new Ve(r,16),i&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}Nc(tt,of.BasePoint);Vt.prototype.point=function(e,r,i){return new tt(this,e,r,i)};Vt.prototype.pointFromJSON=function(e,r){return tt.fromJSON(this,e,r)};tt.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var r=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var i=this.curve,n=function(f){return i.point(f.x.redMul(i.endo.beta),f.y)};e.beta=r,r.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(n)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(n)}}}return r}};tt.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]};tt.fromJSON=function(e,r,i){typeof r=="string"&&(r=JSON.parse(r));var n=e.point(r[0],r[1],i);if(!r[2])return n;function f(o){return e.point(o[0],o[1],i)}var a=r[2];return n.precomputed={beta:null,doubles:a.doubles&&{step:a.doubles.step,points:[n].concat(a.doubles.points.map(f))},naf:a.naf&&{wnd:a.naf.wnd,points:[n].concat(a.naf.points.map(f))}},n};tt.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"};tt.prototype.isInfinity=function(){return this.inf};tt.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var r=this.y.redSub(e.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(e.x).redInvm()));var i=r.redSqr().redISub(this.x).redISub(e.x),n=r.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,n)};tt.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var r=this.curve.a,i=this.x.redSqr(),n=e.redInvm(),f=i.redAdd(i).redIAdd(i).redIAdd(r).redMul(n),a=f.redSqr().redISub(this.x.redAdd(this.x)),o=f.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,o)};tt.prototype.getX=function(){return this.x.fromRed()};tt.prototype.getY=function(){return this.y.fromRed()};tt.prototype.mul=function(e){return e=new Ve(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};tt.prototype.mulAdd=function(e,r,i){var n=[this,r],f=[e,i];return this.curve.endo?this.curve._endoWnafMulAdd(n,f):this.curve._wnafMulAdd(1,n,f,2)};tt.prototype.jmulAdd=function(e,r,i){var n=[this,r],f=[e,i];return this.curve.endo?this.curve._endoWnafMulAdd(n,f,!0):this.curve._wnafMulAdd(1,n,f,2,!0)};tt.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};tt.prototype.neg=function(e){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var i=this.precomputed,n=function(f){return f.neg()};r.precomputed={naf:i.naf&&{wnd:i.naf.wnd,points:i.naf.points.map(n)},doubles:i.doubles&&{step:i.doubles.step,points:i.doubles.points.map(n)}}}return r};tt.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function st(t,e,r,i){of.BasePoint.call(this,t,"jacobian"),e===null&&r===null&&i===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new Ve(0)):(this.x=new Ve(e,16),this.y=new Ve(r,16),this.z=new Ve(i,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}Nc(st,of.BasePoint);Vt.prototype.jpoint=function(e,r,i){return new st(this,e,r,i)};st.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),r=e.redSqr(),i=this.x.redMul(r),n=this.y.redMul(r).redMul(e);return this.curve.point(i,n)};st.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};st.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var r=e.z.redSqr(),i=this.z.redSqr(),n=this.x.redMul(r),f=e.x.redMul(i),a=this.y.redMul(r.redMul(e.z)),o=e.y.redMul(i.redMul(this.z)),u=n.redSub(f),g=a.redSub(o);if(u.cmpn(0)===0)return g.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var _=u.redSqr(),x=_.redMul(u),E=n.redMul(_),B=g.redSqr().redIAdd(x).redISub(E).redISub(E),I=g.redMul(E.redISub(B)).redISub(a.redMul(x)),R=this.z.redMul(e.z).redMul(u);return this.curve.jpoint(B,I,R)};st.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var r=this.z.redSqr(),i=this.x,n=e.x.redMul(r),f=this.y,a=e.y.redMul(r).redMul(this.z),o=i.redSub(n),u=f.redSub(a);if(o.cmpn(0)===0)return u.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var g=o.redSqr(),_=g.redMul(o),x=i.redMul(g),E=u.redSqr().redIAdd(_).redISub(x).redISub(x),B=u.redMul(x.redISub(E)).redISub(f.redMul(_)),I=this.z.redMul(o);return this.curve.jpoint(E,B,I)};st.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var r;if(this.curve.zeroA||this.curve.threeA){var i=this;for(r=0;r<e;r++)i=i.dbl();return i}var n=this.curve.a,f=this.curve.tinv,a=this.x,o=this.y,u=this.z,g=u.redSqr().redSqr(),_=o.redAdd(o);for(r=0;r<e;r++){var x=a.redSqr(),E=_.redSqr(),B=E.redSqr(),I=x.redAdd(x).redIAdd(x).redIAdd(n.redMul(g)),R=a.redMul(E),N=I.redSqr().redISub(R.redAdd(R)),P=R.redISub(N),L=I.redMul(P);L=L.redIAdd(L).redISub(B);var W=_.redMul(u);r+1<e&&(g=g.redMul(B)),a=N,u=W,_=L}return this.curve.jpoint(a,_.redMul(f),u)};st.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()};st.prototype._zeroDbl=function(){var e,r,i;if(this.zOne){var n=this.x.redSqr(),f=this.y.redSqr(),a=f.redSqr(),o=this.x.redAdd(f).redSqr().redISub(n).redISub(a);o=o.redIAdd(o);var u=n.redAdd(n).redIAdd(n),g=u.redSqr().redISub(o).redISub(o),_=a.redIAdd(a);_=_.redIAdd(_),_=_.redIAdd(_),e=g,r=u.redMul(o.redISub(g)).redISub(_),i=this.y.redAdd(this.y)}else{var x=this.x.redSqr(),E=this.y.redSqr(),B=E.redSqr(),I=this.x.redAdd(E).redSqr().redISub(x).redISub(B);I=I.redIAdd(I);var R=x.redAdd(x).redIAdd(x),N=R.redSqr(),P=B.redIAdd(B);P=P.redIAdd(P),P=P.redIAdd(P),e=N.redISub(I).redISub(I),r=R.redMul(I.redISub(e)).redISub(P),i=this.y.redMul(this.z),i=i.redIAdd(i)}return this.curve.jpoint(e,r,i)};st.prototype._threeDbl=function(){var e,r,i;if(this.zOne){var n=this.x.redSqr(),f=this.y.redSqr(),a=f.redSqr(),o=this.x.redAdd(f).redSqr().redISub(n).redISub(a);o=o.redIAdd(o);var u=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),g=u.redSqr().redISub(o).redISub(o);e=g;var _=a.redIAdd(a);_=_.redIAdd(_),_=_.redIAdd(_),r=u.redMul(o.redISub(g)).redISub(_),i=this.y.redAdd(this.y)}else{var x=this.z.redSqr(),E=this.y.redSqr(),B=this.x.redMul(E),I=this.x.redSub(x).redMul(this.x.redAdd(x));I=I.redAdd(I).redIAdd(I);var R=B.redIAdd(B);R=R.redIAdd(R);var N=R.redAdd(R);e=I.redSqr().redISub(N),i=this.y.redAdd(this.z).redSqr().redISub(E).redISub(x);var P=E.redSqr();P=P.redIAdd(P),P=P.redIAdd(P),P=P.redIAdd(P),r=I.redMul(R.redISub(e)).redISub(P)}return this.curve.jpoint(e,r,i)};st.prototype._dbl=function(){var e=this.curve.a,r=this.x,i=this.y,n=this.z,f=n.redSqr().redSqr(),a=r.redSqr(),o=i.redSqr(),u=a.redAdd(a).redIAdd(a).redIAdd(e.redMul(f)),g=r.redAdd(r);g=g.redIAdd(g);var _=g.redMul(o),x=u.redSqr().redISub(_.redAdd(_)),E=_.redISub(x),B=o.redSqr();B=B.redIAdd(B),B=B.redIAdd(B),B=B.redIAdd(B);var I=u.redMul(E).redISub(B),R=i.redAdd(i).redMul(n);return this.curve.jpoint(x,I,R)};st.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),r=this.y.redSqr(),i=this.z.redSqr(),n=r.redSqr(),f=e.redAdd(e).redIAdd(e),a=f.redSqr(),o=this.x.redAdd(r).redSqr().redISub(e).redISub(n);o=o.redIAdd(o),o=o.redAdd(o).redIAdd(o),o=o.redISub(a);var u=o.redSqr(),g=n.redIAdd(n);g=g.redIAdd(g),g=g.redIAdd(g),g=g.redIAdd(g);var _=f.redIAdd(o).redSqr().redISub(a).redISub(u).redISub(g),x=r.redMul(_);x=x.redIAdd(x),x=x.redIAdd(x);var E=this.x.redMul(u).redISub(x);E=E.redIAdd(E),E=E.redIAdd(E);var B=this.y.redMul(_.redMul(g.redISub(_)).redISub(o.redMul(u)));B=B.redIAdd(B),B=B.redIAdd(B),B=B.redIAdd(B);var I=this.z.redAdd(o).redSqr().redISub(i).redISub(u);return this.curve.jpoint(E,B,I)};st.prototype.mul=function(e,r){return e=new Ve(e,r),this.curve._wnafMul(this,e)};st.prototype.eq=function(e){if(e.type==="affine")return this.eq(e.toJ());if(this===e)return!0;var r=this.z.redSqr(),i=e.z.redSqr();if(this.x.redMul(i).redISub(e.x.redMul(r)).cmpn(0)!==0)return!1;var n=r.redMul(this.z),f=i.redMul(e.z);return this.y.redMul(f).redISub(e.y.redMul(n)).cmpn(0)===0};st.prototype.eqXToP=function(e){var r=this.z.redSqr(),i=e.toRed(this.curve.red).redMul(r);if(this.x.cmp(i)===0)return!0;for(var n=e.clone(),f=this.curve.redN.redMul(r);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(i.redIAdd(f),this.x.cmp(i)===0)return!0}};st.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"};st.prototype.isInfinity=function(){return this.z.cmpn(0)===0}});var G6=q(($A,V6)=>{"use strict";var df=Pe(),W6=F(),Ao=Ca(),px=qt();function cf(t){Ao.call(this,"mont",t),this.a=new df(t.a,16).toRed(this.red),this.b=new df(t.b,16).toRed(this.red),this.i4=new df(4).toRed(this.red).redInvm(),this.two=new df(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}W6(cf,Ao);V6.exports=cf;cf.prototype.validate=function(e){var r=e.normalize().x,i=r.redSqr(),n=i.redMul(r).redAdd(i.redMul(this.a)).redAdd(r),f=n.redSqrt();return f.redSqr().cmp(n)===0};function rt(t,e,r){Ao.BasePoint.call(this,t,"projective"),e===null&&r===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new df(e,16),this.z=new df(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}W6(rt,Ao.BasePoint);cf.prototype.decodePoint=function(e,r){return this.point(px.toArray(e,r),1)};cf.prototype.point=function(e,r){return new rt(this,e,r)};cf.prototype.pointFromJSON=function(e){return rt.fromJSON(this,e)};rt.prototype.precompute=function(){};rt.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())};rt.fromJSON=function(e,r){return new rt(e,r[0],r[1]||e.one)};rt.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"};rt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};rt.prototype.dbl=function(){var e=this.x.redAdd(this.z),r=e.redSqr(),i=this.x.redSub(this.z),n=i.redSqr(),f=r.redSub(n),a=r.redMul(n),o=f.redMul(n.redAdd(this.curve.a24.redMul(f)));return this.curve.point(a,o)};rt.prototype.add=function(){throw new Error("Not supported on Montgomery curve")};rt.prototype.diffAdd=function(e,r){var i=this.x.redAdd(this.z),n=this.x.redSub(this.z),f=e.x.redAdd(e.z),a=e.x.redSub(e.z),o=a.redMul(i),u=f.redMul(n),g=r.z.redMul(o.redAdd(u).redSqr()),_=r.x.redMul(o.redISub(u).redSqr());return this.curve.point(g,_)};rt.prototype.mul=function(e){for(var r=e.clone(),i=this,n=this.curve.point(null,null),f=this,a=[];r.cmpn(0)!==0;r.iushrn(1))a.push(r.andln(1));for(var o=a.length-1;o>=0;o--)a[o]===0?(i=i.diffAdd(n,f),n=n.dbl()):(n=i.diffAdd(n,f),i=i.dbl());return n};rt.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")};rt.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")};rt.prototype.eq=function(e){return this.getX().cmp(e.getX())===0};rt.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this};rt.prototype.getX=function(){return this.normalize(),this.x.fromRed()}});var Y6=q((QA,J6)=>{"use strict";var vx=qt(),Zr=Pe(),X6=F(),Bo=Ca(),yx=vx.assert;function Pr(t){this.twisted=(t.a|0)!==1,this.mOneA=this.twisted&&(t.a|0)===-1,this.extended=this.mOneA,Bo.call(this,"edwards",t),this.a=new Zr(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new Zr(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new Zr(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),yx(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(t.c|0)===1}X6(Pr,Bo);J6.exports=Pr;Pr.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)};Pr.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)};Pr.prototype.jpoint=function(e,r,i,n){return this.point(e,r,i,n)};Pr.prototype.pointFromX=function(e,r){e=new Zr(e,16),e.red||(e=e.toRed(this.red));var i=e.redSqr(),n=this.c2.redSub(this.a.redMul(i)),f=this.one.redSub(this.c2.redMul(this.d).redMul(i)),a=n.redMul(f.redInvm()),o=a.redSqrt();if(o.redSqr().redSub(a).cmp(this.zero)!==0)throw new Error("invalid point");var u=o.fromRed().isOdd();return(r&&!u||!r&&u)&&(o=o.redNeg()),this.point(e,o)};Pr.prototype.pointFromY=function(e,r){e=new Zr(e,16),e.red||(e=e.toRed(this.red));var i=e.redSqr(),n=i.redSub(this.c2),f=i.redMul(this.d).redMul(this.c2).redSub(this.a),a=n.redMul(f.redInvm());if(a.cmp(this.zero)===0){if(r)throw new Error("invalid point");return this.point(this.zero,e)}var o=a.redSqrt();if(o.redSqr().redSub(a).cmp(this.zero)!==0)throw new Error("invalid point");return o.fromRed().isOdd()!==r&&(o=o.redNeg()),this.point(o,e)};Pr.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var r=e.x.redSqr(),i=e.y.redSqr(),n=r.redMul(this.a).redAdd(i),f=this.c2.redMul(this.one.redAdd(this.d.redMul(r).redMul(i)));return n.cmp(f)===0};function je(t,e,r,i,n){Bo.BasePoint.call(this,t,"projective"),e===null&&r===null&&i===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new Zr(e,16),this.y=new Zr(r,16),this.z=i?new Zr(i,16):this.curve.one,this.t=n&&new Zr(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}X6(je,Bo.BasePoint);Pr.prototype.pointFromJSON=function(e){return je.fromJSON(this,e)};Pr.prototype.point=function(e,r,i,n){return new je(this,e,r,i,n)};je.fromJSON=function(e,r){return new je(e,r[0],r[1],r[2])};je.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"};je.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)};je.prototype._extDbl=function(){var e=this.x.redSqr(),r=this.y.redSqr(),i=this.z.redSqr();i=i.redIAdd(i);var n=this.curve._mulA(e),f=this.x.redAdd(this.y).redSqr().redISub(e).redISub(r),a=n.redAdd(r),o=a.redSub(i),u=n.redSub(r),g=f.redMul(o),_=a.redMul(u),x=f.redMul(u),E=o.redMul(a);return this.curve.point(g,_,E,x)};je.prototype._projDbl=function(){var e=this.x.redAdd(this.y).redSqr(),r=this.x.redSqr(),i=this.y.redSqr(),n,f,a,o,u,g;if(this.curve.twisted){o=this.curve._mulA(r);var _=o.redAdd(i);this.zOne?(n=e.redSub(r).redSub(i).redMul(_.redSub(this.curve.two)),f=_.redMul(o.redSub(i)),a=_.redSqr().redSub(_).redSub(_)):(u=this.z.redSqr(),g=_.redSub(u).redISub(u),n=e.redSub(r).redISub(i).redMul(g),f=_.redMul(o.redSub(i)),a=_.redMul(g))}else o=r.redAdd(i),u=this.curve._mulC(this.z).redSqr(),g=o.redSub(u).redSub(u),n=this.curve._mulC(e.redISub(o)).redMul(g),f=this.curve._mulC(o).redMul(r.redISub(i)),a=o.redMul(g);return this.curve.point(n,f,a)};je.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()};je.prototype._extAdd=function(e){var r=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),i=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),f=this.z.redMul(e.z.redAdd(e.z)),a=i.redSub(r),o=f.redSub(n),u=f.redAdd(n),g=i.redAdd(r),_=a.redMul(o),x=u.redMul(g),E=a.redMul(g),B=o.redMul(u);return this.curve.point(_,x,B,E)};je.prototype._projAdd=function(e){var r=this.z.redMul(e.z),i=r.redSqr(),n=this.x.redMul(e.x),f=this.y.redMul(e.y),a=this.curve.d.redMul(n).redMul(f),o=i.redSub(a),u=i.redAdd(a),g=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(n).redISub(f),_=r.redMul(o).redMul(g),x,E;return this.curve.twisted?(x=r.redMul(u).redMul(f.redSub(this.curve._mulA(n))),E=o.redMul(u)):(x=r.redMul(u).redMul(f.redSub(n)),E=this.curve._mulC(o).redMul(u)),this.curve.point(_,x,E)};je.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)};je.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)};je.prototype.mulAdd=function(e,r,i){return this.curve._wnafMulAdd(1,[this,r],[e,i],2,!1)};je.prototype.jmulAdd=function(e,r,i){return this.curve._wnafMulAdd(1,[this,r],[e,i],2,!0)};je.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this};je.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())};je.prototype.getX=function(){return this.normalize(),this.x.fromRed()};je.prototype.getY=function(){return this.normalize(),this.y.fromRed()};je.prototype.eq=function(e){return this===e||this.getX().cmp(e.getX())===0&&this.getY().cmp(e.getY())===0};je.prototype.eqXToP=function(e){var r=e.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(r)===0)return!0;for(var i=e.clone(),n=this.curve.redN.redMul(this.z);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(n),this.x.cmp(r)===0)return!0}};je.prototype.toP=je.prototype.normalize;je.prototype.mixedAdd=je.prototype.add});var Lc=q(Z6=>{"use strict";var qo=Z6;qo.base=Ca();qo.short=H6();qo.mont=G6();qo.edwards=Y6()});var Q6=q((tB,$6)=>{$6.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"]]}}});var Io=q(rv=>{"use strict";var jc=rv,pi=Qn(),Oc=Lc(),gx=qt(),ev=gx.assert;function tv(t){t.type==="short"?this.curve=new Oc.short(t):t.type==="edwards"?this.curve=new Oc.edwards(t):this.curve=new Oc.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,ev(this.g.validate(),"Invalid curve"),ev(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}jc.PresetCurve=tv;function vi(t,e){Object.defineProperty(jc,t,{configurable:!0,enumerable:!0,get:function(){var r=new tv(e);return Object.defineProperty(jc,t,{configurable:!0,enumerable:!0,value:r}),r}})}vi("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:pi.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]});vi("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:pi.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]});vi("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:pi.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]});vi("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:pi.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"]});vi("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:pi.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"]});vi("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:pi.sha256,gRed:!1,g:["9"]});vi("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:pi.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var Fc;try{Fc=Q6()}catch(t){Fc=void 0}vi("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:pi.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",Fc]})});var nv=q((iB,iv)=>{"use strict";var mx=Pe(),_x=qt(),Uc=_x.assert;function pt(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}iv.exports=pt;pt.fromPublic=function(e,r,i){return r instanceof pt?r:new pt(e,{pub:r,pubEnc:i})};pt.fromPrivate=function(e,r,i){return r instanceof pt?r:new pt(e,{priv:r,privEnc:i})};pt.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}};pt.prototype.getPublic=function(e,r){return typeof e=="string"&&(r=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),r?this.pub.encode(r,e):this.pub};pt.prototype.getPrivate=function(e){return e==="hex"?this.priv.toString(16,2):this.priv};pt.prototype._importPrivate=function(e,r){this.priv=new mx(e,r||16),this.priv=this.priv.umod(this.ec.curve.n)};pt.prototype._importPublic=function(e,r){if(e.x||e.y){this.ec.curve.type==="mont"?Uc(e.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&Uc(e.x&&e.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(e.x,e.y);return}this.pub=this.ec.curve.decodePoint(e,r)};pt.prototype.derive=function(e){return e.validate()||Uc(e.validate(),"public point not validated"),e.mul(this.priv).getX()};pt.prototype.sign=function(e,r,i){return this.ec.sign(e,this,r,i)};pt.prototype.verify=function(e,r){return this.ec.verify(e,r,this)};pt.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}});var sv=q((nB,av)=>{"use strict";var Ro=Pe(),Hc=qt(),wx=Hc.assert;function ko(t,e){if(t instanceof ko)return t;this._importDER(t,e)||(wx(t.r&&t.s,"Signature without r or s"),this.r=new Ro(t.r,16),this.s=new Ro(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}av.exports=ko;function xx(){this.place=0}function zc(t,e){var r=t[e.place++];if(!(r&128))return r;var i=r&15;if(i===0||i>4)return!1;for(var n=0,f=0,a=e.place;f<i;f++,a++)n<<=8,n|=t[a],n>>>=0;return n<=127?!1:(e.place=a,n)}function fv(t){for(var e=0,r=t.length-1;!t[e]&&!(t[e+1]&128)&&e<r;)e++;return e===0?t:t.slice(e)}ko.prototype._importDER=function(e,r){e=Hc.toArray(e,r);var i=new xx;if(e[i.place++]!==48)return!1;var n=zc(e,i);if(n===!1||n+i.place!==e.length||e[i.place++]!==2)return!1;var f=zc(e,i);if(f===!1)return!1;var a=e.slice(i.place,f+i.place);if(i.place+=f,e[i.place++]!==2)return!1;var o=zc(e,i);if(o===!1||e.length!==o+i.place)return!1;var u=e.slice(i.place,o+i.place);if(a[0]===0)if(a[1]&128)a=a.slice(1);else return!1;if(u[0]===0)if(u[1]&128)u=u.slice(1);else return!1;return this.r=new Ro(a),this.s=new Ro(u),this.recoveryParam=null,!0};function Kc(t,e){if(e<128){t.push(e);return}var r=1+(Math.log(e)/Math.LN2>>>3);for(t.push(r|128);--r;)t.push(e>>>(r<<3)&255);t.push(e)}ko.prototype.toDER=function(e){var r=this.r.toArray(),i=this.s.toArray();for(r[0]&128&&(r=[0].concat(r)),i[0]&128&&(i=[0].concat(i)),r=fv(r),i=fv(i);!i[0]&&!(i[1]&128);)i=i.slice(1);var n=[2];Kc(n,r.length),n=n.concat(r),n.push(2),Kc(n,i.length);var f=n.concat(i),a=[48];return Kc(a,f.length),a=a.concat(f),Hc.encode(a,e)}});var uv=q((fB,cv)=>{"use strict";var un=Pe(),ov=cc(),Sx=qt(),Wc=Io(),Mx=Nn(),dv=Sx.assert,Vc=nv(),Po=sv();function Gt(t){if(!(this instanceof Gt))return new Gt(t);typeof t=="string"&&(dv(Object.prototype.hasOwnProperty.call(Wc,t),"Unknown curve "+t),t=Wc[t]),t instanceof Wc.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}cv.exports=Gt;Gt.prototype.keyPair=function(e){return new Vc(this,e)};Gt.prototype.keyFromPrivate=function(e,r){return Vc.fromPrivate(this,e,r)};Gt.prototype.keyFromPublic=function(e,r){return Vc.fromPublic(this,e,r)};Gt.prototype.genKeyPair=function(e){e||(e={});for(var r=new ov({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||Mx(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),i=this.n.byteLength(),n=this.n.sub(new un(2));;){var f=new un(r.generate(i));if(!(f.cmp(n)>0))return f.iaddn(1),this.keyFromPrivate(f)}};Gt.prototype._truncateToN=function(e,r){var i=e.byteLength()*8-this.n.bitLength();return i>0&&(e=e.ushrn(i)),!r&&e.cmp(this.n)>=0?e.sub(this.n):e};Gt.prototype.sign=function(e,r,i,n){typeof i=="object"&&(n=i,i=null),n||(n={}),r=this.keyFromPrivate(r,i),e=this._truncateToN(new un(e,16));for(var f=this.n.byteLength(),a=r.getPrivate().toArray("be",f),o=e.toArray("be",f),u=new ov({hash:this.hash,entropy:a,nonce:o,pers:n.pers,persEnc:n.persEnc||"utf8"}),g=this.n.sub(new un(1)),_=0;;_++){var x=n.k?n.k(_):new un(u.generate(this.n.byteLength()));if(x=this._truncateToN(x,!0),!(x.cmpn(1)<=0||x.cmp(g)>=0)){var E=this.g.mul(x);if(!E.isInfinity()){var B=E.getX(),I=B.umod(this.n);if(I.cmpn(0)!==0){var R=x.invm(this.n).mul(I.mul(r.getPrivate()).iadd(e));if(R=R.umod(this.n),R.cmpn(0)!==0){var N=(E.getY().isOdd()?1:0)|(B.cmp(I)!==0?2:0);return n.canonical&&R.cmp(this.nh)>0&&(R=this.n.sub(R),N^=1),new Po({r:I,s:R,recoveryParam:N})}}}}}};Gt.prototype.verify=function(e,r,i,n){e=this._truncateToN(new un(e,16)),i=this.keyFromPublic(i,n),r=new Po(r,"hex");var f=r.r,a=r.s;if(f.cmpn(1)<0||f.cmp(this.n)>=0||a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var o=a.invm(this.n),u=o.mul(e).umod(this.n),g=o.mul(f).umod(this.n),_;return this.curve._maxwellTrick?(_=this.g.jmulAdd(u,i.getPublic(),g),_.isInfinity()?!1:_.eqXToP(f)):(_=this.g.mulAdd(u,i.getPublic(),g),_.isInfinity()?!1:_.getX().umod(this.n).cmp(f)===0)};Gt.prototype.recoverPubKey=function(t,e,r,i){dv((3&r)===r,"The recovery param is more than two bits"),e=new Po(e,i);var n=this.n,f=new un(t),a=e.r,o=e.s,u=r&1,g=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&g)throw new Error("Unable to find sencond key candinate");g?a=this.curve.pointFromX(a.add(this.curve.n),u):a=this.curve.pointFromX(a,u);var _=e.r.invm(n),x=n.sub(f).mul(_).umod(n),E=o.mul(_).umod(n);return this.g.mulAdd(x,a,E)};Gt.prototype.getKeyRecoveryParam=function(t,e,r,i){if(e=new Po(e,i),e.recoveryParam!==null)return e.recoveryParam;for(var n=0;n<4;n++){var f;try{f=this.recoverPubKey(t,e,n)}catch(a){continue}if(f.eq(r))return n}throw new Error("Unable to find valid recovery factor")}});var pv=q((aB,bv)=>{"use strict";var Ta=qt(),lv=Ta.assert,hv=Ta.parseBytes,uf=Ta.cachedProperty;function it(t,e){this.eddsa=t,this._secret=hv(e.secret),t.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=hv(e.pub)}it.fromPublic=function(e,r){return r instanceof it?r:new it(e,{pub:r})};it.fromSecret=function(e,r){return r instanceof it?r:new it(e,{secret:r})};it.prototype.secret=function(){return this._secret};uf(it,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())});uf(it,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())});uf(it,"privBytes",function(){var e=this.eddsa,r=this.hash(),i=e.encodingLength-1,n=r.slice(0,e.encodingLength);return n[0]&=248,n[i]&=127,n[i]|=64,n});uf(it,"priv",function(){return this.eddsa.decodeInt(this.privBytes())});uf(it,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()});uf(it,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)});it.prototype.sign=function(e){return lv(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)};it.prototype.verify=function(e,r){return this.eddsa.verify(e,r,this)};it.prototype.getSecret=function(e){return lv(this._secret,"KeyPair is public only"),Ta.encode(this.secret(),e)};it.prototype.getPublic=function(e){return Ta.encode(this.pubBytes(),e)};bv.exports=it});var yv=q((sB,vv)=>{"use strict";var Ex=Pe(),Co=qt(),Ax=Co.assert,To=Co.cachedProperty,Bx=Co.parseBytes;function hn(t,e){this.eddsa=t,typeof e!="object"&&(e=Bx(e)),Array.isArray(e)&&(e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),Ax(e.R&&e.S,"Signature without R or S"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof Ex&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}To(hn,"S",function(){return this.eddsa.decodeInt(this.Sencoded())});To(hn,"R",function(){return this.eddsa.decodePoint(this.Rencoded())});To(hn,"Rencoded",function(){return this.eddsa.encodePoint(this.R())});To(hn,"Sencoded",function(){return this.eddsa.encodeInt(this.S())});hn.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())};hn.prototype.toHex=function(){return Co.encode(this.toBytes(),"hex").toUpperCase()};vv.exports=hn});var xv=q((oB,wv)=>{"use strict";var qx=Qn(),Ix=Io(),hf=qt(),Rx=hf.assert,mv=hf.parseBytes,_v=pv(),gv=yv();function Mt(t){if(Rx(t==="ed25519","only tested with ed25519 so far"),!(this instanceof Mt))return new Mt(t);t=Ix[t].curve,this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=qx.sha512}wv.exports=Mt;Mt.prototype.sign=function(e,r){e=mv(e);var i=this.keyFromSecret(r),n=this.hashInt(i.messagePrefix(),e),f=this.g.mul(n),a=this.encodePoint(f),o=this.hashInt(a,i.pubBytes(),e).mul(i.priv()),u=n.add(o).umod(this.curve.n);return this.makeSignature({R:f,S:u,Rencoded:a})};Mt.prototype.verify=function(e,r,i){e=mv(e),r=this.makeSignature(r);var n=this.keyFromPublic(i),f=this.hashInt(r.Rencoded(),n.pubBytes(),e),a=this.g.mul(r.S()),o=r.R().add(n.pub().mul(f));return o.eq(a)};Mt.prototype.hashInt=function(){for(var e=this.hash(),r=0;r<arguments.length;r++)e.update(arguments[r]);return hf.intFromLE(e.digest()).umod(this.curve.n)};Mt.prototype.keyFromPublic=function(e){return _v.fromPublic(this,e)};Mt.prototype.keyFromSecret=function(e){return _v.fromSecret(this,e)};Mt.prototype.makeSignature=function(e){return e instanceof gv?e:new gv(this,e)};Mt.prototype.encodePoint=function(e){var r=e.getY().toArray("le",this.encodingLength);return r[this.encodingLength-1]|=e.getX().isOdd()?128:0,r};Mt.prototype.decodePoint=function(e){e=hf.parseBytes(e);var r=e.length-1,i=e.slice(0,r).concat(e[r]&-129),n=(e[r]&128)!==0,f=hf.intFromLE(i);return this.curve.pointFromY(f,n)};Mt.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)};Mt.prototype.decodeInt=function(e){return hf.intFromLE(e)};Mt.prototype.isPoint=function(e){return e instanceof this.pointClass}});var Mv=q(Sv=>{"use strict";var ln=Sv;ln.version=F6().version;ln.utils=qt();ln.rand=Nn();ln.curve=Lc();ln.curves=Io();ln.ec=uv();ln.eddsa=xv()});var Av=q((cB,Ev)=>{var kx=Mv(),Px=Pe();Ev.exports=function(e){return new bn(e)};var It={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}};It.p224=It.secp224r1;It.p256=It.secp256r1=It.prime256v1;It.p192=It.secp192r1=It.prime192v1;It.p384=It.secp384r1;It.p521=It.secp521r1;function bn(t){this.curveType=It[t],this.curveType||(this.curveType={name:t}),this.curve=new kx.ec(this.curveType.name),this.keys=void 0}bn.prototype.generateKeys=function(t,e){return this.keys=this.curve.genKeyPair(),this.getPublicKey(t,e)};bn.prototype.computeSecret=function(t,e,r){e=e||"utf8",Buffer.isBuffer(t)||(t=new Buffer(t,e));var i=this.curve.keyFromPublic(t).getPublic(),n=i.mul(this.keys.getPrivate()).getX();return Gc(n,r,this.curveType.byteLength)};bn.prototype.getPublicKey=function(t,e){var r=this.keys.getPublic(e==="compressed",!0);return e==="hybrid"&&(r[r.length-1]%2?r[0]=7:r[0]=6),Gc(r,t)};bn.prototype.getPrivateKey=function(t){return Gc(this.keys.getPrivate(),t)};bn.prototype.setPublicKey=function(t,e){return e=e||"utf8",Buffer.isBuffer(t)||(t=new Buffer(t,e)),this.keys._importPublic(t),this};bn.prototype.setPrivateKey=function(t,e){e=e||"utf8",Buffer.isBuffer(t)||(t=new Buffer(t,e));var r=new Px(t);return r=r.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(r),this};function Gc(t,e,r){Array.isArray(t)||(t=t.toArray());var i=new Buffer(t);if(r&&i.length<r){var n=new Buffer(r-i.length);n.fill(0),i=Buffer.concat([n,i])}return e?i.toString(e):i}});var No=q((uB,Bv)=>{"use strict";var Do=Pt(),lf=Do.Buffer,Xt={},Jt;for(Jt in Do)Do.hasOwnProperty(Jt)&&(Jt==="SlowBuffer"||Jt==="Buffer"||(Xt[Jt]=Do[Jt]));var bf=Xt.Buffer={};for(Jt in lf)lf.hasOwnProperty(Jt)&&(Jt==="allocUnsafe"||Jt==="allocUnsafeSlow"||(bf[Jt]=lf[Jt]));Xt.Buffer.prototype=lf.prototype;(!bf.from||bf.from===Uint8Array.from)&&(bf.from=function(t,e,r){if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type '+typeof t);if(t&&typeof t.length>"u")throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);return lf(t,e,r)});bf.alloc||(bf.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError('The "size" argument must be of type number. Received type '+typeof t);if(t<0||t>=2*(1<<30))throw new RangeError('The value "'+t+'" is invalid for option "size"');var i=lf(t);return!e||e.length===0?i.fill(0):typeof r=="string"?i.fill(e,r):i.fill(e),i});if(!Xt.kStringMaxLength)try{Xt.kStringMaxLength=process.binding("buffer").kStringMaxLength}catch(t){}Xt.constants||(Xt.constants={MAX_LENGTH:Xt.kMaxLength},Xt.kStringMaxLength&&(Xt.constants.MAX_STRING_LENGTH=Xt.kStringMaxLength));Bv.exports=Xt});var Lo=q(qv=>{"use strict";var Cx=F();function Yt(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}qv.Reporter=Yt;Yt.prototype.isError=function(e){return e instanceof pf};Yt.prototype.save=function(){let e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}};Yt.prototype.restore=function(e){let r=this._reporterState;r.obj=e.obj,r.path=r.path.slice(0,e.pathLen)};Yt.prototype.enterKey=function(e){return this._reporterState.path.push(e)};Yt.prototype.exitKey=function(e){let r=this._reporterState;r.path=r.path.slice(0,e-1)};Yt.prototype.leaveKey=function(e,r,i){let n=this._reporterState;this.exitKey(e),n.obj!==null&&(n.obj[r]=i)};Yt.prototype.path=function(){return this._reporterState.path.join("/")};Yt.prototype.enterObject=function(){let e=this._reporterState,r=e.obj;return e.obj={},r};Yt.prototype.leaveObject=function(e){let r=this._reporterState,i=r.obj;return r.obj=e,i};Yt.prototype.error=function(e){let r,i=this._reporterState,n=e instanceof pf;if(n?r=e:r=new pf(i.path.map(function(f){return"["+JSON.stringify(f)+"]"}).join(""),e.message||e,e.stack),!i.options.partial)throw r;return n||i.errors.push(r),r};Yt.prototype.wrapResult=function(e){let r=this._reporterState;return r.options.partial?{result:this.isError(e)?null:e,errors:r.errors}:e};function pf(t,e){this.path=t,this.rethrow(e)}Cx(pf,Error);pf.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,pf),!this.stack)try{throw new Error(this.message)}catch(r){this.stack=r.stack}return this}});var gf=q(Xc=>{"use strict";var Tx=F(),Oo=Lo().Reporter,vf=No().Buffer;function Zt(t,e){if(Oo.call(this,e),!vf.isBuffer(t)){this.error("Input not Buffer");return}this.base=t,this.offset=0,this.length=t.length}Tx(Zt,Oo);Xc.DecoderBuffer=Zt;Zt.isDecoderBuffer=function(e){return e instanceof Zt?!0:typeof e=="object"&&vf.isBuffer(e.base)&&e.constructor.name==="DecoderBuffer"&&typeof e.offset=="number"&&typeof e.length=="number"&&typeof e.save=="function"&&typeof e.restore=="function"&&typeof e.isEmpty=="function"&&typeof e.readUInt8=="function"&&typeof e.skip=="function"&&typeof e.raw=="function"};Zt.prototype.save=function(){return{offset:this.offset,reporter:Oo.prototype.save.call(this)}};Zt.prototype.restore=function(e){let r=new Zt(this.base);return r.offset=e.offset,r.length=this.offset,this.offset=e.offset,Oo.prototype.restore.call(this,e.reporter),r};Zt.prototype.isEmpty=function(){return this.offset===this.length};Zt.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")};Zt.prototype.skip=function(e,r){if(!(this.offset+e<=this.length))return this.error(r||"DecoderBuffer overrun");let i=new Zt(this.base);return i._reporterState=this._reporterState,i.offset=this.offset,i.length=this.offset+e,this.offset+=e,i};Zt.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)};function yf(t,e){if(Array.isArray(t))this.length=0,this.value=t.map(function(r){return yf.isEncoderBuffer(r)||(r=new yf(r,e)),this.length+=r.length,r},this);else if(typeof t=="number"){if(!(0<=t&&t<=255))return e.error("non-byte EncoderBuffer value");this.value=t,this.length=1}else if(typeof t=="string")this.value=t,this.length=vf.byteLength(t);else if(vf.isBuffer(t))this.value=t,this.length=t.length;else return e.error("Unsupported type: "+typeof t)}Xc.EncoderBuffer=yf;yf.isEncoderBuffer=function(e){return e instanceof yf?!0:typeof e=="object"&&e.constructor.name==="EncoderBuffer"&&typeof e.length=="number"&&typeof e.join=="function"};yf.prototype.join=function(e,r){return e||(e=vf.alloc(this.length)),r||(r=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(i){i.join(e,r),r+=i.length}):(typeof this.value=="number"?e[r]=this.value:typeof this.value=="string"?e.write(this.value,r):vf.isBuffer(this.value)&&this.value.copy(e,r),r+=this.length)),e}});var jo=q((bB,Rv)=>{"use strict";var Dx=Lo().Reporter,Nx=gf().EncoderBuffer,Lx=gf().DecoderBuffer,gt=vt(),Iv=["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"],Ox=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(Iv),jx=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function De(t,e,r){let i={};this._baseState=i,i.name=r,i.enc=t,i.parent=e||null,i.children=null,i.tag=null,i.args=null,i.reverseArgs=null,i.choice=null,i.optional=!1,i.any=!1,i.obj=!1,i.use=null,i.useDecoder=null,i.key=null,i.default=null,i.explicit=null,i.implicit=null,i.contains=null,i.parent||(i.children=[],this._wrap())}Rv.exports=De;var Fx=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];De.prototype.clone=function(){let e=this._baseState,r={};Fx.forEach(function(n){r[n]=e[n]});let i=new this.constructor(r.parent);return i._baseState=r,i};De.prototype._wrap=function(){let e=this._baseState;Ox.forEach(function(r){this[r]=function(){let n=new this.constructor(this);return e.children.push(n),n[r].apply(n,arguments)}},this)};De.prototype._init=function(e){let r=this._baseState;gt(r.parent===null),e.call(this),r.children=r.children.filter(function(i){return i._baseState.parent===this},this),gt.equal(r.children.length,1,"Root node can have only one child")};De.prototype._useArgs=function(e){let r=this._baseState,i=e.filter(function(n){return n instanceof this.constructor},this);e=e.filter(function(n){return!(n instanceof this.constructor)},this),i.length!==0&&(gt(r.children===null),r.children=i,i.forEach(function(n){n._baseState.parent=this},this)),e.length!==0&&(gt(r.args===null),r.args=e,r.reverseArgs=e.map(function(n){if(typeof n!="object"||n.constructor!==Object)return n;let f={};return Object.keys(n).forEach(function(a){a==(a|0)&&(a|=0);let o=n[a];f[o]=a}),f}))};jx.forEach(function(t){De.prototype[t]=function(){let r=this._baseState;throw new Error(t+" not implemented for encoding: "+r.enc)}});Iv.forEach(function(t){De.prototype[t]=function(){let r=this._baseState,i=Array.prototype.slice.call(arguments);return gt(r.tag===null),r.tag=t,this._useArgs(i),this}});De.prototype.use=function(e){gt(e);let r=this._baseState;return gt(r.use===null),r.use=e,this};De.prototype.optional=function(){let e=this._baseState;return e.optional=!0,this};De.prototype.def=function(e){let r=this._baseState;return gt(r.default===null),r.default=e,r.optional=!0,this};De.prototype.explicit=function(e){let r=this._baseState;return gt(r.explicit===null&&r.implicit===null),r.explicit=e,this};De.prototype.implicit=function(e){let r=this._baseState;return gt(r.explicit===null&&r.implicit===null),r.implicit=e,this};De.prototype.obj=function(){let e=this._baseState,r=Array.prototype.slice.call(arguments);return e.obj=!0,r.length!==0&&this._useArgs(r),this};De.prototype.key=function(e){let r=this._baseState;return gt(r.key===null),r.key=e,this};De.prototype.any=function(){let e=this._baseState;return e.any=!0,this};De.prototype.choice=function(e){let r=this._baseState;return gt(r.choice===null),r.choice=e,this._useArgs(Object.keys(e).map(function(i){return e[i]})),this};De.prototype.contains=function(e){let r=this._baseState;return gt(r.use===null),r.contains=e,this};De.prototype._decode=function(e,r){let i=this._baseState;if(i.parent===null)return e.wrapResult(i.children[0]._decode(e,r));let n=i.default,f=!0,a=null;if(i.key!==null&&(a=e.enterKey(i.key)),i.optional){let u=null;if(i.explicit!==null?u=i.explicit:i.implicit!==null?u=i.implicit:i.tag!==null&&(u=i.tag),u===null&&!i.any){let g=e.save();try{i.choice===null?this._decodeGeneric(i.tag,e,r):this._decodeChoice(e,r),f=!0}catch(_){f=!1}e.restore(g)}else if(f=this._peekTag(e,u,i.any),e.isError(f))return f}let o;if(i.obj&&f&&(o=e.enterObject()),f){if(i.explicit!==null){let g=this._decodeTag(e,i.explicit);if(e.isError(g))return g;e=g}let u=e.offset;if(i.use===null&&i.choice===null){let g;i.any&&(g=e.save());let _=this._decodeTag(e,i.implicit!==null?i.implicit:i.tag,i.any);if(e.isError(_))return _;i.any?n=e.raw(g):e=_}if(r&&r.track&&i.tag!==null&&r.track(e.path(),u,e.length,"tagged"),r&&r.track&&i.tag!==null&&r.track(e.path(),e.offset,e.length,"content"),i.any||(i.choice===null?n=this._decodeGeneric(i.tag,e,r):n=this._decodeChoice(e,r)),e.isError(n))return n;if(!i.any&&i.choice===null&&i.children!==null&&i.children.forEach(function(_){_._decode(e,r)}),i.contains&&(i.tag==="octstr"||i.tag==="bitstr")){let g=new Lx(n);n=this._getUse(i.contains,e._reporterState.obj)._decode(g,r)}}return i.obj&&f&&(n=e.leaveObject(o)),i.key!==null&&(n!==null||f===!0)?e.leaveKey(a,i.key,n):a!==null&&e.exitKey(a),n};De.prototype._decodeGeneric=function(e,r,i){let n=this._baseState;return e==="seq"||e==="set"?null:e==="seqof"||e==="setof"?this._decodeList(r,e,n.args[0],i):/str$/.test(e)?this._decodeStr(r,e,i):e==="objid"&&n.args?this._decodeObjid(r,n.args[0],n.args[1],i):e==="objid"?this._decodeObjid(r,null,null,i):e==="gentime"||e==="utctime"?this._decodeTime(r,e,i):e==="null_"?this._decodeNull(r,i):e==="bool"?this._decodeBool(r,i):e==="objDesc"?this._decodeStr(r,e,i):e==="int"||e==="enum"?this._decodeInt(r,n.args&&n.args[0],i):n.use!==null?this._getUse(n.use,r._reporterState.obj)._decode(r,i):r.error("unknown tag: "+e)};De.prototype._getUse=function(e,r){let i=this._baseState;return i.useDecoder=this._use(e,r),gt(i.useDecoder._baseState.parent===null),i.useDecoder=i.useDecoder._baseState.children[0],i.implicit!==i.useDecoder._baseState.implicit&&(i.useDecoder=i.useDecoder.clone(),i.useDecoder._baseState.implicit=i.implicit),i.useDecoder};De.prototype._decodeChoice=function(e,r){let i=this._baseState,n=null,f=!1;return Object.keys(i.choice).some(function(a){let o=e.save(),u=i.choice[a];try{let g=u._decode(e,r);if(e.isError(g))return!1;n={type:a,value:g},f=!0}catch(g){return e.restore(o),!1}return!0},this),f?n:e.error("Choice not matched")};De.prototype._createEncoderBuffer=function(e){return new Nx(e,this.reporter)};De.prototype._encode=function(e,r,i){let n=this._baseState;if(n.default!==null&&n.default===e)return;let f=this._encodeValue(e,r,i);if(f!==void 0&&!this._skipDefault(f,r,i))return f};De.prototype._encodeValue=function(e,r,i){let n=this._baseState;if(n.parent===null)return n.children[0]._encode(e,r||new Dx);let f=null;if(this.reporter=r,n.optional&&e===void 0)if(n.default!==null)e=n.default;else return;let a=null,o=!1;if(n.any)f=this._createEncoderBuffer(e);else if(n.choice)f=this._encodeChoice(e,r);else if(n.contains)a=this._getUse(n.contains,i)._encode(e,r),o=!0;else if(n.children)a=n.children.map(function(u){if(u._baseState.tag==="null_")return u._encode(null,r,e);if(u._baseState.key===null)return r.error("Child should have a key");let g=r.enterKey(u._baseState.key);if(typeof e!="object")return r.error("Child expected, but input is not object");let _=u._encode(e[u._baseState.key],r,e);return r.leaveKey(g),_},this).filter(function(u){return u}),a=this._createEncoderBuffer(a);else if(n.tag==="seqof"||n.tag==="setof"){if(!(n.args&&n.args.length===1))return r.error("Too many args for : "+n.tag);if(!Array.isArray(e))return r.error("seqof/setof, but data is not Array");let u=this.clone();u._baseState.implicit=null,a=this._createEncoderBuffer(e.map(function(g){let _=this._baseState;return this._getUse(_.args[0],e)._encode(g,r)},u))}else n.use!==null?f=this._getUse(n.use,i)._encode(e,r):(a=this._encodePrimitive(n.tag,e),o=!0);if(!n.any&&n.choice===null){let u=n.implicit!==null?n.implicit:n.tag,g=n.implicit===null?"universal":"context";u===null?n.use===null&&r.error("Tag could be omitted only for .use()"):n.use===null&&(f=this._encodeComposite(u,o,g,a))}return n.explicit!==null&&(f=this._encodeComposite(n.explicit,!1,"context",f)),f};De.prototype._encodeChoice=function(e,r){let i=this._baseState,n=i.choice[e.type];return n||gt(!1,e.type+" not found in "+JSON.stringify(Object.keys(i.choice))),n._encode(e.value,r)};De.prototype._encodePrimitive=function(e,r){let i=this._baseState;if(/str$/.test(e))return this._encodeStr(r,e);if(e==="objid"&&i.args)return this._encodeObjid(r,i.reverseArgs[0],i.args[1]);if(e==="objid")return this._encodeObjid(r,null,null);if(e==="gentime"||e==="utctime")return this._encodeTime(r,e);if(e==="null_")return this._encodeNull();if(e==="int"||e==="enum")return this._encodeInt(r,i.args&&i.reverseArgs[0]);if(e==="bool")return this._encodeBool(r);if(e==="objDesc")return this._encodeStr(r,e);throw new Error("Unsupported tag: "+e)};De.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)};De.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)}});var Fo=q(pn=>{"use strict";function kv(t){let e={};return Object.keys(t).forEach(function(r){(r|0)==r&&(r=r|0);let i=t[r];e[i]=r}),e}pn.tagClass={0:"universal",1:"application",2:"context",3:"private"};pn.tagClassByName=kv(pn.tagClass);pn.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"};pn.tagByName=kv(pn.tag)});var Yc=q((vB,Tv)=>{"use strict";var Ux=F(),$r=No().Buffer,Pv=jo(),Jc=Fo();function Cv(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new lr,this.tree._init(t.body)}Tv.exports=Cv;Cv.prototype.encode=function(e,r){return this.tree._encode(e,r).join()};function lr(t){Pv.call(this,"der",t)}Ux(lr,Pv);lr.prototype._encodeComposite=function(e,r,i,n){let f=zx(e,r,i,this.reporter);if(n.length<128){let u=$r.alloc(2);return u[0]=f,u[1]=n.length,this._createEncoderBuffer([u,n])}let a=1;for(let u=n.length;u>=256;u>>=8)a++;let o=$r.alloc(2+a);o[0]=f,o[1]=128|a;for(let u=1+a,g=n.length;g>0;u--,g>>=8)o[u]=g&255;return this._createEncoderBuffer([o,n])};lr.prototype._encodeStr=function(e,r){if(r==="bitstr")return this._createEncoderBuffer([e.unused|0,e.data]);if(r==="bmpstr"){let i=$r.alloc(e.length*2);for(let n=0;n<e.length;n++)i.writeUInt16BE(e.charCodeAt(n),n*2);return this._createEncoderBuffer(i)}else return r==="numstr"?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):r==="printstr"?this._isPrintstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(r)?this._createEncoderBuffer(e):r==="objDesc"?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+r+" unsupported")};lr.prototype._encodeObjid=function(e,r,i){if(typeof e=="string"){if(!r)return this.reporter.error("string objid given, but no values map found");if(!r.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=r[e].split(/[\s.]+/g);for(let o=0;o<e.length;o++)e[o]|=0}else if(Array.isArray(e)){e=e.slice();for(let o=0;o<e.length;o++)e[o]|=0}if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!i){if(e[1]>=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,e[0]*40+e[1])}let n=0;for(let o=0;o<e.length;o++){let u=e[o];for(n++;u>=128;u>>=7)n++}let f=$r.alloc(n),a=f.length-1;for(let o=e.length-1;o>=0;o--){let u=e[o];for(f[a--]=u&127;(u>>=7)>0;)f[a--]=128|u&127}return this._createEncoderBuffer(f)};function $t(t){return t<10?"0"+t:t}lr.prototype._encodeTime=function(e,r){let i,n=new Date(e);return r==="gentime"?i=[$t(n.getUTCFullYear()),$t(n.getUTCMonth()+1),$t(n.getUTCDate()),$t(n.getUTCHours()),$t(n.getUTCMinutes()),$t(n.getUTCSeconds()),"Z"].join(""):r==="utctime"?i=[$t(n.getUTCFullYear()%100),$t(n.getUTCMonth()+1),$t(n.getUTCDate()),$t(n.getUTCHours()),$t(n.getUTCMinutes()),$t(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+r+" time is not supported yet"),this._encodeStr(i,"octstr")};lr.prototype._encodeNull=function(){return this._createEncoderBuffer("")};lr.prototype._encodeInt=function(e,r){if(typeof e=="string"){if(!r)return this.reporter.error("String int or enum given, but no values map");if(!r.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=r[e]}if(typeof e!="number"&&!$r.isBuffer(e)){let f=e.toArray();!e.sign&&f[0]&128&&f.unshift(0),e=$r.from(f)}if($r.isBuffer(e)){let f=e.length;e.length===0&&f++;let a=$r.alloc(f);return e.copy(a),e.length===0&&(a[0]=0),this._createEncoderBuffer(a)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);let i=1;for(let f=e;f>=256;f>>=8)i++;let n=new Array(i);for(let f=n.length-1;f>=0;f--)n[f]=e&255,e>>=8;return n[0]&128&&n.unshift(0),this._createEncoderBuffer($r.from(n))};lr.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)};lr.prototype._use=function(e,r){return typeof e=="function"&&(e=e(r)),e._getEncoder("der").tree};lr.prototype._skipDefault=function(e,r,i){let n=this._baseState,f;if(n.default===null)return!1;let a=e.join();if(n.defaultBuffer===void 0&&(n.defaultBuffer=this._encodeValue(n.default,r,i).join()),a.length!==n.defaultBuffer.length)return!1;for(f=0;f<a.length;f++)if(a[f]!==n.defaultBuffer[f])return!1;return!0};function zx(t,e,r,i){let n;if(t==="seqof"?t="seq":t==="setof"&&(t="set"),Jc.tagByName.hasOwnProperty(t))n=Jc.tagByName[t];else if(typeof t=="number"&&(t|0)===t)n=t;else return i.error("Unknown tag: "+t);return n>=31?i.error("Multi-octet tag encoding unsupported"):(e||(n|=32),n|=Jc.tagClassByName[r||"universal"]<<6,n)}});var Nv=q((yB,Dv)=>{"use strict";var Kx=F(),Zc=Yc();function $c(t){Zc.call(this,t),this.enc="pem"}Kx($c,Zc);Dv.exports=$c;$c.prototype.encode=function(e,r){let n=Zc.prototype.encode.call(this,e).toString("base64"),f=["-----BEGIN "+r.label+"-----"];for(let a=0;a<n.length;a+=64)f.push(n.slice(a,a+64));return f.push("-----END "+r.label+"-----"),f.join("\n")}});var Qc=q(Ov=>{"use strict";var Lv=Ov;Lv.der=Yc();Lv.pem=Nv()});var tu=q((mB,Hv)=>{"use strict";var Hx=F(),Wx=Pe(),jv=gf().DecoderBuffer,Uv=jo(),Fv=Fo();function zv(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new Rt,this.tree._init(t.body)}Hv.exports=zv;zv.prototype.decode=function(e,r){return jv.isDecoderBuffer(e)||(e=new jv(e,r)),this.tree._decode(e,r)};function Rt(t){Uv.call(this,"der",t)}Hx(Rt,Uv);Rt.prototype._peekTag=function(e,r,i){if(e.isEmpty())return!1;let n=e.save(),f=eu(e,'Failed to peek tag: "'+r+'"');return e.isError(f)?f:(e.restore(n),f.tag===r||f.tagStr===r||f.tagStr+"of"===r||i)};Rt.prototype._decodeTag=function(e,r,i){let n=eu(e,'Failed to decode tag of "'+r+'"');if(e.isError(n))return n;let f=Kv(e,n.primitive,'Failed to get length of "'+r+'"');if(e.isError(f))return f;if(!i&&n.tag!==r&&n.tagStr!==r&&n.tagStr+"of"!==r)return e.error('Failed to match tag: "'+r+'"');if(n.primitive||f!==null)return e.skip(f,'Failed to match body of: "'+r+'"');let a=e.save(),o=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(o)?o:(f=e.offset-a.offset,e.restore(a),e.skip(f,'Failed to match body of: "'+r+'"'))};Rt.prototype._skipUntilEnd=function(e,r){for(;;){let i=eu(e,r);if(e.isError(i))return i;let n=Kv(e,i.primitive,r);if(e.isError(n))return n;let f;if(i.primitive||n!==null?f=e.skip(n):f=this._skipUntilEnd(e,r),e.isError(f))return f;if(i.tagStr==="end")break}};Rt.prototype._decodeList=function(e,r,i,n){let f=[];for(;!e.isEmpty();){let a=this._peekTag(e,"end");if(e.isError(a))return a;let o=i.decode(e,"der",n);if(e.isError(o)&&a)break;f.push(o)}return f};Rt.prototype._decodeStr=function(e,r){if(r==="bitstr"){let i=e.readUInt8();return e.isError(i)?i:{unused:i,data:e.raw()}}else if(r==="bmpstr"){let i=e.raw();if(i.length%2===1)return e.error("Decoding of string type: bmpstr length mismatch");let n="";for(let f=0;f<i.length/2;f++)n+=String.fromCharCode(i.readUInt16BE(f*2));return n}else if(r==="numstr"){let i=e.raw().toString("ascii");return this._isNumstr(i)?i:e.error("Decoding of string type: numstr unsupported characters")}else{if(r==="octstr")return e.raw();if(r==="objDesc")return e.raw();if(r==="printstr"){let i=e.raw().toString("ascii");return this._isPrintstr(i)?i:e.error("Decoding of string type: printstr unsupported characters")}else return/str$/.test(r)?e.raw().toString():e.error("Decoding of string type: "+r+" unsupported")}};Rt.prototype._decodeObjid=function(e,r,i){let n,f=[],a=0,o=0;for(;!e.isEmpty();)o=e.readUInt8(),a<<=7,a|=o&127,(o&128)===0&&(f.push(a),a=0);o&128&&f.push(a);let u=f[0]/40|0,g=f[0]%40;if(i?n=f:n=[u,g].concat(f.slice(1)),r){let _=r[n.join(" ")];_===void 0&&(_=r[n.join(".")]),_!==void 0&&(n=_)}return n};Rt.prototype._decodeTime=function(e,r){let i=e.raw().toString(),n,f,a,o,u,g;if(r==="gentime")n=i.slice(0,4)|0,f=i.slice(4,6)|0,a=i.slice(6,8)|0,o=i.slice(8,10)|0,u=i.slice(10,12)|0,g=i.slice(12,14)|0;else if(r==="utctime")n=i.slice(0,2)|0,f=i.slice(2,4)|0,a=i.slice(4,6)|0,o=i.slice(6,8)|0,u=i.slice(8,10)|0,g=i.slice(10,12)|0,n<70?n=2e3+n:n=1900+n;else return e.error("Decoding "+r+" time is not supported yet");return Date.UTC(n,f-1,a,o,u,g,0)};Rt.prototype._decodeNull=function(){return null};Rt.prototype._decodeBool=function(e){let r=e.readUInt8();return e.isError(r)?r:r!==0};Rt.prototype._decodeInt=function(e,r){let i=e.raw(),n=new Wx(i);return r&&(n=r[n.toString(10)]||n),n};Rt.prototype._use=function(e,r){return typeof e=="function"&&(e=e(r)),e._getDecoder("der").tree};function eu(t,e){let r=t.readUInt8(e);if(t.isError(r))return r;let i=Fv.tagClass[r>>6],n=(r&32)===0;if((r&31)===31){let a=r;for(r=0;(a&128)===128;){if(a=t.readUInt8(e),t.isError(a))return a;r<<=7,r|=a&127}}else r&=31;let f=Fv.tag[r];return{cls:i,primitive:n,tag:r,tagStr:f}}function Kv(t,e,r){let i=t.readUInt8(r);if(t.isError(i))return i;if(!e&&i===128)return null;if((i&128)===0)return i;let n=i&127;if(n>4)return t.error("length octect is too long");i=0;for(let f=0;f<n;f++){i<<=8;let a=t.readUInt8(r);if(t.isError(a))return a;i|=a}return i}});var Vv=q((_B,Wv)=>{"use strict";var Vx=F(),Gx=No().Buffer,ru=tu();function iu(t){ru.call(this,t),this.enc="pem"}Vx(iu,ru);Wv.exports=iu;iu.prototype.decode=function(e,r){let i=e.toString().split(/[\r\n]+/g),n=r.label.toUpperCase(),f=/^-----(BEGIN|END) ([^-]+)-----$/,a=-1,o=-1;for(let _=0;_<i.length;_++){let x=i[_].match(f);if(x!==null&&x[2]===n)if(a===-1){if(x[1]!=="BEGIN")break;a=_}else{if(x[1]!=="END")break;o=_;break}}if(a===-1||o===-1)throw new Error("PEM section not found for: "+n);let u=i.slice(a+1,o).join("");u.replace(/[^a-z0-9+/=]+/gi,"");let g=Gx.from(u,"base64");return ru.prototype.decode.call(this,g,r)}});var nu=q(Xv=>{"use strict";var Gv=Xv;Gv.der=tu();Gv.pem=Vv()});var Yv=q(Jv=>{"use strict";var Xx=Qc(),Jx=nu(),Yx=F(),Zx=Jv;Zx.define=function(e,r){return new mf(e,r)};function mf(t,e){this.name=t,this.body=e,this.decoders={},this.encoders={}}mf.prototype._createNamed=function(e){let r=this.name;function i(n){this._initNamed(n,r)}return Yx(i,e),i.prototype._initNamed=function(f,a){e.call(this,f,a)},new i(this)};mf.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(Jx[e])),this.decoders[e]};mf.prototype.decode=function(e,r,i){return this._getDecoder(r).decode(e,i)};mf.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(Xx[e])),this.encoders[e]};mf.prototype.encode=function(e,r,i){return this._getEncoder(r).encode(e,i)}});var $v=q(Zv=>{"use strict";var Uo=Zv;Uo.Reporter=Lo().Reporter;Uo.DecoderBuffer=gf().DecoderBuffer;Uo.EncoderBuffer=gf().EncoderBuffer;Uo.Node=jo()});var t3=q(e3=>{"use strict";var Qv=e3;Qv._reverse=function(e){let r={};return Object.keys(e).forEach(function(i){(i|0)==i&&(i=i|0);let n=e[i];r[n]=i}),r};Qv.der=Fo()});var fu=q(r3=>{"use strict";var _f=r3;_f.bignum=Pe();_f.define=Yv().define;_f.base=$v();_f.constants=t3();_f.decoders=nu();_f.encoders=Qc()});var a3=q((AB,f3)=>{"use strict";var br=fu(),i3=br.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),$x=br.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),au=br.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),Qx=br.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(au),this.key("subjectPublicKey").bitstr())}),eS=br.define("RelativeDistinguishedName",function(){this.setof($x)}),tS=br.define("RDNSequence",function(){this.seqof(eS)}),n3=br.define("Name",function(){this.choice({rdnSequence:this.use(tS)})}),rS=br.define("Validity",function(){this.seq().obj(this.key("notBefore").use(i3),this.key("notAfter").use(i3))}),iS=br.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),nS=br.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(au),this.key("issuer").use(n3),this.key("validity").use(rS),this.key("subject").use(n3),this.key("subjectPublicKeyInfo").use(Qx),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(iS).optional())}),fS=br.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(nS),this.key("signatureAlgorithm").use(au),this.key("signatureValue").bitstr())});f3.exports=fS});var o3=q(vr=>{"use strict";var pr=fu();vr.certificate=a3();var aS=pr.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});vr.RSAPrivateKey=aS;var sS=pr.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});vr.RSAPublicKey=sS;var oS=pr.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(s3),this.key("subjectPublicKey").bitstr())});vr.PublicKey=oS;var s3=pr.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),dS=pr.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s3),this.key("subjectPrivateKey").octstr())});vr.PrivateKey=dS;var cS=pr.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});vr.EncryptedPrivateKey=cS;var uS=pr.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});vr.DSAPrivateKey=uS;vr.DSAparam=pr.define("DSAparam",function(){this.int()});var hS=pr.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(lS),this.key("publicKey").optional().explicit(1).bitstr())});vr.ECPrivateKey=hS;var lS=pr.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});vr.signature=pr.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})});var d3=q((qB,bS)=>{bS.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"}});var u3=q((IB,c3)=>{var pS=/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,vS=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,yS=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,gS=Cn(),mS=Dn(),zo=H().Buffer;c3.exports=function(t,e){var r=t.toString(),i=r.match(pS),n;if(i){var a="aes"+i[1],o=zo.from(i[2],"hex"),u=zo.from(i[3].replace(/[\r\n]/g,""),"base64"),g=gS(e,o.slice(0,8),parseInt(i[1],10)).key,_=[],x=mS.createDecipheriv(a,g,o);_.push(x.update(u)),_.push(x.final()),n=zo.concat(_)}else{var f=r.match(yS);n=zo.from(f[2].replace(/[\r\n]/g,""),"base64")}var E=r.match(vS)[1];return{tag:E,data:n}}});var ou=q((RB,l3)=>{var Et=o3(),_S=d3(),wS=u3(),xS=Dn(),SS=Es(),su=H().Buffer;l3.exports=h3;function h3(t){var e;typeof t=="object"&&!su.isBuffer(t)&&(e=t.passphrase,t=t.key),typeof t=="string"&&(t=su.from(t));var r=wS(t,e),i=r.tag,n=r.data,f,a;switch(i){case"CERTIFICATE":a=Et.certificate.decode(n,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(a||(a=Et.PublicKey.decode(n,"der")),f=a.algorithm.algorithm.join("."),f){case"1.2.840.113549.1.1.1":return Et.RSAPublicKey.decode(a.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return a.subjectPrivateKey=a.subjectPublicKey,{type:"ec",data:a};case"1.2.840.10040.4.1":return a.algorithm.params.pub_key=Et.DSAparam.decode(a.subjectPublicKey.data,"der"),{type:"dsa",data:a.algorithm.params};default:throw new Error("unknown key id "+f)}case"ENCRYPTED PRIVATE KEY":n=Et.EncryptedPrivateKey.decode(n,"der"),n=MS(n,e);case"PRIVATE KEY":switch(a=Et.PrivateKey.decode(n,"der"),f=a.algorithm.algorithm.join("."),f){case"1.2.840.113549.1.1.1":return Et.RSAPrivateKey.decode(a.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:a.algorithm.curve,privateKey:Et.ECPrivateKey.decode(a.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return a.algorithm.params.priv_key=Et.DSAparam.decode(a.subjectPrivateKey,"der"),{type:"dsa",params:a.algorithm.params};default:throw new Error("unknown key id "+f)}case"RSA PUBLIC KEY":return Et.RSAPublicKey.decode(n,"der");case"RSA PRIVATE KEY":return Et.RSAPrivateKey.decode(n,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:Et.DSAPrivateKey.decode(n,"der")};case"EC PRIVATE KEY":return n=Et.ECPrivateKey.decode(n,"der"),{curve:n.parameters.value,privateKey:n.privateKey};default:throw new Error("unknown key type "+i)}}h3.signature=Et.signature;function MS(t,e){var r=t.algorithm.decrypt.kde.kdeparams.salt,i=parseInt(t.algorithm.decrypt.kde.kdeparams.iters.toString(),10),n=_S[t.algorithm.decrypt.cipher.algo.join(".")],f=t.algorithm.decrypt.cipher.iv,a=t.subjectPrivateKey,o=parseInt(n.split("-")[1],10)/8,u=SS.pbkdf2Sync(e,r,i,o,"sha1"),g=xS.createDecipheriv(n,u,f),_=[];return _.push(g.update(a)),_.push(g.final()),su.concat(_)}});var cu=q((kB,b3)=>{var ES=qn(),du=H().Buffer;b3.exports=function(t,e){for(var r=du.alloc(0),i=0,n;r.length<e;)n=AS(i++),r=du.concat([r,ES("sha1").update(t).update(n).digest()]);return r.slice(0,e)};function AS(t){var e=du.allocUnsafe(4);return e.writeUInt32BE(t,0),e}});var uu=q((PB,p3)=>{p3.exports=function(e,r){for(var i=e.length,n=-1;++n<i;)e[n]^=r[n];return e}});var hu=q((CB,y3)=>{var v3=Pe(),BS=H().Buffer;function qS(t,e){return BS.from(t.toRed(v3.mont(e.modulus)).redPow(new v3(e.publicExponent)).fromRed().toArray())}y3.exports=qS});var w3=q((TB,_3)=>{var IS=ou(),lu=Ni(),RS=qn(),g3=cu(),m3=uu(),bu=Pe(),kS=hu(),PS=Ys(),yr=H().Buffer;_3.exports=function(e,r,i){var n;e.padding?n=e.padding:i?n=1:n=4;var f=IS(e),a;if(n===4)a=CS(f,r);else if(n===1)a=TS(f,r,i);else if(n===3){if(a=new bu(r),a.cmp(f.modulus)>=0)throw new Error("data too long for modulus")}else throw new Error("unknown padding");return i?PS(a,f):kS(a,f)};function CS(t,e){var r=t.modulus.byteLength(),i=e.length,n=RS("sha1").update(yr.alloc(0)).digest(),f=n.length,a=2*f;if(i>r-a-2)throw new Error("message too long");var o=yr.alloc(r-i-a-2),u=r-f-1,g=lu(f),_=m3(yr.concat([n,o,yr.alloc(1,1),e],u),g3(g,u)),x=m3(g,g3(_,f));return new bu(yr.concat([yr.alloc(1),x,_],r))}function TS(t,e,r){var i=e.length,n=t.modulus.byteLength();if(i>n-11)throw new Error("message too long");var f;return r?f=yr.alloc(n-i-3,255):f=DS(n-i-3),new bu(yr.concat([yr.from([0,r?1:2]),f,yr.alloc(1),e],n))}function DS(t){for(var e=yr.allocUnsafe(t),r=0,i=lu(t*2),n=0,f;r<t;)n===i.length&&(i=lu(t*2),n=0),f=i[n++],f&&(e[r++]=f);return e}});var A3=q((DB,E3)=>{var NS=ou(),x3=cu(),S3=uu(),M3=Pe(),LS=Ys(),OS=qn(),jS=hu(),Da=H().Buffer;E3.exports=function(e,r,i){var n;e.padding?n=e.padding:i?n=1:n=4;var f=NS(e),a=f.modulus.byteLength();if(r.length>a||new M3(r).cmp(f.modulus)>=0)throw new Error("decryption error");var o;i?o=jS(new M3(r),f):o=LS(r,f);var u=Da.alloc(a-o.length);if(o=Da.concat([u,o],a),n===4)return FS(f,o);if(n===1)return US(f,o,i);if(n===3)return o;throw new Error("unknown padding")};function FS(t,e){var r=t.modulus.byteLength(),i=OS("sha1").update(Da.alloc(0)).digest(),n=i.length;if(e[0]!==0)throw new Error("decryption error");var f=e.slice(1,n+1),a=e.slice(n+1),o=S3(f,x3(a,n)),u=S3(a,x3(o,r-n-1));if(zS(i,u.slice(0,n)))throw new Error("decryption error");for(var g=n;u[g]===0;)g++;if(u[g++]!==1)throw new Error("decryption error");return u.slice(g)}function US(t,e,r){for(var i=e.slice(0,2),n=2,f=0;e[n++]!==0;)if(n>=e.length){f++;break}var a=e.slice(2,n-1);if((i.toString("hex")!=="0002"&&!r||i.toString("hex")!=="0001"&&r)&&f++,a.length<8&&f++,f)throw new Error("decryption error");return e.slice(n)}function zS(t,e){t=Da.from(t),e=Da.from(e);var r=0,i=t.length;t.length!==e.length&&(r++,i=Math.min(t.length,e.length));for(var n=-1;++n<i;)r+=t[n]^e[n];return r}});var B3=q(vn=>{vn.publicEncrypt=w3();vn.privateDecrypt=A3();vn.privateEncrypt=function(e,r){return vn.publicEncrypt(e,r,!0)};vn.publicDecrypt=function(e,r){return vn.privateDecrypt(e,r,!0)}});var L3=q(Na=>{"use strict";function q3(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var R3=H(),I3=Ni(),k3=R3.Buffer,P3=R3.kMaxLength,pu=global.crypto||global.msCrypto,C3=Math.pow(2,32)-1;function T3(t,e){if(typeof t!="number"||t!==t)throw new TypeError("offset must be a number");if(t>C3||t<0)throw new TypeError("offset must be a uint32");if(t>P3||t>e)throw new RangeError("offset out of range")}function D3(t,e,r){if(typeof t!="number"||t!==t)throw new TypeError("size must be a number");if(t>C3||t<0)throw new TypeError("size must be a uint32");if(t+e>r||t>P3)throw new RangeError("buffer too small")}pu&&pu.getRandomValues||!process.browser?(Na.randomFill=KS,Na.randomFillSync=HS):(Na.randomFill=q3,Na.randomFillSync=q3);function KS(t,e,r,i){if(!k3.isBuffer(t)&&!(t instanceof global.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof e=="function")i=e,e=0,r=t.length;else if(typeof r=="function")i=r,r=t.length-e;else if(typeof i!="function")throw new TypeError('"cb" argument must be a function');return T3(e,t.length),D3(r,e,t.length),N3(t,e,r,i)}function N3(t,e,r,i){if(process.browser){var n=t.buffer,f=new Uint8Array(n,e,r);if(pu.getRandomValues(f),i){process.nextTick(function(){i(null,t)});return}return t}if(i){I3(r,function(o,u){if(o)return i(o);u.copy(t,e),i(null,t)});return}var a=I3(r);return a.copy(t,e),t}function HS(t,e,r){if(typeof e>"u"&&(e=0),!k3.isBuffer(t)&&!(t instanceof global.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return T3(e,t.length),r===void 0&&(r=t.length-e),D3(r,e,t.length),N3(t,e,r)}});var vu=q(Me=>{"use strict";Me.randomBytes=Me.rng=Me.pseudoRandomBytes=Me.prng=Ni();Me.createHash=Me.Hash=qn();Me.createHmac=Me.Hmac=K0();var WS=Fl(),VS=Object.keys(WS),GS=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(VS);Me.getHashes=function(){return GS};var O3=Es();Me.pbkdf2=O3.pbkdf2;Me.pbkdf2Sync=O3.pbkdf2Sync;var Cr=ob();Me.Cipher=Cr.Cipher;Me.createCipher=Cr.createCipher;Me.Cipheriv=Cr.Cipheriv;Me.createCipheriv=Cr.createCipheriv;Me.Decipher=Cr.Decipher;Me.createDecipher=Cr.createDecipher;Me.Decipheriv=Cr.Decipheriv;Me.createDecipheriv=Cr.createDecipheriv;Me.getCiphers=Cr.getCiphers;Me.listCiphers=Cr.listCiphers;var La=xb();Me.DiffieHellmanGroup=La.DiffieHellmanGroup;Me.createDiffieHellmanGroup=La.createDiffieHellmanGroup;Me.getDiffieHellman=La.getDiffieHellman;Me.createDiffieHellman=La.createDiffieHellman;Me.DiffieHellman=La.DiffieHellman;var Ko=j6();Me.createSign=Ko.createSign;Me.Sign=Ko.Sign;Me.createVerify=Ko.createVerify;Me.Verify=Ko.Verify;Me.createECDH=Av();var Ho=B3();Me.publicEncrypt=Ho.publicEncrypt;Me.privateEncrypt=Ho.privateEncrypt;Me.publicDecrypt=Ho.publicDecrypt;Me.privateDecrypt=Ho.privateDecrypt;var j3=L3();Me.randomFill=j3.randomFill;Me.randomFillSync=j3.randomFillSync;Me.createCredentials=function(){throw new Error("sorry, createCredentials is not implemented yet\nwe accept pull requests\nhttps://github.com/browserify/crypto-browserify")};Me.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}});var wf={};V3(wf,{default:()=>XS});module.exports=G3(wf);var F3=yu(vu());Of(wf,yu(vu()),module.exports);var XS=F3.default;
|
|
2
|
+
/*! Bundled license information:
|
|
3
|
+
|
|
4
|
+
ieee754/index.js:
|
|
5
|
+
(*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
6
|
+
|
|
7
|
+
buffer/index.js:
|
|
8
|
+
(*!
|
|
9
|
+
* The buffer module from node.js, for the browser.
|
|
10
|
+
*
|
|
11
|
+
* @author Feross Aboukhadijeh <https://feross.org>
|
|
12
|
+
* @license MIT
|
|
13
|
+
*)
|
|
14
|
+
|
|
15
|
+
safe-buffer/index.js:
|
|
16
|
+
(*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
17
|
+
*/
|