@smartledger/bsv 7.7.0 → 7.7.1
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/CHANGELOG.md +19 -0
- package/README.md +38 -38
- package/bsv-anchor.min.js +1 -1
- package/bsv-didweb.min.js +1 -1
- package/bsv-gdaf.min.js +2 -2
- package/bsv-ltp.min.js +2 -2
- package/bsv-mnemonic.min.js +1 -1
- package/bsv-shamir.min.js +1 -1
- package/bsv-smartcontract.min.js +2 -2
- package/bsv-statuslist.min.js +25 -25
- package/bsv-vcjwt.min.js +1 -1
- package/bsv.bundle.js +2 -2
- package/bsv.min.js +2 -2
- package/docs/MODULE_REFERENCE_COMPLETE.md +27 -27
- package/docs/advanced/UTXO_MANAGER_GUIDE.md +1 -1
- package/docs/getting-started/INSTALLATION.md +23 -23
- package/docs/getting-started/QUICK_START.md +7 -7
- package/docs/migration/FROM_BSV_1_5_6.md +5 -5
- package/package.json +1 -1
- package/version.js +1 -1
package/bsv-ltp.min.js
CHANGED
|
@@ -8,13 +8,13 @@ Use Chrome, Firefox or Internet Explorer 11`)}var BU=ot().Buffer,id=globalThis.c
|
|
|
8
8
|
`))):s=e.stylize("[Circular]","special")),Eu(a)){if(o&&n.match(/^\d+$/))return s;a=JSON.stringify(""+n),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.slice(1,-1),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function lj(e,t,r){var i=0,n=e.reduce(function(o,a){return i++,a.indexOf(`
|
|
9
9
|
`)>=0&&i++,o+a.replace(/\u001b\[\d\d?m/g,"").length+1},0);return n>60?r[0]+(t===""?"":t+`
|
|
10
10
|
`)+" "+e.join(`,
|
|
11
|
-
`)+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}dt.types=r_();function s_(e){return Array.isArray(e)}dt.isArray=s_;function Rg(e){return typeof e=="boolean"}dt.isBoolean=Rg;function Dd(e){return e===null}dt.isNull=Dd;function hj(e){return e==null}dt.isNullOrUndefined=hj;function u_(e){return typeof e=="number"}dt.isNumber=u_;function Ld(e){return typeof e=="string"}dt.isString=Ld;function dj(e){return typeof e=="symbol"}dt.isSymbol=dj;function Eu(e){return e===void 0}dt.isUndefined=Eu;function ph(e){return uc(e)&&Bg(e)==="[object RegExp]"}dt.isRegExp=ph;dt.types.isRegExp=ph;function uc(e){return typeof e=="object"&&e!==null}dt.isObject=uc;function Nd(e){return uc(e)&&Bg(e)==="[object Date]"}dt.isDate=Nd;dt.types.isDate=Nd;function gh(e){return uc(e)&&(Bg(e)==="[object Error]"||e instanceof Error)}dt.isError=gh;dt.types.isNativeError=gh;function Md(e){return typeof e=="function"}dt.isFunction=Md;function pj(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e>"u"}dt.isPrimitive=pj;dt.isBuffer=n_();function Bg(e){return Object.prototype.toString.call(e)}function Tg(e){return e<10?"0"+e.toString(10):e.toString(10)}var gj=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function vj(){var e=new Date,t=[Tg(e.getHours()),Tg(e.getMinutes()),Tg(e.getSeconds())].join(":");return[e.getDate(),gj[e.getMonth()],t].join(" ")}dt.log=function(){console.log("%s - %s",vj(),dt.format.apply(dt,arguments))};dt.inherits=Te();dt._extend=function(e,t){if(!t||!uc(t))return e;for(var r=Object.keys(t),i=r.length;i--;)e[r[i]]=t[r[i]];return e};function f_(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var xu=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;dt.promisify=function(t){if(typeof t!="function")throw new TypeError('The "original" argument must be of type Function');if(xu&&t[xu]){var r=t[xu];if(typeof r!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,xu,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var i,n,o=new Promise(function(u,c){i=u,n=c}),a=[],s=0;s<arguments.length;s++)a.push(arguments[s]);a.push(function(u,c){u?n(u):i(c)});try{t.apply(this,a)}catch(u){n(u)}return o}return Object.setPrototypeOf(r,Object.getPrototypeOf(t)),xu&&Object.defineProperty(r,xu,{value:r,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(r,o_(t))};dt.promisify.custom=xu;function mj(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}function yj(e){if(typeof e!="function")throw new TypeError('The "original" argument must be of type Function');function t(){for(var r=[],i=0;i<arguments.length;i++)r.push(arguments[i]);var n=r.pop();if(typeof n!="function")throw new TypeError("The last argument must be of type Function");var o=this,a=function(){return n.apply(o,arguments)};e.apply(this,r).then(function(s){A.default.nextTick(a.bind(null,null,s))},function(s){A.default.nextTick(mj.bind(null,s,a))})}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,o_(e)),t}dt.callbackify=yj});var g_=k((hce,p_)=>{"use strict";v();function c_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}function l_(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?c_(Object(r),!0).forEach(function(i){bj(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c_(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function bj(e,t,r){return t=d_(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _j(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h_(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,d_(i.key),i)}}function wj(e,t,r){return t&&h_(e.prototype,t),r&&h_(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function d_(e){var t=Sj(e,"string");return typeof t=="symbol"?t:String(t)}function Sj(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var xj=Kt(),qd=xj.Buffer,Ej=rn(),Mg=Ej.inspect,Ij=Mg&&Mg.custom||"inspect";function Oj(e,t,r){qd.prototype.copy.call(e,t,r)}p_.exports=(function(){function e(){_j(this,e),this.head=null,this.tail=null,this.length=0}return wj(e,[{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 qd.alloc(0);for(var i=qd.allocUnsafe(r>>>0),n=this.head,o=0;n;)Oj(n.data,i,o),o+=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,o=i.data;for(r-=o.length;i=i.next;){var a=i.data,s=r>a.length?a.length:r;if(s===a.length?o+=a:o+=a.slice(0,r),r-=s,r===0){s===a.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=a.slice(s));break}++n}return this.length-=n,o}},{key:"_getBuffer",value:function(r){var i=qd.allocUnsafe(r),n=this.head,o=1;for(n.data.copy(i),r-=n.data.length;n=n.next;){var a=n.data,s=r>a.length?a.length:r;if(a.copy(i,i.length-r,0,s),r-=s,r===0){s===a.length?(++o,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=a.slice(s));break}++o}return this.length-=o,i}},{key:Ij,value:function(r,i){return Mg(this,l_(l_({},i),{},{depth:0,customInspect:!1}))}}]),e})()});var Ng=k((pce,m_)=>{"use strict";v();function Aj(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,A.default.nextTick(Cg,this,e)):A.default.nextTick(Cg,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(o){!t&&o?r._writableState?r._writableState.errorEmitted?A.default.nextTick(Ud,r):(r._writableState.errorEmitted=!0,A.default.nextTick(v_,r,o)):A.default.nextTick(v_,r,o):t?(A.default.nextTick(Ud,r),t(o)):A.default.nextTick(Ud,r)}),this)}function v_(e,t){Cg(e,t),Ud(e)}function Ud(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function Pj(){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 Cg(e,t){e.emit("error",t)}function Tj(e,t){var r=e._readableState,i=e._writableState;r&&r.autoDestroy||i&&i.autoDestroy?e.destroy(t):e.emit("error",t)}m_.exports={destroy:Aj,undestroy:Pj,errorOrDestroy:Tj}});var Iu=k((vce,__)=>{"use strict";v();function kj(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var b_={};function nn(e,t,r){r||(r=Error);function i(o,a,s){return typeof t=="string"?t:t(o,a,s)}var n=(function(o){kj(a,o);function a(s,u,c){return o.call(this,i(s,u,c))||this}return a})(r);n.prototype.name=r.name,n.prototype.code=e,b_[e]=n}function y_(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(i){return String(i)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function Rj(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function Bj(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function Mj(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}nn("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);nn("ERR_INVALID_ARG_TYPE",function(e,t,r){var i;typeof t=="string"&&Rj(t,"not ")?(i="must not be",t=t.replace(/^not /,"")):i="must be";var n;if(Bj(e," argument"))n="The ".concat(e," ").concat(i," ").concat(y_(t,"type"));else{var o=Mj(e,".")?"property":"argument";n='The "'.concat(e,'" ').concat(o," ").concat(i," ").concat(y_(t,"type"))}return n+=". Received type ".concat(typeof r),n},TypeError);nn("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");nn("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});nn("ERR_STREAM_PREMATURE_CLOSE","Premature close");nn("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});nn("ERR_MULTIPLE_CALLBACK","Callback called multiple times");nn("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");nn("ERR_STREAM_WRITE_AFTER_END","write after end");nn("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);nn("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);nn("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");__.exports.codes=b_});var Dg=k((yce,w_)=>{"use strict";v();var Cj=Iu().codes.ERR_INVALID_OPT_VALUE;function Nj(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function Dj(e,t,r,i){var n=Nj(t,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var o=i?r:"highWaterMark";throw new Cj(o,n)}return Math.floor(n)}return e.objectMode?16:16*1024}w_.exports={getHighWaterMark:Dj}});var qg=k((_ce,S_)=>{v();S_.exports=Lj;function Lj(e,t){if(Lg("noDeprecation"))return e;var r=!1;function i(){if(!r){if(Lg("throwDeprecation"))throw new Error(t);Lg("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}return i}function Lg(e){try{if(!globalThis.localStorage)return!1}catch{return!1}var t=globalThis.localStorage[e];return t==null?!1:String(t).toLowerCase()==="true"}});var Hg=k((Sce,P_)=>{"use strict";v();P_.exports=ur;function E_(e){var t=this;this.next=null,this.entry=null,this.finish=function(){cz(t,e)}}var fc;ur.WritableState=mh;var qj={deprecate:qg()},I_=eg(),Hd=Kt().Buffer,Uj=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Fj(e){return Hd.from(e)}function Hj(e){return Hd.isBuffer(e)||e instanceof Uj}var Fg=Ng(),jj=Dg(),zj=jj.getHighWaterMark,is=Iu().codes,Kj=is.ERR_INVALID_ARG_TYPE,Vj=is.ERR_METHOD_NOT_IMPLEMENTED,Gj=is.ERR_MULTIPLE_CALLBACK,Zj=is.ERR_STREAM_CANNOT_PIPE,Wj=is.ERR_STREAM_DESTROYED,Yj=is.ERR_STREAM_NULL_VALUES,$j=is.ERR_STREAM_WRITE_AFTER_END,Xj=is.ERR_UNKNOWN_ENCODING,cc=Fg.errorOrDestroy;Te()(ur,I_);function Jj(){}function mh(e,t,r){fc=fc||Ou(),e=e||{},typeof r!="boolean"&&(r=t instanceof fc),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=zj(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=e.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(n){oz(t,n)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new E_(this)}mh.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(mh.prototype,"buffer",{get:qj.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var Fd;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Fd=Function.prototype[Symbol.hasInstance],Object.defineProperty(ur,Symbol.hasInstance,{value:function(t){return Fd.call(this,t)?!0:this!==ur?!1:t&&t._writableState instanceof mh}})):Fd=function(t){return t instanceof this};function ur(e){fc=fc||Ou();var t=this instanceof fc;if(!t&&!Fd.call(ur,this))return new ur(e);this._writableState=new mh(e,this,t),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),I_.call(this)}ur.prototype.pipe=function(){cc(this,new Zj)};function Qj(e,t){var r=new $j;cc(e,r),A.default.nextTick(t,r)}function ez(e,t,r,i){var n;return r===null?n=new Yj:typeof r!="string"&&!t.objectMode&&(n=new Kj("chunk",["string","Buffer"],r)),n?(cc(e,n),A.default.nextTick(i,n),!1):!0}ur.prototype.write=function(e,t,r){var i=this._writableState,n=!1,o=!i.objectMode&&Hj(e);return o&&!Hd.isBuffer(e)&&(e=Fj(e)),typeof t=="function"&&(r=t,t=null),o?t="buffer":t||(t=i.defaultEncoding),typeof r!="function"&&(r=Jj),i.ending?Qj(this,r):(o||ez(this,i,e,r))&&(i.pendingcb++,n=rz(this,i,o,e,t,r)),n};ur.prototype.cork=function(){this._writableState.corked++};ur.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&O_(this,e))};ur.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new Xj(t);return this._writableState.defaultEncoding=t,this};Object.defineProperty(ur.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function tz(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=Hd.from(t,r)),t}Object.defineProperty(ur.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function rz(e,t,r,i,n,o){if(!r){var a=tz(t,i,n);i!==a&&(r=!0,n="buffer",i=a)}var s=t.objectMode?1:i.length;t.length+=s;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:o,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else Ug(e,t,!1,s,i,n,o);return u}function Ug(e,t,r,i,n,o,a){t.writelen=i,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new Wj("write")):r?e._writev(n,t.onwrite):e._write(n,o,t.onwrite),t.sync=!1}function iz(e,t,r,i,n){--t.pendingcb,r?(A.default.nextTick(n,i),A.default.nextTick(vh,e,t),e._writableState.errorEmitted=!0,cc(e,i)):(n(i),e._writableState.errorEmitted=!0,cc(e,i),vh(e,t))}function nz(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function oz(e,t){var r=e._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new Gj;if(nz(r),t)iz(e,r,i,t,n);else{var o=A_(r)||e.destroyed;!o&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&O_(e,r),i?A.default.nextTick(x_,e,r,o,n):x_(e,r,o,n)}}function x_(e,t,r,i){r||az(e,t),t.pendingcb--,i(),vh(e,t)}function az(e,t){t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function O_(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,n=new Array(i),o=t.corkedRequestsFree;o.entry=r;for(var a=0,s=!0;r;)n[a]=r,r.isBuf||(s=!1),r=r.next,a+=1;n.allBuffers=s,Ug(e,t,!0,t.length,n,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new E_(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,c=r.encoding,l=r.callback,m=t.objectMode?1:u.length;if(Ug(e,t,!1,m,u,c,l),r=r.next,t.bufferedRequestCount--,t.writing)break}r===null&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}ur.prototype._write=function(e,t,r){r(new Vj("_write()"))};ur.prototype._writev=null;ur.prototype.end=function(e,t,r){var i=this._writableState;return typeof e=="function"?(r=e,e=null,t=null):typeof t=="function"&&(r=t,t=null),e!=null&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||fz(this,i,r),this};Object.defineProperty(ur.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function A_(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function sz(e,t){e._final(function(r){t.pendingcb--,r&&cc(e,r),t.prefinished=!0,e.emit("prefinish"),vh(e,t)})}function uz(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final=="function"&&!t.destroyed?(t.pendingcb++,t.finalCalled=!0,A.default.nextTick(sz,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function vh(e,t){var r=A_(t);if(r&&(uz(e,t),t.pendingcb===0&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var i=e._readableState;(!i||i.autoDestroy&&i.endEmitted)&&e.destroy()}return r}function fz(e,t,r){t.ending=!0,vh(e,t),r&&(t.finished?A.default.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function cz(e,t,r){var i=e.entry;for(e.entry=null;i;){var n=i.callback;t.pendingcb--,n(r),i=i.next}t.corkedRequestsFree.next=e}Object.defineProperty(ur.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}});ur.prototype.destroy=Fg.destroy;ur.prototype._undestroy=Fg.undestroy;ur.prototype._destroy=function(e,t){t(e)}});var Ou=k((Ece,k_)=>{"use strict";v();var lz=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};k_.exports=bo;var T_=Kg(),zg=Hg();Te()(bo,T_);for(jg=lz(zg.prototype),jd=0;jd<jg.length;jd++)zd=jg[jd],bo.prototype[zd]||(bo.prototype[zd]=zg.prototype[zd]);var jg,zd,jd;function bo(e){if(!(this instanceof bo))return new bo(e);T_.call(this,e),zg.call(this,e),this.allowHalfOpen=!0,e&&(e.readable===!1&&(this.readable=!1),e.writable===!1&&(this.writable=!1),e.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",hz)))}Object.defineProperty(bo.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(bo.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(bo.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function hz(){this._writableState.ended||A.default.nextTick(dz,this)}function dz(e){e.end()}Object.defineProperty(bo.prototype,"destroyed",{enumerable:!1,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)}})});var M_=k((Vg,B_)=>{v();var Kd=Kt(),ca=Kd.Buffer;function R_(e,t){for(var r in e)t[r]=e[r]}ca.from&&ca.alloc&&ca.allocUnsafe&&ca.allocUnsafeSlow?B_.exports=Kd:(R_(Kd,Vg),Vg.Buffer=lc);function lc(e,t,r){return ca(e,t,r)}R_(ca,lc);lc.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return ca(e,t,r)};lc.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var i=ca(e);return t!==void 0?typeof r=="string"?i.fill(t,r):i.fill(t):i.fill(0),i};lc.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return ca(e)};lc.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Kd.SlowBuffer(e)}});var hc=k(N_=>{"use strict";v();var Zg=M_().Buffer,C_=Zg.isEncoding||function(e){switch(e=""+e,e&&e.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 pz(e){if(!e)return"utf8";for(var t;;)switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function gz(e){var t=pz(e);if(typeof t!="string"&&(Zg.isEncoding===C_||!C_(e)))throw new Error("Unknown encoding: "+e);return t||e}N_.StringDecoder=yh;function yh(e){this.encoding=gz(e);var t;switch(this.encoding){case"utf16le":this.text=wz,this.end=Sz,t=4;break;case"utf8":this.fillLast=yz,t=4;break;case"base64":this.text=xz,this.end=Ez,t=3;break;default:this.write=Iz,this.end=Oz;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Zg.allocUnsafe(t)}yh.prototype.write=function(e){if(e.length===0)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""};yh.prototype.end=_z;yh.prototype.text=bz;yh.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function Gg(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function vz(e,t,r){var i=t.length-1;if(i<r)return 0;var n=Gg(t[i]);return n>=0?(n>0&&(e.lastNeed=n-1),n):--i<r||n===-2?0:(n=Gg(t[i]),n>=0?(n>0&&(e.lastNeed=n-2),n):--i<r||n===-2?0:(n=Gg(t[i]),n>=0?(n>0&&(n===2?n=0:e.lastNeed=n-3),n):0))}function mz(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}function yz(e){var t=this.lastTotal-this.lastNeed,r=mz(this,e,t);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function bz(e,t){var r=vz(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)}function _z(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}function wz(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function Sz(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function xz(e,t){var r=(e.length-t)%3;return r===0?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function Ez(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function Iz(e){return e.toString(this.encoding)}function Oz(e){return e&&e.length?this.write(e):""}});var Vd=k((Tce,q_)=>{"use strict";v();var D_=Iu().codes.ERR_STREAM_PREMATURE_CLOSE;function Az(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];e.apply(this,i)}}}function Pz(){}function Tz(e){return e.setHeader&&typeof e.abort=="function"}function L_(e,t,r){if(typeof t=="function")return L_(e,null,t);t||(t={}),r=Az(r||Pz);var i=t.readable||t.readable!==!1&&e.readable,n=t.writable||t.writable!==!1&&e.writable,o=function(){e.writable||s()},a=e._writableState&&e._writableState.finished,s=function(){n=!1,a=!0,i||r.call(e)},u=e._readableState&&e._readableState.endEmitted,c=function(){i=!1,u=!0,n||r.call(e)},l=function(P){r.call(e,P)},m=function(){var P;if(i&&!u)return(!e._readableState||!e._readableState.ended)&&(P=new D_),r.call(e,P);if(n&&!a)return(!e._writableState||!e._writableState.ended)&&(P=new D_),r.call(e,P)},w=function(){e.req.on("finish",s)};return Tz(e)?(e.on("complete",s),e.on("abort",m),e.req?w():e.on("request",w)):n&&!e._writableState&&(e.on("end",o),e.on("close",o)),e.on("end",c),e.on("finish",s),t.error!==!1&&e.on("error",l),e.on("close",m),function(){e.removeListener("complete",s),e.removeListener("abort",m),e.removeListener("request",w),e.req&&e.req.removeListener("finish",s),e.removeListener("end",o),e.removeListener("close",o),e.removeListener("finish",s),e.removeListener("end",c),e.removeListener("error",l),e.removeListener("close",m)}}q_.exports=L_});var F_=k((Rce,U_)=>{"use strict";v();var Gd;function ns(e,t,r){return t=kz(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kz(e){var t=Rz(e,"string");return typeof t=="symbol"?t:String(t)}function Rz(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Bz=Vd(),os=Symbol("lastResolve"),Au=Symbol("lastReject"),bh=Symbol("error"),Zd=Symbol("ended"),Pu=Symbol("lastPromise"),Wg=Symbol("handlePromise"),Tu=Symbol("stream");function as(e,t){return{value:e,done:t}}function Mz(e){var t=e[os];if(t!==null){var r=e[Tu].read();r!==null&&(e[Pu]=null,e[os]=null,e[Au]=null,t(as(r,!1)))}}function Cz(e){A.default.nextTick(Mz,e)}function Nz(e,t){return function(r,i){e.then(function(){if(t[Zd]){r(as(void 0,!0));return}t[Wg](r,i)},i)}}var Dz=Object.getPrototypeOf(function(){}),Lz=Object.setPrototypeOf((Gd={get stream(){return this[Tu]},next:function(){var t=this,r=this[bh];if(r!==null)return Promise.reject(r);if(this[Zd])return Promise.resolve(as(void 0,!0));if(this[Tu].destroyed)return new Promise(function(a,s){A.default.nextTick(function(){t[bh]?s(t[bh]):a(as(void 0,!0))})});var i=this[Pu],n;if(i)n=new Promise(Nz(i,this));else{var o=this[Tu].read();if(o!==null)return Promise.resolve(as(o,!1));n=new Promise(this[Wg])}return this[Pu]=n,n}},ns(Gd,Symbol.asyncIterator,function(){return this}),ns(Gd,"return",function(){var t=this;return new Promise(function(r,i){t[Tu].destroy(null,function(n){if(n){i(n);return}r(as(void 0,!0))})})}),Gd),Dz),qz=function(t){var r,i=Object.create(Lz,(r={},ns(r,Tu,{value:t,writable:!0}),ns(r,os,{value:null,writable:!0}),ns(r,Au,{value:null,writable:!0}),ns(r,bh,{value:null,writable:!0}),ns(r,Zd,{value:t._readableState.endEmitted,writable:!0}),ns(r,Wg,{value:function(o,a){var s=i[Tu].read();s?(i[Pu]=null,i[os]=null,i[Au]=null,o(as(s,!1))):(i[os]=o,i[Au]=a)},writable:!0}),r));return i[Pu]=null,Bz(t,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var o=i[Au];o!==null&&(i[Pu]=null,i[os]=null,i[Au]=null,o(n)),i[bh]=n;return}var a=i[os];a!==null&&(i[Pu]=null,i[os]=null,i[Au]=null,a(as(void 0,!0))),i[Zd]=!0}),t.on("readable",Cz.bind(null,i)),i};U_.exports=qz});var j_=k((Mce,H_)=>{v();H_.exports=function(){throw new Error("Readable.from is not available in the browser")}});var Kg=k((Dce,J_)=>{"use strict";v();J_.exports=xt;var dc;xt.ReadableState=G_;var Nce=Qf().EventEmitter,V_=function(t,r){return t.listeners(r).length},wh=eg(),Wd=Kt().Buffer,Uz=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Fz(e){return Wd.from(e)}function Hz(e){return Wd.isBuffer(e)||e instanceof Uz}var Yg=rn(),ct;Yg&&Yg.debuglog?ct=Yg.debuglog("stream"):ct=function(){};var jz=g_(),rv=Ng(),zz=Dg(),Kz=zz.getHighWaterMark,Yd=Iu().codes,Vz=Yd.ERR_INVALID_ARG_TYPE,Gz=Yd.ERR_STREAM_PUSH_AFTER_EOF,Zz=Yd.ERR_METHOD_NOT_IMPLEMENTED,Wz=Yd.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,pc,$g,Xg;Te()(xt,wh);var _h=rv.errorOrDestroy,Jg=["error","close","destroy","pause","resume"];function Yz(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}function G_(e,t,r){dc=dc||Ou(),e=e||{},typeof r!="boolean"&&(r=t instanceof dc),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=Kz(this,e,"readableHighWaterMark",r),this.buffer=new jz,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=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(pc||(pc=hc().StringDecoder),this.decoder=new pc(e.encoding),this.encoding=e.encoding)}function xt(e){if(dc=dc||Ou(),!(this instanceof xt))return new xt(e);var t=this instanceof dc;this._readableState=new G_(e,this,t),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),wh.call(this)}Object.defineProperty(xt.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});xt.prototype.destroy=rv.destroy;xt.prototype._undestroy=rv.undestroy;xt.prototype._destroy=function(e,t){t(e)};xt.prototype.push=function(e,t){var r=this._readableState,i;return r.objectMode?i=!0:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=Wd.from(e,t),t=""),i=!0),Z_(this,e,t,!1,i)};xt.prototype.unshift=function(e){return Z_(this,e,null,!0,!1)};function Z_(e,t,r,i,n){ct("readableAddChunk",t);var o=e._readableState;if(t===null)o.reading=!1,Jz(e,o);else{var a;if(n||(a=$z(o,t)),a)_h(e,a);else if(o.objectMode||t&&t.length>0)if(typeof t!="string"&&!o.objectMode&&Object.getPrototypeOf(t)!==Wd.prototype&&(t=Fz(t)),i)o.endEmitted?_h(e,new Wz):Qg(e,o,t,!0);else if(o.ended)_h(e,new Gz);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||t.length!==0?Qg(e,o,t,!1):tv(e,o)):Qg(e,o,t,!1)}else i||(o.reading=!1,tv(e,o))}return!o.ended&&(o.length<o.highWaterMark||o.length===0)}function Qg(e,t,r,i){t.flowing&&t.length===0&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&$d(e)),tv(e,t)}function $z(e,t){var r;return!Hz(t)&&typeof t!="string"&&t!==void 0&&!e.objectMode&&(r=new Vz("chunk",["string","Buffer","Uint8Array"],t)),r}xt.prototype.isPaused=function(){return this._readableState.flowing===!1};xt.prototype.setEncoding=function(e){pc||(pc=hc().StringDecoder);var t=new pc(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";r!==null;)i+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),i!==""&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var z_=1073741824;function Xz(e){return e>=z_?e=z_:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function K_(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=Xz(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}xt.prototype.read=function(e){ct("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&((t.highWaterMark!==0?t.length>=t.highWaterMark:t.length>0)||t.ended))return ct("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?ev(this):$d(this),null;if(e=K_(e,t),e===0&&t.ended)return t.length===0&&ev(this),null;var i=t.needReadable;ct("need readable",i),(t.length===0||t.length-e<t.highWaterMark)&&(i=!0,ct("length less than watermark",i)),t.ended||t.reading?(i=!1,ct("reading or ended",i)):i&&(ct("do read"),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=K_(r,t)));var n;return e>0?n=$_(e,t):n=null,n===null?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&ev(this)),n!==null&&this.emit("data",n),n};function Jz(e,t){if(ct("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?$d(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,W_(e)))}}function $d(e){var t=e._readableState;ct("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(ct("emitReadable",t.flowing),t.emittedReadable=!0,A.default.nextTick(W_,e))}function W_(e){var t=e._readableState;ct("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,iv(e)}function tv(e,t){t.readingMore||(t.readingMore=!0,A.default.nextTick(Qz,e,t))}function Qz(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&t.length===0);){var r=t.length;if(ct("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}xt.prototype._read=function(e){_h(this,new Zz("_read()"))};xt.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e);break}i.pipesCount+=1,ct("pipe count=%d opts=%j",i.pipesCount,t);var n=(!t||t.end!==!1)&&e!==A.default.stdout&&e!==A.default.stderr,o=n?s:M;i.endEmitted?A.default.nextTick(o):r.once("end",o),e.on("unpipe",a);function a(D,L){ct("onunpipe"),D===r&&L&&L.hasUnpiped===!1&&(L.hasUnpiped=!0,l())}function s(){ct("onend"),e.end()}var u=eK(r);e.on("drain",u);var c=!1;function l(){ct("cleanup"),e.removeListener("close",E),e.removeListener("finish",P),e.removeListener("drain",u),e.removeListener("error",w),e.removeListener("unpipe",a),r.removeListener("end",s),r.removeListener("end",M),r.removeListener("data",m),c=!0,i.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&u()}r.on("data",m);function m(D){ct("ondata");var L=e.write(D);ct("dest.write",L),L===!1&&((i.pipesCount===1&&i.pipes===e||i.pipesCount>1&&X_(i.pipes,e)!==-1)&&!c&&(ct("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function w(D){ct("onerror",D),M(),e.removeListener("error",w),V_(e,"error")===0&&_h(e,D)}Yz(e,"error",w);function E(){e.removeListener("finish",P),M()}e.once("close",E);function P(){ct("onfinish"),e.removeListener("close",E),M()}e.once("finish",P);function M(){ct("unpipe"),r.unpipe(e)}return e.emit("pipe",r),i.flowing||(ct("pipe resume"),r.resume()),e};function eK(e){return function(){var r=e._readableState;ct("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&V_(e,"data")&&(r.flowing=!0,iv(e))}}xt.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var i=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<n;o++)i[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=X_(t.pipes,e);return a===-1?this:(t.pipes.splice(a,1),t.pipesCount-=1,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)};xt.prototype.on=function(e,t){var r=wh.prototype.on.call(this,e,t),i=this._readableState;return e==="data"?(i.readableListening=this.listenerCount("readable")>0,i.flowing!==!1&&this.resume()):e==="readable"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,ct("on readable",i.length,i.reading),i.length?$d(this):i.reading||A.default.nextTick(tK,this)),r};xt.prototype.addListener=xt.prototype.on;xt.prototype.removeListener=function(e,t){var r=wh.prototype.removeListener.call(this,e,t);return e==="readable"&&A.default.nextTick(Y_,this),r};xt.prototype.removeAllListeners=function(e){var t=wh.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&A.default.nextTick(Y_,this),t};function Y_(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function tK(e){ct("readable nexttick read 0"),e.read(0)}xt.prototype.resume=function(){var e=this._readableState;return e.flowing||(ct("resume"),e.flowing=!e.readableListening,rK(this,e)),e.paused=!1,this};function rK(e,t){t.resumeScheduled||(t.resumeScheduled=!0,A.default.nextTick(iK,e,t))}function iK(e,t){ct("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),iv(e),t.flowing&&!t.reading&&e.read(0)}xt.prototype.pause=function(){return ct("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(ct("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function iv(e){var t=e._readableState;for(ct("flow",t.flowing);t.flowing&&e.read()!==null;);}xt.prototype.wrap=function(e){var t=this,r=this._readableState,i=!1;e.on("end",function(){if(ct("wrapped end"),r.decoder&&!r.ended){var a=r.decoder.end();a&&a.length&&t.push(a)}t.push(null)}),e.on("data",function(a){if(ct("wrapped data"),r.decoder&&(a=r.decoder.write(a)),!(r.objectMode&&a==null)&&!(!r.objectMode&&(!a||!a.length))){var s=t.push(a);s||(i=!0,e.pause())}});for(var n in e)this[n]===void 0&&typeof e[n]=="function"&&(this[n]=(function(s){return function(){return e[s].apply(e,arguments)}})(n));for(var o=0;o<Jg.length;o++)e.on(Jg[o],this.emit.bind(this,Jg[o]));return this._read=function(a){ct("wrapped _read",a),i&&(i=!1,e.resume())},this};typeof Symbol=="function"&&(xt.prototype[Symbol.asyncIterator]=function(){return $g===void 0&&($g=F_()),$g(this)});Object.defineProperty(xt.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(xt.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(xt.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}});xt._fromList=$_;Object.defineProperty(xt.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function $_(e,t){if(t.length===0)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.first():r=t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}function ev(e){var t=e._readableState;ct("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,A.default.nextTick(nK,t,e))}function nK(e,t){if(ct("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}typeof Symbol=="function"&&(xt.from=function(e,t){return Xg===void 0&&(Xg=j_()),Xg(xt,e,t)});function X_(e,t){for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1}});var nv=k((qce,ew)=>{"use strict";v();ew.exports=la;var Xd=Iu().codes,oK=Xd.ERR_METHOD_NOT_IMPLEMENTED,aK=Xd.ERR_MULTIPLE_CALLBACK,sK=Xd.ERR_TRANSFORM_ALREADY_TRANSFORMING,uK=Xd.ERR_TRANSFORM_WITH_LENGTH_0,Jd=Ou();Te()(la,Jd);function fK(e,t){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(i===null)return this.emit("error",new aK);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),i(e);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function la(e){if(!(this instanceof la))return new la(e);Jd.call(this,e),this._transformState={afterTransform:fK.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",cK)}function cK(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(t,r){Q_(e,t,r)}):Q_(this,null,null)}la.prototype.push=function(e,t){return this._transformState.needTransform=!1,Jd.prototype.push.call(this,e,t)};la.prototype._transform=function(e,t,r){r(new oK("_transform()"))};la.prototype._write=function(e,t,r){var i=this._transformState;if(i.writecb=r,i.writechunk=e,i.writeencoding=t,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};la.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};la.prototype._destroy=function(e,t){Jd.prototype._destroy.call(this,e,function(r){t(r)})};function Q_(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new uK;if(e._transformState.transforming)throw new sK;return e.push(null)}});var iw=k((Fce,rw)=>{"use strict";v();rw.exports=Sh;var tw=nv();Te()(Sh,tw);function Sh(e){if(!(this instanceof Sh))return new Sh(e);tw.call(this,e)}Sh.prototype._transform=function(e,t,r){r(null,e)}});var uw=k((jce,sw)=>{"use strict";v();var ov;function lK(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var aw=Iu().codes,hK=aw.ERR_MISSING_ARGS,dK=aw.ERR_STREAM_DESTROYED;function nw(e){if(e)throw e}function pK(e){return e.setHeader&&typeof e.abort=="function"}function gK(e,t,r,i){i=lK(i);var n=!1;e.on("close",function(){n=!0}),ov===void 0&&(ov=Vd()),ov(e,{readable:t,writable:r},function(a){if(a)return i(a);n=!0,i()});var o=!1;return function(a){if(!n&&!o){if(o=!0,pK(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();i(a||new dK("pipe"))}}}function ow(e){e()}function vK(e,t){return e.pipe(t)}function mK(e){return!e.length||typeof e[e.length-1]!="function"?nw:e.pop()}function yK(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var i=mK(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new hK("streams");var n,o=t.map(function(a,s){var u=s<t.length-1,c=s>0;return gK(a,u,c,function(l){n||(n=l),l&&o.forEach(ow),!u&&(o.forEach(ow),i(n))})});return t.reduce(vK)}sw.exports=yK});var Qd=k((Kce,fw)=>{v();fw.exports=on;var av=Qf().EventEmitter,bK=Te();bK(on,av);on.Readable=Kg();on.Writable=Hg();on.Duplex=Ou();on.Transform=nv();on.PassThrough=iw();on.finished=Vd();on.pipeline=uw();on.Stream=on;function on(){av.call(this)}on.prototype.pipe=function(e,t){var r=this;function i(l){e.writable&&e.write(l)===!1&&r.pause&&r.pause()}r.on("data",i);function n(){r.readable&&r.resume&&r.resume()}e.on("drain",n),!e._isStdio&&(!t||t.end!==!1)&&(r.on("end",a),r.on("close",s));var o=!1;function a(){o||(o=!0,e.end())}function s(){o||(o=!0,typeof e.destroy=="function"&&e.destroy())}function u(l){if(c(),av.listenerCount(this,"error")===0)throw l}r.on("error",u),e.on("error",u);function c(){r.removeListener("data",i),e.removeListener("drain",n),r.removeListener("end",a),r.removeListener("close",s),r.removeListener("error",u),e.removeListener("error",u),r.removeListener("end",c),r.removeListener("close",c),e.removeListener("close",c)}return r.on("end",c),r.on("close",c),e.on("close",c),e.emit("pipe",r),e}});var hw=k((Gce,lw)=>{"use strict";v();var _o=ot().Buffer,cw=Qd().Transform,_K=Te();function ss(e){cw.call(this),this._block=_o.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}_K(ss,cw);ss.prototype._transform=function(e,t,r){var i=null;try{this.update(e,t)}catch(n){i=n}r(i)};ss.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(r){t=r}e(t)};var wK=typeof Uint8Array<"u",SK=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&ArrayBuffer.isView&&(_o.prototype instanceof Uint8Array||_o.TYPED_ARRAY_SUPPORT);function xK(e,t){if(e instanceof _o)return e;if(typeof e=="string")return _o.from(e,t);if(SK&&ArrayBuffer.isView(e)){if(e.byteLength===0)return _o.alloc(0);var r=_o.from(e.buffer,e.byteOffset,e.byteLength);if(r.byteLength===e.byteLength)return r}if(wK&&e instanceof Uint8Array||_o.isBuffer(e)&&e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e))return _o.from(e);throw new TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.')}ss.prototype.update=function(e,t){if(this._finalized)throw new Error("Digest already called");e=xK(e,t);for(var r=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var n=this._blockOffset;n<this._blockSize;)r[n++]=e[i++];this._update(),this._blockOffset=0}for(;i<e.length;)r[this._blockOffset++]=e[i++];for(var o=0,a=e.length*8;a>0;++o)this._length[o]+=a,a=this._length[o]/4294967296|0,a>0&&(this._length[o]-=4294967296*a);return this};ss.prototype._update=function(){throw new Error("_update is not implemented")};ss.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();e!==void 0&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t};ss.prototype._digest=function(){throw new Error("_digest is not implemented")};lw.exports=ss});var r2=k((Wce,pw)=>{"use strict";v();var EK=Te(),dw=hw(),IK=ot().Buffer,OK=new Array(16);function e2(){dw.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}EK(e2,dw);e2.prototype._update=function(){for(var e=OK,t=0;t<16;++t)e[t]=this._block.readInt32LE(t*4);var r=this._a,i=this._b,n=this._c,o=this._d;r=si(r,i,n,o,e[0],3614090360,7),o=si(o,r,i,n,e[1],3905402710,12),n=si(n,o,r,i,e[2],606105819,17),i=si(i,n,o,r,e[3],3250441966,22),r=si(r,i,n,o,e[4],4118548399,7),o=si(o,r,i,n,e[5],1200080426,12),n=si(n,o,r,i,e[6],2821735955,17),i=si(i,n,o,r,e[7],4249261313,22),r=si(r,i,n,o,e[8],1770035416,7),o=si(o,r,i,n,e[9],2336552879,12),n=si(n,o,r,i,e[10],4294925233,17),i=si(i,n,o,r,e[11],2304563134,22),r=si(r,i,n,o,e[12],1804603682,7),o=si(o,r,i,n,e[13],4254626195,12),n=si(n,o,r,i,e[14],2792965006,17),i=si(i,n,o,r,e[15],1236535329,22),r=ui(r,i,n,o,e[1],4129170786,5),o=ui(o,r,i,n,e[6],3225465664,9),n=ui(n,o,r,i,e[11],643717713,14),i=ui(i,n,o,r,e[0],3921069994,20),r=ui(r,i,n,o,e[5],3593408605,5),o=ui(o,r,i,n,e[10],38016083,9),n=ui(n,o,r,i,e[15],3634488961,14),i=ui(i,n,o,r,e[4],3889429448,20),r=ui(r,i,n,o,e[9],568446438,5),o=ui(o,r,i,n,e[14],3275163606,9),n=ui(n,o,r,i,e[3],4107603335,14),i=ui(i,n,o,r,e[8],1163531501,20),r=ui(r,i,n,o,e[13],2850285829,5),o=ui(o,r,i,n,e[2],4243563512,9),n=ui(n,o,r,i,e[7],1735328473,14),i=ui(i,n,o,r,e[12],2368359562,20),r=fi(r,i,n,o,e[5],4294588738,4),o=fi(o,r,i,n,e[8],2272392833,11),n=fi(n,o,r,i,e[11],1839030562,16),i=fi(i,n,o,r,e[14],4259657740,23),r=fi(r,i,n,o,e[1],2763975236,4),o=fi(o,r,i,n,e[4],1272893353,11),n=fi(n,o,r,i,e[7],4139469664,16),i=fi(i,n,o,r,e[10],3200236656,23),r=fi(r,i,n,o,e[13],681279174,4),o=fi(o,r,i,n,e[0],3936430074,11),n=fi(n,o,r,i,e[3],3572445317,16),i=fi(i,n,o,r,e[6],76029189,23),r=fi(r,i,n,o,e[9],3654602809,4),o=fi(o,r,i,n,e[12],3873151461,11),n=fi(n,o,r,i,e[15],530742520,16),i=fi(i,n,o,r,e[2],3299628645,23),r=ci(r,i,n,o,e[0],4096336452,6),o=ci(o,r,i,n,e[7],1126891415,10),n=ci(n,o,r,i,e[14],2878612391,15),i=ci(i,n,o,r,e[5],4237533241,21),r=ci(r,i,n,o,e[12],1700485571,6),o=ci(o,r,i,n,e[3],2399980690,10),n=ci(n,o,r,i,e[10],4293915773,15),i=ci(i,n,o,r,e[1],2240044497,21),r=ci(r,i,n,o,e[8],1873313359,6),o=ci(o,r,i,n,e[15],4264355552,10),n=ci(n,o,r,i,e[6],2734768916,15),i=ci(i,n,o,r,e[13],1309151649,21),r=ci(r,i,n,o,e[4],4149444226,6),o=ci(o,r,i,n,e[11],3174756917,10),n=ci(n,o,r,i,e[2],718787259,15),i=ci(i,n,o,r,e[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+o|0};e2.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 e=IK.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e};function t2(e,t){return e<<t|e>>>32-t}function si(e,t,r,i,n,o,a){return t2(e+(t&r|~t&i)+n+o|0,a)+t|0}function ui(e,t,r,i,n,o,a){return t2(e+(t&i|r&~i)+n+o|0,a)+t|0}function fi(e,t,r,i,n,o,a){return t2(e+(t^r^i)+n+o|0,a)+t|0}function ci(e,t,r,i,n,o,a){return t2(e+(r^(t|~i))+n+o|0,a)+t|0}pw.exports=e2});var vw=k(($ce,gw)=>{v();var AK={}.toString;gw.exports=Array.isArray||function(e){return AK.call(e)=="[object Array]"}});var yw=k((Jce,mw)=>{"use strict";v();var PK=_u(),TK=ts(),kK=TK("TypedArray.prototype.buffer",!0),RK=Ig();mw.exports=kK||function(t){if(!RK(t))throw new PK("Not a Typed Array");return t.buffer}});var xh=k((ele,_w)=>{"use strict";v();var Tn=ot().Buffer,BK=vw(),MK=yw(),CK=ArrayBuffer.isView||function(t){try{return MK(t),!0}catch{return!1}},NK=typeof Uint8Array<"u",bw=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",DK=bw&&(Tn.prototype instanceof Uint8Array||Tn.TYPED_ARRAY_SUPPORT);_w.exports=function(t,r){if(Tn.isBuffer(t))return t.constructor&&!("isBuffer"in t)?Tn.from(t):t;if(typeof t=="string")return Tn.from(t,r);if(bw&&CK(t)){if(t.byteLength===0)return Tn.alloc(0);if(DK){var i=Tn.from(t.buffer,t.byteOffset,t.byteLength);if(i.byteLength===t.byteLength)return i}var n=t instanceof Uint8Array?t:new Uint8Array(t.buffer,t.byteOffset,t.byteLength),o=Tn.from(n);if(o.length===t.byteLength)return o}if(NK&&t instanceof Uint8Array)return Tn.from(t);var a=BK(t);if(a)for(var s=0;s<t.length;s+=1){var u=t[s];if(typeof u!="number"||u<0||u>255||~~u!==u)throw new RangeError("Array items must be numbers in the range 0-255.")}if(a||Tn.isBuffer(t)&&t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t))return Tn.from(t);throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')}});var Ew=k((rle,xw)=>{"use strict";v();var LK=ot().Buffer,qK=xh(),Sw=typeof Uint8Array<"u",UK=Sw&&typeof ArrayBuffer<"u",ww=UK&&ArrayBuffer.isView;xw.exports=function(e,t){if(typeof e=="string"||LK.isBuffer(e)||Sw&&e instanceof Uint8Array||ww&&ww(e))return qK(e,t);throw new TypeError('The "data" argument must be a string, a Buffer, a Uint8Array, or a DataView')}});var Eh=k((nle,sv)=>{"use strict";v();typeof A.default>"u"||!A.default.version||A.default.version.indexOf("v0.")===0||A.default.version.indexOf("v1.")===0&&A.default.version.indexOf("v1.8.")!==0?sv.exports={nextTick:FK}:sv.exports=A.default;function FK(e,t,r,i){if(typeof e!="function")throw new TypeError('"callback" argument must be a function');var n=arguments.length,o,a;switch(n){case 0:case 1:return A.default.nextTick(e);case 2:return A.default.nextTick(function(){e.call(null,t)});case 3:return A.default.nextTick(function(){e.call(null,t,r)});case 4:return A.default.nextTick(function(){e.call(null,t,r,i)});default:for(o=new Array(n-1),a=0;a<o.length;)o[a++]=arguments[a];return A.default.nextTick(function(){e.apply(null,o)})}}});var Ow=k((ale,Iw)=>{v();var HK={}.toString;Iw.exports=Array.isArray||function(e){return HK.call(e)=="[object Array]"}});var uv=k((ule,Aw)=>{v();Aw.exports=Qf().EventEmitter});var n2=k((fv,Tw)=>{v();var i2=Kt(),ha=i2.Buffer;function Pw(e,t){for(var r in e)t[r]=e[r]}ha.from&&ha.alloc&&ha.allocUnsafe&&ha.allocUnsafeSlow?Tw.exports=i2:(Pw(i2,fv),fv.Buffer=gc);function gc(e,t,r){return ha(e,t,r)}Pw(ha,gc);gc.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return ha(e,t,r)};gc.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var i=ha(e);return t!==void 0?typeof r=="string"?i.fill(t,r):i.fill(t):i.fill(0),i};gc.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return ha(e)};gc.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return i2.SlowBuffer(e)}});var vc=k(li=>{v();function jK(e){return Array.isArray?Array.isArray(e):o2(e)==="[object Array]"}li.isArray=jK;function zK(e){return typeof e=="boolean"}li.isBoolean=zK;function KK(e){return e===null}li.isNull=KK;function VK(e){return e==null}li.isNullOrUndefined=VK;function GK(e){return typeof e=="number"}li.isNumber=GK;function ZK(e){return typeof e=="string"}li.isString=ZK;function WK(e){return typeof e=="symbol"}li.isSymbol=WK;function YK(e){return e===void 0}li.isUndefined=YK;function $K(e){return o2(e)==="[object RegExp]"}li.isRegExp=$K;function XK(e){return typeof e=="object"&&e!==null}li.isObject=XK;function JK(e){return o2(e)==="[object Date]"}li.isDate=JK;function QK(e){return o2(e)==="[object Error]"||e instanceof Error}li.isError=QK;function eV(e){return typeof e=="function"}li.isFunction=eV;function tV(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e>"u"}li.isPrimitive=tV;li.isBuffer=Kt().Buffer.isBuffer;function o2(e){return Object.prototype.toString.call(e)}});var Rw=k((dle,cv)=>{"use strict";v();function rV(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var kw=n2().Buffer,Ih=rn();function iV(e,t,r){e.copy(t,r)}cv.exports=(function(){function e(){rV(this,e),this.head=null,this.tail=null,this.length=0}return e.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},e.prototype.unshift=function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length},e.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}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.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},e.prototype.concat=function(r){if(this.length===0)return kw.alloc(0);for(var i=kw.allocUnsafe(r>>>0),n=this.head,o=0;n;)iV(n.data,i,o),o+=n.data.length,n=n.next;return i},e})();Ih&&Ih.inspect&&Ih.inspect.custom&&(cv.exports.prototype[Ih.inspect.custom]=function(){var e=Ih.inspect({length:this.length});return this.constructor.name+" "+e})});var lv=k((gle,Bw)=>{"use strict";v();var a2=Eh();function nV(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,a2.nextTick(s2,this,e)):a2.nextTick(s2,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(o){!t&&o?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,a2.nextTick(s2,r,o)):a2.nextTick(s2,r,o):t&&t(o)}),this)}function oV(){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 s2(e,t){e.emit("error",t)}Bw.exports={destroy:nV,undestroy:oV}});var dv=k((mle,Fw)=>{"use strict";v();var ku=Eh();Fw.exports=yr;function Cw(e){var t=this;this.next=null,this.entry=null,this.finish=function(){xV(t,e)}}var aV=!A.default.browser&&["v0.10","v0.9."].indexOf(A.default.version.slice(0,5))>-1?setImmediate:ku.nextTick,mc;yr.WritableState=Ah;var Nw=Object.create(vc());Nw.inherits=Te();var sV={deprecate:qg()},Dw=uv(),f2=n2().Buffer,uV=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function fV(e){return f2.from(e)}function cV(e){return f2.isBuffer(e)||e instanceof uV}var Lw=lv();Nw.inherits(yr,Dw);function lV(){}function Ah(e,t){mc=mc||Ru(),e=e||{};var r=t instanceof mc;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,n=e.writableHighWaterMark,o=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=o,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=e.decodeStrings===!1;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(s){yV(t,s)},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 Cw(this)}Ah.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(Ah.prototype,"buffer",{get:sV.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var u2;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(u2=Function.prototype[Symbol.hasInstance],Object.defineProperty(yr,Symbol.hasInstance,{value:function(e){return u2.call(this,e)?!0:this!==yr?!1:e&&e._writableState instanceof Ah}})):u2=function(e){return e instanceof this};function yr(e){if(mc=mc||Ru(),!u2.call(yr,this)&&!(this instanceof mc))return new yr(e);this._writableState=new Ah(e,this),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),Dw.call(this)}yr.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function hV(e,t){var r=new Error("write after end");e.emit("error",r),ku.nextTick(t,r)}function dV(e,t,r,i){var n=!0,o=!1;return r===null?o=new TypeError("May not write null values to stream"):typeof r!="string"&&r!==void 0&&!t.objectMode&&(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),ku.nextTick(i,o),n=!1),n}yr.prototype.write=function(e,t,r){var i=this._writableState,n=!1,o=!i.objectMode&&cV(e);return o&&!f2.isBuffer(e)&&(e=fV(e)),typeof t=="function"&&(r=t,t=null),o?t="buffer":t||(t=i.defaultEncoding),typeof r!="function"&&(r=lV),i.ended?hV(this,r):(o||dV(this,i,e,r))&&(i.pendingcb++,n=gV(this,i,o,e,t,r)),n};yr.prototype.cork=function(){var e=this._writableState;e.corked++};yr.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&qw(this,e))};yr.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this};function pV(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=f2.from(t,r)),t}Object.defineProperty(yr.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function gV(e,t,r,i,n,o){if(!r){var a=pV(t,i,n);i!==a&&(r=!0,n="buffer",i=a)}var s=t.objectMode?1:i.length;t.length+=s;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:o,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else hv(e,t,!1,s,i,n,o);return u}function hv(e,t,r,i,n,o,a){t.writelen=i,t.writecb=a,t.writing=!0,t.sync=!0,r?e._writev(n,t.onwrite):e._write(n,o,t.onwrite),t.sync=!1}function vV(e,t,r,i,n){--t.pendingcb,r?(ku.nextTick(n,i),ku.nextTick(Oh,e,t),e._writableState.errorEmitted=!0,e.emit("error",i)):(n(i),e._writableState.errorEmitted=!0,e.emit("error",i),Oh(e,t))}function mV(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function yV(e,t){var r=e._writableState,i=r.sync,n=r.writecb;if(mV(r),t)vV(e,r,i,t,n);else{var o=Uw(r);!o&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&qw(e,r),i?aV(Mw,e,r,o,n):Mw(e,r,o,n)}}function Mw(e,t,r,i){r||bV(e,t),t.pendingcb--,i(),Oh(e,t)}function bV(e,t){t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function qw(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,n=new Array(i),o=t.corkedRequestsFree;o.entry=r;for(var a=0,s=!0;r;)n[a]=r,r.isBuf||(s=!1),r=r.next,a+=1;n.allBuffers=s,hv(e,t,!0,t.length,n,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new Cw(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,c=r.encoding,l=r.callback,m=t.objectMode?1:u.length;if(hv(e,t,!1,m,u,c,l),r=r.next,t.bufferedRequestCount--,t.writing)break}r===null&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}yr.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))};yr.prototype._writev=null;yr.prototype.end=function(e,t,r){var i=this._writableState;typeof e=="function"?(r=e,e=null,t=null):typeof t=="function"&&(r=t,t=null),e!=null&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||SV(this,i,r)};function Uw(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function _V(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),Oh(e,t)})}function wV(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final=="function"?(t.pendingcb++,t.finalCalled=!0,ku.nextTick(_V,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function Oh(e,t){var r=Uw(t);return r&&(wV(e,t),t.pendingcb===0&&(t.finished=!0,e.emit("finish"))),r}function SV(e,t,r){t.ending=!0,Oh(e,t),r&&(t.finished?ku.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function xV(e,t,r){var i=e.entry;for(e.entry=null;i;){var n=i.callback;t.pendingcb--,n(r),i=i.next}t.corkedRequestsFree.next=e}Object.defineProperty(yr.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});yr.prototype.destroy=Lw.destroy;yr.prototype._undestroy=Lw.undestroy;yr.prototype._destroy=function(e,t){this.end(),t(e)}});var Ru=k((ble,Kw)=>{"use strict";v();var Hw=Eh(),EV=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};Kw.exports=da;var jw=Object.create(vc());jw.inherits=Te();var zw=vv(),gv=dv();jw.inherits(da,zw);for(pv=EV(gv.prototype),c2=0;c2<pv.length;c2++)l2=pv[c2],da.prototype[l2]||(da.prototype[l2]=gv.prototype[l2]);var pv,l2,c2;function da(e){if(!(this instanceof da))return new da(e);zw.call(this,e),gv.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",IV)}Object.defineProperty(da.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function IV(){this.allowHalfOpen||this._writableState.ended||Hw.nextTick(OV,this)}function OV(e){e.end()}Object.defineProperty(da.prototype,"destroyed",{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)}});da.prototype._destroy=function(e,t){this.push(null),this.end(),Hw.nextTick(t,e)}});var vv=k((Sle,rS)=>{"use strict";v();var bc=Eh();rS.exports=Wt;var AV=Ow(),Ph;Wt.ReadableState=Xw;var wle=Qf().EventEmitter,Ww=function(e,t){return e.listeners(t).length},wv=uv(),Th=n2().Buffer,PV=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function TV(e){return Th.from(e)}function kV(e){return Th.isBuffer(e)||e instanceof PV}var Yw=Object.create(vc());Yw.inherits=Te();var mv=rn(),Tt=void 0;mv&&mv.debuglog?Tt=mv.debuglog("stream"):Tt=function(){};var RV=Rw(),$w=lv(),yc;Yw.inherits(Wt,wv);var yv=["error","close","destroy","pause","resume"];function BV(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):AV(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}function Xw(e,t){Ph=Ph||Ru(),e=e||{};var r=t instanceof Ph;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,n=e.readableHighWaterMark,o=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=o,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new RV,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=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(yc||(yc=hc().StringDecoder),this.decoder=new yc(e.encoding),this.encoding=e.encoding)}function Wt(e){if(Ph=Ph||Ru(),!(this instanceof Wt))return new Wt(e);this._readableState=new Xw(e,this),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),wv.call(this)}Object.defineProperty(Wt.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});Wt.prototype.destroy=$w.destroy;Wt.prototype._undestroy=$w.undestroy;Wt.prototype._destroy=function(e,t){this.push(null),t(e)};Wt.prototype.push=function(e,t){var r=this._readableState,i;return r.objectMode?i=!0:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=Th.from(e,t),t=""),i=!0),Jw(this,e,t,!1,i)};Wt.prototype.unshift=function(e){return Jw(this,e,null,!0,!1)};function Jw(e,t,r,i,n){var o=e._readableState;if(t===null)o.reading=!1,DV(e,o);else{var a;n||(a=MV(o,t)),a?e.emit("error",a):o.objectMode||t&&t.length>0?(typeof t!="string"&&!o.objectMode&&Object.getPrototypeOf(t)!==Th.prototype&&(t=TV(t)),i?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):bv(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||t.length!==0?bv(e,o,t,!1):Qw(e,o)):bv(e,o,t,!1))):i||(o.reading=!1)}return CV(o)}function bv(e,t,r,i){t.flowing&&t.length===0&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&h2(e)),Qw(e,t)}function MV(e,t){var r;return!kV(t)&&typeof t!="string"&&t!==void 0&&!e.objectMode&&(r=new TypeError("Invalid non-string/buffer chunk")),r}function CV(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||e.length===0)}Wt.prototype.isPaused=function(){return this._readableState.flowing===!1};Wt.prototype.setEncoding=function(e){return yc||(yc=hc().StringDecoder),this._readableState.decoder=new yc(e),this._readableState.encoding=e,this};var Vw=8388608;function NV(e){return e>=Vw?e=Vw:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function Gw(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=NV(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}Wt.prototype.read=function(e){Tt("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return Tt("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?_v(this):h2(this),null;if(e=Gw(e,t),e===0&&t.ended)return t.length===0&&_v(this),null;var i=t.needReadable;Tt("need readable",i),(t.length===0||t.length-e<t.highWaterMark)&&(i=!0,Tt("length less than watermark",i)),t.ended||t.reading?(i=!1,Tt("reading or ended",i)):i&&(Tt("do read"),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=Gw(r,t)));var n;return e>0?n=eS(e,t):n=null,n===null?(t.needReadable=!0,e=0):t.length-=e,t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&_v(this)),n!==null&&this.emit("data",n),n};function DV(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,h2(e)}}function h2(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(Tt("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?bc.nextTick(Zw,e):Zw(e))}function Zw(e){Tt("emit readable"),e.emit("readable"),Sv(e)}function Qw(e,t){t.readingMore||(t.readingMore=!0,bc.nextTick(LV,e,t))}function LV(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(Tt("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}Wt.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))};Wt.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e);break}i.pipesCount+=1,Tt("pipe count=%d opts=%j",i.pipesCount,t);var n=(!t||t.end!==!1)&&e!==A.default.stdout&&e!==A.default.stderr,o=n?s:D;i.endEmitted?bc.nextTick(o):r.once("end",o),e.on("unpipe",a);function a(L,U){Tt("onunpipe"),L===r&&U&&U.hasUnpiped===!1&&(U.hasUnpiped=!0,l())}function s(){Tt("onend"),e.end()}var u=qV(r);e.on("drain",u);var c=!1;function l(){Tt("cleanup"),e.removeListener("close",P),e.removeListener("finish",M),e.removeListener("drain",u),e.removeListener("error",E),e.removeListener("unpipe",a),r.removeListener("end",s),r.removeListener("end",D),r.removeListener("data",w),c=!0,i.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&u()}var m=!1;r.on("data",w);function w(L){Tt("ondata"),m=!1;var U=e.write(L);U===!1&&!m&&((i.pipesCount===1&&i.pipes===e||i.pipesCount>1&&tS(i.pipes,e)!==-1)&&!c&&(Tt("false write response, pause",i.awaitDrain),i.awaitDrain++,m=!0),r.pause())}function E(L){Tt("onerror",L),D(),e.removeListener("error",E),Ww(e,"error")===0&&e.emit("error",L)}BV(e,"error",E);function P(){e.removeListener("finish",M),D()}e.once("close",P);function M(){Tt("onfinish"),e.removeListener("close",P),D()}e.once("finish",M);function D(){Tt("unpipe"),r.unpipe(e)}return e.emit("pipe",r),i.flowing||(Tt("pipe resume"),r.resume()),e};function qV(e){return function(){var t=e._readableState;Tt("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&Ww(e,"data")&&(t.flowing=!0,Sv(e))}}Wt.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var i=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<n;o++)i[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=tS(t.pipes,e);return a===-1?this:(t.pipes.splice(a,1),t.pipesCount-=1,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)};Wt.prototype.on=function(e,t){var r=wv.prototype.on.call(this,e,t);if(e==="data")this._readableState.flowing!==!1&&this.resume();else if(e==="readable"){var i=this._readableState;!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&h2(this):bc.nextTick(UV,this))}return r};Wt.prototype.addListener=Wt.prototype.on;function UV(e){Tt("readable nexttick read 0"),e.read(0)}Wt.prototype.resume=function(){var e=this._readableState;return e.flowing||(Tt("resume"),e.flowing=!0,FV(this,e)),this};function FV(e,t){t.resumeScheduled||(t.resumeScheduled=!0,bc.nextTick(HV,e,t))}function HV(e,t){t.reading||(Tt("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),Sv(e),t.flowing&&!t.reading&&e.read(0)}Wt.prototype.pause=function(){return Tt("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Tt("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function Sv(e){var t=e._readableState;for(Tt("flow",t.flowing);t.flowing&&e.read()!==null;);}Wt.prototype.wrap=function(e){var t=this,r=this._readableState,i=!1;e.on("end",function(){if(Tt("wrapped end"),r.decoder&&!r.ended){var a=r.decoder.end();a&&a.length&&t.push(a)}t.push(null)}),e.on("data",function(a){if(Tt("wrapped data"),r.decoder&&(a=r.decoder.write(a)),!(r.objectMode&&a==null)&&!(!r.objectMode&&(!a||!a.length))){var s=t.push(a);s||(i=!0,e.pause())}});for(var n in e)this[n]===void 0&&typeof e[n]=="function"&&(this[n]=(function(a){return function(){return e[a].apply(e,arguments)}})(n));for(var o=0;o<yv.length;o++)e.on(yv[o],this.emit.bind(this,yv[o]));return this._read=function(a){Tt("wrapped _read",a),i&&(i=!1,e.resume())},this};Object.defineProperty(Wt.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Wt._fromList=eS;function eS(e,t){if(t.length===0)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.head.data:r=t.buffer.concat(t.length),t.buffer.clear()):r=jV(e,t.buffer,t.decoder),r}function jV(e,t,r){var i;return e<t.head.data.length?(i=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):e===t.head.data.length?i=t.shift():i=r?zV(e,t):KV(e,t),i}function zV(e,t){var r=t.head,i=1,n=r.data;for(e-=n.length;r=r.next;){var o=r.data,a=e>o.length?o.length:e;if(a===o.length?n+=o:n+=o.slice(0,e),e-=a,e===0){a===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a));break}++i}return t.length-=i,n}function KV(e,t){var r=Th.allocUnsafe(e),i=t.head,n=1;for(i.data.copy(r),e-=i.data.length;i=i.next;){var o=i.data,a=e>o.length?o.length:e;if(o.copy(r,r.length-e,0,a),e-=a,e===0){a===o.length?(++n,i.next?t.head=i.next:t.head=t.tail=null):(t.head=i,i.data=o.slice(a));break}++n}return t.length-=n,r}function _v(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,bc.nextTick(VV,t,e))}function VV(e,t){!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function tS(e,t){for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1}});var xv=k((Ele,oS)=>{"use strict";v();oS.exports=pa;var d2=Ru(),nS=Object.create(vc());nS.inherits=Te();nS.inherits(pa,d2);function GV(e,t){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,t!=null&&this.push(t),i(e);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function pa(e){if(!(this instanceof pa))return new pa(e);d2.call(this,e),this._transformState={afterTransform:GV.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",ZV)}function ZV(){var e=this;typeof this._flush=="function"?this._flush(function(t,r){iS(e,t,r)}):iS(this,null,null)}pa.prototype.push=function(e,t){return this._transformState.needTransform=!1,d2.prototype.push.call(this,e,t)};pa.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")};pa.prototype._write=function(e,t,r){var i=this._transformState;if(i.writecb=r,i.writechunk=e,i.writeencoding=t,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};pa.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};pa.prototype._destroy=function(e,t){var r=this;d2.prototype._destroy.call(this,e,function(i){t(i),r.emit("close")})};function iS(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}});var fS=k((Ole,uS)=>{"use strict";v();uS.exports=kh;var aS=xv(),sS=Object.create(vc());sS.inherits=Te();sS.inherits(kh,aS);function kh(e){if(!(this instanceof kh))return new kh(e);aS.call(this,e)}kh.prototype._transform=function(e,t,r){r(null,e)}});var lS=k((wo,cS)=>{v();wo=cS.exports=vv();wo.Stream=wo;wo.Readable=wo;wo.Writable=dv();wo.Duplex=Ru();wo.Transform=xv();wo.PassThrough=fS()});var pS=k((Tle,dS)=>{"use strict";v();var WV=ot().Buffer,YV=Ew(),hS=lS().Transform,$V=Te();function us(e){hS.call(this),this._block=WV.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}$V(us,hS);us.prototype._transform=function(e,t,r){var i=null;try{this.update(e,t)}catch(n){i=n}r(i)};us.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(r){t=r}e(t)};us.prototype.update=function(e,t){if(this._finalized)throw new Error("Digest already called");for(var r=YV(e,t),i=this._block,n=0;this._blockOffset+r.length-n>=this._blockSize;){for(var o=this._blockOffset;o<this._blockSize;)i[o]=r[n],o+=1,n+=1;this._update(),this._blockOffset=0}for(;n<r.length;)i[this._blockOffset]=r[n],this._blockOffset+=1,n+=1;for(var a=0,s=r.length*8;s>0;++a)this._length[a]+=s,s=this._length[a]/4294967296|0,s>0&&(this._length[a]-=4294967296*s);return this};us.prototype._update=function(){throw new Error("_update is not implemented")};us.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();e!==void 0&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t};us.prototype._digest=function(){throw new Error("_digest is not implemented")};dS.exports=us});var g2=k((Rle,wS)=>{"use strict";v();var Ev=Kt().Buffer,XV=Te(),_S=pS(),JV=new Array(16),Rh=[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],Bh=[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],Mh=[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],Ch=[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],Nh=[0,1518500249,1859775393,2400959708,2840853838],Dh=[1352829926,1548603684,1836072691,2053994217,0];function Bu(e,t){return e<<t|e>>>32-t}function gS(e,t,r,i,n,o,a,s){return Bu(e+(t^r^i)+o+a|0,s)+n|0}function vS(e,t,r,i,n,o,a,s){return Bu(e+(t&r|~t&i)+o+a|0,s)+n|0}function mS(e,t,r,i,n,o,a,s){return Bu(e+((t|~r)^i)+o+a|0,s)+n|0}function yS(e,t,r,i,n,o,a,s){return Bu(e+(t&i|r&~i)+o+a|0,s)+n|0}function bS(e,t,r,i,n,o,a,s){return Bu(e+(t^(r|~i))+o+a|0,s)+n|0}function p2(){_S.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}XV(p2,_S);p2.prototype._update=function(){for(var e=JV,t=0;t<16;++t)e[t]=this._block.readInt32LE(t*4);for(var r=this._a|0,i=this._b|0,n=this._c|0,o=this._d|0,a=this._e|0,s=this._a|0,u=this._b|0,c=this._c|0,l=this._d|0,m=this._e|0,w=0;w<80;w+=1){var E,P;w<16?(E=gS(r,i,n,o,a,e[Rh[w]],Nh[0],Mh[w]),P=bS(s,u,c,l,m,e[Bh[w]],Dh[0],Ch[w])):w<32?(E=vS(r,i,n,o,a,e[Rh[w]],Nh[1],Mh[w]),P=yS(s,u,c,l,m,e[Bh[w]],Dh[1],Ch[w])):w<48?(E=mS(r,i,n,o,a,e[Rh[w]],Nh[2],Mh[w]),P=mS(s,u,c,l,m,e[Bh[w]],Dh[2],Ch[w])):w<64?(E=yS(r,i,n,o,a,e[Rh[w]],Nh[3],Mh[w]),P=vS(s,u,c,l,m,e[Bh[w]],Dh[3],Ch[w])):(E=bS(r,i,n,o,a,e[Rh[w]],Nh[4],Mh[w]),P=gS(s,u,c,l,m,e[Bh[w]],Dh[4],Ch[w])),r=a,a=o,o=Bu(n,10),n=i,i=E,s=m,m=l,l=Bu(c,10),c=u,u=P}var M=this._b+n+l|0;this._b=this._c+o+m|0,this._c=this._d+a+s|0,this._d=this._e+r+u|0,this._e=this._a+i+c|0,this._a=M};p2.prototype._digest=function(){this._block[this._blockOffset]=128,this._blockOffset+=1,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=Ev.alloc?Ev.alloc(20):new Ev(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e};wS.exports=p2});var Mu=k((Mle,SS)=>{"use strict";v();var QV=ot().Buffer,eG=xh();function v2(e,t){this._block=QV.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}v2.prototype.update=function(e,t){e=eG(e,t||"utf8");for(var r=this._block,i=this._blockSize,n=e.length,o=this._len,a=0;a<n;){for(var s=o%i,u=Math.min(n-a,i-s),c=0;c<u;c++)r[s+c]=e[a+c];o+=u,a+=u,o%i===0&&this._update(r)}return this._len+=n,this};v2.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=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 o=this._hash();return e?o.toString(e):o};v2.prototype._update=function(){throw new Error("_update must be implemented by subclass")};SS.exports=v2});var IS=k((Nle,ES)=>{"use strict";v();var tG=Te(),xS=Mu(),rG=ot().Buffer,iG=[1518500249,1859775393,-1894007588,-899497514],nG=new Array(80);function Lh(){this.init(),this._w=nG,xS.call(this,64,56)}tG(Lh,xS);Lh.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function oG(e){return e<<5|e>>>27}function aG(e){return e<<30|e>>>2}function sG(e,t,r,i){return e===0?t&r|~t&i:e===2?t&r|t&i|r&i:t^r^i}Lh.prototype._update=function(e){for(var t=this._w,r=this._a|0,i=this._b|0,n=this._c|0,o=this._d|0,a=this._e|0,s=0;s<16;++s)t[s]=e.readInt32BE(s*4);for(;s<80;++s)t[s]=t[s-3]^t[s-8]^t[s-14]^t[s-16];for(var u=0;u<80;++u){var c=~~(u/20),l=oG(r)+sG(c,i,n,o)+a+t[u]+iG[c]|0;a=o,o=n,n=aG(i),i=r,r=l}this._a=r+this._a|0,this._b=i+this._b|0,this._c=n+this._c|0,this._d=o+this._d|0,this._e=a+this._e|0};Lh.prototype._hash=function(){var e=rG.allocUnsafe(20);return e.writeInt32BE(this._a|0,0),e.writeInt32BE(this._b|0,4),e.writeInt32BE(this._c|0,8),e.writeInt32BE(this._d|0,12),e.writeInt32BE(this._e|0,16),e};ES.exports=Lh});var PS=k((Lle,AS)=>{"use strict";v();var uG=Te(),OS=Mu(),fG=ot().Buffer,cG=[1518500249,1859775393,-1894007588,-899497514],lG=new Array(80);function qh(){this.init(),this._w=lG,OS.call(this,64,56)}uG(qh,OS);qh.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function hG(e){return e<<1|e>>>31}function dG(e){return e<<5|e>>>27}function pG(e){return e<<30|e>>>2}function gG(e,t,r,i){return e===0?t&r|~t&i:e===2?t&r|t&i|r&i:t^r^i}qh.prototype._update=function(e){for(var t=this._w,r=this._a|0,i=this._b|0,n=this._c|0,o=this._d|0,a=this._e|0,s=0;s<16;++s)t[s]=e.readInt32BE(s*4);for(;s<80;++s)t[s]=hG(t[s-3]^t[s-8]^t[s-14]^t[s-16]);for(var u=0;u<80;++u){var c=~~(u/20),l=dG(r)+gG(c,i,n,o)+a+t[u]+cG[c]|0;a=o,o=n,n=pG(i),i=r,r=l}this._a=r+this._a|0,this._b=i+this._b|0,this._c=n+this._c|0,this._d=o+this._d|0,this._e=a+this._e|0};qh.prototype._hash=function(){var e=fG.allocUnsafe(20);return e.writeInt32BE(this._a|0,0),e.writeInt32BE(this._b|0,4),e.writeInt32BE(this._c|0,8),e.writeInt32BE(this._d|0,12),e.writeInt32BE(this._e|0,16),e};AS.exports=qh});var Iv=k((Ule,kS)=>{"use strict";v();var vG=Te(),TS=Mu(),mG=ot().Buffer,yG=[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],bG=new Array(64);function Uh(){this.init(),this._w=bG,TS.call(this,64,56)}vG(Uh,TS);Uh.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 _G(e,t,r){return r^e&(t^r)}function wG(e,t,r){return e&t|r&(e|t)}function SG(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function xG(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function EG(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function IG(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}Uh.prototype._update=function(e){for(var t=this._w,r=this._a|0,i=this._b|0,n=this._c|0,o=this._d|0,a=this._e|0,s=this._f|0,u=this._g|0,c=this._h|0,l=0;l<16;++l)t[l]=e.readInt32BE(l*4);for(;l<64;++l)t[l]=IG(t[l-2])+t[l-7]+EG(t[l-15])+t[l-16]|0;for(var m=0;m<64;++m){var w=c+xG(a)+_G(a,s,u)+yG[m]+t[m]|0,E=SG(r)+wG(r,i,n)|0;c=u,u=s,s=a,a=o+w|0,o=n,n=i,i=r,r=w+E|0}this._a=r+this._a|0,this._b=i+this._b|0,this._c=n+this._c|0,this._d=o+this._d|0,this._e=a+this._e|0,this._f=s+this._f|0,this._g=u+this._g|0,this._h=c+this._h|0};Uh.prototype._hash=function(){var e=mG.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e};kS.exports=Uh});var BS=k((Hle,RS)=>{"use strict";v();var OG=Te(),AG=Iv(),PG=Mu(),TG=ot().Buffer,kG=new Array(64);function m2(){this.init(),this._w=kG,PG.call(this,64,56)}OG(m2,AG);m2.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};m2.prototype._hash=function(){var e=TG.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e};RS.exports=m2});var Ov=k((zle,US)=>{"use strict";v();var RG=Te(),qS=Mu(),BG=ot().Buffer,MS=[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],MG=new Array(160);function Fh(){this.init(),this._w=MG,qS.call(this,128,112)}RG(Fh,qS);Fh.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 CS(e,t,r){return r^e&(t^r)}function NS(e,t,r){return e&t|r&(e|t)}function DS(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function LS(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function CG(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function NG(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function DG(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function LG(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function zr(e,t){return e>>>0<t>>>0?1:0}Fh.prototype._update=function(e){for(var t=this._w,r=this._ah|0,i=this._bh|0,n=this._ch|0,o=this._dh|0,a=this._eh|0,s=this._fh|0,u=this._gh|0,c=this._hh|0,l=this._al|0,m=this._bl|0,w=this._cl|0,E=this._dl|0,P=this._el|0,M=this._fl|0,D=this._gl|0,L=this._hl|0,U=0;U<32;U+=2)t[U]=e.readInt32BE(U*4),t[U+1]=e.readInt32BE(U*4+4);for(;U<160;U+=2){var K=t[U-30],C=t[U-30+1],N=CG(K,C),F=NG(C,K);K=t[U-4],C=t[U-4+1];var H=DG(K,C),z=LG(C,K),G=t[U-14],B=t[U-14+1],g=t[U-32],I=t[U-32+1],y=F+B|0,f=N+G+zr(y,F)|0;y=y+z|0,f=f+H+zr(y,z)|0,y=y+I|0,f=f+g+zr(y,I)|0,t[U]=f,t[U+1]=y}for(var p=0;p<160;p+=2){f=t[p],y=t[p+1];var _=NS(r,i,n),x=NS(l,m,w),b=DS(r,l),d=DS(l,r),O=LS(a,P),T=LS(P,a),S=MS[p],R=MS[p+1],Y=CS(a,s,u),X=CS(P,M,D),ne=L+T|0,ce=c+O+zr(ne,L)|0;ne=ne+X|0,ce=ce+Y+zr(ne,X)|0,ne=ne+R|0,ce=ce+S+zr(ne,R)|0,ne=ne+y|0,ce=ce+f+zr(ne,y)|0;var pe=d+x|0,q=b+_+zr(pe,d)|0;c=u,L=D,u=s,D=M,s=a,M=P,P=E+ne|0,a=o+ce+zr(P,E)|0,o=n,E=w,n=i,w=m,i=r,m=l,l=ne+pe|0,r=ce+q+zr(l,ne)|0}this._al=this._al+l|0,this._bl=this._bl+m|0,this._cl=this._cl+w|0,this._dl=this._dl+E|0,this._el=this._el+P|0,this._fl=this._fl+M|0,this._gl=this._gl+D|0,this._hl=this._hl+L|0,this._ah=this._ah+r+zr(this._al,l)|0,this._bh=this._bh+i+zr(this._bl,m)|0,this._ch=this._ch+n+zr(this._cl,w)|0,this._dh=this._dh+o+zr(this._dl,E)|0,this._eh=this._eh+a+zr(this._el,P)|0,this._fh=this._fh+s+zr(this._fl,M)|0,this._gh=this._gh+u+zr(this._gl,D)|0,this._hh=this._hh+c+zr(this._hl,L)|0};Fh.prototype._hash=function(){var e=BG.allocUnsafe(64);function t(r,i,n){e.writeInt32BE(r,n),e.writeInt32BE(i,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e};US.exports=Fh});var HS=k((Vle,FS)=>{"use strict";v();var qG=Te(),UG=Ov(),FG=Mu(),HG=ot().Buffer,jG=new Array(160);function y2(){this.init(),this._w=jG,FG.call(this,128,112)}qG(y2,UG);y2.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};y2.prototype._hash=function(){var e=HG.allocUnsafe(48);function t(r,i,n){e.writeInt32BE(r,n),e.writeInt32BE(i,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e};FS.exports=y2});var b2=k((Zle,ga)=>{"use strict";v();ga.exports=function(t){var r=t.toLowerCase(),i=ga.exports[r];if(!i)throw new Error(r+" is not supported (we accept pull requests)");return new i};ga.exports.sha=IS();ga.exports.sha1=PS();ga.exports.sha224=BS();ga.exports.sha256=Iv();ga.exports.sha384=HS();ga.exports.sha512=Ov()});var va=k((Yle,zS)=>{"use strict";v();var zG=ot().Buffer,jS=Qd().Transform,KG=hc().StringDecoder,VG=Te(),GG=xh();function kn(e){jS.call(this),this.hashMode=typeof e=="string",this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}VG(kn,jS);kn.prototype.update=function(e,t,r){var i=GG(e,t),n=this._update(i);return this.hashMode?this:(r&&(n=this._toString(n,r)),n)};kn.prototype.setAutoPadding=function(){};kn.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")};kn.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")};kn.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")};kn.prototype._transform=function(e,t,r){var i;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(n){i=n}finally{r(i)}};kn.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(r){t=r}e(t)};kn.prototype._finalOrDigest=function(e){var t=this.__final()||zG.alloc(0);return e&&(t=this._toString(t,e,!0)),t};kn.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new KG(t),this._encoding=t),this._encoding!==t)throw new Error("can\u2019t switch encodings");var i=this._decoder.write(e);return r&&(i+=this._decoder.end()),i};zS.exports=kn});var Hh=k((Xle,VS)=>{"use strict";v();var ZG=Te(),WG=r2(),YG=g2(),$G=b2(),KS=va();function _2(e){KS.call(this,"digest"),this._hash=e}ZG(_2,KS);_2.prototype._update=function(e){this._hash.update(e)};_2.prototype._final=function(){return this._hash.digest()};VS.exports=function(t){return t=t.toLowerCase(),t==="md5"?new WG:t==="rmd160"||t==="ripemd160"?new YG:new _2($G(t))}});var WS=k((Qle,ZS)=>{"use strict";v();var XG=Te(),Cu=ot().Buffer,GS=va(),JG=Cu.alloc(128),_c=64;function w2(e,t){GS.call(this,"digest"),typeof t=="string"&&(t=Cu.from(t)),this._alg=e,this._key=t,t.length>_c?t=e(t):t.length<_c&&(t=Cu.concat([t,JG],_c));for(var r=this._ipad=Cu.allocUnsafe(_c),i=this._opad=Cu.allocUnsafe(_c),n=0;n<_c;n++)r[n]=t[n]^54,i[n]=t[n]^92;this._hash=[r]}XG(w2,GS);w2.prototype._update=function(e){this._hash.push(e)};w2.prototype._final=function(){var e=this._alg(Cu.concat(this._hash));return this._alg(Cu.concat([this._opad,e]))};ZS.exports=w2});var Av=k((the,YS)=>{v();var QG=r2();YS.exports=function(e){return new QG().update(e).digest()}});var JS=k((ihe,XS)=>{"use strict";v();var eZ=Te(),tZ=WS(),$S=va(),jh=ot().Buffer,rZ=Av(),Pv=g2(),Tv=b2(),iZ=jh.alloc(128);function zh(e,t){$S.call(this,"digest"),typeof t=="string"&&(t=jh.from(t));var r=e==="sha512"||e==="sha384"?128:64;if(this._alg=e,this._key=t,t.length>r){var i=e==="rmd160"?new Pv:Tv(e);t=i.update(t).digest()}else t.length<r&&(t=jh.concat([t,iZ],r));for(var n=this._ipad=jh.allocUnsafe(r),o=this._opad=jh.allocUnsafe(r),a=0;a<r;a++)n[a]=t[a]^54,o[a]=t[a]^92;this._hash=e==="rmd160"?new Pv:Tv(e),this._hash.update(n)}eZ(zh,$S);zh.prototype._update=function(e){this._hash.update(e)};zh.prototype._final=function(){var e=this._hash.digest(),t=this._alg==="rmd160"?new Pv:Tv(this._alg);return t.update(this._opad).update(e).digest()};XS.exports=function(t,r){return t=t.toLowerCase(),t==="rmd160"||t==="ripemd160"?new zh("rmd160",r):t==="md5"?new tZ(rZ,r):new zh(t,r)}});var fs=k((ohe,QS)=>{"use strict";v();QS.exports={}});var kv=k((she,ex)=>{"use strict";v();var nZ=isFinite,oZ=Math.pow(2,30)-1;ex.exports=function(e,t){if(typeof e!="number")throw new TypeError("Iterations not a number");if(e<0||!nZ(e))throw new TypeError("Bad iterations");if(typeof t!="number")throw new TypeError("Key length not a number");if(t<0||t>oZ||t!==t)throw new TypeError("Bad key length")}});var Rv=k((fhe,rx)=>{"use strict";v();var S2;globalThis.process&&globalThis.process.browser?S2="utf-8":globalThis.process&&globalThis.process.version?(tx=parseInt(A.default.version.split(".")[0].slice(1),10),S2=tx>=6?"utf-8":"binary"):S2="utf-8";var tx;rx.exports=S2});var Bv=k((lhe,ox)=>{"use strict";v();var aZ=ot().Buffer,sZ=xh(),nx=typeof Uint8Array<"u",uZ=nx&&typeof ArrayBuffer<"u",ix=uZ&&ArrayBuffer.isView;ox.exports=function(e,t,r){if(typeof e=="string"||aZ.isBuffer(e)||nx&&e instanceof Uint8Array||ix&&ix(e))return sZ(e,t);throw new TypeError(r+" must be a string, a Buffer, a Uint8Array, or a DataView")}});var Mv=k((dhe,fx)=>{"use strict";v();var fZ=Av(),cZ=g2(),lZ=b2(),Nu=ot().Buffer,hZ=kv(),ax=Rv(),sx=Bv(),dZ=Nu.alloc(128),x2={__proto__:null,md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,"sha512-256":32,ripemd160:20,rmd160:20},pZ={__proto__:null,"sha-1":"sha1","sha-224":"sha224","sha-256":"sha256","sha-384":"sha384","sha-512":"sha512","ripemd-160":"ripemd160"};function gZ(e){return new cZ().update(e).digest()}function vZ(e){function t(r){return lZ(e).update(r).digest()}return e==="rmd160"||e==="ripemd160"?gZ:e==="md5"?fZ:t}function ux(e,t,r){var i=vZ(e),n=e==="sha512"||e==="sha384"?128:64;t.length>n?t=i(t):t.length<n&&(t=Nu.concat([t,dZ],n));for(var o=Nu.allocUnsafe(n+x2[e]),a=Nu.allocUnsafe(n+x2[e]),s=0;s<n;s++)o[s]=t[s]^54,a[s]=t[s]^92;var u=Nu.allocUnsafe(n+r+4);o.copy(u,0,0,n),this.ipad1=u,this.ipad2=o,this.opad=a,this.alg=e,this.blocksize=n,this.hash=i,this.size=x2[e]}ux.prototype.run=function(e,t){e.copy(t,this.blocksize);var r=this.hash(t);return r.copy(this.opad,this.blocksize),this.hash(this.opad)};function mZ(e,t,r,i,n){hZ(r,i),e=sx(e,ax,"Password"),t=sx(t,ax,"Salt");var o=(n||"sha1").toLowerCase(),a=pZ[o]||o,s=x2[a];if(typeof s!="number"||!s)throw new TypeError("Digest algorithm not supported: "+n);var u=new ux(a,e,t.length),c=Nu.allocUnsafe(i),l=Nu.allocUnsafe(t.length+4);t.copy(l,0,0,t.length);for(var m=0,w=s,E=Math.ceil(i/w),P=1;P<=E;P++){l.writeUInt32BE(P,t.length);for(var M=u.run(l,u.ipad1),D=M,L=1;L<r;L++){D=u.run(D,u.ipad2);for(var U=0;U<w;U++)M[U]^=D[U]}M.copy(c,m),m+=w}return c}fx.exports=mZ});var vx=k((ghe,gx)=>{"use strict";v();var dx=ot().Buffer,yZ=kv(),cx=Rv(),lx=Mv(),hx=Bv(),E2,Kh=globalThis.crypto&&globalThis.crypto.subtle,bZ={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"},Cv=[],Du;function Nv(){return Du||(globalThis.process&&globalThis.process.nextTick?Du=globalThis.process.nextTick:globalThis.queueMicrotask?Du=globalThis.queueMicrotask:globalThis.setImmediate?Du=globalThis.setImmediate:Du=globalThis.setTimeout,Du)}function px(e,t,r,i,n){return Kh.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then(function(o){return Kh.deriveBits({name:"PBKDF2",salt:t,iterations:r,hash:{name:n}},o,i<<3)}).then(function(o){return dx.from(o)})}function _Z(e){if(globalThis.process&&!globalThis.process.browser||!Kh||!Kh.importKey||!Kh.deriveBits)return Promise.resolve(!1);if(Cv[e]!==void 0)return Cv[e];E2=E2||dx.alloc(8);var t=px(E2,E2,10,128,e).then(function(){return!0},function(){return!1});return Cv[e]=t,t}function wZ(e,t){e.then(function(r){Nv()(function(){t(null,r)})},function(r){Nv()(function(){t(r)})})}gx.exports=function(e,t,r,i,n,o){if(typeof n=="function"&&(o=n,n=void 0),yZ(r,i),e=hx(e,cx,"Password"),t=hx(t,cx,"Salt"),typeof o!="function")throw new Error("No callback provided to pbkdf2");n=n||"sha1";var a=bZ[n.toLowerCase()];if(!a||typeof globalThis.Promise!="function"){Nv()(function(){var s;try{s=lx(e,t,r,i,n)}catch(u){o(u);return}o(null,s)});return}wZ(_Z(a).then(function(s){return s?px(e,t,r,i,a):lx(e,t,r,i,n)}),o)}});var Lv=k(Dv=>{"use strict";v();Dv.pbkdf2=vx();Dv.pbkdf2Sync=Mv()});var qv=k(an=>{"use strict";v();an.readUInt32BE=function(t,r){var i=t[0+r]<<24|t[1+r]<<16|t[2+r]<<8|t[3+r];return i>>>0};an.writeUInt32BE=function(t,r,i){t[0+i]=r>>>24,t[1+i]=r>>>16&255,t[2+i]=r>>>8&255,t[3+i]=r&255};an.ip=function(t,r,i,n){for(var o=0,a=0,s=6;s>=0;s-=2){for(var u=0;u<=24;u+=8)o<<=1,o|=r>>>u+s&1;for(var u=0;u<=24;u+=8)o<<=1,o|=t>>>u+s&1}for(var s=6;s>=0;s-=2){for(var u=1;u<=25;u+=8)a<<=1,a|=r>>>u+s&1;for(var u=1;u<=25;u+=8)a<<=1,a|=t>>>u+s&1}i[n+0]=o>>>0,i[n+1]=a>>>0};an.rip=function(t,r,i,n){for(var o=0,a=0,s=0;s<4;s++)for(var u=24;u>=0;u-=8)o<<=1,o|=r>>>u+s&1,o<<=1,o|=t>>>u+s&1;for(var s=4;s<8;s++)for(var u=24;u>=0;u-=8)a<<=1,a|=r>>>u+s&1,a<<=1,a|=t>>>u+s&1;i[n+0]=o>>>0,i[n+1]=a>>>0};an.pc1=function(t,r,i,n){for(var o=0,a=0,s=7;s>=5;s--){for(var u=0;u<=24;u+=8)o<<=1,o|=r>>u+s&1;for(var u=0;u<=24;u+=8)o<<=1,o|=t>>u+s&1}for(var u=0;u<=24;u+=8)o<<=1,o|=r>>u+s&1;for(var s=1;s<=3;s++){for(var u=0;u<=24;u+=8)a<<=1,a|=r>>u+s&1;for(var u=0;u<=24;u+=8)a<<=1,a|=t>>u+s&1}for(var u=0;u<=24;u+=8)a<<=1,a|=t>>u+s&1;i[n+0]=o>>>0,i[n+1]=a>>>0};an.r28shl=function(t,r){return t<<r&268435455|t>>>28-r};var I2=[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];an.pc2=function(t,r,i,n){for(var o=0,a=0,s=I2.length>>>1,u=0;u<s;u++)o<<=1,o|=t>>>I2[u]&1;for(var u=s;u<I2.length;u++)a<<=1,a|=r>>>I2[u]&1;i[n+0]=o>>>0,i[n+1]=a>>>0};an.expand=function(t,r,i){var n=0,o=0;n=(t&1)<<5|t>>>27;for(var a=23;a>=15;a-=4)n<<=6,n|=t>>>a&63;for(var a=11;a>=3;a-=4)o|=t>>>a&63,o<<=6;o|=(t&31)<<1|t>>>31,r[i+0]=n>>>0,r[i+1]=o>>>0};var mx=[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];an.substitute=function(t,r){for(var i=0,n=0;n<4;n++){var o=t>>>18-n*6&63,a=mx[n*64+o];i<<=4,i|=a}for(var n=0;n<4;n++){var o=r>>>18-n*6&63,a=mx[256+n*64+o];i<<=4,i|=a}return i>>>0};var yx=[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];an.permute=function(t){for(var r=0,i=0;i<yx.length;i++)r<<=1,r|=t>>>yx[i]&1;return r>>>0};an.padSplit=function(t,r,i){for(var n=t.toString(2);n.length<r;)n="0"+n;for(var o=[],a=0;a<r;a+=i)o.push(n.slice(a,a+i));return o.join(" ")}});var Rn=k((whe,_x)=>{v();_x.exports=bx;function bx(e,t){if(!e)throw new Error(t||"Assertion failed")}bx.equal=function(t,r,i){if(t!=r)throw new Error(i||"Assertion failed: "+t+" != "+r)}});var O2=k((xhe,wx)=>{"use strict";v();var SZ=Rn();function sn(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=e.padding!==!1}wx.exports=sn;sn.prototype._init=function(){};sn.prototype.update=function(t){return t.length===0?[]:this.type==="decrypt"?this._updateDecrypt(t):this._updateEncrypt(t)};sn.prototype._buffer=function(t,r){for(var i=Math.min(this.buffer.length-this.bufferOff,t.length-r),n=0;n<i;n++)this.buffer[this.bufferOff+n]=t[r+n];return this.bufferOff+=i,i};sn.prototype._flushBuffer=function(t,r){return this._update(this.buffer,0,t,r),this.bufferOff=0,this.blockSize};sn.prototype._updateEncrypt=function(t){var r=0,i=0,n=(this.bufferOff+t.length)/this.blockSize|0,o=new Array(n*this.blockSize);this.bufferOff!==0&&(r+=this._buffer(t,r),this.bufferOff===this.buffer.length&&(i+=this._flushBuffer(o,i)));for(var a=t.length-(t.length-r)%this.blockSize;r<a;r+=this.blockSize)this._update(t,r,o,i),i+=this.blockSize;for(;r<t.length;r++,this.bufferOff++)this.buffer[this.bufferOff]=t[r];return o};sn.prototype._updateDecrypt=function(t){for(var r=0,i=0,n=Math.ceil((this.bufferOff+t.length)/this.blockSize)-1,o=new Array(n*this.blockSize);n>0;n--)r+=this._buffer(t,r),i+=this._flushBuffer(o,i);return r+=this._buffer(t,r),o};sn.prototype.final=function(t){var r;t&&(r=this.update(t));var i;return this.type==="encrypt"?i=this._finalEncrypt():i=this._finalDecrypt(),r?r.concat(i):i};sn.prototype._pad=function(t,r){if(r===0)return!1;for(;r<t.length;)t[r++]=0;return!0};sn.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var t=new Array(this.blockSize);return this._update(this.buffer,0,t,0),t};sn.prototype._unpad=function(t){return t};sn.prototype._finalDecrypt=function(){SZ.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var t=new Array(this.blockSize);return this._flushBuffer(t,0),this._unpad(t)}});var Uv=k((Ihe,Ex)=>{"use strict";v();var Sx=Rn(),xZ=Te(),Rr=qv(),xx=O2();function EZ(){this.tmp=new Array(2),this.keys=null}function So(e){xx.call(this,e);var t=new EZ;this._desState=t,this.deriveKeys(t,e.key)}xZ(So,xx);Ex.exports=So;So.create=function(t){return new So(t)};var IZ=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];So.prototype.deriveKeys=function(t,r){t.keys=new Array(32),Sx.equal(r.length,this.blockSize,"Invalid key length");var i=Rr.readUInt32BE(r,0),n=Rr.readUInt32BE(r,4);Rr.pc1(i,n,t.tmp,0),i=t.tmp[0],n=t.tmp[1];for(var o=0;o<t.keys.length;o+=2){var a=IZ[o>>>1];i=Rr.r28shl(i,a),n=Rr.r28shl(n,a),Rr.pc2(i,n,t.keys,o)}};So.prototype._update=function(t,r,i,n){var o=this._desState,a=Rr.readUInt32BE(t,r),s=Rr.readUInt32BE(t,r+4);Rr.ip(a,s,o.tmp,0),a=o.tmp[0],s=o.tmp[1],this.type==="encrypt"?this._encrypt(o,a,s,o.tmp,0):this._decrypt(o,a,s,o.tmp,0),a=o.tmp[0],s=o.tmp[1],Rr.writeUInt32BE(i,a,n),Rr.writeUInt32BE(i,s,n+4)};So.prototype._pad=function(t,r){if(this.padding===!1)return!1;for(var i=t.length-r,n=r;n<t.length;n++)t[n]=i;return!0};So.prototype._unpad=function(t){if(this.padding===!1)return t;for(var r=t[t.length-1],i=t.length-r;i<t.length;i++)Sx.equal(t[i],r);return t.slice(0,t.length-r)};So.prototype._encrypt=function(t,r,i,n,o){for(var a=r,s=i,u=0;u<t.keys.length;u+=2){var c=t.keys[u],l=t.keys[u+1];Rr.expand(s,t.tmp,0),c^=t.tmp[0],l^=t.tmp[1];var m=Rr.substitute(c,l),w=Rr.permute(m),E=s;s=(a^w)>>>0,a=E}Rr.rip(s,a,n,o)};So.prototype._decrypt=function(t,r,i,n,o){for(var a=i,s=r,u=t.keys.length-2;u>=0;u-=2){var c=t.keys[u],l=t.keys[u+1];Rr.expand(a,t.tmp,0),c^=t.tmp[0],l^=t.tmp[1];var m=Rr.substitute(c,l),w=Rr.permute(m),E=a;a=(s^w)>>>0,s=E}Rr.rip(a,s,n,o)}});var Ox=k(Ix=>{"use strict";v();var OZ=Rn(),AZ=Te(),A2={};function PZ(e){OZ.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t<this.iv.length;t++)this.iv[t]=e[t]}function TZ(e){function t(o){e.call(this,o),this._cbcInit()}AZ(t,e);for(var r=Object.keys(A2),i=0;i<r.length;i++){var n=r[i];t.prototype[n]=A2[n]}return t.create=function(a){return new t(a)},t}Ix.instantiate=TZ;A2._cbcInit=function(){var t=new PZ(this.options.iv);this._cbcState=t};A2._update=function(t,r,i,n){var o=this._cbcState,a=this.constructor.super_.prototype,s=o.iv;if(this.type==="encrypt"){for(var u=0;u<this.blockSize;u++)s[u]^=t[r+u];a._update.call(this,s,0,i,n);for(var u=0;u<this.blockSize;u++)s[u]=i[n+u]}else{a._update.call(this,t,r,i,n);for(var u=0;u<this.blockSize;u++)i[n+u]^=s[u];for(var u=0;u<this.blockSize;u++)s[u]=t[r+u]}}});var Tx=k((The,Px)=>{"use strict";v();var kZ=Rn(),RZ=Te(),Ax=O2(),cs=Uv();function BZ(e,t){kZ.equal(t.length,24,"Invalid key length");var r=t.slice(0,8),i=t.slice(8,16),n=t.slice(16,24);e==="encrypt"?this.ciphers=[cs.create({type:"encrypt",key:r}),cs.create({type:"decrypt",key:i}),cs.create({type:"encrypt",key:n})]:this.ciphers=[cs.create({type:"decrypt",key:n}),cs.create({type:"encrypt",key:i}),cs.create({type:"decrypt",key:r})]}function Lu(e){Ax.call(this,e);var t=new BZ(this.type,this.options.key);this._edeState=t}RZ(Lu,Ax);Px.exports=Lu;Lu.create=function(t){return new Lu(t)};Lu.prototype._update=function(t,r,i,n){var o=this._edeState;o.ciphers[0]._update(t,r,i,n),o.ciphers[1]._update(i,n,i,n),o.ciphers[2]._update(i,n,i,n)};Lu.prototype._pad=cs.prototype._pad;Lu.prototype._unpad=cs.prototype._unpad});var kx=k(wc=>{"use strict";v();wc.utils=qv();wc.Cipher=O2();wc.DES=Uv();wc.CBC=Ox();wc.EDE=Tx()});var Mx=k((Mhe,Bx)=>{v();var Rx=va(),ma=kx(),MZ=Te(),qu=ot().Buffer,Vh={"des-ede3-cbc":ma.CBC.instantiate(ma.EDE),"des-ede3":ma.EDE,"des-ede-cbc":ma.CBC.instantiate(ma.EDE),"des-ede":ma.EDE,"des-cbc":ma.CBC.instantiate(ma.DES),"des-ecb":ma.DES};Vh.des=Vh["des-cbc"];Vh.des3=Vh["des-ede3-cbc"];Bx.exports=P2;MZ(P2,Rx);function P2(e){Rx.call(this);var t=e.mode.toLowerCase(),r=Vh[t],i;e.decrypt?i="decrypt":i="encrypt";var n=e.key;qu.isBuffer(n)||(n=qu.from(n)),(t==="des-ede"||t==="des-ede-cbc")&&(n=qu.concat([n,n.slice(0,8)]));var o=e.iv;qu.isBuffer(o)||(o=qu.from(o)),this._des=r.create({key:n,iv:o,type:i})}P2.prototype._update=function(e){return qu.from(this._des.update(e))};P2.prototype._final=function(){return qu.from(this._des.final())}});var Cx=k(Fv=>{v();Fv.encrypt=function(e,t){return e._cipher.encryptBlock(t)};Fv.decrypt=function(e,t){return e._cipher.decryptBlock(t)}});var Sc=k((Lhe,Nx)=>{v();Nx.exports=function(t,r){for(var i=Math.min(t.length,r.length),n=new h.Buffer(i),o=0;o<i;++o)n[o]=t[o]^r[o];return n}});var Lx=k(Hv=>{v();var Dx=Sc();Hv.encrypt=function(e,t){var r=Dx(t,e._prev);return e._prev=e._cipher.encryptBlock(r),e._prev};Hv.decrypt=function(e,t){var r=e._prev;e._prev=t;var i=e._cipher.decryptBlock(t);return Dx(i,r)}});var Fx=k(Ux=>{v();var Gh=ot().Buffer,CZ=Sc();function qx(e,t,r){var i=t.length,n=CZ(t,e._cache);return e._cache=e._cache.slice(i),e._prev=Gh.concat([e._prev,r?t:n]),n}Ux.encrypt=function(e,t,r){for(var i=Gh.allocUnsafe(0),n;t.length;)if(e._cache.length===0&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=Gh.allocUnsafe(0)),e._cache.length<=t.length)n=e._cache.length,i=Gh.concat([i,qx(e,t.slice(0,n),r)]),t=t.slice(n);else{i=Gh.concat([i,qx(e,t,r)]);break}return i}});var jx=k(Hx=>{v();var jv=ot().Buffer;function NZ(e,t,r){var i=e._cipher.encryptBlock(e._prev),n=i[0]^t;return e._prev=jv.concat([e._prev.slice(1),jv.from([r?t:n])]),n}Hx.encrypt=function(e,t,r){for(var i=t.length,n=jv.allocUnsafe(i),o=-1;++o<i;)n[o]=NZ(e,t[o],r);return n}});var Kx=k(zx=>{v();var T2=ot().Buffer;function DZ(e,t,r){for(var i,n=-1,o=8,a=0,s,u;++n<o;)i=e._cipher.encryptBlock(e._prev),s=t&1<<7-n?128:0,u=i[0]^s,a+=(u&128)>>n%8,e._prev=LZ(e._prev,r?s:u);return a}function LZ(e,t){var r=e.length,i=-1,n=T2.allocUnsafe(e.length);for(e=T2.concat([e,T2.from([t])]);++i<r;)n[i]=e[i]<<1|e[i+1]>>7;return n}zx.encrypt=function(e,t,r){for(var i=t.length,n=T2.allocUnsafe(i),o=-1;++o<i;)n[o]=DZ(e,t[o],r);return n}});var Gx=k(Vx=>{v();var qZ=Sc();function UZ(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}Vx.encrypt=function(e,t){for(;e._cache.length<t.length;)e._cache=h.Buffer.concat([e._cache,UZ(e)]);var r=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),qZ(t,r)}});var zv=k((Yhe,Zx)=>{v();function FZ(e){for(var t=e.length,r;t--;)if(r=e.readUInt8(t),r===255)e.writeUInt8(0,t);else{r++,e.writeUInt8(r,t);break}}Zx.exports=FZ});var Vv=k(Yx=>{v();var HZ=Sc(),Wx=ot().Buffer,jZ=zv();function zZ(e){var t=e._cipher.encryptBlockRaw(e._prev);return jZ(e._prev),t}var Kv=16;Yx.encrypt=function(e,t){var r=Math.ceil(t.length/Kv),i=e._cache.length;e._cache=Wx.concat([e._cache,Wx.allocUnsafe(r*Kv)]);for(var n=0;n<r;n++){var o=zZ(e),a=i+n*Kv;e._cache.writeUInt32BE(o[0],a+0),e._cache.writeUInt32BE(o[1],a+4),e._cache.writeUInt32BE(o[2],a+8),e._cache.writeUInt32BE(o[3],a+12)}var s=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),HZ(t,s)}});var Gv=k((Qhe,KZ)=>{KZ.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 R2=k((e0e,$x)=>{v();var VZ={ECB:Cx(),CBC:Lx(),CFB:Fx(),CFB8:jx(),CFB1:Kx(),OFB:Gx(),CTR:Vv(),GCM:Vv()},k2=Gv();for(Zv in k2)k2[Zv].module=VZ[k2[Zv].mode];var Zv;$x.exports=k2});var Zh=k((r0e,Jx)=>{v();var B2=ot().Buffer;function Yv(e){B2.isBuffer(e)||(e=B2.from(e));for(var t=e.length/4|0,r=new Array(t),i=0;i<t;i++)r[i]=e.readUInt32BE(i*4);return r}function Wv(e){for(var t=0;t<e.length;e++)e[t]=0}function Xx(e,t,r,i,n){for(var o=r[0],a=r[1],s=r[2],u=r[3],c=e[0]^t[0],l=e[1]^t[1],m=e[2]^t[2],w=e[3]^t[3],E,P,M,D,L=4,U=1;U<n;U++)E=o[c>>>24]^a[l>>>16&255]^s[m>>>8&255]^u[w&255]^t[L++],P=o[l>>>24]^a[m>>>16&255]^s[w>>>8&255]^u[c&255]^t[L++],M=o[m>>>24]^a[w>>>16&255]^s[c>>>8&255]^u[l&255]^t[L++],D=o[w>>>24]^a[c>>>16&255]^s[l>>>8&255]^u[m&255]^t[L++],c=E,l=P,m=M,w=D;return E=(i[c>>>24]<<24|i[l>>>16&255]<<16|i[m>>>8&255]<<8|i[w&255])^t[L++],P=(i[l>>>24]<<24|i[m>>>16&255]<<16|i[w>>>8&255]<<8|i[c&255])^t[L++],M=(i[m>>>24]<<24|i[w>>>16&255]<<16|i[c>>>8&255]<<8|i[l&255])^t[L++],D=(i[w>>>24]<<24|i[c>>>16&255]<<16|i[l>>>8&255]<<8|i[m&255])^t[L++],E=E>>>0,P=P>>>0,M=M>>>0,D=D>>>0,[E,P,M,D]}var GZ=[0,1,2,4,8,16,32,64,128,27,54],br=(function(){for(var e=new Array(256),t=0;t<256;t++)t<128?e[t]=t<<1:e[t]=t<<1^283;for(var r=[],i=[],n=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,u=0;u<256;++u){var c=s^s<<1^s<<2^s<<3^s<<4;c=c>>>8^c&255^99,r[a]=c,i[c]=a;var l=e[a],m=e[l],w=e[m],E=e[c]*257^c*16843008;n[0][a]=E<<24|E>>>8,n[1][a]=E<<16|E>>>16,n[2][a]=E<<8|E>>>24,n[3][a]=E,E=w*16843009^m*65537^l*257^a*16843008,o[0][c]=E<<24|E>>>8,o[1][c]=E<<16|E>>>16,o[2][c]=E<<8|E>>>24,o[3][c]=E,a===0?a=s=1:(a=l^e[e[e[w^l]]],s^=e[e[s]])}return{SBOX:r,INV_SBOX:i,SUB_MIX:n,INV_SUB_MIX:o}})();function un(e){this._key=Yv(e),this._reset()}un.blockSize=16;un.keySize=256/8;un.prototype.blockSize=un.blockSize;un.prototype.keySize=un.keySize;un.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,i=(r+1)*4,n=[],o=0;o<t;o++)n[o]=e[o];for(o=t;o<i;o++){var a=n[o-1];o%t===0?(a=a<<8|a>>>24,a=br.SBOX[a>>>24]<<24|br.SBOX[a>>>16&255]<<16|br.SBOX[a>>>8&255]<<8|br.SBOX[a&255],a^=GZ[o/t|0]<<24):t>6&&o%t===4&&(a=br.SBOX[a>>>24]<<24|br.SBOX[a>>>16&255]<<16|br.SBOX[a>>>8&255]<<8|br.SBOX[a&255]),n[o]=n[o-t]^a}for(var s=[],u=0;u<i;u++){var c=i-u,l=n[c-(u%4?0:4)];u<4||c<=4?s[u]=l:s[u]=br.INV_SUB_MIX[0][br.SBOX[l>>>24]]^br.INV_SUB_MIX[1][br.SBOX[l>>>16&255]]^br.INV_SUB_MIX[2][br.SBOX[l>>>8&255]]^br.INV_SUB_MIX[3][br.SBOX[l&255]]}this._nRounds=r,this._keySchedule=n,this._invKeySchedule=s};un.prototype.encryptBlockRaw=function(e){return e=Yv(e),Xx(e,this._keySchedule,br.SUB_MIX,br.SBOX,this._nRounds)};un.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=B2.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r};un.prototype.decryptBlock=function(e){e=Yv(e);var t=e[1];e[1]=e[3],e[3]=t;var r=Xx(e,this._invKeySchedule,br.INV_SUB_MIX,br.INV_SBOX,this._nRounds),i=B2.allocUnsafe(16);return i.writeUInt32BE(r[0],0),i.writeUInt32BE(r[3],4),i.writeUInt32BE(r[2],8),i.writeUInt32BE(r[1],12),i};un.prototype.scrub=function(){Wv(this._keySchedule),Wv(this._invKeySchedule),Wv(this._key)};Jx.exports.AES=un});var tE=k((n0e,eE)=>{v();var xc=ot().Buffer,ZZ=xc.alloc(16,0);function WZ(e){return[e.readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)]}function Qx(e){var t=xc.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function Wh(e){this.h=e,this.state=xc.alloc(16,0),this.cache=xc.allocUnsafe(0)}Wh.prototype.ghash=function(e){for(var t=-1;++t<e.length;)this.state[t]^=e[t];this._multiply()};Wh.prototype._multiply=function(){for(var e=WZ(this.h),t=[0,0,0,0],r,i,n,o=-1;++o<128;){for(i=(this.state[~~(o/8)]&1<<7-o%8)!==0,i&&(t[0]^=e[0],t[1]^=e[1],t[2]^=e[2],t[3]^=e[3]),n=(e[3]&1)!==0,r=3;r>0;r--)e[r]=e[r]>>>1|(e[r-1]&1)<<31;e[0]=e[0]>>>1,n&&(e[0]=e[0]^225<<24)}this.state=Qx(t)};Wh.prototype.update=function(e){this.cache=xc.concat([this.cache,e]);for(var t;this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)};Wh.prototype.final=function(e,t){return this.cache.length&&this.ghash(xc.concat([this.cache,ZZ],16)),this.ghash(Qx([0,e,0,t])),this.state};eE.exports=Wh});var $v=k((a0e,nE)=>{v();var YZ=Zh(),Pi=ot().Buffer,rE=va(),$Z=Te(),iE=tE(),XZ=Sc(),JZ=zv();function QZ(e,t){var r=0;e.length!==t.length&&r++;for(var i=Math.min(e.length,t.length),n=0;n<i;++n)r+=e[n]^t[n];return r}function eW(e,t,r){if(t.length===12)return e._finID=Pi.concat([t,Pi.from([0,0,0,1])]),Pi.concat([t,Pi.from([0,0,0,2])]);var i=new iE(r),n=t.length,o=n%16;i.update(t),o&&(o=16-o,i.update(Pi.alloc(o,0))),i.update(Pi.alloc(8,0));var a=n*8,s=Pi.alloc(8);s.writeUIntBE(a,0,8),i.update(s),e._finID=i.state;var u=Pi.from(e._finID);return JZ(u),u}function Uu(e,t,r,i){rE.call(this);var n=Pi.alloc(4,0);this._cipher=new YZ.AES(t);var o=this._cipher.encryptBlock(n);this._ghash=new iE(o),r=eW(this,r,o),this._prev=Pi.from(r),this._cache=Pi.allocUnsafe(0),this._secCache=Pi.allocUnsafe(0),this._decrypt=i,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}$Z(Uu,rE);Uu.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=Pi.alloc(t,0),this._ghash.update(t))}this._called=!0;var r=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(r),this._len+=e.length,r};Uu.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=XZ(this._ghash.final(this._alen*8,this._len*8),this._cipher.encryptBlock(this._finID));if(this._decrypt&&QZ(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=e,this._cipher.scrub()};Uu.prototype.getAuthTag=function(){if(this._decrypt||!Pi.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag};Uu.prototype.setAuthTag=function(t){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=t};Uu.prototype.setAAD=function(t){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(t),this._alen+=t.length};nE.exports=Uu});var Jv=k((u0e,aE)=>{v();var tW=Zh(),Xv=ot().Buffer,oE=va(),rW=Te();function M2(e,t,r,i){oE.call(this),this._cipher=new tW.AES(t),this._prev=Xv.from(r),this._cache=Xv.allocUnsafe(0),this._secCache=Xv.allocUnsafe(0),this._decrypt=i,this._mode=e}rW(M2,oE);M2.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)};M2.prototype._final=function(){this._cipher.scrub()};aE.exports=M2});var Yh=k((c0e,sE)=>{v();var Fu=ot().Buffer,iW=r2();function nW(e,t,r,i){if(Fu.isBuffer(e)||(e=Fu.from(e,"binary")),t&&(Fu.isBuffer(t)||(t=Fu.from(t,"binary")),t.length!==8))throw new RangeError("salt should be Buffer with 8 byte length");for(var n=r/8,o=Fu.alloc(n),a=Fu.alloc(i||0),s=Fu.alloc(0);n>0||i>0;){var u=new iW;u.update(s),u.update(e),t&&u.update(t),s=u.digest();var c=0;if(n>0){var l=o.length-n;c=Math.min(n,s.length),s.copy(o,l,0,c),n-=c}if(c<s.length&&i>0){var m=a.length-i,w=Math.min(i,s.length-c);s.copy(a,m,c,c+w),i-=w}}return s.fill(0),{key:o,iv:a}}sE.exports=nW});var lE=k(Qv=>{v();var uE=R2(),oW=$v(),ya=ot().Buffer,aW=Jv(),fE=va(),sW=Zh(),uW=Yh(),fW=Te();function $h(e,t,r){fE.call(this),this._cache=new C2,this._cipher=new sW.AES(t),this._prev=ya.from(r),this._mode=e,this._autopadding=!0}fW($h,fE);$h.prototype._update=function(e){this._cache.add(e);for(var t,r,i=[];t=this._cache.get();)r=this._mode.encrypt(this,t),i.push(r);return ya.concat(i)};var cW=ya.alloc(16,16);$h.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(cW))throw this._cipher.scrub(),new Error("data not multiple of block length")};$h.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this};function C2(){this.cache=ya.allocUnsafe(0)}C2.prototype.add=function(e){this.cache=ya.concat([this.cache,e])};C2.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null};C2.prototype.flush=function(){for(var e=16-this.cache.length,t=ya.allocUnsafe(e),r=-1;++r<e;)t.writeUInt8(e,r);return ya.concat([this.cache,t])};function cE(e,t,r){var i=uE[e.toLowerCase()];if(!i)throw new TypeError("invalid suite type");if(typeof t=="string"&&(t=ya.from(t)),t.length!==i.key/8)throw new TypeError("invalid key length "+t.length);if(typeof r=="string"&&(r=ya.from(r)),i.mode!=="GCM"&&r.length!==i.iv)throw new TypeError("invalid iv length "+r.length);return i.type==="stream"?new aW(i.module,t,r):i.type==="auth"?new oW(i.module,t,r):new $h(i.module,t,r)}function lW(e,t){var r=uE[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=uW(t,!1,r.key,r.iv);return cE(e,i.key,i.iv)}Qv.createCipheriv=cE;Qv.createCipher=lW});var gE=k(em=>{v();var hW=$v(),Ec=ot().Buffer,hE=R2(),dW=Jv(),dE=va(),pW=Zh(),gW=Yh(),vW=Te();function Xh(e,t,r){dE.call(this),this._cache=new N2,this._last=void 0,this._cipher=new pW.AES(t),this._prev=Ec.from(r),this._mode=e,this._autopadding=!0}vW(Xh,dE);Xh.prototype._update=function(e){this._cache.add(e);for(var t,r,i=[];t=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,t),i.push(r);return Ec.concat(i)};Xh.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return mW(this._mode.decrypt(this,e));if(e)throw new Error("data not multiple of block length")};Xh.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this};function N2(){this.cache=Ec.allocUnsafe(0)}N2.prototype.add=function(e){this.cache=Ec.concat([this.cache,e])};N2.prototype.get=function(e){var t;if(e){if(this.cache.length>16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null};N2.prototype.flush=function(){if(this.cache.length)return this.cache};function mW(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");for(var r=-1;++r<t;)if(e[r+(16-t)]!==t)throw new Error("unable to decrypt data");if(t!==16)return e.slice(0,16-t)}function pE(e,t,r){var i=hE[e.toLowerCase()];if(!i)throw new TypeError("invalid suite type");if(typeof r=="string"&&(r=Ec.from(r)),i.mode!=="GCM"&&r.length!==i.iv)throw new TypeError("invalid iv length "+r.length);if(typeof t=="string"&&(t=Ec.from(t)),t.length!==i.key/8)throw new TypeError("invalid key length "+t.length);return i.type==="stream"?new dW(i.module,t,r,!0):i.type==="auth"?new hW(i.module,t,r,!0):new Xh(i.module,t,r)}function yW(e,t){var r=hE[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=gW(t,!1,r.key,r.iv);return pE(e,i.key,i.iv)}em.createDecipher=yW;em.createDecipheriv=pE});var D2=k(Bn=>{v();var vE=lE(),mE=gE(),bW=Gv();function _W(){return Object.keys(bW)}Bn.createCipher=Bn.Cipher=vE.createCipher;Bn.createCipheriv=Bn.Cipheriv=vE.createCipheriv;Bn.createDecipher=Bn.Decipher=mE.createDecipher;Bn.createDecipheriv=Bn.Decipheriv=mE.createDecipheriv;Bn.listCiphers=Bn.getCiphers=_W});var yE=k(ba=>{v();ba["des-ecb"]={key:8,iv:0};ba["des-cbc"]=ba.des={key:8,iv:8};ba["des-ede3-cbc"]=ba.des3={key:24,iv:8};ba["des-ede3"]={key:24,iv:0};ba["des-ede-cbc"]={key:16,iv:8};ba["des-ede"]={key:16,iv:0}});var xE=k(Mn=>{v();var bE=Mx(),tm=D2(),ls=R2(),_a=yE(),_E=Yh();function wW(e,t){e=e.toLowerCase();var r,i;if(ls[e])r=ls[e].key,i=ls[e].iv;else if(_a[e])r=_a[e].key*8,i=_a[e].iv;else throw new TypeError("invalid suite type");var n=_E(t,!1,r,i);return wE(e,n.key,n.iv)}function SW(e,t){e=e.toLowerCase();var r,i;if(ls[e])r=ls[e].key,i=ls[e].iv;else if(_a[e])r=_a[e].key*8,i=_a[e].iv;else throw new TypeError("invalid suite type");var n=_E(t,!1,r,i);return SE(e,n.key,n.iv)}function wE(e,t,r){if(e=e.toLowerCase(),ls[e])return tm.createCipheriv(e,t,r);if(_a[e])return new bE({key:t,iv:r,mode:e});throw new TypeError("invalid suite type")}function SE(e,t,r){if(e=e.toLowerCase(),ls[e])return tm.createDecipheriv(e,t,r);if(_a[e])return new bE({key:t,iv:r,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}function xW(){return Object.keys(_a).concat(tm.getCiphers())}Mn.createCipher=Mn.Cipher=wW;Mn.createCipheriv=Mn.Cipheriv=wE;Mn.createDecipher=Mn.Decipher=SW;Mn.createDecipheriv=Mn.Decipheriv=SE;Mn.listCiphers=Mn.getCiphers=xW});var Cn=k((EE,rm)=>{v();(function(e,t){"use strict";function r(B,g){if(!B)throw new Error(g||"Assertion failed")}function i(B,g){B.super_=g;var I=function(){};I.prototype=g.prototype,B.prototype=new I,B.prototype.constructor=B}function n(B,g,I){if(n.isBN(B))return B;this.negative=0,this.words=null,this.length=0,this.red=null,B!==null&&((g==="le"||g==="be")&&(I=g,g=10),this._init(B||0,g||10,I||"be"))}typeof e=="object"?e.exports=n:t.BN=n,n.BN=n,n.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=Kt().Buffer}catch{}n.isBN=function(g){return g instanceof n?!0:g!==null&&typeof g=="object"&&g.constructor.wordSize===n.wordSize&&Array.isArray(g.words)},n.max=function(g,I){return g.cmp(I)>0?g:I},n.min=function(g,I){return g.cmp(I)<0?g:I},n.prototype._init=function(g,I,y){if(typeof g=="number")return this._initNumber(g,I,y);if(typeof g=="object")return this._initArray(g,I,y);I==="hex"&&(I=16),r(I===(I|0)&&I>=2&&I<=36),g=g.toString().replace(/\s+/g,"");var f=0;g[0]==="-"&&(f++,this.negative=1),f<g.length&&(I===16?this._parseHex(g,f,y):(this._parseBase(g,I,f),y==="le"&&this._initArray(this.toArray(),I,y)))},n.prototype._initNumber=function(g,I,y){g<0&&(this.negative=1,g=-g),g<67108864?(this.words=[g&67108863],this.length=1):g<4503599627370496?(this.words=[g&67108863,g/67108864&67108863],this.length=2):(r(g<9007199254740992),this.words=[g&67108863,g/67108864&67108863,1],this.length=3),y==="le"&&this._initArray(this.toArray(),I,y)},n.prototype._initArray=function(g,I,y){if(r(typeof g.length=="number"),g.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(g.length/3),this.words=new Array(this.length);for(var f=0;f<this.length;f++)this.words[f]=0;var p,_,x=0;if(y==="be")for(f=g.length-1,p=0;f>=0;f-=3)_=g[f]|g[f-1]<<8|g[f-2]<<16,this.words[p]|=_<<x&67108863,this.words[p+1]=_>>>26-x&67108863,x+=24,x>=26&&(x-=26,p++);else if(y==="le")for(f=0,p=0;f<g.length;f+=3)_=g[f]|g[f+1]<<8|g[f+2]<<16,this.words[p]|=_<<x&67108863,this.words[p+1]=_>>>26-x&67108863,x+=24,x>=26&&(x-=26,p++);return this.strip()};function a(B,g){var I=B.charCodeAt(g);return I>=65&&I<=70?I-55:I>=97&&I<=102?I-87:I-48&15}function s(B,g,I){var y=a(B,I);return I-1>=g&&(y|=a(B,I-1)<<4),y}n.prototype._parseHex=function(g,I,y){this.length=Math.ceil((g.length-I)/6),this.words=new Array(this.length);for(var f=0;f<this.length;f++)this.words[f]=0;var p=0,_=0,x;if(y==="be")for(f=g.length-1;f>=I;f-=2)x=s(g,I,f)<<p,this.words[_]|=x&67108863,p>=18?(p-=18,_+=1,this.words[_]|=x>>>26):p+=8;else{var b=g.length-I;for(f=b%2===0?I+1:I;f<g.length;f+=2)x=s(g,I,f)<<p,this.words[_]|=x&67108863,p>=18?(p-=18,_+=1,this.words[_]|=x>>>26):p+=8}this.strip()};function u(B,g,I,y){for(var f=0,p=Math.min(B.length,I),_=g;_<p;_++){var x=B.charCodeAt(_)-48;f*=y,x>=49?f+=x-49+10:x>=17?f+=x-17+10:f+=x}return f}n.prototype._parseBase=function(g,I,y){this.words=[0],this.length=1;for(var f=0,p=1;p<=67108863;p*=I)f++;f--,p=p/I|0;for(var _=g.length-y,x=_%f,b=Math.min(_,_-x)+y,d=0,O=y;O<b;O+=f)d=u(g,O,O+f,I),this.imuln(p),this.words[0]+d<67108864?this.words[0]+=d:this._iaddn(d);if(x!==0){var T=1;for(d=u(g,O,g.length,I),O=0;O<x;O++)T*=I;this.imuln(T),this.words[0]+d<67108864?this.words[0]+=d:this._iaddn(d)}this.strip()},n.prototype.copy=function(g){g.words=new Array(this.length);for(var I=0;I<this.length;I++)g.words[I]=this.words[I];g.length=this.length,g.negative=this.negative,g.red=this.red},n.prototype.clone=function(){var g=new n(null);return this.copy(g),g},n.prototype._expand=function(g){for(;this.length<g;)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 c=["","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"],l=[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],m=[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(g,I){g=g||10,I=I|0||1;var y;if(g===16||g==="hex"){y="";for(var f=0,p=0,_=0;_<this.length;_++){var x=this.words[_],b=((x<<f|p)&16777215).toString(16);p=x>>>24-f&16777215,f+=2,f>=26&&(f-=26,_--),p!==0||_!==this.length-1?y=c[6-b.length]+b+y:y=b+y}for(p!==0&&(y=p.toString(16)+y);y.length%I!==0;)y="0"+y;return this.negative!==0&&(y="-"+y),y}if(g===(g|0)&&g>=2&&g<=36){var d=l[g],O=m[g];y="";var T=this.clone();for(T.negative=0;!T.isZero();){var S=T.modn(O).toString(g);T=T.idivn(O),T.isZero()?y=S+y:y=c[d-S.length]+S+y}for(this.isZero()&&(y="0"+y);y.length%I!==0;)y="0"+y;return this.negative!==0&&(y="-"+y),y}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var g=this.words[0];return this.length===2?g+=this.words[1]*67108864:this.length===3&&this.words[2]===1?g+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-g:g},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(g,I){return r(typeof o<"u"),this.toArrayLike(o,g,I)},n.prototype.toArray=function(g,I){return this.toArrayLike(Array,g,I)},n.prototype.toArrayLike=function(g,I,y){var f=this.byteLength(),p=y||Math.max(1,f);r(f<=p,"byte array longer than desired length"),r(p>0,"Requested array length <= 0"),this.strip();var _=I==="le",x=new g(p),b,d,O=this.clone();if(_){for(d=0;!O.isZero();d++)b=O.andln(255),O.iushrn(8),x[d]=b;for(;d<p;d++)x[d]=0}else{for(d=0;d<p-f;d++)x[d]=0;for(d=0;!O.isZero();d++)b=O.andln(255),O.iushrn(8),x[p-d-1]=b}return x},Math.clz32?n.prototype._countBits=function(g){return 32-Math.clz32(g)}:n.prototype._countBits=function(g){var I=g,y=0;return I>=4096&&(y+=13,I>>>=13),I>=64&&(y+=7,I>>>=7),I>=8&&(y+=4,I>>>=4),I>=2&&(y+=2,I>>>=2),y+I},n.prototype._zeroBits=function(g){if(g===0)return 26;var I=g,y=0;return(I&8191)===0&&(y+=13,I>>>=13),(I&127)===0&&(y+=7,I>>>=7),(I&15)===0&&(y+=4,I>>>=4),(I&3)===0&&(y+=2,I>>>=2),(I&1)===0&&y++,y},n.prototype.bitLength=function(){var g=this.words[this.length-1],I=this._countBits(g);return(this.length-1)*26+I};function w(B){for(var g=new Array(B.bitLength()),I=0;I<g.length;I++){var y=I/26|0,f=I%26;g[I]=(B.words[y]&1<<f)>>>f}return g}n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var g=0,I=0;I<this.length;I++){var y=this._zeroBits(this.words[I]);if(g+=y,y!==26)break}return g},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(g){return this.negative!==0?this.abs().inotn(g).iaddn(1):this.clone()},n.prototype.fromTwos=function(g){return this.testn(g-1)?this.notn(g).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(g){for(;this.length<g.length;)this.words[this.length++]=0;for(var I=0;I<g.length;I++)this.words[I]=this.words[I]|g.words[I];return this.strip()},n.prototype.ior=function(g){return r((this.negative|g.negative)===0),this.iuor(g)},n.prototype.or=function(g){return this.length>g.length?this.clone().ior(g):g.clone().ior(this)},n.prototype.uor=function(g){return this.length>g.length?this.clone().iuor(g):g.clone().iuor(this)},n.prototype.iuand=function(g){var I;this.length>g.length?I=g:I=this;for(var y=0;y<I.length;y++)this.words[y]=this.words[y]&g.words[y];return this.length=I.length,this.strip()},n.prototype.iand=function(g){return r((this.negative|g.negative)===0),this.iuand(g)},n.prototype.and=function(g){return this.length>g.length?this.clone().iand(g):g.clone().iand(this)},n.prototype.uand=function(g){return this.length>g.length?this.clone().iuand(g):g.clone().iuand(this)},n.prototype.iuxor=function(g){var I,y;this.length>g.length?(I=this,y=g):(I=g,y=this);for(var f=0;f<y.length;f++)this.words[f]=I.words[f]^y.words[f];if(this!==I)for(;f<I.length;f++)this.words[f]=I.words[f];return this.length=I.length,this.strip()},n.prototype.ixor=function(g){return r((this.negative|g.negative)===0),this.iuxor(g)},n.prototype.xor=function(g){return this.length>g.length?this.clone().ixor(g):g.clone().ixor(this)},n.prototype.uxor=function(g){return this.length>g.length?this.clone().iuxor(g):g.clone().iuxor(this)},n.prototype.inotn=function(g){r(typeof g=="number"&&g>=0);var I=Math.ceil(g/26)|0,y=g%26;this._expand(I),y>0&&I--;for(var f=0;f<I;f++)this.words[f]=~this.words[f]&67108863;return y>0&&(this.words[f]=~this.words[f]&67108863>>26-y),this.strip()},n.prototype.notn=function(g){return this.clone().inotn(g)},n.prototype.setn=function(g,I){r(typeof g=="number"&&g>=0);var y=g/26|0,f=g%26;return this._expand(y+1),I?this.words[y]=this.words[y]|1<<f:this.words[y]=this.words[y]&~(1<<f),this.strip()},n.prototype.iadd=function(g){var I;if(this.negative!==0&&g.negative===0)return this.negative=0,I=this.isub(g),this.negative^=1,this._normSign();if(this.negative===0&&g.negative!==0)return g.negative=0,I=this.isub(g),g.negative=1,I._normSign();var y,f;this.length>g.length?(y=this,f=g):(y=g,f=this);for(var p=0,_=0;_<f.length;_++)I=(y.words[_]|0)+(f.words[_]|0)+p,this.words[_]=I&67108863,p=I>>>26;for(;p!==0&&_<y.length;_++)I=(y.words[_]|0)+p,this.words[_]=I&67108863,p=I>>>26;if(this.length=y.length,p!==0)this.words[this.length]=p,this.length++;else if(y!==this)for(;_<y.length;_++)this.words[_]=y.words[_];return this},n.prototype.add=function(g){var I;return g.negative!==0&&this.negative===0?(g.negative=0,I=this.sub(g),g.negative^=1,I):g.negative===0&&this.negative!==0?(this.negative=0,I=g.sub(this),this.negative=1,I):this.length>g.length?this.clone().iadd(g):g.clone().iadd(this)},n.prototype.isub=function(g){if(g.negative!==0){g.negative=0;var I=this.iadd(g);return g.negative=1,I._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(g),this.negative=1,this._normSign();var y=this.cmp(g);if(y===0)return this.negative=0,this.length=1,this.words[0]=0,this;var f,p;y>0?(f=this,p=g):(f=g,p=this);for(var _=0,x=0;x<p.length;x++)I=(f.words[x]|0)-(p.words[x]|0)+_,_=I>>26,this.words[x]=I&67108863;for(;_!==0&&x<f.length;x++)I=(f.words[x]|0)+_,_=I>>26,this.words[x]=I&67108863;if(_===0&&x<f.length&&f!==this)for(;x<f.length;x++)this.words[x]=f.words[x];return this.length=Math.max(this.length,x),f!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(g){return this.clone().isub(g)};function E(B,g,I){I.negative=g.negative^B.negative;var y=B.length+g.length|0;I.length=y,y=y-1|0;var f=B.words[0]|0,p=g.words[0]|0,_=f*p,x=_&67108863,b=_/67108864|0;I.words[0]=x;for(var d=1;d<y;d++){for(var O=b>>>26,T=b&67108863,S=Math.min(d,g.length-1),R=Math.max(0,d-B.length+1);R<=S;R++){var Y=d-R|0;f=B.words[Y]|0,p=g.words[R]|0,_=f*p+T,O+=_/67108864|0,T=_&67108863}I.words[d]=T|0,b=O|0}return b!==0?I.words[d]=b|0:I.length--,I.strip()}var P=function(g,I,y){var f=g.words,p=I.words,_=y.words,x=0,b,d,O,T=f[0]|0,S=T&8191,R=T>>>13,Y=f[1]|0,X=Y&8191,ne=Y>>>13,ce=f[2]|0,pe=ce&8191,q=ce>>>13,W=f[3]|0,$=W&8191,te=W>>>13,se=f[4]|0,ue=se&8191,le=se>>>13,Pe=f[5]|0,ge=Pe&8191,ve=Pe>>>13,sr=f[6]|0,Ee=sr&8191,ye=sr>>>13,Be=f[7]|0,be=Be&8191,_e=Be>>>13,Qi=f[8]|0,Ce=Qi&8191,Re=Qi>>>13,Js=f[9]|0,De=Js&8191,qe=Js>>>13,Wl=p[0]|0,Ue=Wl&8191,Fe=Wl>>>13,Yl=p[1]|0,He=Yl&8191,je=Yl>>>13,$l=p[2]|0,ze=$l&8191,Ke=$l>>>13,Xl=p[3]|0,Ve=Xl&8191,Ge=Xl>>>13,Jl=p[4]|0,Ze=Jl&8191,We=Jl>>>13,Ql=p[5]|0,Ye=Ql&8191,$e=Ql>>>13,eh=p[6]|0,Xe=eh&8191,Je=eh>>>13,th=p[7]|0,Qe=th&8191,et=th>>>13,rh=p[8]|0,tt=rh&8191,rt=rh>>>13,ih=p[9]|0,it=ih&8191,nt=ih>>>13;y.negative=g.negative^I.negative,y.length=19,b=Math.imul(S,Ue),d=Math.imul(S,Fe),d=d+Math.imul(R,Ue)|0,O=Math.imul(R,Fe);var Gf=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(Gf>>>26)|0,Gf&=67108863,b=Math.imul(X,Ue),d=Math.imul(X,Fe),d=d+Math.imul(ne,Ue)|0,O=Math.imul(ne,Fe),b=b+Math.imul(S,He)|0,d=d+Math.imul(S,je)|0,d=d+Math.imul(R,He)|0,O=O+Math.imul(R,je)|0;var Jt=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(Jt>>>26)|0,Jt&=67108863,b=Math.imul(pe,Ue),d=Math.imul(pe,Fe),d=d+Math.imul(q,Ue)|0,O=Math.imul(q,Fe),b=b+Math.imul(X,He)|0,d=d+Math.imul(X,je)|0,d=d+Math.imul(ne,He)|0,O=O+Math.imul(ne,je)|0,b=b+Math.imul(S,ze)|0,d=d+Math.imul(S,Ke)|0,d=d+Math.imul(R,ze)|0,O=O+Math.imul(R,Ke)|0;var Qt=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,b=Math.imul($,Ue),d=Math.imul($,Fe),d=d+Math.imul(te,Ue)|0,O=Math.imul(te,Fe),b=b+Math.imul(pe,He)|0,d=d+Math.imul(pe,je)|0,d=d+Math.imul(q,He)|0,O=O+Math.imul(q,je)|0,b=b+Math.imul(X,ze)|0,d=d+Math.imul(X,Ke)|0,d=d+Math.imul(ne,ze)|0,O=O+Math.imul(ne,Ke)|0,b=b+Math.imul(S,Ve)|0,d=d+Math.imul(S,Ge)|0,d=d+Math.imul(R,Ve)|0,O=O+Math.imul(R,Ge)|0;var Qs=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(Qs>>>26)|0,Qs&=67108863,b=Math.imul(ue,Ue),d=Math.imul(ue,Fe),d=d+Math.imul(le,Ue)|0,O=Math.imul(le,Fe),b=b+Math.imul($,He)|0,d=d+Math.imul($,je)|0,d=d+Math.imul(te,He)|0,O=O+Math.imul(te,je)|0,b=b+Math.imul(pe,ze)|0,d=d+Math.imul(pe,Ke)|0,d=d+Math.imul(q,ze)|0,O=O+Math.imul(q,Ke)|0,b=b+Math.imul(X,Ve)|0,d=d+Math.imul(X,Ge)|0,d=d+Math.imul(ne,Ve)|0,O=O+Math.imul(ne,Ge)|0,b=b+Math.imul(S,Ze)|0,d=d+Math.imul(S,We)|0,d=d+Math.imul(R,Ze)|0,O=O+Math.imul(R,We)|0;var eu=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(eu>>>26)|0,eu&=67108863,b=Math.imul(ge,Ue),d=Math.imul(ge,Fe),d=d+Math.imul(ve,Ue)|0,O=Math.imul(ve,Fe),b=b+Math.imul(ue,He)|0,d=d+Math.imul(ue,je)|0,d=d+Math.imul(le,He)|0,O=O+Math.imul(le,je)|0,b=b+Math.imul($,ze)|0,d=d+Math.imul($,Ke)|0,d=d+Math.imul(te,ze)|0,O=O+Math.imul(te,Ke)|0,b=b+Math.imul(pe,Ve)|0,d=d+Math.imul(pe,Ge)|0,d=d+Math.imul(q,Ve)|0,O=O+Math.imul(q,Ge)|0,b=b+Math.imul(X,Ze)|0,d=d+Math.imul(X,We)|0,d=d+Math.imul(ne,Ze)|0,O=O+Math.imul(ne,We)|0,b=b+Math.imul(S,Ye)|0,d=d+Math.imul(S,$e)|0,d=d+Math.imul(R,Ye)|0,O=O+Math.imul(R,$e)|0;var tu=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(tu>>>26)|0,tu&=67108863,b=Math.imul(Ee,Ue),d=Math.imul(Ee,Fe),d=d+Math.imul(ye,Ue)|0,O=Math.imul(ye,Fe),b=b+Math.imul(ge,He)|0,d=d+Math.imul(ge,je)|0,d=d+Math.imul(ve,He)|0,O=O+Math.imul(ve,je)|0,b=b+Math.imul(ue,ze)|0,d=d+Math.imul(ue,Ke)|0,d=d+Math.imul(le,ze)|0,O=O+Math.imul(le,Ke)|0,b=b+Math.imul($,Ve)|0,d=d+Math.imul($,Ge)|0,d=d+Math.imul(te,Ve)|0,O=O+Math.imul(te,Ge)|0,b=b+Math.imul(pe,Ze)|0,d=d+Math.imul(pe,We)|0,d=d+Math.imul(q,Ze)|0,O=O+Math.imul(q,We)|0,b=b+Math.imul(X,Ye)|0,d=d+Math.imul(X,$e)|0,d=d+Math.imul(ne,Ye)|0,O=O+Math.imul(ne,$e)|0,b=b+Math.imul(S,Xe)|0,d=d+Math.imul(S,Je)|0,d=d+Math.imul(R,Xe)|0,O=O+Math.imul(R,Je)|0;var ru=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(ru>>>26)|0,ru&=67108863,b=Math.imul(be,Ue),d=Math.imul(be,Fe),d=d+Math.imul(_e,Ue)|0,O=Math.imul(_e,Fe),b=b+Math.imul(Ee,He)|0,d=d+Math.imul(Ee,je)|0,d=d+Math.imul(ye,He)|0,O=O+Math.imul(ye,je)|0,b=b+Math.imul(ge,ze)|0,d=d+Math.imul(ge,Ke)|0,d=d+Math.imul(ve,ze)|0,O=O+Math.imul(ve,Ke)|0,b=b+Math.imul(ue,Ve)|0,d=d+Math.imul(ue,Ge)|0,d=d+Math.imul(le,Ve)|0,O=O+Math.imul(le,Ge)|0,b=b+Math.imul($,Ze)|0,d=d+Math.imul($,We)|0,d=d+Math.imul(te,Ze)|0,O=O+Math.imul(te,We)|0,b=b+Math.imul(pe,Ye)|0,d=d+Math.imul(pe,$e)|0,d=d+Math.imul(q,Ye)|0,O=O+Math.imul(q,$e)|0,b=b+Math.imul(X,Xe)|0,d=d+Math.imul(X,Je)|0,d=d+Math.imul(ne,Xe)|0,O=O+Math.imul(ne,Je)|0,b=b+Math.imul(S,Qe)|0,d=d+Math.imul(S,et)|0,d=d+Math.imul(R,Qe)|0,O=O+Math.imul(R,et)|0;var iu=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(iu>>>26)|0,iu&=67108863,b=Math.imul(Ce,Ue),d=Math.imul(Ce,Fe),d=d+Math.imul(Re,Ue)|0,O=Math.imul(Re,Fe),b=b+Math.imul(be,He)|0,d=d+Math.imul(be,je)|0,d=d+Math.imul(_e,He)|0,O=O+Math.imul(_e,je)|0,b=b+Math.imul(Ee,ze)|0,d=d+Math.imul(Ee,Ke)|0,d=d+Math.imul(ye,ze)|0,O=O+Math.imul(ye,Ke)|0,b=b+Math.imul(ge,Ve)|0,d=d+Math.imul(ge,Ge)|0,d=d+Math.imul(ve,Ve)|0,O=O+Math.imul(ve,Ge)|0,b=b+Math.imul(ue,Ze)|0,d=d+Math.imul(ue,We)|0,d=d+Math.imul(le,Ze)|0,O=O+Math.imul(le,We)|0,b=b+Math.imul($,Ye)|0,d=d+Math.imul($,$e)|0,d=d+Math.imul(te,Ye)|0,O=O+Math.imul(te,$e)|0,b=b+Math.imul(pe,Xe)|0,d=d+Math.imul(pe,Je)|0,d=d+Math.imul(q,Xe)|0,O=O+Math.imul(q,Je)|0,b=b+Math.imul(X,Qe)|0,d=d+Math.imul(X,et)|0,d=d+Math.imul(ne,Qe)|0,O=O+Math.imul(ne,et)|0,b=b+Math.imul(S,tt)|0,d=d+Math.imul(S,rt)|0,d=d+Math.imul(R,tt)|0,O=O+Math.imul(R,rt)|0;var nu=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(nu>>>26)|0,nu&=67108863,b=Math.imul(De,Ue),d=Math.imul(De,Fe),d=d+Math.imul(qe,Ue)|0,O=Math.imul(qe,Fe),b=b+Math.imul(Ce,He)|0,d=d+Math.imul(Ce,je)|0,d=d+Math.imul(Re,He)|0,O=O+Math.imul(Re,je)|0,b=b+Math.imul(be,ze)|0,d=d+Math.imul(be,Ke)|0,d=d+Math.imul(_e,ze)|0,O=O+Math.imul(_e,Ke)|0,b=b+Math.imul(Ee,Ve)|0,d=d+Math.imul(Ee,Ge)|0,d=d+Math.imul(ye,Ve)|0,O=O+Math.imul(ye,Ge)|0,b=b+Math.imul(ge,Ze)|0,d=d+Math.imul(ge,We)|0,d=d+Math.imul(ve,Ze)|0,O=O+Math.imul(ve,We)|0,b=b+Math.imul(ue,Ye)|0,d=d+Math.imul(ue,$e)|0,d=d+Math.imul(le,Ye)|0,O=O+Math.imul(le,$e)|0,b=b+Math.imul($,Xe)|0,d=d+Math.imul($,Je)|0,d=d+Math.imul(te,Xe)|0,O=O+Math.imul(te,Je)|0,b=b+Math.imul(pe,Qe)|0,d=d+Math.imul(pe,et)|0,d=d+Math.imul(q,Qe)|0,O=O+Math.imul(q,et)|0,b=b+Math.imul(X,tt)|0,d=d+Math.imul(X,rt)|0,d=d+Math.imul(ne,tt)|0,O=O+Math.imul(ne,rt)|0,b=b+Math.imul(S,it)|0,d=d+Math.imul(S,nt)|0,d=d+Math.imul(R,it)|0,O=O+Math.imul(R,nt)|0;var ou=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(ou>>>26)|0,ou&=67108863,b=Math.imul(De,He),d=Math.imul(De,je),d=d+Math.imul(qe,He)|0,O=Math.imul(qe,je),b=b+Math.imul(Ce,ze)|0,d=d+Math.imul(Ce,Ke)|0,d=d+Math.imul(Re,ze)|0,O=O+Math.imul(Re,Ke)|0,b=b+Math.imul(be,Ve)|0,d=d+Math.imul(be,Ge)|0,d=d+Math.imul(_e,Ve)|0,O=O+Math.imul(_e,Ge)|0,b=b+Math.imul(Ee,Ze)|0,d=d+Math.imul(Ee,We)|0,d=d+Math.imul(ye,Ze)|0,O=O+Math.imul(ye,We)|0,b=b+Math.imul(ge,Ye)|0,d=d+Math.imul(ge,$e)|0,d=d+Math.imul(ve,Ye)|0,O=O+Math.imul(ve,$e)|0,b=b+Math.imul(ue,Xe)|0,d=d+Math.imul(ue,Je)|0,d=d+Math.imul(le,Xe)|0,O=O+Math.imul(le,Je)|0,b=b+Math.imul($,Qe)|0,d=d+Math.imul($,et)|0,d=d+Math.imul(te,Qe)|0,O=O+Math.imul(te,et)|0,b=b+Math.imul(pe,tt)|0,d=d+Math.imul(pe,rt)|0,d=d+Math.imul(q,tt)|0,O=O+Math.imul(q,rt)|0,b=b+Math.imul(X,it)|0,d=d+Math.imul(X,nt)|0,d=d+Math.imul(ne,it)|0,O=O+Math.imul(ne,nt)|0;var au=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(au>>>26)|0,au&=67108863,b=Math.imul(De,ze),d=Math.imul(De,Ke),d=d+Math.imul(qe,ze)|0,O=Math.imul(qe,Ke),b=b+Math.imul(Ce,Ve)|0,d=d+Math.imul(Ce,Ge)|0,d=d+Math.imul(Re,Ve)|0,O=O+Math.imul(Re,Ge)|0,b=b+Math.imul(be,Ze)|0,d=d+Math.imul(be,We)|0,d=d+Math.imul(_e,Ze)|0,O=O+Math.imul(_e,We)|0,b=b+Math.imul(Ee,Ye)|0,d=d+Math.imul(Ee,$e)|0,d=d+Math.imul(ye,Ye)|0,O=O+Math.imul(ye,$e)|0,b=b+Math.imul(ge,Xe)|0,d=d+Math.imul(ge,Je)|0,d=d+Math.imul(ve,Xe)|0,O=O+Math.imul(ve,Je)|0,b=b+Math.imul(ue,Qe)|0,d=d+Math.imul(ue,et)|0,d=d+Math.imul(le,Qe)|0,O=O+Math.imul(le,et)|0,b=b+Math.imul($,tt)|0,d=d+Math.imul($,rt)|0,d=d+Math.imul(te,tt)|0,O=O+Math.imul(te,rt)|0,b=b+Math.imul(pe,it)|0,d=d+Math.imul(pe,nt)|0,d=d+Math.imul(q,it)|0,O=O+Math.imul(q,nt)|0;var su=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(su>>>26)|0,su&=67108863,b=Math.imul(De,Ve),d=Math.imul(De,Ge),d=d+Math.imul(qe,Ve)|0,O=Math.imul(qe,Ge),b=b+Math.imul(Ce,Ze)|0,d=d+Math.imul(Ce,We)|0,d=d+Math.imul(Re,Ze)|0,O=O+Math.imul(Re,We)|0,b=b+Math.imul(be,Ye)|0,d=d+Math.imul(be,$e)|0,d=d+Math.imul(_e,Ye)|0,O=O+Math.imul(_e,$e)|0,b=b+Math.imul(Ee,Xe)|0,d=d+Math.imul(Ee,Je)|0,d=d+Math.imul(ye,Xe)|0,O=O+Math.imul(ye,Je)|0,b=b+Math.imul(ge,Qe)|0,d=d+Math.imul(ge,et)|0,d=d+Math.imul(ve,Qe)|0,O=O+Math.imul(ve,et)|0,b=b+Math.imul(ue,tt)|0,d=d+Math.imul(ue,rt)|0,d=d+Math.imul(le,tt)|0,O=O+Math.imul(le,rt)|0,b=b+Math.imul($,it)|0,d=d+Math.imul($,nt)|0,d=d+Math.imul(te,it)|0,O=O+Math.imul(te,nt)|0;var uu=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(uu>>>26)|0,uu&=67108863,b=Math.imul(De,Ze),d=Math.imul(De,We),d=d+Math.imul(qe,Ze)|0,O=Math.imul(qe,We),b=b+Math.imul(Ce,Ye)|0,d=d+Math.imul(Ce,$e)|0,d=d+Math.imul(Re,Ye)|0,O=O+Math.imul(Re,$e)|0,b=b+Math.imul(be,Xe)|0,d=d+Math.imul(be,Je)|0,d=d+Math.imul(_e,Xe)|0,O=O+Math.imul(_e,Je)|0,b=b+Math.imul(Ee,Qe)|0,d=d+Math.imul(Ee,et)|0,d=d+Math.imul(ye,Qe)|0,O=O+Math.imul(ye,et)|0,b=b+Math.imul(ge,tt)|0,d=d+Math.imul(ge,rt)|0,d=d+Math.imul(ve,tt)|0,O=O+Math.imul(ve,rt)|0,b=b+Math.imul(ue,it)|0,d=d+Math.imul(ue,nt)|0,d=d+Math.imul(le,it)|0,O=O+Math.imul(le,nt)|0;var fu=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(fu>>>26)|0,fu&=67108863,b=Math.imul(De,Ye),d=Math.imul(De,$e),d=d+Math.imul(qe,Ye)|0,O=Math.imul(qe,$e),b=b+Math.imul(Ce,Xe)|0,d=d+Math.imul(Ce,Je)|0,d=d+Math.imul(Re,Xe)|0,O=O+Math.imul(Re,Je)|0,b=b+Math.imul(be,Qe)|0,d=d+Math.imul(be,et)|0,d=d+Math.imul(_e,Qe)|0,O=O+Math.imul(_e,et)|0,b=b+Math.imul(Ee,tt)|0,d=d+Math.imul(Ee,rt)|0,d=d+Math.imul(ye,tt)|0,O=O+Math.imul(ye,rt)|0,b=b+Math.imul(ge,it)|0,d=d+Math.imul(ge,nt)|0,d=d+Math.imul(ve,it)|0,O=O+Math.imul(ve,nt)|0;var cu=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(cu>>>26)|0,cu&=67108863,b=Math.imul(De,Xe),d=Math.imul(De,Je),d=d+Math.imul(qe,Xe)|0,O=Math.imul(qe,Je),b=b+Math.imul(Ce,Qe)|0,d=d+Math.imul(Ce,et)|0,d=d+Math.imul(Re,Qe)|0,O=O+Math.imul(Re,et)|0,b=b+Math.imul(be,tt)|0,d=d+Math.imul(be,rt)|0,d=d+Math.imul(_e,tt)|0,O=O+Math.imul(_e,rt)|0,b=b+Math.imul(Ee,it)|0,d=d+Math.imul(Ee,nt)|0,d=d+Math.imul(ye,it)|0,O=O+Math.imul(ye,nt)|0;var lu=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(lu>>>26)|0,lu&=67108863,b=Math.imul(De,Qe),d=Math.imul(De,et),d=d+Math.imul(qe,Qe)|0,O=Math.imul(qe,et),b=b+Math.imul(Ce,tt)|0,d=d+Math.imul(Ce,rt)|0,d=d+Math.imul(Re,tt)|0,O=O+Math.imul(Re,rt)|0,b=b+Math.imul(be,it)|0,d=d+Math.imul(be,nt)|0,d=d+Math.imul(_e,it)|0,O=O+Math.imul(_e,nt)|0;var hu=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(hu>>>26)|0,hu&=67108863,b=Math.imul(De,tt),d=Math.imul(De,rt),d=d+Math.imul(qe,tt)|0,O=Math.imul(qe,rt),b=b+Math.imul(Ce,it)|0,d=d+Math.imul(Ce,nt)|0,d=d+Math.imul(Re,it)|0,O=O+Math.imul(Re,nt)|0;var du=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(du>>>26)|0,du&=67108863,b=Math.imul(De,it),d=Math.imul(De,nt),d=d+Math.imul(qe,it)|0,O=Math.imul(qe,nt);var pu=(x+b|0)+((d&8191)<<13)|0;return x=(O+(d>>>13)|0)+(pu>>>26)|0,pu&=67108863,_[0]=Gf,_[1]=Jt,_[2]=Qt,_[3]=Qs,_[4]=eu,_[5]=tu,_[6]=ru,_[7]=iu,_[8]=nu,_[9]=ou,_[10]=au,_[11]=su,_[12]=uu,_[13]=fu,_[14]=cu,_[15]=lu,_[16]=hu,_[17]=du,_[18]=pu,x!==0&&(_[19]=x,y.length++),y};Math.imul||(P=E);function M(B,g,I){I.negative=g.negative^B.negative,I.length=B.length+g.length;for(var y=0,f=0,p=0;p<I.length-1;p++){var _=f;f=0;for(var x=y&67108863,b=Math.min(p,g.length-1),d=Math.max(0,p-B.length+1);d<=b;d++){var O=p-d,T=B.words[O]|0,S=g.words[d]|0,R=T*S,Y=R&67108863;_=_+(R/67108864|0)|0,Y=Y+x|0,x=Y&67108863,_=_+(Y>>>26)|0,f+=_>>>26,_&=67108863}I.words[p]=x,y=_,_=f}return y!==0?I.words[p]=y:I.length--,I.strip()}function D(B,g,I){var y=new L;return y.mulp(B,g,I)}n.prototype.mulTo=function(g,I){var y,f=this.length+g.length;return this.length===10&&g.length===10?y=P(this,g,I):f<63?y=E(this,g,I):f<1024?y=M(this,g,I):y=D(this,g,I),y};function L(B,g){this.x=B,this.y=g}L.prototype.makeRBT=function(g){for(var I=new Array(g),y=n.prototype._countBits(g)-1,f=0;f<g;f++)I[f]=this.revBin(f,y,g);return I},L.prototype.revBin=function(g,I,y){if(g===0||g===y-1)return g;for(var f=0,p=0;p<I;p++)f|=(g&1)<<I-p-1,g>>=1;return f},L.prototype.permute=function(g,I,y,f,p,_){for(var x=0;x<_;x++)f[x]=I[g[x]],p[x]=y[g[x]]},L.prototype.transform=function(g,I,y,f,p,_){this.permute(_,g,I,y,f,p);for(var x=1;x<p;x<<=1)for(var b=x<<1,d=Math.cos(2*Math.PI/b),O=Math.sin(2*Math.PI/b),T=0;T<p;T+=b)for(var S=d,R=O,Y=0;Y<x;Y++){var X=y[T+Y],ne=f[T+Y],ce=y[T+Y+x],pe=f[T+Y+x],q=S*ce-R*pe;pe=S*pe+R*ce,ce=q,y[T+Y]=X+ce,f[T+Y]=ne+pe,y[T+Y+x]=X-ce,f[T+Y+x]=ne-pe,Y!==b&&(q=d*S-O*R,R=d*R+O*S,S=q)}},L.prototype.guessLen13b=function(g,I){var y=Math.max(I,g)|1,f=y&1,p=0;for(y=y/2|0;y;y=y>>>1)p++;return 1<<p+1+f},L.prototype.conjugate=function(g,I,y){if(!(y<=1))for(var f=0;f<y/2;f++){var p=g[f];g[f]=g[y-f-1],g[y-f-1]=p,p=I[f],I[f]=-I[y-f-1],I[y-f-1]=-p}},L.prototype.normalize13b=function(g,I){for(var y=0,f=0;f<I/2;f++){var p=Math.round(g[2*f+1]/I)*8192+Math.round(g[2*f]/I)+y;g[f]=p&67108863,p<67108864?y=0:y=p/67108864|0}return g},L.prototype.convert13b=function(g,I,y,f){for(var p=0,_=0;_<I;_++)p=p+(g[_]|0),y[2*_]=p&8191,p=p>>>13,y[2*_+1]=p&8191,p=p>>>13;for(_=2*I;_<f;++_)y[_]=0;r(p===0),r((p&-8192)===0)},L.prototype.stub=function(g){for(var I=new Array(g),y=0;y<g;y++)I[y]=0;return I},L.prototype.mulp=function(g,I,y){var f=2*this.guessLen13b(g.length,I.length),p=this.makeRBT(f),_=this.stub(f),x=new Array(f),b=new Array(f),d=new Array(f),O=new Array(f),T=new Array(f),S=new Array(f),R=y.words;R.length=f,this.convert13b(g.words,g.length,x,f),this.convert13b(I.words,I.length,O,f),this.transform(x,_,b,d,f,p),this.transform(O,_,T,S,f,p);for(var Y=0;Y<f;Y++){var X=b[Y]*T[Y]-d[Y]*S[Y];d[Y]=b[Y]*S[Y]+d[Y]*T[Y],b[Y]=X}return this.conjugate(b,d,f),this.transform(b,d,R,_,f,p),this.conjugate(R,_,f),this.normalize13b(R,f),y.negative=g.negative^I.negative,y.length=g.length+I.length,y.strip()},n.prototype.mul=function(g){var I=new n(null);return I.words=new Array(this.length+g.length),this.mulTo(g,I)},n.prototype.mulf=function(g){var I=new n(null);return I.words=new Array(this.length+g.length),D(this,g,I)},n.prototype.imul=function(g){return this.clone().mulTo(g,this)},n.prototype.imuln=function(g){r(typeof g=="number"),r(g<67108864);for(var I=0,y=0;y<this.length;y++){var f=(this.words[y]|0)*g,p=(f&67108863)+(I&67108863);I>>=26,I+=f/67108864|0,I+=p>>>26,this.words[y]=p&67108863}return I!==0&&(this.words[y]=I,this.length++),this.length=g===0?1:this.length,this},n.prototype.muln=function(g){return this.clone().imuln(g)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(g){var I=w(g);if(I.length===0)return new n(1);for(var y=this,f=0;f<I.length&&I[f]===0;f++,y=y.sqr());if(++f<I.length)for(var p=y.sqr();f<I.length;f++,p=p.sqr())I[f]!==0&&(y=y.mul(p));return y},n.prototype.iushln=function(g){r(typeof g=="number"&&g>=0);var I=g%26,y=(g-I)/26,f=67108863>>>26-I<<26-I,p;if(I!==0){var _=0;for(p=0;p<this.length;p++){var x=this.words[p]&f,b=(this.words[p]|0)-x<<I;this.words[p]=b|_,_=x>>>26-I}_&&(this.words[p]=_,this.length++)}if(y!==0){for(p=this.length-1;p>=0;p--)this.words[p+y]=this.words[p];for(p=0;p<y;p++)this.words[p]=0;this.length+=y}return this.strip()},n.prototype.ishln=function(g){return r(this.negative===0),this.iushln(g)},n.prototype.iushrn=function(g,I,y){r(typeof g=="number"&&g>=0);var f;I?f=(I-I%26)/26:f=0;var p=g%26,_=Math.min((g-p)/26,this.length),x=67108863^67108863>>>p<<p,b=y;if(f-=_,f=Math.max(0,f),b){for(var d=0;d<_;d++)b.words[d]=this.words[d];b.length=_}if(_!==0)if(this.length>_)for(this.length-=_,d=0;d<this.length;d++)this.words[d]=this.words[d+_];else this.words[0]=0,this.length=1;var O=0;for(d=this.length-1;d>=0&&(O!==0||d>=f);d--){var T=this.words[d]|0;this.words[d]=O<<26-p|T>>>p,O=T&x}return b&&O!==0&&(b.words[b.length++]=O),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(g,I,y){return r(this.negative===0),this.iushrn(g,I,y)},n.prototype.shln=function(g){return this.clone().ishln(g)},n.prototype.ushln=function(g){return this.clone().iushln(g)},n.prototype.shrn=function(g){return this.clone().ishrn(g)},n.prototype.ushrn=function(g){return this.clone().iushrn(g)},n.prototype.testn=function(g){r(typeof g=="number"&&g>=0);var I=g%26,y=(g-I)/26,f=1<<I;if(this.length<=y)return!1;var p=this.words[y];return!!(p&f)},n.prototype.imaskn=function(g){r(typeof g=="number"&&g>=0);var I=g%26,y=(g-I)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=y)return this;if(I!==0&&y++,this.length=Math.min(y,this.length),I!==0){var f=67108863^67108863>>>I<<I;this.words[this.length-1]&=f}return this.length===0&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.maskn=function(g){return this.clone().imaskn(g)},n.prototype.iaddn=function(g){return r(typeof g=="number"),r(g<67108864),g<0?this.isubn(-g):this.negative!==0?this.length===1&&(this.words[0]|0)<g?(this.words[0]=g-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(g),this.negative=1,this):this._iaddn(g)},n.prototype._iaddn=function(g){this.words[0]+=g;for(var I=0;I<this.length&&this.words[I]>=67108864;I++)this.words[I]-=67108864,I===this.length-1?this.words[I+1]=1:this.words[I+1]++;return this.length=Math.max(this.length,I+1),this},n.prototype.isubn=function(g){if(r(typeof g=="number"),r(g<67108864),g<0)return this.iaddn(-g);if(this.negative!==0)return this.negative=0,this.iaddn(g),this.negative=1,this;if(this.words[0]-=g,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var I=0;I<this.length&&this.words[I]<0;I++)this.words[I]+=67108864,this.words[I+1]-=1;return this.strip()},n.prototype.addn=function(g){return this.clone().iaddn(g)},n.prototype.subn=function(g){return this.clone().isubn(g)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(g,I,y){var f=g.length+y,p;this._expand(f);var _,x=0;for(p=0;p<g.length;p++){_=(this.words[p+y]|0)+x;var b=(g.words[p]|0)*I;_-=b&67108863,x=(_>>26)-(b/67108864|0),this.words[p+y]=_&67108863}for(;p<this.length-y;p++)_=(this.words[p+y]|0)+x,x=_>>26,this.words[p+y]=_&67108863;if(x===0)return this.strip();for(r(x===-1),x=0,p=0;p<this.length;p++)_=-(this.words[p]|0)+x,x=_>>26,this.words[p]=_&67108863;return this.negative=1,this.strip()},n.prototype._wordDiv=function(g,I){var y=this.length-g.length,f=this.clone(),p=g,_=p.words[p.length-1]|0,x=this._countBits(_);y=26-x,y!==0&&(p=p.ushln(y),f.iushln(y),_=p.words[p.length-1]|0);var b=f.length-p.length,d;if(I!=="mod"){d=new n(null),d.length=b+1,d.words=new Array(d.length);for(var O=0;O<d.length;O++)d.words[O]=0}var T=f.clone()._ishlnsubmul(p,1,b);T.negative===0&&(f=T,d&&(d.words[b]=1));for(var S=b-1;S>=0;S--){var R=(f.words[p.length+S]|0)*67108864+(f.words[p.length+S-1]|0);for(R=Math.min(R/_|0,67108863),f._ishlnsubmul(p,R,S);f.negative!==0;)R--,f.negative=0,f._ishlnsubmul(p,1,S),f.isZero()||(f.negative^=1);d&&(d.words[S]=R)}return d&&d.strip(),f.strip(),I!=="div"&&y!==0&&f.iushrn(y),{div:d||null,mod:f}},n.prototype.divmod=function(g,I,y){if(r(!g.isZero()),this.isZero())return{div:new n(0),mod:new n(0)};var f,p,_;return this.negative!==0&&g.negative===0?(_=this.neg().divmod(g,I),I!=="mod"&&(f=_.div.neg()),I!=="div"&&(p=_.mod.neg(),y&&p.negative!==0&&p.iadd(g)),{div:f,mod:p}):this.negative===0&&g.negative!==0?(_=this.divmod(g.neg(),I),I!=="mod"&&(f=_.div.neg()),{div:f,mod:_.mod}):(this.negative&g.negative)!==0?(_=this.neg().divmod(g.neg(),I),I!=="div"&&(p=_.mod.neg(),y&&p.negative!==0&&p.isub(g)),{div:_.div,mod:p}):g.length>this.length||this.cmp(g)<0?{div:new n(0),mod:this}:g.length===1?I==="div"?{div:this.divn(g.words[0]),mod:null}:I==="mod"?{div:null,mod:new n(this.modn(g.words[0]))}:{div:this.divn(g.words[0]),mod:new n(this.modn(g.words[0]))}:this._wordDiv(g,I)},n.prototype.div=function(g){return this.divmod(g,"div",!1).div},n.prototype.mod=function(g){return this.divmod(g,"mod",!1).mod},n.prototype.umod=function(g){return this.divmod(g,"mod",!0).mod},n.prototype.divRound=function(g){var I=this.divmod(g);if(I.mod.isZero())return I.div;var y=I.div.negative!==0?I.mod.isub(g):I.mod,f=g.ushrn(1),p=g.andln(1),_=y.cmp(f);return _<0||p===1&&_===0?I.div:I.div.negative!==0?I.div.isubn(1):I.div.iaddn(1)},n.prototype.modn=function(g){r(g<=67108863);for(var I=(1<<26)%g,y=0,f=this.length-1;f>=0;f--)y=(I*y+(this.words[f]|0))%g;return y},n.prototype.idivn=function(g){r(g<=67108863);for(var I=0,y=this.length-1;y>=0;y--){var f=(this.words[y]|0)+I*67108864;this.words[y]=f/g|0,I=f%g}return this.strip()},n.prototype.divn=function(g){return this.clone().idivn(g)},n.prototype.egcd=function(g){r(g.negative===0),r(!g.isZero());var I=this,y=g.clone();I.negative!==0?I=I.umod(g):I=I.clone();for(var f=new n(1),p=new n(0),_=new n(0),x=new n(1),b=0;I.isEven()&&y.isEven();)I.iushrn(1),y.iushrn(1),++b;for(var d=y.clone(),O=I.clone();!I.isZero();){for(var T=0,S=1;(I.words[0]&S)===0&&T<26;++T,S<<=1);if(T>0)for(I.iushrn(T);T-- >0;)(f.isOdd()||p.isOdd())&&(f.iadd(d),p.isub(O)),f.iushrn(1),p.iushrn(1);for(var R=0,Y=1;(y.words[0]&Y)===0&&R<26;++R,Y<<=1);if(R>0)for(y.iushrn(R);R-- >0;)(_.isOdd()||x.isOdd())&&(_.iadd(d),x.isub(O)),_.iushrn(1),x.iushrn(1);I.cmp(y)>=0?(I.isub(y),f.isub(_),p.isub(x)):(y.isub(I),_.isub(f),x.isub(p))}return{a:_,b:x,gcd:y.iushln(b)}},n.prototype._invmp=function(g){r(g.negative===0),r(!g.isZero());var I=this,y=g.clone();I.negative!==0?I=I.umod(g):I=I.clone();for(var f=new n(1),p=new n(0),_=y.clone();I.cmpn(1)>0&&y.cmpn(1)>0;){for(var x=0,b=1;(I.words[0]&b)===0&&x<26;++x,b<<=1);if(x>0)for(I.iushrn(x);x-- >0;)f.isOdd()&&f.iadd(_),f.iushrn(1);for(var d=0,O=1;(y.words[0]&O)===0&&d<26;++d,O<<=1);if(d>0)for(y.iushrn(d);d-- >0;)p.isOdd()&&p.iadd(_),p.iushrn(1);I.cmp(y)>=0?(I.isub(y),f.isub(p)):(y.isub(I),p.isub(f))}var T;return I.cmpn(1)===0?T=f:T=p,T.cmpn(0)<0&&T.iadd(g),T},n.prototype.gcd=function(g){if(this.isZero())return g.abs();if(g.isZero())return this.abs();var I=this.clone(),y=g.clone();I.negative=0,y.negative=0;for(var f=0;I.isEven()&&y.isEven();f++)I.iushrn(1),y.iushrn(1);do{for(;I.isEven();)I.iushrn(1);for(;y.isEven();)y.iushrn(1);var p=I.cmp(y);if(p<0){var _=I;I=y,y=_}else if(p===0||y.cmpn(1)===0)break;I.isub(y)}while(!0);return y.iushln(f)},n.prototype.invm=function(g){return this.egcd(g).a.umod(g)},n.prototype.isEven=function(){return(this.words[0]&1)===0},n.prototype.isOdd=function(){return(this.words[0]&1)===1},n.prototype.andln=function(g){return this.words[0]&g},n.prototype.bincn=function(g){r(typeof g=="number");var I=g%26,y=(g-I)/26,f=1<<I;if(this.length<=y)return this._expand(y+1),this.words[y]|=f,this;for(var p=f,_=y;p!==0&&_<this.length;_++){var x=this.words[_]|0;x+=p,p=x>>>26,x&=67108863,this.words[_]=x}return p!==0&&(this.words[_]=p,this.length++),this},n.prototype.isZero=function(){return this.length===1&&this.words[0]===0},n.prototype.cmpn=function(g){var I=g<0;if(this.negative!==0&&!I)return-1;if(this.negative===0&&I)return 1;this.strip();var y;if(this.length>1)y=1;else{I&&(g=-g),r(g<=67108863,"Number is too big");var f=this.words[0]|0;y=f===g?0:f<g?-1:1}return this.negative!==0?-y|0:y},n.prototype.cmp=function(g){if(this.negative!==0&&g.negative===0)return-1;if(this.negative===0&&g.negative!==0)return 1;var I=this.ucmp(g);return this.negative!==0?-I|0:I},n.prototype.ucmp=function(g){if(this.length>g.length)return 1;if(this.length<g.length)return-1;for(var I=0,y=this.length-1;y>=0;y--){var f=this.words[y]|0,p=g.words[y]|0;if(f!==p){f<p?I=-1:f>p&&(I=1);break}}return I},n.prototype.gtn=function(g){return this.cmpn(g)===1},n.prototype.gt=function(g){return this.cmp(g)===1},n.prototype.gten=function(g){return this.cmpn(g)>=0},n.prototype.gte=function(g){return this.cmp(g)>=0},n.prototype.ltn=function(g){return this.cmpn(g)===-1},n.prototype.lt=function(g){return this.cmp(g)===-1},n.prototype.lten=function(g){return this.cmpn(g)<=0},n.prototype.lte=function(g){return this.cmp(g)<=0},n.prototype.eqn=function(g){return this.cmpn(g)===0},n.prototype.eq=function(g){return this.cmp(g)===0},n.red=function(g){return new z(g)},n.prototype.toRed=function(g){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),g.convertTo(this)._forceRed(g)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(g){return this.red=g,this},n.prototype.forceRed=function(g){return r(!this.red,"Already a number in reduction context"),this._forceRed(g)},n.prototype.redAdd=function(g){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,g)},n.prototype.redIAdd=function(g){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,g)},n.prototype.redSub=function(g){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,g)},n.prototype.redISub=function(g){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,g)},n.prototype.redShl=function(g){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,g)},n.prototype.redMul=function(g){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,g),this.red.mul(this,g)},n.prototype.redIMul=function(g){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,g),this.red.imul(this,g)},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(g){return r(this.red&&!g.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,g)};var U={k256:null,p224:null,p192:null,p25519:null};function K(B,g){this.name=B,this.p=new n(g,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}K.prototype._tmp=function(){var g=new n(null);return g.words=new Array(Math.ceil(this.n/13)),g},K.prototype.ireduce=function(g){var I=g,y;do this.split(I,this.tmp),I=this.imulK(I),I=I.iadd(this.tmp),y=I.bitLength();while(y>this.n);var f=y<this.n?-1:I.ucmp(this.p);return f===0?(I.words[0]=0,I.length=1):f>0?I.isub(this.p):I.strip!==void 0?I.strip():I._strip(),I},K.prototype.split=function(g,I){g.iushrn(this.n,0,I)},K.prototype.imulK=function(g){return g.imul(this.k)};function C(){K.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(C,K),C.prototype.split=function(g,I){for(var y=4194303,f=Math.min(g.length,9),p=0;p<f;p++)I.words[p]=g.words[p];if(I.length=f,g.length<=9){g.words[0]=0,g.length=1;return}var _=g.words[9];for(I.words[I.length++]=_&y,p=10;p<g.length;p++){var x=g.words[p]|0;g.words[p-10]=(x&y)<<4|_>>>22,_=x}_>>>=22,g.words[p-10]=_,_===0&&g.length>10?g.length-=10:g.length-=9},C.prototype.imulK=function(g){g.words[g.length]=0,g.words[g.length+1]=0,g.length+=2;for(var I=0,y=0;y<g.length;y++){var f=g.words[y]|0;I+=f*977,g.words[y]=I&67108863,I=f*64+(I/67108864|0)}return g.words[g.length-1]===0&&(g.length--,g.words[g.length-1]===0&&g.length--),g};function N(){K.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(N,K);function F(){K.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(F,K);function H(){K.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(H,K),H.prototype.imulK=function(g){for(var I=0,y=0;y<g.length;y++){var f=(g.words[y]|0)*19+I,p=f&67108863;f>>>=26,g.words[y]=p,I=f}return I!==0&&(g.words[g.length++]=I),g},n._prime=function(g){if(U[g])return U[g];var I;if(g==="k256")I=new C;else if(g==="p224")I=new N;else if(g==="p192")I=new F;else if(g==="p25519")I=new H;else throw new Error("Unknown prime "+g);return U[g]=I,I};function z(B){if(typeof B=="string"){var g=n._prime(B);this.m=g.p,this.prime=g}else r(B.gtn(1),"modulus must be greater than 1"),this.m=B,this.prime=null}z.prototype._verify1=function(g){r(g.negative===0,"red works only with positives"),r(g.red,"red works only with red numbers")},z.prototype._verify2=function(g,I){r((g.negative|I.negative)===0,"red works only with positives"),r(g.red&&g.red===I.red,"red works only with red numbers")},z.prototype.imod=function(g){return this.prime?this.prime.ireduce(g)._forceRed(this):g.umod(this.m)._forceRed(this)},z.prototype.neg=function(g){return g.isZero()?g.clone():this.m.sub(g)._forceRed(this)},z.prototype.add=function(g,I){this._verify2(g,I);var y=g.add(I);return y.cmp(this.m)>=0&&y.isub(this.m),y._forceRed(this)},z.prototype.iadd=function(g,I){this._verify2(g,I);var y=g.iadd(I);return y.cmp(this.m)>=0&&y.isub(this.m),y},z.prototype.sub=function(g,I){this._verify2(g,I);var y=g.sub(I);return y.cmpn(0)<0&&y.iadd(this.m),y._forceRed(this)},z.prototype.isub=function(g,I){this._verify2(g,I);var y=g.isub(I);return y.cmpn(0)<0&&y.iadd(this.m),y},z.prototype.shl=function(g,I){return this._verify1(g),this.imod(g.ushln(I))},z.prototype.imul=function(g,I){return this._verify2(g,I),this.imod(g.imul(I))},z.prototype.mul=function(g,I){return this._verify2(g,I),this.imod(g.mul(I))},z.prototype.isqr=function(g){return this.imul(g,g.clone())},z.prototype.sqr=function(g){return this.mul(g,g)},z.prototype.sqrt=function(g){if(g.isZero())return g.clone();var I=this.m.andln(3);if(r(I%2===1),I===3){var y=this.m.add(new n(1)).iushrn(2);return this.pow(g,y)}for(var f=this.m.subn(1),p=0;!f.isZero()&&f.andln(1)===0;)p++,f.iushrn(1);r(!f.isZero());var _=new n(1).toRed(this),x=_.redNeg(),b=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new n(2*d*d).toRed(this);this.pow(d,b).cmp(x)!==0;)d.redIAdd(x);for(var O=this.pow(d,f),T=this.pow(g,f.addn(1).iushrn(1)),S=this.pow(g,f),R=p;S.cmp(_)!==0;){for(var Y=S,X=0;Y.cmp(_)!==0;X++)Y=Y.redSqr();r(X<R);var ne=this.pow(O,new n(1).iushln(R-X-1));T=T.redMul(ne),O=ne.redSqr(),S=S.redMul(O),R=X}return T},z.prototype.invm=function(g){var I=g._invmp(this.m);return I.negative!==0?(I.negative=0,this.imod(I).redNeg()):this.imod(I)},z.prototype.pow=function(g,I){if(I.isZero())return new n(1).toRed(this);if(I.cmpn(1)===0)return g.clone();var y=4,f=new Array(1<<y);f[0]=new n(1).toRed(this),f[1]=g;for(var p=2;p<f.length;p++)f[p]=this.mul(f[p-1],g);var _=f[0],x=0,b=0,d=I.bitLength()%26;for(d===0&&(d=26),p=I.length-1;p>=0;p--){for(var O=I.words[p],T=d-1;T>=0;T--){var S=O>>T&1;if(_!==f[0]&&(_=this.sqr(_)),S===0&&x===0){b=0;continue}x<<=1,x|=S,b++,!(b!==y&&(p!==0||T!==0))&&(_=this.mul(_,f[x]),b=0,x=0)}d=26}return _},z.prototype.convertTo=function(g){var I=g.umod(this.m);return I===g?I.clone():I},z.prototype.convertFrom=function(g){var I=g.clone();return I.red=null,I},n.mont=function(g){return new G(g)};function G(B){z.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(G,z),G.prototype.convertTo=function(g){return this.imod(g.ushln(this.shift))},G.prototype.convertFrom=function(g){var I=this.imod(g.mul(this.rinv));return I.red=null,I},G.prototype.imul=function(g,I){if(g.isZero()||I.isZero())return g.words[0]=0,g.length=1,g;var y=g.imul(I),f=y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),p=y.isub(f).iushrn(this.shift),_=p;return p.cmp(this.m)>=0?_=p.isub(this.m):p.cmpn(0)<0&&(_=p.iadd(this.m)),_._forceRed(this)},G.prototype.mul=function(g,I){if(g.isZero()||I.isZero())return new n(0)._forceRed(this);var y=g.mul(I),f=y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),p=y.isub(f).iushrn(this.shift),_=p;return p.cmp(this.m)>=0?_=p.isub(this.m):p.cmpn(0)<0&&(_=p.iadd(this.m)),_._forceRed(this)},G.prototype.invm=function(g){var I=this.imod(g._invmp(this.m).mul(this.r2));return I._forceRed(this)}})(typeof rm>"u"||rm,EE)});var IE=k((x0e,om)=>{v();var im;om.exports=function(t){return im||(im=new hs(null)),im.generate(t)};function hs(e){this.rand=e}om.exports.Rand=hs;hs.prototype.generate=function(t){return this._rand(t)};hs.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var r=new Uint8Array(t),i=0;i<r.length;i++)r[i]=this.rand.getByte();return r};if(typeof self=="object")self.crypto&&self.crypto.getRandomValues?hs.prototype._rand=function(t){var r=new Uint8Array(t);return self.crypto.getRandomValues(r),r}:self.msCrypto&&self.msCrypto.getRandomValues?hs.prototype._rand=function(t){var r=new Uint8Array(t);return self.msCrypto.getRandomValues(r),r}:typeof window=="object"&&(hs.prototype._rand=function(){throw new Error("Not implemented yet")});else try{if(nm=_r(),typeof nm.randomBytes!="function")throw new Error("Not supported");hs.prototype._rand=function(t){return nm.randomBytes(t)}}catch{}var nm});var am=k((I0e,OE)=>{v();var Hu=Cn(),EW=IE();function ju(e){this.rand=e||new EW.Rand}OE.exports=ju;ju.create=function(t){return new ju(t)};ju.prototype._randbelow=function(t){var r=t.bitLength(),i=Math.ceil(r/8);do var n=new Hu(this.rand.generate(i));while(n.cmp(t)>=0);return n};ju.prototype._randrange=function(t,r){var i=r.sub(t);return t.add(this._randbelow(i))};ju.prototype.test=function(t,r,i){var n=t.bitLength(),o=Hu.mont(t),a=new Hu(1).toRed(o);r||(r=Math.max(1,n/48|0));for(var s=t.subn(1),u=0;!s.testn(u);u++);for(var c=t.shrn(u),l=s.toRed(o),m=!0;r>0;r--){var w=this._randrange(new Hu(2),s);i&&i(w);var E=w.toRed(o).redPow(c);if(!(E.cmp(a)===0||E.cmp(l)===0)){for(var P=1;P<u;P++){if(E=E.redSqr(),E.cmp(a)===0)return!1;if(E.cmp(l)===0)break}if(P===u)return!1}}return m};ju.prototype.getDivisor=function(t,r){var i=t.bitLength(),n=Hu.mont(t),o=new Hu(1).toRed(n);r||(r=Math.max(1,i/48|0));for(var a=t.subn(1),s=0;!a.testn(s);s++);for(var u=t.shrn(s),c=a.toRed(n);r>0;r--){var l=this._randrange(new Hu(2),a),m=t.gcd(l);if(m.cmpn(1)!==0)return m;var w=l.toRed(n).redPow(u);if(!(w.cmp(o)===0||w.cmp(c)===0)){for(var E=1;E<s;E++){if(w=w.redSqr(),w.cmp(o)===0)return w.fromRed().subn(1).gcd(t);if(w.cmp(c)===0)break}if(E===s)return w=w.redSqr(),w.fromRed().subn(1).gcd(t)}}return!1}});var hm=k((R0e,TE)=>{v();var IW=bu();TE.exports=lm;lm.simpleSieve=fm;lm.fermatTest=cm;var Jr=Cn(),OW=new Jr(24),AW=am(),AE=new AW,PW=new Jr(1),um=new Jr(2),TW=new Jr(5),A0e=new Jr(16),P0e=new Jr(8),kW=new Jr(10),RW=new Jr(3),T0e=new Jr(7),BW=new Jr(11),PE=new Jr(4),k0e=new Jr(12),sm=null;function MW(){if(sm!==null)return sm;var e=1048576,t=[];t[0]=2;for(var r=1,i=3;i<e;i+=2){for(var n=Math.ceil(Math.sqrt(i)),o=0;o<r&&t[o]<=n&&i%t[o]!==0;o++);r!==o&&t[o]<=n||(t[r++]=i)}return sm=t,t}function fm(e){for(var t=MW(),r=0;r<t.length;r++)if(e.modn(t[r])===0)return e.cmpn(t[r])===0;return!0}function cm(e){var t=Jr.mont(e);return um.toRed(t).redPow(e.subn(1)).fromRed().cmpn(1)===0}function lm(e,t){if(e<16)return t===2||t===5?new Jr([140,123]):new Jr([140,39]);t=new Jr(t);for(var r,i;;){for(r=new Jr(IW(Math.ceil(e/8)));r.bitLength()>e;)r.ishrn(1);if(r.isEven()&&r.iadd(PW),r.testn(1)||r.iadd(um),t.cmp(um)){if(!t.cmp(TW))for(;r.mod(kW).cmp(RW);)r.iadd(PE)}else for(;r.mod(OW).cmp(BW);)r.iadd(PE);if(i=r.shrn(1),fm(i)&&fm(r)&&cm(i)&&cm(r)&&AE.test(i)&&AE.test(r))return r}}});var kE=k((M0e,CW)=>{CW.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 CE=k((C0e,ME)=>{v();var fn=Cn(),NW=am(),RE=new NW,DW=new fn(24),LW=new fn(11),qW=new fn(10),UW=new fn(3),FW=new fn(7),BE=hm(),HW=bu();ME.exports=wa;function jW(e,t){return t=t||"utf8",h.Buffer.isBuffer(e)||(e=new h.Buffer(e,t)),this._pub=new fn(e),this}function zW(e,t){return t=t||"utf8",h.Buffer.isBuffer(e)||(e=new h.Buffer(e,t)),this._priv=new fn(e),this}var L2={};function KW(e,t){var r=t.toString("hex"),i=[r,e.toString(16)].join("_");if(i in L2)return L2[i];var n=0;if(e.isEven()||!BE.simpleSieve||!BE.fermatTest(e)||!RE.test(e))return n+=1,r==="02"||r==="05"?n+=8:n+=4,L2[i]=n,n;RE.test(e.shrn(1))||(n+=2);var o;switch(r){case"02":e.mod(DW).cmp(LW)&&(n+=8);break;case"05":o=e.mod(qW),o.cmp(UW)&&o.cmp(FW)&&(n+=8);break;default:n+=4}return L2[i]=n,n}function wa(e,t,r){this.setGenerator(t),this.__prime=new fn(e),this._prime=fn.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=jW,this.setPrivateKey=zW):this._primeCode=8}Object.defineProperty(wa.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=KW(this.__prime,this.__gen)),this._primeCode}});wa.prototype.generateKeys=function(){return this._priv||(this._priv=new fn(HW(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()};wa.prototype.computeSecret=function(e){e=new fn(e),e=e.toRed(this._prime);var t=e.redPow(this._priv).fromRed(),r=new h.Buffer(t.toArray()),i=this.getPrime();if(r.length<i.length){var n=new h.Buffer(i.length-r.length);n.fill(0),r=h.Buffer.concat([n,r])}return r};wa.prototype.getPublicKey=function(t){return q2(this._pub,t)};wa.prototype.getPrivateKey=function(t){return q2(this._priv,t)};wa.prototype.getPrime=function(e){return q2(this.__prime,e)};wa.prototype.getGenerator=function(e){return q2(this._gen,e)};wa.prototype.setGenerator=function(e,t){return t=t||"utf8",h.Buffer.isBuffer(e)||(e=new h.Buffer(e,t)),this.__gen=e,this._gen=new fn(e),this};function q2(e,t){var r=new h.Buffer(e.toArray());return t?r.toString(t):r}});var LE=k(Ic=>{v();var VW=hm(),NE=kE(),dm=CE();function GW(e){var t=new h.Buffer(NE[e].prime,"hex"),r=new h.Buffer(NE[e].gen,"hex");return new dm(t,r)}var ZW={binary:!0,hex:!0,base64:!0};function DE(e,t,r,i){return h.Buffer.isBuffer(t)||ZW[t]===void 0?DE(e,"binary",t,r):(t=t||"binary",i=i||"binary",r=r||new h.Buffer([2]),h.Buffer.isBuffer(r)||(r=new h.Buffer(r,i)),typeof e=="number"?new dm(VW(e,r),r,!0):(h.Buffer.isBuffer(e)||(e=new h.Buffer(e,t)),new dm(e,r,!0)))}Ic.DiffieHellmanGroup=Ic.createDiffieHellmanGroup=Ic.getDiffieHellman=GW;Ic.createDiffieHellman=Ic.DiffieHellman=DE});var qE=k((exports,module)=>{v();var indexOf=function(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0;r<e.length;r++)if(e[r]===t)return r;return-1},Object_keys=function(e){if(Object.keys)return Object.keys(e);var t=[];for(var r in e)t.push(r);return t},forEach=function(e,t){if(e.forEach)return e.forEach(t);for(var r=0;r<e.length;r++)t(e[r],r,e)},defineProp=(function(){try{return Object.defineProperty({},"_",{}),function(e,t,r){Object.defineProperty(e,t,{writable:!0,enumerable:!1,configurable:!0,value:r})}}catch{return function(t,r,i){t[r]=i}}})(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];function Context(){}Context.prototype={};var Script=exports.Script=function(t){if(!(this instanceof Script))return new Script(t);this.code=t};Script.prototype.runInContext=function(e){if(!(e instanceof Context))throw new TypeError("needs a 'context' argument.");var t=document.createElement("iframe");t.style||(t.style={}),t.style.display="none",document.body.appendChild(t);var r=t.contentWindow,i=r.eval,n=r.execScript;!i&&n&&(n.call(r,"null"),i=r.eval),forEach(Object_keys(e),function(s){r[s]=e[s]}),forEach(globals,function(s){e[s]&&(r[s]=e[s])});var o=Object_keys(r),a=i.call(r,this.code);return forEach(Object_keys(r),function(s){(s in e||indexOf(o,s)===-1)&&(e[s]=r[s])}),forEach(globals,function(s){s in e||defineProp(e,s,r[s])}),document.body.removeChild(t),a};Script.prototype.runInThisContext=function(){return eval(this.code)};Script.prototype.runInNewContext=function(e){var t=Script.createContext(e),r=this.runInContext(t);return e&&forEach(Object_keys(t),function(i){e[i]=t[i]}),r};forEach(Object_keys(Script.prototype),function(e){exports[e]=Script[e]=function(t){var r=Script(t);return r[e].apply(r,[].slice.call(arguments,1))}});exports.isContext=function(e){return e instanceof Context};exports.createScript=function(e){return exports.Script(e)};exports.createContext=Script.createContext=function(e){var t=new Context;return typeof e=="object"&&forEach(Object_keys(e),function(r){t[r]=e[r]}),t}});var HE=k(FE=>{v();var UE=Ac(),WW=Te(),YW=FE;YW.define=function(t,r){return new Oc(t,r)};function Oc(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}Oc.prototype._createNamed=function(t){var r;try{r=qE().runInThisContext("(function "+this.name+`(entity) {
|
|
11
|
+
`)+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}dt.types=r_();function s_(e){return Array.isArray(e)}dt.isArray=s_;function Rg(e){return typeof e=="boolean"}dt.isBoolean=Rg;function Dd(e){return e===null}dt.isNull=Dd;function hj(e){return e==null}dt.isNullOrUndefined=hj;function u_(e){return typeof e=="number"}dt.isNumber=u_;function Ld(e){return typeof e=="string"}dt.isString=Ld;function dj(e){return typeof e=="symbol"}dt.isSymbol=dj;function Eu(e){return e===void 0}dt.isUndefined=Eu;function ph(e){return uc(e)&&Bg(e)==="[object RegExp]"}dt.isRegExp=ph;dt.types.isRegExp=ph;function uc(e){return typeof e=="object"&&e!==null}dt.isObject=uc;function Nd(e){return uc(e)&&Bg(e)==="[object Date]"}dt.isDate=Nd;dt.types.isDate=Nd;function gh(e){return uc(e)&&(Bg(e)==="[object Error]"||e instanceof Error)}dt.isError=gh;dt.types.isNativeError=gh;function Md(e){return typeof e=="function"}dt.isFunction=Md;function pj(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e>"u"}dt.isPrimitive=pj;dt.isBuffer=n_();function Bg(e){return Object.prototype.toString.call(e)}function Tg(e){return e<10?"0"+e.toString(10):e.toString(10)}var gj=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function vj(){var e=new Date,t=[Tg(e.getHours()),Tg(e.getMinutes()),Tg(e.getSeconds())].join(":");return[e.getDate(),gj[e.getMonth()],t].join(" ")}dt.log=function(){console.log("%s - %s",vj(),dt.format.apply(dt,arguments))};dt.inherits=Te();dt._extend=function(e,t){if(!t||!uc(t))return e;for(var r=Object.keys(t),i=r.length;i--;)e[r[i]]=t[r[i]];return e};function f_(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var xu=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;dt.promisify=function(t){if(typeof t!="function")throw new TypeError('The "original" argument must be of type Function');if(xu&&t[xu]){var r=t[xu];if(typeof r!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,xu,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var i,n,o=new Promise(function(u,c){i=u,n=c}),a=[],s=0;s<arguments.length;s++)a.push(arguments[s]);a.push(function(u,c){u?n(u):i(c)});try{t.apply(this,a)}catch(u){n(u)}return o}return Object.setPrototypeOf(r,Object.getPrototypeOf(t)),xu&&Object.defineProperty(r,xu,{value:r,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(r,o_(t))};dt.promisify.custom=xu;function mj(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}function yj(e){if(typeof e!="function")throw new TypeError('The "original" argument must be of type Function');function t(){for(var r=[],i=0;i<arguments.length;i++)r.push(arguments[i]);var n=r.pop();if(typeof n!="function")throw new TypeError("The last argument must be of type Function");var o=this,a=function(){return n.apply(o,arguments)};e.apply(this,r).then(function(s){A.default.nextTick(a.bind(null,null,s))},function(s){A.default.nextTick(mj.bind(null,s,a))})}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,o_(e)),t}dt.callbackify=yj});var g_=k((hce,p_)=>{"use strict";v();function c_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}function l_(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?c_(Object(r),!0).forEach(function(i){bj(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c_(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function bj(e,t,r){return t=d_(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _j(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h_(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,d_(i.key),i)}}function wj(e,t,r){return t&&h_(e.prototype,t),r&&h_(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function d_(e){var t=Sj(e,"string");return typeof t=="symbol"?t:String(t)}function Sj(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var xj=Kt(),qd=xj.Buffer,Ej=rn(),Mg=Ej.inspect,Ij=Mg&&Mg.custom||"inspect";function Oj(e,t,r){qd.prototype.copy.call(e,t,r)}p_.exports=(function(){function e(){_j(this,e),this.head=null,this.tail=null,this.length=0}return wj(e,[{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 qd.alloc(0);for(var i=qd.allocUnsafe(r>>>0),n=this.head,o=0;n;)Oj(n.data,i,o),o+=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,o=i.data;for(r-=o.length;i=i.next;){var a=i.data,s=r>a.length?a.length:r;if(s===a.length?o+=a:o+=a.slice(0,r),r-=s,r===0){s===a.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=a.slice(s));break}++n}return this.length-=n,o}},{key:"_getBuffer",value:function(r){var i=qd.allocUnsafe(r),n=this.head,o=1;for(n.data.copy(i),r-=n.data.length;n=n.next;){var a=n.data,s=r>a.length?a.length:r;if(a.copy(i,i.length-r,0,s),r-=s,r===0){s===a.length?(++o,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=a.slice(s));break}++o}return this.length-=o,i}},{key:Ij,value:function(r,i){return Mg(this,l_(l_({},i),{},{depth:0,customInspect:!1}))}}]),e})()});var Ng=k((pce,m_)=>{"use strict";v();function Aj(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,A.default.nextTick(Cg,this,e)):A.default.nextTick(Cg,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(o){!t&&o?r._writableState?r._writableState.errorEmitted?A.default.nextTick(Ud,r):(r._writableState.errorEmitted=!0,A.default.nextTick(v_,r,o)):A.default.nextTick(v_,r,o):t?(A.default.nextTick(Ud,r),t(o)):A.default.nextTick(Ud,r)}),this)}function v_(e,t){Cg(e,t),Ud(e)}function Ud(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function Pj(){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 Cg(e,t){e.emit("error",t)}function Tj(e,t){var r=e._readableState,i=e._writableState;r&&r.autoDestroy||i&&i.autoDestroy?e.destroy(t):e.emit("error",t)}m_.exports={destroy:Aj,undestroy:Pj,errorOrDestroy:Tj}});var Iu=k((vce,__)=>{"use strict";v();function kj(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var b_={};function nn(e,t,r){r||(r=Error);function i(o,a,s){return typeof t=="string"?t:t(o,a,s)}var n=(function(o){kj(a,o);function a(s,u,c){return o.call(this,i(s,u,c))||this}return a})(r);n.prototype.name=r.name,n.prototype.code=e,b_[e]=n}function y_(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(i){return String(i)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function Rj(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function Bj(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function Mj(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}nn("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);nn("ERR_INVALID_ARG_TYPE",function(e,t,r){var i;typeof t=="string"&&Rj(t,"not ")?(i="must not be",t=t.replace(/^not /,"")):i="must be";var n;if(Bj(e," argument"))n="The ".concat(e," ").concat(i," ").concat(y_(t,"type"));else{var o=Mj(e,".")?"property":"argument";n='The "'.concat(e,'" ').concat(o," ").concat(i," ").concat(y_(t,"type"))}return n+=". Received type ".concat(typeof r),n},TypeError);nn("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");nn("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});nn("ERR_STREAM_PREMATURE_CLOSE","Premature close");nn("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});nn("ERR_MULTIPLE_CALLBACK","Callback called multiple times");nn("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");nn("ERR_STREAM_WRITE_AFTER_END","write after end");nn("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);nn("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);nn("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");__.exports.codes=b_});var Dg=k((yce,w_)=>{"use strict";v();var Cj=Iu().codes.ERR_INVALID_OPT_VALUE;function Nj(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function Dj(e,t,r,i){var n=Nj(t,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var o=i?r:"highWaterMark";throw new Cj(o,n)}return Math.floor(n)}return e.objectMode?16:16*1024}w_.exports={getHighWaterMark:Dj}});var qg=k((_ce,S_)=>{v();S_.exports=Lj;function Lj(e,t){if(Lg("noDeprecation"))return e;var r=!1;function i(){if(!r){if(Lg("throwDeprecation"))throw new Error(t);Lg("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}return i}function Lg(e){try{if(!globalThis.localStorage)return!1}catch{return!1}var t=globalThis.localStorage[e];return t==null?!1:String(t).toLowerCase()==="true"}});var Hg=k((Sce,P_)=>{"use strict";v();P_.exports=ur;function E_(e){var t=this;this.next=null,this.entry=null,this.finish=function(){cz(t,e)}}var fc;ur.WritableState=mh;var qj={deprecate:qg()},I_=eg(),Hd=Kt().Buffer,Uj=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Fj(e){return Hd.from(e)}function Hj(e){return Hd.isBuffer(e)||e instanceof Uj}var Fg=Ng(),jj=Dg(),zj=jj.getHighWaterMark,is=Iu().codes,Kj=is.ERR_INVALID_ARG_TYPE,Vj=is.ERR_METHOD_NOT_IMPLEMENTED,Gj=is.ERR_MULTIPLE_CALLBACK,Zj=is.ERR_STREAM_CANNOT_PIPE,Wj=is.ERR_STREAM_DESTROYED,Yj=is.ERR_STREAM_NULL_VALUES,$j=is.ERR_STREAM_WRITE_AFTER_END,Xj=is.ERR_UNKNOWN_ENCODING,cc=Fg.errorOrDestroy;Te()(ur,I_);function Jj(){}function mh(e,t,r){fc=fc||Ou(),e=e||{},typeof r!="boolean"&&(r=t instanceof fc),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=zj(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=e.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(n){oz(t,n)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new E_(this)}mh.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(mh.prototype,"buffer",{get:qj.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var Fd;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Fd=Function.prototype[Symbol.hasInstance],Object.defineProperty(ur,Symbol.hasInstance,{value:function(t){return Fd.call(this,t)?!0:this!==ur?!1:t&&t._writableState instanceof mh}})):Fd=function(t){return t instanceof this};function ur(e){fc=fc||Ou();var t=this instanceof fc;if(!t&&!Fd.call(ur,this))return new ur(e);this._writableState=new mh(e,this,t),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),I_.call(this)}ur.prototype.pipe=function(){cc(this,new Zj)};function Qj(e,t){var r=new $j;cc(e,r),A.default.nextTick(t,r)}function ez(e,t,r,i){var n;return r===null?n=new Yj:typeof r!="string"&&!t.objectMode&&(n=new Kj("chunk",["string","Buffer"],r)),n?(cc(e,n),A.default.nextTick(i,n),!1):!0}ur.prototype.write=function(e,t,r){var i=this._writableState,n=!1,o=!i.objectMode&&Hj(e);return o&&!Hd.isBuffer(e)&&(e=Fj(e)),typeof t=="function"&&(r=t,t=null),o?t="buffer":t||(t=i.defaultEncoding),typeof r!="function"&&(r=Jj),i.ending?Qj(this,r):(o||ez(this,i,e,r))&&(i.pendingcb++,n=rz(this,i,o,e,t,r)),n};ur.prototype.cork=function(){this._writableState.corked++};ur.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&O_(this,e))};ur.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new Xj(t);return this._writableState.defaultEncoding=t,this};Object.defineProperty(ur.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function tz(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=Hd.from(t,r)),t}Object.defineProperty(ur.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function rz(e,t,r,i,n,o){if(!r){var a=tz(t,i,n);i!==a&&(r=!0,n="buffer",i=a)}var s=t.objectMode?1:i.length;t.length+=s;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:o,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else Ug(e,t,!1,s,i,n,o);return u}function Ug(e,t,r,i,n,o,a){t.writelen=i,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new Wj("write")):r?e._writev(n,t.onwrite):e._write(n,o,t.onwrite),t.sync=!1}function iz(e,t,r,i,n){--t.pendingcb,r?(A.default.nextTick(n,i),A.default.nextTick(vh,e,t),e._writableState.errorEmitted=!0,cc(e,i)):(n(i),e._writableState.errorEmitted=!0,cc(e,i),vh(e,t))}function nz(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function oz(e,t){var r=e._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new Gj;if(nz(r),t)iz(e,r,i,t,n);else{var o=A_(r)||e.destroyed;!o&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&O_(e,r),i?A.default.nextTick(x_,e,r,o,n):x_(e,r,o,n)}}function x_(e,t,r,i){r||az(e,t),t.pendingcb--,i(),vh(e,t)}function az(e,t){t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function O_(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,n=new Array(i),o=t.corkedRequestsFree;o.entry=r;for(var a=0,s=!0;r;)n[a]=r,r.isBuf||(s=!1),r=r.next,a+=1;n.allBuffers=s,Ug(e,t,!0,t.length,n,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new E_(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,c=r.encoding,l=r.callback,m=t.objectMode?1:u.length;if(Ug(e,t,!1,m,u,c,l),r=r.next,t.bufferedRequestCount--,t.writing)break}r===null&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}ur.prototype._write=function(e,t,r){r(new Vj("_write()"))};ur.prototype._writev=null;ur.prototype.end=function(e,t,r){var i=this._writableState;return typeof e=="function"?(r=e,e=null,t=null):typeof t=="function"&&(r=t,t=null),e!=null&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||fz(this,i,r),this};Object.defineProperty(ur.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function A_(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function sz(e,t){e._final(function(r){t.pendingcb--,r&&cc(e,r),t.prefinished=!0,e.emit("prefinish"),vh(e,t)})}function uz(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final=="function"&&!t.destroyed?(t.pendingcb++,t.finalCalled=!0,A.default.nextTick(sz,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function vh(e,t){var r=A_(t);if(r&&(uz(e,t),t.pendingcb===0&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var i=e._readableState;(!i||i.autoDestroy&&i.endEmitted)&&e.destroy()}return r}function fz(e,t,r){t.ending=!0,vh(e,t),r&&(t.finished?A.default.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function cz(e,t,r){var i=e.entry;for(e.entry=null;i;){var n=i.callback;t.pendingcb--,n(r),i=i.next}t.corkedRequestsFree.next=e}Object.defineProperty(ur.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}});ur.prototype.destroy=Fg.destroy;ur.prototype._undestroy=Fg.undestroy;ur.prototype._destroy=function(e,t){t(e)}});var Ou=k((Ece,k_)=>{"use strict";v();var lz=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};k_.exports=bo;var T_=Kg(),zg=Hg();Te()(bo,T_);for(jg=lz(zg.prototype),jd=0;jd<jg.length;jd++)zd=jg[jd],bo.prototype[zd]||(bo.prototype[zd]=zg.prototype[zd]);var jg,zd,jd;function bo(e){if(!(this instanceof bo))return new bo(e);T_.call(this,e),zg.call(this,e),this.allowHalfOpen=!0,e&&(e.readable===!1&&(this.readable=!1),e.writable===!1&&(this.writable=!1),e.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",hz)))}Object.defineProperty(bo.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(bo.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(bo.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function hz(){this._writableState.ended||A.default.nextTick(dz,this)}function dz(e){e.end()}Object.defineProperty(bo.prototype,"destroyed",{enumerable:!1,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)}})});var M_=k((Vg,B_)=>{v();var Kd=Kt(),ca=Kd.Buffer;function R_(e,t){for(var r in e)t[r]=e[r]}ca.from&&ca.alloc&&ca.allocUnsafe&&ca.allocUnsafeSlow?B_.exports=Kd:(R_(Kd,Vg),Vg.Buffer=lc);function lc(e,t,r){return ca(e,t,r)}R_(ca,lc);lc.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return ca(e,t,r)};lc.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var i=ca(e);return t!==void 0?typeof r=="string"?i.fill(t,r):i.fill(t):i.fill(0),i};lc.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return ca(e)};lc.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Kd.SlowBuffer(e)}});var hc=k(N_=>{"use strict";v();var Zg=M_().Buffer,C_=Zg.isEncoding||function(e){switch(e=""+e,e&&e.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 pz(e){if(!e)return"utf8";for(var t;;)switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function gz(e){var t=pz(e);if(typeof t!="string"&&(Zg.isEncoding===C_||!C_(e)))throw new Error("Unknown encoding: "+e);return t||e}N_.StringDecoder=yh;function yh(e){this.encoding=gz(e);var t;switch(this.encoding){case"utf16le":this.text=wz,this.end=Sz,t=4;break;case"utf8":this.fillLast=yz,t=4;break;case"base64":this.text=xz,this.end=Ez,t=3;break;default:this.write=Iz,this.end=Oz;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Zg.allocUnsafe(t)}yh.prototype.write=function(e){if(e.length===0)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""};yh.prototype.end=_z;yh.prototype.text=bz;yh.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function Gg(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function vz(e,t,r){var i=t.length-1;if(i<r)return 0;var n=Gg(t[i]);return n>=0?(n>0&&(e.lastNeed=n-1),n):--i<r||n===-2?0:(n=Gg(t[i]),n>=0?(n>0&&(e.lastNeed=n-2),n):--i<r||n===-2?0:(n=Gg(t[i]),n>=0?(n>0&&(n===2?n=0:e.lastNeed=n-3),n):0))}function mz(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}function yz(e){var t=this.lastTotal-this.lastNeed,r=mz(this,e,t);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function bz(e,t){var r=vz(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)}function _z(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}function wz(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function Sz(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function xz(e,t){var r=(e.length-t)%3;return r===0?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function Ez(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function Iz(e){return e.toString(this.encoding)}function Oz(e){return e&&e.length?this.write(e):""}});var Vd=k((Tce,q_)=>{"use strict";v();var D_=Iu().codes.ERR_STREAM_PREMATURE_CLOSE;function Az(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];e.apply(this,i)}}}function Pz(){}function Tz(e){return e.setHeader&&typeof e.abort=="function"}function L_(e,t,r){if(typeof t=="function")return L_(e,null,t);t||(t={}),r=Az(r||Pz);var i=t.readable||t.readable!==!1&&e.readable,n=t.writable||t.writable!==!1&&e.writable,o=function(){e.writable||s()},a=e._writableState&&e._writableState.finished,s=function(){n=!1,a=!0,i||r.call(e)},u=e._readableState&&e._readableState.endEmitted,c=function(){i=!1,u=!0,n||r.call(e)},l=function(P){r.call(e,P)},m=function(){var P;if(i&&!u)return(!e._readableState||!e._readableState.ended)&&(P=new D_),r.call(e,P);if(n&&!a)return(!e._writableState||!e._writableState.ended)&&(P=new D_),r.call(e,P)},w=function(){e.req.on("finish",s)};return Tz(e)?(e.on("complete",s),e.on("abort",m),e.req?w():e.on("request",w)):n&&!e._writableState&&(e.on("end",o),e.on("close",o)),e.on("end",c),e.on("finish",s),t.error!==!1&&e.on("error",l),e.on("close",m),function(){e.removeListener("complete",s),e.removeListener("abort",m),e.removeListener("request",w),e.req&&e.req.removeListener("finish",s),e.removeListener("end",o),e.removeListener("close",o),e.removeListener("finish",s),e.removeListener("end",c),e.removeListener("error",l),e.removeListener("close",m)}}q_.exports=L_});var F_=k((Rce,U_)=>{"use strict";v();var Gd;function ns(e,t,r){return t=kz(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kz(e){var t=Rz(e,"string");return typeof t=="symbol"?t:String(t)}function Rz(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Bz=Vd(),os=Symbol("lastResolve"),Au=Symbol("lastReject"),bh=Symbol("error"),Zd=Symbol("ended"),Pu=Symbol("lastPromise"),Wg=Symbol("handlePromise"),Tu=Symbol("stream");function as(e,t){return{value:e,done:t}}function Mz(e){var t=e[os];if(t!==null){var r=e[Tu].read();r!==null&&(e[Pu]=null,e[os]=null,e[Au]=null,t(as(r,!1)))}}function Cz(e){A.default.nextTick(Mz,e)}function Nz(e,t){return function(r,i){e.then(function(){if(t[Zd]){r(as(void 0,!0));return}t[Wg](r,i)},i)}}var Dz=Object.getPrototypeOf(function(){}),Lz=Object.setPrototypeOf((Gd={get stream(){return this[Tu]},next:function(){var t=this,r=this[bh];if(r!==null)return Promise.reject(r);if(this[Zd])return Promise.resolve(as(void 0,!0));if(this[Tu].destroyed)return new Promise(function(a,s){A.default.nextTick(function(){t[bh]?s(t[bh]):a(as(void 0,!0))})});var i=this[Pu],n;if(i)n=new Promise(Nz(i,this));else{var o=this[Tu].read();if(o!==null)return Promise.resolve(as(o,!1));n=new Promise(this[Wg])}return this[Pu]=n,n}},ns(Gd,Symbol.asyncIterator,function(){return this}),ns(Gd,"return",function(){var t=this;return new Promise(function(r,i){t[Tu].destroy(null,function(n){if(n){i(n);return}r(as(void 0,!0))})})}),Gd),Dz),qz=function(t){var r,i=Object.create(Lz,(r={},ns(r,Tu,{value:t,writable:!0}),ns(r,os,{value:null,writable:!0}),ns(r,Au,{value:null,writable:!0}),ns(r,bh,{value:null,writable:!0}),ns(r,Zd,{value:t._readableState.endEmitted,writable:!0}),ns(r,Wg,{value:function(o,a){var s=i[Tu].read();s?(i[Pu]=null,i[os]=null,i[Au]=null,o(as(s,!1))):(i[os]=o,i[Au]=a)},writable:!0}),r));return i[Pu]=null,Bz(t,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var o=i[Au];o!==null&&(i[Pu]=null,i[os]=null,i[Au]=null,o(n)),i[bh]=n;return}var a=i[os];a!==null&&(i[Pu]=null,i[os]=null,i[Au]=null,a(as(void 0,!0))),i[Zd]=!0}),t.on("readable",Cz.bind(null,i)),i};U_.exports=qz});var j_=k((Mce,H_)=>{v();H_.exports=function(){throw new Error("Readable.from is not available in the browser")}});var Kg=k((Dce,J_)=>{"use strict";v();J_.exports=xt;var dc;xt.ReadableState=G_;var Nce=Qf().EventEmitter,V_=function(t,r){return t.listeners(r).length},wh=eg(),Wd=Kt().Buffer,Uz=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Fz(e){return Wd.from(e)}function Hz(e){return Wd.isBuffer(e)||e instanceof Uz}var Yg=rn(),ct;Yg&&Yg.debuglog?ct=Yg.debuglog("stream"):ct=function(){};var jz=g_(),rv=Ng(),zz=Dg(),Kz=zz.getHighWaterMark,Yd=Iu().codes,Vz=Yd.ERR_INVALID_ARG_TYPE,Gz=Yd.ERR_STREAM_PUSH_AFTER_EOF,Zz=Yd.ERR_METHOD_NOT_IMPLEMENTED,Wz=Yd.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,pc,$g,Xg;Te()(xt,wh);var _h=rv.errorOrDestroy,Jg=["error","close","destroy","pause","resume"];function Yz(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}function G_(e,t,r){dc=dc||Ou(),e=e||{},typeof r!="boolean"&&(r=t instanceof dc),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=Kz(this,e,"readableHighWaterMark",r),this.buffer=new jz,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=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(pc||(pc=hc().StringDecoder),this.decoder=new pc(e.encoding),this.encoding=e.encoding)}function xt(e){if(dc=dc||Ou(),!(this instanceof xt))return new xt(e);var t=this instanceof dc;this._readableState=new G_(e,this,t),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),wh.call(this)}Object.defineProperty(xt.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});xt.prototype.destroy=rv.destroy;xt.prototype._undestroy=rv.undestroy;xt.prototype._destroy=function(e,t){t(e)};xt.prototype.push=function(e,t){var r=this._readableState,i;return r.objectMode?i=!0:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=Wd.from(e,t),t=""),i=!0),Z_(this,e,t,!1,i)};xt.prototype.unshift=function(e){return Z_(this,e,null,!0,!1)};function Z_(e,t,r,i,n){ct("readableAddChunk",t);var o=e._readableState;if(t===null)o.reading=!1,Jz(e,o);else{var a;if(n||(a=$z(o,t)),a)_h(e,a);else if(o.objectMode||t&&t.length>0)if(typeof t!="string"&&!o.objectMode&&Object.getPrototypeOf(t)!==Wd.prototype&&(t=Fz(t)),i)o.endEmitted?_h(e,new Wz):Qg(e,o,t,!0);else if(o.ended)_h(e,new Gz);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||t.length!==0?Qg(e,o,t,!1):tv(e,o)):Qg(e,o,t,!1)}else i||(o.reading=!1,tv(e,o))}return!o.ended&&(o.length<o.highWaterMark||o.length===0)}function Qg(e,t,r,i){t.flowing&&t.length===0&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&$d(e)),tv(e,t)}function $z(e,t){var r;return!Hz(t)&&typeof t!="string"&&t!==void 0&&!e.objectMode&&(r=new Vz("chunk",["string","Buffer","Uint8Array"],t)),r}xt.prototype.isPaused=function(){return this._readableState.flowing===!1};xt.prototype.setEncoding=function(e){pc||(pc=hc().StringDecoder);var t=new pc(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";r!==null;)i+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),i!==""&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var z_=1073741824;function Xz(e){return e>=z_?e=z_:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function K_(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=Xz(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}xt.prototype.read=function(e){ct("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&((t.highWaterMark!==0?t.length>=t.highWaterMark:t.length>0)||t.ended))return ct("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?ev(this):$d(this),null;if(e=K_(e,t),e===0&&t.ended)return t.length===0&&ev(this),null;var i=t.needReadable;ct("need readable",i),(t.length===0||t.length-e<t.highWaterMark)&&(i=!0,ct("length less than watermark",i)),t.ended||t.reading?(i=!1,ct("reading or ended",i)):i&&(ct("do read"),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=K_(r,t)));var n;return e>0?n=$_(e,t):n=null,n===null?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&ev(this)),n!==null&&this.emit("data",n),n};function Jz(e,t){if(ct("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?$d(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,W_(e)))}}function $d(e){var t=e._readableState;ct("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(ct("emitReadable",t.flowing),t.emittedReadable=!0,A.default.nextTick(W_,e))}function W_(e){var t=e._readableState;ct("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,iv(e)}function tv(e,t){t.readingMore||(t.readingMore=!0,A.default.nextTick(Qz,e,t))}function Qz(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&t.length===0);){var r=t.length;if(ct("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}xt.prototype._read=function(e){_h(this,new Zz("_read()"))};xt.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e);break}i.pipesCount+=1,ct("pipe count=%d opts=%j",i.pipesCount,t);var n=(!t||t.end!==!1)&&e!==A.default.stdout&&e!==A.default.stderr,o=n?s:M;i.endEmitted?A.default.nextTick(o):r.once("end",o),e.on("unpipe",a);function a(D,L){ct("onunpipe"),D===r&&L&&L.hasUnpiped===!1&&(L.hasUnpiped=!0,l())}function s(){ct("onend"),e.end()}var u=eK(r);e.on("drain",u);var c=!1;function l(){ct("cleanup"),e.removeListener("close",E),e.removeListener("finish",P),e.removeListener("drain",u),e.removeListener("error",w),e.removeListener("unpipe",a),r.removeListener("end",s),r.removeListener("end",M),r.removeListener("data",m),c=!0,i.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&u()}r.on("data",m);function m(D){ct("ondata");var L=e.write(D);ct("dest.write",L),L===!1&&((i.pipesCount===1&&i.pipes===e||i.pipesCount>1&&X_(i.pipes,e)!==-1)&&!c&&(ct("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function w(D){ct("onerror",D),M(),e.removeListener("error",w),V_(e,"error")===0&&_h(e,D)}Yz(e,"error",w);function E(){e.removeListener("finish",P),M()}e.once("close",E);function P(){ct("onfinish"),e.removeListener("close",E),M()}e.once("finish",P);function M(){ct("unpipe"),r.unpipe(e)}return e.emit("pipe",r),i.flowing||(ct("pipe resume"),r.resume()),e};function eK(e){return function(){var r=e._readableState;ct("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&V_(e,"data")&&(r.flowing=!0,iv(e))}}xt.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var i=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<n;o++)i[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=X_(t.pipes,e);return a===-1?this:(t.pipes.splice(a,1),t.pipesCount-=1,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)};xt.prototype.on=function(e,t){var r=wh.prototype.on.call(this,e,t),i=this._readableState;return e==="data"?(i.readableListening=this.listenerCount("readable")>0,i.flowing!==!1&&this.resume()):e==="readable"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,ct("on readable",i.length,i.reading),i.length?$d(this):i.reading||A.default.nextTick(tK,this)),r};xt.prototype.addListener=xt.prototype.on;xt.prototype.removeListener=function(e,t){var r=wh.prototype.removeListener.call(this,e,t);return e==="readable"&&A.default.nextTick(Y_,this),r};xt.prototype.removeAllListeners=function(e){var t=wh.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&A.default.nextTick(Y_,this),t};function Y_(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function tK(e){ct("readable nexttick read 0"),e.read(0)}xt.prototype.resume=function(){var e=this._readableState;return e.flowing||(ct("resume"),e.flowing=!e.readableListening,rK(this,e)),e.paused=!1,this};function rK(e,t){t.resumeScheduled||(t.resumeScheduled=!0,A.default.nextTick(iK,e,t))}function iK(e,t){ct("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),iv(e),t.flowing&&!t.reading&&e.read(0)}xt.prototype.pause=function(){return ct("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(ct("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function iv(e){var t=e._readableState;for(ct("flow",t.flowing);t.flowing&&e.read()!==null;);}xt.prototype.wrap=function(e){var t=this,r=this._readableState,i=!1;e.on("end",function(){if(ct("wrapped end"),r.decoder&&!r.ended){var a=r.decoder.end();a&&a.length&&t.push(a)}t.push(null)}),e.on("data",function(a){if(ct("wrapped data"),r.decoder&&(a=r.decoder.write(a)),!(r.objectMode&&a==null)&&!(!r.objectMode&&(!a||!a.length))){var s=t.push(a);s||(i=!0,e.pause())}});for(var n in e)this[n]===void 0&&typeof e[n]=="function"&&(this[n]=(function(s){return function(){return e[s].apply(e,arguments)}})(n));for(var o=0;o<Jg.length;o++)e.on(Jg[o],this.emit.bind(this,Jg[o]));return this._read=function(a){ct("wrapped _read",a),i&&(i=!1,e.resume())},this};typeof Symbol=="function"&&(xt.prototype[Symbol.asyncIterator]=function(){return $g===void 0&&($g=F_()),$g(this)});Object.defineProperty(xt.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(xt.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(xt.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}});xt._fromList=$_;Object.defineProperty(xt.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function $_(e,t){if(t.length===0)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.first():r=t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}function ev(e){var t=e._readableState;ct("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,A.default.nextTick(nK,t,e))}function nK(e,t){if(ct("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}typeof Symbol=="function"&&(xt.from=function(e,t){return Xg===void 0&&(Xg=j_()),Xg(xt,e,t)});function X_(e,t){for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1}});var nv=k((qce,ew)=>{"use strict";v();ew.exports=la;var Xd=Iu().codes,oK=Xd.ERR_METHOD_NOT_IMPLEMENTED,aK=Xd.ERR_MULTIPLE_CALLBACK,sK=Xd.ERR_TRANSFORM_ALREADY_TRANSFORMING,uK=Xd.ERR_TRANSFORM_WITH_LENGTH_0,Jd=Ou();Te()(la,Jd);function fK(e,t){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(i===null)return this.emit("error",new aK);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),i(e);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function la(e){if(!(this instanceof la))return new la(e);Jd.call(this,e),this._transformState={afterTransform:fK.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",cK)}function cK(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(t,r){Q_(e,t,r)}):Q_(this,null,null)}la.prototype.push=function(e,t){return this._transformState.needTransform=!1,Jd.prototype.push.call(this,e,t)};la.prototype._transform=function(e,t,r){r(new oK("_transform()"))};la.prototype._write=function(e,t,r){var i=this._transformState;if(i.writecb=r,i.writechunk=e,i.writeencoding=t,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};la.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};la.prototype._destroy=function(e,t){Jd.prototype._destroy.call(this,e,function(r){t(r)})};function Q_(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new uK;if(e._transformState.transforming)throw new sK;return e.push(null)}});var iw=k((Fce,rw)=>{"use strict";v();rw.exports=Sh;var tw=nv();Te()(Sh,tw);function Sh(e){if(!(this instanceof Sh))return new Sh(e);tw.call(this,e)}Sh.prototype._transform=function(e,t,r){r(null,e)}});var uw=k((jce,sw)=>{"use strict";v();var ov;function lK(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var aw=Iu().codes,hK=aw.ERR_MISSING_ARGS,dK=aw.ERR_STREAM_DESTROYED;function nw(e){if(e)throw e}function pK(e){return e.setHeader&&typeof e.abort=="function"}function gK(e,t,r,i){i=lK(i);var n=!1;e.on("close",function(){n=!0}),ov===void 0&&(ov=Vd()),ov(e,{readable:t,writable:r},function(a){if(a)return i(a);n=!0,i()});var o=!1;return function(a){if(!n&&!o){if(o=!0,pK(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();i(a||new dK("pipe"))}}}function ow(e){e()}function vK(e,t){return e.pipe(t)}function mK(e){return!e.length||typeof e[e.length-1]!="function"?nw:e.pop()}function yK(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var i=mK(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new hK("streams");var n,o=t.map(function(a,s){var u=s<t.length-1,c=s>0;return gK(a,u,c,function(l){n||(n=l),l&&o.forEach(ow),!u&&(o.forEach(ow),i(n))})});return t.reduce(vK)}sw.exports=yK});var Qd=k((Kce,fw)=>{v();fw.exports=on;var av=Qf().EventEmitter,bK=Te();bK(on,av);on.Readable=Kg();on.Writable=Hg();on.Duplex=Ou();on.Transform=nv();on.PassThrough=iw();on.finished=Vd();on.pipeline=uw();on.Stream=on;function on(){av.call(this)}on.prototype.pipe=function(e,t){var r=this;function i(l){e.writable&&e.write(l)===!1&&r.pause&&r.pause()}r.on("data",i);function n(){r.readable&&r.resume&&r.resume()}e.on("drain",n),!e._isStdio&&(!t||t.end!==!1)&&(r.on("end",a),r.on("close",s));var o=!1;function a(){o||(o=!0,e.end())}function s(){o||(o=!0,typeof e.destroy=="function"&&e.destroy())}function u(l){if(c(),av.listenerCount(this,"error")===0)throw l}r.on("error",u),e.on("error",u);function c(){r.removeListener("data",i),e.removeListener("drain",n),r.removeListener("end",a),r.removeListener("close",s),r.removeListener("error",u),e.removeListener("error",u),r.removeListener("end",c),r.removeListener("close",c),e.removeListener("close",c)}return r.on("end",c),r.on("close",c),e.on("close",c),e.emit("pipe",r),e}});var hw=k((Gce,lw)=>{"use strict";v();var _o=ot().Buffer,cw=Qd().Transform,_K=Te();function ss(e){cw.call(this),this._block=_o.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}_K(ss,cw);ss.prototype._transform=function(e,t,r){var i=null;try{this.update(e,t)}catch(n){i=n}r(i)};ss.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(r){t=r}e(t)};var wK=typeof Uint8Array<"u",SK=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&ArrayBuffer.isView&&(_o.prototype instanceof Uint8Array||_o.TYPED_ARRAY_SUPPORT);function xK(e,t){if(e instanceof _o)return e;if(typeof e=="string")return _o.from(e,t);if(SK&&ArrayBuffer.isView(e)){if(e.byteLength===0)return _o.alloc(0);var r=_o.from(e.buffer,e.byteOffset,e.byteLength);if(r.byteLength===e.byteLength)return r}if(wK&&e instanceof Uint8Array||_o.isBuffer(e)&&e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e))return _o.from(e);throw new TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.')}ss.prototype.update=function(e,t){if(this._finalized)throw new Error("Digest already called");e=xK(e,t);for(var r=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var n=this._blockOffset;n<this._blockSize;)r[n++]=e[i++];this._update(),this._blockOffset=0}for(;i<e.length;)r[this._blockOffset++]=e[i++];for(var o=0,a=e.length*8;a>0;++o)this._length[o]+=a,a=this._length[o]/4294967296|0,a>0&&(this._length[o]-=4294967296*a);return this};ss.prototype._update=function(){throw new Error("_update is not implemented")};ss.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();e!==void 0&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t};ss.prototype._digest=function(){throw new Error("_digest is not implemented")};lw.exports=ss});var r2=k((Wce,pw)=>{"use strict";v();var EK=Te(),dw=hw(),IK=ot().Buffer,OK=new Array(16);function e2(){dw.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}EK(e2,dw);e2.prototype._update=function(){for(var e=OK,t=0;t<16;++t)e[t]=this._block.readInt32LE(t*4);var r=this._a,i=this._b,n=this._c,o=this._d;r=si(r,i,n,o,e[0],3614090360,7),o=si(o,r,i,n,e[1],3905402710,12),n=si(n,o,r,i,e[2],606105819,17),i=si(i,n,o,r,e[3],3250441966,22),r=si(r,i,n,o,e[4],4118548399,7),o=si(o,r,i,n,e[5],1200080426,12),n=si(n,o,r,i,e[6],2821735955,17),i=si(i,n,o,r,e[7],4249261313,22),r=si(r,i,n,o,e[8],1770035416,7),o=si(o,r,i,n,e[9],2336552879,12),n=si(n,o,r,i,e[10],4294925233,17),i=si(i,n,o,r,e[11],2304563134,22),r=si(r,i,n,o,e[12],1804603682,7),o=si(o,r,i,n,e[13],4254626195,12),n=si(n,o,r,i,e[14],2792965006,17),i=si(i,n,o,r,e[15],1236535329,22),r=ui(r,i,n,o,e[1],4129170786,5),o=ui(o,r,i,n,e[6],3225465664,9),n=ui(n,o,r,i,e[11],643717713,14),i=ui(i,n,o,r,e[0],3921069994,20),r=ui(r,i,n,o,e[5],3593408605,5),o=ui(o,r,i,n,e[10],38016083,9),n=ui(n,o,r,i,e[15],3634488961,14),i=ui(i,n,o,r,e[4],3889429448,20),r=ui(r,i,n,o,e[9],568446438,5),o=ui(o,r,i,n,e[14],3275163606,9),n=ui(n,o,r,i,e[3],4107603335,14),i=ui(i,n,o,r,e[8],1163531501,20),r=ui(r,i,n,o,e[13],2850285829,5),o=ui(o,r,i,n,e[2],4243563512,9),n=ui(n,o,r,i,e[7],1735328473,14),i=ui(i,n,o,r,e[12],2368359562,20),r=fi(r,i,n,o,e[5],4294588738,4),o=fi(o,r,i,n,e[8],2272392833,11),n=fi(n,o,r,i,e[11],1839030562,16),i=fi(i,n,o,r,e[14],4259657740,23),r=fi(r,i,n,o,e[1],2763975236,4),o=fi(o,r,i,n,e[4],1272893353,11),n=fi(n,o,r,i,e[7],4139469664,16),i=fi(i,n,o,r,e[10],3200236656,23),r=fi(r,i,n,o,e[13],681279174,4),o=fi(o,r,i,n,e[0],3936430074,11),n=fi(n,o,r,i,e[3],3572445317,16),i=fi(i,n,o,r,e[6],76029189,23),r=fi(r,i,n,o,e[9],3654602809,4),o=fi(o,r,i,n,e[12],3873151461,11),n=fi(n,o,r,i,e[15],530742520,16),i=fi(i,n,o,r,e[2],3299628645,23),r=ci(r,i,n,o,e[0],4096336452,6),o=ci(o,r,i,n,e[7],1126891415,10),n=ci(n,o,r,i,e[14],2878612391,15),i=ci(i,n,o,r,e[5],4237533241,21),r=ci(r,i,n,o,e[12],1700485571,6),o=ci(o,r,i,n,e[3],2399980690,10),n=ci(n,o,r,i,e[10],4293915773,15),i=ci(i,n,o,r,e[1],2240044497,21),r=ci(r,i,n,o,e[8],1873313359,6),o=ci(o,r,i,n,e[15],4264355552,10),n=ci(n,o,r,i,e[6],2734768916,15),i=ci(i,n,o,r,e[13],1309151649,21),r=ci(r,i,n,o,e[4],4149444226,6),o=ci(o,r,i,n,e[11],3174756917,10),n=ci(n,o,r,i,e[2],718787259,15),i=ci(i,n,o,r,e[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+o|0};e2.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 e=IK.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e};function t2(e,t){return e<<t|e>>>32-t}function si(e,t,r,i,n,o,a){return t2(e+(t&r|~t&i)+n+o|0,a)+t|0}function ui(e,t,r,i,n,o,a){return t2(e+(t&i|r&~i)+n+o|0,a)+t|0}function fi(e,t,r,i,n,o,a){return t2(e+(t^r^i)+n+o|0,a)+t|0}function ci(e,t,r,i,n,o,a){return t2(e+(r^(t|~i))+n+o|0,a)+t|0}pw.exports=e2});var vw=k(($ce,gw)=>{v();var AK={}.toString;gw.exports=Array.isArray||function(e){return AK.call(e)=="[object Array]"}});var yw=k((Jce,mw)=>{"use strict";v();var PK=_u(),TK=ts(),kK=TK("TypedArray.prototype.buffer",!0),RK=Ig();mw.exports=kK||function(t){if(!RK(t))throw new PK("Not a Typed Array");return t.buffer}});var xh=k((ele,_w)=>{"use strict";v();var Tn=ot().Buffer,BK=vw(),MK=yw(),CK=ArrayBuffer.isView||function(t){try{return MK(t),!0}catch{return!1}},NK=typeof Uint8Array<"u",bw=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",DK=bw&&(Tn.prototype instanceof Uint8Array||Tn.TYPED_ARRAY_SUPPORT);_w.exports=function(t,r){if(Tn.isBuffer(t))return t.constructor&&!("isBuffer"in t)?Tn.from(t):t;if(typeof t=="string")return Tn.from(t,r);if(bw&&CK(t)){if(t.byteLength===0)return Tn.alloc(0);if(DK){var i=Tn.from(t.buffer,t.byteOffset,t.byteLength);if(i.byteLength===t.byteLength)return i}var n=t instanceof Uint8Array?t:new Uint8Array(t.buffer,t.byteOffset,t.byteLength),o=Tn.from(n);if(o.length===t.byteLength)return o}if(NK&&t instanceof Uint8Array)return Tn.from(t);var a=BK(t);if(a)for(var s=0;s<t.length;s+=1){var u=t[s];if(typeof u!="number"||u<0||u>255||~~u!==u)throw new RangeError("Array items must be numbers in the range 0-255.")}if(a||Tn.isBuffer(t)&&t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t))return Tn.from(t);throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')}});var Ew=k((rle,xw)=>{"use strict";v();var LK=ot().Buffer,qK=xh(),Sw=typeof Uint8Array<"u",UK=Sw&&typeof ArrayBuffer<"u",ww=UK&&ArrayBuffer.isView;xw.exports=function(e,t){if(typeof e=="string"||LK.isBuffer(e)||Sw&&e instanceof Uint8Array||ww&&ww(e))return qK(e,t);throw new TypeError('The "data" argument must be a string, a Buffer, a Uint8Array, or a DataView')}});var Eh=k((nle,sv)=>{"use strict";v();typeof A.default>"u"||!A.default.version||A.default.version.indexOf("v0.")===0||A.default.version.indexOf("v1.")===0&&A.default.version.indexOf("v1.8.")!==0?sv.exports={nextTick:FK}:sv.exports=A.default;function FK(e,t,r,i){if(typeof e!="function")throw new TypeError('"callback" argument must be a function');var n=arguments.length,o,a;switch(n){case 0:case 1:return A.default.nextTick(e);case 2:return A.default.nextTick(function(){e.call(null,t)});case 3:return A.default.nextTick(function(){e.call(null,t,r)});case 4:return A.default.nextTick(function(){e.call(null,t,r,i)});default:for(o=new Array(n-1),a=0;a<o.length;)o[a++]=arguments[a];return A.default.nextTick(function(){e.apply(null,o)})}}});var Ow=k((ale,Iw)=>{v();var HK={}.toString;Iw.exports=Array.isArray||function(e){return HK.call(e)=="[object Array]"}});var uv=k((ule,Aw)=>{v();Aw.exports=Qf().EventEmitter});var n2=k((fv,Tw)=>{v();var i2=Kt(),ha=i2.Buffer;function Pw(e,t){for(var r in e)t[r]=e[r]}ha.from&&ha.alloc&&ha.allocUnsafe&&ha.allocUnsafeSlow?Tw.exports=i2:(Pw(i2,fv),fv.Buffer=gc);function gc(e,t,r){return ha(e,t,r)}Pw(ha,gc);gc.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return ha(e,t,r)};gc.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var i=ha(e);return t!==void 0?typeof r=="string"?i.fill(t,r):i.fill(t):i.fill(0),i};gc.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return ha(e)};gc.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return i2.SlowBuffer(e)}});var vc=k(li=>{v();function jK(e){return Array.isArray?Array.isArray(e):o2(e)==="[object Array]"}li.isArray=jK;function zK(e){return typeof e=="boolean"}li.isBoolean=zK;function KK(e){return e===null}li.isNull=KK;function VK(e){return e==null}li.isNullOrUndefined=VK;function GK(e){return typeof e=="number"}li.isNumber=GK;function ZK(e){return typeof e=="string"}li.isString=ZK;function WK(e){return typeof e=="symbol"}li.isSymbol=WK;function YK(e){return e===void 0}li.isUndefined=YK;function $K(e){return o2(e)==="[object RegExp]"}li.isRegExp=$K;function XK(e){return typeof e=="object"&&e!==null}li.isObject=XK;function JK(e){return o2(e)==="[object Date]"}li.isDate=JK;function QK(e){return o2(e)==="[object Error]"||e instanceof Error}li.isError=QK;function eV(e){return typeof e=="function"}li.isFunction=eV;function tV(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e>"u"}li.isPrimitive=tV;li.isBuffer=Kt().Buffer.isBuffer;function o2(e){return Object.prototype.toString.call(e)}});var Rw=k((dle,cv)=>{"use strict";v();function rV(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var kw=n2().Buffer,Ih=rn();function iV(e,t,r){e.copy(t,r)}cv.exports=(function(){function e(){rV(this,e),this.head=null,this.tail=null,this.length=0}return e.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},e.prototype.unshift=function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length},e.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}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.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},e.prototype.concat=function(r){if(this.length===0)return kw.alloc(0);for(var i=kw.allocUnsafe(r>>>0),n=this.head,o=0;n;)iV(n.data,i,o),o+=n.data.length,n=n.next;return i},e})();Ih&&Ih.inspect&&Ih.inspect.custom&&(cv.exports.prototype[Ih.inspect.custom]=function(){var e=Ih.inspect({length:this.length});return this.constructor.name+" "+e})});var lv=k((gle,Bw)=>{"use strict";v();var a2=Eh();function nV(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,a2.nextTick(s2,this,e)):a2.nextTick(s2,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(o){!t&&o?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,a2.nextTick(s2,r,o)):a2.nextTick(s2,r,o):t&&t(o)}),this)}function oV(){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 s2(e,t){e.emit("error",t)}Bw.exports={destroy:nV,undestroy:oV}});var dv=k((mle,Fw)=>{"use strict";v();var ku=Eh();Fw.exports=yr;function Cw(e){var t=this;this.next=null,this.entry=null,this.finish=function(){xV(t,e)}}var aV=!A.default.browser&&["v0.10","v0.9."].indexOf(A.default.version.slice(0,5))>-1?setImmediate:ku.nextTick,mc;yr.WritableState=Ah;var Nw=Object.create(vc());Nw.inherits=Te();var sV={deprecate:qg()},Dw=uv(),f2=n2().Buffer,uV=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function fV(e){return f2.from(e)}function cV(e){return f2.isBuffer(e)||e instanceof uV}var Lw=lv();Nw.inherits(yr,Dw);function lV(){}function Ah(e,t){mc=mc||Ru(),e=e||{};var r=t instanceof mc;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,n=e.writableHighWaterMark,o=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=o,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=e.decodeStrings===!1;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(s){yV(t,s)},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 Cw(this)}Ah.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(Ah.prototype,"buffer",{get:sV.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var u2;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(u2=Function.prototype[Symbol.hasInstance],Object.defineProperty(yr,Symbol.hasInstance,{value:function(e){return u2.call(this,e)?!0:this!==yr?!1:e&&e._writableState instanceof Ah}})):u2=function(e){return e instanceof this};function yr(e){if(mc=mc||Ru(),!u2.call(yr,this)&&!(this instanceof mc))return new yr(e);this._writableState=new Ah(e,this),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),Dw.call(this)}yr.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function hV(e,t){var r=new Error("write after end");e.emit("error",r),ku.nextTick(t,r)}function dV(e,t,r,i){var n=!0,o=!1;return r===null?o=new TypeError("May not write null values to stream"):typeof r!="string"&&r!==void 0&&!t.objectMode&&(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),ku.nextTick(i,o),n=!1),n}yr.prototype.write=function(e,t,r){var i=this._writableState,n=!1,o=!i.objectMode&&cV(e);return o&&!f2.isBuffer(e)&&(e=fV(e)),typeof t=="function"&&(r=t,t=null),o?t="buffer":t||(t=i.defaultEncoding),typeof r!="function"&&(r=lV),i.ended?hV(this,r):(o||dV(this,i,e,r))&&(i.pendingcb++,n=gV(this,i,o,e,t,r)),n};yr.prototype.cork=function(){var e=this._writableState;e.corked++};yr.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&qw(this,e))};yr.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this};function pV(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=f2.from(t,r)),t}Object.defineProperty(yr.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function gV(e,t,r,i,n,o){if(!r){var a=pV(t,i,n);i!==a&&(r=!0,n="buffer",i=a)}var s=t.objectMode?1:i.length;t.length+=s;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:o,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else hv(e,t,!1,s,i,n,o);return u}function hv(e,t,r,i,n,o,a){t.writelen=i,t.writecb=a,t.writing=!0,t.sync=!0,r?e._writev(n,t.onwrite):e._write(n,o,t.onwrite),t.sync=!1}function vV(e,t,r,i,n){--t.pendingcb,r?(ku.nextTick(n,i),ku.nextTick(Oh,e,t),e._writableState.errorEmitted=!0,e.emit("error",i)):(n(i),e._writableState.errorEmitted=!0,e.emit("error",i),Oh(e,t))}function mV(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function yV(e,t){var r=e._writableState,i=r.sync,n=r.writecb;if(mV(r),t)vV(e,r,i,t,n);else{var o=Uw(r);!o&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&qw(e,r),i?aV(Mw,e,r,o,n):Mw(e,r,o,n)}}function Mw(e,t,r,i){r||bV(e,t),t.pendingcb--,i(),Oh(e,t)}function bV(e,t){t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function qw(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,n=new Array(i),o=t.corkedRequestsFree;o.entry=r;for(var a=0,s=!0;r;)n[a]=r,r.isBuf||(s=!1),r=r.next,a+=1;n.allBuffers=s,hv(e,t,!0,t.length,n,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new Cw(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,c=r.encoding,l=r.callback,m=t.objectMode?1:u.length;if(hv(e,t,!1,m,u,c,l),r=r.next,t.bufferedRequestCount--,t.writing)break}r===null&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}yr.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))};yr.prototype._writev=null;yr.prototype.end=function(e,t,r){var i=this._writableState;typeof e=="function"?(r=e,e=null,t=null):typeof t=="function"&&(r=t,t=null),e!=null&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||SV(this,i,r)};function Uw(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function _V(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),Oh(e,t)})}function wV(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final=="function"?(t.pendingcb++,t.finalCalled=!0,ku.nextTick(_V,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function Oh(e,t){var r=Uw(t);return r&&(wV(e,t),t.pendingcb===0&&(t.finished=!0,e.emit("finish"))),r}function SV(e,t,r){t.ending=!0,Oh(e,t),r&&(t.finished?ku.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function xV(e,t,r){var i=e.entry;for(e.entry=null;i;){var n=i.callback;t.pendingcb--,n(r),i=i.next}t.corkedRequestsFree.next=e}Object.defineProperty(yr.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});yr.prototype.destroy=Lw.destroy;yr.prototype._undestroy=Lw.undestroy;yr.prototype._destroy=function(e,t){this.end(),t(e)}});var Ru=k((ble,Kw)=>{"use strict";v();var Hw=Eh(),EV=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};Kw.exports=da;var jw=Object.create(vc());jw.inherits=Te();var zw=vv(),gv=dv();jw.inherits(da,zw);for(pv=EV(gv.prototype),c2=0;c2<pv.length;c2++)l2=pv[c2],da.prototype[l2]||(da.prototype[l2]=gv.prototype[l2]);var pv,l2,c2;function da(e){if(!(this instanceof da))return new da(e);zw.call(this,e),gv.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",IV)}Object.defineProperty(da.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function IV(){this.allowHalfOpen||this._writableState.ended||Hw.nextTick(OV,this)}function OV(e){e.end()}Object.defineProperty(da.prototype,"destroyed",{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)}});da.prototype._destroy=function(e,t){this.push(null),this.end(),Hw.nextTick(t,e)}});var vv=k((Sle,rS)=>{"use strict";v();var bc=Eh();rS.exports=Wt;var AV=Ow(),Ph;Wt.ReadableState=Xw;var wle=Qf().EventEmitter,Ww=function(e,t){return e.listeners(t).length},wv=uv(),Th=n2().Buffer,PV=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function TV(e){return Th.from(e)}function kV(e){return Th.isBuffer(e)||e instanceof PV}var Yw=Object.create(vc());Yw.inherits=Te();var mv=rn(),Tt=void 0;mv&&mv.debuglog?Tt=mv.debuglog("stream"):Tt=function(){};var RV=Rw(),$w=lv(),yc;Yw.inherits(Wt,wv);var yv=["error","close","destroy","pause","resume"];function BV(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):AV(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}function Xw(e,t){Ph=Ph||Ru(),e=e||{};var r=t instanceof Ph;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,n=e.readableHighWaterMark,o=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=o,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new RV,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=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(yc||(yc=hc().StringDecoder),this.decoder=new yc(e.encoding),this.encoding=e.encoding)}function Wt(e){if(Ph=Ph||Ru(),!(this instanceof Wt))return new Wt(e);this._readableState=new Xw(e,this),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),wv.call(this)}Object.defineProperty(Wt.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});Wt.prototype.destroy=$w.destroy;Wt.prototype._undestroy=$w.undestroy;Wt.prototype._destroy=function(e,t){this.push(null),t(e)};Wt.prototype.push=function(e,t){var r=this._readableState,i;return r.objectMode?i=!0:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=Th.from(e,t),t=""),i=!0),Jw(this,e,t,!1,i)};Wt.prototype.unshift=function(e){return Jw(this,e,null,!0,!1)};function Jw(e,t,r,i,n){var o=e._readableState;if(t===null)o.reading=!1,DV(e,o);else{var a;n||(a=MV(o,t)),a?e.emit("error",a):o.objectMode||t&&t.length>0?(typeof t!="string"&&!o.objectMode&&Object.getPrototypeOf(t)!==Th.prototype&&(t=TV(t)),i?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):bv(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||t.length!==0?bv(e,o,t,!1):Qw(e,o)):bv(e,o,t,!1))):i||(o.reading=!1)}return CV(o)}function bv(e,t,r,i){t.flowing&&t.length===0&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&h2(e)),Qw(e,t)}function MV(e,t){var r;return!kV(t)&&typeof t!="string"&&t!==void 0&&!e.objectMode&&(r=new TypeError("Invalid non-string/buffer chunk")),r}function CV(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||e.length===0)}Wt.prototype.isPaused=function(){return this._readableState.flowing===!1};Wt.prototype.setEncoding=function(e){return yc||(yc=hc().StringDecoder),this._readableState.decoder=new yc(e),this._readableState.encoding=e,this};var Vw=8388608;function NV(e){return e>=Vw?e=Vw:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function Gw(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=NV(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}Wt.prototype.read=function(e){Tt("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return Tt("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?_v(this):h2(this),null;if(e=Gw(e,t),e===0&&t.ended)return t.length===0&&_v(this),null;var i=t.needReadable;Tt("need readable",i),(t.length===0||t.length-e<t.highWaterMark)&&(i=!0,Tt("length less than watermark",i)),t.ended||t.reading?(i=!1,Tt("reading or ended",i)):i&&(Tt("do read"),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=Gw(r,t)));var n;return e>0?n=eS(e,t):n=null,n===null?(t.needReadable=!0,e=0):t.length-=e,t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&_v(this)),n!==null&&this.emit("data",n),n};function DV(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,h2(e)}}function h2(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(Tt("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?bc.nextTick(Zw,e):Zw(e))}function Zw(e){Tt("emit readable"),e.emit("readable"),Sv(e)}function Qw(e,t){t.readingMore||(t.readingMore=!0,bc.nextTick(LV,e,t))}function LV(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(Tt("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}Wt.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))};Wt.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e);break}i.pipesCount+=1,Tt("pipe count=%d opts=%j",i.pipesCount,t);var n=(!t||t.end!==!1)&&e!==A.default.stdout&&e!==A.default.stderr,o=n?s:D;i.endEmitted?bc.nextTick(o):r.once("end",o),e.on("unpipe",a);function a(L,U){Tt("onunpipe"),L===r&&U&&U.hasUnpiped===!1&&(U.hasUnpiped=!0,l())}function s(){Tt("onend"),e.end()}var u=qV(r);e.on("drain",u);var c=!1;function l(){Tt("cleanup"),e.removeListener("close",P),e.removeListener("finish",M),e.removeListener("drain",u),e.removeListener("error",E),e.removeListener("unpipe",a),r.removeListener("end",s),r.removeListener("end",D),r.removeListener("data",w),c=!0,i.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&u()}var m=!1;r.on("data",w);function w(L){Tt("ondata"),m=!1;var U=e.write(L);U===!1&&!m&&((i.pipesCount===1&&i.pipes===e||i.pipesCount>1&&tS(i.pipes,e)!==-1)&&!c&&(Tt("false write response, pause",i.awaitDrain),i.awaitDrain++,m=!0),r.pause())}function E(L){Tt("onerror",L),D(),e.removeListener("error",E),Ww(e,"error")===0&&e.emit("error",L)}BV(e,"error",E);function P(){e.removeListener("finish",M),D()}e.once("close",P);function M(){Tt("onfinish"),e.removeListener("close",P),D()}e.once("finish",M);function D(){Tt("unpipe"),r.unpipe(e)}return e.emit("pipe",r),i.flowing||(Tt("pipe resume"),r.resume()),e};function qV(e){return function(){var t=e._readableState;Tt("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&Ww(e,"data")&&(t.flowing=!0,Sv(e))}}Wt.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var i=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<n;o++)i[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=tS(t.pipes,e);return a===-1?this:(t.pipes.splice(a,1),t.pipesCount-=1,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)};Wt.prototype.on=function(e,t){var r=wv.prototype.on.call(this,e,t);if(e==="data")this._readableState.flowing!==!1&&this.resume();else if(e==="readable"){var i=this._readableState;!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&h2(this):bc.nextTick(UV,this))}return r};Wt.prototype.addListener=Wt.prototype.on;function UV(e){Tt("readable nexttick read 0"),e.read(0)}Wt.prototype.resume=function(){var e=this._readableState;return e.flowing||(Tt("resume"),e.flowing=!0,FV(this,e)),this};function FV(e,t){t.resumeScheduled||(t.resumeScheduled=!0,bc.nextTick(HV,e,t))}function HV(e,t){t.reading||(Tt("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),Sv(e),t.flowing&&!t.reading&&e.read(0)}Wt.prototype.pause=function(){return Tt("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Tt("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function Sv(e){var t=e._readableState;for(Tt("flow",t.flowing);t.flowing&&e.read()!==null;);}Wt.prototype.wrap=function(e){var t=this,r=this._readableState,i=!1;e.on("end",function(){if(Tt("wrapped end"),r.decoder&&!r.ended){var a=r.decoder.end();a&&a.length&&t.push(a)}t.push(null)}),e.on("data",function(a){if(Tt("wrapped data"),r.decoder&&(a=r.decoder.write(a)),!(r.objectMode&&a==null)&&!(!r.objectMode&&(!a||!a.length))){var s=t.push(a);s||(i=!0,e.pause())}});for(var n in e)this[n]===void 0&&typeof e[n]=="function"&&(this[n]=(function(a){return function(){return e[a].apply(e,arguments)}})(n));for(var o=0;o<yv.length;o++)e.on(yv[o],this.emit.bind(this,yv[o]));return this._read=function(a){Tt("wrapped _read",a),i&&(i=!1,e.resume())},this};Object.defineProperty(Wt.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Wt._fromList=eS;function eS(e,t){if(t.length===0)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.head.data:r=t.buffer.concat(t.length),t.buffer.clear()):r=jV(e,t.buffer,t.decoder),r}function jV(e,t,r){var i;return e<t.head.data.length?(i=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):e===t.head.data.length?i=t.shift():i=r?zV(e,t):KV(e,t),i}function zV(e,t){var r=t.head,i=1,n=r.data;for(e-=n.length;r=r.next;){var o=r.data,a=e>o.length?o.length:e;if(a===o.length?n+=o:n+=o.slice(0,e),e-=a,e===0){a===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a));break}++i}return t.length-=i,n}function KV(e,t){var r=Th.allocUnsafe(e),i=t.head,n=1;for(i.data.copy(r),e-=i.data.length;i=i.next;){var o=i.data,a=e>o.length?o.length:e;if(o.copy(r,r.length-e,0,a),e-=a,e===0){a===o.length?(++n,i.next?t.head=i.next:t.head=t.tail=null):(t.head=i,i.data=o.slice(a));break}++n}return t.length-=n,r}function _v(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,bc.nextTick(VV,t,e))}function VV(e,t){!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function tS(e,t){for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1}});var xv=k((Ele,oS)=>{"use strict";v();oS.exports=pa;var d2=Ru(),nS=Object.create(vc());nS.inherits=Te();nS.inherits(pa,d2);function GV(e,t){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,t!=null&&this.push(t),i(e);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function pa(e){if(!(this instanceof pa))return new pa(e);d2.call(this,e),this._transformState={afterTransform:GV.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",ZV)}function ZV(){var e=this;typeof this._flush=="function"?this._flush(function(t,r){iS(e,t,r)}):iS(this,null,null)}pa.prototype.push=function(e,t){return this._transformState.needTransform=!1,d2.prototype.push.call(this,e,t)};pa.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")};pa.prototype._write=function(e,t,r){var i=this._transformState;if(i.writecb=r,i.writechunk=e,i.writeencoding=t,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};pa.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};pa.prototype._destroy=function(e,t){var r=this;d2.prototype._destroy.call(this,e,function(i){t(i),r.emit("close")})};function iS(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}});var fS=k((Ole,uS)=>{"use strict";v();uS.exports=kh;var aS=xv(),sS=Object.create(vc());sS.inherits=Te();sS.inherits(kh,aS);function kh(e){if(!(this instanceof kh))return new kh(e);aS.call(this,e)}kh.prototype._transform=function(e,t,r){r(null,e)}});var lS=k((wo,cS)=>{v();wo=cS.exports=vv();wo.Stream=wo;wo.Readable=wo;wo.Writable=dv();wo.Duplex=Ru();wo.Transform=xv();wo.PassThrough=fS()});var pS=k((Tle,dS)=>{"use strict";v();var WV=ot().Buffer,YV=Ew(),hS=lS().Transform,$V=Te();function us(e){hS.call(this),this._block=WV.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}$V(us,hS);us.prototype._transform=function(e,t,r){var i=null;try{this.update(e,t)}catch(n){i=n}r(i)};us.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(r){t=r}e(t)};us.prototype.update=function(e,t){if(this._finalized)throw new Error("Digest already called");for(var r=YV(e,t),i=this._block,n=0;this._blockOffset+r.length-n>=this._blockSize;){for(var o=this._blockOffset;o<this._blockSize;)i[o]=r[n],o+=1,n+=1;this._update(),this._blockOffset=0}for(;n<r.length;)i[this._blockOffset]=r[n],this._blockOffset+=1,n+=1;for(var a=0,s=r.length*8;s>0;++a)this._length[a]+=s,s=this._length[a]/4294967296|0,s>0&&(this._length[a]-=4294967296*s);return this};us.prototype._update=function(){throw new Error("_update is not implemented")};us.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();e!==void 0&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t};us.prototype._digest=function(){throw new Error("_digest is not implemented")};dS.exports=us});var g2=k((Rle,wS)=>{"use strict";v();var Ev=Kt().Buffer,XV=Te(),_S=pS(),JV=new Array(16),Rh=[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],Bh=[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],Mh=[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],Ch=[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],Nh=[0,1518500249,1859775393,2400959708,2840853838],Dh=[1352829926,1548603684,1836072691,2053994217,0];function Bu(e,t){return e<<t|e>>>32-t}function gS(e,t,r,i,n,o,a,s){return Bu(e+(t^r^i)+o+a|0,s)+n|0}function vS(e,t,r,i,n,o,a,s){return Bu(e+(t&r|~t&i)+o+a|0,s)+n|0}function mS(e,t,r,i,n,o,a,s){return Bu(e+((t|~r)^i)+o+a|0,s)+n|0}function yS(e,t,r,i,n,o,a,s){return Bu(e+(t&i|r&~i)+o+a|0,s)+n|0}function bS(e,t,r,i,n,o,a,s){return Bu(e+(t^(r|~i))+o+a|0,s)+n|0}function p2(){_S.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}XV(p2,_S);p2.prototype._update=function(){for(var e=JV,t=0;t<16;++t)e[t]=this._block.readInt32LE(t*4);for(var r=this._a|0,i=this._b|0,n=this._c|0,o=this._d|0,a=this._e|0,s=this._a|0,u=this._b|0,c=this._c|0,l=this._d|0,m=this._e|0,w=0;w<80;w+=1){var E,P;w<16?(E=gS(r,i,n,o,a,e[Rh[w]],Nh[0],Mh[w]),P=bS(s,u,c,l,m,e[Bh[w]],Dh[0],Ch[w])):w<32?(E=vS(r,i,n,o,a,e[Rh[w]],Nh[1],Mh[w]),P=yS(s,u,c,l,m,e[Bh[w]],Dh[1],Ch[w])):w<48?(E=mS(r,i,n,o,a,e[Rh[w]],Nh[2],Mh[w]),P=mS(s,u,c,l,m,e[Bh[w]],Dh[2],Ch[w])):w<64?(E=yS(r,i,n,o,a,e[Rh[w]],Nh[3],Mh[w]),P=vS(s,u,c,l,m,e[Bh[w]],Dh[3],Ch[w])):(E=bS(r,i,n,o,a,e[Rh[w]],Nh[4],Mh[w]),P=gS(s,u,c,l,m,e[Bh[w]],Dh[4],Ch[w])),r=a,a=o,o=Bu(n,10),n=i,i=E,s=m,m=l,l=Bu(c,10),c=u,u=P}var M=this._b+n+l|0;this._b=this._c+o+m|0,this._c=this._d+a+s|0,this._d=this._e+r+u|0,this._e=this._a+i+c|0,this._a=M};p2.prototype._digest=function(){this._block[this._blockOffset]=128,this._blockOffset+=1,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=Ev.alloc?Ev.alloc(20):new Ev(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e};wS.exports=p2});var Mu=k((Mle,SS)=>{"use strict";v();var QV=ot().Buffer,eG=xh();function v2(e,t){this._block=QV.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}v2.prototype.update=function(e,t){e=eG(e,t||"utf8");for(var r=this._block,i=this._blockSize,n=e.length,o=this._len,a=0;a<n;){for(var s=o%i,u=Math.min(n-a,i-s),c=0;c<u;c++)r[s+c]=e[a+c];o+=u,a+=u,o%i===0&&this._update(r)}return this._len+=n,this};v2.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=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 o=this._hash();return e?o.toString(e):o};v2.prototype._update=function(){throw new Error("_update must be implemented by subclass")};SS.exports=v2});var IS=k((Nle,ES)=>{"use strict";v();var tG=Te(),xS=Mu(),rG=ot().Buffer,iG=[1518500249,1859775393,-1894007588,-899497514],nG=new Array(80);function Lh(){this.init(),this._w=nG,xS.call(this,64,56)}tG(Lh,xS);Lh.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function oG(e){return e<<5|e>>>27}function aG(e){return e<<30|e>>>2}function sG(e,t,r,i){return e===0?t&r|~t&i:e===2?t&r|t&i|r&i:t^r^i}Lh.prototype._update=function(e){for(var t=this._w,r=this._a|0,i=this._b|0,n=this._c|0,o=this._d|0,a=this._e|0,s=0;s<16;++s)t[s]=e.readInt32BE(s*4);for(;s<80;++s)t[s]=t[s-3]^t[s-8]^t[s-14]^t[s-16];for(var u=0;u<80;++u){var c=~~(u/20),l=oG(r)+sG(c,i,n,o)+a+t[u]+iG[c]|0;a=o,o=n,n=aG(i),i=r,r=l}this._a=r+this._a|0,this._b=i+this._b|0,this._c=n+this._c|0,this._d=o+this._d|0,this._e=a+this._e|0};Lh.prototype._hash=function(){var e=rG.allocUnsafe(20);return e.writeInt32BE(this._a|0,0),e.writeInt32BE(this._b|0,4),e.writeInt32BE(this._c|0,8),e.writeInt32BE(this._d|0,12),e.writeInt32BE(this._e|0,16),e};ES.exports=Lh});var PS=k((Lle,AS)=>{"use strict";v();var uG=Te(),OS=Mu(),fG=ot().Buffer,cG=[1518500249,1859775393,-1894007588,-899497514],lG=new Array(80);function qh(){this.init(),this._w=lG,OS.call(this,64,56)}uG(qh,OS);qh.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function hG(e){return e<<1|e>>>31}function dG(e){return e<<5|e>>>27}function pG(e){return e<<30|e>>>2}function gG(e,t,r,i){return e===0?t&r|~t&i:e===2?t&r|t&i|r&i:t^r^i}qh.prototype._update=function(e){for(var t=this._w,r=this._a|0,i=this._b|0,n=this._c|0,o=this._d|0,a=this._e|0,s=0;s<16;++s)t[s]=e.readInt32BE(s*4);for(;s<80;++s)t[s]=hG(t[s-3]^t[s-8]^t[s-14]^t[s-16]);for(var u=0;u<80;++u){var c=~~(u/20),l=dG(r)+gG(c,i,n,o)+a+t[u]+cG[c]|0;a=o,o=n,n=pG(i),i=r,r=l}this._a=r+this._a|0,this._b=i+this._b|0,this._c=n+this._c|0,this._d=o+this._d|0,this._e=a+this._e|0};qh.prototype._hash=function(){var e=fG.allocUnsafe(20);return e.writeInt32BE(this._a|0,0),e.writeInt32BE(this._b|0,4),e.writeInt32BE(this._c|0,8),e.writeInt32BE(this._d|0,12),e.writeInt32BE(this._e|0,16),e};AS.exports=qh});var Iv=k((Ule,kS)=>{"use strict";v();var vG=Te(),TS=Mu(),mG=ot().Buffer,yG=[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],bG=new Array(64);function Uh(){this.init(),this._w=bG,TS.call(this,64,56)}vG(Uh,TS);Uh.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 _G(e,t,r){return r^e&(t^r)}function wG(e,t,r){return e&t|r&(e|t)}function SG(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function xG(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function EG(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function IG(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}Uh.prototype._update=function(e){for(var t=this._w,r=this._a|0,i=this._b|0,n=this._c|0,o=this._d|0,a=this._e|0,s=this._f|0,u=this._g|0,c=this._h|0,l=0;l<16;++l)t[l]=e.readInt32BE(l*4);for(;l<64;++l)t[l]=IG(t[l-2])+t[l-7]+EG(t[l-15])+t[l-16]|0;for(var m=0;m<64;++m){var w=c+xG(a)+_G(a,s,u)+yG[m]+t[m]|0,E=SG(r)+wG(r,i,n)|0;c=u,u=s,s=a,a=o+w|0,o=n,n=i,i=r,r=w+E|0}this._a=r+this._a|0,this._b=i+this._b|0,this._c=n+this._c|0,this._d=o+this._d|0,this._e=a+this._e|0,this._f=s+this._f|0,this._g=u+this._g|0,this._h=c+this._h|0};Uh.prototype._hash=function(){var e=mG.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e};kS.exports=Uh});var BS=k((Hle,RS)=>{"use strict";v();var OG=Te(),AG=Iv(),PG=Mu(),TG=ot().Buffer,kG=new Array(64);function m2(){this.init(),this._w=kG,PG.call(this,64,56)}OG(m2,AG);m2.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};m2.prototype._hash=function(){var e=TG.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e};RS.exports=m2});var Ov=k((zle,US)=>{"use strict";v();var RG=Te(),qS=Mu(),BG=ot().Buffer,MS=[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],MG=new Array(160);function Fh(){this.init(),this._w=MG,qS.call(this,128,112)}RG(Fh,qS);Fh.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 CS(e,t,r){return r^e&(t^r)}function NS(e,t,r){return e&t|r&(e|t)}function DS(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function LS(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function CG(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function NG(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function DG(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function LG(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function zr(e,t){return e>>>0<t>>>0?1:0}Fh.prototype._update=function(e){for(var t=this._w,r=this._ah|0,i=this._bh|0,n=this._ch|0,o=this._dh|0,a=this._eh|0,s=this._fh|0,u=this._gh|0,c=this._hh|0,l=this._al|0,m=this._bl|0,w=this._cl|0,E=this._dl|0,P=this._el|0,M=this._fl|0,D=this._gl|0,L=this._hl|0,U=0;U<32;U+=2)t[U]=e.readInt32BE(U*4),t[U+1]=e.readInt32BE(U*4+4);for(;U<160;U+=2){var K=t[U-30],C=t[U-30+1],N=CG(K,C),F=NG(C,K);K=t[U-4],C=t[U-4+1];var H=DG(K,C),z=LG(C,K),G=t[U-14],B=t[U-14+1],g=t[U-32],I=t[U-32+1],y=F+B|0,f=N+G+zr(y,F)|0;y=y+z|0,f=f+H+zr(y,z)|0,y=y+I|0,f=f+g+zr(y,I)|0,t[U]=f,t[U+1]=y}for(var p=0;p<160;p+=2){f=t[p],y=t[p+1];var _=NS(r,i,n),x=NS(l,m,w),b=DS(r,l),d=DS(l,r),O=LS(a,P),T=LS(P,a),S=MS[p],R=MS[p+1],Y=CS(a,s,u),X=CS(P,M,D),ne=L+T|0,ce=c+O+zr(ne,L)|0;ne=ne+X|0,ce=ce+Y+zr(ne,X)|0,ne=ne+R|0,ce=ce+S+zr(ne,R)|0,ne=ne+y|0,ce=ce+f+zr(ne,y)|0;var pe=d+x|0,q=b+_+zr(pe,d)|0;c=u,L=D,u=s,D=M,s=a,M=P,P=E+ne|0,a=o+ce+zr(P,E)|0,o=n,E=w,n=i,w=m,i=r,m=l,l=ne+pe|0,r=ce+q+zr(l,ne)|0}this._al=this._al+l|0,this._bl=this._bl+m|0,this._cl=this._cl+w|0,this._dl=this._dl+E|0,this._el=this._el+P|0,this._fl=this._fl+M|0,this._gl=this._gl+D|0,this._hl=this._hl+L|0,this._ah=this._ah+r+zr(this._al,l)|0,this._bh=this._bh+i+zr(this._bl,m)|0,this._ch=this._ch+n+zr(this._cl,w)|0,this._dh=this._dh+o+zr(this._dl,E)|0,this._eh=this._eh+a+zr(this._el,P)|0,this._fh=this._fh+s+zr(this._fl,M)|0,this._gh=this._gh+u+zr(this._gl,D)|0,this._hh=this._hh+c+zr(this._hl,L)|0};Fh.prototype._hash=function(){var e=BG.allocUnsafe(64);function t(r,i,n){e.writeInt32BE(r,n),e.writeInt32BE(i,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e};US.exports=Fh});var HS=k((Vle,FS)=>{"use strict";v();var qG=Te(),UG=Ov(),FG=Mu(),HG=ot().Buffer,jG=new Array(160);function y2(){this.init(),this._w=jG,FG.call(this,128,112)}qG(y2,UG);y2.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};y2.prototype._hash=function(){var e=HG.allocUnsafe(48);function t(r,i,n){e.writeInt32BE(r,n),e.writeInt32BE(i,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e};FS.exports=y2});var b2=k((Zle,ga)=>{"use strict";v();ga.exports=function(t){var r=t.toLowerCase(),i=ga.exports[r];if(!i)throw new Error(r+" is not supported (we accept pull requests)");return new i};ga.exports.sha=IS();ga.exports.sha1=PS();ga.exports.sha224=BS();ga.exports.sha256=Iv();ga.exports.sha384=HS();ga.exports.sha512=Ov()});var va=k((Yle,zS)=>{"use strict";v();var zG=ot().Buffer,jS=Qd().Transform,KG=hc().StringDecoder,VG=Te(),GG=xh();function kn(e){jS.call(this),this.hashMode=typeof e=="string",this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}VG(kn,jS);kn.prototype.update=function(e,t,r){var i=GG(e,t),n=this._update(i);return this.hashMode?this:(r&&(n=this._toString(n,r)),n)};kn.prototype.setAutoPadding=function(){};kn.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")};kn.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")};kn.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")};kn.prototype._transform=function(e,t,r){var i;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(n){i=n}finally{r(i)}};kn.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(r){t=r}e(t)};kn.prototype._finalOrDigest=function(e){var t=this.__final()||zG.alloc(0);return e&&(t=this._toString(t,e,!0)),t};kn.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new KG(t),this._encoding=t),this._encoding!==t)throw new Error("can\u2019t switch encodings");var i=this._decoder.write(e);return r&&(i+=this._decoder.end()),i};zS.exports=kn});var Hh=k((Xle,VS)=>{"use strict";v();var ZG=Te(),WG=r2(),YG=g2(),$G=b2(),KS=va();function _2(e){KS.call(this,"digest"),this._hash=e}ZG(_2,KS);_2.prototype._update=function(e){this._hash.update(e)};_2.prototype._final=function(){return this._hash.digest()};VS.exports=function(t){return t=t.toLowerCase(),t==="md5"?new WG:t==="rmd160"||t==="ripemd160"?new YG:new _2($G(t))}});var WS=k((Qle,ZS)=>{"use strict";v();var XG=Te(),Cu=ot().Buffer,GS=va(),JG=Cu.alloc(128),_c=64;function w2(e,t){GS.call(this,"digest"),typeof t=="string"&&(t=Cu.from(t)),this._alg=e,this._key=t,t.length>_c?t=e(t):t.length<_c&&(t=Cu.concat([t,JG],_c));for(var r=this._ipad=Cu.allocUnsafe(_c),i=this._opad=Cu.allocUnsafe(_c),n=0;n<_c;n++)r[n]=t[n]^54,i[n]=t[n]^92;this._hash=[r]}XG(w2,GS);w2.prototype._update=function(e){this._hash.push(e)};w2.prototype._final=function(){var e=this._alg(Cu.concat(this._hash));return this._alg(Cu.concat([this._opad,e]))};ZS.exports=w2});var Av=k((the,YS)=>{v();var QG=r2();YS.exports=function(e){return new QG().update(e).digest()}});var JS=k((ihe,XS)=>{"use strict";v();var eZ=Te(),tZ=WS(),$S=va(),jh=ot().Buffer,rZ=Av(),Pv=g2(),Tv=b2(),iZ=jh.alloc(128);function zh(e,t){$S.call(this,"digest"),typeof t=="string"&&(t=jh.from(t));var r=e==="sha512"||e==="sha384"?128:64;if(this._alg=e,this._key=t,t.length>r){var i=e==="rmd160"?new Pv:Tv(e);t=i.update(t).digest()}else t.length<r&&(t=jh.concat([t,iZ],r));for(var n=this._ipad=jh.allocUnsafe(r),o=this._opad=jh.allocUnsafe(r),a=0;a<r;a++)n[a]=t[a]^54,o[a]=t[a]^92;this._hash=e==="rmd160"?new Pv:Tv(e),this._hash.update(n)}eZ(zh,$S);zh.prototype._update=function(e){this._hash.update(e)};zh.prototype._final=function(){var e=this._hash.digest(),t=this._alg==="rmd160"?new Pv:Tv(this._alg);return t.update(this._opad).update(e).digest()};XS.exports=function(t,r){return t=t.toLowerCase(),t==="rmd160"||t==="ripemd160"?new zh("rmd160",r):t==="md5"?new tZ(rZ,r):new zh(t,r)}});var fs=k((ohe,QS)=>{"use strict";v();QS.exports={}});var kv=k((she,ex)=>{"use strict";v();var nZ=isFinite,oZ=Math.pow(2,30)-1;ex.exports=function(e,t){if(typeof e!="number")throw new TypeError("Iterations not a number");if(e<0||!nZ(e))throw new TypeError("Bad iterations");if(typeof t!="number")throw new TypeError("Key length not a number");if(t<0||t>oZ||t!==t)throw new TypeError("Bad key length")}});var Rv=k((fhe,rx)=>{"use strict";v();var S2;globalThis.process&&globalThis.process.browser?S2="utf-8":globalThis.process&&globalThis.process.version?(tx=parseInt(A.default.version.split(".")[0].slice(1),10),S2=tx>=6?"utf-8":"binary"):S2="utf-8";var tx;rx.exports=S2});var Bv=k((lhe,ox)=>{"use strict";v();var aZ=ot().Buffer,sZ=xh(),nx=typeof Uint8Array<"u",uZ=nx&&typeof ArrayBuffer<"u",ix=uZ&&ArrayBuffer.isView;ox.exports=function(e,t,r){if(typeof e=="string"||aZ.isBuffer(e)||nx&&e instanceof Uint8Array||ix&&ix(e))return sZ(e,t);throw new TypeError(r+" must be a string, a Buffer, a Uint8Array, or a DataView")}});var Mv=k((dhe,fx)=>{"use strict";v();var fZ=Av(),cZ=g2(),lZ=b2(),Nu=ot().Buffer,hZ=kv(),ax=Rv(),sx=Bv(),dZ=Nu.alloc(128),x2={__proto__:null,md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,"sha512-256":32,ripemd160:20,rmd160:20},pZ={__proto__:null,"sha-1":"sha1","sha-224":"sha224","sha-256":"sha256","sha-384":"sha384","sha-512":"sha512","ripemd-160":"ripemd160"};function gZ(e){return new cZ().update(e).digest()}function vZ(e){function t(r){return lZ(e).update(r).digest()}return e==="rmd160"||e==="ripemd160"?gZ:e==="md5"?fZ:t}function ux(e,t,r){var i=vZ(e),n=e==="sha512"||e==="sha384"?128:64;t.length>n?t=i(t):t.length<n&&(t=Nu.concat([t,dZ],n));for(var o=Nu.allocUnsafe(n+x2[e]),a=Nu.allocUnsafe(n+x2[e]),s=0;s<n;s++)o[s]=t[s]^54,a[s]=t[s]^92;var u=Nu.allocUnsafe(n+r+4);o.copy(u,0,0,n),this.ipad1=u,this.ipad2=o,this.opad=a,this.alg=e,this.blocksize=n,this.hash=i,this.size=x2[e]}ux.prototype.run=function(e,t){e.copy(t,this.blocksize);var r=this.hash(t);return r.copy(this.opad,this.blocksize),this.hash(this.opad)};function mZ(e,t,r,i,n){hZ(r,i),e=sx(e,ax,"Password"),t=sx(t,ax,"Salt");var o=(n||"sha1").toLowerCase(),a=pZ[o]||o,s=x2[a];if(typeof s!="number"||!s)throw new TypeError("Digest algorithm not supported: "+n);var u=new ux(a,e,t.length),c=Nu.allocUnsafe(i),l=Nu.allocUnsafe(t.length+4);t.copy(l,0,0,t.length);for(var m=0,w=s,E=Math.ceil(i/w),P=1;P<=E;P++){l.writeUInt32BE(P,t.length);for(var M=u.run(l,u.ipad1),D=M,L=1;L<r;L++){D=u.run(D,u.ipad2);for(var U=0;U<w;U++)M[U]^=D[U]}M.copy(c,m),m+=w}return c}fx.exports=mZ});var vx=k((ghe,gx)=>{"use strict";v();var dx=ot().Buffer,yZ=kv(),cx=Rv(),lx=Mv(),hx=Bv(),E2,Kh=globalThis.crypto&&globalThis.crypto.subtle,bZ={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"},Cv=[],Du;function Nv(){return Du||(globalThis.process&&globalThis.process.nextTick?Du=globalThis.process.nextTick:globalThis.queueMicrotask?Du=globalThis.queueMicrotask:globalThis.setImmediate?Du=globalThis.setImmediate:Du=globalThis.setTimeout,Du)}function px(e,t,r,i,n){return Kh.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then(function(o){return Kh.deriveBits({name:"PBKDF2",salt:t,iterations:r,hash:{name:n}},o,i<<3)}).then(function(o){return dx.from(o)})}function _Z(e){if(globalThis.process&&!globalThis.process.browser||!Kh||!Kh.importKey||!Kh.deriveBits)return Promise.resolve(!1);if(Cv[e]!==void 0)return Cv[e];E2=E2||dx.alloc(8);var t=px(E2,E2,10,128,e).then(function(){return!0},function(){return!1});return Cv[e]=t,t}function wZ(e,t){e.then(function(r){Nv()(function(){t(null,r)})},function(r){Nv()(function(){t(r)})})}gx.exports=function(e,t,r,i,n,o){if(typeof n=="function"&&(o=n,n=void 0),yZ(r,i),e=hx(e,cx,"Password"),t=hx(t,cx,"Salt"),typeof o!="function")throw new Error("No callback provided to pbkdf2");n=n||"sha1";var a=bZ[n.toLowerCase()];if(!a||typeof globalThis.Promise!="function"){Nv()(function(){var s;try{s=lx(e,t,r,i,n)}catch(u){o(u);return}o(null,s)});return}wZ(_Z(a).then(function(s){return s?px(e,t,r,i,a):lx(e,t,r,i,n)}),o)}});var Lv=k(Dv=>{"use strict";v();Dv.pbkdf2=vx();Dv.pbkdf2Sync=Mv()});var qv=k(an=>{"use strict";v();an.readUInt32BE=function(t,r){var i=t[0+r]<<24|t[1+r]<<16|t[2+r]<<8|t[3+r];return i>>>0};an.writeUInt32BE=function(t,r,i){t[0+i]=r>>>24,t[1+i]=r>>>16&255,t[2+i]=r>>>8&255,t[3+i]=r&255};an.ip=function(t,r,i,n){for(var o=0,a=0,s=6;s>=0;s-=2){for(var u=0;u<=24;u+=8)o<<=1,o|=r>>>u+s&1;for(var u=0;u<=24;u+=8)o<<=1,o|=t>>>u+s&1}for(var s=6;s>=0;s-=2){for(var u=1;u<=25;u+=8)a<<=1,a|=r>>>u+s&1;for(var u=1;u<=25;u+=8)a<<=1,a|=t>>>u+s&1}i[n+0]=o>>>0,i[n+1]=a>>>0};an.rip=function(t,r,i,n){for(var o=0,a=0,s=0;s<4;s++)for(var u=24;u>=0;u-=8)o<<=1,o|=r>>>u+s&1,o<<=1,o|=t>>>u+s&1;for(var s=4;s<8;s++)for(var u=24;u>=0;u-=8)a<<=1,a|=r>>>u+s&1,a<<=1,a|=t>>>u+s&1;i[n+0]=o>>>0,i[n+1]=a>>>0};an.pc1=function(t,r,i,n){for(var o=0,a=0,s=7;s>=5;s--){for(var u=0;u<=24;u+=8)o<<=1,o|=r>>u+s&1;for(var u=0;u<=24;u+=8)o<<=1,o|=t>>u+s&1}for(var u=0;u<=24;u+=8)o<<=1,o|=r>>u+s&1;for(var s=1;s<=3;s++){for(var u=0;u<=24;u+=8)a<<=1,a|=r>>u+s&1;for(var u=0;u<=24;u+=8)a<<=1,a|=t>>u+s&1}for(var u=0;u<=24;u+=8)a<<=1,a|=t>>u+s&1;i[n+0]=o>>>0,i[n+1]=a>>>0};an.r28shl=function(t,r){return t<<r&268435455|t>>>28-r};var I2=[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];an.pc2=function(t,r,i,n){for(var o=0,a=0,s=I2.length>>>1,u=0;u<s;u++)o<<=1,o|=t>>>I2[u]&1;for(var u=s;u<I2.length;u++)a<<=1,a|=r>>>I2[u]&1;i[n+0]=o>>>0,i[n+1]=a>>>0};an.expand=function(t,r,i){var n=0,o=0;n=(t&1)<<5|t>>>27;for(var a=23;a>=15;a-=4)n<<=6,n|=t>>>a&63;for(var a=11;a>=3;a-=4)o|=t>>>a&63,o<<=6;o|=(t&31)<<1|t>>>31,r[i+0]=n>>>0,r[i+1]=o>>>0};var mx=[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];an.substitute=function(t,r){for(var i=0,n=0;n<4;n++){var o=t>>>18-n*6&63,a=mx[n*64+o];i<<=4,i|=a}for(var n=0;n<4;n++){var o=r>>>18-n*6&63,a=mx[256+n*64+o];i<<=4,i|=a}return i>>>0};var yx=[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];an.permute=function(t){for(var r=0,i=0;i<yx.length;i++)r<<=1,r|=t>>>yx[i]&1;return r>>>0};an.padSplit=function(t,r,i){for(var n=t.toString(2);n.length<r;)n="0"+n;for(var o=[],a=0;a<r;a+=i)o.push(n.slice(a,a+i));return o.join(" ")}});var Rn=k((whe,_x)=>{v();_x.exports=bx;function bx(e,t){if(!e)throw new Error(t||"Assertion failed")}bx.equal=function(t,r,i){if(t!=r)throw new Error(i||"Assertion failed: "+t+" != "+r)}});var O2=k((xhe,wx)=>{"use strict";v();var SZ=Rn();function sn(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=e.padding!==!1}wx.exports=sn;sn.prototype._init=function(){};sn.prototype.update=function(t){return t.length===0?[]:this.type==="decrypt"?this._updateDecrypt(t):this._updateEncrypt(t)};sn.prototype._buffer=function(t,r){for(var i=Math.min(this.buffer.length-this.bufferOff,t.length-r),n=0;n<i;n++)this.buffer[this.bufferOff+n]=t[r+n];return this.bufferOff+=i,i};sn.prototype._flushBuffer=function(t,r){return this._update(this.buffer,0,t,r),this.bufferOff=0,this.blockSize};sn.prototype._updateEncrypt=function(t){var r=0,i=0,n=(this.bufferOff+t.length)/this.blockSize|0,o=new Array(n*this.blockSize);this.bufferOff!==0&&(r+=this._buffer(t,r),this.bufferOff===this.buffer.length&&(i+=this._flushBuffer(o,i)));for(var a=t.length-(t.length-r)%this.blockSize;r<a;r+=this.blockSize)this._update(t,r,o,i),i+=this.blockSize;for(;r<t.length;r++,this.bufferOff++)this.buffer[this.bufferOff]=t[r];return o};sn.prototype._updateDecrypt=function(t){for(var r=0,i=0,n=Math.ceil((this.bufferOff+t.length)/this.blockSize)-1,o=new Array(n*this.blockSize);n>0;n--)r+=this._buffer(t,r),i+=this._flushBuffer(o,i);return r+=this._buffer(t,r),o};sn.prototype.final=function(t){var r;t&&(r=this.update(t));var i;return this.type==="encrypt"?i=this._finalEncrypt():i=this._finalDecrypt(),r?r.concat(i):i};sn.prototype._pad=function(t,r){if(r===0)return!1;for(;r<t.length;)t[r++]=0;return!0};sn.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var t=new Array(this.blockSize);return this._update(this.buffer,0,t,0),t};sn.prototype._unpad=function(t){return t};sn.prototype._finalDecrypt=function(){SZ.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var t=new Array(this.blockSize);return this._flushBuffer(t,0),this._unpad(t)}});var Uv=k((Ihe,Ex)=>{"use strict";v();var Sx=Rn(),xZ=Te(),Rr=qv(),xx=O2();function EZ(){this.tmp=new Array(2),this.keys=null}function So(e){xx.call(this,e);var t=new EZ;this._desState=t,this.deriveKeys(t,e.key)}xZ(So,xx);Ex.exports=So;So.create=function(t){return new So(t)};var IZ=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];So.prototype.deriveKeys=function(t,r){t.keys=new Array(32),Sx.equal(r.length,this.blockSize,"Invalid key length");var i=Rr.readUInt32BE(r,0),n=Rr.readUInt32BE(r,4);Rr.pc1(i,n,t.tmp,0),i=t.tmp[0],n=t.tmp[1];for(var o=0;o<t.keys.length;o+=2){var a=IZ[o>>>1];i=Rr.r28shl(i,a),n=Rr.r28shl(n,a),Rr.pc2(i,n,t.keys,o)}};So.prototype._update=function(t,r,i,n){var o=this._desState,a=Rr.readUInt32BE(t,r),s=Rr.readUInt32BE(t,r+4);Rr.ip(a,s,o.tmp,0),a=o.tmp[0],s=o.tmp[1],this.type==="encrypt"?this._encrypt(o,a,s,o.tmp,0):this._decrypt(o,a,s,o.tmp,0),a=o.tmp[0],s=o.tmp[1],Rr.writeUInt32BE(i,a,n),Rr.writeUInt32BE(i,s,n+4)};So.prototype._pad=function(t,r){if(this.padding===!1)return!1;for(var i=t.length-r,n=r;n<t.length;n++)t[n]=i;return!0};So.prototype._unpad=function(t){if(this.padding===!1)return t;for(var r=t[t.length-1],i=t.length-r;i<t.length;i++)Sx.equal(t[i],r);return t.slice(0,t.length-r)};So.prototype._encrypt=function(t,r,i,n,o){for(var a=r,s=i,u=0;u<t.keys.length;u+=2){var c=t.keys[u],l=t.keys[u+1];Rr.expand(s,t.tmp,0),c^=t.tmp[0],l^=t.tmp[1];var m=Rr.substitute(c,l),w=Rr.permute(m),E=s;s=(a^w)>>>0,a=E}Rr.rip(s,a,n,o)};So.prototype._decrypt=function(t,r,i,n,o){for(var a=i,s=r,u=t.keys.length-2;u>=0;u-=2){var c=t.keys[u],l=t.keys[u+1];Rr.expand(a,t.tmp,0),c^=t.tmp[0],l^=t.tmp[1];var m=Rr.substitute(c,l),w=Rr.permute(m),E=a;a=(s^w)>>>0,s=E}Rr.rip(a,s,n,o)}});var Ox=k(Ix=>{"use strict";v();var OZ=Rn(),AZ=Te(),A2={};function PZ(e){OZ.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t<this.iv.length;t++)this.iv[t]=e[t]}function TZ(e){function t(o){e.call(this,o),this._cbcInit()}AZ(t,e);for(var r=Object.keys(A2),i=0;i<r.length;i++){var n=r[i];t.prototype[n]=A2[n]}return t.create=function(a){return new t(a)},t}Ix.instantiate=TZ;A2._cbcInit=function(){var t=new PZ(this.options.iv);this._cbcState=t};A2._update=function(t,r,i,n){var o=this._cbcState,a=this.constructor.super_.prototype,s=o.iv;if(this.type==="encrypt"){for(var u=0;u<this.blockSize;u++)s[u]^=t[r+u];a._update.call(this,s,0,i,n);for(var u=0;u<this.blockSize;u++)s[u]=i[n+u]}else{a._update.call(this,t,r,i,n);for(var u=0;u<this.blockSize;u++)i[n+u]^=s[u];for(var u=0;u<this.blockSize;u++)s[u]=t[r+u]}}});var Tx=k((The,Px)=>{"use strict";v();var kZ=Rn(),RZ=Te(),Ax=O2(),cs=Uv();function BZ(e,t){kZ.equal(t.length,24,"Invalid key length");var r=t.slice(0,8),i=t.slice(8,16),n=t.slice(16,24);e==="encrypt"?this.ciphers=[cs.create({type:"encrypt",key:r}),cs.create({type:"decrypt",key:i}),cs.create({type:"encrypt",key:n})]:this.ciphers=[cs.create({type:"decrypt",key:n}),cs.create({type:"encrypt",key:i}),cs.create({type:"decrypt",key:r})]}function Lu(e){Ax.call(this,e);var t=new BZ(this.type,this.options.key);this._edeState=t}RZ(Lu,Ax);Px.exports=Lu;Lu.create=function(t){return new Lu(t)};Lu.prototype._update=function(t,r,i,n){var o=this._edeState;o.ciphers[0]._update(t,r,i,n),o.ciphers[1]._update(i,n,i,n),o.ciphers[2]._update(i,n,i,n)};Lu.prototype._pad=cs.prototype._pad;Lu.prototype._unpad=cs.prototype._unpad});var kx=k(wc=>{"use strict";v();wc.utils=qv();wc.Cipher=O2();wc.DES=Uv();wc.CBC=Ox();wc.EDE=Tx()});var Mx=k((Mhe,Bx)=>{v();var Rx=va(),ma=kx(),MZ=Te(),qu=ot().Buffer,Vh={"des-ede3-cbc":ma.CBC.instantiate(ma.EDE),"des-ede3":ma.EDE,"des-ede-cbc":ma.CBC.instantiate(ma.EDE),"des-ede":ma.EDE,"des-cbc":ma.CBC.instantiate(ma.DES),"des-ecb":ma.DES};Vh.des=Vh["des-cbc"];Vh.des3=Vh["des-ede3-cbc"];Bx.exports=P2;MZ(P2,Rx);function P2(e){Rx.call(this);var t=e.mode.toLowerCase(),r=Vh[t],i;e.decrypt?i="decrypt":i="encrypt";var n=e.key;qu.isBuffer(n)||(n=qu.from(n)),(t==="des-ede"||t==="des-ede-cbc")&&(n=qu.concat([n,n.slice(0,8)]));var o=e.iv;qu.isBuffer(o)||(o=qu.from(o)),this._des=r.create({key:n,iv:o,type:i})}P2.prototype._update=function(e){return qu.from(this._des.update(e))};P2.prototype._final=function(){return qu.from(this._des.final())}});var Cx=k(Fv=>{v();Fv.encrypt=function(e,t){return e._cipher.encryptBlock(t)};Fv.decrypt=function(e,t){return e._cipher.decryptBlock(t)}});var Sc=k((Lhe,Nx)=>{v();Nx.exports=function(t,r){for(var i=Math.min(t.length,r.length),n=new h.Buffer(i),o=0;o<i;++o)n[o]=t[o]^r[o];return n}});var Lx=k(Hv=>{v();var Dx=Sc();Hv.encrypt=function(e,t){var r=Dx(t,e._prev);return e._prev=e._cipher.encryptBlock(r),e._prev};Hv.decrypt=function(e,t){var r=e._prev;e._prev=t;var i=e._cipher.decryptBlock(t);return Dx(i,r)}});var Fx=k(Ux=>{v();var Gh=ot().Buffer,CZ=Sc();function qx(e,t,r){var i=t.length,n=CZ(t,e._cache);return e._cache=e._cache.slice(i),e._prev=Gh.concat([e._prev,r?t:n]),n}Ux.encrypt=function(e,t,r){for(var i=Gh.allocUnsafe(0),n;t.length;)if(e._cache.length===0&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=Gh.allocUnsafe(0)),e._cache.length<=t.length)n=e._cache.length,i=Gh.concat([i,qx(e,t.slice(0,n),r)]),t=t.slice(n);else{i=Gh.concat([i,qx(e,t,r)]);break}return i}});var jx=k(Hx=>{v();var jv=ot().Buffer;function NZ(e,t,r){var i=e._cipher.encryptBlock(e._prev),n=i[0]^t;return e._prev=jv.concat([e._prev.slice(1),jv.from([r?t:n])]),n}Hx.encrypt=function(e,t,r){for(var i=t.length,n=jv.allocUnsafe(i),o=-1;++o<i;)n[o]=NZ(e,t[o],r);return n}});var Kx=k(zx=>{v();var T2=ot().Buffer;function DZ(e,t,r){for(var i,n=-1,o=8,a=0,s,u;++n<o;)i=e._cipher.encryptBlock(e._prev),s=t&1<<7-n?128:0,u=i[0]^s,a+=(u&128)>>n%8,e._prev=LZ(e._prev,r?s:u);return a}function LZ(e,t){var r=e.length,i=-1,n=T2.allocUnsafe(e.length);for(e=T2.concat([e,T2.from([t])]);++i<r;)n[i]=e[i]<<1|e[i+1]>>7;return n}zx.encrypt=function(e,t,r){for(var i=t.length,n=T2.allocUnsafe(i),o=-1;++o<i;)n[o]=DZ(e,t[o],r);return n}});var Gx=k(Vx=>{v();var qZ=Sc();function UZ(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}Vx.encrypt=function(e,t){for(;e._cache.length<t.length;)e._cache=h.Buffer.concat([e._cache,UZ(e)]);var r=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),qZ(t,r)}});var zv=k((Yhe,Zx)=>{v();function FZ(e){for(var t=e.length,r;t--;)if(r=e.readUInt8(t),r===255)e.writeUInt8(0,t);else{r++,e.writeUInt8(r,t);break}}Zx.exports=FZ});var Vv=k(Yx=>{v();var HZ=Sc(),Wx=ot().Buffer,jZ=zv();function zZ(e){var t=e._cipher.encryptBlockRaw(e._prev);return jZ(e._prev),t}var Kv=16;Yx.encrypt=function(e,t){var r=Math.ceil(t.length/Kv),i=e._cache.length;e._cache=Wx.concat([e._cache,Wx.allocUnsafe(r*Kv)]);for(var n=0;n<r;n++){var o=zZ(e),a=i+n*Kv;e._cache.writeUInt32BE(o[0],a+0),e._cache.writeUInt32BE(o[1],a+4),e._cache.writeUInt32BE(o[2],a+8),e._cache.writeUInt32BE(o[3],a+12)}var s=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),HZ(t,s)}});var Gv=k((Qhe,KZ)=>{KZ.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 R2=k((e0e,$x)=>{v();var VZ={ECB:Cx(),CBC:Lx(),CFB:Fx(),CFB8:jx(),CFB1:Kx(),OFB:Gx(),CTR:Vv(),GCM:Vv()},k2=Gv();for(Zv in k2)k2[Zv].module=VZ[k2[Zv].mode];var Zv;$x.exports=k2});var Zh=k((r0e,Jx)=>{v();var B2=ot().Buffer;function Yv(e){B2.isBuffer(e)||(e=B2.from(e));for(var t=e.length/4|0,r=new Array(t),i=0;i<t;i++)r[i]=e.readUInt32BE(i*4);return r}function Wv(e){for(var t=0;t<e.length;e++)e[t]=0}function Xx(e,t,r,i,n){for(var o=r[0],a=r[1],s=r[2],u=r[3],c=e[0]^t[0],l=e[1]^t[1],m=e[2]^t[2],w=e[3]^t[3],E,P,M,D,L=4,U=1;U<n;U++)E=o[c>>>24]^a[l>>>16&255]^s[m>>>8&255]^u[w&255]^t[L++],P=o[l>>>24]^a[m>>>16&255]^s[w>>>8&255]^u[c&255]^t[L++],M=o[m>>>24]^a[w>>>16&255]^s[c>>>8&255]^u[l&255]^t[L++],D=o[w>>>24]^a[c>>>16&255]^s[l>>>8&255]^u[m&255]^t[L++],c=E,l=P,m=M,w=D;return E=(i[c>>>24]<<24|i[l>>>16&255]<<16|i[m>>>8&255]<<8|i[w&255])^t[L++],P=(i[l>>>24]<<24|i[m>>>16&255]<<16|i[w>>>8&255]<<8|i[c&255])^t[L++],M=(i[m>>>24]<<24|i[w>>>16&255]<<16|i[c>>>8&255]<<8|i[l&255])^t[L++],D=(i[w>>>24]<<24|i[c>>>16&255]<<16|i[l>>>8&255]<<8|i[m&255])^t[L++],E=E>>>0,P=P>>>0,M=M>>>0,D=D>>>0,[E,P,M,D]}var GZ=[0,1,2,4,8,16,32,64,128,27,54],br=(function(){for(var e=new Array(256),t=0;t<256;t++)t<128?e[t]=t<<1:e[t]=t<<1^283;for(var r=[],i=[],n=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,u=0;u<256;++u){var c=s^s<<1^s<<2^s<<3^s<<4;c=c>>>8^c&255^99,r[a]=c,i[c]=a;var l=e[a],m=e[l],w=e[m],E=e[c]*257^c*16843008;n[0][a]=E<<24|E>>>8,n[1][a]=E<<16|E>>>16,n[2][a]=E<<8|E>>>24,n[3][a]=E,E=w*16843009^m*65537^l*257^a*16843008,o[0][c]=E<<24|E>>>8,o[1][c]=E<<16|E>>>16,o[2][c]=E<<8|E>>>24,o[3][c]=E,a===0?a=s=1:(a=l^e[e[e[w^l]]],s^=e[e[s]])}return{SBOX:r,INV_SBOX:i,SUB_MIX:n,INV_SUB_MIX:o}})();function un(e){this._key=Yv(e),this._reset()}un.blockSize=16;un.keySize=256/8;un.prototype.blockSize=un.blockSize;un.prototype.keySize=un.keySize;un.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,i=(r+1)*4,n=[],o=0;o<t;o++)n[o]=e[o];for(o=t;o<i;o++){var a=n[o-1];o%t===0?(a=a<<8|a>>>24,a=br.SBOX[a>>>24]<<24|br.SBOX[a>>>16&255]<<16|br.SBOX[a>>>8&255]<<8|br.SBOX[a&255],a^=GZ[o/t|0]<<24):t>6&&o%t===4&&(a=br.SBOX[a>>>24]<<24|br.SBOX[a>>>16&255]<<16|br.SBOX[a>>>8&255]<<8|br.SBOX[a&255]),n[o]=n[o-t]^a}for(var s=[],u=0;u<i;u++){var c=i-u,l=n[c-(u%4?0:4)];u<4||c<=4?s[u]=l:s[u]=br.INV_SUB_MIX[0][br.SBOX[l>>>24]]^br.INV_SUB_MIX[1][br.SBOX[l>>>16&255]]^br.INV_SUB_MIX[2][br.SBOX[l>>>8&255]]^br.INV_SUB_MIX[3][br.SBOX[l&255]]}this._nRounds=r,this._keySchedule=n,this._invKeySchedule=s};un.prototype.encryptBlockRaw=function(e){return e=Yv(e),Xx(e,this._keySchedule,br.SUB_MIX,br.SBOX,this._nRounds)};un.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=B2.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r};un.prototype.decryptBlock=function(e){e=Yv(e);var t=e[1];e[1]=e[3],e[3]=t;var r=Xx(e,this._invKeySchedule,br.INV_SUB_MIX,br.INV_SBOX,this._nRounds),i=B2.allocUnsafe(16);return i.writeUInt32BE(r[0],0),i.writeUInt32BE(r[3],4),i.writeUInt32BE(r[2],8),i.writeUInt32BE(r[1],12),i};un.prototype.scrub=function(){Wv(this._keySchedule),Wv(this._invKeySchedule),Wv(this._key)};Jx.exports.AES=un});var tE=k((n0e,eE)=>{v();var xc=ot().Buffer,ZZ=xc.alloc(16,0);function WZ(e){return[e.readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)]}function Qx(e){var t=xc.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function Wh(e){this.h=e,this.state=xc.alloc(16,0),this.cache=xc.allocUnsafe(0)}Wh.prototype.ghash=function(e){for(var t=-1;++t<e.length;)this.state[t]^=e[t];this._multiply()};Wh.prototype._multiply=function(){for(var e=WZ(this.h),t=[0,0,0,0],r,i,n,o=-1;++o<128;){for(i=(this.state[~~(o/8)]&1<<7-o%8)!==0,i&&(t[0]^=e[0],t[1]^=e[1],t[2]^=e[2],t[3]^=e[3]),n=(e[3]&1)!==0,r=3;r>0;r--)e[r]=e[r]>>>1|(e[r-1]&1)<<31;e[0]=e[0]>>>1,n&&(e[0]=e[0]^225<<24)}this.state=Qx(t)};Wh.prototype.update=function(e){this.cache=xc.concat([this.cache,e]);for(var t;this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)};Wh.prototype.final=function(e,t){return this.cache.length&&this.ghash(xc.concat([this.cache,ZZ],16)),this.ghash(Qx([0,e,0,t])),this.state};eE.exports=Wh});var $v=k((a0e,nE)=>{v();var YZ=Zh(),Pi=ot().Buffer,rE=va(),$Z=Te(),iE=tE(),XZ=Sc(),JZ=zv();function QZ(e,t){var r=0;e.length!==t.length&&r++;for(var i=Math.min(e.length,t.length),n=0;n<i;++n)r+=e[n]^t[n];return r}function eW(e,t,r){if(t.length===12)return e._finID=Pi.concat([t,Pi.from([0,0,0,1])]),Pi.concat([t,Pi.from([0,0,0,2])]);var i=new iE(r),n=t.length,o=n%16;i.update(t),o&&(o=16-o,i.update(Pi.alloc(o,0))),i.update(Pi.alloc(8,0));var a=n*8,s=Pi.alloc(8);s.writeUIntBE(a,0,8),i.update(s),e._finID=i.state;var u=Pi.from(e._finID);return JZ(u),u}function Uu(e,t,r,i){rE.call(this);var n=Pi.alloc(4,0);this._cipher=new YZ.AES(t);var o=this._cipher.encryptBlock(n);this._ghash=new iE(o),r=eW(this,r,o),this._prev=Pi.from(r),this._cache=Pi.allocUnsafe(0),this._secCache=Pi.allocUnsafe(0),this._decrypt=i,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}$Z(Uu,rE);Uu.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=Pi.alloc(t,0),this._ghash.update(t))}this._called=!0;var r=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(r),this._len+=e.length,r};Uu.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=XZ(this._ghash.final(this._alen*8,this._len*8),this._cipher.encryptBlock(this._finID));if(this._decrypt&&QZ(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=e,this._cipher.scrub()};Uu.prototype.getAuthTag=function(){if(this._decrypt||!Pi.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag};Uu.prototype.setAuthTag=function(t){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=t};Uu.prototype.setAAD=function(t){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(t),this._alen+=t.length};nE.exports=Uu});var Jv=k((u0e,aE)=>{v();var tW=Zh(),Xv=ot().Buffer,oE=va(),rW=Te();function M2(e,t,r,i){oE.call(this),this._cipher=new tW.AES(t),this._prev=Xv.from(r),this._cache=Xv.allocUnsafe(0),this._secCache=Xv.allocUnsafe(0),this._decrypt=i,this._mode=e}rW(M2,oE);M2.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)};M2.prototype._final=function(){this._cipher.scrub()};aE.exports=M2});var Yh=k((c0e,sE)=>{v();var Fu=ot().Buffer,iW=r2();function nW(e,t,r,i){if(Fu.isBuffer(e)||(e=Fu.from(e,"binary")),t&&(Fu.isBuffer(t)||(t=Fu.from(t,"binary")),t.length!==8))throw new RangeError("salt should be Buffer with 8 byte length");for(var n=r/8,o=Fu.alloc(n),a=Fu.alloc(i||0),s=Fu.alloc(0);n>0||i>0;){var u=new iW;u.update(s),u.update(e),t&&u.update(t),s=u.digest();var c=0;if(n>0){var l=o.length-n;c=Math.min(n,s.length),s.copy(o,l,0,c),n-=c}if(c<s.length&&i>0){var m=a.length-i,w=Math.min(i,s.length-c);s.copy(a,m,c,c+w),i-=w}}return s.fill(0),{key:o,iv:a}}sE.exports=nW});var lE=k(Qv=>{v();var uE=R2(),oW=$v(),ya=ot().Buffer,aW=Jv(),fE=va(),sW=Zh(),uW=Yh(),fW=Te();function $h(e,t,r){fE.call(this),this._cache=new C2,this._cipher=new sW.AES(t),this._prev=ya.from(r),this._mode=e,this._autopadding=!0}fW($h,fE);$h.prototype._update=function(e){this._cache.add(e);for(var t,r,i=[];t=this._cache.get();)r=this._mode.encrypt(this,t),i.push(r);return ya.concat(i)};var cW=ya.alloc(16,16);$h.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(cW))throw this._cipher.scrub(),new Error("data not multiple of block length")};$h.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this};function C2(){this.cache=ya.allocUnsafe(0)}C2.prototype.add=function(e){this.cache=ya.concat([this.cache,e])};C2.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null};C2.prototype.flush=function(){for(var e=16-this.cache.length,t=ya.allocUnsafe(e),r=-1;++r<e;)t.writeUInt8(e,r);return ya.concat([this.cache,t])};function cE(e,t,r){var i=uE[e.toLowerCase()];if(!i)throw new TypeError("invalid suite type");if(typeof t=="string"&&(t=ya.from(t)),t.length!==i.key/8)throw new TypeError("invalid key length "+t.length);if(typeof r=="string"&&(r=ya.from(r)),i.mode!=="GCM"&&r.length!==i.iv)throw new TypeError("invalid iv length "+r.length);return i.type==="stream"?new aW(i.module,t,r):i.type==="auth"?new oW(i.module,t,r):new $h(i.module,t,r)}function lW(e,t){var r=uE[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=uW(t,!1,r.key,r.iv);return cE(e,i.key,i.iv)}Qv.createCipheriv=cE;Qv.createCipher=lW});var gE=k(em=>{v();var hW=$v(),Ec=ot().Buffer,hE=R2(),dW=Jv(),dE=va(),pW=Zh(),gW=Yh(),vW=Te();function Xh(e,t,r){dE.call(this),this._cache=new N2,this._last=void 0,this._cipher=new pW.AES(t),this._prev=Ec.from(r),this._mode=e,this._autopadding=!0}vW(Xh,dE);Xh.prototype._update=function(e){this._cache.add(e);for(var t,r,i=[];t=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,t),i.push(r);return Ec.concat(i)};Xh.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return mW(this._mode.decrypt(this,e));if(e)throw new Error("data not multiple of block length")};Xh.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this};function N2(){this.cache=Ec.allocUnsafe(0)}N2.prototype.add=function(e){this.cache=Ec.concat([this.cache,e])};N2.prototype.get=function(e){var t;if(e){if(this.cache.length>16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null};N2.prototype.flush=function(){if(this.cache.length)return this.cache};function mW(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");for(var r=-1;++r<t;)if(e[r+(16-t)]!==t)throw new Error("unable to decrypt data");if(t!==16)return e.slice(0,16-t)}function pE(e,t,r){var i=hE[e.toLowerCase()];if(!i)throw new TypeError("invalid suite type");if(typeof r=="string"&&(r=Ec.from(r)),i.mode!=="GCM"&&r.length!==i.iv)throw new TypeError("invalid iv length "+r.length);if(typeof t=="string"&&(t=Ec.from(t)),t.length!==i.key/8)throw new TypeError("invalid key length "+t.length);return i.type==="stream"?new dW(i.module,t,r,!0):i.type==="auth"?new hW(i.module,t,r,!0):new Xh(i.module,t,r)}function yW(e,t){var r=hE[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=gW(t,!1,r.key,r.iv);return pE(e,i.key,i.iv)}em.createDecipher=yW;em.createDecipheriv=pE});var D2=k(Bn=>{v();var vE=lE(),mE=gE(),bW=Gv();function _W(){return Object.keys(bW)}Bn.createCipher=Bn.Cipher=vE.createCipher;Bn.createCipheriv=Bn.Cipheriv=vE.createCipheriv;Bn.createDecipher=Bn.Decipher=mE.createDecipher;Bn.createDecipheriv=Bn.Decipheriv=mE.createDecipheriv;Bn.listCiphers=Bn.getCiphers=_W});var yE=k(ba=>{v();ba["des-ecb"]={key:8,iv:0};ba["des-cbc"]=ba.des={key:8,iv:8};ba["des-ede3-cbc"]=ba.des3={key:24,iv:8};ba["des-ede3"]={key:24,iv:0};ba["des-ede-cbc"]={key:16,iv:8};ba["des-ede"]={key:16,iv:0}});var xE=k(Mn=>{v();var bE=Mx(),tm=D2(),ls=R2(),_a=yE(),_E=Yh();function wW(e,t){e=e.toLowerCase();var r,i;if(ls[e])r=ls[e].key,i=ls[e].iv;else if(_a[e])r=_a[e].key*8,i=_a[e].iv;else throw new TypeError("invalid suite type");var n=_E(t,!1,r,i);return wE(e,n.key,n.iv)}function SW(e,t){e=e.toLowerCase();var r,i;if(ls[e])r=ls[e].key,i=ls[e].iv;else if(_a[e])r=_a[e].key*8,i=_a[e].iv;else throw new TypeError("invalid suite type");var n=_E(t,!1,r,i);return SE(e,n.key,n.iv)}function wE(e,t,r){if(e=e.toLowerCase(),ls[e])return tm.createCipheriv(e,t,r);if(_a[e])return new bE({key:t,iv:r,mode:e});throw new TypeError("invalid suite type")}function SE(e,t,r){if(e=e.toLowerCase(),ls[e])return tm.createDecipheriv(e,t,r);if(_a[e])return new bE({key:t,iv:r,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}function xW(){return Object.keys(_a).concat(tm.getCiphers())}Mn.createCipher=Mn.Cipher=wW;Mn.createCipheriv=Mn.Cipheriv=wE;Mn.createDecipher=Mn.Decipher=SW;Mn.createDecipheriv=Mn.Decipheriv=SE;Mn.listCiphers=Mn.getCiphers=xW});var Cn=k((EE,rm)=>{v();(function(e,t){"use strict";function r(B,g){if(!B)throw new Error(g||"Assertion failed")}function i(B,g){B.super_=g;var I=function(){};I.prototype=g.prototype,B.prototype=new I,B.prototype.constructor=B}function n(B,g,I){if(n.isBN(B))return B;this.negative=0,this.words=null,this.length=0,this.red=null,B!==null&&((g==="le"||g==="be")&&(I=g,g=10),this._init(B||0,g||10,I||"be"))}typeof e=="object"?e.exports=n:t.BN=n,n.BN=n,n.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=Kt().Buffer}catch{}n.isBN=function(g){return g instanceof n?!0:g!==null&&typeof g=="object"&&g.constructor.wordSize===n.wordSize&&Array.isArray(g.words)},n.max=function(g,I){return g.cmp(I)>0?g:I},n.min=function(g,I){return g.cmp(I)<0?g:I},n.prototype._init=function(g,I,y){if(typeof g=="number")return this._initNumber(g,I,y);if(typeof g=="object")return this._initArray(g,I,y);I==="hex"&&(I=16),r(I===(I|0)&&I>=2&&I<=36),g=g.toString().replace(/\s+/g,"");var f=0;g[0]==="-"&&(f++,this.negative=1),f<g.length&&(I===16?this._parseHex(g,f,y):(this._parseBase(g,I,f),y==="le"&&this._initArray(this.toArray(),I,y)))},n.prototype._initNumber=function(g,I,y){g<0&&(this.negative=1,g=-g),g<67108864?(this.words=[g&67108863],this.length=1):g<4503599627370496?(this.words=[g&67108863,g/67108864&67108863],this.length=2):(r(g<9007199254740992),this.words=[g&67108863,g/67108864&67108863,1],this.length=3),y==="le"&&this._initArray(this.toArray(),I,y)},n.prototype._initArray=function(g,I,y){if(r(typeof g.length=="number"),g.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(g.length/3),this.words=new Array(this.length);for(var f=0;f<this.length;f++)this.words[f]=0;var p,_,x=0;if(y==="be")for(f=g.length-1,p=0;f>=0;f-=3)_=g[f]|g[f-1]<<8|g[f-2]<<16,this.words[p]|=_<<x&67108863,this.words[p+1]=_>>>26-x&67108863,x+=24,x>=26&&(x-=26,p++);else if(y==="le")for(f=0,p=0;f<g.length;f+=3)_=g[f]|g[f+1]<<8|g[f+2]<<16,this.words[p]|=_<<x&67108863,this.words[p+1]=_>>>26-x&67108863,x+=24,x>=26&&(x-=26,p++);return this.strip()};function a(B,g){var I=B.charCodeAt(g);return I>=65&&I<=70?I-55:I>=97&&I<=102?I-87:I-48&15}function s(B,g,I){var y=a(B,I);return I-1>=g&&(y|=a(B,I-1)<<4),y}n.prototype._parseHex=function(g,I,y){this.length=Math.ceil((g.length-I)/6),this.words=new Array(this.length);for(var f=0;f<this.length;f++)this.words[f]=0;var p=0,_=0,x;if(y==="be")for(f=g.length-1;f>=I;f-=2)x=s(g,I,f)<<p,this.words[_]|=x&67108863,p>=18?(p-=18,_+=1,this.words[_]|=x>>>26):p+=8;else{var b=g.length-I;for(f=b%2===0?I+1:I;f<g.length;f+=2)x=s(g,I,f)<<p,this.words[_]|=x&67108863,p>=18?(p-=18,_+=1,this.words[_]|=x>>>26):p+=8}this.strip()};function u(B,g,I,y){for(var f=0,p=Math.min(B.length,I),_=g;_<p;_++){var x=B.charCodeAt(_)-48;f*=y,x>=49?f+=x-49+10:x>=17?f+=x-17+10:f+=x}return f}n.prototype._parseBase=function(g,I,y){this.words=[0],this.length=1;for(var f=0,p=1;p<=67108863;p*=I)f++;f--,p=p/I|0;for(var _=g.length-y,x=_%f,b=Math.min(_,_-x)+y,d=0,O=y;O<b;O+=f)d=u(g,O,O+f,I),this.imuln(p),this.words[0]+d<67108864?this.words[0]+=d:this._iaddn(d);if(x!==0){var T=1;for(d=u(g,O,g.length,I),O=0;O<x;O++)T*=I;this.imuln(T),this.words[0]+d<67108864?this.words[0]+=d:this._iaddn(d)}this.strip()},n.prototype.copy=function(g){g.words=new Array(this.length);for(var I=0;I<this.length;I++)g.words[I]=this.words[I];g.length=this.length,g.negative=this.negative,g.red=this.red},n.prototype.clone=function(){var g=new n(null);return this.copy(g),g},n.prototype._expand=function(g){for(;this.length<g;)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 c=["","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"],l=[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],m=[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(g,I){g=g||10,I=I|0||1;var y;if(g===16||g==="hex"){y="";for(var f=0,p=0,_=0;_<this.length;_++){var x=this.words[_],b=((x<<f|p)&16777215).toString(16);p=x>>>24-f&16777215,f+=2,f>=26&&(f-=26,_--),p!==0||_!==this.length-1?y=c[6-b.length]+b+y:y=b+y}for(p!==0&&(y=p.toString(16)+y);y.length%I!==0;)y="0"+y;return this.negative!==0&&(y="-"+y),y}if(g===(g|0)&&g>=2&&g<=36){var d=l[g],O=m[g];y="";var T=this.clone();for(T.negative=0;!T.isZero();){var S=T.modn(O).toString(g);T=T.idivn(O),T.isZero()?y=S+y:y=c[d-S.length]+S+y}for(this.isZero()&&(y="0"+y);y.length%I!==0;)y="0"+y;return this.negative!==0&&(y="-"+y),y}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var g=this.words[0];return this.length===2?g+=this.words[1]*67108864:this.length===3&&this.words[2]===1?g+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-g:g},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(g,I){return r(typeof o<"u"),this.toArrayLike(o,g,I)},n.prototype.toArray=function(g,I){return this.toArrayLike(Array,g,I)},n.prototype.toArrayLike=function(g,I,y){var f=this.byteLength(),p=y||Math.max(1,f);r(f<=p,"byte array longer than desired length"),r(p>0,"Requested array length <= 0"),this.strip();var _=I==="le",x=new g(p),b,d,O=this.clone();if(_){for(d=0;!O.isZero();d++)b=O.andln(255),O.iushrn(8),x[d]=b;for(;d<p;d++)x[d]=0}else{for(d=0;d<p-f;d++)x[d]=0;for(d=0;!O.isZero();d++)b=O.andln(255),O.iushrn(8),x[p-d-1]=b}return x},Math.clz32?n.prototype._countBits=function(g){return 32-Math.clz32(g)}:n.prototype._countBits=function(g){var I=g,y=0;return I>=4096&&(y+=13,I>>>=13),I>=64&&(y+=7,I>>>=7),I>=8&&(y+=4,I>>>=4),I>=2&&(y+=2,I>>>=2),y+I},n.prototype._zeroBits=function(g){if(g===0)return 26;var I=g,y=0;return(I&8191)===0&&(y+=13,I>>>=13),(I&127)===0&&(y+=7,I>>>=7),(I&15)===0&&(y+=4,I>>>=4),(I&3)===0&&(y+=2,I>>>=2),(I&1)===0&&y++,y},n.prototype.bitLength=function(){var g=this.words[this.length-1],I=this._countBits(g);return(this.length-1)*26+I};function w(B){for(var g=new Array(B.bitLength()),I=0;I<g.length;I++){var y=I/26|0,f=I%26;g[I]=(B.words[y]&1<<f)>>>f}return g}n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var g=0,I=0;I<this.length;I++){var y=this._zeroBits(this.words[I]);if(g+=y,y!==26)break}return g},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(g){return this.negative!==0?this.abs().inotn(g).iaddn(1):this.clone()},n.prototype.fromTwos=function(g){return this.testn(g-1)?this.notn(g).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(g){for(;this.length<g.length;)this.words[this.length++]=0;for(var I=0;I<g.length;I++)this.words[I]=this.words[I]|g.words[I];return this.strip()},n.prototype.ior=function(g){return r((this.negative|g.negative)===0),this.iuor(g)},n.prototype.or=function(g){return this.length>g.length?this.clone().ior(g):g.clone().ior(this)},n.prototype.uor=function(g){return this.length>g.length?this.clone().iuor(g):g.clone().iuor(this)},n.prototype.iuand=function(g){var I;this.length>g.length?I=g:I=this;for(var y=0;y<I.length;y++)this.words[y]=this.words[y]&g.words[y];return this.length=I.length,this.strip()},n.prototype.iand=function(g){return r((this.negative|g.negative)===0),this.iuand(g)},n.prototype.and=function(g){return this.length>g.length?this.clone().iand(g):g.clone().iand(this)},n.prototype.uand=function(g){return this.length>g.length?this.clone().iuand(g):g.clone().iuand(this)},n.prototype.iuxor=function(g){var I,y;this.length>g.length?(I=this,y=g):(I=g,y=this);for(var f=0;f<y.length;f++)this.words[f]=I.words[f]^y.words[f];if(this!==I)for(;f<I.length;f++)this.words[f]=I.words[f];return this.length=I.length,this.strip()},n.prototype.ixor=function(g){return r((this.negative|g.negative)===0),this.iuxor(g)},n.prototype.xor=function(g){return this.length>g.length?this.clone().ixor(g):g.clone().ixor(this)},n.prototype.uxor=function(g){return this.length>g.length?this.clone().iuxor(g):g.clone().iuxor(this)},n.prototype.inotn=function(g){r(typeof g=="number"&&g>=0);var I=Math.ceil(g/26)|0,y=g%26;this._expand(I),y>0&&I--;for(var f=0;f<I;f++)this.words[f]=~this.words[f]&67108863;for(y>0&&(this.words[f]=~this.words[f]&67108863>>26-y,f++);f<this.length;f++)this.words[f]=0;return this.strip()},n.prototype.notn=function(g){return this.clone().inotn(g)},n.prototype.setn=function(g,I){r(typeof g=="number"&&g>=0);var y=g/26|0,f=g%26;return this._expand(y+1),I?this.words[y]=this.words[y]|1<<f:this.words[y]=this.words[y]&~(1<<f),this.strip()},n.prototype.iadd=function(g){var I;if(this.negative!==0&&g.negative===0)return this.negative=0,I=this.isub(g),this.negative^=1,this._normSign();if(this.negative===0&&g.negative!==0)return g.negative=0,I=this.isub(g),g.negative=1,I._normSign();var y,f;this.length>g.length?(y=this,f=g):(y=g,f=this);for(var p=0,_=0;_<f.length;_++)I=(y.words[_]|0)+(f.words[_]|0)+p,this.words[_]=I&67108863,p=I>>>26;for(;p!==0&&_<y.length;_++)I=(y.words[_]|0)+p,this.words[_]=I&67108863,p=I>>>26;if(this.length=y.length,p!==0)this.words[this.length]=p,this.length++;else if(y!==this)for(;_<y.length;_++)this.words[_]=y.words[_];return this},n.prototype.add=function(g){var I;return g.negative!==0&&this.negative===0?(g.negative=0,I=this.sub(g),g.negative^=1,I):g.negative===0&&this.negative!==0?(this.negative=0,I=g.sub(this),this.negative=1,I):this.length>g.length?this.clone().iadd(g):g.clone().iadd(this)},n.prototype.isub=function(g){if(g.negative!==0){g.negative=0;var I=this.iadd(g);return g.negative=1,I._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(g),this.negative=1,this._normSign();var y=this.cmp(g);if(y===0)return this.negative=0,this.length=1,this.words[0]=0,this;var f,p;y>0?(f=this,p=g):(f=g,p=this);for(var _=0,x=0;x<p.length;x++)I=(f.words[x]|0)-(p.words[x]|0)+_,_=I>>26,this.words[x]=I&67108863;for(;_!==0&&x<f.length;x++)I=(f.words[x]|0)+_,_=I>>26,this.words[x]=I&67108863;if(_===0&&x<f.length&&f!==this)for(;x<f.length;x++)this.words[x]=f.words[x];return this.length=Math.max(this.length,x),f!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(g){return this.clone().isub(g)};function E(B,g,I){I.negative=g.negative^B.negative;var y=B.length+g.length|0;I.length=y,y=y-1|0;var f=B.words[0]|0,p=g.words[0]|0,_=f*p,x=_&67108863,b=_/67108864|0;I.words[0]=x;for(var d=1;d<y;d++){for(var O=b>>>26,T=b&67108863,S=Math.min(d,g.length-1),R=Math.max(0,d-B.length+1);R<=S;R++){var Y=d-R|0;f=B.words[Y]|0,p=g.words[R]|0,_=f*p+T,O+=_/67108864|0,T=_&67108863}I.words[d]=T|0,b=O|0}return b!==0?I.words[d]=b|0:I.length--,I.strip()}var P=function(g,I,y){var f=g.words,p=I.words,_=y.words,x=0,b,d,O,T=f[0]|0,S=T&8191,R=T>>>13,Y=f[1]|0,X=Y&8191,ne=Y>>>13,ce=f[2]|0,pe=ce&8191,q=ce>>>13,W=f[3]|0,$=W&8191,te=W>>>13,se=f[4]|0,ue=se&8191,le=se>>>13,Pe=f[5]|0,ge=Pe&8191,ve=Pe>>>13,sr=f[6]|0,Ee=sr&8191,ye=sr>>>13,Be=f[7]|0,be=Be&8191,_e=Be>>>13,Qi=f[8]|0,Ce=Qi&8191,Re=Qi>>>13,Js=f[9]|0,De=Js&8191,qe=Js>>>13,Wl=p[0]|0,Ue=Wl&8191,Fe=Wl>>>13,Yl=p[1]|0,He=Yl&8191,je=Yl>>>13,$l=p[2]|0,ze=$l&8191,Ke=$l>>>13,Xl=p[3]|0,Ve=Xl&8191,Ge=Xl>>>13,Jl=p[4]|0,Ze=Jl&8191,We=Jl>>>13,Ql=p[5]|0,Ye=Ql&8191,$e=Ql>>>13,eh=p[6]|0,Xe=eh&8191,Je=eh>>>13,th=p[7]|0,Qe=th&8191,et=th>>>13,rh=p[8]|0,tt=rh&8191,rt=rh>>>13,ih=p[9]|0,it=ih&8191,nt=ih>>>13;y.negative=g.negative^I.negative,y.length=19,b=Math.imul(S,Ue),d=Math.imul(S,Fe),d=d+Math.imul(R,Ue)|0,O=Math.imul(R,Fe);var Gf=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(Gf>>>26)|0,Gf&=67108863,b=Math.imul(X,Ue),d=Math.imul(X,Fe),d=d+Math.imul(ne,Ue)|0,O=Math.imul(ne,Fe),b=b+Math.imul(S,He)|0,d=d+Math.imul(S,je)|0,d=d+Math.imul(R,He)|0,O=O+Math.imul(R,je)|0;var Jt=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(Jt>>>26)|0,Jt&=67108863,b=Math.imul(pe,Ue),d=Math.imul(pe,Fe),d=d+Math.imul(q,Ue)|0,O=Math.imul(q,Fe),b=b+Math.imul(X,He)|0,d=d+Math.imul(X,je)|0,d=d+Math.imul(ne,He)|0,O=O+Math.imul(ne,je)|0,b=b+Math.imul(S,ze)|0,d=d+Math.imul(S,Ke)|0,d=d+Math.imul(R,ze)|0,O=O+Math.imul(R,Ke)|0;var Qt=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,b=Math.imul($,Ue),d=Math.imul($,Fe),d=d+Math.imul(te,Ue)|0,O=Math.imul(te,Fe),b=b+Math.imul(pe,He)|0,d=d+Math.imul(pe,je)|0,d=d+Math.imul(q,He)|0,O=O+Math.imul(q,je)|0,b=b+Math.imul(X,ze)|0,d=d+Math.imul(X,Ke)|0,d=d+Math.imul(ne,ze)|0,O=O+Math.imul(ne,Ke)|0,b=b+Math.imul(S,Ve)|0,d=d+Math.imul(S,Ge)|0,d=d+Math.imul(R,Ve)|0,O=O+Math.imul(R,Ge)|0;var Qs=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(Qs>>>26)|0,Qs&=67108863,b=Math.imul(ue,Ue),d=Math.imul(ue,Fe),d=d+Math.imul(le,Ue)|0,O=Math.imul(le,Fe),b=b+Math.imul($,He)|0,d=d+Math.imul($,je)|0,d=d+Math.imul(te,He)|0,O=O+Math.imul(te,je)|0,b=b+Math.imul(pe,ze)|0,d=d+Math.imul(pe,Ke)|0,d=d+Math.imul(q,ze)|0,O=O+Math.imul(q,Ke)|0,b=b+Math.imul(X,Ve)|0,d=d+Math.imul(X,Ge)|0,d=d+Math.imul(ne,Ve)|0,O=O+Math.imul(ne,Ge)|0,b=b+Math.imul(S,Ze)|0,d=d+Math.imul(S,We)|0,d=d+Math.imul(R,Ze)|0,O=O+Math.imul(R,We)|0;var eu=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(eu>>>26)|0,eu&=67108863,b=Math.imul(ge,Ue),d=Math.imul(ge,Fe),d=d+Math.imul(ve,Ue)|0,O=Math.imul(ve,Fe),b=b+Math.imul(ue,He)|0,d=d+Math.imul(ue,je)|0,d=d+Math.imul(le,He)|0,O=O+Math.imul(le,je)|0,b=b+Math.imul($,ze)|0,d=d+Math.imul($,Ke)|0,d=d+Math.imul(te,ze)|0,O=O+Math.imul(te,Ke)|0,b=b+Math.imul(pe,Ve)|0,d=d+Math.imul(pe,Ge)|0,d=d+Math.imul(q,Ve)|0,O=O+Math.imul(q,Ge)|0,b=b+Math.imul(X,Ze)|0,d=d+Math.imul(X,We)|0,d=d+Math.imul(ne,Ze)|0,O=O+Math.imul(ne,We)|0,b=b+Math.imul(S,Ye)|0,d=d+Math.imul(S,$e)|0,d=d+Math.imul(R,Ye)|0,O=O+Math.imul(R,$e)|0;var tu=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(tu>>>26)|0,tu&=67108863,b=Math.imul(Ee,Ue),d=Math.imul(Ee,Fe),d=d+Math.imul(ye,Ue)|0,O=Math.imul(ye,Fe),b=b+Math.imul(ge,He)|0,d=d+Math.imul(ge,je)|0,d=d+Math.imul(ve,He)|0,O=O+Math.imul(ve,je)|0,b=b+Math.imul(ue,ze)|0,d=d+Math.imul(ue,Ke)|0,d=d+Math.imul(le,ze)|0,O=O+Math.imul(le,Ke)|0,b=b+Math.imul($,Ve)|0,d=d+Math.imul($,Ge)|0,d=d+Math.imul(te,Ve)|0,O=O+Math.imul(te,Ge)|0,b=b+Math.imul(pe,Ze)|0,d=d+Math.imul(pe,We)|0,d=d+Math.imul(q,Ze)|0,O=O+Math.imul(q,We)|0,b=b+Math.imul(X,Ye)|0,d=d+Math.imul(X,$e)|0,d=d+Math.imul(ne,Ye)|0,O=O+Math.imul(ne,$e)|0,b=b+Math.imul(S,Xe)|0,d=d+Math.imul(S,Je)|0,d=d+Math.imul(R,Xe)|0,O=O+Math.imul(R,Je)|0;var ru=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(ru>>>26)|0,ru&=67108863,b=Math.imul(be,Ue),d=Math.imul(be,Fe),d=d+Math.imul(_e,Ue)|0,O=Math.imul(_e,Fe),b=b+Math.imul(Ee,He)|0,d=d+Math.imul(Ee,je)|0,d=d+Math.imul(ye,He)|0,O=O+Math.imul(ye,je)|0,b=b+Math.imul(ge,ze)|0,d=d+Math.imul(ge,Ke)|0,d=d+Math.imul(ve,ze)|0,O=O+Math.imul(ve,Ke)|0,b=b+Math.imul(ue,Ve)|0,d=d+Math.imul(ue,Ge)|0,d=d+Math.imul(le,Ve)|0,O=O+Math.imul(le,Ge)|0,b=b+Math.imul($,Ze)|0,d=d+Math.imul($,We)|0,d=d+Math.imul(te,Ze)|0,O=O+Math.imul(te,We)|0,b=b+Math.imul(pe,Ye)|0,d=d+Math.imul(pe,$e)|0,d=d+Math.imul(q,Ye)|0,O=O+Math.imul(q,$e)|0,b=b+Math.imul(X,Xe)|0,d=d+Math.imul(X,Je)|0,d=d+Math.imul(ne,Xe)|0,O=O+Math.imul(ne,Je)|0,b=b+Math.imul(S,Qe)|0,d=d+Math.imul(S,et)|0,d=d+Math.imul(R,Qe)|0,O=O+Math.imul(R,et)|0;var iu=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(iu>>>26)|0,iu&=67108863,b=Math.imul(Ce,Ue),d=Math.imul(Ce,Fe),d=d+Math.imul(Re,Ue)|0,O=Math.imul(Re,Fe),b=b+Math.imul(be,He)|0,d=d+Math.imul(be,je)|0,d=d+Math.imul(_e,He)|0,O=O+Math.imul(_e,je)|0,b=b+Math.imul(Ee,ze)|0,d=d+Math.imul(Ee,Ke)|0,d=d+Math.imul(ye,ze)|0,O=O+Math.imul(ye,Ke)|0,b=b+Math.imul(ge,Ve)|0,d=d+Math.imul(ge,Ge)|0,d=d+Math.imul(ve,Ve)|0,O=O+Math.imul(ve,Ge)|0,b=b+Math.imul(ue,Ze)|0,d=d+Math.imul(ue,We)|0,d=d+Math.imul(le,Ze)|0,O=O+Math.imul(le,We)|0,b=b+Math.imul($,Ye)|0,d=d+Math.imul($,$e)|0,d=d+Math.imul(te,Ye)|0,O=O+Math.imul(te,$e)|0,b=b+Math.imul(pe,Xe)|0,d=d+Math.imul(pe,Je)|0,d=d+Math.imul(q,Xe)|0,O=O+Math.imul(q,Je)|0,b=b+Math.imul(X,Qe)|0,d=d+Math.imul(X,et)|0,d=d+Math.imul(ne,Qe)|0,O=O+Math.imul(ne,et)|0,b=b+Math.imul(S,tt)|0,d=d+Math.imul(S,rt)|0,d=d+Math.imul(R,tt)|0,O=O+Math.imul(R,rt)|0;var nu=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(nu>>>26)|0,nu&=67108863,b=Math.imul(De,Ue),d=Math.imul(De,Fe),d=d+Math.imul(qe,Ue)|0,O=Math.imul(qe,Fe),b=b+Math.imul(Ce,He)|0,d=d+Math.imul(Ce,je)|0,d=d+Math.imul(Re,He)|0,O=O+Math.imul(Re,je)|0,b=b+Math.imul(be,ze)|0,d=d+Math.imul(be,Ke)|0,d=d+Math.imul(_e,ze)|0,O=O+Math.imul(_e,Ke)|0,b=b+Math.imul(Ee,Ve)|0,d=d+Math.imul(Ee,Ge)|0,d=d+Math.imul(ye,Ve)|0,O=O+Math.imul(ye,Ge)|0,b=b+Math.imul(ge,Ze)|0,d=d+Math.imul(ge,We)|0,d=d+Math.imul(ve,Ze)|0,O=O+Math.imul(ve,We)|0,b=b+Math.imul(ue,Ye)|0,d=d+Math.imul(ue,$e)|0,d=d+Math.imul(le,Ye)|0,O=O+Math.imul(le,$e)|0,b=b+Math.imul($,Xe)|0,d=d+Math.imul($,Je)|0,d=d+Math.imul(te,Xe)|0,O=O+Math.imul(te,Je)|0,b=b+Math.imul(pe,Qe)|0,d=d+Math.imul(pe,et)|0,d=d+Math.imul(q,Qe)|0,O=O+Math.imul(q,et)|0,b=b+Math.imul(X,tt)|0,d=d+Math.imul(X,rt)|0,d=d+Math.imul(ne,tt)|0,O=O+Math.imul(ne,rt)|0,b=b+Math.imul(S,it)|0,d=d+Math.imul(S,nt)|0,d=d+Math.imul(R,it)|0,O=O+Math.imul(R,nt)|0;var ou=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(ou>>>26)|0,ou&=67108863,b=Math.imul(De,He),d=Math.imul(De,je),d=d+Math.imul(qe,He)|0,O=Math.imul(qe,je),b=b+Math.imul(Ce,ze)|0,d=d+Math.imul(Ce,Ke)|0,d=d+Math.imul(Re,ze)|0,O=O+Math.imul(Re,Ke)|0,b=b+Math.imul(be,Ve)|0,d=d+Math.imul(be,Ge)|0,d=d+Math.imul(_e,Ve)|0,O=O+Math.imul(_e,Ge)|0,b=b+Math.imul(Ee,Ze)|0,d=d+Math.imul(Ee,We)|0,d=d+Math.imul(ye,Ze)|0,O=O+Math.imul(ye,We)|0,b=b+Math.imul(ge,Ye)|0,d=d+Math.imul(ge,$e)|0,d=d+Math.imul(ve,Ye)|0,O=O+Math.imul(ve,$e)|0,b=b+Math.imul(ue,Xe)|0,d=d+Math.imul(ue,Je)|0,d=d+Math.imul(le,Xe)|0,O=O+Math.imul(le,Je)|0,b=b+Math.imul($,Qe)|0,d=d+Math.imul($,et)|0,d=d+Math.imul(te,Qe)|0,O=O+Math.imul(te,et)|0,b=b+Math.imul(pe,tt)|0,d=d+Math.imul(pe,rt)|0,d=d+Math.imul(q,tt)|0,O=O+Math.imul(q,rt)|0,b=b+Math.imul(X,it)|0,d=d+Math.imul(X,nt)|0,d=d+Math.imul(ne,it)|0,O=O+Math.imul(ne,nt)|0;var au=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(au>>>26)|0,au&=67108863,b=Math.imul(De,ze),d=Math.imul(De,Ke),d=d+Math.imul(qe,ze)|0,O=Math.imul(qe,Ke),b=b+Math.imul(Ce,Ve)|0,d=d+Math.imul(Ce,Ge)|0,d=d+Math.imul(Re,Ve)|0,O=O+Math.imul(Re,Ge)|0,b=b+Math.imul(be,Ze)|0,d=d+Math.imul(be,We)|0,d=d+Math.imul(_e,Ze)|0,O=O+Math.imul(_e,We)|0,b=b+Math.imul(Ee,Ye)|0,d=d+Math.imul(Ee,$e)|0,d=d+Math.imul(ye,Ye)|0,O=O+Math.imul(ye,$e)|0,b=b+Math.imul(ge,Xe)|0,d=d+Math.imul(ge,Je)|0,d=d+Math.imul(ve,Xe)|0,O=O+Math.imul(ve,Je)|0,b=b+Math.imul(ue,Qe)|0,d=d+Math.imul(ue,et)|0,d=d+Math.imul(le,Qe)|0,O=O+Math.imul(le,et)|0,b=b+Math.imul($,tt)|0,d=d+Math.imul($,rt)|0,d=d+Math.imul(te,tt)|0,O=O+Math.imul(te,rt)|0,b=b+Math.imul(pe,it)|0,d=d+Math.imul(pe,nt)|0,d=d+Math.imul(q,it)|0,O=O+Math.imul(q,nt)|0;var su=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(su>>>26)|0,su&=67108863,b=Math.imul(De,Ve),d=Math.imul(De,Ge),d=d+Math.imul(qe,Ve)|0,O=Math.imul(qe,Ge),b=b+Math.imul(Ce,Ze)|0,d=d+Math.imul(Ce,We)|0,d=d+Math.imul(Re,Ze)|0,O=O+Math.imul(Re,We)|0,b=b+Math.imul(be,Ye)|0,d=d+Math.imul(be,$e)|0,d=d+Math.imul(_e,Ye)|0,O=O+Math.imul(_e,$e)|0,b=b+Math.imul(Ee,Xe)|0,d=d+Math.imul(Ee,Je)|0,d=d+Math.imul(ye,Xe)|0,O=O+Math.imul(ye,Je)|0,b=b+Math.imul(ge,Qe)|0,d=d+Math.imul(ge,et)|0,d=d+Math.imul(ve,Qe)|0,O=O+Math.imul(ve,et)|0,b=b+Math.imul(ue,tt)|0,d=d+Math.imul(ue,rt)|0,d=d+Math.imul(le,tt)|0,O=O+Math.imul(le,rt)|0,b=b+Math.imul($,it)|0,d=d+Math.imul($,nt)|0,d=d+Math.imul(te,it)|0,O=O+Math.imul(te,nt)|0;var uu=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(uu>>>26)|0,uu&=67108863,b=Math.imul(De,Ze),d=Math.imul(De,We),d=d+Math.imul(qe,Ze)|0,O=Math.imul(qe,We),b=b+Math.imul(Ce,Ye)|0,d=d+Math.imul(Ce,$e)|0,d=d+Math.imul(Re,Ye)|0,O=O+Math.imul(Re,$e)|0,b=b+Math.imul(be,Xe)|0,d=d+Math.imul(be,Je)|0,d=d+Math.imul(_e,Xe)|0,O=O+Math.imul(_e,Je)|0,b=b+Math.imul(Ee,Qe)|0,d=d+Math.imul(Ee,et)|0,d=d+Math.imul(ye,Qe)|0,O=O+Math.imul(ye,et)|0,b=b+Math.imul(ge,tt)|0,d=d+Math.imul(ge,rt)|0,d=d+Math.imul(ve,tt)|0,O=O+Math.imul(ve,rt)|0,b=b+Math.imul(ue,it)|0,d=d+Math.imul(ue,nt)|0,d=d+Math.imul(le,it)|0,O=O+Math.imul(le,nt)|0;var fu=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(fu>>>26)|0,fu&=67108863,b=Math.imul(De,Ye),d=Math.imul(De,$e),d=d+Math.imul(qe,Ye)|0,O=Math.imul(qe,$e),b=b+Math.imul(Ce,Xe)|0,d=d+Math.imul(Ce,Je)|0,d=d+Math.imul(Re,Xe)|0,O=O+Math.imul(Re,Je)|0,b=b+Math.imul(be,Qe)|0,d=d+Math.imul(be,et)|0,d=d+Math.imul(_e,Qe)|0,O=O+Math.imul(_e,et)|0,b=b+Math.imul(Ee,tt)|0,d=d+Math.imul(Ee,rt)|0,d=d+Math.imul(ye,tt)|0,O=O+Math.imul(ye,rt)|0,b=b+Math.imul(ge,it)|0,d=d+Math.imul(ge,nt)|0,d=d+Math.imul(ve,it)|0,O=O+Math.imul(ve,nt)|0;var cu=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(cu>>>26)|0,cu&=67108863,b=Math.imul(De,Xe),d=Math.imul(De,Je),d=d+Math.imul(qe,Xe)|0,O=Math.imul(qe,Je),b=b+Math.imul(Ce,Qe)|0,d=d+Math.imul(Ce,et)|0,d=d+Math.imul(Re,Qe)|0,O=O+Math.imul(Re,et)|0,b=b+Math.imul(be,tt)|0,d=d+Math.imul(be,rt)|0,d=d+Math.imul(_e,tt)|0,O=O+Math.imul(_e,rt)|0,b=b+Math.imul(Ee,it)|0,d=d+Math.imul(Ee,nt)|0,d=d+Math.imul(ye,it)|0,O=O+Math.imul(ye,nt)|0;var lu=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(lu>>>26)|0,lu&=67108863,b=Math.imul(De,Qe),d=Math.imul(De,et),d=d+Math.imul(qe,Qe)|0,O=Math.imul(qe,et),b=b+Math.imul(Ce,tt)|0,d=d+Math.imul(Ce,rt)|0,d=d+Math.imul(Re,tt)|0,O=O+Math.imul(Re,rt)|0,b=b+Math.imul(be,it)|0,d=d+Math.imul(be,nt)|0,d=d+Math.imul(_e,it)|0,O=O+Math.imul(_e,nt)|0;var hu=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(hu>>>26)|0,hu&=67108863,b=Math.imul(De,tt),d=Math.imul(De,rt),d=d+Math.imul(qe,tt)|0,O=Math.imul(qe,rt),b=b+Math.imul(Ce,it)|0,d=d+Math.imul(Ce,nt)|0,d=d+Math.imul(Re,it)|0,O=O+Math.imul(Re,nt)|0;var du=(x+b|0)+((d&8191)<<13)|0;x=(O+(d>>>13)|0)+(du>>>26)|0,du&=67108863,b=Math.imul(De,it),d=Math.imul(De,nt),d=d+Math.imul(qe,it)|0,O=Math.imul(qe,nt);var pu=(x+b|0)+((d&8191)<<13)|0;return x=(O+(d>>>13)|0)+(pu>>>26)|0,pu&=67108863,_[0]=Gf,_[1]=Jt,_[2]=Qt,_[3]=Qs,_[4]=eu,_[5]=tu,_[6]=ru,_[7]=iu,_[8]=nu,_[9]=ou,_[10]=au,_[11]=su,_[12]=uu,_[13]=fu,_[14]=cu,_[15]=lu,_[16]=hu,_[17]=du,_[18]=pu,x!==0&&(_[19]=x,y.length++),y};Math.imul||(P=E);function M(B,g,I){I.negative=g.negative^B.negative,I.length=B.length+g.length;for(var y=0,f=0,p=0;p<I.length-1;p++){var _=f;f=0;for(var x=y&67108863,b=Math.min(p,g.length-1),d=Math.max(0,p-B.length+1);d<=b;d++){var O=p-d,T=B.words[O]|0,S=g.words[d]|0,R=T*S,Y=R&67108863;_=_+(R/67108864|0)|0,Y=Y+x|0,x=Y&67108863,_=_+(Y>>>26)|0,f+=_>>>26,_&=67108863}I.words[p]=x,y=_,_=f}return y!==0?I.words[p]=y:I.length--,I.strip()}function D(B,g,I){var y=new L;return y.mulp(B,g,I)}n.prototype.mulTo=function(g,I){var y,f=this.length+g.length;return this.length===10&&g.length===10?y=P(this,g,I):f<63?y=E(this,g,I):f<1024?y=M(this,g,I):y=D(this,g,I),y};function L(B,g){this.x=B,this.y=g}L.prototype.makeRBT=function(g){for(var I=new Array(g),y=n.prototype._countBits(g)-1,f=0;f<g;f++)I[f]=this.revBin(f,y,g);return I},L.prototype.revBin=function(g,I,y){if(g===0||g===y-1)return g;for(var f=0,p=0;p<I;p++)f|=(g&1)<<I-p-1,g>>=1;return f},L.prototype.permute=function(g,I,y,f,p,_){for(var x=0;x<_;x++)f[x]=I[g[x]],p[x]=y[g[x]]},L.prototype.transform=function(g,I,y,f,p,_){this.permute(_,g,I,y,f,p);for(var x=1;x<p;x<<=1)for(var b=x<<1,d=Math.cos(2*Math.PI/b),O=Math.sin(2*Math.PI/b),T=0;T<p;T+=b)for(var S=d,R=O,Y=0;Y<x;Y++){var X=y[T+Y],ne=f[T+Y],ce=y[T+Y+x],pe=f[T+Y+x],q=S*ce-R*pe;pe=S*pe+R*ce,ce=q,y[T+Y]=X+ce,f[T+Y]=ne+pe,y[T+Y+x]=X-ce,f[T+Y+x]=ne-pe,Y!==b&&(q=d*S-O*R,R=d*R+O*S,S=q)}},L.prototype.guessLen13b=function(g,I){var y=Math.max(I,g)|1,f=y&1,p=0;for(y=y/2|0;y;y=y>>>1)p++;return 1<<p+1+f},L.prototype.conjugate=function(g,I,y){if(!(y<=1))for(var f=0;f<y/2;f++){var p=g[f];g[f]=g[y-f-1],g[y-f-1]=p,p=I[f],I[f]=-I[y-f-1],I[y-f-1]=-p}},L.prototype.normalize13b=function(g,I){for(var y=0,f=0;f<I/2;f++){var p=Math.round(g[2*f+1]/I)*8192+Math.round(g[2*f]/I)+y;g[f]=p&67108863,p<67108864?y=0:y=p/67108864|0}return g},L.prototype.convert13b=function(g,I,y,f){for(var p=0,_=0;_<I;_++)p=p+(g[_]|0),y[2*_]=p&8191,p=p>>>13,y[2*_+1]=p&8191,p=p>>>13;for(_=2*I;_<f;++_)y[_]=0;r(p===0),r((p&-8192)===0)},L.prototype.stub=function(g){for(var I=new Array(g),y=0;y<g;y++)I[y]=0;return I},L.prototype.mulp=function(g,I,y){var f=2*this.guessLen13b(g.length,I.length),p=this.makeRBT(f),_=this.stub(f),x=new Array(f),b=new Array(f),d=new Array(f),O=new Array(f),T=new Array(f),S=new Array(f),R=y.words;R.length=f,this.convert13b(g.words,g.length,x,f),this.convert13b(I.words,I.length,O,f),this.transform(x,_,b,d,f,p),this.transform(O,_,T,S,f,p);for(var Y=0;Y<f;Y++){var X=b[Y]*T[Y]-d[Y]*S[Y];d[Y]=b[Y]*S[Y]+d[Y]*T[Y],b[Y]=X}return this.conjugate(b,d,f),this.transform(b,d,R,_,f,p),this.conjugate(R,_,f),this.normalize13b(R,f),y.negative=g.negative^I.negative,y.length=g.length+I.length,y.strip()},n.prototype.mul=function(g){var I=new n(null);return I.words=new Array(this.length+g.length),this.mulTo(g,I)},n.prototype.mulf=function(g){var I=new n(null);return I.words=new Array(this.length+g.length),D(this,g,I)},n.prototype.imul=function(g){return this.clone().mulTo(g,this)},n.prototype.imuln=function(g){r(typeof g=="number"),r(g<67108864);for(var I=0,y=0;y<this.length;y++){var f=(this.words[y]|0)*g,p=(f&67108863)+(I&67108863);I>>=26,I+=f/67108864|0,I+=p>>>26,this.words[y]=p&67108863}return I!==0&&(this.words[y]=I,this.length++),g===0&&(this.length=1,this._normSign()),this},n.prototype.muln=function(g){return this.clone().imuln(g)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(g){var I=w(g);if(I.length===0)return new n(1);for(var y=this,f=0;f<I.length&&I[f]===0;f++,y=y.sqr());if(++f<I.length)for(var p=y.sqr();f<I.length;f++,p=p.sqr())I[f]!==0&&(y=y.mul(p));return y},n.prototype.iushln=function(g){r(typeof g=="number"&&g>=0);var I=g%26,y=(g-I)/26,f=67108863>>>26-I<<26-I,p;if(I!==0){var _=0;for(p=0;p<this.length;p++){var x=this.words[p]&f,b=(this.words[p]|0)-x<<I;this.words[p]=b|_,_=x>>>26-I}_&&(this.words[p]=_,this.length++)}if(y!==0){for(p=this.length-1;p>=0;p--)this.words[p+y]=this.words[p];for(p=0;p<y;p++)this.words[p]=0;this.length+=y}return this.strip()},n.prototype.ishln=function(g){return r(this.negative===0),this.iushln(g)},n.prototype.iushrn=function(g,I,y){r(typeof g=="number"&&g>=0);var f;I?f=(I-I%26)/26:f=0;var p=g%26,_=Math.min((g-p)/26,this.length),x=67108863^67108863>>>p<<p,b=y;if(f-=_,f=Math.max(0,f),b){for(var d=0;d<_;d++)b.words[d]=this.words[d];b.length=_}if(_!==0)if(this.length>_)for(this.length-=_,d=0;d<this.length;d++)this.words[d]=this.words[d+_];else this.words[0]=0,this.length=1;var O=0;for(d=this.length-1;d>=0&&(O!==0||d>=f);d--){var T=this.words[d]|0;this.words[d]=O<<26-p|T>>>p,O=T&x}return b&&O!==0&&(b.words[b.length++]=O),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(g,I,y){return r(this.negative===0),this.iushrn(g,I,y)},n.prototype.shln=function(g){return this.clone().ishln(g)},n.prototype.ushln=function(g){return this.clone().iushln(g)},n.prototype.shrn=function(g){return this.clone().ishrn(g)},n.prototype.ushrn=function(g){return this.clone().iushrn(g)},n.prototype.testn=function(g){r(typeof g=="number"&&g>=0);var I=g%26,y=(g-I)/26,f=1<<I;if(this.length<=y)return!1;var p=this.words[y];return!!(p&f)},n.prototype.imaskn=function(g){r(typeof g=="number"&&g>=0);var I=g%26,y=(g-I)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=y)return this;if(I!==0&&y++,this.length=Math.min(y,this.length),I!==0){var f=67108863^67108863>>>I<<I;this.words[this.length-1]&=f}return this.length===0&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.maskn=function(g){return this.clone().imaskn(g)},n.prototype.iaddn=function(g){return r(typeof g=="number"),r(g<67108864),g<0?this.isubn(-g):this.negative!==0?this.length===1&&(this.words[0]|0)<g?(this.words[0]=g-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(g),this.negative=1,this):this._iaddn(g)},n.prototype._iaddn=function(g){this.words[0]+=g;for(var I=0;I<this.length&&this.words[I]>=67108864;I++)this.words[I]-=67108864,I===this.length-1?this.words[I+1]=1:this.words[I+1]++;return this.length=Math.max(this.length,I+1),this},n.prototype.isubn=function(g){if(r(typeof g=="number"),r(g<67108864),g<0)return this.iaddn(-g);if(this.negative!==0)return this.negative=0,this.iaddn(g),this.negative=1,this;if(this.words[0]-=g,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var I=0;I<this.length&&this.words[I]<0;I++)this.words[I]+=67108864,this.words[I+1]-=1;return this.strip()},n.prototype.addn=function(g){return this.clone().iaddn(g)},n.prototype.subn=function(g){return this.clone().isubn(g)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(g,I,y){var f=g.length+y,p;this._expand(f);var _,x=0;for(p=0;p<g.length;p++){_=(this.words[p+y]|0)+x;var b=(g.words[p]|0)*I;_-=b&67108863,x=(_>>26)-(b/67108864|0),this.words[p+y]=_&67108863}for(;p<this.length-y;p++)_=(this.words[p+y]|0)+x,x=_>>26,this.words[p+y]=_&67108863;if(x===0)return this.strip();for(r(x===-1),x=0,p=0;p<this.length;p++)_=-(this.words[p]|0)+x,x=_>>26,this.words[p]=_&67108863;return this.negative=1,this.strip()},n.prototype._wordDiv=function(g,I){var y=this.length-g.length,f=this.clone(),p=g,_=p.words[p.length-1]|0,x=this._countBits(_);y=26-x,y!==0&&(p=p.ushln(y),f.iushln(y),_=p.words[p.length-1]|0);var b=f.length-p.length,d;if(I!=="mod"){d=new n(null),d.length=b+1,d.words=new Array(d.length);for(var O=0;O<d.length;O++)d.words[O]=0}var T=f.clone()._ishlnsubmul(p,1,b);T.negative===0&&(f=T,d&&(d.words[b]=1));for(var S=b-1;S>=0;S--){var R=(f.words[p.length+S]|0)*67108864+(f.words[p.length+S-1]|0);for(R=Math.min(R/_|0,67108863),f._ishlnsubmul(p,R,S);f.negative!==0;)R--,f.negative=0,f._ishlnsubmul(p,1,S),f.isZero()||(f.negative^=1);d&&(d.words[S]=R)}return d&&d.strip(),f.strip(),I!=="div"&&y!==0&&f.iushrn(y),{div:d||null,mod:f}},n.prototype.divmod=function(g,I,y){if(r(!g.isZero()),this.isZero())return{div:new n(0),mod:new n(0)};var f,p,_;return this.negative!==0&&g.negative===0?(_=this.neg().divmod(g,I),I!=="mod"&&(f=_.div.neg()),I!=="div"&&(p=_.mod.neg(),y&&p.negative!==0&&p.iadd(g)),{div:f,mod:p}):this.negative===0&&g.negative!==0?(_=this.divmod(g.neg(),I),I!=="mod"&&(f=_.div.neg()),{div:f,mod:_.mod}):(this.negative&g.negative)!==0?(_=this.neg().divmod(g.neg(),I),I!=="div"&&(p=_.mod.neg(),y&&p.negative!==0&&p.isub(g)),{div:_.div,mod:p}):g.length>this.length||this.cmp(g)<0?{div:new n(0),mod:this}:g.length===1?I==="div"?{div:this.divn(g.words[0]),mod:null}:I==="mod"?{div:null,mod:new n(this.modn(g.words[0]))}:{div:this.divn(g.words[0]),mod:new n(this.modn(g.words[0]))}:this._wordDiv(g,I)},n.prototype.div=function(g){return this.divmod(g,"div",!1).div},n.prototype.mod=function(g){return this.divmod(g,"mod",!1).mod},n.prototype.umod=function(g){return this.divmod(g,"mod",!0).mod},n.prototype.divRound=function(g){var I=this.divmod(g);if(I.mod.isZero())return I.div;var y=I.mod.abs(),f=g.abs().iushrn(1),p=g.words[0]&1,_=y.cmp(f);if(_<0||p===1&&_===0)return I.div;var x=new n(1);return x.negative=this.negative^g.negative,I.div.iadd(x)},n.prototype.modn=function(g){r(g<=67108863);for(var I=(1<<26)%g,y=0,f=this.length-1;f>=0;f--)y=(I*y+(this.words[f]|0))%g;return y},n.prototype.idivn=function(g){r(g<=67108863);for(var I=0,y=this.length-1;y>=0;y--){var f=(this.words[y]|0)+I*67108864;this.words[y]=f/g|0,I=f%g}return this.strip()},n.prototype.divn=function(g){return this.clone().idivn(g)},n.prototype.egcd=function(g){r(g.negative===0),r(!g.isZero());var I=this,y=g.clone();I.negative!==0?I=I.umod(g):I=I.clone();for(var f=new n(1),p=new n(0),_=new n(0),x=new n(1),b=0;I.isEven()&&y.isEven();)I.iushrn(1),y.iushrn(1),++b;for(var d=y.clone(),O=I.clone();!I.isZero();){for(var T=0,S=1;(I.words[0]&S)===0&&T<26;++T,S<<=1);if(T>0)for(I.iushrn(T);T-- >0;)(f.isOdd()||p.isOdd())&&(f.iadd(d),p.isub(O)),f.iushrn(1),p.iushrn(1);for(var R=0,Y=1;(y.words[0]&Y)===0&&R<26;++R,Y<<=1);if(R>0)for(y.iushrn(R);R-- >0;)(_.isOdd()||x.isOdd())&&(_.iadd(d),x.isub(O)),_.iushrn(1),x.iushrn(1);I.cmp(y)>=0?(I.isub(y),f.isub(_),p.isub(x)):(y.isub(I),_.isub(f),x.isub(p))}return{a:_,b:x,gcd:y.iushln(b)}},n.prototype._invmp=function(g){r(g.negative===0),r(!g.isZero());var I=this,y=g.clone();I.negative!==0?I=I.umod(g):I=I.clone();for(var f=new n(1),p=new n(0),_=y.clone();I.cmpn(1)>0&&y.cmpn(1)>0;){for(var x=0,b=1;(I.words[0]&b)===0&&x<26;++x,b<<=1);if(x>0)for(I.iushrn(x);x-- >0;)f.isOdd()&&f.iadd(_),f.iushrn(1);for(var d=0,O=1;(y.words[0]&O)===0&&d<26;++d,O<<=1);if(d>0)for(y.iushrn(d);d-- >0;)p.isOdd()&&p.iadd(_),p.iushrn(1);I.cmp(y)>=0?(I.isub(y),f.isub(p)):(y.isub(I),p.isub(f))}var T;return I.cmpn(1)===0?T=f:T=p,T.cmpn(0)<0&&T.iadd(g),T},n.prototype.gcd=function(g){if(this.isZero())return g.abs();if(g.isZero())return this.abs();var I=this.clone(),y=g.clone();I.negative=0,y.negative=0;for(var f=0;I.isEven()&&y.isEven();f++)I.iushrn(1),y.iushrn(1);do{for(;I.isEven();)I.iushrn(1);for(;y.isEven();)y.iushrn(1);var p=I.cmp(y);if(p<0){var _=I;I=y,y=_}else if(p===0||y.cmpn(1)===0)break;I.isub(y)}while(!0);return y.iushln(f)},n.prototype.invm=function(g){return this.egcd(g).a.umod(g)},n.prototype.isEven=function(){return(this.words[0]&1)===0},n.prototype.isOdd=function(){return(this.words[0]&1)===1},n.prototype.andln=function(g){return this.words[0]&g},n.prototype.bincn=function(g){r(typeof g=="number");var I=g%26,y=(g-I)/26,f=1<<I;if(this.length<=y)return this._expand(y+1),this.words[y]|=f,this;for(var p=f,_=y;p!==0&&_<this.length;_++){var x=this.words[_]|0;x+=p,p=x>>>26,x&=67108863,this.words[_]=x}return p!==0&&(this.words[_]=p,this.length++),this},n.prototype.isZero=function(){return this.length===1&&this.words[0]===0},n.prototype.cmpn=function(g){var I=g<0;if(this.negative!==0&&!I)return-1;if(this.negative===0&&I)return 1;this.strip();var y;if(this.length>1)y=1;else{I&&(g=-g),r(g<=67108863,"Number is too big");var f=this.words[0]|0;y=f===g?0:f<g?-1:1}return this.negative!==0?-y|0:y},n.prototype.cmp=function(g){if(this.negative!==0&&g.negative===0)return-1;if(this.negative===0&&g.negative!==0)return 1;var I=this.ucmp(g);return this.negative!==0?-I|0:I},n.prototype.ucmp=function(g){if(this.length>g.length)return 1;if(this.length<g.length)return-1;for(var I=0,y=this.length-1;y>=0;y--){var f=this.words[y]|0,p=g.words[y]|0;if(f!==p){f<p?I=-1:f>p&&(I=1);break}}return I},n.prototype.gtn=function(g){return this.cmpn(g)===1},n.prototype.gt=function(g){return this.cmp(g)===1},n.prototype.gten=function(g){return this.cmpn(g)>=0},n.prototype.gte=function(g){return this.cmp(g)>=0},n.prototype.ltn=function(g){return this.cmpn(g)===-1},n.prototype.lt=function(g){return this.cmp(g)===-1},n.prototype.lten=function(g){return this.cmpn(g)<=0},n.prototype.lte=function(g){return this.cmp(g)<=0},n.prototype.eqn=function(g){return this.cmpn(g)===0},n.prototype.eq=function(g){return this.cmp(g)===0},n.red=function(g){return new z(g)},n.prototype.toRed=function(g){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),g.convertTo(this)._forceRed(g)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(g){return this.red=g,this},n.prototype.forceRed=function(g){return r(!this.red,"Already a number in reduction context"),this._forceRed(g)},n.prototype.redAdd=function(g){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,g)},n.prototype.redIAdd=function(g){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,g)},n.prototype.redSub=function(g){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,g)},n.prototype.redISub=function(g){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,g)},n.prototype.redShl=function(g){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,g)},n.prototype.redMul=function(g){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,g),this.red.mul(this,g)},n.prototype.redIMul=function(g){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,g),this.red.imul(this,g)},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(g){return r(this.red&&!g.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,g)};var U={k256:null,p224:null,p192:null,p25519:null};function K(B,g){this.name=B,this.p=new n(g,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}K.prototype._tmp=function(){var g=new n(null);return g.words=new Array(Math.ceil(this.n/13)),g},K.prototype.ireduce=function(g){var I=g,y;do this.split(I,this.tmp),I=this.imulK(I),I=I.iadd(this.tmp),y=I.bitLength();while(y>this.n);var f=y<this.n?-1:I.ucmp(this.p);return f===0?(I.words[0]=0,I.length=1):f>0?I.isub(this.p):I.strip!==void 0?I.strip():I._strip(),I},K.prototype.split=function(g,I){g.iushrn(this.n,0,I)},K.prototype.imulK=function(g){return g.imul(this.k)};function C(){K.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(C,K),C.prototype.split=function(g,I){for(var y=4194303,f=Math.min(g.length,9),p=0;p<f;p++)I.words[p]=g.words[p];if(I.length=f,g.length<=9){g.words[0]=0,g.length=1;return}var _=g.words[9];for(I.words[I.length++]=_&y,p=10;p<g.length;p++){var x=g.words[p]|0;g.words[p-10]=(x&y)<<4|_>>>22,_=x}_>>>=22,g.words[p-10]=_,_===0&&g.length>10?g.length-=10:g.length-=9},C.prototype.imulK=function(g){g.words[g.length]=0,g.words[g.length+1]=0,g.length+=2;for(var I=0,y=0;y<g.length;y++){var f=g.words[y]|0;I+=f*977,g.words[y]=I&67108863,I=f*64+(I/67108864|0)}return g.words[g.length-1]===0&&(g.length--,g.words[g.length-1]===0&&g.length--),g};function N(){K.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(N,K);function F(){K.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(F,K);function H(){K.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(H,K),H.prototype.imulK=function(g){for(var I=0,y=0;y<g.length;y++){var f=(g.words[y]|0)*19+I,p=f&67108863;f>>>=26,g.words[y]=p,I=f}return I!==0&&(g.words[g.length++]=I),g},n._prime=function(g){if(U[g])return U[g];var I;if(g==="k256")I=new C;else if(g==="p224")I=new N;else if(g==="p192")I=new F;else if(g==="p25519")I=new H;else throw new Error("Unknown prime "+g);return U[g]=I,I};function z(B){if(typeof B=="string"){var g=n._prime(B);this.m=g.p,this.prime=g}else r(B.gtn(1),"modulus must be greater than 1"),this.m=B,this.prime=null}z.prototype._verify1=function(g){r(g.negative===0,"red works only with positives"),r(g.red,"red works only with red numbers")},z.prototype._verify2=function(g,I){r((g.negative|I.negative)===0,"red works only with positives"),r(g.red&&g.red===I.red,"red works only with red numbers")},z.prototype.imod=function(g){return this.prime?this.prime.ireduce(g)._forceRed(this):g.umod(this.m)._forceRed(this)},z.prototype.neg=function(g){return g.isZero()?g.clone():this.m.sub(g)._forceRed(this)},z.prototype.add=function(g,I){this._verify2(g,I);var y=g.add(I);return y.cmp(this.m)>=0&&y.isub(this.m),y._forceRed(this)},z.prototype.iadd=function(g,I){this._verify2(g,I);var y=g.iadd(I);return y.cmp(this.m)>=0&&y.isub(this.m),y},z.prototype.sub=function(g,I){this._verify2(g,I);var y=g.sub(I);return y.cmpn(0)<0&&y.iadd(this.m),y._forceRed(this)},z.prototype.isub=function(g,I){this._verify2(g,I);var y=g.isub(I);return y.cmpn(0)<0&&y.iadd(this.m),y},z.prototype.shl=function(g,I){return this._verify1(g),this.imod(g.ushln(I))},z.prototype.imul=function(g,I){return this._verify2(g,I),this.imod(g.imul(I))},z.prototype.mul=function(g,I){return this._verify2(g,I),this.imod(g.mul(I))},z.prototype.isqr=function(g){return this.imul(g,g.clone())},z.prototype.sqr=function(g){return this.mul(g,g)},z.prototype.sqrt=function(g){if(g.isZero())return g.clone();var I=this.m.andln(3);if(r(I%2===1),I===3){var y=this.m.add(new n(1)).iushrn(2);return this.pow(g,y)}for(var f=this.m.subn(1),p=0;!f.isZero()&&f.andln(1)===0;)p++,f.iushrn(1);r(!f.isZero());var _=new n(1).toRed(this),x=_.redNeg(),b=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new n(2*d*d).toRed(this);this.pow(d,b).cmp(x)!==0;)d.redIAdd(x);for(var O=this.pow(d,f),T=this.pow(g,f.addn(1).iushrn(1)),S=this.pow(g,f),R=p;S.cmp(_)!==0;){for(var Y=S,X=0;Y.cmp(_)!==0;X++)Y=Y.redSqr();r(X<R);var ne=this.pow(O,new n(1).iushln(R-X-1));T=T.redMul(ne),O=ne.redSqr(),S=S.redMul(O),R=X}return T},z.prototype.invm=function(g){var I=g._invmp(this.m);return I.negative!==0?(I.negative=0,this.imod(I).redNeg()):this.imod(I)},z.prototype.pow=function(g,I){if(I.isZero())return new n(1).toRed(this);if(I.cmpn(1)===0)return g.clone();var y=4,f=new Array(1<<y);f[0]=new n(1).toRed(this),f[1]=g;for(var p=2;p<f.length;p++)f[p]=this.mul(f[p-1],g);var _=f[0],x=0,b=0,d=I.bitLength()%26;for(d===0&&(d=26),p=I.length-1;p>=0;p--){for(var O=I.words[p],T=d-1;T>=0;T--){var S=O>>T&1;if(_!==f[0]&&(_=this.sqr(_)),S===0&&x===0){b=0;continue}x<<=1,x|=S,b++,!(b!==y&&(p!==0||T!==0))&&(_=this.mul(_,f[x]),b=0,x=0)}d=26}return _},z.prototype.convertTo=function(g){var I=g.umod(this.m);return I===g?I.clone():I},z.prototype.convertFrom=function(g){var I=g.clone();return I.red=null,I},n.mont=function(g){return new G(g)};function G(B){z.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(G,z),G.prototype.convertTo=function(g){return this.imod(g.ushln(this.shift))},G.prototype.convertFrom=function(g){var I=this.imod(g.mul(this.rinv));return I.red=null,I},G.prototype.imul=function(g,I){if(g.isZero()||I.isZero())return g.words[0]=0,g.length=1,g;var y=g.imul(I),f=y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),p=y.isub(f).iushrn(this.shift),_=p;return p.cmp(this.m)>=0?_=p.isub(this.m):p.cmpn(0)<0&&(_=p.iadd(this.m)),_._forceRed(this)},G.prototype.mul=function(g,I){if(g.isZero()||I.isZero())return new n(0)._forceRed(this);var y=g.mul(I),f=y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),p=y.isub(f).iushrn(this.shift),_=p;return p.cmp(this.m)>=0?_=p.isub(this.m):p.cmpn(0)<0&&(_=p.iadd(this.m)),_._forceRed(this)},G.prototype.invm=function(g){var I=this.imod(g._invmp(this.m).mul(this.r2));return I._forceRed(this)}})(typeof rm>"u"||rm,EE)});var IE=k((x0e,om)=>{v();var im;om.exports=function(t){return im||(im=new hs(null)),im.generate(t)};function hs(e){this.rand=e}om.exports.Rand=hs;hs.prototype.generate=function(t){return this._rand(t)};hs.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var r=new Uint8Array(t),i=0;i<r.length;i++)r[i]=this.rand.getByte();return r};if(typeof self=="object")self.crypto&&self.crypto.getRandomValues?hs.prototype._rand=function(t){var r=new Uint8Array(t);return self.crypto.getRandomValues(r),r}:self.msCrypto&&self.msCrypto.getRandomValues?hs.prototype._rand=function(t){var r=new Uint8Array(t);return self.msCrypto.getRandomValues(r),r}:typeof window=="object"&&(hs.prototype._rand=function(){throw new Error("Not implemented yet")});else try{if(nm=_r(),typeof nm.randomBytes!="function")throw new Error("Not supported");hs.prototype._rand=function(t){return nm.randomBytes(t)}}catch{}var nm});var am=k((I0e,OE)=>{v();var Hu=Cn(),EW=IE();function ju(e){this.rand=e||new EW.Rand}OE.exports=ju;ju.create=function(t){return new ju(t)};ju.prototype._randbelow=function(t){var r=t.bitLength(),i=Math.ceil(r/8);do var n=new Hu(this.rand.generate(i));while(n.cmp(t)>=0);return n};ju.prototype._randrange=function(t,r){var i=r.sub(t);return t.add(this._randbelow(i))};ju.prototype.test=function(t,r,i){var n=t.bitLength(),o=Hu.mont(t),a=new Hu(1).toRed(o);r||(r=Math.max(1,n/48|0));for(var s=t.subn(1),u=0;!s.testn(u);u++);for(var c=t.shrn(u),l=s.toRed(o),m=!0;r>0;r--){var w=this._randrange(new Hu(2),s);i&&i(w);var E=w.toRed(o).redPow(c);if(!(E.cmp(a)===0||E.cmp(l)===0)){for(var P=1;P<u;P++){if(E=E.redSqr(),E.cmp(a)===0)return!1;if(E.cmp(l)===0)break}if(P===u)return!1}}return m};ju.prototype.getDivisor=function(t,r){var i=t.bitLength(),n=Hu.mont(t),o=new Hu(1).toRed(n);r||(r=Math.max(1,i/48|0));for(var a=t.subn(1),s=0;!a.testn(s);s++);for(var u=t.shrn(s),c=a.toRed(n);r>0;r--){var l=this._randrange(new Hu(2),a),m=t.gcd(l);if(m.cmpn(1)!==0)return m;var w=l.toRed(n).redPow(u);if(!(w.cmp(o)===0||w.cmp(c)===0)){for(var E=1;E<s;E++){if(w=w.redSqr(),w.cmp(o)===0)return w.fromRed().subn(1).gcd(t);if(w.cmp(c)===0)break}if(E===s)return w=w.redSqr(),w.fromRed().subn(1).gcd(t)}}return!1}});var hm=k((R0e,TE)=>{v();var IW=bu();TE.exports=lm;lm.simpleSieve=fm;lm.fermatTest=cm;var Jr=Cn(),OW=new Jr(24),AW=am(),AE=new AW,PW=new Jr(1),um=new Jr(2),TW=new Jr(5),A0e=new Jr(16),P0e=new Jr(8),kW=new Jr(10),RW=new Jr(3),T0e=new Jr(7),BW=new Jr(11),PE=new Jr(4),k0e=new Jr(12),sm=null;function MW(){if(sm!==null)return sm;var e=1048576,t=[];t[0]=2;for(var r=1,i=3;i<e;i+=2){for(var n=Math.ceil(Math.sqrt(i)),o=0;o<r&&t[o]<=n&&i%t[o]!==0;o++);r!==o&&t[o]<=n||(t[r++]=i)}return sm=t,t}function fm(e){for(var t=MW(),r=0;r<t.length;r++)if(e.modn(t[r])===0)return e.cmpn(t[r])===0;return!0}function cm(e){var t=Jr.mont(e);return um.toRed(t).redPow(e.subn(1)).fromRed().cmpn(1)===0}function lm(e,t){if(e<16)return t===2||t===5?new Jr([140,123]):new Jr([140,39]);t=new Jr(t);for(var r,i;;){for(r=new Jr(IW(Math.ceil(e/8)));r.bitLength()>e;)r.ishrn(1);if(r.isEven()&&r.iadd(PW),r.testn(1)||r.iadd(um),t.cmp(um)){if(!t.cmp(TW))for(;r.mod(kW).cmp(RW);)r.iadd(PE)}else for(;r.mod(OW).cmp(BW);)r.iadd(PE);if(i=r.shrn(1),fm(i)&&fm(r)&&cm(i)&&cm(r)&&AE.test(i)&&AE.test(r))return r}}});var kE=k((M0e,CW)=>{CW.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 CE=k((C0e,ME)=>{v();var fn=Cn(),NW=am(),RE=new NW,DW=new fn(24),LW=new fn(11),qW=new fn(10),UW=new fn(3),FW=new fn(7),BE=hm(),HW=bu();ME.exports=wa;function jW(e,t){return t=t||"utf8",h.Buffer.isBuffer(e)||(e=new h.Buffer(e,t)),this._pub=new fn(e),this}function zW(e,t){return t=t||"utf8",h.Buffer.isBuffer(e)||(e=new h.Buffer(e,t)),this._priv=new fn(e),this}var L2={};function KW(e,t){var r=t.toString("hex"),i=[r,e.toString(16)].join("_");if(i in L2)return L2[i];var n=0;if(e.isEven()||!BE.simpleSieve||!BE.fermatTest(e)||!RE.test(e))return n+=1,r==="02"||r==="05"?n+=8:n+=4,L2[i]=n,n;RE.test(e.shrn(1))||(n+=2);var o;switch(r){case"02":e.mod(DW).cmp(LW)&&(n+=8);break;case"05":o=e.mod(qW),o.cmp(UW)&&o.cmp(FW)&&(n+=8);break;default:n+=4}return L2[i]=n,n}function wa(e,t,r){this.setGenerator(t),this.__prime=new fn(e),this._prime=fn.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=jW,this.setPrivateKey=zW):this._primeCode=8}Object.defineProperty(wa.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=KW(this.__prime,this.__gen)),this._primeCode}});wa.prototype.generateKeys=function(){return this._priv||(this._priv=new fn(HW(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()};wa.prototype.computeSecret=function(e){e=new fn(e),e=e.toRed(this._prime);var t=e.redPow(this._priv).fromRed(),r=new h.Buffer(t.toArray()),i=this.getPrime();if(r.length<i.length){var n=new h.Buffer(i.length-r.length);n.fill(0),r=h.Buffer.concat([n,r])}return r};wa.prototype.getPublicKey=function(t){return q2(this._pub,t)};wa.prototype.getPrivateKey=function(t){return q2(this._priv,t)};wa.prototype.getPrime=function(e){return q2(this.__prime,e)};wa.prototype.getGenerator=function(e){return q2(this._gen,e)};wa.prototype.setGenerator=function(e,t){return t=t||"utf8",h.Buffer.isBuffer(e)||(e=new h.Buffer(e,t)),this.__gen=e,this._gen=new fn(e),this};function q2(e,t){var r=new h.Buffer(e.toArray());return t?r.toString(t):r}});var LE=k(Ic=>{v();var VW=hm(),NE=kE(),dm=CE();function GW(e){var t=new h.Buffer(NE[e].prime,"hex"),r=new h.Buffer(NE[e].gen,"hex");return new dm(t,r)}var ZW={binary:!0,hex:!0,base64:!0};function DE(e,t,r,i){return h.Buffer.isBuffer(t)||ZW[t]===void 0?DE(e,"binary",t,r):(t=t||"binary",i=i||"binary",r=r||new h.Buffer([2]),h.Buffer.isBuffer(r)||(r=new h.Buffer(r,i)),typeof e=="number"?new dm(VW(e,r),r,!0):(h.Buffer.isBuffer(e)||(e=new h.Buffer(e,t)),new dm(e,r,!0)))}Ic.DiffieHellmanGroup=Ic.createDiffieHellmanGroup=Ic.getDiffieHellman=GW;Ic.createDiffieHellman=Ic.DiffieHellman=DE});var qE=k((exports,module)=>{v();var indexOf=function(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0;r<e.length;r++)if(e[r]===t)return r;return-1},Object_keys=function(e){if(Object.keys)return Object.keys(e);var t=[];for(var r in e)t.push(r);return t},forEach=function(e,t){if(e.forEach)return e.forEach(t);for(var r=0;r<e.length;r++)t(e[r],r,e)},defineProp=(function(){try{return Object.defineProperty({},"_",{}),function(e,t,r){Object.defineProperty(e,t,{writable:!0,enumerable:!1,configurable:!0,value:r})}}catch{return function(t,r,i){t[r]=i}}})(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];function Context(){}Context.prototype={};var Script=exports.Script=function(t){if(!(this instanceof Script))return new Script(t);this.code=t};Script.prototype.runInContext=function(e){if(!(e instanceof Context))throw new TypeError("needs a 'context' argument.");var t=document.createElement("iframe");t.style||(t.style={}),t.style.display="none",document.body.appendChild(t);var r=t.contentWindow,i=r.eval,n=r.execScript;!i&&n&&(n.call(r,"null"),i=r.eval),forEach(Object_keys(e),function(s){r[s]=e[s]}),forEach(globals,function(s){e[s]&&(r[s]=e[s])});var o=Object_keys(r),a=i.call(r,this.code);return forEach(Object_keys(r),function(s){(s in e||indexOf(o,s)===-1)&&(e[s]=r[s])}),forEach(globals,function(s){s in e||defineProp(e,s,r[s])}),document.body.removeChild(t),a};Script.prototype.runInThisContext=function(){return eval(this.code)};Script.prototype.runInNewContext=function(e){var t=Script.createContext(e),r=this.runInContext(t);return e&&forEach(Object_keys(t),function(i){e[i]=t[i]}),r};forEach(Object_keys(Script.prototype),function(e){exports[e]=Script[e]=function(t){var r=Script(t);return r[e].apply(r,[].slice.call(arguments,1))}});exports.isContext=function(e){return e instanceof Context};exports.createScript=function(e){return exports.Script(e)};exports.createContext=Script.createContext=function(e){var t=new Context;return typeof e=="object"&&forEach(Object_keys(e),function(r){t[r]=e[r]}),t}});var HE=k(FE=>{v();var UE=Ac(),WW=Te(),YW=FE;YW.define=function(t,r){return new Oc(t,r)};function Oc(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}Oc.prototype._createNamed=function(t){var r;try{r=qE().runInThisContext("(function "+this.name+`(entity) {
|
|
12
12
|
this._initNamed(entity);
|
|
13
13
|
})`)}catch{r=function(n){this._initNamed(n)}}return WW(r,t),r.prototype._initNamed=function(n){t.call(this,n)},new r(this)};Oc.prototype._getDecoder=function(t){return t=t||"der",this.decoders.hasOwnProperty(t)||(this.decoders[t]=this._createNamed(UE.decoders[t])),this.decoders[t]};Oc.prototype.decode=function(t,r,i){return this._getDecoder(r).decode(t,i)};Oc.prototype._getEncoder=function(t){return t=t||"der",this.encoders.hasOwnProperty(t)||(this.encoders[t]=this._createNamed(UE.encoders[t])),this.encoders[t]};Oc.prototype.encode=function(t,r,i){return this._getEncoder(r).encode(t,i)}});var zE=k(jE=>{v();var $W=Te();function cn(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}jE.Reporter=cn;cn.prototype.isError=function(t){return t instanceof Pc};cn.prototype.save=function(){var t=this._reporterState;return{obj:t.obj,pathLen:t.path.length}};cn.prototype.restore=function(t){var r=this._reporterState;r.obj=t.obj,r.path=r.path.slice(0,t.pathLen)};cn.prototype.enterKey=function(t){return this._reporterState.path.push(t)};cn.prototype.exitKey=function(t){var r=this._reporterState;r.path=r.path.slice(0,t-1)};cn.prototype.leaveKey=function(t,r,i){var n=this._reporterState;this.exitKey(t),n.obj!==null&&(n.obj[r]=i)};cn.prototype.path=function(){return this._reporterState.path.join("/")};cn.prototype.enterObject=function(){var t=this._reporterState,r=t.obj;return t.obj={},r};cn.prototype.leaveObject=function(t){var r=this._reporterState,i=r.obj;return r.obj=t,i};cn.prototype.error=function(t){var r,i=this._reporterState,n=t instanceof Pc;if(n?r=t:r=new Pc(i.path.map(function(o){return"["+JSON.stringify(o)+"]"}).join(""),t.message||t,t.stack),!i.options.partial)throw r;return n||i.errors.push(r),r};cn.prototype.wrapResult=function(t){var r=this._reporterState;return r.options.partial?{result:this.isError(t)?null:t,errors:r.errors}:t};function Pc(e,t){this.path=e,this.rethrow(t)}$W(Pc,Error);Pc.prototype.rethrow=function(t){if(this.message=t+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,Pc),!this.stack)try{throw new Error(this.message)}catch(r){this.stack=r.stack}return this}});var gm=k(pm=>{v();var XW=Te(),F2=Tc().Reporter,Jh=Kt().Buffer;function xo(e,t){if(F2.call(this,t),!Jh.isBuffer(e)){this.error("Input not Buffer");return}this.base=e,this.offset=0,this.length=e.length}XW(xo,F2);pm.DecoderBuffer=xo;xo.prototype.save=function(){return{offset:this.offset,reporter:F2.prototype.save.call(this)}};xo.prototype.restore=function(t){var r=new xo(this.base);return r.offset=t.offset,r.length=this.offset,this.offset=t.offset,F2.prototype.restore.call(this,t.reporter),r};xo.prototype.isEmpty=function(){return this.offset===this.length};xo.prototype.readUInt8=function(t){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(t||"DecoderBuffer overrun")};xo.prototype.skip=function(t,r){if(!(this.offset+t<=this.length))return this.error(r||"DecoderBuffer overrun");var i=new xo(this.base);return i._reporterState=this._reporterState,i.offset=this.offset,i.length=this.offset+t,this.offset+=t,i};xo.prototype.raw=function(t){return this.base.slice(t?t.offset:this.offset,this.length)};function U2(e,t){if(Array.isArray(e))this.length=0,this.value=e.map(function(r){return r instanceof U2||(r=new U2(r,t)),this.length+=r.length,r},this);else if(typeof e=="number"){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if(typeof e=="string")this.value=e,this.length=Jh.byteLength(e);else if(Jh.isBuffer(e))this.value=e,this.length=e.length;else return t.error("Unsupported type: "+typeof e)}pm.EncoderBuffer=U2;U2.prototype.join=function(t,r){return t||(t=new Jh(this.length)),r||(r=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(i){i.join(t,r),r+=i.length}):(typeof this.value=="number"?t[r]=this.value:typeof this.value=="string"?t.write(this.value,r):Jh.isBuffer(this.value)&&this.value.copy(t,r),r+=this.length)),t}});var GE=k((V0e,VE)=>{v();var JW=Tc().Reporter,QW=Tc().EncoderBuffer,eY=Tc().DecoderBuffer,yi=Rn(),KE=["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"],tY=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(KE),rY=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function Lt(e,t){var r={};this._baseState=r,r.enc=e,r.parent=t||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())}VE.exports=Lt;var iY=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];Lt.prototype.clone=function(){var t=this._baseState,r={};iY.forEach(function(n){r[n]=t[n]});var i=new this.constructor(r.parent);return i._baseState=r,i};Lt.prototype._wrap=function(){var t=this._baseState;tY.forEach(function(r){this[r]=function(){var n=new this.constructor(this);return t.children.push(n),n[r].apply(n,arguments)}},this)};Lt.prototype._init=function(t){var r=this._baseState;yi(r.parent===null),t.call(this),r.children=r.children.filter(function(i){return i._baseState.parent===this},this),yi.equal(r.children.length,1,"Root node can have only one child")};Lt.prototype._useArgs=function(t){var r=this._baseState,i=t.filter(function(n){return n instanceof this.constructor},this);t=t.filter(function(n){return!(n instanceof this.constructor)},this),i.length!==0&&(yi(r.children===null),r.children=i,i.forEach(function(n){n._baseState.parent=this},this)),t.length!==0&&(yi(r.args===null),r.args=t,r.reverseArgs=t.map(function(n){if(typeof n!="object"||n.constructor!==Object)return n;var o={};return Object.keys(n).forEach(function(a){a==(a|0)&&(a|=0);var s=n[a];o[s]=a}),o}))};rY.forEach(function(e){Lt.prototype[e]=function(){var r=this._baseState;throw new Error(e+" not implemented for encoding: "+r.enc)}});KE.forEach(function(e){Lt.prototype[e]=function(){var r=this._baseState,i=Array.prototype.slice.call(arguments);return yi(r.tag===null),r.tag=e,this._useArgs(i),this}});Lt.prototype.use=function(t){yi(t);var r=this._baseState;return yi(r.use===null),r.use=t,this};Lt.prototype.optional=function(){var t=this._baseState;return t.optional=!0,this};Lt.prototype.def=function(t){var r=this._baseState;return yi(r.default===null),r.default=t,r.optional=!0,this};Lt.prototype.explicit=function(t){var r=this._baseState;return yi(r.explicit===null&&r.implicit===null),r.explicit=t,this};Lt.prototype.implicit=function(t){var r=this._baseState;return yi(r.explicit===null&&r.implicit===null),r.implicit=t,this};Lt.prototype.obj=function(){var t=this._baseState,r=Array.prototype.slice.call(arguments);return t.obj=!0,r.length!==0&&this._useArgs(r),this};Lt.prototype.key=function(t){var r=this._baseState;return yi(r.key===null),r.key=t,this};Lt.prototype.any=function(){var t=this._baseState;return t.any=!0,this};Lt.prototype.choice=function(t){var r=this._baseState;return yi(r.choice===null),r.choice=t,this._useArgs(Object.keys(t).map(function(i){return t[i]})),this};Lt.prototype.contains=function(t){var r=this._baseState;return yi(r.use===null),r.contains=t,this};Lt.prototype._decode=function(t,r){var i=this._baseState;if(i.parent===null)return t.wrapResult(i.children[0]._decode(t,r));var n=i.default,o=!0,a=null;if(i.key!==null&&(a=t.enterKey(i.key)),i.optional){var s=null;if(i.explicit!==null?s=i.explicit:i.implicit!==null?s=i.implicit:i.tag!==null&&(s=i.tag),s===null&&!i.any){var u=t.save();try{i.choice===null?this._decodeGeneric(i.tag,t,r):this._decodeChoice(t,r),o=!0}catch{o=!1}t.restore(u)}else if(o=this._peekTag(t,s,i.any),t.isError(o))return o}var c;if(i.obj&&o&&(c=t.enterObject()),o){if(i.explicit!==null){var l=this._decodeTag(t,i.explicit);if(t.isError(l))return l;t=l}var m=t.offset;if(i.use===null&&i.choice===null){if(i.any)var u=t.save();var w=this._decodeTag(t,i.implicit!==null?i.implicit:i.tag,i.any);if(t.isError(w))return w;i.any?n=t.raw(u):t=w}if(r&&r.track&&i.tag!==null&&r.track(t.path(),m,t.length,"tagged"),r&&r.track&&i.tag!==null&&r.track(t.path(),t.offset,t.length,"content"),i.any?n=n:i.choice===null?n=this._decodeGeneric(i.tag,t,r):n=this._decodeChoice(t,r),t.isError(n))return n;if(!i.any&&i.choice===null&&i.children!==null&&i.children.forEach(function(M){M._decode(t,r)}),i.contains&&(i.tag==="octstr"||i.tag==="bitstr")){var E=new eY(n);n=this._getUse(i.contains,t._reporterState.obj)._decode(E,r)}}return i.obj&&o&&(n=t.leaveObject(c)),i.key!==null&&(n!==null||o===!0)?t.leaveKey(a,i.key,n):a!==null&&t.exitKey(a),n};Lt.prototype._decodeGeneric=function(t,r,i){var n=this._baseState;return t==="seq"||t==="set"?null:t==="seqof"||t==="setof"?this._decodeList(r,t,n.args[0],i):/str$/.test(t)?this._decodeStr(r,t,i):t==="objid"&&n.args?this._decodeObjid(r,n.args[0],n.args[1],i):t==="objid"?this._decodeObjid(r,null,null,i):t==="gentime"||t==="utctime"?this._decodeTime(r,t,i):t==="null_"?this._decodeNull(r,i):t==="bool"?this._decodeBool(r,i):t==="objDesc"?this._decodeStr(r,t,i):t==="int"||t==="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: "+t)};Lt.prototype._getUse=function(t,r){var i=this._baseState;return i.useDecoder=this._use(t,r),yi(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};Lt.prototype._decodeChoice=function(t,r){var i=this._baseState,n=null,o=!1;return Object.keys(i.choice).some(function(a){var s=t.save(),u=i.choice[a];try{var c=u._decode(t,r);if(t.isError(c))return!1;n={type:a,value:c},o=!0}catch{return t.restore(s),!1}return!0},this),o?n:t.error("Choice not matched")};Lt.prototype._createEncoderBuffer=function(t){return new QW(t,this.reporter)};Lt.prototype._encode=function(t,r,i){var n=this._baseState;if(!(n.default!==null&&n.default===t)){var o=this._encodeValue(t,r,i);if(o!==void 0&&!this._skipDefault(o,r,i))return o}};Lt.prototype._encodeValue=function(t,r,i){var n=this._baseState;if(n.parent===null)return n.children[0]._encode(t,r||new JW);var u=null;if(this.reporter=r,n.optional&&t===void 0)if(n.default!==null)t=n.default;else return;var o=null,a=!1;if(n.any)u=this._createEncoderBuffer(t);else if(n.choice)u=this._encodeChoice(t,r);else if(n.contains)o=this._getUse(n.contains,i)._encode(t,r),a=!0;else if(n.children)o=n.children.map(function(m){if(m._baseState.tag==="null_")return m._encode(null,r,t);if(m._baseState.key===null)return r.error("Child should have a key");var w=r.enterKey(m._baseState.key);if(typeof t!="object")return r.error("Child expected, but input is not object");var E=m._encode(t[m._baseState.key],r,t);return r.leaveKey(w),E},this).filter(function(m){return m}),o=this._createEncoderBuffer(o);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(t))return r.error("seqof/setof, but data is not Array");var s=this.clone();s._baseState.implicit=null,o=this._createEncoderBuffer(t.map(function(m){var w=this._baseState;return this._getUse(w.args[0],t)._encode(m,r)},s))}else n.use!==null?u=this._getUse(n.use,i)._encode(t,r):(o=this._encodePrimitive(n.tag,t),a=!0);var u;if(!n.any&&n.choice===null){var c=n.implicit!==null?n.implicit:n.tag,l=n.implicit===null?"universal":"context";c===null?n.use===null&&r.error("Tag could be omitted only for .use()"):n.use===null&&(u=this._encodeComposite(c,a,l,o))}return n.explicit!==null&&(u=this._encodeComposite(n.explicit,!1,"context",u)),u};Lt.prototype._encodeChoice=function(t,r){var i=this._baseState,n=i.choice[t.type];return n||yi(!1,t.type+" not found in "+JSON.stringify(Object.keys(i.choice))),n._encode(t.value,r)};Lt.prototype._encodePrimitive=function(t,r){var i=this._baseState;if(/str$/.test(t))return this._encodeStr(r,t);if(t==="objid"&&i.args)return this._encodeObjid(r,i.reverseArgs[0],i.args[1]);if(t==="objid")return this._encodeObjid(r,null,null);if(t==="gentime"||t==="utctime")return this._encodeTime(r,t);if(t==="null_")return this._encodeNull();if(t==="int"||t==="enum")return this._encodeInt(r,i.args&&i.reverseArgs[0]);if(t==="bool")return this._encodeBool(r);if(t==="objDesc")return this._encodeStr(r,t);throw new Error("Unsupported tag: "+t)};Lt.prototype._isNumstr=function(t){return/^[0-9 ]*$/.test(t)};Lt.prototype._isPrintstr=function(t){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(t)}});var Tc=k(ZE=>{v();var H2=ZE;H2.Reporter=zE().Reporter;H2.DecoderBuffer=gm().DecoderBuffer;H2.EncoderBuffer=gm().EncoderBuffer;H2.Node=GE()});var YE=k(zu=>{v();var WE=vm();zu.tagClass={0:"universal",1:"application",2:"context",3:"private"};zu.tagClassByName=WE._reverse(zu.tagClass);zu.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"};zu.tagByName=WE._reverse(zu.tag)});var vm=k(XE=>{v();var $E=XE;$E._reverse=function(t){var r={};return Object.keys(t).forEach(function(i){(i|0)==i&&(i=i|0);var n=t[i];r[n]=i}),r};$E.der=YE()});var bm=k((Q0e,tI)=>{v();var nY=Te(),mm=Ac(),j2=mm.base,oY=mm.bignum,JE=mm.constants.der;function QE(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new Ui,this.tree._init(e.body)}tI.exports=QE;QE.prototype.decode=function(t,r){return t instanceof j2.DecoderBuffer||(t=new j2.DecoderBuffer(t,r)),this.tree._decode(t,r)};function Ui(e){j2.Node.call(this,"der",e)}nY(Ui,j2.Node);Ui.prototype._peekTag=function(t,r,i){if(t.isEmpty())return!1;var n=t.save(),o=ym(t,'Failed to peek tag: "'+r+'"');return t.isError(o)?o:(t.restore(n),o.tag===r||o.tagStr===r||o.tagStr+"of"===r||i)};Ui.prototype._decodeTag=function(t,r,i){var n=ym(t,'Failed to decode tag of "'+r+'"');if(t.isError(n))return n;var o=eI(t,n.primitive,'Failed to get length of "'+r+'"');if(t.isError(o))return o;if(!i&&n.tag!==r&&n.tagStr!==r&&n.tagStr+"of"!==r)return t.error('Failed to match tag: "'+r+'"');if(n.primitive||o!==null)return t.skip(o,'Failed to match body of: "'+r+'"');var a=t.save(),s=this._skipUntilEnd(t,'Failed to skip indefinite length body: "'+this.tag+'"');return t.isError(s)?s:(o=t.offset-a.offset,t.restore(a),t.skip(o,'Failed to match body of: "'+r+'"'))};Ui.prototype._skipUntilEnd=function(t,r){for(;;){var i=ym(t,r);if(t.isError(i))return i;var n=eI(t,i.primitive,r);if(t.isError(n))return n;var o;if(i.primitive||n!==null?o=t.skip(n):o=this._skipUntilEnd(t,r),t.isError(o))return o;if(i.tagStr==="end")break}};Ui.prototype._decodeList=function(t,r,i,n){for(var o=[];!t.isEmpty();){var a=this._peekTag(t,"end");if(t.isError(a))return a;var s=i.decode(t,"der",n);if(t.isError(s)&&a)break;o.push(s)}return o};Ui.prototype._decodeStr=function(t,r){if(r==="bitstr"){var i=t.readUInt8();return t.isError(i)?i:{unused:i,data:t.raw()}}else if(r==="bmpstr"){var n=t.raw();if(n.length%2===1)return t.error("Decoding of string type: bmpstr length mismatch");for(var o="",a=0;a<n.length/2;a++)o+=String.fromCharCode(n.readUInt16BE(a*2));return o}else if(r==="numstr"){var s=t.raw().toString("ascii");return this._isNumstr(s)?s:t.error("Decoding of string type: numstr unsupported characters")}else{if(r==="octstr")return t.raw();if(r==="objDesc")return t.raw();if(r==="printstr"){var u=t.raw().toString("ascii");return this._isPrintstr(u)?u:t.error("Decoding of string type: printstr unsupported characters")}else return/str$/.test(r)?t.raw().toString():t.error("Decoding of string type: "+r+" unsupported")}};Ui.prototype._decodeObjid=function(t,r,i){for(var n,o=[],a=0;!t.isEmpty();){var s=t.readUInt8();a<<=7,a|=s&127,(s&128)===0&&(o.push(a),a=0)}s&128&&o.push(a);var u=o[0]/40|0,c=o[0]%40;if(i?n=o:n=[u,c].concat(o.slice(1)),r){var l=r[n.join(" ")];l===void 0&&(l=r[n.join(".")]),l!==void 0&&(n=l)}return n};Ui.prototype._decodeTime=function(t,r){var i=t.raw().toString();if(r==="gentime")var n=i.slice(0,4)|0,o=i.slice(4,6)|0,a=i.slice(6,8)|0,s=i.slice(8,10)|0,u=i.slice(10,12)|0,c=i.slice(12,14)|0;else if(r==="utctime"){var n=i.slice(0,2)|0,o=i.slice(2,4)|0,a=i.slice(4,6)|0,s=i.slice(6,8)|0,u=i.slice(8,10)|0,c=i.slice(10,12)|0;n<70?n=2e3+n:n=1900+n}else return t.error("Decoding "+r+" time is not supported yet");return Date.UTC(n,o-1,a,s,u,c,0)};Ui.prototype._decodeNull=function(t){return null};Ui.prototype._decodeBool=function(t){var r=t.readUInt8();return t.isError(r)?r:r!==0};Ui.prototype._decodeInt=function(t,r){var i=t.raw(),n=new oY(i);return r&&(n=r[n.toString(10)]||n),n};Ui.prototype._use=function(t,r){return typeof t=="function"&&(t=t(r)),t._getDecoder("der").tree};function ym(e,t){var r=e.readUInt8(t);if(e.isError(r))return r;var i=JE.tagClass[r>>6],n=(r&32)===0;if((r&31)===31){var o=r;for(r=0;(o&128)===128;){if(o=e.readUInt8(t),e.isError(o))return o;r<<=7,r|=o&127}}else r&=31;var a=JE.tag[r];return{cls:i,primitive:n,tag:r,tagStr:a}}function eI(e,t,r){var i=e.readUInt8(r);if(e.isError(i))return i;if(!t&&i===128)return null;if((i&128)===0)return i;var n=i&127;if(n>4)return e.error("length octect is too long");i=0;for(var o=0;o<n;o++){i<<=8;var a=e.readUInt8(r);if(e.isError(a))return a;i|=a}return i}});var iI=k((t1e,rI)=>{v();var aY=Te(),sY=Kt().Buffer,_m=bm();function wm(e){_m.call(this,e),this.enc="pem"}aY(wm,_m);rI.exports=wm;wm.prototype.decode=function(t,r){for(var i=t.toString().split(/[\r\n]+/g),n=r.label.toUpperCase(),o=/^-----(BEGIN|END) ([^-]+)-----$/,a=-1,s=-1,u=0;u<i.length;u++){var c=i[u].match(o);if(c!==null&&c[2]===n)if(a===-1){if(c[1]!=="BEGIN")break;a=u}else{if(c[1]!=="END")break;s=u;break}}if(a===-1||s===-1)throw new Error("PEM section not found for: "+n);var l=i.slice(a+1,s).join("");l.replace(/[^a-z0-9\+\/=]+/gi,"");var m=new sY(l,"base64");return _m.prototype.decode.call(this,m,r)}});var aI=k(oI=>{v();var nI=oI;nI.der=bm();nI.pem=iI()});var xm=k((o1e,cI)=>{v();var uY=Te(),Sa=Kt().Buffer,sI=Ac(),uI=sI.base,Sm=sI.constants.der;function fI(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new Nn,this.tree._init(e.body)}cI.exports=fI;fI.prototype.encode=function(t,r){return this.tree._encode(t,r).join()};function Nn(e){uI.Node.call(this,"der",e)}uY(Nn,uI.Node);Nn.prototype._encodeComposite=function(t,r,i,n){var o=fY(t,r,i,this.reporter);if(n.length<128){var u=new Sa(2);return u[0]=o,u[1]=n.length,this._createEncoderBuffer([u,n])}for(var a=1,s=n.length;s>=256;s>>=8)a++;var u=new Sa(2+a);u[0]=o,u[1]=128|a;for(var s=1+a,c=n.length;c>0;s--,c>>=8)u[s]=c&255;return this._createEncoderBuffer([u,n])};Nn.prototype._encodeStr=function(t,r){if(r==="bitstr")return this._createEncoderBuffer([t.unused|0,t.data]);if(r==="bmpstr"){for(var i=new Sa(t.length*2),n=0;n<t.length;n++)i.writeUInt16BE(t.charCodeAt(n),n*2);return this._createEncoderBuffer(i)}else return r==="numstr"?this._isNumstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: numstr supports only digits and space"):r==="printstr"?this._isPrintstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(r)?this._createEncoderBuffer(t):r==="objDesc"?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: "+r+" unsupported")};Nn.prototype._encodeObjid=function(t,r,i){if(typeof t=="string"){if(!r)return this.reporter.error("string objid given, but no values map found");if(!r.hasOwnProperty(t))return this.reporter.error("objid not found in values map");t=r[t].split(/[\s\.]+/g);for(var n=0;n<t.length;n++)t[n]|=0}else if(Array.isArray(t)){t=t.slice();for(var n=0;n<t.length;n++)t[n]|=0}if(!Array.isArray(t))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(t));if(!i){if(t[1]>=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,t[0]*40+t[1])}for(var o=0,n=0;n<t.length;n++){var a=t[n];for(o++;a>=128;a>>=7)o++}for(var s=new Sa(o),u=s.length-1,n=t.length-1;n>=0;n--){var a=t[n];for(s[u--]=a&127;(a>>=7)>0;)s[u--]=128|a&127}return this._createEncoderBuffer(s)};function ln(e){return e<10?"0"+e:e}Nn.prototype._encodeTime=function(t,r){var i,n=new Date(t);return r==="gentime"?i=[ln(n.getFullYear()),ln(n.getUTCMonth()+1),ln(n.getUTCDate()),ln(n.getUTCHours()),ln(n.getUTCMinutes()),ln(n.getUTCSeconds()),"Z"].join(""):r==="utctime"?i=[ln(n.getFullYear()%100),ln(n.getUTCMonth()+1),ln(n.getUTCDate()),ln(n.getUTCHours()),ln(n.getUTCMinutes()),ln(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+r+" time is not supported yet"),this._encodeStr(i,"octstr")};Nn.prototype._encodeNull=function(){return this._createEncoderBuffer("")};Nn.prototype._encodeInt=function(t,r){if(typeof t=="string"){if(!r)return this.reporter.error("String int or enum given, but no values map");if(!r.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=r[t]}if(typeof t!="number"&&!Sa.isBuffer(t)){var i=t.toArray();!t.sign&&i[0]&128&&i.unshift(0),t=new Sa(i)}if(Sa.isBuffer(t)){var n=t.length;t.length===0&&n++;var a=new Sa(n);return t.copy(a),t.length===0&&(a[0]=0),this._createEncoderBuffer(a)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);for(var n=1,o=t;o>=256;o>>=8)n++;for(var a=new Array(n),o=a.length-1;o>=0;o--)a[o]=t&255,t>>=8;return a[0]&128&&a.unshift(0),this._createEncoderBuffer(new Sa(a))};Nn.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)};Nn.prototype._use=function(t,r){return typeof t=="function"&&(t=t(r)),t._getEncoder("der").tree};Nn.prototype._skipDefault=function(t,r,i){var n=this._baseState,o;if(n.default===null)return!1;var a=t.join();if(n.defaultBuffer===void 0&&(n.defaultBuffer=this._encodeValue(n.default,r,i).join()),a.length!==n.defaultBuffer.length)return!1;for(o=0;o<a.length;o++)if(a[o]!==n.defaultBuffer[o])return!1;return!0};function fY(e,t,r,i){var n;if(e==="seqof"?e="seq":e==="setof"&&(e="set"),Sm.tagByName.hasOwnProperty(e))n=Sm.tagByName[e];else if(typeof e=="number"&&(e|0)===e)n=e;else return i.error("Unknown tag: "+e);return n>=31?i.error("Multi-octet tag encoding unsupported"):(t||(n|=32),n|=Sm.tagClassByName[r||"universal"]<<6,n)}});var hI=k((s1e,lI)=>{v();var cY=Te(),Em=xm();function Im(e){Em.call(this,e),this.enc="pem"}cY(Im,Em);lI.exports=Im;Im.prototype.encode=function(t,r){for(var i=Em.prototype.encode.call(this,t),n=i.toString("base64"),o=["-----BEGIN "+r.label+"-----"],a=0;a<n.length;a+=64)o.push(n.slice(a,a+64));return o.push("-----END "+r.label+"-----"),o.join(`
|
|
14
14
|
`)}});var gI=k(pI=>{v();var dI=pI;dI.der=xm();dI.pem=hI()});var Ac=k(vI=>{v();var kc=vI;kc.bignum=Cn();kc.define=HE().define;kc.base=Tc();kc.constants=vm();kc.decoders=aI();kc.encoders=gI()});var _I=k((d1e,bI)=>{"use strict";v();var Dn=Ac(),mI=Dn.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),lY=Dn.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),Om=Dn.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),hY=Dn.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(Om),this.key("subjectPublicKey").bitstr())}),dY=Dn.define("RelativeDistinguishedName",function(){this.setof(lY)}),pY=Dn.define("RDNSequence",function(){this.seqof(dY)}),yI=Dn.define("Name",function(){this.choice({rdnSequence:this.use(pY)})}),gY=Dn.define("Validity",function(){this.seq().obj(this.key("notBefore").use(mI),this.key("notAfter").use(mI))}),vY=Dn.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),mY=Dn.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(Om),this.key("issuer").use(yI),this.key("validity").use(gY),this.key("subject").use(yI),this.key("subjectPublicKeyInfo").use(hY),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(vY).optional())}),yY=Dn.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(mY),this.key("signatureAlgorithm").use(Om),this.key("signatureValue").bitstr())});bI.exports=yY});var SI=k(qn=>{"use strict";v();var Ln=Ac();qn.certificate=_I();var bY=Ln.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())});qn.RSAPrivateKey=bY;var _Y=Ln.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});qn.RSAPublicKey=_Y;var wI=Ln.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())}),wY=Ln.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(wI),this.key("subjectPublicKey").bitstr())});qn.PublicKey=wY;var SY=Ln.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(wI),this.key("subjectPrivateKey").octstr())});qn.PrivateKey=SY;var xY=Ln.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())});qn.EncryptedPrivateKey=xY;var EY=Ln.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())});qn.DSAPrivateKey=EY;qn.DSAparam=Ln.define("DSAparam",function(){this.int()});var IY=Ln.define("ECParameters",function(){this.choice({namedCurve:this.objid()})}),OY=Ln.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(IY),this.key("publicKey").optional().explicit(1).bitstr())});qn.ECPrivateKey=OY;qn.signature=Ln.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})});var xI=k((m1e,AY)=>{AY.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 II=k((y1e,EI)=>{"use strict";v();var PY=/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,TY=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,kY=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,RY=Yh(),BY=D2(),z2=ot().Buffer;EI.exports=function(e,t){var r=e.toString(),i=r.match(PY),n;if(i){var a="aes"+i[1],s=z2.from(i[2],"hex"),u=z2.from(i[3].replace(/[\r\n]/g,""),"base64"),c=RY(t,s.slice(0,8),parseInt(i[1],10)).key,l=[],m=BY.createDecipheriv(a,c,s);l.push(m.update(u)),l.push(m.final()),n=z2.concat(l)}else{var o=r.match(kY);n=z2.from(o[2].replace(/[\r\n]/g,""),"base64")}var w=r.match(TY)[1];return{tag:w,data:n}}});var Pm=k((_1e,AI)=>{"use strict";v();var Ti=SI(),MY=xI(),CY=II(),NY=D2(),DY=Lv().pbkdf2Sync,Am=ot().Buffer;function LY(e,t){var r=e.algorithm.decrypt.kde.kdeparams.salt,i=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),n=MY[e.algorithm.decrypt.cipher.algo.join(".")],o=e.algorithm.decrypt.cipher.iv,a=e.subjectPrivateKey,s=parseInt(n.split("-")[1],10)/8,u=DY(t,r,i,s,"sha1"),c=NY.createDecipheriv(n,u,o),l=[];return l.push(c.update(a)),l.push(c.final()),Am.concat(l)}function OI(e){var t;typeof e=="object"&&!Am.isBuffer(e)&&(t=e.passphrase,e=e.key),typeof e=="string"&&(e=Am.from(e));var r=CY(e,t),i=r.tag,n=r.data,o,a;switch(i){case"CERTIFICATE":a=Ti.certificate.decode(n,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(a||(a=Ti.PublicKey.decode(n,"der")),o=a.algorithm.algorithm.join("."),o){case"1.2.840.113549.1.1.1":return Ti.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=Ti.DSAparam.decode(a.subjectPublicKey.data,"der"),{type:"dsa",data:a.algorithm.params};default:throw new Error("unknown key id "+o)}case"ENCRYPTED PRIVATE KEY":n=Ti.EncryptedPrivateKey.decode(n,"der"),n=LY(n,t);case"PRIVATE KEY":switch(a=Ti.PrivateKey.decode(n,"der"),o=a.algorithm.algorithm.join("."),o){case"1.2.840.113549.1.1.1":return Ti.RSAPrivateKey.decode(a.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:a.algorithm.curve,privateKey:Ti.ECPrivateKey.decode(a.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return a.algorithm.params.priv_key=Ti.DSAparam.decode(a.subjectPrivateKey,"der"),{type:"dsa",params:a.algorithm.params};default:throw new Error("unknown key id "+o)}case"RSA PUBLIC KEY":return Ti.RSAPublicKey.decode(n,"der");case"RSA PRIVATE KEY":return Ti.RSAPrivateKey.decode(n,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:Ti.DSAPrivateKey.decode(n,"der")};case"EC PRIVATE KEY":return n=Ti.ECPrivateKey.decode(n,"der"),{curve:n.parameters.value,privateKey:n.privateKey};default:throw new Error("unknown key type "+i)}}OI.signature=Ti.signature;AI.exports=OI});var km=k((S1e,PI)=>{v();var qY=Hh(),Tm=ot().Buffer;PI.exports=function(e,t){for(var r=Tm.alloc(0),i=0,n;r.length<t;)n=UY(i++),r=Tm.concat([r,qY("sha1").update(e).update(n).digest()]);return r.slice(0,t)};function UY(e){var t=Tm.allocUnsafe(4);return t.writeUInt32BE(e,0),t}});var Rm=k((E1e,TI)=>{v();TI.exports=function(t,r){for(var i=t.length,n=-1;++n<i;)t[n]^=r[n];return t}});var Bm=k((O1e,RI)=>{v();var kI=Cn(),FY=ot().Buffer;function HY(e,t){return FY.from(e.toRed(kI.mont(t.modulus)).redPow(new kI(t.publicExponent)).fromRed().toArray())}RI.exports=HY});var MI=k((BI,Mm)=>{v();(function(e,t){"use strict";function r(y,f){if(!y)throw new Error(f||"Assertion failed")}function i(y,f){y.super_=f;var p=function(){};p.prototype=f.prototype,y.prototype=new p,y.prototype.constructor=y}function n(y,f,p){if(n.isBN(y))return y;this.negative=0,this.words=null,this.length=0,this.red=null,y!==null&&((f==="le"||f==="be")&&(p=f,f=10),this._init(y||0,f||10,p||"be"))}typeof e=="object"?e.exports=n:t.BN=n,n.BN=n,n.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=Kt().Buffer}catch{}n.isBN=function(f){return f instanceof n?!0:f!==null&&typeof f=="object"&&f.constructor.wordSize===n.wordSize&&Array.isArray(f.words)},n.max=function(f,p){return f.cmp(p)>0?f:p},n.min=function(f,p){return f.cmp(p)<0?f:p},n.prototype._init=function(f,p,_){if(typeof f=="number")return this._initNumber(f,p,_);if(typeof f=="object")return this._initArray(f,p,_);p==="hex"&&(p=16),r(p===(p|0)&&p>=2&&p<=36),f=f.toString().replace(/\s+/g,"");var x=0;f[0]==="-"&&(x++,this.negative=1),x<f.length&&(p===16?this._parseHex(f,x,_):(this._parseBase(f,p,x),_==="le"&&this._initArray(this.toArray(),p,_)))},n.prototype._initNumber=function(f,p,_){f<0&&(this.negative=1,f=-f),f<67108864?(this.words=[f&67108863],this.length=1):f<4503599627370496?(this.words=[f&67108863,f/67108864&67108863],this.length=2):(r(f<9007199254740992),this.words=[f&67108863,f/67108864&67108863,1],this.length=3),_==="le"&&this._initArray(this.toArray(),p,_)},n.prototype._initArray=function(f,p,_){if(r(typeof f.length=="number"),f.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(f.length/3),this.words=new Array(this.length);for(var x=0;x<this.length;x++)this.words[x]=0;var b,d,O=0;if(_==="be")for(x=f.length-1,b=0;x>=0;x-=3)d=f[x]|f[x-1]<<8|f[x-2]<<16,this.words[b]|=d<<O&67108863,this.words[b+1]=d>>>26-O&67108863,O+=24,O>=26&&(O-=26,b++);else if(_==="le")for(x=0,b=0;x<f.length;x+=3)d=f[x]|f[x+1]<<8|f[x+2]<<16,this.words[b]|=d<<O&67108863,this.words[b+1]=d>>>26-O&67108863,O+=24,O>=26&&(O-=26,b++);return this._strip()};function a(y,f){var p=y.charCodeAt(f);if(p>=48&&p<=57)return p-48;if(p>=65&&p<=70)return p-55;if(p>=97&&p<=102)return p-87;r(!1,"Invalid character in "+y)}function s(y,f,p){var _=a(y,p);return p-1>=f&&(_|=a(y,p-1)<<4),_}n.prototype._parseHex=function(f,p,_){this.length=Math.ceil((f.length-p)/6),this.words=new Array(this.length);for(var x=0;x<this.length;x++)this.words[x]=0;var b=0,d=0,O;if(_==="be")for(x=f.length-1;x>=p;x-=2)O=s(f,p,x)<<b,this.words[d]|=O&67108863,b>=18?(b-=18,d+=1,this.words[d]|=O>>>26):b+=8;else{var T=f.length-p;for(x=T%2===0?p+1:p;x<f.length;x+=2)O=s(f,p,x)<<b,this.words[d]|=O&67108863,b>=18?(b-=18,d+=1,this.words[d]|=O>>>26):b+=8}this._strip()};function u(y,f,p,_){for(var x=0,b=0,d=Math.min(y.length,p),O=f;O<d;O++){var T=y.charCodeAt(O)-48;x*=_,T>=49?b=T-49+10:T>=17?b=T-17+10:b=T,r(T>=0&&b<_,"Invalid character"),x+=b}return x}n.prototype._parseBase=function(f,p,_){this.words=[0],this.length=1;for(var x=0,b=1;b<=67108863;b*=p)x++;x--,b=b/p|0;for(var d=f.length-_,O=d%x,T=Math.min(d,d-O)+_,S=0,R=_;R<T;R+=x)S=u(f,R,R+x,p),this.imuln(b),this.words[0]+S<67108864?this.words[0]+=S:this._iaddn(S);if(O!==0){var Y=1;for(S=u(f,R,f.length,p),R=0;R<O;R++)Y*=p;this.imuln(Y),this.words[0]+S<67108864?this.words[0]+=S:this._iaddn(S)}this._strip()},n.prototype.copy=function(f){f.words=new Array(this.length);for(var p=0;p<this.length;p++)f.words[p]=this.words[p];f.length=this.length,f.negative=this.negative,f.red=this.red};function c(y,f){y.words=f.words,y.length=f.length,y.negative=f.negative,y.red=f.red}if(n.prototype._move=function(f){c(f,this)},n.prototype.clone=function(){var f=new n(null);return this.copy(f),f},n.prototype._expand=function(f){for(;this.length<f;)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")]=l}catch{n.prototype.inspect=l}else n.prototype.inspect=l;function l(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var m=["","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"],w=[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],E=[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(f,p){f=f||10,p=p|0||1;var _;if(f===16||f==="hex"){_="";for(var x=0,b=0,d=0;d<this.length;d++){var O=this.words[d],T=((O<<x|b)&16777215).toString(16);b=O>>>24-x&16777215,x+=2,x>=26&&(x-=26,d--),b!==0||d!==this.length-1?_=m[6-T.length]+T+_:_=T+_}for(b!==0&&(_=b.toString(16)+_);_.length%p!==0;)_="0"+_;return this.negative!==0&&(_="-"+_),_}if(f===(f|0)&&f>=2&&f<=36){var S=w[f],R=E[f];_="";var Y=this.clone();for(Y.negative=0;!Y.isZero();){var X=Y.modrn(R).toString(f);Y=Y.idivn(R),Y.isZero()?_=X+_:_=m[S-X.length]+X+_}for(this.isZero()&&(_="0"+_);_.length%p!==0;)_="0"+_;return this.negative!==0&&(_="-"+_),_}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var f=this.words[0];return this.length===2?f+=this.words[1]*67108864:this.length===3&&this.words[2]===1?f+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-f:f},n.prototype.toJSON=function(){return this.toString(16,2)},o&&(n.prototype.toBuffer=function(f,p){return this.toArrayLike(o,f,p)}),n.prototype.toArray=function(f,p){return this.toArrayLike(Array,f,p)};var P=function(f,p){return f.allocUnsafe?f.allocUnsafe(p):new f(p)};n.prototype.toArrayLike=function(f,p,_){this._strip();var x=this.byteLength(),b=_||Math.max(1,x);r(x<=b,"byte array longer than desired length"),r(b>0,"Requested array length <= 0");var d=P(f,b),O=p==="le"?"LE":"BE";return this["_toArrayLike"+O](d,x),d},n.prototype._toArrayLikeLE=function(f,p){for(var _=0,x=0,b=0,d=0;b<this.length;b++){var O=this.words[b]<<d|x;f[_++]=O&255,_<f.length&&(f[_++]=O>>8&255),_<f.length&&(f[_++]=O>>16&255),d===6?(_<f.length&&(f[_++]=O>>24&255),x=0,d=0):(x=O>>>24,d+=2)}if(_<f.length)for(f[_++]=x;_<f.length;)f[_++]=0},n.prototype._toArrayLikeBE=function(f,p){for(var _=f.length-1,x=0,b=0,d=0;b<this.length;b++){var O=this.words[b]<<d|x;f[_--]=O&255,_>=0&&(f[_--]=O>>8&255),_>=0&&(f[_--]=O>>16&255),d===6?(_>=0&&(f[_--]=O>>24&255),x=0,d=0):(x=O>>>24,d+=2)}if(_>=0)for(f[_--]=x;_>=0;)f[_--]=0},Math.clz32?n.prototype._countBits=function(f){return 32-Math.clz32(f)}:n.prototype._countBits=function(f){var p=f,_=0;return p>=4096&&(_+=13,p>>>=13),p>=64&&(_+=7,p>>>=7),p>=8&&(_+=4,p>>>=4),p>=2&&(_+=2,p>>>=2),_+p},n.prototype._zeroBits=function(f){if(f===0)return 26;var p=f,_=0;return(p&8191)===0&&(_+=13,p>>>=13),(p&127)===0&&(_+=7,p>>>=7),(p&15)===0&&(_+=4,p>>>=4),(p&3)===0&&(_+=2,p>>>=2),(p&1)===0&&_++,_},n.prototype.bitLength=function(){var f=this.words[this.length-1],p=this._countBits(f);return(this.length-1)*26+p};function M(y){for(var f=new Array(y.bitLength()),p=0;p<f.length;p++){var _=p/26|0,x=p%26;f[p]=y.words[_]>>>x&1}return f}n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var f=0,p=0;p<this.length;p++){var _=this._zeroBits(this.words[p]);if(f+=_,_!==26)break}return f},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(f){return this.negative!==0?this.abs().inotn(f).iaddn(1):this.clone()},n.prototype.fromTwos=function(f){return this.testn(f-1)?this.notn(f).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(f){for(;this.length<f.length;)this.words[this.length++]=0;for(var p=0;p<f.length;p++)this.words[p]=this.words[p]|f.words[p];return this._strip()},n.prototype.ior=function(f){return r((this.negative|f.negative)===0),this.iuor(f)},n.prototype.or=function(f){return this.length>f.length?this.clone().ior(f):f.clone().ior(this)},n.prototype.uor=function(f){return this.length>f.length?this.clone().iuor(f):f.clone().iuor(this)},n.prototype.iuand=function(f){var p;this.length>f.length?p=f:p=this;for(var _=0;_<p.length;_++)this.words[_]=this.words[_]&f.words[_];return this.length=p.length,this._strip()},n.prototype.iand=function(f){return r((this.negative|f.negative)===0),this.iuand(f)},n.prototype.and=function(f){return this.length>f.length?this.clone().iand(f):f.clone().iand(this)},n.prototype.uand=function(f){return this.length>f.length?this.clone().iuand(f):f.clone().iuand(this)},n.prototype.iuxor=function(f){var p,_;this.length>f.length?(p=this,_=f):(p=f,_=this);for(var x=0;x<_.length;x++)this.words[x]=p.words[x]^_.words[x];if(this!==p)for(;x<p.length;x++)this.words[x]=p.words[x];return this.length=p.length,this._strip()},n.prototype.ixor=function(f){return r((this.negative|f.negative)===0),this.iuxor(f)},n.prototype.xor=function(f){return this.length>f.length?this.clone().ixor(f):f.clone().ixor(this)},n.prototype.uxor=function(f){return this.length>f.length?this.clone().iuxor(f):f.clone().iuxor(this)},n.prototype.inotn=function(f){r(typeof f=="number"&&f>=0);var p=Math.ceil(f/26)|0,_=f%26;this._expand(p),_>0&&p--;for(var x=0;x<p;x++)this.words[x]=~this.words[x]&67108863;return _>0&&(this.words[x]=~this.words[x]&67108863>>26-_),this._strip()},n.prototype.notn=function(f){return this.clone().inotn(f)},n.prototype.setn=function(f,p){r(typeof f=="number"&&f>=0);var _=f/26|0,x=f%26;return this._expand(_+1),p?this.words[_]=this.words[_]|1<<x:this.words[_]=this.words[_]&~(1<<x),this._strip()},n.prototype.iadd=function(f){var p;if(this.negative!==0&&f.negative===0)return this.negative=0,p=this.isub(f),this.negative^=1,this._normSign();if(this.negative===0&&f.negative!==0)return f.negative=0,p=this.isub(f),f.negative=1,p._normSign();var _,x;this.length>f.length?(_=this,x=f):(_=f,x=this);for(var b=0,d=0;d<x.length;d++)p=(_.words[d]|0)+(x.words[d]|0)+b,this.words[d]=p&67108863,b=p>>>26;for(;b!==0&&d<_.length;d++)p=(_.words[d]|0)+b,this.words[d]=p&67108863,b=p>>>26;if(this.length=_.length,b!==0)this.words[this.length]=b,this.length++;else if(_!==this)for(;d<_.length;d++)this.words[d]=_.words[d];return this},n.prototype.add=function(f){var p;return f.negative!==0&&this.negative===0?(f.negative=0,p=this.sub(f),f.negative^=1,p):f.negative===0&&this.negative!==0?(this.negative=0,p=f.sub(this),this.negative=1,p):this.length>f.length?this.clone().iadd(f):f.clone().iadd(this)},n.prototype.isub=function(f){if(f.negative!==0){f.negative=0;var p=this.iadd(f);return f.negative=1,p._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(f),this.negative=1,this._normSign();var _=this.cmp(f);if(_===0)return this.negative=0,this.length=1,this.words[0]=0,this;var x,b;_>0?(x=this,b=f):(x=f,b=this);for(var d=0,O=0;O<b.length;O++)p=(x.words[O]|0)-(b.words[O]|0)+d,d=p>>26,this.words[O]=p&67108863;for(;d!==0&&O<x.length;O++)p=(x.words[O]|0)+d,d=p>>26,this.words[O]=p&67108863;if(d===0&&O<x.length&&x!==this)for(;O<x.length;O++)this.words[O]=x.words[O];return this.length=Math.max(this.length,O),x!==this&&(this.negative=1),this._strip()},n.prototype.sub=function(f){return this.clone().isub(f)};function D(y,f,p){p.negative=f.negative^y.negative;var _=y.length+f.length|0;p.length=_,_=_-1|0;var x=y.words[0]|0,b=f.words[0]|0,d=x*b,O=d&67108863,T=d/67108864|0;p.words[0]=O;for(var S=1;S<_;S++){for(var R=T>>>26,Y=T&67108863,X=Math.min(S,f.length-1),ne=Math.max(0,S-y.length+1);ne<=X;ne++){var ce=S-ne|0;x=y.words[ce]|0,b=f.words[ne]|0,d=x*b+Y,R+=d/67108864|0,Y=d&67108863}p.words[S]=Y|0,T=R|0}return T!==0?p.words[S]=T|0:p.length--,p._strip()}var L=function(f,p,_){var x=f.words,b=p.words,d=_.words,O=0,T,S,R,Y=x[0]|0,X=Y&8191,ne=Y>>>13,ce=x[1]|0,pe=ce&8191,q=ce>>>13,W=x[2]|0,$=W&8191,te=W>>>13,se=x[3]|0,ue=se&8191,le=se>>>13,Pe=x[4]|0,ge=Pe&8191,ve=Pe>>>13,sr=x[5]|0,Ee=sr&8191,ye=sr>>>13,Be=x[6]|0,be=Be&8191,_e=Be>>>13,Qi=x[7]|0,Ce=Qi&8191,Re=Qi>>>13,Js=x[8]|0,De=Js&8191,qe=Js>>>13,Wl=x[9]|0,Ue=Wl&8191,Fe=Wl>>>13,Yl=b[0]|0,He=Yl&8191,je=Yl>>>13,$l=b[1]|0,ze=$l&8191,Ke=$l>>>13,Xl=b[2]|0,Ve=Xl&8191,Ge=Xl>>>13,Jl=b[3]|0,Ze=Jl&8191,We=Jl>>>13,Ql=b[4]|0,Ye=Ql&8191,$e=Ql>>>13,eh=b[5]|0,Xe=eh&8191,Je=eh>>>13,th=b[6]|0,Qe=th&8191,et=th>>>13,rh=b[7]|0,tt=rh&8191,rt=rh>>>13,ih=b[8]|0,it=ih&8191,nt=ih>>>13,Gf=b[9]|0,Jt=Gf&8191,Qt=Gf>>>13;_.negative=f.negative^p.negative,_.length=19,T=Math.imul(X,He),S=Math.imul(X,je),S=S+Math.imul(ne,He)|0,R=Math.imul(ne,je);var Qs=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(Qs>>>26)|0,Qs&=67108863,T=Math.imul(pe,He),S=Math.imul(pe,je),S=S+Math.imul(q,He)|0,R=Math.imul(q,je),T=T+Math.imul(X,ze)|0,S=S+Math.imul(X,Ke)|0,S=S+Math.imul(ne,ze)|0,R=R+Math.imul(ne,Ke)|0;var eu=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(eu>>>26)|0,eu&=67108863,T=Math.imul($,He),S=Math.imul($,je),S=S+Math.imul(te,He)|0,R=Math.imul(te,je),T=T+Math.imul(pe,ze)|0,S=S+Math.imul(pe,Ke)|0,S=S+Math.imul(q,ze)|0,R=R+Math.imul(q,Ke)|0,T=T+Math.imul(X,Ve)|0,S=S+Math.imul(X,Ge)|0,S=S+Math.imul(ne,Ve)|0,R=R+Math.imul(ne,Ge)|0;var tu=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(tu>>>26)|0,tu&=67108863,T=Math.imul(ue,He),S=Math.imul(ue,je),S=S+Math.imul(le,He)|0,R=Math.imul(le,je),T=T+Math.imul($,ze)|0,S=S+Math.imul($,Ke)|0,S=S+Math.imul(te,ze)|0,R=R+Math.imul(te,Ke)|0,T=T+Math.imul(pe,Ve)|0,S=S+Math.imul(pe,Ge)|0,S=S+Math.imul(q,Ve)|0,R=R+Math.imul(q,Ge)|0,T=T+Math.imul(X,Ze)|0,S=S+Math.imul(X,We)|0,S=S+Math.imul(ne,Ze)|0,R=R+Math.imul(ne,We)|0;var ru=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(ru>>>26)|0,ru&=67108863,T=Math.imul(ge,He),S=Math.imul(ge,je),S=S+Math.imul(ve,He)|0,R=Math.imul(ve,je),T=T+Math.imul(ue,ze)|0,S=S+Math.imul(ue,Ke)|0,S=S+Math.imul(le,ze)|0,R=R+Math.imul(le,Ke)|0,T=T+Math.imul($,Ve)|0,S=S+Math.imul($,Ge)|0,S=S+Math.imul(te,Ve)|0,R=R+Math.imul(te,Ge)|0,T=T+Math.imul(pe,Ze)|0,S=S+Math.imul(pe,We)|0,S=S+Math.imul(q,Ze)|0,R=R+Math.imul(q,We)|0,T=T+Math.imul(X,Ye)|0,S=S+Math.imul(X,$e)|0,S=S+Math.imul(ne,Ye)|0,R=R+Math.imul(ne,$e)|0;var iu=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(iu>>>26)|0,iu&=67108863,T=Math.imul(Ee,He),S=Math.imul(Ee,je),S=S+Math.imul(ye,He)|0,R=Math.imul(ye,je),T=T+Math.imul(ge,ze)|0,S=S+Math.imul(ge,Ke)|0,S=S+Math.imul(ve,ze)|0,R=R+Math.imul(ve,Ke)|0,T=T+Math.imul(ue,Ve)|0,S=S+Math.imul(ue,Ge)|0,S=S+Math.imul(le,Ve)|0,R=R+Math.imul(le,Ge)|0,T=T+Math.imul($,Ze)|0,S=S+Math.imul($,We)|0,S=S+Math.imul(te,Ze)|0,R=R+Math.imul(te,We)|0,T=T+Math.imul(pe,Ye)|0,S=S+Math.imul(pe,$e)|0,S=S+Math.imul(q,Ye)|0,R=R+Math.imul(q,$e)|0,T=T+Math.imul(X,Xe)|0,S=S+Math.imul(X,Je)|0,S=S+Math.imul(ne,Xe)|0,R=R+Math.imul(ne,Je)|0;var nu=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(nu>>>26)|0,nu&=67108863,T=Math.imul(be,He),S=Math.imul(be,je),S=S+Math.imul(_e,He)|0,R=Math.imul(_e,je),T=T+Math.imul(Ee,ze)|0,S=S+Math.imul(Ee,Ke)|0,S=S+Math.imul(ye,ze)|0,R=R+Math.imul(ye,Ke)|0,T=T+Math.imul(ge,Ve)|0,S=S+Math.imul(ge,Ge)|0,S=S+Math.imul(ve,Ve)|0,R=R+Math.imul(ve,Ge)|0,T=T+Math.imul(ue,Ze)|0,S=S+Math.imul(ue,We)|0,S=S+Math.imul(le,Ze)|0,R=R+Math.imul(le,We)|0,T=T+Math.imul($,Ye)|0,S=S+Math.imul($,$e)|0,S=S+Math.imul(te,Ye)|0,R=R+Math.imul(te,$e)|0,T=T+Math.imul(pe,Xe)|0,S=S+Math.imul(pe,Je)|0,S=S+Math.imul(q,Xe)|0,R=R+Math.imul(q,Je)|0,T=T+Math.imul(X,Qe)|0,S=S+Math.imul(X,et)|0,S=S+Math.imul(ne,Qe)|0,R=R+Math.imul(ne,et)|0;var ou=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(ou>>>26)|0,ou&=67108863,T=Math.imul(Ce,He),S=Math.imul(Ce,je),S=S+Math.imul(Re,He)|0,R=Math.imul(Re,je),T=T+Math.imul(be,ze)|0,S=S+Math.imul(be,Ke)|0,S=S+Math.imul(_e,ze)|0,R=R+Math.imul(_e,Ke)|0,T=T+Math.imul(Ee,Ve)|0,S=S+Math.imul(Ee,Ge)|0,S=S+Math.imul(ye,Ve)|0,R=R+Math.imul(ye,Ge)|0,T=T+Math.imul(ge,Ze)|0,S=S+Math.imul(ge,We)|0,S=S+Math.imul(ve,Ze)|0,R=R+Math.imul(ve,We)|0,T=T+Math.imul(ue,Ye)|0,S=S+Math.imul(ue,$e)|0,S=S+Math.imul(le,Ye)|0,R=R+Math.imul(le,$e)|0,T=T+Math.imul($,Xe)|0,S=S+Math.imul($,Je)|0,S=S+Math.imul(te,Xe)|0,R=R+Math.imul(te,Je)|0,T=T+Math.imul(pe,Qe)|0,S=S+Math.imul(pe,et)|0,S=S+Math.imul(q,Qe)|0,R=R+Math.imul(q,et)|0,T=T+Math.imul(X,tt)|0,S=S+Math.imul(X,rt)|0,S=S+Math.imul(ne,tt)|0,R=R+Math.imul(ne,rt)|0;var au=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(au>>>26)|0,au&=67108863,T=Math.imul(De,He),S=Math.imul(De,je),S=S+Math.imul(qe,He)|0,R=Math.imul(qe,je),T=T+Math.imul(Ce,ze)|0,S=S+Math.imul(Ce,Ke)|0,S=S+Math.imul(Re,ze)|0,R=R+Math.imul(Re,Ke)|0,T=T+Math.imul(be,Ve)|0,S=S+Math.imul(be,Ge)|0,S=S+Math.imul(_e,Ve)|0,R=R+Math.imul(_e,Ge)|0,T=T+Math.imul(Ee,Ze)|0,S=S+Math.imul(Ee,We)|0,S=S+Math.imul(ye,Ze)|0,R=R+Math.imul(ye,We)|0,T=T+Math.imul(ge,Ye)|0,S=S+Math.imul(ge,$e)|0,S=S+Math.imul(ve,Ye)|0,R=R+Math.imul(ve,$e)|0,T=T+Math.imul(ue,Xe)|0,S=S+Math.imul(ue,Je)|0,S=S+Math.imul(le,Xe)|0,R=R+Math.imul(le,Je)|0,T=T+Math.imul($,Qe)|0,S=S+Math.imul($,et)|0,S=S+Math.imul(te,Qe)|0,R=R+Math.imul(te,et)|0,T=T+Math.imul(pe,tt)|0,S=S+Math.imul(pe,rt)|0,S=S+Math.imul(q,tt)|0,R=R+Math.imul(q,rt)|0,T=T+Math.imul(X,it)|0,S=S+Math.imul(X,nt)|0,S=S+Math.imul(ne,it)|0,R=R+Math.imul(ne,nt)|0;var su=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(su>>>26)|0,su&=67108863,T=Math.imul(Ue,He),S=Math.imul(Ue,je),S=S+Math.imul(Fe,He)|0,R=Math.imul(Fe,je),T=T+Math.imul(De,ze)|0,S=S+Math.imul(De,Ke)|0,S=S+Math.imul(qe,ze)|0,R=R+Math.imul(qe,Ke)|0,T=T+Math.imul(Ce,Ve)|0,S=S+Math.imul(Ce,Ge)|0,S=S+Math.imul(Re,Ve)|0,R=R+Math.imul(Re,Ge)|0,T=T+Math.imul(be,Ze)|0,S=S+Math.imul(be,We)|0,S=S+Math.imul(_e,Ze)|0,R=R+Math.imul(_e,We)|0,T=T+Math.imul(Ee,Ye)|0,S=S+Math.imul(Ee,$e)|0,S=S+Math.imul(ye,Ye)|0,R=R+Math.imul(ye,$e)|0,T=T+Math.imul(ge,Xe)|0,S=S+Math.imul(ge,Je)|0,S=S+Math.imul(ve,Xe)|0,R=R+Math.imul(ve,Je)|0,T=T+Math.imul(ue,Qe)|0,S=S+Math.imul(ue,et)|0,S=S+Math.imul(le,Qe)|0,R=R+Math.imul(le,et)|0,T=T+Math.imul($,tt)|0,S=S+Math.imul($,rt)|0,S=S+Math.imul(te,tt)|0,R=R+Math.imul(te,rt)|0,T=T+Math.imul(pe,it)|0,S=S+Math.imul(pe,nt)|0,S=S+Math.imul(q,it)|0,R=R+Math.imul(q,nt)|0,T=T+Math.imul(X,Jt)|0,S=S+Math.imul(X,Qt)|0,S=S+Math.imul(ne,Jt)|0,R=R+Math.imul(ne,Qt)|0;var uu=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(uu>>>26)|0,uu&=67108863,T=Math.imul(Ue,ze),S=Math.imul(Ue,Ke),S=S+Math.imul(Fe,ze)|0,R=Math.imul(Fe,Ke),T=T+Math.imul(De,Ve)|0,S=S+Math.imul(De,Ge)|0,S=S+Math.imul(qe,Ve)|0,R=R+Math.imul(qe,Ge)|0,T=T+Math.imul(Ce,Ze)|0,S=S+Math.imul(Ce,We)|0,S=S+Math.imul(Re,Ze)|0,R=R+Math.imul(Re,We)|0,T=T+Math.imul(be,Ye)|0,S=S+Math.imul(be,$e)|0,S=S+Math.imul(_e,Ye)|0,R=R+Math.imul(_e,$e)|0,T=T+Math.imul(Ee,Xe)|0,S=S+Math.imul(Ee,Je)|0,S=S+Math.imul(ye,Xe)|0,R=R+Math.imul(ye,Je)|0,T=T+Math.imul(ge,Qe)|0,S=S+Math.imul(ge,et)|0,S=S+Math.imul(ve,Qe)|0,R=R+Math.imul(ve,et)|0,T=T+Math.imul(ue,tt)|0,S=S+Math.imul(ue,rt)|0,S=S+Math.imul(le,tt)|0,R=R+Math.imul(le,rt)|0,T=T+Math.imul($,it)|0,S=S+Math.imul($,nt)|0,S=S+Math.imul(te,it)|0,R=R+Math.imul(te,nt)|0,T=T+Math.imul(pe,Jt)|0,S=S+Math.imul(pe,Qt)|0,S=S+Math.imul(q,Jt)|0,R=R+Math.imul(q,Qt)|0;var fu=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(fu>>>26)|0,fu&=67108863,T=Math.imul(Ue,Ve),S=Math.imul(Ue,Ge),S=S+Math.imul(Fe,Ve)|0,R=Math.imul(Fe,Ge),T=T+Math.imul(De,Ze)|0,S=S+Math.imul(De,We)|0,S=S+Math.imul(qe,Ze)|0,R=R+Math.imul(qe,We)|0,T=T+Math.imul(Ce,Ye)|0,S=S+Math.imul(Ce,$e)|0,S=S+Math.imul(Re,Ye)|0,R=R+Math.imul(Re,$e)|0,T=T+Math.imul(be,Xe)|0,S=S+Math.imul(be,Je)|0,S=S+Math.imul(_e,Xe)|0,R=R+Math.imul(_e,Je)|0,T=T+Math.imul(Ee,Qe)|0,S=S+Math.imul(Ee,et)|0,S=S+Math.imul(ye,Qe)|0,R=R+Math.imul(ye,et)|0,T=T+Math.imul(ge,tt)|0,S=S+Math.imul(ge,rt)|0,S=S+Math.imul(ve,tt)|0,R=R+Math.imul(ve,rt)|0,T=T+Math.imul(ue,it)|0,S=S+Math.imul(ue,nt)|0,S=S+Math.imul(le,it)|0,R=R+Math.imul(le,nt)|0,T=T+Math.imul($,Jt)|0,S=S+Math.imul($,Qt)|0,S=S+Math.imul(te,Jt)|0,R=R+Math.imul(te,Qt)|0;var cu=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(cu>>>26)|0,cu&=67108863,T=Math.imul(Ue,Ze),S=Math.imul(Ue,We),S=S+Math.imul(Fe,Ze)|0,R=Math.imul(Fe,We),T=T+Math.imul(De,Ye)|0,S=S+Math.imul(De,$e)|0,S=S+Math.imul(qe,Ye)|0,R=R+Math.imul(qe,$e)|0,T=T+Math.imul(Ce,Xe)|0,S=S+Math.imul(Ce,Je)|0,S=S+Math.imul(Re,Xe)|0,R=R+Math.imul(Re,Je)|0,T=T+Math.imul(be,Qe)|0,S=S+Math.imul(be,et)|0,S=S+Math.imul(_e,Qe)|0,R=R+Math.imul(_e,et)|0,T=T+Math.imul(Ee,tt)|0,S=S+Math.imul(Ee,rt)|0,S=S+Math.imul(ye,tt)|0,R=R+Math.imul(ye,rt)|0,T=T+Math.imul(ge,it)|0,S=S+Math.imul(ge,nt)|0,S=S+Math.imul(ve,it)|0,R=R+Math.imul(ve,nt)|0,T=T+Math.imul(ue,Jt)|0,S=S+Math.imul(ue,Qt)|0,S=S+Math.imul(le,Jt)|0,R=R+Math.imul(le,Qt)|0;var lu=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(lu>>>26)|0,lu&=67108863,T=Math.imul(Ue,Ye),S=Math.imul(Ue,$e),S=S+Math.imul(Fe,Ye)|0,R=Math.imul(Fe,$e),T=T+Math.imul(De,Xe)|0,S=S+Math.imul(De,Je)|0,S=S+Math.imul(qe,Xe)|0,R=R+Math.imul(qe,Je)|0,T=T+Math.imul(Ce,Qe)|0,S=S+Math.imul(Ce,et)|0,S=S+Math.imul(Re,Qe)|0,R=R+Math.imul(Re,et)|0,T=T+Math.imul(be,tt)|0,S=S+Math.imul(be,rt)|0,S=S+Math.imul(_e,tt)|0,R=R+Math.imul(_e,rt)|0,T=T+Math.imul(Ee,it)|0,S=S+Math.imul(Ee,nt)|0,S=S+Math.imul(ye,it)|0,R=R+Math.imul(ye,nt)|0,T=T+Math.imul(ge,Jt)|0,S=S+Math.imul(ge,Qt)|0,S=S+Math.imul(ve,Jt)|0,R=R+Math.imul(ve,Qt)|0;var hu=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(hu>>>26)|0,hu&=67108863,T=Math.imul(Ue,Xe),S=Math.imul(Ue,Je),S=S+Math.imul(Fe,Xe)|0,R=Math.imul(Fe,Je),T=T+Math.imul(De,Qe)|0,S=S+Math.imul(De,et)|0,S=S+Math.imul(qe,Qe)|0,R=R+Math.imul(qe,et)|0,T=T+Math.imul(Ce,tt)|0,S=S+Math.imul(Ce,rt)|0,S=S+Math.imul(Re,tt)|0,R=R+Math.imul(Re,rt)|0,T=T+Math.imul(be,it)|0,S=S+Math.imul(be,nt)|0,S=S+Math.imul(_e,it)|0,R=R+Math.imul(_e,nt)|0,T=T+Math.imul(Ee,Jt)|0,S=S+Math.imul(Ee,Qt)|0,S=S+Math.imul(ye,Jt)|0,R=R+Math.imul(ye,Qt)|0;var du=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(du>>>26)|0,du&=67108863,T=Math.imul(Ue,Qe),S=Math.imul(Ue,et),S=S+Math.imul(Fe,Qe)|0,R=Math.imul(Fe,et),T=T+Math.imul(De,tt)|0,S=S+Math.imul(De,rt)|0,S=S+Math.imul(qe,tt)|0,R=R+Math.imul(qe,rt)|0,T=T+Math.imul(Ce,it)|0,S=S+Math.imul(Ce,nt)|0,S=S+Math.imul(Re,it)|0,R=R+Math.imul(Re,nt)|0,T=T+Math.imul(be,Jt)|0,S=S+Math.imul(be,Qt)|0,S=S+Math.imul(_e,Jt)|0,R=R+Math.imul(_e,Qt)|0;var pu=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(pu>>>26)|0,pu&=67108863,T=Math.imul(Ue,tt),S=Math.imul(Ue,rt),S=S+Math.imul(Fe,tt)|0,R=Math.imul(Fe,rt),T=T+Math.imul(De,it)|0,S=S+Math.imul(De,nt)|0,S=S+Math.imul(qe,it)|0,R=R+Math.imul(qe,nt)|0,T=T+Math.imul(Ce,Jt)|0,S=S+Math.imul(Ce,Qt)|0,S=S+Math.imul(Re,Jt)|0,R=R+Math.imul(Re,Qt)|0;var C5=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(C5>>>26)|0,C5&=67108863,T=Math.imul(Ue,it),S=Math.imul(Ue,nt),S=S+Math.imul(Fe,it)|0,R=Math.imul(Fe,nt),T=T+Math.imul(De,Jt)|0,S=S+Math.imul(De,Qt)|0,S=S+Math.imul(qe,Jt)|0,R=R+Math.imul(qe,Qt)|0;var N5=(O+T|0)+((S&8191)<<13)|0;O=(R+(S>>>13)|0)+(N5>>>26)|0,N5&=67108863,T=Math.imul(Ue,Jt),S=Math.imul(Ue,Qt),S=S+Math.imul(Fe,Jt)|0,R=Math.imul(Fe,Qt);var D5=(O+T|0)+((S&8191)<<13)|0;return O=(R+(S>>>13)|0)+(D5>>>26)|0,D5&=67108863,d[0]=Qs,d[1]=eu,d[2]=tu,d[3]=ru,d[4]=iu,d[5]=nu,d[6]=ou,d[7]=au,d[8]=su,d[9]=uu,d[10]=fu,d[11]=cu,d[12]=lu,d[13]=hu,d[14]=du,d[15]=pu,d[16]=C5,d[17]=N5,d[18]=D5,O!==0&&(d[19]=O,_.length++),_};Math.imul||(L=D);function U(y,f,p){p.negative=f.negative^y.negative,p.length=y.length+f.length;for(var _=0,x=0,b=0;b<p.length-1;b++){var d=x;x=0;for(var O=_&67108863,T=Math.min(b,f.length-1),S=Math.max(0,b-y.length+1);S<=T;S++){var R=b-S,Y=y.words[R]|0,X=f.words[S]|0,ne=Y*X,ce=ne&67108863;d=d+(ne/67108864|0)|0,ce=ce+O|0,O=ce&67108863,d=d+(ce>>>26)|0,x+=d>>>26,d&=67108863}p.words[b]=O,_=d,d=x}return _!==0?p.words[b]=_:p.length--,p._strip()}function K(y,f,p){return U(y,f,p)}n.prototype.mulTo=function(f,p){var _,x=this.length+f.length;return this.length===10&&f.length===10?_=L(this,f,p):x<63?_=D(this,f,p):x<1024?_=U(this,f,p):_=K(this,f,p),_};function C(y,f){this.x=y,this.y=f}C.prototype.makeRBT=function(f){for(var p=new Array(f),_=n.prototype._countBits(f)-1,x=0;x<f;x++)p[x]=this.revBin(x,_,f);return p},C.prototype.revBin=function(f,p,_){if(f===0||f===_-1)return f;for(var x=0,b=0;b<p;b++)x|=(f&1)<<p-b-1,f>>=1;return x},C.prototype.permute=function(f,p,_,x,b,d){for(var O=0;O<d;O++)x[O]=p[f[O]],b[O]=_[f[O]]},C.prototype.transform=function(f,p,_,x,b,d){this.permute(d,f,p,_,x,b);for(var O=1;O<b;O<<=1)for(var T=O<<1,S=Math.cos(2*Math.PI/T),R=Math.sin(2*Math.PI/T),Y=0;Y<b;Y+=T)for(var X=S,ne=R,ce=0;ce<O;ce++){var pe=_[Y+ce],q=x[Y+ce],W=_[Y+ce+O],$=x[Y+ce+O],te=X*W-ne*$;$=X*$+ne*W,W=te,_[Y+ce]=pe+W,x[Y+ce]=q+$,_[Y+ce+O]=pe-W,x[Y+ce+O]=q-$,ce!==T&&(te=S*X-R*ne,ne=S*ne+R*X,X=te)}},C.prototype.guessLen13b=function(f,p){var _=Math.max(p,f)|1,x=_&1,b=0;for(_=_/2|0;_;_=_>>>1)b++;return 1<<b+1+x},C.prototype.conjugate=function(f,p,_){if(!(_<=1))for(var x=0;x<_/2;x++){var b=f[x];f[x]=f[_-x-1],f[_-x-1]=b,b=p[x],p[x]=-p[_-x-1],p[_-x-1]=-b}},C.prototype.normalize13b=function(f,p){for(var _=0,x=0;x<p/2;x++){var b=Math.round(f[2*x+1]/p)*8192+Math.round(f[2*x]/p)+_;f[x]=b&67108863,b<67108864?_=0:_=b/67108864|0}return f},C.prototype.convert13b=function(f,p,_,x){for(var b=0,d=0;d<p;d++)b=b+(f[d]|0),_[2*d]=b&8191,b=b>>>13,_[2*d+1]=b&8191,b=b>>>13;for(d=2*p;d<x;++d)_[d]=0;r(b===0),r((b&-8192)===0)},C.prototype.stub=function(f){for(var p=new Array(f),_=0;_<f;_++)p[_]=0;return p},C.prototype.mulp=function(f,p,_){var x=2*this.guessLen13b(f.length,p.length),b=this.makeRBT(x),d=this.stub(x),O=new Array(x),T=new Array(x),S=new Array(x),R=new Array(x),Y=new Array(x),X=new Array(x),ne=_.words;ne.length=x,this.convert13b(f.words,f.length,O,x),this.convert13b(p.words,p.length,R,x),this.transform(O,d,T,S,x,b),this.transform(R,d,Y,X,x,b);for(var ce=0;ce<x;ce++){var pe=T[ce]*Y[ce]-S[ce]*X[ce];S[ce]=T[ce]*X[ce]+S[ce]*Y[ce],T[ce]=pe}return this.conjugate(T,S,x),this.transform(T,S,ne,d,x,b),this.conjugate(ne,d,x),this.normalize13b(ne,x),_.negative=f.negative^p.negative,_.length=f.length+p.length,_._strip()},n.prototype.mul=function(f){var p=new n(null);return p.words=new Array(this.length+f.length),this.mulTo(f,p)},n.prototype.mulf=function(f){var p=new n(null);return p.words=new Array(this.length+f.length),K(this,f,p)},n.prototype.imul=function(f){return this.clone().mulTo(f,this)},n.prototype.imuln=function(f){var p=f<0;p&&(f=-f),r(typeof f=="number"),r(f<67108864);for(var _=0,x=0;x<this.length;x++){var b=(this.words[x]|0)*f,d=(b&67108863)+(_&67108863);_>>=26,_+=b/67108864|0,_+=d>>>26,this.words[x]=d&67108863}return _!==0&&(this.words[x]=_,this.length++),this.length=f===0?1:this.length,p?this.ineg():this},n.prototype.muln=function(f){return this.clone().imuln(f)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(f){var p=M(f);if(p.length===0)return new n(1);for(var _=this,x=0;x<p.length&&p[x]===0;x++,_=_.sqr());if(++x<p.length)for(var b=_.sqr();x<p.length;x++,b=b.sqr())p[x]!==0&&(_=_.mul(b));return _},n.prototype.iushln=function(f){r(typeof f=="number"&&f>=0);var p=f%26,_=(f-p)/26,x=67108863>>>26-p<<26-p,b;if(p!==0){var d=0;for(b=0;b<this.length;b++){var O=this.words[b]&x,T=(this.words[b]|0)-O<<p;this.words[b]=T|d,d=O>>>26-p}d&&(this.words[b]=d,this.length++)}if(_!==0){for(b=this.length-1;b>=0;b--)this.words[b+_]=this.words[b];for(b=0;b<_;b++)this.words[b]=0;this.length+=_}return this._strip()},n.prototype.ishln=function(f){return r(this.negative===0),this.iushln(f)},n.prototype.iushrn=function(f,p,_){r(typeof f=="number"&&f>=0);var x;p?x=(p-p%26)/26:x=0;var b=f%26,d=Math.min((f-b)/26,this.length),O=67108863^67108863>>>b<<b,T=_;if(x-=d,x=Math.max(0,x),T){for(var S=0;S<d;S++)T.words[S]=this.words[S];T.length=d}if(d!==0)if(this.length>d)for(this.length-=d,S=0;S<this.length;S++)this.words[S]=this.words[S+d];else this.words[0]=0,this.length=1;var R=0;for(S=this.length-1;S>=0&&(R!==0||S>=x);S--){var Y=this.words[S]|0;this.words[S]=R<<26-b|Y>>>b,R=Y&O}return T&&R!==0&&(T.words[T.length++]=R),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},n.prototype.ishrn=function(f,p,_){return r(this.negative===0),this.iushrn(f,p,_)},n.prototype.shln=function(f){return this.clone().ishln(f)},n.prototype.ushln=function(f){return this.clone().iushln(f)},n.prototype.shrn=function(f){return this.clone().ishrn(f)},n.prototype.ushrn=function(f){return this.clone().iushrn(f)},n.prototype.testn=function(f){r(typeof f=="number"&&f>=0);var p=f%26,_=(f-p)/26,x=1<<p;if(this.length<=_)return!1;var b=this.words[_];return!!(b&x)},n.prototype.imaskn=function(f){r(typeof f=="number"&&f>=0);var p=f%26,_=(f-p)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=_)return this;if(p!==0&&_++,this.length=Math.min(_,this.length),p!==0){var x=67108863^67108863>>>p<<p;this.words[this.length-1]&=x}return this.length===0&&(this.words[0]=0,this.length=1),this._strip()},n.prototype.maskn=function(f){return this.clone().imaskn(f)},n.prototype.iaddn=function(f){return r(typeof f=="number"),r(f<67108864),f<0?this.isubn(-f):this.negative!==0?this.length===1&&(this.words[0]|0)<=f?(this.words[0]=f-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(f),this.negative=1,this):this._iaddn(f)},n.prototype._iaddn=function(f){this.words[0]+=f;for(var p=0;p<this.length&&this.words[p]>=67108864;p++)this.words[p]-=67108864,p===this.length-1?this.words[p+1]=1:this.words[p+1]++;return this.length=Math.max(this.length,p+1),this},n.prototype.isubn=function(f){if(r(typeof f=="number"),r(f<67108864),f<0)return this.iaddn(-f);if(this.negative!==0)return this.negative=0,this.iaddn(f),this.negative=1,this;if(this.words[0]-=f,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var p=0;p<this.length&&this.words[p]<0;p++)this.words[p]+=67108864,this.words[p+1]-=1;return this._strip()},n.prototype.addn=function(f){return this.clone().iaddn(f)},n.prototype.subn=function(f){return this.clone().isubn(f)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(f,p,_){var x=f.length+_,b;this._expand(x);var d,O=0;for(b=0;b<f.length;b++){d=(this.words[b+_]|0)+O;var T=(f.words[b]|0)*p;d-=T&67108863,O=(d>>26)-(T/67108864|0),this.words[b+_]=d&67108863}for(;b<this.length-_;b++)d=(this.words[b+_]|0)+O,O=d>>26,this.words[b+_]=d&67108863;if(O===0)return this._strip();for(r(O===-1),O=0,b=0;b<this.length;b++)d=-(this.words[b]|0)+O,O=d>>26,this.words[b]=d&67108863;return this.negative=1,this._strip()},n.prototype._wordDiv=function(f,p){var _=this.length-f.length,x=this.clone(),b=f,d=b.words[b.length-1]|0,O=this._countBits(d);_=26-O,_!==0&&(b=b.ushln(_),x.iushln(_),d=b.words[b.length-1]|0);var T=x.length-b.length,S;if(p!=="mod"){S=new n(null),S.length=T+1,S.words=new Array(S.length);for(var R=0;R<S.length;R++)S.words[R]=0}var Y=x.clone()._ishlnsubmul(b,1,T);Y.negative===0&&(x=Y,S&&(S.words[T]=1));for(var X=T-1;X>=0;X--){var ne=(x.words[b.length+X]|0)*67108864+(x.words[b.length+X-1]|0);for(ne=Math.min(ne/d|0,67108863),x._ishlnsubmul(b,ne,X);x.negative!==0;)ne--,x.negative=0,x._ishlnsubmul(b,1,X),x.isZero()||(x.negative^=1);S&&(S.words[X]=ne)}return S&&S._strip(),x._strip(),p!=="div"&&_!==0&&x.iushrn(_),{div:S||null,mod:x}},n.prototype.divmod=function(f,p,_){if(r(!f.isZero()),this.isZero())return{div:new n(0),mod:new n(0)};var x,b,d;return this.negative!==0&&f.negative===0?(d=this.neg().divmod(f,p),p!=="mod"&&(x=d.div.neg()),p!=="div"&&(b=d.mod.neg(),_&&b.negative!==0&&b.iadd(f)),{div:x,mod:b}):this.negative===0&&f.negative!==0?(d=this.divmod(f.neg(),p),p!=="mod"&&(x=d.div.neg()),{div:x,mod:d.mod}):(this.negative&f.negative)!==0?(d=this.neg().divmod(f.neg(),p),p!=="div"&&(b=d.mod.neg(),_&&b.negative!==0&&b.isub(f)),{div:d.div,mod:b}):f.length>this.length||this.cmp(f)<0?{div:new n(0),mod:this}:f.length===1?p==="div"?{div:this.divn(f.words[0]),mod:null}:p==="mod"?{div:null,mod:new n(this.modrn(f.words[0]))}:{div:this.divn(f.words[0]),mod:new n(this.modrn(f.words[0]))}:this._wordDiv(f,p)},n.prototype.div=function(f){return this.divmod(f,"div",!1).div},n.prototype.mod=function(f){return this.divmod(f,"mod",!1).mod},n.prototype.umod=function(f){return this.divmod(f,"mod",!0).mod},n.prototype.divRound=function(f){var p=this.divmod(f);if(p.mod.isZero())return p.div;var _=p.div.negative!==0?p.mod.isub(f):p.mod,x=f.ushrn(1),b=f.andln(1),d=_.cmp(x);return d<0||b===1&&d===0?p.div:p.div.negative!==0?p.div.isubn(1):p.div.iaddn(1)},n.prototype.modrn=function(f){var p=f<0;p&&(f=-f),r(f<=67108863);for(var _=(1<<26)%f,x=0,b=this.length-1;b>=0;b--)x=(_*x+(this.words[b]|0))%f;return p?-x:x},n.prototype.modn=function(f){return this.modrn(f)},n.prototype.idivn=function(f){var p=f<0;p&&(f=-f),r(f<=67108863);for(var _=0,x=this.length-1;x>=0;x--){var b=(this.words[x]|0)+_*67108864;this.words[x]=b/f|0,_=b%f}return this._strip(),p?this.ineg():this},n.prototype.divn=function(f){return this.clone().idivn(f)},n.prototype.egcd=function(f){r(f.negative===0),r(!f.isZero());var p=this,_=f.clone();p.negative!==0?p=p.umod(f):p=p.clone();for(var x=new n(1),b=new n(0),d=new n(0),O=new n(1),T=0;p.isEven()&&_.isEven();)p.iushrn(1),_.iushrn(1),++T;for(var S=_.clone(),R=p.clone();!p.isZero();){for(var Y=0,X=1;(p.words[0]&X)===0&&Y<26;++Y,X<<=1);if(Y>0)for(p.iushrn(Y);Y-- >0;)(x.isOdd()||b.isOdd())&&(x.iadd(S),b.isub(R)),x.iushrn(1),b.iushrn(1);for(var ne=0,ce=1;(_.words[0]&ce)===0&&ne<26;++ne,ce<<=1);if(ne>0)for(_.iushrn(ne);ne-- >0;)(d.isOdd()||O.isOdd())&&(d.iadd(S),O.isub(R)),d.iushrn(1),O.iushrn(1);p.cmp(_)>=0?(p.isub(_),x.isub(d),b.isub(O)):(_.isub(p),d.isub(x),O.isub(b))}return{a:d,b:O,gcd:_.iushln(T)}},n.prototype._invmp=function(f){r(f.negative===0),r(!f.isZero());var p=this,_=f.clone();p.negative!==0?p=p.umod(f):p=p.clone();for(var x=new n(1),b=new n(0),d=_.clone();p.cmpn(1)>0&&_.cmpn(1)>0;){for(var O=0,T=1;(p.words[0]&T)===0&&O<26;++O,T<<=1);if(O>0)for(p.iushrn(O);O-- >0;)x.isOdd()&&x.iadd(d),x.iushrn(1);for(var S=0,R=1;(_.words[0]&R)===0&&S<26;++S,R<<=1);if(S>0)for(_.iushrn(S);S-- >0;)b.isOdd()&&b.iadd(d),b.iushrn(1);p.cmp(_)>=0?(p.isub(_),x.isub(b)):(_.isub(p),b.isub(x))}var Y;return p.cmpn(1)===0?Y=x:Y=b,Y.cmpn(0)<0&&Y.iadd(f),Y},n.prototype.gcd=function(f){if(this.isZero())return f.abs();if(f.isZero())return this.abs();var p=this.clone(),_=f.clone();p.negative=0,_.negative=0;for(var x=0;p.isEven()&&_.isEven();x++)p.iushrn(1),_.iushrn(1);do{for(;p.isEven();)p.iushrn(1);for(;_.isEven();)_.iushrn(1);var b=p.cmp(_);if(b<0){var d=p;p=_,_=d}else if(b===0||_.cmpn(1)===0)break;p.isub(_)}while(!0);return _.iushln(x)},n.prototype.invm=function(f){return this.egcd(f).a.umod(f)},n.prototype.isEven=function(){return(this.words[0]&1)===0},n.prototype.isOdd=function(){return(this.words[0]&1)===1},n.prototype.andln=function(f){return this.words[0]&f},n.prototype.bincn=function(f){r(typeof f=="number");var p=f%26,_=(f-p)/26,x=1<<p;if(this.length<=_)return this._expand(_+1),this.words[_]|=x,this;for(var b=x,d=_;b!==0&&d<this.length;d++){var O=this.words[d]|0;O+=b,b=O>>>26,O&=67108863,this.words[d]=O}return b!==0&&(this.words[d]=b,this.length++),this},n.prototype.isZero=function(){return this.length===1&&this.words[0]===0},n.prototype.cmpn=function(f){var p=f<0;if(this.negative!==0&&!p)return-1;if(this.negative===0&&p)return 1;this._strip();var _;if(this.length>1)_=1;else{p&&(f=-f),r(f<=67108863,"Number is too big");var x=this.words[0]|0;_=x===f?0:x<f?-1:1}return this.negative!==0?-_|0:_},n.prototype.cmp=function(f){if(this.negative!==0&&f.negative===0)return-1;if(this.negative===0&&f.negative!==0)return 1;var p=this.ucmp(f);return this.negative!==0?-p|0:p},n.prototype.ucmp=function(f){if(this.length>f.length)return 1;if(this.length<f.length)return-1;for(var p=0,_=this.length-1;_>=0;_--){var x=this.words[_]|0,b=f.words[_]|0;if(x!==b){x<b?p=-1:x>b&&(p=1);break}}return p},n.prototype.gtn=function(f){return this.cmpn(f)===1},n.prototype.gt=function(f){return this.cmp(f)===1},n.prototype.gten=function(f){return this.cmpn(f)>=0},n.prototype.gte=function(f){return this.cmp(f)>=0},n.prototype.ltn=function(f){return this.cmpn(f)===-1},n.prototype.lt=function(f){return this.cmp(f)===-1},n.prototype.lten=function(f){return this.cmpn(f)<=0},n.prototype.lte=function(f){return this.cmp(f)<=0},n.prototype.eqn=function(f){return this.cmpn(f)===0},n.prototype.eq=function(f){return this.cmp(f)===0},n.red=function(f){return new g(f)},n.prototype.toRed=function(f){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),f.convertTo(this)._forceRed(f)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(f){return this.red=f,this},n.prototype.forceRed=function(f){return r(!this.red,"Already a number in reduction context"),this._forceRed(f)},n.prototype.redAdd=function(f){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,f)},n.prototype.redIAdd=function(f){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,f)},n.prototype.redSub=function(f){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,f)},n.prototype.redISub=function(f){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,f)},n.prototype.redShl=function(f){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,f)},n.prototype.redMul=function(f){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.mul(this,f)},n.prototype.redIMul=function(f){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.imul(this,f)},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(f){return r(this.red&&!f.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,f)};var N={k256:null,p224:null,p192:null,p25519:null};function F(y,f){this.name=y,this.p=new n(f,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}F.prototype._tmp=function(){var f=new n(null);return f.words=new Array(Math.ceil(this.n/13)),f},F.prototype.ireduce=function(f){var p=f,_;do this.split(p,this.tmp),p=this.imulK(p),p=p.iadd(this.tmp),_=p.bitLength();while(_>this.n);var x=_<this.n?-1:p.ucmp(this.p);return x===0?(p.words[0]=0,p.length=1):x>0?p.isub(this.p):p.strip!==void 0?p.strip():p._strip(),p},F.prototype.split=function(f,p){f.iushrn(this.n,0,p)},F.prototype.imulK=function(f){return f.imul(this.k)};function H(){F.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(H,F),H.prototype.split=function(f,p){for(var _=4194303,x=Math.min(f.length,9),b=0;b<x;b++)p.words[b]=f.words[b];if(p.length=x,f.length<=9){f.words[0]=0,f.length=1;return}var d=f.words[9];for(p.words[p.length++]=d&_,b=10;b<f.length;b++){var O=f.words[b]|0;f.words[b-10]=(O&_)<<4|d>>>22,d=O}d>>>=22,f.words[b-10]=d,d===0&&f.length>10?f.length-=10:f.length-=9},H.prototype.imulK=function(f){f.words[f.length]=0,f.words[f.length+1]=0,f.length+=2;for(var p=0,_=0;_<f.length;_++){var x=f.words[_]|0;p+=x*977,f.words[_]=p&67108863,p=x*64+(p/67108864|0)}return f.words[f.length-1]===0&&(f.length--,f.words[f.length-1]===0&&f.length--),f};function z(){F.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(z,F);function G(){F.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(G,F);function B(){F.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(B,F),B.prototype.imulK=function(f){for(var p=0,_=0;_<f.length;_++){var x=(f.words[_]|0)*19+p,b=x&67108863;x>>>=26,f.words[_]=b,p=x}return p!==0&&(f.words[f.length++]=p),f},n._prime=function(f){if(N[f])return N[f];var p;if(f==="k256")p=new H;else if(f==="p224")p=new z;else if(f==="p192")p=new G;else if(f==="p25519")p=new B;else throw new Error("Unknown prime "+f);return N[f]=p,p};function g(y){if(typeof y=="string"){var f=n._prime(y);this.m=f.p,this.prime=f}else r(y.gtn(1),"modulus must be greater than 1"),this.m=y,this.prime=null}g.prototype._verify1=function(f){r(f.negative===0,"red works only with positives"),r(f.red,"red works only with red numbers")},g.prototype._verify2=function(f,p){r((f.negative|p.negative)===0,"red works only with positives"),r(f.red&&f.red===p.red,"red works only with red numbers")},g.prototype.imod=function(f){return this.prime?this.prime.ireduce(f)._forceRed(this):(c(f,f.umod(this.m)._forceRed(this)),f)},g.prototype.neg=function(f){return f.isZero()?f.clone():this.m.sub(f)._forceRed(this)},g.prototype.add=function(f,p){this._verify2(f,p);var _=f.add(p);return _.cmp(this.m)>=0&&_.isub(this.m),_._forceRed(this)},g.prototype.iadd=function(f,p){this._verify2(f,p);var _=f.iadd(p);return _.cmp(this.m)>=0&&_.isub(this.m),_},g.prototype.sub=function(f,p){this._verify2(f,p);var _=f.sub(p);return _.cmpn(0)<0&&_.iadd(this.m),_._forceRed(this)},g.prototype.isub=function(f,p){this._verify2(f,p);var _=f.isub(p);return _.cmpn(0)<0&&_.iadd(this.m),_},g.prototype.shl=function(f,p){return this._verify1(f),this.imod(f.ushln(p))},g.prototype.imul=function(f,p){return this._verify2(f,p),this.imod(f.imul(p))},g.prototype.mul=function(f,p){return this._verify2(f,p),this.imod(f.mul(p))},g.prototype.isqr=function(f){return this.imul(f,f.clone())},g.prototype.sqr=function(f){return this.mul(f,f)},g.prototype.sqrt=function(f){if(f.isZero())return f.clone();var p=this.m.andln(3);if(r(p%2===1),p===3){var _=this.m.add(new n(1)).iushrn(2);return this.pow(f,_)}for(var x=this.m.subn(1),b=0;!x.isZero()&&x.andln(1)===0;)b++,x.iushrn(1);r(!x.isZero());var d=new n(1).toRed(this),O=d.redNeg(),T=this.m.subn(1).iushrn(1),S=this.m.bitLength();for(S=new n(2*S*S).toRed(this);this.pow(S,T).cmp(O)!==0;)S.redIAdd(O);for(var R=this.pow(S,x),Y=this.pow(f,x.addn(1).iushrn(1)),X=this.pow(f,x),ne=b;X.cmp(d)!==0;){for(var ce=X,pe=0;ce.cmp(d)!==0;pe++)ce=ce.redSqr();r(pe<ne);var q=this.pow(R,new n(1).iushln(ne-pe-1));Y=Y.redMul(q),R=q.redSqr(),X=X.redMul(R),ne=pe}return Y},g.prototype.invm=function(f){var p=f._invmp(this.m);return p.negative!==0?(p.negative=0,this.imod(p).redNeg()):this.imod(p)},g.prototype.pow=function(f,p){if(p.isZero())return new n(1).toRed(this);if(p.cmpn(1)===0)return f.clone();var _=4,x=new Array(1<<_);x[0]=new n(1).toRed(this),x[1]=f;for(var b=2;b<x.length;b++)x[b]=this.mul(x[b-1],f);var d=x[0],O=0,T=0,S=p.bitLength()%26;for(S===0&&(S=26),b=p.length-1;b>=0;b--){for(var R=p.words[b],Y=S-1;Y>=0;Y--){var X=R>>Y&1;if(d!==x[0]&&(d=this.sqr(d)),X===0&&O===0){T=0;continue}O<<=1,O|=X,T++,!(T!==_&&(b!==0||Y!==0))&&(d=this.mul(d,x[O]),T=0,O=0)}S=26}return d},g.prototype.convertTo=function(f){var p=f.umod(this.m);return p===f?p.clone():p},g.prototype.convertFrom=function(f){var p=f.clone();return p.red=null,p},n.mont=function(f){return new I(f)};function I(y){g.call(this,y),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(I,g),I.prototype.convertTo=function(f){return this.imod(f.ushln(this.shift))},I.prototype.convertFrom=function(f){var p=this.imod(f.mul(this.rinv));return p.red=null,p},I.prototype.imul=function(f,p){if(f.isZero()||p.isZero())return f.words[0]=0,f.length=1,f;var _=f.imul(p),x=_.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),b=_.isub(x).iushrn(this.shift),d=b;return b.cmp(this.m)>=0?d=b.isub(this.m):b.cmpn(0)<0&&(d=b.iadd(this.m)),d._forceRed(this)},I.prototype.mul=function(f,p){if(f.isZero()||p.isZero())return new n(0)._forceRed(this);var _=f.mul(p),x=_.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),b=_.isub(x).iushrn(this.shift),d=b;return b.cmp(this.m)>=0?d=b.isub(this.m):b.cmpn(0)<0&&(d=b.iadd(this.m)),d._forceRed(this)},I.prototype.invm=function(f){var p=this.imod(f._invmp(this.m).mul(this.r2));return p._forceRed(this)}})(typeof Mm>"u"||Mm,BI)});var Cm=k((T1e,DI)=>{"use strict";v();var Rc=MI(),jY=bu(),zY=ot().Buffer;function CI(e){var t=e.modulus.byteLength(),r;do r=new Rc(jY(t));while(r.cmp(e.modulus)>=0||!r.umod(e.prime1)||!r.umod(e.prime2));return r}function KY(e){var t=CI(e),r=t.toRed(Rc.mont(e.modulus)).redPow(new Rc(e.publicExponent)).fromRed();return{blinder:r,unblinder:t.invm(e.modulus)}}function NI(e,t){var r=KY(t),i=t.modulus.byteLength(),n=new Rc(e).mul(r.blinder).umod(t.modulus),o=n.toRed(Rc.mont(t.prime1)),a=n.toRed(Rc.mont(t.prime2)),s=t.coefficient,u=t.prime1,c=t.prime2,l=o.redPow(t.exponent1).fromRed(),m=a.redPow(t.exponent2).fromRed(),w=l.isub(m).imul(s).umod(u).imul(c);return m.iadd(w).imul(r.unblinder).umod(t.modulus).toArrayLike(zY,"be",i)}NI.getr=CI;DI.exports=NI});var FI=k((R1e,UI)=>{v();var VY=Pm(),Nm=bu(),GY=Hh(),LI=km(),qI=Rm(),Dm=Cn(),ZY=Bm(),WY=Cm(),Un=ot().Buffer;UI.exports=function(t,r,i){var n;t.padding?n=t.padding:i?n=1:n=4;var o=VY(t),a;if(n===4)a=YY(o,r);else if(n===1)a=$Y(o,r,i);else if(n===3){if(a=new Dm(r),a.cmp(o.modulus)>=0)throw new Error("data too long for modulus")}else throw new Error("unknown padding");return i?WY(a,o):ZY(a,o)};function YY(e,t){var r=e.modulus.byteLength(),i=t.length,n=GY("sha1").update(Un.alloc(0)).digest(),o=n.length,a=2*o;if(i>r-a-2)throw new Error("message too long");var s=Un.alloc(r-i-a-2),u=r-o-1,c=Nm(o),l=qI(Un.concat([n,s,Un.alloc(1,1),t],u),LI(c,u)),m=qI(c,LI(l,o));return new Dm(Un.concat([Un.alloc(1),m,l],r))}function $Y(e,t,r){var i=t.length,n=e.modulus.byteLength();if(i>n-11)throw new Error("message too long");var o;return r?o=Un.alloc(n-i-3,255):o=XY(n-i-3),new Dm(Un.concat([Un.from([0,r?1:2]),o,Un.alloc(1),t],n))}function XY(e){for(var t=Un.allocUnsafe(e),r=0,i=Nm(e*2),n=0,o;r<e;)n===i.length&&(i=Nm(e*2),n=0),o=i[n++],o&&(t[r++]=o);return t}});var VI=k((M1e,KI)=>{v();var JY=Pm(),HI=km(),jI=Rm(),zI=Cn(),QY=Cm(),e$=Hh(),t$=Bm(),Qh=ot().Buffer;KI.exports=function(t,r,i){var n;t.padding?n=t.padding:i?n=1:n=4;var o=JY(t),a=o.modulus.byteLength();if(r.length>a||new zI(r).cmp(o.modulus)>=0)throw new Error("decryption error");var s;i?s=t$(new zI(r),o):s=QY(r,o);var u=Qh.alloc(a-s.length);if(s=Qh.concat([u,s],a),n===4)return r$(o,s);if(n===1)return i$(o,s,i);if(n===3)return s;throw new Error("unknown padding")};function r$(e,t){var r=e.modulus.byteLength(),i=e$("sha1").update(Qh.alloc(0)).digest(),n=i.length;if(t[0]!==0)throw new Error("decryption error");var o=t.slice(1,n+1),a=t.slice(n+1),s=jI(o,HI(a,n)),u=jI(a,HI(s,r-n-1));if(n$(i,u.slice(0,n)))throw new Error("decryption error");for(var c=n;u[c]===0;)c++;if(u[c++]!==1)throw new Error("decryption error");return u.slice(c)}function i$(e,t,r){for(var i=t.slice(0,2),n=2,o=0;t[n++]!==0;)if(n>=t.length){o++;break}var a=t.slice(2,n-1);if((i.toString("hex")!=="0002"&&!r||i.toString("hex")!=="0001"&&r)&&o++,a.length<8&&o++,o)throw new Error("decryption error");return t.slice(n)}function n$(e,t){e=Qh.from(e),t=Qh.from(t);var r=0,i=e.length;e.length!==t.length&&(r++,i=Math.min(e.length,t.length));for(var n=-1;++n<i;)r+=e[n]^t[n];return r}});var GI=k(Ku=>{v();Ku.publicEncrypt=FI();Ku.privateDecrypt=VI();Ku.privateEncrypt=function(t,r){return Ku.publicEncrypt(t,r,!0)};Ku.publicDecrypt=function(t,r){return Ku.privateDecrypt(t,r,!0)}});var rO=k(e0=>{"use strict";v();function ZI(){throw new Error(`secure random number generation not supported by this browser
|
|
15
15
|
use chrome, FireFox or Internet Explorer 11`)}var YI=ot(),WI=bu(),$I=YI.Buffer,XI=YI.kMaxLength,Lm=globalThis.crypto||globalThis.msCrypto,JI=Math.pow(2,32)-1;function QI(e,t){if(typeof e!="number"||e!==e)throw new TypeError("offset must be a number");if(e>JI||e<0)throw new TypeError("offset must be a uint32");if(e>XI||e>t)throw new RangeError("offset out of range")}function eO(e,t,r){if(typeof e!="number"||e!==e)throw new TypeError("size must be a number");if(e>JI||e<0)throw new TypeError("size must be a uint32");if(e+t>r||e>XI)throw new RangeError("buffer too small")}Lm&&Lm.getRandomValues||!A.default.browser?(e0.randomFill=o$,e0.randomFillSync=a$):(e0.randomFill=ZI,e0.randomFillSync=ZI);function o$(e,t,r,i){if(!$I.isBuffer(e)&&!(e instanceof globalThis.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof t=="function")i=t,t=0,r=e.length;else if(typeof r=="function")i=r,r=e.length-t;else if(typeof i!="function")throw new TypeError('"cb" argument must be a function');return QI(t,e.length),eO(r,t,e.length),tO(e,t,r,i)}function tO(e,t,r,i){if(A.default.browser){var n=e.buffer,o=new Uint8Array(n,t,r);if(Lm.getRandomValues(o),i){A.default.nextTick(function(){i(null,e)});return}return e}if(i){WI(r,function(s,u){if(s)return i(s);u.copy(e,t),i(null,e)});return}var a=WI(r);return a.copy(e,t),e}function a$(e,t,r){if(typeof t>"u"&&(t=0),!$I.isBuffer(e)&&!(e instanceof globalThis.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return QI(t,e.length),r===void 0&&(r=e.length-t),eO(r,t,e.length),tO(e,t,r)}});var _r=k(at=>{"use strict";v();at.randomBytes=at.rng=at.pseudoRandomBytes=at.prng=bu();at.createHash=at.Hash=Hh();at.createHmac=at.Hmac=JS();var s$=fs(),u$=Object.keys(s$),f$=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(u$);at.getHashes=function(){return f$};var iO=Lv();at.pbkdf2=iO.pbkdf2;at.pbkdf2Sync=iO.pbkdf2Sync;var Eo=xE();at.Cipher=Eo.Cipher;at.createCipher=Eo.createCipher;at.Cipheriv=Eo.Cipheriv;at.createCipheriv=Eo.createCipheriv;at.Decipher=Eo.Decipher;at.createDecipher=Eo.createDecipher;at.Decipheriv=Eo.Decipheriv;at.createDecipheriv=Eo.createDecipheriv;at.getCiphers=Eo.getCiphers;at.listCiphers=Eo.listCiphers;var t0=LE();at.DiffieHellmanGroup=t0.DiffieHellmanGroup;at.createDiffieHellmanGroup=t0.createDiffieHellmanGroup;at.getDiffieHellman=t0.getDiffieHellman;at.createDiffieHellman=t0.createDiffieHellman;at.DiffieHellman=t0.DiffieHellman;var K2=fs();at.createSign=K2.createSign;at.Sign=K2.Sign;at.createVerify=K2.createVerify;at.Verify=K2.Verify;at.createECDH=fs();var V2=GI();at.publicEncrypt=V2.publicEncrypt;at.privateEncrypt=V2.privateEncrypt;at.publicDecrypt=V2.publicDecrypt;at.privateDecrypt=V2.privateDecrypt;var nO=rO();at.randomFill=nO.randomFill;at.randomFillSync=nO.randomFillSync;at.createCredentials=function(){throw new Error(`sorry, createCredentials is not implemented yet
|
|
16
16
|
we accept pull requests
|
|
17
|
-
https://github.com/browserify/crypto-browserify`)};at.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 ds=k((H1e,oO)=>{"use strict";v();function Bc(){}Bc.getRandomBuffer=function(e){return A.default.browser?Bc.getRandomBufferBrowser(e):Bc.getRandomBufferNode(e)};Bc.getRandomBufferNode=function(e){var t=_r();return t.randomBytes(e)};Bc.getRandomBufferBrowser=function(e){if(!window.crypto&&!window.msCrypto)throw new Error("window.crypto not available");var t;if(window.crypto&&window.crypto.getRandomValues)t=window.crypto;else if(window.msCrypto&&window.msCrypto.getRandomValues)t=window.msCrypto;else throw new Error("window.crypto.getRandomValues not available");var r=new Uint8Array(e);t.getRandomValues(r);var i=h.Buffer.from(r);return i};oO.exports=Bc});var Et=k((z1e,aO)=>{"use strict";v();var c$=ds(),Vt={};Vt.isArray=e=>Array.isArray(e);Vt.isNumber=e=>typeof e=="number";Vt.isObject=e=>e&&typeof e=="object";Vt.isString=e=>typeof e=="string";Vt.isUndefined=e=>typeof e>"u";Vt.isFunction=e=>typeof e=="function";Vt.isNull=e=>e===null;Vt.isDate=e=>e instanceof Date;Vt.extend=(e,t)=>Object.assign(e,t);Vt.noop=()=>{};Vt.every=(e,t)=>e.every(t||(r=>r));Vt.map=(e,t)=>Array.from(e).map(t||(r=>r));Vt.includes=(e,t)=>e.includes(t);Vt.each=(e,t)=>e.forEach(t);Vt.clone=e=>Object.assign({},e);Vt.pick=(e,t)=>{let r={};return t.forEach(i=>{typeof e[i]<"u"&&(r[i]=e[i])}),r};Vt.values=e=>Object.values(e);Vt.filter=(e,t)=>e.filter(t);Vt.reduce=(e,t,r)=>e.reduce(t,r);Vt.without=(e,t)=>e.filter(r=>r!==t);Vt.shuffle=e=>{let t=e.slice(0);for(let r=t.length-1;r>0;r--){let n=c$.getRandomBuffer(4).readUInt32BE(0)/4294967296,o=Math.floor(n*(r+1));[t[r],t[o]]=[t[o],t[r]]}return t};Vt.difference=(e,t)=>e.filter(r=>!t.includes(r));Vt.findIndex=(e,t)=>e.findIndex(t);Vt.some=(e,t)=>e.some(t);Vt.range=e=>[...Array(e).keys()];aO.exports=Vt});var uO=k((V1e,sO)=>{"use strict";v();var G2=ot().Buffer;function l$(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r<t.length;r++)t[r]=255;for(var i=0;i<e.length;i++){var n=e.charAt(i),o=n.charCodeAt(0);if(t[o]!==255)throw new TypeError(n+" is ambiguous");t[o]=i}var a=e.length,s=e.charAt(0),u=Math.log(a)/Math.log(256),c=Math.log(256)/Math.log(a);function l(E){if((Array.isArray(E)||E instanceof Uint8Array)&&(E=G2.from(E)),!G2.isBuffer(E))throw new TypeError("Expected Buffer");if(E.length===0)return"";for(var P=0,M=0,D=0,L=E.length;D!==L&&E[D]===0;)D++,P++;for(var U=(L-D)*c+1>>>0,K=new Uint8Array(U);D!==L;){for(var C=E[D],N=0,F=U-1;(C!==0||N<M)&&F!==-1;F--,N++)C+=256*K[F]>>>0,K[F]=C%a>>>0,C=C/a>>>0;if(C!==0)throw new Error("Non-zero carry");M=N,D++}for(var H=U-M;H!==U&&K[H]===0;)H++;for(var z=s.repeat(P);H<U;++H)z+=e.charAt(K[H]);return z}function m(E){if(typeof E!="string")throw new TypeError("Expected String");if(E.length===0)return G2.alloc(0);for(var P=0,M=0,D=0;E[P]===s;)M++,P++;for(var L=(E.length-P)*u+1>>>0,U=new Uint8Array(L);P<E.length;){var K=E.charCodeAt(P);if(K>255)return;var C=t[K];if(C===255)return;for(var N=0,F=L-1;(C!==0||N<D)&&F!==-1;F--,N++)C+=a*U[F]>>>0,U[F]=C%256>>>0,C=C/256>>>0;if(C!==0)throw new Error("Non-zero carry");D=N,P++}for(var H=L-D;H!==L&&U[H]===0;)H++;var z=G2.allocUnsafe(M+(L-H));z.fill(0,0,M);for(var G=M;H!==L;)z[G++]=U[H++];return z}function w(E){var P=m(E);if(P)return P;throw new Error("Non-base"+a+" character")}return{encode:l,decodeUnsafe:m,decode:w}}sO.exports=l$});var Z2=k((Z1e,fO)=>{v();var h$=uO(),d$="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";fO.exports=h$(d$)});var qm=k((Y1e,cO)=>{"use strict";v();cO.exports="7.7.
|
|
17
|
+
https://github.com/browserify/crypto-browserify`)};at.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 ds=k((H1e,oO)=>{"use strict";v();function Bc(){}Bc.getRandomBuffer=function(e){return A.default.browser?Bc.getRandomBufferBrowser(e):Bc.getRandomBufferNode(e)};Bc.getRandomBufferNode=function(e){var t=_r();return t.randomBytes(e)};Bc.getRandomBufferBrowser=function(e){if(!window.crypto&&!window.msCrypto)throw new Error("window.crypto not available");var t;if(window.crypto&&window.crypto.getRandomValues)t=window.crypto;else if(window.msCrypto&&window.msCrypto.getRandomValues)t=window.msCrypto;else throw new Error("window.crypto.getRandomValues not available");var r=new Uint8Array(e);t.getRandomValues(r);var i=h.Buffer.from(r);return i};oO.exports=Bc});var Et=k((z1e,aO)=>{"use strict";v();var c$=ds(),Vt={};Vt.isArray=e=>Array.isArray(e);Vt.isNumber=e=>typeof e=="number";Vt.isObject=e=>e&&typeof e=="object";Vt.isString=e=>typeof e=="string";Vt.isUndefined=e=>typeof e>"u";Vt.isFunction=e=>typeof e=="function";Vt.isNull=e=>e===null;Vt.isDate=e=>e instanceof Date;Vt.extend=(e,t)=>Object.assign(e,t);Vt.noop=()=>{};Vt.every=(e,t)=>e.every(t||(r=>r));Vt.map=(e,t)=>Array.from(e).map(t||(r=>r));Vt.includes=(e,t)=>e.includes(t);Vt.each=(e,t)=>e.forEach(t);Vt.clone=e=>Object.assign({},e);Vt.pick=(e,t)=>{let r={};return t.forEach(i=>{typeof e[i]<"u"&&(r[i]=e[i])}),r};Vt.values=e=>Object.values(e);Vt.filter=(e,t)=>e.filter(t);Vt.reduce=(e,t,r)=>e.reduce(t,r);Vt.without=(e,t)=>e.filter(r=>r!==t);Vt.shuffle=e=>{let t=e.slice(0);for(let r=t.length-1;r>0;r--){let n=c$.getRandomBuffer(4).readUInt32BE(0)/4294967296,o=Math.floor(n*(r+1));[t[r],t[o]]=[t[o],t[r]]}return t};Vt.difference=(e,t)=>e.filter(r=>!t.includes(r));Vt.findIndex=(e,t)=>e.findIndex(t);Vt.some=(e,t)=>e.some(t);Vt.range=e=>[...Array(e).keys()];aO.exports=Vt});var uO=k((V1e,sO)=>{"use strict";v();var G2=ot().Buffer;function l$(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r<t.length;r++)t[r]=255;for(var i=0;i<e.length;i++){var n=e.charAt(i),o=n.charCodeAt(0);if(t[o]!==255)throw new TypeError(n+" is ambiguous");t[o]=i}var a=e.length,s=e.charAt(0),u=Math.log(a)/Math.log(256),c=Math.log(256)/Math.log(a);function l(E){if((Array.isArray(E)||E instanceof Uint8Array)&&(E=G2.from(E)),!G2.isBuffer(E))throw new TypeError("Expected Buffer");if(E.length===0)return"";for(var P=0,M=0,D=0,L=E.length;D!==L&&E[D]===0;)D++,P++;for(var U=(L-D)*c+1>>>0,K=new Uint8Array(U);D!==L;){for(var C=E[D],N=0,F=U-1;(C!==0||N<M)&&F!==-1;F--,N++)C+=256*K[F]>>>0,K[F]=C%a>>>0,C=C/a>>>0;if(C!==0)throw new Error("Non-zero carry");M=N,D++}for(var H=U-M;H!==U&&K[H]===0;)H++;for(var z=s.repeat(P);H<U;++H)z+=e.charAt(K[H]);return z}function m(E){if(typeof E!="string")throw new TypeError("Expected String");if(E.length===0)return G2.alloc(0);for(var P=0,M=0,D=0;E[P]===s;)M++,P++;for(var L=(E.length-P)*u+1>>>0,U=new Uint8Array(L);P<E.length;){var K=E.charCodeAt(P);if(K>255)return;var C=t[K];if(C===255)return;for(var N=0,F=L-1;(C!==0||N<D)&&F!==-1;F--,N++)C+=a*U[F]>>>0,U[F]=C%256>>>0,C=C/256>>>0;if(C!==0)throw new Error("Non-zero carry");D=N,P++}for(var H=L-D;H!==L&&U[H]===0;)H++;var z=G2.allocUnsafe(M+(L-H));z.fill(0,0,M);for(var G=M;H!==L;)z[G++]=U[H++];return z}function w(E){var P=m(E);if(P)return P;throw new Error("Non-base"+a+" character")}return{encode:l,decodeUnsafe:m,decode:w}}sO.exports=l$});var Z2=k((Z1e,fO)=>{v();var h$=uO(),d$="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";fO.exports=h$(d$)});var qm=k((Y1e,cO)=>{"use strict";v();cO.exports="7.7.1"});var hO=k((X1e,lO)=>{"use strict";v();var p$="https://docs.moneybutton.com/";lO.exports=[{name:"InvalidB58Char",message:"Invalid Base58 character: {0} in {1}"},{name:"InvalidB58Checksum",message:"Invalid Base58 checksum for {0}"},{name:"InvalidNetwork",message:"Invalid version for network: got {0}"},{name:"InvalidState",message:"Invalid state: {0}"},{name:"NotImplemented",message:"Function {0} was not implemented yet"},{name:"InvalidNetworkArgument",message:'Invalid network: must be "livenet" or "testnet", got {0}'},{name:"InvalidArgument",message:function(){return"Invalid Argument"+(arguments[0]?": "+arguments[0]:"")+(arguments[1]?" Documentation: "+p$+arguments[1]:"")}},{name:"AbstractMethodInvoked",message:"Abstract Method Invocation: {0}"},{name:"InvalidArgumentType",message:function(){return"Invalid Argument for "+arguments[2]+", expected "+arguments[1]+" but got "+typeof arguments[0]}},{name:"Unit",message:"Internal Error on Unit {0}",errors:[{name:"UnknownCode",message:"Unrecognized unit code: {0}"},{name:"InvalidRate",message:"Invalid exchange rate: {0}"}]},{name:"MerkleBlock",message:"Internal Error on MerkleBlock {0}",errors:[{name:"InvalidMerkleTree",message:"This MerkleBlock contain an invalid Merkle Tree"}]},{name:"Transaction",message:"Internal Error on Transaction {0}",errors:[{name:"Input",message:"Internal Error on Input {0}",errors:[{name:"MissingScript",message:"Need a script to create an input"},{name:"UnsupportedScript",message:"Unsupported input script type: {0}"},{name:"MissingPreviousOutput",message:"No previous output information."}]},{name:"NeedMoreInfo",message:"{0}"},{name:"InvalidSorting",message:"The sorting function provided did not return the change output as one of the array elements"},{name:"InvalidOutputAmountSum",message:"{0}"},{name:"MissingSignatures",message:"Some inputs have not been fully signed"},{name:"InvalidIndex",message:"Invalid index: {0} is not between 0, {1}"},{name:"UnableToVerifySignature",message:"Unable to verify signature: {0}"},{name:"DustOutputs",message:"Dust amount detected in one output"},{name:"InvalidSatoshis",message:"Output satoshis are invalid"},{name:"FeeError",message:"Internal Error on Fee {0}",errors:[{name:"TooSmall",message:"Fee is too small: {0}"},{name:"TooLarge",message:"Fee is too large: {0}"},{name:"Different",message:"Unspent value is different from specified fee: {0}"}]},{name:"ChangeAddressMissing",message:"Change address is missing"},{name:"BlockHeightTooHigh",message:"Block Height can be at most 2^32 -1"},{name:"NLockTimeOutOfRange",message:"Block Height can only be between 0 and 499 999 999"},{name:"LockTimeTooEarly",message:"Lock Time can't be earlier than UNIX date 500 000 000"}]},{name:"Script",message:"Internal Error on Script {0}",errors:[{name:"UnrecognizedAddress",message:"Expected argument {0} to be an address"},{name:"CantDeriveAddress",message:"Can't derive address associated with script {0}, needs to be p2pkh in, p2pkh out, p2sh in, or p2sh out."},{name:"InvalidBuffer",message:"Invalid script buffer: can't parse valid script from given buffer {0}"}]},{name:"HDPrivateKey",message:"Internal Error on HDPrivateKey {0}",errors:[{name:"InvalidDerivationArgument",message:"Invalid derivation argument {0}, expected string, or number and boolean"},{name:"InvalidEntropyArgument",message:"Invalid entropy: must be an hexa string or binary buffer, got {0}",errors:[{name:"TooMuchEntropy",message:'Invalid entropy: more than 512 bits is non standard, got "{0}"'},{name:"NotEnoughEntropy",message:'Invalid entropy: at least 128 bits needed, got "{0}"'}]},{name:"InvalidLength",message:"Invalid length for xprivkey string in {0}"},{name:"InvalidPath",message:"Invalid derivation path: {0}"},{name:"UnrecognizedArgument",message:'Invalid argument: creating a HDPrivateKey requires a string, buffer, json or object, got "{0}"'}]},{name:"HDPublicKey",message:"Internal Error on HDPublicKey {0}",errors:[{name:"ArgumentIsPrivateExtended",message:"Argument is an extended private key: {0}"},{name:"InvalidDerivationArgument",message:"Invalid derivation argument: got {0}"},{name:"InvalidLength",message:'Invalid length for xpubkey: got "{0}"'},{name:"InvalidPath",message:'Invalid derivation path, it should look like: "m/1/100", got "{0}"'},{name:"InvalidIndexCantDeriveHardened",message:"Invalid argument: creating a hardened path requires an HDPrivateKey"},{name:"MustSupplyArgument",message:"Must supply an argument to create a HDPublicKey"},{name:"UnrecognizedArgument",message:"Invalid argument for creation, must be string, json, buffer, or object"}]}]});var hn=k((Q1e,Fm)=>{"use strict";v();var Um=Et();function g$(e,t){return e.replace("{0}",t[0]).replace("{1}",t[1]).replace("{2}",t[2])}var dO=function(e,t){var r=function(){if(Um.isString(t.message))this.message=g$(t.message,arguments);else if(Um.isFunction(t.message))this.message=t.message.apply(null,arguments);else throw new Error("Invalid error definition for "+t.name);this.stack=this.message+`
|
|
18
18
|
`+new Error().stack};return r.prototype=Object.create(e.prototype),r.prototype.name=e.prototype.name+t.name,e[t.name]=r,t.errors&&pO(r,t.errors),r},pO=function(e,t){Um.each(t,function(r){dO(e,r)})},v$=function(e,t){return pO(e,t),e},Mc={};Mc.Error=function(){this.message="Internal error",this.stack=this.message+`
|
|
19
19
|
`+new Error().stack};Mc.Error.prototype=Object.create(Error.prototype);Mc.Error.prototype.name="bsv.Error";var m$=hO();v$(Mc.Error,m$);Fm.exports=Mc.Error;Fm.exports.extend=function(e){return dO(Mc.Error,e)}});var Bt=k((tde,gO)=>{"use strict";v();var r0=hn(),y$=Et();gO.exports={checkState:function(e,t){if(!e)throw new r0.InvalidState(t)},checkArgument:function(e,t,r,i){if(!e)throw new r0.InvalidArgument(t,r,i)},checkArgumentType:function(e,t,r){if(r=r||"(unknown name)",y$.isString(t)){if(t==="Buffer"){var i=Kt();if(!i.Buffer.isBuffer(e))throw new r0.InvalidArgumentType(e,t,r)}else if(typeof e!==t)throw new r0.InvalidArgumentType(e,t,r)}else if(!(e instanceof t))throw new r0.InvalidArgumentType(e,t.name,r)}}});var fr=k((ide,mO)=>{"use strict";v();var Ot=Cn(),Hm=Bt(),vO=Et(),W2=function(e){for(var t=h.Buffer.alloc(e.length),r=0;r<e.length;r++)t[r]=e[e.length-1-r];return t};Ot.Zero=new Ot(0);Ot.One=new Ot(1);Ot.Minus1=new Ot(-1);Ot.fromNumber=function(e){return Hm.checkArgument(vO.isNumber(e)),new Ot(e)};Ot.fromString=function(e,t){return Hm.checkArgument(vO.isString(e)),new Ot(e,t)};Ot.fromBuffer=function(e,t){typeof t<"u"&&t.endian==="little"&&(e=W2(e));var r=e.toString("hex"),i=new Ot(r,16);return i};Ot.fromSM=function(e,t){var r;if(e.length===0)return Ot.fromBuffer(h.Buffer.from([0]));var i="big";return t&&(i=t.endian),i==="little"&&(e=W2(e)),e[0]&128?(e[0]=e[0]&127,r=Ot.fromBuffer(e),r.neg().copy(r)):r=Ot.fromBuffer(e),r};Ot.prototype.toNumber=function(){return parseInt(this.toString(10),10)};Ot.prototype.toBuffer=function(e){var t,r;if(e&&e.size){r=this.toString(16,2);var i=r.length/2;t=h.Buffer.from(r,"hex"),i===e.size||(i>e.size?t=Ot.trim(t,i):i<e.size&&(t=Ot.pad(t,i,e.size)))}else r=this.toString(16,2),t=h.Buffer.from(r,"hex");return typeof e<"u"&&e.endian==="little"&&(t=W2(t)),t};Ot.prototype.toSMBigEndian=function(){var e;return this.cmp(Ot.Zero)===-1?(e=this.neg().toBuffer(),e[0]&128?e=h.Buffer.concat([h.Buffer.from([128]),e]):e[0]=e[0]|128):(e=this.toBuffer(),e[0]&128&&(e=h.Buffer.concat([h.Buffer.from([0]),e]))),e.length===1&&e[0]===0&&(e=h.Buffer.from([])),e};Ot.prototype.toSM=function(e){var t=e?e.endian:"big",r=this.toSMBigEndian();return t==="little"&&(r=W2(r)),r};Ot.fromScriptNumBuffer=function(e,t,r){var i=r||4;if(Hm.checkArgument(e.length<=i,new Error("script number overflow")),t&&e.length>0&&(e[e.length-1]&127)===0&&(e.length<=1||(e[e.length-2]&128)===0))throw new Error("non-minimally encoded script number");return Ot.fromSM(e,{endian:"little"})};Ot.prototype.toScriptNumBuffer=function(){return this.toSM({endian:"little"})};Ot.trim=function(e,t){return e.slice(t-e.length,e.length)};Ot.pad=function(e,t,r){for(var i=h.Buffer.alloc(r),n=0;n<e.length;n++)i[i.length-1-n]=e[e.length-1-n];for(n=0;n<r-t;n++)i[n]=0;return i};Ot.prototype.toHex=function(...e){return this.toBuffer(...e).toString("hex")};Ot.fromHex=function(e,...t){return Ot.fromBuffer(h.Buffer.from(e,"hex"),...t)};mO.exports=Ot});function jm(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"&&"BYTES_PER_ELEMENT"in e&&e.BYTES_PER_ELEMENT===1}function ps(e,t=""){if(typeof e!="number"){let r=t&&`"${t}" `;throw new TypeError(`${r}expected number, got ${typeof e}`)}if(!Number.isSafeInteger(e)||e<0){let r=t&&`"${t}" `;throw new RangeError(`${r}expected integer >= 0, got ${e}`)}}function Io(e,t,r=""){let i=jm(e),n=e?.length,o=t!==void 0;if(!i||o&&n!==t){let a=r&&`"${r}" `,s=o?` of length ${t}`:"",u=i?`length=${n}`:`type=${typeof e}`,c=a+"expected Uint8Array"+s+", got "+u;throw i?new RangeError(c):new TypeError(c)}return e}function Y2(e){if(typeof e!="function"||typeof e.create!="function")throw new TypeError("Hash must wrapped by utils.createHasher");if(ps(e.outputLen),ps(e.blockLen),e.outputLen<1)throw new Error('"outputLen" must be >= 1');if(e.blockLen<1)throw new Error('"blockLen" must be >= 1')}function Cc(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function $2(e,t){Io(e,void 0,"digestInto() output");let r=t.outputLen;if(e.length<r)throw new RangeError('"digestInto() output" expected to be of length >='+r)}function Ea(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function X2(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Fn(e,t){return e<<32-t|e>>>t}function J2(e){if(Io(e),bO)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=b$[e[r]];return t}function yO(e){if(e>=xa._0&&e<=xa._9)return e-xa._0;if(e>=xa.A&&e<=xa.F)return e-(xa.A-10);if(e>=xa.a&&e<=xa.f)return e-(xa.a-10)}function zm(e){if(typeof e!="string")throw new TypeError("hex string expected, got "+typeof e);if(bO)try{return Uint8Array.fromHex(e)}catch(n){throw n instanceof SyntaxError?new RangeError(n.message):n}let t=e.length,r=t/2;if(t%2)throw new RangeError("hex string expected, got unpadded hex of length "+t);let i=new Uint8Array(r);for(let n=0,o=0;n<r;n++,o+=2){let a=yO(e.charCodeAt(o)),s=yO(e.charCodeAt(o+1));if(a===void 0||s===void 0){let u=e[o]+e[o+1];throw new RangeError('hex string expected, got non-hex character "'+u+'" at index '+o)}i[n]=a*16+s}return i}function Ia(e){if(typeof e!="string")throw new TypeError("string expected");return new Uint8Array(new TextEncoder().encode(e))}function _O(...e){let t=0;for(let i=0;i<e.length;i++){let n=e[i];Io(n),t+=n.length}let r=new Uint8Array(t);for(let i=0,n=0;i<e.length;i++){let o=e[i];r.set(o,n),n+=o.length}return r}function Vu(e,t={}){let r=(n,o)=>e(o).update(n).digest(),i=e(void 0);return r.outputLen=i.outputLen,r.blockLen=i.blockLen,r.canXOF=i.canXOF,r.create=n=>e(n),Object.assign(r,t),Object.freeze(r)}function i0(e=32){ps(e,"bytesLength");let t=typeof globalThis=="object"?globalThis.crypto:null;if(typeof t?.getRandomValues!="function")throw new Error("crypto.getRandomValues must be defined");if(e>65536)throw new RangeError(`"bytesLength" expected <= 65536, got ${e}`);return t.getRandomValues(new Uint8Array(e))}var bO,b$,xa,Gu,gs=Xr(()=>{v();bO=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",b$=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));xa={_0:48,_9:57,A:65,F:70,a:97,f:102};Gu=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])})});function wO(e,t,r){return e&t^~e&r}function SO(e,t,r){return e&t^e&r^t&r}var n0,Oa,Aa,Qr,ei,xO=Xr(()=>{v();gs();n0=class{constructor(t,r,i,n){Z(this,"blockLen");Z(this,"outputLen");Z(this,"canXOF",!1);Z(this,"padOffset");Z(this,"isLE");Z(this,"buffer");Z(this,"view");Z(this,"finished",!1);Z(this,"length",0);Z(this,"pos",0);Z(this,"destroyed",!1);this.blockLen=t,this.outputLen=r,this.padOffset=i,this.isLE=n,this.buffer=new Uint8Array(t),this.view=X2(this.buffer)}update(t){Cc(this),Io(t);let{view:r,buffer:i,blockLen:n}=this,o=t.length;for(let a=0;a<o;){let s=Math.min(n-this.pos,o-a);if(s===n){let u=X2(t);for(;n<=o-a;a+=n)this.process(u,a);continue}i.set(t.subarray(a,a+s),this.pos),this.pos+=s,a+=s,this.pos===n&&(this.process(r,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){Cc(this),$2(t,this),this.finished=!0;let{buffer:r,view:i,blockLen:n,isLE:o}=this,{pos:a}=this;r[a++]=128,Ea(this.buffer.subarray(a)),this.padOffset>n-a&&(this.process(i,0),a=0);for(let m=a;m<n;m++)r[m]=0;i.setBigUint64(n-8,BigInt(this.length*8),o),this.process(i,0);let s=X2(t),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen must be aligned to 32bit");let c=u/4,l=this.get();if(c>l.length)throw new Error("_sha2: outputLen bigger than state");for(let m=0;m<c;m++)s.setUint32(4*m,l[m],o)}digest(){let{buffer:t,outputLen:r}=this;this.digestInto(t);let i=t.slice(0,r);return this.destroy(),i}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());let{blockLen:r,buffer:i,length:n,finished:o,destroyed:a,pos:s}=this;return t.destroyed=a,t.finished=o,t.length=n,t.pos=s,n%r&&t.buffer.set(i),t}clone(){return this._cloneInto()}},Oa=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Aa=Uint32Array.from([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]),Qr=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),ei=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209])});function _$(e,t=!1){return t?{h:Number(e&Q2),l:Number(e>>EO&Q2)}:{h:Number(e>>EO&Q2)|0,l:Number(e&Q2)|0}}function IO(e,t=!1){let r=e.length,i=new Uint32Array(r),n=new Uint32Array(r);for(let o=0;o<r;o++){let{h:a,l:s}=_$(e[o],t);[i[o],n[o]]=[a,s]}return[i,n]}function Oo(e,t,r,i){let n=(t>>>0)+(i>>>0);return{h:e+r+(n/2**32|0)|0,l:n|0}}var Q2,EO,Km,Vm,Zu,Wu,o0,a0,OO,AO,PO,TO,kO,RO,BO=Xr(()=>{v();Q2=BigInt(4294967295),EO=BigInt(32);Km=(e,t,r)=>e>>>r,Vm=(e,t,r)=>e<<32-r|t>>>r,Zu=(e,t,r)=>e>>>r|t<<32-r,Wu=(e,t,r)=>e<<32-r|t>>>r,o0=(e,t,r)=>e<<64-r|t>>>r-32,a0=(e,t,r)=>e>>>r-32|t<<64-r;OO=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),AO=(e,t,r,i)=>t+r+i+(e/2**32|0)|0,PO=(e,t,r,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(i>>>0),TO=(e,t,r,i,n)=>t+r+i+n+(e/2**32|0)|0,kO=(e,t,r,i,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(i>>>0)+(n>>>0),RO=(e,t,r,i,n,o)=>t+r+i+n+o+(e/2**32|0)|0});var Gm={};X1(Gm,{_SHA224:()=>rp,_SHA256:()=>tp,_SHA384:()=>np,_SHA512:()=>ip,_SHA512_224:()=>op,_SHA512_256:()=>ap,sha224:()=>I$,sha256:()=>bs,sha384:()=>A$,sha512:()=>O$,sha512_224:()=>T$,sha512_256:()=>P$});var S$,vs,ep,tp,rp,MO,x$,E$,ms,ys,Nc,ip,np,hi,di,op,ap,bs,I$,O$,A$,P$,T$,sp=Xr(()=>{v();xO();BO();gs();S$=Uint32Array.from([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]),vs=new Uint32Array(64),ep=class extends n0{constructor(t){super(64,t,8,!1)}get(){let{A:t,B:r,C:i,D:n,E:o,F:a,G:s,H:u}=this;return[t,r,i,n,o,a,s,u]}set(t,r,i,n,o,a,s,u){this.A=t|0,this.B=r|0,this.C=i|0,this.D=n|0,this.E=o|0,this.F=a|0,this.G=s|0,this.H=u|0}process(t,r){for(let m=0;m<16;m++,r+=4)vs[m]=t.getUint32(r,!1);for(let m=16;m<64;m++){let w=vs[m-15],E=vs[m-2],P=Fn(w,7)^Fn(w,18)^w>>>3,M=Fn(E,17)^Fn(E,19)^E>>>10;vs[m]=M+vs[m-7]+P+vs[m-16]|0}let{A:i,B:n,C:o,D:a,E:s,F:u,G:c,H:l}=this;for(let m=0;m<64;m++){let w=Fn(s,6)^Fn(s,11)^Fn(s,25),E=l+w+wO(s,u,c)+S$[m]+vs[m]|0,M=(Fn(i,2)^Fn(i,13)^Fn(i,22))+SO(i,n,o)|0;l=c,c=u,u=s,s=a+E|0,a=o,o=n,n=i,i=E+M|0}i=i+this.A|0,n=n+this.B|0,o=o+this.C|0,a=a+this.D|0,s=s+this.E|0,u=u+this.F|0,c=c+this.G|0,l=l+this.H|0,this.set(i,n,o,a,s,u,c,l)}roundClean(){Ea(vs)}destroy(){this.destroyed=!0,this.set(0,0,0,0,0,0,0,0),Ea(this.buffer)}},tp=class extends ep{constructor(){super(32);Z(this,"A",Oa[0]|0);Z(this,"B",Oa[1]|0);Z(this,"C",Oa[2]|0);Z(this,"D",Oa[3]|0);Z(this,"E",Oa[4]|0);Z(this,"F",Oa[5]|0);Z(this,"G",Oa[6]|0);Z(this,"H",Oa[7]|0)}},rp=class extends ep{constructor(){super(28);Z(this,"A",Aa[0]|0);Z(this,"B",Aa[1]|0);Z(this,"C",Aa[2]|0);Z(this,"D",Aa[3]|0);Z(this,"E",Aa[4]|0);Z(this,"F",Aa[5]|0);Z(this,"G",Aa[6]|0);Z(this,"H",Aa[7]|0)}},MO=IO(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),x$=MO[0],E$=MO[1],ms=new Uint32Array(80),ys=new Uint32Array(80),Nc=class extends n0{constructor(t){super(128,t,16,!1)}get(){let{Ah:t,Al:r,Bh:i,Bl:n,Ch:o,Cl:a,Dh:s,Dl:u,Eh:c,El:l,Fh:m,Fl:w,Gh:E,Gl:P,Hh:M,Hl:D}=this;return[t,r,i,n,o,a,s,u,c,l,m,w,E,P,M,D]}set(t,r,i,n,o,a,s,u,c,l,m,w,E,P,M,D){this.Ah=t|0,this.Al=r|0,this.Bh=i|0,this.Bl=n|0,this.Ch=o|0,this.Cl=a|0,this.Dh=s|0,this.Dl=u|0,this.Eh=c|0,this.El=l|0,this.Fh=m|0,this.Fl=w|0,this.Gh=E|0,this.Gl=P|0,this.Hh=M|0,this.Hl=D|0}process(t,r){for(let K=0;K<16;K++,r+=4)ms[K]=t.getUint32(r),ys[K]=t.getUint32(r+=4);for(let K=16;K<80;K++){let C=ms[K-15]|0,N=ys[K-15]|0,F=Zu(C,N,1)^Zu(C,N,8)^Km(C,N,7),H=Wu(C,N,1)^Wu(C,N,8)^Vm(C,N,7),z=ms[K-2]|0,G=ys[K-2]|0,B=Zu(z,G,19)^o0(z,G,61)^Km(z,G,6),g=Wu(z,G,19)^a0(z,G,61)^Vm(z,G,6),I=PO(H,g,ys[K-7],ys[K-16]),y=TO(I,F,B,ms[K-7],ms[K-16]);ms[K]=y|0,ys[K]=I|0}let{Ah:i,Al:n,Bh:o,Bl:a,Ch:s,Cl:u,Dh:c,Dl:l,Eh:m,El:w,Fh:E,Fl:P,Gh:M,Gl:D,Hh:L,Hl:U}=this;for(let K=0;K<80;K++){let C=Zu(m,w,14)^Zu(m,w,18)^o0(m,w,41),N=Wu(m,w,14)^Wu(m,w,18)^a0(m,w,41),F=m&E^~m&M,H=w&P^~w&D,z=kO(U,N,H,E$[K],ys[K]),G=RO(z,L,C,F,x$[K],ms[K]),B=z|0,g=Zu(i,n,28)^o0(i,n,34)^o0(i,n,39),I=Wu(i,n,28)^a0(i,n,34)^a0(i,n,39),y=i&o^i&s^o&s,f=n&a^n&u^a&u;L=M|0,U=D|0,M=E|0,D=P|0,E=m|0,P=w|0,{h:m,l:w}=Oo(c|0,l|0,G|0,B|0),c=s|0,l=u|0,s=o|0,u=a|0,o=i|0,a=n|0;let p=OO(B,I,f);i=AO(p,G,g,y),n=p|0}({h:i,l:n}=Oo(this.Ah|0,this.Al|0,i|0,n|0)),{h:o,l:a}=Oo(this.Bh|0,this.Bl|0,o|0,a|0),{h:s,l:u}=Oo(this.Ch|0,this.Cl|0,s|0,u|0),{h:c,l}=Oo(this.Dh|0,this.Dl|0,c|0,l|0),{h:m,l:w}=Oo(this.Eh|0,this.El|0,m|0,w|0),{h:E,l:P}=Oo(this.Fh|0,this.Fl|0,E|0,P|0),{h:M,l:D}=Oo(this.Gh|0,this.Gl|0,M|0,D|0),{h:L,l:U}=Oo(this.Hh|0,this.Hl|0,L|0,U|0),this.set(i,n,o,a,s,u,c,l,m,w,E,P,M,D,L,U)}roundClean(){Ea(ms,ys)}destroy(){this.destroyed=!0,Ea(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}},ip=class extends Nc{constructor(){super(64);Z(this,"Ah",ei[0]|0);Z(this,"Al",ei[1]|0);Z(this,"Bh",ei[2]|0);Z(this,"Bl",ei[3]|0);Z(this,"Ch",ei[4]|0);Z(this,"Cl",ei[5]|0);Z(this,"Dh",ei[6]|0);Z(this,"Dl",ei[7]|0);Z(this,"Eh",ei[8]|0);Z(this,"El",ei[9]|0);Z(this,"Fh",ei[10]|0);Z(this,"Fl",ei[11]|0);Z(this,"Gh",ei[12]|0);Z(this,"Gl",ei[13]|0);Z(this,"Hh",ei[14]|0);Z(this,"Hl",ei[15]|0)}},np=class extends Nc{constructor(){super(48);Z(this,"Ah",Qr[0]|0);Z(this,"Al",Qr[1]|0);Z(this,"Bh",Qr[2]|0);Z(this,"Bl",Qr[3]|0);Z(this,"Ch",Qr[4]|0);Z(this,"Cl",Qr[5]|0);Z(this,"Dh",Qr[6]|0);Z(this,"Dl",Qr[7]|0);Z(this,"Eh",Qr[8]|0);Z(this,"El",Qr[9]|0);Z(this,"Fh",Qr[10]|0);Z(this,"Fl",Qr[11]|0);Z(this,"Gh",Qr[12]|0);Z(this,"Gl",Qr[13]|0);Z(this,"Hh",Qr[14]|0);Z(this,"Hl",Qr[15]|0)}},hi=Uint32Array.from([2352822216,424955298,1944164710,2312950998,502970286,855612546,1738396948,1479516111,258812777,2077511080,2011393907,79989058,1067287976,1780299464,286451373,2446758561]),di=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]),op=class extends Nc{constructor(){super(28);Z(this,"Ah",hi[0]|0);Z(this,"Al",hi[1]|0);Z(this,"Bh",hi[2]|0);Z(this,"Bl",hi[3]|0);Z(this,"Ch",hi[4]|0);Z(this,"Cl",hi[5]|0);Z(this,"Dh",hi[6]|0);Z(this,"Dl",hi[7]|0);Z(this,"Eh",hi[8]|0);Z(this,"El",hi[9]|0);Z(this,"Fh",hi[10]|0);Z(this,"Fl",hi[11]|0);Z(this,"Gh",hi[12]|0);Z(this,"Gl",hi[13]|0);Z(this,"Hh",hi[14]|0);Z(this,"Hl",hi[15]|0)}},ap=class extends Nc{constructor(){super(32);Z(this,"Ah",di[0]|0);Z(this,"Al",di[1]|0);Z(this,"Bh",di[2]|0);Z(this,"Bl",di[3]|0);Z(this,"Ch",di[4]|0);Z(this,"Cl",di[5]|0);Z(this,"Dh",di[6]|0);Z(this,"Dl",di[7]|0);Z(this,"Eh",di[8]|0);Z(this,"El",di[9]|0);Z(this,"Fh",di[10]|0);Z(this,"Fl",di[11]|0);Z(this,"Gh",di[12]|0);Z(this,"Gl",di[13]|0);Z(this,"Hh",di[14]|0);Z(this,"Hl",di[15]|0)}},bs=Vu(()=>new tp,Gu(1)),I$=Vu(()=>new rp,Gu(4)),O$=Vu(()=>new ip,Gu(3)),A$=Vu(()=>new np,Gu(2)),P$=Vu(()=>new ap,Gu(6)),T$=Vu(()=>new op,Gu(5))});function $u(e,t=""){if(typeof e!="boolean"){let r=t&&`"${t}" `;throw new TypeError(r+"expected boolean, got type="+typeof e)}return e}function cp(e){if(typeof e=="bigint"){if(!up(e))throw new RangeError("positive bigint expected, got "+e)}else Wm(e);return e}function dn(e,t=""){if(typeof e!="number"){let r=t&&`"${t}" `;throw new TypeError(r+"expected number, got type="+typeof e)}if(!Number.isSafeInteger(e)){let r=t&&`"${t}" `;throw new RangeError(r+"expected safe integer, got "+e)}}function s0(e){let t=cp(e).toString(16);return t.length&1?"0"+t:t}function CO(e){if(typeof e!="string")throw new TypeError("hex string expected, got "+typeof e);return e===""?fp:BigInt("0x"+e)}function bi(e){return CO(J2(e))}function Lc(e){return CO(J2(hp(Io(e)).reverse()))}function lp(e,t){if(ps(t),t===0)throw new RangeError("zero length");e=cp(e);let r=e.toString(16);if(r.length>t*2)throw new RangeError("number too large");return zm(r.padStart(t*2,"0"))}function Ym(e,t){return lp(e,t).reverse()}function hp(e){return Uint8Array.from(qt(e))}function qc(e){if(typeof e!="string")throw new TypeError("ascii string expected, got "+typeof e);return Uint8Array.from(e,(t,r)=>{let i=t.charCodeAt(0);if(t.length!==1||i>127)throw new RangeError(`string contains non-ASCII character "${e[r]}" with code ${i} at position ${r}`);return i})}function k$(e,t,r){return up(e)&&up(t)&&up(r)&&t<=e&&e<r}function $m(e,t,r,i){if(!k$(t,r,i))throw new RangeError("expected valid "+e+": "+r+" <= n < "+i+", got "+t)}function Xu(e){if(e<fp)throw new Error("expected non-negative bigint, got "+e);let t;for(t=0;e>fp;e>>=Zm,t+=1);return t}function NO(e,t,r){if(ps(e,"hashLen"),ps(t,"qByteLen"),typeof r!="function")throw new TypeError("hmacFn must be a function");let i=D=>new Uint8Array(D),n=Uint8Array.of(),o=Uint8Array.of(0),a=Uint8Array.of(1),s=1e3,u=i(e),c=i(e),l=0,m=()=>{u.fill(1),c.fill(0),l=0},w=(...D)=>r(c,kt(u,...D)),E=(D=n)=>{c=w(o,D),u=w(),D.length!==0&&(c=w(a,D),u=w())},P=()=>{if(l++>=s)throw new Error("drbg: tried max amount of iterations");let D=0,L=[];for(;D<t;){u=w();let U=u.slice();L.push(U),D+=u.length}return kt(...L)};return(D,L)=>{m(),E(D);let U;for(;(U=L(P()))===void 0;)E();return m(),U}}function pn(e,t={},r={}){if(Object.prototype.toString.call(e)!=="[object Object]")throw new TypeError("expected valid options object");function i(o,a,s){if(!s&&a!=="function"&&!Object.hasOwn(e,o))throw new TypeError(`param "${o}" is invalid: expected own property`);let u=e[o];if(s&&u===void 0)return;let c=typeof u;if(c!==a||u===null)throw new TypeError(`param "${o}" is invalid: expected ${a}, got ${c}`)}let n=(o,a)=>Object.entries(o).forEach(([s,u])=>i(s,u,a));n(t,!1),n(r,!0)}var qt,Wm,Pa,kt,Dc,Yu,ki,fp,Zm,up,Uc,Ju=Xr(()=>{v();gs();qt=(e,t,r)=>Io(e,t,r),Wm=ps,Pa=J2,kt=(...e)=>_O(...e),Dc=e=>zm(e),Yu=jm,ki=e=>i0(e),fp=BigInt(0),Zm=BigInt(1);up=e=>typeof e=="bigint"&&fp<=e;Uc=e=>(Zm<<BigInt(e))-Zm});function Fi(e,t){if(t<=ti)throw new Error("mod: expected positive modulus, got "+t);let r=e%t;return r>=ti?r:t+r}function Hi(e,t,r){if(t<ti)throw new Error("pow2: expected non-negative exponent, got "+t);let i=e;for(;t-- >ti;)i*=i,i%=r;return i}function DO(e,t){if(e===ti)throw new Error("invert: expected non-zero number");if(t<=ti)throw new Error("invert: expected positive modulus, got "+t);let r=Fi(e,t),i=t,n=ti,o=wr,a=wr,s=ti;for(;r!==ti;){let c=i/r,l=i-r*c,m=n-a*c,w=o-s*c;i=r,r=l,n=a,o=s,a=m,s=w}if(i!==wr)throw new Error("invert: does not exist");return Fi(n,t)}function Jm(e,t,r){let i=e;if(!i.eql(i.sqr(t),r))throw new Error("Cannot find square root")}function zO(e,t){let r=e,i=(r.ORDER+wr)/UO,n=r.pow(t,i);return Jm(r,n,t),n}function M$(e,t){let r=e,i=(r.ORDER-FO)/HO,n=r.mul(t,Qu),o=r.pow(n,i),a=r.mul(t,o),s=r.mul(r.mul(a,Qu),o),u=r.mul(a,r.sub(s,r.ONE));return Jm(r,u,t),u}function C$(e){let t=Fc(e),r=KO(e),i=r(t,t.neg(t.ONE)),n=r(t,i),o=r(t,t.neg(i)),a=(e+R$)/jO;return((s,u)=>{let c=s,l=c.pow(u,a),m=c.mul(l,i),w=c.mul(l,n),E=c.mul(l,o),P=c.eql(c.sqr(m),u),M=c.eql(c.sqr(w),u);l=c.cmov(l,m,P),m=c.cmov(E,w,M);let D=c.eql(c.sqr(m),u),L=c.cmov(l,m,D);return Jm(c,L,u),L})}function KO(e){if(e<qO)throw new Error("sqrt is not defined for small field");let t=e-wr,r=0;for(;t%Qu===ti;)t/=Qu,r++;let i=Qu,n=Fc(e);for(;Xm(n,i)===1;)if(i++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(r===1)return zO;let o=n.pow(i,t),a=(t+wr)/Qu;return function(u,c){let l=u;if(l.is0(c))return c;if(Xm(l,c)!==1)throw new Error("Cannot find square root");let m=r,w=l.mul(l.ONE,o),E=l.pow(c,t),P=l.pow(c,a);for(;!l.eql(E,l.ONE);){if(l.is0(E))return l.ZERO;let M=1,D=l.sqr(E);for(;!l.eql(D,l.ONE);)if(M++,D=l.sqr(D),M===m)throw new Error("Cannot find square root");let L=wr<<BigInt(m-M-1),U=l.pow(w,L);m=M,w=l.sqr(U),E=l.mul(E,w),P=l.mul(P,U)}return P}}function N$(e){return e%UO===qO?zO:e%HO===FO?M$:e%jO===B$?C$(e):KO(e)}function ef(e){let t={ORDER:"bigint",BYTES:"number",BITS:"number"},r=D$.reduce((i,n)=>(i[n]="function",i),t);if(pn(e,r),dn(e.BYTES,"BYTES"),dn(e.BITS,"BITS"),e.BYTES<1||e.BITS<1)throw new Error("invalid field: expected BYTES/BITS > 0");if(e.ORDER<=wr)throw new Error("invalid field: expected ORDER > 1, got "+e.ORDER);return e}function L$(e,t,r){let i=e;if(r<ti)throw new Error("invalid exponent, negatives unsupported");if(r===ti)return i.ONE;if(r===wr)return t;let n=i.ONE,o=t;for(;r>ti;)r&wr&&(n=i.mul(n,o)),o=i.sqr(o),r>>=wr;return n}function tf(e,t,r=!1){let i=e,n=new Array(t.length).fill(r?i.ZERO:void 0),o=t.reduce((s,u,c)=>i.is0(u)?s:(n[c]=s,i.mul(s,u)),i.ONE),a=i.inv(o);return t.reduceRight((s,u,c)=>i.is0(u)?s:(n[c]=i.mul(s,n[c]),i.mul(s,u)),a),n}function Xm(e,t){let r=e,i=(r.ORDER-wr)/Qu,n=r.pow(t,i),o=r.eql(n,r.ONE),a=r.eql(n,r.ZERO),s=r.eql(n,r.neg(r.ONE));if(!o&&!a&&!s)throw new Error("invalid Legendre symbol result");return o?1:a?0:-1}function Qm(e,t){return Xm(e,t)!==-1}function q$(e,t){if(t!==void 0&&Wm(t),e<=ti)throw new Error("invalid n length: expected positive n, got "+e);if(t!==void 0&&t<1)throw new Error("invalid n length: expected positive bit length, got "+t);let r=Xu(e);if(t!==void 0&&t<r)throw new Error(`invalid n length: expected bit length (${r}) >= n.length (${t})`);let i=t!==void 0?t:r,n=Math.ceil(i/8);return{nBitLength:i,nByteLength:n}}function Fc(e,t={}){return new dp(e,t)}function VO(e){if(typeof e!="bigint")throw new Error("field order must be bigint");if(e<=wr)throw new Error("field order must be greater than 1");let t=Xu(e-wr);return Math.ceil(t/8)}function u0(e){let t=VO(e);return t+Math.ceil(t/2)}function Hc(e,t,r=!1){qt(e);let i=e.length,n=VO(t),o=Math.max(u0(t),16);if(i<o||i>1024)throw new Error("expected "+o+"-1024 bytes of input, got "+i);let a=r?Lc(e):bi(e),s=Fi(a,t-wr)+wr;return r?Ym(s,n):lp(s,n)}var ti,wr,Qu,qO,UO,FO,R$,HO,B$,jO,D$,LO,dp,jc=Xr(()=>{v();Ju();ti=BigInt(0),wr=BigInt(1),Qu=BigInt(2),qO=BigInt(3),UO=BigInt(4),FO=BigInt(5),R$=BigInt(7),HO=BigInt(8),B$=BigInt(9),jO=BigInt(16);D$=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];LO=new WeakMap,dp=class{constructor(t,r={}){Z(this,"ORDER");Z(this,"BITS");Z(this,"BYTES");Z(this,"isLE");Z(this,"ZERO",ti);Z(this,"ONE",wr);Z(this,"_lengths");Z(this,"_mod");if(t<=wr)throw new Error("invalid field: expected ORDER > 1, got "+t);let i;this.isLE=!1,r!=null&&typeof r=="object"&&(typeof r.BITS=="number"&&(i=r.BITS),typeof r.sqrt=="function"&&Object.defineProperty(this,"sqrt",{value:r.sqrt,enumerable:!0}),typeof r.isLE=="boolean"&&(this.isLE=r.isLE),r.allowedLengths&&(this._lengths=Object.freeze(r.allowedLengths.slice())),typeof r.modFromBytes=="boolean"&&(this._mod=r.modFromBytes));let{nBitLength:n,nByteLength:o}=q$(t,i);if(o>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");this.ORDER=t,this.BITS=n,this.BYTES=o,Object.freeze(this)}create(t){return Fi(t,this.ORDER)}isValid(t){if(typeof t!="bigint")throw new TypeError("invalid field element: expected bigint, got "+typeof t);return ti<=t&&t<this.ORDER}is0(t){return t===ti}isValidNot0(t){return!this.is0(t)&&this.isValid(t)}isOdd(t){return(t&wr)===wr}neg(t){return Fi(-t,this.ORDER)}eql(t,r){return t===r}sqr(t){return Fi(t*t,this.ORDER)}add(t,r){return Fi(t+r,this.ORDER)}sub(t,r){return Fi(t-r,this.ORDER)}mul(t,r){return Fi(t*r,this.ORDER)}pow(t,r){return L$(this,t,r)}div(t,r){return Fi(t*DO(r,this.ORDER),this.ORDER)}sqrN(t){return t*t}addN(t,r){return t+r}subN(t,r){return t-r}mulN(t,r){return t*r}inv(t){return DO(t,this.ORDER)}sqrt(t){let r=LO.get(this);return r||LO.set(this,r=N$(this.ORDER)),r(this,t)}toBytes(t){return this.isLE?Ym(t,this.BYTES):lp(t,this.BYTES)}fromBytes(t,r=!1){qt(t);let{_lengths:i,BYTES:n,isLE:o,ORDER:a,_mod:s}=this;if(i){if(t.length<1||!i.includes(t.length)||t.length>n)throw new Error("Field.fromBytes: expected "+i+" bytes, got "+t.length);let c=new Uint8Array(n);c.set(t,o?0:c.length-t.length),t=c}if(t.length!==n)throw new Error("Field.fromBytes: expected "+n+" bytes, got "+t.length);let u=o?Lc(t):bi(t);if(s&&(u=Fi(u,a)),!r&&!this.isValid(u))throw new Error("invalid field element: outside of range 0..ORDER");return u}invertBatch(t){return tf(this,t)}cmov(t,r,i){return $u(i,"condition"),i?r:t}};Object.freeze(dp.prototype)});function YO(e){let t=e;if(typeof t!="function")throw new TypeError("Point must be a constructor");pn({Fp:t.Fp,Fn:t.Fn,fromAffine:t.fromAffine,fromBytes:t.fromBytes,fromHex:t.fromHex},{Fp:"object",Fn:"object",fromAffine:"function",fromBytes:"function",fromHex:"function"}),ef(t.Fp),ef(t.Fn)}function f0(e,t){let r=t.negate();return e?r:t}function iy(e,t){let r=tf(e.Fp,t.map(i=>i.Z));return t.map((i,n)=>e.fromAffine(i.toAffine(r[n])))}function $O(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function ey(e,t){$O(e,t);let r=Math.ceil(t/e)+1,i=2**(e-1),n=2**e,o=Uc(e),a=BigInt(e);return{windows:r,windowSize:i,mask:o,maxNumber:n,shiftBy:a}}function GO(e,t,r){let{windowSize:i,mask:n,maxNumber:o,shiftBy:a}=r,s=Number(e&n),u=e>>a;s>i&&(s-=o,u+=rf);let c=t*i,l=c+Math.abs(s)-1,m=s===0,w=s<0,E=t%2!==0;return{nextN:u,offset:l,isZero:m,isNeg:w,isNegF:E,offsetF:c}}function U$(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((r,i)=>{if(!(r instanceof t))throw new Error("invalid point at index "+i)})}function F$(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((r,i)=>{if(!t.isValid(r))throw new Error("invalid scalar at index "+i)})}function ry(e){return XO.get(e)||1}function ZO(e){if(e!==zc)throw new Error("invalid wNAF")}function JO(e,t,r,i){let n=t,o=e.ZERO,a=e.ZERO;for(;r>zc||i>zc;)r&rf&&(o=o.add(n)),i&rf&&(a=a.add(n)),n=n.double(),r>>=rf,i>>=rf;return{p1:o,p2:a}}function QO(e,t,r){let i=e.Fn;U$(t,e),F$(r,i);let n=t.length,o=r.length;if(n!==o)throw new Error("arrays of points and scalars must have equal length");let a=e.ZERO,s=Xu(BigInt(n)),u=1;s>12?u=s-3:s>4?u=s-2:s>0&&(u=2);let c=Uc(u),l=new Array(Number(c)+1).fill(a),m=Math.floor((i.BITS-1)/u)*u,w=a;for(let E=m;E>=0;E-=u){l.fill(a);for(let M=0;M<o;M++){let D=r[M],L=Number(D>>BigInt(E)&c);l[L]=l[L].add(t[M])}let P=a;for(let M=l.length-1,D=a;M>0;M--)D=D.add(l[M]),P=P.add(D);if(w=w.add(P),E!==0)for(let M=0;M<u;M++)w=w.double()}return w}function WO(e,t,r){if(t){if(t.ORDER!==e)throw new Error("Field.ORDER must match order: Fp == p, Fn == n");return ef(t),t}else return Fc(e,{isLE:r})}function eA(e,t,r={},i){if(i===void 0&&(i=e==="edwards"),!t||typeof t!="object")throw new Error(`expected valid ${e} CURVE object`);for(let u of["p","n","h"]){let c=t[u];if(!(typeof c=="bigint"&&c>zc))throw new Error(`CURVE.${u} must be positive bigint`)}let n=WO(t.p,r.Fp,i),o=WO(t.n,r.Fn,i),s=["Gx","Gy","a",e==="weierstrass"?"b":"d"];for(let u of s)if(!n.isValid(t[u]))throw new Error(`CURVE.${u} must be valid field element of CURVE.Fp`);return t=Object.freeze(Object.assign({},t)),{CURVE:t,Fp:n,Fn:o}}function gp(e,t){return function(i){let n=e(i);return{secretKey:n,publicKey:t(n)}}}var zc,rf,ty,XO,pp,vp=Xr(()=>{v();Ju();jc();zc=BigInt(0),rf=BigInt(1);ty=new WeakMap,XO=new WeakMap;pp=class{constructor(t,r){Z(this,"BASE");Z(this,"ZERO");Z(this,"Fn");Z(this,"bits");this.BASE=t.BASE,this.ZERO=t.ZERO,this.Fn=t.Fn,this.bits=r}_unsafeLadder(t,r,i=this.ZERO){let n=t;for(;r>zc;)r&rf&&(i=i.add(n)),n=n.double(),r>>=rf;return i}precomputeWindow(t,r){let{windows:i,windowSize:n}=ey(r,this.bits),o=[],a=t,s=a;for(let u=0;u<i;u++){s=a,o.push(s);for(let c=1;c<n;c++)s=s.add(a),o.push(s);a=s.double()}return o}wNAF(t,r,i){if(!this.Fn.isValid(i))throw new Error("invalid scalar");let n=this.ZERO,o=this.BASE,a=ey(t,this.bits);for(let s=0;s<a.windows;s++){let{nextN:u,offset:c,isZero:l,isNeg:m,isNegF:w,offsetF:E}=GO(i,s,a);i=u,l?o=o.add(f0(w,r[E])):n=n.add(f0(m,r[c]))}return ZO(i),{p:n,f:o}}wNAFUnsafe(t,r,i,n=this.ZERO){let o=ey(t,this.bits);for(let a=0;a<o.windows&&i!==zc;a++){let{nextN:s,offset:u,isZero:c,isNeg:l}=GO(i,a,o);if(i=s,!c){let m=r[u];n=n.add(l?m.negate():m)}}return ZO(i),n}getPrecomputes(t,r,i){let n=ty.get(r);return n||(n=this.precomputeWindow(r,t),t!==1&&(typeof i=="function"&&(n=i(n)),ty.set(r,n))),n}cached(t,r,i){let n=ry(t);return this.wNAF(n,this.getPrecomputes(n,t,i),r)}unsafe(t,r,i,n){let o=ry(t);return o===1?this._unsafeLadder(t,r,n):this.wNAFUnsafe(o,this.getPrecomputes(o,t,i),r,n)}createCache(t,r){$O(r,this.bits),XO.set(t,r),ty.delete(t)}hasCache(t){return ry(t)!==1}}});function tA(e){if(!Number.isSafeInteger(e)||e<0||e>4294967295)throw new Error("wrong u32 integer:"+e);return e}function H$(e){if(tA(e),e<=1)return 1;if(e>2147483648)throw new Error("nextPowerOfTwo overflow: result does not fit u32");return 1<<ny(e-1)+1>>>0}function ny(e){return tA(e),31-Math.clz32(e)}function rA(e,t,r,i,n){let o=e,a=r||((l,m)=>new Array(l).fill(m??o.ZERO)),s=l=>{if(Array.isArray(l))return!0;if(!ArrayBuffer.isView(l))return!1;let m=l;return typeof m.length=="number"&&typeof m.slice=="function"&&typeof m[Symbol.iterator]=="function"},u=(...l)=>{if(!l.length)return 0;for(let w of l)if(!s(w))throw new Error("poly: not polynomial: "+w);let m=l[0].length;for(let w=1;w<l.length;w++)if(l[w].length!==m)throw new Error(`poly: mismatched lengths ${m} vs ${l[w].length}`);if(n!==void 0&&m!==n)throw new Error(`poly: expected fixed length ${n}, got ${m}`);return m};function c(l,m,w=!1){let E=ny(m),P=w?t.brp(E):t.roots(E);for(let M=0;M<m;M++)if(o.eql(l,P[M]))return M;return-1}return{roots:t,create:a,length:n,extend:(l,m)=>{u(l);let w=a(m,o.ZERO);for(let E=0;E<Math.min(l.length,m);E++)w[E]=l[E];return w},degree:l=>{u(l);for(let m=l.length-1;m>=0;m--)if(!o.is0(l[m]))return m;return-1},add:(l,m)=>{let w=u(l,m),E=a(w);for(let P=0;P<w;P++)E[P]=o.add(l[P],m[P]);return E},sub:(l,m)=>{let w=u(l,m),E=a(w);for(let P=0;P<w;P++)E[P]=o.sub(l[P],m[P]);return E},dot:(l,m)=>{let w=u(l,m),E=a(w);for(let P=0;P<w;P++)E[P]=o.mul(l[P],m[P]);return E},mul:(l,m)=>{if(s(m)){let w=u(l,m);if(i){let E=i.direct(l,!1,!0),P=i.direct(m,!1,!0);for(let M=0;M<E.length;M++)E[M]=o.mul(E[M],P[M]);return i.inverse(E,!0,!1)}else{let E=a(w);for(let P=0;P<w;P++)for(let M=0;M<w;M++){let D=(P+M)%w;E[D]=o.add(E[D],o.mul(l[P],m[M]))}return E}}else{let w=a(u(l));for(let E=0;E<w.length;E++)w[E]=o.mul(l[E],m);return w}},convolve(l,m){let w=H$(l.length+m.length-1);return this.mul(this.extend(l,w),this.extend(m,w))},shift(l,m){let w=a(u(l));w[0]=l[0];for(let E=1,P=o.ONE;E<l.length;E++)P=o.mul(P,m),w[E]=o.mul(l[E],P);return w},clone:l=>{u(l);let m=a(l.length);for(let w=0;w<l.length;w++)m[w]=l[w];return m},eval:(l,m)=>{u(l,m);let w=o.ZERO;for(let E=0;E<l.length;E++)w=o.add(w,o.mul(l[E],m[E]));return w},monomial:{basis:(l,m)=>{let w=a(m),E=o.ONE;for(let P=0;P<m;P++)w[P]=E,E=o.mul(E,l);return w},eval:(l,m)=>{u(l);let w=o.ZERO;for(let E=l.length-1;E>=0;E--)w=o.add(o.mul(w,m),l[E]);return w}},lagrange:{basis:(l,m,w=!1,E)=>{let P=ny(m),M=E||(w?t.brp(P):t.roots(P)),D=a(m),L=c(l,m,w);if(L!==-1)return D[L]=o.ONE,D;let U=o.pow(l,BigInt(m)),K=o.mul(o.sub(U,o.ONE),o.inv(BigInt(m))),C=a(m);for(let F=0;F<m;F++)C[F]=o.sub(l,M[F]);let N=o.invertBatch(C);for(let F=0;F<m;F++)D[F]=o.mul(K,o.mul(M[F],N[F]));return D},eval(l,m,w=!1){u(l);let E=c(m,l.length,w);if(E!==-1)return l[E];let P=this.basis(m,l.length,w),M=o.ZERO;for(let D=0;D<l.length;D++)o.is0(l[D])||(M=o.add(M,o.mul(l[D],P[D])));return M}},vanishing(l){u(l);let m=a(l.length+1,o.ZERO);m[0]=o.ONE;for(let w of l){let E=o.neg(w);for(let P=m.length-1;P>0;P--)m[P]=o.add(o.mul(m[P],E),m[P-1]);m[0]=o.mul(m[0],E)}return m}}}var iA=Xr(()=>{v()});function nf(e,t){if(dn(e),dn(t),t<0||t>4)throw new Error("invalid I2OSP length: "+t);if(e<0||e>2**(8*t)-1)throw new Error("invalid I2OSP input: "+e);let r=Array.from({length:t}).fill(0);for(let i=t-1;i>=0;i--)r[i]=e&255,e>>>=8;return new Uint8Array(r)}function z$(e,t){let r=new Uint8Array(e.length);for(let i=0;i<e.length;i++)r[i]=e[i]^t[i];return r}function nA(e){if(!Yu(e)&&typeof e!="string")throw new Error("DST must be Uint8Array or ascii string");let t=typeof e=="string"?qc(e):e;if(t.length===0)throw new Error("DST must be non-empty");return t}function K$(e,t,r,i){qt(e),dn(r),t=nA(t),t.length>255&&(t=i(kt(qc("H2C-OVERSIZE-DST-"),t)));let{outputLen:n,blockLen:o}=i,a=Math.ceil(r/n);if(r>65535||a>255)throw new Error("expand_message_xmd: invalid lenInBytes");let s=kt(t,nf(t.length,1)),u=new Uint8Array(o),c=nf(r,2),l=new Array(a),m=i(kt(u,e,c,nf(0,1),s));l[0]=i(kt(m,nf(1,1),s));for(let E=1;E<a;E++){let P=[z$(m,l[E-1]),nf(E+1,1),s];l[E]=i(kt(...P))}return kt(...l).slice(0,r)}function V$(e,t,r,i,n){if(qt(e),dn(r),t=nA(t),t.length>255){let o=Math.ceil(2*i/8);t=n.create({dkLen:o}).update(qc("H2C-OVERSIZE-DST-")).update(t).digest()}if(r>65535||t.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return n.create({dkLen:r}).update(e).update(nf(r,2)).update(t).update(nf(t.length,1)).digest()}function oy(e,t,r){pn(r,{p:"bigint",m:"number",k:"number",hash:"function"});let{p:i,k:n,m:o,hash:a,expand:s,DST:u}=r;if(dn(a.outputLen,"valid hash"),qt(e),dn(t),t<1)throw new Error("hash_to_field: expected count >= 1");if(o<1)throw new Error("hash_to_field: expected m >= 1");let c=i.toString(2).length,l=Math.ceil((c+n)/8),m=t*o*l,w;if(s==="xmd")w=K$(e,u,m,a);else if(s==="xof")w=V$(e,u,m,n,a);else if(s==="_internal_pass")w=e;else throw new Error('expand must be "xmd" or "xof"');let E=new Array(t);for(let P=0;P<t;P++){let M=new Array(o);for(let D=0;D<o;D++){let L=l*(D+P*o),U=w.subarray(L,L+l);M[D]=Fi(j$(U),i)}E[P]=M}return E}function oA(e,t){let r=t.map(i=>Array.from(i).reverse());return(i,n)=>{let[o,a,s,u]=r.map(m=>m.reduce((w,E)=>e.add(e.mul(w,i),E))),[c,l]=tf(e,[a,u],!0);return i=e.mul(o,c),n=e.mul(n,e.mul(s,l)),{x:i,y:n}}}function aA(e,t,r){if(typeof t!="function")throw new Error("mapToCurve() must be defined");let i=s=>Object.freeze({...s,DST:Yu(s.DST)?hp(s.DST):s.DST,...s.encodeDST===void 0?{}:{encodeDST:Yu(s.encodeDST)?hp(s.encodeDST):s.encodeDST}}),n=i(r);function o(s){return e.fromAffine(t(s))}function a(s){let u=s.clearCofactor();return u.equals(e.ZERO)?e.ZERO:(u.assertValidity(),u)}return Object.freeze({get defaults(){return i(n)},Point:e,hashToCurve(s,u){let c=Object.assign({},n,u),l=oy(s,2,c),m=o(l[0]),w=o(l[1]);return a(m.add(w))},encodeToCurve(s,u){let c=n.encodeDST?{DST:n.encodeDST}:{},l=Object.assign({},n,c,u),m=oy(s,1,l),w=o(m[0]);return a(w)},mapToCurve(s){if(n.m===1){if(typeof s!="bigint")throw new Error("expected bigint (m=1)");return a(o([s]))}if(!Array.isArray(s))throw new Error("expected array of bigints");for(let u of s)if(typeof u!="bigint")throw new Error("expected array of bigints");return a(o(s))},hashToScalar(s,u){let c=e.Fn.ORDER,l=Object.assign({},n,{p:c,m:1,DST:G$},u);return oy(s,1,l)[0][0]}})}var j$,G$,sA=Xr(()=>{v();Ju();jc();j$=bi;G$="HashToScalar-"});function ay(e){pn(e,{name:"string",hash:"function"},{hashToScalar:"function",validatePoint:"function",parsePublicKey:"function",adjustScalar:"function",adjustPoint:"function",challenge:"function",adjustNonces:"function",adjustSecret:"function",adjustPublic:"function",adjustGroupCommitmentShare:"function",adjustDKG:"function"}),YO(e.Point);let{Point:t}=e,r=e.Fn===void 0?t.Fn:e.Fn,i=e.hash,n=e.hashToScalar===void 0?(q,W={DST:new Uint8Array})=>{let $=i(kt(W.DST,q));return r.create(r.isLE?Lc($):bi($))}:e.hashToScalar,o=Ia(e.H1!==void 0?e.H1:e.name+"rho"),a=Ia(e.H2!==void 0?e.H2:e.name+"chal"),s=Ia(e.H3!==void 0?e.H3:e.name+"nonce"),u=Ia(e.H4!==void 0?e.H4:e.name+"msg"),c=Ia(e.H5!==void 0?e.H5:e.name+"com"),l=Ia(e.HDKG!==void 0?e.HDKG:e.name+"dkg"),m=Ia(e.HID!==void 0?e.HID:e.name+"id"),w=q=>n(q,{DST:o}),E=q=>n(q,{DST:a}),P=q=>n(q,{DST:s}),M=q=>i(kt(u,q)),D=q=>i(kt(c,q)),L=q=>n(q,{DST:l}),U=q=>n(q,{DST:m}),K=(q=ki)=>{let W=Hc(q(u0(r.ORDER)),r.ORDER,r.isLE);return r.isLE?Lc(W):bi(W)},C=q=>q.toBytes(),N=q=>{let W=t.fromBytes(q);return e.validatePoint&&e.validatePoint(W),W},F=(q,W)=>({identifier:q,hiding:C(t.BASE.multiply(r.fromBytes(W.hiding))),binding:C(t.BASE.multiply(r.fromBytes(W.binding)))}),H=e.adjustPoint===void 0?q=>q:e.adjustPoint,z=q=>{if(!r.isValid(q)||r.is0(q))throw new Error("Invalid identifier "+q);return q},G=q=>Pa(r.toBytes(z(q))),B=q=>{let W=z(r.fromBytes(Dc(q)));if(G(W)!==q)throw new Error("expected canonical identifier hex");return W},g={encode:(q,W)=>{let $=kt(C(q),r.toBytes(W));return e.adjustTx&&($=e.adjustTx.encode($)),$},decode:q=>{e.adjustTx&&(q=e.adjustTx.decode(q));let W=N(q.subarray(0,-r.BYTES)),$=r.fromBytes(q.subarray(-r.BYTES));return{R:W,z:$}}},I=(q=ki)=>{let W=K(q);e.adjustScalar&&(W=e.adjustScalar(W));let $=t.BASE.multiply(W);return{scalar:W,point:$}},y="roots are unavailable in FROST polynomial mode",f={info:{G:r.ZERO,oddFactor:r.ZERO,powerOfTwo:0},roots(){throw new Error(y)},brp(){throw new Error(y)},inverse(){throw new Error(y)},omega(){throw new Error(y)},clear(){}},p=rA(r,f),_=(q,W)=>QO(t,q,W),x=(q,W)=>{if(!W.length)throw new Error("empty coefficients");return p.monomial.eval(W,q)},b=(q,W)=>{let $="invalid parameters";if(!q.some(le=>r.eql(le,W)))throw new Error($);let te=new Set(q);if(te.size!==q.length)throw new Error($);if(!te.has(W))throw new Error($);let se=r.ONE,ue=r.ONE;for(let le of q)r.eql(le,W)||(se=r.mul(se,le),ue=r.mul(ue,r.sub(le,W)));return r.div(se,ue)},d=(q,W)=>{let $=p.monomial.basis(q,W.length);return _(W,$)},O=(q,W,$,te=ki)=>{mp(q);let se=W===void 0?K(te):r.fromBytes(W);if(!$){$=[];for(let Pe=0;Pe<q.min-1;Pe++)$.push(K(te))}if($.length!==q.min-1)throw new Error("wrong coefficients length");let ue=[se,...$],le=ue.map(Pe=>t.BASE.multiply(Pe));return{coefficients:ue,commitment:le,secret:se}},T={challenge:(q,W,$)=>L(kt(r.toBytes(q),C(W),C($))),compute(q,W,$,te=ki){if(W.length<1)throw new Error("coefficients should have at least one element");let{point:se,scalar:ue}=I(te),le=$[0],Pe=this.challenge(q,le,se),ge=r.add(ue,r.mul(W[0],Pe));return g.encode(se,ge)},validate(q,W,$){if(W.length<1)throw new Error("commitment should have at least one element");let{R:te,z:se}=g.decode($),ue=N(W[0]),le=this.challenge(q,ue,te);if(!te.equals(t.BASE.multiply(se).subtract(ue.multiply(le))))throw new Error("invalid proof of knowledge")}},S={challenge:(q,W,$)=>e.challenge?e.challenge(q,W,$):E(kt(C(q),C(W),$)),sign(q,W,$=ki){let{point:te,scalar:se}=I($),ue=t.BASE.multiply(W),le=this.challenge(te,ue,q),Pe=r.add(se,r.mul(le,W));return[te,Pe]},verify(q,W,$,te){e.adjustPoint&&(te=e.adjustPoint(te)),e.adjustPoint&&(W=e.adjustPoint(W));let se=this.challenge(W,te,q),ue=t.BASE.multiply($),le=te.multiply(se),Pe=ue.subtract(le).subtract(W);return Pe.clearCofactor&&(Pe=Pe.clearCofactor()),t.ZERO.equals(Pe)}},R=(q,W,$)=>{if(!t.BASE.multiply($).equals(d(q,W)))throw new Error("invalid secret share")},Y={fromNumber(q){if(!Number.isSafeInteger(q))throw new Error("expected safe interger");return G(BigInt(q))},derive(q){if(typeof q!="string")throw new Error("wrong identifier string: "+q);return G(U(Ia(q)))}},X=(q,W=ki)=>P(kt(W(32),r.toBytes(q))),ne=(q,W,$)=>{let te=W.map(ye=>[ye.identifier,B(ye.identifier),N(ye.hiding),N(ye.binding)]);te.sort((ye,Be)=>ye[1]<Be[1]?-1:ye[1]>Be[1]?1:0);let se=[];for(let[ye,Be,be,_e]of te)se.push(r.toBytes(Be),C(be),C(_e));let ue=D(kt(...se)),le=kt(C(q),M($),ue),Pe={};for(let[ye,Be]of te)Pe[ye]=w(kt(le,r.toBytes(Be)));let ge=[],ve=[];for(let[ye,Be,be,_e]of te){if(t.ZERO.equals(be)||t.ZERO.equals(_e))throw new Error("infinity commitment");ge.push(be,_e),ve.push(r.ONE,Pe[ye])}let sr=_(ge,ve);return{identifiers:te.map(ye=>ye[1]),groupCommitment:sr,bindingFactors:Pe}},ce=(q,W,$,te)=>{let se=H(N(q)),ue=B(te),{identifiers:le,groupCommitment:Pe,bindingFactors:ge}=ne(se,W,$),ve=ge[te],sr=b(le,ue),Ee=S.challenge(Pe,se,$);return{lambda:sr,challenge:Ee,bindingFactor:ve,groupCommitment:Pe}};Object.freeze(Y);let pe={Identifier:Y,DKG:Object.freeze({round1:(q,W,$,te=ki)=>{mp(W);let se=B(q),{coefficients:ue,commitment:le}=O(W,$,void 0,te),Pe=T.compute(se,ue,le,te),ge=le.map(C),ve={identifier:G(se),commitment:ge,proofOfKnowledge:Pe},sr={identifier:se,coefficients:ue,commitment:le.map(C),signers:{min:W.min,max:W.max},step:1};return{public:ve,secret:sr}},round2:(q,W)=>{if(W.length!==q.signers.max-1)throw new Error("wrong number of round1 packages");if(!q.coefficients||q.step===3)throw new Error("round3 package used in round2");let $={};for(let te of W){if(te.commitment.length!==q.signers.min)throw new Error("wrong number of commitments");let se=B(te.identifier);if(se===q.identifier)throw new Error("duplicate id="+G(se));T.validate(se,te.commitment,te.proofOfKnowledge);for(let le of te.commitment)N(le);if($[te.identifier])throw new Error("Duplicate id="+se);let ue=r.toBytes(x(se,q.coefficients));$[te.identifier]={identifier:G(q.identifier),signingShare:ue}}return q.step=2,$},round3:(q,W,$)=>{if(W.length!==q.signers.max-1)throw new Error("wrong length of round1 packages");if(!q.coefficients||q.step!==2)throw new Error("round2 package used in round3");if($.length!==W.length)throw new Error("wrong length of round2 packages");let te={};for(let Be of W){if(!Be.identifier||!Be.commitment)throw new Error("wrong round1 share");te[Be.identifier]={...Be}}for(let Be of $){if(!Be.identifier||!Be.signingShare)throw new Error("wrong round2 share");if(!te[Be.identifier])throw new Error("round1 share for "+Be.identifier+" is missing");te[Be.identifier].signingShare=Be.signingShare}if(Object.keys(te).length!==W.length)throw new Error("mismatch identifiers between rounds");let se=r.ZERO;if(q.commitment.length!==q.signers.min)throw new Error("wrong commitments length");let ue=q.commitment.map(N),le=x(q.identifier,q.coefficients);R(q.identifier,ue,le);let Pe=ue.map(C),ge={[G(q.identifier)]:Pe};for(let Be in te){let be=te[Be];if(!be.signingShare||!be.commitment)throw new Error("mismatch identifiers");let _e=B(Be),Qi=r.fromBytes(be.signingShare),Ce=be.commitment.map(N);R(q.identifier,Ce,Qi),se=r.add(se,Qi);let Re=G(_e);if(ge[Re])throw new Error("duplicated id="+Re);ge[Re]=be.commitment}se=r.add(se,le);let ve=new Array(q.signers.min).fill(t.ZERO);for(let Be in ge){let be=ge[Be];if(be.length!==q.signers.min)throw new Error("wrong commitments length");for(let _e=0;_e<be.length;_e++)ve[_e]=ve[_e].add(N(be[_e]))}let sr=ve.map(C),Ee={};for(let Be in ge)Ee[Be]=C(d(B(Be),ve));let ye={public:{signers:{min:q.signers.min,max:q.signers.max},commitments:sr,verifyingShares:Object.fromEntries(Object.entries(Ee).map(([Be,be])=>[Be,be.slice()]))},secret:{identifier:G(q.identifier),signingShare:r.toBytes(se)}};e.adjustDKG&&(ye=e.adjustDKG(ye));for(let Be=0;Be<q.coefficients.length;Be++)q.coefficients[Be]-=q.coefficients[Be];return delete q.coefficients,q.step=3,ye},clean(q){if(q.identifier-=q.identifier,q.coefficients)for(let W=0;W<q.coefficients.length;W++)q.coefficients[W]-=q.coefficients[W];q.step=3}}),trustedDealer(q,W,$,te=ki){if(mp(q),W===void 0){W=[];for(let ve=1;ve<=q.max;ve++)W.push(Y.fromNumber(ve))}else if(!Array.isArray(W)||W.length!==q.max)throw new Error("identifiers should be array of "+q.max);let se={};for(let ve of W){let sr=B(ve);if(ve in se)throw new Error("duplicated id="+ve);se[ve]=sr}let ue=O(q,$,void 0,te),le=ue.commitment.map(C),Pe={},ge={};for(let ve of W){let sr=x(se[ve],ue.coefficients);ge[ve]=C(t.BASE.multiply(sr)),Pe[ve]={identifier:ve,signingShare:r.toBytes(sr)}}return{public:{signers:{min:q.min,max:q.max},commitments:le,verifyingShares:ge},secretShares:Pe}},validateSecret(q,W){let $=B(q.identifier),te=W.commitments.map(N),se=r.fromBytes(q.signingShare);R($,te,se)},commit(q,W=ki){let $=r.fromBytes(q.signingShare),te=X($,W),se=X($,W),ue={hiding:r.toBytes(te),binding:r.toBytes(se)};return{nonces:ue,commitments:F(q.identifier,ue)}},signShare(q,W,$,te,se){uA(W.signers,te.length);let ue=r.fromBytes($.hiding),le=r.fromBytes($.binding);if(r.is0(ue)||r.is0(le))throw new Error("signing nonces already used");let Pe={identifier:q.identifier,hiding:C(t.BASE.multiply(ue)),binding:C(t.BASE.multiply(le))},ge=te.find(De=>De.identifier===q.identifier);if(!ge)throw new Error("missing signer commitment");if(Pa(ge.hiding)!==Pa(Pe.hiding)||Pa(ge.binding)!==Pa(Pe.binding))throw new Error("incorrect signer commitment");e.adjustSecret&&(q=e.adjustSecret(q,W)),e.adjustPublic&&(W=e.adjustPublic(W));let ve=r.fromBytes(q.signingShare),{lambda:sr,challenge:Ee,bindingFactor:ye,groupCommitment:Be}=ce(W.commitments[0],te,se,q.identifier),be=e.adjustNonces?e.adjustNonces(Be,$):$,_e=e.adjustNonces?r.fromBytes(be.hiding):ue,Qi=e.adjustNonces?r.fromBytes(be.binding):le,Ce=r.mul(r.mul(sr,ve),Ee),Re=r.mul(Qi,ye),Js=r.toBytes(r.add(r.add(_e,Re),Ce));return $.hiding.fill(0),$.binding.fill(0),Js},verifyShare(q,W,$,te,se){e.adjustPublic&&(q=e.adjustPublic(q));let ue=W.find(Qi=>Qi.identifier===te);if(!ue)throw new Error("cannot find identifier commitment");let le=N(q.verifyingShares[te]),Pe=N(ue.hiding),ge=N(ue.binding),{lambda:ve,challenge:sr,bindingFactor:Ee,groupCommitment:ye}=ce(q.commitments[0],W,$,te),Be=Pe.add(ge.multiply(Ee));e.adjustGroupCommitmentShare&&(Be=e.adjustGroupCommitmentShare(ye,Be));let be=t.BASE.multiply(r.fromBytes(se)),_e=Be.add(le.multiply(r.mul(sr,ve)));return be.equals(_e)},aggregate(q,W,$,te){e.adjustPublic&&(q=e.adjustPublic(q));try{uA(q.signers,W.length)}catch{throw new Kc("aggregation failed",[])}let se=W.map(ge=>ge.identifier);if(se.length!==Object.keys(te).length)throw new Kc("aggregation failed",[]);for(let ge of se)if(!(ge in te)||!(ge in q.verifyingShares))throw new Kc("aggregation failed",[]);let ue=N(q.commitments[0]),{groupCommitment:le}=ne(ue,W,$),Pe=r.ZERO;for(let ge of se)Pe=r.add(Pe,r.fromBytes(te[ge]));if(!S.verify($,le,Pe,ue)){let ge=[];for(let ve of se)this.verifyShare(q,W,$,ve,te[ve])||ge.push(ve);throw new Kc("aggregation failed",ge)}return g.encode(le,Pe)},sign(q,W){let $=r.fromBytes(W);e.adjustScalar&&($=e.adjustScalar($));let[te,se]=S.sign(q,$);return g.encode(te,se)},verify(q,W,$){let te=e.parsePublicKey?e.parsePublicKey($):N($),{R:se,z:ue}=g.decode(q);return S.verify(W,se,ue,te)},combineSecret(q,W){if(mp(W),!Array.isArray(q)||q.length<W.min)throw new Error("wrong secret shares array");let $=[],te={};for(let le of q){let Pe=B(le.identifier),ge=G(Pe);if(te[ge])throw new Error("duplicated id="+ge);te[ge]=!0,$.push([Pe,r.fromBytes(le.signingShare)])}let se=$.map(([le])=>le),ue=r.ZERO;for(let[le,Pe]of $)ue=r.add(ue,r.mul(Pe,b(se,le)));return r.toBytes(ue)},utils:Object.freeze({Fn:r,randomScalar:(q=ki)=>r.toBytes(I(q).scalar),generateSecretPolynomial:(q,W,$,te)=>{let se=O(q,W,$,te);return{...se,commitment:se.commitment.map(C)}}})};return Object.freeze(pe)}var mp,uA,Kc,fA=Xr(()=>{v();gs();Ju();vp();iA();jc();mp=e=>{if(!Number.isSafeInteger(e.min)||!Number.isSafeInteger(e.max))throw new Error("Wrong signers info: min="+e.min+" max="+e.max);if(e.min<2||e.max<2||e.min>e.max)throw new Error("Wrong signers info: min="+e.min+" max="+e.max)},uA=(e,t)=>{if(t<e.min||t>e.max)throw new Error("Wrong number of commitments="+t)},Kc=class extends Error{constructor(r,i){super(r);Z(this,"cheaters");this.cheaters=i}}});var uy={};X1(uy,{_HMAC:()=>c0,hmac:()=>sy});var c0,sy,yp=Xr(()=>{v();gs();c0=class{constructor(t,r){Z(this,"oHash");Z(this,"iHash");Z(this,"blockLen");Z(this,"outputLen");Z(this,"canXOF",!1);Z(this,"finished",!1);Z(this,"destroyed",!1);if(Y2(t),Io(r,void 0,"key"),this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let i=this.blockLen,n=new Uint8Array(i);n.set(r.length>i?t.create().update(r).digest():r);for(let o=0;o<n.length;o++)n[o]^=54;this.iHash.update(n),this.oHash=t.create();for(let o=0;o<n.length;o++)n[o]^=106;this.oHash.update(n),Ea(n)}update(t){return Cc(this),this.iHash.update(t),this}digestInto(t){Cc(this),$2(t,this),this.finished=!0;let r=t.subarray(0,this.outputLen);this.iHash.digestInto(r),this.oHash.update(r),this.oHash.digestInto(r),this.destroy()}digest(){let t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));let{oHash:r,iHash:i,finished:n,destroyed:o,blockLen:a,outputLen:s}=this;return t=t,t.finished=n,t.destroyed=o,t.blockLen=a,t.outputLen=s,t.oHash=r._cloneInto(t.oHash),t.iHash=i._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}},sy=(()=>{let e=((t,r,i)=>new c0(t,r).update(i).digest());return e.create=(t,r)=>new c0(t,r),e})()});function Z$(e,t,r){$m("scalar",e,gn,r);let[[i,n],[o,a]]=t,s=cA(a*e,r),u=cA(-n*e,r),c=e-s*i-u*o,l=-s*n-u*a,m=c<gn,w=l<gn;m&&(c=-c),w&&(l=-l);let E=Uc(Math.ceil(Xu(r)/2))+Kr;if(c<gn||c>=E||l<gn||l>=E)throw new Error("splitScalar (endomorphism): failed for k");return{k1neg:m,k1:c,k2neg:w,k2:l}}function cy(e){if(!["compact","recovered","der"].includes(e))throw new Error('Signature format must be "compact", "recovered", or "der"');return e}function fy(e,t){pn(e);let r={};for(let i of Object.keys(t))r[i]=e[i]===void 0?t[i]:e[i];return $u(r.lowS,"lowS"),$u(r.prehash,"prehash"),r.format!==void 0&&cy(r.format),r}function lA(e,t={}){let r=eA("weierstrass",e,t),i=r.Fp,n=r.Fn,o=r.CURVE,{h:a,n:s}=o;pn(t,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object"});let{endo:u,allowInfinityPoint:c}=t;if(u&&(!i.is0(o.a)||typeof u.beta!="bigint"||!Array.isArray(u.basises)))throw new Error('invalid endo: expected "beta": bigint and "basises": array');let l=pA(i,n);function m(){if(!i.isOdd)throw new Error("compression is not supported: Field does not have .isOdd()")}function w(I,y,f){if(c&&y.is0())return Uint8Array.of(0);let{x:p,y:_}=y.toAffine(),x=i.toBytes(p);if($u(f,"isCompressed"),f){m();let b=!i.isOdd(_);return kt(hA(b),x)}else return kt(Uint8Array.of(4),x,i.toBytes(_))}function E(I){qt(I,void 0,"Point");let{publicKey:y,publicKeyUncompressed:f}=l,p=I.length,_=I[0],x=I.subarray(1);if(c&&p===1&&_===0)return{x:i.ZERO,y:i.ZERO};if(p===y&&(_===2||_===3)){let b=i.fromBytes(x);if(!i.isValid(b))throw new Error("bad point: is not on curve, wrong x");let d=D(b),O;try{O=i.sqrt(d)}catch(R){let Y=R instanceof Error?": "+R.message:"";throw new Error("bad point: is not on curve, sqrt error"+Y)}m();let T=i.isOdd(O);return(_&1)===1!==T&&(O=i.neg(O)),{x:b,y:O}}else if(p===f&&_===4){let b=i.BYTES,d=i.fromBytes(x.subarray(0,b)),O=i.fromBytes(x.subarray(b,b*2));if(!L(d,O))throw new Error("bad point: is not on curve");return{x:d,y:O}}else throw new Error(`bad point: got length ${p}, expected compressed=${y} or uncompressed=${f}`)}let P=t.toBytes===void 0?w:t.toBytes,M=t.fromBytes===void 0?E:t.fromBytes;function D(I){let y=i.sqr(I),f=i.mul(y,I);return i.add(i.add(f,i.mul(I,o.a)),o.b)}function L(I,y){let f=i.sqr(y),p=D(I);return i.eql(f,p)}if(!L(o.Gx,o.Gy))throw new Error("bad curve params: generator point");let U=i.mul(i.pow(o.a,Vc),hy),K=i.mul(i.sqr(o.b),BigInt(27));if(i.is0(i.add(U,K)))throw new Error("bad curve params: a or b");function C(I,y,f=!1){if(!i.isValid(y)||f&&i.is0(y))throw new Error(`bad point coordinate ${I}`);return y}function N(I){if(!(I instanceof z))throw new Error("Weierstrass Point expected")}function F(I){if(!u||!u.basises)throw new Error("no endo");return Z$(I,u.basises,n.ORDER)}function H(I,y,f,p,_){return f=new z(i.mul(f.X,I),f.Y,f.Z),y=f0(p,y),f=f0(_,f),y.add(f)}let g=class g{constructor(y,f,p){Z(this,"X");Z(this,"Y");Z(this,"Z");this.X=C("x",y),this.Y=C("y",f,!0),this.Z=C("z",p),Object.freeze(this)}static CURVE(){return o}static fromAffine(y){let{x:f,y:p}=y||{};if(!y||!i.isValid(f)||!i.isValid(p))throw new Error("invalid affine point");if(y instanceof g)throw new Error("projective point not allowed");return i.is0(f)&&i.is0(p)?g.ZERO:new g(f,p,i.ONE)}static fromBytes(y){let f=g.fromAffine(M(qt(y,void 0,"point")));return f.assertValidity(),f}static fromHex(y){return g.fromBytes(Dc(y))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(y=8,f=!0){return B.createCache(this,y),f||this.multiply(Vc),this}assertValidity(){let y=this;if(y.is0()){if(t.allowInfinityPoint&&i.is0(y.X)&&i.eql(y.Y,i.ONE)&&i.is0(y.Z))return;throw new Error("bad point: ZERO")}let{x:f,y:p}=y.toAffine();if(!i.isValid(f)||!i.isValid(p))throw new Error("bad point: x or y not field elements");if(!L(f,p))throw new Error("bad point: equation left != right");if(!y.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){let{y}=this.toAffine();if(!i.isOdd)throw new Error("Field doesn't support isOdd");return!i.isOdd(y)}equals(y){N(y);let{X:f,Y:p,Z:_}=this,{X:x,Y:b,Z:d}=y,O=i.eql(i.mul(f,d),i.mul(x,_)),T=i.eql(i.mul(p,d),i.mul(b,_));return O&&T}negate(){return new g(this.X,i.neg(this.Y),this.Z)}double(){let{a:y,b:f}=o,p=i.mul(f,Vc),{X:_,Y:x,Z:b}=this,d=i.ZERO,O=i.ZERO,T=i.ZERO,S=i.mul(_,_),R=i.mul(x,x),Y=i.mul(b,b),X=i.mul(_,x);return X=i.add(X,X),T=i.mul(_,b),T=i.add(T,T),d=i.mul(y,T),O=i.mul(p,Y),O=i.add(d,O),d=i.sub(R,O),O=i.add(R,O),O=i.mul(d,O),d=i.mul(X,d),T=i.mul(p,T),Y=i.mul(y,Y),X=i.sub(S,Y),X=i.mul(y,X),X=i.add(X,T),T=i.add(S,S),S=i.add(T,S),S=i.add(S,Y),S=i.mul(S,X),O=i.add(O,S),Y=i.mul(x,b),Y=i.add(Y,Y),S=i.mul(Y,X),d=i.sub(d,S),T=i.mul(Y,R),T=i.add(T,T),T=i.add(T,T),new g(d,O,T)}add(y){N(y);let{X:f,Y:p,Z:_}=this,{X:x,Y:b,Z:d}=y,O=i.ZERO,T=i.ZERO,S=i.ZERO,R=o.a,Y=i.mul(o.b,Vc),X=i.mul(f,x),ne=i.mul(p,b),ce=i.mul(_,d),pe=i.add(f,p),q=i.add(x,b);pe=i.mul(pe,q),q=i.add(X,ne),pe=i.sub(pe,q),q=i.add(f,_);let W=i.add(x,d);return q=i.mul(q,W),W=i.add(X,ce),q=i.sub(q,W),W=i.add(p,_),O=i.add(b,d),W=i.mul(W,O),O=i.add(ne,ce),W=i.sub(W,O),S=i.mul(R,q),O=i.mul(Y,ce),S=i.add(O,S),O=i.sub(ne,S),S=i.add(ne,S),T=i.mul(O,S),ne=i.add(X,X),ne=i.add(ne,X),ce=i.mul(R,ce),q=i.mul(Y,q),ne=i.add(ne,ce),ce=i.sub(X,ce),ce=i.mul(R,ce),q=i.add(q,ce),X=i.mul(ne,q),T=i.add(T,X),X=i.mul(W,q),O=i.mul(pe,O),O=i.sub(O,X),X=i.mul(pe,ne),S=i.mul(W,S),S=i.add(S,X),new g(O,T,S)}subtract(y){return N(y),this.add(y.negate())}is0(){return this.equals(g.ZERO)}multiply(y){let{endo:f}=t;if(!n.isValidNot0(y))throw new RangeError("invalid scalar: out of range");let p,_,x=b=>B.cached(this,b,d=>iy(g,d));if(f){let{k1neg:b,k1:d,k2neg:O,k2:T}=F(y),{p:S,f:R}=x(d),{p:Y,f:X}=x(T);_=R.add(X),p=H(f.beta,S,Y,b,O)}else{let{p:b,f:d}=x(y);p=b,_=d}return iy(g,[p,_])[0]}multiplyUnsafe(y){let{endo:f}=t,p=this,_=y;if(!n.isValid(_))throw new RangeError("invalid scalar: out of range");if(_===gn||p.is0())return g.ZERO;if(_===Kr)return p;if(B.hasCache(this))return this.multiply(_);if(f){let{k1neg:x,k1:b,k2neg:d,k2:O}=F(_),{p1:T,p2:S}=JO(g,p,b,O);return H(f.beta,T,S,x,d)}else return B.unsafe(p,_)}toAffine(y){let f=this,p=y,{X:_,Y:x,Z:b}=f;if(i.eql(b,i.ONE))return{x:_,y:x};let d=f.is0();p==null&&(p=d?i.ONE:i.inv(b));let O=i.mul(_,p),T=i.mul(x,p),S=i.mul(b,p);if(d)return{x:i.ZERO,y:i.ZERO};if(!i.eql(S,i.ONE))throw new Error("invZ was invalid");return{x:O,y:T}}isTorsionFree(){let{isTorsionFree:y}=t;return a===Kr?!0:y?y(g,this):B.unsafe(this,s).is0()}clearCofactor(){let{clearCofactor:y}=t;return a===Kr?this:y?y(g,this):this.multiplyUnsafe(a)}isSmallOrder(){return a===Kr?this.is0():this.clearCofactor().is0()}toBytes(y=!0){return $u(y,"isCompressed"),this.assertValidity(),P(g,this,y)}toHex(y=!0){return Pa(this.toBytes(y))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}};Z(g,"BASE",new g(o.Gx,o.Gy,i.ONE)),Z(g,"ZERO",new g(i.ZERO,i.ONE,i.ZERO)),Z(g,"Fp",i),Z(g,"Fn",n);let z=g,G=n.BITS,B=new pp(z,t.endo?Math.ceil(G/2):G);return G>=8&&z.BASE.precompute(8),Object.freeze(z.prototype),Object.freeze(z),z}function hA(e){return Uint8Array.of(e?2:3)}function W$(e,t){let r=ef(e),i=r.ORDER,n=gn;for(let M=i-Kr;M%Ao===gn;M/=Ao)n+=Kr;let o=n,a=Ao<<o-Kr-Kr,s=a*Ao,u=(i-Kr)/s,c=(u-Kr)/Ao,l=s-Kr,m=a,w=r.pow(t,u),E=r.pow(t,(u+Kr)/Ao),P=(M,D)=>{let L=w,U=r.pow(D,l),K=r.sqr(U);K=r.mul(K,D);let C=r.mul(M,K);C=r.pow(C,c),C=r.mul(C,U),U=r.mul(C,D),K=r.mul(C,M);let N=r.mul(K,U);C=r.pow(N,m);let F=r.eql(C,r.ONE);U=r.mul(K,E),C=r.mul(N,L),K=r.cmov(U,K,F),N=r.cmov(C,N,F);for(let H=o;H>Kr;H--){let z=H-Ao;z=Ao<<z-Kr;let G=r.pow(N,z),B=r.eql(G,r.ONE);U=r.mul(K,L),L=r.mul(L,L),G=r.mul(N,L),K=r.cmov(U,K,B),N=r.cmov(G,N,B)}return{isValid:!r.is0(D)&&(F||r.is0(M)),value:K}};if(r.ORDER%hy===Vc){let M=(r.ORDER-Vc)/hy,D=r.sqrt(r.neg(t));P=(L,U)=>{let K=r.sqr(U),C=r.mul(L,U);K=r.mul(K,C);let N=r.pow(K,M);N=r.mul(N,C);let F=r.mul(N,D),H=r.mul(r.sqr(N),U),z=r.eql(H,L),G=r.cmov(F,N,z);return{isValid:!r.is0(U)&&z,value:G}}}return P}function dA(e,t){let r=ef(e),{A:i,B:n,Z:o}=t;if(!r.isValidNot0(i)||!r.isValidNot0(n)||!r.isValid(o))throw new Error("mapToCurveSimpleSWU: invalid opts");if(r.eql(o,r.neg(r.ONE))||Qm(r,o))throw new Error("mapToCurveSimpleSWU: invalid opts");let a=r.mul(n,r.inv(r.mul(o,i))),s=r.add(r.add(r.mul(r.sqr(a),a),r.mul(i,a)),n);if(!Qm(r,s))throw new Error("mapToCurveSimpleSWU: invalid opts");let u=W$(r,o);if(!r.isOdd)throw new Error("Field does not have .isOdd()");return c=>{let l,m,w,E,P,M,D,L;l=r.sqr(c),l=r.mul(l,o),m=r.sqr(l),m=r.add(m,l),w=r.add(m,r.ONE),w=r.mul(w,n),E=r.cmov(o,r.neg(m),!r.eql(m,r.ZERO)),E=r.mul(E,i),m=r.sqr(w),M=r.sqr(E),P=r.mul(M,i),m=r.add(m,P),m=r.mul(m,w),M=r.mul(M,E),P=r.mul(M,n),m=r.add(m,P),D=r.mul(l,w);let{isValid:U,value:K}=u(m,M);L=r.mul(l,c),L=r.mul(L,K),D=r.cmov(D,w,U),L=r.cmov(L,K,U);let C=r.isOdd(c)===r.isOdd(L);L=r.cmov(r.neg(L),L,C);let N=tf(r,[E],!0)[0];return D=r.mul(D,N),{x:D,y:L}}}function pA(e,t){return{secretKey:t.BYTES,publicKey:1+e.BYTES,publicKeyUncompressed:1+2*e.BYTES,publicKeyHasPrefix:!0,signature:2*t.BYTES}}function Y$(e,t={}){let{Fn:r}=e,i=t.randomBytes===void 0?ki:t.randomBytes,n=Object.assign(pA(e.Fp,r),{seed:Math.max(u0(r.ORDER),16)});function o(E){try{let P=r.fromBytes(E);return r.isValidNot0(P)}catch{return!1}}function a(E,P){let{publicKey:M,publicKeyUncompressed:D}=n;try{let L=E.length;return P===!0&&L!==M||P===!1&&L!==D?!1:!!e.fromBytes(E)}catch{return!1}}function s(E){return E=E===void 0?i(n.seed):E,Hc(qt(E,n.seed,"seed"),r.ORDER)}function u(E,P=!0){return e.BASE.multiply(r.fromBytes(E)).toBytes(P)}function c(E){let{secretKey:P,publicKey:M,publicKeyUncompressed:D}=n,L=r._lengths;if(!Yu(E))return;let U=qt(E,void 0,"key").length,K=U===M||U===D,C=U===P||!!L?.includes(U);if(!(K&&C))return K}function l(E,P,M=!0){if(c(E)===!0)throw new Error("first arg must be private key");if(c(P)===!1)throw new Error("second arg must be public key");let D=r.fromBytes(E);return e.fromBytes(P).multiply(D).toBytes(M)}let m={isValidSecretKey:o,isValidPublicKey:a,randomSecretKey:s},w=gp(s,u);return Object.freeze(m),Object.freeze(n),Object.freeze({getPublicKey:u,getSharedSecret:l,keygen:w,Point:e,utils:m,lengths:n})}function gA(e,t,r={}){let i=t;Y2(i),pn(r,{},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"}),r=Object.assign({},r);let n=r.randomBytes===void 0?ki:r.randomBytes,o=r.hmac===void 0?(p,_)=>sy(i,p,_):r.hmac,{Fp:a,Fn:s}=e,{ORDER:u,BITS:c}=s,{keygen:l,getPublicKey:m,getSharedSecret:w,utils:E,lengths:P}=Y$(e,r),M={prehash:!0,lowS:typeof r.lowS=="boolean"?r.lowS:!0,format:"compact",extraEntropy:!1},D=u*Ao+Kr<a.ORDER;function L(p){let _=u>>Kr;return p>_}function U(p,_){if(!s.isValidNot0(_))throw new Error(`invalid signature ${p}: out of range 1..Point.Fn.ORDER`);return _}function K(){if(D)throw new Error('"recovered" sig type is not supported for cofactor >2 curves')}function C(p,_){cy(_);let x=P.signature,b=_==="compact"?x:_==="recovered"?x+1:void 0;return qt(p,b)}class N{constructor(_,x,b){Z(this,"r");Z(this,"s");Z(this,"recovery");if(this.r=U("r",_),this.s=U("s",x),b!=null){if(K(),![0,1,2,3].includes(b))throw new Error("invalid recovery id");this.recovery=b}Object.freeze(this)}static fromBytes(_,x=M.format){C(_,x);let b;if(x==="der"){let{r:S,s:R}=Hn.toSig(qt(_));return new N(S,R)}x==="recovered"&&(b=_[0],x="compact",_=_.subarray(1));let d=P.signature/2,O=_.subarray(0,d),T=_.subarray(d,d*2);return new N(s.fromBytes(O),s.fromBytes(T),b)}static fromHex(_,x){return this.fromBytes(Dc(_),x)}assertRecovery(){let{recovery:_}=this;if(_==null)throw new Error("invalid recovery id: must be present");return _}addRecoveryBit(_){return new N(this.r,this.s,_)}recoverPublicKey(_){let{r:x,s:b}=this,d=this.assertRecovery(),O=d===2||d===3?x+u:x;if(!a.isValid(O))throw new Error("invalid recovery id: sig.r+curve.n != R.x");let T=a.toBytes(O),S=e.fromBytes(kt(hA((d&1)===0),T)),R=s.inv(O),Y=H(qt(_,void 0,"msgHash")),X=s.create(-Y*R),ne=s.create(b*R),ce=e.BASE.multiplyUnsafe(X).add(S.multiplyUnsafe(ne));if(ce.is0())throw new Error("invalid recovery: point at infinify");return ce.assertValidity(),ce}hasHighS(){return L(this.s)}toBytes(_=M.format){if(cy(_),_==="der")return Dc(Hn.hexFromSig(this));let{r:x,s:b}=this,d=s.toBytes(x),O=s.toBytes(b);return _==="recovered"?(K(),kt(Uint8Array.of(this.assertRecovery()),d,O)):kt(d,O)}toHex(_){return Pa(this.toBytes(_))}}Object.freeze(N.prototype),Object.freeze(N);let F=r.bits2int===void 0?function(_){if(_.length>8192)throw new Error("input is too large");let x=bi(_),b=_.length*8-c;return b>0?x>>BigInt(b):x}:r.bits2int,H=r.bits2int_modN===void 0?function(_){return s.create(F(_))}:r.bits2int_modN,z=Uc(c);function G(p){return $m("num < 2^"+c,p,gn,z),s.toBytes(p)}function B(p,_){return qt(p,void 0,"message"),_?qt(i(p),void 0,"prehashed message"):p}function g(p,_,x){let{lowS:b,prehash:d,extraEntropy:O}=fy(x,M);p=B(p,d);let T=H(p),S=s.fromBytes(_);if(!s.isValidNot0(S))throw new Error("invalid private key");let R=[G(S),G(T)];if(O!=null&&O!==!1){let ce=O===!0?n(P.secretKey):O;R.push(qt(ce,void 0,"extraEntropy"))}let Y=kt(...R),X=T;function ne(ce){let pe=F(ce);if(!s.isValidNot0(pe))return;let q=s.inv(pe),W=e.BASE.multiply(pe).toAffine(),$=s.create(W.x);if($===gn)return;let te=s.create(q*s.create(X+$*S));if(te===gn)return;let se=(W.x===$?0:2)|Number(W.y&Kr),ue=te;return b&&L(te)&&(ue=s.neg(te),se^=1),new N($,ue,D?void 0:se)}return{seed:Y,k2sig:ne}}function I(p,_,x={}){let{seed:b,k2sig:d}=g(p,_,x);return NO(i.outputLen,s.BYTES,o)(b,d).toBytes(x.format)}function y(p,_,x,b={}){let{lowS:d,prehash:O,format:T}=fy(b,M);if(x=qt(x,void 0,"publicKey"),_=B(_,O),!Yu(p)){let S=p instanceof N?", use sig.toBytes()":"";throw new Error("verify expects Uint8Array signature"+S)}C(p,T);try{let S=N.fromBytes(p,T),R=e.fromBytes(x);if(d&&S.hasHighS())return!1;let{r:Y,s:X}=S,ne=H(_),ce=s.inv(X),pe=s.create(ne*ce),q=s.create(Y*ce),W=e.BASE.multiplyUnsafe(pe).add(R.multiplyUnsafe(q));return W.is0()?!1:s.create(W.x)===Y}catch{return!1}}function f(p,_,x={}){let{prehash:b}=fy(x,M);return _=B(_,b),N.fromBytes(p,"recovered").recoverPublicKey(_).toBytes()}return Object.freeze({keygen:l,getPublicKey:m,getSharedSecret:w,utils:E,lengths:P,Point:e,sign:I,verify:y,recoverPublicKey:f,Signature:N,hash:i})}var cA,ly,Hn,gn,Kr,Ao,Vc,hy,vA=Xr(()=>{v();yp();gs();Ju();vp();jc();cA=(e,t)=>(e+(e>=0?t:-t)/Ao)/t;ly=class extends Error{constructor(t=""){super(t)}},Hn={Err:ly,_tlv:{encode:(e,t)=>{let{Err:r}=Hn;if(dn(e,"tag"),e<0||e>255)throw new r("tlv.encode: wrong tag");if(typeof t!="string")throw new TypeError('"data" expected string, got type='+typeof t);if(t.length&1)throw new r("tlv.encode: unpadded data");let i=t.length/2,n=s0(i);if(n.length/2&128)throw new r("tlv.encode: long form length too big");let o=i>127?s0(n.length/2|128):"";return s0(e)+o+n+t},decode(e,t){let{Err:r}=Hn;t=qt(t,void 0,"DER data");let i=0;if(e<0||e>255)throw new r("tlv.encode: wrong tag");if(t.length<2||t[i++]!==e)throw new r("tlv.decode: wrong tlv");let n=t[i++],o=!!(n&128),a=0;if(!o)a=n;else{let u=n&127;if(!u)throw new r("tlv.decode(long): indefinite length not supported");if(u>4)throw new r("tlv.decode(long): byte length is too big");let c=t.subarray(i,i+u);if(c.length!==u)throw new r("tlv.decode: length bytes not complete");if(c[0]===0)throw new r("tlv.decode(long): zero leftmost byte");for(let l of c)a=a<<8|l;if(i+=u,a<128)throw new r("tlv.decode(long): not minimal encoding")}let s=t.subarray(i,i+a);if(s.length!==a)throw new r("tlv.decode: wrong value length");return{v:s,l:t.subarray(i+a)}}},_int:{encode(e){let{Err:t}=Hn;if(cp(e),e<gn)throw new t("integer: negative integers are not allowed");let r=s0(e);if(Number.parseInt(r[0],16)&8&&(r="00"+r),r.length&1)throw new t("unexpected DER parsing assertion: unpadded hex");return r},decode(e){let{Err:t}=Hn;if(e.length<1)throw new t("invalid signature integer: empty");if(e[0]&128)throw new t("invalid signature integer: negative");if(e.length>1&&e[0]===0&&!(e[1]&128))throw new t("invalid signature integer: unnecessary leading zero");return bi(e)}},toSig(e){let{Err:t,_int:r,_tlv:i}=Hn,n=qt(e,void 0,"signature"),{v:o,l:a}=i.decode(48,n);if(a.length)throw new t("invalid signature: left bytes after parsing");let{v:s,l:u}=i.decode(2,o),{v:c,l}=i.decode(2,u);if(l.length)throw new t("invalid signature: left bytes after parsing");return{r:r.decode(s),s:r.decode(c)}},hexFromSig(e){let{_tlv:t,_int:r}=Hn,i=t.encode(2,r.encode(e.r)),n=t.encode(2,r.encode(e.s)),o=i+n;return t.encode(48,o)}};Object.freeze(Hn._tlv);Object.freeze(Hn._int);Object.freeze(Hn);gn=BigInt(0),Kr=BigInt(1),Ao=BigInt(2),Vc=BigInt(3),hy=BigInt(4)});var h0={};X1(h0,{__TEST:()=>eX,schnorr:()=>tX,schnorr_FROST:()=>uX,secp256k1:()=>J$,secp256k1_FROST:()=>nX,secp256k1_hasher:()=>gy});function X$(e){let t=bp.p,r=BigInt(3),i=BigInt(6),n=BigInt(11),o=BigInt(22),a=BigInt(23),s=BigInt(44),u=BigInt(88),c=e*e*e%t,l=c*c*e%t,m=Hi(l,r,t)*l%t,w=Hi(m,r,t)*l%t,E=Hi(w,dy,t)*c%t,P=Hi(E,n,t)*E%t,M=Hi(P,o,t)*P%t,D=Hi(M,s,t)*M%t,L=Hi(D,u,t)*D%t,U=Hi(L,s,t)*M%t,K=Hi(U,r,t)*l%t,C=Hi(K,a,t)*P%t,N=Hi(C,i,t)*c%t,F=Hi(N,dy,t);if(!Ta.eql(Ta.sqr(F),e))throw new Error("Cannot find square root");return F}function l0(e,...t){let r=mA[e];if(r===void 0){let i=bs(qc(e));r=kt(i,i),mA[e]=r}return bs(kt(r,...t))}function wA(e){let{Fn:t,BASE:r}=Ut,i=t.fromBytes(e),n=r.multiply(i);return{scalar:Po(n.y)?i:t.neg(i),bytes:of(n)}}function _p(e){let t=Ta;if(!t.isValidNot0(e))throw new Error("invalid x: Fail if x \u2265 p");let r=t.create(e*e),i=t.create(r*e+BigInt(7)),n=t.sqrt(i);Po(n)||(n=t.neg(n));let o=Ut.fromAffine({x:e,y:n});return o.assertValidity(),o}function py(...e){return Ut.Fn.create(Gc(l0("BIP0340/challenge",...e)))}function yA(e){return wA(e).bytes}function Q$(e,t,r=i0(32)){let{Fn:i,BASE:n}=Ut,o=qt(e,void 0,"message"),{bytes:a,scalar:s}=wA(t),u=qt(r,32,"auxRand"),c=i.toBytes(s^Gc(l0("BIP0340/aux",u))),l=l0("BIP0340/nonce",c,a,o),m=i.create(Gc(l));if(m===0n)throw new Error("sign failed: k is zero");let w=n.multiply(m),E=Po(w.y)?m:i.neg(m),P=of(w),M=py(P,a,o),D=new Uint8Array(64);if(D.set(P,0),D.set(i.toBytes(i.create(E+M*s)),32),!SA(D,o,a))throw new Error("sign: Invalid signature produced");return D}function SA(e,t,r){let{Fp:i,Fn:n,BASE:o}=Ut,a=qt(e,64,"signature"),s=qt(t,void 0,"message"),u=qt(r,32,"publicKey");try{let c=_p(Gc(u)),l=Gc(a.subarray(0,32));if(!i.isValidNot0(l))return!1;let m=Gc(a.subarray(32,64));if(!n.isValidNot0(m))return!1;let w=py(n.toBytes(l),of(c),s),E=o.multiplyUnsafe(m).add(c.multiplyUnsafe(n.neg(w))),{x:P,y:M}=E.toAffine();return!(E.is0()||!Po(M)||P!==l)}catch{return!1}}function xA(e,t){if(t===void 0)return _A;let r=of(e),i=bi(l0("TapTweak",r,t));if(!Ut.Fn.isValid(i))throw new Error("invalid TapTweak hash");return i}function vy(e){let t=Ut.fromBytes(e.commitments[0]);return Po(t.y)?e:{signers:{min:e.signers.min,max:e.signers.max},commitments:e.commitments.map(r=>Ut.fromBytes(r).negate().toBytes()),verifyingShares:Object.fromEntries(Object.entries(e.verifyingShares).map(([r,i])=>[r,Ut.fromBytes(i).negate().toBytes()]))}}function EA(e,t){let r=Ut.fromBytes(t.commitments[0]);if(Po(r.y))return e;let i=Ut.Fn;return{...e,signingShare:i.toBytes(i.neg(i.fromBytes(e.signingShare)))}}function oX(e,t){if(Po(e.y))return t;let r=Ut.Fn;return{binding:r.toBytes(r.neg(r.fromBytes(t.binding))),hiding:r.toBytes(r.neg(r.fromBytes(t.hiding)))}}function aX(e,t,r){let i=Ut.Fn,n=EA(e,t),o=vy(t),a=xA(Ut.fromBytes(o.commitments[0]),r),s=i.toBytes(i.add(i.fromBytes(n.signingShare),a));return{identifier:n.identifier,signingShare:s}}function sX(e,t){let r=vy(e),i=xA(Ut.fromBytes(r.commitments[0]),t),n=Ut.BASE.multiply(i),o=r.commitments.map((s,u)=>(u===0?Ut.fromBytes(s).add(n):Ut.fromBytes(s)).toBytes()),a={};for(let s in r.verifyingShares)a[s]=Ut.fromBytes(r.verifyingShares[s]).add(n).toBytes();return{signers:{min:r.signers.min,max:r.signers.max},commitments:o,verifyingShares:a}}var bp,$$,_A,dy,Ta,Ut,J$,mA,of,Po,Gc,eX,tX,rX,bA,iX,gy,nX,uX,d0=Xr(()=>{v();sp();gs();vp();fA();sA();jc();vA();Ju();bp={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:BigInt(1),a:BigInt(0),b:BigInt(7),Gx:BigInt("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),Gy:BigInt("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")},$$={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),basises:[[BigInt("0x3086d221a7d46bcde86c90e49284eb15"),-BigInt("0xe4437ed6010e88286f547fa90abfe4c3")],[BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),BigInt("0x3086d221a7d46bcde86c90e49284eb15")]]},_A=BigInt(0),dy=BigInt(2);Ta=Fc(bp.p,{sqrt:X$}),Ut=lA(bp,{Fp:Ta,endo:$$}),J$=gA(Ut,bs),mA={};of=e=>e.toBytes(!0).slice(1),Po=e=>e%dy===_A;Gc=bi;eX=Object.freeze({lift_x:_p}),tX=(()=>{let r=i=>(i=i===void 0?i0(48):i,Hc(i,bp.n));return Object.freeze({keygen:gp(r,yA),getPublicKey:yA,sign:Q$,verify:SA,Point:Ut,utils:Object.freeze({randomSecretKey:r,taggedHash:l0,lift_x:_p,pointToBytes:of}),lengths:Object.freeze({secretKey:32,publicKey:32,publicKeyHasPrefix:!1,signature:64,seed:48})})})(),rX=oA(Ta,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(e=>e.map(t=>BigInt(t)))),iX=()=>bA||(bA=dA(Ta,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:Ta.create(BigInt("-11"))})),gy=aA(Ut,e=>{let{x:t,y:r}=iX()(Ta.create(e[0]));return rX(t,r)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:Ta.ORDER,m:1,k:128,expand:"xmd",hash:bs}),nX=ay({name:"FROST-secp256k1-SHA256-v1",Point:Ut,hashToScalar:gy.hashToScalar,hash:bs});uX=ay({name:"FROST-secp256k1-SHA256-TR-v1",Point:Ut,hashToScalar:gy.hashToScalar,hash:bs,parsePublicKey(e){if(e.length===32)return _p(bi(e));if(e.length===33)return Ut.fromBytes(e);throw new Error(`expected x-only or compressed public key, got length=${e.length}`)},adjustScalar(e){let t=Ut.BASE.multiply(e);return Po(t.y)?e:Ut.Fn.neg(e)},adjustPoint:e=>Po(e.y)?e:e.negate(),challenge(e,t,r){return py(of(e),of(t),r)},adjustNonces:oX,adjustGroupCommitmentShare:(e,t)=>Po(e.y)?t:t.negate(),adjustPublic:vy,adjustSecret:EA,adjustTx:{encode:e=>e.subarray(1),decode:e=>kt(Uint8Array.of(2),e)},adjustDKG:e=>{let t=new Uint8Array(0);return{public:sX(e.public,t),secret:aX(e.secret,e.public,t)}}})});var vn=k((u2e,PA)=>{"use strict";v();var IA=fr(),{secp256k1:fX}=(d0(),ho(h0)),g0=fX.Point,wp=g0.Fn.ORDER;function cX(e){return BigInt("0x"+(e.toString(16)||"0"))}function my(e){var t=e.toString(16);return t.length%2&&(t="0"+t),new IA(t,16)}function Sp(e){if(e==null)throw new Error("Invalid Point");if(typeof e=="bigint")return e;if(typeof e=="number")return BigInt(e);if(typeof e=="string")return BigInt(e.indexOf("0x")===0?e:"0x"+e);if(typeof e.toString=="function")return cX(e);throw new Error("Invalid Point")}function p0(e){var t=Object.create(Ft.prototype);return t._p=e,t}function OA(e,t){var r=Sp(t).toString(16).padStart(64,"0");return g0.fromHex((e?"03":"02")+r)}function AA(e,t){var r;try{r=OA((t&1n)===1n,e)}catch{throw new Error("Point does not lie on the curve")}if(r.toAffine().y!==t)throw new Error("Invalid y value for curve.")}function Ft(e,t,r){if(!(this instanceof Ft))return new Ft(e,t,r);var i,n;try{i=Sp(e),n=Sp(t)}catch{throw new Error("Invalid Point")}AA(i,n);try{this._p=g0.fromAffine({x:i,y:n})}catch{throw new Error("Invalid Point")}return this}Ft.fromX=function(t,r){try{var i=p0(OA(t,r))}catch{throw new Error("Invalid X")}return i.validate(),i};Ft.getG=function(){return p0(g0.BASE)};Ft.getN=function(){return my(wp)};Ft.prototype.getX=function(){return my(this._p.toAffine().x)};Ft.prototype.getY=function(){return my(this._p.toAffine().y)};Object.defineProperty(Ft.prototype,"x",{configurable:!0,enumerable:!0,get:function(){return this.getX()}});Object.defineProperty(Ft.prototype,"y",{configurable:!0,enumerable:!0,get:function(){return this.getY()}});Ft.prototype.mul=function(t){var r=(Sp(t)%wp+wp)%wp;return r===0n||this._p.is0()?p0(g0.ZERO):p0(this._p.multiply(r))};Ft.prototype.add=function(t){return p0(this._p.add(t._p))};Ft.prototype.mulAdd=function(t,r,i){return this.mul(t).add(r.mul(i))};Ft.prototype.eq=function(t){return this._p.equals(t._p)};Ft.prototype.isInfinity=function(){return this._p.is0()};Ft.prototype.validate=function(){if(this.isInfinity())throw new Error("Point cannot be equal to Infinity");var t=this._p.toAffine();return AA(t.x,t.y),this};Ft.pointToCompressed=function(t){var r=t.getX().toBuffer({size:32}),i=t.getY().toBuffer({size:32}),n,o=i[i.length-1]%2;return o?n=h.Buffer.from([3]):n=h.Buffer.from([2]),h.Buffer.concat([n,r])};Ft.pointFromCompressed=function(e){if(e.length!==33)throw new Error("invalid buffer length");var t=e[0],r;if(t===3)r=!0;else if(t===2)r=!1;else throw new Error("invalid value of compressed prefix");var i=IA.fromBuffer(e.slice(1,33));return Ft.fromX(r,i)};Ft.prototype.toBuffer=function(){return Ft.pointToCompressed(this)};Ft.prototype.toHex=function(){return this.toBuffer().toString("hex")};Ft.fromBuffer=function(e){return Ft.pointFromCompressed(e)};Ft.fromHex=function(e){return Ft.fromBuffer(h.Buffer.from(e,"hex"))};PA.exports=Ft});var pi=k((c2e,RA)=>{"use strict";v();var kA=Et(),lX=Bt(),TA=function(t){return kA.isString(t)?/^[0-9a-fA-F]+$/.test(t):!1};RA.exports={isValidJSON:function(t){var r;if(!kA.isString(t))return!1;try{r=JSON.parse(t)}catch{return!1}return typeof r=="object"},isHexa:TA,isHexaString:TA,defineImmutable:function(t,r){return Object.keys(r).forEach(function(i){Object.defineProperty(t,i,{configurable:!1,enumerable:!0,value:r[i]})}),t},isNaturalNumber:function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t&&t>=0},integerAsBuffer:function(t){lX.checkArgumentType(t,"number","integer");let r=h.Buffer.allocUnsafe(4);return r.writeUInt32BE(t,0),r}}});var Vr=k((h2e,MA)=>{"use strict";v();var af=fr(),hX=Et(),_i=Bt(),dX=pi(),vt=function e(t,r){if(!(this instanceof e))return new e(t,r);if(t instanceof af)this.set({r:t,s:r});else if(t){var i=t;this.set(i)}};vt.prototype.set=function(e){return this.r=e.r||this.r||void 0,this.s=e.s||this.s||void 0,this.i=typeof e.i<"u"?e.i:this.i,this.compressed=typeof e.compressed<"u"?e.compressed:this.compressed,this.nhashtype=e.nhashtype||this.nhashtype||void 0,this};vt.fromCompact=function(e){_i.checkArgument(h.Buffer.isBuffer(e),"Argument is expected to be a Buffer");var t=new vt,r=!0,i=e.slice(0,1)[0]-27-4;i<0&&(r=!1,i=i+4);var n=e.slice(1,33),o=e.slice(33,65);return _i.checkArgument(i===0||i===1||i===2||i===3,new Error("i must be 0, 1, 2, or 3")),_i.checkArgument(n.length===32,new Error("r must be 32 bytes")),_i.checkArgument(o.length===32,new Error("s must be 32 bytes")),t.compressed=r,t.i=i,t.r=af.fromBuffer(n),t.s=af.fromBuffer(o),t};vt.fromDER=vt.fromBuffer=function(e,t){var r=vt.parseDER(e,t),i=new vt;return i.r=r.r,i.s=r.s,i};vt.fromTxFormat=function(e){var t=e.readUInt8(e.length-1),r=e.slice(0,e.length-1),i=vt.fromDER(r,!1);return i.nhashtype=t,i};vt.fromString=function(e){var t=h.Buffer.from(e,"hex");return vt.fromDER(t)};function BA(e,t){_i.checkArgument(t.length>0,new Error("Length of "+e+" is zero")),_i.checkArgument(!(t[0]&128),new Error("Value of "+e+" is negative")),_i.checkArgument(!(t.length>1&&t[0]===0&&!(t[1]&128)),new Error("Value of "+e+" is excessively padded"))}vt.parseDER=function(e,t){_i.checkArgument(h.Buffer.isBuffer(e),new Error("DER formatted signature should be a buffer")),hX.isUndefined(t)&&(t=!0);var r=e[0];_i.checkArgument(r===48,new Error("Header byte should be 0x30"));var i=e[1],n=e.slice(2).length;_i.checkArgument(!t||i===n,new Error("Length byte should length of what follows")),i=i<n?i:n;var o=e[2];_i.checkArgument(o===2,new Error("Integer byte for r should be 0x02"));var a=e[3],s=e.slice(4,4+a),u=af.fromBuffer(s),c=e[4]===0;_i.checkArgument(a===s.length,new Error("Length of r incorrect"));var l=e[4+a+0];_i.checkArgument(l===2,new Error("Integer byte for s should be 0x02"));var m=e[4+a+1],w=e.slice(4+a+2,4+a+2+m),E=af.fromBuffer(w),P=e[4+a+2]===0;_i.checkArgument(m===w.length,new Error("Length of s incorrect"));var M=4+a+2+m;_i.checkArgument(i===M-2,new Error("Length of signature incorrect")),t&&(BA("r",s),BA("s",w));var D={header:r,length:i,rheader:o,rlength:a,rneg:c,rbuf:s,r:u,sheader:l,slength:m,sneg:P,sbuf:w,s:E};return D};vt.prototype.toCompact=function(e,t){if(e=typeof e=="number"?e:this.i,t=typeof t=="boolean"?t:this.compressed,!(e===0||e===1||e===2||e===3))throw new Error("i must be equal to 0, 1, 2, or 3");var r=e+27+4;t===!1&&(r=r-4);var i=h.Buffer.from([r]),n=this.r.toBuffer({size:32}),o=this.s.toBuffer({size:32});return h.Buffer.concat([i,n,o])};vt.prototype.toBuffer=vt.prototype.toDER=function(){var e=this.r.toBuffer(),t=this.s.toBuffer(),r=!!(e[0]&128),i=!!(t[0]&128),n=r?h.Buffer.concat([h.Buffer.from([0]),e]):e,o=i?h.Buffer.concat([h.Buffer.from([0]),t]):t,a=n.length,s=o.length,u=2+a+2+s,c=2,l=2,m=48,w=h.Buffer.concat([h.Buffer.from([m,u,c,a]),n,h.Buffer.from([l,s]),o]);return w};vt.prototype.toString=function(){var e=this.toDER();return e.toString("hex")};vt.isTxDER=function(e){if(e.length<9||e.length>73||e[0]!==48||e[1]!==e.length-3)return!1;var t=e[3];if(5+t>=e.length)return!1;var r=e[5+t];if(t+r+7!==e.length)return!1;var i=e.slice(4);if(e[2]!==2||t===0||i[0]&128||t>1&&i[0]===0&&!(i[1]&128))return!1;var n=e.slice(6+t);return!(e[6+t-2]!==2||r===0||n[0]&128||r>1&&n[0]===0&&!(n[1]&128))};vt.prototype.hasLowS=function(){return!(this.s.lt(new af(1))||this.s.gt(new af("7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0","hex")))};vt.prototype.hasDefinedHashtype=function(){if(!dX.isNaturalNumber(this.nhashtype))return!1;var e=this.nhashtype&31;return!(e<vt.SIGHASH_ALL||e>vt.SIGHASH_SINGLE)};vt.prototype.toTxFormat=function(){var e=this.toDER(),t=h.Buffer.alloc(1);return t.writeUInt8(this.nhashtype,0),h.Buffer.concat([e,t])};vt.SIGHASH_ALL=1;vt.SIGHASH_NONE=2;vt.SIGHASH_SINGLE=3;vt.SIGHASH_CHRONICLE=32;vt.SIGHASH_FORKID=64;vt.SIGHASH_ANYONECANPAY=128;vt.prototype.isCanonical=function(){var e=vn(),t=e.getN().shrn(1);return this.s.lte(t)};vt.prototype.toCanonical=function(){if(this.isCanonical())return new vt({r:this.r,s:this.s,i:this.i,compressed:this.compressed,nhashtype:this.nhashtype});var e=vn(),t=e.getN(),r=t.sub(this.s);return new vt({r:this.r,s:r,i:this.i,compressed:this.compressed,nhashtype:this.nhashtype})};vt.prototype.validate=function(){if(!this.r||!this.s)throw new Error("Signature missing r or s component");if(this.r.isZero())throw new Error("Signature r component is zero");if(this.s.isZero())throw new Error("Signature s component is zero");var e=vn(),t=e.getN();if(this.r.gte(t))throw new Error("Signature r component >= curve order");if(this.s.gte(t))throw new Error("Signature s component >= curve order");if(this.r.isNeg())throw new Error("Signature r component is negative");if(this.s.isNeg())throw new Error("Signature s component is negative");return!0};vt.prototype.isValid=function(){try{return this.validate(),!0}catch{return!1}};vt.prototype.applySecurityPatches=function(){var e=vn(),t=e.getN(),r=t.shrn(1);if(this.r.isZero()||this.s.isZero())throw new Error("Invalid signature: zero r or s");if(this.r.gte(t)||this.s.gte(t))throw new Error("Invalid signature: out of range");if(this.s.gt(r))throw new Error("Invalid signature: non-canonical (high) s");return this};MA.exports=vt});var jn=k(Ht=>{"use strict";v();var pX=Rn(),gX=Te();Ht.inherits=gX;function vX(e,t){return(e.charCodeAt(t)&64512)!==55296||t<0||t+1>=e.length?!1:(e.charCodeAt(t+1)&64512)===56320}function mX(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if(typeof e=="string")if(t){if(t==="hex")for(e=e.replace(/[^a-z0-9]+/ig,""),e.length%2!==0&&(e="0"+e),n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16))}else for(var i=0,n=0;n<e.length;n++){var o=e.charCodeAt(n);o<128?r[i++]=o:o<2048?(r[i++]=o>>6|192,r[i++]=o&63|128):vX(e,n)?(o=65536+((o&1023)<<10)+(e.charCodeAt(++n)&1023),r[i++]=o>>18|240,r[i++]=o>>12&63|128,r[i++]=o>>6&63|128,r[i++]=o&63|128):(r[i++]=o>>12|224,r[i++]=o>>6&63|128,r[i++]=o&63|128)}else for(n=0;n<e.length;n++)r[n]=e[n]|0;return r}Ht.toArray=mX;function yX(e){for(var t="",r=0;r<e.length;r++)t+=NA(e[r].toString(16));return t}Ht.toHex=yX;function CA(e){var t=e>>>24|e>>>8&65280|e<<8&16711680|(e&255)<<24;return t>>>0}Ht.htonl=CA;function bX(e,t){for(var r="",i=0;i<e.length;i++){var n=e[i];t==="little"&&(n=CA(n)),r+=DA(n.toString(16))}return r}Ht.toHex32=bX;function NA(e){return e.length===1?"0"+e:e}Ht.zero2=NA;function DA(e){return e.length===7?"0"+e:e.length===6?"00"+e:e.length===5?"000"+e:e.length===4?"0000"+e:e.length===3?"00000"+e:e.length===2?"000000"+e:e.length===1?"0000000"+e:e}Ht.zero8=DA;function _X(e,t,r,i){var n=r-t;pX(n%4===0);for(var o=new Array(n/4),a=0,s=t;a<o.length;a++,s+=4){var u;i==="big"?u=e[s]<<24|e[s+1]<<16|e[s+2]<<8|e[s+3]:u=e[s+3]<<24|e[s+2]<<16|e[s+1]<<8|e[s],o[a]=u>>>0}return o}Ht.join32=_X;function wX(e,t){for(var r=new Array(e.length*4),i=0,n=0;i<e.length;i++,n+=4){var o=e[i];t==="big"?(r[n]=o>>>24,r[n+1]=o>>>16&255,r[n+2]=o>>>8&255,r[n+3]=o&255):(r[n+3]=o>>>24,r[n+2]=o>>>16&255,r[n+1]=o>>>8&255,r[n]=o&255)}return r}Ht.split32=wX;function SX(e,t){return e>>>t|e<<32-t}Ht.rotr32=SX;function xX(e,t){return e<<t|e>>>32-t}Ht.rotl32=xX;function EX(e,t){return e+t>>>0}Ht.sum32=EX;function IX(e,t,r){return e+t+r>>>0}Ht.sum32_3=IX;function OX(e,t,r,i){return e+t+r+i>>>0}Ht.sum32_4=OX;function AX(e,t,r,i,n){return e+t+r+i+n>>>0}Ht.sum32_5=AX;function PX(e,t,r,i){var n=e[t],o=e[t+1],a=i+o>>>0,s=(a<i?1:0)+r+n;e[t]=s>>>0,e[t+1]=a}Ht.sum64=PX;function TX(e,t,r,i){var n=t+i>>>0,o=(n<t?1:0)+e+r;return o>>>0}Ht.sum64_hi=TX;function kX(e,t,r,i){var n=t+i;return n>>>0}Ht.sum64_lo=kX;function RX(e,t,r,i,n,o,a,s){var u=0,c=t;c=c+i>>>0,u+=c<t?1:0,c=c+o>>>0,u+=c<o?1:0,c=c+s>>>0,u+=c<s?1:0;var l=e+r+n+a+u;return l>>>0}Ht.sum64_4_hi=RX;function BX(e,t,r,i,n,o,a,s){var u=t+i+o+s;return u>>>0}Ht.sum64_4_lo=BX;function MX(e,t,r,i,n,o,a,s,u,c){var l=0,m=t;m=m+i>>>0,l+=m<t?1:0,m=m+o>>>0,l+=m<o?1:0,m=m+s>>>0,l+=m<s?1:0,m=m+c>>>0,l+=m<c?1:0;var w=e+r+n+a+u+l;return w>>>0}Ht.sum64_5_hi=MX;function CX(e,t,r,i,n,o,a,s,u,c){var l=t+i+o+s+c;return l>>>0}Ht.sum64_5_lo=CX;function NX(e,t,r){var i=t<<32-r|e>>>r;return i>>>0}Ht.rotr64_hi=NX;function DX(e,t,r){var i=e<<32-r|t>>>r;return i>>>0}Ht.rotr64_lo=DX;function LX(e,t,r){return e>>>r}Ht.shr64_hi=LX;function qX(e,t,r){var i=e<<32-r|t>>>r;return i>>>0}Ht.shr64_lo=qX});var Zc=k(qA=>{"use strict";v();var LA=jn(),UX=Rn();function xp(){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}qA.BlockHash=xp;xp.prototype.update=function(t,r){if(t=LA.toArray(t,r),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){t=this.pending;var i=t.length%this._delta8;this.pending=t.slice(t.length-i,t.length),this.pending.length===0&&(this.pending=null),t=LA.join32(t,0,t.length-i,this.endian);for(var n=0;n<t.length;n+=this._delta32)this._update(t,n,n+this._delta32)}return this};xp.prototype.digest=function(t){return this.update(this._pad()),UX(this.pending===null),this._digest(t)};xp.prototype._pad=function(){var t=this.pendingTotal,r=this._delta8,i=r-(t+this.padLength)%r,n=new Array(i+this.padLength);n[0]=128;for(var o=1;o<i;o++)n[o]=0;if(t<<=3,this.endian==="big"){for(var a=8;a<this.padLength;a++)n[o++]=0;n[o++]=0,n[o++]=0,n[o++]=0,n[o++]=0,n[o++]=t>>>24&255,n[o++]=t>>>16&255,n[o++]=t>>>8&255,n[o++]=t&255}else for(n[o++]=t&255,n[o++]=t>>>8&255,n[o++]=t>>>16&255,n[o++]=t>>>24&255,n[o++]=0,n[o++]=0,n[o++]=0,n[o++]=0,a=8;a<this.padLength;a++)n[o++]=0;return n}});var yy=k(ka=>{"use strict";v();var FX=jn(),To=FX.rotr32;function HX(e,t,r,i){if(e===0)return UA(t,r,i);if(e===1||e===3)return HA(t,r,i);if(e===2)return FA(t,r,i)}ka.ft_1=HX;function UA(e,t,r){return e&t^~e&r}ka.ch32=UA;function FA(e,t,r){return e&t^e&r^t&r}ka.maj32=FA;function HA(e,t,r){return e^t^r}ka.p32=HA;function jX(e){return To(e,2)^To(e,13)^To(e,22)}ka.s0_256=jX;function zX(e){return To(e,6)^To(e,11)^To(e,25)}ka.s1_256=zX;function KX(e){return To(e,7)^To(e,18)^e>>>3}ka.g0_256=KX;function VX(e){return To(e,17)^To(e,19)^e>>>10}ka.g1_256=VX});var KA=k((_2e,zA)=>{"use strict";v();var Wc=jn(),GX=Zc(),ZX=yy(),by=Wc.rotl32,v0=Wc.sum32,WX=Wc.sum32_5,YX=ZX.ft_1,jA=GX.BlockHash,$X=[1518500249,1859775393,2400959708,3395469782];function ko(){if(!(this instanceof ko))return new ko;jA.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}Wc.inherits(ko,jA);zA.exports=ko;ko.blockSize=512;ko.outSize=160;ko.hmacStrength=80;ko.padLength=64;ko.prototype._update=function(t,r){for(var i=this.W,n=0;n<16;n++)i[n]=t[r+n];for(;n<i.length;n++)i[n]=by(i[n-3]^i[n-8]^i[n-14]^i[n-16],1);var o=this.h[0],a=this.h[1],s=this.h[2],u=this.h[3],c=this.h[4];for(n=0;n<i.length;n++){var l=~~(n/20),m=WX(by(o,5),YX(l,a,s,u),c,i[n],$X[l]);c=u,u=s,s=by(a,30),a=o,o=m}this.h[0]=v0(this.h[0],o),this.h[1]=v0(this.h[1],a),this.h[2]=v0(this.h[2],s),this.h[3]=v0(this.h[3],u),this.h[4]=v0(this.h[4],c)};ko.prototype._digest=function(t){return t==="hex"?Wc.toHex32(this.h,"big"):Wc.split32(this.h,"big")}});var _y=k((S2e,GA)=>{"use strict";v();var Yc=jn(),XX=Zc(),$c=yy(),JX=Rn(),zn=Yc.sum32,QX=Yc.sum32_4,eJ=Yc.sum32_5,tJ=$c.ch32,rJ=$c.maj32,iJ=$c.s0_256,nJ=$c.s1_256,oJ=$c.g0_256,aJ=$c.g1_256,VA=XX.BlockHash,sJ=[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 Ro(){if(!(this instanceof Ro))return new Ro;VA.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=sJ,this.W=new Array(64)}Yc.inherits(Ro,VA);GA.exports=Ro;Ro.blockSize=512;Ro.outSize=256;Ro.hmacStrength=192;Ro.padLength=64;Ro.prototype._update=function(t,r){for(var i=this.W,n=0;n<16;n++)i[n]=t[r+n];for(;n<i.length;n++)i[n]=QX(aJ(i[n-2]),i[n-7],oJ(i[n-15]),i[n-16]);var o=this.h[0],a=this.h[1],s=this.h[2],u=this.h[3],c=this.h[4],l=this.h[5],m=this.h[6],w=this.h[7];for(JX(this.k.length===i.length),n=0;n<i.length;n++){var E=eJ(w,nJ(c),tJ(c,l,m),this.k[n],i[n]),P=zn(iJ(o),rJ(o,a,s));w=m,m=l,l=c,c=zn(u,E),u=s,s=a,a=o,o=zn(E,P)}this.h[0]=zn(this.h[0],o),this.h[1]=zn(this.h[1],a),this.h[2]=zn(this.h[2],s),this.h[3]=zn(this.h[3],u),this.h[4]=zn(this.h[4],c),this.h[5]=zn(this.h[5],l),this.h[6]=zn(this.h[6],m),this.h[7]=zn(this.h[7],w)};Ro.prototype._digest=function(t){return t==="hex"?Yc.toHex32(this.h,"big"):Yc.split32(this.h,"big")}});var YA=k((E2e,WA)=>{"use strict";v();var wy=jn(),ZA=_y();function Ra(){if(!(this instanceof Ra))return new Ra;ZA.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}wy.inherits(Ra,ZA);WA.exports=Ra;Ra.blockSize=512;Ra.outSize=224;Ra.hmacStrength=192;Ra.padLength=64;Ra.prototype._digest=function(t){return t==="hex"?wy.toHex32(this.h.slice(0,7),"big"):wy.split32(this.h.slice(0,7),"big")}});var Ey=k((O2e,QA)=>{"use strict";v();var Ri=jn(),uJ=Zc(),fJ=Rn(),Bo=Ri.rotr64_hi,Mo=Ri.rotr64_lo,$A=Ri.shr64_hi,XA=Ri.shr64_lo,_s=Ri.sum64,Sy=Ri.sum64_hi,xy=Ri.sum64_lo,cJ=Ri.sum64_4_hi,lJ=Ri.sum64_4_lo,hJ=Ri.sum64_5_hi,dJ=Ri.sum64_5_lo,JA=uJ.BlockHash,pJ=[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 Kn(){if(!(this instanceof Kn))return new Kn;JA.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=pJ,this.W=new Array(160)}Ri.inherits(Kn,JA);QA.exports=Kn;Kn.blockSize=1024;Kn.outSize=512;Kn.hmacStrength=192;Kn.padLength=128;Kn.prototype._prepareBlock=function(t,r){for(var i=this.W,n=0;n<32;n++)i[n]=t[r+n];for(;n<i.length;n+=2){var o=IJ(i[n-4],i[n-3]),a=OJ(i[n-4],i[n-3]),s=i[n-14],u=i[n-13],c=xJ(i[n-30],i[n-29]),l=EJ(i[n-30],i[n-29]),m=i[n-32],w=i[n-31];i[n]=cJ(o,a,s,u,c,l,m,w),i[n+1]=lJ(o,a,s,u,c,l,m,w)}};Kn.prototype._update=function(t,r){this._prepareBlock(t,r);var i=this.W,n=this.h[0],o=this.h[1],a=this.h[2],s=this.h[3],u=this.h[4],c=this.h[5],l=this.h[6],m=this.h[7],w=this.h[8],E=this.h[9],P=this.h[10],M=this.h[11],D=this.h[12],L=this.h[13],U=this.h[14],K=this.h[15];fJ(this.k.length===i.length);for(var C=0;C<i.length;C+=2){var N=U,F=K,H=wJ(w,E),z=SJ(w,E),G=gJ(w,E,P,M,D,L),B=vJ(w,E,P,M,D,L),g=this.k[C],I=this.k[C+1],y=i[C],f=i[C+1],p=hJ(N,F,H,z,G,B,g,I,y,f),_=dJ(N,F,H,z,G,B,g,I,y,f);N=bJ(n,o),F=_J(n,o),H=mJ(n,o,a,s,u,c),z=yJ(n,o,a,s,u,c);var x=Sy(N,F,H,z),b=xy(N,F,H,z);U=D,K=L,D=P,L=M,P=w,M=E,w=Sy(l,m,p,_),E=xy(m,m,p,_),l=u,m=c,u=a,c=s,a=n,s=o,n=Sy(p,_,x,b),o=xy(p,_,x,b)}_s(this.h,0,n,o),_s(this.h,2,a,s),_s(this.h,4,u,c),_s(this.h,6,l,m),_s(this.h,8,w,E),_s(this.h,10,P,M),_s(this.h,12,D,L),_s(this.h,14,U,K)};Kn.prototype._digest=function(t){return t==="hex"?Ri.toHex32(this.h,"big"):Ri.split32(this.h,"big")};function gJ(e,t,r,i,n){var o=e&r^~e&n;return o<0&&(o+=4294967296),o}function vJ(e,t,r,i,n,o){var a=t&i^~t&o;return a<0&&(a+=4294967296),a}function mJ(e,t,r,i,n){var o=e&r^e&n^r&n;return o<0&&(o+=4294967296),o}function yJ(e,t,r,i,n,o){var a=t&i^t&o^i&o;return a<0&&(a+=4294967296),a}function bJ(e,t){var r=Bo(e,t,28),i=Bo(t,e,2),n=Bo(t,e,7),o=r^i^n;return o<0&&(o+=4294967296),o}function _J(e,t){var r=Mo(e,t,28),i=Mo(t,e,2),n=Mo(t,e,7),o=r^i^n;return o<0&&(o+=4294967296),o}function wJ(e,t){var r=Bo(e,t,14),i=Bo(e,t,18),n=Bo(t,e,9),o=r^i^n;return o<0&&(o+=4294967296),o}function SJ(e,t){var r=Mo(e,t,14),i=Mo(e,t,18),n=Mo(t,e,9),o=r^i^n;return o<0&&(o+=4294967296),o}function xJ(e,t){var r=Bo(e,t,1),i=Bo(e,t,8),n=$A(e,t,7),o=r^i^n;return o<0&&(o+=4294967296),o}function EJ(e,t){var r=Mo(e,t,1),i=Mo(e,t,8),n=XA(e,t,7),o=r^i^n;return o<0&&(o+=4294967296),o}function IJ(e,t){var r=Bo(e,t,19),i=Bo(t,e,29),n=$A(e,t,6),o=r^i^n;return o<0&&(o+=4294967296),o}function OJ(e,t){var r=Mo(e,t,19),i=Mo(t,e,29),n=XA(e,t,6),o=r^i^n;return o<0&&(o+=4294967296),o}});var rP=k((P2e,tP)=>{"use strict";v();var Iy=jn(),eP=Ey();function Ba(){if(!(this instanceof Ba))return new Ba;eP.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Iy.inherits(Ba,eP);tP.exports=Ba;Ba.blockSize=1024;Ba.outSize=384;Ba.hmacStrength=192;Ba.padLength=128;Ba.prototype._digest=function(t){return t==="hex"?Iy.toHex32(this.h.slice(0,12),"big"):Iy.split32(this.h.slice(0,12),"big")}});var iP=k(Xc=>{"use strict";v();Xc.sha1=KA();Xc.sha224=YA();Xc.sha256=_y();Xc.sha384=rP();Xc.sha512=Ey()});var fP=k(uP=>{"use strict";v();var sf=jn(),AJ=Zc(),Ep=sf.rotl32,nP=sf.sum32,m0=sf.sum32_3,oP=sf.sum32_4,sP=AJ.BlockHash;function Co(){if(!(this instanceof Co))return new Co;sP.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}sf.inherits(Co,sP);uP.ripemd160=Co;Co.blockSize=512;Co.outSize=160;Co.hmacStrength=192;Co.padLength=64;Co.prototype._update=function(t,r){for(var i=this.h[0],n=this.h[1],o=this.h[2],a=this.h[3],s=this.h[4],u=i,c=n,l=o,m=a,w=s,E=0;E<80;E++){var P=nP(Ep(oP(i,aP(E,n,o,a),t[kJ[E]+r],PJ(E)),BJ[E]),s);i=s,s=a,a=Ep(o,10),o=n,n=P,P=nP(Ep(oP(u,aP(79-E,c,l,m),t[RJ[E]+r],TJ(E)),MJ[E]),w),u=w,w=m,m=Ep(l,10),l=c,c=P}P=m0(this.h[1],o,m),this.h[1]=m0(this.h[2],a,w),this.h[2]=m0(this.h[3],s,u),this.h[3]=m0(this.h[4],i,c),this.h[4]=m0(this.h[0],n,l),this.h[0]=P};Co.prototype._digest=function(t){return t==="hex"?sf.toHex32(this.h,"little"):sf.split32(this.h,"little")};function aP(e,t,r,i){return e<=15?t^r^i:e<=31?t&r|~t&i:e<=47?(t|~r)^i:e<=63?t&i|r&~i:t^(r|~i)}function PJ(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function TJ(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}var kJ=[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],RJ=[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],BJ=[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],MJ=[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 lP=k((C2e,cP)=>{"use strict";v();var CJ=jn(),NJ=Rn();function Jc(e,t,r){if(!(this instanceof Jc))return new Jc(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(CJ.toArray(t,r))}cP.exports=Jc;Jc.prototype._init=function(t){t.length>this.blockSize&&(t=new this.Hash().update(t).digest()),NJ(t.length<=this.blockSize);for(var r=t.length;r<this.blockSize;r++)t.push(0);for(r=0;r<t.length;r++)t[r]^=54;for(this.inner=new this.Hash().update(t),r=0;r<t.length;r++)t[r]^=106;this.outer=new this.Hash().update(t)};Jc.prototype.update=function(t,r){return this.inner.update(t,r),this};Jc.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}});var dP=k(hP=>{v();var ri=hP;ri.utils=jn();ri.common=Zc();ri.sha=iP();ri.ripemd=fP();ri.hmac=lP();ri.sha1=ri.sha.sha1;ri.sha256=ri.sha.sha256;ri.sha224=ri.sha.sha224;ri.sha384=ri.sha.sha384;ri.sha512=ri.sha.sha512;ri.ripemd160=ri.ripemd.ripemd160});var gP=k((q2e,pP)=>{"use strict";v();var Ip=dP(),Ma=Bt(),Sr=pP.exports;Sr.sha1=function(e){return Ma.checkArgument(h.Buffer.isBuffer(e)),h.Buffer.from(Ip.sha1().update(e).digest("hex"),"hex")};Sr.sha1.blocksize=512;Sr.sha256=function(e){return Ma.checkArgument(h.Buffer.isBuffer(e)),h.Buffer.from(Ip.sha256().update(e).digest("hex"),"hex")};Sr.sha256.blocksize=512;Sr.sha256sha256=function(e){return Ma.checkArgument(h.Buffer.isBuffer(e)),Sr.sha256(Sr.sha256(e))};Sr.ripemd160=function(e){return Ma.checkArgument(h.Buffer.isBuffer(e)),h.Buffer.from(Ip.ripemd160().update(e).digest("hex"),"hex")};Sr.sha256ripemd160=function(e){return Ma.checkArgument(h.Buffer.isBuffer(e)),Sr.ripemd160(Sr.sha256(e))};Sr.sha512=function(e){return Ma.checkArgument(h.Buffer.isBuffer(e)),h.Buffer.from(Ip.sha512().update(e).digest("hex"),"hex")};Sr.sha512.blocksize=1024;Sr.hmac=function(e,t,r){Ma.checkArgument(h.Buffer.isBuffer(t)),Ma.checkArgument(h.Buffer.isBuffer(r)),Ma.checkArgument(e.blocksize);var i=e.blocksize/8;if(r.length>i)r=e(r);else if(r.length<i){var n=h.Buffer.alloc(i);n.fill(0),r.copy(n),r=n}var o=h.Buffer.alloc(i);o.fill(92);var a=h.Buffer.alloc(i);a.fill(54);for(var s=h.Buffer.alloc(i),u=h.Buffer.alloc(i),c=0;c<i;c++)s[c]=o[c]^r[c],u[c]=a[c]^r[c];return e(h.Buffer.concat([s,e(h.Buffer.concat([u,t]))]))};Sr.sha256hmac=function(e,t){return Sr.hmac(Sr.sha256,e,t)};Sr.sha512hmac=function(e,t){return Sr.hmac(Sr.sha512,e,t)}});var mP=k((F2e,vP)=>{"use strict";v();var Op=_r(),Ca=Bt(),xr=vP.exports;xr.sha1=function(e){return Ca.checkArgument(h.Buffer.isBuffer(e)),Op.createHash("sha1").update(e).digest()};xr.sha1.blocksize=512;xr.sha256=function(e){return Ca.checkArgument(h.Buffer.isBuffer(e)),Op.createHash("sha256").update(e).digest()};xr.sha256.blocksize=512;xr.sha256sha256=function(e){return Ca.checkArgument(h.Buffer.isBuffer(e)),xr.sha256(xr.sha256(e))};xr.ripemd160=function(e){return Ca.checkArgument(h.Buffer.isBuffer(e)),Op.createHash("ripemd160").update(e).digest()};xr.sha256ripemd160=function(e){return Ca.checkArgument(h.Buffer.isBuffer(e)),xr.ripemd160(xr.sha256(e))};xr.sha512=function(e){return Ca.checkArgument(h.Buffer.isBuffer(e)),Op.createHash("sha512").update(e).digest()};xr.sha512.blocksize=1024;xr.hmac=function(e,t,r){Ca.checkArgument(h.Buffer.isBuffer(t)),Ca.checkArgument(h.Buffer.isBuffer(r)),Ca.checkArgument(e.blocksize);var i=e.blocksize/8;if(r.length>i)r=e(r);else if(r.length<i){var n=h.Buffer.alloc(i);n.fill(0),r.copy(n),r=n}var o=h.Buffer.alloc(i);o.fill(92);var a=h.Buffer.alloc(i);a.fill(54);for(var s=h.Buffer.alloc(i),u=h.Buffer.alloc(i),c=0;c<i;c++)s[c]=o[c]^r[c],u[c]=a[c]^r[c];return e(h.Buffer.concat([s,e(h.Buffer.concat([u,t]))]))};xr.sha256hmac=function(e,t){return xr.hmac(xr.sha256,e,t)};xr.sha512hmac=function(e,t){return xr.hmac(xr.sha512,e,t)}});var cr=k((j2e,Oy)=>{v();A.default.browser?Oy.exports=gP():Oy.exports=mP()});var xs=k((K2e,_P)=>{"use strict";v();var Na=Et(),y0=pi(),uf=[],b0={};function yP(){}yP.prototype.toString=function(){return this.name};function _0(e,t){if(~uf.indexOf(e))return e;if(t){Na.isArray(t)||(t=[t]);for(var r=0;r<uf.length;r++){var i=uf[r],n=Na.pick(i,t),o=Na.values(n);if(~o.indexOf(e))return i}return}return b0[e]}function Ap(e){for(var t=[],r=0;r<e.length;r++)t.push(e.charCodeAt(r)&31);return t}function w0(e){var t=new yP;y0.defineImmutable(t,{name:e.name,alias:e.alias,pubkeyhash:e.pubkeyhash,privatekey:e.privatekey,scripthash:e.scripthash,xpubkey:e.xpubkey,xprivkey:e.xprivkey});var r=e.indexBy||Object.keys(e);return e.cashAddrPrefix&&Na.extend(t,{cashAddrPrefix:e.cashAddrPrefix,cashAddrPrefixArray:Ap(e.cashAddrPrefix)}),e.networkMagic&&Na.extend(t,{networkMagic:y0.integerAsBuffer(e.networkMagic)}),e.port&&Na.extend(t,{port:e.port}),e.dnsSeeds&&Na.extend(t,{dnsSeeds:e.dnsSeeds}),uf.push(t),DJ(t,r),t}function DJ(e,t){for(var r=0;r<t.length;r++){var i=t[r],n=e[i];!Na.isUndefined(n)&&!Na.isObject(n)&&(b0[n]=e)}}function LJ(e,t){for(var r=0;r<t.length;r++){var i=t[r];b0[i]===e&&delete b0[i]}}function qJ(e){for(var t=0;t<uf.length;t++)uf[t]===e&&uf.splice(t,1);LJ(e,Object.keys(b0))}var Pp={livenet:3823236072,testnet:4108710900,regtest:3669344250,stn:4224632057},bP=["seed.bitcoinsv.org","seed.bitcoinunlimited.info"],ws={PORT:18333,NETWORK_MAGIC:Pp.testnet,DNS_SEEDS:bP,PREFIX:"testnet",CASHADDRPREFIX:"bchtest"},Da={PORT:18444,NETWORK_MAGIC:Pp.regtest,DNS_SEEDS:[],PREFIX:"regtest",CASHADDRPREFIX:"bchreg"},Ss={PORT:9333,NETWORK_MAGIC:Pp.stn,DNS_SEEDS:["stn-seed.bitcoinsv.io"],PREFIX:"stn",CASHADDRPREFIX:"bsvstn"},UJ={name:"livenet",alias:"mainnet",prefix:"bitcoin",cashAddrPrefix:"bitcoincash",pubkeyhash:0,privatekey:128,scripthash:5,xpubkey:76067358,xprivkey:76066276,networkMagic:Pp.livenet,port:8333,dnsSeeds:bP},FJ={name:"testnet",prefix:ws.PREFIX,cashAddrPrefix:ws.CASHADDRPREFIX,pubkeyhash:111,privatekey:239,scripthash:196,xpubkey:70617039,xprivkey:70615956,networkMagic:ws.NETWORK_MAGIC},HJ={name:"regtest",prefix:Da.PREFIX,cashAddrPrefix:Da.CASHADDRPREFIX,pubkeyhash:111,privatekey:239,scripthash:196,xpubkey:70617039,xprivkey:70615956,networkMagic:Da.NETWORK_MAGIC,port:Da.PORT,dnsSeeds:[],indexBy:["port","name","cashAddrPrefix","networkMagic"]},jJ={name:"stn",prefix:Ss.PREFIX,cashAddrPrefix:Ss.CASHADDRPREFIX,pubkeyhash:111,privatekey:239,scripthash:196,xpubkey:70617039,xprivkey:70615956,networkMagic:Ss.NETWORK_MAGIC,indexBy:["port","name","cashAddrPrefix","networkMagic"]};w0(FJ);w0(jJ);w0(HJ);w0(UJ);var Ay=_0("livenet"),zJ=_0("regtest"),No=_0("testnet"),KJ=_0("stn");Object.defineProperty(No,"port",{enumerable:!0,configurable:!1,get:function(){return this.regtestEnabled?Da.PORT:this.stnEnabled?Ss.PORT:ws.PORT}});Object.defineProperty(No,"networkMagic",{enumerable:!0,configurable:!1,get:function(){return this.regtestEnabled?y0.integerAsBuffer(Da.NETWORK_MAGIC):this.stnEnabled?y0.integerAsBuffer(Ss.NETWORK_MAGIC):y0.integerAsBuffer(ws.NETWORK_MAGIC)}});Object.defineProperty(No,"dnsSeeds",{enumerable:!0,configurable:!1,get:function(){return this.regtestEnabled?Da.DNS_SEEDS:this.stnEnabled?Ss.DNS_SEEDS:ws.DNS_SEEDS}});Object.defineProperty(No,"cashAddrPrefix",{enumerable:!0,configurable:!1,get:function(){return this.regtestEnabled?Da.CASHADDRPREFIX:this.stnEnabled?Ss.CASHADDRPREFIX:ws.CASHADDRPREFIX}});Object.defineProperty(No,"cashAddrPrefixArray",{enumerable:!0,configurable:!1,get:function(){return this.regtestEnabled?Ap(Da.CASHADDRPREFIX):this.stnEnabled?Ap(Ss.CASHADDRPREFIX):Ap(ws.CASHADDRPREFIX)}});function VJ(){No.regtestEnabled=!0}function GJ(){No.regtestEnabled=!1}function ZJ(){No.stnEnabled=!0}function WJ(){No.stnEnabled=!1}_P.exports={add:w0,remove:qJ,defaultNetwork:Ay,livenet:Ay,mainnet:Ay,testnet:No,regtest:zJ,stn:KJ,get:_0,enableRegtest:VJ,disableRegtest:GJ,enableStn:ZJ,disableStn:WJ}});var S0=k((G2e,xP)=>{"use strict";v();var Py=Et(),wP=Z2(),SP=Kt(),YJ="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz".split(""),Gr=function e(t){if(!(this instanceof e))return new e(t);if(h.Buffer.isBuffer(t)){var r=t;this.fromBuffer(r)}else if(typeof t=="string"){var i=t;this.fromString(i)}};Gr.validCharacters=function(t){return SP.Buffer.isBuffer(t)&&(t=t.toString()),Py.every(Py.map(t,function(r){return Py.includes(YJ,r)}))};Gr.prototype.set=function(e){return this.buf=e.buf||this.buf||void 0,this};Gr.encode=function(e){if(!SP.Buffer.isBuffer(e))throw new Error("Input should be a buffer");return wP.encode(e)};Gr.decode=function(e){if(typeof e!="string")throw new Error("Input should be a string");return h.Buffer.from(wP.decode(e))};Gr.prototype.fromBuffer=function(e){return this.buf=e,this};Gr.fromBuffer=function(e){return new Gr().fromBuffer(e)};Gr.fromHex=function(e){return Gr.fromBuffer(h.Buffer.from(e,"hex"))};Gr.prototype.fromString=function(e){var t=Gr.decode(e);return this.buf=t,this};Gr.fromString=function(e){return new Gr().fromString(e)};Gr.prototype.toBuffer=function(){return this.buf};Gr.prototype.toHex=function(){return this.toBuffer().toString("hex")};Gr.prototype.toString=function(){return Gr.encode(this.buf)};xP.exports=Gr});var Qc=k((W2e,AP)=>{"use strict";v();var EP=Et(),Tp=S0(),IP=Kt(),OP=cr().sha256sha256,lr=function e(t){if(!(this instanceof e))return new e(t);if(h.Buffer.isBuffer(t)){var r=t;this.fromBuffer(r)}else if(typeof t=="string"){var i=t;this.fromString(i)}};lr.prototype.set=function(e){return this.buf=e.buf||this.buf||void 0,this};lr.validChecksum=function(t,r){return EP.isString(t)&&(t=IP.Buffer.from(Tp.decode(t))),EP.isString(r)&&(r=IP.Buffer.from(Tp.decode(r))),r||(r=t.slice(-4),t=t.slice(0,-4)),lr.checksum(t).toString("hex")===r.toString("hex")};lr.decode=function(e){if(typeof e!="string")throw new Error("Input must be a string");var t=h.Buffer.from(Tp.decode(e));if(t.length<4)throw new Error("Input string too short");var r=t.slice(0,-4),i=t.slice(-4),n=OP(r),o=n.slice(0,4);if(i.toString("hex")!==o.toString("hex"))throw new Error("Checksum mismatch");return r};lr.checksum=function(e){return OP(e).slice(0,4)};lr.encode=function(e){if(!h.Buffer.isBuffer(e))throw new Error("Input must be a buffer");var t=h.Buffer.alloc(e.length+4),r=lr.checksum(e);return e.copy(t),r.copy(t,e.length),Tp.encode(t)};lr.prototype.fromBuffer=function(e){return this.buf=e,this};lr.fromBuffer=function(e){return new lr().fromBuffer(e)};lr.fromHex=function(e){return lr.fromBuffer(h.Buffer.from(e,"hex"))};lr.prototype.fromString=function(e){var t=lr.decode(e);return this.buf=t,this};lr.fromString=function(e){var t=lr.decode(e);return new lr(t)};lr.prototype.toBuffer=function(){return this.buf};lr.prototype.toHex=function(){return this.toBuffer().toString("hex")};lr.prototype.toString=function(){return lr.encode(this.buf)};AP.exports=lr});var La=k(($2e,TP)=>{"use strict";v();var x0=Et(),PP=Bt(),el=fr(),gr=function e(t){if(!(this instanceof e))return new e(t);if(!x0.isUndefined(t))if(h.Buffer.isBuffer(t))this.set({buf:t});else if(x0.isString(t)){var r=h.Buffer.from(t,"hex");if(r.length*2!==t.length)throw new TypeError("Invalid hex string");this.set({buf:r})}else if(x0.isObject(t)){var i=t;this.set(i)}else throw new TypeError("Unrecognized argument for BufferReader")};gr.prototype.set=function(e){return this.buf=e.buf||this.buf||void 0,this.pos=e.pos||this.pos||0,this};gr.prototype.eof=function(){return this.pos>=this.buf.length};gr.prototype.finished=gr.prototype.eof;gr.prototype.read=function(e){PP.checkArgument(!x0.isUndefined(e),"Must specify a length");var t=this.buf.slice(this.pos,this.pos+e);return this.pos=this.pos+e,t};gr.prototype.readAll=function(){var e=this.buf.slice(this.pos,this.buf.length);return this.pos=this.buf.length,e};gr.prototype.readUInt8=function(){var e=this.buf.readUInt8(this.pos);return this.pos=this.pos+1,e};gr.prototype.readUInt16BE=function(){var e=this.buf.readUInt16BE(this.pos);return this.pos=this.pos+2,e};gr.prototype.readUInt16LE=function(){var e=this.buf.readUInt16LE(this.pos);return this.pos=this.pos+2,e};gr.prototype.readUInt32BE=function(){var e=this.buf.readUInt32BE(this.pos);return this.pos=this.pos+4,e};gr.prototype.readUInt32LE=function(){var e=this.buf.readUInt32LE(this.pos);return this.pos=this.pos+4,e};gr.prototype.readInt32LE=function(){var e=this.buf.readInt32LE(this.pos);return this.pos=this.pos+4,e};gr.prototype.readUInt64BEBN=function(){var e=this.buf.slice(this.pos,this.pos+8),t=el.fromBuffer(e);return this.pos=this.pos+8,t};gr.prototype.readUInt64LEBN=function(){var e=this.buf.readUInt32LE(this.pos),t=this.buf.readUInt32LE(this.pos+4),r=t*4294967296+e,i;if(r<=9007199254740991)i=new el(r);else{var n=Array.prototype.slice.call(this.buf,this.pos,this.pos+8);i=new el(n,10,"le")}return this.pos=this.pos+8,i};gr.prototype.readVarintNum=function(){var e=this.readUInt8();switch(e){case 253:return this.readUInt16LE();case 254:return this.readUInt32LE();case 255:var t=this.readUInt64LEBN(),r=t.toNumber();if(r<=Math.pow(2,53))return r;throw new Error("number too large to retain precision - use readVarintBN");default:return e}};gr.prototype.readVarLengthBuffer=function(){var e=this.readVarintNum(),t=this.read(e);return PP.checkState(t.length===e,"Invalid length while reading varlength buffer. Expected to read: "+e+" and read "+t.length),t};gr.prototype.readVarintBuf=function(){var e=this.buf.readUInt8(this.pos);switch(e){case 253:return this.read(3);case 254:return this.read(5);case 255:return this.read(9);default:return this.read(1)}};gr.prototype.readVarintBN=function(){var e=this.readUInt8();switch(e){case 253:return new el(this.readUInt16LE());case 254:return new el(this.readUInt32LE());case 255:return this.readUInt64LEBN();default:return new el(e)}};gr.prototype.reverse=function(){for(var e=h.Buffer.alloc(this.buf.length),t=0;t<e.length;t++)e[t]=this.buf[this.buf.length-1-t];return this.buf=e,this};gr.prototype.readReverse=function(e){x0.isUndefined(e)&&(e=this.buf.length);var t=this.buf.slice(this.pos,this.pos+e);return this.pos=this.pos+e,h.Buffer.from(t).reverse()};TP.exports=gr});var Ry=k((J2e,MP)=>{"use strict";v();function Es(e){"@babel/helpers - typeof";return Es=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Es(e)}function kP(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,XJ(i.key),i)}}function $J(e,t,r){return t&&kP(e.prototype,t),r&&kP(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function XJ(e){var t=JJ(e,"string");return Es(t)==="symbol"?t:String(t)}function JJ(e,t){if(Es(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(Es(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function QJ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eQ(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ky(e,t)}function ky(e,t){return ky=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},ky(e,t)}function tQ(e){var t=nQ();return function(){var i=kp(e),n;if(t){var o=kp(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return rQ(this,n)}}function rQ(e,t){if(t&&(Es(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return iQ(e)}function iQ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nQ(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function kp(e){return kp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},kp(e)}var BP={},tl,Ty;function E0(e,t,r){r||(r=Error);function i(o,a,s){return typeof t=="string"?t:t(o,a,s)}var n=(function(o){eQ(s,o);var a=tQ(s);function s(u,c,l){var m;return QJ(this,s),m=a.call(this,i(u,c,l)),m.code=e,m}return $J(s)})(r);BP[e]=n}function RP(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(i){return String(i)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function oQ(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function aQ(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function sQ(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}E0("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError);E0("ERR_INVALID_ARG_TYPE",function(e,t,r){tl===void 0&&(tl=Is()),tl(typeof e=="string","'name' must be a string");var i;typeof t=="string"&&oQ(t,"not ")?(i="must not be",t=t.replace(/^not /,"")):i="must be";var n;if(aQ(e," argument"))n="The ".concat(e," ").concat(i," ").concat(RP(t,"type"));else{var o=sQ(e,".")?"property":"argument";n='The "'.concat(e,'" ').concat(o," ").concat(i," ").concat(RP(t,"type"))}return n+=". Received type ".concat(Es(r)),n},TypeError);E0("ERR_INVALID_ARG_VALUE",function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";Ty===void 0&&(Ty=rn());var i=Ty.inspect(t);return i.length>128&&(i="".concat(i.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(r,". Received ").concat(i)},TypeError,RangeError);E0("ERR_INVALID_RETURN_VALUE",function(e,t,r){var i;return r&&r.constructor&&r.constructor.name?i="instance of ".concat(r.constructor.name):i="type ".concat(Es(r)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(i,".")},TypeError);E0("ERR_MISSING_ARGS",function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];tl===void 0&&(tl=Is()),tl(t.length>0,"At least one arg needs to be specified");var i="The ",n=t.length;switch(t=t.map(function(o){return'"'.concat(o,'"')}),n){case 1:i+="".concat(t[0]," argument");break;case 2:i+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:i+=t.slice(0,n-1).join(", "),i+=", and ".concat(t[n-1]," arguments");break}return"".concat(i," must be specified")},TypeError);MP.exports.codes=BP});var zP=k((epe,jP)=>{"use strict";v();function CP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}function NP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?CP(Object(r),!0).forEach(function(i){uQ(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):CP(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function uQ(e,t,r){return t=UP(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function DP(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,UP(i.key),i)}}function cQ(e,t,r){return t&&DP(e.prototype,t),r&&DP(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function UP(e){var t=lQ(e,"string");return Bi(t)==="symbol"?t:String(t)}function lQ(e,t){if(Bi(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(Bi(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hQ(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&P0(e,t)}function dQ(e){var t=HP();return function(){var i=T0(e),n;if(t){var o=T0(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return FP(this,n)}}function FP(e,t){if(t&&(Bi(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return By(e)}function By(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function My(e){var t=typeof Map=="function"?new Map:void 0;return My=function(i){if(i===null||!pQ(i))return i;if(typeof i!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(i))return t.get(i);t.set(i,n)}function n(){return Rp(i,arguments,T0(this).constructor)}return n.prototype=Object.create(i.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),P0(n,i)},My(e)}function Rp(e,t,r){return HP()?Rp=Reflect.construct.bind():Rp=function(n,o,a){var s=[null];s.push.apply(s,o);var u=Function.bind.apply(n,s),c=new u;return a&&P0(c,a.prototype),c},Rp.apply(null,arguments)}function HP(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function pQ(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function P0(e,t){return P0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},P0(e,t)}function T0(e){return T0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},T0(e)}function Bi(e){"@babel/helpers - typeof";return Bi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bi(e)}var gQ=rn(),Cy=gQ.inspect,vQ=Ry(),mQ=vQ.codes.ERR_INVALID_ARG_TYPE;function LP(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function yQ(e,t){if(t=Math.floor(t),e.length==0||t==0)return"";var r=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+=e.substring(0,r-e.length),e}var Vn="",I0="",O0="",ii="",ff={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},bQ=10;function qP(e){var t=Object.keys(e),r=Object.create(Object.getPrototypeOf(e));return t.forEach(function(i){r[i]=e[i]}),Object.defineProperty(r,"message",{value:e.message}),r}function A0(e){return Cy(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function _Q(e,t,r){var i="",n="",o=0,a="",s=!1,u=A0(e),c=u.split(`
|
|
20
20
|
`),l=A0(t).split(`
|