@web3auth/no-modal 5.2.0 → 6.0.1-alpha.0

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.
@@ -1,3 +1,3 @@
1
1
  /*! For license information please see noModal.umd.min.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.NoModal=t():e.NoModal=t()}(self,(()=>(()=>{var e={1249:(e,t,r)=>{"use strict";var n=r(8834).Buffer,i=(new(0,r(7554).ec)("secp256k1"),r.g.crypto||r.g.msCrypto||{}),o=i.subtle||i.webkitSubtle,a=r(5634);n.from("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141","hex"),n.alloc(32,0);function s(e){return function(t,r,i){return new Promise((function(s){if(o)return o.importKey("raw",r,{name:"AES-CBC"},!1,[e]).then((function(r){var n={name:"AES-CBC",iv:t};return o[e](n,r,i)})).then((function(e){s(n.from(new Uint8Array(e)))}));if("encrypt"===e){var f=a.createCipheriv("aes-256-cbc",r,t);let e=f.update(i),o=f.final();s(n.concat([e,o]))}else if("decrypt"===e){var c=a.createDecipheriv("aes-256-cbc",r,t);let e=c.update(i),o=c.final();s(n.concat([e,o]))}}))}}s("encrypt"),s("decrypt")},2812:(e,t,r)=>{"use strict";const n=t;n.bignum=r(2197),n.define=r(5192).define,n.base=r(4798),n.constants=r(6906),n.decoders=r(8211),n.encoders=r(9116)},5192:(e,t,r)=>{"use strict";const n=r(9116),i=r(8211),o=r(1285);function a(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}t.define=function(e,t){return new a(e,t)},a.prototype._createNamed=function(e){const t=this.name;function r(e){this._initNamed(e,t)}return o(r,e),r.prototype._initNamed=function(t,r){e.call(this,t,r)},new r(this)},a.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(i[e])),this.decoders[e]},a.prototype.decode=function(e,t,r){return this._getDecoder(t).decode(e,r)},a.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(n[e])),this.encoders[e]},a.prototype.encode=function(e,t,r){return this._getEncoder(t).encode(e,r)}},7362:(e,t,r)=>{"use strict";const n=r(1285),i=r(126).b,o=r(7654).Buffer;function a(e,t){i.call(this,t),o.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function s(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return s.isEncoderBuffer(e)||(e=new s(e,t)),this.length+=e.length,e}),this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=o.byteLength(e);else{if(!o.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}n(a,i),t.C=a,a.isDecoderBuffer=function(e){return e instanceof a||"object"==typeof e&&o.isBuffer(e.base)&&"DecoderBuffer"===e.constructor.name&&"number"==typeof e.offset&&"number"==typeof e.length&&"function"==typeof e.save&&"function"==typeof e.restore&&"function"==typeof e.isEmpty&&"function"==typeof e.readUInt8&&"function"==typeof e.skip&&"function"==typeof e.raw},a.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},a.prototype.restore=function(e){const t=new a(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,i.prototype.restore.call(this,e.reporter),t},a.prototype.isEmpty=function(){return this.offset===this.length},a.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},a.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");const r=new a(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+e,this.offset+=e,r},a.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},t.R=s,s.isEncoderBuffer=function(e){return e instanceof s||"object"==typeof e&&"EncoderBuffer"===e.constructor.name&&"number"==typeof e.length&&"function"==typeof e.join},s.prototype.join=function(e,t){return e||(e=o.alloc(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(r){r.join(e,t),t+=r.length})):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):o.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}},4798:(e,t,r)=>{"use strict";const n=t;n.Reporter=r(126).b,n.DecoderBuffer=r(7362).C,n.EncoderBuffer=r(7362).R,n.Node=r(847)},847:(e,t,r)=>{"use strict";const n=r(126).b,i=r(7362).R,o=r(7362).C,a=r(9561),s=["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"],f=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(s);function c(e,t,r){const n={};this._baseState=n,n.name=r,n.enc=e,n.parent=t||null,n.children=null,n.tag=null,n.args=null,n.reverseArgs=null,n.choice=null,n.optional=!1,n.any=!1,n.obj=!1,n.use=null,n.useDecoder=null,n.key=null,n.default=null,n.explicit=null,n.implicit=null,n.contains=null,n.parent||(n.children=[],this._wrap())}e.exports=c;const h=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];c.prototype.clone=function(){const e=this._baseState,t={};h.forEach((function(r){t[r]=e[r]}));const r=new this.constructor(t.parent);return r._baseState=t,r},c.prototype._wrap=function(){const e=this._baseState;f.forEach((function(t){this[t]=function(){const r=new this.constructor(this);return e.children.push(r),r[t].apply(r,arguments)}}),this)},c.prototype._init=function(e){const t=this._baseState;a(null===t.parent),e.call(this),t.children=t.children.filter((function(e){return e._baseState.parent===this}),this),a.equal(t.children.length,1,"Root node can have only one child")},c.prototype._useArgs=function(e){const t=this._baseState,r=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==r.length&&(a(null===t.children),t.children=r,r.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(a(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){if("object"!=typeof e||e.constructor!==Object)return e;const t={};return Object.keys(e).forEach((function(r){r==(0|r)&&(r|=0);const n=e[r];t[n]=r})),t})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){c.prototype[e]=function(){const t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),s.forEach((function(e){c.prototype[e]=function(){const t=this._baseState,r=Array.prototype.slice.call(arguments);return a(null===t.tag),t.tag=e,this._useArgs(r),this}})),c.prototype.use=function(e){a(e);const t=this._baseState;return a(null===t.use),t.use=e,this},c.prototype.optional=function(){return this._baseState.optional=!0,this},c.prototype.def=function(e){const t=this._baseState;return a(null===t.default),t.default=e,t.optional=!0,this},c.prototype.explicit=function(e){const t=this._baseState;return a(null===t.explicit&&null===t.implicit),t.explicit=e,this},c.prototype.implicit=function(e){const t=this._baseState;return a(null===t.explicit&&null===t.implicit),t.implicit=e,this},c.prototype.obj=function(){const e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},c.prototype.key=function(e){const t=this._baseState;return a(null===t.key),t.key=e,this},c.prototype.any=function(){return this._baseState.any=!0,this},c.prototype.choice=function(e){const t=this._baseState;return a(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},c.prototype.contains=function(e){const t=this._baseState;return a(null===t.use),t.contains=e,this},c.prototype._decode=function(e,t){const r=this._baseState;if(null===r.parent)return e.wrapResult(r.children[0]._decode(e,t));let n,i=r.default,a=!0,s=null;if(null!==r.key&&(s=e.enterKey(r.key)),r.optional){let n=null;if(null!==r.explicit?n=r.explicit:null!==r.implicit?n=r.implicit:null!==r.tag&&(n=r.tag),null!==n||r.any){if(a=this._peekTag(e,n,r.any),e.isError(a))return a}else{const n=e.save();try{null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),a=!0}catch(e){a=!1}e.restore(n)}}if(r.obj&&a&&(n=e.enterObject()),a){if(null!==r.explicit){const t=this._decodeTag(e,r.explicit);if(e.isError(t))return t;e=t}const n=e.offset;if(null===r.use&&null===r.choice){let t;r.any&&(t=e.save());const n=this._decodeTag(e,null!==r.implicit?r.implicit:r.tag,r.any);if(e.isError(n))return n;r.any?i=e.raw(t):e=n}if(t&&t.track&&null!==r.tag&&t.track(e.path(),n,e.length,"tagged"),t&&t.track&&null!==r.tag&&t.track(e.path(),e.offset,e.length,"content"),r.any||(i=null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t)),e.isError(i))return i;if(r.any||null!==r.choice||null===r.children||r.children.forEach((function(r){r._decode(e,t)})),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){const n=new o(i);i=this._getUse(r.contains,e._reporterState.obj)._decode(n,t)}}return r.obj&&a&&(i=e.leaveObject(n)),null===r.key||null===i&&!0!==a?null!==s&&e.exitKey(s):e.leaveKey(s,r.key,i),i},c.prototype._decodeGeneric=function(e,t,r){const n=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,n.args[0],r):/str$/.test(e)?this._decodeStr(t,e,r):"objid"===e&&n.args?this._decodeObjid(t,n.args[0],n.args[1],r):"objid"===e?this._decodeObjid(t,null,null,r):"gentime"===e||"utctime"===e?this._decodeTime(t,e,r):"null_"===e?this._decodeNull(t,r):"bool"===e?this._decodeBool(t,r):"objDesc"===e?this._decodeStr(t,e,r):"int"===e||"enum"===e?this._decodeInt(t,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,t._reporterState.obj)._decode(t,r):t.error("unknown tag: "+e)},c.prototype._getUse=function(e,t){const r=this._baseState;return r.useDecoder=this._use(e,t),a(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},c.prototype._decodeChoice=function(e,t){const r=this._baseState;let n=null,i=!1;return Object.keys(r.choice).some((function(o){const a=e.save(),s=r.choice[o];try{const r=s._decode(e,t);if(e.isError(r))return!1;n={type:o,value:r},i=!0}catch(t){return e.restore(a),!1}return!0}),this),i?n:e.error("Choice not matched")},c.prototype._createEncoderBuffer=function(e){return new i(e,this.reporter)},c.prototype._encode=function(e,t,r){const n=this._baseState;if(null!==n.default&&n.default===e)return;const i=this._encodeValue(e,t,r);return void 0===i||this._skipDefault(i,t,r)?void 0:i},c.prototype._encodeValue=function(e,t,r){const i=this._baseState;if(null===i.parent)return i.children[0]._encode(e,t||new n);let o=null;if(this.reporter=t,i.optional&&void 0===e){if(null===i.default)return;e=i.default}let a=null,s=!1;if(i.any)o=this._createEncoderBuffer(e);else if(i.choice)o=this._encodeChoice(e,t);else if(i.contains)a=this._getUse(i.contains,r)._encode(e,t),s=!0;else if(i.children)a=i.children.map((function(r){if("null_"===r._baseState.tag)return r._encode(null,t,e);if(null===r._baseState.key)return t.error("Child should have a key");const n=t.enterKey(r._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");const i=r._encode(e[r._baseState.key],t,e);return t.leaveKey(n),i}),this).filter((function(e){return e})),a=this._createEncoderBuffer(a);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return t.error("Too many args for : "+i.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");const r=this.clone();r._baseState.implicit=null,a=this._createEncoderBuffer(e.map((function(r){const n=this._baseState;return this._getUse(n.args[0],e)._encode(r,t)}),r))}else null!==i.use?o=this._getUse(i.use,r)._encode(e,t):(a=this._encodePrimitive(i.tag,e),s=!0);if(!i.any&&null===i.choice){const e=null!==i.implicit?i.implicit:i.tag,r=null===i.implicit?"universal":"context";null===e?null===i.use&&t.error("Tag could be omitted only for .use()"):null===i.use&&(o=this._encodeComposite(e,s,r,a))}return null!==i.explicit&&(o=this._encodeComposite(i.explicit,!1,"context",o)),o},c.prototype._encodeChoice=function(e,t){const r=this._baseState,n=r.choice[e.type];return n||a(!1,e.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(e.value,t)},c.prototype._encodePrimitive=function(e,t){const r=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&r.args)return this._encodeObjid(t,r.reverseArgs[0],r.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,r.args&&r.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},c.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},c.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)}},126:(e,t,r)=>{"use strict";const n=r(1285);function i(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function o(e,t){this.path=e,this.rethrow(t)}t.b=i,i.prototype.isError=function(e){return e instanceof o},i.prototype.save=function(){const e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},i.prototype.restore=function(e){const t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},i.prototype.enterKey=function(e){return this._reporterState.path.push(e)},i.prototype.exitKey=function(e){const t=this._reporterState;t.path=t.path.slice(0,e-1)},i.prototype.leaveKey=function(e,t,r){const n=this._reporterState;this.exitKey(e),null!==n.obj&&(n.obj[t]=r)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){const e=this._reporterState,t=e.obj;return e.obj={},t},i.prototype.leaveObject=function(e){const t=this._reporterState,r=t.obj;return t.obj=e,r},i.prototype.error=function(e){let t;const r=this._reporterState,n=e instanceof o;if(t=n?e:new o(r.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!r.options.partial)throw t;return n||r.errors.push(t),t},i.prototype.wrapResult=function(e){const t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},n(o,Error),o.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},4131:(e,t)=>{"use strict";function r(e){const t={};return Object.keys(e).forEach((function(r){(0|r)==r&&(r|=0);const n=e[r];t[n]=r})),t}t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=r(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=r(t.tag)},6906:(e,t,r)=>{"use strict";const n=t;n._reverse=function(e){const t={};return Object.keys(e).forEach((function(r){(0|r)==r&&(r|=0);const n=e[r];t[n]=r})),t},n.der=r(4131)},1066:(e,t,r)=>{"use strict";const n=r(1285),i=r(2197),o=r(7362).C,a=r(847),s=r(4131);function f(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new c,this.tree._init(e.body)}function c(e){a.call(this,"der",e)}function h(e,t){let r=e.readUInt8(t);if(e.isError(r))return r;const n=s.tagClass[r>>6],i=0==(32&r);if(31==(31&r)){let n=r;for(r=0;128==(128&n);){if(n=e.readUInt8(t),e.isError(n))return n;r<<=7,r|=127&n}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:s.tag[r]}}function d(e,t,r){let n=e.readUInt8(r);if(e.isError(n))return n;if(!t&&128===n)return null;if(0==(128&n))return n;const i=127&n;if(i>4)return e.error("length octect is too long");n=0;for(let t=0;t<i;t++){n<<=8;const t=e.readUInt8(r);if(e.isError(t))return t;n|=t}return n}e.exports=f,f.prototype.decode=function(e,t){return o.isDecoderBuffer(e)||(e=new o(e,t)),this.tree._decode(e,t)},n(c,a),c.prototype._peekTag=function(e,t,r){if(e.isEmpty())return!1;const n=e.save(),i=h(e,'Failed to peek tag: "'+t+'"');return e.isError(i)?i:(e.restore(n),i.tag===t||i.tagStr===t||i.tagStr+"of"===t||r)},c.prototype._decodeTag=function(e,t,r){const n=h(e,'Failed to decode tag of "'+t+'"');if(e.isError(n))return n;let i=d(e,n.primitive,'Failed to get length of "'+t+'"');if(e.isError(i))return i;if(!r&&n.tag!==t&&n.tagStr!==t&&n.tagStr+"of"!==t)return e.error('Failed to match tag: "'+t+'"');if(n.primitive||null!==i)return e.skip(i,'Failed to match body of: "'+t+'"');const o=e.save(),a=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(a)?a:(i=e.offset-o.offset,e.restore(o),e.skip(i,'Failed to match body of: "'+t+'"'))},c.prototype._skipUntilEnd=function(e,t){for(;;){const r=h(e,t);if(e.isError(r))return r;const n=d(e,r.primitive,t);if(e.isError(n))return n;let i;if(i=r.primitive||null!==n?e.skip(n):this._skipUntilEnd(e,t),e.isError(i))return i;if("end"===r.tagStr)break}},c.prototype._decodeList=function(e,t,r,n){const i=[];for(;!e.isEmpty();){const t=this._peekTag(e,"end");if(e.isError(t))return t;const o=r.decode(e,"der",n);if(e.isError(o)&&t)break;i.push(o)}return i},c.prototype._decodeStr=function(e,t){if("bitstr"===t){const t=e.readUInt8();return e.isError(t)?t:{unused:t,data:e.raw()}}if("bmpstr"===t){const t=e.raw();if(t.length%2==1)return e.error("Decoding of string type: bmpstr length mismatch");let r="";for(let e=0;e<t.length/2;e++)r+=String.fromCharCode(t.readUInt16BE(2*e));return r}if("numstr"===t){const t=e.raw().toString("ascii");return this._isNumstr(t)?t:e.error("Decoding of string type: numstr unsupported characters")}if("octstr"===t)return e.raw();if("objDesc"===t)return e.raw();if("printstr"===t){const t=e.raw().toString("ascii");return this._isPrintstr(t)?t:e.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(t)?e.raw().toString():e.error("Decoding of string type: "+t+" unsupported")},c.prototype._decodeObjid=function(e,t,r){let n;const i=[];let o=0,a=0;for(;!e.isEmpty();)a=e.readUInt8(),o<<=7,o|=127&a,0==(128&a)&&(i.push(o),o=0);128&a&&i.push(o);const s=i[0]/40|0,f=i[0]%40;if(n=r?i:[s,f].concat(i.slice(1)),t){let e=t[n.join(" ")];void 0===e&&(e=t[n.join(".")]),void 0!==e&&(n=e)}return n},c.prototype._decodeTime=function(e,t){const r=e.raw().toString();let n,i,o,a,s,f;if("gentime"===t)n=0|r.slice(0,4),i=0|r.slice(4,6),o=0|r.slice(6,8),a=0|r.slice(8,10),s=0|r.slice(10,12),f=0|r.slice(12,14);else{if("utctime"!==t)return e.error("Decoding "+t+" time is not supported yet");n=0|r.slice(0,2),i=0|r.slice(2,4),o=0|r.slice(4,6),a=0|r.slice(6,8),s=0|r.slice(8,10),f=0|r.slice(10,12),n=n<70?2e3+n:1900+n}return Date.UTC(n,i-1,o,a,s,f,0)},c.prototype._decodeNull=function(){return null},c.prototype._decodeBool=function(e){const t=e.readUInt8();return e.isError(t)?t:0!==t},c.prototype._decodeInt=function(e,t){const r=e.raw();let n=new i(r);return t&&(n=t[n.toString(10)]||n),n},c.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getDecoder("der").tree}},8211:(e,t,r)=>{"use strict";const n=t;n.der=r(1066),n.pem=r(3956)},3956:(e,t,r)=>{"use strict";const n=r(1285),i=r(7654).Buffer,o=r(1066);function a(e){o.call(this,e),this.enc="pem"}n(a,o),e.exports=a,a.prototype.decode=function(e,t){const r=e.toString().split(/[\r\n]+/g),n=t.label.toUpperCase(),a=/^-----(BEGIN|END) ([^-]+)-----$/;let s=-1,f=-1;for(let e=0;e<r.length;e++){const t=r[e].match(a);if(null!==t&&t[2]===n){if(-1!==s){if("END"!==t[1])break;f=e;break}if("BEGIN"!==t[1])break;s=e}}if(-1===s||-1===f)throw new Error("PEM section not found for: "+n);const c=r.slice(s+1,f).join("");c.replace(/[^a-z0-9+/=]+/gi,"");const h=i.from(c,"base64");return o.prototype.decode.call(this,h,t)}},5758:(e,t,r)=>{"use strict";const n=r(1285),i=r(7654).Buffer,o=r(847),a=r(4131);function s(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new f,this.tree._init(e.body)}function f(e){o.call(this,"der",e)}function c(e){return e<10?"0"+e:e}e.exports=s,s.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},n(f,o),f.prototype._encodeComposite=function(e,t,r,n){const o=function(e,t,r,n){let i;if("seqof"===e?e="seq":"setof"===e&&(e="set"),a.tagByName.hasOwnProperty(e))i=a.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return n.error("Unknown tag: "+e);i=e}return i>=31?n.error("Multi-octet tag encoding unsupported"):(t||(i|=32),i|=a.tagClassByName[r||"universal"]<<6,i)}(e,t,r,this.reporter);if(n.length<128){const e=i.alloc(2);return e[0]=o,e[1]=n.length,this._createEncoderBuffer([e,n])}let s=1;for(let e=n.length;e>=256;e>>=8)s++;const f=i.alloc(2+s);f[0]=o,f[1]=128|s;for(let e=1+s,t=n.length;t>0;e--,t>>=8)f[e]=255&t;return this._createEncoderBuffer([f,n])},f.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){const t=i.alloc(2*e.length);for(let r=0;r<e.length;r++)t.writeUInt16BE(e.charCodeAt(r),2*r);return this._createEncoderBuffer(t)}return"numstr"===t?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===t?this._isPrintstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(t)||"objDesc"===t?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+t+" unsupported")},f.prototype._encodeObjid=function(e,t,r){if("string"==typeof e){if(!t)return this.reporter.error("string objid given, but no values map found");if(!t.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=t[e].split(/[\s.]+/g);for(let t=0;t<e.length;t++)e[t]|=0}else if(Array.isArray(e)){e=e.slice();for(let t=0;t<e.length;t++)e[t]|=0}if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!r){if(e[1]>=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}let n=0;for(let t=0;t<e.length;t++){let r=e[t];for(n++;r>=128;r>>=7)n++}const o=i.alloc(n);let a=o.length-1;for(let t=e.length-1;t>=0;t--){let r=e[t];for(o[a--]=127&r;(r>>=7)>0;)o[a--]=128|127&r}return this._createEncoderBuffer(o)},f.prototype._encodeTime=function(e,t){let r;const n=new Date(e);return"gentime"===t?r=[c(n.getUTCFullYear()),c(n.getUTCMonth()+1),c(n.getUTCDate()),c(n.getUTCHours()),c(n.getUTCMinutes()),c(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[c(n.getUTCFullYear()%100),c(n.getUTCMonth()+1),c(n.getUTCDate()),c(n.getUTCHours()),c(n.getUTCMinutes()),c(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},f.prototype._encodeNull=function(){return this._createEncoderBuffer("")},f.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!i.isBuffer(e)){const t=e.toArray();!e.sign&&128&t[0]&&t.unshift(0),e=i.from(t)}if(i.isBuffer(e)){let t=e.length;0===e.length&&t++;const r=i.alloc(t);return e.copy(r),0===e.length&&(r[0]=0),this._createEncoderBuffer(r)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);let r=1;for(let t=e;t>=256;t>>=8)r++;const n=new Array(r);for(let t=n.length-1;t>=0;t--)n[t]=255&e,e>>=8;return 128&n[0]&&n.unshift(0),this._createEncoderBuffer(i.from(n))},f.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},f.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},f.prototype._skipDefault=function(e,t,r){const n=this._baseState;let i;if(null===n.default)return!1;const o=e.join();if(void 0===n.defaultBuffer&&(n.defaultBuffer=this._encodeValue(n.default,t,r).join()),o.length!==n.defaultBuffer.length)return!1;for(i=0;i<o.length;i++)if(o[i]!==n.defaultBuffer[i])return!1;return!0}},9116:(e,t,r)=>{"use strict";const n=t;n.der=r(5758),n.pem=r(9245)},9245:(e,t,r)=>{"use strict";const n=r(1285),i=r(5758);function o(e){i.call(this,e),this.enc="pem"}n(o,i),e.exports=o,o.prototype.encode=function(e,t){const r=i.prototype.encode.call(this,e).toString("base64"),n=["-----BEGIN "+t.label+"-----"];for(let e=0;e<r.length;e+=64)n.push(r.slice(e,e+64));return n.push("-----END "+t.label+"-----"),n.join("\n")}},5766:(e,t)=>{"use strict";t.byteLength=function(e){var t=f(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=f(e),a=o[0],s=o[1],c=new i(function(e,t,r){return 3*(t+r)/4-r}(0,a,s)),h=0,d=s>0?a-4:a;for(r=0;r<d;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[h++]=t>>16&255,c[h++]=t>>8&255,c[h++]=255&t;return 2===s&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[h++]=255&t),1===s&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[h++]=t>>8&255,c[h++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=16383,s=0,f=n-i;s<f;s+=a)o.push(c(e,s,s+a>f?f:s+a));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=o.length;a<s;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;function f(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,n){for(var i,o,a=[],s=t;s<n;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},2573:(e,t,r)=>{"use strict";var n=r(8834).Buffer,i=r(1329);function o(e,t){return void 0===t&&(t="utf8"),n.isBuffer(e)?s(e.toString("base64")):s(n.from(e,t).toString("base64"))}function a(e){return e=e.toString(),i.default(e).replace(/\-/g,"+").replace(/_/g,"/")}function s(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}var f=o;f.encode=o,f.decode=function(e,t){return void 0===t&&(t="utf8"),n.from(a(e),"base64").toString(t)},f.toBase64=a,f.fromBase64=s,f.toBuffer=function(e){return n.from(a(e),"base64")},t.default=f},1329:(e,t,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.length,r=t%4;if(!r)return e;var i=t,o=4-r,a=t+o,s=n.alloc(a);for(s.write(e);o--;)s.write("=",i++);return s.toString()}},9487:(e,t,r)=>{e.exports=r(2573).default,e.exports.default=e.exports},2197:function(e,t,r){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var a;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(3196).Buffer}catch(e){}function s(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function f(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function c(e,t,r,i){for(var o=0,a=0,s=Math.min(e.length,r),f=t;f<s;f++){var c=e.charCodeAt(f)-48;o*=i,a=c>=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&a<i,"Invalid character"),o+=a}return o}function h(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,a,s=0;if("be"===r)for(i=e.length-1,o=0;i>=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i<e.length;i+=3)a=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,a=0;if("be"===r)for(n=e.length-1;n>=t;n-=2)i=f(e,t,n)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(e.length-t)%2==0?t+1:t;n<e.length;n+=2)i=f(e,t,n)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,f=0,h=r;h<s;h+=n)f=c(e,h,h+n,t),this.imuln(i),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f);if(0!==a){var d=1;for(f=c(e,h,e.length,t),h=0;h<a;h++)d*=t;this.imuln(d),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f)}this._strip()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype._move=function(e){h(e,this)},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=d}catch(e){o.prototype.inspect=d}else o.prototype.inspect=d;function d(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var u=["","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],p=[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];function b(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,f=a/67108864|0;r.words[0]=s;for(var c=1;c<n;c++){for(var h=f>>>26,d=67108863&f,u=Math.min(c,t.length-1),l=Math.max(0,c-e.length+1);l<=u;l++){var p=c-l|0;h+=(a=(i=0|e.words[p])*(o=0|t.words[l])+d)/67108864|0,d=67108863&a}r.words[c]=0|d,f=0|h}return 0!==f?r.words[c]=0|f:r.length--,r._strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,a=0;a<this.length;a++){var s=this.words[a],f=(16777215&(s<<i|o)).toString(16);o=s>>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),r=0!==o||a!==this.length-1?u[6-f.length]+f+r:f+r}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=l[e],h=p[e];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var b=d.modrn(h).toString(e);r=(d=d.idivn(h)).isZero()?b+r:u[c-b.length]+b+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(a,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var a=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,i),a},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i<this.length;i++){var a=this.words[i]<<o|n;e[r++]=255&a,r<e.length&&(e[r++]=a>>8&255),r<e.length&&(e[r++]=a>>16&255),6===o?(r<e.length&&(e[r++]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r<e.length)for(e[r++]=n;r<e.length;)e[r++]=0},o.prototype._toArrayLikeBE=function(e,t){for(var r=e.length-1,n=0,i=0,o=0;i<this.length;i++){var a=this.words[i]<<o|n;e[r--]=255&a,r>=0&&(e[r--]=a>>8&255),r>=0&&(e[r--]=a>>16&255),6===o?(r>=0&&(e[r--]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},o.prototype.ior=function(e){return n(0==(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this._strip()},o.prototype.iand=function(e){return n(0==(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this._strip()},o.prototype.ixor=function(e){return n(0==(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},o.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o<n.length;o++)t=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<r.length;o++)t=(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a<n.length;a++)o=(t=(0|r.words[a])-(0|n.words[a])+o)>>26,this.words[a]=67108863&t;for(;0!==o&&a<r.length;a++)o=(t=(0|r.words[a])+o)>>26,this.words[a]=67108863&t;if(0===o&&a<r.length&&r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this.length=Math.max(this.length,a),r!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var y=function(e,t,r){var n,i,o,a=e.words,s=t.words,f=r.words,c=0,h=0|a[0],d=8191&h,u=h>>>13,l=0|a[1],p=8191&l,b=l>>>13,y=0|a[2],g=8191&y,m=y>>>13,v=0|a[3],_=8191&v,w=v>>>13,S=0|a[4],E=8191&S,A=S>>>13,M=0|a[5],k=8191&M,I=M>>>13,R=0|a[6],x=8191&R,B=R>>>13,O=0|a[7],C=8191&O,N=O>>>13,T=0|a[8],P=8191&T,j=T>>>13,L=0|a[9],D=8191&L,U=L>>>13,z=0|s[0],q=8191&z,F=z>>>13,K=0|s[1],H=8191&K,W=K>>>13,V=0|s[2],G=8191&V,J=V>>>13,$=0|s[3],X=8191&$,Y=$>>>13,Z=0|s[4],Q=8191&Z,ee=Z>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],fe=8191&se,ce=se>>>13,he=0|s[8],de=8191&he,ue=he>>>13,le=0|s[9],pe=8191&le,be=le>>>13;r.negative=e.negative^t.negative,r.length=19;var ye=(c+(n=Math.imul(d,q))|0)+((8191&(i=(i=Math.imul(d,F))+Math.imul(u,q)|0))<<13)|0;c=((o=Math.imul(u,F))+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(p,q),i=(i=Math.imul(p,F))+Math.imul(b,q)|0,o=Math.imul(b,F);var ge=(c+(n=n+Math.imul(d,H)|0)|0)+((8191&(i=(i=i+Math.imul(d,W)|0)+Math.imul(u,H)|0))<<13)|0;c=((o=o+Math.imul(u,W)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,q),i=(i=Math.imul(g,F))+Math.imul(m,q)|0,o=Math.imul(m,F),n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(b,H)|0,o=o+Math.imul(b,W)|0;var me=(c+(n=n+Math.imul(d,G)|0)|0)+((8191&(i=(i=i+Math.imul(d,J)|0)+Math.imul(u,G)|0))<<13)|0;c=((o=o+Math.imul(u,J)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(_,q),i=(i=Math.imul(_,F))+Math.imul(w,q)|0,o=Math.imul(w,F),n=n+Math.imul(g,H)|0,i=(i=i+Math.imul(g,W)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,W)|0,n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,J)|0;var ve=(c+(n=n+Math.imul(d,X)|0)|0)+((8191&(i=(i=i+Math.imul(d,Y)|0)+Math.imul(u,X)|0))<<13)|0;c=((o=o+Math.imul(u,Y)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(E,q),i=(i=Math.imul(E,F))+Math.imul(A,q)|0,o=Math.imul(A,F),n=n+Math.imul(_,H)|0,i=(i=i+Math.imul(_,W)|0)+Math.imul(w,H)|0,o=o+Math.imul(w,W)|0,n=n+Math.imul(g,G)|0,i=(i=i+Math.imul(g,J)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,J)|0,n=n+Math.imul(p,X)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Y)|0;var _e=(c+(n=n+Math.imul(d,Q)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(u,Q)|0))<<13)|0;c=((o=o+Math.imul(u,ee)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(k,q),i=(i=Math.imul(k,F))+Math.imul(I,q)|0,o=Math.imul(I,F),n=n+Math.imul(E,H)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(A,H)|0,o=o+Math.imul(A,W)|0,n=n+Math.imul(_,G)|0,i=(i=i+Math.imul(_,J)|0)+Math.imul(w,G)|0,o=o+Math.imul(w,J)|0,n=n+Math.imul(g,X)|0,i=(i=i+Math.imul(g,Y)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Y)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,ee)|0;var we=(c+(n=n+Math.imul(d,re)|0)|0)+((8191&(i=(i=i+Math.imul(d,ne)|0)+Math.imul(u,re)|0))<<13)|0;c=((o=o+Math.imul(u,ne)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(x,q),i=(i=Math.imul(x,F))+Math.imul(B,q)|0,o=Math.imul(B,F),n=n+Math.imul(k,H)|0,i=(i=i+Math.imul(k,W)|0)+Math.imul(I,H)|0,o=o+Math.imul(I,W)|0,n=n+Math.imul(E,G)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(A,G)|0,o=o+Math.imul(A,J)|0,n=n+Math.imul(_,X)|0,i=(i=i+Math.imul(_,Y)|0)+Math.imul(w,X)|0,o=o+Math.imul(w,Y)|0,n=n+Math.imul(g,Q)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ne)|0;var Se=(c+(n=n+Math.imul(d,oe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ae)|0)+Math.imul(u,oe)|0))<<13)|0;c=((o=o+Math.imul(u,ae)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(C,q),i=(i=Math.imul(C,F))+Math.imul(N,q)|0,o=Math.imul(N,F),n=n+Math.imul(x,H)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(B,H)|0,o=o+Math.imul(B,W)|0,n=n+Math.imul(k,G)|0,i=(i=i+Math.imul(k,J)|0)+Math.imul(I,G)|0,o=o+Math.imul(I,J)|0,n=n+Math.imul(E,X)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,Y)|0,n=n+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,ee)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,ee)|0,n=n+Math.imul(g,re)|0,i=(i=i+Math.imul(g,ne)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,ae)|0;var Ee=(c+(n=n+Math.imul(d,fe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ce)|0)+Math.imul(u,fe)|0))<<13)|0;c=((o=o+Math.imul(u,ce)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(P,q),i=(i=Math.imul(P,F))+Math.imul(j,q)|0,o=Math.imul(j,F),n=n+Math.imul(C,H)|0,i=(i=i+Math.imul(C,W)|0)+Math.imul(N,H)|0,o=o+Math.imul(N,W)|0,n=n+Math.imul(x,G)|0,i=(i=i+Math.imul(x,J)|0)+Math.imul(B,G)|0,o=o+Math.imul(B,J)|0,n=n+Math.imul(k,X)|0,i=(i=i+Math.imul(k,Y)|0)+Math.imul(I,X)|0,o=o+Math.imul(I,Y)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(_,re)|0,i=(i=i+Math.imul(_,ne)|0)+Math.imul(w,re)|0,o=o+Math.imul(w,ne)|0,n=n+Math.imul(g,oe)|0,i=(i=i+Math.imul(g,ae)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,ae)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(b,fe)|0,o=o+Math.imul(b,ce)|0;var Ae=(c+(n=n+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,ue)|0)+Math.imul(u,de)|0))<<13)|0;c=((o=o+Math.imul(u,ue)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(D,q),i=(i=Math.imul(D,F))+Math.imul(U,q)|0,o=Math.imul(U,F),n=n+Math.imul(P,H)|0,i=(i=i+Math.imul(P,W)|0)+Math.imul(j,H)|0,o=o+Math.imul(j,W)|0,n=n+Math.imul(C,G)|0,i=(i=i+Math.imul(C,J)|0)+Math.imul(N,G)|0,o=o+Math.imul(N,J)|0,n=n+Math.imul(x,X)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(B,X)|0,o=o+Math.imul(B,Y)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(_,oe)|0,i=(i=i+Math.imul(_,ae)|0)+Math.imul(w,oe)|0,o=o+Math.imul(w,ae)|0,n=n+Math.imul(g,fe)|0,i=(i=i+Math.imul(g,ce)|0)+Math.imul(m,fe)|0,o=o+Math.imul(m,ce)|0,n=n+Math.imul(p,de)|0,i=(i=i+Math.imul(p,ue)|0)+Math.imul(b,de)|0,o=o+Math.imul(b,ue)|0;var Me=(c+(n=n+Math.imul(d,pe)|0)|0)+((8191&(i=(i=i+Math.imul(d,be)|0)+Math.imul(u,pe)|0))<<13)|0;c=((o=o+Math.imul(u,be)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(D,H),i=(i=Math.imul(D,W))+Math.imul(U,H)|0,o=Math.imul(U,W),n=n+Math.imul(P,G)|0,i=(i=i+Math.imul(P,J)|0)+Math.imul(j,G)|0,o=o+Math.imul(j,J)|0,n=n+Math.imul(C,X)|0,i=(i=i+Math.imul(C,Y)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,Y)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,ee)|0,n=n+Math.imul(k,re)|0,i=(i=i+Math.imul(k,ne)|0)+Math.imul(I,re)|0,o=o+Math.imul(I,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,n=n+Math.imul(_,fe)|0,i=(i=i+Math.imul(_,ce)|0)+Math.imul(w,fe)|0,o=o+Math.imul(w,ce)|0,n=n+Math.imul(g,de)|0,i=(i=i+Math.imul(g,ue)|0)+Math.imul(m,de)|0,o=o+Math.imul(m,ue)|0;var ke=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,be)|0)+Math.imul(b,pe)|0))<<13)|0;c=((o=o+Math.imul(b,be)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(D,G),i=(i=Math.imul(D,J))+Math.imul(U,G)|0,o=Math.imul(U,J),n=n+Math.imul(P,X)|0,i=(i=i+Math.imul(P,Y)|0)+Math.imul(j,X)|0,o=o+Math.imul(j,Y)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,ee)|0,n=n+Math.imul(x,re)|0,i=(i=i+Math.imul(x,ne)|0)+Math.imul(B,re)|0,o=o+Math.imul(B,ne)|0,n=n+Math.imul(k,oe)|0,i=(i=i+Math.imul(k,ae)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,ae)|0,n=n+Math.imul(E,fe)|0,i=(i=i+Math.imul(E,ce)|0)+Math.imul(A,fe)|0,o=o+Math.imul(A,ce)|0,n=n+Math.imul(_,de)|0,i=(i=i+Math.imul(_,ue)|0)+Math.imul(w,de)|0,o=o+Math.imul(w,ue)|0;var Ie=(c+(n=n+Math.imul(g,pe)|0)|0)+((8191&(i=(i=i+Math.imul(g,be)|0)+Math.imul(m,pe)|0))<<13)|0;c=((o=o+Math.imul(m,be)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(D,X),i=(i=Math.imul(D,Y))+Math.imul(U,X)|0,o=Math.imul(U,Y),n=n+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(j,Q)|0,o=o+Math.imul(j,ee)|0,n=n+Math.imul(C,re)|0,i=(i=i+Math.imul(C,ne)|0)+Math.imul(N,re)|0,o=o+Math.imul(N,ne)|0,n=n+Math.imul(x,oe)|0,i=(i=i+Math.imul(x,ae)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,ae)|0,n=n+Math.imul(k,fe)|0,i=(i=i+Math.imul(k,ce)|0)+Math.imul(I,fe)|0,o=o+Math.imul(I,ce)|0,n=n+Math.imul(E,de)|0,i=(i=i+Math.imul(E,ue)|0)+Math.imul(A,de)|0,o=o+Math.imul(A,ue)|0;var Re=(c+(n=n+Math.imul(_,pe)|0)|0)+((8191&(i=(i=i+Math.imul(_,be)|0)+Math.imul(w,pe)|0))<<13)|0;c=((o=o+Math.imul(w,be)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(D,Q),i=(i=Math.imul(D,ee))+Math.imul(U,Q)|0,o=Math.imul(U,ee),n=n+Math.imul(P,re)|0,i=(i=i+Math.imul(P,ne)|0)+Math.imul(j,re)|0,o=o+Math.imul(j,ne)|0,n=n+Math.imul(C,oe)|0,i=(i=i+Math.imul(C,ae)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,ae)|0,n=n+Math.imul(x,fe)|0,i=(i=i+Math.imul(x,ce)|0)+Math.imul(B,fe)|0,o=o+Math.imul(B,ce)|0,n=n+Math.imul(k,de)|0,i=(i=i+Math.imul(k,ue)|0)+Math.imul(I,de)|0,o=o+Math.imul(I,ue)|0;var xe=(c+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,be)|0)+Math.imul(A,pe)|0))<<13)|0;c=((o=o+Math.imul(A,be)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(D,re),i=(i=Math.imul(D,ne))+Math.imul(U,re)|0,o=Math.imul(U,ne),n=n+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,ae)|0)+Math.imul(j,oe)|0,o=o+Math.imul(j,ae)|0,n=n+Math.imul(C,fe)|0,i=(i=i+Math.imul(C,ce)|0)+Math.imul(N,fe)|0,o=o+Math.imul(N,ce)|0,n=n+Math.imul(x,de)|0,i=(i=i+Math.imul(x,ue)|0)+Math.imul(B,de)|0,o=o+Math.imul(B,ue)|0;var Be=(c+(n=n+Math.imul(k,pe)|0)|0)+((8191&(i=(i=i+Math.imul(k,be)|0)+Math.imul(I,pe)|0))<<13)|0;c=((o=o+Math.imul(I,be)|0)+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(D,oe),i=(i=Math.imul(D,ae))+Math.imul(U,oe)|0,o=Math.imul(U,ae),n=n+Math.imul(P,fe)|0,i=(i=i+Math.imul(P,ce)|0)+Math.imul(j,fe)|0,o=o+Math.imul(j,ce)|0,n=n+Math.imul(C,de)|0,i=(i=i+Math.imul(C,ue)|0)+Math.imul(N,de)|0,o=o+Math.imul(N,ue)|0;var Oe=(c+(n=n+Math.imul(x,pe)|0)|0)+((8191&(i=(i=i+Math.imul(x,be)|0)+Math.imul(B,pe)|0))<<13)|0;c=((o=o+Math.imul(B,be)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(D,fe),i=(i=Math.imul(D,ce))+Math.imul(U,fe)|0,o=Math.imul(U,ce),n=n+Math.imul(P,de)|0,i=(i=i+Math.imul(P,ue)|0)+Math.imul(j,de)|0,o=o+Math.imul(j,ue)|0;var Ce=(c+(n=n+Math.imul(C,pe)|0)|0)+((8191&(i=(i=i+Math.imul(C,be)|0)+Math.imul(N,pe)|0))<<13)|0;c=((o=o+Math.imul(N,be)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(D,de),i=(i=Math.imul(D,ue))+Math.imul(U,de)|0,o=Math.imul(U,ue);var Ne=(c+(n=n+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,be)|0)+Math.imul(j,pe)|0))<<13)|0;c=((o=o+Math.imul(j,be)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863;var Te=(c+(n=Math.imul(D,pe))|0)+((8191&(i=(i=Math.imul(D,be))+Math.imul(U,pe)|0))<<13)|0;return c=((o=Math.imul(U,be))+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,f[0]=ye,f[1]=ge,f[2]=me,f[3]=ve,f[4]=_e,f[5]=we,f[6]=Se,f[7]=Ee,f[8]=Ae,f[9]=Me,f[10]=ke,f[11]=Ie,f[12]=Re,f[13]=xe,f[14]=Be,f[15]=Oe,f[16]=Ce,f[17]=Ne,f[18]=Te,0!==c&&(f[19]=c,r.length++),r};function g(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var a=i;i=0;for(var s=67108863&n,f=Math.min(o,t.length-1),c=Math.max(0,o-e.length+1);c<=f;c++){var h=o-c,d=(0|e.words[h])*(0|t.words[c]),u=67108863&d;s=67108863&(u=u+s|0),i+=(a=(a=a+(d/67108864|0)|0)+(u>>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function m(e,t,r){return g(e,t,r)}function v(e,t){this.x=e,this.y=t}Math.imul||(y=b),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?y(this,e,t):r<63?b(this,e,t):r<1024?g(this,e,t):m(this,e,t)},v.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},v.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},v.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a<o;a++)n[a]=t[e[a]],i[a]=r[e[a]]},v.prototype.transform=function(e,t,r,n,i,o){this.permute(o,e,t,r,n,i);for(var a=1;a<i;a<<=1)for(var s=a<<1,f=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),h=0;h<i;h+=s)for(var d=f,u=c,l=0;l<a;l++){var p=r[h+l],b=n[h+l],y=r[h+l+a],g=n[h+l+a],m=d*y-u*g;g=d*g+u*y,y=m,r[h+l]=p+y,n[h+l]=b+g,r[h+l+a]=p-y,n[h+l+a]=b-g,l!==s&&(m=f*d-c*u,u=f*u+c*d,d=m)}},v.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},v.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},v.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},v.prototype.convert13b=function(e,t,r,i){for(var o=0,a=0;a<t;a++)o+=0|e[a],r[2*a]=8191&o,o>>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a<i;++a)r[a]=0;n(0===o),n(0==(-8192&o))},v.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},v.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),o=this.stub(n),a=new Array(n),s=new Array(n),f=new Array(n),c=new Array(n),h=new Array(n),d=new Array(n),u=r.words;u.length=n,this.convert13b(e.words,e.length,a,n),this.convert13b(t.words,t.length,c,n),this.transform(a,o,s,f,n,i),this.transform(c,o,h,d,n,i);for(var l=0;l<n;l++){var p=s[l]*h[l]-f[l]*d[l];f[l]=s[l]*d[l]+f[l]*h[l],s[l]=p}return this.conjugate(s,f,n),this.transform(s,f,u,o,n,i),this.conjugate(u,o,n),this.normalize13b(u,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r._strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),m(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n("number"==typeof e),n(e<67108864);for(var r=0,i=0;i<this.length;i++){var o=(0|this.words[i])*e,a=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=a>>>26,this.words[i]=67108863&a}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=e.words[n]>>>i&1}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t<this.length;t++){var s=this.words[t]&o,f=(0|this.words[t])-s<<r;this.words[t]=f|a,a=s>>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this._strip()},o.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<<o,f=r;if(i-=a,i=Math.max(0,i),f){for(var c=0;c<a;c++)f.words[c]=this.words[c];f.length=a}if(0===a);else if(this.length>a)for(this.length-=a,c=0;c<this.length;c++)this.words[c]=this.words[c+a];else this.words[0]=0,this.length=1;var h=0;for(c=this.length-1;c>=0&&(0!==h||c>=i);c--){var d=0|this.words[c];this.words[c]=h<<26-o|d>>>o,h=d&s}return f&&0!==h&&(f.words[f.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},o.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this._strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,r){var i,o,a=e.length+r;this._expand(a);var s=0;for(i=0;i<e.length;i++){o=(0|this.words[i+r])+s;var f=(0|e.words[i])*t;s=((o-=67108863&f)>>26)-(f/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)s=(o=(0|this.words[i+r])+s)>>26,this.words[i+r]=67108863&o;if(0===s)return this._strip();for(n(-1===s),s=0,i=0;i<this.length;i++)s=(o=-(0|this.words[i])+s)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,a=0|i.words[i.length-1];0!=(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,f=n.length-i.length;if("mod"!==t){(s=new o(null)).length=f+1,s.words=new Array(s.length);for(var c=0;c<s.length;c++)s.words[c]=0}var h=n.clone()._ishlnsubmul(i,1,f);0===h.negative&&(n=h,s&&(s.words[f]=1));for(var d=f-1;d>=0;d--){var u=67108864*(0|n.words[i.length+d])+(0|n.words[i.length+d-1]);for(u=Math.min(u/a|0,67108863),n._ishlnsubmul(i,u,d);0!==n.negative;)u--,n.negative=0,n._ishlnsubmul(i,1,d),n.isZero()||(n.negative^=1);s&&(s.words[d]=u)}return s&&s._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%e;return t?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/e|0,r=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),f=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var h=r.clone(),d=t.clone();!t.isZero();){for(var u=0,l=1;0==(t.words[0]&l)&&u<26;++u,l<<=1);if(u>0)for(t.iushrn(u);u-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(h),a.isub(d)),i.iushrn(1),a.iushrn(1);for(var p=0,b=1;0==(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||f.isOdd())&&(s.iadd(h),f.isub(d)),s.iushrn(1),f.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(f)):(r.isub(t),s.isub(i),f.isub(a))}return{a:s,b:f,gcd:r.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),f=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,h=1;0==(t.words[0]&h)&&c<26;++c,h<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(f),a.iushrn(1);for(var d=0,u=1;0==(r.words[0]&u)&&d<26;++d,u<<=1);if(d>0)for(r.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(f),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,a=r;0!==o&&a<this.length;a++){var s=0|this.words[a];o=(s+=o)>>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new k(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var _={k256:null,p224:null,p192:null,p25519:null};function w(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function S(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function A(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function I(e){k.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(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)}w.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},w.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},w.prototype.split=function(e,t){e.iushrn(this.n,0,t)},w.prototype.imulK=function(e){return e.imul(this.k)},i(S,w),S.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i<n;i++)t.words[i]=e.words[i];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&r,i=10;i<e.length;i++){var a=0|e.words[i];e.words[i-10]=(a&r)<<4|o>>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},S.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(E,w),i(A,w),i(M,w),M.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(_[e])return _[e];var t;if("k256"===e)t=new S;else if("p224"===e)t=new E;else if("p192"===e)t=new A;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new M}return _[e]=t,t},k.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},k.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},k.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(h(e,e.umod(this.m)._forceRed(this)),e)},k.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},k.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},k.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},k.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},k.prototype.isqr=function(e){return this.imul(e,e.clone())},k.prototype.sqr=function(e){return this.mul(e,e)},k.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),f=s.redNeg(),c=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new o(2*h*h).toRed(this);0!==this.pow(h,c).cmp(f);)h.redIAdd(f);for(var d=this.pow(h,i),u=this.pow(e,i.addn(1).iushrn(1)),l=this.pow(e,i),p=a;0!==l.cmp(s);){for(var b=l,y=0;0!==b.cmp(s);y++)b=b.redSqr();n(y<p);var g=this.pow(d,new o(1).iushln(p-y-1));u=u.redMul(g),d=g.redSqr(),l=l.redMul(d),p=y}return u},k.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},k.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],a=0,s=0,f=t.bitLength()%26;for(0===f&&(f=26),n=t.length-1;n>=0;n--){for(var c=t.words[n],h=f-1;h>=0;h--){var d=c>>h&1;i!==r[0]&&(i=this.sqr(i)),0!==d||0!==a?(a<<=1,a|=d,(4==++s||0===n&&0===h)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}f=26}return i},k.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},k.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new I(e)},i(I,k),I.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},I.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},I.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},I.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},I.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},2745:(e,t,r)=>{var n;function i(e){this.rand=e}if(e.exports=function(e){return n||(n=new i(null)),n.generate(e)},e.exports.Rand=i,i.prototype.generate=function(e){return this._rand(e)},i.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r<t.length;r++)t[r]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(i.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var o=r(8087);if("function"!=typeof o.randomBytes)throw new Error("Not supported");i.prototype._rand=function(e){return o.randomBytes(e)}}catch(e){}},2970:(e,t,r)=>{var n=r(7834).Buffer;function i(e){n.isBuffer(e)||(e=n.from(e));for(var t=e.length/4|0,r=new Array(t),i=0;i<t;i++)r[i]=e.readUInt32BE(4*i);return r}function o(e){for(;0<e.length;e++)e[0]=0}function a(e,t,r,n,i){for(var o,a,s,f,c=r[0],h=r[1],d=r[2],u=r[3],l=e[0]^t[0],p=e[1]^t[1],b=e[2]^t[2],y=e[3]^t[3],g=4,m=1;m<i;m++)o=c[l>>>24]^h[p>>>16&255]^d[b>>>8&255]^u[255&y]^t[g++],a=c[p>>>24]^h[b>>>16&255]^d[y>>>8&255]^u[255&l]^t[g++],s=c[b>>>24]^h[y>>>16&255]^d[l>>>8&255]^u[255&p]^t[g++],f=c[y>>>24]^h[l>>>16&255]^d[p>>>8&255]^u[255&b]^t[g++],l=o,p=a,b=s,y=f;return o=(n[l>>>24]<<24|n[p>>>16&255]<<16|n[b>>>8&255]<<8|n[255&y])^t[g++],a=(n[p>>>24]<<24|n[b>>>16&255]<<16|n[y>>>8&255]<<8|n[255&l])^t[g++],s=(n[b>>>24]<<24|n[y>>>16&255]<<16|n[l>>>8&255]<<8|n[255&p])^t[g++],f=(n[y>>>24]<<24|n[l>>>16&255]<<16|n[p>>>8&255]<<8|n[255&b])^t[g++],[o>>>=0,a>>>=0,s>>>=0,f>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],f=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,f=0;f<256;++f){var c=s^s<<1^s<<2^s<<3^s<<4;c=c>>>8^255&c^99,r[a]=c,n[c]=a;var h=e[a],d=e[h],u=e[d],l=257*e[c]^16843008*c;i[0][a]=l<<24|l>>>8,i[1][a]=l<<16|l>>>16,i[2][a]=l<<8|l>>>24,i[3][a]=l,l=16843009*u^65537*d^257*h^16843008*a,o[0][c]=l<<24|l>>>8,o[1][c]=l<<16|l>>>16,o[2][c]=l<<8|l>>>24,o[3][c]=l,0===a?a=s=1:(a=h^e[e[e[u^h]]],s^=e[e[s]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function c(e){this._key=i(e),this._reset()}c.blockSize=16,c.keySize=32,c.prototype.blockSize=c.blockSize,c.prototype.keySize=c.keySize,c.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,n=4*(r+1),i=[],o=0;o<t;o++)i[o]=e[o];for(o=t;o<n;o++){var a=i[o-1];o%t==0?(a=a<<8|a>>>24,a=f.SBOX[a>>>24]<<24|f.SBOX[a>>>16&255]<<16|f.SBOX[a>>>8&255]<<8|f.SBOX[255&a],a^=s[o/t|0]<<24):t>6&&o%t==4&&(a=f.SBOX[a>>>24]<<24|f.SBOX[a>>>16&255]<<16|f.SBOX[a>>>8&255]<<8|f.SBOX[255&a]),i[o]=i[o-t]^a}for(var c=[],h=0;h<n;h++){var d=n-h,u=i[d-(h%4?0:4)];c[h]=h<4||d<=4?u:f.INV_SUB_MIX[0][f.SBOX[u>>>24]]^f.INV_SUB_MIX[1][f.SBOX[u>>>16&255]]^f.INV_SUB_MIX[2][f.SBOX[u>>>8&255]]^f.INV_SUB_MIX[3][f.SBOX[255&u]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=c},c.prototype.encryptBlockRaw=function(e){return a(e=i(e),this._keySchedule,f.SUB_MIX,f.SBOX,this._nRounds)},c.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=n.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r},c.prototype.decryptBlock=function(e){var t=(e=i(e))[1];e[1]=e[3],e[3]=t;var r=a(e,this._invKeySchedule,f.INV_SUB_MIX,f.INV_SBOX,this._nRounds),o=n.allocUnsafe(16);return o.writeUInt32BE(r[0],0),o.writeUInt32BE(r[3],4),o.writeUInt32BE(r[2],8),o.writeUInt32BE(r[1],12),o},c.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},e.exports.AES=c},3313:(e,t,r)=>{var n=r(2970),i=r(7834).Buffer,o=r(3973),a=r(1285),s=r(2895),f=r(1313),c=r(4182);function h(e,t,r,a){o.call(this);var f=i.alloc(4,0);this._cipher=new n.AES(t);var h=this._cipher.encryptBlock(f);this._ghash=new s(h),r=function(e,t,r){if(12===t.length)return e._finID=i.concat([t,i.from([0,0,0,1])]),i.concat([t,i.from([0,0,0,2])]);var n=new s(r),o=t.length,a=o%16;n.update(t),a&&(a=16-a,n.update(i.alloc(a,0))),n.update(i.alloc(8,0));var f=8*o,h=i.alloc(8);h.writeUIntBE(f,0,8),n.update(h),e._finID=n.state;var d=i.from(e._finID);return c(d),d}(this,r,h),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=a,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}a(h,o),h.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=i.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},h.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=f(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var r=0;e.length!==t.length&&r++;for(var n=Math.min(e.length,t.length),i=0;i<n;++i)r+=e[i]^t[i];return r}(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=e,this._cipher.scrub()},h.prototype.getAuthTag=function(){if(this._decrypt||!i.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},h.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e},h.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length},e.exports=h},10:(e,t,r)=>{var n=r(9309),i=r(7612),o=r(9234);t.createCipher=t.Cipher=n.createCipher,t.createCipheriv=t.Cipheriv=n.createCipheriv,t.createDecipher=t.Decipher=i.createDecipher,t.createDecipheriv=t.Decipheriv=i.createDecipheriv,t.listCiphers=t.getCiphers=function(){return Object.keys(o)}},7612:(e,t,r)=>{var n=r(3313),i=r(7834).Buffer,o=r(8702),a=r(7041),s=r(3973),f=r(2970),c=r(9341);function h(e,t,r){s.call(this),this._cache=new d,this._last=void 0,this._cipher=new f.AES(t),this._prev=i.from(r),this._mode=e,this._autopadding=!0}function d(){this.cache=i.allocUnsafe(0)}function u(e,t,r){var s=o[e.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=i.from(r)),"GCM"!==s.mode&&r.length!==s.iv)throw new TypeError("invalid iv length "+r.length);if("string"==typeof t&&(t=i.from(t)),t.length!==s.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===s.type?new a(s.module,t,r,!0):"auth"===s.type?new n(s.module,t,r,!0):new h(s.module,t,r)}r(1285)(h,s),h.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,t),n.push(r);return i.concat(n)},h.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(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(16!==t)return e.slice(0,16-t)}(this._mode.decrypt(this,e));if(e)throw new Error("data not multiple of block length")},h.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},d.prototype.add=function(e){this.cache=i.concat([this.cache,e])},d.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},d.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=function(e,t){var r=o[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=c(t,!1,r.key,r.iv);return u(e,n.key,n.iv)},t.createDecipheriv=u},9309:(e,t,r)=>{var n=r(8702),i=r(3313),o=r(7834).Buffer,a=r(7041),s=r(3973),f=r(2970),c=r(9341);function h(e,t,r){s.call(this),this._cache=new u,this._cipher=new f.AES(t),this._prev=o.from(r),this._mode=e,this._autopadding=!0}r(1285)(h,s),h.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get();)r=this._mode.encrypt(this,t),n.push(r);return o.concat(n)};var d=o.alloc(16,16);function u(){this.cache=o.allocUnsafe(0)}function l(e,t,r){var s=n[e.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=o.from(t)),t.length!==s.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof r&&(r=o.from(r)),"GCM"!==s.mode&&r.length!==s.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===s.type?new a(s.module,t,r):"auth"===s.type?new i(s.module,t,r):new h(s.module,t,r)}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(d))throw this._cipher.scrub(),new Error("data not multiple of block length")},h.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},u.prototype.add=function(e){this.cache=o.concat([this.cache,e])},u.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},u.prototype.flush=function(){for(var e=16-this.cache.length,t=o.allocUnsafe(e),r=-1;++r<e;)t.writeUInt8(e,r);return o.concat([this.cache,t])},t.createCipheriv=l,t.createCipher=function(e,t){var r=n[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=c(t,!1,r.key,r.iv);return l(e,i.key,i.iv)}},2895:(e,t,r)=>{var n=r(7834).Buffer,i=n.alloc(16,0);function o(e){var t=n.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 a(e){this.h=e,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}a.prototype.ghash=function(e){for(var t=-1;++t<e.length;)this.state[t]^=e[t];this._multiply()},a.prototype._multiply=function(){for(var e,t,r,n=[(e=this.h).readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)],i=[0,0,0,0],a=-1;++a<128;){for(0!=(this.state[~~(a/8)]&1<<7-a%8)&&(i[0]^=n[0],i[1]^=n[1],i[2]^=n[2],i[3]^=n[3]),r=0!=(1&n[3]),t=3;t>0;t--)n[t]=n[t]>>>1|(1&n[t-1])<<31;n[0]=n[0]>>>1,r&&(n[0]=n[0]^225<<24)}this.state=o(i)},a.prototype.update=function(e){var t;for(this.cache=n.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},a.prototype.final=function(e,t){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(o([0,e,0,t])),this.state},e.exports=a},4182:e=>{e.exports=function(e){for(var t,r=e.length;r--;){if(255!==(t=e.readUInt8(r))){t++,e.writeUInt8(t,r);break}e.writeUInt8(0,r)}}},8796:(e,t,r)=>{var n=r(1313);t.encrypt=function(e,t){var r=n(t,e._prev);return e._prev=e._cipher.encryptBlock(r),e._prev},t.decrypt=function(e,t){var r=e._prev;e._prev=t;var i=e._cipher.decryptBlock(t);return n(i,r)}},6528:(e,t,r)=>{var n=r(7834).Buffer,i=r(1313);function o(e,t,r){var o=t.length,a=i(t,e._cache);return e._cache=e._cache.slice(o),e._prev=n.concat([e._prev,r?t:a]),a}t.encrypt=function(e,t,r){for(var i,a=n.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=n.allocUnsafe(0)),!(e._cache.length<=t.length)){a=n.concat([a,o(e,t,r)]);break}i=e._cache.length,a=n.concat([a,o(e,t.slice(0,i),r)]),t=t.slice(i)}return a}},918:(e,t,r)=>{var n=r(7834).Buffer;function i(e,t,r){for(var n,i,a=-1,s=0;++a<8;)n=t&1<<7-a?128:0,s+=(128&(i=e._cipher.encryptBlock(e._prev)[0]^n))>>a%8,e._prev=o(e._prev,r?n:i);return s}function o(e,t){var r=e.length,i=-1,o=n.allocUnsafe(e.length);for(e=n.concat([e,n.from([t])]);++i<r;)o[i]=e[i]<<1|e[i+1]>>7;return o}t.encrypt=function(e,t,r){for(var o=t.length,a=n.allocUnsafe(o),s=-1;++s<o;)a[s]=i(e,t[s],r);return a}},7263:(e,t,r)=>{var n=r(7834).Buffer;function i(e,t,r){var i=e._cipher.encryptBlock(e._prev)[0]^t;return e._prev=n.concat([e._prev.slice(1),n.from([r?t:i])]),i}t.encrypt=function(e,t,r){for(var o=t.length,a=n.allocUnsafe(o),s=-1;++s<o;)a[s]=i(e,t[s],r);return a}},8219:(e,t,r)=>{var n=r(1313),i=r(7834).Buffer,o=r(4182);function a(e){var t=e._cipher.encryptBlockRaw(e._prev);return o(e._prev),t}t.encrypt=function(e,t){var r=Math.ceil(t.length/16),o=e._cache.length;e._cache=i.concat([e._cache,i.allocUnsafe(16*r)]);for(var s=0;s<r;s++){var f=a(e),c=o+16*s;e._cache.writeUInt32BE(f[0],c+0),e._cache.writeUInt32BE(f[1],c+4),e._cache.writeUInt32BE(f[2],c+8),e._cache.writeUInt32BE(f[3],c+12)}var h=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),n(t,h)}},7028:(e,t)=>{t.encrypt=function(e,t){return e._cipher.encryptBlock(t)},t.decrypt=function(e,t){return e._cipher.decryptBlock(t)}},8702:(e,t,r)=>{var n={ECB:r(7028),CBC:r(8796),CFB:r(6528),CFB8:r(7263),CFB1:r(918),OFB:r(4256),CTR:r(8219),GCM:r(8219)},i=r(9234);for(var o in i)i[o].module=n[i[o].mode];e.exports=i},4256:(e,t,r)=>{var n=r(8834).Buffer,i=r(1313);function o(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}t.encrypt=function(e,t){for(;e._cache.length<t.length;)e._cache=n.concat([e._cache,o(e)]);var r=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),i(t,r)}},7041:(e,t,r)=>{var n=r(2970),i=r(7834).Buffer,o=r(3973);function a(e,t,r,a){o.call(this),this._cipher=new n.AES(t),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=a,this._mode=e}r(1285)(a,o),a.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},a.prototype._final=function(){this._cipher.scrub()},e.exports=a},3667:(e,t,r)=>{var n=r(7214),i=r(10),o=r(8702),a=r(2820),s=r(9341);function f(e,t,r){if(e=e.toLowerCase(),o[e])return i.createCipheriv(e,t,r);if(a[e])return new n({key:t,iv:r,mode:e});throw new TypeError("invalid suite type")}function c(e,t,r){if(e=e.toLowerCase(),o[e])return i.createDecipheriv(e,t,r);if(a[e])return new n({key:t,iv:r,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}t.createCipher=t.Cipher=function(e,t){var r,n;if(e=e.toLowerCase(),o[e])r=o[e].key,n=o[e].iv;else{if(!a[e])throw new TypeError("invalid suite type");r=8*a[e].key,n=a[e].iv}var i=s(t,!1,r,n);return f(e,i.key,i.iv)},t.createCipheriv=t.Cipheriv=f,t.createDecipher=t.Decipher=function(e,t){var r,n;if(e=e.toLowerCase(),o[e])r=o[e].key,n=o[e].iv;else{if(!a[e])throw new TypeError("invalid suite type");r=8*a[e].key,n=a[e].iv}var i=s(t,!1,r,n);return c(e,i.key,i.iv)},t.createDecipheriv=t.Decipheriv=c,t.listCiphers=t.getCiphers=function(){return Object.keys(a).concat(i.getCiphers())}},7214:(e,t,r)=>{var n=r(3973),i=r(4387),o=r(1285),a=r(7834).Buffer,s={"des-ede3-cbc":i.CBC.instantiate(i.EDE),"des-ede3":i.EDE,"des-ede-cbc":i.CBC.instantiate(i.EDE),"des-ede":i.EDE,"des-cbc":i.CBC.instantiate(i.DES),"des-ecb":i.DES};function f(e){n.call(this);var t,r=e.mode.toLowerCase(),i=s[r];t=e.decrypt?"decrypt":"encrypt";var o=e.key;a.isBuffer(o)||(o=a.from(o)),"des-ede"!==r&&"des-ede-cbc"!==r||(o=a.concat([o,o.slice(0,8)]));var f=e.iv;a.isBuffer(f)||(f=a.from(f)),this._des=i.create({key:o,iv:f,type:t})}s.des=s["des-cbc"],s.des3=s["des-ede3-cbc"],e.exports=f,o(f,n),f.prototype._update=function(e){return a.from(this._des.update(e))},f.prototype._final=function(){return a.from(this._des.final())}},2820:(e,t)=>{t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}},1857:(e,t,r)=>{var n=r(8834).Buffer,i=r(2197),o=r(5003);function a(e){var t,r=e.modulus.byteLength();do{t=new i(o(r))}while(t.cmp(e.modulus)>=0||!t.umod(e.prime1)||!t.umod(e.prime2));return t}function s(e,t){var r=function(e){var t=a(e);return{blinder:t.toRed(i.mont(e.modulus)).redPow(new i(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(t),o=t.modulus.byteLength(),s=new i(e).mul(r.blinder).umod(t.modulus),f=s.toRed(i.mont(t.prime1)),c=s.toRed(i.mont(t.prime2)),h=t.coefficient,d=t.prime1,u=t.prime2,l=f.redPow(t.exponent1).fromRed(),p=c.redPow(t.exponent2).fromRed(),b=l.isub(p).imul(h).umod(d).imul(u);return p.iadd(b).imul(r.unblinder).umod(t.modulus).toArrayLike(n,"be",o)}s.getr=a,e.exports=s},4778:(e,t,r)=>{e.exports=r(26)},5263:(e,t,r)=>{var n=r(7834).Buffer,i=r(6162),o=r(7525),a=r(1285),s=r(262),f=r(5643),c=r(26);function h(e){o.Writable.call(this);var t=c[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=i(t.hash),this._tag=t.id,this._signType=t.sign}function d(e){o.Writable.call(this);var t=c[e];if(!t)throw new Error("Unknown message digest");this._hash=i(t.hash),this._tag=t.id,this._signType=t.sign}function u(e){return new h(e)}function l(e){return new d(e)}Object.keys(c).forEach((function(e){c[e].id=n.from(c[e].id,"hex"),c[e.toLowerCase()]=c[e]})),a(h,o.Writable),h.prototype._write=function(e,t,r){this._hash.update(e),r()},h.prototype.update=function(e,t){return"string"==typeof e&&(e=n.from(e,t)),this._hash.update(e),this},h.prototype.sign=function(e,t){this.end();var r=this._hash.digest(),n=s(r,e,this._hashType,this._signType,this._tag);return t?n.toString(t):n},a(d,o.Writable),d.prototype._write=function(e,t,r){this._hash.update(e),r()},d.prototype.update=function(e,t){return"string"==typeof e&&(e=n.from(e,t)),this._hash.update(e),this},d.prototype.verify=function(e,t,r){"string"==typeof t&&(t=n.from(t,r)),this.end();var i=this._hash.digest();return f(t,i,e,this._signType,this._tag)},e.exports={Sign:u,Verify:l,createSign:u,createVerify:l}},262:(e,t,r)=>{var n=r(7834).Buffer,i=r(11),o=r(1857),a=r(7554).ec,s=r(2197),f=r(8016),c=r(9167);function h(e,t,r,o){if((e=n.from(e.toArray())).length<t.byteLength()){var a=n.alloc(t.byteLength()-e.length);e=n.concat([a,e])}var s=r.length,f=function(e,t){e=(e=d(e,t)).mod(t);var r=n.from(e.toArray());if(r.length<t.byteLength()){var i=n.alloc(t.byteLength()-r.length);r=n.concat([i,r])}return r}(r,t),c=n.alloc(s);c.fill(1);var h=n.alloc(s);return h=i(o,h).update(c).update(n.from([0])).update(e).update(f).digest(),c=i(o,h).update(c).digest(),{k:h=i(o,h).update(c).update(n.from([1])).update(e).update(f).digest(),v:c=i(o,h).update(c).digest()}}function d(e,t){var r=new s(e),n=(e.length<<3)-t.bitLength();return n>0&&r.ishrn(n),r}function u(e,t,r){var o,a;do{for(o=n.alloc(0);8*o.length<e.bitLength();)t.v=i(r,t.k).update(t.v).digest(),o=n.concat([o,t.v]);a=d(o,e),t.k=i(r,t.k).update(t.v).update(n.from([0])).digest(),t.v=i(r,t.k).update(t.v).digest()}while(-1!==a.cmp(e));return a}function l(e,t,r,n){return e.toRed(s.mont(r)).redPow(t).fromRed().mod(n)}e.exports=function(e,t,r,i,p){var b=f(t);if(b.curve){if("ecdsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");return function(e,t){var r=c[t.curve.join(".")];if(!r)throw new Error("unknown curve "+t.curve.join("."));var i=new a(r).keyFromPrivate(t.privateKey).sign(e);return n.from(i.toDER())}(e,b)}if("dsa"===b.type){if("dsa"!==i)throw new Error("wrong private key type");return function(e,t,r){for(var i,o=t.params.priv_key,a=t.params.p,f=t.params.q,c=t.params.g,p=new s(0),b=d(e,f).mod(f),y=!1,g=h(o,f,e,r);!1===y;)p=l(c,i=u(f,g,r),a,f),0===(y=i.invm(f).imul(b.add(o.mul(p))).mod(f)).cmpn(0)&&(y=!1,p=new s(0));return function(e,t){e=e.toArray(),t=t.toArray(),128&e[0]&&(e=[0].concat(e)),128&t[0]&&(t=[0].concat(t));var r=[48,e.length+t.length+4,2,e.length];return r=r.concat(e,[2,t.length],t),n.from(r)}(p,y)}(e,b,r)}if("rsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");e=n.concat([p,e]);for(var y=b.modulus.byteLength(),g=[0,1];e.length+g.length+1<y;)g.push(255);g.push(0);for(var m=-1;++m<e.length;)g.push(e[m]);return o(g,b)},e.exports.getKey=h,e.exports.makeKey=u},5643:(e,t,r)=>{var n=r(7834).Buffer,i=r(2197),o=r(7554).ec,a=r(8016),s=r(9167);function f(e,t){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(t)>=t)throw new Error("invalid sig")}e.exports=function(e,t,r,c,h){var d=a(r);if("ec"===d.type){if("ecdsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");return function(e,t,r){var n=s[r.data.algorithm.curve.join(".")];if(!n)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var i=new o(n),a=r.data.subjectPrivateKey.data;return i.verify(t,e,a)}(e,t,d)}if("dsa"===d.type){if("dsa"!==c)throw new Error("wrong public key type");return function(e,t,r){var n=r.data.p,o=r.data.q,s=r.data.g,c=r.data.pub_key,h=a.signature.decode(e,"der"),d=h.s,u=h.r;f(d,o),f(u,o);var l=i.mont(n),p=d.invm(o);return 0===s.toRed(l).redPow(new i(t).mul(p).mod(o)).fromRed().mul(c.toRed(l).redPow(u.mul(p).mod(o)).fromRed()).mod(n).mod(o).cmp(u)}(e,t,d)}if("rsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");t=n.concat([h,t]);for(var u=d.modulus.byteLength(),l=[1],p=0;t.length+l.length+2<u;)l.push(255),p++;l.push(0);for(var b=-1;++b<t.length;)l.push(t[b]);l=n.from(l);var y=i.mont(d.modulus);e=(e=new i(e).toRed(y)).redPow(new i(d.publicExponent)),e=n.from(e.fromRed().toArray());var g=p<8?1:0;for(u=Math.min(e.length,l.length),e.length!==l.length&&(g=1),b=-1;++b<u;)g|=e[b]^l[b];return 0===g}},1313:(e,t,r)=>{var n=r(8834).Buffer;e.exports=function(e,t){for(var r=Math.min(e.length,t.length),i=new n(r),o=0;o<r;++o)i[o]=e[o]^t[o];return i}},8834:(e,t,r)=>{"use strict";const n=r(5766),i=r(2333),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=f,t.SlowBuffer=function(e){return+e!=e&&(e=0),f.alloc(+e)},t.INSPECT_MAX_BYTES=50;const a=2147483647;function s(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,f.prototype),t}function f(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return d(e)}return c(e,t,r)}function c(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!f.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|b(e,t);let n=s(r);const i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if($(e,Uint8Array)){const t=new Uint8Array(e);return l(t.buffer,t.byteOffset,t.byteLength)}return u(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if($(e,ArrayBuffer)||e&&$(e.buffer,ArrayBuffer))return l(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&($(e,SharedArrayBuffer)||e&&$(e.buffer,SharedArrayBuffer)))return l(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return f.from(n,t,r);const i=function(e){if(f.isBuffer(e)){const t=0|p(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||X(e.length)?s(0):u(e):"Buffer"===e.type&&Array.isArray(e.data)?u(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return f.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function h(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function d(e){return h(e),s(e<0?0:0|p(e))}function u(e){const t=e.length<0?0:0|p(e.length),r=s(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function l(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,f.prototype),n}function p(e){if(e>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function b(e,t){if(f.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||$(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return G(e).length;default:if(i)return n?-1:V(e).length;t=(""+t).toLowerCase(),i=!0}}function y(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return B(this,t,r);case"utf8":case"utf-8":return k(this,t,r);case"ascii":return R(this,t,r);case"latin1":case"binary":return x(this,t,r);case"base64":return M(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function m(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),X(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=f.from(t,n)),f.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,n,i){let o,a=1,s=e.length,f=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,f/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){let n=-1;for(o=r;o<s;o++)if(c(e,o)===c(t,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===f)return n*a}else-1!==n&&(o-=o-n),n=-1}else for(r+f>s&&(r=s-f),o=r;o>=0;o--){let r=!0;for(let n=0;n<f;n++)if(c(e,o+n)!==c(t,n)){r=!1;break}if(r)return o}return-1}function _(e,t,r,n){r=Number(r)||0;const i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;const o=t.length;let a;for(n>o/2&&(n=o/2),a=0;a<n;++a){const n=parseInt(t.substr(2*a,2),16);if(X(n))return a;e[r+a]=n}return a}function w(e,t,r,n){return J(V(t,e.length-r),e,r,n)}function S(e,t,r,n){return J(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function E(e,t,r,n){return J(G(t),e,r,n)}function A(e,t,r,n){return J(function(e,t){let r,n,i;const o=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function M(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function k(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i<r;){const t=e[i];let o=null,a=t>239?4:t>223?3:t>191?2:1;if(i+a<=r){let r,n,s,f;switch(a){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128==(192&r)&&(f=(31&t)<<6|63&r,f>127&&(o=f));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(f=(15&t)<<12|(63&r)<<6|63&n,f>2047&&(f<55296||f>57343)&&(o=f));break;case 4:r=e[i+1],n=e[i+2],s=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(f=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s,f>65535&&f<1114112&&(o=f))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=a}return function(e){const t=e.length;if(t<=I)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=I));return r}(n)}t.kMaxLength=a,f.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),f.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(f.prototype,"parent",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.buffer}}),Object.defineProperty(f.prototype,"offset",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.byteOffset}}),f.poolSize=8192,f.from=function(e,t,r){return c(e,t,r)},Object.setPrototypeOf(f.prototype,Uint8Array.prototype),Object.setPrototypeOf(f,Uint8Array),f.alloc=function(e,t,r){return function(e,t,r){return h(e),e<=0?s(e):void 0!==t?"string"==typeof r?s(e).fill(t,r):s(e).fill(t):s(e)}(e,t,r)},f.allocUnsafe=function(e){return d(e)},f.allocUnsafeSlow=function(e){return d(e)},f.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==f.prototype},f.compare=function(e,t){if($(e,Uint8Array)&&(e=f.from(e,e.offset,e.byteLength)),$(t,Uint8Array)&&(t=f.from(t,t.offset,t.byteLength)),!f.isBuffer(e)||!f.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},f.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},f.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return f.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=f.allocUnsafe(t);let i=0;for(r=0;r<e.length;++r){let t=e[r];if($(t,Uint8Array))i+t.length>n.length?(f.isBuffer(t)||(t=f.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!f.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},f.byteLength=b,f.prototype._isBuffer=!0,f.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)g(this,t,t+1);return this},f.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},f.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},f.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?k(this,0,e):y.apply(this,arguments)},f.prototype.toLocaleString=f.prototype.toString,f.prototype.equals=function(e){if(!f.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===f.compare(this,e)},f.prototype.inspect=function(){let e="";const r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},o&&(f.prototype[o]=f.prototype.inspect),f.prototype.compare=function(e,t,r,n,i){if($(e,Uint8Array)&&(e=f.from(e,e.offset,e.byteLength)),!f.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0);const s=Math.min(o,a),c=this.slice(n,i),h=e.slice(t,r);for(let e=0;e<s;++e)if(c[e]!==h[e]){o=c[e],a=h[e];break}return o<a?-1:a<o?1:0},f.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},f.prototype.indexOf=function(e,t,r){return m(this,e,t,r,!0)},f.prototype.lastIndexOf=function(e,t,r){return m(this,e,t,r,!1)},f.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return _(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":case"latin1":case"binary":return S(this,e,t,r);case"base64":return E(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const I=4096;function R(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function x(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function B(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=t;n<r;++n)i+=Y[e[n]];return i}function O(e,t,r){const n=e.slice(t,r);let i="";for(let e=0;e<n.length-1;e+=2)i+=String.fromCharCode(n[e]+256*n[e+1]);return i}function C(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,r,n,i,o){if(!f.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function T(e,t,r,n,i){F(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function P(e,t,r,n,i){F(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function j(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(e,t,r,n,o){return t=+t,r>>>=0,o||j(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function D(e,t,r,n,o){return t=+t,r>>>=0,o||j(e,0,r,8),i.write(e,t,r,n,52,8),r+8}f.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,f.prototype),n},f.prototype.readUintLE=f.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return n},f.prototype.readUintBE=f.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},f.prototype.readUint8=f.prototype.readUInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),this[e]},f.prototype.readUint16LE=f.prototype.readUInt16LE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]|this[e+1]<<8},f.prototype.readUint16BE=f.prototype.readUInt16BE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]<<8|this[e+1]},f.prototype.readUint32LE=f.prototype.readUInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},f.prototype.readUint32BE=f.prototype.readUInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},f.prototype.readBigUInt64LE=Z((function(e){K(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))})),f.prototype.readBigUInt64BE=Z((function(e){K(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)})),f.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},f.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},f.prototype.readInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},f.prototype.readInt16LE=function(e,t){e>>>=0,t||C(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt16BE=function(e,t){e>>>=0,t||C(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},f.prototype.readInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},f.prototype.readBigInt64LE=Z((function(e){K(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),f.prototype.readBigInt64BE=Z((function(e){K(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),f.prototype.readFloatLE=function(e,t){return e>>>=0,t||C(e,4,this.length),i.read(this,e,!0,23,4)},f.prototype.readFloatBE=function(e,t){return e>>>=0,t||C(e,4,this.length),i.read(this,e,!1,23,4)},f.prototype.readDoubleLE=function(e,t){return e>>>=0,t||C(e,8,this.length),i.read(this,e,!0,52,8)},f.prototype.readDoubleBE=function(e,t){return e>>>=0,t||C(e,8,this.length),i.read(this,e,!1,52,8)},f.prototype.writeUintLE=f.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||N(this,e,t,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},f.prototype.writeUintBE=f.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||N(this,e,t,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},f.prototype.writeUint8=f.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,1,255,0),this[t]=255&e,t+1},f.prototype.writeUint16LE=f.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},f.prototype.writeUint16BE=f.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},f.prototype.writeUint32LE=f.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},f.prototype.writeUint32BE=f.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},f.prototype.writeBigUInt64LE=Z((function(e,t=0){return T(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),f.prototype.writeBigUInt64BE=Z((function(e,t=0){return P(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),f.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);N(this,e,t,r,n-1,-n)}let i=0,o=1,a=0;for(this[t]=255&e;++i<r&&(o*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/o>>0)-a&255;return t+r},f.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);N(this,e,t,r,n-1,-n)}let i=r-1,o=1,a=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/o>>0)-a&255;return t+r},f.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},f.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},f.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},f.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},f.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},f.prototype.writeBigInt64LE=Z((function(e,t=0){return T(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),f.prototype.writeBigInt64BE=Z((function(e,t=0){return P(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),f.prototype.writeFloatLE=function(e,t,r){return L(this,e,t,!0,r)},f.prototype.writeFloatBE=function(e,t,r){return L(this,e,t,!1,r)},f.prototype.writeDoubleLE=function(e,t,r){return D(this,e,t,!0,r)},f.prototype.writeDoubleBE=function(e,t,r){return D(this,e,t,!1,r)},f.prototype.copy=function(e,t,r,n){if(!f.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},f.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!f.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{const o=f.isBuffer(e)?e:f.from(e,n),a=o.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=o[i%a]}return this};const U={};function z(e,t,r){U[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function q(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function F(e,t,r,n,i,o){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let i;throw i=o>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new U.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){K(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||H(t,e.length-(r+1))}(n,i,o)}function K(e,t){if("number"!=typeof e)throw new U.ERR_INVALID_ARG_TYPE(t,"number",e)}function H(e,t,r){if(Math.floor(e)!==e)throw K(e,r),new U.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new U.ERR_BUFFER_OUT_OF_BOUNDS;throw new U.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}z("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),z("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),z("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=q(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=q(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const W=/[^+/0-9A-Za-z-_]/g;function V(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let a=0;a<n;++a){if(r=e.charCodeAt(a),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function G(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(W,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function J(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function $(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function X(e){return e!=e}const Y=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Z(e){return"undefined"==typeof BigInt?Q:e}function Q(){throw new Error("BigInt not supported")}},3973:(e,t,r)=>{var n=r(7834).Buffer,i=r(4851).Transform,o=r(214).s;function a(e){i.call(this),this.hashMode="string"==typeof e,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}r(1285)(a,i),a.prototype.update=function(e,t,r){"string"==typeof e&&(e=n.from(e,t));var i=this._update(e);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},a.prototype.setAutoPadding=function(){},a.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},a.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},a.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},a.prototype._transform=function(e,t,r){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){n=e}finally{r(n)}},a.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},a.prototype._finalOrDigest=function(e){var t=this.__final()||n.alloc(0);return e&&(t=this._toString(t,e,!0)),t},a.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var n=this._decoder.write(e);return r&&(n+=this._decoder.end()),n},e.exports=a},5363:(e,t,r)=>{var n=r(8834).Buffer,i=r(7554),o=r(2197);e.exports=function(e){return new s(e)};var a={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function s(e){this.curveType=a[e],this.curveType||(this.curveType={name:e}),this.curve=new i.ec(this.curveType.name),this.keys=void 0}function f(e,t,r){Array.isArray(e)||(e=e.toArray());var i=new n(e);if(r&&i.length<r){var o=new n(r-i.length);o.fill(0),i=n.concat([o,i])}return t?i.toString(t):i}a.p224=a.secp224r1,a.p256=a.secp256r1=a.prime256v1,a.p192=a.secp192r1=a.prime192v1,a.p384=a.secp384r1,a.p521=a.secp521r1,s.prototype.generateKeys=function(e,t){return this.keys=this.curve.genKeyPair(),this.getPublicKey(e,t)},s.prototype.computeSecret=function(e,t,r){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),f(this.curve.keyFromPublic(e).getPublic().mul(this.keys.getPrivate()).getX(),r,this.curveType.byteLength)},s.prototype.getPublicKey=function(e,t){var r=this.keys.getPublic("compressed"===t,!0);return"hybrid"===t&&(r[r.length-1]%2?r[0]=7:r[0]=6),f(r,e)},s.prototype.getPrivateKey=function(e){return f(this.keys.getPrivate(),e)},s.prototype.setPublicKey=function(e,t){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),this.keys._importPublic(e),this},s.prototype.setPrivateKey=function(e,t){t=t||"utf8",n.isBuffer(e)||(e=new n(e,t));var r=new o(e);return r=r.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(r),this}},6162:(e,t,r)=>{"use strict";var n=r(1285),i=r(7993),o=r(1445),a=r(9065),s=r(3973);function f(e){s.call(this,"digest"),this._hash=e}n(f,s),f.prototype._update=function(e){this._hash.update(e)},f.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new i:"rmd160"===e||"ripemd160"===e?new o:new f(a(e))}},2511:(e,t,r)=>{var n=r(7993);e.exports=function(e){return(new n).update(e).digest()}},11:(e,t,r)=>{"use strict";var n=r(1285),i=r(6456),o=r(3973),a=r(7834).Buffer,s=r(2511),f=r(1445),c=r(9065),h=a.alloc(128);function d(e,t){o.call(this,"digest"),"string"==typeof t&&(t=a.from(t));var r="sha512"===e||"sha384"===e?128:64;this._alg=e,this._key=t,t.length>r?t=("rmd160"===e?new f:c(e)).update(t).digest():t.length<r&&(t=a.concat([t,h],r));for(var n=this._ipad=a.allocUnsafe(r),i=this._opad=a.allocUnsafe(r),s=0;s<r;s++)n[s]=54^t[s],i[s]=92^t[s];this._hash="rmd160"===e?new f:c(e),this._hash.update(n)}n(d,o),d.prototype._update=function(e){this._hash.update(e)},d.prototype._final=function(){var e=this._hash.digest();return("rmd160"===this._alg?new f:c(this._alg)).update(this._opad).update(e).digest()},e.exports=function(e,t){return"rmd160"===(e=e.toLowerCase())||"ripemd160"===e?new d("rmd160",t):"md5"===e?new i(s,t):new d(e,t)}},6456:(e,t,r)=>{"use strict";var n=r(1285),i=r(7834).Buffer,o=r(3973),a=i.alloc(128),s=64;function f(e,t){o.call(this,"digest"),"string"==typeof t&&(t=i.from(t)),this._alg=e,this._key=t,t.length>s?t=e(t):t.length<s&&(t=i.concat([t,a],s));for(var r=this._ipad=i.allocUnsafe(s),n=this._opad=i.allocUnsafe(s),f=0;f<s;f++)r[f]=54^t[f],n[f]=92^t[f];this._hash=[r]}n(f,o),f.prototype._update=function(e){this._hash.push(e)},f.prototype._final=function(){var e=this._alg(i.concat(this._hash));return this._alg(i.concat([this._opad,e]))},e.exports=f},5634:(e,t,r)=>{"use strict";t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=r(5003),t.createHash=t.Hash=r(6162),t.createHmac=t.Hmac=r(11);var n=r(4778),i=Object.keys(n),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);t.getHashes=function(){return o};var a=r(499);t.pbkdf2=a.pbkdf2,t.pbkdf2Sync=a.pbkdf2Sync;var s=r(3667);t.Cipher=s.Cipher,t.createCipher=s.createCipher,t.Cipheriv=s.Cipheriv,t.createCipheriv=s.createCipheriv,t.Decipher=s.Decipher,t.createDecipher=s.createDecipher,t.Decipheriv=s.Decipheriv,t.createDecipheriv=s.createDecipheriv,t.getCiphers=s.getCiphers,t.listCiphers=s.listCiphers;var f=r(7602);t.DiffieHellmanGroup=f.DiffieHellmanGroup,t.createDiffieHellmanGroup=f.createDiffieHellmanGroup,t.getDiffieHellman=f.getDiffieHellman,t.createDiffieHellman=f.createDiffieHellman,t.DiffieHellman=f.DiffieHellman;var c=r(5263);t.createSign=c.createSign,t.Sign=c.Sign,t.createVerify=c.createVerify,t.Verify=c.Verify,t.createECDH=r(5363);var h=r(8493);t.publicEncrypt=h.publicEncrypt,t.privateEncrypt=h.privateEncrypt,t.publicDecrypt=h.publicDecrypt,t.privateDecrypt=h.privateDecrypt;var d=r(9631);t.randomFill=d.randomFill,t.randomFillSync=d.randomFillSync,t.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},t.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}},4387:(e,t,r)=>{"use strict";t.utils=r(4112),t.Cipher=r(3639),t.DES=r(4225),t.CBC=r(9692),t.EDE=r(4335)},9692:(e,t,r)=>{"use strict";var n=r(9561),i=r(1285),o={};function a(e){n.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]}t.instantiate=function(e){function t(t){e.call(this,t),this._cbcInit()}i(t,e);for(var r=Object.keys(o),n=0;n<r.length;n++){var a=r[n];t.prototype[a]=o[a]}return t.create=function(e){return new t(e)},t},o._cbcInit=function(){var e=new a(this.options.iv);this._cbcState=e},o._update=function(e,t,r,n){var i=this._cbcState,o=this.constructor.super_.prototype,a=i.iv;if("encrypt"===this.type){for(var s=0;s<this.blockSize;s++)a[s]^=e[t+s];for(o._update.call(this,a,0,r,n),s=0;s<this.blockSize;s++)a[s]=r[n+s]}else{for(o._update.call(this,e,t,r,n),s=0;s<this.blockSize;s++)r[n+s]^=a[s];for(s=0;s<this.blockSize;s++)a[s]=e[t+s]}}},3639:(e,t,r)=>{"use strict";var n=r(9561);function i(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}e.exports=i,i.prototype._init=function(){},i.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},i.prototype._buffer=function(e,t){for(var r=Math.min(this.buffer.length-this.bufferOff,e.length-t),n=0;n<r;n++)this.buffer[this.bufferOff+n]=e[t+n];return this.bufferOff+=r,r},i.prototype._flushBuffer=function(e,t){return this._update(this.buffer,0,e,t),this.bufferOff=0,this.blockSize},i.prototype._updateEncrypt=function(e){var t=0,r=0,n=(this.bufferOff+e.length)/this.blockSize|0,i=new Array(n*this.blockSize);0!==this.bufferOff&&(t+=this._buffer(e,t),this.bufferOff===this.buffer.length&&(r+=this._flushBuffer(i,r)));for(var o=e.length-(e.length-t)%this.blockSize;t<o;t+=this.blockSize)this._update(e,t,i,r),r+=this.blockSize;for(;t<e.length;t++,this.bufferOff++)this.buffer[this.bufferOff]=e[t];return i},i.prototype._updateDecrypt=function(e){for(var t=0,r=0,n=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,i=new Array(n*this.blockSize);n>0;n--)t+=this._buffer(e,t),r+=this._flushBuffer(i,r);return t+=this._buffer(e,t),i},i.prototype.final=function(e){var t,r;return e&&(t=this.update(e)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(r):r},i.prototype._pad=function(e,t){if(0===t)return!1;for(;t<e.length;)e[t++]=0;return!0},i.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var e=new Array(this.blockSize);return this._update(this.buffer,0,e,0),e},i.prototype._unpad=function(e){return e},i.prototype._finalDecrypt=function(){n.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)}},4225:(e,t,r)=>{"use strict";var n=r(9561),i=r(1285),o=r(4112),a=r(3639);function s(){this.tmp=new Array(2),this.keys=null}function f(e){a.call(this,e);var t=new s;this._desState=t,this.deriveKeys(t,e.key)}i(f,a),e.exports=f,f.create=function(e){return new f(e)};var c=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];f.prototype.deriveKeys=function(e,t){e.keys=new Array(32),n.equal(t.length,this.blockSize,"Invalid key length");var r=o.readUInt32BE(t,0),i=o.readUInt32BE(t,4);o.pc1(r,i,e.tmp,0),r=e.tmp[0],i=e.tmp[1];for(var a=0;a<e.keys.length;a+=2){var s=c[a>>>1];r=o.r28shl(r,s),i=o.r28shl(i,s),o.pc2(r,i,e.keys,a)}},f.prototype._update=function(e,t,r,n){var i=this._desState,a=o.readUInt32BE(e,t),s=o.readUInt32BE(e,t+4);o.ip(a,s,i.tmp,0),a=i.tmp[0],s=i.tmp[1],"encrypt"===this.type?this._encrypt(i,a,s,i.tmp,0):this._decrypt(i,a,s,i.tmp,0),a=i.tmp[0],s=i.tmp[1],o.writeUInt32BE(r,a,n),o.writeUInt32BE(r,s,n+4)},f.prototype._pad=function(e,t){for(var r=e.length-t,n=t;n<e.length;n++)e[n]=r;return!0},f.prototype._unpad=function(e){for(var t=e[e.length-1],r=e.length-t;r<e.length;r++)n.equal(e[r],t);return e.slice(0,e.length-t)},f.prototype._encrypt=function(e,t,r,n,i){for(var a=t,s=r,f=0;f<e.keys.length;f+=2){var c=e.keys[f],h=e.keys[f+1];o.expand(s,e.tmp,0),c^=e.tmp[0],h^=e.tmp[1];var d=o.substitute(c,h),u=s;s=(a^o.permute(d))>>>0,a=u}o.rip(s,a,n,i)},f.prototype._decrypt=function(e,t,r,n,i){for(var a=r,s=t,f=e.keys.length-2;f>=0;f-=2){var c=e.keys[f],h=e.keys[f+1];o.expand(a,e.tmp,0),c^=e.tmp[0],h^=e.tmp[1];var d=o.substitute(c,h),u=a;a=(s^o.permute(d))>>>0,s=u}o.rip(a,s,n,i)}},4335:(e,t,r)=>{"use strict";var n=r(9561),i=r(1285),o=r(3639),a=r(4225);function s(e,t){n.equal(t.length,24,"Invalid key length");var r=t.slice(0,8),i=t.slice(8,16),o=t.slice(16,24);this.ciphers="encrypt"===e?[a.create({type:"encrypt",key:r}),a.create({type:"decrypt",key:i}),a.create({type:"encrypt",key:o})]:[a.create({type:"decrypt",key:o}),a.create({type:"encrypt",key:i}),a.create({type:"decrypt",key:r})]}function f(e){o.call(this,e);var t=new s(this.type,this.options.key);this._edeState=t}i(f,o),e.exports=f,f.create=function(e){return new f(e)},f.prototype._update=function(e,t,r,n){var i=this._edeState;i.ciphers[0]._update(e,t,r,n),i.ciphers[1]._update(r,n,r,n),i.ciphers[2]._update(r,n,r,n)},f.prototype._pad=a.prototype._pad,f.prototype._unpad=a.prototype._unpad},4112:(e,t)=>{"use strict";t.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},t.writeUInt32BE=function(e,t,r){e[0+r]=t>>>24,e[1+r]=t>>>16&255,e[2+r]=t>>>8&255,e[3+r]=255&t},t.ip=function(e,t,r,n){for(var i=0,o=0,a=6;a>=0;a-=2){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=e>>>s+a&1}for(a=6;a>=0;a-=2){for(s=1;s<=25;s+=8)o<<=1,o|=t>>>s+a&1;for(s=1;s<=25;s+=8)o<<=1,o|=e>>>s+a&1}r[n+0]=i>>>0,r[n+1]=o>>>0},t.rip=function(e,t,r,n){for(var i=0,o=0,a=0;a<4;a++)for(var s=24;s>=0;s-=8)i<<=1,i|=t>>>s+a&1,i<<=1,i|=e>>>s+a&1;for(a=4;a<8;a++)for(s=24;s>=0;s-=8)o<<=1,o|=t>>>s+a&1,o<<=1,o|=e>>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},t.pc1=function(e,t,r,n){for(var i=0,o=0,a=7;a>=5;a--){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1}for(s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(a=1;a<=3;a++){for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1;for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1}for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},t.r28shl=function(e,t){return e<<t&268435455|e>>>28-t};var r=[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];t.pc2=function(e,t,n,i){for(var o=0,a=0,s=r.length>>>1,f=0;f<s;f++)o<<=1,o|=e>>>r[f]&1;for(f=s;f<r.length;f++)a<<=1,a|=t>>>r[f]&1;n[i+0]=o>>>0,n[i+1]=a>>>0},t.expand=function(e,t,r){var n=0,i=0;n=(1&e)<<5|e>>>27;for(var o=23;o>=15;o-=4)n<<=6,n|=e>>>o&63;for(o=11;o>=3;o-=4)i|=e>>>o&63,i<<=6;i|=(31&e)<<1|e>>>31,t[r+0]=n>>>0,t[r+1]=i>>>0};var n=[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];t.substitute=function(e,t){for(var r=0,i=0;i<4;i++)r<<=4,r|=n[64*i+(e>>>18-6*i&63)];for(i=0;i<4;i++)r<<=4,r|=n[256+64*i+(t>>>18-6*i&63)];return r>>>0};var i=[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];t.permute=function(e){for(var t=0,r=0;r<i.length;r++)t<<=1,t|=e>>>i[r]&1;return t>>>0},t.padSplit=function(e,t,r){for(var n=e.toString(2);n.length<t;)n="0"+n;for(var i=[],o=0;o<t;o+=r)i.push(n.slice(o,o+r));return i.join(" ")}},7602:(e,t,r)=>{var n=r(8834).Buffer,i=r(2808),o=r(3418),a=r(767),s={binary:!0,hex:!0,base64:!0};t.DiffieHellmanGroup=t.createDiffieHellmanGroup=t.getDiffieHellman=function(e){var t=new n(o[e].prime,"hex"),r=new n(o[e].gen,"hex");return new a(t,r)},t.createDiffieHellman=t.DiffieHellman=function e(t,r,o,f){return n.isBuffer(r)||void 0===s[r]?e(t,"binary",r,o):(r=r||"binary",f=f||"binary",o=o||new n([2]),n.isBuffer(o)||(o=new n(o,f)),"number"==typeof t?new a(i(t,o),o,!0):(n.isBuffer(t)||(t=new n(t,r)),new a(t,o,!0)))}},767:(e,t,r)=>{var n=r(8834).Buffer,i=r(2197),o=new(r(6676)),a=new i(24),s=new i(11),f=new i(10),c=new i(3),h=new i(7),d=r(2808),u=r(5003);function l(e,t){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),this._pub=new i(e),this}function p(e,t){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),this._priv=new i(e),this}e.exports=y;var b={};function y(e,t,r){this.setGenerator(t),this.__prime=new i(e),this._prime=i.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=l,this.setPrivateKey=p):this._primeCode=8}function g(e,t){var r=new n(e.toArray());return t?r.toString(t):r}Object.defineProperty(y.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(e,t){var r=t.toString("hex"),n=[r,e.toString(16)].join("_");if(n in b)return b[n];var i,u=0;if(e.isEven()||!d.simpleSieve||!d.fermatTest(e)||!o.test(e))return u+=1,u+="02"===r||"05"===r?8:4,b[n]=u,u;switch(o.test(e.shrn(1))||(u+=2),r){case"02":e.mod(a).cmp(s)&&(u+=8);break;case"05":(i=e.mod(f)).cmp(c)&&i.cmp(h)&&(u+=8);break;default:u+=4}return b[n]=u,u}(this.__prime,this.__gen)),this._primeCode}}),y.prototype.generateKeys=function(){return this._priv||(this._priv=new i(u(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},y.prototype.computeSecret=function(e){var t=(e=(e=new i(e)).toRed(this._prime)).redPow(this._priv).fromRed(),r=new n(t.toArray()),o=this.getPrime();if(r.length<o.length){var a=new n(o.length-r.length);a.fill(0),r=n.concat([a,r])}return r},y.prototype.getPublicKey=function(e){return g(this._pub,e)},y.prototype.getPrivateKey=function(e){return g(this._priv,e)},y.prototype.getPrime=function(e){return g(this.__prime,e)},y.prototype.getGenerator=function(e){return g(this._gen,e)},y.prototype.setGenerator=function(e,t){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),this.__gen=e,this._gen=new i(e),this}},2808:(e,t,r)=>{var n=r(5003);e.exports=m,m.simpleSieve=y,m.fermatTest=g;var i=r(2197),o=new i(24),a=new(r(6676)),s=new i(1),f=new i(2),c=new i(5),h=(new i(16),new i(8),new i(10)),d=new i(3),u=(new i(7),new i(11)),l=new i(4),p=(new i(12),null);function b(){if(null!==p)return p;var e=[];e[0]=2;for(var t=1,r=3;r<1048576;r+=2){for(var n=Math.ceil(Math.sqrt(r)),i=0;i<t&&e[i]<=n&&r%e[i]!=0;i++);t!==i&&e[i]<=n||(e[t++]=r)}return p=e,e}function y(e){for(var t=b(),r=0;r<t.length;r++)if(0===e.modn(t[r]))return 0===e.cmpn(t[r]);return!0}function g(e){var t=i.mont(e);return 0===f.toRed(t).redPow(e.subn(1)).fromRed().cmpn(1)}function m(e,t){if(e<16)return new i(2===t||5===t?[140,123]:[140,39]);var r,p;for(t=new i(t);;){for(r=new i(n(Math.ceil(e/8)));r.bitLength()>e;)r.ishrn(1);if(r.isEven()&&r.iadd(s),r.testn(1)||r.iadd(f),t.cmp(f)){if(!t.cmp(c))for(;r.mod(h).cmp(d);)r.iadd(l)}else for(;r.mod(o).cmp(u);)r.iadd(l);if(y(p=r.shrn(1))&&y(r)&&g(p)&&g(r)&&a.test(p)&&a.test(r))return r}}},7554:(e,t,r)=>{"use strict";var n=t;n.version=r(763).i8,n.utils=r(8288),n.rand=r(2745),n.curve=r(8610),n.curves=r(1479),n.ec=r(8596),n.eddsa=r(9208)},8919:(e,t,r)=>{"use strict";var n=r(2197),i=r(8288),o=i.getNAF,a=i.getJSF,s=i.assert;function f(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function c(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=f,f.prototype.point=function(){throw new Error("Not implemented")},f.prototype.validate=function(){throw new Error("Not implemented")},f.prototype._fixedNafMul=function(e,t){s(e.precomputed);var r=e._getDoubles(),n=o(t,1,this._bitLength),i=(1<<r.step+1)-(r.step%2==0?2:1);i/=3;var a,f,c=[];for(a=0;a<n.length;a+=r.step){f=0;for(var h=a+r.step-1;h>=a;h--)f=(f<<1)+n[h];c.push(f)}for(var d=this.jpoint(null,null,null),u=this.jpoint(null,null,null),l=i;l>0;l--){for(a=0;a<c.length;a++)(f=c[a])===l?u=u.mixedAdd(r.points[a]):f===-l&&(u=u.mixedAdd(r.points[a].neg()));d=d.add(u)}return d.toP()},f.prototype._wnafMul=function(e,t){var r=4,n=e._getNAFPoints(r);r=n.wnd;for(var i=n.points,a=o(t,r,this._bitLength),f=this.jpoint(null,null,null),c=a.length-1;c>=0;c--){for(var h=0;c>=0&&0===a[c];c--)h++;if(c>=0&&h++,f=f.dblp(h),c<0)break;var d=a[c];s(0!==d),f="affine"===e.type?d>0?f.mixedAdd(i[d-1>>1]):f.mixedAdd(i[-d-1>>1].neg()):d>0?f.add(i[d-1>>1]):f.add(i[-d-1>>1].neg())}return"affine"===e.type?f.toP():f},f.prototype._wnafMulAdd=function(e,t,r,n,i){var s,f,c,h=this._wnafT1,d=this._wnafT2,u=this._wnafT3,l=0;for(s=0;s<n;s++){var p=(c=t[s])._getNAFPoints(e);h[s]=p.wnd,d[s]=p.points}for(s=n-1;s>=1;s-=2){var b=s-1,y=s;if(1===h[b]&&1===h[y]){var g=[t[b],null,null,t[y]];0===t[b].y.cmp(t[y].y)?(g[1]=t[b].add(t[y]),g[2]=t[b].toJ().mixedAdd(t[y].neg())):0===t[b].y.cmp(t[y].y.redNeg())?(g[1]=t[b].toJ().mixedAdd(t[y]),g[2]=t[b].add(t[y].neg())):(g[1]=t[b].toJ().mixedAdd(t[y]),g[2]=t[b].toJ().mixedAdd(t[y].neg()));var m=[-3,-1,-5,-7,0,7,5,1,3],v=a(r[b],r[y]);for(l=Math.max(v[0].length,l),u[b]=new Array(l),u[y]=new Array(l),f=0;f<l;f++){var _=0|v[0][f],w=0|v[1][f];u[b][f]=m[3*(_+1)+(w+1)],u[y][f]=0,d[b]=g}}else u[b]=o(r[b],h[b],this._bitLength),u[y]=o(r[y],h[y],this._bitLength),l=Math.max(u[b].length,l),l=Math.max(u[y].length,l)}var S=this.jpoint(null,null,null),E=this._wnafT4;for(s=l;s>=0;s--){for(var A=0;s>=0;){var M=!0;for(f=0;f<n;f++)E[f]=0|u[f][s],0!==E[f]&&(M=!1);if(!M)break;A++,s--}if(s>=0&&A++,S=S.dblp(A),s<0)break;for(f=0;f<n;f++){var k=E[f];0!==k&&(k>0?c=d[f][k-1>>1]:k<0&&(c=d[f][-k-1>>1].neg()),S="affine"===c.type?S.mixedAdd(c):S.add(c))}}for(s=0;s<n;s++)d[s]=null;return i?S:S.toP()},f.BasePoint=c,c.prototype.eq=function(){throw new Error("Not implemented")},c.prototype.validate=function(){return this.curve.validate(this)},f.prototype.decodePoint=function(e,t){e=i.toArray(e,t);var r=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*r)return 6===e[0]?s(e[e.length-1]%2==0):7===e[0]&&s(e[e.length-1]%2==1),this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));if((2===e[0]||3===e[0])&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),3===e[0]);throw new Error("Unknown point format")},c.prototype.encodeCompressed=function(e){return this.encode(e,!0)},c.prototype._encode=function(e){var t=this.curve.p.byteLength(),r=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",t))},c.prototype.encode=function(e,t){return i.encode(this._encode(t),e)},c.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},c.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},c.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i<t;i+=e){for(var o=0;o<e;o++)n=n.dbl();r.push(n)}return{step:e,points:r}},c.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,n=1===r?null:this.dbl(),i=1;i<r;i++)t[i]=t[i-1].add(n);return{wnd:e,points:t}},c.prototype._getBeta=function(){return null},c.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t}},7105:(e,t,r)=>{"use strict";var n=r(8288),i=r(2197),o=r(1285),a=r(8919),s=n.assert;function f(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,a.call(this,"edwards",e),this.a=new i(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),s(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function c(e,t,r,n,o){a.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new i(t,16),this.y=new i(r,16),this.z=n?new i(n,16):this.curve.one,this.t=o&&new i(o,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}o(f,a),e.exports=f,f.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},f.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},f.prototype.jpoint=function(e,t,r,n){return this.point(e,t,r,n)},f.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=this.c2.redSub(this.a.redMul(r)),o=this.one.redSub(this.c2.redMul(this.d).redMul(r)),a=n.redMul(o.redInvm()),s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var f=s.fromRed().isOdd();return(t&&!f||!t&&f)&&(s=s.redNeg()),this.point(e,s)},f.prototype.pointFromY=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=r.redSub(this.c2),o=r.redMul(this.d).redMul(this.c2).redSub(this.a),a=n.redMul(o.redInvm());if(0===a.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");return s.fromRed().isOdd()!==t&&(s=s.redNeg()),this.point(s,e)},f.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),n=t.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===n.cmp(i)},o(c,a.BasePoint),f.prototype.pointFromJSON=function(e){return c.fromJSON(this,e)},f.prototype.point=function(e,t,r,n){return new c(this,e,t,r,n)},c.fromJSON=function(e,t){return new c(e,t[0],t[1],t[2])},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},c.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=n.redAdd(t),a=o.redSub(r),s=n.redSub(t),f=i.redMul(a),c=o.redMul(s),h=i.redMul(s),d=a.redMul(o);return this.curve.point(f,c,d,h)},c.prototype._projDbl=function(){var e,t,r,n,i,o,a=this.x.redAdd(this.y).redSqr(),s=this.x.redSqr(),f=this.y.redSqr();if(this.curve.twisted){var c=(n=this.curve._mulA(s)).redAdd(f);this.zOne?(e=a.redSub(s).redSub(f).redMul(c.redSub(this.curve.two)),t=c.redMul(n.redSub(f)),r=c.redSqr().redSub(c).redSub(c)):(i=this.z.redSqr(),o=c.redSub(i).redISub(i),e=a.redSub(s).redISub(f).redMul(o),t=c.redMul(n.redSub(f)),r=c.redMul(o))}else n=s.redAdd(f),i=this.curve._mulC(this.z).redSqr(),o=n.redSub(i).redSub(i),e=this.curve._mulC(a.redISub(n)).redMul(o),t=this.curve._mulC(n).redMul(s.redISub(f)),r=n.redMul(o);return this.curve.point(e,t,r)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},c.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),o=r.redSub(t),a=i.redSub(n),s=i.redAdd(n),f=r.redAdd(t),c=o.redMul(a),h=s.redMul(f),d=o.redMul(f),u=a.redMul(s);return this.curve.point(c,h,u,d)},c.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),o=this.x.redMul(e.x),a=this.y.redMul(e.y),s=this.curve.d.redMul(o).redMul(a),f=i.redSub(s),c=i.redAdd(s),h=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(a),d=n.redMul(f).redMul(h);return this.curve.twisted?(t=n.redMul(c).redMul(a.redSub(this.curve._mulA(o))),r=f.redMul(c)):(t=n.redMul(c).redMul(a.redSub(o)),r=this.curve._mulC(f).redMul(c)),this.curve.point(d,t,r)},c.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},c.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},c.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},c.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},c.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()},c.prototype.getY=function(){return this.normalize(),this.y.fromRed()},c.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},c.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},c.prototype.toP=c.prototype.normalize,c.prototype.mixedAdd=c.prototype.add},8610:(e,t,r)=>{"use strict";var n=t;n.base=r(8919),n.short=r(7715),n.mont=r(5125),n.edwards=r(7105)},5125:(e,t,r)=>{"use strict";var n=r(2197),i=r(1285),o=r(8919),a=r(8288);function s(e){o.call(this,"mont",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function f(e,t,r){o.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(s,o),e.exports=s,s.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},i(f,o.BasePoint),s.prototype.decodePoint=function(e,t){return this.point(a.toArray(e,t),1)},s.prototype.point=function(e,t){return new f(this,e,t)},s.prototype.pointFromJSON=function(e){return f.fromJSON(this,e)},f.prototype.precompute=function(){},f.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},f.fromJSON=function(e,t){return new f(e,t[0],t[1]||e.one)},f.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},f.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},f.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},f.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(r),a=i.redMul(n),s=t.z.redMul(o.redAdd(a).redSqr()),f=t.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,f)},f.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},f.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},f.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},f.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},7715:(e,t,r)=>{"use strict";var n=r(8288),i=r(2197),o=r(1285),a=r(8919),s=n.assert;function f(e){a.call(this,"short",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function c(e,t,r,n){a.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(t,16),this.y=new i(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function h(e,t,r,n){a.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(t,16),this.y=new i(r,16),this.z=new i(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(f,a),e.exports=f,f.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new i(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new i(e.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(t))?r=o[0]:(r=o[1],s(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map((function(e){return{a:new i(e.a,16),b:new i(e.b,16)}})):this._getEndoBasis(r)}}},f.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:i.mont(e),r=new i(2).toRed(t).redInvm(),n=r.redNeg(),o=new i(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},f.prototype._getEndoBasis=function(e){for(var t,r,n,o,a,s,f,c,h,d=this.n.ushrn(Math.floor(this.n.bitLength()/2)),u=e,l=this.n.clone(),p=new i(1),b=new i(0),y=new i(0),g=new i(1),m=0;0!==u.cmpn(0);){var v=l.div(u);c=l.sub(v.mul(u)),h=y.sub(v.mul(p));var _=g.sub(v.mul(b));if(!n&&c.cmp(d)<0)t=f.neg(),r=p,n=c.neg(),o=h;else if(n&&2==++m)break;f=c,l=u,u=c,y=p,p=h,g=b,b=_}a=c.neg(),s=h;var w=n.sqr().add(o.sqr());return a.sqr().add(s.sqr()).cmp(w)>=0&&(a=t,s=r),n.negative&&(n=n.neg(),o=o.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:n,b:o},{a,b:s}]},f.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),f=i.mul(r.b),c=o.mul(n.b);return{k1:e.sub(a).sub(s),k2:f.add(c).neg()}},f.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(t&&!o||!t&&o)&&(n=n.redNeg()),this.point(e,n)},f.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},f.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o<e.length;o++){var a=this._endoSplit(t[o]),s=e[o],f=s._getBeta();a.k1.negative&&(a.k1.ineg(),s=s.neg(!0)),a.k2.negative&&(a.k2.ineg(),f=f.neg(!0)),n[2*o]=s,n[2*o+1]=f,i[2*o]=a.k1,i[2*o+1]=a.k2}for(var c=this._wnafMulAdd(1,n,i,2*o,r),h=0;h<2*o;h++)n[h]=null,i[h]=null;return c},o(c,a.BasePoint),f.prototype.point=function(e,t,r){return new c(this,e,t,r)},f.prototype.pointFromJSON=function(e,t){return c.fromJSON(this,e,t)},c.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve,n=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(n)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(n)}}}return t}},c.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},c.fromJSON=function(e,t,r){"string"==typeof t&&(t=JSON.parse(t));var n=e.point(t[0],t[1],r);if(!t[2])return n;function i(t){return e.point(t[0],t[1],r)}var o=t[2];return n.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[n].concat(o.doubles.points.map(i))},naf:o.naf&&{wnd:o.naf.wnd,points:[n].concat(o.naf.points.map(i))}},n},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return this.inf},c.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},c.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},c.prototype.getX=function(){return this.x.fromRed()},c.prototype.getY=function(){return this.y.fromRed()},c.prototype.mul=function(e){return e=new i(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},c.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},c.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},c.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},c.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(h,a.BasePoint),f.prototype.jpoint=function(e,t,r){return new h(this,e,t,r)},h.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},h.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},h.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),f=o.redSub(a);if(0===s.cmpn(0))return 0!==f.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),h=c.redMul(s),d=n.redMul(c),u=f.redSqr().redIAdd(h).redISub(d).redISub(d),l=f.redMul(d.redISub(u)).redISub(o.redMul(h)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(u,l,p)},h.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var f=a.redSqr(),c=f.redMul(a),h=r.redMul(f),d=s.redSqr().redIAdd(c).redISub(h).redISub(h),u=s.redMul(h.redISub(d)).redISub(i.redMul(c)),l=this.z.redMul(a);return this.curve.jpoint(d,u,l)},h.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t<e;t++)r=r.dbl();return r}var n=this.curve.a,i=this.curve.tinv,o=this.x,a=this.y,s=this.z,f=s.redSqr().redSqr(),c=a.redAdd(a);for(t=0;t<e;t++){var h=o.redSqr(),d=c.redSqr(),u=d.redSqr(),l=h.redAdd(h).redIAdd(h).redIAdd(n.redMul(f)),p=o.redMul(d),b=l.redSqr().redISub(p.redAdd(p)),y=p.redISub(b),g=l.redMul(y);g=g.redIAdd(g).redISub(u);var m=c.redMul(s);t+1<e&&(f=f.redMul(u)),o=b,s=m,c=g}return this.curve.jpoint(o,c.redMul(i),s)},h.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},h.prototype._zeroDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(n).redISub(o);a=a.redIAdd(a);var s=n.redAdd(n).redIAdd(n),f=s.redSqr().redISub(a).redISub(a),c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),e=f,t=s.redMul(a.redISub(f)).redISub(c),r=this.y.redAdd(this.y)}else{var h=this.x.redSqr(),d=this.y.redSqr(),u=d.redSqr(),l=this.x.redAdd(d).redSqr().redISub(h).redISub(u);l=l.redIAdd(l);var p=h.redAdd(h).redIAdd(h),b=p.redSqr(),y=u.redIAdd(u);y=(y=y.redIAdd(y)).redIAdd(y),e=b.redISub(l).redISub(l),t=p.redMul(l.redISub(e)).redISub(y),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(e,t,r)},h.prototype._threeDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(n).redISub(o);a=a.redIAdd(a);var s=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),f=s.redSqr().redISub(a).redISub(a);e=f;var c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),t=s.redMul(a.redISub(f)).redISub(c),r=this.y.redAdd(this.y)}else{var h=this.z.redSqr(),d=this.y.redSqr(),u=this.x.redMul(d),l=this.x.redSub(h).redMul(this.x.redAdd(h));l=l.redAdd(l).redIAdd(l);var p=u.redIAdd(u),b=(p=p.redIAdd(p)).redAdd(p);e=l.redSqr().redISub(b),r=this.y.redAdd(this.z).redSqr().redISub(d).redISub(h);var y=d.redSqr();y=(y=(y=y.redIAdd(y)).redIAdd(y)).redIAdd(y),t=l.redMul(p.redISub(e)).redISub(y)}return this.curve.jpoint(e,t,r)},h.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),o=t.redSqr(),a=r.redSqr(),s=o.redAdd(o).redIAdd(o).redIAdd(e.redMul(i)),f=t.redAdd(t),c=(f=f.redIAdd(f)).redMul(a),h=s.redSqr().redISub(c.redAdd(c)),d=c.redISub(h),u=a.redSqr();u=(u=(u=u.redIAdd(u)).redIAdd(u)).redIAdd(u);var l=s.redMul(d).redISub(u),p=r.redAdd(r).redMul(n);return this.curve.jpoint(h,l,p)},h.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr(),n=t.redSqr(),i=e.redAdd(e).redIAdd(e),o=i.redSqr(),a=this.x.redAdd(t).redSqr().redISub(e).redISub(n),s=(a=(a=(a=a.redIAdd(a)).redAdd(a).redIAdd(a)).redISub(o)).redSqr(),f=n.redIAdd(n);f=(f=(f=f.redIAdd(f)).redIAdd(f)).redIAdd(f);var c=i.redIAdd(a).redSqr().redISub(o).redISub(s).redISub(f),h=t.redMul(c);h=(h=h.redIAdd(h)).redIAdd(h);var d=this.x.redMul(s).redISub(h);d=(d=d.redIAdd(d)).redIAdd(d);var u=this.y.redMul(c.redMul(f.redISub(c)).redISub(a.redMul(s)));u=(u=(u=u.redIAdd(u)).redIAdd(u)).redIAdd(u);var l=this.z.redAdd(a).redSqr().redISub(r).redISub(s);return this.curve.jpoint(d,u,l)},h.prototype.mul=function(e,t){return e=new i(e,t),this.curve._wnafMul(this,e)},h.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(0!==this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0))return!1;var n=t.redMul(this.z),i=r.redMul(e.z);return 0===this.y.redMul(i).redISub(e.y.redMul(n)).cmpn(0)},h.prototype.eqXToP=function(e){var t=this.z.redSqr(),r=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(r))return!0;for(var n=e.clone(),i=this.curve.redN.redMul(t);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},h.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},h.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},1479:(e,t,r)=>{"use strict";var n,i=t,o=r(4485),a=r(8610),s=r(8288).assert;function f(e){"short"===e.type?this.curve=new a.short(e):"edwards"===e.type?this.curve=new a.edwards(e):this.curve=new a.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function c(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var r=new f(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=f,c("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),c("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),c("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),c("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),c("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),c("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),c("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=r(7983)}catch(e){n=void 0}c("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},8596:(e,t,r)=>{"use strict";var n=r(2197),i=r(8873),o=r(8288),a=r(1479),s=r(2745),f=o.assert,c=r(2307),h=r(1798);function d(e){if(!(this instanceof d))return new d(e);"string"==typeof e&&(f(Object.prototype.hasOwnProperty.call(a,e),"Unknown curve "+e),e=a[e]),e instanceof a.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}e.exports=d,d.prototype.keyPair=function(e){return new c(this,e)},d.prototype.keyFromPrivate=function(e,t){return c.fromPrivate(this,e,t)},d.prototype.keyFromPublic=function(e,t){return c.fromPublic(this,e,t)},d.prototype.genKeyPair=function(e){e||(e={});for(var t=new i({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||s(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),o=this.n.sub(new n(2));;){var a=new n(t.generate(r));if(!(a.cmp(o)>0))return a.iaddn(1),this.keyFromPrivate(a)}},d.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},d.prototype.sign=function(e,t,r,o){"object"==typeof r&&(o=r,r=null),o||(o={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new n(e,16));for(var a=this.n.byteLength(),s=t.getPrivate().toArray("be",a),f=e.toArray("be",a),c=new i({hash:this.hash,entropy:s,nonce:f,pers:o.pers,persEnc:o.persEnc||"utf8"}),d=this.n.sub(new n(1)),u=0;;u++){var l=o.k?o.k(u):new n(c.generate(this.n.byteLength()));if(!((l=this._truncateToN(l,!0)).cmpn(1)<=0||l.cmp(d)>=0)){var p=this.g.mul(l);if(!p.isInfinity()){var b=p.getX(),y=b.umod(this.n);if(0!==y.cmpn(0)){var g=l.invm(this.n).mul(y.mul(t.getPrivate()).iadd(e));if(0!==(g=g.umod(this.n)).cmpn(0)){var m=(p.getY().isOdd()?1:0)|(0!==b.cmp(y)?2:0);return o.canonical&&g.cmp(this.nh)>0&&(g=this.n.sub(g),m^=1),new h({r:y,s:g,recoveryParam:m})}}}}}},d.prototype.verify=function(e,t,r,i){e=this._truncateToN(new n(e,16)),r=this.keyFromPublic(r,i);var o=(t=new h(t,"hex")).r,a=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,f=a.invm(this.n),c=f.mul(e).umod(this.n),d=f.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(c,r.getPublic(),d)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(c,r.getPublic(),d)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},d.prototype.recoverPubKey=function(e,t,r,i){f((3&r)===r,"The recovery param is more than two bits"),t=new h(t,i);var o=this.n,a=new n(e),s=t.r,c=t.s,d=1&r,u=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&u)throw new Error("Unable to find sencond key candinate");s=u?this.curve.pointFromX(s.add(this.curve.n),d):this.curve.pointFromX(s,d);var l=t.r.invm(o),p=o.sub(a).mul(l).umod(o),b=c.mul(l).umod(o);return this.g.mulAdd(p,s,b)},d.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new h(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},2307:(e,t,r)=>{"use strict";var n=r(2197),i=r(8288).assert;function o(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=o,o.fromPublic=function(e,t,r){return t instanceof o?t:new o(e,{pub:t,pubEnc:r})},o.fromPrivate=function(e,t,r){return t instanceof o?t:new o(e,{priv:t,privEnc:r})},o.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},o.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},o.prototype.derive=function(e){return e.validate()||i(e.validate(),"public point not validated"),e.mul(this.priv).getX()},o.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},o.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},o.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},1798:(e,t,r)=>{"use strict";var n=r(2197),i=r(8288),o=i.assert;function a(e,t){if(e instanceof a)return e;this._importDER(e,t)||(o(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function s(){this.place=0}function f(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,a=t.place;o<n;o++,a++)i<<=8,i|=e[a],i>>>=0;return!(i<=127)&&(t.place=a,i)}function c(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t<r;)t++;return 0===t?e:e.slice(t)}function h(e,t){if(t<128)e.push(t);else{var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}e.exports=a,a.prototype._importDER=function(e,t){e=i.toArray(e,t);var r=new s;if(48!==e[r.place++])return!1;var o=f(e,r);if(!1===o)return!1;if(o+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var a=f(e,r);if(!1===a)return!1;var c=e.slice(r.place,a+r.place);if(r.place+=a,2!==e[r.place++])return!1;var h=f(e,r);if(!1===h)return!1;if(e.length!==h+r.place)return!1;var d=e.slice(r.place,h+r.place);if(0===c[0]){if(!(128&c[1]))return!1;c=c.slice(1)}if(0===d[0]){if(!(128&d[1]))return!1;d=d.slice(1)}return this.r=new n(c),this.s=new n(d),this.recoveryParam=null,!0},a.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=c(t),r=c(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];h(n,t.length),(n=n.concat(t)).push(2),h(n,r.length);var o=n.concat(r),a=[48];return h(a,o.length),a=a.concat(o),i.encode(a,e)}},9208:(e,t,r)=>{"use strict";var n=r(4485),i=r(1479),o=r(8288),a=o.assert,s=o.parseBytes,f=r(851),c=r(6117);function h(e){if(a("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof h))return new h(e);e=i[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}e.exports=h,h.prototype.sign=function(e,t){e=s(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),o=this.encodePoint(i),a=this.hashInt(o,r.pubBytes(),e).mul(r.priv()),f=n.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:f,Rencoded:o})},h.prototype.verify=function(e,t,r){e=s(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(o)},h.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return o.intFromLE(e.digest()).umod(this.curve.n)},h.prototype.keyFromPublic=function(e){return f.fromPublic(this,e)},h.prototype.keyFromSecret=function(e){return f.fromSecret(this,e)},h.prototype.makeSignature=function(e){return e instanceof c?e:new c(this,e)},h.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},h.prototype.decodePoint=function(e){var t=(e=o.parseBytes(e)).length-1,r=e.slice(0,t).concat(-129&e[t]),n=0!=(128&e[t]),i=o.intFromLE(r);return this.curve.pointFromY(i,n)},h.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},h.prototype.decodeInt=function(e){return o.intFromLE(e)},h.prototype.isPoint=function(e){return e instanceof this.pointClass}},851:(e,t,r)=>{"use strict";var n=r(8288),i=n.assert,o=n.parseBytes,a=n.cachedProperty;function s(e,t){this.eddsa=e,this._secret=o(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=o(t.pub)}s.fromPublic=function(e,t){return t instanceof s?t:new s(e,{pub:t})},s.fromSecret=function(e,t){return t instanceof s?t:new s(e,{secret:t})},s.prototype.secret=function(){return this._secret},a(s,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),a(s,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),a(s,"privBytes",(function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,n=t.slice(0,e.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n})),a(s,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),a(s,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),a(s,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),s.prototype.sign=function(e){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},s.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},s.prototype.getSecret=function(e){return i(this._secret,"KeyPair is public only"),n.encode(this.secret(),e)},s.prototype.getPublic=function(e){return n.encode(this.pubBytes(),e)},e.exports=s},6117:(e,t,r)=>{"use strict";var n=r(2197),i=r(8288),o=i.assert,a=i.cachedProperty,s=i.parseBytes;function f(e,t){this.eddsa=e,"object"!=typeof t&&(t=s(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),o(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof n&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}a(f,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),a(f,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),a(f,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),a(f,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),f.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},f.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},e.exports=f},7983:e=>{e.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},8288:(e,t,r)=>{"use strict";var n=t,i=r(2197),o=r(9561),a=r(3022);n.assert=o,n.toArray=a.toArray,n.zero2=a.zero2,n.toHex=a.toHex,n.encode=a.encode,n.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<<t+1,o=e.clone(),a=0;a<n.length;a++){var s,f=o.andln(i-1);o.isOdd()?(s=f>(i>>1)-1?(i>>1)-f:f,o.isubn(s)):s=0,n[a]=s,o.iushrn(1)}return n},n.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var a,s,f=e.andln(3)+i&3,c=t.andln(3)+o&3;3===f&&(f=-1),3===c&&(c=-1),a=0==(1&f)?0:3!=(n=e.andln(7)+i&7)&&5!==n||2!==c?f:-f,r[0].push(a),s=0==(1&c)?0:3!=(n=t.andln(7)+o&7)&&5!==n||2!==f?c:-c,r[1].push(s),2*i===a+1&&(i=1-i),2*o===s+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new i(e,"hex","le")}},8797:(e,t,r)=>{var n=r(4406),i=r(9928),o=function(){},a=function(e,t,r){if("function"==typeof t)return a(e,null,t);t||(t={}),r=i(r||o);var s=e._writableState,f=e._readableState,c=t.readable||!1!==t.readable&&e.readable,h=t.writable||!1!==t.writable&&e.writable,d=!1,u=function(){e.writable||l()},l=function(){h=!1,c||r.call(e)},p=function(){c=!1,h||r.call(e)},b=function(t){r.call(e,t?new Error("exited with error code: "+t):null)},y=function(t){r.call(e,t)},g=function(){n.nextTick(m)},m=function(){if(!d)return(!c||f&&f.ended&&!f.destroyed)&&(!h||s&&s.ended&&!s.destroyed)?void 0:r.call(e,new Error("premature close"))},v=function(){e.req.on("finish",l)};return function(e){return e.setHeader&&"function"==typeof e.abort}(e)?(e.on("complete",l),e.on("abort",g),e.req?v():e.on("request",v)):h&&!s&&(e.on("end",u),e.on("close",u)),function(e){return e.stdio&&Array.isArray(e.stdio)&&3===e.stdio.length}(e)&&e.on("exit",b),e.on("end",p),e.on("finish",l),!1!==t.error&&e.on("error",y),e.on("close",g),function(){d=!0,e.removeListener("complete",l),e.removeListener("abort",g),e.removeListener("request",v),e.req&&e.req.removeListener("finish",l),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",l),e.removeListener("exit",b),e.removeListener("end",p),e.removeListener("error",y),e.removeListener("close",g)}};e.exports=a},4723:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumProviderError=t.EthereumRpcError=void 0;const n=r(7847);class i extends Error{constructor(e,t,r){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!t||"string"!=typeof t)throw new Error('"message" must be a nonempty string.');super(t),this.code=e,void 0!==r&&(this.data=r)}serialize(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),this.stack&&(e.stack=this.stack),e}toString(){return n.default(this.serialize(),o,2)}}function o(e,t){if("[Circular]"!==t)return t}t.EthereumRpcError=i,t.EthereumProviderError=class extends i{constructor(e,t,r){if(!function(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,r)}}},4792:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.errorValues=t.errorCodes=void 0,t.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},t.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}}},8159:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ethErrors=void 0;const n=r(4723),i=r(894),o=r(4792);function a(e,t){const[r,o]=f(t);return new n.EthereumRpcError(e,r||i.getMessageFromCode(e),o)}function s(e,t){const[r,o]=f(t);return new n.EthereumProviderError(e,r||i.getMessageFromCode(e),o)}function f(e){if(e){if("string"==typeof e)return[e];if("object"==typeof e&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&"string"!=typeof t)throw new Error("Must specify string message.");return[t||void 0,r]}}return[]}t.ethErrors={rpc:{parse:e=>a(o.errorCodes.rpc.parse,e),invalidRequest:e=>a(o.errorCodes.rpc.invalidRequest,e),invalidParams:e=>a(o.errorCodes.rpc.invalidParams,e),methodNotFound:e=>a(o.errorCodes.rpc.methodNotFound,e),internal:e=>a(o.errorCodes.rpc.internal,e),server:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return a(t,e)},invalidInput:e=>a(o.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>a(o.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>a(o.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>a(o.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>a(o.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>a(o.errorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>s(o.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>s(o.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>s(o.errorCodes.provider.unsupportedMethod,e),disconnected:e=>s(o.errorCodes.provider.disconnected,e),chainDisconnected:e=>s(o.errorCodes.provider.chainDisconnected,e),custom:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:r,data:i}=e;if(!r||"string"!=typeof r)throw new Error('"message" must be a nonempty string');return new n.EthereumProviderError(t,r,i)}}}},8094:(e,t,r)=>{"use strict";r(4723),r(894),r(8159),r(4792)},894:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeError=t.isValidCode=t.getMessageFromCode=t.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const n=r(4792),i=r(4723),o=n.errorCodes.rpc.internal,a="Unspecified error message. This is a bug, please report it.",s={code:o,message:f(o)};function f(e,r=a){if(Number.isInteger(e)){const r=e.toString();if(u(n.errorValues,r))return n.errorValues[r].message;if(h(e))return t.JSON_RPC_SERVER_ERROR_MESSAGE}return r}function c(e){if(!Number.isInteger(e))return!1;const t=e.toString();return!!n.errorValues[t]||!!h(e)}function h(e){return e>=-32099&&e<=-32e3}function d(e){return e&&"object"==typeof e&&!Array.isArray(e)?Object.assign({},e):e}function u(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",t.getMessageFromCode=f,t.isValidCode=c,t.serializeError=function(e,{fallbackError:t=s,shouldIncludeStack:r=!1}={}){var n,o;if(!t||!Number.isInteger(t.code)||"string"!=typeof t.message)throw new Error("Must provide fallback error with integer number code and string message.");if(e instanceof i.EthereumRpcError)return e.serialize();const a={};if(e&&"object"==typeof e&&!Array.isArray(e)&&u(e,"code")&&c(e.code)){const t=e;a.code=t.code,t.message&&"string"==typeof t.message?(a.message=t.message,u(t,"data")&&(a.data=t.data)):(a.message=f(a.code),a.data={originalError:d(e)})}else{a.code=t.code;const r=null===(n=e)||void 0===n?void 0:n.message;a.message=r&&"string"==typeof r?r:t.message,a.data={originalError:d(e)}}const h=null===(o=e)||void 0===o?void 0:o.stack;return r&&e&&h&&"string"==typeof h&&(a.stack=h),a}},2699:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}b(e,t,o,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&b(e,"error",t,{once:!0})}(e,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var a=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function f(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function c(e,t,r,n){var i,o,a,c;if(s(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),a=o[t]),void 0===a)a=o[t]=r,++e._eventsCount;else if("function"==typeof a?a=o[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=f(e))>0&&a.length>i&&!a.warned){a.warned=!0;var h=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");h.name="MaxListenersExceededWarning",h.emitter=e,h.type=t,h.count=a.length,c=h,console&&console.warn&&console.warn(c)}return e}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=h.bind(n);return i.listener=r,n.wrapFn=i,i}function u(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):p(i,i.length)}function l(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function b(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){n.once&&e.removeEventListener(t,i),r(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return f(this)},o.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var f=o[e];if(void 0===f)return!1;if("function"==typeof f)n(f,this,t);else{var c=f.length,h=p(f,c);for(r=0;r<c;++r)n(h[r],this,t)}return!0},o.prototype.addListener=function(e,t){return c(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return c(this,e,t,!0)},o.prototype.once=function(e,t){return s(t),this.on(e,d(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,d(this,e,t)),this},o.prototype.removeListener=function(e,t){var r,n,i,o,a;if(s(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,a||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return u(this,e,!0)},o.prototype.rawListeners=function(e){return u(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):l.call(e,t)},o.prototype.listenerCount=l,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},9341:(e,t,r)=>{var n=r(7834).Buffer,i=r(7993);e.exports=function(e,t,r,o){if(n.isBuffer(e)||(e=n.from(e,"binary")),t&&(n.isBuffer(t)||(t=n.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var a=r/8,s=n.alloc(a),f=n.alloc(o||0),c=n.alloc(0);a>0||o>0;){var h=new i;h.update(c),h.update(e),t&&h.update(t),c=h.digest();var d=0;if(a>0){var u=s.length-a;d=Math.min(a,c.length),c.copy(s,u,0,d),a-=d}if(d<c.length&&o>0){var l=f.length-o,p=Math.min(o,c.length-d);c.copy(f,l,d,d+p),o-=p}}return c.fill(0),{key:s,iv:f}}},7847:e=>{e.exports=a,a.default=a,a.stable=h,a.stableStringify=h;var t="[...]",r="[Circular]",n=[],i=[];function o(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function a(e,t,r,a){var s;void 0===a&&(a=o()),f(e,"",0,[],void 0,0,a);try{s=0===i.length?JSON.stringify(e,t,r):JSON.stringify(e,u(t),r)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var c=n.pop();4===c.length?Object.defineProperty(c[0],c[1],c[3]):c[0][c[1]]=c[2]}}return s}function s(e,t,r,o){var a=Object.getOwnPropertyDescriptor(o,r);void 0!==a.get?a.configurable?(Object.defineProperty(o,r,{value:e}),n.push([o,r,t,a])):i.push([t,r,e]):(o[r]=e,n.push([o,r,t]))}function f(e,n,i,o,a,c,h){var d;if(c+=1,"object"==typeof e&&null!==e){for(d=0;d<o.length;d++)if(o[d]===e)return void s(r,e,n,a);if(void 0!==h.depthLimit&&c>h.depthLimit)return void s(t,e,n,a);if(void 0!==h.edgesLimit&&i+1>h.edgesLimit)return void s(t,e,n,a);if(o.push(e),Array.isArray(e))for(d=0;d<e.length;d++)f(e[d],d,d,o,e,c,h);else{var u=Object.keys(e);for(d=0;d<u.length;d++){var l=u[d];f(e[l],l,d,o,e,c,h)}}o.pop()}}function c(e,t){return e<t?-1:e>t?1:0}function h(e,t,r,a){void 0===a&&(a=o());var s,f=d(e,"",0,[],void 0,0,a)||e;try{s=0===i.length?JSON.stringify(f,t,r):JSON.stringify(f,u(t),r)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var c=n.pop();4===c.length?Object.defineProperty(c[0],c[1],c[3]):c[0][c[1]]=c[2]}}return s}function d(e,i,o,a,f,h,u){var l;if(h+=1,"object"==typeof e&&null!==e){for(l=0;l<a.length;l++)if(a[l]===e)return void s(r,e,i,f);try{if("function"==typeof e.toJSON)return}catch(e){return}if(void 0!==u.depthLimit&&h>u.depthLimit)return void s(t,e,i,f);if(void 0!==u.edgesLimit&&o+1>u.edgesLimit)return void s(t,e,i,f);if(a.push(e),Array.isArray(e))for(l=0;l<e.length;l++)d(e[l],l,l,a,e,h,u);else{var p={},b=Object.keys(e).sort(c);for(l=0;l<b.length;l++){var y=b[l];d(e[y],y,l,a,e,h,u),p[y]=e[y]}if(void 0===f)return p;n.push([f,i,e]),f[i]=p}a.pop()}}function u(e){return e=void 0!==e?e:function(e,t){return t},function(t,r){if(i.length>0)for(var n=0;n<i.length;n++){var o=i[n];if(o[1]===t&&o[0]===r){r=o[2],i.splice(n,1);break}}return e.call(this,t,r)}}},5232:(e,t,r)=>{"use strict";var n=r(7834).Buffer,i=r(7525).Transform;function o(e){i.call(this),this._block=n.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(1285)(o,i),o.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)},o.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},o.prototype.update=function(e,t){if(function(e,t){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer")}(e),this._finalized)throw new Error("Digest already called");n.isBuffer(e)||(e=n.from(e,t));for(var r=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var o=this._blockOffset;o<this._blockSize;)r[o++]=e[i++];this._update(),this._blockOffset=0}for(;i<e.length;)r[this._blockOffset++]=e[i++];for(var a=0,s=8*e.length;s>0;++a)this._length[a]+=s,(s=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*s);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},o.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=o},4485:(e,t,r)=>{var n=t;n.utils=r(212),n.common=r(4495),n.sha=r(5530),n.ripemd=r(1396),n.hmac=r(5047),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},4495:(e,t,r)=>{"use strict";var n=r(212),i=r(9561);function o(){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}t.BlockHash=o,o.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i<e.length;i+=this._delta32)this._update(e,i,i+this._delta32)}return this},o.prototype.digest=function(e){return this.update(this._pad()),i(null===this.pending),this._digest(e)},o.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,r=t-(e+this.padLength)%t,n=new Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=e>>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o<this.padLength;o++)n[i++]=0;return n}},5047:(e,t,r)=>{"use strict";var n=r(212),i=r(9561);function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,r))}e.exports=o,o.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},o.prototype.update=function(e,t){return this.inner.update(e,t),this},o.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}},1396:(e,t,r)=>{"use strict";var n=r(212),i=r(4495),o=n.rotl32,a=n.sum32,s=n.sum32_3,f=n.sum32_4,c=i.BlockHash;function h(){if(!(this instanceof h))return new h;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function d(e,t,r,n){return e<=15?t^r^n:e<=31?t&r|~t&n:e<=47?(t|~r)^n:e<=63?t&n|r&~n:t^(r|~n)}function u(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function l(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}n.inherits(h,c),t.ripemd160=h,h.blockSize=512,h.outSize=160,h.hmacStrength=192,h.padLength=64,h.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],i=this.h[2],c=this.h[3],h=this.h[4],m=r,v=n,_=i,w=c,S=h,E=0;E<80;E++){var A=a(o(f(r,d(E,n,i,c),e[p[E]+t],u(E)),y[E]),h);r=h,h=c,c=o(i,10),i=n,n=A,A=a(o(f(m,d(79-E,v,_,w),e[b[E]+t],l(E)),g[E]),S),m=S,S=w,w=o(_,10),_=v,v=A}A=s(this.h[1],i,w),this.h[1]=s(this.h[2],c,S),this.h[2]=s(this.h[3],h,m),this.h[3]=s(this.h[4],r,v),this.h[4]=s(this.h[0],n,_),this.h[0]=A},h.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var p=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],b=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],y=[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],g=[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]},5530:(e,t,r)=>{"use strict";t.sha1=r(5079),t.sha224=r(3823),t.sha256=r(8032),t.sha384=r(5328),t.sha512=r(168)},5079:(e,t,r)=>{"use strict";var n=r(212),i=r(4495),o=r(713),a=n.rotl32,s=n.sum32,f=n.sum32_5,c=o.ft_1,h=i.BlockHash,d=[1518500249,1859775393,2400959708,3395469782];function u(){if(!(this instanceof u))return new u;h.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(u,h),e.exports=u,u.blockSize=512,u.outSize=160,u.hmacStrength=80,u.padLength=64,u.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=a(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var i=this.h[0],o=this.h[1],h=this.h[2],u=this.h[3],l=this.h[4];for(n=0;n<r.length;n++){var p=~~(n/20),b=f(a(i,5),c(p,o,h,u),l,r[n],d[p]);l=u,u=h,h=a(o,30),o=i,i=b}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],h),this.h[3]=s(this.h[3],u),this.h[4]=s(this.h[4],l)},u.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},3823:(e,t,r)=>{"use strict";var n=r(212),i=r(8032);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},8032:(e,t,r)=>{"use strict";var n=r(212),i=r(4495),o=r(713),a=r(9561),s=n.sum32,f=n.sum32_4,c=n.sum32_5,h=o.ch32,d=o.maj32,u=o.s0_256,l=o.s1_256,p=o.g0_256,b=o.g1_256,y=i.BlockHash,g=[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 m(){if(!(this instanceof m))return new m;y.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=g,this.W=new Array(64)}n.inherits(m,y),e.exports=m,m.blockSize=512,m.outSize=256,m.hmacStrength=192,m.padLength=64,m.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=f(b(r[n-2]),r[n-7],p(r[n-15]),r[n-16]);var i=this.h[0],o=this.h[1],y=this.h[2],g=this.h[3],m=this.h[4],v=this.h[5],_=this.h[6],w=this.h[7];for(a(this.k.length===r.length),n=0;n<r.length;n++){var S=c(w,l(m),h(m,v,_),this.k[n],r[n]),E=s(u(i),d(i,o,y));w=_,_=v,v=m,m=s(g,S),g=y,y=o,o=i,i=s(S,E)}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],y),this.h[3]=s(this.h[3],g),this.h[4]=s(this.h[4],m),this.h[5]=s(this.h[5],v),this.h[6]=s(this.h[6],_),this.h[7]=s(this.h[7],w)},m.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},5328:(e,t,r)=>{"use strict";var n=r(212),i=r(168);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},168:(e,t,r)=>{"use strict";var n=r(212),i=r(4495),o=r(9561),a=n.rotr64_hi,s=n.rotr64_lo,f=n.shr64_hi,c=n.shr64_lo,h=n.sum64,d=n.sum64_hi,u=n.sum64_lo,l=n.sum64_4_hi,p=n.sum64_4_lo,b=n.sum64_5_hi,y=n.sum64_5_lo,g=i.BlockHash,m=[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 v(){if(!(this instanceof v))return new v;g.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=m,this.W=new Array(160)}function _(e,t,r,n,i){var o=e&r^~e&i;return o<0&&(o+=4294967296),o}function w(e,t,r,n,i,o){var a=t&n^~t&o;return a<0&&(a+=4294967296),a}function S(e,t,r,n,i){var o=e&r^e&i^r&i;return o<0&&(o+=4294967296),o}function E(e,t,r,n,i,o){var a=t&n^t&o^n&o;return a<0&&(a+=4294967296),a}function A(e,t){var r=a(e,t,28)^a(t,e,2)^a(t,e,7);return r<0&&(r+=4294967296),r}function M(e,t){var r=s(e,t,28)^s(t,e,2)^s(t,e,7);return r<0&&(r+=4294967296),r}function k(e,t){var r=s(e,t,14)^s(e,t,18)^s(t,e,9);return r<0&&(r+=4294967296),r}function I(e,t){var r=a(e,t,1)^a(e,t,8)^f(e,t,7);return r<0&&(r+=4294967296),r}function R(e,t){var r=s(e,t,1)^s(e,t,8)^c(e,t,7);return r<0&&(r+=4294967296),r}function x(e,t){var r=s(e,t,19)^s(t,e,29)^c(e,t,6);return r<0&&(r+=4294967296),r}n.inherits(v,g),e.exports=v,v.blockSize=1024,v.outSize=512,v.hmacStrength=192,v.padLength=128,v.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n<r.length;n+=2){var i=(y=r[n-4],g=r[n-3],m=void 0,(m=a(y,g,19)^a(g,y,29)^f(y,g,6))<0&&(m+=4294967296),m),o=x(r[n-4],r[n-3]),s=r[n-14],c=r[n-13],h=I(r[n-30],r[n-29]),d=R(r[n-30],r[n-29]),u=r[n-32],b=r[n-31];r[n]=l(i,o,s,c,h,d,u,b),r[n+1]=p(i,o,s,c,h,d,u,b)}var y,g,m},v.prototype._update=function(e,t){this._prepareBlock(e,t);var r,n,i,s=this.W,f=this.h[0],c=this.h[1],l=this.h[2],p=this.h[3],g=this.h[4],m=this.h[5],v=this.h[6],I=this.h[7],R=this.h[8],x=this.h[9],B=this.h[10],O=this.h[11],C=this.h[12],N=this.h[13],T=this.h[14],P=this.h[15];o(this.k.length===s.length);for(var j=0;j<s.length;j+=2){var L=T,D=P,U=(i=void 0,(i=a(r=R,n=x,14)^a(r,n,18)^a(n,r,9))<0&&(i+=4294967296),i),z=k(R,x),q=_(R,0,B,0,C),F=w(0,x,0,O,0,N),K=this.k[j],H=this.k[j+1],W=s[j],V=s[j+1],G=b(L,D,U,z,q,F,K,H,W,V),J=y(L,D,U,z,q,F,K,H,W,V);L=A(f,c),D=M(f,c),U=S(f,0,l,0,g),z=E(0,c,0,p,0,m);var $=d(L,D,U,z),X=u(L,D,U,z);T=C,P=N,C=B,N=O,B=R,O=x,R=d(v,I,G,J),x=u(I,I,G,J),v=g,I=m,g=l,m=p,l=f,p=c,f=d(G,J,$,X),c=u(G,J,$,X)}h(this.h,0,f,c),h(this.h,2,l,p),h(this.h,4,g,m),h(this.h,6,v,I),h(this.h,8,R,x),h(this.h,10,B,O),h(this.h,12,C,N),h(this.h,14,T,P)},v.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},713:(e,t,r)=>{"use strict";var n=r(212).rotr32;function i(e,t,r){return e&t^~e&r}function o(e,t,r){return e&t^e&r^t&r}function a(e,t,r){return e^t^r}t.ft_1=function(e,t,r,n){return 0===e?i(t,r,n):1===e||3===e?a(t,r,n):2===e?o(t,r,n):void 0},t.ch32=i,t.maj32=o,t.p32=a,t.s0_256=function(e){return n(e,2)^n(e,13)^n(e,22)},t.s1_256=function(e){return n(e,6)^n(e,11)^n(e,25)},t.g0_256=function(e){return n(e,7)^n(e,18)^e>>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},212:(e,t,r)=>{"use strict";var n=r(9561),i=r(1285);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1))}function a(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function f(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i<e.length;i+=2)r.push(parseInt(e[i]+e[i+1],16))}else for(var n=0,i=0;i<e.length;i++){var a=e.charCodeAt(i);a<128?r[n++]=a:a<2048?(r[n++]=a>>6|192,r[n++]=63&a|128):o(e,i)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++i)),r[n++]=a>>18|240,r[n++]=a>>12&63|128,r[n++]=a>>6&63|128,r[n++]=63&a|128):(r[n++]=a>>12|224,r[n++]=a>>6&63|128,r[n++]=63&a|128)}else for(i=0;i<e.length;i++)r[i]=0|e[i];return r},t.toHex=function(e){for(var t="",r=0;r<e.length;r++)t+=s(e[r].toString(16));return t},t.htonl=a,t.toHex32=function(e,t){for(var r="",n=0;n<e.length;n++){var i=e[n];"little"===t&&(i=a(i)),r+=f(i.toString(16))}return r},t.zero2=s,t.zero8=f,t.join32=function(e,t,r,i){var o=r-t;n(o%4==0);for(var a=new Array(o/4),s=0,f=t;s<a.length;s++,f+=4){var c;c="big"===i?e[f]<<24|e[f+1]<<16|e[f+2]<<8|e[f+3]:e[f+3]<<24|e[f+2]<<16|e[f+1]<<8|e[f],a[s]=c>>>0}return a},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n<e.length;n++,i+=4){var o=e[n];"big"===t?(r[i]=o>>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,a=(o<n?1:0)+r+i;e[t]=a>>>0,e[t+1]=o},t.sum64_hi=function(e,t,r,n){return(t+n>>>0<t?1:0)+e+r>>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,o,a,s){var f=0,c=t;return f+=(c=c+n>>>0)<t?1:0,f+=(c=c+o>>>0)<o?1:0,e+r+i+a+(f+=(c=c+s>>>0)<s?1:0)>>>0},t.sum64_4_lo=function(e,t,r,n,i,o,a,s){return t+n+o+s>>>0},t.sum64_5_hi=function(e,t,r,n,i,o,a,s,f,c){var h=0,d=t;return h+=(d=d+n>>>0)<t?1:0,h+=(d=d+o>>>0)<o?1:0,h+=(d=d+s>>>0)<s?1:0,e+r+i+a+f+(h+=(d=d+c>>>0)<c?1:0)>>>0},t.sum64_5_lo=function(e,t,r,n,i,o,a,s,f,c){return t+n+o+s+c>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},8873:(e,t,r)=>{"use strict";var n=r(4485),i=r(3022),o=r(9561);function a(e){if(!(this instanceof a))return new a(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}e.exports=a,a.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},a.prototype._hmac=function(){return new n.hmac(this.hash,this.K)},a.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},a.prototype.reseed=function(e,t,r,n){"string"!=typeof t&&(n=r,r=t,t=null),e=i.toArray(e,t),r=i.toArray(r,n),o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},a.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length<e;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);var a=o.slice(0,e);return this._update(r),this._reseed++,i.encode(a,t)}},2333:(e,t)=>{t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,f=(1<<s)-1,c=f>>1,h=-7,d=r?i-1:0,u=r?-1:1,l=e[t+d];for(d+=u,o=l&(1<<-h)-1,l>>=-h,h+=s;h>0;o=256*o+e[t+d],d+=u,h-=8);for(a=o&(1<<-h)-1,o>>=-h,h+=n;h>0;a=256*a+e[t+d],d+=u,h-=8);if(0===o)o=1-c;else{if(o===f)return a?NaN:1/0*(l?-1:1);a+=Math.pow(2,n),o-=c}return(l?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,f,c=8*o-i-1,h=(1<<c)-1,d=h>>1,u=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,l=n?0:o-1,p=n?1:-1,b=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=h):(a=Math.floor(Math.log(t)/Math.LN2),t*(f=Math.pow(2,-a))<1&&(a--,f*=2),(t+=a+d>=1?u/f:u*Math.pow(2,1-d))*f>=2&&(a++,f/=2),a+d>=h?(s=0,a=h):a+d>=1?(s=(t*f-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[r+l]=255&s,l+=p,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;e[r+l]=255&a,l+=p,a/=256,c-=8);e[r+l-p]|=128*b}},1285:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},7270:(e,t,r)=>{e.exports=r(3249)(r(5270))},3249:(e,t,r)=>{const n=r(2532),i=r(4255);e.exports=function(e){const t=n(e),r=i(e);return function(e,n){switch("string"==typeof e?e.toLowerCase():e){case"keccak224":return new t(1152,448,null,224,n);case"keccak256":return new t(1088,512,null,256,n);case"keccak384":return new t(832,768,null,384,n);case"keccak512":return new t(576,1024,null,512,n);case"sha3-224":return new t(1152,448,6,224,n);case"sha3-256":return new t(1088,512,6,256,n);case"sha3-384":return new t(832,768,6,384,n);case"sha3-512":return new t(576,1024,6,512,n);case"shake128":return new r(1344,256,31,n);case"shake256":return new r(1088,512,31,n);default:throw new Error("Invald algorithm: "+e)}}}},2532:(e,t,r)=>{var n=r(8834).Buffer;const{Transform:i}=r(7525);e.exports=e=>class t extends i{constructor(t,r,n,i,o){super(o),this._rate=t,this._capacity=r,this._delimitedSuffix=n,this._hashBitLength=i,this._options=o,this._state=new e,this._state.initialize(t,r),this._finalized=!1}_transform(e,t,r){let n=null;try{this.update(e,t)}catch(e){n=e}r(n)}_flush(e){let t=null;try{this.push(this.digest())}catch(e){t=e}e(t)}update(e,t){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return n.isBuffer(e)||(e=n.from(e,t)),this._state.absorb(e),this}digest(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let t=this._state.squeeze(this._hashBitLength/8);return void 0!==e&&(t=t.toString(e)),this._resetState(),t}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const e=new t(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e}}},4255:(e,t,r)=>{var n=r(8834).Buffer;const{Transform:i}=r(7525);e.exports=e=>class t extends i{constructor(t,r,n,i){super(i),this._rate=t,this._capacity=r,this._delimitedSuffix=n,this._options=i,this._state=new e,this._state.initialize(t,r),this._finalized=!1}_transform(e,t,r){let n=null;try{this.update(e,t)}catch(e){n=e}r(n)}_flush(){}_read(e){this.push(this.squeeze(e))}update(e,t){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return n.isBuffer(e)||(e=n.from(e,t)),this._state.absorb(e),this}squeeze(e,t){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let r=this._state.squeeze(e);return void 0!==t&&(r=r.toString(t)),r}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const e=new t(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e}}},3877:(e,t)=>{const r=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];t.p1600=function(e){for(let t=0;t<24;++t){const n=e[0]^e[10]^e[20]^e[30]^e[40],i=e[1]^e[11]^e[21]^e[31]^e[41],o=e[2]^e[12]^e[22]^e[32]^e[42],a=e[3]^e[13]^e[23]^e[33]^e[43],s=e[4]^e[14]^e[24]^e[34]^e[44],f=e[5]^e[15]^e[25]^e[35]^e[45],c=e[6]^e[16]^e[26]^e[36]^e[46],h=e[7]^e[17]^e[27]^e[37]^e[47],d=e[8]^e[18]^e[28]^e[38]^e[48],u=e[9]^e[19]^e[29]^e[39]^e[49];let l=d^(o<<1|a>>>31),p=u^(a<<1|o>>>31);const b=e[0]^l,y=e[1]^p,g=e[10]^l,m=e[11]^p,v=e[20]^l,_=e[21]^p,w=e[30]^l,S=e[31]^p,E=e[40]^l,A=e[41]^p;l=n^(s<<1|f>>>31),p=i^(f<<1|s>>>31);const M=e[2]^l,k=e[3]^p,I=e[12]^l,R=e[13]^p,x=e[22]^l,B=e[23]^p,O=e[32]^l,C=e[33]^p,N=e[42]^l,T=e[43]^p;l=o^(c<<1|h>>>31),p=a^(h<<1|c>>>31);const P=e[4]^l,j=e[5]^p,L=e[14]^l,D=e[15]^p,U=e[24]^l,z=e[25]^p,q=e[34]^l,F=e[35]^p,K=e[44]^l,H=e[45]^p;l=s^(d<<1|u>>>31),p=f^(u<<1|d>>>31);const W=e[6]^l,V=e[7]^p,G=e[16]^l,J=e[17]^p,$=e[26]^l,X=e[27]^p,Y=e[36]^l,Z=e[37]^p,Q=e[46]^l,ee=e[47]^p;l=c^(n<<1|i>>>31),p=h^(i<<1|n>>>31);const te=e[8]^l,re=e[9]^p,ne=e[18]^l,ie=e[19]^p,oe=e[28]^l,ae=e[29]^p,se=e[38]^l,fe=e[39]^p,ce=e[48]^l,he=e[49]^p,de=b,ue=y,le=m<<4|g>>>28,pe=g<<4|m>>>28,be=v<<3|_>>>29,ye=_<<3|v>>>29,ge=S<<9|w>>>23,me=w<<9|S>>>23,ve=E<<18|A>>>14,_e=A<<18|E>>>14,we=M<<1|k>>>31,Se=k<<1|M>>>31,Ee=R<<12|I>>>20,Ae=I<<12|R>>>20,Me=x<<10|B>>>22,ke=B<<10|x>>>22,Ie=C<<13|O>>>19,Re=O<<13|C>>>19,xe=N<<2|T>>>30,Be=T<<2|N>>>30,Oe=j<<30|P>>>2,Ce=P<<30|j>>>2,Ne=L<<6|D>>>26,Te=D<<6|L>>>26,Pe=z<<11|U>>>21,je=U<<11|z>>>21,Le=q<<15|F>>>17,De=F<<15|q>>>17,Ue=H<<29|K>>>3,ze=K<<29|H>>>3,qe=W<<28|V>>>4,Fe=V<<28|W>>>4,Ke=J<<23|G>>>9,He=G<<23|J>>>9,We=$<<25|X>>>7,Ve=X<<25|$>>>7,Ge=Y<<21|Z>>>11,Je=Z<<21|Y>>>11,$e=ee<<24|Q>>>8,Xe=Q<<24|ee>>>8,Ye=te<<27|re>>>5,Ze=re<<27|te>>>5,Qe=ne<<20|ie>>>12,et=ie<<20|ne>>>12,tt=ae<<7|oe>>>25,rt=oe<<7|ae>>>25,nt=se<<8|fe>>>24,it=fe<<8|se>>>24,ot=ce<<14|he>>>18,at=he<<14|ce>>>18;e[0]=de^~Ee&Pe,e[1]=ue^~Ae&je,e[10]=qe^~Qe&be,e[11]=Fe^~et&ye,e[20]=we^~Ne&We,e[21]=Se^~Te&Ve,e[30]=Ye^~le&Me,e[31]=Ze^~pe&ke,e[40]=Oe^~Ke&tt,e[41]=Ce^~He&rt,e[2]=Ee^~Pe&Ge,e[3]=Ae^~je&Je,e[12]=Qe^~be&Ie,e[13]=et^~ye&Re,e[22]=Ne^~We&nt,e[23]=Te^~Ve&it,e[32]=le^~Me&Le,e[33]=pe^~ke&De,e[42]=Ke^~tt&ge,e[43]=He^~rt&me,e[4]=Pe^~Ge&ot,e[5]=je^~Je&at,e[14]=be^~Ie&Ue,e[15]=ye^~Re&ze,e[24]=We^~nt&ve,e[25]=Ve^~it&_e,e[34]=Me^~Le&$e,e[35]=ke^~De&Xe,e[44]=tt^~ge&xe,e[45]=rt^~me&Be,e[6]=Ge^~ot&de,e[7]=Je^~at&ue,e[16]=Ie^~Ue&qe,e[17]=Re^~ze&Fe,e[26]=nt^~ve&we,e[27]=it^~_e&Se,e[36]=Le^~$e&Ye,e[37]=De^~Xe&Ze,e[46]=ge^~xe&Oe,e[47]=me^~Be&Ce,e[8]=ot^~de&Ee,e[9]=at^~ue&Ae,e[18]=Ue^~qe&Qe,e[19]=ze^~Fe&et,e[28]=ve^~we&Ne,e[29]=_e^~Se&Te,e[38]=$e^~Ye&le,e[39]=Xe^~Ze&pe,e[48]=xe^~Oe&Ke,e[49]=Be^~Ce&He,e[0]^=r[2*t],e[1]^=r[2*t+1]}}},5270:(e,t,r)=>{var n=r(8834).Buffer;const i=r(3877);function o(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}o.prototype.initialize=function(e,t){for(let e=0;e<50;++e)this.state[e]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1},o.prototype.absorb=function(e){for(let t=0;t<e.length;++t)this.state[~~(this.count/4)]^=e[t]<<this.count%4*8,this.count+=1,this.count===this.blockSize&&(i.p1600(this.state),this.count=0)},o.prototype.absorbLastFewBits=function(e){this.state[~~(this.count/4)]^=e<<this.count%4*8,0!=(128&e)&&this.count===this.blockSize-1&&i.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<(this.blockSize-1)%4*8,i.p1600(this.state),this.count=0,this.squeezing=!0},o.prototype.squeeze=function(e){this.squeezing||this.absorbLastFewBits(1);const t=n.alloc(e);for(let r=0;r<e;++r)t[r]=this.state[~~(this.count/4)]>>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(i.p1600(this.state),this.count=0);return t},o.prototype.copy=function(e){for(let t=0;t<50;++t)e.state[t]=this.state[t];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing},e.exports=o},1344:(e,t,r)=>{e=r.nmd(e);var n="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",a="[object AsyncFunction]",s="[object Function]",f="[object GeneratorFunction]",c="[object Null]",h="[object Object]",d="[object Proxy]",u="[object Undefined]",l=/^\[object .+?Constructor\]$/,p=/^(?:0|[1-9]\d*)$/,b={};b["[object Float32Array]"]=b["[object Float64Array]"]=b["[object Int8Array]"]=b["[object Int16Array]"]=b["[object Int32Array]"]=b["[object Uint8Array]"]=b["[object Uint8ClampedArray]"]=b["[object Uint16Array]"]=b["[object Uint32Array]"]=!0,b[o]=b["[object Array]"]=b["[object ArrayBuffer]"]=b["[object Boolean]"]=b["[object DataView]"]=b["[object Date]"]=b["[object Error]"]=b[s]=b["[object Map]"]=b["[object Number]"]=b[h]=b["[object RegExp]"]=b["[object Set]"]=b["[object String]"]=b["[object WeakMap]"]=!1;var y,g,m,v="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,_="object"==typeof self&&self&&self.Object===Object&&self,w=v||_||Function("return this")(),S=t&&!t.nodeType&&t,E=S&&e&&!e.nodeType&&e,A=E&&E.exports===S,M=A&&v.process,k=function(){try{return E&&E.require&&E.require("util").types||M&&M.binding&&M.binding("util")}catch(e){}}(),I=k&&k.isTypedArray,R=Array.prototype,x=Function.prototype,B=Object.prototype,O=w["__core-js_shared__"],C=x.toString,N=B.hasOwnProperty,T=(y=/[^.]+$/.exec(O&&O.keys&&O.keys.IE_PROTO||""))?"Symbol(src)_1."+y:"",P=B.toString,j=C.call(Object),L=RegExp("^"+C.call(N).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),D=A?w.Buffer:void 0,U=w.Symbol,z=w.Uint8Array,q=(D&&D.allocUnsafe,g=Object.getPrototypeOf,m=Object,function(e){return g(m(e))}),F=Object.create,K=B.propertyIsEnumerable,H=R.splice,W=U?U.toStringTag:void 0,V=function(){try{var e=le(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),G=D?D.isBuffer:void 0,J=Math.max,$=Date.now,X=le(w,"Map"),Y=le(Object,"create"),Z=function(){function e(){}return function(t){if(!Me(t))return{};if(F)return F(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function Q(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ee(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function te(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function re(e){var t=this.__data__=new ee(e);this.size=t.size}function ne(e,t,r){(void 0!==r&&!me(e[t],r)||void 0===r&&!(t in e))&&ae(e,t,r)}function ie(e,t,r){var n=e[t];N.call(e,t)&&me(n,r)&&(void 0!==r||t in e)||ae(e,t,r)}function oe(e,t){for(var r=e.length;r--;)if(me(e[r][0],t))return r;return-1}function ae(e,t,r){"__proto__"==t&&V?V(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}Q.prototype.clear=function(){this.__data__=Y?Y(null):{},this.size=0},Q.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Q.prototype.get=function(e){var t=this.__data__;if(Y){var r=t[e];return r===n?void 0:r}return N.call(t,e)?t[e]:void 0},Q.prototype.has=function(e){var t=this.__data__;return Y?void 0!==t[e]:N.call(t,e)},Q.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Y&&void 0===t?n:t,this},ee.prototype.clear=function(){this.__data__=[],this.size=0},ee.prototype.delete=function(e){var t=this.__data__,r=oe(t,e);return!(r<0||(r==t.length-1?t.pop():H.call(t,r,1),--this.size,0))},ee.prototype.get=function(e){var t=this.__data__,r=oe(t,e);return r<0?void 0:t[r][1]},ee.prototype.has=function(e){return oe(this.__data__,e)>-1},ee.prototype.set=function(e,t){var r=this.__data__,n=oe(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},te.prototype.clear=function(){this.size=0,this.__data__={hash:new Q,map:new(X||ee),string:new Q}},te.prototype.delete=function(e){var t=ue(this,e).delete(e);return this.size-=t?1:0,t},te.prototype.get=function(e){return ue(this,e).get(e)},te.prototype.has=function(e){return ue(this,e).has(e)},te.prototype.set=function(e,t){var r=ue(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},re.prototype.clear=function(){this.__data__=new ee,this.size=0},re.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},re.prototype.get=function(e){return this.__data__.get(e)},re.prototype.has=function(e){return this.__data__.has(e)},re.prototype.set=function(e,t){var r=this.__data__;if(r instanceof ee){var n=r.__data__;if(!X||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new te(n)}return r.set(e,t),this.size=r.size,this};var se=function(e,t,r){for(var n=-1,i=Object(e),o=r(e),a=o.length;a--;){var s=o[++n];if(!1===t(i[s],s,i))break}return e};function fe(e){return null==e?void 0===e?u:c:W&&W in Object(e)?function(e){var t=N.call(e,W),r=e[W];try{e[W]=void 0;var n=!0}catch(e){}var i=P.call(e);return n&&(t?e[W]=r:delete e[W]),i}(e):function(e){return P.call(e)}(e)}function ce(e){return ke(e)&&fe(e)==o}function he(e,t,r,n,i){e!==t&&se(t,(function(o,a){if(i||(i=new re),Me(o))!function(e,t,r,n,i,o,a){var s=ye(e,r),f=ye(t,r),c=a.get(f);if(c)ne(e,r,c);else{var d,u,l,p,b,y=o?o(s,f,r+"",e,t,a):void 0,g=void 0===y;if(g){var m=_e(f),v=!m&&Se(f),_=!m&&!v&&Ie(f);y=f,m||v||_?_e(s)?y=s:ke(b=s)&&we(b)?y=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}(s):v?(g=!1,y=function(e,t){return e.slice()}(f)):_?(g=!1,p=new(l=(d=f).buffer).constructor(l.byteLength),new z(p).set(new z(l)),u=p,y=new d.constructor(u,d.byteOffset,d.length)):y=[]:function(e){if(!ke(e)||fe(e)!=h)return!1;var t=q(e);if(null===t)return!0;var r=N.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&C.call(r)==j}(f)||ve(f)?(y=s,ve(s)?y=function(e){return function(e,t,r,n){var i=!r;r||(r={});for(var o=-1,a=t.length;++o<a;){var s=t[o],f=void 0;void 0===f&&(f=e[s]),i?ae(r,s,f):ie(r,s,f)}return r}(e,Re(e))}(s):Me(s)&&!Ee(s)||(y=function(e){return"function"!=typeof e.constructor||be(e)?{}:Z(q(e))}(f))):g=!1}g&&(a.set(f,y),i(y,f,n,o,a),a.delete(f)),ne(e,r,y)}}(e,t,a,r,he,n,i);else{var s=n?n(ye(e,a),o,a+"",e,t,i):void 0;void 0===s&&(s=o),ne(e,a,s)}}),Re)}var de=V?function(e,t){return V(e,"toString",{configurable:!0,enumerable:!1,value:(r=t,function(){return r}),writable:!0});var r}:Oe;function ue(e,t){var r,n,i=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof t?"string":"hash"]:i.map}function le(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!Me(e)||function(e){return!!T&&T in e}(e))&&(Ee(e)?L:l).test(function(e){if(null!=e){try{return C.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(r)?r:void 0}function pe(e,t){var r=typeof e;return!!(t=null==t?i:t)&&("number"==r||"symbol"!=r&&p.test(e))&&e>-1&&e%1==0&&e<t}function be(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||B)}function ye(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var ge=function(e){var t=0,r=0;return function(){var n=$(),i=16-(n-r);if(r=n,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(de);function me(e,t){return e===t||e!=e&&t!=t}var ve=ce(function(){return arguments}())?ce:function(e){return ke(e)&&N.call(e,"callee")&&!K.call(e,"callee")},_e=Array.isArray;function we(e){return null!=e&&Ae(e.length)&&!Ee(e)}var Se=G||function(){return!1};function Ee(e){if(!Me(e))return!1;var t=fe(e);return t==s||t==f||t==a||t==d}function Ae(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}function Me(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ke(e){return null!=e&&"object"==typeof e}var Ie=I?function(e){return function(t){return e(t)}}(I):function(e){return ke(e)&&Ae(e.length)&&!!b[fe(e)]};function Re(e){return we(e)?function(e,t){var r=_e(e),n=!r&&ve(e),i=!r&&!n&&Se(e),o=!r&&!n&&!i&&Ie(e),a=r||n||i||o,s=a?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],f=s.length;for(var c in e)!t&&!N.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||pe(c,f))||s.push(c);return s}(e,!0):function(e){if(!Me(e))return function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}(e);var t=be(e),r=[];for(var n in e)("constructor"!=n||!t&&N.call(e,n))&&r.push(n);return r}(e)}var xe,Be=(xe=function(e,t,r){he(e,t,r)},function(e,t){return ge(function(e,t,r){return t=J(void 0===t?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=J(n.length-t,0),a=Array(o);++i<o;)a[i]=n[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=n[i];return s[t]=r(a),function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}(e,this,s)}}(e,t,Oe),e+"")}((function(e,t){var r=-1,n=t.length,i=n>1?t[n-1]:void 0,o=n>2?t[2]:void 0;for(i=xe.length>3&&"function"==typeof i?(n--,i):void 0,o&&function(e,t,r){if(!Me(r))return!1;var n=typeof t;return!!("number"==n?we(r)&&pe(t,r.length):"string"==n&&t in r)&&me(r[t],e)}(t[0],t[1],o)&&(i=n<3?void 0:i,n=1),e=Object(e);++r<n;){var a=t[r];a&&xe(e,a,r)}return e})));function Oe(e){return e}e.exports=Be},9640:function(e,t,r){var n,i;!function(o,a){"use strict";n=function(){var e=function(){},t="undefined",r=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"];function i(e,t){var r=e[t];if("function"==typeof r.bind)return r.bind(e);try{return Function.prototype.bind.call(r,e)}catch(t){return function(){return Function.prototype.apply.apply(r,[e,arguments])}}}function o(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function a(t,r){for(var i=0;i<n.length;i++){var o=n[i];this[o]=i<t?e:this.methodFactory(o,t,r)}this.log=this.debug}function s(e,r,n){return function(){typeof console!==t&&(a.call(this,r,n),this[e].apply(this,arguments))}}function f(n,a,f){return function(n){return"debug"===n&&(n="log"),typeof console!==t&&("trace"===n&&r?o:void 0!==console[n]?i(console,n):void 0!==console.log?i(console,"log"):e)}(n)||s.apply(this,arguments)}function c(e,r,i){var o,s=this;r=null==r?"WARN":r;var c="loglevel";function h(){var e;if(typeof window!==t&&c){try{e=window.localStorage[c]}catch(e){}if(typeof e===t)try{var r=window.document.cookie,n=r.indexOf(encodeURIComponent(c)+"=");-1!==n&&(e=/^([^;]+)/.exec(r.slice(n))[1])}catch(e){}return void 0===s.levels[e]&&(e=void 0),e}}"string"==typeof e?c+=":"+e:"symbol"==typeof e&&(c=void 0),s.name=e,s.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},s.methodFactory=i||f,s.getLevel=function(){return o},s.setLevel=function(r,i){if("string"==typeof r&&void 0!==s.levels[r.toUpperCase()]&&(r=s.levels[r.toUpperCase()]),!("number"==typeof r&&r>=0&&r<=s.levels.SILENT))throw"log.setLevel() called with invalid level: "+r;if(o=r,!1!==i&&function(e){var r=(n[e]||"silent").toUpperCase();if(typeof window!==t&&c){try{return void(window.localStorage[c]=r)}catch(e){}try{window.document.cookie=encodeURIComponent(c)+"="+r+";"}catch(e){}}}(r),a.call(s,r,e),typeof console===t&&r<s.levels.SILENT)return"No console available for logging"},s.setDefaultLevel=function(e){r=e,h()||s.setLevel(e,!1)},s.resetLevel=function(){s.setLevel(r,!1),function(){if(typeof window!==t&&c){try{return void window.localStorage.removeItem(c)}catch(e){}try{window.document.cookie=encodeURIComponent(c)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(e){}}}()},s.enableAll=function(e){s.setLevel(s.levels.TRACE,e)},s.disableAll=function(e){s.setLevel(s.levels.SILENT,e)};var d=h();null==d&&(d=r),s.setLevel(d,!1)}var h=new c,d={};h.getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=d[e];return t||(t=d[e]=new c(e,h.getLevel(),h.methodFactory)),t};var u=typeof window!==t?window.log:void 0;return h.noConflict=function(){return typeof window!==t&&window.log===h&&(window.log=u),h},h.getLoggers=function(){return d},h.default=h,h},void 0===(i=n.call(t,r,t,e))||(e.exports=i)}()},7993:(e,t,r)=>{"use strict";var n=r(1285),i=r(5232),o=r(7834).Buffer,a=new Array(16);function s(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function f(e,t){return e<<t|e>>>32-t}function c(e,t,r,n,i,o,a){return f(e+(t&r|~t&n)+i+o|0,a)+t|0}function h(e,t,r,n,i,o,a){return f(e+(t&n|r&~n)+i+o|0,a)+t|0}function d(e,t,r,n,i,o,a){return f(e+(t^r^n)+i+o|0,a)+t|0}function u(e,t,r,n,i,o,a){return f(e+(r^(t|~n))+i+o|0,a)+t|0}n(s,i),s.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,o=this._d;r=c(r,n,i,o,e[0],3614090360,7),o=c(o,r,n,i,e[1],3905402710,12),i=c(i,o,r,n,e[2],606105819,17),n=c(n,i,o,r,e[3],3250441966,22),r=c(r,n,i,o,e[4],4118548399,7),o=c(o,r,n,i,e[5],1200080426,12),i=c(i,o,r,n,e[6],2821735955,17),n=c(n,i,o,r,e[7],4249261313,22),r=c(r,n,i,o,e[8],1770035416,7),o=c(o,r,n,i,e[9],2336552879,12),i=c(i,o,r,n,e[10],4294925233,17),n=c(n,i,o,r,e[11],2304563134,22),r=c(r,n,i,o,e[12],1804603682,7),o=c(o,r,n,i,e[13],4254626195,12),i=c(i,o,r,n,e[14],2792965006,17),r=h(r,n=c(n,i,o,r,e[15],1236535329,22),i,o,e[1],4129170786,5),o=h(o,r,n,i,e[6],3225465664,9),i=h(i,o,r,n,e[11],643717713,14),n=h(n,i,o,r,e[0],3921069994,20),r=h(r,n,i,o,e[5],3593408605,5),o=h(o,r,n,i,e[10],38016083,9),i=h(i,o,r,n,e[15],3634488961,14),n=h(n,i,o,r,e[4],3889429448,20),r=h(r,n,i,o,e[9],568446438,5),o=h(o,r,n,i,e[14],3275163606,9),i=h(i,o,r,n,e[3],4107603335,14),n=h(n,i,o,r,e[8],1163531501,20),r=h(r,n,i,o,e[13],2850285829,5),o=h(o,r,n,i,e[2],4243563512,9),i=h(i,o,r,n,e[7],1735328473,14),r=d(r,n=h(n,i,o,r,e[12],2368359562,20),i,o,e[5],4294588738,4),o=d(o,r,n,i,e[8],2272392833,11),i=d(i,o,r,n,e[11],1839030562,16),n=d(n,i,o,r,e[14],4259657740,23),r=d(r,n,i,o,e[1],2763975236,4),o=d(o,r,n,i,e[4],1272893353,11),i=d(i,o,r,n,e[7],4139469664,16),n=d(n,i,o,r,e[10],3200236656,23),r=d(r,n,i,o,e[13],681279174,4),o=d(o,r,n,i,e[0],3936430074,11),i=d(i,o,r,n,e[3],3572445317,16),n=d(n,i,o,r,e[6],76029189,23),r=d(r,n,i,o,e[9],3654602809,4),o=d(o,r,n,i,e[12],3873151461,11),i=d(i,o,r,n,e[15],530742520,16),r=u(r,n=d(n,i,o,r,e[2],3299628645,23),i,o,e[0],4096336452,6),o=u(o,r,n,i,e[7],1126891415,10),i=u(i,o,r,n,e[14],2878612391,15),n=u(n,i,o,r,e[5],4237533241,21),r=u(r,n,i,o,e[12],1700485571,6),o=u(o,r,n,i,e[3],2399980690,10),i=u(i,o,r,n,e[10],4293915773,15),n=u(n,i,o,r,e[1],2240044497,21),r=u(r,n,i,o,e[8],1873313359,6),o=u(o,r,n,i,e[15],4264355552,10),i=u(i,o,r,n,e[6],2734768916,15),n=u(n,i,o,r,e[13],1309151649,21),r=u(r,n,i,o,e[4],4149444226,6),o=u(o,r,n,i,e[11],3174756917,10),i=u(i,o,r,n,e[2],718787259,15),n=u(n,i,o,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},s.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=o.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=s},6676:(e,t,r)=>{var n=r(2197),i=r(2745);function o(e){this.rand=e||new i.Rand}e.exports=o,o.create=function(e){return new o(e)},o.prototype._randbelow=function(e){var t=e.bitLength(),r=Math.ceil(t/8);do{var i=new n(this.rand.generate(r))}while(i.cmp(e)>=0);return i},o.prototype._randrange=function(e,t){var r=t.sub(e);return e.add(this._randbelow(r))},o.prototype.test=function(e,t,r){var i=e.bitLength(),o=n.mont(e),a=new n(1).toRed(o);t||(t=Math.max(1,i/48|0));for(var s=e.subn(1),f=0;!s.testn(f);f++);for(var c=e.shrn(f),h=s.toRed(o);t>0;t--){var d=this._randrange(new n(2),s);r&&r(d);var u=d.toRed(o).redPow(c);if(0!==u.cmp(a)&&0!==u.cmp(h)){for(var l=1;l<f;l++){if(0===(u=u.redSqr()).cmp(a))return!1;if(0===u.cmp(h))break}if(l===f)return!1}}return!0},o.prototype.getDivisor=function(e,t){var r=e.bitLength(),i=n.mont(e),o=new n(1).toRed(i);t||(t=Math.max(1,r/48|0));for(var a=e.subn(1),s=0;!a.testn(s);s++);for(var f=e.shrn(s),c=a.toRed(i);t>0;t--){var h=this._randrange(new n(2),a),d=e.gcd(h);if(0!==d.cmpn(1))return d;var u=h.toRed(i).redPow(f);if(0!==u.cmp(o)&&0!==u.cmp(c)){for(var l=1;l<s;l++){if(0===(u=u.redSqr()).cmp(o))return u.fromRed().subn(1).gcd(e);if(0===u.cmp(c))break}if(l===s)return(u=u.redSqr()).fromRed().subn(1).gcd(e)}}return!1}},9561:e=>{function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},3022:(e,t)=>{"use strict";var r=t;function n(e){return 1===e.length?"0"+e:e}function i(e){for(var t="",r=0;r<e.length;r++)t+=n(e[r].toString(16));return t}r.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!=typeof e){for(var n=0;n<e.length;n++)r[n]=0|e[n];return r}if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16));else for(n=0;n<e.length;n++){var i=e.charCodeAt(n),o=i>>8,a=255&i;o?r.push(o,a):r.push(a)}return r},r.zero2=n,r.toHex=i,r.encode=function(e,t){return"hex"===t?i(e):e}},9928:(e,t,r)=>{var n=r(8892);function i(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function o(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},r=e.name||"Function wrapped with `once`";return t.onceError=r+" shouldn't be called more than once",t.called=!1,t}e.exports=n(i),e.exports.strict=n(o),i.proto=i((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return i(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return o(this)},configurable:!0})}))},8045:(e,t,r)=>{"use strict";var n=r(2812);t.certificate=r(7832);var i=n.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())}));t.RSAPrivateKey=i;var o=n.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));t.RSAPublicKey=o;var a=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())}));t.PublicKey=a;var s=n.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())})),f=n.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s),this.key("subjectPrivateKey").octstr())}));t.PrivateKey=f;var c=n.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())}));t.EncryptedPrivateKey=c;var h=n.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())}));t.DSAPrivateKey=h,t.DSAparam=n.define("DSAparam",(function(){this.int()}));var d=n.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(u),this.key("publicKey").optional().explicit(1).bitstr())}));t.ECPrivateKey=d;var u=n.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));t.signature=n.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},7832:(e,t,r)=>{"use strict";var n=r(2812),i=n.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),o=n.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),a=n.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),s=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(a),this.key("subjectPublicKey").bitstr())})),f=n.define("RelativeDistinguishedName",(function(){this.setof(o)})),c=n.define("RDNSequence",(function(){this.seqof(f)})),h=n.define("Name",(function(){this.choice({rdnSequence:this.use(c)})})),d=n.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(i),this.key("notAfter").use(i))})),u=n.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),l=n.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(a),this.key("issuer").use(h),this.key("validity").use(d),this.key("subject").use(h),this.key("subjectPublicKeyInfo").use(s),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(u).optional())})),p=n.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(l),this.key("signatureAlgorithm").use(a),this.key("signatureValue").bitstr())}));e.exports=p},2968:(e,t,r)=>{var n=/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,i=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,o=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,a=r(9341),s=r(10),f=r(7834).Buffer;e.exports=function(e,t){var r,c=e.toString(),h=c.match(n);if(h){var d="aes"+h[1],u=f.from(h[2],"hex"),l=f.from(h[3].replace(/[\r\n]/g,""),"base64"),p=a(t,u.slice(0,8),parseInt(h[1],10)).key,b=[],y=s.createDecipheriv(d,p,u);b.push(y.update(l)),b.push(y.final()),r=f.concat(b)}else{var g=c.match(o);r=f.from(g[2].replace(/[\r\n]/g,""),"base64")}return{tag:c.match(i)[1],data:r}}},8016:(e,t,r)=>{var n=r(8045),i=r(8675),o=r(2968),a=r(10),s=r(499),f=r(7834).Buffer;function c(e){var t;"object"!=typeof e||f.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=f.from(e));var r,c,h=o(e,t),d=h.tag,u=h.data;switch(d){case"CERTIFICATE":c=n.certificate.decode(u,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(c||(c=n.PublicKey.decode(u,"der")),r=c.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPublicKey.decode(c.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return c.subjectPrivateKey=c.subjectPublicKey,{type:"ec",data:c};case"1.2.840.10040.4.1":return c.algorithm.params.pub_key=n.DSAparam.decode(c.subjectPublicKey.data,"der"),{type:"dsa",data:c.algorithm.params};default:throw new Error("unknown key id "+r)}case"ENCRYPTED PRIVATE KEY":u=function(e,t){var r=e.algorithm.decrypt.kde.kdeparams.salt,n=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),o=i[e.algorithm.decrypt.cipher.algo.join(".")],c=e.algorithm.decrypt.cipher.iv,h=e.subjectPrivateKey,d=parseInt(o.split("-")[1],10)/8,u=s.pbkdf2Sync(t,r,n,d,"sha1"),l=a.createDecipheriv(o,u,c),p=[];return p.push(l.update(h)),p.push(l.final()),f.concat(p)}(u=n.EncryptedPrivateKey.decode(u,"der"),t);case"PRIVATE KEY":switch(r=(c=n.PrivateKey.decode(u,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPrivateKey.decode(c.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:c.algorithm.curve,privateKey:n.ECPrivateKey.decode(c.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return c.algorithm.params.priv_key=n.DSAparam.decode(c.subjectPrivateKey,"der"),{type:"dsa",params:c.algorithm.params};default:throw new Error("unknown key id "+r)}case"RSA PUBLIC KEY":return n.RSAPublicKey.decode(u,"der");case"RSA PRIVATE KEY":return n.RSAPrivateKey.decode(u,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:n.DSAPrivateKey.decode(u,"der")};case"EC PRIVATE KEY":return{curve:(u=n.ECPrivateKey.decode(u,"der")).parameters.value,privateKey:u.privateKey};default:throw new Error("unknown key type "+d)}}e.exports=c,c.signature=n.signature},499:(e,t,r)=>{t.pbkdf2=r(4874),t.pbkdf2Sync=r(8840)},4874:(e,t,r)=>{var n,i,o=r(7834).Buffer,a=r(7351),s=r(5214),f=r(8840),c=r(7232),h=r.g.crypto&&r.g.crypto.subtle,d={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},u=[];function l(){return i||(i=r.g.process&&r.g.process.nextTick?r.g.process.nextTick:r.g.queueMicrotask?r.g.queueMicrotask:r.g.setImmediate?r.g.setImmediate:r.g.setTimeout)}function p(e,t,r,n,i){return h.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then((function(e){return h.deriveBits({name:"PBKDF2",salt:t,iterations:r,hash:{name:i}},e,n<<3)})).then((function(e){return o.from(e)}))}e.exports=function(e,t,i,b,y,g){"function"==typeof y&&(g=y,y=void 0);var m=d[(y=y||"sha1").toLowerCase()];if(m&&"function"==typeof r.g.Promise){if(a(i,b),e=c(e,s,"Password"),t=c(t,s,"Salt"),"function"!=typeof g)throw new Error("No callback provided to pbkdf2");!function(e,t){e.then((function(e){l()((function(){t(null,e)}))}),(function(e){l()((function(){t(e)}))}))}(function(e){if(r.g.process&&!r.g.process.browser)return Promise.resolve(!1);if(!h||!h.importKey||!h.deriveBits)return Promise.resolve(!1);if(void 0!==u[e])return u[e];var t=p(n=n||o.alloc(8),n,10,128,e).then((function(){return!0})).catch((function(){return!1}));return u[e]=t,t}(m).then((function(r){return r?p(e,t,i,b,m):f(e,t,i,b,y)})),g)}else l()((function(){var r;try{r=f(e,t,i,b,y)}catch(e){return g(e)}g(null,r)}))}},5214:(e,t,r)=>{var n,i=r(4406);n=r.g.process&&r.g.process.browser?"utf-8":r.g.process&&r.g.process.version?parseInt(i.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary":"utf-8",e.exports=n},7351:e=>{var t=Math.pow(2,30)-1;e.exports=function(e,r){if("number"!=typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!=typeof r)throw new TypeError("Key length not a number");if(r<0||r>t||r!=r)throw new TypeError("Bad key length")}},8840:(e,t,r)=>{var n=r(2511),i=r(1445),o=r(9065),a=r(7834).Buffer,s=r(7351),f=r(5214),c=r(7232),h=a.alloc(128),d={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function u(e,t,r){var s=function(e){return"rmd160"===e||"ripemd160"===e?function(e){return(new i).update(e).digest()}:"md5"===e?n:function(t){return o(e).update(t).digest()}}(e),f="sha512"===e||"sha384"===e?128:64;t.length>f?t=s(t):t.length<f&&(t=a.concat([t,h],f));for(var c=a.allocUnsafe(f+d[e]),u=a.allocUnsafe(f+d[e]),l=0;l<f;l++)c[l]=54^t[l],u[l]=92^t[l];var p=a.allocUnsafe(f+r+4);c.copy(p,0,0,f),this.ipad1=p,this.ipad2=c,this.opad=u,this.alg=e,this.blocksize=f,this.hash=s,this.size=d[e]}u.prototype.run=function(e,t){return e.copy(t,this.blocksize),this.hash(t).copy(this.opad,this.blocksize),this.hash(this.opad)},e.exports=function(e,t,r,n,i){s(r,n);var o=new u(i=i||"sha1",e=c(e,f,"Password"),(t=c(t,f,"Salt")).length),h=a.allocUnsafe(n),l=a.allocUnsafe(t.length+4);t.copy(l,0,0,t.length);for(var p=0,b=d[i],y=Math.ceil(n/b),g=1;g<=y;g++){l.writeUInt32BE(g,t.length);for(var m=o.run(l,o.ipad1),v=m,_=1;_<r;_++){v=o.run(v,o.ipad2);for(var w=0;w<b;w++)m[w]^=v[w]}m.copy(h,p),p+=b}return h}},7232:(e,t,r)=>{var n=r(7834).Buffer;e.exports=function(e,t,r){if(n.isBuffer(e))return e;if("string"==typeof e)return n.from(e,t);if(ArrayBuffer.isView(e))return n.from(e.buffer);throw new TypeError(r+" must be a string, a Buffer, a typed array or a DataView")}},4406:e=>{var t,r,n=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var s,f=[],c=!1,h=-1;function d(){c&&s&&(c=!1,s.length?f=s.concat(f):h=-1,f.length&&u())}function u(){if(!c){var e=a(d);c=!0;for(var t=f.length;t;){for(s=f,f=[];++h<t;)s&&s[h].run();h=-1,t=f.length}s=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function l(e,t){this.fun=e,this.array=t}function p(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];f.push(new l(e,t)),1!==f.length||c||a(u)},l.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=p,n.addListener=p,n.once=p,n.off=p,n.removeListener=p,n.removeAllListeners=p,n.emit=p,n.prependListener=p,n.prependOnceListener=p,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},8493:(e,t,r)=>{t.publicEncrypt=r(1896),t.privateDecrypt=r(6932),t.privateEncrypt=function(e,r){return t.publicEncrypt(e,r,!0)},t.publicDecrypt=function(e,r){return t.privateDecrypt(e,r,!0)}},8525:(e,t,r)=>{var n=r(6162),i=r(7834).Buffer;function o(e){var t=i.allocUnsafe(4);return t.writeUInt32BE(e,0),t}e.exports=function(e,t){for(var r,a=i.alloc(0),s=0;a.length<t;)r=o(s++),a=i.concat([a,n("sha1").update(e).update(r).digest()]);return a.slice(0,t)}},6932:(e,t,r)=>{var n=r(8016),i=r(8525),o=r(1273),a=r(2197),s=r(1857),f=r(6162),c=r(6112),h=r(7834).Buffer;e.exports=function(e,t,r){var d;d=e.padding?e.padding:r?1:4;var u,l=n(e),p=l.modulus.byteLength();if(t.length>p||new a(t).cmp(l.modulus)>=0)throw new Error("decryption error");u=r?c(new a(t),l):s(t,l);var b=h.alloc(p-u.length);if(u=h.concat([b,u],p),4===d)return function(e,t){var r=e.modulus.byteLength(),n=f("sha1").update(h.alloc(0)).digest(),a=n.length;if(0!==t[0])throw new Error("decryption error");var s=t.slice(1,a+1),c=t.slice(a+1),d=o(s,i(c,a)),u=o(c,i(d,r-a-1));if(function(e,t){e=h.from(e),t=h.from(t);var r=0,n=e.length;e.length!==t.length&&(r++,n=Math.min(e.length,t.length));for(var i=-1;++i<n;)r+=e[i]^t[i];return r}(n,u.slice(0,a)))throw new Error("decryption error");for(var l=a;0===u[l];)l++;if(1!==u[l++])throw new Error("decryption error");return u.slice(l)}(l,u);if(1===d)return function(e,t,r){for(var n=t.slice(0,2),i=2,o=0;0!==t[i++];)if(i>=t.length){o++;break}var a=t.slice(2,i-1);if(("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&o++,a.length<8&&o++,o)throw new Error("decryption error");return t.slice(i)}(0,u,r);if(3===d)return u;throw new Error("unknown padding")}},1896:(e,t,r)=>{var n=r(8016),i=r(5003),o=r(6162),a=r(8525),s=r(1273),f=r(2197),c=r(6112),h=r(1857),d=r(7834).Buffer;e.exports=function(e,t,r){var u;u=e.padding?e.padding:r?1:4;var l,p=n(e);if(4===u)l=function(e,t){var r=e.modulus.byteLength(),n=t.length,c=o("sha1").update(d.alloc(0)).digest(),h=c.length,u=2*h;if(n>r-u-2)throw new Error("message too long");var l=d.alloc(r-n-u-2),p=r-h-1,b=i(h),y=s(d.concat([c,l,d.alloc(1,1),t],p),a(b,p)),g=s(b,a(y,h));return new f(d.concat([d.alloc(1),g,y],r))}(p,t);else if(1===u)l=function(e,t,r){var n,o=t.length,a=e.modulus.byteLength();if(o>a-11)throw new Error("message too long");return n=r?d.alloc(a-o-3,255):function(e){for(var t,r=d.allocUnsafe(e),n=0,o=i(2*e),a=0;n<e;)a===o.length&&(o=i(2*e),a=0),(t=o[a++])&&(r[n++]=t);return r}(a-o-3),new f(d.concat([d.from([0,r?1:2]),n,d.alloc(1),t],a))}(p,t,r);else{if(3!==u)throw new Error("unknown padding");if((l=new f(t)).cmp(p.modulus)>=0)throw new Error("data too long for modulus")}return r?h(l,p):c(l,p)}},6112:(e,t,r)=>{var n=r(2197),i=r(7834).Buffer;e.exports=function(e,t){return i.from(e.toRed(n.mont(t.modulus)).redPow(new n(t.publicExponent)).fromRed().toArray())}},1273:e=>{e.exports=function(e,t){for(var r=e.length,n=-1;++n<r;)e[n]^=t[n];return e}},3171:(e,t,r)=>{var n=r(4406),i=r(9928),o=r(8797),a=r(3558),s=function(){},f=/^v?\.0/.test(n.version),c=function(e){return"function"==typeof e},h=function(e){e()},d=function(e,t){return e.pipe(t)};e.exports=function(){var e,t=Array.prototype.slice.call(arguments),r=c(t[t.length-1]||s)&&t.pop()||s;if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Error("pump requires two streams per minimum");var n=t.map((function(d,u){var l=u<t.length-1;return function(e,t,r,n){n=i(n);var h=!1;e.on("close",(function(){h=!0})),o(e,{readable:t,writable:r},(function(e){if(e)return n(e);h=!0,n()}));var d=!1;return function(t){if(!h&&!d)return d=!0,function(e){return!!f&&!!a&&(e instanceof(a.ReadStream||s)||e instanceof(a.WriteStream||s))&&c(e.close)}(e)?e.close(s):function(e){return e.setHeader&&c(e.abort)}(e)?e.abort():c(e.destroy)?e.destroy():void n(t||new Error("stream was destroyed"))}}(d,l,u>0,(function(t){e||(e=t),t&&n.forEach(h),l||(n.forEach(h),r(e))}))}));return t.reduce(d)}},5003:(e,t,r)=>{"use strict";var n=r(4406),i=65536,o=r(7834).Buffer,a=r.g.crypto||r.g.msCrypto;a&&a.getRandomValues?e.exports=function(e,t){if(e>4294967295)throw new RangeError("requested too many random bytes");var r=o.allocUnsafe(e);if(e>0)if(e>i)for(var s=0;s<e;s+=i)a.getRandomValues(r.slice(s,s+i));else a.getRandomValues(r);return"function"==typeof t?n.nextTick((function(){t(null,r)})):r}:e.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}},9631:(e,t,r)=>{"use strict";var n=r(4406);function i(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var o=r(7834),a=r(5003),s=o.Buffer,f=o.kMaxLength,c=r.g.crypto||r.g.msCrypto,h=Math.pow(2,32)-1;function d(e,t){if("number"!=typeof e||e!=e)throw new TypeError("offset must be a number");if(e>h||e<0)throw new TypeError("offset must be a uint32");if(e>f||e>t)throw new RangeError("offset out of range")}function u(e,t,r){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>h||e<0)throw new TypeError("size must be a uint32");if(e+t>r||e>f)throw new RangeError("buffer too small")}function l(e,t,r,i){if(n.browser){var o=e.buffer,s=new Uint8Array(o,t,r);return c.getRandomValues(s),i?void n.nextTick((function(){i(null,e)})):e}if(!i)return a(r).copy(e,t),e;a(r,(function(r,n){if(r)return i(r);n.copy(e,t),i(null,e)}))}c&&c.getRandomValues||!n.browser?(t.randomFill=function(e,t,n,i){if(!(s.isBuffer(e)||e instanceof r.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof t)i=t,t=0,n=e.length;else if("function"==typeof n)i=n,n=e.length-t;else if("function"!=typeof i)throw new TypeError('"cb" argument must be a function');return d(t,e.length),u(n,t,e.length),l(e,t,n,i)},t.randomFillSync=function(e,t,n){if(void 0===t&&(t=0),!(s.isBuffer(e)||e instanceof r.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return d(t,e.length),void 0===n&&(n=e.length-t),u(n,t,e.length),l(e,t,n)}):(t.randomFill=i,t.randomFillSync=i)},4452:e=>{"use strict";var t={};function r(e,r,n){n||(n=Error);var i=function(e){var t,n;function i(t,n,i){return e.call(this,function(e,t,n){return"string"==typeof r?r:r(e,t,n)}(t,n,i))||this}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i}(n);i.prototype.name=n.name,i.prototype.code=e,t[e]=i}function n(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}r("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(e,t,r){var i,o,a,s,f;if("string"==typeof t&&(o="not ",t.substr(0,o.length)===o)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))a="The ".concat(e," ").concat(i," ").concat(n(t,"type"));else{var c=("number"!=typeof f&&(f=0),f+".".length>(s=e).length||-1===s.indexOf(".",f)?"argument":"property");a='The "'.concat(e,'" ').concat(c," ").concat(i," ").concat(n(t,"type"))}return a+". Received type ".concat(typeof r)}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=t},7073:(e,t,r)=>{"use strict";var n=r(4406),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=h;var o=r(8051),a=r(2557);r(1285)(h,o);for(var s=i(a.prototype),f=0;f<s.length;f++){var c=s[f];h.prototype[c]||(h.prototype[c]=a.prototype[c])}function h(e){if(!(this instanceof h))return new h(e);o.call(this,e),a.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",d)))}function d(){this._writableState.ended||n.nextTick(u,this)}function u(e){e.end()}Object.defineProperty(h.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(h.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(h.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(h.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},5163:(e,t,r)=>{"use strict";e.exports=i;var n=r(7640);function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}r(1285)(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},8051:(e,t,r)=>{"use strict";var n,i=r(4406);e.exports=M,M.ReadableState=A,r(2699).EventEmitter;var o,a=function(e,t){return e.listeners(t).length},s=r(5010),f=r(8834).Buffer,c=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},h=r(6602);o=h&&h.debuglog?h.debuglog("stream"):function(){};var d,u,l,p=r(6637),b=r(2262),y=r(7605).getHighWaterMark,g=r(4452).q,m=g.ERR_INVALID_ARG_TYPE,v=g.ERR_STREAM_PUSH_AFTER_EOF,_=g.ERR_METHOD_NOT_IMPLEMENTED,w=g.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(1285)(M,s);var S=b.errorOrDestroy,E=["error","close","destroy","pause","resume"];function A(e,t,i){n=n||r(7073),e=e||{},"boolean"!=typeof i&&(i=t instanceof n),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=y(this,e,"readableHighWaterMark",i),this.buffer=new p,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=!1!==e.emitClose,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&&(d||(d=r(214).s),this.decoder=new d(e.encoding),this.encoding=e.encoding)}function M(e){if(n=n||r(7073),!(this instanceof M))return new M(e);var t=this instanceof n;this._readableState=new A(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),s.call(this)}function k(e,t,r,n,i){o("readableAddChunk",t);var a,s=e._readableState;if(null===t)s.reading=!1,function(e,t){if(o("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?B(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,O(e)))}}(e,s);else if(i||(a=function(e,t){var r,n;return n=t,f.isBuffer(n)||n instanceof c||"string"==typeof t||void 0===t||e.objectMode||(r=new m("chunk",["string","Buffer","Uint8Array"],t)),r}(s,t)),a)S(e,a);else if(s.objectMode||t&&t.length>0)if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===f.prototype||(t=function(e){return f.from(e)}(t)),n)s.endEmitted?S(e,new w):I(e,s,t,!0);else if(s.ended)S(e,new v);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?I(e,s,t,!1):C(e,s)):I(e,s,t,!1)}else n||(s.reading=!1,C(e,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function I(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&B(e)),C(e,t)}Object.defineProperty(M.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),M.prototype.destroy=b.destroy,M.prototype._undestroy=b.undestroy,M.prototype._destroy=function(e,t){t(e)},M.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=f.from(e,t),t=""),r=!0),k(this,e,t,!1,r)},M.prototype.unshift=function(e){return k(this,e,null,!0,!1)},M.prototype.isPaused=function(){return!1===this._readableState.flowing},M.prototype.setEncoding=function(e){d||(d=r(214).s);var t=new d(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var R=1073741824;function x(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=R?e=R:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function B(e){var t=e._readableState;o("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(o("emitReadable",t.flowing),t.emittedReadable=!0,i.nextTick(O,e))}function O(e){var t=e._readableState;o("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,L(e)}function C(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(N,e,t))}function N(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(o("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function T(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 P(e){o("readable nexttick read 0"),e.read(0)}function j(e,t){o("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),L(e),t.flowing&&!t.reading&&e.read(0)}function L(e){var t=e._readableState;for(o("flow",t.flowing);t.flowing&&null!==e.read(););}function D(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function U(e){var t=e._readableState;o("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,i.nextTick(z,t,e))}function z(e,t){if(o("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function q(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}M.prototype.read=function(e){o("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return o("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?U(this):B(this),null;if(0===(e=x(e,t))&&t.ended)return 0===t.length&&U(this),null;var n,i=t.needReadable;return o("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&o("length less than watermark",i=!0),t.ended||t.reading?o("reading or ended",i=!1):i&&(o("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=x(r,t))),null===(n=e>0?D(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&U(this)),null!==n&&this.emit("data",n),n},M.prototype._read=function(e){S(this,new _("_read()"))},M.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,o("pipe count=%d opts=%j",n.pipesCount,t);var s=t&&!1===t.end||e===i.stdout||e===i.stderr?b:f;function f(){o("onend"),e.end()}n.endEmitted?i.nextTick(s):r.once("end",s),e.on("unpipe",(function t(i,a){o("onunpipe"),i===r&&a&&!1===a.hasUnpiped&&(a.hasUnpiped=!0,o("cleanup"),e.removeListener("close",l),e.removeListener("finish",p),e.removeListener("drain",c),e.removeListener("error",u),e.removeListener("unpipe",t),r.removeListener("end",f),r.removeListener("end",b),r.removeListener("data",d),h=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}));var c=function(e){return function(){var t=e._readableState;o("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,L(e))}}(r);e.on("drain",c);var h=!1;function d(t){o("ondata");var i=e.write(t);o("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==q(n.pipes,e))&&!h&&(o("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function u(t){o("onerror",t),b(),e.removeListener("error",u),0===a(e,"error")&&S(e,t)}function l(){e.removeListener("finish",p),b()}function p(){o("onfinish"),e.removeListener("close",l),b()}function b(){o("unpipe"),r.unpipe(e)}return r.on("data",d),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",u),e.once("close",l),e.once("finish",p),e.emit("pipe",r),n.flowing||(o("pipe resume"),r.resume()),e},M.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=q(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},M.prototype.on=function(e,t){var r=s.prototype.on.call(this,e,t),n=this._readableState;return"data"===e?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,o("on readable",n.length,n.reading),n.length?B(this):n.reading||i.nextTick(P,this))),r},M.prototype.addListener=M.prototype.on,M.prototype.removeListener=function(e,t){var r=s.prototype.removeListener.call(this,e,t);return"readable"===e&&i.nextTick(T,this),r},M.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||i.nextTick(T,this),t},M.prototype.resume=function(){var e=this._readableState;return e.flowing||(o("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(j,e,t))}(this,e)),e.paused=!1,this},M.prototype.pause=function(){return o("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(o("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},M.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(o("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){o("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var a=0;a<E.length;a++)e.on(E[a],this.emit.bind(this,E[a]));return this._read=function(t){o("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(M.prototype[Symbol.asyncIterator]=function(){return void 0===u&&(u=r(1029)),u(this)}),Object.defineProperty(M.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(M.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(M.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),M._fromList=D,Object.defineProperty(M.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(M.from=function(e,t){return void 0===l&&(l=r(352)),l(M,e,t)})},7640:(e,t,r)=>{"use strict";e.exports=h;var n=r(4452).q,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,f=r(7073);function c(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function h(e){if(!(this instanceof h))return new h(e);f.call(this,e),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",d)}function d(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?u(this,null,null):this._flush((function(t,r){u(e,t,r)}))}function u(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new s;if(e._transformState.transforming)throw new a;return e.push(null)}r(1285)(h,f),h.prototype.push=function(e,t){return this._transformState.needTransform=!1,f.prototype.push.call(this,e,t)},h.prototype._transform=function(e,t,r){r(new i("_transform()"))},h.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},h.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},h.prototype._destroy=function(e,t){f.prototype._destroy.call(this,e,(function(e){t(e)}))}},2557:(e,t,r)=>{"use strict";var n,i=r(4406);function o(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;for(e.entry=null;n;){var i=n.callback;t.pendingcb--,i(undefined),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}e.exports=M,M.WritableState=A;var a,s={deprecate:r(5803)},f=r(5010),c=r(8834).Buffer,h=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},d=r(2262),u=r(7605).getHighWaterMark,l=r(4452).q,p=l.ERR_INVALID_ARG_TYPE,b=l.ERR_METHOD_NOT_IMPLEMENTED,y=l.ERR_MULTIPLE_CALLBACK,g=l.ERR_STREAM_CANNOT_PIPE,m=l.ERR_STREAM_DESTROYED,v=l.ERR_STREAM_NULL_VALUES,_=l.ERR_STREAM_WRITE_AFTER_END,w=l.ERR_UNKNOWN_ENCODING,S=d.errorOrDestroy;function E(){}function A(e,t,a){n=n||r(7073),e=e||{},"boolean"!=typeof a&&(a=t instanceof n),this.objectMode=!!e.objectMode,a&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=u(this,e,"writableHighWaterMark",a),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,o=r.writecb;if("function"!=typeof o)throw new y;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,o){--t.pendingcb,r?(i.nextTick(o,n),i.nextTick(O,e,t),e._writableState.errorEmitted=!0,S(e,n)):(o(n),e._writableState.errorEmitted=!0,S(e,n),O(e,t))}(e,r,n,t,o);else{var a=x(r)||e.destroyed;a||r.corked||r.bufferProcessing||!r.bufferedRequest||R(e,r),n?i.nextTick(I,e,r,a,o):I(e,r,a,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function M(e){var t=this instanceof(n=n||r(7073));if(!t&&!a.call(M,this))return new M(e);this._writableState=new A(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),f.call(this)}function k(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new m("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function I(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),O(e,t)}function R(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),a=t.corkedRequestsFree;a.entry=r;for(var s=0,f=!0;r;)i[s]=r,r.isBuf||(f=!1),r=r.next,s+=1;i.allBuffers=f,k(e,t,!0,t.length,i,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,h=r.encoding,d=r.callback;if(k(e,t,!1,t.objectMode?1:c.length,c,h,d),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function x(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function B(e,t){e._final((function(r){t.pendingcb--,r&&S(e,r),t.prefinished=!0,e.emit("prefinish"),O(e,t)}))}function O(e,t){var r=x(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,i.nextTick(B,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}r(1285)(M,f),A.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(A.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(a=Function.prototype[Symbol.hasInstance],Object.defineProperty(M,Symbol.hasInstance,{value:function(e){return!!a.call(this,e)||this===M&&e&&e._writableState instanceof A}})):a=function(e){return e instanceof this},M.prototype.pipe=function(){S(this,new g)},M.prototype.write=function(e,t,r){var n,o=this._writableState,a=!1,s=!o.objectMode&&(n=e,c.isBuffer(n)||n instanceof h);return s&&!c.isBuffer(e)&&(e=function(e){return c.from(e)}(e)),"function"==typeof t&&(r=t,t=null),s?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof r&&(r=E),o.ending?function(e,t){var r=new _;S(e,r),i.nextTick(t,r)}(this,r):(s||function(e,t,r,n){var o;return null===r?o=new v:"string"==typeof r||t.objectMode||(o=new p("chunk",["string","Buffer"],r)),!o||(S(e,o),i.nextTick(n,o),!1)}(this,o,e,r))&&(o.pendingcb++,a=function(e,t,r,n,i,o){if(!r){var a=function(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=c.from(t,r)),t}(t,n,i);n!==a&&(r=!0,i="buffer",n=a)}var s=t.objectMode?1:n.length;t.length+=s;var f=t.length<t.highWaterMark;if(f||(t.needDrain=!0),t.writing||t.corked){var h=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},h?h.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else k(e,t,!1,s,n,i,o);return f}(this,o,s,e,t,r)),a},M.prototype.cork=function(){this._writableState.corked++},M.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||R(this,e))},M.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new w(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(M.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(M.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),M.prototype._write=function(e,t,r){r(new b("_write()"))},M.prototype._writev=null,M.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,O(e,t),r&&(t.finished?i.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(M.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(M.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),M.prototype.destroy=d.destroy,M.prototype._undestroy=d.undestroy,M.prototype._destroy=function(e,t){t(e)}},1029:(e,t,r)=>{"use strict";var n,i=r(4406);function o(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var a=r(9885),s=Symbol("lastResolve"),f=Symbol("lastReject"),c=Symbol("error"),h=Symbol("ended"),d=Symbol("lastPromise"),u=Symbol("handlePromise"),l=Symbol("stream");function p(e,t){return{value:e,done:t}}function b(e){var t=e[s];if(null!==t){var r=e[l].read();null!==r&&(e[d]=null,e[s]=null,e[f]=null,t(p(r,!1)))}}function y(e){i.nextTick(b,e)}var g=Object.getPrototypeOf((function(){})),m=Object.setPrototypeOf((o(n={get stream(){return this[l]},next:function(){var e=this,t=this[c];if(null!==t)return Promise.reject(t);if(this[h])return Promise.resolve(p(void 0,!0));if(this[l].destroyed)return new Promise((function(t,r){i.nextTick((function(){e[c]?r(e[c]):t(p(void 0,!0))}))}));var r,n=this[d];if(n)r=new Promise(function(e,t){return function(r,n){e.then((function(){t[h]?r(p(void 0,!0)):t[u](r,n)}),n)}}(n,this));else{var o=this[l].read();if(null!==o)return Promise.resolve(p(o,!1));r=new Promise(this[u])}return this[d]=r,r}},Symbol.asyncIterator,(function(){return this})),o(n,"return",(function(){var e=this;return new Promise((function(t,r){e[l].destroy(null,(function(e){e?r(e):t(p(void 0,!0))}))}))})),n),g);e.exports=function(e){var t,r=Object.create(m,(o(t={},l,{value:e,writable:!0}),o(t,s,{value:null,writable:!0}),o(t,f,{value:null,writable:!0}),o(t,c,{value:null,writable:!0}),o(t,h,{value:e._readableState.endEmitted,writable:!0}),o(t,u,{value:function(e,t){var n=r[l].read();n?(r[d]=null,r[s]=null,r[f]=null,e(p(n,!1))):(r[s]=e,r[f]=t)},writable:!0}),t));return r[d]=null,a(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[f];return null!==t&&(r[d]=null,r[s]=null,r[f]=null,t(e)),void(r[c]=e)}var n=r[s];null!==n&&(r[d]=null,r[s]=null,r[f]=null,n(p(void 0,!0))),r[h]=!0})),e.on("readable",y.bind(null,r)),r}},6637:(e,t,r)=>{"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function o(e,t,r){return(t=s(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function s(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}var f=r(8834).Buffer,c=r(4854).inspect,h=c&&c.custom||"inspect";e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,r;return t=e,(r=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return f.alloc(0);for(var t,r,n,i=f.allocUnsafe(e>>>0),o=this.head,a=0;o;)t=o.data,r=i,n=a,f.prototype.copy.call(t,r,n),a+=o.data.length,o=o.next;return i}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var i=t.data,o=e>i.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0==(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=f.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:h,value:function(e,t){return c(this,i(i({},t),{},{depth:0,customInspect:!1}))}}])&&a(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}()},2262:(e,t,r)=>{"use strict";var n=r(4406);function i(e,t){a(e,t),o(e)}function o(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function a(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var r=this,s=this._readableState&&this._readableState.destroyed,f=this._writableState&&this._writableState.destroyed;return s||f?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(a,this,e)):n.nextTick(a,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?r._writableState?r._writableState.errorEmitted?n.nextTick(o,r):(r._writableState.errorEmitted=!0,n.nextTick(i,r,e)):n.nextTick(i,r,e):t?(n.nextTick(o,r),t(e)):n.nextTick(o,r)})),this)},undestroy:function(){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)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}},9885:(e,t,r)=>{"use strict";var n=r(4452).q.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,r,o){if("function"==typeof r)return e(t,null,r);r||(r={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n)}}}(o||i);var a=r.readable||!1!==r.readable&&t.readable,s=r.writable||!1!==r.writable&&t.writable,f=function(){t.writable||h()},c=t._writableState&&t._writableState.finished,h=function(){s=!1,c=!0,a||o.call(t)},d=t._readableState&&t._readableState.endEmitted,u=function(){a=!1,d=!0,s||o.call(t)},l=function(e){o.call(t,e)},p=function(){var e;return a&&!d?(t._readableState&&t._readableState.ended||(e=new n),o.call(t,e)):s&&!c?(t._writableState&&t._writableState.ended||(e=new n),o.call(t,e)):void 0},b=function(){t.req.on("finish",h)};return function(e){return e.setHeader&&"function"==typeof e.abort}(t)?(t.on("complete",h),t.on("abort",p),t.req?b():t.on("request",b)):s&&!t._writableState&&(t.on("end",f),t.on("close",f)),t.on("end",u),t.on("finish",h),!1!==r.error&&t.on("error",l),t.on("close",p),function(){t.removeListener("complete",h),t.removeListener("abort",p),t.removeListener("request",b),t.req&&t.req.removeListener("finish",h),t.removeListener("end",f),t.removeListener("close",f),t.removeListener("finish",h),t.removeListener("end",u),t.removeListener("error",l),t.removeListener("close",p)}}},352:e=>{e.exports=function(){throw new Error("Readable.from is not available in the browser")}},3495:(e,t,r)=>{"use strict";var n,i=r(4452).q,o=i.ERR_MISSING_ARGS,a=i.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function f(e){e()}function c(e,t){return e.pipe(t)}e.exports=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var h,d=function(e){return e.length?"function"!=typeof e[e.length-1]?s:e.pop():s}(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new o("streams");var u=t.map((function(e,i){var o=i<t.length-1;return function(e,t,i,o){o=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(o);var s=!1;e.on("close",(function(){s=!0})),void 0===n&&(n=r(9885)),n(e,{readable:t,writable:i},(function(e){if(e)return o(e);s=!0,o()}));var f=!1;return function(t){if(!s&&!f)return f=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void o(t||new a("pipe"))}}(e,o,i>0,(function(e){h||(h=e),e&&u.forEach(f),o||(u.forEach(f),d(h))}))}));return t.reduce(c)}},7605:(e,t,r)=>{"use strict";var n=r(4452).q.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,i){var o=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},5010:(e,t,r)=>{e.exports=r(2699).EventEmitter},7525:(e,t,r)=>{(t=e.exports=r(8051)).Stream=t,t.Readable=t,t.Writable=r(2557),t.Duplex=r(7073),t.Transform=r(7640),t.PassThrough=r(5163),t.finished=r(9885),t.pipeline=r(3495)},1445:(e,t,r)=>{"use strict";var n=r(8834).Buffer,i=r(1285),o=r(5232),a=new Array(16),s=[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],f=[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],c=[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],h=[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],d=[0,1518500249,1859775393,2400959708,2840853838],u=[1352829926,1548603684,1836072691,2053994217,0];function l(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(e,t){return e<<t|e>>>32-t}function b(e,t,r,n,i,o,a,s){return p(e+(t^r^n)+o+a|0,s)+i|0}function y(e,t,r,n,i,o,a,s){return p(e+(t&r|~t&n)+o+a|0,s)+i|0}function g(e,t,r,n,i,o,a,s){return p(e+((t|~r)^n)+o+a|0,s)+i|0}function m(e,t,r,n,i,o,a,s){return p(e+(t&n|r&~n)+o+a|0,s)+i|0}function v(e,t,r,n,i,o,a,s){return p(e+(t^(r|~n))+o+a|0,s)+i|0}i(l,o),l.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,l=0|this._e,_=0|this._a,w=0|this._b,S=0|this._c,E=0|this._d,A=0|this._e,M=0;M<80;M+=1){var k,I;M<16?(k=b(r,n,i,o,l,e[s[M]],d[0],c[M]),I=v(_,w,S,E,A,e[f[M]],u[0],h[M])):M<32?(k=y(r,n,i,o,l,e[s[M]],d[1],c[M]),I=m(_,w,S,E,A,e[f[M]],u[1],h[M])):M<48?(k=g(r,n,i,o,l,e[s[M]],d[2],c[M]),I=g(_,w,S,E,A,e[f[M]],u[2],h[M])):M<64?(k=m(r,n,i,o,l,e[s[M]],d[3],c[M]),I=y(_,w,S,E,A,e[f[M]],u[3],h[M])):(k=v(r,n,i,o,l,e[s[M]],d[4],c[M]),I=b(_,w,S,E,A,e[f[M]],u[4],h[M])),r=l,l=o,o=p(i,10),i=n,n=k,_=A,A=E,E=p(S,10),S=w,w=I}var R=this._b+i+E|0;this._b=this._c+o+A|0,this._c=this._d+l+_|0,this._d=this._e+r+w|0,this._e=this._a+n+S|0,this._a=R},l.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=n.alloc?n.alloc(20):new n(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},e.exports=l},7834:(e,t,r)=>{var n=r(8834),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},7654:(e,t,r)=>{"use strict";var n,i=r(4406),o=r(8834),a=o.Buffer,s={};for(n in o)o.hasOwnProperty(n)&&"SlowBuffer"!==n&&"Buffer"!==n&&(s[n]=o[n]);var f=s.Buffer={};for(n in a)a.hasOwnProperty(n)&&"allocUnsafe"!==n&&"allocUnsafeSlow"!==n&&(f[n]=a[n]);if(s.Buffer.prototype=a.prototype,f.from&&f.from!==Uint8Array.from||(f.from=function(e,t,r){if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof e);if(e&&void 0===e.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);return a(e,t,r)}),f.alloc||(f.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError('The "size" argument must be of type number. Received type '+typeof e);if(e<0||e>=2*(1<<30))throw new RangeError('The value "'+e+'" is invalid for option "size"');var n=a(e);return t&&0!==t.length?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n}),!s.kStringMaxLength)try{s.kStringMaxLength=i.binding("buffer").kStringMaxLength}catch(e){}s.constants||(s.constants={MAX_LENGTH:s.kMaxLength},s.kStringMaxLength&&(s.constants.MAX_STRING_LENGTH=s.kStringMaxLength)),e.exports=s},3327:(e,t,r)=>{var n=r(7834).Buffer;function i(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=n.from(e,t));for(var r=this._block,i=this._blockSize,o=e.length,a=this._len,s=0;s<o;){for(var f=a%i,c=Math.min(o-s,i-f),h=0;h<c;h++)r[f+h]=e[s+h];s+=c,(a+=c)%i==0&&this._update(r)}return this._len+=o,this},i.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=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},9065:(e,t,r)=>{var n=e.exports=function(e){e=e.toLowerCase();var t=n[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};n.sha=r(8820),n.sha1=r(7885),n.sha224=r(8321),n.sha256=r(4424),n.sha384=r(213),n.sha512=r(5596)},8820:(e,t,r)=>{var n=r(1285),i=r(3327),o=r(7834).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function f(){this.init(),this._w=s,i.call(this,64,56)}function c(e){return e<<30|e>>>2}function h(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(f,i),f.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},f.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,f=0|this._e,d=0;d<16;++d)r[d]=e.readInt32BE(4*d);for(;d<80;++d)r[d]=r[d-3]^r[d-8]^r[d-14]^r[d-16];for(var u=0;u<80;++u){var l=~~(u/20),p=0|((t=n)<<5|t>>>27)+h(l,i,o,s)+f+r[u]+a[l];f=s,s=o,o=c(i),i=n,n=p}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=f+this._e|0},f.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=f},7885:(e,t,r)=>{var n=r(1285),i=r(3327),o=r(7834).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function f(){this.init(),this._w=s,i.call(this,64,56)}function c(e){return e<<5|e>>>27}function h(e){return e<<30|e>>>2}function d(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(f,i),f.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},f.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,f=0|this._e,u=0;u<16;++u)r[u]=e.readInt32BE(4*u);for(;u<80;++u)r[u]=(t=r[u-3]^r[u-8]^r[u-14]^r[u-16])<<1|t>>>31;for(var l=0;l<80;++l){var p=~~(l/20),b=c(n)+d(p,i,o,s)+f+r[l]+a[p]|0;f=s,s=o,o=h(i),i=n,n=b}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=f+this._e|0},f.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=f},8321:(e,t,r)=>{var n=r(1285),i=r(4424),o=r(3327),a=r(7834).Buffer,s=new Array(64);function f(){this.init(),this._w=s,o.call(this,64,56)}n(f,i),f.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},f.prototype._hash=function(){var e=a.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},e.exports=f},4424:(e,t,r)=>{var n=r(1285),i=r(3327),o=r(7834).Buffer,a=[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],s=new Array(64);function f(){this.init(),this._w=s,i.call(this,64,56)}function c(e,t,r){return r^e&(t^r)}function h(e,t,r){return e&t|r&(e|t)}function d(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function u(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function l(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(f,i),f.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},f.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,f=0|this._e,p=0|this._f,b=0|this._g,y=0|this._h,g=0;g<16;++g)r[g]=e.readInt32BE(4*g);for(;g<64;++g)r[g]=0|(((t=r[g-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[g-7]+l(r[g-15])+r[g-16];for(var m=0;m<64;++m){var v=y+u(f)+c(f,p,b)+a[m]+r[m]|0,_=d(n)+h(n,i,o)|0;y=b,b=p,p=f,f=s+v|0,s=o,o=i,i=n,n=v+_|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=f+this._e|0,this._f=p+this._f|0,this._g=b+this._g|0,this._h=y+this._h|0},f.prototype._hash=function(){var e=o.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},e.exports=f},213:(e,t,r)=>{var n=r(1285),i=r(5596),o=r(3327),a=r(7834).Buffer,s=new Array(160);function f(){this.init(),this._w=s,o.call(this,128,112)}n(f,i),f.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},f.prototype._hash=function(){var e=a.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,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},e.exports=f},5596:(e,t,r)=>{var n=r(1285),i=r(3327),o=r(7834).Buffer,a=[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],s=new Array(160);function f(){this.init(),this._w=s,i.call(this,128,112)}function c(e,t,r){return r^e&(t^r)}function h(e,t,r){return e&t|r&(e|t)}function d(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function u(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function l(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function b(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function y(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function g(e,t){return e>>>0<t>>>0?1:0}n(f,i),f.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},f.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,s=0|this._eh,f=0|this._fh,m=0|this._gh,v=0|this._hh,_=0|this._al,w=0|this._bl,S=0|this._cl,E=0|this._dl,A=0|this._el,M=0|this._fl,k=0|this._gl,I=0|this._hl,R=0;R<32;R+=2)t[R]=e.readInt32BE(4*R),t[R+1]=e.readInt32BE(4*R+4);for(;R<160;R+=2){var x=t[R-30],B=t[R-30+1],O=l(x,B),C=p(B,x),N=b(x=t[R-4],B=t[R-4+1]),T=y(B,x),P=t[R-14],j=t[R-14+1],L=t[R-32],D=t[R-32+1],U=C+j|0,z=O+P+g(U,C)|0;z=(z=z+N+g(U=U+T|0,T)|0)+L+g(U=U+D|0,D)|0,t[R]=z,t[R+1]=U}for(var q=0;q<160;q+=2){z=t[q],U=t[q+1];var F=h(r,n,i),K=h(_,w,S),H=d(r,_),W=d(_,r),V=u(s,A),G=u(A,s),J=a[q],$=a[q+1],X=c(s,f,m),Y=c(A,M,k),Z=I+G|0,Q=v+V+g(Z,I)|0;Q=(Q=(Q=Q+X+g(Z=Z+Y|0,Y)|0)+J+g(Z=Z+$|0,$)|0)+z+g(Z=Z+U|0,U)|0;var ee=W+K|0,te=H+F+g(ee,W)|0;v=m,I=k,m=f,k=M,f=s,M=A,s=o+Q+g(A=E+Z|0,E)|0,o=i,E=S,i=n,S=w,n=r,w=_,r=Q+te+g(_=Z+ee|0,Z)|0}this._al=this._al+_|0,this._bl=this._bl+w|0,this._cl=this._cl+S|0,this._dl=this._dl+E|0,this._el=this._el+A|0,this._fl=this._fl+M|0,this._gl=this._gl+k|0,this._hl=this._hl+I|0,this._ah=this._ah+r+g(this._al,_)|0,this._bh=this._bh+n+g(this._bl,w)|0,this._ch=this._ch+i+g(this._cl,S)|0,this._dh=this._dh+o+g(this._dl,E)|0,this._eh=this._eh+s+g(this._el,A)|0,this._fh=this._fh+f+g(this._fl,M)|0,this._gh=this._gh+m+g(this._gl,k)|0,this._hh=this._hh+v+g(this._hl,I)|0},f.prototype._hash=function(){var e=o.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,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},e.exports=f},4851:(e,t,r)=>{e.exports=i;var n=r(2699).EventEmitter;function i(){n.call(this)}r(1285)(i,n),i.Readable=r(8051),i.Writable=r(2557),i.Duplex=r(7073),i.Transform=r(7640),i.PassThrough=r(5163),i.finished=r(9885),i.pipeline=r(3495),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",s),r.on("close",f));var a=!1;function s(){a||(a=!0,e.end())}function f(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){if(h(),0===n.listenerCount(this,"error"))throw e}function h(){r.removeListener("data",i),e.removeListener("drain",o),r.removeListener("end",s),r.removeListener("close",f),r.removeListener("error",c),e.removeListener("error",c),r.removeListener("end",h),r.removeListener("close",h),e.removeListener("close",h)}return r.on("error",c),e.on("error",c),r.on("end",h),r.on("close",h),e.on("close",h),e.emit("pipe",r),e}},214:(e,t,r)=>{"use strict";var n=r(7834).Buffer,i=n.isEncoding||function(e){switch((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 o(e){var t;switch(this.encoding=function(e){var t=function(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}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=f,this.end=c,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=h,this.end=d,t=3;break;default:return this.write=u,void(this.end=l)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function f(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=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 c(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 h(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?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 d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function u(e){return e.toString(this.encoding)}function l(e){return e&&e.length?this.write(e):""}t.s=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))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||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},o.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=a(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||-2===i?0:(i=a(t[n]))>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||-2===i?0:(i=a(t[n]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.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}},5803:(e,t,r)=>{function n(e){try{if(!r.g.localStorage)return!1}catch(e){return!1}var t=r.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}},8892:e=>{e.exports=function e(t,r){if(t&&r)return e(t)(r);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){n[e]=t[e]})),n;function n(){for(var e=new Array(arguments.length),r=0;r<e.length;r++)e[r]=arguments[r];var n=t.apply(this,e),i=e[e.length-1];return"function"==typeof n&&n!==i&&Object.keys(i).forEach((function(e){n[e]=i[e]})),n}}},3196:()=>{},8087:()=>{},3558:()=>{},4854:()=>{},6602:()=>{},9234:e=>{"use strict";e.exports=JSON.parse('{"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"}}')},26:e=>{"use strict";e.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},9167:e=>{"use strict";e.exports=JSON.parse('{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}')},3418:e=>{"use strict";e.exports=JSON.parse('{"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"}}')},763:e=>{"use strict";e.exports={i8:"6.5.4"}},8675:e=>{"use strict";e.exports=JSON.parse('{"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"}')}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var n={};return(()=>{"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(t,r,n){return(r=function(t){var r=function(t,r){if("object"!==e(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==e(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===e(r)?r:String(r)}(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}r.r(n),r.d(n,{Web3AuthNoModal:()=>V}),r(7525),r(5003),r(9487),r(7270),r(8834).Buffer;class i extends URL{constructor(){super(...arguments),_defineProperty(this,"hashParams",new URLSearchParams)}toString(){return this.hash=this.hashParams.toString(),super.toString.call(this)}}var o=r(2699);function a(e,t,r){try{Reflect.apply(e,t,r)}catch(e){setTimeout((()=>{throw e}))}}r(7847),r(8094),r(8797),r(9928),r(3171);class s extends o.EventEmitter{emit(e){let t="error"===e;const r=this._events;if(void 0!==r)t=t&&void 0===r.error;else if(!t)return!1;for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];if(t){let e;if(i.length>0&&([e]=i),e instanceof Error)throw e;const t=new Error("Unhandled error."+(e?` (${e.message})`:""));throw t.context=e,t}const s=r[e];if(void 0===s)return!1;if("function"==typeof s)a(s,this,i);else{const e=s.length,t=function(e){const t=e.length,r=new Array(t);for(let n=0;n<t;n+=1)r[n]=e[n];return r}(s);for(let r=0;r<e;r+=1)a(t[r],this,i)}return!0}}class f extends Error{constructor(e){let{code:t,message:r,data:n}=e;if(!Number.isInteger(t))throw new Error("code must be an integer");if(!r||"string"!=typeof r)throw new Error("message must be string");super(r),_defineProperty(this,"code",void 0),_defineProperty(this,"data",void 0),this.code=t,void 0!==n&&(this.data=n)}toString(){return stringify({code:this.code,message:this.message,data:this.data,stack:this.stack})}}Symbol("IGNORE_SUBSTREAM");var c=r(9640),h=r.n(c);r(1249),r(1344);h().getLogger("http-helpers").setLevel(c.levels.INFO),r(8834).Buffer;const d="openlogin_store";h().setLevel("error"),h().getLogger("openlogin");class u{constructor(){t(this,"store",{})}getItem(e){return this.store[e]||null}setItem(e,t){this.store[e]=t}}function l(e){let t,r=!1,n=0;try{t=window[e],r=!0,n=t.length;const i="__storage_test__";return t.setItem(i,i),t.removeItem(i),!0}catch(e){return e&&(22===e.code||1014===e.code||"QuotaExceededErro r"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&r&&0!==n}}const p=l("sessionStorage"),b=l("localStorage");t(class{constructor(e,r){t(this,"storage",void 0),t(this,"_storeKey",d),this.storage=e,this._storeKey=r||d;try{e.getItem(r||d)||this.resetStore()}catch(e){}}static getInstance(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"local";if(!this.instance){let r=new u;"local"===t&&b&&(r=localStorage),"session"===t&&p&&(r=sessionStorage);const n=e?`${d}_${e}`:d;this.instance=new this(r,n)}return this.instance}toJSON(){return this.storage.getItem(this._storeKey)}resetStore(){const e=this.getStore();return this.storage.setItem(this._storeKey,JSON.stringify({})),e}getStore(){return JSON.parse(this.storage.getItem(this._storeKey))}get(e){return JSON.parse(this.storage.getItem(this._storeKey))[e]}set(e,t){const r=JSON.parse(this.storage.getItem(this._storeKey));r[e]=t,this.storage.setItem(this._storeKey,JSON.stringify(r))}},"instance",void 0);var y,g=(y=function(e,t){return y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},y(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}y(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),m=function(e){function t(t,r){var n,i,o,a=this.constructor,s=e.call(this,t,r)||this;return Object.defineProperty(s,"name",{value:a.name,enumerable:!1,configurable:!0}),n=s,i=a.prototype,(o=Object.setPrototypeOf)?o(n,i):n.__proto__=i,function(e,t){void 0===t&&(t=e.constructor);var r=Error.captureStackTrace;r&&r(e,t)}(s),s}return g(t,e),t}(Error);function v(e){this.message=e}function _(e){this.message=e}v.prototype=new Error,v.prototype.name="InvalidCharacterError","undefined"!=typeof window&&window.atob&&window.atob.bind(window),_.prototype=new Error,_.prototype.name="InvalidTokenError";const w={EIP155:"eip155",SOLANA:"solana",OTHER:"other"},S="multichain",E=(e,t)=>{if(e===w.OTHER)return null;const r=t?"number"==typeof t?t:parseInt(t,16):(e=>{if(e===w.EIP155)return 1;if(e===w.SOLANA)return 1;throw new Error(`Chain namespace ${e} is not supported`)})(e);return e===w.EIP155?(e=>{const t=w.EIP155;return 1===e?{chainNamespace:t,chainId:"0x1",rpcTarget:"https://rpc.ankr.com/eth",displayName:"Ethereum Mainnet",blockExplorer:"https://etherscan.io/",ticker:"ETH",tickerName:"Ethereum",decimals:18}:5===e?{chainNamespace:t,chainId:"0x5",rpcTarget:"https://rpc.ankr.com/eth_goerli",displayName:"Goerli Testnet",blockExplorer:"https://goerli.etherscan.io/",ticker:"ETH",tickerName:"Ethereum",decimals:18}:11155111===e?{chainNamespace:t,chainId:"0xaa36a7",rpcTarget:"https://rpc.ankr.com/eth_sepolia",displayName:"Sepolia Testnet",blockExplorer:"https://sepolia.etherscan.io/",ticker:"ETH",tickerName:"Ethereum",decimals:18}:137===e?{chainNamespace:t,chainId:"0x89",rpcTarget:"https://rpc.ankr.com/polygon",displayName:"Polygon Mainnet",blockExplorer:"https://polygonscan.com",ticker:"MATIC",tickerName:"Polygon"}:80001===e?{chainNamespace:t,chainId:"0x13881",rpcTarget:"https://rpc.ankr.com/polygon_mumbai",displayName:"Polygon Mumbai Testnet",blockExplorer:"https://mumbai.polygonscan.com/",ticker:"MATIC",tickerName:"Polygon",decimals:18}:56===e?{chainNamespace:t,chainId:"0x38",rpcTarget:"https://rpc.ankr.com/bsc",displayName:"Binance SmartChain Mainnet",blockExplorer:"https://bscscan.com",ticker:"BNB",tickerName:"Binance SmartChain",decimals:18}:97===e?{chainNamespace:t,chainId:"0x61",rpcTarget:"https://rpc.ankr.com/bsc_testnet_chapel",displayName:"Binance SmartChain Testnet",blockExplorer:"https://testnet.bscscan.com",ticker:"BNB",tickerName:"Binance SmartChain",decimals:18}:25===e?{chainNamespace:t,chainId:"0x19",rpcTarget:"https://rpc.cronos.org",displayName:"Cronos Mainnet",blockExplorer:"https://cronoscan.com/",ticker:"CRO",tickerName:"Cronos"}:338===e?{chainNamespace:t,chainId:"0x152",rpcTarget:"https://rpc-t3.cronos.org/",displayName:"Cronos Testnet",blockExplorer:"https://cronoscan.com/",ticker:"CRO",tickerName:"Cronos",decimals:18}:8217===e?{chainNamespace:t,chainId:"0x2019",rpcTarget:"https://public-node-api.klaytnapi.com/v1/cypress",displayName:"Klaytn Mainnet",blockExplorer:"https://scope.klaytn.com",ticker:"KLAY",tickerName:"Klaytn",decimals:18}:null})(r):e===w.SOLANA?(e=>{const t=w.SOLANA;return 1===e?{chainNamespace:t,chainId:"0x1",rpcTarget:"https://rpc.ankr.com/solana",displayName:"Solana Mainnet",blockExplorer:"https://explorer.solana.com",ticker:"SOL",tickerName:"Solana",decimals:9}:2===e?{chainNamespace:t,chainId:"0x2",rpcTarget:"https://api.testnet.solana.com",displayName:"Solana Testnet",blockExplorer:"https://explorer.solana.com?cluster=testnet",ticker:"SOL",tickerName:"Solana",decimals:9}:3===e?{chainNamespace:t,chainId:"0x3",rpcTarget:"https://api.devnet.solana.com",displayName:"Solana Devnet",blockExplorer:"https://explorer.solana.com?cluster=devnet",ticker:"SOL",tickerName:"Solana",decimals:9}:null})(r):null};class A extends m{constructor(e,r){super(r),t(this,"code",void 0),t(this,"message",void 0),this.code=e,this.message=r||"",Object.defineProperty(this,"name",{value:"Web3AuthError"})}toJSON(){return{name:this.name,code:this.code,message:this.message}}toString(){return JSON.stringify(this.toJSON())}}class M extends A{constructor(e,t){super(e,t),Object.defineProperty(this,"name",{value:"WalletInitializationError"})}static fromCode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new M(e,`${M.messages[e]}, ${t}`)}static notFound(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return M.fromCode(5001,e)}static notInstalled(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return M.fromCode(5002,e)}static notReady(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return M.fromCode(5003,e)}static windowBlocked(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return M.fromCode(5004,e)}static windowClosed(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return M.fromCode(5005,e)}static incompatibleChainNameSpace(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return M.fromCode(5006,e)}static duplicateAdapterError(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return M.fromCode(5007,e)}static invalidProviderConfigError(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return M.fromCode(5008,e)}static providerNotReadyError(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return M.fromCode(5009,e)}static rpcConnectionError(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return M.fromCode(5010,e)}static invalidParams(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return M.fromCode(5011,e)}static invalidNetwork(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return M.fromCode(5013,e)}}t(M,"messages",{5e3:"Custom",5001:"Wallet is not found",5002:"Wallet is not installed",5003:"Wallet is not ready yet",5004:"Wallet window is blocked",5005:"Wallet window has been closed by the user",5006:"Incompatible chain namespace provided",5007:"Adapter has already been included",5008:"Invalid provider Config",5009:"Provider is not ready yet",5010:"Failed to connect with rpc url",5011:"Invalid params passed in",5013:"Invalid network provided"});class k extends A{constructor(e,t){super(e,t),Object.defineProperty(this,"name",{value:"WalletLoginError"})}static fromCode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new k(e,`${k.messages[e]}. ${t}`)}static connectionError(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return k.fromCode(5111,e)}static disconnectionError(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return k.fromCode(5112,e)}static notConnectedError(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return k.fromCode(5113,e)}static popupClosed(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return k.fromCode(5114,e)}static mfaEnabled(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return k.fromCode(5115,e)}static chainConfigNotAdded(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return k.fromCode(5116,e)}static unsupportedOperation(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return k.fromCode(5117,e)}static coreKitKeyNotFound(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return k.fromCode(5118,e)}static userNotLoggedIn(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return k.fromCode(5119,e)}}t(k,"messages",{5e3:"Custom",5111:"Failed to connect with wallet",5112:"Failed to disconnect from wallet",5113:"Wallet is not connected",5114:"Wallet popup has been closed by the user",5115:"User has already enabled mfa, please use the @web3auth/web3auth-web sdk for login with mfa",5116:"Chain config has not been added. Please add the chain config before calling switchChain",5117:"Unsupported operation",5118:"useCoreKitKey flag is enabled but coreKitKey is not available",5119:"User not logged in."});class I extends A{constructor(e,t){super(e,t),Object.defineProperty(this,"name",{value:"WalletOperationsError"})}static fromCode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new I(e,`${I.messages[e]}, ${t}`)}static chainIDNotAllowed(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return I.fromCode(5201,e)}static operationNotAllowed(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return I.fromCode(5202,e)}}function R(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function x(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?R(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t(I,"messages",{5e3:"Custom",5201:"Provided chainId is not allowed",5202:"This operation is not allowed"});const B={OPENLOGIN:"openlogin",WALLET_CONNECT_V1:"wallet-connect-v1",WALLET_CONNECT_V2:"wallet-connect-v2"},O=x({TORUS_SOLANA:"torus-solana",PHANTOM:"phantom",SOLFLARE:"solflare",SLOPE:"slope"},B),C=x({TORUS_EVM:"torus-evm",METAMASK:"metamask",COINBASE:"coinbase"},B),N=x(x({},C),O);function T(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function P(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?T(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}O.TORUS_SOLANA,O.PHANTOM,O.SOLFLARE,O.SLOPE,C.TORUS_EVM,C.METAMASK,C.COINBASE;const j={NOT_READY:"not_ready",READY:"ready",CONNECTING:"connecting",CONNECTED:"connected",DISCONNECTED:"disconnected",ERRORED:"errored"},L=P(P({},j),{},{ADAPTER_DATA_UPDATED:"adapter_data_updated",CACHE_CLEAR:"cache_clear"});var D=h().getLogger("web3auth-logger");function U(e){let t,r=!1,n=0;try{t=window[e],r=!0,n=t.length;const i="__storage_test__";return t.setItem(i,i),t.removeItem(i),!0}catch(e){const t=e;return!(!t||22!==t.code&&1014!==t.code&&"QuotaExceededError"!==t.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==t.name||!r||0===n)}}function z(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function q(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?z(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const F=q(q({},w),{},{MULTICHAIN:"multichain"});function K(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function H(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?K(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const W="Web3Auth-cachedAdapter";class V extends s{constructor(e){var r,n,i,o;if(super(),t(this,"coreOptions",void 0),t(this,"connectedAdapterName",null),t(this,"status",j.NOT_READY),t(this,"cachedAdapter",null),t(this,"walletAdapters",{}),t(this,"plugins",{}),t(this,"storage","localStorage"),!e.clientId)throw M.invalidParams("Please provide a valid clientId in constructor");if(e.enableLogging?D.enableAll():D.disableAll(),null===(r=e.chainConfig)||void 0===r||!r.chainNamespace||!Object.values(w).includes(null===(n=e.chainConfig)||void 0===n?void 0:n.chainNamespace))throw M.invalidParams("Please provide a valid chainNamespace in chainConfig");"session"===e.storageKey&&(this.storage="sessionStorage"),this.cachedAdapter=U(this.storage)?window[this.storage].getItem(W):null,this.coreOptions=H(H({},e),{},{chainConfig:H(H({},E(null===(i=e.chainConfig)||void 0===i?void 0:i.chainNamespace,null===(o=e.chainConfig)||void 0===o?void 0:o.chainId)||{}),e.chainConfig)}),this.subscribeToAdapterEvents=this.subscribeToAdapterEvents.bind(this)}get provider(){return this.status===j.CONNECTED&&this.connectedAdapterName?this.walletAdapters[this.connectedAdapterName].provider:null}set provider(e){throw new Error("Not implemented")}async init(){const e=Object.keys(this.walletAdapters).map((e=>{if(this.subscribeToAdapterEvents(this.walletAdapters[e]),this.walletAdapters[e].chainConfigProxy)this.walletAdapters[e].setAdapterSettings({sessionTime:this.coreOptions.sessionTime,clientId:this.coreOptions.clientId,web3AuthNetwork:this.coreOptions.web3AuthNetwork,useCoreKitKey:this.coreOptions.useCoreKitKey});else{const t=this.coreOptions.chainConfig;if(!t.chainNamespace)throw M.invalidParams("Please provide chainNamespace in chainConfig");this.walletAdapters[e].setAdapterSettings({chainConfig:t,sessionTime:this.coreOptions.sessionTime,clientId:this.coreOptions.clientId,web3AuthNetwork:this.coreOptions.web3AuthNetwork,useCoreKitKey:this.coreOptions.useCoreKitKey})}return this.walletAdapters[e].init({autoConnect:this.cachedAdapter===e}).catch((e=>D.error(e)))}));this.status=j.READY,await Promise.all(e)}configureAdapter(e){this.checkInitRequirements();const t=this.coreOptions.chainConfig;if(!t.chainNamespace)throw M.invalidParams("Please provide chainNamespace in chainConfig");if(this.walletAdapters[e.name])throw M.duplicateAdapterError(`Wallet adapter for ${e.name} already exists`);if(e.adapterNamespace!==S&&e.adapterNamespace!==t.chainNamespace)throw M.incompatibleChainNameSpace(`This wallet adapter belongs to ${e.adapterNamespace} which is incompatible with currently used namespace: ${t.chainNamespace}`);if(e.name===N.WALLET_CONNECT_V2&&this.walletAdapters[N.WALLET_CONNECT_V1])throw M.invalidParams("Either one of wallet connect v2 or wallet connect v1 can be used, wallet connect v1 is already added to adapter lists.");if(e.name===N.WALLET_CONNECT_V1&&this.walletAdapters[N.WALLET_CONNECT_V2])throw M.invalidParams("Either one of wallet connect v2 or wallet connect v1 can be used, wallet connect v2 is already added to adapter lists.");return e.adapterNamespace===S&&e.currentChainNamespace&&t.chainNamespace!==e.currentChainNamespace&&e.setAdapterSettings({chainConfig:t}),this.walletAdapters[e.name]=e,this}clearCache(){U(this.storage)&&(window[this.storage].removeItem(W),this.cachedAdapter=null)}async addChain(e){if(this.status!==j.CONNECTED||!this.connectedAdapterName)throw k.notConnectedError("No wallet is connected");return this.walletAdapters[this.connectedAdapterName].addChain(e)}async switchChain(e){if(this.status!==j.CONNECTED||!this.connectedAdapterName)throw k.notConnectedError("No wallet is connected");return this.walletAdapters[this.connectedAdapterName].switchChain(e)}async connectTo(e,t){if(!this.walletAdapters[e])throw M.notFound(`Please add wallet adapter for ${e} wallet, before connecting`);return await this.walletAdapters[e].connect(t)}async logout(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{cleanup:!1};if(this.status!==j.CONNECTED||!this.connectedAdapterName)throw k.notConnectedError("No wallet is connected");await this.walletAdapters[this.connectedAdapterName].disconnect(e)}async getUserInfo(){if(D.debug("Getting user info",this.status,this.connectedAdapterName),this.status!==j.CONNECTED||!this.connectedAdapterName)throw k.notConnectedError("No wallet is connected");return this.walletAdapters[this.connectedAdapterName].getUserInfo()}async authenticateUser(){if(this.status!==j.CONNECTED||!this.connectedAdapterName)throw k.notConnectedError("No wallet is connected");return this.walletAdapters[this.connectedAdapterName].authenticateUser()}async addPlugin(e){if(this.plugins[e.name])throw new Error(`Plugin ${e.name} already exist`);if(e.pluginNamespace!==F.MULTICHAIN&&e.pluginNamespace!==this.coreOptions.chainConfig.chainNamespace)throw new Error(`This plugin belongs to ${e.pluginNamespace} namespace which is incompatible with currently used namespace: ${this.coreOptions.chainConfig.chainNamespace}`);return this.plugins[e.name]=e,this}subscribeToAdapterEvents(e){e.on(L.CONNECTED,(async e=>{this.status=j.CONNECTED,this.connectedAdapterName=e.adapter,this.cacheWallet(e.adapter),D.debug("connected",this.status,this.connectedAdapterName),Object.values(this.plugins).map((async t=>{try{if(!t.SUPPORTED_ADAPTERS.includes(e.adapter))return;await t.initWithWeb3Auth(this),await t.connect()}catch(e){if(5211===e.code)return;D.error(e)}})),this.emit(L.CONNECTED,H({},e))})),e.on(L.DISCONNECTED,(async e=>{if(this.status=j.READY,U(this.storage)){const e=window[this.storage].getItem(W);this.connectedAdapterName===e&&this.clearCache()}D.debug("disconnected",this.status,this.connectedAdapterName),await Promise.all(Object.values(this.plugins).map((e=>e.disconnect().catch((e=>{5211!==e.code&&D.error(e)}))))),this.connectedAdapterName=null,this.emit(L.DISCONNECTED,e)})),e.on(L.CONNECTING,(e=>{this.status=j.CONNECTING,this.emit(L.CONNECTING,e),D.debug("connecting",this.status,this.connectedAdapterName)})),e.on(L.ERRORED,(e=>{this.status=j.ERRORED,this.clearCache(),this.emit(L.ERRORED,e),D.debug("errored",this.status,this.connectedAdapterName)})),e.on(L.ADAPTER_DATA_UPDATED,(e=>{D.debug("adapter data updated",e),this.emit(L.ADAPTER_DATA_UPDATED,e)})),e.on(L.CACHE_CLEAR,(e=>{D.debug("adapter cache clear",e),U(this.storage)&&this.clearCache()}))}checkInitRequirements(){if(this.status===j.CONNECTING)throw M.notReady("Already pending connection");if(this.status===j.CONNECTED)throw M.notReady("Already connected");if(this.status===j.READY)throw M.notReady("Adapter is already initialized")}cacheWallet(e){U(this.storage)&&(window[this.storage].setItem(W,e),this.cachedAdapter=e)}}})(),n})()));
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.NoModal=t():e.NoModal=t()}(self,(()=>(()=>{var e={6975:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.byteArrayToHashObject=t.hashObjectToByteArray=void 0,t.hashObjectToByteArray=function(e,t,r){let n=e.h0;t[0+r]=255&n,n>>=8,t[1+r]=255&n,n>>=8,t[2+r]=255&n,n>>=8,t[3+r]=255&n,n=e.h1,t[4+r]=255&n,n>>=8,t[5+r]=255&n,n>>=8,t[6+r]=255&n,n>>=8,t[7+r]=255&n,n=e.h2,t[8+r]=255&n,n>>=8,t[9+r]=255&n,n>>=8,t[10+r]=255&n,n>>=8,t[11+r]=255&n,n=e.h3,t[12+r]=255&n,n>>=8,t[13+r]=255&n,n>>=8,t[14+r]=255&n,n>>=8,t[15+r]=255&n,n=e.h4,t[16+r]=255&n,n>>=8,t[17+r]=255&n,n>>=8,t[18+r]=255&n,n>>=8,t[19+r]=255&n,n=e.h5,t[20+r]=255&n,n>>=8,t[21+r]=255&n,n>>=8,t[22+r]=255&n,n>>=8,t[23+r]=255&n,n=e.h6,t[24+r]=255&n,n>>=8,t[25+r]=255&n,n>>=8,t[26+r]=255&n,n>>=8,t[27+r]=255&n,n=e.h7,t[28+r]=255&n,n>>=8,t[29+r]=255&n,n>>=8,t[30+r]=255&n,n>>=8,t[31+r]=255&n},t.byteArrayToHashObject=function(e){let t=0;t|=255&e[3],t<<=8,t|=255&e[2],t<<=8,t|=255&e[1],t<<=8,t|=255&e[0];const r=t;t=0,t|=255&e[7],t<<=8,t|=255&e[6],t<<=8,t|=255&e[5],t<<=8,t|=255&e[4];const n=t;t=0,t|=255&e[11],t<<=8,t|=255&e[10],t<<=8,t|=255&e[9],t<<=8,t|=255&e[8];const i=t;t=0,t|=255&e[15],t<<=8,t|=255&e[14],t<<=8,t|=255&e[13],t<<=8,t|=255&e[12];const o=t;t=0,t|=255&e[19],t<<=8,t|=255&e[18],t<<=8,t|=255&e[17],t<<=8,t|=255&e[16];const s=t;t=0,t|=255&e[23],t<<=8,t|=255&e[22],t<<=8,t|=255&e[21],t<<=8,t|=255&e[20];const a=t;t=0,t|=255&e[27],t<<=8,t|=255&e[26],t<<=8,t|=255&e[25],t<<=8,t|=255&e[24];const u=t;return t=0,t|=255&e[31],t<<=8,t|=255&e[30],t<<=8,t|=255&e[29],t<<=8,t|=255&e[28],{h0:r,h1:n,h2:i,h3:o,h4:s,h5:a,h6:u,h7:t}}},5113:(e,t)=>{"use strict";function r(e,t){const r=BigInt(1)<<BigInt(e);if(t>=r)throw new Error(`index ${t} too large for depth ${e}`);return r|t}Object.defineProperty(t,"__esModule",{value:!0}),t.gindexChild=t.gindexParent=t.gindexSibling=t.concatGindices=t.getGindexBits=t.gindexIterator=t.getGindicesAtDepth=t.iterateAtDepth=t.countToDepth=t.convertGindexToBitstring=t.toGindexBitstring=t.toGindex=t.bitIndexBigInt=void 0,t.bitIndexBigInt=function(e){return e.toString(2).length-1},t.toGindex=r,t.toGindexBitstring=function(e,t){const r=t?Number(t).toString(2):"";if(r.length>e)throw new Error("index too large for depth");return"1"+r.padStart(e,"0")},t.convertGindexToBitstring=function(e){if("string"==typeof e){if(0===e.length)throw new Error(n);return e}if(e<1)throw new Error(n);return e.toString(2)},t.countToDepth=function(e){return e<=1?0:(e-BigInt(1)).toString(2).length},t.iterateAtDepth=function(e,t,n){if(t+n>BigInt(1)<<BigInt(e))throw new Error("Too large for depth");let i=r(e,t);const o=i+n;return{[Symbol.iterator]:()=>({next(){if(i<o){const e=i;return i++,{done:!1,value:e}}return{done:!0,value:void 0}}})}},t.getGindicesAtDepth=function(e,t,n){if(t+n>BigInt(1)<<BigInt(e))throw new Error("Too large for depth");let i=r(e,BigInt(t));const o=[];for(let e=0;e<n;e++)o.push(i++);return o};const n="Invalid gindex";t.gindexIterator=function(e){let t;if("string"==typeof e){if(!e.length)throw new Error(n);t=e}else{if(e<1)throw new Error(n);t=e.toString(2)}let r=1;const i=()=>{if(r===t.length)return{done:!0,value:void 0};const e=Number(t[r]);return r++,{done:!1,value:e}};return{[Symbol.iterator]:()=>({next:i}),remainingBitLength:()=>t.length-r}},t.getGindexBits=function(e){let t;if("string"==typeof e){if(!e.length)throw new Error(n);t=e}else{if(e<1)throw new Error(n);t=e.toString(2)}const r=[];for(let e=1;e<t.length;e++)r.push(Number(t[e]));return r},t.concatGindices=function(e){return BigInt(e.reduce(((e,t)=>e+t.toString(2).slice(1)),"0b1"))},t.gindexSibling=function(e){return e^BigInt(1)},t.gindexParent=function(e){return e/BigInt(2)},t.gindexChild=function(e,t){return e*BigInt(2)+BigInt(t)}},9457:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.setHasher=t.hasher=void 0;const o=r(7207);i(r(4571),t),i(r(336),t),t.hasher=o.hasher,t.setHasher=function(e){t.hasher=e}},7207:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasher=void 0;const n=r(6053),i=r(336),o=(e,t)=>n.sha256.create().update(e).update(t).digest();t.hasher={digest64:o,digest64HashObjects:(e,t)=>i.uint8ArrayToHashObject(o(i.hashObjectToUint8Array(e),i.hashObjectToUint8Array(t)))}},4571:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},336:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint8ArrayToHashObject=t.hashObjectToUint8Array=void 0;const n=r(6975);t.hashObjectToUint8Array=function(e){const t=new Uint8Array(32);return n.hashObjectToByteArray(e,t,0),t},t.uint8ArrayToHashObject=function(e){return n.byteArrayToHashObject(e)}},6567:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(5113),t),i(r(9457),t),i(r(8894),t),i(r(628),t),i(r(7392),t),i(r(8738),t),i(r(2969),t),i(r(7048),t)},8894:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bitwiseOrNodeH=t.setNodeH=t.getNodeH=t.compose=t.identity=t.LeafNode=t.BranchNode=t.Node=void 0;const n=r(9457),i=2**32;class o{constructor(e,t,r,n,i,o,s,a){this.h0=e,this.h1=t,this.h2=r,this.h3=n,this.h4=i,this.h5=o,this.h6=s,this.h7=a}applyHash(e){this.h0=e.h0,this.h1=e.h1,this.h2=e.h2,this.h3=e.h3,this.h4=e.h4,this.h5=e.h5,this.h6=e.h6,this.h7=e.h7}}t.Node=o,t.BranchNode=class extends o{constructor(e,t){if(super(null,0,0,0,0,0,0,0),this._left=e,this._right=t,!e)throw new Error("Left node is undefined");if(!t)throw new Error("Right node is undefined")}get rootHashObject(){return null===this.h0&&super.applyHash(n.hasher.digest64HashObjects(this.left.rootHashObject,this.right.rootHashObject)),this}get root(){return n.hashObjectToUint8Array(this.rootHashObject)}isLeaf(){return!1}get left(){return this._left}get right(){return this._right}};class s extends o{static fromRoot(e){return this.fromHashObject(n.uint8ArrayToHashObject(e))}static fromHashObject(e){return new s(e.h0,e.h1,e.h2,e.h3,e.h4,e.h5,e.h6,e.h7)}static fromZero(){return new s(0,0,0,0,0,0,0,0)}static fromUint32(e){return new s(e,0,0,0,0,0,0,0)}clone(){return s.fromHashObject(this)}get rootHashObject(){return this}get root(){return n.hashObjectToUint8Array(this)}isLeaf(){return!0}get left(){throw Error("LeafNode has no left node")}get right(){throw Error("LeafNode has no right node")}writeToBytes(e,t,r){e.set(this.root.slice(0,r),t)}getUint(e,t,r){const n=Math.floor(t/4);if(e<4){const r=t%4*8,i=a(this,n);return 1===e?255&i>>r:65535&i>>r}if(4===e)return a(this,n)>>>0;if(8===e){const e=a(this,n),t=a(this,n+1);return 0===t?e>>>0:-1===t&&-1===e&&r?1/0:(e>>>0)+(t>>>0)*i}throw Error("uintBytes > 8")}getUintBigint(e,t){const r=Math.floor(t/4);if(e<4){const n=t%4*8,i=a(this,r);return 1===e?BigInt(255&i>>n):BigInt(65535&i>>n)}if(4===e)return BigInt(a(this,r)>>>0);{const t=Math.ceil(e/4);let n=BigInt(0);for(let e=0;e<t;e++)n+=BigInt(a(this,r+e)>>>0)<<BigInt(32*e);return n}}setUint(e,t,r,n){const o=Math.floor(t/4);if(e<4){const n=t%4*8;let i=a(this,o);1===e?(i&=~(255<<n),i|=r<<n):(i&=~(65535<<n),i|=r<<n),u(this,o,i)}else if(4===e)u(this,o,r);else{if(8!==e)throw Error("uintBytes > 8");r===1/0&&n?(u(this,o,-1),u(this,o+1,-1)):(u(this,o,4294967295&r),u(this,o+1,r/i&4294967295))}}setUintBigint(e,t,r){const n=Math.floor(t/4);if(e<4){const i=Number(r),o=t%4*8;let s=a(this,n);1===e?(s&=~(255<<o),s|=i<<o):(s&=~(65535<<o),s|=i<<o),u(this,n,s)}else if(4===e)u(this,n,Number(r));else{const t=n+Math.ceil(e/4);for(let e=n;e<t;e++)u(this,e,Number(r&BigInt(4294967295))),r>>=BigInt(32)}}bitwiseOrUint(e,t,r){const n=Math.floor(t/4);if(e<4)c(this,n,r<<t%4*8);else if(4===e)c(this,n,r);else{const t=n+Math.ceil(e/4);for(let e=n;e<t;e++)c(this,e,4294967295&r),r>>=32}}}function a(e,t){if(0===t)return e.h0;if(1===t)return e.h1;if(2===t)return e.h2;if(3===t)return e.h3;if(4===t)return e.h4;if(5===t)return e.h5;if(6===t)return e.h6;if(7===t)return e.h7;throw Error("hIndex > 7")}function u(e,t,r){if(0===t)e.h0=r;else if(1===t)e.h1=r;else if(2===t)e.h2=r;else if(3===t)e.h3=r;else if(4===t)e.h4=r;else if(5===t)e.h5=r;else if(6===t)e.h6=r;else{if(7!==t)throw Error("hIndex > 7");e.h7=r}}function c(e,t,r){if(0===t)e.h0|=r;else if(1===t)e.h1|=r;else if(2===t)e.h2|=r;else if(3===t)e.h3|=r;else if(4===t)e.h4|=r;else if(5===t)e.h5|=r;else if(6===t)e.h6|=r;else{if(7!==t)throw Error("hIndex > 7");e.h7|=r}}t.LeafNode=s,t.identity=function(e){return e},t.compose=function(e,t){return function(r){return t(e(r))}},t.getNodeH=a,t.setNodeH=u,t.bitwiseOrNodeH=c},628:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.packedNodeRootsToBytes=t.packedRootsBytesToLeafNodes=t.packedRootsBytesToNode=void 0;const n=r(8738),i=r(8894);function o(e,t,r){const n=r-t,o=Math.floor(n/32),s=new Array(Math.ceil(n/32));for(let r=0;r<o;r++){const n=t+32*r;s[r]=new i.LeafNode(e.getInt32(n+0,!0),e.getInt32(n+4,!0),e.getInt32(n+8,!0),e.getInt32(n+12,!0),e.getInt32(n+16,!0),e.getInt32(n+20,!0),e.getInt32(n+24,!0),e.getInt32(n+28,!0))}const a=n%32;if(a>0){const r=new i.LeafNode(0,0,0,0,0,0,0,0);s[o]=r;const u=Math.floor(a/4);for(let n=0;n<u;n++)i.setNodeH(r,n,e.getInt32(t+32*o+4*n,!0));const c=n%4;if(c>0){let o=0;for(let r=0;r<c;r++)o|=e.getUint8(t+n-c+r)<<8*r;i.setNodeH(r,u,o)}}return s}t.packedRootsBytesToNode=function(e,t,r,i){const s=o(t,r,i);return n.subtreeFillToContents(s,e)},t.packedRootsBytesToLeafNodes=o,t.packedNodeRootsToBytes=function(e,t,r,n){const o=r%32,s=Math.floor(r/32);for(let r=0;r<s;r++){const i=n[r],o=t+32*r;e.setInt32(o+0,i.h0,!0),e.setInt32(o+4,i.h1,!0),e.setInt32(o+8,i.h2,!0),e.setInt32(o+12,i.h3,!0),e.setInt32(o+16,i.h4,!0),e.setInt32(o+20,i.h5,!0),e.setInt32(o+24,i.h6,!0),e.setInt32(o+28,i.h7,!0)}if(o>0){const a=n[s],u=Math.floor(o/4);for(let r=0;r<u;r++)e.setInt32(t+32*s+4*r,i.getNodeH(a,r),!0);const c=r%4;if(c>0){const n=i.getNodeH(a,u);for(let i=0;i<c;i++)e.setUint8(t+r-c+i,n>>8*i&255)}}}},65:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createNodeFromCompactMultiProof=t.createCompactMultiProof=t.compactMultiProofToNode=t.nodeToCompactMultiProof=t.descriptorToBitlist=t.computeDescriptor=void 0;const n=r(5113),i=r(8894),o=r(5410);function s(e,t){const r=t%8,n=e[Math.floor(t/8)];switch(r){case 0:return 0!=(128&n);case 1:return 0!=(64&n);case 2:return 0!=(32&n);case 3:return 0!=(16&n);case 4:return 0!=(8&n);case 5:return 0!=(4&n);case 6:return 0!=(2&n);case 7:return 0!=(1&n);default:throw new Error("unreachable")}}function a(e){const t=[],r=8*e.length;let n=0,i=0;for(let o=0;o<r;o++){const a=s(e,o);if(t.push(a),a?i++:n++,i>n){if(o++,o+7<r)throw new Error("Invalid descriptor: too many bytes");for(;o<r;o++)if(s(e,o))throw new Error("Invalid descriptor: too many 1 bits");return t}}throw new Error("Invalid descriptor: not enough 1 bits")}function u(e,t,r){if(t[r])return[e.root];{const n=u(e.left,t,r+1),i=u(e.right,t,r+2*n.length);return[...n,...i]}}function c(e,t,r){return e[r.bitIndex++]?i.LeafNode.fromRoot(t[r.leafIndex++]):new i.BranchNode(c(e,t,r),c(e,t,r))}t.computeDescriptor=function(e){const t=new Set,r=new Set;for(const i of e){const e=n.convertGindexToBitstring(i);t.add(e);const{branch:s,path:a}=o.computeProofBitstrings(e);a.delete(e);for(const e of a)r.add(e);for(const e of s)t.add(e)}for(const e of r)t.delete(e);const i=Array.from(t).sort(((e,t)=>e.localeCompare(t)));let s="";for(const e of i)for(let t=0;t<e.length;t++)if("1"===e[e.length-1-t]){s+="1".padStart(t+1,"0");break}s.length%8!=0&&(s=s.padEnd(8-s.length%8+s.length,"0"));const a=new Uint8Array(s.length/8);for(let e=0;e<a.length;e++)a[e]=Number("0b"+s.substring(8*e,8*(e+1)));return a},t.descriptorToBitlist=a,t.nodeToCompactMultiProof=u,t.compactMultiProofToNode=c,t.createCompactMultiProof=function(e,t){return u(e,a(t),0)},t.createNodeFromCompactMultiProof=function(e,t){const r=a(t);if(r.length!==2*e.length-1)throw new Error("Invalid multiproof: invalid number of leaves");return c(r,e,{bitIndex:0,leafIndex:0})}},7392:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deserializeProof=t.serializeProof=t.createNodeFromProof=t.createProof=t.ProofTypeSerialized=t.ProofType=t.descriptorToBitlist=t.computeDescriptor=void 0;const n=r(4871),i=r(65),o=r(2456),s=r(5492);var a,u=r(65);Object.defineProperty(t,"computeDescriptor",{enumerable:!0,get:function(){return u.computeDescriptor}}),Object.defineProperty(t,"descriptorToBitlist",{enumerable:!0,get:function(){return u.descriptorToBitlist}}),function(e){e.single="single",e.treeOffset="treeOffset",e.multi="multi",e.compactMulti="compactMulti"}(a=t.ProofType||(t.ProofType={})),t.ProofTypeSerialized=[a.single,a.treeOffset,a.multi,a.compactMulti],t.createProof=function(e,t){switch(t.type){case a.single:{const[r,n]=o.createSingleProof(e,t.gindex);return{type:a.single,gindex:t.gindex,leaf:r,witnesses:n}}case a.treeOffset:{const[r,n]=s.createTreeOffsetProof(e,t.gindices);return{type:a.treeOffset,offsets:r,leaves:n}}case a.multi:{const[r,i,o]=n.createMultiProof(e,t.gindices);return{type:a.multi,leaves:r,witnesses:i,gindices:o}}case a.compactMulti:{const r=i.createCompactMultiProof(e,t.descriptor);return{type:a.compactMulti,leaves:r,descriptor:t.descriptor}}default:throw new Error("Invalid proof type")}},t.createNodeFromProof=function(e){switch(e.type){case a.single:return o.createNodeFromSingleProof(e.gindex,e.leaf,e.witnesses);case a.treeOffset:return s.createNodeFromTreeOffsetProof(e.offsets,e.leaves);case a.multi:return n.createNodeFromMultiProof(e.leaves,e.witnesses,e.gindices);case a.compactMulti:return i.createNodeFromCompactMultiProof(e.leaves,e.descriptor);default:throw new Error("Invalid proof type")}},t.serializeProof=function(e){switch(e.type){case a.single:case a.multi:throw new Error("Not implemented");case a.treeOffset:{const r=new Uint8Array(1+s.computeTreeOffsetProofSerializedLength(e.offsets,e.leaves));return r[0]=t.ProofTypeSerialized.indexOf(a.treeOffset),s.serializeTreeOffsetProof(r,1,e.offsets,e.leaves),r}default:throw new Error("Invalid proof type")}},t.deserializeProof=function(e){const r=t.ProofTypeSerialized[e[0]];if(!r)throw new Error("Invalid proof type");switch(r){case a.single:case a.multi:throw new Error("Not implemented");case a.treeOffset:{const[t,r]=s.deserializeTreeOffsetProof(e,1);return{type:a.treeOffset,offsets:t,leaves:r}}default:throw new Error("Invalid proof type")}}},4871:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createNodeFromMultiProof=t.createMultiProof=void 0;const n=r(8894),i=r(2969),o=r(5410);t.createMultiProof=function(e,t){const r=new i.Tree(e),n=o.computeMultiProofBitstrings(t.map((e=>e.toString(2))),!1,o.SortOrder.Decreasing),s=t.slice().sort(((e,t)=>e<t?1:-1));return[s.map((e=>r.getRoot(e))),n.map((e=>r.getRoot(e))),s]},t.createNodeFromMultiProof=function(e,t,r){if(e.length!==r.length)throw new Error("Leaves length should equal gindices length");const i=r.map((e=>e.toString(2))),s=o.computeMultiProofBitstrings(i,!1,o.SortOrder.Decreasing);if(s.length!==t.length)throw new Error("Witnesses length should equal witnesses gindices length");const a=Math.max(i[0]?.length??0,s[0]?.length??0),u=Object.fromEntries(Array.from({length:a},((e,t)=>[t+1,{}])));for(let t=0;t<i.length;t++){const r=i[t],o=e[t];u[r.length][r]=n.LeafNode.fromRoot(o)}for(let e=0;e<s.length;e++){const r=s[e],i=t[e];u[r.length][r]=n.LeafNode.fromRoot(i)}for(let e=a;e>1;e--){const t=u[e],r=u[e-1];for(const e of Object.keys(t)){const i=t[e];if(!i)continue;const o="0"===e[e.length-1],s=e.substring(0,e.length-1),a=s+(o?"1":"0"),u=t[a];if(!u)throw new Error(`Sibling not found: ${a}`);const c=o?new n.BranchNode(i,u):new n.BranchNode(u,i);r[s]=c,delete t[e],delete t[a]}}const c=u[1][1];if(!c)throw new Error("Internal consistency error: no root found");return c}},2456:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createNodeFromSingleProof=t.createSingleProof=t.ERR_INVALID_NAV=void 0;const n=r(8894),i=r(5113);t.ERR_INVALID_NAV="Invalid tree navigation",t.createSingleProof=function(e,r){const n=[];let o=e;for(const e of i.gindexIterator(r))if(e){if(o.isLeaf())throw new Error(t.ERR_INVALID_NAV);n.push(o.left.root),o=o.right}else{if(o.isLeaf())throw new Error(t.ERR_INVALID_NAV);n.push(o.right.root),o=o.left}return[o.root,n.reverse()]},t.createNodeFromSingleProof=function(e,t,r){let i=n.LeafNode.fromRoot(t);const o=r.slice().reverse();for(;e>1;){const t=n.LeafNode.fromRoot(o.pop());i=e%BigInt(2)===BigInt(0)?new n.BranchNode(i,t):new n.BranchNode(t,i),e/=BigInt(2)}return i}},5492:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deserializeTreeOffsetProof=t.serializeTreeOffsetProof=t.computeTreeOffsetProofSerializedLength=t.createNodeFromTreeOffsetProof=t.createTreeOffsetProof=t.treeOffsetProofToNode=t.nodeToTreeOffsetProof=void 0;const n=r(8894),i=r(5410);function o(e,t,r){if(r.length&&r[0].startsWith(t)){if(t===r[0])return r.shift(),[[],[e.root]];{const[n,i]=o(e.left,t+"0",r),[s,a]=o(e.right,t+"1",r);return[[i.length].concat(n,s),i.concat(a)]}}return[[],[]]}function s(e,t){if(t.length){if(1===t.length)return n.LeafNode.fromRoot(t[0]);{const r=e[0];return new n.BranchNode(s(e.slice(1,r),t.slice(0,r)),s(e.slice(r),t.slice(r)))}}throw new Error("Proof must contain gt 0 leaves")}t.nodeToTreeOffsetProof=o,t.treeOffsetProofToNode=s,t.createTreeOffsetProof=function(e,t){return o(e,"1",i.computeMultiProofBitstrings(t.map((e=>e.toString(2)))))},t.createNodeFromTreeOffsetProof=function(e,t){return s(e,t)},t.computeTreeOffsetProofSerializedLength=function(e,t){return 2*(e.length+1)+32*t.length},t.serializeTreeOffsetProof=function(e,t,r,n){const i=new DataView(e.buffer,e.byteOffset,e.byteLength);i.setUint16(t,n.length,!0);const o=t+2;for(let e=0;e<r.length;e++)i.setUint16(2*e+o,r[e],!0);const s=o+2*r.length;for(let t=0;t<n.length;t++)e.set(n[t],32*t+s)},t.deserializeTreeOffsetProof=function(e,t){const r=new DataView(e.buffer,e.byteOffset,e.byteLength),n=r.getUint16(t,!0);if(e.length<2*(n-1)+32*n)throw new Error("Unable to deserialize tree offset proof: not enough bytes");const i=t+2,o=Array.from({length:n-1},((e,t)=>r.getUint16(2*t+i,!0))),s=i+2*o.length;return[o,Array.from({length:n},((t,r)=>e.subarray(32*r+s,32*(r+1)+s)))]}},5410:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.computeMultiProofBitstrings=t.SortOrder=t.filterParentBitstrings=t.sortDecreasingBitstrings=t.sortInOrderBitstrings=t.computeProofBitstrings=t.computeProofGindices=void 0;const n=r(5113);function i(e){const t=new Set,r=new Set;let n=e;for(;n.length>1;){t.add(n);const e=n[n.length-1],i=n.substring(0,n.length-1);r.add(i+(1^Number(e))),n=i}return{path:t,branch:r}}function o(e,t){return e.length?e.map((e=>e.padEnd(t))).sort().map((e=>e.trim())):[]}function s(e){return e.length?e.sort(((e,t)=>{if(e.length<t.length)return 1;if(t.length<e.length)return-1;let r=e.indexOf("0"),n=t.indexOf("0");for(;;){if(-1===r)return-1;if(-1===n)return 1;if(r<n)return 1;if(n<r)return-1;r=e.indexOf("0",r+1),n=t.indexOf("0",n+1)}})):[]}function a(e){const t=e.slice().sort(((e,t)=>e.length-t.length)),r=[];e:for(let e=0;e<t.length;e++){const n=t[e];for(let r=e+1;r<t.length;r++)if(t[r].startsWith(n))continue e;r.push(n)}return r}var u;t.computeProofGindices=function(e){const t=new Set,r=new Set;let i=e;for(;i>1;)t.add(i),r.add(n.gindexSibling(i)),i=n.gindexParent(i);return{path:t,branch:r}},t.computeProofBitstrings=i,t.sortInOrderBitstrings=o,t.sortDecreasingBitstrings=s,t.filterParentBitstrings=a,function(e){e[e.InOrder=0]="InOrder",e[e.Decreasing=1]="Decreasing",e[e.Unsorted=2]="Unsorted"}(u=t.SortOrder||(t.SortOrder={})),t.computeMultiProofBitstrings=function(e,t=!0,r=u.InOrder){const n=a(e),c=new Set(t?n:[]),l=new Set,f=new Set;let h=1;for(const e of n){e.length>h&&(h=e.length);const{path:t,branch:r}=i(e);t.forEach((e=>l.add(e))),r.forEach((e=>f.add(e)))}switch(l.forEach((e=>f.delete(e))),f.forEach((e=>c.add(e))),r){case u.InOrder:return o(Array.from(c),h);case u.Decreasing:return s(Array.from(c));case u.Unsorted:return Array.from(c)}}},8738:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.subtreeFillToContents=t.subtreeFillToLength=t.subtreeFillToDepth=void 0;const n=r(8894),i=r(7048);function o(e,t){let r=e;for(;t>0;)r=new n.BranchNode(r,r),t--;return r}t.subtreeFillToDepth=o,t.subtreeFillToLength=function e(t,r,s){const a=1<<r;if(s>a)throw new Error("ERR_TOO_MANY_NODES");if(s===a)return o(t,r);if(0===r){if(1===s)return t;throw new Error("ERR_NAVIGATION")}if(1===r)return new n.BranchNode(t,s>1?t:i.zeroNode(0));const u=a>>1;return s<=u?new n.BranchNode(e(t,r-1,s),i.zeroNode(r-1)):new n.BranchNode(o(t,r-1),e(t,r-1,s-u))},t.subtreeFillToContents=function(e,t){const r=2**t;if(e.length>r)throw new Error(`nodes.length ${e.length} over maxIndex at depth ${t}`);if(0===e.length)return i.zeroNode(t);if(0===t)return e[0];if(1===t)return e.length>1?new n.BranchNode(e[0],e[1]):new n.BranchNode(e[0],i.zeroNode(0));let o=e.length;for(let r=t;r>0;r--){const s=o%2,a=o-s;for(let t=0;t<a;t+=2)e[t/2]=new n.BranchNode(e[t],e[t+1]);s>0&&(e[a/2]=new n.BranchNode(e[a],i.zeroNode(t-r))),o=a/2+s}return e[0]}},2969:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.treeZeroAfterIndex=t.iterateNodesAtDepth=t.getNodesAtDepth=t.setNodesAtDepth=t.setNodeAtDepth=t.getNodeAtDepth=t.setNodeWithFn=t.setNode=t.getNode=t.Tree=void 0;const n=r(7048),i=r(5113),o=r(8894),s=r(7392),a=r(2456);class u{constructor(e,t){this._rootNode=e,t&&("undefined"==typeof WeakRef?this.hook=t:this.hook=new WeakRef(t))}static createFromProof(e){return new u(s.createNodeFromProof(e))}get rootNode(){return this._rootNode}set rootNode(e){if(this._rootNode=e,this.hook)if("undefined"==typeof WeakRef)this.hook(e);else{const t=this.hook.deref();t?t(e):this.hook=void 0}}get root(){return this.rootNode.root}clone(){return new u(this.rootNode)}getSubtree(e){return new u(this.getNode(e),(t=>this.setNode(e,t)))}getNode(e){return c(this.rootNode,e)}getNodeAtDepth(e,t){return p(this.rootNode,e,t)}getRoot(e){return this.getNode(e).root}setNode(e,t){this.rootNode=l(this.rootNode,e,t)}setNodeWithFn(e,t){this.rootNode=f(this.rootNode,e,t)}setNodeAtDepth(e,t,r){this.rootNode=y(this.rootNode,e,t,r)}setRoot(e,t){this.setNode(e,o.LeafNode.fromRoot(t))}getNodesAtDepth(e,t,r){return m(this.rootNode,e,t,r)}iterateNodesAtDepth(e,t,r){return b(this.rootNode,e,t,r)}getSingleProof(e){return a.createSingleProof(this.rootNode,e)[1]}getProof(e){return s.createProof(this.rootNode,e)}}function c(e,t){const r=i.convertGindexToBitstring(t);let n=e;for(let e=1;e<r.length;e++){if(n.isLeaf())throw new Error(`Invalid tree - found leaf at depth ${e}`);n="1"===r[e]?n.right:n.left}return n}function l(e,t,r){const n=i.convertGindexToBitstring(t);return d(n,h(e,n),r)}function f(e,t,r){const n=i.convertGindexToBitstring(t),o=h(e,n),s=o[o.length-1];return d(n,o,r("1"===n[n.length-1]?s.right:s.left))}function h(e,t){let r=e;const n=[e];for(let e=1;e<t.length-1;e++)r="1"===t[e]?r.right:r.left,n.push(r);return n}function d(e,t,r){let n=r;for(let r=e.length-1;r>=1;r--)n="1"===e[r]?new o.BranchNode(t[r-1].left,n):new o.BranchNode(n,t[r-1].right);return n}function p(e,t,r){if(0===t)return e;if(1===t)return 0===r?e.left:e.right;let n=e;for(let e=t-1;e>=0;e--)n=w(e,r)?n.left:n.right;return n}function y(e,t,r,n){return g(e,t,[r],[n])}function g(e,t,r,n){if(0===t)return n.length>0?n[0]:e;const i=new Array(t),s=new Array(t),a=t-1;let u=a,c=e;i[a]=e;for(let e=0;e<r.length;e++){const t=r[e];for(let e=u;e>0;e--)c=w(e,t)?c.left:c.right,i[e-1]=c;u=0,1!=(1&t)?t+1===r[e+1]?(c=new o.BranchNode(n[e],n[e+1]),e++):c=new o.BranchNode(n[e],c.right):c=new o.BranchNode(c.left,n[e]);const h=e>=r.length-1,d=h?a:(l=t,f=r[e+1],Math.ceil(Math.log2(-~(l^f)))-1);for(let e=1;e<=d;e++)if(w(e,t))h||e!==d?c=new o.BranchNode(c,i[e].right):(s[e]=c,c=i[e]);else{const t=s[e];void 0!==t?(c=new o.BranchNode(t,c),s[e]=void 0):c=new o.BranchNode(i[e].left,c)}u=d}var l,f;return c}function m(e,t,r,n){if(0===t)return 0===r&&n>0?[e]:[];if(1===t)return 0===n?[]:1===n?0===r?[e.left]:[e.right]:[e.left,e.right];const i=t-1;let o=i,s=e;const a=new Array(t),u=new Array(t),c=new Array(n);a[i]=e;for(let e=0;e<n;e++){for(let t=o;t>=0;t--){t!==o&&(a[t]=s);const n=w(t,r+e);u[t]=n,s=n?s.left:s.right}c[e]=s;for(let e=0;e<=i;e++)if(!0===u[e]){o=e;break}s=a[o]}return c}function*b(e,t,r,n){const i=r+n,o=t-1;let s=o,a=e;const u=new Array(t),c=new Array(t);u[o]=e;for(let e=r;e<i;e++){for(let t=s;t>=0;t--){t!==s&&(u[t]=a);const r=w(t,e);c[t]=r,a=r?a.left:a.right}yield a;for(let e=0;e<=o;e++)if(!0===c[e]){s=e;break}a=u[s]}}function w(e,t){if(e>31){const r=1<<e-32;return(t/2**32>>>0&r)!==r}const r=1<<e;return(t&r)!==r}t.Tree=u,t.getNode=c,t.setNode=l,t.setNodeWithFn=f,t.getNodeAtDepth=p,t.setNodeAtDepth=y,t.setNodesAtDepth=g,t.getNodesAtDepth=m,t.iterateNodesAtDepth=b,t.treeZeroAfterIndex=function(e,t,r){if(r<0)return n.zeroNode(t);const i=new Array(t),s=t-1;let a=s,u=e;i[s]=e;for(let e=a;e>=0;e--)u=w(e,r)?u.left:u.right,i[e-1]=u;a=0;for(let e=0;e<=s;e++)u=w(e,r)?new o.BranchNode(u,n.zeroNode(e)):new o.BranchNode(i[e].left,u);return u}},7048:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.zeroNode=void 0;const n=r(8894),i=[n.LeafNode.fromZero()];t.zeroNode=function(e){if(e>=i.length)for(let t=i.length;t<=e;t++)i[t]=new n.BranchNode(i[t-1],i[t-1]);return i[e]}},8747:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BranchNodeStruct=void 0;const n=r(6567);class i extends n.Node{constructor(e,t){super(null,0,0,0,0,0,0,0),this.valueToNode=e,this.value=t}get rootHashObject(){if(null===this.h0){const e=this.valueToNode(this.value);super.applyHash(e.rootHashObject)}return this}get root(){return n.hashObjectToUint8Array(this.rootHashObject)}isLeaf(){return!1}get left(){return this.valueToNode(this.value).left}get right(){return this.valueToNode(this.value).right}}t.BranchNodeStruct=i},557:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hash64=t.byteArrayEquals=t.toHexString=t.fromHexString=t.getUint8ByteToBitBooleanArray=t.BitArray=t.TreeViewDU=t.TreeView=t.isCompositeType=t.CompositeType=t.isBasicType=t.BasicType=t.Type=t.ByteArrayType=t.BitArrayType=t.ArrayType=t.VectorCompositeType=t.VectorBasicType=t.UnionType=t.UintNumberType=t.UintBigintType=t.NoneType=t.ListCompositeType=t.ListBasicType=t.ContainerNodeStructType=t.ContainerType=t.ByteVectorType=t.ByteListType=t.BooleanType=t.BitVectorType=t.BitListType=void 0;var n=r(284);Object.defineProperty(t,"BitListType",{enumerable:!0,get:function(){return n.BitListType}});var i=r(1393);Object.defineProperty(t,"BitVectorType",{enumerable:!0,get:function(){return i.BitVectorType}});var o=r(2034);Object.defineProperty(t,"BooleanType",{enumerable:!0,get:function(){return o.BooleanType}});var s=r(3568);Object.defineProperty(t,"ByteListType",{enumerable:!0,get:function(){return s.ByteListType}});var a=r(245);Object.defineProperty(t,"ByteVectorType",{enumerable:!0,get:function(){return a.ByteVectorType}});var u=r(5039);Object.defineProperty(t,"ContainerType",{enumerable:!0,get:function(){return u.ContainerType}});var c=r(3261);Object.defineProperty(t,"ContainerNodeStructType",{enumerable:!0,get:function(){return c.ContainerNodeStructType}});var l=r(6866);Object.defineProperty(t,"ListBasicType",{enumerable:!0,get:function(){return l.ListBasicType}});var f=r(5189);Object.defineProperty(t,"ListCompositeType",{enumerable:!0,get:function(){return f.ListCompositeType}});var h=r(1638);Object.defineProperty(t,"NoneType",{enumerable:!0,get:function(){return h.NoneType}});var d=r(436);Object.defineProperty(t,"UintBigintType",{enumerable:!0,get:function(){return d.UintBigintType}}),Object.defineProperty(t,"UintNumberType",{enumerable:!0,get:function(){return d.UintNumberType}});var p=r(1851);Object.defineProperty(t,"UnionType",{enumerable:!0,get:function(){return p.UnionType}});var y=r(5021);Object.defineProperty(t,"VectorBasicType",{enumerable:!0,get:function(){return y.VectorBasicType}});var g=r(4013);Object.defineProperty(t,"VectorCompositeType",{enumerable:!0,get:function(){return g.VectorCompositeType}});var m=r(9659);Object.defineProperty(t,"ArrayType",{enumerable:!0,get:function(){return m.ArrayType}});var b=r(6612);Object.defineProperty(t,"BitArrayType",{enumerable:!0,get:function(){return b.BitArrayType}});var w=r(4316);Object.defineProperty(t,"ByteArrayType",{enumerable:!0,get:function(){return w.ByteArrayType}});var v=r(7451);Object.defineProperty(t,"Type",{enumerable:!0,get:function(){return v.Type}});var _=r(645);Object.defineProperty(t,"BasicType",{enumerable:!0,get:function(){return _.BasicType}}),Object.defineProperty(t,"isBasicType",{enumerable:!0,get:function(){return _.isBasicType}});var E=r(8715);Object.defineProperty(t,"CompositeType",{enumerable:!0,get:function(){return E.CompositeType}}),Object.defineProperty(t,"isCompositeType",{enumerable:!0,get:function(){return E.isCompositeType}});var A=r(4984);Object.defineProperty(t,"TreeView",{enumerable:!0,get:function(){return A.TreeView}});var S=r(332);Object.defineProperty(t,"TreeViewDU",{enumerable:!0,get:function(){return S.TreeViewDU}});var T=r(1714);Object.defineProperty(t,"BitArray",{enumerable:!0,get:function(){return T.BitArray}}),Object.defineProperty(t,"getUint8ByteToBitBooleanArray",{enumerable:!0,get:function(){return T.getUint8ByteToBitBooleanArray}});var B=r(1518);Object.defineProperty(t,"fromHexString",{enumerable:!0,get:function(){return B.fromHexString}}),Object.defineProperty(t,"toHexString",{enumerable:!0,get:function(){return B.toHexString}}),Object.defineProperty(t,"byteArrayEquals",{enumerable:!0,get:function(){return B.byteArrayEquals}});var O=r(995);Object.defineProperty(t,"hash64",{enumerable:!0,get:function(){return O.hash64}})},7451:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Type=void 0,t.Type=class{value_toTree(e){const t=new Uint8Array(this.value_serializedSize(e)),r=new DataView(t.buffer,t.byteOffset,t.byteLength);return this.value_serializeToBytes({uint8Array:t,dataView:r},0,e),this.tree_deserializeFromBytes({uint8Array:t,dataView:r},0,t.length)}tree_toValue(e){const t=new Uint8Array(this.tree_serializedSize(e)),r=new DataView(t.buffer,t.byteOffset,t.byteLength);return this.tree_serializeToBytes({uint8Array:t,dataView:r},0,e),this.value_deserializeFromBytes({uint8Array:t,dataView:r},0,t.length)}serialize(e){const t=new Uint8Array(this.value_serializedSize(e)),r=new DataView(t.buffer,t.byteOffset,t.byteLength);return this.value_serializeToBytes({uint8Array:t,dataView:r},0,e),t}deserialize(e){const t=new DataView(e.buffer,e.byteOffset,e.byteLength);return this.value_deserializeFromBytes({uint8Array:e,dataView:t},0,e.length)}}},9659:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayType=void 0;const n=r(6567),i=r(8715),o=r(3191);class s extends i.CompositeType{constructor(e){super(),this.elementType=e}defaultValue(){return o.value_defaultValueArray(this.elementType,this.defaultLen)}getPropertyType(){return this.elementType}getPropertyGindex(e){if("number"!=typeof e)throw Error(`Invalid array index: ${e}`);const t=Math.floor(e/this.itemsPerChunk);return n.toGindex(this.depth,BigInt(t))}getIndexProperty(e){return e}tree_getLeafGindices(e,t){let r;if(this.isList){if(!t)throw new Error("List type requires tree argument to get leaves");r=this.tree_getLength(t)}else r=this.tree_getLength(null);const o=[];if(i.isCompositeType(this.elementType)){const i=n.toGindex(this.depth,BigInt(0)),s=i+BigInt(r),a=n.concatGindices([e,i]);if(null===this.elementType.fixedSize){if(!t)throw new Error("Array of variable size requires tree argument to get leaves");for(let e=i,r=a;e<s;e++,r++)o.push(...this.elementType.tree_getLeafGindices(r,n.getNode(t,e)))}else for(let e=0,t=a;e<r;e++,t++)o.push(...this.elementType.tree_getLeafGindices(t))}else{const t=Math.ceil(r/this.itemsPerChunk),i=n.concatGindices([e,n.toGindex(this.depth,BigInt(0))]),s=i+BigInt(t);for(let e=i;e<s;e++)o.push(e)}return this.isList&&o.push(n.concatGindices([e,i.LENGTH_GINDEX])),o}fromJson(e){return o.value_fromJsonArray(this.elementType,e,this)}toJson(e){return o.value_toJsonArray(this.elementType,e,this)}clone(e){return o.value_cloneArray(this.elementType,e)}equals(e,t){return o.value_equals(this.elementType,e,t)}}t.ArrayType=s},3191:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertValidArrayLength=t.value_defaultValueArray=t.value_equals=t.value_cloneArray=t.value_toJsonArray=t.value_fromJsonArray=t.tree_deserializeFromBytesArrayBasic=t.tree_serializeToBytesArrayBasic=t.value_deserializeFromBytesArrayBasic=t.value_serializeToBytesArrayBasic=t.setChunksNode=t.addLengthNode=t.getChunksNodeFromRootNode=t.getLengthFromRootNode=void 0;const n=r(6567);function i(e,t){return new n.BranchNode(e,n.LeafNode.fromUint32(t))}function o(e,t,r){if(r&&e%1!=0)throw Error("size not multiple of element fixedSize");if(t.isList){if(e>t.limit)throw new Error(`Invalid list length ${e} over limit ${t.limit}`)}else if(e!==t.length)throw new Error(`Incorrect vector length ${e} expected ${t.length}`)}t.getLengthFromRootNode=function(e){return e.right.getUint(4,0)},t.getChunksNodeFromRootNode=function(e){return e.left},t.addLengthNode=i,t.setChunksNode=function(e,t,r){const i=void 0!==r?n.LeafNode.fromUint32(r):e.right;return new n.BranchNode(t,i)},t.value_serializeToBytesArrayBasic=function(e,t,r,n,i){const o=e.byteLength;for(let s=0;s<t;s++)e.value_serializeToBytes(r,n+s*o,i[s]);return n+t*o},t.value_deserializeFromBytesArrayBasic=function(e,t,r,n,i){const s=e.byteLength,a=(n-r)/s;o(a,i,!0);const u=new Array(a);for(let n=0;n<a;n++)u[n]=e.value_deserializeFromBytes(t,r+n*s,r+(n+1)*s);return u},t.tree_serializeToBytesArrayBasic=function(e,t,r,i,o,s){const a=e.byteLength*t,u=Math.ceil(a/32),c=n.getNodesAtDepth(s,r,0,u);return n.packedNodeRootsToBytes(i.dataView,o,a,c),o+a},t.tree_deserializeFromBytesArrayBasic=function(e,t,r,s,a,u){const c=(a-s)/e.byteLength;o(c,u,!0);const l=n.packedRootsBytesToNode(t,r.dataView,s,a);return u.isList?i(l,c):l},t.value_fromJsonArray=function(e,t,r){if(!Array.isArray(t))throw Error("JSON is not an array");o(t.length,r);const n=new Array(t.length);for(let r=0;r<t.length;r++)n[r]=e.fromJson(t[r]);return n},t.value_toJsonArray=function(e,t,r){const n=r.isList?t.length:r.length,i=new Array(n);for(let r=0;r<n;r++)i[r]=e.toJson(t[r]);return i},t.value_cloneArray=function(e,t){const r=new Array(t.length);for(let n=0;n<t.length;n++)r[n]=e.clone(t[n]);return r},t.value_equals=function(e,t,r){if(t.length!==r.length)return!1;for(let n=0;n<t.length;n++)if(!e.equals(t[n],r[n]))return!1;return!0},t.value_defaultValueArray=function(e,t){const r=new Array(t);for(let n=0;n<t;n++)r[n]=e.defaultValue();return r},t.assertValidArrayLength=o},404:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.value_getRootsArrayComposite=t.tree_deserializeFromBytesArrayComposite=t.tree_serializeToBytesArrayComposite=t.tree_serializedSizeArrayComposite=t.value_deserializeFromBytesArrayComposite=t.value_serializeToBytesArrayComposite=t.value_serializedSizeArrayComposite=t.maxSizeArrayComposite=t.minSizeArrayComposite=void 0;const n=r(6567),i=r(3191);function o(e,t,r,n,o){const s=n-r;let a;if(null===e)a=function(e,t,r){if(0===r)return new Uint32Array(0);const n=e.getUint32(t,!0),i=n;if(0===n)throw Error("First offset must be > 0");if(i%4!=0)throw Error("Offset data length not multiple of 4");const o=i/4,s=new Uint32Array(o);s[0]=n;for(let n=1;n<o;n++){const i=e.getUint32(t+4*n,!0);if(s[n]=i,i>r)throw new Error(`Offset out of bounds ${i} > ${r}`);if(i<s[n-1])throw new Error(`Offsets must be increasing ${i} < ${s[n-1]}`)}return s}(t,r,s);else{if(0===e)throw Error("element fixed length is 0");if(s%e!=0)throw Error(`size ${s} is not multiple of element fixedSize ${e}`);const t=s/e;a=new Uint32Array(t);for(let r=0;r<t;r++)a[r]=r*e}return i.assertValidArrayLength(a.length,o),a}t.minSizeArrayComposite=function(e,t){return null===e.fixedSize?t*(4+e.minSize):t*e.minSize},t.maxSizeArrayComposite=function(e,t){return null===e.fixedSize?t*(4+e.maxSize):t*e.maxSize},t.value_serializedSizeArrayComposite=function(e,t,r){if(null===e.fixedSize){let n=0;for(let i=0;i<t;i++)n+=4+e.value_serializedSize(r[i]);return n}return t*e.fixedSize},t.value_serializeToBytesArrayComposite=function(e,t,r,n,i){if(null===e.fixedSize){let o=n+4*t;for(let s=0;s<t;s++)r.dataView.setUint32(n+4*s,o-n,!0),o=e.value_serializeToBytes(r,o,i[s]);return o}for(let o=0;o<t;o++)e.value_serializeToBytes(r,n+o*e.fixedSize,i[o]);return n+t*e.fixedSize},t.value_deserializeFromBytesArrayComposite=function(e,t,r,n,i){const s=o(e.fixedSize,t.dataView,r,n,i),a=s.length,u=new Array(a);for(let i=0;i<a;i++){const o=r+s[i],c=i===a-1?n:r+s[i+1];u[i]=e.value_deserializeFromBytes(t,o,c)}return u},t.tree_serializedSizeArrayComposite=function(e,t,r,i){if(null===e.fixedSize){const o=n.getNodesAtDepth(i,r,0,t);let s=0;for(let t=0;t<o.length;t++)s+=4+e.tree_serializedSize(o[t]);return s}return t*e.fixedSize},t.tree_serializeToBytesArrayComposite=function(e,t,r,i,o,s){const a=n.getNodesAtDepth(i,r,0,t);if(null===e.fixedSize){let r=s+4*t;const{dataView:n}=o;for(let t=0;t<a.length;t++)n.setUint32(s+4*t,r-s,!0),r=e.tree_serializeToBytes(o,r,a[t]);return r}for(let t=0;t<a.length;t++)s=e.tree_serializeToBytes(o,s,a[t]);return s},t.tree_deserializeFromBytesArrayComposite=function(e,t,r,s,a,u){const c=o(e.fixedSize,r.dataView,s,a,u),l=c.length,f=new Array(l);for(let t=0;t<l;t++){const n=s+c[t],i=t===l-1?a:s+c[t+1];f[t]=e.tree_deserializeFromBytes(r,n,i)}const h=n.subtreeFillToContents(f,t);return u.isList?i.addLengthNode(h,l):h},t.value_getRootsArrayComposite=function(e,t,r){const n=new Array(t);for(let i=0;i<t;i++)n[i]=e.hashTreeRoot(r[i]);return n}},645:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isBasicType=t.BasicType=void 0;const n=r(7451);class i extends n.Type{constructor(){super(...arguments),this.isBasic=!0,this.depth=0,this.maxChunkCount=1}value_serializedSize(){return this.byteLength}tree_serializedSize(){return this.byteLength}assertValidSize(e){if(e!==this.byteLength)throw Error(`BasicType invalid size ${e} expected ${this.byteLength}`)}hashTreeRoot(e){const t=new Uint8Array(32),r=new DataView(t.buffer,t.byteOffset,t.byteLength);return this.value_serializeToBytes({uint8Array:t,dataView:r},0,e),t}clone(e){return e}equals(e,t){return e===t}}t.BasicType=i,t.isBasicType=function(e){return e.isBasic}},6612:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BitArrayType=void 0;const n=r(6567),i=r(1518),o=r(995),s=r(8715),a=r(6572),u=r(7844);class c extends s.CompositeType{constructor(){super(...arguments),this.isViewMutable=!0}getView(e){return new a.BitArrayTreeView(this,e)}getViewDU(e){return new u.BitArrayTreeViewDU(this,e)}commitView(e){return e.node}commitViewDU(e){return e.commit(),e.node}cacheOfViewDU(e){return e.cache}getRoots(e){return o.splitIntoRootChunks(e.uint8Array)}getPropertyGindex(){return null}getPropertyType(){throw Error("Must only request BitArray complete data")}getIndexProperty(){throw Error("Must only request BitArray complete data")}tree_fromProofNode(e){return{node:e,done:!0}}tree_getLeafGindices(e,t){const r=this.tree_getByteLen(t),i=Math.ceil(r/32),o=n.concatGindices([e,n.toGindex(this.depth,BigInt(0))]),a=new Array(i);for(let e=0,t=o;e<i;e++,t++)a[e]=t;return this.isList&&a.push(n.concatGindices([e,s.LENGTH_GINDEX])),a}fromJson(e){const t=i.fromHexString(e),r=new DataView(t.buffer,t.byteOffset,t.byteLength);return this.value_deserializeFromBytes({uint8Array:t,dataView:r},0,t.length)}toJson(e){return i.toHexString(this.serialize(e))}clone(e){return e.clone()}equals(e,t){return e.bitLen===t.bitLen&&i.byteArrayEquals(e.uint8Array,t.uint8Array)}}t.BitArrayType=c},284:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BitListType=void 0;const n=r(6567),i=r(995),o=r(1425),s=r(3191),a=r(1714),u=r(6612);class c extends u.BitArrayType{constructor(e,t){if(super(),this.limitBits=e,this.fixedSize=null,this.minSize=1,this.isList=!0,0===e)throw Error("List limit must be > 0");this.typeName=t?.typeName??`BitList[${e}]`,this.maxChunkCount=Math.ceil(this.limitBits/8/32),this.chunkDepth=i.maxChunksToDepth(this.maxChunkCount),this.depth=1+this.chunkDepth,this.maxSize=Math.ceil(e/8)+1}static named(e,t){return new(o.namedClass(c,t.typeName))(e,t)}defaultValue(){return a.BitArray.fromBitLen(0)}value_serializedSize(e){return l(e.bitLen)}value_serializeToBytes(e,t,r){return e.uint8Array.set(r.uint8Array,t),f(e.uint8Array,t,r.bitLen)}value_deserializeFromBytes(e,t,r){const{uint8Array:n,bitLen:i}=this.deserializeUint8ArrayBitListFromBytes(e.uint8Array,t,r);return new a.BitArray(n,i)}tree_serializedSize(e){return l(s.getLengthFromRootNode(e))}tree_serializeToBytes(e,t,r){const i=s.getChunksNodeFromRootNode(r),o=s.getLengthFromRootNode(r),a=Math.ceil(o/8),u=Math.ceil(a/32),c=n.getNodesAtDepth(i,this.chunkDepth,0,u);return n.packedNodeRootsToBytes(e.dataView,t,a,c),f(e.uint8Array,t,o)}tree_deserializeFromBytes(e,t,r){const{uint8Array:i,bitLen:o}=this.deserializeUint8ArrayBitListFromBytes(e.uint8Array,t,r),a=new DataView(i.buffer,i.byteOffset,i.byteLength),u=n.packedRootsBytesToNode(this.chunkDepth,a,0,i.length);return s.addLengthNode(u,o)}tree_getByteLen(e){if(!e)throw new Error("BitListType requires a node to get leaves");return Math.ceil(s.getLengthFromRootNode(e)/8)}hashTreeRoot(e){return i.mixInLength(super.hashTreeRoot(e),e.bitLen)}deserializeUint8ArrayBitListFromBytes(e,t,r){const{uint8Array:n,bitLen:i}=function(e,t,r){if(r>e.length)throw Error(`BitList attempting to read byte ${r} of data length ${e.length}`);const n=e[r-1],i=r-t;if(0===n)throw new Error("Invalid deserialized bitlist, padding bit required");if(1===n)return{uint8Array:Uint8Array.prototype.slice.call(e,t,r-1),bitLen:8*(i-1)};const o=Uint8Array.prototype.slice.call(e,t,r),s=n.toString(2).length-1,a=8*(i-1)+s,u=255>>8-s;return o[i-1]&=u,{uint8Array:o,bitLen:a}}(e,t,r);if(i>this.limitBits)throw Error(`bitLen over limit ${i} > ${this.limitBits}`);return{uint8Array:n,bitLen:i}}}function l(e){const t=Math.ceil(e/8);return e%8==0?t+1:t}function f(e,t,r){const n=t+Math.ceil(r/8);return r%8==0?(e[n]=1,n+1):(e[n-1]|=1<<r%8,n)}t.BitListType=c},1393:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BitVectorType=void 0;const n=r(6567),i=r(995),o=r(1425),s=r(1714),a=r(6612);class u extends a.BitArrayType{constructor(e,t){if(super(),this.lengthBits=e,this.isList=!1,0===e)throw Error("Vector length must be > 0");this.typeName=t?.typeName??`BitVector[${e}]`,this.chunkCount=Math.ceil(this.lengthBits/8/32),this.maxChunkCount=this.chunkCount,this.depth=i.maxChunksToDepth(this.chunkCount),this.fixedSize=Math.ceil(this.lengthBits/8),this.minSize=this.fixedSize,this.maxSize=this.fixedSize,this.zeroBitsMask=e%8==0?0:255&255<<e%8}static named(e,t){return new(o.namedClass(u,t.typeName))(e,t)}defaultValue(){return s.BitArray.fromBitLen(this.lengthBits)}value_serializedSize(){return this.fixedSize}value_serializeToBytes(e,t,r){return e.uint8Array.set(r.uint8Array,t),t+this.fixedSize}value_deserializeFromBytes(e,t,r){return this.assertValidLength(e.uint8Array,t,r),new s.BitArray(Uint8Array.prototype.slice.call(e.uint8Array,t,r),this.lengthBits)}tree_serializedSize(){return this.fixedSize}tree_serializeToBytes(e,t,r){const i=n.getNodesAtDepth(r,this.depth,0,this.chunkCount);return n.packedNodeRootsToBytes(e.dataView,t,this.fixedSize,i),t+this.fixedSize}tree_deserializeFromBytes(e,t,r){return this.assertValidLength(e.uint8Array,t,r),n.packedRootsBytesToNode(this.depth,e.dataView,t,r)}tree_getByteLen(){return this.fixedSize}assertValidLength(e,t,r){const n=r-t;if(r-t!==this.fixedSize)throw Error(`Invalid BitVector size ${n} != ${this.fixedSize}`);if(this.zeroBitsMask>0&&(e[r-1]&this.zeroBitsMask)>0)throw Error("BitVector: nonzero bits past length")}}t.BitVectorType=u},2034:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BooleanType=void 0;const n=r(6567),i=r(1425),o=r(645);class s extends o.BasicType{constructor(e){super(),this.byteLength=1,this.itemsPerChunk=32,this.fixedSize=1,this.minSize=1,this.maxSize=1,this.typeName=e?.typeName??"boolean"}static named(e){return new(i.namedClass(s,e.typeName))(e)}defaultValue(){return!1}value_serializeToBytes(e,t,r){return e.uint8Array[t]=r?1:0,t+1}value_deserializeFromBytes(e,t,r){switch(this.assertValidSize(r-t),e.uint8Array[t]){case 1:return!0;case 0:return!1;default:throw new Error(`Boolean: invalid value: ${e.uint8Array[t]}`)}}tree_serializeToBytes(e,t,r){return e.uint8Array[t]=r.getUint(4,0),t+1}tree_deserializeFromBytes(e,t,r){this.assertValidSize(r-t);const i=e.uint8Array[t];if(i>1)throw Error(`Boolean: invalid value ${i}`);return n.LeafNode.fromUint32(i)}tree_getFromNode(e){return 1===e.getUint(4,0)}tree_setToNode(e,t){e.setUint(4,0,t?1:0)}tree_getFromPackedNode(e,t){const r=t%this.itemsPerChunk;return 0!==e.getUint(1,r)}tree_setToPackedNode(e,t,r){const n=t%this.itemsPerChunk;e.setUint(1,n,r?1:0)}fromJson(e){if("boolean"!=typeof e)throw Error(`JSON invalid type ${typeof e} expected boolean`);return e}toJson(e){return e}}t.BooleanType=s},4316:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ByteArrayType=void 0;const n=r(6567),i=r(1518),o=r(995),s=r(8715);class a extends s.CompositeType{constructor(){super(...arguments),this.isViewMutable=!1}defaultValue(){return new Uint8Array(this.minSize)}getView(e){return this.getViewDU(e.rootNode)}getViewDU(e){return this.tree_toValue(e)}commitView(e){return this.commitViewDU(e)}commitViewDU(e){const t=new Uint8Array(this.value_serializedSize(e)),r=new DataView(t.buffer,t.byteOffset,t.byteLength);return this.value_serializeToBytes({uint8Array:t,dataView:r},0,e),this.tree_deserializeFromBytes({uint8Array:t,dataView:r},0,t.length)}cacheOfViewDU(){}toView(e){return e}toViewDU(e){return e}value_serializeToBytes(e,t,r){return e.uint8Array.set(r,t),t+r.length}value_deserializeFromBytes(e,t,r){return this.assertValidSize(r-t),Uint8Array.prototype.slice.call(e.uint8Array,t,r)}getRoots(e){return o.splitIntoRootChunks(e)}getPropertyGindex(){return null}getPropertyType(){throw Error("Must only request ByteArray complete data")}getIndexProperty(){throw Error("Must only request ByteArray complete data")}tree_fromProofNode(e){return{node:e,done:!0}}tree_getLeafGindices(e,t){const r=this.tree_getByteLen(t),i=Math.ceil(r/32),o=n.concatGindices([e,n.toGindex(this.depth,BigInt(0))]),a=new Array(i);for(let e=0,t=o;e<i;e++,t++)a[e]=t;return this.isList&&a.push(n.concatGindices([e,s.LENGTH_GINDEX])),a}fromJson(e){const t=i.fromHexString(e);return this.assertValidSize(t.length),t}toJson(e){return i.toHexString(e)}clone(e){return e}equals(e,t){return i.byteArrayEquals(e,t)}}t.ByteArrayType=a},3568:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ByteListType=void 0;const n=r(6567),i=r(995),o=r(1425),s=r(3191),a=r(4316);class u extends a.ByteArrayType{constructor(e,t){if(super(),this.limitBytes=e,this.fixedSize=null,this.isList=!0,0===e)throw Error("List limit must be > 0");this.typeName=t?.typeName??`ByteList[${e}]`,this.maxChunkCount=Math.ceil(this.limitBytes/32),this.chunkDepth=i.maxChunksToDepth(this.maxChunkCount),this.depth=1+this.chunkDepth,this.minSize=0,this.maxSize=this.limitBytes}static named(e,t){return new(o.namedClass(u,t.typeName))(e,t)}value_serializedSize(e){return e.length}tree_serializedSize(e){return s.getLengthFromRootNode(e)}tree_serializeToBytes(e,t,r){const i=s.getChunksNodeFromRootNode(r),o=s.getLengthFromRootNode(r),a=Math.ceil(o/32),u=n.getNodesAtDepth(i,this.chunkDepth,0,a);return n.packedNodeRootsToBytes(e.dataView,t,o,u),t+o}tree_deserializeFromBytes(e,t,r){this.assertValidSize(r-t);const i=n.packedRootsBytesToNode(this.chunkDepth,e.dataView,t,r);return s.addLengthNode(i,r-t)}tree_getByteLen(e){if(!e)throw new Error("ByteListType requires a node to get leaves");return s.getLengthFromRootNode(e)}hashTreeRoot(e){return i.mixInLength(super.hashTreeRoot(e),e.length)}assertValidSize(e){if(e>this.limitBytes)throw Error(`ByteList invalid size ${e} limit ${this.limitBytes}`)}}t.ByteListType=u},245:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ByteVectorType=void 0;const n=r(6567),i=r(995),o=r(1425),s=r(4316);class a extends s.ByteArrayType{constructor(e,t){if(super(),this.lengthBytes=e,this.isList=!1,0===e)throw Error("Vector length must be > 0");this.typeName=t?.typeName??`ByteVector[${e}]`,this.maxChunkCount=Math.ceil(this.lengthBytes/32),this.chunkDepth=i.maxChunksToDepth(this.maxChunkCount),this.depth=this.chunkDepth,this.fixedSize=this.lengthBytes,this.minSize=this.fixedSize,this.maxSize=this.fixedSize}static named(e,t){return new(o.namedClass(a,t.typeName))(e,t)}value_serializedSize(){return this.fixedSize}tree_serializedSize(){return this.fixedSize}tree_serializeToBytes(e,t,r){const i=n.getNodesAtDepth(r,this.chunkDepth,0,this.maxChunkCount);return n.packedNodeRootsToBytes(e.dataView,t,this.fixedSize,i),t+this.fixedSize}tree_deserializeFromBytes(e,t,r){return this.assertValidSize(r-t),n.packedRootsBytesToNode(this.chunkDepth,e.dataView,t,r)}tree_getByteLen(){return this.lengthBytes}assertValidSize(e){if(e!==this.lengthBytes)throw Error(`ByteVector invalid size ${e} expected ${this.lengthBytes}`)}}t.ByteVectorType=a},8715:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isCompositeType=t.CompositeType=t.LENGTH_GINDEX=void 0;const n=r(6567),i=r(1518),o=r(995),s=r(8081),a=r(7451);t.LENGTH_GINDEX=BigInt(3);const u=Symbol("ssz_cached_permanent_root");class c extends a.Type{constructor(e){super(),this.cachePermanentRootStruct=e,this.isBasic=!1}defaultView(){return this.toView(this.defaultValue())}defaultViewDU(){return this.toViewDU(this.defaultValue())}deserializeToView(e){const t=new DataView(e.buffer,e.byteOffset,e.byteLength),r=this.tree_deserializeFromBytes({uint8Array:e,dataView:t},0,e.length);return this.getView(new n.Tree(r))}deserializeToViewDU(e){const t=new DataView(e.buffer,e.byteOffset,e.byteLength),r=this.tree_deserializeFromBytes({uint8Array:e,dataView:t},0,e.length);return this.getViewDU(r)}toView(e){const t=this.value_toTree(e);return this.getView(new n.Tree(t))}toViewDU(e){const t=this.value_toTree(e);return this.getViewDU(t)}toValueFromView(e){const t=this.commitView(e);return this.tree_toValue(t)}toValueFromViewDU(e){const t=this.commitViewDU(e);return this.tree_toValue(t)}toViewFromViewDU(e){const t=this.commitViewDU(e);return this.getView(new n.Tree(t))}toViewDUFromView(e){const t=this.commitView(e);return this.getViewDU(t)}hashTreeRoot(e){if(this.cachePermanentRootStruct){const t=e[u];if(t)return t}const t=o.merkleize(this.getRoots(e),this.maxChunkCount);return this.cachePermanentRootStruct&&(e[u]=t),t}getCachedPermanentRoot(e){return e[u]}createFromProof(e,t){const r=n.Tree.createFromProof(e).rootNode,o=s.treePostProcessFromProofNode(r,this);if(void 0!==t&&!i.byteArrayEquals(o.root,t))throw new Error("Proof does not match trusted root");return this.getView(new n.Tree(o))}tree_createProof(e,t){const r=this.tree_createProofGindexes(e,t);return n.createProof(e,{type:n.ProofType.treeOffset,gindices:r})}tree_createProofGindexes(e,t){const r=[];for(const i of t){const{type:t,gindex:o}=this.getPathInfo(i);if(l(t)){const i=t.tree_getLeafGindices(o,null===t.fixedSize?n.getNode(e,o):void 0);for(const e of i)r.push(e)}else r.push(o)}return r}getPathInfo(e){const t=[];let r=this;for(const n of e){if(r.isBasic)throw new Error("Invalid path: cannot navigate beyond a basic type");const e=r.getPropertyGindex(n);null!==e&&(t.push(e),r=r.getPropertyType(n))}return{type:r,gindex:n.concatGindices(t)}}tree_fromProofNode(e){return{node:e,done:!1}}}function l(e){return!e.isBasic}t.CompositeType=c,t.isCompositeType=l},5039:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderContainerTypeName=t.precomputeJsonKey=t.ContainerType=void 0;const n=r(6567),i=r(995),o=r(1425),s=r(8715),a=r(7685),u=r(8865),c=r(9705);class l extends s.CompositeType{constructor(e,t){super(t?.cachePermanentRootStruct),this.fields=e,this.opts=t,this.isList=!1,this.isViewMutable=!0,this.typeName=t?.typeName??h(e),this.maxChunkCount=Object.keys(e).length,this.depth=i.maxChunksToDepth(this.maxChunkCount),this.fieldsEntries=[];for(const r of Object.keys(e))this.fieldsEntries.push({fieldName:r,fieldType:this.fields[r],jsonKey:f(r,t?.casingMap,t?.jsonCase),gindex:n.toGindex(this.depth,BigInt(this.fieldsEntries.length))});if(0===this.fieldsEntries.length)throw Error("Container must have > 0 fields");this.fieldsGindex={};for(let e=0;e<this.fieldsEntries.length;e++)this.fieldsGindex[this.fieldsEntries[e].fieldName]=n.toGindex(this.depth,BigInt(e));this.jsonKeyToFieldName={};for(const{fieldName:e,jsonKey:t}of this.fieldsEntries)this.jsonKeyToFieldName[t]=e;const{minLen:r,maxLen:o,fixedSize:s}=function(e){let t=0,r=0,n=0;for(const i of Object.values(e))t+=i.minSize,r+=i.maxSize,null===i.fixedSize?(t+=4,r+=4,n=null):null!==n&&(n+=i.fixedSize);return{minLen:t,maxLen:r,fixedSize:n}}(e);this.minSize=r,this.maxSize=o,this.fixedSize=s;const{isFixedLen:c,fieldRangesFixedLen:l,variableOffsetsPosition:d,fixedEnd:p}=function(e){const t=[],r=[],n=[];let i=0;for(const o of Object.values(e))t.push(null!==o.fixedSize),null===o.fixedSize?(n.push(i),i+=4):(r.push({start:i,end:i+o.fixedSize}),i+=o.fixedSize);return{isFixedLen:t,fieldRangesFixedLen:r,variableOffsetsPosition:n,fixedEnd:i}}(e);this.isFixedLen=c,this.fieldRangesFixedLen=l,this.variableOffsetsPosition=d,this.fixedEnd=p,this.TreeView=t?.getContainerTreeViewClass?.(this)??a.getContainerTreeViewClass(this),this.TreeViewDU=t?.getContainerTreeViewDUClass?.(this)??u.getContainerTreeViewDUClass(this)}static named(e,t){return new(o.namedClass(l,t.typeName))(e,t)}defaultValue(){const e={};for(const{fieldName:t,fieldType:r}of this.fieldsEntries)e[t]=r.defaultValue();return e}getView(e){return new this.TreeView(this,e)}getViewDU(e,t){return new this.TreeViewDU(this,e,t)}cacheOfViewDU(e){return e.cache}commitView(e){return e.node}commitViewDU(e){return e.commit(),e.node}value_serializedSize(e){let t=0;for(let r=0;r<this.fieldsEntries.length;r++){const{fieldName:n,fieldType:i}=this.fieldsEntries[r];t+=null===i.fixedSize?4+i.value_serializedSize(e[n]):i.fixedSize}return t}value_serializeToBytes(e,t,r){let n=t,i=t+this.fixedEnd;for(let o=0;o<this.fieldsEntries.length;o++){const{fieldName:s,fieldType:a}=this.fieldsEntries[o];null===a.fixedSize?(e.dataView.setUint32(n,i-t,!0),n+=4,i=a.value_serializeToBytes(e,i,r[s])):n=a.value_serializeToBytes(e,n,r[s])}return i}value_deserializeFromBytes(e,t,r){const n=this.getFieldRanges(e.dataView,t,r),i={};for(let r=0;r<this.fieldsEntries.length;r++){const{fieldName:o,fieldType:s}=this.fieldsEntries[r],a=n[r];i[o]=s.value_deserializeFromBytes(e,t+a.start,t+a.end)}return i}tree_serializedSize(e){let t=0;const r=n.getNodesAtDepth(e,this.depth,0,this.fieldsEntries.length);for(let e=0;e<this.fieldsEntries.length;e++){const{fieldType:n}=this.fieldsEntries[e],i=r[e];t+=null===n.fixedSize?4+n.tree_serializedSize(i):n.fixedSize}return t}tree_serializeToBytes(e,t,r){let i=t,o=t+this.fixedEnd;const s=n.getNodesAtDepth(r,this.depth,0,this.fieldsEntries.length);for(let r=0;r<this.fieldsEntries.length;r++){const{fieldType:n}=this.fieldsEntries[r],a=s[r];null===n.fixedSize?(e.dataView.setUint32(i,o-t,!0),i+=4,o=n.tree_serializeToBytes(e,o,a)):i=n.tree_serializeToBytes(e,i,a)}return o}tree_deserializeFromBytes(e,t,r){const i=this.getFieldRanges(e.dataView,t,r),o=new Array(this.fieldsEntries.length);for(let r=0;r<this.fieldsEntries.length;r++){const{fieldType:n}=this.fieldsEntries[r],s=i[r];o[r]=n.tree_deserializeFromBytes(e,t+s.start,t+s.end)}return n.subtreeFillToContents(o,this.depth)}getRoots(e){const t=new Array(this.fieldsEntries.length);for(let r=0;r<this.fieldsEntries.length;r++){const{fieldName:n,fieldType:i}=this.fieldsEntries[r];t[r]=i.hashTreeRoot(e[n])}return t}getPropertyGindex(e){const t=this.fieldsGindex[e]??this.fieldsGindex[this.jsonKeyToFieldName[e]];if(void 0===t)throw Error(`Unknown container property ${e}`);return t}getPropertyType(e){const t=this.fields[e]??this.fields[this.jsonKeyToFieldName[e]];if(void 0===t)throw Error(`Unknown container property ${e}`);return t}getIndexProperty(e){return e>=this.fieldsEntries.length?null:this.fieldsEntries[e].fieldName}tree_getLeafGindices(e,t){const r=[];for(let i=0;i<this.fieldsEntries.length;i++){const{fieldName:o,fieldType:s}=this.fieldsEntries[i],a=this.fieldsGindex[o],u=n.concatGindices([e,a]);if(s.isBasic)r.push(u);else{const e=s;if(null===s.fixedSize){if(!t)throw new Error("variable type requires tree argument to get leaves");r.push(...e.tree_getLeafGindices(u,n.getNode(t,a)))}else r.push(...e.tree_getLeafGindices(u))}}return r}fromJson(e){if("object"!=typeof e)throw Error("JSON must be of type object");if(null===e)throw Error("JSON must not be null");const t={};for(let r=0;r<this.fieldsEntries.length;r++){const{fieldName:n,fieldType:i,jsonKey:o}=this.fieldsEntries[r],s=e[o];if(void 0===s)throw Error(`JSON expected key ${o} is undefined`);t[n]=i.fromJson(s)}return t}toJson(e){const t={};for(let r=0;r<this.fieldsEntries.length;r++){const{fieldName:n,fieldType:i,jsonKey:o}=this.fieldsEntries[r];t[o]=i.toJson(e[n])}return t}clone(e){const t={};for(let r=0;r<this.fieldsEntries.length;r++){const{fieldName:n,fieldType:i}=this.fieldsEntries[r];t[n]=i.clone(e[n])}return t}equals(e,t){for(let r=0;r<this.fieldsEntries.length;r++){const{fieldName:n,fieldType:i}=this.fieldsEntries[r];if(!i.equals(e[n],t[n]))return!1}return!0}getFieldRanges(e,t,r){if(0===this.variableOffsetsPosition.length){const e=r-t;if(e!==this.fixedEnd)throw Error(`${this.typeName} size ${e} not equal fixed size ${this.fixedEnd}`);return this.fieldRangesFixedLen}const n=function(e,t,r,n,i){const o=r-t,s=new Array(i.length);for(let r=0;r<i.length;r++){const a=e.getUint32(t+i[r],!0);if(a>o)throw new Error(`Offset out of bounds ${a} > ${o}`);if(0===r){if(a!==n)throw new Error(`First offset must equal to fixedEnd ${a} != ${n}`)}else if(a<s[r-1])throw new Error(`Offsets must be increasing ${a} < ${s[r-1]}`);s[r]=a}return s}(e,t,r,this.fixedEnd,this.variableOffsetsPosition);n.push(r-t);let i=0,o=0;const s=new Array(this.isFixedLen.length);for(let e=0;e<this.isFixedLen.length;e++)this.isFixedLen[e]?s[e]=this.fieldRangesFixedLen[o++]:(s[e]={start:n[i],end:n[i+1]},i++);return s}}function f(e,t,r){if(t){const r=t[e];if(void 0===r)throw Error(`casingMap[${e}] not defined`);return r}return r?c.Case[r](e):e}function h(e,t="Container"){return`${t}({${Object.keys(e).map((t=>`${t}: ${e[t].typeName}`)).join(", ")}})`}t.ContainerType=l,t.precomputeJsonKey=f,t.renderContainerTypeName=h},3261:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContainerNodeStructType=void 0;const n=r(8715),i=r(5039),o=r(1425),s=r(1225),a=r(4320),u=r(8747);class c extends i.ContainerType{constructor(e,t){super(e,{typeName:t?.typeName??i.renderContainerTypeName(e,"ContainerNodeStruct"),...t,getContainerTreeViewClass:s.getContainerTreeViewClass,getContainerTreeViewDUClass:a.getContainerTreeViewDUClass}),this.fields=e;for(const{fieldName:e,fieldType:t}of this.fieldsEntries)if(n.isCompositeType(t)&&t.isViewMutable)throw Error(`ContainerNodeStructType field '${e}' ${t.typeName} view is mutable`)}static named(e,t){return new(o.namedClass(i.ContainerType,t.typeName))(e,t)}tree_serializedSize(e){return this.value_serializedSize(e.value)}tree_serializeToBytes(e,t,r){const{value:n}=r;return this.value_serializeToBytes(e,t,n)}tree_deserializeFromBytes(e,t,r){const n=this.value_deserializeFromBytes(e,t,r);return new u.BranchNodeStruct(this.valueToTree.bind(this),n)}getPropertyGindex(){return null}tree_fromProofNode(e){const t=new Uint8Array(super.tree_serializedSize(e)),r=new DataView(t.buffer,t.byteOffset,t.byteLength);super.tree_serializeToBytes({uint8Array:t,dataView:r},0,e);const n=this.value_deserializeFromBytes({uint8Array:t,dataView:r},0,t.length);return{node:new u.BranchNodeStruct(this.valueToTree.bind(this),n),done:!0}}tree_toValue(e){return e.value}value_toTree(e){return new u.BranchNodeStruct(this.valueToTree.bind(this),e)}valueToTree(e){const t=new Uint8Array(this.value_serializedSize(e)),r=new DataView(t.buffer,t.byteOffset,t.byteLength);return this.value_serializeToBytes({uint8Array:t,dataView:r},0,e),super.tree_deserializeFromBytes({uint8Array:t,dataView:r},0,t.length)}}t.ContainerNodeStructType=c},6866:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ListBasicType=void 0;const n=r(3191),i=r(995),o=r(1425),s=r(9291),a=r(1828),u=r(9659);class c extends u.ArrayType{constructor(e,t,r){if(super(e),this.elementType=e,this.limit=t,this.fixedSize=null,this.isList=!0,this.isViewMutable=!0,this.defaultLen=0,!e.isBasic)throw Error("elementType must be basic");if(0===t)throw Error("List limit must be > 0");this.typeName=r?.typeName??`List[${e.typeName}, ${t}]`,this.itemsPerChunk=32/e.byteLength,this.maxChunkCount=Math.ceil(this.limit*e.byteLength/32),this.chunkDepth=i.maxChunksToDepth(this.maxChunkCount),this.depth=this.chunkDepth+1,this.minSize=0,this.maxSize=this.limit*e.maxSize}static named(e,t,r){return new(o.namedClass(c,r.typeName))(e,t,r)}getView(e){return new s.ListBasicTreeView(this,e)}getViewDU(e,t){return new a.ListBasicTreeViewDU(this,e,t)}commitView(e){return e.node}commitViewDU(e){return e.commit(),e.node}cacheOfViewDU(e){return e.cache}value_serializedSize(e){return e.length*this.elementType.byteLength}value_serializeToBytes(e,t,r){return n.value_serializeToBytesArrayBasic(this.elementType,r.length,e,t,r)}value_deserializeFromBytes(e,t,r){return n.value_deserializeFromBytesArrayBasic(this.elementType,e,t,r,this)}tree_serializedSize(e){return this.tree_getLength(e)*this.elementType.byteLength}tree_serializeToBytes(e,t,r){const i=this.tree_getChunksNode(r),o=this.tree_getLength(r);return n.tree_serializeToBytesArrayBasic(this.elementType,o,this.chunkDepth,e,t,i)}tree_deserializeFromBytes(e,t,r){return n.tree_deserializeFromBytesArrayBasic(this.elementType,this.chunkDepth,e,t,r,this)}tree_getLength(e){return e.right.getUint(4,0)}tree_setLength(e,t){e.rootNode=n.addLengthNode(e.rootNode.left,t)}tree_getChunksNode(e){return e.left}tree_setChunksNode(e,t,r){return n.setChunksNode(e,t,r)}hashTreeRoot(e){return i.mixInLength(super.hashTreeRoot(e),e.length)}getRoots(e){const t=new Uint8Array(this.value_serializedSize(e)),r=new DataView(t.buffer,t.byteOffset,t.byteLength);return n.value_serializeToBytesArrayBasic(this.elementType,e.length,{uint8Array:t,dataView:r},0,e),i.splitIntoRootChunks(t)}}t.ListBasicType=c},5189:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ListCompositeType=void 0;const n=r(995),i=r(1425),o=r(3191),s=r(404),a=r(1783),u=r(2029),c=r(9659);class l extends c.ArrayType{constructor(e,t,r){if(super(e),this.elementType=e,this.limit=t,this.itemsPerChunk=1,this.fixedSize=null,this.isList=!0,this.isViewMutable=!0,this.defaultLen=0,e.isBasic)throw Error("elementType must not be basic");if(0===t)throw Error("List limit must be > 0");this.typeName=r?.typeName??`List[${e.typeName}, ${t}]`,this.maxChunkCount=this.limit,this.chunkDepth=n.maxChunksToDepth(this.maxChunkCount),this.depth=this.chunkDepth+1,this.minSize=0,this.maxSize=s.maxSizeArrayComposite(e,this.limit)}static named(e,t,r){return new(i.namedClass(l,r.typeName))(e,t,r)}getView(e){return new a.ListCompositeTreeView(this,e)}getViewDU(e,t){return new u.ListCompositeTreeViewDU(this,e,t)}commitView(e){return e.node}commitViewDU(e){return e.commit(),e.node}cacheOfViewDU(e){return e.cache}value_serializedSize(e){return s.value_serializedSizeArrayComposite(this.elementType,e.length,e)}value_serializeToBytes(e,t,r){return s.value_serializeToBytesArrayComposite(this.elementType,r.length,e,t,r)}value_deserializeFromBytes(e,t,r){return s.value_deserializeFromBytesArrayComposite(this.elementType,e,t,r,this)}tree_serializedSize(e){const t=this.tree_getChunksNode(e),r=this.tree_getLength(e);return s.tree_serializedSizeArrayComposite(this.elementType,r,this.chunkDepth,t)}tree_serializeToBytes(e,t,r){const n=this.tree_getChunksNode(r),i=this.tree_getLength(r);return s.tree_serializeToBytesArrayComposite(this.elementType,i,this.chunkDepth,n,e,t)}tree_deserializeFromBytes(e,t,r){return s.tree_deserializeFromBytesArrayComposite(this.elementType,this.chunkDepth,e,t,r,this)}tree_getLength(e){return o.getLengthFromRootNode(e)}tree_setLength(e,t){e.rootNode=o.addLengthNode(e.rootNode.left,t)}tree_getChunksNode(e){return e.left}tree_setChunksNode(e,t,r){return o.setChunksNode(e,t,r)}hashTreeRoot(e){return n.mixInLength(super.hashTreeRoot(e),e.length)}getRoots(e){return s.value_getRootsArrayComposite(this.elementType,e.length,e)}}t.ListCompositeType=l},1638:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NoneType=void 0;const n=r(6567),i=r(645);class o extends i.BasicType{constructor(){super(...arguments),this.typeName="none",this.byteLength=0,this.itemsPerChunk=32,this.fixedSize=0,this.minSize=0,this.maxSize=0}defaultValue(){return null}value_serializeToBytes(e,t,r){return t}value_deserializeFromBytes(e,t){return null}tree_serializeToBytes(e,t,r){return t}tree_deserializeFromBytes(e,t,r){return n.zeroNode(0)}tree_getFromNode(e){return null}tree_setToNode(e,t){}tree_getFromPackedNode(e,t){return null}tree_setToPackedNode(e,t,r){}fromJson(e){if(null!==e)throw Error("JSON invalid type none must be null");return null}toJson(e){return null}}t.NoneType=o},436:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UintBigintType=t.UintNumberType=t.uintBigintByteLens=t.uintNumberByteLens=void 0;const n=r(6567),i=r(1425),o=r(645),s=BigInt(Number.MAX_SAFE_INTEGER),a=BigInt(2)**BigInt(64),u=BigInt(2)**BigInt(128),c=BigInt(2)**BigInt(192),l=2**32,f=4294967295;t.uintNumberByteLens=[1,2,4,8],t.uintBigintByteLens=[1,2,4,8,16,32];class h extends o.BasicType{constructor(e,t){if(super(),this.byteLength=e,e>8)throw Error("UintNumber byteLength limit is 8");if(Math.log2(e)%1!=0)throw Error("byteLength must be a power of 2");this.typeName=t?.typeName??"uint"+8*e,t?.clipInfinity&&(this.typeName+="Inf"),t?.setBitwiseOR&&(this.typeName+="OR"),this.itemsPerChunk=32/this.byteLength,this.fixedSize=e,this.minSize=e,this.maxSize=e,this.maxDecimalStr=(BigInt(2)**BigInt(8*this.byteLength)-BigInt(1)).toString(10),this.clipInfinity=!0===t?.clipInfinity,this.setBitwiseOR=!0===t?.setBitwiseOR}static named(e,t){return new(i.namedClass(h,t.typeName))(e,t)}defaultValue(){return 0}value_serializeToBytes({dataView:e},t,r){switch(this.byteLength){case 1:e.setInt8(t,r);break;case 2:e.setUint16(t,r,!0);break;case 4:e.setUint32(t,r,!0);break;case 8:r===1/0?(e.setUint32(t,4294967295),e.setUint32(t+4,4294967295)):(e.setUint32(t,4294967295&r,!0),e.setUint32(t+4,r/l&4294967295,!0))}return t+this.byteLength}value_deserializeFromBytes({dataView:e},t,r){switch(this.assertValidSize(r-t),this.byteLength){case 1:return e.getUint8(t);case 2:return e.getUint16(t,!0);case 4:return e.getUint32(t,!0);case 8:{const r=e.getUint32(t,!0),n=e.getUint32(t+4,!0);return n===f&&r===f&&this.clipInfinity?1/0:n*l+r}}}tree_serializeToBytes(e,t,r){const n=r.getUint(this.byteLength,0,this.clipInfinity);return this.value_serializeToBytes(e,t,n),t+this.byteLength}tree_deserializeFromBytes(e,t,r){this.assertValidSize(r-t);const i=this.value_deserializeFromBytes(e,t,r),o=n.LeafNode.fromZero();return o.setUint(this.byteLength,0,i,this.clipInfinity),o}tree_getFromNode(e){return e.getUint(this.byteLength,0,this.clipInfinity)}tree_setToNode(e,t){this.tree_setToPackedNode(e,0,t)}tree_getFromPackedNode(e,t){const r=this.byteLength*(t%this.itemsPerChunk);return e.getUint(this.byteLength,r,this.clipInfinity)}tree_setToPackedNode(e,t,r){const n=this.byteLength*(t%this.itemsPerChunk);this.setBitwiseOR?e.bitwiseOrUint(this.byteLength,n,r):e.setUint(this.byteLength,n,r,this.clipInfinity)}fromJson(e){if("number"==typeof e)return e;if("string"==typeof e){if(this.clipInfinity&&e===this.maxDecimalStr)return 1/0;{const t=parseInt(e,10);if(isNaN(t))throw Error("JSON invalid number isNaN");if(t>Number.MAX_SAFE_INTEGER)throw Error("JSON invalid number > MAX_SAFE_INTEGER");return t}}if("bigint"==typeof e){if(e>s)throw Error("JSON invalid number > MAX_SAFE_INTEGER_BN");return Number(e)}throw Error(`JSON invalid type ${typeof e} expected number`)}toJson(e){return e===1/0?this.maxDecimalStr:e.toString(10)}}t.UintNumberType=h;class d extends o.BasicType{constructor(e,t){if(super(),this.byteLength=e,e>32)throw Error("UintBigint byteLength limit is 32");if(Math.log2(e)%1!=0)throw Error("byteLength must be a power of 2");this.typeName=t?.typeName??"uintBigint"+8*e,this.byteLength=e,this.itemsPerChunk=32/this.byteLength,this.fixedSize=e,this.minSize=e,this.maxSize=e}static named(e,t){return new(i.namedClass(d,t.typeName))(e,t)}defaultValue(){return BigInt(0)}value_serializeToBytes({dataView:e},t,r){switch(this.byteLength){case 1:e.setInt8(t,Number(r));break;case 2:e.setUint16(t,Number(r),!0);break;case 4:e.setUint32(t,Number(r),!0);break;case 8:e.setBigUint64(t,r,!0);break;default:for(let n=0;n<this.byteLength;n+=8){n>0&&(r/=a);const i=BigInt.asUintN(64,r);e.setBigUint64(t+n,i,!0)}}return t+this.byteLength}value_deserializeFromBytes({dataView:e},t,r){const n=r-t;if(n!==this.byteLength)throw Error(`Invalid size ${n} expected ${this.byteLength}`);switch(this.byteLength){case 1:return BigInt(e.getUint8(t));case 2:return BigInt(e.getUint16(t,!0));case 4:return BigInt(e.getUint32(t,!0));case 8:return e.getBigUint64(t,!0);case 16:{const r=e.getBigUint64(t,!0);return e.getBigUint64(t+8,!0)*a+r}case 32:{const r=e.getBigUint64(t,!0),n=e.getBigUint64(t+8,!0),i=e.getBigUint64(t+16,!0);return e.getBigUint64(t+24,!0)*c+i*u+n*a+r}}}tree_serializeToBytes(e,t,r){const n=r.getUintBigint(this.byteLength,0);return this.value_serializeToBytes(e,t,n),t+this.byteLength}tree_deserializeFromBytes(e,t,r){const i=r-t;if(i!==this.byteLength)throw Error(`Invalid size ${i} expected ${this.byteLength}`);const o=this.value_deserializeFromBytes(e,t,r),s=n.LeafNode.fromZero();return s.setUintBigint(this.byteLength,0,o),s}tree_getFromNode(e){return e.getUintBigint(this.byteLength,0)}tree_setToNode(e,t){this.tree_setToPackedNode(e,0,t)}tree_getFromPackedNode(e,t){const r=this.byteLength*(t%this.itemsPerChunk);return e.getUintBigint(this.byteLength,r)}tree_setToPackedNode(e,t,r){const n=this.byteLength*(t%this.itemsPerChunk);e.setUintBigint(this.byteLength,n,r)}fromJson(e){if("bigint"==typeof e)return e;if("string"==typeof e||"number"==typeof e)return BigInt(e);throw Error(`JSON invalid type ${typeof e} expected bigint`)}toJson(e){return e.toString(10)}}t.UintBigintType=d},1851:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnionType=void 0;const n=r(6567),i=r(995),o=r(1425),s=r(8715),a=r(3191),u=r(1638),c=BigInt(2),l=BigInt(3);class f extends s.CompositeType{constructor(e,t){if(super(),this.types=e,this.depth=1,this.maxChunkCount=1,this.fixedSize=null,this.isList=!0,this.isViewMutable=!0,e.length>=128)throw Error("Must have less than 128 types");if(0===e.length)throw Error("Must have at least 1 type option");if(e[0]instanceof u.NoneType&&e.length<2)throw Error("Must have at least 2 type options if the first is None");for(let t=1;t<e.length;t++)if(e[t]instanceof u.NoneType)throw Error("None may only be the first option");this.typeName=t?.typeName??`Union[${e.map((e=>e.typeName)).join(",")}]`;const r=[],n=[];for(const t of e)r.push(t.minSize),n.push(t.maxSize);this.minSize=1+Math.min(...r),this.maxSize=1+Math.max(...n),this.maxSelector=this.types.length-1}static named(e,t){return new(o.namedClass(f,t.typeName))(e,t)}defaultValue(){return{selector:0,value:this.types[0].defaultValue()}}getView(e){return this.tree_toValue(e.rootNode)}getViewDU(e){return this.tree_toValue(e)}cacheOfViewDU(){}commitView(e){return this.value_toTree(e)}commitViewDU(e){return this.value_toTree(e)}value_serializedSize(e){return 1+this.types[e.selector].value_serializedSize(e.value)}value_serializeToBytes(e,t,r){return e.uint8Array[t]=r.selector,this.types[r.selector].value_serializeToBytes(e,t+1,r.value)}value_deserializeFromBytes(e,t,r){const n=e.uint8Array[t];if(n>this.maxSelector)throw Error(`Invalid selector ${n}`);return{selector:n,value:this.types[n].value_deserializeFromBytes(e,t+1,r)}}tree_serializedSize(e){const t=a.getLengthFromRootNode(e),r=e.left;return 1+this.types[t].value_serializedSize(r)}tree_serializeToBytes(e,t,r){const n=a.getLengthFromRootNode(r),i=r.left;return e.uint8Array[t]=n,this.types[n].tree_serializeToBytes(e,t+1,i)}tree_deserializeFromBytes(e,t,r){const n=e.uint8Array[t];if(n>this.maxSelector)throw Error(`Invalid selector ${n}`);const i=this.types[n].tree_deserializeFromBytes(e,t+1,r);return a.addLengthNode(i,n)}hashTreeRoot(e){return i.mixInLength(super.hashTreeRoot(e),e.selector)}getRoots(e){return[this.types[e.selector].hashTreeRoot(e.value)]}getPropertyGindex(e){switch(e){case"value":return c;case"selector":return l;default:throw new Error(`Invalid Union type property ${e}`)}}getPropertyType(){throw new Error("Not applicable for Union type")}getIndexProperty(e){if(0===e)return"value";if(1===e)return"selector";throw Error("Union index of out bounds")}tree_getLeafGindices(e,t){if(!t)throw Error("rootNode required");const r=[n.concatGindices([e,l])],i=a.getLengthFromRootNode(t),o=this.types[i],u=n.concatGindices([e,c]);return s.isCompositeType(o)?r.push(...o.tree_getLeafGindices(u,n.getNode(t,c))):r.push(u),r}fromJson(e){if("object"!=typeof e)throw new Error("JSON must be of type object");const t=e;if("number"!=typeof t.selector)throw new Error("Invalid JSON Union selector must be number");const r=this.types[t.selector];if(!r)throw new Error("Invalid JSON Union selector out of range");return{selector:t.selector,value:r.toJson(t.value)}}toJson(e){return{selector:e.selector,value:this.types[e.selector].toJson(e.value)}}clone(e){return{selector:e.selector,value:this.types[e.selector].clone(e.value)}}equals(e,t){return e.selector===t.selector&&this.types[e.selector].equals(e.value,t.value)}}t.UnionType=f},5021:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VectorBasicType=void 0;const n=r(995),i=r(1425),o=r(3191),s=r(7733),a=r(3341),u=r(9659);class c extends u.ArrayType{constructor(e,t,r){if(super(e),this.elementType=e,this.length=t,this.isList=!1,this.isViewMutable=!0,!e.isBasic)throw Error("elementType must be basic");if(0===t)throw Error("Vector length must be > 0");this.typeName=r?.typeName??`Vector[${e.typeName}, ${t}]`,this.itemsPerChunk=32/e.byteLength,this.maxChunkCount=Math.ceil(t*e.byteLength/32),this.chunkDepth=n.maxChunksToDepth(this.maxChunkCount),this.depth=this.chunkDepth,this.fixedSize=t*e.byteLength,this.minSize=this.fixedSize,this.maxSize=this.fixedSize,this.defaultLen=t}static named(e,t,r){return new(i.namedClass(c,r.typeName))(e,t,r)}getView(e){return new s.ArrayBasicTreeView(this,e)}getViewDU(e,t){return new a.ArrayBasicTreeViewDU(this,e,t)}commitView(e){return e.node}commitViewDU(e){return e.commit(),e.node}cacheOfViewDU(e){return e.cache}value_serializedSize(){return this.fixedSize}value_serializeToBytes(e,t,r){return o.value_serializeToBytesArrayBasic(this.elementType,this.length,e,t,r)}value_deserializeFromBytes(e,t,r){return o.value_deserializeFromBytesArrayBasic(this.elementType,e,t,r,this)}tree_serializedSize(){return this.fixedSize}tree_serializeToBytes(e,t,r){return o.tree_serializeToBytesArrayBasic(this.elementType,this.length,this.depth,e,t,r)}tree_deserializeFromBytes(e,t,r){return o.tree_deserializeFromBytesArrayBasic(this.elementType,this.depth,e,t,r,this)}tree_getLength(){return this.length}tree_setLength(){}tree_getChunksNode(e){return e}tree_setChunksNode(e,t){return t}getRoots(e){const t=new Uint8Array(this.fixedSize),r=new DataView(t.buffer,t.byteOffset,t.byteLength);return o.value_serializeToBytesArrayBasic(this.elementType,this.length,{uint8Array:t,dataView:r},0,e),n.splitIntoRootChunks(t)}}t.VectorBasicType=c},4013:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VectorCompositeType=void 0;const n=r(995),i=r(1425),o=r(404),s=r(6330),a=r(2309),u=r(9659);class c extends u.ArrayType{constructor(e,t,r){if(super(e),this.elementType=e,this.length=t,this.itemsPerChunk=1,this.isList=!1,this.isViewMutable=!0,e.isBasic)throw Error("elementType must not be basic");if(0===t)throw Error("Vector length must be > 0");this.typeName=r?.typeName??`Vector[${e.typeName}, ${t}]`,this.maxChunkCount=t,this.chunkDepth=n.maxChunksToDepth(this.maxChunkCount),this.depth=this.chunkDepth,this.fixedSize=null===e.fixedSize?null:t*e.fixedSize,this.minSize=o.minSizeArrayComposite(e,t),this.maxSize=o.maxSizeArrayComposite(e,t),this.defaultLen=t}static named(e,t,r){return new(i.namedClass(c,r.typeName))(e,t,r)}getView(e){return new s.ArrayCompositeTreeView(this,e)}getViewDU(e,t){return new a.ArrayCompositeTreeViewDU(this,e,t)}commitView(e){return e.node}commitViewDU(e){return e.commit(),e.node}cacheOfViewDU(e){return e.cache}value_serializedSize(e){return o.value_serializedSizeArrayComposite(this.elementType,this.length,e)}value_serializeToBytes(e,t,r){return o.value_serializeToBytesArrayComposite(this.elementType,this.length,e,t,r)}value_deserializeFromBytes(e,t,r){return o.value_deserializeFromBytesArrayComposite(this.elementType,e,t,r,this)}tree_serializedSize(e){return o.tree_serializedSizeArrayComposite(this.elementType,this.length,this.depth,e)}tree_serializeToBytes(e,t,r){return o.tree_serializeToBytesArrayComposite(this.elementType,this.length,this.depth,r,e,t)}tree_deserializeFromBytes(e,t,r){return o.tree_deserializeFromBytesArrayComposite(this.elementType,this.depth,e,t,r,this)}tree_getLength(){return this.length}tree_setLength(){}tree_getChunksNode(e){return e}tree_setChunksNode(e,t){return t}getRoots(e){return o.value_getRootsArrayComposite(this.elementType,this.length,e)}}t.VectorCompositeType=c},1518:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.byteArrayEquals=t.fromHexString=t.toHexString=void 0;const r=new Array(256);t.toHexString=function(e){let t="0x";for(const n of e)r[n]||(r[n]=n<16?"0"+n.toString(16):n.toString(16)),t+=r[n];return t},t.fromHexString=function(e){if("string"!=typeof e)throw new Error(`hex argument type ${typeof e} must be of type string`);if(e.startsWith("0x")&&(e=e.slice(2)),e.length%2!=0)throw new Error(`hex string length ${e.length} must be multiple of 2`);const t=e.length/2,r=new Uint8Array(t);for(let n=0;n<t;n++){const t=parseInt(e.slice(2*n,2*(n+1)),16);r[n]=t}return r},t.byteArrayEquals=function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}},995:(e,t,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.nextPowerOf2=t.maxChunksToDepth=t.bitLength=t.mixInLength=t.splitIntoRootChunks=t.merkleize=t.hash64=void 0;const i=r(9457),o=r(38);function s(e,t){return i.hasher.digest64(e,t)}function a(e){return 0===e?0:Math.floor(Math.log2(e))+1}function u(e){return e<=0?1:Math.pow(2,a(e-1))}t.hash64=s,t.merkleize=function(e,t){const r=a(u(t)-1);if(0==e.length)return o.zeroHash(r);let n=e.length;for(let t=0;t<r;t++){const r=n%2,i=n+r;for(let i=0;i<r;i++)e[n+i]=o.zeroHash(t);for(let t=0;t<i;t+=2)e[t/2]=s(e[t],e[t+1]);n=i/2}return e[0]},t.splitIntoRootChunks=function(e){const t=Math.ceil(e.length/32),r=new Array(t);for(let n=0;n<t;n++){const t=new Uint8Array(32);t.set(e.slice(32*n,32*(n+1))),r[n]=t}return r},t.mixInLength=function(e,t){const r=n.alloc(32);return r.writeUIntLE(t,0,6),s(e,r)},t.bitLength=a,t.maxChunksToDepth=function(e){return 0===e?0:Math.ceil(Math.log2(e))},t.nextPowerOf2=u},1425:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.namedClass=void 0,t.namedClass=function(e,t){return new Function("superClass",`return class ${t} extends superClass {}`)(e)}},8081:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.treePostProcessFromProofNode=void 0;const n=r(6567);function i(e){return!e.isBasic}function o(e){return""===e?0:parseInt(e,2)}t.treePostProcessFromProofNode=function e(t,r,s="",a=0){if(0===a){const e=r.tree_fromProofNode(t);if(e.done)return e.node;t=e.node}const u=r.depth===a;if(t.isLeaf()){if(u){const e=r.getIndexProperty(o(s));if(null===e)return t;const n=r.getPropertyType(e);return 1===n.maxChunkCount&&i(n)?n.tree_fromProofNode(t).node:t}return t}if(u){const n=r.getIndexProperty(o(s));if(null===n)return t;const a=r.getPropertyType(n);if(!i(a))throw Error("BranchNode does not map to CompositeType");const u=a.tree_fromProofNode(t);return u.done?u.node:e(u.node,a)}{const i=e(t.left,r,s+"0",a+1),o=e(t.right,r,s+"1",a+1);return i===t.left&&o===t.right?t:new n.BranchNode(i,o)}}},9705:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Case=void 0,t.Case={snake:e=>e.replace(/[^0-z]/g,"").replace(/[a-z][A-Z]|[0-9][A-Z]/g,(e=>e[0]+"_"+e[1].toLowerCase())),constant:e=>e.replace(/[^0-z]/g,"").replace(/[a-z][A-Z]|[0-9][A-Z]/g,(e=>e[0]+"_"+e[1])).toUpperCase(),pascal:e=>(e[0].toUpperCase()+e.slice(1)).replace(/[^0-z]/g,""),camel:e=>e[0].toLowerCase()+e.slice(1),header:e=>e[0].toUpperCase()+e.slice(1).replace(/[^0-z]/g,"").replace(/[a-z][A-Z]|[0-9][A-Z]/g,(e=>e[0]+"-"+e[1])),eth2:e=>t.Case.snake(e).replace(/(\d)$/,"_$1")}},38:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.zeroHash=void 0;const n=r(9457),i=[new Uint8Array(32)];t.zeroHash=function(e){if(e>=i.length)for(let t=i.length;t<=e;t++)i[t]=n.hasher.digest64(i[t-1],i[t-1]);return i[e]}},1714:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getUint8ByteToBitBooleanArray=t.BitArray=void 0;const r=new Array(256);class n{constructor(e,t){if(this.uint8Array=e,this.bitLen=t,e.length!==Math.ceil(t/8))throw Error("BitArray uint8Array length does not match bitLen")}static fromBitLen(e){return new n(new Uint8Array(Math.ceil(e/8)),e)}static fromSingleBit(e,t){const r=n.fromBitLen(e);return r.set(t,!0),r}static fromBoolArray(e){const t=n.fromBitLen(e.length);for(let r=0;r<e.length;r++)!0===e[r]&&t.set(r,!0);return t}clone(){return new n(Uint8Array.prototype.slice.call(this.uint8Array,0),this.bitLen)}get(e){const t=Math.floor(e/8),r=1<<e%8;return(this.uint8Array[t]&r)===r}set(e,t){if(e>=this.bitLen)throw Error(`BitArray set bitIndex ${e} beyond bitLen ${this.bitLen}`);const r=Math.floor(e/8),n=1<<e%8;let i=this.uint8Array[r];t?(i|=n,this.uint8Array[r]=i):(i&n)===n&&(i^=n,this.uint8Array[r]=i)}mergeOrWith(e){if(e.bitLen!==this.bitLen)throw Error("Must merge BitArrays of same bitLen");for(let t=0;t<this.uint8Array.length;t++)this.uint8Array[t]=this.uint8Array[t]|e.uint8Array[t]}intersectValues(e){const t=[];if(e.length!==this.bitLen)throw Error(`Must not intersect values of length ${e.length} != bitLen ${this.bitLen}`);const r=Math.floor(this.bitLen/8),n=this.bitLen%8,o=this.uint8Array;for(let n=0;n<r;n++){const r=i(o[n]);for(let i=0;i<8;i++)r[i]&&t.push(e[8*n+i])}if(n>0){const s=i(o[r]);for(let i=0;i<n;i++)s[i]&&t.push(e[8*r+i])}return t}getTrueBitIndexes(){const e=[],t=this.uint8Array;for(let r=0,n=t.length;r<n;r++){const n=i(t[r]);for(let t=0;t<8;t++)n[t]&&e.push(8*r+t)}return e}getSingleTrueBit(){let e=null;const t=this.uint8Array;for(let r=0,n=t.length;r<n;r++){if(0===t[r])continue;const n=i(t[r]);for(let t=0;t<8;t++)if(!0===n[t]){if(null!==e)return null;e=8*r+t}}return null===e?null:e}toBoolArray(){const e=new Array(this.bitLen);for(let t=0;t<this.bitLen;t++)e[t]=this.get(t);return e}}function i(e){return r[e]||(r[e]=function(e){const t=e.toString(2),r=t.length,n=new Array(8);for(let e=0;e<8;e++)n[e]=e<r&&"1"===t[r-e-1];return n}(e)),r[e]}t.BitArray=n,t.getUint8ByteToBitBooleanArray=i},4984:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeView=void 0;const n=r(6567);t.TreeView=class{serialize(){const e=new Uint8Array(this.type.tree_serializedSize(this.node)),t=new DataView(e.buffer,e.byteOffset,e.byteLength);return this.type.tree_serializeToBytes({uint8Array:e,dataView:t},0,this.node),e}hashTreeRoot(){return this.node.root}createProof(e){return this.type.tree_createProof(this.node,e)}toValue(){return this.type.tree_toValue(this.node)}clone(){return this.type.getView(new n.Tree(this.node))}}},7733:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayBasicTreeView=void 0;const n=r(6567),i=r(4984);class o extends i.TreeView{constructor(e,t){super(),this.type=e,this.tree=t}get length(){return this.type.tree_getLength(this.tree.rootNode)}get node(){return this.tree.rootNode}get(e){const t=Math.floor(e/this.type.itemsPerChunk),r=this.tree.getNodeAtDepth(this.type.depth,t);return this.type.elementType.tree_getFromPackedNode(r,e)}set(e,t){const r=this.length;if(e>=r)throw Error(`Error setting index over length ${e} > ${r}`);const n=Math.floor(e/this.type.itemsPerChunk),i=this.tree.getNodeAtDepth(this.type.depth,n).clone();this.type.elementType.tree_setToPackedNode(i,e,t),this.tree.setNodeAtDepth(this.type.depth,n,i)}getAll(){const e=this.length,t=this.type.tree_getChunksNode(this.node),r=Math.ceil(e/this.type.itemsPerChunk),i=n.getNodesAtDepth(t,this.type.chunkDepth,0,r),o=new Array(e),s=this.type.itemsPerChunk,a=Math.floor(e/s),u=e%s;for(let e=0;e<a;e++){const t=i[e];for(let r=0;r<s;r++)o[e*s+r]=this.type.elementType.tree_getFromPackedNode(t,r)}if(u>0){const e=i[a];for(let t=0;t<u;t++)o[a*s+t]=this.type.elementType.tree_getFromPackedNode(e,t)}return o}}t.ArrayBasicTreeView=o},6330:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayCompositeTreeView=void 0;const n=r(6567),i=r(4984);class o extends i.TreeView{constructor(e,t){super(),this.type=e,this.tree=t}get length(){return this.type.tree_getLength(this.tree.rootNode)}get node(){return this.tree.rootNode}get(e){const t=n.toGindexBitstring(this.type.depth,e),r=this.tree.getSubtree(t);return this.type.elementType.getView(r)}getReadonly(e){const t=n.toGindexBitstring(this.type.depth,e),r=new n.Tree(this.tree.getNode(t));return this.type.elementType.getView(r)}set(e,t){const r=this.length;if(e>=r)throw Error(`Error setting index over length ${e} > ${r}`);const n=this.type.elementType.commitView(t);this.tree.setNodeAtDepth(this.type.depth,e,n)}getAllReadonly(){const e=this.length,t=this.type.tree_getChunksNode(this.node),r=n.getNodesAtDepth(t,this.type.chunkDepth,0,e),i=new Array(e);for(let t=0;t<e;t++)i[t]=this.type.elementType.getView(new n.Tree(r[t]));return i}getAllReadonlyValues(){const e=this.length,t=this.type.tree_getChunksNode(this.node),r=n.getNodesAtDepth(t,this.type.chunkDepth,0,e),i=new Array(e);for(let t=0;t<e;t++)i[t]=this.type.elementType.tree_toValue(r[t]);return i}}t.ArrayCompositeTreeView=o},6572:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BitArrayTreeView=void 0;const n=r(4984);class i extends n.TreeView{constructor(e,t){super(),this.type=e,this.tree=t,this.bitArray=e.tree_toValue(t.rootNode)}get node(){return this.tree.rootNode}get uint8Array(){return this.bitArray.uint8Array}get bitLen(){return this.bitArray.bitLen}get(e){return this.bitArray.get(e)}set(e,t){this.bitArray.set(e,t),this.tree.rootNode=this.type.value_toTree(this.bitArray)}mergeOrWith(e){this.bitArray.mergeOrWith(e)}intersectValues(e){return this.bitArray.intersectValues(e)}getTrueBitIndexes(){return this.bitArray.getTrueBitIndexes()}getSingleTrueBit(){return this.bitArray.getSingleTrueBit()}toBoolArray(){return this.bitArray.toBoolArray()}}t.BitArrayTreeView=i},7685:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getContainerTreeViewClass=void 0;const n=r(6567),i=r(645),o=r(8715),s=r(4984);class a extends s.TreeView{constructor(e,t){super(),this.type=e,this.tree=t}get node(){return this.tree.rootNode}}t.getContainerTreeViewClass=function(e){class t extends a{}for(let r=0;r<e.fieldsEntries.length;r++){const{fieldName:s,fieldType:a}=e.fieldsEntries[r];if(i.isBasicType(a))Object.defineProperty(t.prototype,s,{configurable:!1,enumerable:!0,get:function(){const e=n.getNodeAtDepth(this.node,this.type.depth,r);return a.tree_getFromNode(e)},set:function(e){const t=n.getNodeAtDepth(this.node,this.type.depth,r).clone();a.tree_setToNode(t,e),this.tree.setNodeAtDepth(this.type.depth,r,t)}});else{if(!o.isCompositeType(a))throw Error(`Unknown fieldType ${a.typeName} for fieldName ${s}`);Object.defineProperty(t.prototype,s,{configurable:!1,enumerable:!0,get:function(){const e=n.toGindexBitstring(this.type.depth,r);return a.getView(this.tree.getSubtree(e))},set:function(e){const t=a.commitView(e);this.tree.setNodeAtDepth(this.type.depth,r,t)}})}}return Object.defineProperty(t,"name",{value:e.typeName,writable:!1}),t}},1225:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getContainerTreeViewClass=void 0;const n=r(8715),i=r(8747),o=r(4984);class s extends o.TreeView{constructor(e,t){super(),this.type=e,this.tree=t}get node(){return this.tree.rootNode}}t.getContainerTreeViewClass=function(e){class t extends s{}for(let r=0;r<e.fieldsEntries.length;r++){const{fieldName:o,fieldType:s}=e.fieldsEntries[r];if(s.isBasic)Object.defineProperty(t.prototype,o,{configurable:!1,enumerable:!0,get:function(){return this.tree.rootNode.value[o]},set:function(e){const t=this.tree.rootNode,r=this.type.clone(t.value);r[o]=e,this.tree.rootNode=new i.BranchNodeStruct(t.valueToNode,r)}});else{if(!n.isCompositeType(s))throw Error(`Unknown fieldType ${s.typeName} for fieldName ${o}`);Object.defineProperty(t.prototype,o,{configurable:!1,enumerable:!0,get:function(){const{value:e}=this.tree.rootNode;return s.toView(e[o])},set:function(e){const t=this.tree.rootNode,r=this.type.clone(t.value);r[o]=s.toValueFromView(e),this.tree.rootNode=new i.BranchNodeStruct(t.valueToNode,r)}})}}return Object.defineProperty(t,"name",{value:e.typeName,writable:!1}),t}},9291:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ListBasicTreeView=void 0;const n=r(6567),i=r(7733);class o extends i.ArrayBasicTreeView{constructor(e,t){super(e,t),this.type=e,this.tree=t}push(e){const t=this.length;if(t>=this.type.limit)throw Error("Error pushing over limit");if(this.type.tree_setLength(this.tree,t+1),t%this.type.itemsPerChunk==0){const r=n.LeafNode.fromZero();this.type.elementType.tree_setToPackedNode(r,t,e);const i=Math.floor(t/this.type.itemsPerChunk);this.tree.setNodeAtDepth(this.type.depth,i,r)}else this.set(t,e)}}t.ListBasicTreeView=o},1783:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ListCompositeTreeView=void 0;const n=r(6330);class i extends n.ArrayCompositeTreeView{constructor(e,t){super(e,t),this.type=e,this.tree=t}push(e){const t=this.length;if(t>=this.type.limit)throw Error("Error pushing over limit");this.type.tree_setLength(this.tree,t+1),this.set(t,e)}}t.ListCompositeTreeView=i},332:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeViewDU=void 0;const n=r(4984);class i extends n.TreeView{hashTreeRoot(){return this.commit(),super.hashTreeRoot()}serialize(){return this.commit(),super.serialize()}clone(e){if(e)return this.type.getViewDU(this.node);{const e=this.cache;return this.clearCache(),this.type.getViewDU(this.node,e)}}}t.TreeViewDU=i},3341:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayBasicTreeViewDU=void 0;const n=r(6567),i=r(332);class o extends i.TreeViewDU{constructor(e,t,r){super(),this.type=e,this._rootNode=t,this.nodesChanged=new Set,this.dirtyLength=!1,r?(this.nodes=r.nodes,this._length=r.length,this.nodesPopulated=r.nodesPopulated):(this.nodes=[],this._length=this.type.tree_getLength(t),this.nodesPopulated=!1)}get length(){return this._length}get node(){return this._rootNode}get cache(){return{nodes:this.nodes,length:this._length,nodesPopulated:this.nodesPopulated}}get(e){const t=Math.floor(e/this.type.itemsPerChunk);let r=this.nodes[t];return void 0===r&&(r=n.getNodeAtDepth(this._rootNode,this.type.depth,t),this.nodes[t]=r),this.type.elementType.tree_getFromPackedNode(r,e)}set(e,t){if(e>=this._length)throw Error(`Error setting index over length ${e} > ${this._length}`);const r=Math.floor(e/this.type.itemsPerChunk);let i;this.nodesChanged.has(r)?i=this.nodes[r]:(i=(this.nodes[r]??n.getNodeAtDepth(this._rootNode,this.type.depth,r)).clone(),this.nodes[r]=i,this.nodesChanged.add(r)),this.type.elementType.tree_setToPackedNode(i,e,t)}getAll(){if(!this.nodesPopulated){const e=this.nodes,t=this.type.tree_getChunksNode(this.node),r=Math.ceil(this._length/this.type.itemsPerChunk);this.nodes=n.getNodesAtDepth(t,this.type.chunkDepth,0,r);for(const t of this.nodesChanged)this.nodes[t]=e[t];this.nodesPopulated=!0}const e=new Array(this._length),t=this.type.itemsPerChunk,r=Math.floor(this._length/t),i=this._length%t;for(let n=0;n<r;n++){const r=this.nodes[n];for(let i=0;i<t;i++)e[n*t+i]=this.type.elementType.tree_getFromPackedNode(r,i)}if(i>0){const n=this.nodes[r];for(let o=0;o<i;o++)e[r*t+o]=this.type.elementType.tree_getFromPackedNode(n,o)}return e}commit(){if(0===this.nodesChanged.size)return;const e=Array.from(this.nodesChanged.keys()).sort(((e,t)=>e-t)),t=new Array(e.length);for(let r=0;r<e.length;r++)t[r]=this.nodes[e[r]];const r=this.type.tree_getChunksNode(this._rootNode),i=n.setNodesAtDepth(r,this.type.chunkDepth,e,t);this._rootNode=this.type.tree_setChunksNode(this._rootNode,i,this.dirtyLength?this._length:void 0),this.nodesChanged.clear(),this.dirtyLength=!1}clearCache(){this.nodes=[],this.nodesPopulated=!1,this.nodesChanged.clear(),this.dirtyLength&&(this._length=this.type.tree_getLength(this._rootNode),this.dirtyLength=!1)}}t.ArrayBasicTreeViewDU=o},2309:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayCompositeTreeViewDU=void 0;const n=r(6567),i=r(332);class o extends i.TreeViewDU{constructor(e,t,r){super(),this.type=e,this._rootNode=t,this.viewsChanged=new Map,this.dirtyLength=!1,r?(this.nodes=r.nodes,this.caches=r.caches,this._length=r.length,this.nodesPopulated=r.nodesPopulated):(this.nodes=[],this.caches=[],this._length=this.type.tree_getLength(t),this.nodesPopulated=0===this._length)}get length(){return this._length}get node(){return this._rootNode}get cache(){return{nodes:this.nodes,caches:this.caches,length:this._length,nodesPopulated:this.nodesPopulated}}get(e){const t=this.viewsChanged.get(e);if(t)return t;let r=this.nodes[e];void 0===r&&(r=n.getNodeAtDepth(this._rootNode,this.type.depth,e),this.nodes[e]=r);const i=this.type.elementType.getViewDU(r,this.caches[e]);return this.type.elementType.isViewMutable&&this.viewsChanged.set(e,i),i}getReadonly(e){const t=this.viewsChanged.get(e);if(t)return t;let r=this.nodes[e];return void 0===r&&(r=n.getNodeAtDepth(this._rootNode,this.type.depth,e),this.nodes[e]=r),this.type.elementType.getViewDU(r,this.caches[e])}set(e,t){if(e>=this._length)throw Error(`Error setting index over length ${e} > ${this._length}`);this.viewsChanged.set(e,t)}getAllReadonly(){this.populateAllNodes();const e=new Array(this._length);for(let t=0;t<this._length;t++)e[t]=this.type.elementType.getViewDU(this.nodes[t],this.caches[t]);return e}getAllReadonlyValues(){this.populateAllNodes();const e=new Array(this._length);for(let t=0;t<this._length;t++)e[t]=this.type.elementType.tree_toValue(this.nodes[t]);return e}commit(){if(0===this.viewsChanged.size)return;const e=[];for(const[t,r]of this.viewsChanged){const n=this.type.elementType.commitViewDU(r);this.nodes[t]=n,e.push({index:t,node:n});const i=this.type.elementType.cacheOfViewDU(r);i&&(this.caches[t]=i)}const t=e.sort(((e,t)=>e.index-t.index)),r=t.map((e=>e.index)),i=t.map((e=>e.node)),o=this.type.tree_getChunksNode(this._rootNode),s=n.setNodesAtDepth(o,this.type.chunkDepth,r,i);this._rootNode=this.type.tree_setChunksNode(this._rootNode,s,this.dirtyLength?this._length:void 0),this.viewsChanged.clear(),this.dirtyLength=!1}clearCache(){this.nodes=[],this.caches=[],this.nodesPopulated=!1,this.viewsChanged.clear(),this.dirtyLength&&(this._length=this.type.tree_getLength(this._rootNode),this.dirtyLength=!1)}populateAllNodes(){if(this.viewsChanged.size>0)throw Error("Must commit changes before reading all nodes");this.nodesPopulated||(this.nodes=n.getNodesAtDepth(this._rootNode,this.type.depth,0,this.length),this.nodesPopulated=!0)}}t.ArrayCompositeTreeViewDU=o},7844:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BitArrayTreeViewDU=void 0;const n=r(332);class i extends n.TreeViewDU{constructor(e,t){super(),this.type=e,this._rootNode=t,this._bitArray=null}get node(){return this._rootNode}get cache(){}commit(){null!==this._bitArray&&(this._rootNode=this.type.value_toTree(this._bitArray))}get uint8Array(){return this.bitArray.uint8Array}get bitLen(){return this.bitArray.bitLen}get(e){return this.bitArray.get(e)}set(e,t){this.bitArray.set(e,t)}mergeOrWith(e){this.bitArray.mergeOrWith(e)}intersectValues(e){return this.bitArray.intersectValues(e)}getTrueBitIndexes(){return this.bitArray.getTrueBitIndexes()}getSingleTrueBit(){return this.bitArray.getSingleTrueBit()}toBoolArray(){return this.bitArray.toBoolArray()}get bitArray(){return null===this._bitArray&&(this._bitArray=this.type.tree_toValue(this._rootNode)),this._bitArray}clearCache(){this._bitArray=null}}t.BitArrayTreeViewDU=i},8865:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getContainerTreeViewDUClass=void 0;const n=r(6567),i=r(645),o=r(8715),s=r(332);class a extends s.TreeViewDU{constructor(e,t,r){super(),this.type=e,this._rootNode=t,this.nodes=[],this.nodesChanged=new Set,this.viewsChanged=new Map,r?(this.nodes=r.nodes,this.caches=r.caches,this.nodesPopulated=r.nodesPopulated):(this.nodes=[],this.caches=[],this.nodesPopulated=!1)}get node(){return this._rootNode}get cache(){return{nodes:this.nodes,caches:this.caches,nodesPopulated:this.nodesPopulated}}commit(){if(0===this.nodesChanged.size&&0===this.viewsChanged.size)return;const e=[];for(const[t,r]of this.viewsChanged){const n=this.type.fieldsEntries[t].fieldType,i=n.commitViewDU(r);this.nodes[t]=i,e.push({index:t,node:i});const o=n.cacheOfViewDU(r);o&&(this.caches[t]=o)}for(const t of this.nodesChanged)e.push({index:t,node:this.nodes[t]});const t=e.sort(((e,t)=>e.index-t.index)),r=t.map((e=>e.index)),i=t.map((e=>e.node));this._rootNode=n.setNodesAtDepth(this._rootNode,this.type.depth,r,i),this.nodesChanged.clear(),this.viewsChanged.clear()}clearCache(){this.nodes=[],this.caches=[],this.nodesPopulated=!1,this.nodesChanged.clear(),this.viewsChanged.clear()}}t.getContainerTreeViewDUClass=function(e){class t extends a{}for(let r=0;r<e.fieldsEntries.length;r++){const{fieldName:s,fieldType:a}=e.fieldsEntries[r];if(i.isBasicType(a))Object.defineProperty(t.prototype,s,{configurable:!1,enumerable:!0,get:function(){let e=this.nodes[r];return void 0===e&&(e=n.getNodeAtDepth(this._rootNode,this.type.depth,r),this.nodes[r]=e),a.tree_getFromNode(e)},set:function(e){let t;this.nodesChanged.has(r)?t=this.nodes[r]:(t=(this.nodes[r]??n.getNodeAtDepth(this._rootNode,this.type.depth,r)).clone(),this.nodes[r]=t,this.nodesChanged.add(r)),a.tree_setToNode(t,e)}});else{if(!o.isCompositeType(a))throw Error(`Unknown fieldType ${a.typeName} for fieldName ${s}`);Object.defineProperty(t.prototype,s,{configurable:!1,enumerable:!0,get:function(){const e=this.viewsChanged.get(r);if(e)return e;let t=this.nodes[r];void 0===t&&(t=n.getNodeAtDepth(this._rootNode,this.type.depth,r),this.nodes[r]=t);const i=a.getViewDU(t,this.caches[r]);return a.isViewMutable&&this.viewsChanged.set(r,i),i},set:function(e){this.viewsChanged.set(r,e)}})}}return Object.defineProperty(t,"name",{value:e.typeName,writable:!1}),t}},4320:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getContainerTreeViewDUClass=void 0;const n=r(8715),i=r(332);class o extends i.TreeViewDU{constructor(e,t){super(),this.type=e,this.valueChanged=null,this._rootNode=t}get node(){return this._rootNode}get cache(){}commit(){if(null===this.valueChanged)return;const e=this.valueChanged;this.valueChanged=null,this._rootNode=this.type.value_toTree(e)}clearCache(){this.valueChanged=null}}t.getContainerTreeViewDUClass=function(e){class t extends o{}for(let r=0;r<e.fieldsEntries.length;r++){const{fieldName:i,fieldType:o}=e.fieldsEntries[r];if(o.isBasic)Object.defineProperty(t.prototype,i,{configurable:!1,enumerable:!0,get:function(){return(this.valueChanged||this._rootNode.value)[i]},set:function(e){null===this.valueChanged&&(this.valueChanged=this.type.clone(this._rootNode.value)),this.valueChanged[i]=e}});else{if(!n.isCompositeType(o))throw Error(`Unknown fieldType ${o.typeName} for fieldName ${i}`);Object.defineProperty(t.prototype,i,{configurable:!1,enumerable:!0,get:function(){const e=this.valueChanged||this._rootNode.value;return o.toViewDU(e[i])},set:function(e){null===this.valueChanged&&(this.valueChanged=this.type.clone(this._rootNode.value));const t=o.toValueFromViewDU(e);this.valueChanged[i]=t}})}}return Object.defineProperty(t,"name",{value:e.typeName,writable:!1}),t}},1828:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ListBasicTreeViewDU=void 0;const n=r(6567),i=r(3341);class o extends i.ArrayBasicTreeViewDU{constructor(e,t,r){super(e,t,r),this.type=e,this._rootNode=t}push(e){if(this._length>=this.type.limit)throw Error("Error pushing over limit");this.dirtyLength=!0;const t=this._length++;if(t%this.type.itemsPerChunk==0){const e=Math.floor(t/this.type.itemsPerChunk);this.nodes[e]=n.zeroNode(0)}this.set(t,e)}}t.ListBasicTreeViewDU=o},2029:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ListCompositeTreeViewDU=void 0;const n=r(6567),i=r(2309);class o extends i.ArrayCompositeTreeViewDU{constructor(e,t,r){super(e,t,r),this.type=e,this._rootNode=t}push(e){if(this._length>=this.type.limit)throw Error("Error pushing over limit");this.dirtyLength=!0;const t=this._length++;this.set(t,e)}sliceTo(e){this.commit();const t=this._rootNode;if(e>=this.type.tree_getLength(t)-1)return this;const r=this.type.tree_getChunksNode(t),i=n.treeZeroAfterIndex(r,this.type.chunkDepth,e),o=e+1,s=this.type.tree_setChunksNode(t,i,o);return this.type.getViewDU(s)}}t.ListCompositeTreeViewDU=o},7256:(e,t)=>{"use strict";function r(e){if(Array.isArray(e)){const t=[];let n=0;for(let i=0;i<e.length;i++){const o=r(e[i]);t.push(o),n+=o.length}return h(o(n,192),...t)}const t=g(e);return 1===t.length&&t[0]<128?t:h(o(t.length,128),t)}function n(e,t,r){if(r>e.length)throw new Error("invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds");return e.slice(t,r)}function i(e){if(0===e[0])throw new Error("invalid RLP: extra zeros");return l(c(e))}function o(e,t){if(e<56)return Uint8Array.from([e+t]);const r=p(e),n=p(t+55+r.length/2);return Uint8Array.from(f(n+r))}function s(e,t=!1){if(null==e||0===e.length)return Uint8Array.from([]);const r=a(g(e));if(t)return r;if(0!==r.remainder.length)throw new Error("invalid RLP: remainder must be zero");return r.data}function a(e){let t,r,o,s,u;const c=[],l=e[0];if(l<=127)return{data:e.slice(0,1),remainder:e.slice(1)};if(l<=183){if(t=l-127,o=128===l?Uint8Array.from([]):n(e,1,t),2===t&&o[0]<128)throw new Error("invalid RLP encoding: invalid prefix, single byte < 0x80 are not prefixed");return{data:o,remainder:e.slice(t)}}if(l<=191){if(r=l-182,e.length-1<r)throw new Error("invalid RLP: not enough bytes for string length");if(t=i(n(e,1,r)),t<=55)throw new Error("invalid RLP: expected string length to be greater than 55");return o=n(e,r,t+r),{data:o,remainder:e.slice(t+r)}}if(l<=247){for(t=l-191,s=n(e,1,t);s.length;)u=a(s),c.push(u.data),s=u.remainder;return{data:c,remainder:e.slice(t)}}{if(r=l-246,t=i(n(e,1,r)),t<56)throw new Error("invalid RLP: encoded list too short");const o=r+t;if(o>e.length)throw new Error("invalid RLP: total length is larger than the data");for(s=n(e,r,o);s.length;)u=a(s),c.push(u.data),s=u.remainder;return{data:c,remainder:e.slice(o)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.RLP=t.utils=t.decode=t.encode=void 0,t.encode=r,t.decode=s;const u=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function c(e){let t="";for(let r=0;r<e.length;r++)t+=u[e[r]];return t}function l(e){const t=Number.parseInt(e,16);if(Number.isNaN(t))throw new Error("Invalid byte sequence");return t}function f(e){if("string"!=typeof e)throw new TypeError("hexToBytes: expected string, got "+typeof e);if(e.length%2)throw new Error("hexToBytes: received invalid unpadded hex");const t=new Uint8Array(e.length/2);for(let r=0;r<t.length;r++){const n=2*r;t[r]=l(e.slice(n,n+2))}return t}function h(...e){if(1===e.length)return e[0];const t=e.reduce(((e,t)=>e+t.length),0),r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){const i=e[t];r.set(i,n),n+=i.length}return r}function d(e){return(new TextEncoder).encode(e)}function p(e){if(e<0)throw new Error("Invalid integer as argument, must be unsigned!");const t=e.toString(16);return t.length%2?`0${t}`:t}function y(e){return e.length>=2&&"0"===e[0]&&"x"===e[1]}function g(e){if(e instanceof Uint8Array)return e;if("string"==typeof e)return y(e)?f((t="string"!=typeof(r=e)?r:y(r)?r.slice(2):r).length%2?`0${t}`:t):d(e);var t,r;if("number"==typeof e||"bigint"==typeof e)return e?f(p(e)):Uint8Array.from([]);if(null==e)return Uint8Array.from([]);throw new Error("toBytes: received unsupported type "+typeof e)}t.utils={bytesToHex:c,concatBytes:h,hexToBytes:f,utf8ToBytes:d},t.RLP={encode:r,decode:s}},4706:(e,t,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.accountBodyToRLP=t.accountBodyToSlim=t.accountBodyFromSlim=t.isZeroAddress=t.zeroAddress=t.importPublic=t.privateToAddress=t.privateToPublic=t.publicToAddress=t.pubToAddress=t.isValidPublic=t.isValidPrivate=t.generateAddress2=t.generateAddress=t.isValidChecksumAddress=t.toChecksumAddress=t.isValidAddress=t.Account=void 0;const i=r(7256),o=r(1115),s=r(101),a=r(144),u=r(4916),c=r(8127),l=r(8707),f=r(4243),h=BigInt(0);class d{constructor(e=h,t=h,r=c.KECCAK256_RLP,n=c.KECCAK256_NULL){this.nonce=e,this.balance=t,this.storageRoot=r,this.codeHash=n,this._validate()}static fromAccountData(e){const{nonce:t,balance:r,storageRoot:n,codeHash:i}=e;return new d(void 0!==t?(0,u.bufferToBigInt)((0,u.toBuffer)(t)):void 0,void 0!==r?(0,u.bufferToBigInt)((0,u.toBuffer)(r)):void 0,void 0!==n?(0,u.toBuffer)(n):void 0,void 0!==i?(0,u.toBuffer)(i):void 0)}static fromRlpSerializedAccount(e){const t=(0,u.arrToBufArr)(i.RLP.decode(Uint8Array.from(e)));if(!Array.isArray(t))throw new Error("Invalid serialized account input. Must be array");return this.fromValuesArray(t)}static fromValuesArray(e){const[t,r,n,i]=e;return new d((0,u.bufferToBigInt)(t),(0,u.bufferToBigInt)(r),n,i)}_validate(){if(this.nonce<h)throw new Error("nonce must be greater than zero");if(this.balance<h)throw new Error("balance must be greater than zero");if(32!==this.storageRoot.length)throw new Error("storageRoot must have a length of 32");if(32!==this.codeHash.length)throw new Error("codeHash must have a length of 32")}raw(){return[(0,u.bigIntToUnpaddedBuffer)(this.nonce),(0,u.bigIntToUnpaddedBuffer)(this.balance),this.storageRoot,this.codeHash]}serialize(){return n.from(i.RLP.encode((0,u.bufArrToArr)(this.raw())))}isContract(){return!this.codeHash.equals(c.KECCAK256_NULL)}isEmpty(){return this.balance===h&&this.nonce===h&&this.codeHash.equals(c.KECCAK256_NULL)}}function p(e){const[t,r,n,i]=e;return[t,r,0===(0,u.arrToBufArr)(n).length?c.KECCAK256_RLP:n,0===(0,u.arrToBufArr)(i).length?c.KECCAK256_NULL:i]}t.Account=d,t.isValidAddress=function(e){try{(0,l.assertIsString)(e)}catch(e){return!1}return/^0x[0-9a-fA-F]{40}$/.test(e)},t.toChecksumAddress=function(e,t){(0,l.assertIsHexString)(e);const r=(0,f.stripHexPrefix)(e).toLowerCase();let i="";void 0!==t&&(i=(0,u.bufferToBigInt)((0,u.toBuffer)(t)).toString()+"0x");const s=n.from(i+r,"utf8"),c=(0,a.bytesToHex)((0,o.keccak256)(s));let h="0x";for(let e=0;e<r.length;e++)parseInt(c[e],16)>=8?h+=r[e].toUpperCase():h+=r[e];return h},t.isValidChecksumAddress=function(e,r){return(0,t.isValidAddress)(e)&&(0,t.toChecksumAddress)(e,r)===e},t.generateAddress=function(e,t){return(0,l.assertIsBuffer)(e),(0,l.assertIsBuffer)(t),(0,u.bufferToBigInt)(t)===BigInt(0)?n.from((0,o.keccak256)(i.RLP.encode((0,u.bufArrToArr)([e,null])))).slice(-20):n.from((0,o.keccak256)(i.RLP.encode((0,u.bufArrToArr)([e,t])))).slice(-20)},t.generateAddress2=function(e,t,r){if((0,l.assertIsBuffer)(e),(0,l.assertIsBuffer)(t),(0,l.assertIsBuffer)(r),20!==e.length)throw new Error("Expected from to be of length 20");if(32!==t.length)throw new Error("Expected salt to be of length 32");const i=(0,o.keccak256)(n.concat([n.from("ff","hex"),e,t,(0,o.keccak256)(r)]));return(0,u.toBuffer)(i).slice(-20)},t.isValidPrivate=function(e){return s.secp256k1.utils.isValidPrivateKey(e)},t.isValidPublic=function(e,t=!1){if((0,l.assertIsBuffer)(e),64===e.length)try{return s.secp256k1.ProjectivePoint.fromHex(n.concat([n.from([4]),e])),!0}catch(e){return!1}if(!t)return!1;try{return s.secp256k1.ProjectivePoint.fromHex(e),!0}catch(e){return!1}},t.pubToAddress=function(e,t=!1){if((0,l.assertIsBuffer)(e),t&&64!==e.length&&(e=n.from(s.secp256k1.ProjectivePoint.fromHex(e).toRawBytes(!1).slice(1))),64!==e.length)throw new Error("Expected pubKey to be of length 64");return n.from((0,o.keccak256)(e)).slice(-20)},t.publicToAddress=t.pubToAddress,t.privateToPublic=function(e){return(0,l.assertIsBuffer)(e),n.from(s.secp256k1.ProjectivePoint.fromPrivateKey(e).toRawBytes(!1).slice(1))},t.privateToAddress=function(e){return(0,t.publicToAddress)((0,t.privateToPublic)(e))},t.importPublic=function(e){return(0,l.assertIsBuffer)(e),64!==e.length&&(e=n.from(s.secp256k1.ProjectivePoint.fromHex(e).toRawBytes(!1).slice(1))),e},t.zeroAddress=function(){const e=(0,u.zeros)(20);return(0,u.bufferToHex)(e)},t.isZeroAddress=function(e){try{(0,l.assertIsString)(e)}catch(e){return!1}return(0,t.zeroAddress)()===e},t.accountBodyFromSlim=p;const y=new Uint8Array(0);t.accountBodyToSlim=function(e){const[t,r,n,i]=e;return[t,r,(0,u.arrToBufArr)(n).equals(c.KECCAK256_RLP)?y:n,(0,u.arrToBufArr)(i).equals(c.KECCAK256_NULL)?y:i]},t.accountBodyToRLP=function(e,t=!0){const r=t?p(e):e;return(0,u.arrToBufArr)(i.RLP.encode(r))}},8515:(e,t,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.Address=void 0;const i=r(4706),o=r(4916);class s{constructor(e){if(20!==e.length)throw new Error("Invalid address length");this.buf=e}static zero(){return new s((0,o.zeros)(20))}static fromString(e){if(!(0,i.isValidAddress)(e))throw new Error("Invalid address");return new s((0,o.toBuffer)(e))}static fromPublicKey(e){if(!n.isBuffer(e))throw new Error("Public key should be Buffer");const t=(0,i.pubToAddress)(e);return new s(t)}static fromPrivateKey(e){if(!n.isBuffer(e))throw new Error("Private key should be Buffer");const t=(0,i.privateToAddress)(e);return new s(t)}static generate(e,t){if("bigint"!=typeof t)throw new Error("Expected nonce to be a bigint");return new s((0,i.generateAddress)(e.buf,(0,o.bigIntToBuffer)(t)))}static generate2(e,t,r){if(!n.isBuffer(t))throw new Error("Expected salt to be a Buffer");if(!n.isBuffer(r))throw new Error("Expected initCode to be a Buffer");return new s((0,i.generateAddress2)(e.buf,t,r))}equals(e){return this.buf.equals(e.buf)}isZero(){return this.equals(s.zero())}isPrecompileOrSystemAddress(){const e=(0,o.bufferToBigInt)(this.buf),t=BigInt(0),r=BigInt("0xffff");return e>=t&&e<=r}toString(){return"0x"+this.buf.toString("hex")}toBuffer(){return n.from(this.buf)}}t.Address=s},8263:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncEventEmitter=void 0;const n=r(2699);class i extends n.EventEmitter{emit(e,...t){let[r,n]=t;const i=this;let o=i._events[e]??[];return void 0===n&&"function"==typeof r&&(n=r,r=void 0),"newListener"!==e&&"removeListener"!==e||(r={event:r,fn:n},n=void 0),o=Array.isArray(o)?o:[o],async function(e,t,r){let n;for await(const i of t)try{i.length<2?i.call(e,r):await new Promise(((t,n)=>{i.call(e,r,(e=>{e?n(e):t()}))}))}catch(e){n=e}if(n)throw n}(i,o.slice(),r).then(n).catch(n),i.listenerCount(e)>0}once(e,t){const r=this;let n;if("function"!=typeof t)throw new TypeError("listener must be a function");return n=t.length>=2?function(i,o){r.removeListener(e,n),t(i,o)}:function(i){r.removeListener(e,n),t(i,n)},r.on(e,n),r}first(e,t){let r=this._events[e]??[];if("function"!=typeof t)throw new TypeError("listener must be a function");return Array.isArray(r)||(this._events[e]=r=[r]),r.unshift(t),this}before(e,t,r){return this.beforeOrAfter(e,t,r)}after(e,t,r){return this.beforeOrAfter(e,t,r,"after")}beforeOrAfter(e,t,r,n){let i,o,s=this._events[e]??[];const a="after"===n?1:0;if("function"!=typeof r)throw new TypeError("listener must be a function");if("function"!=typeof t)throw new TypeError("target must be a function");for(Array.isArray(s)||(this._events[e]=s=[s]),o=s.length,i=s.length;i--;)if(s[i]===t){o=i+a;break}return s.splice(o,0,r),this}on(e,t){return super.on(e,t)}addListener(e,t){return super.addListener(e,t)}prependListener(e,t){return super.prependListener(e,t)}prependOnceListener(e,t){return super.prependOnceListener(e,t)}removeAllListeners(e){return super.removeAllListeners(e)}removeListener(e,t){return super.removeListener(e,t)}eventNames(){return super.eventNames()}listeners(e){return super.listeners(e)}listenerCount(e){return super.listenerCount(e)}getMaxListeners(){return super.getMaxListeners()}setMaxListeners(e){return super.setMaxListeners(e)}}t.AsyncEventEmitter=i},4916:(e,t,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.intToUnpaddedBuffer=t.bigIntToUnpaddedBuffer=t.bigIntToHex=t.bufArrToArr=t.arrToBufArr=t.validateNoLeadingZeroes=t.baToJSON=t.toUtf8=t.short=t.addHexPrefix=t.toUnsigned=t.fromSigned=t.bufferToInt=t.bigIntToBuffer=t.bufferToBigInt=t.bufferToHex=t.toBuffer=t.unpadHexString=t.unpadArray=t.unpadBuffer=t.setLengthRight=t.setLengthLeft=t.zeros=t.intToBuffer=t.intToHex=void 0;const i=r(8707),o=r(4243);t.intToHex=function(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Received an invalid integer type: ${e}`);return`0x${e.toString(16)}`},t.intToBuffer=function(e){const r=(0,t.intToHex)(e);return n.from((0,o.padToEven)(r.slice(2)),"hex")},t.zeros=function(e){return n.allocUnsafe(e).fill(0)};const s=function(e,r,n){const i=(0,t.zeros)(r);return n?e.length<r?(e.copy(i),i):e.slice(0,r):e.length<r?(e.copy(i,r-e.length),i):e.slice(-r)};t.setLengthLeft=function(e,t){return(0,i.assertIsBuffer)(e),s(e,t,!1)},t.setLengthRight=function(e,t){return(0,i.assertIsBuffer)(e),s(e,t,!0)};const a=function(e){let t=e[0];for(;e.length>0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e};function u(e){const r=(0,t.bufferToHex)(e);return"0x"===r?BigInt(0):BigInt(r)}function c(e){return(0,t.toBuffer)("0x"+e.toString(16))}t.unpadBuffer=function(e){return(0,i.assertIsBuffer)(e),a(e)},t.unpadArray=function(e){return(0,i.assertIsArray)(e),a(e)},t.unpadHexString=function(e){return(0,i.assertIsHexString)(e),e=(0,o.stripHexPrefix)(e),"0x"+a(e)},t.toBuffer=function(e){if(null==e)return n.allocUnsafe(0);if(n.isBuffer(e))return n.from(e);if(Array.isArray(e)||e instanceof Uint8Array)return n.from(e);if("string"==typeof e){if(!(0,o.isHexString)(e))throw new Error(`Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ${e}`);return n.from((0,o.padToEven)((0,o.stripHexPrefix)(e)),"hex")}if("number"==typeof e)return(0,t.intToBuffer)(e);if("bigint"==typeof e){if(e<BigInt(0))throw new Error(`Cannot convert negative bigint to buffer. Given: ${e}`);let t=e.toString(16);return t.length%2&&(t="0"+t),n.from(t,"hex")}if(e.toArray)return n.from(e.toArray());if(e.toBuffer)return n.from(e.toBuffer());throw new Error("invalid type")},t.bufferToHex=function(e){return"0x"+(e=(0,t.toBuffer)(e)).toString("hex")},t.bufferToBigInt=u,t.bigIntToBuffer=c,t.bufferToInt=function(e){const t=Number(u(e));if(!Number.isSafeInteger(t))throw new Error("Number exceeds 53 bits");return t},t.fromSigned=function(e){return BigInt.asIntN(256,u(e))},t.toUnsigned=function(e){return c(BigInt.asUintN(256,e))},t.addHexPrefix=function(e){return"string"!=typeof e||(0,o.isHexPrefixed)(e)?e:"0x"+e},t.short=function(e,t=50){const r=n.isBuffer(e)?e.toString("hex"):e;return r.length<=t?r:r.slice(0,t)+"…"},t.toUtf8=function(e){if((e=(0,o.stripHexPrefix)(e)).length%2!=0)throw new Error("Invalid non-even hex string input for toUtf8() provided");return n.from(e.replace(/^(00)+|(00)+$/g,""),"hex").toString("utf8")},t.baToJSON=function(e){if(n.isBuffer(e))return`0x${e.toString("hex")}`;if(e instanceof Array){const r=[];for(let n=0;n<e.length;n++)r.push((0,t.baToJSON)(e[n]));return r}},t.validateNoLeadingZeroes=function(e){for(const[t,r]of Object.entries(e))if(void 0!==r&&r.length>0&&0===r[0])throw new Error(`${t} cannot have leading zeroes, received: ${r.toString("hex")}`)},t.arrToBufArr=function e(t){return Array.isArray(t)?t.map((t=>e(t))):n.from(t)},t.bufArrToArr=function e(t){return Array.isArray(t)?t.map((t=>e(t))):Uint8Array.from(t??[])},t.bigIntToHex=e=>"0x"+e.toString(16),t.bigIntToUnpaddedBuffer=function(e){return(0,t.unpadBuffer)(c(e))},t.intToUnpaddedBuffer=function(e){return(0,t.unpadBuffer)((0,t.intToBuffer)(e))}},8127:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_WITHDRAWALS_PER_PAYLOAD=t.RLP_EMPTY_STRING=t.KECCAK256_RLP=t.KECCAK256_RLP_S=t.KECCAK256_RLP_ARRAY=t.KECCAK256_RLP_ARRAY_S=t.KECCAK256_NULL=t.KECCAK256_NULL_S=t.TWO_POW256=t.SECP256K1_ORDER_DIV_2=t.SECP256K1_ORDER=t.MAX_INTEGER_BIGINT=t.MAX_INTEGER=t.MAX_UINT64=void 0;const n=r(8834),i=r(101);t.MAX_UINT64=BigInt("0xffffffffffffffff"),t.MAX_INTEGER=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),t.MAX_INTEGER_BIGINT=BigInt("115792089237316195423570985008687907853269984665640564039457584007913129639935"),t.SECP256K1_ORDER=i.secp256k1.CURVE.n,t.SECP256K1_ORDER_DIV_2=i.secp256k1.CURVE.n/BigInt(2),t.TWO_POW256=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000"),t.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",t.KECCAK256_NULL=n.Buffer.from(t.KECCAK256_NULL_S,"hex"),t.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",t.KECCAK256_RLP_ARRAY=n.Buffer.from(t.KECCAK256_RLP_ARRAY_S,"hex"),t.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",t.KECCAK256_RLP=n.Buffer.from(t.KECCAK256_RLP_S,"hex"),t.RLP_EMPTY_STRING=n.Buffer.from([128]),t.MAX_WITHDRAWALS_PER_PAYLOAD=16},3244:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compactBytesToNibbles=t.bytesToNibbles=t.nibblesToCompactBytes=t.nibblesToBytes=t.hasTerminator=void 0,t.hasTerminator=e=>e.length>0&&16===e[e.length-1],t.nibblesToBytes=(e,t)=>{for(let r=0,n=0;n<e.length;r+=1,n+=2)t[r]=e[n]<<4|e[n+1]},t.nibblesToCompactBytes=e=>{let r=0;(0,t.hasTerminator)(e)&&(r=1,e=e.subarray(0,e.length-1));const n=new Uint8Array(e.length/2+1);return n[0]=r<<5,1==(1&e.length)&&(n[0]|=16,n[0]|=e[0],e=e.subarray(1)),(0,t.nibblesToBytes)(e,n.subarray(1)),n},t.bytesToNibbles=e=>{const t=2*e.length+1,r=new Uint8Array(t);for(let t=0;t<e.length;t++){const n=e[t];r[2*t]=n/16,r[2*t+1]=n%16}return r[t-1]=16,r},t.compactBytesToNibbles=e=>{if(0===e.length)return e;let r=(0,t.bytesToNibbles)(e);r[0]<2&&(r=r.subarray(0,r.length-1));const n=2-(1&r[0]);return r.subarray(n)}},8707:(e,t,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.assertIsString=t.assertIsArray=t.assertIsBuffer=t.assertIsHexString=void 0;const i=r(4243);t.assertIsHexString=function(e){if(!(0,i.isHexString)(e))throw new Error(`This method only supports 0x-prefixed hex strings but input was: ${e}`)},t.assertIsBuffer=function(e){if(!n.isBuffer(e))throw new Error(`This method only supports Buffer but input was: ${e}`)},t.assertIsArray=function(e){if(!Array.isArray(e))throw new Error(`This method only supports number arrays but input was: ${e}`)},t.assertIsString=function(e){if("string"!=typeof e)throw new Error(`This method only supports strings but input was: ${e}`)}},5372:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.toAscii=t.stripHexPrefix=t.padToEven=t.isHexString=t.isHexPrefixed=t.getKeys=t.getBinarySize=t.fromUtf8=t.fromAscii=t.arrayContainsArray=t.ssz=void 0,i(r(8127),t),i(r(3895),t),i(r(4706),t),i(r(8515),t),i(r(2868),t),i(r(2074),t),i(r(4916),t),t.ssz=r(1668),i(r(2103),t),i(r(3244),t),i(r(8263),t);var o=r(4243);Object.defineProperty(t,"arrayContainsArray",{enumerable:!0,get:function(){return o.arrayContainsArray}}),Object.defineProperty(t,"fromAscii",{enumerable:!0,get:function(){return o.fromAscii}}),Object.defineProperty(t,"fromUtf8",{enumerable:!0,get:function(){return o.fromUtf8}}),Object.defineProperty(t,"getBinarySize",{enumerable:!0,get:function(){return o.getBinarySize}}),Object.defineProperty(t,"getKeys",{enumerable:!0,get:function(){return o.getKeys}}),Object.defineProperty(t,"isHexPrefixed",{enumerable:!0,get:function(){return o.isHexPrefixed}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return o.isHexString}}),Object.defineProperty(t,"padToEven",{enumerable:!0,get:function(){return o.padToEven}}),Object.defineProperty(t,"stripHexPrefix",{enumerable:!0,get:function(){return o.stripHexPrefix}}),Object.defineProperty(t,"toAscii",{enumerable:!0,get:function(){return o.toAscii}}),i(r(6065),t),i(r(6831),t)},4243:(e,t,r)=>{"use strict";var n=r(8834).Buffer;function i(e){if("string"!=typeof e)throw new Error("[isHexPrefixed] input must be type 'string', received type "+typeof e);return"0"===e[0]&&"x"===e[1]}function o(e){let t=e;if("string"!=typeof t)throw new Error("[padToEven] value must be type 'string', received "+typeof t);return t.length%2&&(t=`0${t}`),t}Object.defineProperty(t,"__esModule",{value:!0}),t.isHexString=t.getKeys=t.fromAscii=t.fromUtf8=t.toAscii=t.arrayContainsArray=t.getBinarySize=t.padToEven=t.stripHexPrefix=t.isHexPrefixed=void 0,t.isHexPrefixed=i,t.stripHexPrefix=e=>{if("string"!=typeof e)throw new Error("[stripHexPrefix] input must be type 'string', received "+typeof e);return i(e)?e.slice(2):e},t.padToEven=o,t.getBinarySize=function(e){if("string"!=typeof e)throw new Error("[getBinarySize] method requires input type 'string', received "+typeof e);return n.byteLength(e,"utf8")},t.arrayContainsArray=function(e,t,r){if(!0!==Array.isArray(e))throw new Error(`[arrayContainsArray] method requires input 'superset' to be an array, got type '${typeof e}'`);if(!0!==Array.isArray(t))throw new Error(`[arrayContainsArray] method requires input 'subset' to be an array, got type '${typeof t}'`);return t[!0===r?"some":"every"]((t=>e.indexOf(t)>=0))},t.toAscii=function(e){let t="",r=0;const n=e.length;for("0x"===e.substring(0,2)&&(r=2);r<n;r+=2){const n=parseInt(e.substr(r,2),16);t+=String.fromCharCode(n)}return t},t.fromUtf8=function(e){return`0x${o(n.from(e,"utf8").toString("hex")).replace(/^0+|0+$/g,"")}`},t.fromAscii=function(e){let t="";for(let r=0;r<e.length;r++){const n=e.charCodeAt(r).toString(16);t+=n.length<2?`0${n}`:n}return`0x${t}`},t.getKeys=function(e,t,r){if(!Array.isArray(e))throw new Error("[getKeys] method expects input 'params' to be an array, got "+typeof e);if("string"!=typeof t)throw new Error("[getKeys] method expects input 'key' to be type 'string', got "+typeof e);const n=[];for(let i=0;i<e.length;i++){let o=e[i][t];if(!0!==r||o){if("string"!=typeof o)throw new Error("invalid abi - expected type 'string', received "+typeof o)}else o="";n.push(o)}return n},t.isHexString=function(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/)||void 0!==t&&t>0&&e.length!==2+2*t)}},6065:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Lock=void 0,t.Lock=class{constructor(){this.permits=1,this.promiseResolverQueue=[]}async acquire(){return this.permits>0?(this.permits-=1,Promise.resolve(!0)):new Promise((e=>this.promiseResolverQueue.push(e)))}release(){if(this.permits+=1,this.permits>1&&this.promiseResolverQueue.length>0)console.warn("Lock.permits should never be > 0 when there is someone waiting.");else if(1===this.permits&&this.promiseResolverQueue.length>0){this.permits-=1;const e=this.promiseResolverQueue.shift();e&&e(!0)}}}},6831:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getProvider=t.fetchFromProvider=void 0;const n=r(2973);t.fetchFromProvider=async(e,t)=>(await(0,n.default)(e,{headers:{"content-type":"application/json"},type:"json",data:{method:t.method,params:t.params,jsonrpc:"2.0",id:1}})).result,t.getProvider=e=>{if("string"==typeof e)return e;if(void 0!==e?.connection?.url)return e.connection.url;throw new Error("Must provide valid provider URL or Web3Provider")}},2074:(e,t,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.hashPersonalMessage=t.isValidSignature=t.fromRpcSig=t.toCompactSig=t.toRpcSig=t.ecrecover=t.ecsign=void 0;const i=r(1115),o=r(101),s=r(4916),a=r(8127),u=r(8707);function c(e,t){return e===BigInt(0)||e===BigInt(1)?e:void 0===t?e-BigInt(27):e-(t*BigInt(2)+BigInt(35))}function l(e){return e===BigInt(0)||e===BigInt(1)}t.ecsign=function(e,t,r){const i=o.secp256k1.sign(e,t),s=i.toCompactRawBytes();return{r:n.from(s.slice(0,32)),s:n.from(s.slice(32,64)),v:void 0===r?BigInt(i.recovery+27):BigInt(i.recovery+35)+BigInt(r)*BigInt(2)}},t.ecrecover=function(e,t,r,i,a){const u=n.concat([(0,s.setLengthLeft)(r,32),(0,s.setLengthLeft)(i,32)],64),f=c(t,a);if(!l(f))throw new Error("Invalid signature v value");const h=o.secp256k1.Signature.fromCompact(u).addRecoveryBit(Number(f)).recoverPublicKey(e);return n.from(h.toRawBytes(!1).slice(1))},t.toRpcSig=function(e,t,r,i){if(!l(c(e,i)))throw new Error("Invalid signature v value");return(0,s.bufferToHex)(n.concat([(0,s.setLengthLeft)(t,32),(0,s.setLengthLeft)(r,32),(0,s.toBuffer)(e)]))},t.toCompactSig=function(e,t,r,i){if(!l(c(e,i)))throw new Error("Invalid signature v value");let o=r;return(e>BigInt(28)&&e%BigInt(2)===BigInt(1)||e===BigInt(1)||e===BigInt(28))&&(o=n.from(r),o[0]|=128),(0,s.bufferToHex)(n.concat([(0,s.setLengthLeft)(t,32),(0,s.setLengthLeft)(o,32)]))},t.fromRpcSig=function(e){const t=(0,s.toBuffer)(e);let r,n,i;if(t.length>=65)r=t.slice(0,32),n=t.slice(32,64),i=(0,s.bufferToBigInt)(t.slice(64));else{if(64!==t.length)throw new Error("Invalid signature length");r=t.slice(0,32),n=t.slice(32,64),i=BigInt((0,s.bufferToInt)(t.slice(32,33))>>7),n[0]&=127}return i<27&&(i+=BigInt(27)),{v:i,r,s:n}},t.isValidSignature=function(e,t,r,n=!0,i){if(32!==t.length||32!==r.length)return!1;if(!l(c(e,i)))return!1;const o=(0,s.bufferToBigInt)(t),u=(0,s.bufferToBigInt)(r);return!(o===BigInt(0)||o>=a.SECP256K1_ORDER||u===BigInt(0)||u>=a.SECP256K1_ORDER||n&&u>=a.SECP256K1_ORDER_DIV_2)},t.hashPersonalMessage=function(e){(0,u.assertIsBuffer)(e);const t=n.from(`Ethereum Signed Message:\n${e.length}`,"utf-8");return n.from((0,i.keccak256)(n.concat([t,e])))}},1668:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Withdrawals=t.Withdrawal=t.Bytes20=t.UintBigInt64=t.UintNum64=void 0;const n=r(557),i=r(8127);t.UintNum64=new n.UintNumberType(8),t.UintBigInt64=new n.UintBigintType(8),t.Bytes20=new n.ByteVectorType(20),t.Withdrawal=new n.ContainerType({index:t.UintBigInt64,validatorIndex:t.UintBigInt64,address:t.Bytes20,amount:t.UintBigInt64},{typeName:"Withdrawal",jsonCase:"eth2"}),t.Withdrawals=new n.ListCompositeType(t.Withdrawal,i.MAX_WITHDRAWALS_PER_PAYLOAD)},2103:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toType=t.TypeOutput=void 0;const n=r(4916),i=r(4243);var o;!function(e){e[e.Number=0]="Number",e[e.BigInt=1]="BigInt",e[e.Buffer=2]="Buffer",e[e.PrefixedHexString=3]="PrefixedHexString"}(o=t.TypeOutput||(t.TypeOutput={})),t.toType=function(e,t){if(null===e)return null;if(void 0===e)return;if("string"==typeof e&&!(0,i.isHexString)(e))throw new Error(`A string must be provided with a 0x-prefix, given: ${e}`);if("number"==typeof e&&!Number.isSafeInteger(e))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");const r=(0,n.toBuffer)(e);switch(t){case o.Buffer:return r;case o.BigInt:return(0,n.bufferToBigInt)(r);case o.Number:{const e=(0,n.bufferToBigInt)(r);if(e>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)");return Number(e)}case o.PrefixedHexString:return(0,n.bufferToHex)(r);default:throw new Error("unknown outputType")}}},3895:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GWEI_TO_WEI=void 0,t.GWEI_TO_WEI=BigInt(1e9)},2868:(e,t,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.Withdrawal=void 0;const i=r(8515),o=r(4916),s=r(2103);class a{constructor(e,t,r,n){this.index=e,this.validatorIndex=t,this.address=r,this.amount=n}static fromWithdrawalData(e){const{index:t,validatorIndex:r,address:n,amount:o}=e,u=(0,s.toType)(t,s.TypeOutput.BigInt),c=(0,s.toType)(r,s.TypeOutput.BigInt),l=new i.Address((0,s.toType)(n,s.TypeOutput.Buffer)),f=(0,s.toType)(o,s.TypeOutput.BigInt);return new a(u,c,l,f)}static fromValuesArray(e){if(4!==e.length)throw Error(`Invalid withdrawalArray length expected=4 actual=${e.length}`);const[t,r,n,i]=e;return a.fromWithdrawalData({index:t,validatorIndex:r,address:n,amount:i})}static toBufferArray(e){const{index:t,validatorIndex:r,address:o,amount:a}=e,u=(0,s.toType)(t,s.TypeOutput.BigInt)===BigInt(0)?n.alloc(0):(0,s.toType)(t,s.TypeOutput.Buffer),c=(0,s.toType)(r,s.TypeOutput.BigInt)===BigInt(0)?n.alloc(0):(0,s.toType)(r,s.TypeOutput.Buffer);let l;return l=o instanceof i.Address?o.buf:(0,s.toType)(o,s.TypeOutput.Buffer),[u,c,l,(0,s.toType)(a,s.TypeOutput.BigInt)===BigInt(0)?n.alloc(0):(0,s.toType)(a,s.TypeOutput.Buffer)]}raw(){return a.toBufferArray(this)}toValue(){return{index:this.index,validatorIndex:this.validatorIndex,address:this.address.buf,amount:this.amount}}toJSON(){return{index:(0,o.bigIntToHex)(this.index),validatorIndex:(0,o.bigIntToHex)(this.validatorIndex),address:"0x"+this.address.buf.toString("hex"),amount:(0,o.bigIntToHex)(this.amount)}}}t.Withdrawal=a},5887:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createCurve=t.getHash=void 0;const n=r(1377),i=r(64),o=r(7851);function s(e){return{hash:e,hmac:(t,...r)=>(0,n.hmac)(e,t,(0,i.concatBytes)(...r)),randomBytes:i.randomBytes}}t.getHash=s,t.createCurve=function(e,t){const r=t=>(0,o.weierstrass)({...e,...s(t)});return Object.freeze({...r(t),create:r})}},1465:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateBasic=t.wNAF=void 0;const n=r(9530),i=r(4323),o=BigInt(0),s=BigInt(1);t.wNAF=function(e,t){const r=(e,t)=>{const r=t.negate();return e?r:t},n=e=>({windows:Math.ceil(t/e)+1,windowSize:2**(e-1)});return{constTimeNegate:r,unsafeLadder(t,r){let n=e.ZERO,i=t;for(;r>o;)r&s&&(n=n.add(i)),i=i.double(),r>>=s;return n},precomputeWindow(e,t){const{windows:r,windowSize:i}=n(t),o=[];let s=e,a=s;for(let e=0;e<r;e++){a=s,o.push(a);for(let e=1;e<i;e++)a=a.add(s),o.push(a);s=a.double()}return o},wNAF(t,i,o){const{windows:a,windowSize:u}=n(t);let c=e.ZERO,l=e.BASE;const f=BigInt(2**t-1),h=2**t,d=BigInt(t);for(let e=0;e<a;e++){const t=e*u;let n=Number(o&f);o>>=d,n>u&&(n-=h,o+=s);const a=t,p=t+Math.abs(n)-1,y=e%2!=0,g=n<0;0===n?l=l.add(r(y,i[a])):c=c.add(r(g,i[p]))}return{p:c,f:l}},wNAFCached(e,t,r,n){const i=e._WINDOW_SIZE||1;let o=t.get(e);return o||(o=this.precomputeWindow(e,i),1!==i&&t.set(e,n(o))),this.wNAF(i,o,r)}}},t.validateBasic=function(e){return(0,n.validateField)(e.Fp),(0,i.validateObject)(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,n.nLength)(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}},1322:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createHasher=t.isogenyMap=t.hash_to_field=t.expand_message_xof=t.expand_message_xmd=void 0;const n=r(9530),i=r(4323),o=i.bytesToNumberBE;function s(e,t){if(e<0||e>=1<<8*t)throw new Error(`bad I2OSP call: value=${e} length=${t}`);const r=Array.from({length:t}).fill(0);for(let n=t-1;n>=0;n--)r[n]=255&e,e>>>=8;return new Uint8Array(r)}function a(e,t){const r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e[n]^t[n];return r}function u(e){if(!(e instanceof Uint8Array))throw new Error("Uint8Array expected")}function c(e){if(!Number.isSafeInteger(e))throw new Error("number expected")}function l(e,t,r,n){u(e),u(t),c(r),t.length>255&&(t=n((0,i.concatBytes)((0,i.utf8ToBytes)("H2C-OVERSIZE-DST-"),t)));const{outputLen:o,blockLen:l}=n,f=Math.ceil(r/o);if(f>255)throw new Error("Invalid xmd length");const h=(0,i.concatBytes)(t,s(t.length,1)),d=s(0,l),p=s(r,2),y=new Array(f),g=n((0,i.concatBytes)(d,e,p,s(0,1),h));y[0]=n((0,i.concatBytes)(g,s(1,1),h));for(let e=1;e<=f;e++){const t=[a(g,y[e-1]),s(e+1,1),h];y[e]=n((0,i.concatBytes)(...t))}return(0,i.concatBytes)(...y).slice(0,r)}function f(e,t,r,n,o){if(u(e),u(t),c(r),t.length>255){const e=Math.ceil(2*n/8);t=o.create({dkLen:e}).update((0,i.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(t).digest()}if(r>65535||t.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return o.create({dkLen:r}).update(e).update(s(r,2)).update(t).update(s(t.length,1)).digest()}function h(e,t,r){(0,i.validateObject)(r,{DST:"string",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:s,k:a,m:h,hash:d,expand:p,DST:y}=r;u(e),c(t);const g=function(e){if(e instanceof Uint8Array)return e;if("string"==typeof e)return(0,i.utf8ToBytes)(e);throw new Error("DST must be Uint8Array or string")}(y),m=s.toString(2).length,b=Math.ceil((m+a)/8),w=t*h*b;let v;if("xmd"===p)v=l(e,g,w,d);else if("xof"===p)v=f(e,g,w,a,d);else{if("_internal_pass"!==p)throw new Error('expand must be "xmd" or "xof"');v=e}const _=new Array(t);for(let e=0;e<t;e++){const t=new Array(h);for(let r=0;r<h;r++){const i=b*(r+e*h),a=v.subarray(i,i+b);t[r]=(0,n.mod)(o(a),s)}_[e]=t}return _}t.expand_message_xmd=l,t.expand_message_xof=f,t.hash_to_field=h,t.isogenyMap=function(e,t){const r=t.map((e=>Array.from(e).reverse()));return(t,n)=>{const[i,o,s,a]=r.map((r=>r.reduce(((r,n)=>e.add(e.mul(r,t),n)))));return t=e.div(i,o),n=e.mul(n,e.div(s,a)),{x:t,y:n}}},t.createHasher=function(e,t,r){if("function"!=typeof t)throw new Error("mapToCurve() must be defined");return{hashToCurve(n,i){const o=h(n,2,{...r,DST:r.DST,...i}),s=e.fromAffine(t(o[0])),a=e.fromAffine(t(o[1])),u=s.add(a).clearCofactor();return u.assertValidity(),u},encodeToCurve(n,i){const o=h(n,1,{...r,DST:r.encodeDST,...i}),s=e.fromAffine(t(o[0])).clearCofactor();return s.assertValidity(),s}}}},9530:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hashToPrivateScalar=t.FpSqrtEven=t.FpSqrtOdd=t.Field=t.nLength=t.FpIsSquare=t.FpDiv=t.FpInvertBatch=t.FpPow=t.validateField=t.isNegativeLE=t.FpSqrt=t.tonelliShanks=t.invert=t.pow2=t.pow=t.mod=void 0;const n=r(4323),i=BigInt(0),o=BigInt(1),s=BigInt(2),a=BigInt(3),u=BigInt(4),c=BigInt(5),l=BigInt(8);function f(e,t){const r=e%t;return r>=i?r:t+r}function h(e,t,r){if(r<=i||t<i)throw new Error("Expected power/modulo > 0");if(r===o)return i;let n=o;for(;t>i;)t&o&&(n=n*e%r),e=e*e%r,t>>=o;return n}function d(e,t){if(e===i||t<=i)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=f(e,t),n=t,s=i,a=o,u=o,c=i;for(;r!==i;){const e=n/r,t=n%r,i=s-u*e,o=a-c*e;n=r,r=t,s=u,a=c,u=i,c=o}if(n!==o)throw new Error("invert: does not exist");return f(s,t)}function p(e){const t=(e-o)/s;let r,n,a;for(r=e-o,n=0;r%s===i;r/=s,n++);for(a=s;a<e&&h(a,t,e)!==e-o;a++);if(1===n){const t=(e+o)/u;return function(e,r){const n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw new Error("Cannot find square root");return n}}const c=(r+o)/s;return function(e,i){if(e.pow(i,t)===e.neg(e.ONE))throw new Error("Cannot find square root");let s=n,u=e.pow(e.mul(e.ONE,a),r),l=e.pow(i,c),f=e.pow(i,r);for(;!e.eql(f,e.ONE);){if(e.eql(f,e.ZERO))return e.ZERO;let t=1;for(let r=e.sqr(f);t<s&&!e.eql(r,e.ONE);t++)r=e.sqr(r);const r=e.pow(u,o<<BigInt(s-t-1));u=e.sqr(r),l=e.mul(l,r),f=e.mul(f,u),s=t}return l}}function y(e){if(e%u===a){const t=(e+o)/u;return function(e,r){const n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw new Error("Cannot find square root");return n}}if(e%l===c){const t=(e-c)/l;return function(e,r){const n=e.mul(r,s),i=e.pow(n,t),o=e.mul(r,i),a=e.mul(e.mul(o,s),i),u=e.mul(o,e.sub(a,e.ONE));if(!e.eql(e.sqr(u),r))throw new Error("Cannot find square root");return u}}return p(e)}BigInt(9),BigInt(16),t.mod=f,t.pow=h,t.pow2=function(e,t,r){let n=e;for(;t-- >i;)n*=n,n%=r;return n},t.invert=d,t.tonelliShanks=p,t.FpSqrt=y,t.isNegativeLE=(e,t)=>(f(e,t)&o)===o;const g=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function m(e,t,r){if(r<i)throw new Error("Expected power > 0");if(r===i)return e.ONE;if(r===o)return t;let n=e.ONE,s=t;for(;r>i;)r&o&&(n=e.mul(n,s)),s=e.sqr(s),r>>=o;return n}function b(e,t){const r=new Array(t.length),n=t.reduce(((t,n,i)=>e.is0(n)?t:(r[i]=t,e.mul(t,n))),e.ONE),i=e.inv(n);return t.reduceRight(((t,n,i)=>e.is0(n)?t:(r[i]=e.mul(t,r[i]),e.mul(t,n))),i),r}function w(e,t){const r=void 0!==t?t:e.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}t.validateField=function(e){const t=g.reduce(((e,t)=>(e[t]="function",e)),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});return(0,n.validateObject)(e,t)},t.FpPow=m,t.FpInvertBatch=b,t.FpDiv=function(e,t,r){return e.mul(t,"bigint"==typeof r?d(r,e.ORDER):e.inv(r))},t.FpIsSquare=function(e){const t=(e.ORDER-o)/s;return r=>{const n=e.pow(r,t);return e.eql(n,e.ZERO)||e.eql(n,e.ONE)}},t.nLength=w,t.Field=function(e,t,r=!1,s={}){if(e<=i)throw new Error(`Expected Fp ORDER > 0, got ${e}`);const{nBitLength:a,nByteLength:u}=w(e,t);if(u>2048)throw new Error("Field lengths over 2048 bytes are not supported");const c=y(e),l=Object.freeze({ORDER:e,BITS:a,BYTES:u,MASK:(0,n.bitMask)(a),ZERO:i,ONE:o,create:t=>f(t,e),isValid:t=>{if("bigint"!=typeof t)throw new Error("Invalid field element: expected bigint, got "+typeof t);return i<=t&&t<e},is0:e=>e===i,isOdd:e=>(e&o)===o,neg:t=>f(-t,e),eql:(e,t)=>e===t,sqr:t=>f(t*t,e),add:(t,r)=>f(t+r,e),sub:(t,r)=>f(t-r,e),mul:(t,r)=>f(t*r,e),pow:(e,t)=>m(l,e,t),div:(t,r)=>f(t*d(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>d(t,e),sqrt:s.sqrt||(e=>c(l,e)),invertBatch:e=>b(l,e),cmov:(e,t,r)=>r?t:e,toBytes:e=>r?(0,n.numberToBytesLE)(e,u):(0,n.numberToBytesBE)(e,u),fromBytes:e=>{if(e.length!==u)throw new Error(`Fp.fromBytes: expected ${u}, got ${e.length}`);return r?(0,n.bytesToNumberLE)(e):(0,n.bytesToNumberBE)(e)}});return Object.freeze(l)},t.FpSqrtOdd=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const r=e.sqrt(t);return e.isOdd(r)?r:e.neg(r)},t.FpSqrtEven=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const r=e.sqrt(t);return e.isOdd(r)?e.neg(r):r},t.hashToPrivateScalar=function(e,t,r=!1){const i=(e=(0,n.ensureBytes)("privateHash",e)).length,s=w(t).nByteLength+8;if(s<24||i<s||i>1024)throw new Error(`hashToPrivateScalar: expected ${s}-1024 bytes of input, got ${i}`);return f(r?(0,n.bytesToNumberLE)(e):(0,n.bytesToNumberBE)(e),t-o)+o}},4323:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateObject=t.createHmacDrbg=t.bitMask=t.bitSet=t.bitGet=t.bitLen=t.utf8ToBytes=t.equalBytes=t.concatBytes=t.ensureBytes=t.numberToVarBytesBE=t.numberToBytesLE=t.numberToBytesBE=t.bytesToNumberLE=t.bytesToNumberBE=t.hexToBytes=t.hexToNumber=t.numberToHexUnpadded=t.bytesToHex=void 0;const r=BigInt(0),n=BigInt(1),i=BigInt(2),o=e=>e instanceof Uint8Array,s=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function a(e){if(!o(e))throw new Error("Uint8Array expected");let t="";for(let r=0;r<e.length;r++)t+=s[e[r]];return t}function u(e){const t=e.toString(16);return 1&t.length?`0${t}`:t}function c(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);return BigInt(""===e?"0":`0x${e}`)}function l(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);if(e.length%2)throw new Error("hex string is invalid: unpadded "+e.length);const t=new Uint8Array(e.length/2);for(let r=0;r<t.length;r++){const n=2*r,i=e.slice(n,n+2),o=Number.parseInt(i,16);if(Number.isNaN(o)||o<0)throw new Error("invalid byte sequence");t[r]=o}return t}function f(...e){const t=new Uint8Array(e.reduce(((e,t)=>e+t.length),0));let r=0;return e.forEach((e=>{if(!o(e))throw new Error("Uint8Array expected");t.set(e,r),r+=e.length})),t}t.bytesToHex=a,t.numberToHexUnpadded=u,t.hexToNumber=c,t.hexToBytes=l,t.bytesToNumberBE=function(e){return c(a(e))},t.bytesToNumberLE=function(e){if(!o(e))throw new Error("Uint8Array expected");return c(a(Uint8Array.from(e).reverse()))},t.numberToBytesBE=(e,t)=>l(e.toString(16).padStart(2*t,"0")),t.numberToBytesLE=(e,r)=>(0,t.numberToBytesBE)(e,r).reverse(),t.numberToVarBytesBE=e=>l(u(e)),t.ensureBytes=function(e,t,r){let n;if("string"==typeof t)try{n=l(t)}catch(r){throw new Error(`${e} must be valid hex string, got "${t}". Cause: ${r}`)}else{if(!o(t))throw new Error(`${e} must be hex string or Uint8Array`);n=Uint8Array.from(t)}const i=n.length;if("number"==typeof r&&i!==r)throw new Error(`${e} expected ${r} bytes, got ${i}`);return n},t.concatBytes=f,t.equalBytes=function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0},t.utf8ToBytes=function(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return(new TextEncoder).encode(e)},t.bitLen=function(e){let t;for(t=0;e>r;e>>=n,t+=1);return t},t.bitGet=(e,t)=>e>>BigInt(t)&n,t.bitSet=(e,t,i)=>e|(i?n:r)<<BigInt(t),t.bitMask=e=>(i<<BigInt(e-1))-n;const h=e=>new Uint8Array(e),d=e=>Uint8Array.from(e);t.createHmacDrbg=function(e,t,r){if("number"!=typeof e||e<2)throw new Error("hashLen must be a number");if("number"!=typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!=typeof r)throw new Error("hmacFn must be a function");let n=h(e),i=h(e),o=0;const s=()=>{n.fill(1),i.fill(0),o=0},a=(...e)=>r(i,n,...e),u=(e=h())=>{i=a(d([0]),e),n=a(),0!==e.length&&(i=a(d([1]),e),n=a())},c=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const r=[];for(;e<t;){n=a();const t=n.slice();r.push(t),e+=n.length}return f(...r)};return(e,t)=>{let r;for(s(),u(e);!(r=t(c()));)u();return s(),r}};const p={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};t.validateObject=function(e,t,r={}){const n=(t,r,n)=>{const i=p[r];if("function"!=typeof i)throw new Error(`Invalid validator "${r}", expected function`);const o=e[t];if(!(n&&void 0===o||i(o,e)))throw new Error(`Invalid param ${String(t)}=${o} (${typeof o}), expected ${r}`)};for(const[e,r]of Object.entries(t))n(e,r,!1);for(const[e,t]of Object.entries(r))n(e,t,!0);return e}},7851:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapToCurveSimpleSWU=t.SWUFpSqrtRatio=t.weierstrass=t.weierstrassPoints=t.DER=void 0;const n=r(9530),i=r(4323),o=r(4323),s=r(1465),{bytesToNumberBE:a,hexToBytes:u}=i;t.DER={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(e){const{Err:r}=t.DER;if(e.length<2||2!==e[0])throw new r("Invalid signature integer tag");const n=e[1],i=e.subarray(2,n+2);if(!n||i.length!==n)throw new r("Invalid signature integer: wrong length");if(128&i[0])throw new r("Invalid signature integer: negative");if(0===i[0]&&!(128&i[1]))throw new r("Invalid signature integer: unnecessary leading zero");return{d:a(i),l:e.subarray(n+2)}},toSig(e){const{Err:r}=t.DER,n="string"==typeof e?u(e):e;if(!(n instanceof Uint8Array))throw new Error("ui8a expected");let i=n.length;if(i<2||48!=n[0])throw new r("Invalid signature tag");if(n[1]!==i-2)throw new r("Invalid signature: incorrect length");const{d:o,l:s}=t.DER._parseInt(n.subarray(2)),{d:a,l:c}=t.DER._parseInt(s);if(c.length)throw new r("Invalid signature: left bytes after parsing");return{r:o,s:a}},hexFromSig(e){const t=e=>8&Number.parseInt(e[0],16)?"00"+e:e,r=e=>{const t=e.toString(16);return 1&t.length?`0${t}`:t},n=t(r(e.s)),i=t(r(e.r)),o=n.length/2,s=i.length/2,a=r(o),u=r(s);return`30${r(s+o+4)}02${u}${i}02${a}${n}`}};const c=BigInt(0),l=BigInt(1),f=BigInt(2),h=BigInt(3),d=BigInt(4);function p(e){const t=function(e){const t=(0,s.validateBasic)(e);i.validateObject(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:r,Fp:n,a:o}=t;if(r){if(!n.eql(o,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!=typeof r||"bigint"!=typeof r.beta||"function"!=typeof r.splitScalar)throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}(e),{Fp:r}=t,a=t.toBytes||((e,t,n)=>{const o=t.toAffine();return i.concatBytes(Uint8Array.from([4]),r.toBytes(o.x),r.toBytes(o.y))}),u=t.fromBytes||(e=>{const t=e.subarray(1);return{x:r.fromBytes(t.subarray(0,r.BYTES)),y:r.fromBytes(t.subarray(r.BYTES,2*r.BYTES))}});function f(e){const{a:n,b:i}=t,o=r.sqr(e),s=r.mul(o,e);return r.add(r.add(s,r.mul(e,n)),i)}if(!r.eql(r.sqr(t.Gy),f(t.Gx)))throw new Error("bad generator point: equation left != right");function d(e){return"bigint"==typeof e&&c<e&&e<t.n}function p(e){if(!d(e))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function y(e){const{allowedPrivateKeyLengths:r,nByteLength:s,wrapPrivateKey:a,n:u}=t;if(r&&"bigint"!=typeof e){if(e instanceof Uint8Array&&(e=i.bytesToHex(e)),"string"!=typeof e||!r.includes(e.length))throw new Error("Invalid key");e=e.padStart(2*s,"0")}let c;try{c="bigint"==typeof e?e:i.bytesToNumberBE((0,o.ensureBytes)("private key",e,s))}catch(t){throw new Error(`private key must be ${s} bytes, hex or bigint, not ${typeof e}`)}return a&&(c=n.mod(c,u)),p(c),c}const g=new Map;function m(e){if(!(e instanceof b))throw new Error("ProjectivePoint expected")}class b{constructor(e,t,n){if(this.px=e,this.py=t,this.pz=n,null==e||!r.isValid(e))throw new Error("x required");if(null==t||!r.isValid(t))throw new Error("y required");if(null==n||!r.isValid(n))throw new Error("z required")}static fromAffine(e){const{x:t,y:n}=e||{};if(!e||!r.isValid(t)||!r.isValid(n))throw new Error("invalid affine point");if(e instanceof b)throw new Error("projective point not allowed");const i=e=>r.eql(e,r.ZERO);return i(t)&&i(n)?b.ZERO:new b(t,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){const t=r.invertBatch(e.map((e=>e.pz)));return e.map(((e,r)=>e.toAffine(t[r]))).map(b.fromAffine)}static fromHex(e){const t=b.fromAffine(u((0,o.ensureBytes)("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return b.BASE.multiply(y(e))}_setWindowSize(e){this._WINDOW_SIZE=e,g.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint)return;throw new Error("bad point: ZERO")}const{x:e,y:n}=this.toAffine();if(!r.isValid(e)||!r.isValid(n))throw new Error("bad point: x or y not FE");const i=r.sqr(n),o=f(e);if(!r.eql(i,o))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:e}=this.toAffine();if(r.isOdd)return!r.isOdd(e);throw new Error("Field doesn't support isOdd")}equals(e){m(e);const{px:t,py:n,pz:i}=this,{px:o,py:s,pz:a}=e,u=r.eql(r.mul(t,a),r.mul(o,i)),c=r.eql(r.mul(n,a),r.mul(s,i));return u&&c}negate(){return new b(this.px,r.neg(this.py),this.pz)}double(){const{a:e,b:n}=t,i=r.mul(n,h),{px:o,py:s,pz:a}=this;let u=r.ZERO,c=r.ZERO,l=r.ZERO,f=r.mul(o,o),d=r.mul(s,s),p=r.mul(a,a),y=r.mul(o,s);return y=r.add(y,y),l=r.mul(o,a),l=r.add(l,l),u=r.mul(e,l),c=r.mul(i,p),c=r.add(u,c),u=r.sub(d,c),c=r.add(d,c),c=r.mul(u,c),u=r.mul(y,u),l=r.mul(i,l),p=r.mul(e,p),y=r.sub(f,p),y=r.mul(e,y),y=r.add(y,l),l=r.add(f,f),f=r.add(l,f),f=r.add(f,p),f=r.mul(f,y),c=r.add(c,f),p=r.mul(s,a),p=r.add(p,p),f=r.mul(p,y),u=r.sub(u,f),l=r.mul(p,d),l=r.add(l,l),l=r.add(l,l),new b(u,c,l)}add(e){m(e);const{px:n,py:i,pz:o}=this,{px:s,py:a,pz:u}=e;let c=r.ZERO,l=r.ZERO,f=r.ZERO;const d=t.a,p=r.mul(t.b,h);let y=r.mul(n,s),g=r.mul(i,a),w=r.mul(o,u),v=r.add(n,i),_=r.add(s,a);v=r.mul(v,_),_=r.add(y,g),v=r.sub(v,_),_=r.add(n,o);let E=r.add(s,u);return _=r.mul(_,E),E=r.add(y,w),_=r.sub(_,E),E=r.add(i,o),c=r.add(a,u),E=r.mul(E,c),c=r.add(g,w),E=r.sub(E,c),f=r.mul(d,_),c=r.mul(p,w),f=r.add(c,f),c=r.sub(g,f),f=r.add(g,f),l=r.mul(c,f),g=r.add(y,y),g=r.add(g,y),w=r.mul(d,w),_=r.mul(p,_),g=r.add(g,w),w=r.sub(y,w),w=r.mul(d,w),_=r.add(_,w),y=r.mul(g,_),l=r.add(l,y),y=r.mul(E,_),c=r.mul(v,c),c=r.sub(c,y),y=r.mul(v,g),f=r.mul(E,f),f=r.add(f,y),new b(c,l,f)}subtract(e){return this.add(e.negate())}is0(){return this.equals(b.ZERO)}wNAF(e){return v.wNAFCached(this,g,e,(e=>{const t=r.invertBatch(e.map((e=>e.pz)));return e.map(((e,r)=>e.toAffine(t[r]))).map(b.fromAffine)}))}multiplyUnsafe(e){const n=b.ZERO;if(e===c)return n;if(p(e),e===l)return this;const{endo:i}=t;if(!i)return v.unsafeLadder(this,e);let{k1neg:o,k1:s,k2neg:a,k2:u}=i.splitScalar(e),f=n,h=n,d=this;for(;s>c||u>c;)s&l&&(f=f.add(d)),u&l&&(h=h.add(d)),d=d.double(),s>>=l,u>>=l;return o&&(f=f.negate()),a&&(h=h.negate()),h=new b(r.mul(h.px,i.beta),h.py,h.pz),f.add(h)}multiply(e){p(e);let n,i,o=e;const{endo:s}=t;if(s){const{k1neg:e,k1:t,k2neg:a,k2:u}=s.splitScalar(o);let{p:c,f:l}=this.wNAF(t),{p:f,f:h}=this.wNAF(u);c=v.constTimeNegate(e,c),f=v.constTimeNegate(a,f),f=new b(r.mul(f.px,s.beta),f.py,f.pz),n=c.add(f),i=l.add(h)}else{const{p:e,f:t}=this.wNAF(o);n=e,i=t}return b.normalizeZ([n,i])[0]}multiplyAndAddUnsafe(e,t,r){const n=b.BASE,i=(e,t)=>t!==c&&t!==l&&e.equals(n)?e.multiply(t):e.multiplyUnsafe(t),o=i(this,t).add(i(e,r));return o.is0()?void 0:o}toAffine(e){const{px:t,py:n,pz:i}=this,o=this.is0();null==e&&(e=o?r.ONE:r.inv(i));const s=r.mul(t,e),a=r.mul(n,e),u=r.mul(i,e);if(o)return{x:r.ZERO,y:r.ZERO};if(!r.eql(u,r.ONE))throw new Error("invZ was invalid");return{x:s,y:a}}isTorsionFree(){const{h:e,isTorsionFree:r}=t;if(e===l)return!0;if(r)return r(b,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:e,clearCofactor:r}=t;return e===l?this:r?r(b,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return this.assertValidity(),a(b,this,e)}toHex(e=!0){return i.bytesToHex(this.toRawBytes(e))}}b.BASE=new b(t.Gx,t.Gy,r.ONE),b.ZERO=new b(r.ZERO,r.ONE,r.ZERO);const w=t.nBitLength,v=(0,s.wNAF)(b,t.endo?Math.ceil(w/2):w);return{CURVE:t,ProjectivePoint:b,normPrivateKeyToScalar:y,weierstrassEquation:f,isWithinCurveOrder:d}}function y(e,t){const r=e.ORDER;let n=c;for(let e=r-l;e%f===c;e/=f)n+=l;const i=n,o=(r-l)/f**i,s=(o-l)/f,a=f**i-l,u=f**(i-l),p=e.pow(t,o),y=e.pow(t,(o+l)/f);let g=(t,r)=>{let n=p,o=e.pow(r,a),c=e.sqr(o);c=e.mul(c,r);let h=e.mul(t,c);h=e.pow(h,s),h=e.mul(h,o),o=e.mul(h,r),c=e.mul(h,t);let d=e.mul(c,o);h=e.pow(d,u);let g=e.eql(h,e.ONE);o=e.mul(c,y),h=e.mul(d,n),c=e.cmov(o,c,g),d=e.cmov(h,d,g);for(let t=i;t>l;t--){let r=f**(t-f),i=e.pow(d,r);const s=e.eql(i,e.ONE);o=e.mul(c,n),n=e.mul(n,n),i=e.mul(d,n),c=e.cmov(o,c,s),d=e.cmov(i,d,s)}return{isValid:g,value:c}};if(e.ORDER%d===h){const r=(e.ORDER-h)/d,n=e.sqrt(e.neg(t));g=(t,i)=>{let o=e.sqr(i);const s=e.mul(t,i);o=e.mul(o,s);let a=e.pow(o,r);a=e.mul(a,s);const u=e.mul(a,n),c=e.mul(e.sqr(a),i),l=e.eql(c,t);return{isValid:l,value:e.cmov(u,a,l)}}}return g}t.weierstrassPoints=p,t.weierstrass=function(e){const r=function(e){const t=(0,s.validateBasic)(e);return i.validateObject(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:a,n:u}=r,f=a.BYTES+1,h=2*a.BYTES+1;function d(e){return n.mod(e,u)}function y(e){return n.invert(e,u)}const{ProjectivePoint:g,normPrivateKeyToScalar:m,weierstrassEquation:b,isWithinCurveOrder:w}=p({...r,toBytes(e,t,r){const n=t.toAffine(),o=a.toBytes(n.x),s=i.concatBytes;return r?s(Uint8Array.from([t.hasEvenY()?2:3]),o):s(Uint8Array.from([4]),o,a.toBytes(n.y))},fromBytes(e){const t=e.length,r=e[0],n=e.subarray(1);if(t!==f||2!==r&&3!==r){if(t===h&&4===r)return{x:a.fromBytes(n.subarray(0,a.BYTES)),y:a.fromBytes(n.subarray(a.BYTES,2*a.BYTES))};throw new Error(`Point of length ${t} was invalid. Expected ${f} compressed bytes or ${h} uncompressed bytes`)}{const e=i.bytesToNumberBE(n);if(!(c<(o=e)&&o<a.ORDER))throw new Error("Point is not on curve");const t=b(e);let s=a.sqrt(t);return 1==(1&r)!=((s&l)===l)&&(s=a.neg(s)),{x:e,y:s}}var o}}),v=e=>i.bytesToHex(i.numberToBytesBE(e,r.nByteLength));function _(e){return e>u>>l}const E=(e,t,r)=>i.bytesToNumberBE(e.slice(t,r));class A{constructor(e,t,r){this.r=e,this.s=t,this.recovery=r,this.assertValidity()}static fromCompact(e){const t=r.nByteLength;return e=(0,o.ensureBytes)("compactSignature",e,2*t),new A(E(e,0,t),E(e,t,2*t))}static fromDER(e){const{r,s:n}=t.DER.toSig((0,o.ensureBytes)("DER",e));return new A(r,n)}assertValidity(){if(!w(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!w(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(e){return new A(this.r,this.s,e)}recoverPublicKey(e){const{r:t,s:n,recovery:i}=this,s=O((0,o.ensureBytes)("msgHash",e));if(null==i||![0,1,2,3].includes(i))throw new Error("recovery id invalid");const u=2===i||3===i?t+r.n:t;if(u>=a.ORDER)throw new Error("recovery id 2 or 3 invalid");const c=0==(1&i)?"02":"03",l=g.fromHex(c+v(u)),f=y(u),h=d(-s*f),p=d(n*f),m=g.BASE.multiplyAndAddUnsafe(l,h,p);if(!m)throw new Error("point at infinify");return m.assertValidity(),m}hasHighS(){return _(this.s)}normalizeS(){return this.hasHighS()?new A(this.r,d(-this.s),this.recovery):this}toDERRawBytes(){return i.hexToBytes(this.toDERHex())}toDERHex(){return t.DER.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return i.hexToBytes(this.toCompactHex())}toCompactHex(){return v(this.r)+v(this.s)}}const S={isValidPrivateKey(e){try{return m(e),!0}catch(e){return!1}},normPrivateKeyToScalar:m,randomPrivateKey:()=>{const e=r.randomBytes(a.BYTES+8),t=n.hashToPrivateScalar(e,u);return i.numberToBytesBE(t,r.nByteLength)},precompute:(e=8,t=g.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)};function T(e){const t=e instanceof Uint8Array,r="string"==typeof e,n=(t||r)&&e.length;return t?n===f||n===h:r?n===2*f||n===2*h:e instanceof g}const B=r.bits2int||function(e){const t=i.bytesToNumberBE(e),n=8*e.length-r.nBitLength;return n>0?t>>BigInt(n):t},O=r.bits2int_modN||function(e){return d(B(e))},N=i.bitMask(r.nBitLength);function x(e){if("bigint"!=typeof e)throw new Error("bigint expected");if(!(c<=e&&e<N))throw new Error(`bigint expected < 2^${r.nBitLength}`);return i.numberToBytesBE(e,r.nByteLength)}const P={lowS:r.lowS,prehash:!1},C={lowS:r.lowS,prehash:!1};return g.BASE._setWindowSize(8),{CURVE:r,getPublicKey:function(e,t=!0){return g.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,r=!0){if(T(e))throw new Error("first arg must be private key");if(!T(t))throw new Error("second arg must be public key");return g.fromHex(t).multiply(m(e)).toRawBytes(r)},sign:function(e,t,n=P){const{seed:s,k2sig:u}=function(e,t,n=P){if(["recovered","canonical"].some((e=>e in n)))throw new Error("sign() legacy options not supported");const{hash:s,randomBytes:u}=r;let{lowS:f,prehash:h,extraEntropy:p}=n;null==f&&(f=!0),e=(0,o.ensureBytes)("msgHash",e),h&&(e=(0,o.ensureBytes)("prehashed msgHash",s(e)));const b=O(e),v=m(t),E=[x(v),x(b)];if(null!=p){const e=!0===p?u(a.BYTES):p;E.push((0,o.ensureBytes)("extraEntropy",e,a.BYTES))}const S=i.concatBytes(...E),T=b;return{seed:S,k2sig:function(e){const t=B(e);if(!w(t))return;const r=y(t),n=g.BASE.multiply(t).toAffine(),i=d(n.x);if(i===c)return;const o=d(r*d(T+i*v));if(o===c)return;let s=(n.x===i?0:2)|Number(n.y&l),a=o;return f&&_(o)&&(a=function(e){return _(e)?d(-e):e}(o),s^=1),new A(i,a,s)}}}(e,t,n);return i.createHmacDrbg(r.hash.outputLen,r.nByteLength,r.hmac)(s,u)},verify:function(e,n,i,s=C){const a=e;if(n=(0,o.ensureBytes)("msgHash",n),i=(0,o.ensureBytes)("publicKey",i),"strict"in s)throw new Error("options.strict was renamed to lowS");const{lowS:u,prehash:c}=s;let l,f;try{if("string"==typeof a||a instanceof Uint8Array)try{l=A.fromDER(a)}catch(e){if(!(e instanceof t.DER.Err))throw e;l=A.fromCompact(a)}else{if("object"!=typeof a||"bigint"!=typeof a.r||"bigint"!=typeof a.s)throw new Error("PARSE");{const{r:e,s:t}=a;l=new A(e,t)}}f=g.fromHex(i)}catch(e){if("PARSE"===e.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(u&&l.hasHighS())return!1;c&&(n=r.hash(n));const{r:h,s:p}=l,m=O(n),b=y(p),w=d(m*b),v=d(h*b),_=g.BASE.multiplyAndAddUnsafe(f,w,v)?.toAffine();return!!_&&d(_.x)===h},ProjectivePoint:g,Signature:A,utils:S}},t.SWUFpSqrtRatio=y,t.mapToCurveSimpleSWU=function(e,t){if(n.validateField(e),!e.isValid(t.A)||!e.isValid(t.B)||!e.isValid(t.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const r=y(e,t.Z);if(!e.isOdd)throw new Error("Fp.isOdd is not implemented!");return n=>{let i,o,s,a,u,c,l,f;i=e.sqr(n),i=e.mul(i,t.Z),o=e.sqr(i),o=e.add(o,i),s=e.add(o,e.ONE),s=e.mul(s,t.B),a=e.cmov(t.Z,e.neg(o),!e.eql(o,e.ZERO)),a=e.mul(a,t.A),o=e.sqr(s),c=e.sqr(a),u=e.mul(c,t.A),o=e.add(o,u),o=e.mul(o,s),c=e.mul(c,a),u=e.mul(c,t.B),o=e.add(o,u),l=e.mul(i,s);const{isValid:h,value:d}=r(o,c);f=e.mul(i,n),f=e.mul(f,d),l=e.cmov(l,s,h),f=e.cmov(f,d,h);const p=e.isOdd(n)===e.isOdd(f);return f=e.cmov(e.neg(f),f,p),l=e.div(l,a),{x:l,y:f}}}},8358:(e,t,r)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.encodeToCurve=t.hashToCurve=t.schnorr=t.secp256k1=void 0;const i=r(6053),o=r(64),s=r(9530),a=r(7851),u=r(4323),c=r(1322),l=r(5887),f=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),h=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),d=BigInt(1),p=BigInt(2),y=(e,t)=>(e+t/p)/t;function g(e){const t=f,r=BigInt(3),n=BigInt(6),i=BigInt(11),o=BigInt(22),a=BigInt(23),u=BigInt(44),c=BigInt(88),l=e*e*e%t,h=l*l*e%t,d=(0,s.pow2)(h,r,t)*h%t,y=(0,s.pow2)(d,r,t)*h%t,g=(0,s.pow2)(y,p,t)*l%t,b=(0,s.pow2)(g,i,t)*g%t,w=(0,s.pow2)(b,o,t)*b%t,v=(0,s.pow2)(w,u,t)*w%t,_=(0,s.pow2)(v,c,t)*v%t,E=(0,s.pow2)(_,u,t)*w%t,A=(0,s.pow2)(E,r,t)*h%t,S=(0,s.pow2)(A,a,t)*b%t,T=(0,s.pow2)(S,n,t)*l%t,B=(0,s.pow2)(T,p,t);if(!m.eql(m.sqr(B),e))throw new Error("Cannot find square root");return B}const m=(0,s.Field)(f,void 0,void 0,{sqrt:g});t.secp256k1=(0,l.createCurve)({a:BigInt(0),b:BigInt(7),Fp:m,n:h,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=h,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-d*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=r,a=BigInt("0x100000000000000000000000000000000"),u=y(o*e,t),c=y(-n*e,t);let l=(0,s.mod)(e-u*r-c*i,t),f=(0,s.mod)(-u*n-c*o,t);const p=l>a,g=f>a;if(p&&(l=t-l),g&&(f=t-f),l>a||f>a)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:p,k1:l,k2neg:g,k2:f}}}},i.sha256);const b=BigInt(0),w=e=>"bigint"==typeof e&&b<e&&e<f,v={};function _(e,...t){let r=v[e];if(void 0===r){const t=(0,i.sha256)(Uint8Array.from(e,(e=>e.charCodeAt(0))));r=(0,u.concatBytes)(t,t),v[e]=r}return(0,i.sha256)((0,u.concatBytes)(r,...t))}const E=e=>e.toRawBytes(!0).slice(1),A=e=>(0,u.numberToBytesBE)(e,32),S=e=>(0,s.mod)(e,f),T=e=>(0,s.mod)(e,h),B=t.secp256k1.ProjectivePoint;function O(e){let r=t.secp256k1.utils.normPrivateKeyToScalar(e),n=B.fromPrivateKey(r);return{scalar:n.hasEvenY()?r:T(-r),bytes:E(n)}}function N(e){if(!w(e))throw new Error("bad x: need 0 < x < p");const t=S(e*e);let r=g(S(t*e+BigInt(7)));r%p!==b&&(r=S(-r));const n=new B(e,r,d);return n.assertValidity(),n}function x(...e){return T((0,u.bytesToNumberBE)(_("BIP0340/challenge",...e)))}function P(e,t,r){const n=(0,u.ensureBytes)("signature",e,64),i=(0,u.ensureBytes)("message",t),o=(0,u.ensureBytes)("publicKey",r,32);try{const e=N((0,u.bytesToNumberBE)(o)),t=(0,u.bytesToNumberBE)(n.subarray(0,32));if(!w(t))return!1;const r=(0,u.bytesToNumberBE)(n.subarray(32,64));if(!("bigint"==typeof(l=r)&&b<l&&l<h))return!1;const f=x(A(t),E(e),i),d=(s=e,a=r,c=T(-f),B.BASE.multiplyAndAddUnsafe(s,a,c));return!(!d||!d.hasEvenY()||d.toAffine().x!==t)}catch(e){return!1}var s,a,c,l}t.schnorr={getPublicKey:function(e){return O(e).bytes},sign:function(e,t,r=(0,o.randomBytes)(32)){const n=(0,u.ensureBytes)("message",e),{bytes:i,scalar:s}=O(t),a=(0,u.ensureBytes)("auxRand",r,32),c=A(s^(0,u.bytesToNumberBE)(_("BIP0340/aux",a))),l=_("BIP0340/nonce",c,i,n),f=T((0,u.bytesToNumberBE)(l));if(f===b)throw new Error("sign failed: k is zero");const{bytes:h,scalar:d}=O(f),p=x(h,i,n),y=new Uint8Array(64);if(y.set(h,0),y.set(A(T(d+p*s)),32),!P(y,n,i))throw new Error("sign: Invalid signature produced");return y},verify:P,utils:{randomPrivateKey:t.secp256k1.utils.randomPrivateKey,lift_x:N,pointToBytes:E,numberToBytesBE:u.numberToBytesBE,bytesToNumberBE:u.bytesToNumberBE,taggedHash:_,mod:s.mod}};const C=c.isogenyMap(m,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map((e=>e.map((e=>BigInt(e)))))),I=(0,a.mapToCurveSimpleSWU)(m,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:m.create(BigInt("-11"))});n=c.createHasher(t.secp256k1.ProjectivePoint,(e=>{const{x:t,y:r}=I(m.create(e[0]));return C(t,r)}),{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:m.ORDER,m:1,k:128,expand:"xmd",hash:i.sha256}),t.hashToCurve=n.hashToCurve,t.encodeToCurve=n.encodeToCurve},3525:(e,t)=>{"use strict";function r(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function n(e){if("boolean"!=typeof e)throw new Error(`Expected boolean, not ${e}`)}function i(e,...t){if(!(e instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new TypeError(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function o(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");r(e.outputLen),r(e.blockLen)}function s(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 a(e,t){i(e);const r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}Object.defineProperty(t,"__esModule",{value:!0}),t.output=t.exists=t.hash=t.bytes=t.bool=t.number=void 0,t.number=r,t.bool=n,t.bytes=i,t.hash=o,t.exists=s,t.output=a;const u={number:r,bool:n,bytes:i,hash:o,exists:s,output:a};t.default=u},9350:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SHA2=void 0;const n=r(3525),i=r(64);class o extends i.Hash{constructor(e,t,r,n){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,i.createView)(this.buffer)}update(e){n.default.exists(this);const{view:t,buffer:r,blockLen:o}=this,s=(e=(0,i.toBytes)(e)).length;for(let n=0;n<s;){const a=Math.min(o-this.pos,s-n);if(a!==o)r.set(e.subarray(n,n+a),this.pos),this.pos+=a,n+=a,this.pos===o&&(this.process(t,0),this.pos=0);else{const t=(0,i.createView)(e);for(;o<=s-n;n+=o)this.process(t,n)}}return this.length+=e.length,this.roundClean(),this}digestInto(e){n.default.exists(this),n.default.output(e,this),this.finished=!0;const{buffer:t,view:r,blockLen:o,isLE:s}=this;let{pos:a}=this;t[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>o-a&&(this.process(r,0),a=0);for(let e=a;e<o;e++)t[e]=0;!function(e,t,r,n){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);const i=BigInt(32),o=BigInt(4294967295),s=Number(r>>i&o),a=Number(r&o),u=n?4:0,c=n?0:4;e.setUint32(t+u,s,n),e.setUint32(t+c,a,n)}(r,o-8,BigInt(8*this.length),s),this.process(r,0);const u=(0,i.createView)(e),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=c/4,f=this.get();if(l>f.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<l;e++)u.setUint32(4*e,f[e],s)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:r,length:n,finished:i,destroyed:o,pos:s}=this;return e.length=n,e.pos=s,e.finished=i,e.destroyed=o,n%t&&e.buffer.set(r),e}}t.SHA2=o},1655:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.add=t.toBig=t.split=t.fromBig=void 0;const r=BigInt(2**32-1),n=BigInt(32);function i(e,t=!1){return t?{h:Number(e&r),l:Number(e>>n&r)}:{h:0|Number(e>>n&r),l:0|Number(e&r)}}function o(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let o=0;o<e.length;o++){const{h:s,l:a}=i(e[o],t);[r[o],n[o]]=[s,a]}return[r,n]}function s(e,t,r,n){const i=(t>>>0)+(n>>>0);return{h:e+r+(i/2**32|0)|0,l:0|i}}t.fromBig=i,t.split=o,t.toBig=(e,t)=>BigInt(e>>>0)<<n|BigInt(t>>>0),t.add=s;const a={fromBig:i,split:o,toBig:t.toBig,shrSH:(e,t,r)=>e>>>r,shrSL:(e,t,r)=>e<<32-r|t>>>r,rotrSH:(e,t,r)=>e>>>r|t<<32-r,rotrSL:(e,t,r)=>e<<32-r|t>>>r,rotrBH:(e,t,r)=>e<<64-r|t>>>r-32,rotrBL:(e,t,r)=>e>>>r-32|t<<64-r,rotr32H:(e,t)=>t,rotr32L:(e,t)=>e,rotlSH:(e,t,r)=>e<<r|t>>>32-r,rotlSL:(e,t,r)=>t<<r|e>>>32-r,rotlBH:(e,t,r)=>t<<r-32|e>>>64-r,rotlBL:(e,t,r)=>e<<r-32|t>>>64-r,add:s,add3L:(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),add3H:(e,t,r,n)=>t+r+n+(e/2**32|0)|0,add4L:(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0),add4H:(e,t,r,n,i)=>t+r+n+i+(e/2**32|0)|0,add5H:(e,t,r,n,i,o)=>t+r+n+i+o+(e/2**32|0)|0,add5L:(e,t,r,n,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(i>>>0)};t.default=a},825:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},1377:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hmac=void 0;const n=r(3525),i=r(64);class o extends i.Hash{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,n.default.hash(e);const r=(0,i.toBytes)(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new TypeError("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const o=this.blockLen,s=new Uint8Array(o);s.set(r.length>o?e.create().update(r).digest():r);for(let e=0;e<s.length;e++)s[e]^=54;this.iHash.update(s),this.oHash=e.create();for(let e=0;e<s.length;e++)s[e]^=106;this.oHash.update(s),s.fill(0)}update(e){return n.default.exists(this),this.iHash.update(e),this}digestInto(e){n.default.exists(this),n.default.bytes(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:r,finished:n,destroyed:i,blockLen:o,outputLen:s}=this;return e.finished=n,e.destroyed=i,e.blockLen=o,e.outputLen=s,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}t.hmac=(e,t,r)=>new o(e,t).update(r).digest(),t.hmac.create=(e,t)=>new o(e,t)},6053:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha224=t.sha256=void 0;const n=r(9350),i=r(64),o=(e,t,r)=>e&t^e&r^t&r,s=new Uint32Array([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]),a=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),u=new Uint32Array(64);class c extends n.SHA2{constructor(){super(64,32,8,!1),this.A=0|a[0],this.B=0|a[1],this.C=0|a[2],this.D=0|a[3],this.E=0|a[4],this.F=0|a[5],this.G=0|a[6],this.H=0|a[7]}get(){const{A:e,B:t,C:r,D:n,E:i,F:o,G:s,H:a}=this;return[e,t,r,n,i,o,s,a]}set(e,t,r,n,i,o,s,a){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|s,this.H=0|a}process(e,t){for(let r=0;r<16;r++,t+=4)u[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=u[e-15],r=u[e-2],n=(0,i.rotr)(t,7)^(0,i.rotr)(t,18)^t>>>3,o=(0,i.rotr)(r,17)^(0,i.rotr)(r,19)^r>>>10;u[e]=o+u[e-7]+n+u[e-16]|0}let{A:r,B:n,C:a,D:c,E:l,F:f,G:h,H:d}=this;for(let e=0;e<64;e++){const t=d+((0,i.rotr)(l,6)^(0,i.rotr)(l,11)^(0,i.rotr)(l,25))+((p=l)&f^~p&h)+s[e]+u[e]|0,y=((0,i.rotr)(r,2)^(0,i.rotr)(r,13)^(0,i.rotr)(r,22))+o(r,n,a)|0;d=h,h=f,f=l,l=c+t|0,c=a,a=n,n=r,r=t+y|0}var p;r=r+this.A|0,n=n+this.B|0,a=a+this.C|0,c=c+this.D|0,l=l+this.E|0,f=f+this.F|0,h=h+this.G|0,d=d+this.H|0,this.set(r,n,a,c,l,f,h,d)}roundClean(){u.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class l extends c{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}t.sha256=(0,i.wrapConstructor)((()=>new c)),t.sha224=(0,i.wrapConstructor)((()=>new l))},125:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shake256=t.shake128=t.keccak_512=t.keccak_384=t.keccak_256=t.keccak_224=t.sha3_512=t.sha3_384=t.sha3_256=t.sha3_224=t.Keccak=t.keccakP=void 0;const n=r(3525),i=r(1655),o=r(64),[s,a,u]=[[],[],[]],c=BigInt(0),l=BigInt(1),f=BigInt(2),h=BigInt(7),d=BigInt(256),p=BigInt(113);for(let e=0,t=l,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],s.push(2*(5*n+r)),a.push((e+1)*(e+2)/2%64);let i=c;for(let e=0;e<7;e++)t=(t<<l^(t>>h)*p)%d,t&f&&(i^=l<<(l<<BigInt(e))-l);u.push(i)}const[y,g]=i.default.split(u,!0),m=(e,t,r)=>r>32?i.default.rotlBH(e,t,r):i.default.rotlSH(e,t,r),b=(e,t,r)=>r>32?i.default.rotlBL(e,t,r):i.default.rotlSL(e,t,r);function w(e,t=24){const r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){const n=(t+8)%10,i=(t+2)%10,o=r[i],s=r[i+1],a=m(o,s,1)^r[n],u=b(o,s,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=a,e[t+r+1]^=u}let t=e[2],i=e[3];for(let r=0;r<24;r++){const n=a[r],o=m(t,i,n),u=b(t,i,n),c=s[r];t=e[c],i=e[c+1],e[c]=o,e[c+1]=u}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=y[n],e[1]^=g[n]}r.fill(0)}t.keccakP=w;class v extends o.Hash{constructor(e,t,r,i=!1,s=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=i,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,n.default.number(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,o.u32)(this.state)}keccak(){w(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){n.default.exists(this);const{blockLen:t,state:r}=this,i=(e=(0,o.toBytes)(e)).length;for(let n=0;n<i;){const o=Math.min(t-this.pos,i-n);for(let t=0;t<o;t++)r[this.pos++]^=e[n++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:r,blockLen:n}=this;e[r]^=t,0!=(128&t)&&r===n-1&&this.keccak(),e[n-1]^=128,this.keccak()}writeInto(e){n.default.exists(this,!1),n.default.bytes(e),this.finish();const t=this.state,{blockLen:r}=this;for(let n=0,i=e.length;n<i;){this.posOut>=r&&this.keccak();const o=Math.min(r-this.posOut,i-n);e.set(t.subarray(this.posOut,this.posOut+o),n),this.posOut+=o,n+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return n.default.number(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(n.default.output(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:r,outputLen:n,rounds:i,enableXOF:o}=this;return e||(e=new v(t,r,n,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=r,e.outputLen=n,e.enableXOF=o,e.destroyed=this.destroyed,e}}t.Keccak=v;const _=(e,t,r)=>(0,o.wrapConstructor)((()=>new v(t,e,r)));t.sha3_224=_(6,144,28),t.sha3_256=_(6,136,32),t.sha3_384=_(6,104,48),t.sha3_512=_(6,72,64),t.keccak_224=_(1,144,28),t.keccak_256=_(1,136,32),t.keccak_384=_(1,104,48),t.keccak_512=_(1,72,64);const E=(e,t,r)=>(0,o.wrapConstructorWithOpts)(((n={})=>new v(t,e,void 0===n.dkLen?r:n.dkLen,!0)));t.shake128=E(31,168,16),t.shake256=E(31,136,32)},64:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.wrapConstructorWithOpts=t.wrapConstructor=t.checkOpts=t.Hash=t.concatBytes=t.toBytes=t.utf8ToBytes=t.asyncLoop=t.nextTick=t.hexToBytes=t.bytesToHex=t.isLE=t.rotr=t.createView=t.u32=t.u8=void 0;const n=r(825);if(t.u8=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),t.u32=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),t.createView=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),t.rotr=(e,t)=>e<<32-t|e>>>t,t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!t.isLE)throw new Error("Non little-endian hardware is not supported");const i=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function o(e){if("string"!=typeof e)throw new TypeError("utf8ToBytes expected string, got "+typeof e);return(new TextEncoder).encode(e)}function s(e){if("string"==typeof e&&(e=o(e)),!(e instanceof Uint8Array))throw new TypeError(`Expected input type is Uint8Array (got ${typeof e})`);return e}t.bytesToHex=function(e){if(!(e instanceof Uint8Array))throw new Error("Uint8Array expected");let t="";for(let r=0;r<e.length;r++)t+=i[e[r]];return t},t.hexToBytes=function(e){if("string"!=typeof e)throw new TypeError("hexToBytes: expected string, got "+typeof e);if(e.length%2)throw new Error("hexToBytes: received invalid unpadded hex");const t=new Uint8Array(e.length/2);for(let r=0;r<t.length;r++){const n=2*r,i=e.slice(n,n+2),o=Number.parseInt(i,16);if(Number.isNaN(o)||o<0)throw new Error("Invalid byte sequence");t[r]=o}return t},t.nextTick=async()=>{},t.asyncLoop=async function(e,r,n){let i=Date.now();for(let o=0;o<e;o++){n(o);const e=Date.now()-i;e>=0&&e<r||(await(0,t.nextTick)(),i+=e)}},t.utf8ToBytes=o,t.toBytes=s,t.concatBytes=function(...e){if(!e.every((e=>e instanceof Uint8Array)))throw new Error("Uint8Array list expected");if(1===e.length)return e[0];const t=e.reduce(((e,t)=>e+t.length),0),r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){const i=e[t];r.set(i,n),n+=i.length}return r},t.Hash=class{clone(){return this._cloneInto()}},t.checkOpts=function(e,t){if(void 0!==t&&("object"!=typeof t||(r=t,"[object Object]"!==Object.prototype.toString.call(r)||r.constructor!==Object)))throw new TypeError("Options should be object or undefined");var r;return Object.assign(e,t)},t.wrapConstructor=function(e){const t=t=>e().update(s(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t},t.wrapConstructorWithOpts=function(e){const t=(t,r)=>e(r).update(s(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},t.randomBytes=function(e=32){if(n.crypto&&"function"==typeof n.crypto.getRandomValues)return n.crypto.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}},2349:(e,t,r)=>{"use strict";const{AbortError:n,codes:i}=r(2415),{isNodeStream:o,isWebStream:s,kControllerErrorFunction:a}=r(6140),u=r(3803),{ERR_INVALID_ARG_TYPE:c}=i;e.exports.addAbortSignal=function(t,r){if(((e,t)=>{if("object"!=typeof e||!("aborted"in e))throw new c("signal","AbortSignal",e)})(t),!o(r)&&!s(r))throw new c("stream",["ReadableStream","WritableStream","Stream"],r);return e.exports.addAbortSignalNoValidate(t,r)},e.exports.addAbortSignalNoValidate=function(e,t){if("object"!=typeof e||!("aborted"in e))return t;const r=o(t)?()=>{t.destroy(new n(void 0,{cause:e.reason}))}:()=>{t[a](new n(void 0,{cause:e.reason}))};return e.aborted?r():(e.addEventListener("abort",r),u(t,(()=>e.removeEventListener("abort",r)))),t}},4250:(e,t,r)=>{"use strict";const{StringPrototypeSlice:n,SymbolIterator:i,TypedArrayPrototypeSet:o,Uint8Array:s}=r(5439),{Buffer:a}=r(8834),{inspect:u}=r(9928);e.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(e){const t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}unshift(e){const t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}shift(){if(0===this.length)return;const e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}clear(){this.head=this.tail=null,this.length=0}join(e){if(0===this.length)return"";let t=this.head,r=""+t.data;for(;null!==(t=t.next);)r+=e+t.data;return r}concat(e){if(0===this.length)return a.alloc(0);const t=a.allocUnsafe(e>>>0);let r=this.head,n=0;for(;r;)o(t,r.data,n),n+=r.data.length,r=r.next;return t}consume(e,t){const r=this.head.data;if(e<r.length){const t=r.slice(0,e);return this.head.data=r.slice(e),t}return e===r.length?this.shift():t?this._getString(e):this._getBuffer(e)}first(){return this.head.data}*[i](){for(let e=this.head;e;e=e.next)yield e.data}_getString(e){let t="",r=this.head,i=0;do{const o=r.data;if(!(e>o.length)){e===o.length?(t+=o,++i,r.next?this.head=r.next:this.head=this.tail=null):(t+=n(o,0,e),this.head=r,r.data=n(o,e));break}t+=o,e-=o.length,++i}while(null!==(r=r.next));return this.length-=i,t}_getBuffer(e){const t=a.allocUnsafe(e),r=e;let n=this.head,i=0;do{const a=n.data;if(!(e>a.length)){e===a.length?(o(t,a,r-e),++i,n.next?this.head=n.next:this.head=this.tail=null):(o(t,new s(a.buffer,a.byteOffset,e),r-e),this.head=n,n.data=a.slice(e));break}o(t,a,r-e),e-=a.length,++i}while(null!==(n=n.next));return this.length-=i,t}[Symbol.for("nodejs.util.inspect.custom")](e,t){return u(this,{...t,depth:0,customInspect:!1})}}},5291:(e,t,r)=>{"use strict";const{pipeline:n}=r(7253),i=r(8637),{destroyer:o}=r(4664),{isNodeStream:s,isReadable:a,isWritable:u,isWebStream:c,isTransformStream:l,isWritableStream:f,isReadableStream:h}=r(6140),{AbortError:d,codes:{ERR_INVALID_ARG_VALUE:p,ERR_MISSING_ARGS:y}}=r(2415),g=r(3803);e.exports=function(...e){if(0===e.length)throw new y("streams");if(1===e.length)return i.from(e[0]);const t=[...e];if("function"==typeof e[0]&&(e[0]=i.from(e[0])),"function"==typeof e[e.length-1]){const t=e.length-1;e[t]=i.from(e[t])}for(let r=0;r<e.length;++r)if(s(e[r])||c(e[r])){if(r<e.length-1&&!(a(e[r])||h(e[r])||l(e[r])))throw new p(`streams[${r}]`,t[r],"must be readable");if(r>0&&!(u(e[r])||f(e[r])||l(e[r])))throw new p(`streams[${r}]`,t[r],"must be writable")}let r,m,b,w,v;const _=e[0],E=n(e,(function(e){const t=w;w=null,t?t(e):e?v.destroy(e):S||A||v.destroy()})),A=!!(u(_)||f(_)||l(_)),S=!!(a(E)||h(E)||l(E));if(v=new i({writableObjectMode:!(null==_||!_.writableObjectMode),readableObjectMode:!(null==E||!E.writableObjectMode),writable:A,readable:S}),A){if(s(_))v._write=function(e,t,n){_.write(e,t)?n():r=n},v._final=function(e){_.end(),m=e},_.on("drain",(function(){if(r){const e=r;r=null,e()}}));else if(c(_)){const e=(l(_)?_.writable:_).getWriter();v._write=async function(t,r,n){try{await e.ready,e.write(t).catch((()=>{})),n()}catch(e){n(e)}},v._final=async function(t){try{await e.ready,e.close().catch((()=>{})),m=t}catch(e){t(e)}}}const e=l(E)?E.readable:E;g(e,(()=>{if(m){const e=m;m=null,e()}}))}if(S)if(s(E))E.on("readable",(function(){if(b){const e=b;b=null,e()}})),E.on("end",(function(){v.push(null)})),v._read=function(){for(;;){const e=E.read();if(null===e)return void(b=v._read);if(!v.push(e))return}};else if(c(E)){const e=(l(E)?E.readable:E).getReader();v._read=async function(){for(;;)try{const{value:t,done:r}=await e.read();if(!v.push(t))return;if(r)return void v.push(null)}catch{return}}}return v._destroy=function(e,t){e||null===w||(e=new d),b=null,r=null,m=null,null===w?t(e):(w=t,s(E)&&o(E,e))},v}},4664:(e,t,r)=>{"use strict";const n=r(4406),{aggregateTwoErrors:i,codes:{ERR_MULTIPLE_CALLBACK:o},AbortError:s}=r(2415),{Symbol:a}=r(5439),{kDestroyed:u,isDestroyed:c,isFinished:l,isServerRequest:f}=r(6140),h=a("kDestroy"),d=a("kConstruct");function p(e,t,r){e&&(e.stack,t&&!t.errored&&(t.errored=e),r&&!r.errored&&(r.errored=e))}function y(e,t,r){let i=!1;function o(t){if(i)return;i=!0;const o=e._readableState,s=e._writableState;p(t,s,o),s&&(s.closed=!0),o&&(o.closed=!0),"function"==typeof r&&r(t),t?n.nextTick(g,e,t):n.nextTick(m,e)}try{e._destroy(t||null,o)}catch(t){o(t)}}function g(e,t){b(e,t),m(e)}function m(e){const t=e._readableState,r=e._writableState;r&&(r.closeEmitted=!0),t&&(t.closeEmitted=!0),(null!=r&&r.emitClose||null!=t&&t.emitClose)&&e.emit("close")}function b(e,t){const r=e._readableState,n=e._writableState;null!=n&&n.errorEmitted||null!=r&&r.errorEmitted||(n&&(n.errorEmitted=!0),r&&(r.errorEmitted=!0),e.emit("error",t))}function w(e,t,r){const i=e._readableState,o=e._writableState;if(null!=o&&o.destroyed||null!=i&&i.destroyed)return this;null!=i&&i.autoDestroy||null!=o&&o.autoDestroy?e.destroy(t):t&&(t.stack,o&&!o.errored&&(o.errored=t),i&&!i.errored&&(i.errored=t),r?n.nextTick(b,e,t):b(e,t))}function v(e){let t=!1;function r(r){if(t)return void w(e,null!=r?r:new o);t=!0;const i=e._readableState,s=e._writableState,a=s||i;i&&(i.constructed=!0),s&&(s.constructed=!0),a.destroyed?e.emit(h,r):r?w(e,r,!0):n.nextTick(_,e)}try{e._construct((e=>{n.nextTick(r,e)}))}catch(e){n.nextTick(r,e)}}function _(e){e.emit(d)}function E(e){return(null==e?void 0:e.setHeader)&&"function"==typeof e.abort}function A(e){e.emit("close")}function S(e,t){e.emit("error",t),n.nextTick(A,e)}e.exports={construct:function(e,t){if("function"!=typeof e._construct)return;const r=e._readableState,i=e._writableState;r&&(r.constructed=!1),i&&(i.constructed=!1),e.once(d,t),e.listenerCount(d)>1||n.nextTick(v,e)},destroyer:function(e,t){e&&!c(e)&&(t||l(e)||(t=new s),f(e)?(e.socket=null,e.destroy(t)):E(e)?e.abort():E(e.req)?e.req.abort():"function"==typeof e.destroy?e.destroy(t):"function"==typeof e.close?e.close():t?n.nextTick(S,e,t):n.nextTick(A,e),e.destroyed||(e[u]=!0))},destroy:function(e,t){const r=this._readableState,n=this._writableState,o=n||r;return null!=n&&n.destroyed||null!=r&&r.destroyed?("function"==typeof t&&t(),this):(p(e,n,r),n&&(n.destroyed=!0),r&&(r.destroyed=!0),o.constructed?y(this,e,t):this.once(h,(function(r){y(this,i(r,e),t)})),this)},undestroy:function(){const e=this._readableState,t=this._writableState;e&&(e.constructed=!0,e.closed=!1,e.closeEmitted=!1,e.destroyed=!1,e.errored=null,e.errorEmitted=!1,e.reading=!1,e.ended=!1===e.readable,e.endEmitted=!1===e.readable),t&&(t.constructed=!0,t.destroyed=!1,t.closed=!1,t.closeEmitted=!1,t.errored=null,t.errorEmitted=!1,t.finalCalled=!1,t.prefinished=!1,t.ended=!1===t.writable,t.ending=!1===t.writable,t.finished=!1===t.writable)},errorOrDestroy:w}},8637:(e,t,r)=>{"use strict";const{ObjectDefineProperties:n,ObjectGetOwnPropertyDescriptor:i,ObjectKeys:o,ObjectSetPrototypeOf:s}=r(5439);e.exports=c;const a=r(538),u=r(4695);s(c.prototype,a.prototype),s(c,a);{const e=o(u.prototype);for(let t=0;t<e.length;t++){const r=e[t];c.prototype[r]||(c.prototype[r]=u.prototype[r])}}function c(e){if(!(this instanceof c))return new c(e);a.call(this,e),u.call(this,e),e?(this.allowHalfOpen=!1!==e.allowHalfOpen,!1===e.readable&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===e.writable&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}let l,f;function h(){return void 0===l&&(l={}),l}n(c.prototype,{writable:{__proto__:null,...i(u.prototype,"writable")},writableHighWaterMark:{__proto__:null,...i(u.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...i(u.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...i(u.prototype,"writableBuffer")},writableLength:{__proto__:null,...i(u.prototype,"writableLength")},writableFinished:{__proto__:null,...i(u.prototype,"writableFinished")},writableCorked:{__proto__:null,...i(u.prototype,"writableCorked")},writableEnded:{__proto__:null,...i(u.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...i(u.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set(e){this._readableState&&this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}}),c.fromWeb=function(e,t){return h().newStreamDuplexFromReadableWritablePair(e,t)},c.toWeb=function(e){return h().newReadableWritablePairFromDuplex(e)},c.from=function(e){return f||(f=r(325)),f(e,"body")}},325:(e,t,r)=>{const n=r(4406),i=r(8834),{isReadable:o,isWritable:s,isIterable:a,isNodeStream:u,isReadableNodeStream:c,isWritableNodeStream:l,isDuplexNodeStream:f}=r(6140),h=r(3803),{AbortError:d,codes:{ERR_INVALID_ARG_TYPE:p,ERR_INVALID_RETURN_VALUE:y}}=r(2415),{destroyer:g}=r(4664),m=r(8637),b=r(538),{createDeferredPromise:w}=r(9928),v=r(8236),_=globalThis.Blob||i.Blob,E=void 0!==_?function(e){return e instanceof _}:function(e){return!1},A=globalThis.AbortController||r(7948).AbortController,{FunctionPrototypeCall:S}=r(5439);class T extends m{constructor(e){super(e),!1===(null==e?void 0:e.readable)&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===(null==e?void 0:e.writable)&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}function B(e){const t=e.readable&&"function"!=typeof e.readable.read?b.wrap(e.readable):e.readable,r=e.writable;let n,i,a,u,c,l=!!o(t),f=!!s(r);function p(e){const t=u;u=null,t?t(e):e&&c.destroy(e)}return c=new T({readableObjectMode:!(null==t||!t.readableObjectMode),writableObjectMode:!(null==r||!r.writableObjectMode),readable:l,writable:f}),f&&(h(r,(e=>{f=!1,e&&g(t,e),p(e)})),c._write=function(e,t,i){r.write(e,t)?i():n=i},c._final=function(e){r.end(),i=e},r.on("drain",(function(){if(n){const e=n;n=null,e()}})),r.on("finish",(function(){if(i){const e=i;i=null,e()}}))),l&&(h(t,(e=>{l=!1,e&&g(t,e),p(e)})),t.on("readable",(function(){if(a){const e=a;a=null,e()}})),t.on("end",(function(){c.push(null)})),c._read=function(){for(;;){const e=t.read();if(null===e)return void(a=c._read);if(!c.push(e))return}}),c._destroy=function(e,o){e||null===u||(e=new d),a=null,n=null,i=null,null===u?o(e):(u=o,g(r,e),g(t,e))},c}e.exports=function e(t,r){if(f(t))return t;if(c(t))return B({readable:t});if(l(t))return B({writable:t});if(u(t))return B({writable:!1,readable:!1});if("function"==typeof t){const{value:e,write:i,final:o,destroy:s}=function(e){let{promise:t,resolve:r}=w();const i=new A,o=i.signal;return{value:e(async function*(){for(;;){const e=t;t=null;const{chunk:i,done:s,cb:a}=await e;if(n.nextTick(a),s)return;if(o.aborted)throw new d(void 0,{cause:o.reason});({promise:t,resolve:r}=w()),yield i}}(),{signal:o}),write(e,t,n){const i=r;r=null,i({chunk:e,done:!1,cb:n})},final(e){const t=r;r=null,t({done:!0,cb:e})},destroy(e,t){i.abort(),t(e)}}}(t);if(a(e))return v(T,e,{objectMode:!0,write:i,final:o,destroy:s});const u=null==e?void 0:e.then;if("function"==typeof u){let t;const r=S(u,e,(e=>{if(null!=e)throw new y("nully","body",e)}),(e=>{g(t,e)}));return t=new T({objectMode:!0,readable:!1,write:i,final(e){o((async()=>{try{await r,n.nextTick(e,null)}catch(t){n.nextTick(e,t)}}))},destroy:s})}throw new y("Iterable, AsyncIterable or AsyncFunction",r,e)}if(E(t))return e(t.arrayBuffer());if(a(t))return v(T,t,{objectMode:!0,writable:!1});if("object"==typeof(null==t?void 0:t.writable)||"object"==typeof(null==t?void 0:t.readable))return B({readable:null!=t&&t.readable?c(null==t?void 0:t.readable)?null==t?void 0:t.readable:e(t.readable):void 0,writable:null!=t&&t.writable?l(null==t?void 0:t.writable)?null==t?void 0:t.writable:e(t.writable):void 0});const i=null==t?void 0:t.then;if("function"==typeof i){let e;return S(i,t,(t=>{null!=t&&e.push(t),e.push(null)}),(t=>{g(e,t)})),e=new T({objectMode:!0,writable:!1,read(){}})}throw new p(r,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],t)}},3803:(e,t,r)=>{const n=r(4406),{AbortError:i,codes:o}=r(2415),{ERR_INVALID_ARG_TYPE:s,ERR_STREAM_PREMATURE_CLOSE:a}=o,{kEmptyObject:u,once:c}=r(9928),{validateAbortSignal:l,validateFunction:f,validateObject:h,validateBoolean:d}=r(1670),{Promise:p,PromisePrototypeThen:y}=r(5439),{isClosed:g,isReadable:m,isReadableNodeStream:b,isReadableStream:w,isReadableFinished:v,isReadableErrored:_,isWritable:E,isWritableNodeStream:A,isWritableStream:S,isWritableFinished:T,isWritableErrored:B,isNodeStream:O,willEmitClose:N,kIsClosedPromise:x}=r(6140),P=()=>{};function C(e,t,r){var o,d;if(2===arguments.length?(r=t,t=u):null==t?t=u:h(t,"options"),f(r,"callback"),l(t.signal,"options.signal"),r=c(r),w(e)||S(e))return function(e,t,r){let o=!1,s=P;if(t.signal)if(s=()=>{o=!0,r.call(e,new i(void 0,{cause:t.signal.reason}))},t.signal.aborted)n.nextTick(s);else{const n=r;r=c(((...r)=>{t.signal.removeEventListener("abort",s),n.apply(e,r)})),t.signal.addEventListener("abort",s)}const a=(...t)=>{o||n.nextTick((()=>r.apply(e,t)))};return y(e[x].promise,a,a),P}(e,t,r);if(!O(e))throw new s("stream",["ReadableStream","WritableStream","Stream"],e);const p=null!==(o=t.readable)&&void 0!==o?o:b(e),C=null!==(d=t.writable)&&void 0!==d?d:A(e),I=e._writableState,R=e._readableState,L=()=>{e.writable||M()};let j=N(e)&&b(e)===p&&A(e)===C,k=T(e,!1);const M=()=>{k=!0,e.destroyed&&(j=!1),(!j||e.readable&&!p)&&(p&&!U||r.call(e))};let U=v(e,!1);const z=()=>{U=!0,e.destroyed&&(j=!1),(!j||e.writable&&!C)&&(C&&!k||r.call(e))},D=t=>{r.call(e,t)};let F=g(e);const V=()=>{F=!0;const t=B(e)||_(e);return t&&"boolean"!=typeof t?r.call(e,t):p&&!U&&b(e,!0)&&!v(e,!1)?r.call(e,new a):!C||k||T(e,!1)?void r.call(e):r.call(e,new a)},$=()=>{F=!0;const t=B(e)||_(e);if(t&&"boolean"!=typeof t)return r.call(e,t);r.call(e)},H=()=>{e.req.on("finish",M)};!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?C&&!I&&(e.on("end",L),e.on("close",L)):(e.on("complete",M),j||e.on("abort",V),e.req?H():e.on("request",H)),j||"boolean"!=typeof e.aborted||e.on("aborted",V),e.on("end",z),e.on("finish",M),!1!==t.error&&e.on("error",D),e.on("close",V),F?n.nextTick(V):null!=I&&I.errorEmitted||null!=R&&R.errorEmitted?j||n.nextTick($):(p||j&&!m(e)||!k&&!1!==E(e))&&(C||j&&!E(e)||!U&&!1!==m(e))?R&&e.req&&e.aborted&&n.nextTick($):n.nextTick($);const W=()=>{r=P,e.removeListener("aborted",V),e.removeListener("complete",M),e.removeListener("abort",V),e.removeListener("request",H),e.req&&e.req.removeListener("finish",M),e.removeListener("end",L),e.removeListener("close",L),e.removeListener("finish",M),e.removeListener("end",z),e.removeListener("error",D),e.removeListener("close",V)};if(t.signal&&!F){const o=()=>{const n=r;W(),n.call(e,new i(void 0,{cause:t.signal.reason}))};if(t.signal.aborted)n.nextTick(o);else{const n=r;r=c(((...r)=>{t.signal.removeEventListener("abort",o),n.apply(e,r)})),t.signal.addEventListener("abort",o)}}return W}e.exports=C,e.exports.finished=function(e,t){var r;let n=!1;return null===t&&(t=u),null!==(r=t)&&void 0!==r&&r.cleanup&&(d(t.cleanup,"cleanup"),n=t.cleanup),new p(((r,i)=>{const o=C(e,t,(e=>{n&&o(),e?i(e):r()}))}))}},8236:(e,t,r)=>{"use strict";const n=r(4406),{PromisePrototypeThen:i,SymbolAsyncIterator:o,SymbolIterator:s}=r(5439),{Buffer:a}=r(8834),{ERR_INVALID_ARG_TYPE:u,ERR_STREAM_NULL_VALUES:c}=r(2415).codes;e.exports=function(e,t,r){let l,f;if("string"==typeof t||t instanceof a)return new e({objectMode:!0,...r,read(){this.push(t),this.push(null)}});if(t&&t[o])f=!0,l=t[o]();else{if(!t||!t[s])throw new u("iterable",["Iterable"],t);f=!1,l=t[s]()}const h=new e({objectMode:!0,highWaterMark:1,...r});let d=!1;return h._read=function(){d||(d=!0,async function(){for(;;){try{const{value:e,done:t}=f?await l.next():l.next();if(t)h.push(null);else{const t=e&&"function"==typeof e.then?await e:e;if(null===t)throw d=!1,new c;if(h.push(t))continue;d=!1}}catch(e){h.destroy(e)}break}}())},h._destroy=function(e,t){i(async function(e){const t=null!=e,r="function"==typeof l.throw;if(t&&r){const{value:t,done:r}=await l.throw(e);if(await t,r)return}if("function"==typeof l.return){const{value:e}=await l.return();await e}}(e),(()=>n.nextTick(t,e)),(r=>n.nextTick(t,r||e)))},h}},6767:(e,t,r)=>{"use strict";const{ArrayIsArray:n,ObjectSetPrototypeOf:i}=r(5439),{EventEmitter:o}=r(2699);function s(e){o.call(this,e)}function a(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?n(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}i(s.prototype,o.prototype),i(s,o),s.prototype.pipe=function(e,t){const r=this;function n(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function i(){r.readable&&r.resume&&r.resume()}r.on("data",n),e.on("drain",i),e._isStdio||t&&!1===t.end||(r.on("end",u),r.on("close",c));let s=!1;function u(){s||(s=!0,e.end())}function c(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function l(e){f(),0===o.listenerCount(this,"error")&&this.emit("error",e)}function f(){r.removeListener("data",n),e.removeListener("drain",i),r.removeListener("end",u),r.removeListener("close",c),r.removeListener("error",l),e.removeListener("error",l),r.removeListener("end",f),r.removeListener("close",f),e.removeListener("close",f)}return a(r,"error",l),a(e,"error",l),r.on("end",f),r.on("close",f),e.on("close",f),e.emit("pipe",r),e},e.exports={Stream:s,prependListener:a}},2542:(e,t,r)=>{"use strict";const n=globalThis.AbortController||r(7948).AbortController,{codes:{ERR_INVALID_ARG_VALUE:i,ERR_INVALID_ARG_TYPE:o,ERR_MISSING_ARGS:s,ERR_OUT_OF_RANGE:a},AbortError:u}=r(2415),{validateAbortSignal:c,validateInteger:l,validateObject:f}=r(1670),h=r(5439).Symbol("kWeak"),{finished:d}=r(3803),p=r(5291),{addAbortSignalNoValidate:y}=r(2349),{isWritable:g,isNodeStream:m}=r(6140),{ArrayPrototypePush:b,MathFloor:w,Number:v,NumberIsNaN:_,Promise:E,PromiseReject:A,PromisePrototypeThen:S,Symbol:T}=r(5439),B=T("kEmpty"),O=T("kEof");function N(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&c(t.signal,"options.signal");let r=1;return null!=(null==t?void 0:t.concurrency)&&(r=w(t.concurrency)),l(r,"concurrency",1),async function*(){var i,o;const s=new n,a=this,c=[],l=s.signal,f={signal:l},h=()=>s.abort();let d,p;null!=t&&null!==(i=t.signal)&&void 0!==i&&i.aborted&&h(),null==t||null===(o=t.signal)||void 0===o||o.addEventListener("abort",h);let y=!1;function g(){y=!0}!async function(){try{for await(let t of a){var n;if(y)return;if(l.aborted)throw new u;try{t=e(t,f)}catch(e){t=A(e)}t!==B&&("function"==typeof(null===(n=t)||void 0===n?void 0:n.catch)&&t.catch(g),c.push(t),d&&(d(),d=null),!y&&c.length&&c.length>=r&&await new E((e=>{p=e})))}c.push(O)}catch(e){const t=A(e);S(t,void 0,g),c.push(t)}finally{var i;y=!0,d&&(d(),d=null),null==t||null===(i=t.signal)||void 0===i||i.removeEventListener("abort",h)}}();try{for(;;){for(;c.length>0;){const e=await c[0];if(e===O)return;if(l.aborted)throw new u;e!==B&&(yield e),c.shift(),p&&(p(),p=null)}await new E((e=>{d=e}))}}finally{s.abort(),y=!0,p&&(p(),p=null)}}.call(this)}async function x(e,t=void 0){for await(const r of P.call(this,e,t))return!0;return!1}function P(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);return N.call(this,(async function(t,r){return await e(t,r)?t:B}),t)}class C extends s{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}function I(e){if(e=v(e),_(e))return 0;if(e<0)throw new a("number",">= 0",e);return e}e.exports.streamReturningOperators={asIndexedPairs:function(e=void 0){return null!=e&&f(e,"options"),null!=(null==e?void 0:e.signal)&&c(e.signal,"options.signal"),async function*(){let t=0;for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new u({cause:e.signal.reason});yield[t++,n]}}.call(this)},drop:function(e,t=void 0){return null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&c(t.signal,"options.signal"),e=I(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new u;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new u;e--<=0&&(yield r)}}.call(this)},filter:P,flatMap:function(e,t){const r=N.call(this,e,t);return async function*(){for await(const e of r)yield*e}.call(this)},map:N,take:function(e,t=void 0){return null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&c(t.signal,"options.signal"),e=I(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new u;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new u;if(!(e-- >0))return;yield r}}.call(this)},compose:function(e,t){if(null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&c(t.signal,"options.signal"),m(e)&&!g(e))throw new i("stream",e,"must be writable");const r=p(this,e);return null!=t&&t.signal&&y(t.signal,r),r}},e.exports.promiseReturningOperators={every:async function(e,t=void 0){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);return!await x.call(this,(async(...t)=>!await e(...t)),t)},forEach:async function(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);for await(const r of N.call(this,(async function(t,r){return await e(t,r),B}),t));},reduce:async function(e,t,r){var i;if("function"!=typeof e)throw new o("reducer",["Function","AsyncFunction"],e);null!=r&&f(r,"options"),null!=(null==r?void 0:r.signal)&&c(r.signal,"options.signal");let s=arguments.length>1;if(null!=r&&null!==(i=r.signal)&&void 0!==i&&i.aborted){const e=new u(void 0,{cause:r.signal.reason});throw this.once("error",(()=>{})),await d(this.destroy(e)),e}const a=new n,l=a.signal;if(null!=r&&r.signal){const e={once:!0,[h]:this};r.signal.addEventListener("abort",(()=>a.abort()),e)}let p=!1;try{for await(const n of this){var y;if(p=!0,null!=r&&null!==(y=r.signal)&&void 0!==y&&y.aborted)throw new u;s?t=await e(t,n,{signal:l}):(t=n,s=!0)}if(!p&&!s)throw new C}finally{a.abort()}return t},toArray:async function(e){null!=e&&f(e,"options"),null!=(null==e?void 0:e.signal)&&c(e.signal,"options.signal");const t=[];for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new u(void 0,{cause:e.signal.reason});b(t,n)}return t},some:x,find:async function(e,t){for await(const r of P.call(this,e,t))return r}}},1753:(e,t,r)=>{"use strict";const{ObjectSetPrototypeOf:n}=r(5439);e.exports=o;const i=r(9643);function o(e){if(!(this instanceof o))return new o(e);i.call(this,e)}n(o.prototype,i.prototype),n(o,i),o.prototype._transform=function(e,t,r){r(null,e)}},7253:(e,t,r)=>{const n=r(4406),{ArrayIsArray:i,Promise:o,SymbolAsyncIterator:s}=r(5439),a=r(3803),{once:u}=r(9928),c=r(4664),l=r(8637),{aggregateTwoErrors:f,codes:{ERR_INVALID_ARG_TYPE:h,ERR_INVALID_RETURN_VALUE:d,ERR_MISSING_ARGS:p,ERR_STREAM_DESTROYED:y,ERR_STREAM_PREMATURE_CLOSE:g},AbortError:m}=r(2415),{validateFunction:b,validateAbortSignal:w}=r(1670),{isIterable:v,isReadable:_,isReadableNodeStream:E,isNodeStream:A,isTransformStream:S,isWebStream:T,isReadableStream:B,isReadableEnded:O}=r(6140),N=globalThis.AbortController||r(7948).AbortController;let x,P;function C(e,t,r){let n=!1;return e.on("close",(()=>{n=!0})),{destroy:t=>{n||(n=!0,c.destroyer(e,t||new y("pipe")))},cleanup:a(e,{readable:t,writable:r},(e=>{n=!e}))}}function I(e){if(v(e))return e;if(E(e))return async function*(e){P||(P=r(538)),yield*P.prototype[s].call(e)}(e);throw new h("val",["Readable","Iterable","AsyncIterable"],e)}async function R(e,t,r,{end:n}){let i,s=null;const u=e=>{if(e&&(i=e),s){const e=s;s=null,e()}},c=()=>new o(((e,t)=>{i?t(i):s=()=>{i?t(i):e()}}));t.on("drain",u);const l=a(t,{readable:!1},u);try{t.writableNeedDrain&&await c();for await(const r of e)t.write(r)||await c();n&&t.end(),await c(),r()}catch(e){r(i!==e?f(i,e):e)}finally{l(),t.off("drain",u)}}async function L(e,t,r,{end:n}){S(t)&&(t=t.writable);const i=t.getWriter();try{for await(const t of e)await i.ready,i.write(t).catch((()=>{}));await i.ready,n&&await i.close(),r()}catch(e){try{await i.abort(e),r(e)}catch(e){r(e)}}}function j(e,t,o){if(1===e.length&&i(e[0])&&(e=e[0]),e.length<2)throw new p("streams");const s=new N,a=s.signal,u=null==o?void 0:o.signal,c=[];function f(){M(new m)}let y,g;w(u,"options.signal"),null==u||u.addEventListener("abort",f);const b=[];let O,P=0;function j(e){M(e,0==--P)}function M(e,r){if(!e||y&&"ERR_STREAM_PREMATURE_CLOSE"!==y.code||(y=e),y||r){for(;b.length;)b.shift()(y);null==u||u.removeEventListener("abort",f),s.abort(),r&&(y||c.forEach((e=>e())),n.nextTick(t,y,g))}}for(let F=0;F<e.length;F++){const V=e[F],$=F<e.length-1,H=F>0,W=$||!1!==(null==o?void 0:o.end),q=F===e.length-1;if(A(V)){if(W){const{destroy:G,cleanup:K}=C(V,$,H);b.push(G),_(V)&&q&&c.push(K)}function U(e){e&&"AbortError"!==e.name&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code&&j(e)}V.on("error",U),_(V)&&q&&c.push((()=>{V.removeListener("error",U)}))}if(0===F)if("function"==typeof V){if(O=V({signal:a}),!v(O))throw new d("Iterable, AsyncIterable or Stream","source",O)}else O=v(V)||E(V)||S(V)?V:l.from(V);else if("function"==typeof V){var z;if(O=S(O)?I(null===(z=O)||void 0===z?void 0:z.readable):I(O),O=V(O,{signal:a}),$){if(!v(O,!0))throw new d("AsyncIterable",`transform[${F-1}]`,O)}else{var D;x||(x=r(1753));const J=new x({objectMode:!0}),Z=null===(D=O)||void 0===D?void 0:D.then;if("function"==typeof Z)P++,Z.call(O,(e=>{g=e,null!=e&&J.write(e),W&&J.end(),n.nextTick(j)}),(e=>{J.destroy(e),n.nextTick(j,e)}));else if(v(O,!0))P++,R(O,J,j,{end:W});else{if(!B(O)&&!S(O))throw new d("AsyncIterable or Promise","destination",O);{const Q=O.readable||O;P++,R(Q,J,j,{end:W})}}O=J;const{destroy:Y,cleanup:X}=C(O,!1,!0);b.push(Y),q&&c.push(X)}}else if(A(V)){if(E(O)){P+=2;const ee=k(O,V,j,{end:W});_(V)&&q&&c.push(ee)}else if(S(O)||B(O)){const te=O.readable||O;P++,R(te,V,j,{end:W})}else{if(!v(O))throw new h("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],O);P++,R(O,V,j,{end:W})}O=V}else if(T(V)){if(E(O))P++,L(I(O),V,j,{end:W});else if(B(O)||v(O))P++,L(O,V,j,{end:W});else{if(!S(O))throw new h("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],O);P++,L(O.readable,V,j,{end:W})}O=V}else O=l.from(V)}return(null!=a&&a.aborted||null!=u&&u.aborted)&&n.nextTick(f),O}function k(e,t,r,{end:i}){let o=!1;if(t.on("close",(()=>{o||r(new g)})),e.pipe(t,{end:!1}),i){function s(){o=!0,t.end()}O(e)?n.nextTick(s):e.once("end",s)}else r();return a(e,{readable:!0,writable:!1},(t=>{const n=e._readableState;t&&"ERR_STREAM_PREMATURE_CLOSE"===t.code&&n&&n.ended&&!n.errored&&!n.errorEmitted?e.once("end",r).once("error",r):r(t)})),a(t,{readable:!1,writable:!0},r)}e.exports={pipelineImpl:j,pipeline:function(...e){return j(e,u(function(e){return b(e[e.length-1],"streams[stream.length - 1]"),e.pop()}(e)))}}},538:(e,t,r)=>{const n=r(4406),{ArrayPrototypeIndexOf:i,NumberIsInteger:o,NumberIsNaN:s,NumberParseInt:a,ObjectDefineProperties:u,ObjectKeys:c,ObjectSetPrototypeOf:l,Promise:f,SafeSet:h,SymbolAsyncIterator:d,Symbol:p}=r(5439);e.exports=z,z.ReadableState=U;const{EventEmitter:y}=r(2699),{Stream:g,prependListener:m}=r(6767),{Buffer:b}=r(8834),{addAbortSignal:w}=r(2349),v=r(3803);let _=r(9928).debuglog("stream",(e=>{_=e}));const E=r(4250),A=r(4664),{getHighWaterMark:S,getDefaultHighWaterMark:T}=r(4930),{aggregateTwoErrors:B,codes:{ERR_INVALID_ARG_TYPE:O,ERR_METHOD_NOT_IMPLEMENTED:N,ERR_OUT_OF_RANGE:x,ERR_STREAM_PUSH_AFTER_EOF:P,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:C}}=r(2415),{validateObject:I}=r(1670),R=p("kPaused"),{StringDecoder:L}=r(214),j=r(8236);l(z.prototype,g.prototype),l(z,g);const k=()=>{},{errorOrDestroy:M}=A;function U(e,t,n){"boolean"!=typeof n&&(n=t instanceof r(8637)),this.objectMode=!(!e||!e.objectMode),n&&(this.objectMode=this.objectMode||!(!e||!e.readableObjectMode)),this.highWaterMark=e?S(this,e,"readableHighWaterMark",n):T(!1),this.buffer=new E,this.length=0,this.pipes=[],this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.constructed=!0,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this[R]=null,this.errorEmitted=!1,this.emitClose=!e||!1!==e.emitClose,this.autoDestroy=!e||!1!==e.autoDestroy,this.destroyed=!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this.defaultEncoding=e&&e.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.multiAwaitDrain=!1,this.readingMore=!1,this.dataEmitted=!1,this.decoder=null,this.encoding=null,e&&e.encoding&&(this.decoder=new L(e.encoding),this.encoding=e.encoding)}function z(e){if(!(this instanceof z))return new z(e);const t=this instanceof r(8637);this._readableState=new U(e,this,t),e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.construct&&(this._construct=e.construct),e.signal&&!t&&w(e.signal,this)),g.call(this,e),A.construct(this,(()=>{this._readableState.needReadable&&W(this,this._readableState)}))}function D(e,t,r,n){_("readableAddChunk",t);const i=e._readableState;let o;if(i.objectMode||("string"==typeof t?(r=r||i.defaultEncoding,i.encoding!==r&&(n&&i.encoding?t=b.from(t,r).toString(i.encoding):(t=b.from(t,r),r=""))):t instanceof b?r="":g._isUint8Array(t)?(t=g._uint8ArrayToBuffer(t),r=""):null!=t&&(o=new O("chunk",["string","Buffer","Uint8Array"],t))),o)M(e,o);else if(null===t)i.reading=!1,function(e,t){if(_("onEofChunk"),!t.ended){if(t.decoder){const e=t.decoder.end();e&&e.length&&(t.buffer.push(e),t.length+=t.objectMode?1:e.length)}t.ended=!0,t.sync?$(e):(t.needReadable=!1,t.emittedReadable=!0,H(e))}}(e,i);else if(i.objectMode||t&&t.length>0)if(n)if(i.endEmitted)M(e,new C);else{if(i.destroyed||i.errored)return!1;F(e,i,t,!0)}else if(i.ended)M(e,new P);else{if(i.destroyed||i.errored)return!1;i.reading=!1,i.decoder&&!r?(t=i.decoder.write(t),i.objectMode||0!==t.length?F(e,i,t,!1):W(e,i)):F(e,i,t,!1)}else n||(i.reading=!1,W(e,i));return!i.ended&&(i.length<i.highWaterMark||0===i.length)}function F(e,t,r,n){t.flowing&&0===t.length&&!t.sync&&e.listenerCount("data")>0?(t.multiAwaitDrain?t.awaitDrainWriters.clear():t.awaitDrainWriters=null,t.dataEmitted=!0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&$(e)),W(e,t)}function V(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:s(e)?t.flowing&&t.length?t.buffer.first().length:t.length:e<=t.length?e:t.ended?t.length:0}function $(e){const t=e._readableState;_("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(_("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(H,e))}function H(e){const t=e._readableState;_("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||t.errored||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,Z(e)}function W(e,t){!t.readingMore&&t.constructed&&(t.readingMore=!0,n.nextTick(q,e,t))}function q(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){const r=t.length;if(_("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function G(e){const t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!1===t[R]?t.flowing=!0:e.listenerCount("data")>0?e.resume():t.readableListening||(t.flowing=null)}function K(e){_("readable nexttick read 0"),e.read(0)}function J(e,t){_("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),Z(e),t.flowing&&!t.reading&&e.read(0)}function Z(e){const t=e._readableState;for(_("flow",t.flowing);t.flowing&&null!==e.read(););}function Y(e,t){"function"!=typeof e.read&&(e=z.wrap(e,{objectMode:!0}));const r=async function*(e,t){let r,n=k;function i(t){this===e?(n(),n=k):n=t}e.on("readable",i);const o=v(e,{writable:!1},(e=>{r=e?B(r,e):null,n(),n=k}));try{for(;;){const t=e.destroyed?null:e.read();if(null!==t)yield t;else{if(r)throw r;if(null===r)return;await new f(i)}}}catch(e){throw r=B(r,e),r}finally{!r&&!1===(null==t?void 0:t.destroyOnReturn)||void 0!==r&&!e._readableState.autoDestroy?(e.off("readable",i),o()):A.destroyer(e,null)}}(e,t);return r.stream=e,r}function X(e,t){if(0===t.length)return null;let r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}function Q(e){const t=e._readableState;_("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(ee,t,e))}function ee(e,t){if(_("endReadableNT",e.endEmitted,e.length),!e.errored&&!e.closeEmitted&&!e.endEmitted&&0===e.length)if(e.endEmitted=!0,t.emit("end"),t.writable&&!1===t.allowHalfOpen)n.nextTick(te,t);else if(e.autoDestroy){const e=t._writableState;(!e||e.autoDestroy&&(e.finished||!1===e.writable))&&t.destroy()}}function te(e){e.writable&&!e.writableEnded&&!e.destroyed&&e.end()}let re;function ne(){return void 0===re&&(re={}),re}z.prototype.destroy=A.destroy,z.prototype._undestroy=A.undestroy,z.prototype._destroy=function(e,t){t(e)},z.prototype[y.captureRejectionSymbol]=function(e){this.destroy(e)},z.prototype.push=function(e,t){return D(this,e,t,!1)},z.prototype.unshift=function(e,t){return D(this,e,t,!0)},z.prototype.isPaused=function(){const e=this._readableState;return!0===e[R]||!1===e.flowing},z.prototype.setEncoding=function(e){const t=new L(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;const r=this._readableState.buffer;let n="";for(const e of r)n+=t.write(e);return r.clear(),""!==n&&r.push(n),this._readableState.length=n.length,this},z.prototype.read=function(e){_("read",e),void 0===e?e=NaN:o(e)||(e=a(e,10));const t=this._readableState,r=e;if(e>t.highWaterMark&&(t.highWaterMark=function(e){if(e>1073741824)throw new x("size","<= 1GiB",e);return e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,++e}(e)),0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return _("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?Q(this):$(this),null;if(0===(e=V(e,t))&&t.ended)return 0===t.length&&Q(this),null;let n,i=t.needReadable;if(_("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&(i=!0,_("length less than watermark",i)),t.ended||t.reading||t.destroyed||t.errored||!t.constructed)i=!1,_("reading, ended or constructing",i);else if(i){_("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0);try{this._read(t.highWaterMark)}catch(e){M(this,e)}t.sync=!1,t.reading||(e=V(r,t))}return n=e>0?X(e,t):null,null===n?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.multiAwaitDrain?t.awaitDrainWriters.clear():t.awaitDrainWriters=null),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&Q(this)),null===n||t.errorEmitted||t.closeEmitted||(t.dataEmitted=!0,this.emit("data",n)),n},z.prototype._read=function(e){throw new N("_read()")},z.prototype.pipe=function(e,t){const r=this,i=this._readableState;1===i.pipes.length&&(i.multiAwaitDrain||(i.multiAwaitDrain=!0,i.awaitDrainWriters=new h(i.awaitDrainWriters?[i.awaitDrainWriters]:[]))),i.pipes.push(e),_("pipe count=%d opts=%j",i.pipes.length,t);const o=t&&!1===t.end||e===n.stdout||e===n.stderr?y:s;function s(){_("onend"),e.end()}let a;i.endEmitted?n.nextTick(o):r.once("end",o),e.on("unpipe",(function t(n,o){_("onunpipe"),n===r&&o&&!1===o.hasUnpiped&&(o.hasUnpiped=!0,_("cleanup"),e.removeListener("close",d),e.removeListener("finish",p),a&&e.removeListener("drain",a),e.removeListener("error",f),e.removeListener("unpipe",t),r.removeListener("end",s),r.removeListener("end",y),r.removeListener("data",l),u=!0,a&&i.awaitDrainWriters&&(!e._writableState||e._writableState.needDrain)&&a())}));let u=!1;function c(){u||(1===i.pipes.length&&i.pipes[0]===e?(_("false write response, pause",0),i.awaitDrainWriters=e,i.multiAwaitDrain=!1):i.pipes.length>1&&i.pipes.includes(e)&&(_("false write response, pause",i.awaitDrainWriters.size),i.awaitDrainWriters.add(e)),r.pause()),a||(a=function(e,t){return function(){const r=e._readableState;r.awaitDrainWriters===t?(_("pipeOnDrain",1),r.awaitDrainWriters=null):r.multiAwaitDrain&&(_("pipeOnDrain",r.awaitDrainWriters.size),r.awaitDrainWriters.delete(t)),r.awaitDrainWriters&&0!==r.awaitDrainWriters.size||!e.listenerCount("data")||e.resume()}}(r,e),e.on("drain",a))}function l(t){_("ondata");const r=e.write(t);_("dest.write",r),!1===r&&c()}function f(t){if(_("onerror",t),y(),e.removeListener("error",f),0===e.listenerCount("error")){const r=e._writableState||e._readableState;r&&!r.errorEmitted?M(e,t):e.emit("error",t)}}function d(){e.removeListener("finish",p),y()}function p(){_("onfinish"),e.removeListener("close",d),y()}function y(){_("unpipe"),r.unpipe(e)}return r.on("data",l),m(e,"error",f),e.once("close",d),e.once("finish",p),e.emit("pipe",r),!0===e.writableNeedDrain?i.flowing&&c():i.flowing||(_("pipe resume"),r.resume()),e},z.prototype.unpipe=function(e){const t=this._readableState;if(0===t.pipes.length)return this;if(!e){const e=t.pipes;t.pipes=[],this.pause();for(let t=0;t<e.length;t++)e[t].emit("unpipe",this,{hasUnpiped:!1});return this}const r=i(t.pipes,e);return-1===r||(t.pipes.splice(r,1),0===t.pipes.length&&this.pause(),e.emit("unpipe",this,{hasUnpiped:!1})),this},z.prototype.on=function(e,t){const r=g.prototype.on.call(this,e,t),i=this._readableState;return"data"===e?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,_("on readable",i.length,i.reading),i.length?$(this):i.reading||n.nextTick(K,this))),r},z.prototype.addListener=z.prototype.on,z.prototype.removeListener=function(e,t){const r=g.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(G,this),r},z.prototype.off=z.prototype.removeListener,z.prototype.removeAllListeners=function(e){const t=g.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(G,this),t},z.prototype.resume=function(){const e=this._readableState;return e.flowing||(_("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(J,e,t))}(this,e)),e[R]=!1,this},z.prototype.pause=function(){return _("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(_("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[R]=!0,this},z.prototype.wrap=function(e){let t=!1;e.on("data",(r=>{!this.push(r)&&e.pause&&(t=!0,e.pause())})),e.on("end",(()=>{this.push(null)})),e.on("error",(e=>{M(this,e)})),e.on("close",(()=>{this.destroy()})),e.on("destroy",(()=>{this.destroy()})),this._read=()=>{t&&e.resume&&(t=!1,e.resume())};const r=c(e);for(let t=1;t<r.length;t++){const n=r[t];void 0===this[n]&&"function"==typeof e[n]&&(this[n]=e[n].bind(e))}return this},z.prototype[d]=function(){return Y(this)},z.prototype.iterator=function(e){return void 0!==e&&I(e,"options"),Y(this,e)},u(z.prototype,{readable:{__proto__:null,get(){const e=this._readableState;return!(!e||!1===e.readable||e.destroyed||e.errorEmitted||e.endEmitted)},set(e){this._readableState&&(this._readableState.readable=!!e)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!(!1===this._readableState.readable||!this._readableState.destroyed&&!this._readableState.errored||this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.objectMode}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return!!this._readableState&&this._readableState.closed}},destroyed:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.destroyed},set(e){this._readableState&&(this._readableState.destroyed=e)}},readableEnded:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.endEmitted}}}),u(U.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return!1!==this[R]},set(e){this[R]=!!e}}}),z._fromList=X,z.from=function(e,t){return j(z,e,t)},z.fromWeb=function(e,t){return ne().newStreamReadableFromReadableStream(e,t)},z.toWeb=function(e,t){return ne().newReadableStreamFromStreamReadable(e,t)},z.wrap=function(e,t){var r,n;return new z({objectMode:null===(r=null!==(n=e.readableObjectMode)&&void 0!==n?n:e.objectMode)||void 0===r||r,...t,destroy(t,r){A.destroyer(e,t),r(t)}}).wrap(e)}},4930:(e,t,r)=>{"use strict";const{MathFloor:n,NumberIsInteger:i}=r(5439),{ERR_INVALID_ARG_VALUE:o}=r(2415).codes;function s(e){return e?16:16384}e.exports={getHighWaterMark:function(e,t,r,a){const u=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,a,r);if(null!=u){if(!i(u)||u<0)throw new o(a?`options.${r}`:"options.highWaterMark",u);return n(u)}return s(e.objectMode)},getDefaultHighWaterMark:s}},9643:(e,t,r)=>{"use strict";const{ObjectSetPrototypeOf:n,Symbol:i}=r(5439);e.exports=c;const{ERR_METHOD_NOT_IMPLEMENTED:o}=r(2415).codes,s=r(8637),{getHighWaterMark:a}=r(4930);n(c.prototype,s.prototype),n(c,s);const u=i("kCallback");function c(e){if(!(this instanceof c))return new c(e);const t=e?a(this,e,"readableHighWaterMark",!0):null;0===t&&(e={...e,highWaterMark:null,readableHighWaterMark:t,writableHighWaterMark:e.writableHighWaterMark||0}),s.call(this,e),this._readableState.sync=!1,this[u]=null,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",f)}function l(e){"function"!=typeof this._flush||this.destroyed?(this.push(null),e&&e()):this._flush(((t,r)=>{t?e?e(t):this.destroy(t):(null!=r&&this.push(r),this.push(null),e&&e())}))}function f(){this._final!==l&&l.call(this)}c.prototype._final=l,c.prototype._transform=function(e,t,r){throw new o("_transform()")},c.prototype._write=function(e,t,r){const n=this._readableState,i=this._writableState,o=n.length;this._transform(e,t,((e,t)=>{e?r(e):(null!=t&&this.push(t),i.ended||o===n.length||n.length<n.highWaterMark?r():this[u]=r)}))},c.prototype._read=function(){if(this[u]){const e=this[u];this[u]=null,e()}}},6140:(e,t,r)=>{"use strict";const{Symbol:n,SymbolAsyncIterator:i,SymbolIterator:o,SymbolFor:s}=r(5439),a=n("kDestroyed"),u=n("kIsErrored"),c=n("kIsReadable"),l=n("kIsDisturbed"),f=s("nodejs.webstream.isClosedPromise"),h=s("nodejs.webstream.controllerErrorFunction");function d(e,t=!1){var r;return!(!e||"function"!=typeof e.pipe||"function"!=typeof e.on||t&&("function"!=typeof e.pause||"function"!=typeof e.resume)||e._writableState&&!1===(null===(r=e._readableState)||void 0===r?void 0:r.readable)||e._writableState&&!e._readableState)}function p(e){var t;return!(!e||"function"!=typeof e.write||"function"!=typeof e.on||e._readableState&&!1===(null===(t=e._writableState)||void 0===t?void 0:t.writable))}function y(e){return e&&(e._readableState||e._writableState||"function"==typeof e.write&&"function"==typeof e.on||"function"==typeof e.pipe&&"function"==typeof e.on)}function g(e){return!(!e||y(e)||"function"!=typeof e.pipeThrough||"function"!=typeof e.getReader||"function"!=typeof e.cancel)}function m(e){return!(!e||y(e)||"function"!=typeof e.getWriter||"function"!=typeof e.abort)}function b(e){return!(!e||y(e)||"object"!=typeof e.readable||"object"!=typeof e.writable)}function w(e){if(!y(e))return null;const t=e._writableState,r=e._readableState,n=t||r;return!!(e.destroyed||e[a]||null!=n&&n.destroyed)}function v(e){if(!p(e))return null;if(!0===e.writableEnded)return!0;const t=e._writableState;return(null==t||!t.errored)&&("boolean"!=typeof(null==t?void 0:t.ended)?null:t.ended)}function _(e,t){if(!d(e))return null;const r=e._readableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.endEmitted)?null:!!(r.endEmitted||!1===t&&!0===r.ended&&0===r.length))}function E(e){return e&&null!=e[c]?e[c]:"boolean"!=typeof(null==e?void 0:e.readable)?null:!w(e)&&d(e)&&e.readable&&!_(e)}function A(e){return"boolean"!=typeof(null==e?void 0:e.writable)?null:!w(e)&&p(e)&&e.writable&&!v(e)}function S(e){return"boolean"==typeof e._closed&&"boolean"==typeof e._defaultKeepAlive&&"boolean"==typeof e._removedConnection&&"boolean"==typeof e._removedContLen}function T(e){return"boolean"==typeof e._sent100&&S(e)}e.exports={kDestroyed:a,isDisturbed:function(e){var t;return!(!e||!(null!==(t=e[l])&&void 0!==t?t:e.readableDidRead||e.readableAborted))},kIsDisturbed:l,isErrored:function(e){var t,r,n,i,o,s,a,c,l,f;return!(!e||!(null!==(t=null!==(r=null!==(n=null!==(i=null!==(o=null!==(s=e[u])&&void 0!==s?s:e.readableErrored)&&void 0!==o?o:e.writableErrored)&&void 0!==i?i:null===(a=e._readableState)||void 0===a?void 0:a.errorEmitted)&&void 0!==n?n:null===(c=e._writableState)||void 0===c?void 0:c.errorEmitted)&&void 0!==r?r:null===(l=e._readableState)||void 0===l?void 0:l.errored)&&void 0!==t?t:null===(f=e._writableState)||void 0===f?void 0:f.errored))},kIsErrored:u,isReadable:E,kIsReadable:c,kIsClosedPromise:f,kControllerErrorFunction:h,isClosed:function(e){if(!y(e))return null;if("boolean"==typeof e.closed)return e.closed;const t=e._writableState,r=e._readableState;return"boolean"==typeof(null==t?void 0:t.closed)||"boolean"==typeof(null==r?void 0:r.closed)?(null==t?void 0:t.closed)||(null==r?void 0:r.closed):"boolean"==typeof e._closed&&S(e)?e._closed:null},isDestroyed:w,isDuplexNodeStream:function(e){return!(!e||"function"!=typeof e.pipe||!e._readableState||"function"!=typeof e.on||"function"!=typeof e.write)},isFinished:function(e,t){return y(e)?!(!w(e)&&(!1!==(null==t?void 0:t.readable)&&E(e)||!1!==(null==t?void 0:t.writable)&&A(e))):null},isIterable:function(e,t){return null!=e&&(!0===t?"function"==typeof e[i]:!1===t?"function"==typeof e[o]:"function"==typeof e[i]||"function"==typeof e[o])},isReadableNodeStream:d,isReadableStream:g,isReadableEnded:function(e){if(!d(e))return null;if(!0===e.readableEnded)return!0;const t=e._readableState;return!(!t||t.errored)&&("boolean"!=typeof(null==t?void 0:t.ended)?null:t.ended)},isReadableFinished:_,isReadableErrored:function(e){var t,r;return y(e)?e.readableErrored?e.readableErrored:null!==(t=null===(r=e._readableState)||void 0===r?void 0:r.errored)&&void 0!==t?t:null:null},isNodeStream:y,isWebStream:function(e){return g(e)||m(e)||b(e)},isWritable:A,isWritableNodeStream:p,isWritableStream:m,isWritableEnded:v,isWritableFinished:function(e,t){if(!p(e))return null;if(!0===e.writableFinished)return!0;const r=e._writableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.finished)?null:!!(r.finished||!1===t&&!0===r.ended&&0===r.length))},isWritableErrored:function(e){var t,r;return y(e)?e.writableErrored?e.writableErrored:null!==(t=null===(r=e._writableState)||void 0===r?void 0:r.errored)&&void 0!==t?t:null:null},isServerRequest:function(e){var t;return"boolean"==typeof e._consuming&&"boolean"==typeof e._dumped&&void 0===(null===(t=e.req)||void 0===t?void 0:t.upgradeOrConnect)},isServerResponse:T,willEmitClose:function(e){if(!y(e))return null;const t=e._writableState,r=e._readableState,n=t||r;return!n&&T(e)||!!(n&&n.autoDestroy&&n.emitClose&&!1===n.closed)},isTransformStream:b}},4695:(e,t,r)=>{const n=r(4406),{ArrayPrototypeSlice:i,Error:o,FunctionPrototypeSymbolHasInstance:s,ObjectDefineProperty:a,ObjectDefineProperties:u,ObjectSetPrototypeOf:c,StringPrototypeToLowerCase:l,Symbol:f,SymbolHasInstance:h}=r(5439);e.exports=L,L.WritableState=I;const{EventEmitter:d}=r(2699),p=r(6767).Stream,{Buffer:y}=r(8834),g=r(4664),{addAbortSignal:m}=r(2349),{getHighWaterMark:b,getDefaultHighWaterMark:w}=r(4930),{ERR_INVALID_ARG_TYPE:v,ERR_METHOD_NOT_IMPLEMENTED:_,ERR_MULTIPLE_CALLBACK:E,ERR_STREAM_CANNOT_PIPE:A,ERR_STREAM_DESTROYED:S,ERR_STREAM_ALREADY_FINISHED:T,ERR_STREAM_NULL_VALUES:B,ERR_STREAM_WRITE_AFTER_END:O,ERR_UNKNOWN_ENCODING:N}=r(2415).codes,{errorOrDestroy:x}=g;function P(){}c(L.prototype,p.prototype),c(L,p);const C=f("kOnFinished");function I(e,t,n){"boolean"!=typeof n&&(n=t instanceof r(8637)),this.objectMode=!(!e||!e.objectMode),n&&(this.objectMode=this.objectMode||!(!e||!e.writableObjectMode)),this.highWaterMark=e?b(this,e,"writableHighWaterMark",n):w(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const i=!(!e||!1!==e.decodeStrings);this.decodeStrings=!i,this.defaultEncoding=e&&e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=U.bind(void 0,t),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,R(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!e||!1!==e.emitClose,this.autoDestroy=!e||!1!==e.autoDestroy,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[C]=[]}function R(e){e.buffered=[],e.bufferedIndex=0,e.allBuffers=!0,e.allNoop=!0}function L(e){const t=this instanceof r(8637);if(!t&&!s(L,this))return new L(e);this._writableState=new I(e,this,t),e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final),"function"==typeof e.construct&&(this._construct=e.construct),e.signal&&m(e.signal,this)),p.call(this,e),g.construct(this,(()=>{const e=this._writableState;e.writing||V(this,e),H(this,e)}))}function j(e,t,r,i){const o=e._writableState;if("function"==typeof r)i=r,r=o.defaultEncoding;else{if(r){if("buffer"!==r&&!y.isEncoding(r))throw new N(r)}else r=o.defaultEncoding;"function"!=typeof i&&(i=P)}if(null===t)throw new B;if(!o.objectMode)if("string"==typeof t)!1!==o.decodeStrings&&(t=y.from(t,r),r="buffer");else if(t instanceof y)r="buffer";else{if(!p._isUint8Array(t))throw new v("chunk",["string","Buffer","Uint8Array"],t);t=p._uint8ArrayToBuffer(t),r="buffer"}let s;return o.ending?s=new O:o.destroyed&&(s=new S("write")),s?(n.nextTick(i,s),x(e,s,!0),s):(o.pendingcb++,function(e,t,r,n,i){const o=t.objectMode?1:r.length;t.length+=o;const s=t.length<t.highWaterMark;return s||(t.needDrain=!0),t.writing||t.corked||t.errored||!t.constructed?(t.buffered.push({chunk:r,encoding:n,callback:i}),t.allBuffers&&"buffer"!==n&&(t.allBuffers=!1),t.allNoop&&i!==P&&(t.allNoop=!1)):(t.writelen=o,t.writecb=i,t.writing=!0,t.sync=!0,e._write(r,n,t.onwrite),t.sync=!1),s&&!t.errored&&!t.destroyed}(e,o,t,r,i))}function k(e,t,r,n,i,o,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new S("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function M(e,t,r,n){--t.pendingcb,n(r),F(t),x(e,r)}function U(e,t){const r=e._writableState,i=r.sync,o=r.writecb;"function"==typeof o?(r.writing=!1,r.writecb=null,r.length-=r.writelen,r.writelen=0,t?(t.stack,r.errored||(r.errored=t),e._readableState&&!e._readableState.errored&&(e._readableState.errored=t),i?n.nextTick(M,e,r,t,o):M(e,r,t,o)):(r.buffered.length>r.bufferedIndex&&V(e,r),i?null!==r.afterWriteTickInfo&&r.afterWriteTickInfo.cb===o?r.afterWriteTickInfo.count++:(r.afterWriteTickInfo={count:1,cb:o,stream:e,state:r},n.nextTick(z,r.afterWriteTickInfo)):D(e,r,1,o))):x(e,new E)}function z({stream:e,state:t,count:r,cb:n}){return t.afterWriteTickInfo=null,D(e,t,r,n)}function D(e,t,r,n){for(!t.ending&&!e.destroyed&&0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"));r-- >0;)t.pendingcb--,n();t.destroyed&&F(t),H(e,t)}function F(e){if(e.writing)return;for(let r=e.bufferedIndex;r<e.buffered.length;++r){var t;const{chunk:n,callback:i}=e.buffered[r],o=e.objectMode?1:n.length;e.length-=o,i(null!==(t=e.errored)&&void 0!==t?t:new S("write"))}const r=e[C].splice(0);for(let t=0;t<r.length;t++){var n;r[t](null!==(n=e.errored)&&void 0!==n?n:new S("end"))}R(e)}function V(e,t){if(t.corked||t.bufferProcessing||t.destroyed||!t.constructed)return;const{buffered:r,bufferedIndex:n,objectMode:o}=t,s=r.length-n;if(!s)return;let a=n;if(t.bufferProcessing=!0,s>1&&e._writev){t.pendingcb-=s-1;const n=t.allNoop?P:e=>{for(let t=a;t<r.length;++t)r[t].callback(e)},o=t.allNoop&&0===a?r:i(r,a);o.allBuffers=t.allBuffers,k(e,t,!0,t.length,o,"",n),R(t)}else{do{const{chunk:n,encoding:i,callback:s}=r[a];r[a++]=null,k(e,t,!1,o?1:n.length,n,i,s)}while(a<r.length&&!t.writing);a===r.length?R(t):a>256?(r.splice(0,a),t.bufferedIndex=0):t.bufferedIndex=a}t.bufferProcessing=!1}function $(e){return e.ending&&!e.destroyed&&e.constructed&&0===e.length&&!e.errored&&0===e.buffered.length&&!e.finished&&!e.writing&&!e.errorEmitted&&!e.closeEmitted}function H(e,t,r){$(t)&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.finalCalled=!0,function(e,t){let r=!1;function i(i){if(r)x(e,null!=i?i:E());else if(r=!0,t.pendingcb--,i){const r=t[C].splice(0);for(let e=0;e<r.length;e++)r[e](i);x(e,i,t.sync)}else $(t)&&(t.prefinished=!0,e.emit("prefinish"),t.pendingcb++,n.nextTick(W,e,t))}t.sync=!0,t.pendingcb++;try{e._final(i)}catch(e){i(e)}t.sync=!1}(e,t)))}(e,t),0===t.pendingcb&&(r?(t.pendingcb++,n.nextTick(((e,t)=>{$(t)?W(e,t):t.pendingcb--}),e,t)):$(t)&&(t.pendingcb++,W(e,t))))}function W(e,t){t.pendingcb--,t.finished=!0;const r=t[C].splice(0);for(let e=0;e<r.length;e++)r[e]();if(e.emit("finish"),t.autoDestroy){const t=e._readableState;(!t||t.autoDestroy&&(t.endEmitted||!1===t.readable))&&e.destroy()}}I.prototype.getBuffer=function(){return i(this.buffered,this.bufferedIndex)},a(I.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}}),a(L,h,{__proto__:null,value:function(e){return!!s(this,e)||this===L&&e&&e._writableState instanceof I}}),L.prototype.pipe=function(){x(this,new A)},L.prototype.write=function(e,t,r){return!0===j(this,e,t,r)},L.prototype.cork=function(){this._writableState.corked++},L.prototype.uncork=function(){const e=this._writableState;e.corked&&(e.corked--,e.writing||V(this,e))},L.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=l(e)),!y.isEncoding(e))throw new N(e);return this._writableState.defaultEncoding=e,this},L.prototype._write=function(e,t,r){if(!this._writev)throw new _("_write()");this._writev([{chunk:e,encoding:t}],r)},L.prototype._writev=null,L.prototype.end=function(e,t,r){const i=this._writableState;let s;if("function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e){const r=j(this,e,t);r instanceof o&&(s=r)}return i.corked&&(i.corked=1,this.uncork()),s||(i.errored||i.ending?i.finished?s=new T("end"):i.destroyed&&(s=new S("end")):(i.ending=!0,H(this,i,!0),i.ended=!0)),"function"==typeof r&&(s||i.finished?n.nextTick(r,s):i[C].push(r)),this},u(L.prototype,{closed:{__proto__:null,get(){return!!this._writableState&&this._writableState.closed}},destroyed:{__proto__:null,get(){return!!this._writableState&&this._writableState.destroyed},set(e){this._writableState&&(this._writableState.destroyed=e)}},writable:{__proto__:null,get(){const e=this._writableState;return!(!e||!1===e.writable||e.destroyed||e.errored||e.ending||e.ended)},set(e){this._writableState&&(this._writableState.writable=!!e)}},writableFinished:{__proto__:null,get(){return!!this._writableState&&this._writableState.finished}},writableObjectMode:{__proto__:null,get(){return!!this._writableState&&this._writableState.objectMode}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return!!this._writableState&&this._writableState.ending}},writableNeedDrain:{__proto__:null,get(){const e=this._writableState;return!!e&&!e.destroyed&&!e.ending&&e.needDrain}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!(!1===this._writableState.writable||!this._writableState.destroyed&&!this._writableState.errored||this._writableState.finished)}}});const q=g.destroy;let G;function K(){return void 0===G&&(G={}),G}L.prototype.destroy=function(e,t){const r=this._writableState;return!r.destroyed&&(r.bufferedIndex<r.buffered.length||r[C].length)&&n.nextTick(F,r),q.call(this,e,t),this},L.prototype._undestroy=g.undestroy,L.prototype._destroy=function(e,t){t(e)},L.prototype[d.captureRejectionSymbol]=function(e){this.destroy(e)},L.fromWeb=function(e,t){return K().newStreamWritableFromWritableStream(e,t)},L.toWeb=function(e){return K().newWritableStreamFromStreamWritable(e)}},1670:(e,t,r)=>{"use strict";const{ArrayIsArray:n,ArrayPrototypeIncludes:i,ArrayPrototypeJoin:o,ArrayPrototypeMap:s,NumberIsInteger:a,NumberIsNaN:u,NumberMAX_SAFE_INTEGER:c,NumberMIN_SAFE_INTEGER:l,NumberParseInt:f,ObjectPrototypeHasOwnProperty:h,RegExpPrototypeExec:d,String:p,StringPrototypeToUpperCase:y,StringPrototypeTrim:g}=r(5439),{hideStackFrames:m,codes:{ERR_SOCKET_BAD_PORT:b,ERR_INVALID_ARG_TYPE:w,ERR_INVALID_ARG_VALUE:v,ERR_OUT_OF_RANGE:_,ERR_UNKNOWN_SIGNAL:E}}=r(2415),{normalizeEncoding:A}=r(9928),{isAsyncFunction:S,isArrayBufferView:T}=r(9928).types,B={},O=/^[0-7]+$/,N=m(((e,t,r=l,n=c)=>{if("number"!=typeof e)throw new w(t,"number",e);if(!a(e))throw new _(t,"an integer",e);if(e<r||e>n)throw new _(t,`>= ${r} && <= ${n}`,e)})),x=m(((e,t,r=-2147483648,n=2147483647)=>{if("number"!=typeof e)throw new w(t,"number",e);if(!a(e))throw new _(t,"an integer",e);if(e<r||e>n)throw new _(t,`>= ${r} && <= ${n}`,e)})),P=m(((e,t,r=!1)=>{if("number"!=typeof e)throw new w(t,"number",e);if(!a(e))throw new _(t,"an integer",e);const n=r?1:0,i=4294967295;if(e<n||e>i)throw new _(t,`>= ${n} && <= ${i}`,e)}));function C(e,t){if("string"!=typeof e)throw new w(t,"string",e)}const I=m(((e,t,r)=>{if(!i(r,e)){const n=o(s(r,(e=>"string"==typeof e?`'${e}'`:p(e))),", ");throw new v(t,e,"must be one of: "+n)}}));function R(e,t){if("boolean"!=typeof e)throw new w(t,"boolean",e)}function L(e,t,r){return null!=e&&h(e,t)?e[t]:r}const j=m(((e,t,r=null)=>{const i=L(r,"allowArray",!1),o=L(r,"allowFunction",!1);if(!L(r,"nullable",!1)&&null===e||!i&&n(e)||"object"!=typeof e&&(!o||"function"!=typeof e))throw new w(t,"Object",e)})),k=m(((e,t)=>{if(null!=e&&"object"!=typeof e&&"function"!=typeof e)throw new w(t,"a dictionary",e)})),M=m(((e,t,r=0)=>{if(!n(e))throw new w(t,"Array",e);if(e.length<r)throw new v(t,e,`must be longer than ${r}`)})),U=m(((e,t="buffer")=>{if(!T(e))throw new w(t,["Buffer","TypedArray","DataView"],e)})),z=m(((e,t)=>{if(void 0!==e&&(null===e||"object"!=typeof e||!("aborted"in e)))throw new w(t,"AbortSignal",e)})),D=m(((e,t)=>{if("function"!=typeof e)throw new w(t,"Function",e)})),F=m(((e,t)=>{if("function"!=typeof e||S(e))throw new w(t,"Function",e)})),V=m(((e,t)=>{if(void 0!==e)throw new w(t,"undefined",e)})),$=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function H(e,t){if(void 0===e||!d($,e))throw new v(t,e,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}e.exports={isInt32:function(e){return e===(0|e)},isUint32:function(e){return e===e>>>0},parseFileMode:function(e,t,r){if(void 0===e&&(e=r),"string"==typeof e){if(null===d(O,e))throw new v(t,e,"must be a 32-bit unsigned integer or an octal string");e=f(e,8)}return P(e,t),e},validateArray:M,validateStringArray:function(e,t){M(e,t);for(let r=0;r<e.length;r++)C(e[r],`${t}[${r}]`)},validateBooleanArray:function(e,t){M(e,t);for(let r=0;r<e.length;r++)R(e[r],`${t}[${r}]`)},validateBoolean:R,validateBuffer:U,validateDictionary:k,validateEncoding:function(e,t){const r=A(t),n=e.length;if("hex"===r&&n%2!=0)throw new v("encoding",t,`is invalid for data of length ${n}`)},validateFunction:D,validateInt32:x,validateInteger:N,validateNumber:function(e,t,r=void 0,n){if("number"!=typeof e)throw new w(t,"number",e);if(null!=r&&e<r||null!=n&&e>n||(null!=r||null!=n)&&u(e))throw new _(t,`${null!=r?`>= ${r}`:""}${null!=r&&null!=n?" && ":""}${null!=n?`<= ${n}`:""}`,e)},validateObject:j,validateOneOf:I,validatePlainFunction:F,validatePort:function(e,t="Port",r=!0){if("number"!=typeof e&&"string"!=typeof e||"string"==typeof e&&0===g(e).length||+e!=+e>>>0||e>65535||0===e&&!r)throw new b(t,e,r);return 0|e},validateSignalName:function(e,t="signal"){if(C(e,t),void 0===B[e]){if(void 0!==B[y(e)])throw new E(e+" (signals must use all capital letters)");throw new E(e)}},validateString:C,validateUint32:P,validateUndefined:V,validateUnion:function(e,t,r){if(!i(r,e))throw new w(t,`('${o(r,"|")}')`,e)},validateAbortSignal:z,validateLinkHeaderValue:function(e){if("string"==typeof e)return H(e,"hints"),e;if(n(e)){const t=e.length;let r="";if(0===t)return r;for(let n=0;n<t;n++){const i=e[n];H(i,"hints"),r+=i,n!==t-1&&(r+=", ")}return r}throw new v("hints",e,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}}},1149:(e,t,r)=>{"use strict";const n=r(8712),i=r(4021),o=n.Readable.destroy;e.exports=n.Readable,e.exports._uint8ArrayToBuffer=n._uint8ArrayToBuffer,e.exports._isUint8Array=n._isUint8Array,e.exports.isDisturbed=n.isDisturbed,e.exports.isErrored=n.isErrored,e.exports.isReadable=n.isReadable,e.exports.Readable=n.Readable,e.exports.Writable=n.Writable,e.exports.Duplex=n.Duplex,e.exports.Transform=n.Transform,e.exports.PassThrough=n.PassThrough,e.exports.addAbortSignal=n.addAbortSignal,e.exports.finished=n.finished,e.exports.destroy=n.destroy,e.exports.destroy=o,e.exports.pipeline=n.pipeline,e.exports.compose=n.compose,Object.defineProperty(n,"promises",{configurable:!0,enumerable:!0,get:()=>i}),e.exports.Stream=n.Stream,e.exports.default=e.exports},2415:(e,t,r)=>{"use strict";const{format:n,inspect:i,AggregateError:o}=r(9928),s=globalThis.AggregateError||o,a=Symbol("kIsNodeError"),u=["string","function","number","object","Function","Object","boolean","bigint","symbol"],c=/^([A-Z][a-z0-9]*)+$/,l={};function f(e,t){if(!e)throw new l.ERR_INTERNAL_ASSERTION(t)}function h(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function d(e,t,r){r||(r=Error);class i extends r{constructor(...r){super(function(e,t,r){if("function"==typeof t)return f(t.length<=r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${t.length}).`),t(...r);const i=(t.match(/%[dfijoOs]/g)||[]).length;return f(i===r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${i}).`),0===r.length?t:n(t,...r)}(e,t,r))}toString(){return`${this.name} [${e}]: ${this.message}`}}Object.defineProperties(i.prototype,{name:{value:r.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${e}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),i.prototype.code=e,i.prototype[a]=!0,l[e]=i}function p(e){const t="__node_internal_"+e.name;return Object.defineProperty(e,"name",{value:t}),e}class y extends Error{constructor(e="The operation was aborted",t=void 0){if(void 0!==t&&"object"!=typeof t)throw new l.ERR_INVALID_ARG_TYPE("options","Object",t);super(e,t),this.code="ABORT_ERR",this.name="AbortError"}}d("ERR_ASSERTION","%s",Error),d("ERR_INVALID_ARG_TYPE",((e,t,r)=>{f("string"==typeof e,"'name' must be a string"),Array.isArray(t)||(t=[t]);let n="The ";e.endsWith(" argument")?n+=`${e} `:n+=`"${e}" ${e.includes(".")?"property":"argument"} `,n+="must be ";const o=[],s=[],a=[];for(const e of t)f("string"==typeof e,"All expected entries have to be of type string"),u.includes(e)?o.push(e.toLowerCase()):c.test(e)?s.push(e):(f("object"!==e,'The value "object" should be written as "Object"'),a.push(e));if(s.length>0){const e=o.indexOf("object");-1!==e&&(o.splice(o,e,1),s.push("Object"))}if(o.length>0){switch(o.length){case 1:n+=`of type ${o[0]}`;break;case 2:n+=`one of type ${o[0]} or ${o[1]}`;break;default:{const e=o.pop();n+=`one of type ${o.join(", ")}, or ${e}`}}(s.length>0||a.length>0)&&(n+=" or ")}if(s.length>0){switch(s.length){case 1:n+=`an instance of ${s[0]}`;break;case 2:n+=`an instance of ${s[0]} or ${s[1]}`;break;default:{const e=s.pop();n+=`an instance of ${s.join(", ")}, or ${e}`}}a.length>0&&(n+=" or ")}switch(a.length){case 0:break;case 1:a[0].toLowerCase()!==a[0]&&(n+="an "),n+=`${a[0]}`;break;case 2:n+=`one of ${a[0]} or ${a[1]}`;break;default:{const e=a.pop();n+=`one of ${a.join(", ")}, or ${e}`}}if(null==r)n+=`. Received ${r}`;else if("function"==typeof r&&r.name)n+=`. Received function ${r.name}`;else if("object"==typeof r){var l;null!==(l=r.constructor)&&void 0!==l&&l.name?n+=`. Received an instance of ${r.constructor.name}`:n+=`. Received ${i(r,{depth:-1})}`}else{let e=i(r,{colors:!1});e.length>25&&(e=`${e.slice(0,25)}...`),n+=`. Received type ${typeof r} (${e})`}return n}),TypeError),d("ERR_INVALID_ARG_VALUE",((e,t,r="is invalid")=>{let n=i(t);return n.length>128&&(n=n.slice(0,128)+"..."),`The ${e.includes(".")?"property":"argument"} '${e}' ${r}. Received ${n}`}),TypeError),d("ERR_INVALID_RETURN_VALUE",((e,t,r)=>{var n;return`Expected ${e} to be returned from the "${t}" function but got ${null!=r&&null!==(n=r.constructor)&&void 0!==n&&n.name?`instance of ${r.constructor.name}`:"type "+typeof r}.`}),TypeError),d("ERR_MISSING_ARGS",((...e)=>{let t;f(e.length>0,"At least one arg needs to be specified");const r=e.length;switch(e=(Array.isArray(e)?e:[e]).map((e=>`"${e}"`)).join(" or "),r){case 1:t+=`The ${e[0]} argument`;break;case 2:t+=`The ${e[0]} and ${e[1]} arguments`;break;default:{const r=e.pop();t+=`The ${e.join(", ")}, and ${r} arguments`}}return`${t} must be specified`}),TypeError),d("ERR_OUT_OF_RANGE",((e,t,r)=>{let n;return f(t,'Missing "range" argument'),Number.isInteger(r)&&Math.abs(r)>2**32?n=h(String(r)):"bigint"==typeof r?(n=String(r),(r>2n**32n||r<-(2n**32n))&&(n=h(n)),n+="n"):n=i(r),`The value of "${e}" is out of range. It must be ${t}. Received ${n}`}),RangeError),d("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),d("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),d("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),d("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),d("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),d("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),d("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),d("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),d("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),d("ERR_STREAM_WRITE_AFTER_END","write after end",Error),d("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),e.exports={AbortError:y,aggregateTwoErrors:p((function(e,t){if(e&&t&&e!==t){if(Array.isArray(t.errors))return t.errors.push(e),t;const r=new s([t,e],t.message);return r.code=t.code,r}return e||t})),hideStackFrames:p,codes:l}},5439:e=>{"use strict";e.exports={ArrayIsArray:e=>Array.isArray(e),ArrayPrototypeIncludes:(e,t)=>e.includes(t),ArrayPrototypeIndexOf:(e,t)=>e.indexOf(t),ArrayPrototypeJoin:(e,t)=>e.join(t),ArrayPrototypeMap:(e,t)=>e.map(t),ArrayPrototypePop:(e,t)=>e.pop(t),ArrayPrototypePush:(e,t)=>e.push(t),ArrayPrototypeSlice:(e,t,r)=>e.slice(t,r),Error,FunctionPrototypeCall:(e,t,...r)=>e.call(t,...r),FunctionPrototypeSymbolHasInstance:(e,t)=>Function.prototype[Symbol.hasInstance].call(e,t),MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties:(e,t)=>Object.defineProperties(e,t),ObjectDefineProperty:(e,t,r)=>Object.defineProperty(e,t,r),ObjectGetOwnPropertyDescriptor:(e,t)=>Object.getOwnPropertyDescriptor(e,t),ObjectKeys:e=>Object.keys(e),ObjectSetPrototypeOf:(e,t)=>Object.setPrototypeOf(e,t),Promise,PromisePrototypeCatch:(e,t)=>e.catch(t),PromisePrototypeThen:(e,t,r)=>e.then(t,r),PromiseReject:e=>Promise.reject(e),ReflectApply:Reflect.apply,RegExpPrototypeTest:(e,t)=>e.test(t),SafeSet:Set,String,StringPrototypeSlice:(e,t,r)=>e.slice(t,r),StringPrototypeToLowerCase:e=>e.toLowerCase(),StringPrototypeToUpperCase:e=>e.toUpperCase(),StringPrototypeTrim:e=>e.trim(),Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,TypedArrayPrototypeSet:(e,t,r)=>e.set(t,r),Uint8Array}},9928:(e,t,r)=>{"use strict";const n=r(8834),i=Object.getPrototypeOf((async function(){})).constructor,o=globalThis.Blob||n.Blob,s=void 0!==o?function(e){return e instanceof o}:function(e){return!1};class a extends Error{constructor(e){if(!Array.isArray(e))throw new TypeError("Expected input to be an Array, got "+typeof e);let t="";for(let r=0;r<e.length;r++)t+=` ${e[r].stack}\n`;super(t),this.name="AggregateError",this.errors=e}}e.exports={AggregateError:a,kEmptyObject:Object.freeze({}),once(e){let t=!1;return function(...r){t||(t=!0,e.apply(this,r))}},createDeferredPromise:function(){let e,t;return{promise:new Promise(((r,n)=>{e=r,t=n})),resolve:e,reject:t}},promisify:e=>new Promise(((t,r)=>{e(((e,...n)=>e?r(e):t(...n)))})),debuglog:()=>function(){},format:(e,...t)=>e.replace(/%([sdifj])/g,(function(...[e,r]){const n=t.shift();return"f"===r?n.toFixed(6):"j"===r?JSON.stringify(n):"s"===r&&"object"==typeof n?`${n.constructor!==Object?n.constructor.name:""} {}`.trim():n.toString()})),inspect(e){switch(typeof e){case"string":if(e.includes("'")){if(!e.includes('"'))return`"${e}"`;if(!e.includes("`")&&!e.includes("${"))return`\`${e}\``}return`'${e}'`;case"number":return isNaN(e)?"NaN":Object.is(e,-0)?String(e):e;case"bigint":return`${String(e)}n`;case"boolean":case"undefined":return String(e);case"object":return"{}"}},types:{isAsyncFunction:e=>e instanceof i,isArrayBufferView:e=>ArrayBuffer.isView(e)},isBlob:s},e.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")},8712:(e,t,r)=>{const{Buffer:n}=r(8834),{ObjectDefineProperty:i,ObjectKeys:o,ReflectApply:s}=r(5439),{promisify:{custom:a}}=r(9928),{streamReturningOperators:u,promiseReturningOperators:c}=r(2542),{codes:{ERR_ILLEGAL_CONSTRUCTOR:l}}=r(2415),f=r(5291),{pipeline:h}=r(7253),{destroyer:d}=r(4664),p=r(3803),y=r(4021),g=r(6140),m=e.exports=r(6767).Stream;m.isDisturbed=g.isDisturbed,m.isErrored=g.isErrored,m.isReadable=g.isReadable,m.Readable=r(538);for(const v of o(u)){const _=u[v];function b(...e){if(new.target)throw l();return m.Readable.from(s(_,this,e))}i(b,"name",{__proto__:null,value:_.name}),i(b,"length",{__proto__:null,value:_.length}),i(m.Readable.prototype,v,{__proto__:null,value:b,enumerable:!1,configurable:!0,writable:!0})}for(const E of o(c)){const A=c[E];function b(...e){if(new.target)throw l();return s(A,this,e)}i(b,"name",{__proto__:null,value:A.name}),i(b,"length",{__proto__:null,value:A.length}),i(m.Readable.prototype,E,{__proto__:null,value:b,enumerable:!1,configurable:!0,writable:!0})}m.Writable=r(4695),m.Duplex=r(8637),m.Transform=r(9643),m.PassThrough=r(1753),m.pipeline=h;const{addAbortSignal:w}=r(2349);m.addAbortSignal=w,m.finished=p,m.destroy=d,m.compose=f,i(m,"promises",{__proto__:null,configurable:!0,enumerable:!0,get:()=>y}),i(h,a,{__proto__:null,enumerable:!0,get:()=>y.pipeline}),i(p,a,{__proto__:null,enumerable:!0,get:()=>y.finished}),m.Stream=m,m._isUint8Array=function(e){return e instanceof Uint8Array},m._uint8ArrayToBuffer=function(e){return n.from(e.buffer,e.byteOffset,e.byteLength)}},4021:(e,t,r)=>{"use strict";const{ArrayPrototypePop:n,Promise:i}=r(5439),{isIterable:o,isNodeStream:s,isWebStream:a}=r(6140),{pipelineImpl:u}=r(7253),{finished:c}=r(3803);r(4888),e.exports={finished:c,pipeline:function(...e){return new i(((t,r)=>{let i,c;const l=e[e.length-1];if(l&&"object"==typeof l&&!s(l)&&!o(l)&&!a(l)){const t=n(e);i=t.signal,c=t.end}u(e,((e,n)=>{e?r(e):t(n)}),{signal:i,end:c})}))}}},7948:e=>{"use strict";const{AbortController:t,AbortSignal:r}="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0;e.exports=t,e.exports.AbortSignal=r,e.exports.default=t},5766:(e,t)=>{"use strict";t.byteLength=function(e){var t=a(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=a(e),s=o[0],u=o[1],c=new i(function(e,t,r){return 3*(t+r)/4-r}(0,s,u)),l=0,f=u>0?s-4:s;for(r=0;r<f;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;return 2===u&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[l++]=255&t),1===u&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=16383,a=0,c=n-i;a<c;a+=s)o.push(u(e,a,a+s>c?c:a+s));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function a(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,n){for(var i,o,s=[],a=t;a<n;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},2573:(e,t,r)=>{"use strict";var n=r(8834).Buffer,i=r(1329);function o(e,t){return void 0===t&&(t="utf8"),n.isBuffer(e)?a(e.toString("base64")):a(n.from(e,t).toString("base64"))}function s(e){return e=e.toString(),i.default(e).replace(/\-/g,"+").replace(/_/g,"/")}function a(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}var u=o;u.encode=o,u.decode=function(e,t){return void 0===t&&(t="utf8"),n.from(s(e),"base64").toString(t)},u.toBase64=s,u.fromBase64=a,u.toBuffer=function(e){return n.from(s(e),"base64")},t.default=u},1329:(e,t,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.length,r=t%4;if(!r)return e;var i=t,o=4-r,s=t+o,a=n.alloc(s);for(a.write(e);o--;)a.write("=",i++);return a.toString()}},9487:(e,t,r)=>{e.exports=r(2573).default,e.exports.default=e.exports},7160:function(e){e.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=90)}({17:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n=r(18),i=function(){function e(){}return e.getFirstMatch=function(e,t){var r=t.match(e);return r&&r.length>0&&r[1]||""},e.getSecondMatch=function(e,t){var r=t.match(e);return r&&r.length>1&&r[2]||""},e.matchAndReturnConst=function(e,t,r){if(e.test(t))return r},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,r,n){void 0===n&&(n=!1);var i=e.getVersionPrecision(t),o=e.getVersionPrecision(r),s=Math.max(i,o),a=0,u=e.map([t,r],(function(t){var r=s-e.getVersionPrecision(t),n=t+new Array(r+1).join(".0");return e.map(n.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(n&&(a=s-Math.min(i,o)),s-=1;s>=a;){if(u[0][s]>u[1][s])return 1;if(u[0][s]===u[1][s]){if(s===a)return 0;s-=1}else if(u[0][s]<u[1][s])return-1}},e.map=function(e,t){var r,n=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(r=0;r<e.length;r+=1)n.push(t(e[r]));return n},e.find=function(e,t){var r,n;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(r=0,n=e.length;r<n;r+=1){var i=e[r];if(t(i,r))return i}},e.assign=function(e){for(var t,r,n=e,i=arguments.length,o=new Array(i>1?i-1:0),s=1;s<i;s++)o[s-1]=arguments[s];if(Object.assign)return Object.assign.apply(Object,[e].concat(o));var a=function(){var e=o[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){n[t]=e[t]}))};for(t=0,r=o.length;t<r;t+=1)a();return e},e.getBrowserAlias=function(e){return n.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return n.BROWSER_MAP[e]||""},e}();t.default=i,e.exports=t.default},18:function(e,t,r){"use strict";t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(91))&&n.__esModule?n:{default:n},o=r(18);function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var a=function(){function e(){}var t,r;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new i.default(e,t)},e.parse=function(e){return new i.default(e).getResult()},t=e,r=[{key:"BROWSER_MAP",get:function(){return o.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return o.ENGINE_MAP}},{key:"OS_MAP",get:function(){return o.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return o.PLATFORMS_MAP}}],null&&s(t.prototype,null),r&&s(t,r),e}();t.default=a,e.exports=t.default},91:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n=u(r(92)),i=u(r(93)),o=u(r(94)),s=u(r(95)),a=u(r(17));function u(e){return e&&e.__esModule?e:{default:e}}var c=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=a.default.find(n.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=a.default.find(i.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=a.default.find(o.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=a.default.find(s.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return a.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,r={},n=0,i={},o=0;if(Object.keys(e).forEach((function(t){var s=e[t];"string"==typeof s?(i[t]=s,o+=1):"object"==typeof s&&(r[t]=s,n+=1)})),n>0){var s=Object.keys(r),u=a.default.find(s,(function(e){return t.isOS(e)}));if(u){var c=this.satisfies(r[u]);if(void 0!==c)return c}var l=a.default.find(s,(function(e){return t.isPlatform(e)}));if(l){var f=this.satisfies(r[l]);if(void 0!==f)return f}}if(o>0){var h=Object.keys(i),d=a.default.find(h,(function(e){return t.isBrowser(e,!0)}));if(void 0!==d)return this.compareVersion(i[d])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var r=this.getBrowserName().toLowerCase(),n=e.toLowerCase(),i=a.default.getBrowserTypeByAlias(n);return t&&i&&(n=i.toLowerCase()),n===r},t.compareVersion=function(e){var t=[0],r=e,n=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(r=e.substr(1),"="===e[1]?(n=!0,r=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?r=e.substr(1):"~"===e[0]&&(n=!0,r=e.substr(1)),t.indexOf(a.default.compareVersions(i,r,n))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=c,e.exports=t.default},92:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=/version\/(\d+(\.?_?\d+)+)/i,s=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},r=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},r=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},r=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},r=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},r=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},r=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},r=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},r=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},r=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},r=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},r=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},r=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},r=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},r=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},r=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return r&&(t.version=r),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},r=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},r=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},r=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},r=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},r=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},r=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},r=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},r=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},r=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},r=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},r=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},r=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){var t={name:"Android Browser"},r=i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},r=i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},r=i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=s,e.exports=t.default},93:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=r(18),s=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:o.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),r=i.default.getWindowsVersionName(t);return{name:o.OS_MAP.Windows,version:t,versionName:r}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:o.OS_MAP.iOS},r=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return r&&(t.version=r),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),r=i.default.getMacOSVersionName(t),n={name:o.OS_MAP.MacOS,version:t};return r&&(n.versionName=r),n}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:o.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),r=i.default.getAndroidVersionName(t),n={name:o.OS_MAP.Android,version:t};return r&&(n.versionName=r),n}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),r={name:o.OS_MAP.WebOS};return t&&t.length&&(r.version=t),r}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:o.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:o.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:o.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.PlayStation4,version:t}}}];t.default=s,e.exports=t.default},94:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=r(18),s=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",r={type:o.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(r.model=t),r}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),r=e.test(/like (ipod|iphone)/i);return t&&!r},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:o.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}}];t.default=s,e.exports=t.default},95:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=r(18),s=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:o.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:o.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:o.ENGINE_MAP.Trident},r=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:o.ENGINE_MAP.Presto},r=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){var t=e.test(/gecko/i),r=e.test(/like gecko/i);return t&&!r},describe:function(e){var t={name:o.ENGINE_MAP.Gecko},r=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:o.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:o.ENGINE_MAP.WebKit},r=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}}];t.default=s,e.exports=t.default}})},8834:(e,t,r)=>{"use strict";const n=r(5766),i=r(2333),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=function(e){return+e!=e&&(e=0),u.alloc(+e)},t.INSPECT_MAX_BYTES=50;const s=2147483647;function a(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return f(e)}return c(e,t,r)}function c(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|y(e,t);let n=a(r);const i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(J(e,Uint8Array)){const t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(J(e,ArrayBuffer)||e&&J(e.buffer,ArrayBuffer))return d(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(J(e,SharedArrayBuffer)||e&&J(e.buffer,SharedArrayBuffer)))return d(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return u.from(n,t,r);const i=function(e){if(u.isBuffer(e)){const t=0|p(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||Z(e.length)?a(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function f(e){return l(e),a(e<0?0:0|p(e))}function h(e){const t=e.length<0?0:0|p(e.length),r=a(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function d(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,u.prototype),n}function p(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function y(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||J(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return G(e).length;default:if(i)return n?-1:q(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,t,r);case"utf8":case"utf-8":return B(this,t,r);case"ascii":return N(this,t,r);case"latin1":case"binary":return x(this,t,r);case"base64":return T(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function m(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Z(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:w(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):w(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function w(e,t,r,n,i){let o,s=1,a=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,r/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){let n=-1;for(o=r;o<a;o++)if(c(e,o)===c(t,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===u)return n*s}else-1!==n&&(o-=o-n),n=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){let r=!0;for(let n=0;n<u;n++)if(c(e,o+n)!==c(t,n)){r=!1;break}if(r)return o}return-1}function v(e,t,r,n){r=Number(r)||0;const i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;const o=t.length;let s;for(n>o/2&&(n=o/2),s=0;s<n;++s){const n=parseInt(t.substr(2*s,2),16);if(Z(n))return s;e[r+s]=n}return s}function _(e,t,r,n){return K(q(t,e.length-r),e,r,n)}function E(e,t,r,n){return K(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function A(e,t,r,n){return K(G(t),e,r,n)}function S(e,t,r,n){return K(function(e,t){let r,n,i;const o=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)r=e.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function T(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function B(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i<r;){const t=e[i];let o=null,s=t>239?4:t>223?3:t>191?2:1;if(i+s<=r){let r,n,a,u;switch(s){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128==(192&r)&&(u=(31&t)<<6|63&r,u>127&&(o=u));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(u=(15&t)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:r=e[i+1],n=e[i+2],a=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(u=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&a,u>65535&&u<1114112&&(o=u))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(e){const t=e.length;if(t<=O)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=O));return r}(n)}t.kMaxLength=s,u.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(e,t,r){return c(e,t,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(e,t,r){return function(e,t,r){return l(e),e<=0?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)}(e,t,r)},u.allocUnsafe=function(e){return f(e)},u.allocUnsafeSlow=function(e){return f(e)},u.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==u.prototype},u.compare=function(e,t){if(J(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),J(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=u.allocUnsafe(t);let i=0;for(r=0;r<e.length;++r){let t=e[r];if(J(t,Uint8Array))i+t.length>n.length?(u.isBuffer(t)||(t=u.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!u.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},u.byteLength=y,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)m(this,t,t+1);return this},u.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},u.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},u.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?B(this,0,e):g.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){let e="";const r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(e,t,r,n,i){if(J(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0);const a=Math.min(o,s),c=this.slice(n,i),l=e.slice(t,r);for(let e=0;e<a;++e)if(c[e]!==l[e]){o=c[e],s=l[e];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return b(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return b(this,e,t,r,!1)},u.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return v(this,e,t,r);case"utf8":case"utf-8":return _(this,e,t,r);case"ascii":case"latin1":case"binary":return E(this,e,t,r);case"base64":return A(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const O=4096;function N(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function x(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function P(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=t;n<r;++n)i+=Y[e[n]];return i}function C(e,t,r){const n=e.slice(t,r);let i="";for(let e=0;e<n.length-1;e+=2)i+=String.fromCharCode(n[e]+256*n[e+1]);return i}function I(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,r,n,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function L(e,t,r,n,i){V(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,r}function j(e,t,r,n,i){V(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s>>=8,e[r+2]=s,s>>=8,e[r+1]=s,s>>=8,e[r]=s,r+8}function k(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function M(e,t,r,n,o){return t=+t,r>>>=0,o||k(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function U(e,t,r,n,o){return t=+t,r>>>=0,o||k(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUintLE=u.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return n},u.prototype.readUintBE=u.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||I(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||I(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||I(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||I(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||I(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=X((function(e){$(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))})),u.prototype.readBigUInt64BE=X((function(e){$(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)})),u.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return e>>>=0,t||I(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||I(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){e>>>=0,t||I(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||I(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||I(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=X((function(e){$(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),u.prototype.readBigInt64BE=X((function(e){$(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),u.prototype.readFloatLE=function(e,t){return e>>>=0,t||I(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||I(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||I(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||I(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||R(this,e,t,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||R(this,e,t,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigUInt64LE=X((function(e,t=0){return L(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=X((function(e,t=0){return j(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);R(this,e,t,r,n-1,-n)}let i=0,o=1,s=0;for(this[t]=255&e;++i<r&&(o*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);R(this,e,t,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigInt64LE=X((function(e,t=0){return L(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=X((function(e,t=0){return j(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(e,t,r){return M(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return M(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return U(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return U(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},u.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{const o=u.isBuffer(e)?e:u.from(e,n),s=o.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=o[i%s]}return this};const z={};function D(e,t,r){z[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function F(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function V(e,t,r,n,i,o){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let i;throw i=o>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new z.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){$(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||H(t,e.length-(r+1))}(n,i,o)}function $(e,t){if("number"!=typeof e)throw new z.ERR_INVALID_ARG_TYPE(t,"number",e)}function H(e,t,r){if(Math.floor(e)!==e)throw $(e,r),new z.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new z.ERR_BUFFER_OUT_OF_BOUNDS;throw new z.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}D("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),D("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),D("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=F(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=F(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const W=/[^+/0-9A-Za-z-_]/g;function q(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let s=0;s<n;++s){if(r=e.charCodeAt(s),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function G(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(W,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function K(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function J(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Z(e){return e!=e}const Y=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function X(e){return"undefined"==typeof BigInt?Q:e}function Q(){throw new Error("BigInt not supported")}},2680:(e,t,r)=>{"use strict";var n=r(7286),i=r(9429),o=i(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&o(e,".prototype.")>-1?i(r):r}},9429:(e,t,r)=>{"use strict";var n=r(4090),i=r(7286),o=i("%Function.prototype.apply%"),s=i("%Function.prototype.call%"),a=i("%Reflect.apply%",!0)||n.call(s,o),u=i("%Object.getOwnPropertyDescriptor%",!0),c=i("%Object.defineProperty%",!0),l=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(e){c=null}e.exports=function(e){var t=a(n,s,arguments);return u&&c&&u(t,"length").configurable&&c(t,"length",{value:1+l(0,e.length-(arguments.length-1))}),t};var f=function(){return a(n,o,arguments)};c?c(e.exports,"apply",{value:f}):e.exports.apply=f},8797:(e,t,r)=>{var n=r(4406),i=r(7033),o=function(){},s=function(e,t,r){if("function"==typeof t)return s(e,null,t);t||(t={}),r=i(r||o);var a=e._writableState,u=e._readableState,c=t.readable||!1!==t.readable&&e.readable,l=t.writable||!1!==t.writable&&e.writable,f=!1,h=function(){e.writable||d()},d=function(){l=!1,c||r.call(e)},p=function(){c=!1,l||r.call(e)},y=function(t){r.call(e,t?new Error("exited with error code: "+t):null)},g=function(t){r.call(e,t)},m=function(){n.nextTick(b)},b=function(){if(!f)return(!c||u&&u.ended&&!u.destroyed)&&(!l||a&&a.ended&&!a.destroyed)?void 0:r.call(e,new Error("premature close"))},w=function(){e.req.on("finish",d)};return function(e){return e.setHeader&&"function"==typeof e.abort}(e)?(e.on("complete",d),e.on("abort",m),e.req?w():e.on("request",w)):l&&!a&&(e.on("end",h),e.on("close",h)),function(e){return e.stdio&&Array.isArray(e.stdio)&&3===e.stdio.length}(e)&&e.on("exit",y),e.on("end",p),e.on("finish",d),!1!==t.error&&e.on("error",g),e.on("close",m),function(){f=!0,e.removeListener("complete",d),e.removeListener("abort",m),e.removeListener("request",w),e.req&&e.req.removeListener("finish",d),e.removeListener("end",h),e.removeListener("close",h),e.removeListener("finish",d),e.removeListener("exit",y),e.removeListener("end",p),e.removeListener("error",g),e.removeListener("close",m)}};e.exports=s},4723:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumProviderError=t.EthereumRpcError=void 0;const n=r(7847);class i extends Error{constructor(e,t,r){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!t||"string"!=typeof t)throw new Error('"message" must be a nonempty string.');super(t),this.code=e,void 0!==r&&(this.data=r)}serialize(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),this.stack&&(e.stack=this.stack),e}toString(){return n.default(this.serialize(),o,2)}}function o(e,t){if("[Circular]"!==t)return t}t.EthereumRpcError=i,t.EthereumProviderError=class extends i{constructor(e,t,r){if(!function(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,r)}}},4792:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.errorValues=t.errorCodes=void 0,t.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},t.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}}},8159:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ethErrors=void 0;const n=r(4723),i=r(894),o=r(4792);function s(e,t){const[r,o]=u(t);return new n.EthereumRpcError(e,r||i.getMessageFromCode(e),o)}function a(e,t){const[r,o]=u(t);return new n.EthereumProviderError(e,r||i.getMessageFromCode(e),o)}function u(e){if(e){if("string"==typeof e)return[e];if("object"==typeof e&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&"string"!=typeof t)throw new Error("Must specify string message.");return[t||void 0,r]}}return[]}t.ethErrors={rpc:{parse:e=>s(o.errorCodes.rpc.parse,e),invalidRequest:e=>s(o.errorCodes.rpc.invalidRequest,e),invalidParams:e=>s(o.errorCodes.rpc.invalidParams,e),methodNotFound:e=>s(o.errorCodes.rpc.methodNotFound,e),internal:e=>s(o.errorCodes.rpc.internal,e),server:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return s(t,e)},invalidInput:e=>s(o.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>s(o.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>s(o.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>s(o.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>s(o.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>s(o.errorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>a(o.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>a(o.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>a(o.errorCodes.provider.unsupportedMethod,e),disconnected:e=>a(o.errorCodes.provider.disconnected,e),chainDisconnected:e=>a(o.errorCodes.provider.chainDisconnected,e),custom:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:r,data:i}=e;if(!r||"string"!=typeof r)throw new Error('"message" must be a nonempty string');return new n.EthereumProviderError(t,r,i)}}}},8094:(e,t,r)=>{"use strict";t.Xy=t.Sy=void 0;r(4723);const n=r(894);Object.defineProperty(t,"Xy",{enumerable:!0,get:function(){return n.serializeError}});const i=r(8159);Object.defineProperty(t,"Sy",{enumerable:!0,get:function(){return i.ethErrors}});r(4792)},894:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeError=t.isValidCode=t.getMessageFromCode=t.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const n=r(4792),i=r(4723),o=n.errorCodes.rpc.internal,s={code:o,message:a(o)};function a(e,r="Unspecified error message. This is a bug, please report it."){if(Number.isInteger(e)){const r=e.toString();if(f(n.errorValues,r))return n.errorValues[r].message;if(c(e))return t.JSON_RPC_SERVER_ERROR_MESSAGE}return r}function u(e){if(!Number.isInteger(e))return!1;const t=e.toString();return!!n.errorValues[t]||!!c(e)}function c(e){return e>=-32099&&e<=-32e3}function l(e){return e&&"object"==typeof e&&!Array.isArray(e)?Object.assign({},e):e}function f(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",t.getMessageFromCode=a,t.isValidCode=u,t.serializeError=function(e,{fallbackError:t=s,shouldIncludeStack:r=!1}={}){var n,o;if(!t||!Number.isInteger(t.code)||"string"!=typeof t.message)throw new Error("Must provide fallback error with integer number code and string message.");if(e instanceof i.EthereumRpcError)return e.serialize();const c={};if(e&&"object"==typeof e&&!Array.isArray(e)&&f(e,"code")&&u(e.code)){const t=e;c.code=t.code,t.message&&"string"==typeof t.message?(c.message=t.message,f(t,"data")&&(c.data=t.data)):(c.message=a(c.code),c.data={originalError:l(e)})}else{c.code=t.code;const r=null===(n=e)||void 0===n?void 0:n.message;c.message=r&&"string"==typeof r?r:t.message,c.data={originalError:l(e)}}const h=null===(o=e)||void 0===o?void 0:o.stack;return r&&e&&h&&"string"==typeof h&&(c.stack=h),c}},1115:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.keccak512=t.keccak384=t.keccak256=t.keccak224=void 0;const n=r(125),i=r(144);t.keccak224=(0,i.wrapHash)(n.keccak_224),t.keccak256=(()=>{const e=(0,i.wrapHash)(n.keccak_256);return e.create=n.keccak_256.create,e})(),t.keccak384=(0,i.wrapHash)(n.keccak_384),t.keccak512=(0,i.wrapHash)(n.keccak_512)},101:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.secp256k1=void 0;var n=r(8358);Object.defineProperty(t,"secp256k1",{enumerable:!0,get:function(){return n.secp256k1}})},144:function(e,t,r){"use strict";e=r.nmd(e);var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=t.wrapHash=t.equalsBytes=t.hexToBytes=t.bytesToUtf8=t.utf8ToBytes=t.createView=t.concatBytes=t.toHex=t.bytesToHex=t.assertBytes=t.assertBool=void 0;const i=n(r(3525)),o=r(64),s=i.default.bool;t.assertBool=s;const a=i.default.bytes;t.assertBytes=a;var u=r(64);Object.defineProperty(t,"bytesToHex",{enumerable:!0,get:function(){return u.bytesToHex}}),Object.defineProperty(t,"toHex",{enumerable:!0,get:function(){return u.bytesToHex}}),Object.defineProperty(t,"concatBytes",{enumerable:!0,get:function(){return u.concatBytes}}),Object.defineProperty(t,"createView",{enumerable:!0,get:function(){return u.createView}}),Object.defineProperty(t,"utf8ToBytes",{enumerable:!0,get:function(){return u.utf8ToBytes}}),t.bytesToUtf8=function(e){if(!(e instanceof Uint8Array))throw new TypeError("bytesToUtf8 expected Uint8Array, got "+typeof e);return(new TextDecoder).decode(e)},t.hexToBytes=function(e){const t=e.startsWith("0x")?e.substring(2):e;return(0,o.hexToBytes)(t)},t.equalsBytes=function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0},t.wrapHash=function(e){return t=>(i.default.bytes(t),e(t))},t.crypto=(()=>{const t="object"==typeof self&&"crypto"in self?self.crypto:void 0,r="function"==typeof e.require&&e.require.bind(e);return{node:r&&!t?r("crypto"):void 0,web:t}})()},2699:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}y(e,t,o,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&y(e,"error",t,{once:!0})}(e,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function c(e,t,r,n){var i,o,s,c;if(a(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),s=o[t]),void 0===s)s=o[t]=r,++e._eventsCount;else if("function"==typeof s?s=o[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=u(e))>0&&s.length>i&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,c=l,console&&console.warn&&console.warn(c)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=l.bind(n);return i.listener=r,n.wrapFn=i,i}function h(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):p(i,i.length)}function d(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function y(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){n.once&&e.removeEventListener(t,i),r(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=o[e];if(void 0===u)return!1;if("function"==typeof u)n(u,this,t);else{var c=u.length,l=p(u,c);for(r=0;r<c;++r)n(l[r],this,t)}return!0},o.prototype.addListener=function(e,t){return c(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return c(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,f(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,f(this,e,t)),this},o.prototype.removeListener=function(e,t){var r,n,i,o,s;if(a(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return h(this,e,!0)},o.prototype.rawListeners=function(e){return h(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},o.prototype.listenerCount=d,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},7847:e=>{e.exports=s,s.default=s,s.stable=l,s.stableStringify=l;var t="[...]",r="[Circular]",n=[],i=[];function o(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function s(e,t,r,s){var a;void 0===s&&(s=o()),u(e,"",0,[],void 0,0,s);try{a=0===i.length?JSON.stringify(e,t,r):JSON.stringify(e,h(t),r)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var c=n.pop();4===c.length?Object.defineProperty(c[0],c[1],c[3]):c[0][c[1]]=c[2]}}return a}function a(e,t,r,o){var s=Object.getOwnPropertyDescriptor(o,r);void 0!==s.get?s.configurable?(Object.defineProperty(o,r,{value:e}),n.push([o,r,t,s])):i.push([t,r,e]):(o[r]=e,n.push([o,r,t]))}function u(e,n,i,o,s,c,l){var f;if(c+=1,"object"==typeof e&&null!==e){for(f=0;f<o.length;f++)if(o[f]===e)return void a(r,e,n,s);if(void 0!==l.depthLimit&&c>l.depthLimit)return void a(t,e,n,s);if(void 0!==l.edgesLimit&&i+1>l.edgesLimit)return void a(t,e,n,s);if(o.push(e),Array.isArray(e))for(f=0;f<e.length;f++)u(e[f],f,f,o,e,c,l);else{var h=Object.keys(e);for(f=0;f<h.length;f++){var d=h[f];u(e[d],d,f,o,e,c,l)}}o.pop()}}function c(e,t){return e<t?-1:e>t?1:0}function l(e,t,r,s){void 0===s&&(s=o());var a,u=f(e,"",0,[],void 0,0,s)||e;try{a=0===i.length?JSON.stringify(u,t,r):JSON.stringify(u,h(t),r)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var c=n.pop();4===c.length?Object.defineProperty(c[0],c[1],c[3]):c[0][c[1]]=c[2]}}return a}function f(e,i,o,s,u,l,h){var d;if(l+=1,"object"==typeof e&&null!==e){for(d=0;d<s.length;d++)if(s[d]===e)return void a(r,e,i,u);try{if("function"==typeof e.toJSON)return}catch(e){return}if(void 0!==h.depthLimit&&l>h.depthLimit)return void a(t,e,i,u);if(void 0!==h.edgesLimit&&o+1>h.edgesLimit)return void a(t,e,i,u);if(s.push(e),Array.isArray(e))for(d=0;d<e.length;d++)f(e[d],d,d,s,e,l,h);else{var p={},y=Object.keys(e).sort(c);for(d=0;d<y.length;d++){var g=y[d];f(e[g],g,d,s,e,l,h),p[g]=e[g]}if(void 0===u)return p;n.push([u,i,e]),u[i]=p}s.pop()}}function h(e){return e=void 0!==e?e:function(e,t){return t},function(t,r){if(i.length>0)for(var n=0;n<i.length;n++){var o=i[n];if(o[1]===t&&o[0]===r){r=o[2],i.splice(n,1);break}}return e.call(this,t,r)}}},3243:(e,t,r)=>{"use strict";var n=r(9680),i=Object.prototype.toString,o=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){if(!n(t))throw new TypeError("iterator must be a function");var s;arguments.length>=3&&(s=r),"[object Array]"===i.call(e)?function(e,t,r){for(var n=0,i=e.length;n<i;n++)o.call(e,n)&&(null==r?t(e[n],n,e):t.call(r,e[n],n,e))}(e,t,s):"string"==typeof e?function(e,t,r){for(var n=0,i=e.length;n<i;n++)null==r?t(e.charAt(n),n,e):t.call(r,e.charAt(n),n,e)}(e,t,s):function(e,t,r){for(var n in e)o.call(e,n)&&(null==r?t(e[n],n,e):t.call(r,e[n],n,e))}(e,t,s)}},7795:e=>{"use strict";var t=Array.prototype.slice,r=Object.prototype.toString;e.exports=function(e){var n=this;if("function"!=typeof n||"[object Function]"!==r.call(n))throw new TypeError("Function.prototype.bind called on incompatible "+n);for(var i,o=t.call(arguments,1),s=Math.max(0,n.length-o.length),a=[],u=0;u<s;u++)a.push("$"+u);if(i=Function("binder","return function ("+a.join(",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof i){var r=n.apply(this,o.concat(t.call(arguments)));return Object(r)===r?r:this}return n.apply(e,o.concat(t.call(arguments)))})),n.prototype){var c=function(){};c.prototype=n.prototype,i.prototype=new c,c.prototype=null}return i}},4090:(e,t,r)=>{"use strict";var n=r(7795);e.exports=Function.prototype.bind||n},7286:(e,t,r)=>{"use strict";var n,i=SyntaxError,o=Function,s=TypeError,a=function(e){try{return o('"use strict"; return ('+e+").constructor;")()}catch(e){}},u=Object.getOwnPropertyDescriptor;if(u)try{u({},"")}catch(e){u=null}var c=function(){throw new s},l=u?function(){try{return c}catch(e){try{return u(arguments,"callee").get}catch(e){return c}}}():c,f=r(2636)(),h=r(8486)(),d=Object.getPrototypeOf||(h?function(e){return e.__proto__}:null),p={},y="undefined"!=typeof Uint8Array&&d?d(Uint8Array):n,g={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":f&&d?d([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":p,"%AsyncGenerator%":p,"%AsyncGeneratorFunction%":p,"%AsyncIteratorPrototype%":p,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":p,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":f&&d?d(d([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&f&&d?d((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&f&&d?d((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":f&&d?d(""[Symbol.iterator]()):n,"%Symbol%":f?Symbol:n,"%SyntaxError%":i,"%ThrowTypeError%":l,"%TypedArray%":y,"%TypeError%":s,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(d)try{null.error}catch(e){var m=d(d(e));g["%Error.prototype%"]=m}var b=function e(t){var r;if("%AsyncFunction%"===t)r=a("async function () {}");else if("%GeneratorFunction%"===t)r=a("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=a("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&d&&(r=d(i.prototype))}return g[t]=r,r},w={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},v=r(4090),_=r(3198),E=v.call(Function.call,Array.prototype.concat),A=v.call(Function.apply,Array.prototype.splice),S=v.call(Function.call,String.prototype.replace),T=v.call(Function.call,String.prototype.slice),B=v.call(Function.call,RegExp.prototype.exec),O=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,N=/\\(\\)?/g,x=function(e,t){var r,n=e;if(_(w,n)&&(n="%"+(r=w[n])[0]+"%"),_(g,n)){var o=g[n];if(o===p&&(o=b(n)),void 0===o&&!t)throw new s("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new i("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new s('"allowMissing" argument must be a boolean');if(null===B(/^%?[^%]*%?$/,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=T(e,0,1),r=T(e,-1);if("%"===t&&"%"!==r)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new i("invalid intrinsic syntax, expected opening `%`");var n=[];return S(e,O,(function(e,t,r,i){n[n.length]=r?S(i,N,"$1"):t||e})),n}(e),n=r.length>0?r[0]:"",o=x("%"+n+"%",t),a=o.name,c=o.value,l=!1,f=o.alias;f&&(n=f[0],A(r,E([0,1],f)));for(var h=1,d=!0;h<r.length;h+=1){var p=r[h],y=T(p,0,1),m=T(p,-1);if(('"'===y||"'"===y||"`"===y||'"'===m||"'"===m||"`"===m)&&y!==m)throw new i("property names with quotes must have matching quotes");if("constructor"!==p&&d||(l=!0),_(g,a="%"+(n+="."+p)+"%"))c=g[a];else if(null!=c){if(!(p in c)){if(!t)throw new s("base intrinsic for "+e+" exists, but the property is not available.");return}if(u&&h+1>=r.length){var b=u(c,p);c=(d=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:c[p]}else d=_(c,p),c=c[p];d&&!l&&(g[a]=c)}}return c}},326:(e,t,r)=>{"use strict";var n=r(7286)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},8486:e=>{"use strict";var t={foo:{}},r=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof r)}},2636:(e,t,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,i=r(6679);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&i()}},6679:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},7226:(e,t,r)=>{"use strict";var n=r(6679);e.exports=function(){return n()&&!!Symbol.toStringTag}},3198:(e,t,r)=>{"use strict";var n=r(4090);e.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},2333:(e,t)=>{t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,c=u>>1,l=-7,f=r?i-1:0,h=r?-1:1,d=e[t+f];for(f+=h,o=d&(1<<-l)-1,d>>=-l,l+=a;l>0;o=256*o+e[t+f],f+=h,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+e[t+f],f+=h,l-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=c}return(d?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,u,c=8*o-i-1,l=(1<<c)-1,f=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(s++,u/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(t*u-1)*Math.pow(2,i),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[r+d]=255&a,d+=p,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;e[r+d]=255&s,d+=p,s/=256,c-=8);e[r+d-p]|=128*y}},1285:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},2635:(e,t,r)=>{"use strict";var n=r(7226)(),i=r(2680)("Object.prototype.toString"),o=function(e){return!(n&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===i(e)},s=function(e){return!!o(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==i(e)&&"[object Function]"===i(e.callee)},a=function(){return o(arguments)}();o.isLegacyArguments=s,e.exports=a?o:s},9680:e=>{"use strict";var t,r,n=Function.prototype.toString,i="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof i&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw r}}),r={},i((function(){throw 42}),null,t)}catch(e){e!==r&&(i=null)}else i=null;var o=/^\s*class\b/,s=function(e){try{var t=n.call(e);return o.test(t)}catch(e){return!1}},a=function(e){try{return!s(e)&&(n.call(e),!0)}catch(e){return!1}},u=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var h=document.all;u.call(h)===u.call(document.all)&&(f=function(e){if((l||!e)&&(void 0===e||"object"==typeof e))try{var t=u.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=i?function(e){if(f(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{i(e,null,t)}catch(e){if(e!==r)return!1}return!s(e)&&a(e)}:function(e){if(f(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(c)return a(e);if(s(e))return!1;var t=u.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&a(e)}},3138:(e,t,r)=>{"use strict";var n,i=Object.prototype.toString,o=Function.prototype.toString,s=/^\s*(?:function)?\*/,a=r(7226)(),u=Object.getPrototypeOf;e.exports=function(e){if("function"!=typeof e)return!1;if(s.test(o.call(e)))return!0;if(!a)return"[object GeneratorFunction]"===i.call(e);if(!u)return!1;if(void 0===n){var t=function(){if(!a)return!1;try{return Function("return function*() {}")()}catch(e){}}();n=!!t&&u(t)}return u(e)===n}},198:(e,t,r)=>{"use strict";var n=r(3243),i=r(2191),o=r(2680),s=o("Object.prototype.toString"),a=r(7226)(),u=r(326),c="undefined"==typeof globalThis?r.g:globalThis,l=i(),f=o("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r<e.length;r+=1)if(e[r]===t)return r;return-1},h=o("String.prototype.slice"),d={},p=Object.getPrototypeOf;a&&u&&p&&n(l,(function(e){var t=new c[e];if(Symbol.toStringTag in t){var r=p(t),n=u(r,Symbol.toStringTag);if(!n){var i=p(r);n=u(i,Symbol.toStringTag)}d[e]=n.get}})),e.exports=function(e){if(!e||"object"!=typeof e)return!1;if(!a||!(Symbol.toStringTag in e)){var t=h(s(e),8,-1);return f(l,t)>-1}return!!u&&function(e){var t=!1;return n(d,(function(r,n){if(!t)try{t=r.call(e)===n}catch(e){}})),t}(e)}},3349:e=>{e.exports=function(e){var t=(e=e||{}).max||Number.MAX_SAFE_INTEGER,r=void 0!==e.start?e.start:Math.floor(Math.random()*t);return function(){return r%=t,r++}}},1344:(e,t,r)=>{e=r.nmd(e);var n="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",s="[object AsyncFunction]",a="[object Function]",u="[object GeneratorFunction]",c="[object Null]",l="[object Object]",f="[object Proxy]",h="[object Undefined]",d=/^\[object .+?Constructor\]$/,p=/^(?:0|[1-9]\d*)$/,y={};y["[object Float32Array]"]=y["[object Float64Array]"]=y["[object Int8Array]"]=y["[object Int16Array]"]=y["[object Int32Array]"]=y["[object Uint8Array]"]=y["[object Uint8ClampedArray]"]=y["[object Uint16Array]"]=y["[object Uint32Array]"]=!0,y[o]=y["[object Array]"]=y["[object ArrayBuffer]"]=y["[object Boolean]"]=y["[object DataView]"]=y["[object Date]"]=y["[object Error]"]=y[a]=y["[object Map]"]=y["[object Number]"]=y[l]=y["[object RegExp]"]=y["[object Set]"]=y["[object String]"]=y["[object WeakMap]"]=!1;var g,m,b,w="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,v="object"==typeof self&&self&&self.Object===Object&&self,_=w||v||Function("return this")(),E=t&&!t.nodeType&&t,A=E&&e&&!e.nodeType&&e,S=A&&A.exports===E,T=S&&w.process,B=function(){try{return A&&A.require&&A.require("util").types||T&&T.binding&&T.binding("util")}catch(e){}}(),O=B&&B.isTypedArray,N=Array.prototype,x=Function.prototype,P=Object.prototype,C=_["__core-js_shared__"],I=x.toString,R=P.hasOwnProperty,L=(g=/[^.]+$/.exec(C&&C.keys&&C.keys.IE_PROTO||""))?"Symbol(src)_1."+g:"",j=P.toString,k=I.call(Object),M=RegExp("^"+I.call(R).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),U=S?_.Buffer:void 0,z=_.Symbol,D=_.Uint8Array,F=(U&&U.allocUnsafe,m=Object.getPrototypeOf,b=Object,function(e){return m(b(e))}),V=Object.create,$=P.propertyIsEnumerable,H=N.splice,W=z?z.toStringTag:void 0,q=function(){try{var e=he(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),G=U?U.isBuffer:void 0,K=Math.max,J=Date.now,Z=he(_,"Map"),Y=he(Object,"create"),X=function(){function e(){}return function(t){if(!Se(t))return{};if(V)return V(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function Q(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ee(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function te(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function re(e){var t=this.__data__=new ee(e);this.size=t.size}function ne(e,t,r){(void 0!==r&&!me(e[t],r)||void 0===r&&!(t in e))&&se(e,t,r)}function ie(e,t,r){var n=e[t];R.call(e,t)&&me(n,r)&&(void 0!==r||t in e)||se(e,t,r)}function oe(e,t){for(var r=e.length;r--;)if(me(e[r][0],t))return r;return-1}function se(e,t,r){"__proto__"==t&&q?q(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}Q.prototype.clear=function(){this.__data__=Y?Y(null):{},this.size=0},Q.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Q.prototype.get=function(e){var t=this.__data__;if(Y){var r=t[e];return r===n?void 0:r}return R.call(t,e)?t[e]:void 0},Q.prototype.has=function(e){var t=this.__data__;return Y?void 0!==t[e]:R.call(t,e)},Q.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Y&&void 0===t?n:t,this},ee.prototype.clear=function(){this.__data__=[],this.size=0},ee.prototype.delete=function(e){var t=this.__data__,r=oe(t,e);return!(r<0||(r==t.length-1?t.pop():H.call(t,r,1),--this.size,0))},ee.prototype.get=function(e){var t=this.__data__,r=oe(t,e);return r<0?void 0:t[r][1]},ee.prototype.has=function(e){return oe(this.__data__,e)>-1},ee.prototype.set=function(e,t){var r=this.__data__,n=oe(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},te.prototype.clear=function(){this.size=0,this.__data__={hash:new Q,map:new(Z||ee),string:new Q}},te.prototype.delete=function(e){var t=fe(this,e).delete(e);return this.size-=t?1:0,t},te.prototype.get=function(e){return fe(this,e).get(e)},te.prototype.has=function(e){return fe(this,e).has(e)},te.prototype.set=function(e,t){var r=fe(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},re.prototype.clear=function(){this.__data__=new ee,this.size=0},re.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},re.prototype.get=function(e){return this.__data__.get(e)},re.prototype.has=function(e){return this.__data__.has(e)},re.prototype.set=function(e,t){var r=this.__data__;if(r instanceof ee){var n=r.__data__;if(!Z||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new te(n)}return r.set(e,t),this.size=r.size,this};function ae(e){return null==e?void 0===e?h:c:W&&W in Object(e)?function(e){var t=R.call(e,W),r=e[W];try{e[W]=void 0;var n=!0}catch(e){}var i=j.call(e);return n&&(t?e[W]=r:delete e[W]),i}(e):function(e){return j.call(e)}(e)}function ue(e){return Te(e)&&ae(e)==o}function ce(e,t,r,n,i){e!==t&&function(e,t,r){for(var n=-1,i=Object(e),o=r(e),s=o.length;s--;){var a=o[++n];if(!1===t(i[a],a,i))break}}(t,(function(o,s){if(i||(i=new re),Se(o))!function(e,t,r,n,i,o,s){var a=ye(e,r),u=ye(t,r),c=s.get(u);if(c)ne(e,r,c);else{var f,h,d,p,y,g=o?o(a,u,r+"",e,t,s):void 0,m=void 0===g;if(m){var b=we(u),w=!b&&_e(u),v=!b&&!w&&Be(u);g=u,b||w||v?we(a)?g=a:Te(y=a)&&ve(y)?g=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}(a):w?(m=!1,g=function(e,t){return e.slice()}(u)):v?(m=!1,p=new(d=(f=u).buffer).constructor(d.byteLength),new D(p).set(new D(d)),h=p,g=new f.constructor(h,f.byteOffset,f.length)):g=[]:function(e){if(!Te(e)||ae(e)!=l)return!1;var t=F(e);if(null===t)return!0;var r=R.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&I.call(r)==k}(u)||be(u)?(g=a,be(a)?g=function(e){return function(e,t,r,n){var i=!r;r||(r={});for(var o=-1,s=t.length;++o<s;){var a=t[o],u=void 0;void 0===u&&(u=e[a]),i?se(r,a,u):ie(r,a,u)}return r}(e,Oe(e))}(a):Se(a)&&!Ee(a)||(g=function(e){return"function"!=typeof e.constructor||pe(e)?{}:X(F(e))}(u))):m=!1}m&&(s.set(u,g),i(g,u,n,o,s),s.delete(u)),ne(e,r,g)}}(e,t,s,r,ce,n,i);else{var a=n?n(ye(e,s),o,s+"",e,t,i):void 0;void 0===a&&(a=o),ne(e,s,a)}}),Oe)}var le=q?function(e,t){return q(e,"toString",{configurable:!0,enumerable:!1,value:(r=t,function(){return r}),writable:!0});var r}:Pe;function fe(e,t){var r,n,i=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof t?"string":"hash"]:i.map}function he(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!Se(e)||function(e){return!!L&&L in e}(e))&&(Ee(e)?M:d).test(function(e){if(null!=e){try{return I.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(r)?r:void 0}function de(e,t){var r=typeof e;return!!(t=null==t?i:t)&&("number"==r||"symbol"!=r&&p.test(e))&&e>-1&&e%1==0&&e<t}function pe(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||P)}function ye(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var ge=function(e){var t=0,r=0;return function(){var n=J(),i=16-(n-r);if(r=n,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(le);function me(e,t){return e===t||e!=e&&t!=t}var be=ue(function(){return arguments}())?ue:function(e){return Te(e)&&R.call(e,"callee")&&!$.call(e,"callee")},we=Array.isArray;function ve(e){return null!=e&&Ae(e.length)&&!Ee(e)}var _e=G||function(){return!1};function Ee(e){if(!Se(e))return!1;var t=ae(e);return t==a||t==u||t==s||t==f}function Ae(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}function Se(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Te(e){return null!=e&&"object"==typeof e}var Be=O?function(e){return function(t){return e(t)}}(O):function(e){return Te(e)&&Ae(e.length)&&!!y[ae(e)]};function Oe(e){return ve(e)?function(e,t){var r=we(e),n=!r&&be(e),i=!r&&!n&&_e(e),o=!r&&!n&&!i&&Be(e),s=r||n||i||o,a=s?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],u=a.length;for(var c in e)!t&&!R.call(e,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||de(c,u))||a.push(c);return a}(e,!0):function(e){if(!Se(e))return function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}(e);var t=pe(e),r=[];for(var n in e)("constructor"!=n||!t&&R.call(e,n))&&r.push(n);return r}(e)}var Ne,xe=(Ne=function(e,t,r){ce(e,t,r)},function(e,t){return ge(function(e,t,r){return t=K(void 0===t?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=K(n.length-t,0),s=Array(o);++i<o;)s[i]=n[t+i];i=-1;for(var a=Array(t+1);++i<t;)a[i]=n[i];return a[t]=r(s),function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}(e,this,a)}}(e,t,Pe),e+"")}((function(e,t){var r=-1,n=t.length,i=n>1?t[n-1]:void 0,o=n>2?t[2]:void 0;for(i=Ne.length>3&&"function"==typeof i?(n--,i):void 0,o&&function(e,t,r){if(!Se(r))return!1;var n=typeof t;return!!("number"==n?ve(r)&&de(t,r.length):"string"==n&&t in r)&&me(r[t],e)}(t[0],t[1],o)&&(i=n<3?void 0:i,n=1),e=Object(e);++r<n;){var s=t[r];s&&Ne(e,s,r)}return e})));function Pe(e){return e}e.exports=xe},6635:function(e,t,r){var n;e=r.nmd(e),function(){var i,o="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",u=32,c=128,l=1/0,f=9007199254740991,h=NaN,d=4294967295,p=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],y="[object Arguments]",g="[object Array]",m="[object Boolean]",b="[object Date]",w="[object Error]",v="[object Function]",_="[object GeneratorFunction]",E="[object Map]",A="[object Number]",S="[object Object]",T="[object Promise]",B="[object RegExp]",O="[object Set]",N="[object String]",x="[object Symbol]",P="[object WeakMap]",C="[object ArrayBuffer]",I="[object DataView]",R="[object Float32Array]",L="[object Float64Array]",j="[object Int8Array]",k="[object Int16Array]",M="[object Int32Array]",U="[object Uint8Array]",z="[object Uint8ClampedArray]",D="[object Uint16Array]",F="[object Uint32Array]",V=/\b__p \+= '';/g,$=/\b(__p \+=) '' \+/g,H=/(__e\(.*?\)|\b__t\)) \+\n'';/g,W=/&(?:amp|lt|gt|quot|#39);/g,q=/[&<>"']/g,G=RegExp(W.source),K=RegExp(q.source),J=/<%-([\s\S]+?)%>/g,Z=/<%([\s\S]+?)%>/g,Y=/<%=([\s\S]+?)%>/g,X=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Q=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,re=RegExp(te.source),ne=/^\s+/,ie=/\s/,oe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,se=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ce=/[()=,{}\[\]\/\s]/,le=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,he=/\w*$/,de=/^[-+]0x[0-9a-f]+$/i,pe=/^0b[01]+$/i,ye=/^\[object .+?Constructor\]$/,ge=/^0o[0-7]+$/i,me=/^(?:0|[1-9]\d*)$/,be=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,we=/($^)/,ve=/['\n\r\u2028\u2029\\]/g,_e="\\ud800-\\udfff",Ee="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ae="\\u2700-\\u27bf",Se="a-z\\xdf-\\xf6\\xf8-\\xff",Te="A-Z\\xc0-\\xd6\\xd8-\\xde",Be="\\ufe0e\\ufe0f",Oe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ne="["+_e+"]",xe="["+Oe+"]",Pe="["+Ee+"]",Ce="\\d+",Ie="["+Ae+"]",Re="["+Se+"]",Le="[^"+_e+Oe+Ce+Ae+Se+Te+"]",je="\\ud83c[\\udffb-\\udfff]",ke="[^"+_e+"]",Me="(?:\\ud83c[\\udde6-\\uddff]){2}",Ue="[\\ud800-\\udbff][\\udc00-\\udfff]",ze="["+Te+"]",De="\\u200d",Fe="(?:"+Re+"|"+Le+")",Ve="(?:"+ze+"|"+Le+")",$e="(?:['’](?:d|ll|m|re|s|t|ve))?",He="(?:['’](?:D|LL|M|RE|S|T|VE))?",We="(?:"+Pe+"|"+je+")?",qe="["+Be+"]?",Ge=qe+We+"(?:"+De+"(?:"+[ke,Me,Ue].join("|")+")"+qe+We+")*",Ke="(?:"+[Ie,Me,Ue].join("|")+")"+Ge,Je="(?:"+[ke+Pe+"?",Pe,Me,Ue,Ne].join("|")+")",Ze=RegExp("['’]","g"),Ye=RegExp(Pe,"g"),Xe=RegExp(je+"(?="+je+")|"+Je+Ge,"g"),Qe=RegExp([ze+"?"+Re+"+"+$e+"(?="+[xe,ze,"$"].join("|")+")",Ve+"+"+He+"(?="+[xe,ze+Fe,"$"].join("|")+")",ze+"?"+Fe+"+"+$e,ze+"+"+He,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ce,Ke].join("|"),"g"),et=RegExp("["+De+_e+Ee+Be+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,rt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],nt=-1,it={};it[R]=it[L]=it[j]=it[k]=it[M]=it[U]=it[z]=it[D]=it[F]=!0,it[y]=it[g]=it[C]=it[m]=it[I]=it[b]=it[w]=it[v]=it[E]=it[A]=it[S]=it[B]=it[O]=it[N]=it[P]=!1;var ot={};ot[y]=ot[g]=ot[C]=ot[I]=ot[m]=ot[b]=ot[R]=ot[L]=ot[j]=ot[k]=ot[M]=ot[E]=ot[A]=ot[S]=ot[B]=ot[O]=ot[N]=ot[x]=ot[U]=ot[z]=ot[D]=ot[F]=!0,ot[w]=ot[v]=ot[P]=!1;var st={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},at=parseFloat,ut=parseInt,ct="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,lt="object"==typeof self&&self&&self.Object===Object&&self,ft=ct||lt||Function("return this")(),ht=t&&!t.nodeType&&t,dt=ht&&e&&!e.nodeType&&e,pt=dt&&dt.exports===ht,yt=pt&&ct.process,gt=function(){try{return dt&&dt.require&&dt.require("util").types||yt&&yt.binding&&yt.binding("util")}catch(e){}}(),mt=gt&&gt.isArrayBuffer,bt=gt&&gt.isDate,wt=gt&&gt.isMap,vt=gt&&gt.isRegExp,_t=gt&&gt.isSet,Et=gt&&gt.isTypedArray;function At(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function St(e,t,r,n){for(var i=-1,o=null==e?0:e.length;++i<o;){var s=e[i];t(n,s,r(s),e)}return n}function Tt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}function Bt(e,t){for(var r=null==e?0:e.length;r--&&!1!==t(e[r],r,e););return e}function Ot(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}function Nt(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){var s=e[r];t(s,r,e)&&(o[i++]=s)}return o}function xt(e,t){return!(null==e||!e.length)&&zt(e,t,0)>-1}function Pt(e,t,r){for(var n=-1,i=null==e?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}function Ct(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}function It(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}function Rt(e,t,r,n){var i=-1,o=null==e?0:e.length;for(n&&o&&(r=e[++i]);++i<o;)r=t(r,e[i],i,e);return r}function Lt(e,t,r,n){var i=null==e?0:e.length;for(n&&i&&(r=e[--i]);i--;)r=t(r,e[i],i,e);return r}function jt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var kt=$t("length");function Mt(e,t,r){var n;return r(e,(function(e,r,i){if(t(e,r,i))return n=r,!1})),n}function Ut(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function zt(e,t,r){return t==t?function(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}(e,t,r):Ut(e,Ft,r)}function Dt(e,t,r,n){for(var i=r-1,o=e.length;++i<o;)if(n(e[i],t))return i;return-1}function Ft(e){return e!=e}function Vt(e,t){var r=null==e?0:e.length;return r?qt(e,t)/r:h}function $t(e){return function(t){return null==t?i:t[e]}}function Ht(e){return function(t){return null==e?i:e[t]}}function Wt(e,t,r,n,i){return i(e,(function(e,i,o){r=n?(n=!1,e):t(r,e,i,o)})),r}function qt(e,t){for(var r,n=-1,o=e.length;++n<o;){var s=t(e[n]);s!==i&&(r=r===i?s:r+s)}return r}function Gt(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function Kt(e){return e?e.slice(0,fr(e)+1).replace(ne,""):e}function Jt(e){return function(t){return e(t)}}function Zt(e,t){return Ct(t,(function(t){return e[t]}))}function Yt(e,t){return e.has(t)}function Xt(e,t){for(var r=-1,n=e.length;++r<n&&zt(t,e[r],0)>-1;);return r}function Qt(e,t){for(var r=e.length;r--&&zt(t,e[r],0)>-1;);return r}var er=Ht({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),tr=Ht({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function rr(e){return"\\"+st[e]}function nr(e){return et.test(e)}function ir(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function or(e,t){return function(r){return e(t(r))}}function sr(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var s=e[r];s!==t&&s!==a||(e[r]=a,o[i++]=r)}return o}function ar(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}function ur(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=[e,e]})),r}function cr(e){return nr(e)?function(e){for(var t=Xe.lastIndex=0;Xe.test(e);)++t;return t}(e):kt(e)}function lr(e){return nr(e)?function(e){return e.match(Xe)||[]}(e):function(e){return e.split("")}(e)}function fr(e){for(var t=e.length;t--&&ie.test(e.charAt(t)););return t}var hr=Ht({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),dr=function e(t){var r,n=(t=null==t?ft:dr.defaults(ft.Object(),t,dr.pick(ft,rt))).Array,ie=t.Date,_e=t.Error,Ee=t.Function,Ae=t.Math,Se=t.Object,Te=t.RegExp,Be=t.String,Oe=t.TypeError,Ne=n.prototype,xe=Ee.prototype,Pe=Se.prototype,Ce=t["__core-js_shared__"],Ie=xe.toString,Re=Pe.hasOwnProperty,Le=0,je=(r=/[^.]+$/.exec(Ce&&Ce.keys&&Ce.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",ke=Pe.toString,Me=Ie.call(Se),Ue=ft._,ze=Te("^"+Ie.call(Re).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),De=pt?t.Buffer:i,Fe=t.Symbol,Ve=t.Uint8Array,$e=De?De.allocUnsafe:i,He=or(Se.getPrototypeOf,Se),We=Se.create,qe=Pe.propertyIsEnumerable,Ge=Ne.splice,Ke=Fe?Fe.isConcatSpreadable:i,Je=Fe?Fe.iterator:i,Xe=Fe?Fe.toStringTag:i,et=function(){try{var e=uo(Se,"defineProperty");return e({},"",{}),e}catch(e){}}(),st=t.clearTimeout!==ft.clearTimeout&&t.clearTimeout,ct=ie&&ie.now!==ft.Date.now&&ie.now,lt=t.setTimeout!==ft.setTimeout&&t.setTimeout,ht=Ae.ceil,dt=Ae.floor,yt=Se.getOwnPropertySymbols,gt=De?De.isBuffer:i,kt=t.isFinite,Ht=Ne.join,pr=or(Se.keys,Se),yr=Ae.max,gr=Ae.min,mr=ie.now,br=t.parseInt,wr=Ae.random,vr=Ne.reverse,_r=uo(t,"DataView"),Er=uo(t,"Map"),Ar=uo(t,"Promise"),Sr=uo(t,"Set"),Tr=uo(t,"WeakMap"),Br=uo(Se,"create"),Or=Tr&&new Tr,Nr={},xr=Mo(_r),Pr=Mo(Er),Cr=Mo(Ar),Ir=Mo(Sr),Rr=Mo(Tr),Lr=Fe?Fe.prototype:i,jr=Lr?Lr.valueOf:i,kr=Lr?Lr.toString:i;function Mr(e){if(ea(e)&&!$s(e)&&!(e instanceof Fr)){if(e instanceof Dr)return e;if(Re.call(e,"__wrapped__"))return Uo(e)}return new Dr(e)}var Ur=function(){function e(){}return function(t){if(!Qs(t))return{};if(We)return We(t);e.prototype=t;var r=new e;return e.prototype=i,r}}();function zr(){}function Dr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Fr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Vr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function $r(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Hr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Wr(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new Hr;++t<r;)this.add(e[t])}function qr(e){var t=this.__data__=new $r(e);this.size=t.size}function Gr(e,t){var r=$s(e),n=!r&&Vs(e),i=!r&&!n&&Gs(e),o=!r&&!n&&!i&&ua(e),s=r||n||i||o,a=s?Gt(e.length,Be):[],u=a.length;for(var c in e)!t&&!Re.call(e,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||go(c,u))||a.push(c);return a}function Kr(e){var t=e.length;return t?e[Wn(0,t-1)]:i}function Jr(e,t){return Io(Bi(e),on(t,0,e.length))}function Zr(e){return Io(Bi(e))}function Yr(e,t,r){(r!==i&&!zs(e[t],r)||r===i&&!(t in e))&&rn(e,t,r)}function Xr(e,t,r){var n=e[t];Re.call(e,t)&&zs(n,r)&&(r!==i||t in e)||rn(e,t,r)}function Qr(e,t){for(var r=e.length;r--;)if(zs(e[r][0],t))return r;return-1}function en(e,t,r,n){return ln(e,(function(e,i,o){t(n,e,r(e),o)})),n}function tn(e,t){return e&&Oi(t,Pa(t),e)}function rn(e,t,r){"__proto__"==t&&et?et(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function nn(e,t){for(var r=-1,o=t.length,s=n(o),a=null==e;++r<o;)s[r]=a?i:Ta(e,t[r]);return s}function on(e,t,r){return e==e&&(r!==i&&(e=e<=r?e:r),t!==i&&(e=e>=t?e:t)),e}function sn(e,t,r,n,o,s){var a,u=1&t,c=2&t,l=4&t;if(r&&(a=o?r(e,n,o,s):r(e)),a!==i)return a;if(!Qs(e))return e;var f=$s(e);if(f){if(a=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&Re.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(e),!u)return Bi(e,a)}else{var h=fo(e),d=h==v||h==_;if(Gs(e))return vi(e,u);if(h==S||h==y||d&&!o){if(a=c||d?{}:po(e),!u)return c?function(e,t){return Oi(e,lo(e),t)}(e,function(e,t){return e&&Oi(t,Ca(t),e)}(a,e)):function(e,t){return Oi(e,co(e),t)}(e,tn(a,e))}else{if(!ot[h])return o?e:{};a=function(e,t,r){var n,i=e.constructor;switch(t){case C:return _i(e);case m:case b:return new i(+e);case I:return function(e,t){var r=t?_i(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case R:case L:case j:case k:case M:case U:case z:case D:case F:return Ei(e,r);case E:return new i;case A:case N:return new i(e);case B:return function(e){var t=new e.constructor(e.source,he.exec(e));return t.lastIndex=e.lastIndex,t}(e);case O:return new i;case x:return n=e,jr?Se(jr.call(n)):{}}}(e,h,u)}}s||(s=new qr);var p=s.get(e);if(p)return p;s.set(e,a),oa(e)?e.forEach((function(n){a.add(sn(n,t,r,n,e,s))})):ta(e)&&e.forEach((function(n,i){a.set(i,sn(n,t,r,i,e,s))}));var g=f?i:(l?c?to:eo:c?Ca:Pa)(e);return Tt(g||e,(function(n,i){g&&(n=e[i=n]),Xr(a,i,sn(n,t,r,i,e,s))})),a}function an(e,t,r){var n=r.length;if(null==e)return!n;for(e=Se(e);n--;){var o=r[n],s=t[o],a=e[o];if(a===i&&!(o in e)||!s(a))return!1}return!0}function un(e,t,r){if("function"!=typeof e)throw new Oe(o);return No((function(){e.apply(i,r)}),t)}function cn(e,t,r,n){var i=-1,o=xt,s=!0,a=e.length,u=[],c=t.length;if(!a)return u;r&&(t=Ct(t,Jt(r))),n?(o=Pt,s=!1):t.length>=200&&(o=Yt,s=!1,t=new Wr(t));e:for(;++i<a;){var l=e[i],f=null==r?l:r(l);if(l=n||0!==l?l:0,s&&f==f){for(var h=c;h--;)if(t[h]===f)continue e;u.push(l)}else o(t,f,n)||u.push(l)}return u}Mr.templateSettings={escape:J,evaluate:Z,interpolate:Y,variable:"",imports:{_:Mr}},Mr.prototype=zr.prototype,Mr.prototype.constructor=Mr,Dr.prototype=Ur(zr.prototype),Dr.prototype.constructor=Dr,Fr.prototype=Ur(zr.prototype),Fr.prototype.constructor=Fr,Vr.prototype.clear=function(){this.__data__=Br?Br(null):{},this.size=0},Vr.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Vr.prototype.get=function(e){var t=this.__data__;if(Br){var r=t[e];return r===s?i:r}return Re.call(t,e)?t[e]:i},Vr.prototype.has=function(e){var t=this.__data__;return Br?t[e]!==i:Re.call(t,e)},Vr.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Br&&t===i?s:t,this},$r.prototype.clear=function(){this.__data__=[],this.size=0},$r.prototype.delete=function(e){var t=this.__data__,r=Qr(t,e);return!(r<0||(r==t.length-1?t.pop():Ge.call(t,r,1),--this.size,0))},$r.prototype.get=function(e){var t=this.__data__,r=Qr(t,e);return r<0?i:t[r][1]},$r.prototype.has=function(e){return Qr(this.__data__,e)>-1},$r.prototype.set=function(e,t){var r=this.__data__,n=Qr(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Hr.prototype.clear=function(){this.size=0,this.__data__={hash:new Vr,map:new(Er||$r),string:new Vr}},Hr.prototype.delete=function(e){var t=so(this,e).delete(e);return this.size-=t?1:0,t},Hr.prototype.get=function(e){return so(this,e).get(e)},Hr.prototype.has=function(e){return so(this,e).has(e)},Hr.prototype.set=function(e,t){var r=so(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Wr.prototype.add=Wr.prototype.push=function(e){return this.__data__.set(e,s),this},Wr.prototype.has=function(e){return this.__data__.has(e)},qr.prototype.clear=function(){this.__data__=new $r,this.size=0},qr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},qr.prototype.get=function(e){return this.__data__.get(e)},qr.prototype.has=function(e){return this.__data__.has(e)},qr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof $r){var n=r.__data__;if(!Er||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Hr(n)}return r.set(e,t),this.size=r.size,this};var ln=Pi(bn),fn=Pi(wn,!0);function hn(e,t){var r=!0;return ln(e,(function(e,n,i){return r=!!t(e,n,i)})),r}function dn(e,t,r){for(var n=-1,o=e.length;++n<o;){var s=e[n],a=t(s);if(null!=a&&(u===i?a==a&&!aa(a):r(a,u)))var u=a,c=s}return c}function pn(e,t){var r=[];return ln(e,(function(e,n,i){t(e,n,i)&&r.push(e)})),r}function yn(e,t,r,n,i){var o=-1,s=e.length;for(r||(r=yo),i||(i=[]);++o<s;){var a=e[o];t>0&&r(a)?t>1?yn(a,t-1,r,n,i):It(i,a):n||(i[i.length]=a)}return i}var gn=Ci(),mn=Ci(!0);function bn(e,t){return e&&gn(e,t,Pa)}function wn(e,t){return e&&mn(e,t,Pa)}function vn(e,t){return Nt(t,(function(t){return Zs(e[t])}))}function _n(e,t){for(var r=0,n=(t=gi(t,e)).length;null!=e&&r<n;)e=e[ko(t[r++])];return r&&r==n?e:i}function En(e,t,r){var n=t(e);return $s(e)?n:It(n,r(e))}function An(e){return null==e?e===i?"[object Undefined]":"[object Null]":Xe&&Xe in Se(e)?function(e){var t=Re.call(e,Xe),r=e[Xe];try{e[Xe]=i;var n=!0}catch(e){}var o=ke.call(e);return n&&(t?e[Xe]=r:delete e[Xe]),o}(e):function(e){return ke.call(e)}(e)}function Sn(e,t){return e>t}function Tn(e,t){return null!=e&&Re.call(e,t)}function Bn(e,t){return null!=e&&t in Se(e)}function On(e,t,r){for(var o=r?Pt:xt,s=e[0].length,a=e.length,u=a,c=n(a),l=1/0,f=[];u--;){var h=e[u];u&&t&&(h=Ct(h,Jt(t))),l=gr(h.length,l),c[u]=!r&&(t||s>=120&&h.length>=120)?new Wr(u&&h):i}h=e[0];var d=-1,p=c[0];e:for(;++d<s&&f.length<l;){var y=h[d],g=t?t(y):y;if(y=r||0!==y?y:0,!(p?Yt(p,g):o(f,g,r))){for(u=a;--u;){var m=c[u];if(!(m?Yt(m,g):o(e[u],g,r)))continue e}p&&p.push(g),f.push(y)}}return f}function Nn(e,t,r){var n=null==(e=To(e,t=gi(t,e)))?e:e[ko(Jo(t))];return null==n?i:At(n,e,r)}function xn(e){return ea(e)&&An(e)==y}function Pn(e,t,r,n,o){return e===t||(null==e||null==t||!ea(e)&&!ea(t)?e!=e&&t!=t:function(e,t,r,n,o,s){var a=$s(e),u=$s(t),c=a?g:fo(e),l=u?g:fo(t),f=(c=c==y?S:c)==S,h=(l=l==y?S:l)==S,d=c==l;if(d&&Gs(e)){if(!Gs(t))return!1;a=!0,f=!1}if(d&&!f)return s||(s=new qr),a||ua(e)?Xi(e,t,r,n,o,s):function(e,t,r,n,i,o,s){switch(r){case I:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case C:return!(e.byteLength!=t.byteLength||!o(new Ve(e),new Ve(t)));case m:case b:case A:return zs(+e,+t);case w:return e.name==t.name&&e.message==t.message;case B:case N:return e==t+"";case E:var a=ir;case O:var u=1&n;if(a||(a=ar),e.size!=t.size&&!u)return!1;var c=s.get(e);if(c)return c==t;n|=2,s.set(e,t);var l=Xi(a(e),a(t),n,i,o,s);return s.delete(e),l;case x:if(jr)return jr.call(e)==jr.call(t)}return!1}(e,t,c,r,n,o,s);if(!(1&r)){var p=f&&Re.call(e,"__wrapped__"),v=h&&Re.call(t,"__wrapped__");if(p||v){var _=p?e.value():e,T=v?t.value():t;return s||(s=new qr),o(_,T,r,n,s)}}return!!d&&(s||(s=new qr),function(e,t,r,n,o,s){var a=1&r,u=eo(e),c=u.length;if(c!=eo(t).length&&!a)return!1;for(var l=c;l--;){var f=u[l];if(!(a?f in t:Re.call(t,f)))return!1}var h=s.get(e),d=s.get(t);if(h&&d)return h==t&&d==e;var p=!0;s.set(e,t),s.set(t,e);for(var y=a;++l<c;){var g=e[f=u[l]],m=t[f];if(n)var b=a?n(m,g,f,t,e,s):n(g,m,f,e,t,s);if(!(b===i?g===m||o(g,m,r,n,s):b)){p=!1;break}y||(y="constructor"==f)}if(p&&!y){var w=e.constructor,v=t.constructor;w==v||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof v&&v instanceof v||(p=!1)}return s.delete(e),s.delete(t),p}(e,t,r,n,o,s))}(e,t,r,n,Pn,o))}function Cn(e,t,r,n){var o=r.length,s=o,a=!n;if(null==e)return!s;for(e=Se(e);o--;){var u=r[o];if(a&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<s;){var c=(u=r[o])[0],l=e[c],f=u[1];if(a&&u[2]){if(l===i&&!(c in e))return!1}else{var h=new qr;if(n)var d=n(l,f,c,e,t,h);if(!(d===i?Pn(f,l,3,n,h):d))return!1}}return!0}function In(e){return!(!Qs(e)||(t=e,je&&je in t))&&(Zs(e)?ze:ye).test(Mo(e));var t}function Rn(e){return"function"==typeof e?e:null==e?ru:"object"==typeof e?$s(e)?Un(e[0],e[1]):Mn(e):fu(e)}function Ln(e){if(!_o(e))return pr(e);var t=[];for(var r in Se(e))Re.call(e,r)&&"constructor"!=r&&t.push(r);return t}function jn(e,t){return e<t}function kn(e,t){var r=-1,i=Ws(e)?n(e.length):[];return ln(e,(function(e,n,o){i[++r]=t(e,n,o)})),i}function Mn(e){var t=ao(e);return 1==t.length&&t[0][2]?Ao(t[0][0],t[0][1]):function(r){return r===e||Cn(r,e,t)}}function Un(e,t){return bo(e)&&Eo(t)?Ao(ko(e),t):function(r){var n=Ta(r,e);return n===i&&n===t?Ba(r,e):Pn(t,n,3)}}function zn(e,t,r,n,o){e!==t&&gn(t,(function(s,a){if(o||(o=new qr),Qs(s))!function(e,t,r,n,o,s,a){var u=Bo(e,r),c=Bo(t,r),l=a.get(c);if(l)Yr(e,r,l);else{var f=s?s(u,c,r+"",e,t,a):i,h=f===i;if(h){var d=$s(c),p=!d&&Gs(c),y=!d&&!p&&ua(c);f=c,d||p||y?$s(u)?f=u:qs(u)?f=Bi(u):p?(h=!1,f=vi(c,!0)):y?(h=!1,f=Ei(c,!0)):f=[]:na(c)||Vs(c)?(f=u,Vs(u)?f=ga(u):Qs(u)&&!Zs(u)||(f=po(c))):h=!1}h&&(a.set(c,f),o(f,c,n,s,a),a.delete(c)),Yr(e,r,f)}}(e,t,a,r,zn,n,o);else{var u=n?n(Bo(e,a),s,a+"",e,t,o):i;u===i&&(u=s),Yr(e,a,u)}}),Ca)}function Dn(e,t){var r=e.length;if(r)return go(t+=t<0?r:0,r)?e[t]:i}function Fn(e,t,r){t=t.length?Ct(t,(function(e){return $s(e)?function(t){return _n(t,1===e.length?e[0]:e)}:e})):[ru];var n=-1;t=Ct(t,Jt(oo()));var i=kn(e,(function(e,r,i){var o=Ct(t,(function(t){return t(e)}));return{criteria:o,index:++n,value:e}}));return function(e,t){var n=e.length;for(e.sort((function(e,t){return function(e,t,r){for(var n=-1,i=e.criteria,o=t.criteria,s=i.length,a=r.length;++n<s;){var u=Ai(i[n],o[n]);if(u)return n>=a?u:u*("desc"==r[n]?-1:1)}return e.index-t.index}(e,t,r)}));n--;)e[n]=e[n].value;return e}(i)}function Vn(e,t,r){for(var n=-1,i=t.length,o={};++n<i;){var s=t[n],a=_n(e,s);r(a,s)&&Zn(o,gi(s,e),a)}return o}function $n(e,t,r,n){var i=n?Dt:zt,o=-1,s=t.length,a=e;for(e===t&&(t=Bi(t)),r&&(a=Ct(e,Jt(r)));++o<s;)for(var u=0,c=t[o],l=r?r(c):c;(u=i(a,l,u,n))>-1;)a!==e&&Ge.call(a,u,1),Ge.call(e,u,1);return e}function Hn(e,t){for(var r=e?t.length:0,n=r-1;r--;){var i=t[r];if(r==n||i!==o){var o=i;go(i)?Ge.call(e,i,1):ui(e,i)}}return e}function Wn(e,t){return e+dt(wr()*(t-e+1))}function qn(e,t){var r="";if(!e||t<1||t>f)return r;do{t%2&&(r+=e),(t=dt(t/2))&&(e+=e)}while(t);return r}function Gn(e,t){return xo(So(e,t,ru),e+"")}function Kn(e){return Kr(za(e))}function Jn(e,t){var r=za(e);return Io(r,on(t,0,r.length))}function Zn(e,t,r,n){if(!Qs(e))return e;for(var o=-1,s=(t=gi(t,e)).length,a=s-1,u=e;null!=u&&++o<s;){var c=ko(t[o]),l=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=a){var f=u[c];(l=n?n(f,c,u):i)===i&&(l=Qs(f)?f:go(t[o+1])?[]:{})}Xr(u,c,l),u=u[c]}return e}var Yn=Or?function(e,t){return Or.set(e,t),e}:ru,Xn=et?function(e,t){return et(e,"toString",{configurable:!0,enumerable:!1,value:Qa(t),writable:!0})}:ru;function Qn(e){return Io(za(e))}function ei(e,t,r){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var s=n(o);++i<o;)s[i]=e[i+t];return s}function ti(e,t){var r;return ln(e,(function(e,n,i){return!(r=t(e,n,i))})),!!r}function ri(e,t,r){var n=0,i=null==e?n:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;n<i;){var o=n+i>>>1,s=e[o];null!==s&&!aa(s)&&(r?s<=t:s<t)?n=o+1:i=o}return i}return ni(e,t,ru,r)}function ni(e,t,r,n){var o=0,s=null==e?0:e.length;if(0===s)return 0;for(var a=(t=r(t))!=t,u=null===t,c=aa(t),l=t===i;o<s;){var f=dt((o+s)/2),h=r(e[f]),d=h!==i,p=null===h,y=h==h,g=aa(h);if(a)var m=n||y;else m=l?y&&(n||d):u?y&&d&&(n||!p):c?y&&d&&!p&&(n||!g):!p&&!g&&(n?h<=t:h<t);m?o=f+1:s=f}return gr(s,4294967294)}function ii(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var s=e[r],a=t?t(s):s;if(!r||!zs(a,u)){var u=a;o[i++]=0===s?0:s}}return o}function oi(e){return"number"==typeof e?e:aa(e)?h:+e}function si(e){if("string"==typeof e)return e;if($s(e))return Ct(e,si)+"";if(aa(e))return kr?kr.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ai(e,t,r){var n=-1,i=xt,o=e.length,s=!0,a=[],u=a;if(r)s=!1,i=Pt;else if(o>=200){var c=t?null:qi(e);if(c)return ar(c);s=!1,i=Yt,u=new Wr}else u=t?[]:a;e:for(;++n<o;){var l=e[n],f=t?t(l):l;if(l=r||0!==l?l:0,s&&f==f){for(var h=u.length;h--;)if(u[h]===f)continue e;t&&u.push(f),a.push(l)}else i(u,f,r)||(u!==a&&u.push(f),a.push(l))}return a}function ui(e,t){return null==(e=To(e,t=gi(t,e)))||delete e[ko(Jo(t))]}function ci(e,t,r,n){return Zn(e,t,r(_n(e,t)),n)}function li(e,t,r,n){for(var i=e.length,o=n?i:-1;(n?o--:++o<i)&&t(e[o],o,e););return r?ei(e,n?0:o,n?o+1:i):ei(e,n?o+1:0,n?i:o)}function fi(e,t){var r=e;return r instanceof Fr&&(r=r.value()),Rt(t,(function(e,t){return t.func.apply(t.thisArg,It([e],t.args))}),r)}function hi(e,t,r){var i=e.length;if(i<2)return i?ai(e[0]):[];for(var o=-1,s=n(i);++o<i;)for(var a=e[o],u=-1;++u<i;)u!=o&&(s[o]=cn(s[o]||a,e[u],t,r));return ai(yn(s,1),t,r)}function di(e,t,r){for(var n=-1,o=e.length,s=t.length,a={};++n<o;){var u=n<s?t[n]:i;r(a,e[n],u)}return a}function pi(e){return qs(e)?e:[]}function yi(e){return"function"==typeof e?e:ru}function gi(e,t){return $s(e)?e:bo(e,t)?[e]:jo(ma(e))}var mi=Gn;function bi(e,t,r){var n=e.length;return r=r===i?n:r,!t&&r>=n?e:ei(e,t,r)}var wi=st||function(e){return ft.clearTimeout(e)};function vi(e,t){if(t)return e.slice();var r=e.length,n=$e?$e(r):new e.constructor(r);return e.copy(n),n}function _i(e){var t=new e.constructor(e.byteLength);return new Ve(t).set(new Ve(e)),t}function Ei(e,t){var r=t?_i(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Ai(e,t){if(e!==t){var r=e!==i,n=null===e,o=e==e,s=aa(e),a=t!==i,u=null===t,c=t==t,l=aa(t);if(!u&&!l&&!s&&e>t||s&&a&&c&&!u&&!l||n&&a&&c||!r&&c||!o)return 1;if(!n&&!s&&!l&&e<t||l&&r&&o&&!n&&!s||u&&r&&o||!a&&o||!c)return-1}return 0}function Si(e,t,r,i){for(var o=-1,s=e.length,a=r.length,u=-1,c=t.length,l=yr(s-a,0),f=n(c+l),h=!i;++u<c;)f[u]=t[u];for(;++o<a;)(h||o<s)&&(f[r[o]]=e[o]);for(;l--;)f[u++]=e[o++];return f}function Ti(e,t,r,i){for(var o=-1,s=e.length,a=-1,u=r.length,c=-1,l=t.length,f=yr(s-u,0),h=n(f+l),d=!i;++o<f;)h[o]=e[o];for(var p=o;++c<l;)h[p+c]=t[c];for(;++a<u;)(d||o<s)&&(h[p+r[a]]=e[o++]);return h}function Bi(e,t){var r=-1,i=e.length;for(t||(t=n(i));++r<i;)t[r]=e[r];return t}function Oi(e,t,r,n){var o=!r;r||(r={});for(var s=-1,a=t.length;++s<a;){var u=t[s],c=n?n(r[u],e[u],u,r,e):i;c===i&&(c=e[u]),o?rn(r,u,c):Xr(r,u,c)}return r}function Ni(e,t){return function(r,n){var i=$s(r)?St:en,o=t?t():{};return i(r,e,oo(n,2),o)}}function xi(e){return Gn((function(t,r){var n=-1,o=r.length,s=o>1?r[o-1]:i,a=o>2?r[2]:i;for(s=e.length>3&&"function"==typeof s?(o--,s):i,a&&mo(r[0],r[1],a)&&(s=o<3?i:s,o=1),t=Se(t);++n<o;){var u=r[n];u&&e(t,u,n,s)}return t}))}function Pi(e,t){return function(r,n){if(null==r)return r;if(!Ws(r))return e(r,n);for(var i=r.length,o=t?i:-1,s=Se(r);(t?o--:++o<i)&&!1!==n(s[o],o,s););return r}}function Ci(e){return function(t,r,n){for(var i=-1,o=Se(t),s=n(t),a=s.length;a--;){var u=s[e?a:++i];if(!1===r(o[u],u,o))break}return t}}function Ii(e){return function(t){var r=nr(t=ma(t))?lr(t):i,n=r?r[0]:t.charAt(0),o=r?bi(r,1).join(""):t.slice(1);return n[e]()+o}}function Ri(e){return function(t){return Rt(Za(Va(t).replace(Ze,"")),e,"")}}function Li(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=Ur(e.prototype),n=e.apply(r,t);return Qs(n)?n:r}}function ji(e){return function(t,r,n){var o=Se(t);if(!Ws(t)){var s=oo(r,3);t=Pa(t),r=function(e){return s(o[e],e,o)}}var a=e(t,r,n);return a>-1?o[s?t[a]:a]:i}}function ki(e){return Qi((function(t){var r=t.length,n=r,s=Dr.prototype.thru;for(e&&t.reverse();n--;){var a=t[n];if("function"!=typeof a)throw new Oe(o);if(s&&!u&&"wrapper"==no(a))var u=new Dr([],!0)}for(n=u?n:r;++n<r;){var c=no(a=t[n]),l="wrapper"==c?ro(a):i;u=l&&wo(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[no(l[0])].apply(u,l[3]):1==a.length&&wo(a)?u[c]():u.thru(a)}return function(){var e=arguments,n=e[0];if(u&&1==e.length&&$s(n))return u.plant(n).value();for(var i=0,o=r?t[i].apply(this,e):n;++i<r;)o=t[i].call(this,o);return o}}))}function Mi(e,t,r,o,s,a,u,l,f,h){var d=t&c,p=1&t,y=2&t,g=24&t,m=512&t,b=y?i:Li(e);return function c(){for(var w=arguments.length,v=n(w),_=w;_--;)v[_]=arguments[_];if(g)var E=io(c),A=function(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}(v,E);if(o&&(v=Si(v,o,s,g)),a&&(v=Ti(v,a,u,g)),w-=A,g&&w<h){var S=sr(v,E);return Hi(e,t,Mi,c.placeholder,r,v,S,l,f,h-w)}var T=p?r:this,B=y?T[e]:e;return w=v.length,l?v=function(e,t){for(var r=e.length,n=gr(t.length,r),o=Bi(e);n--;){var s=t[n];e[n]=go(s,r)?o[s]:i}return e}(v,l):m&&w>1&&v.reverse(),d&&f<w&&(v.length=f),this&&this!==ft&&this instanceof c&&(B=b||Li(B)),B.apply(T,v)}}function Ui(e,t){return function(r,n){return function(e,t,r,n){return bn(e,(function(e,i,o){t(n,r(e),i,o)})),n}(r,e,t(n),{})}}function zi(e,t){return function(r,n){var o;if(r===i&&n===i)return t;if(r!==i&&(o=r),n!==i){if(o===i)return n;"string"==typeof r||"string"==typeof n?(r=si(r),n=si(n)):(r=oi(r),n=oi(n)),o=e(r,n)}return o}}function Di(e){return Qi((function(t){return t=Ct(t,Jt(oo())),Gn((function(r){var n=this;return e(t,(function(e){return At(e,n,r)}))}))}))}function Fi(e,t){var r=(t=t===i?" ":si(t)).length;if(r<2)return r?qn(t,e):t;var n=qn(t,ht(e/cr(t)));return nr(t)?bi(lr(n),0,e).join(""):n.slice(0,e)}function Vi(e){return function(t,r,o){return o&&"number"!=typeof o&&mo(t,r,o)&&(r=o=i),t=ha(t),r===i?(r=t,t=0):r=ha(r),function(e,t,r,i){for(var o=-1,s=yr(ht((t-e)/(r||1)),0),a=n(s);s--;)a[i?s:++o]=e,e+=r;return a}(t,r,o=o===i?t<r?1:-1:ha(o),e)}}function $i(e){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=ya(t),r=ya(r)),e(t,r)}}function Hi(e,t,r,n,o,s,a,c,l,f){var h=8&t;t|=h?u:64,4&(t&=~(h?64:u))||(t&=-4);var d=[e,t,o,h?s:i,h?a:i,h?i:s,h?i:a,c,l,f],p=r.apply(i,d);return wo(e)&&Oo(p,d),p.placeholder=n,Po(p,e,t)}function Wi(e){var t=Ae[e];return function(e,r){if(e=ya(e),(r=null==r?0:gr(da(r),292))&&kt(e)){var n=(ma(e)+"e").split("e");return+((n=(ma(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}var qi=Sr&&1/ar(new Sr([,-0]))[1]==l?function(e){return new Sr(e)}:au;function Gi(e){return function(t){var r=fo(t);return r==E?ir(t):r==O?ur(t):function(e,t){return Ct(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Ki(e,t,r,s,l,f,h,d){var p=2&t;if(!p&&"function"!=typeof e)throw new Oe(o);var y=s?s.length:0;if(y||(t&=-97,s=l=i),h=h===i?h:yr(da(h),0),d=d===i?d:da(d),y-=l?l.length:0,64&t){var g=s,m=l;s=l=i}var b=p?i:ro(e),w=[e,t,r,s,l,g,m,f,h,d];if(b&&function(e,t){var r=e[1],n=t[1],i=r|n,o=i<131,s=n==c&&8==r||n==c&&256==r&&e[7].length<=t[8]||384==n&&t[7].length<=t[8]&&8==r;if(!o&&!s)return e;1&n&&(e[2]=t[2],i|=1&r?0:4);var u=t[3];if(u){var l=e[3];e[3]=l?Si(l,u,t[4]):u,e[4]=l?sr(e[3],a):t[4]}(u=t[5])&&(l=e[5],e[5]=l?Ti(l,u,t[6]):u,e[6]=l?sr(e[5],a):t[6]),(u=t[7])&&(e[7]=u),n&c&&(e[8]=null==e[8]?t[8]:gr(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}(w,b),e=w[0],t=w[1],r=w[2],s=w[3],l=w[4],!(d=w[9]=w[9]===i?p?0:e.length:yr(w[9]-y,0))&&24&t&&(t&=-25),t&&1!=t)v=8==t||16==t?function(e,t,r){var o=Li(e);return function s(){for(var a=arguments.length,u=n(a),c=a,l=io(s);c--;)u[c]=arguments[c];var f=a<3&&u[0]!==l&&u[a-1]!==l?[]:sr(u,l);return(a-=f.length)<r?Hi(e,t,Mi,s.placeholder,i,u,f,i,i,r-a):At(this&&this!==ft&&this instanceof s?o:e,this,u)}}(e,t,d):t!=u&&33!=t||l.length?Mi.apply(i,w):function(e,t,r,i){var o=1&t,s=Li(e);return function t(){for(var a=-1,u=arguments.length,c=-1,l=i.length,f=n(l+u),h=this&&this!==ft&&this instanceof t?s:e;++c<l;)f[c]=i[c];for(;u--;)f[c++]=arguments[++a];return At(h,o?r:this,f)}}(e,t,r,s);else var v=function(e,t,r){var n=1&t,i=Li(e);return function t(){return(this&&this!==ft&&this instanceof t?i:e).apply(n?r:this,arguments)}}(e,t,r);return Po((b?Yn:Oo)(v,w),e,t)}function Ji(e,t,r,n){return e===i||zs(e,Pe[r])&&!Re.call(n,r)?t:e}function Zi(e,t,r,n,o,s){return Qs(e)&&Qs(t)&&(s.set(t,e),zn(e,t,i,Zi,s),s.delete(t)),e}function Yi(e){return na(e)?i:e}function Xi(e,t,r,n,o,s){var a=1&r,u=e.length,c=t.length;if(u!=c&&!(a&&c>u))return!1;var l=s.get(e),f=s.get(t);if(l&&f)return l==t&&f==e;var h=-1,d=!0,p=2&r?new Wr:i;for(s.set(e,t),s.set(t,e);++h<u;){var y=e[h],g=t[h];if(n)var m=a?n(g,y,h,t,e,s):n(y,g,h,e,t,s);if(m!==i){if(m)continue;d=!1;break}if(p){if(!jt(t,(function(e,t){if(!Yt(p,t)&&(y===e||o(y,e,r,n,s)))return p.push(t)}))){d=!1;break}}else if(y!==g&&!o(y,g,r,n,s)){d=!1;break}}return s.delete(e),s.delete(t),d}function Qi(e){return xo(So(e,i,Ho),e+"")}function eo(e){return En(e,Pa,co)}function to(e){return En(e,Ca,lo)}var ro=Or?function(e){return Or.get(e)}:au;function no(e){for(var t=e.name+"",r=Nr[t],n=Re.call(Nr,t)?r.length:0;n--;){var i=r[n],o=i.func;if(null==o||o==e)return i.name}return t}function io(e){return(Re.call(Mr,"placeholder")?Mr:e).placeholder}function oo(){var e=Mr.iteratee||nu;return e=e===nu?Rn:e,arguments.length?e(arguments[0],arguments[1]):e}function so(e,t){var r,n,i=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof t?"string":"hash"]:i.map}function ao(e){for(var t=Pa(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,Eo(i)]}return t}function uo(e,t){var r=function(e,t){return null==e?i:e[t]}(e,t);return In(r)?r:i}var co=yt?function(e){return null==e?[]:(e=Se(e),Nt(yt(e),(function(t){return qe.call(e,t)})))}:pu,lo=yt?function(e){for(var t=[];e;)It(t,co(e)),e=He(e);return t}:pu,fo=An;function ho(e,t,r){for(var n=-1,i=(t=gi(t,e)).length,o=!1;++n<i;){var s=ko(t[n]);if(!(o=null!=e&&r(e,s)))break;e=e[s]}return o||++n!=i?o:!!(i=null==e?0:e.length)&&Xs(i)&&go(s,i)&&($s(e)||Vs(e))}function po(e){return"function"!=typeof e.constructor||_o(e)?{}:Ur(He(e))}function yo(e){return $s(e)||Vs(e)||!!(Ke&&e&&e[Ke])}function go(e,t){var r=typeof e;return!!(t=null==t?f:t)&&("number"==r||"symbol"!=r&&me.test(e))&&e>-1&&e%1==0&&e<t}function mo(e,t,r){if(!Qs(r))return!1;var n=typeof t;return!!("number"==n?Ws(r)&&go(t,r.length):"string"==n&&t in r)&&zs(r[t],e)}function bo(e,t){if($s(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!aa(e))||Q.test(e)||!X.test(e)||null!=t&&e in Se(t)}function wo(e){var t=no(e),r=Mr[t];if("function"!=typeof r||!(t in Fr.prototype))return!1;if(e===r)return!0;var n=ro(r);return!!n&&e===n[0]}(_r&&fo(new _r(new ArrayBuffer(1)))!=I||Er&&fo(new Er)!=E||Ar&&fo(Ar.resolve())!=T||Sr&&fo(new Sr)!=O||Tr&&fo(new Tr)!=P)&&(fo=function(e){var t=An(e),r=t==S?e.constructor:i,n=r?Mo(r):"";if(n)switch(n){case xr:return I;case Pr:return E;case Cr:return T;case Ir:return O;case Rr:return P}return t});var vo=Ce?Zs:yu;function _o(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Pe)}function Eo(e){return e==e&&!Qs(e)}function Ao(e,t){return function(r){return null!=r&&r[e]===t&&(t!==i||e in Se(r))}}function So(e,t,r){return t=yr(t===i?e.length-1:t,0),function(){for(var i=arguments,o=-1,s=yr(i.length-t,0),a=n(s);++o<s;)a[o]=i[t+o];o=-1;for(var u=n(t+1);++o<t;)u[o]=i[o];return u[t]=r(a),At(e,this,u)}}function To(e,t){return t.length<2?e:_n(e,ei(t,0,-1))}function Bo(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Oo=Co(Yn),No=lt||function(e,t){return ft.setTimeout(e,t)},xo=Co(Xn);function Po(e,t,r){var n=t+"";return xo(e,function(e,t){var r=t.length;if(!r)return e;var n=r-1;return t[n]=(r>1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(oe,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return Tt(p,(function(r){var n="_."+r[0];t&r[1]&&!xt(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(se);return t?t[1].split(ae):[]}(n),r)))}function Co(e){var t=0,r=0;return function(){var n=mr(),o=16-(n-r);if(r=n,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Io(e,t){var r=-1,n=e.length,o=n-1;for(t=t===i?n:t;++r<t;){var s=Wn(r,o),a=e[s];e[s]=e[r],e[r]=a}return e.length=t,e}var Ro,Lo,jo=(Ro=Rs((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,r,n,i){t.push(n?i.replace(le,"$1"):r||e)})),t}),(function(e){return 500===Lo.size&&Lo.clear(),e})),Lo=Ro.cache,Ro);function ko(e){if("string"==typeof e||aa(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Mo(e){if(null!=e){try{return Ie.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Uo(e){if(e instanceof Fr)return e.clone();var t=new Dr(e.__wrapped__,e.__chain__);return t.__actions__=Bi(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var zo=Gn((function(e,t){return qs(e)?cn(e,yn(t,1,qs,!0)):[]})),Do=Gn((function(e,t){var r=Jo(t);return qs(r)&&(r=i),qs(e)?cn(e,yn(t,1,qs,!0),oo(r,2)):[]})),Fo=Gn((function(e,t){var r=Jo(t);return qs(r)&&(r=i),qs(e)?cn(e,yn(t,1,qs,!0),i,r):[]}));function Vo(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:da(r);return i<0&&(i=yr(n+i,0)),Ut(e,oo(t,3),i)}function $o(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=n-1;return r!==i&&(o=da(r),o=r<0?yr(n+o,0):gr(o,n-1)),Ut(e,oo(t,3),o,!0)}function Ho(e){return null!=e&&e.length?yn(e,1):[]}function Wo(e){return e&&e.length?e[0]:i}var qo=Gn((function(e){var t=Ct(e,pi);return t.length&&t[0]===e[0]?On(t):[]})),Go=Gn((function(e){var t=Jo(e),r=Ct(e,pi);return t===Jo(r)?t=i:r.pop(),r.length&&r[0]===e[0]?On(r,oo(t,2)):[]})),Ko=Gn((function(e){var t=Jo(e),r=Ct(e,pi);return(t="function"==typeof t?t:i)&&r.pop(),r.length&&r[0]===e[0]?On(r,i,t):[]}));function Jo(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Zo=Gn(Yo);function Yo(e,t){return e&&e.length&&t&&t.length?$n(e,t):e}var Xo=Qi((function(e,t){var r=null==e?0:e.length,n=nn(e,t);return Hn(e,Ct(t,(function(e){return go(e,r)?+e:e})).sort(Ai)),n}));function Qo(e){return null==e?e:vr.call(e)}var es=Gn((function(e){return ai(yn(e,1,qs,!0))})),ts=Gn((function(e){var t=Jo(e);return qs(t)&&(t=i),ai(yn(e,1,qs,!0),oo(t,2))})),rs=Gn((function(e){var t=Jo(e);return t="function"==typeof t?t:i,ai(yn(e,1,qs,!0),i,t)}));function ns(e){if(!e||!e.length)return[];var t=0;return e=Nt(e,(function(e){if(qs(e))return t=yr(e.length,t),!0})),Gt(t,(function(t){return Ct(e,$t(t))}))}function is(e,t){if(!e||!e.length)return[];var r=ns(e);return null==t?r:Ct(r,(function(e){return At(t,i,e)}))}var os=Gn((function(e,t){return qs(e)?cn(e,t):[]})),ss=Gn((function(e){return hi(Nt(e,qs))})),as=Gn((function(e){var t=Jo(e);return qs(t)&&(t=i),hi(Nt(e,qs),oo(t,2))})),us=Gn((function(e){var t=Jo(e);return t="function"==typeof t?t:i,hi(Nt(e,qs),i,t)})),cs=Gn(ns),ls=Gn((function(e){var t=e.length,r=t>1?e[t-1]:i;return r="function"==typeof r?(e.pop(),r):i,is(e,r)}));function fs(e){var t=Mr(e);return t.__chain__=!0,t}function hs(e,t){return t(e)}var ds=Qi((function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,o=function(t){return nn(t,e)};return!(t>1||this.__actions__.length)&&n instanceof Fr&&go(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:hs,args:[o],thisArg:i}),new Dr(n,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(o)})),ps=Ni((function(e,t,r){Re.call(e,r)?++e[r]:rn(e,r,1)})),ys=ji(Vo),gs=ji($o);function ms(e,t){return($s(e)?Tt:ln)(e,oo(t,3))}function bs(e,t){return($s(e)?Bt:fn)(e,oo(t,3))}var ws=Ni((function(e,t,r){Re.call(e,r)?e[r].push(t):rn(e,r,[t])})),vs=Gn((function(e,t,r){var i=-1,o="function"==typeof t,s=Ws(e)?n(e.length):[];return ln(e,(function(e){s[++i]=o?At(t,e,r):Nn(e,t,r)})),s})),_s=Ni((function(e,t,r){rn(e,r,t)}));function Es(e,t){return($s(e)?Ct:kn)(e,oo(t,3))}var As=Ni((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]})),Ss=Gn((function(e,t){if(null==e)return[];var r=t.length;return r>1&&mo(e,t[0],t[1])?t=[]:r>2&&mo(t[0],t[1],t[2])&&(t=[t[0]]),Fn(e,yn(t,1),[])})),Ts=ct||function(){return ft.Date.now()};function Bs(e,t,r){return t=r?i:t,t=e&&null==t?e.length:t,Ki(e,c,i,i,i,i,t)}function Os(e,t){var r;if("function"!=typeof t)throw new Oe(o);return e=da(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=i),r}}var Ns=Gn((function(e,t,r){var n=1;if(r.length){var i=sr(r,io(Ns));n|=u}return Ki(e,n,t,r,i)})),xs=Gn((function(e,t,r){var n=3;if(r.length){var i=sr(r,io(xs));n|=u}return Ki(t,n,e,r,i)}));function Ps(e,t,r){var n,s,a,u,c,l,f=0,h=!1,d=!1,p=!0;if("function"!=typeof e)throw new Oe(o);function y(t){var r=n,o=s;return n=s=i,f=t,u=e.apply(o,r)}function g(e){var r=e-l;return l===i||r>=t||r<0||d&&e-f>=a}function m(){var e=Ts();if(g(e))return b(e);c=No(m,function(e){var r=t-(e-l);return d?gr(r,a-(e-f)):r}(e))}function b(e){return c=i,p&&n?y(e):(n=s=i,u)}function w(){var e=Ts(),r=g(e);if(n=arguments,s=this,l=e,r){if(c===i)return function(e){return f=e,c=No(m,t),h?y(e):u}(l);if(d)return wi(c),c=No(m,t),y(l)}return c===i&&(c=No(m,t)),u}return t=ya(t)||0,Qs(r)&&(h=!!r.leading,a=(d="maxWait"in r)?yr(ya(r.maxWait)||0,t):a,p="trailing"in r?!!r.trailing:p),w.cancel=function(){c!==i&&wi(c),f=0,n=l=s=c=i},w.flush=function(){return c===i?u:b(Ts())},w}var Cs=Gn((function(e,t){return un(e,1,t)})),Is=Gn((function(e,t,r){return un(e,ya(t)||0,r)}));function Rs(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Oe(o);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(Rs.Cache||Hr),r}function Ls(e){if("function"!=typeof e)throw new Oe(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Rs.Cache=Hr;var js=mi((function(e,t){var r=(t=1==t.length&&$s(t[0])?Ct(t[0],Jt(oo())):Ct(yn(t,1),Jt(oo()))).length;return Gn((function(n){for(var i=-1,o=gr(n.length,r);++i<o;)n[i]=t[i].call(this,n[i]);return At(e,this,n)}))})),ks=Gn((function(e,t){var r=sr(t,io(ks));return Ki(e,u,i,t,r)})),Ms=Gn((function(e,t){var r=sr(t,io(Ms));return Ki(e,64,i,t,r)})),Us=Qi((function(e,t){return Ki(e,256,i,i,i,t)}));function zs(e,t){return e===t||e!=e&&t!=t}var Ds=$i(Sn),Fs=$i((function(e,t){return e>=t})),Vs=xn(function(){return arguments}())?xn:function(e){return ea(e)&&Re.call(e,"callee")&&!qe.call(e,"callee")},$s=n.isArray,Hs=mt?Jt(mt):function(e){return ea(e)&&An(e)==C};function Ws(e){return null!=e&&Xs(e.length)&&!Zs(e)}function qs(e){return ea(e)&&Ws(e)}var Gs=gt||yu,Ks=bt?Jt(bt):function(e){return ea(e)&&An(e)==b};function Js(e){if(!ea(e))return!1;var t=An(e);return t==w||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!na(e)}function Zs(e){if(!Qs(e))return!1;var t=An(e);return t==v||t==_||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ys(e){return"number"==typeof e&&e==da(e)}function Xs(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function Qs(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ea(e){return null!=e&&"object"==typeof e}var ta=wt?Jt(wt):function(e){return ea(e)&&fo(e)==E};function ra(e){return"number"==typeof e||ea(e)&&An(e)==A}function na(e){if(!ea(e)||An(e)!=S)return!1;var t=He(e);if(null===t)return!0;var r=Re.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Ie.call(r)==Me}var ia=vt?Jt(vt):function(e){return ea(e)&&An(e)==B},oa=_t?Jt(_t):function(e){return ea(e)&&fo(e)==O};function sa(e){return"string"==typeof e||!$s(e)&&ea(e)&&An(e)==N}function aa(e){return"symbol"==typeof e||ea(e)&&An(e)==x}var ua=Et?Jt(Et):function(e){return ea(e)&&Xs(e.length)&&!!it[An(e)]},ca=$i(jn),la=$i((function(e,t){return e<=t}));function fa(e){if(!e)return[];if(Ws(e))return sa(e)?lr(e):Bi(e);if(Je&&e[Je])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[Je]());var t=fo(e);return(t==E?ir:t==O?ar:za)(e)}function ha(e){return e?(e=ya(e))===l||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function da(e){var t=ha(e),r=t%1;return t==t?r?t-r:t:0}function pa(e){return e?on(da(e),0,d):0}function ya(e){if("number"==typeof e)return e;if(aa(e))return h;if(Qs(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Qs(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Kt(e);var r=pe.test(e);return r||ge.test(e)?ut(e.slice(2),r?2:8):de.test(e)?h:+e}function ga(e){return Oi(e,Ca(e))}function ma(e){return null==e?"":si(e)}var ba=xi((function(e,t){if(_o(t)||Ws(t))Oi(t,Pa(t),e);else for(var r in t)Re.call(t,r)&&Xr(e,r,t[r])})),wa=xi((function(e,t){Oi(t,Ca(t),e)})),va=xi((function(e,t,r,n){Oi(t,Ca(t),e,n)})),_a=xi((function(e,t,r,n){Oi(t,Pa(t),e,n)})),Ea=Qi(nn),Aa=Gn((function(e,t){e=Se(e);var r=-1,n=t.length,o=n>2?t[2]:i;for(o&&mo(t[0],t[1],o)&&(n=1);++r<n;)for(var s=t[r],a=Ca(s),u=-1,c=a.length;++u<c;){var l=a[u],f=e[l];(f===i||zs(f,Pe[l])&&!Re.call(e,l))&&(e[l]=s[l])}return e})),Sa=Gn((function(e){return e.push(i,Zi),At(Ra,i,e)}));function Ta(e,t,r){var n=null==e?i:_n(e,t);return n===i?r:n}function Ba(e,t){return null!=e&&ho(e,t,Bn)}var Oa=Ui((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=ke.call(t)),e[t]=r}),Qa(ru)),Na=Ui((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=ke.call(t)),Re.call(e,t)?e[t].push(r):e[t]=[r]}),oo),xa=Gn(Nn);function Pa(e){return Ws(e)?Gr(e):Ln(e)}function Ca(e){return Ws(e)?Gr(e,!0):function(e){if(!Qs(e))return function(e){var t=[];if(null!=e)for(var r in Se(e))t.push(r);return t}(e);var t=_o(e),r=[];for(var n in e)("constructor"!=n||!t&&Re.call(e,n))&&r.push(n);return r}(e)}var Ia=xi((function(e,t,r){zn(e,t,r)})),Ra=xi((function(e,t,r,n){zn(e,t,r,n)})),La=Qi((function(e,t){var r={};if(null==e)return r;var n=!1;t=Ct(t,(function(t){return t=gi(t,e),n||(n=t.length>1),t})),Oi(e,to(e),r),n&&(r=sn(r,7,Yi));for(var i=t.length;i--;)ui(r,t[i]);return r})),ja=Qi((function(e,t){return null==e?{}:function(e,t){return Vn(e,t,(function(t,r){return Ba(e,r)}))}(e,t)}));function ka(e,t){if(null==e)return{};var r=Ct(to(e),(function(e){return[e]}));return t=oo(t),Vn(e,r,(function(e,r){return t(e,r[0])}))}var Ma=Gi(Pa),Ua=Gi(Ca);function za(e){return null==e?[]:Zt(e,Pa(e))}var Da=Ri((function(e,t,r){return t=t.toLowerCase(),e+(r?Fa(t):t)}));function Fa(e){return Ja(ma(e).toLowerCase())}function Va(e){return(e=ma(e))&&e.replace(be,er).replace(Ye,"")}var $a=Ri((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),Ha=Ri((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),Wa=Ii("toLowerCase"),qa=Ri((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()})),Ga=Ri((function(e,t,r){return e+(r?" ":"")+Ja(t)})),Ka=Ri((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),Ja=Ii("toUpperCase");function Za(e,t,r){return e=ma(e),(t=r?i:t)===i?function(e){return tt.test(e)}(e)?function(e){return e.match(Qe)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var Ya=Gn((function(e,t){try{return At(e,i,t)}catch(e){return Js(e)?e:new _e(e)}})),Xa=Qi((function(e,t){return Tt(t,(function(t){t=ko(t),rn(e,t,Ns(e[t],e))})),e}));function Qa(e){return function(){return e}}var eu=ki(),tu=ki(!0);function ru(e){return e}function nu(e){return Rn("function"==typeof e?e:sn(e,1))}var iu=Gn((function(e,t){return function(r){return Nn(r,e,t)}})),ou=Gn((function(e,t){return function(r){return Nn(e,r,t)}}));function su(e,t,r){var n=Pa(t),i=vn(t,n);null!=r||Qs(t)&&(i.length||!n.length)||(r=t,t=e,e=this,i=vn(t,Pa(t)));var o=!(Qs(r)&&"chain"in r&&!r.chain),s=Zs(e);return Tt(i,(function(r){var n=t[r];e[r]=n,s&&(e.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=e(this.__wrapped__);return(r.__actions__=Bi(this.__actions__)).push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,It([this.value()],arguments))})})),e}function au(){}var uu=Di(Ct),cu=Di(Ot),lu=Di(jt);function fu(e){return bo(e)?$t(ko(e)):function(e){return function(t){return _n(t,e)}}(e)}var hu=Vi(),du=Vi(!0);function pu(){return[]}function yu(){return!1}var gu,mu=zi((function(e,t){return e+t}),0),bu=Wi("ceil"),wu=zi((function(e,t){return e/t}),1),vu=Wi("floor"),_u=zi((function(e,t){return e*t}),1),Eu=Wi("round"),Au=zi((function(e,t){return e-t}),0);return Mr.after=function(e,t){if("function"!=typeof t)throw new Oe(o);return e=da(e),function(){if(--e<1)return t.apply(this,arguments)}},Mr.ary=Bs,Mr.assign=ba,Mr.assignIn=wa,Mr.assignInWith=va,Mr.assignWith=_a,Mr.at=Ea,Mr.before=Os,Mr.bind=Ns,Mr.bindAll=Xa,Mr.bindKey=xs,Mr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return $s(e)?e:[e]},Mr.chain=fs,Mr.chunk=function(e,t,r){t=(r?mo(e,t,r):t===i)?1:yr(da(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var s=0,a=0,u=n(ht(o/t));s<o;)u[a++]=ei(e,s,s+=t);return u},Mr.compact=function(e){for(var t=-1,r=null==e?0:e.length,n=0,i=[];++t<r;){var o=e[t];o&&(i[n++]=o)}return i},Mr.concat=function(){var e=arguments.length;if(!e)return[];for(var t=n(e-1),r=arguments[0],i=e;i--;)t[i-1]=arguments[i];return It($s(r)?Bi(r):[r],yn(t,1))},Mr.cond=function(e){var t=null==e?0:e.length,r=oo();return e=t?Ct(e,(function(e){if("function"!=typeof e[1])throw new Oe(o);return[r(e[0]),e[1]]})):[],Gn((function(r){for(var n=-1;++n<t;){var i=e[n];if(At(i[0],this,r))return At(i[1],this,r)}}))},Mr.conforms=function(e){return function(e){var t=Pa(e);return function(r){return an(r,e,t)}}(sn(e,1))},Mr.constant=Qa,Mr.countBy=ps,Mr.create=function(e,t){var r=Ur(e);return null==t?r:tn(r,t)},Mr.curry=function e(t,r,n){var o=Ki(t,8,i,i,i,i,i,r=n?i:r);return o.placeholder=e.placeholder,o},Mr.curryRight=function e(t,r,n){var o=Ki(t,16,i,i,i,i,i,r=n?i:r);return o.placeholder=e.placeholder,o},Mr.debounce=Ps,Mr.defaults=Aa,Mr.defaultsDeep=Sa,Mr.defer=Cs,Mr.delay=Is,Mr.difference=zo,Mr.differenceBy=Do,Mr.differenceWith=Fo,Mr.drop=function(e,t,r){var n=null==e?0:e.length;return n?ei(e,(t=r||t===i?1:da(t))<0?0:t,n):[]},Mr.dropRight=function(e,t,r){var n=null==e?0:e.length;return n?ei(e,0,(t=n-(t=r||t===i?1:da(t)))<0?0:t):[]},Mr.dropRightWhile=function(e,t){return e&&e.length?li(e,oo(t,3),!0,!0):[]},Mr.dropWhile=function(e,t){return e&&e.length?li(e,oo(t,3),!0):[]},Mr.fill=function(e,t,r,n){var o=null==e?0:e.length;return o?(r&&"number"!=typeof r&&mo(e,t,r)&&(r=0,n=o),function(e,t,r,n){var o=e.length;for((r=da(r))<0&&(r=-r>o?0:o+r),(n=n===i||n>o?o:da(n))<0&&(n+=o),n=r>n?0:pa(n);r<n;)e[r++]=t;return e}(e,t,r,n)):[]},Mr.filter=function(e,t){return($s(e)?Nt:pn)(e,oo(t,3))},Mr.flatMap=function(e,t){return yn(Es(e,t),1)},Mr.flatMapDeep=function(e,t){return yn(Es(e,t),l)},Mr.flatMapDepth=function(e,t,r){return r=r===i?1:da(r),yn(Es(e,t),r)},Mr.flatten=Ho,Mr.flattenDeep=function(e){return null!=e&&e.length?yn(e,l):[]},Mr.flattenDepth=function(e,t){return null!=e&&e.length?yn(e,t=t===i?1:da(t)):[]},Mr.flip=function(e){return Ki(e,512)},Mr.flow=eu,Mr.flowRight=tu,Mr.fromPairs=function(e){for(var t=-1,r=null==e?0:e.length,n={};++t<r;){var i=e[t];n[i[0]]=i[1]}return n},Mr.functions=function(e){return null==e?[]:vn(e,Pa(e))},Mr.functionsIn=function(e){return null==e?[]:vn(e,Ca(e))},Mr.groupBy=ws,Mr.initial=function(e){return null!=e&&e.length?ei(e,0,-1):[]},Mr.intersection=qo,Mr.intersectionBy=Go,Mr.intersectionWith=Ko,Mr.invert=Oa,Mr.invertBy=Na,Mr.invokeMap=vs,Mr.iteratee=nu,Mr.keyBy=_s,Mr.keys=Pa,Mr.keysIn=Ca,Mr.map=Es,Mr.mapKeys=function(e,t){var r={};return t=oo(t,3),bn(e,(function(e,n,i){rn(r,t(e,n,i),e)})),r},Mr.mapValues=function(e,t){var r={};return t=oo(t,3),bn(e,(function(e,n,i){rn(r,n,t(e,n,i))})),r},Mr.matches=function(e){return Mn(sn(e,1))},Mr.matchesProperty=function(e,t){return Un(e,sn(t,1))},Mr.memoize=Rs,Mr.merge=Ia,Mr.mergeWith=Ra,Mr.method=iu,Mr.methodOf=ou,Mr.mixin=su,Mr.negate=Ls,Mr.nthArg=function(e){return e=da(e),Gn((function(t){return Dn(t,e)}))},Mr.omit=La,Mr.omitBy=function(e,t){return ka(e,Ls(oo(t)))},Mr.once=function(e){return Os(2,e)},Mr.orderBy=function(e,t,r,n){return null==e?[]:($s(t)||(t=null==t?[]:[t]),$s(r=n?i:r)||(r=null==r?[]:[r]),Fn(e,t,r))},Mr.over=uu,Mr.overArgs=js,Mr.overEvery=cu,Mr.overSome=lu,Mr.partial=ks,Mr.partialRight=Ms,Mr.partition=As,Mr.pick=ja,Mr.pickBy=ka,Mr.property=fu,Mr.propertyOf=function(e){return function(t){return null==e?i:_n(e,t)}},Mr.pull=Zo,Mr.pullAll=Yo,Mr.pullAllBy=function(e,t,r){return e&&e.length&&t&&t.length?$n(e,t,oo(r,2)):e},Mr.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?$n(e,t,i,r):e},Mr.pullAt=Xo,Mr.range=hu,Mr.rangeRight=du,Mr.rearg=Us,Mr.reject=function(e,t){return($s(e)?Nt:pn)(e,Ls(oo(t,3)))},Mr.remove=function(e,t){var r=[];if(!e||!e.length)return r;var n=-1,i=[],o=e.length;for(t=oo(t,3);++n<o;){var s=e[n];t(s,n,e)&&(r.push(s),i.push(n))}return Hn(e,i),r},Mr.rest=function(e,t){if("function"!=typeof e)throw new Oe(o);return Gn(e,t=t===i?t:da(t))},Mr.reverse=Qo,Mr.sampleSize=function(e,t,r){return t=(r?mo(e,t,r):t===i)?1:da(t),($s(e)?Jr:Jn)(e,t)},Mr.set=function(e,t,r){return null==e?e:Zn(e,t,r)},Mr.setWith=function(e,t,r,n){return n="function"==typeof n?n:i,null==e?e:Zn(e,t,r,n)},Mr.shuffle=function(e){return($s(e)?Zr:Qn)(e)},Mr.slice=function(e,t,r){var n=null==e?0:e.length;return n?(r&&"number"!=typeof r&&mo(e,t,r)?(t=0,r=n):(t=null==t?0:da(t),r=r===i?n:da(r)),ei(e,t,r)):[]},Mr.sortBy=Ss,Mr.sortedUniq=function(e){return e&&e.length?ii(e):[]},Mr.sortedUniqBy=function(e,t){return e&&e.length?ii(e,oo(t,2)):[]},Mr.split=function(e,t,r){return r&&"number"!=typeof r&&mo(e,t,r)&&(t=r=i),(r=r===i?d:r>>>0)?(e=ma(e))&&("string"==typeof t||null!=t&&!ia(t))&&!(t=si(t))&&nr(e)?bi(lr(e),0,r):e.split(t,r):[]},Mr.spread=function(e,t){if("function"!=typeof e)throw new Oe(o);return t=null==t?0:yr(da(t),0),Gn((function(r){var n=r[t],i=bi(r,0,t);return n&&It(i,n),At(e,this,i)}))},Mr.tail=function(e){var t=null==e?0:e.length;return t?ei(e,1,t):[]},Mr.take=function(e,t,r){return e&&e.length?ei(e,0,(t=r||t===i?1:da(t))<0?0:t):[]},Mr.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?ei(e,(t=n-(t=r||t===i?1:da(t)))<0?0:t,n):[]},Mr.takeRightWhile=function(e,t){return e&&e.length?li(e,oo(t,3),!1,!0):[]},Mr.takeWhile=function(e,t){return e&&e.length?li(e,oo(t,3)):[]},Mr.tap=function(e,t){return t(e),e},Mr.throttle=function(e,t,r){var n=!0,i=!0;if("function"!=typeof e)throw new Oe(o);return Qs(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),Ps(e,t,{leading:n,maxWait:t,trailing:i})},Mr.thru=hs,Mr.toArray=fa,Mr.toPairs=Ma,Mr.toPairsIn=Ua,Mr.toPath=function(e){return $s(e)?Ct(e,ko):aa(e)?[e]:Bi(jo(ma(e)))},Mr.toPlainObject=ga,Mr.transform=function(e,t,r){var n=$s(e),i=n||Gs(e)||ua(e);if(t=oo(t,4),null==r){var o=e&&e.constructor;r=i?n?new o:[]:Qs(e)&&Zs(o)?Ur(He(e)):{}}return(i?Tt:bn)(e,(function(e,n,i){return t(r,e,n,i)})),r},Mr.unary=function(e){return Bs(e,1)},Mr.union=es,Mr.unionBy=ts,Mr.unionWith=rs,Mr.uniq=function(e){return e&&e.length?ai(e):[]},Mr.uniqBy=function(e,t){return e&&e.length?ai(e,oo(t,2)):[]},Mr.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?ai(e,i,t):[]},Mr.unset=function(e,t){return null==e||ui(e,t)},Mr.unzip=ns,Mr.unzipWith=is,Mr.update=function(e,t,r){return null==e?e:ci(e,t,yi(r))},Mr.updateWith=function(e,t,r,n){return n="function"==typeof n?n:i,null==e?e:ci(e,t,yi(r),n)},Mr.values=za,Mr.valuesIn=function(e){return null==e?[]:Zt(e,Ca(e))},Mr.without=os,Mr.words=Za,Mr.wrap=function(e,t){return ks(yi(t),e)},Mr.xor=ss,Mr.xorBy=as,Mr.xorWith=us,Mr.zip=cs,Mr.zipObject=function(e,t){return di(e||[],t||[],Xr)},Mr.zipObjectDeep=function(e,t){return di(e||[],t||[],Zn)},Mr.zipWith=ls,Mr.entries=Ma,Mr.entriesIn=Ua,Mr.extend=wa,Mr.extendWith=va,su(Mr,Mr),Mr.add=mu,Mr.attempt=Ya,Mr.camelCase=Da,Mr.capitalize=Fa,Mr.ceil=bu,Mr.clamp=function(e,t,r){return r===i&&(r=t,t=i),r!==i&&(r=(r=ya(r))==r?r:0),t!==i&&(t=(t=ya(t))==t?t:0),on(ya(e),t,r)},Mr.clone=function(e){return sn(e,4)},Mr.cloneDeep=function(e){return sn(e,5)},Mr.cloneDeepWith=function(e,t){return sn(e,5,t="function"==typeof t?t:i)},Mr.cloneWith=function(e,t){return sn(e,4,t="function"==typeof t?t:i)},Mr.conformsTo=function(e,t){return null==t||an(e,t,Pa(t))},Mr.deburr=Va,Mr.defaultTo=function(e,t){return null==e||e!=e?t:e},Mr.divide=wu,Mr.endsWith=function(e,t,r){e=ma(e),t=si(t);var n=e.length,o=r=r===i?n:on(da(r),0,n);return(r-=t.length)>=0&&e.slice(r,o)==t},Mr.eq=zs,Mr.escape=function(e){return(e=ma(e))&&K.test(e)?e.replace(q,tr):e},Mr.escapeRegExp=function(e){return(e=ma(e))&&re.test(e)?e.replace(te,"\\$&"):e},Mr.every=function(e,t,r){var n=$s(e)?Ot:hn;return r&&mo(e,t,r)&&(t=i),n(e,oo(t,3))},Mr.find=ys,Mr.findIndex=Vo,Mr.findKey=function(e,t){return Mt(e,oo(t,3),bn)},Mr.findLast=gs,Mr.findLastIndex=$o,Mr.findLastKey=function(e,t){return Mt(e,oo(t,3),wn)},Mr.floor=vu,Mr.forEach=ms,Mr.forEachRight=bs,Mr.forIn=function(e,t){return null==e?e:gn(e,oo(t,3),Ca)},Mr.forInRight=function(e,t){return null==e?e:mn(e,oo(t,3),Ca)},Mr.forOwn=function(e,t){return e&&bn(e,oo(t,3))},Mr.forOwnRight=function(e,t){return e&&wn(e,oo(t,3))},Mr.get=Ta,Mr.gt=Ds,Mr.gte=Fs,Mr.has=function(e,t){return null!=e&&ho(e,t,Tn)},Mr.hasIn=Ba,Mr.head=Wo,Mr.identity=ru,Mr.includes=function(e,t,r,n){e=Ws(e)?e:za(e),r=r&&!n?da(r):0;var i=e.length;return r<0&&(r=yr(i+r,0)),sa(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&zt(e,t,r)>-1},Mr.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:da(r);return i<0&&(i=yr(n+i,0)),zt(e,t,i)},Mr.inRange=function(e,t,r){return t=ha(t),r===i?(r=t,t=0):r=ha(r),function(e,t,r){return e>=gr(t,r)&&e<yr(t,r)}(e=ya(e),t,r)},Mr.invoke=xa,Mr.isArguments=Vs,Mr.isArray=$s,Mr.isArrayBuffer=Hs,Mr.isArrayLike=Ws,Mr.isArrayLikeObject=qs,Mr.isBoolean=function(e){return!0===e||!1===e||ea(e)&&An(e)==m},Mr.isBuffer=Gs,Mr.isDate=Ks,Mr.isElement=function(e){return ea(e)&&1===e.nodeType&&!na(e)},Mr.isEmpty=function(e){if(null==e)return!0;if(Ws(e)&&($s(e)||"string"==typeof e||"function"==typeof e.splice||Gs(e)||ua(e)||Vs(e)))return!e.length;var t=fo(e);if(t==E||t==O)return!e.size;if(_o(e))return!Ln(e).length;for(var r in e)if(Re.call(e,r))return!1;return!0},Mr.isEqual=function(e,t){return Pn(e,t)},Mr.isEqualWith=function(e,t,r){var n=(r="function"==typeof r?r:i)?r(e,t):i;return n===i?Pn(e,t,i,r):!!n},Mr.isError=Js,Mr.isFinite=function(e){return"number"==typeof e&&kt(e)},Mr.isFunction=Zs,Mr.isInteger=Ys,Mr.isLength=Xs,Mr.isMap=ta,Mr.isMatch=function(e,t){return e===t||Cn(e,t,ao(t))},Mr.isMatchWith=function(e,t,r){return r="function"==typeof r?r:i,Cn(e,t,ao(t),r)},Mr.isNaN=function(e){return ra(e)&&e!=+e},Mr.isNative=function(e){if(vo(e))throw new _e("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return In(e)},Mr.isNil=function(e){return null==e},Mr.isNull=function(e){return null===e},Mr.isNumber=ra,Mr.isObject=Qs,Mr.isObjectLike=ea,Mr.isPlainObject=na,Mr.isRegExp=ia,Mr.isSafeInteger=function(e){return Ys(e)&&e>=-9007199254740991&&e<=f},Mr.isSet=oa,Mr.isString=sa,Mr.isSymbol=aa,Mr.isTypedArray=ua,Mr.isUndefined=function(e){return e===i},Mr.isWeakMap=function(e){return ea(e)&&fo(e)==P},Mr.isWeakSet=function(e){return ea(e)&&"[object WeakSet]"==An(e)},Mr.join=function(e,t){return null==e?"":Ht.call(e,t)},Mr.kebabCase=$a,Mr.last=Jo,Mr.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=n;return r!==i&&(o=(o=da(r))<0?yr(n+o,0):gr(o,n-1)),t==t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(e,t,o):Ut(e,Ft,o,!0)},Mr.lowerCase=Ha,Mr.lowerFirst=Wa,Mr.lt=ca,Mr.lte=la,Mr.max=function(e){return e&&e.length?dn(e,ru,Sn):i},Mr.maxBy=function(e,t){return e&&e.length?dn(e,oo(t,2),Sn):i},Mr.mean=function(e){return Vt(e,ru)},Mr.meanBy=function(e,t){return Vt(e,oo(t,2))},Mr.min=function(e){return e&&e.length?dn(e,ru,jn):i},Mr.minBy=function(e,t){return e&&e.length?dn(e,oo(t,2),jn):i},Mr.stubArray=pu,Mr.stubFalse=yu,Mr.stubObject=function(){return{}},Mr.stubString=function(){return""},Mr.stubTrue=function(){return!0},Mr.multiply=_u,Mr.nth=function(e,t){return e&&e.length?Dn(e,da(t)):i},Mr.noConflict=function(){return ft._===this&&(ft._=Ue),this},Mr.noop=au,Mr.now=Ts,Mr.pad=function(e,t,r){e=ma(e);var n=(t=da(t))?cr(e):0;if(!t||n>=t)return e;var i=(t-n)/2;return Fi(dt(i),r)+e+Fi(ht(i),r)},Mr.padEnd=function(e,t,r){e=ma(e);var n=(t=da(t))?cr(e):0;return t&&n<t?e+Fi(t-n,r):e},Mr.padStart=function(e,t,r){e=ma(e);var n=(t=da(t))?cr(e):0;return t&&n<t?Fi(t-n,r)+e:e},Mr.parseInt=function(e,t,r){return r||null==t?t=0:t&&(t=+t),br(ma(e).replace(ne,""),t||0)},Mr.random=function(e,t,r){if(r&&"boolean"!=typeof r&&mo(e,t,r)&&(t=r=i),r===i&&("boolean"==typeof t?(r=t,t=i):"boolean"==typeof e&&(r=e,e=i)),e===i&&t===i?(e=0,t=1):(e=ha(e),t===i?(t=e,e=0):t=ha(t)),e>t){var n=e;e=t,t=n}if(r||e%1||t%1){var o=wr();return gr(e+o*(t-e+at("1e-"+((o+"").length-1))),t)}return Wn(e,t)},Mr.reduce=function(e,t,r){var n=$s(e)?Rt:Wt,i=arguments.length<3;return n(e,oo(t,4),r,i,ln)},Mr.reduceRight=function(e,t,r){var n=$s(e)?Lt:Wt,i=arguments.length<3;return n(e,oo(t,4),r,i,fn)},Mr.repeat=function(e,t,r){return t=(r?mo(e,t,r):t===i)?1:da(t),qn(ma(e),t)},Mr.replace=function(){var e=arguments,t=ma(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Mr.result=function(e,t,r){var n=-1,o=(t=gi(t,e)).length;for(o||(o=1,e=i);++n<o;){var s=null==e?i:e[ko(t[n])];s===i&&(n=o,s=r),e=Zs(s)?s.call(e):s}return e},Mr.round=Eu,Mr.runInContext=e,Mr.sample=function(e){return($s(e)?Kr:Kn)(e)},Mr.size=function(e){if(null==e)return 0;if(Ws(e))return sa(e)?cr(e):e.length;var t=fo(e);return t==E||t==O?e.size:Ln(e).length},Mr.snakeCase=qa,Mr.some=function(e,t,r){var n=$s(e)?jt:ti;return r&&mo(e,t,r)&&(t=i),n(e,oo(t,3))},Mr.sortedIndex=function(e,t){return ri(e,t)},Mr.sortedIndexBy=function(e,t,r){return ni(e,t,oo(r,2))},Mr.sortedIndexOf=function(e,t){var r=null==e?0:e.length;if(r){var n=ri(e,t);if(n<r&&zs(e[n],t))return n}return-1},Mr.sortedLastIndex=function(e,t){return ri(e,t,!0)},Mr.sortedLastIndexBy=function(e,t,r){return ni(e,t,oo(r,2),!0)},Mr.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var r=ri(e,t,!0)-1;if(zs(e[r],t))return r}return-1},Mr.startCase=Ga,Mr.startsWith=function(e,t,r){return e=ma(e),r=null==r?0:on(da(r),0,e.length),t=si(t),e.slice(r,r+t.length)==t},Mr.subtract=Au,Mr.sum=function(e){return e&&e.length?qt(e,ru):0},Mr.sumBy=function(e,t){return e&&e.length?qt(e,oo(t,2)):0},Mr.template=function(e,t,r){var n=Mr.templateSettings;r&&mo(e,t,r)&&(t=i),e=ma(e),t=va({},t,n,Ji);var o,s,a=va({},t.imports,n.imports,Ji),u=Pa(a),c=Zt(a,u),l=0,f=t.interpolate||we,h="__p += '",d=Te((t.escape||we).source+"|"+f.source+"|"+(f===Y?fe:we).source+"|"+(t.evaluate||we).source+"|$","g"),p="//# sourceURL="+(Re.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++nt+"]")+"\n";e.replace(d,(function(t,r,n,i,a,u){return n||(n=i),h+=e.slice(l,u).replace(ve,rr),r&&(o=!0,h+="' +\n__e("+r+") +\n'"),a&&(s=!0,h+="';\n"+a+";\n__p += '"),n&&(h+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),l=u+t.length,t})),h+="';\n";var y=Re.call(t,"variable")&&t.variable;if(y){if(ce.test(y))throw new _e("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(s?h.replace(V,""):h).replace($,"$1").replace(H,"$1;"),h="function("+(y||"obj")+") {\n"+(y?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var g=Ya((function(){return Ee(u,p+"return "+h).apply(i,c)}));if(g.source=h,Js(g))throw g;return g},Mr.times=function(e,t){if((e=da(e))<1||e>f)return[];var r=d,n=gr(e,d);t=oo(t),e-=d;for(var i=Gt(n,t);++r<e;)t(r);return i},Mr.toFinite=ha,Mr.toInteger=da,Mr.toLength=pa,Mr.toLower=function(e){return ma(e).toLowerCase()},Mr.toNumber=ya,Mr.toSafeInteger=function(e){return e?on(da(e),-9007199254740991,f):0===e?e:0},Mr.toString=ma,Mr.toUpper=function(e){return ma(e).toUpperCase()},Mr.trim=function(e,t,r){if((e=ma(e))&&(r||t===i))return Kt(e);if(!e||!(t=si(t)))return e;var n=lr(e),o=lr(t);return bi(n,Xt(n,o),Qt(n,o)+1).join("")},Mr.trimEnd=function(e,t,r){if((e=ma(e))&&(r||t===i))return e.slice(0,fr(e)+1);if(!e||!(t=si(t)))return e;var n=lr(e);return bi(n,0,Qt(n,lr(t))+1).join("")},Mr.trimStart=function(e,t,r){if((e=ma(e))&&(r||t===i))return e.replace(ne,"");if(!e||!(t=si(t)))return e;var n=lr(e);return bi(n,Xt(n,lr(t))).join("")},Mr.truncate=function(e,t){var r=30,n="...";if(Qs(t)){var o="separator"in t?t.separator:o;r="length"in t?da(t.length):r,n="omission"in t?si(t.omission):n}var s=(e=ma(e)).length;if(nr(e)){var a=lr(e);s=a.length}if(r>=s)return e;var u=r-cr(n);if(u<1)return n;var c=a?bi(a,0,u).join(""):e.slice(0,u);if(o===i)return c+n;if(a&&(u+=c.length-u),ia(o)){if(e.slice(u).search(o)){var l,f=c;for(o.global||(o=Te(o.source,ma(he.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var h=l.index;c=c.slice(0,h===i?u:h)}}else if(e.indexOf(si(o),u)!=u){var d=c.lastIndexOf(o);d>-1&&(c=c.slice(0,d))}return c+n},Mr.unescape=function(e){return(e=ma(e))&&G.test(e)?e.replace(W,hr):e},Mr.uniqueId=function(e){var t=++Le;return ma(e)+t},Mr.upperCase=Ka,Mr.upperFirst=Ja,Mr.each=ms,Mr.eachRight=bs,Mr.first=Wo,su(Mr,(gu={},bn(Mr,(function(e,t){Re.call(Mr.prototype,t)||(gu[t]=e)})),gu),{chain:!1}),Mr.VERSION="4.17.21",Tt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Mr[e].placeholder=Mr})),Tt(["drop","take"],(function(e,t){Fr.prototype[e]=function(r){r=r===i?1:yr(da(r),0);var n=this.__filtered__&&!t?new Fr(this):this.clone();return n.__filtered__?n.__takeCount__=gr(r,n.__takeCount__):n.__views__.push({size:gr(r,d),type:e+(n.__dir__<0?"Right":"")}),n},Fr.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Tt(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=1==r||3==r;Fr.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:oo(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),Tt(["head","last"],(function(e,t){var r="take"+(t?"Right":"");Fr.prototype[e]=function(){return this[r](1).value()[0]}})),Tt(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");Fr.prototype[e]=function(){return this.__filtered__?new Fr(this):this[r](1)}})),Fr.prototype.compact=function(){return this.filter(ru)},Fr.prototype.find=function(e){return this.filter(e).head()},Fr.prototype.findLast=function(e){return this.reverse().find(e)},Fr.prototype.invokeMap=Gn((function(e,t){return"function"==typeof e?new Fr(this):this.map((function(r){return Nn(r,e,t)}))})),Fr.prototype.reject=function(e){return this.filter(Ls(oo(e)))},Fr.prototype.slice=function(e,t){e=da(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Fr(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==i&&(r=(t=da(t))<0?r.dropRight(-t):r.take(t-e)),r)},Fr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Fr.prototype.toArray=function(){return this.take(d)},bn(Fr.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),o=Mr[n?"take"+("last"==t?"Right":""):t],s=n||/^find/.test(t);o&&(Mr.prototype[t]=function(){var t=this.__wrapped__,a=n?[1]:arguments,u=t instanceof Fr,c=a[0],l=u||$s(t),f=function(e){var t=o.apply(Mr,It([e],a));return n&&h?t[0]:t};l&&r&&"function"==typeof c&&1!=c.length&&(u=l=!1);var h=this.__chain__,d=!!this.__actions__.length,p=s&&!h,y=u&&!d;if(!s&&l){t=y?t:new Fr(this);var g=e.apply(t,a);return g.__actions__.push({func:hs,args:[f],thisArg:i}),new Dr(g,h)}return p&&y?e.apply(this,a):(g=this.thru(f),p?n?g.value()[0]:g.value():g)})})),Tt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ne[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);Mr.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var i=this.value();return t.apply($s(i)?i:[],e)}return this[r]((function(r){return t.apply($s(r)?r:[],e)}))}})),bn(Fr.prototype,(function(e,t){var r=Mr[t];if(r){var n=r.name+"";Re.call(Nr,n)||(Nr[n]=[]),Nr[n].push({name:t,func:r})}})),Nr[Mi(i,2).name]=[{name:"wrapper",func:i}],Fr.prototype.clone=function(){var e=new Fr(this.__wrapped__);return e.__actions__=Bi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Bi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Bi(this.__views__),e},Fr.prototype.reverse=function(){if(this.__filtered__){var e=new Fr(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Fr.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=$s(e),n=t<0,i=r?e.length:0,o=function(e,t,r){for(var n=-1,i=r.length;++n<i;){var o=r[n],s=o.size;switch(o.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=gr(t,e+s);break;case"takeRight":e=yr(e,t-s)}}return{start:e,end:t}}(0,i,this.__views__),s=o.start,a=o.end,u=a-s,c=n?a:s-1,l=this.__iteratees__,f=l.length,h=0,d=gr(u,this.__takeCount__);if(!r||!n&&i==u&&d==u)return fi(e,this.__actions__);var p=[];e:for(;u--&&h<d;){for(var y=-1,g=e[c+=t];++y<f;){var m=l[y],b=m.iteratee,w=m.type,v=b(g);if(2==w)g=v;else if(!v){if(1==w)continue e;break e}}p[h++]=g}return p},Mr.prototype.at=ds,Mr.prototype.chain=function(){return fs(this)},Mr.prototype.commit=function(){return new Dr(this.value(),this.__chain__)},Mr.prototype.next=function(){this.__values__===i&&(this.__values__=fa(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},Mr.prototype.plant=function(e){for(var t,r=this;r instanceof zr;){var n=Uo(r);n.__index__=0,n.__values__=i,t?o.__wrapped__=n:t=n;var o=n;r=r.__wrapped__}return o.__wrapped__=e,t},Mr.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Fr){var t=e;return this.__actions__.length&&(t=new Fr(this)),(t=t.reverse()).__actions__.push({func:hs,args:[Qo],thisArg:i}),new Dr(t,this.__chain__)}return this.thru(Qo)},Mr.prototype.toJSON=Mr.prototype.valueOf=Mr.prototype.value=function(){return fi(this.__wrapped__,this.__actions__)},Mr.prototype.first=Mr.prototype.head,Je&&(Mr.prototype[Je]=function(){return this}),Mr}();ft._=dr,(n=function(){return dr}.call(t,r,t,e))===i||(e.exports=n)}.call(this)},9640:function(e,t,r){var n,i;!function(o,s){"use strict";n=function(){var e=function(){},t="undefined",r=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"];function i(e,t){var r=e[t];if("function"==typeof r.bind)return r.bind(e);try{return Function.prototype.bind.call(r,e)}catch(t){return function(){return Function.prototype.apply.apply(r,[e,arguments])}}}function o(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function s(t,r){for(var i=0;i<n.length;i++){var o=n[i];this[o]=i<t?e:this.methodFactory(o,t,r)}this.log=this.debug}function a(e,r,n){return function(){typeof console!==t&&(s.call(this,r,n),this[e].apply(this,arguments))}}function u(n,s,u){return function(n){return"debug"===n&&(n="log"),typeof console!==t&&("trace"===n&&r?o:void 0!==console[n]?i(console,n):void 0!==console.log?i(console,"log"):e)}(n)||a.apply(this,arguments)}function c(e,r,i){var o,a=this;r=null==r?"WARN":r;var c="loglevel";function l(){var e;if(typeof window!==t&&c){try{e=window.localStorage[c]}catch(e){}if(typeof e===t)try{var r=window.document.cookie,n=r.indexOf(encodeURIComponent(c)+"=");-1!==n&&(e=/^([^;]+)/.exec(r.slice(n))[1])}catch(e){}return void 0===a.levels[e]&&(e=void 0),e}}"string"==typeof e?c+=":"+e:"symbol"==typeof e&&(c=void 0),a.name=e,a.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},a.methodFactory=i||u,a.getLevel=function(){return o},a.setLevel=function(r,i){if("string"==typeof r&&void 0!==a.levels[r.toUpperCase()]&&(r=a.levels[r.toUpperCase()]),!("number"==typeof r&&r>=0&&r<=a.levels.SILENT))throw"log.setLevel() called with invalid level: "+r;if(o=r,!1!==i&&function(e){var r=(n[e]||"silent").toUpperCase();if(typeof window!==t&&c){try{return void(window.localStorage[c]=r)}catch(e){}try{window.document.cookie=encodeURIComponent(c)+"="+r+";"}catch(e){}}}(r),s.call(a,r,e),typeof console===t&&r<a.levels.SILENT)return"No console available for logging"},a.setDefaultLevel=function(e){r=e,l()||a.setLevel(e,!1)},a.resetLevel=function(){a.setLevel(r,!1),function(){if(typeof window!==t&&c){try{return void window.localStorage.removeItem(c)}catch(e){}try{window.document.cookie=encodeURIComponent(c)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(e){}}}()},a.enableAll=function(e){a.setLevel(a.levels.TRACE,e)},a.disableAll=function(e){a.setLevel(a.levels.SILENT,e)};var f=l();null==f&&(f=r),a.setLevel(f,!1)}var l=new c,f={};l.getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=f[e];return t||(t=f[e]=new c(e,l.getLevel(),l.methodFactory)),t};var h=typeof window!==t?window.log:void 0;return l.noConflict=function(){return typeof window!==t&&window.log===l&&(window.log=h),l},l.getLoggers=function(){return f},l.default=l,l},void 0===(i=n.call(t,r,t,e))||(e.exports=i)}()},2973:(e,t,r)=>{"use strict";var n=r(8834).Buffer,i=r(4406);Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidStatusCodeError=t.InvalidCertError=void 0;const o=Object.freeze({redirect:!0,expectStatusCode:200,headers:{},full:!1,keepAlive:!0,cors:!1,referrer:!1,sslAllowSelfSigned:!1,_redirectCount:0});class s extends Error{constructor(e,t){super(e),this.fingerprint256=t}}t.InvalidCertError=s;class a extends Error{constructor(e){super(`Request Failed. Status Code: ${e}`),this.statusCode=e}}function u(e,t){if(!t||"text"===t||"json"===t)try{let r=new TextDecoder("utf8",{fatal:!0}).decode(e);if("text"===t)return r;try{return JSON.parse(r)}catch(e){if("json"===t)throw e;return r}}catch(e){if("text"===t||"json"===t)throw e}return e}t.InvalidStatusCodeError=a;let c={};function l(e,t){let i={...o,...t};const f=r(732),h=r(3406),d=r(4087),{promisify:p}=r(3335),{resolve:y}=r(883),g=!!/^https/.test(e);let m={method:i.method||"GET",headers:{"Accept-Encoding":"gzip, deflate, br"}};const b=e=>e.replace(/:| /g,"").toLowerCase();if(i.keepAlive){const e={keepAlive:!0,keepAliveMsecs:3e4,maxFreeSockets:1024,maxCachedSessions:1024},t=[g,g&&i.sslPinnedCertificates?.map((e=>b(e))).sort()].join();m.agent=c[t]||(c[t]=new(g?h:f).Agent(e))}return"json"===i.type&&(m.headers["Content-Type"]="application/json"),i.data&&(i.method||(m.method="POST"),m.body="json"===i.type?JSON.stringify(i.data):i.data),m.headers={...m.headers,...i.headers},i.sslAllowSelfSigned&&(m.rejectUnauthorized=!1),new Promise(((t,r)=>{const o=async t=>{if(t&&"DEPTH_ZERO_SELF_SIGNED_CERT"===t.code)try{await l(e,{...i,sslAllowSelfSigned:!0,sslPinnedCertificates:[]})}catch(e){e&&e.fingerprint256&&(t=new s(`Self-signed SSL certificate: ${e.fingerprint256}`,e.fingerprint256))}r(t)},c=(g?h:f).request(e,m,(s=>{s.on("error",o),(async()=>{try{t(await(async t=>{const r=t.statusCode;if(i.redirect&&300<=r&&r<400&&t.headers.location){if(10==i._redirectCount)throw new Error("Request failed. Too much redirects.");return i._redirectCount+=1,await l(y(e,t.headers.location),i)}if(i.expectStatusCode&&r!==i.expectStatusCode)throw t.resume(),new a(r);let o=[];for await(const e of t)o.push(e);let s=n.concat(o);const c=t.headers["content-encoding"];"br"===c&&(s=await p(d.brotliDecompress)(s)),"gzip"!==c&&"deflate"!==c||(s=await p(d.unzip)(s));const f=u(s,i.type);return i.full?{headers:t.headers,status:r,body:f}:f})(s))}catch(e){r(e)}})()}));c.on("error",o);const w=i.sslPinnedCertificates?.map((e=>b(e))),v=e=>{const t=b(e.getPeerCertificate()?.fingerprint256||"");if((t||!e.isSessionReused())&&!w.includes(t))return c.emit("error",new s(`Invalid SSL certificate: ${t} Expected: ${w}`,t)),c.abort()};i.sslPinnedCertificates&&c.on("socket",(e=>{e.listeners("secureConnect").map((e=>(e.name||"").replace("bound ",""))).includes("mfetchSecureConnect")||e.on("secureConnect",v.bind(null,e))})),i.keepAlive&&c.setNoDelay(!0),m.body&&c.write(m.body),c.end()}))}const f=new Set(["Accept","Accept-Language","Content-Language","Content-Type"].map((e=>e.toLowerCase()))),h=new Set(["Accept-Charset","Accept-Encoding","Access-Control-Request-Headers","Access-Control-Request-Method","Connection","Content-Length","Cookie","Cookie2","Date","DNT","Expect","Host","Keep-Alive","Origin","Referer","TE","Trailer","Transfer-Encoding","Upgrade","Via"].map((e=>e.toLowerCase())));async function d(e,t){let r={...o,...t};const n=new Headers;"json"===r.type&&n.set("Content-Type","application/json");let i=new URL(e);if(i.username){const e=btoa(`${i.username}:${i.password}`);n.set("Authorization",`Basic ${e}`),i.username="",i.password=""}e=""+i;for(let e in r.headers){const t=e.toLowerCase();(f.has(t)||r.cors&&!h.has(t))&&n.set(e,r.headers[e])}let s={headers:n,redirect:r.redirect?"follow":"manual"};r.referrer||(s.referrerPolicy="no-referrer"),r.cors&&(s.mode="cors"),r.data&&(r.method||(s.method="POST"),s.body="json"===r.type?JSON.stringify(r.data):r.data);const c=await fetch(e,s);if(r.expectStatusCode&&c.status!==r.expectStatusCode)throw new a(c.status);const l=u(new Uint8Array(await c.arrayBuffer()),r.type);return r.full?{headers:Object.fromEntries(c.headers.entries()),status:c.status,body:l}:l}const p=!!("object"==typeof i&&i.versions&&i.versions.node&&i.versions.v8);t.default=function(e,t){return(p?l:d)(e,t)}},7033:(e,t,r)=>{var n=r(8892);function i(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function o(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},r=e.name||"Function wrapped with `once`";return t.onceError=r+" shouldn't be called more than once",t.called=!1,t}e.exports=n(i),e.exports.strict=n(o),i.proto=i((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return i(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return o(this)},configurable:!0})}))},4406:e=>{var t,r,n=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var a,u=[],c=!1,l=-1;function f(){c&&a&&(c=!1,a.length?u=a.concat(u):l=-1,u.length&&h())}function h(){if(!c){var e=s(f);c=!0;for(var t=u.length;t;){for(a=u,u=[];++l<t;)a&&a[l].run();l=-1,t=u.length}a=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function p(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(new d(e,t)),1!==u.length||c||s(h)},d.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=p,n.addListener=p,n.once=p,n.off=p,n.removeListener=p,n.removeAllListeners=p,n.emit=p,n.prependListener=p,n.prependOnceListener=p,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},3171:(e,t,r)=>{var n=r(4406),i=r(7033),o=r(8797),s=r(3558),a=function(){},u=/^v?\.0/.test(n.version),c=function(e){return"function"==typeof e},l=function(e){e()},f=function(e,t){return e.pipe(t)};e.exports=function(){var e,t=Array.prototype.slice.call(arguments),r=c(t[t.length-1]||a)&&t.pop()||a;if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Error("pump requires two streams per minimum");var n=t.map((function(f,h){var d=h<t.length-1;return function(e,t,r,n){n=i(n);var l=!1;e.on("close",(function(){l=!0})),o(e,{readable:t,writable:r},(function(e){if(e)return n(e);l=!0,n()}));var f=!1;return function(t){if(!l&&!f)return f=!0,function(e){return!!u&&!!s&&(e instanceof(s.ReadStream||a)||e instanceof(s.WriteStream||a))&&c(e.close)}(e)?e.close(a):function(e){return e.setHeader&&c(e.abort)}(e)?e.abort():c(e.destroy)?e.destroy():void n(t||new Error("stream was destroyed"))}}(f,d,h>0,(function(t){e||(e=t),t&&n.forEach(l),d||(n.forEach(l),r(e))}))}));return t.reduce(f)}},2808:e=>{"use strict";function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,r,n,i){r=r||"&",n=n||"=";var o={};if("string"!=typeof e||0===e.length)return o;var s=/\+/g;e=e.split(r);var a=1e3;i&&"number"==typeof i.maxKeys&&(a=i.maxKeys);var u=e.length;a>0&&u>a&&(u=a);for(var c=0;c<u;++c){var l,f,h,d,p=e[c].replace(s,"%20"),y=p.indexOf(n);y>=0?(l=p.substr(0,y),f=p.substr(y+1)):(l=p,f=""),h=decodeURIComponent(l),d=decodeURIComponent(f),t(o,h)?Array.isArray(o[h])?o[h].push(d):o[h]=[o[h],d]:o[h]=d}return o}},1368:e=>{"use strict";var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,r,n,i){return r=r||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map((function(i){var o=encodeURIComponent(t(i))+n;return Array.isArray(e[i])?e[i].map((function(e){return o+encodeURIComponent(t(e))})).join(r):o+encodeURIComponent(t(e[i]))})).join(r):i?encodeURIComponent(t(i))+n+encodeURIComponent(t(e)):""}},6642:(e,t,r)=>{"use strict";t.decode=t.parse=r(2808),t.encode=t.stringify=r(1368)},7834:(e,t,r)=>{var n=r(8834),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},214:(e,t,r)=>{"use strict";var n=r(7834).Buffer,i=n.isEncoding||function(e){switch((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 o(e){var t;switch(this.encoding=function(e){var t=function(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}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=l,this.end=f,t=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=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 c(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 l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?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 f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))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||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},o.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=s(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||-2===i?0:(i=s(t[n]))>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||-2===i?0:(i=s(t[n]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.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}},9639:function(e,t,r){var n;e=r.nmd(e),function(i){t&&t.nodeType,e&&e.nodeType;var o="object"==typeof r.g&&r.g;o.global!==o&&o.window!==o&&o.self;var s,a=2147483647,u=36,c=26,l=38,f=700,h=/^xn--/,d=/[^\x20-\x7E]/,p=/[\x2E\u3002\uFF0E\uFF61]/g,y={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},g=u-1,m=Math.floor,b=String.fromCharCode;function w(e){throw RangeError(y[e])}function v(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function _(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+v((e=e.replace(p,".")).split("."),t).join(".")}function E(e){for(var t,r,n=[],i=0,o=e.length;i<o;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<o?56320==(64512&(r=e.charCodeAt(i++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),i--):n.push(t);return n}function A(e){return v(e,(function(e){var t="";return e>65535&&(t+=b((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+b(e)})).join("")}function S(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function T(e,t,r){var n=0;for(e=r?m(e/f):e>>1,e+=m(e/t);e>g*c>>1;n+=u)e=m(e/g);return m(n+(g+1)*e/(e+l))}function B(e){var t,r,n,i,o,s,l,f,h,d,p,y=[],g=e.length,b=0,v=128,_=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&w("not-basic"),y.push(e.charCodeAt(n));for(i=r>0?r+1:0;i<g;){for(o=b,s=1,l=u;i>=g&&w("invalid-input"),((f=(p=e.charCodeAt(i++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:u)>=u||f>m((a-b)/s))&&w("overflow"),b+=f*s,!(f<(h=l<=_?1:l>=_+c?c:l-_));l+=u)s>m(a/(d=u-h))&&w("overflow"),s*=d;_=T(b-o,t=y.length+1,0==o),m(b/t)>a-v&&w("overflow"),v+=m(b/t),b%=t,y.splice(b++,0,v)}return A(y)}function O(e){var t,r,n,i,o,s,l,f,h,d,p,y,g,v,_,A=[];for(y=(e=E(e)).length,t=128,r=0,o=72,s=0;s<y;++s)(p=e[s])<128&&A.push(b(p));for(n=i=A.length,i&&A.push("-");n<y;){for(l=a,s=0;s<y;++s)(p=e[s])>=t&&p<l&&(l=p);for(l-t>m((a-r)/(g=n+1))&&w("overflow"),r+=(l-t)*g,t=l,s=0;s<y;++s)if((p=e[s])<t&&++r>a&&w("overflow"),p==t){for(f=r,h=u;!(f<(d=h<=o?1:h>=o+c?c:h-o));h+=u)_=f-d,v=u-d,A.push(b(S(d+_%v,0))),f=m(_/v);A.push(b(S(f,0))),o=T(r,g,n==i),r=0,++n}++r,++t}return A.join("")}s={version:"1.3.2",ucs2:{decode:E,encode:A},decode:B,encode:O,toASCII:function(e){return _(e,(function(e){return d.test(e)?"xn--"+O(e):e}))},toUnicode:function(e){return _(e,(function(e){return h.test(e)?B(e.slice(4).toLowerCase()):e}))}},void 0===(n=function(){return s}.call(t,r,t,e))||(e.exports=n)}()},883:(e,t,r)=>{"use strict";var n=r(9639),i=r(5225);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=w,t.resolve=function(e,t){return w(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?w(e,!1,!0).resolveObject(t):t},t.format=function(e){return i.isString(e)&&(e=w(e)),e instanceof o?e.format():o.prototype.format.call(e)},t.Url=o;var s=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(c),f=["%","/","?",";","#"].concat(l),h=["/","?","#"],d=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,y={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},b=r(6642);function w(e,t,r){if(e&&i.isObject(e)&&e instanceof o)return e;var n=new o;return n.parse(e,t,r),n}o.prototype.parse=function(e,t,r){if(!i.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),a=-1!==o&&o<e.indexOf("#")?"?":"#",c=e.split(a);c[0]=c[0].replace(/\\/g,"/");var w=e=c.join(a);if(w=w.trim(),!r&&1===e.split("#").length){var v=u.exec(w);if(v)return this.path=w,this.href=w,this.pathname=v[1],v[2]?(this.search=v[2],this.query=t?b.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var _=s.exec(w);if(_){var E=(_=_[0]).toLowerCase();this.protocol=E,w=w.substr(_.length)}if(r||_||w.match(/^\/\/[^@\/]+@[^@\/]+/)){var A="//"===w.substr(0,2);!A||_&&g[_]||(w=w.substr(2),this.slashes=!0)}if(!g[_]&&(A||_&&!m[_])){for(var S,T,B=-1,O=0;O<h.length;O++)-1!==(N=w.indexOf(h[O]))&&(-1===B||N<B)&&(B=N);for(-1!==(T=-1===B?w.lastIndexOf("@"):w.lastIndexOf("@",B))&&(S=w.slice(0,T),w=w.slice(T+1),this.auth=decodeURIComponent(S)),B=-1,O=0;O<f.length;O++){var N;-1!==(N=w.indexOf(f[O]))&&(-1===B||N<B)&&(B=N)}-1===B&&(B=w.length),this.host=w.slice(0,B),w=w.slice(B),this.parseHost(),this.hostname=this.hostname||"";var x="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!x)for(var P=this.hostname.split(/\./),C=(O=0,P.length);O<C;O++){var I=P[O];if(I&&!I.match(d)){for(var R="",L=0,j=I.length;L<j;L++)I.charCodeAt(L)>127?R+="x":R+=I[L];if(!R.match(d)){var k=P.slice(0,O),M=P.slice(O+1),U=I.match(p);U&&(k.push(U[1]),M.unshift(U[2])),M.length&&(w="/"+M.join(".")+w),this.hostname=k.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),x||(this.hostname=n.toASCII(this.hostname));var z=this.port?":"+this.port:"",D=this.hostname||"";this.host=D+z,this.href+=this.host,x&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==w[0]&&(w="/"+w))}if(!y[E])for(O=0,C=l.length;O<C;O++){var F=l[O];if(-1!==w.indexOf(F)){var V=encodeURIComponent(F);V===F&&(V=escape(F)),w=w.split(F).join(V)}}var $=w.indexOf("#");-1!==$&&(this.hash=w.substr($),w=w.slice(0,$));var H=w.indexOf("?");if(-1!==H?(this.search=w.substr(H),this.query=w.substr(H+1),t&&(this.query=b.parse(this.query)),w=w.slice(0,H)):t&&(this.search="",this.query={}),w&&(this.pathname=w),m[E]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){z=this.pathname||"";var W=this.search||"";this.path=z+W}return this.href=this.format(),this},o.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",o=!1,s="";this.host?o=e+this.host:this.hostname&&(o=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(s=b.stringify(this.query));var a=this.search||s&&"?"+s||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||m[t])&&!1!==o?(o="//"+(o||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):o||(o=""),n&&"#"!==n.charAt(0)&&(n="#"+n),a&&"?"!==a.charAt(0)&&(a="?"+a),t+o+(r=r.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(a=a.replace("#","%23"))+n},o.prototype.resolve=function(e){return this.resolveObject(w(e,!1,!0)).format()},o.prototype.resolveObject=function(e){if(i.isString(e)){var t=new o;t.parse(e,!1,!0),e=t}for(var r=new o,n=Object.keys(this),s=0;s<n.length;s++){var a=n[s];r[a]=this[a]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var u=Object.keys(e),c=0;c<u.length;c++){var l=u[c];"protocol"!==l&&(r[l]=e[l])}return m[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!m[e.protocol]){for(var f=Object.keys(e),h=0;h<f.length;h++){var d=f[h];r[d]=e[d]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||g[e.protocol])r.pathname=e.pathname;else{for(var p=(e.pathname||"").split("/");p.length&&!(e.host=p.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),r.pathname=p.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var y=r.pathname||"",b=r.search||"";r.path=y+b}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var w=r.pathname&&"/"===r.pathname.charAt(0),v=e.host||e.pathname&&"/"===e.pathname.charAt(0),_=v||w||r.host&&e.pathname,E=_,A=r.pathname&&r.pathname.split("/")||[],S=(p=e.pathname&&e.pathname.split("/")||[],r.protocol&&!m[r.protocol]);if(S&&(r.hostname="",r.port=null,r.host&&(""===A[0]?A[0]=r.host:A.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===p[0]?p[0]=e.host:p.unshift(e.host)),e.host=null),_=_&&(""===p[0]||""===A[0])),v)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,A=p;else if(p.length)A||(A=[]),A.pop(),A=A.concat(p),r.search=e.search,r.query=e.query;else if(!i.isNullOrUndefined(e.search))return S&&(r.hostname=r.host=A.shift(),(x=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=x.shift(),r.host=r.hostname=x.shift())),r.search=e.search,r.query=e.query,i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!A.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var T=A.slice(-1)[0],B=(r.host||e.host||A.length>1)&&("."===T||".."===T)||""===T,O=0,N=A.length;N>=0;N--)"."===(T=A[N])?A.splice(N,1):".."===T?(A.splice(N,1),O++):O&&(A.splice(N,1),O--);if(!_&&!E)for(;O--;O)A.unshift("..");!_||""===A[0]||A[0]&&"/"===A[0].charAt(0)||A.unshift(""),B&&"/"!==A.join("/").substr(-1)&&A.push("");var x,P=""===A[0]||A[0]&&"/"===A[0].charAt(0);return S&&(r.hostname=r.host=P?"":A.length?A.shift():"",(x=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=x.shift(),r.host=r.hostname=x.shift())),(_=_||r.host&&A.length)&&!P&&A.unshift(""),A.length?r.pathname=A.join("/"):(r.pathname=null,r.path=null),i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},o.prototype.parseHost=function(){var e=this.host,t=a.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},5225:e=>{"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},82:e=>{e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},4895:(e,t,r)=>{"use strict";var n=r(2635),i=r(3138),o=r(2094),s=r(198);function a(e){return e.call.bind(e)}var u="undefined"!=typeof BigInt,c="undefined"!=typeof Symbol,l=a(Object.prototype.toString),f=a(Number.prototype.valueOf),h=a(String.prototype.valueOf),d=a(Boolean.prototype.valueOf);if(u)var p=a(BigInt.prototype.valueOf);if(c)var y=a(Symbol.prototype.valueOf);function g(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch(e){return!1}}function m(e){return"[object Map]"===l(e)}function b(e){return"[object Set]"===l(e)}function w(e){return"[object WeakMap]"===l(e)}function v(e){return"[object WeakSet]"===l(e)}function _(e){return"[object ArrayBuffer]"===l(e)}function E(e){return"undefined"!=typeof ArrayBuffer&&(_.working?_(e):e instanceof ArrayBuffer)}function A(e){return"[object DataView]"===l(e)}function S(e){return"undefined"!=typeof DataView&&(A.working?A(e):e instanceof DataView)}t.isArgumentsObject=n,t.isGeneratorFunction=i,t.isTypedArray=s,t.isPromise=function(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},t.isArrayBufferView=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):s(e)||S(e)},t.isUint8Array=function(e){return"Uint8Array"===o(e)},t.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===o(e)},t.isUint16Array=function(e){return"Uint16Array"===o(e)},t.isUint32Array=function(e){return"Uint32Array"===o(e)},t.isInt8Array=function(e){return"Int8Array"===o(e)},t.isInt16Array=function(e){return"Int16Array"===o(e)},t.isInt32Array=function(e){return"Int32Array"===o(e)},t.isFloat32Array=function(e){return"Float32Array"===o(e)},t.isFloat64Array=function(e){return"Float64Array"===o(e)},t.isBigInt64Array=function(e){return"BigInt64Array"===o(e)},t.isBigUint64Array=function(e){return"BigUint64Array"===o(e)},m.working="undefined"!=typeof Map&&m(new Map),t.isMap=function(e){return"undefined"!=typeof Map&&(m.working?m(e):e instanceof Map)},b.working="undefined"!=typeof Set&&b(new Set),t.isSet=function(e){return"undefined"!=typeof Set&&(b.working?b(e):e instanceof Set)},w.working="undefined"!=typeof WeakMap&&w(new WeakMap),t.isWeakMap=function(e){return"undefined"!=typeof WeakMap&&(w.working?w(e):e instanceof WeakMap)},v.working="undefined"!=typeof WeakSet&&v(new WeakSet),t.isWeakSet=function(e){return v(e)},_.working="undefined"!=typeof ArrayBuffer&&_(new ArrayBuffer),t.isArrayBuffer=E,A.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&A(new DataView(new ArrayBuffer(1),0,1)),t.isDataView=S;var T="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function B(e){return"[object SharedArrayBuffer]"===l(e)}function O(e){return void 0!==T&&(void 0===B.working&&(B.working=B(new T)),B.working?B(e):e instanceof T)}function N(e){return g(e,f)}function x(e){return g(e,h)}function P(e){return g(e,d)}function C(e){return u&&g(e,p)}function I(e){return c&&g(e,y)}t.isSharedArrayBuffer=O,t.isAsyncFunction=function(e){return"[object AsyncFunction]"===l(e)},t.isMapIterator=function(e){return"[object Map Iterator]"===l(e)},t.isSetIterator=function(e){return"[object Set Iterator]"===l(e)},t.isGeneratorObject=function(e){return"[object Generator]"===l(e)},t.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===l(e)},t.isNumberObject=N,t.isStringObject=x,t.isBooleanObject=P,t.isBigIntObject=C,t.isSymbolObject=I,t.isBoxedPrimitive=function(e){return N(e)||x(e)||P(e)||C(e)||I(e)},t.isAnyArrayBuffer=function(e){return"undefined"!=typeof Uint8Array&&(E(e)||O(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(e){Object.defineProperty(t,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})}))},3335:(e,t,r)=>{var n=r(4406),i=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++)r[t[n]]=Object.getOwnPropertyDescriptor(e,t[n]);return r},o=/%[sdj%]/g;t.format=function(e){if(!w(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(c(arguments[r]));return t.join(" ")}r=1;for(var n=arguments,i=n.length,s=String(e).replace(o,(function(e){if("%%"===e)return"%";if(r>=i)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),a=n[r];r<i;a=n[++r])m(a)||!E(a)?s+=" "+a:s+=" "+c(a);return s},t.deprecate=function(e,r){if(void 0!==n&&!0===n.noDeprecation)return e;if(void 0===n)return function(){return t.deprecate(e,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(n.throwDeprecation)throw new Error(r);n.traceDeprecation?console.trace(r):console.error(r),i=!0}return e.apply(this,arguments)}};var s={},a=/^$/;if(n.env.NODE_DEBUG){var u=n.env.NODE_DEBUG;u=u.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),a=new RegExp("^"+u+"$","i")}function c(e,r){var n={seen:[],stylize:f};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(r)?n.showHidden=r:r&&t._extend(n,r),v(n.showHidden)&&(n.showHidden=!1),v(n.depth)&&(n.depth=2),v(n.colors)&&(n.colors=!1),v(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=l),h(n,e,n.depth)}function l(e,t){var r=c.styles[t];return r?"["+c.colors[r][0]+"m"+e+"["+c.colors[r][1]+"m":e}function f(e,t){return e}function h(e,r,n){if(e.customInspect&&r&&T(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,e);return w(i)||(i=h(e,i,n)),i}var o=function(e,t){if(v(t))return e.stylize("undefined","undefined");if(w(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return b(t)?e.stylize(""+t,"number"):g(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}(e,r);if(o)return o;var s=Object.keys(r),a=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(r)),S(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return d(r);if(0===s.length){if(T(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(_(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(A(r))return e.stylize(Date.prototype.toString.call(r),"date");if(S(r))return d(r)}var c,l="",f=!1,E=["{","}"];return y(r)&&(f=!0,E=["[","]"]),T(r)&&(l=" [Function"+(r.name?": "+r.name:"")+"]"),_(r)&&(l=" "+RegExp.prototype.toString.call(r)),A(r)&&(l=" "+Date.prototype.toUTCString.call(r)),S(r)&&(l=" "+d(r)),0!==s.length||f&&0!=r.length?n<0?_(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),c=f?function(e,t,r,n,i){for(var o=[],s=0,a=t.length;s<a;++s)x(t,String(s))?o.push(p(e,t,r,n,String(s),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(p(e,t,r,n,i,!0))})),o}(e,r,n,a,s):s.map((function(t){return p(e,r,n,a,t,f)})),e.seen.pop(),function(e,t,r){return e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(c,l,E)):E[0]+l+E[1]}function d(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,r,n,i,o){var s,a,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?a=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(a=e.stylize("[Setter]","special")),x(n,i)||(s="["+i+"]"),a||(e.seen.indexOf(u.value)<0?(a=m(r)?h(e,u.value,null):h(e,u.value,r-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map((function(e){return" "+e})).join("\n").slice(2):"\n"+a.split("\n").map((function(e){return" "+e})).join("\n")):a=e.stylize("[Circular]","special")),v(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.slice(1,-1),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function y(e){return Array.isArray(e)}function g(e){return"boolean"==typeof e}function m(e){return null===e}function b(e){return"number"==typeof e}function w(e){return"string"==typeof e}function v(e){return void 0===e}function _(e){return E(e)&&"[object RegExp]"===B(e)}function E(e){return"object"==typeof e&&null!==e}function A(e){return E(e)&&"[object Date]"===B(e)}function S(e){return E(e)&&("[object Error]"===B(e)||e instanceof Error)}function T(e){return"function"==typeof e}function B(e){return Object.prototype.toString.call(e)}function O(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(e=e.toUpperCase(),!s[e])if(a.test(e)){var r=n.pid;s[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else s[e]=function(){};return s[e]},t.inspect=c,c.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=r(4895),t.isArray=y,t.isBoolean=g,t.isNull=m,t.isNullOrUndefined=function(e){return null==e},t.isNumber=b,t.isString=w,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=v,t.isRegExp=_,t.types.isRegExp=_,t.isObject=E,t.isDate=A,t.types.isDate=A,t.isError=S,t.types.isNativeError=S,t.isFunction=T,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(82);var N=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function x(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,r;console.log("%s - %s",(r=[O((e=new Date).getHours()),O(e.getMinutes()),O(e.getSeconds())].join(":"),[e.getDate(),N[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=r(1285),t._extend=function(e,t){if(!t||!E(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var P="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function C(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(P&&e[P]){var t;if("function"!=typeof(t=e[P]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,P,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise((function(e,n){t=e,r=n})),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push((function(e,n){e?r(e):t(n)}));try{e.apply(this,i)}catch(e){r(e)}return n}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),P&&Object.defineProperty(t,P,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,i(e))},t.promisify.custom=P,t.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function t(){for(var t=[],r=0;r<arguments.length;r++)t.push(arguments[r]);var i=t.pop();if("function"!=typeof i)throw new TypeError("The last argument must be of type Function");var o=this,s=function(){return i.apply(o,arguments)};e.apply(this,t).then((function(e){n.nextTick(s.bind(null,null,e))}),(function(e){n.nextTick(C.bind(null,e,s))}))}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,i(e)),t}},2094:(e,t,r)=>{"use strict";var n=r(3243),i=r(2191),o=r(2680),s=r(326),a=o("Object.prototype.toString"),u=r(7226)(),c="undefined"==typeof globalThis?r.g:globalThis,l=i(),f=o("String.prototype.slice"),h={},d=Object.getPrototypeOf;u&&s&&d&&n(l,(function(e){if("function"==typeof c[e]){var t=new c[e];if(Symbol.toStringTag in t){var r=d(t),n=s(r,Symbol.toStringTag);if(!n){var i=d(r);n=s(i,Symbol.toStringTag)}h[e]=n.get}}}));var p=r(198);e.exports=function(e){return!!p(e)&&(u&&Symbol.toStringTag in e?function(e){var t=!1;return n(h,(function(r,n){if(!t)try{var i=r.call(e);i===n&&(t=i)}catch(e){}})),t}(e):f(a(e),8,-1))}},8892:e=>{e.exports=function e(t,r){if(t&&r)return e(t)(r);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){n[e]=t[e]})),n;function n(){for(var e=new Array(arguments.length),r=0;r<e.length;r++)e[r]=arguments[r];var n=t.apply(this,e),i=e[e.length-1];return"function"==typeof n&&n!==i&&Object.keys(i).forEach((function(e){n[e]=i[e]})),n}}},4888:()=>{},732:()=>{},3406:()=>{},4087:()=>{},3558:()=>{},2191:(e,t,r)=>{"use strict";var n=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],i="undefined"==typeof globalThis?r.g:globalThis;e.exports=function(){for(var e=[],t=0;t<n.length;t++)"function"==typeof i[n[t]]&&(e[e.length]=n[t]);return e}}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var n={};return(()=>{"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(t,r,n){return(r=function(t){var r=function(t,r){if("object"!==e(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==e(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===e(r)?r:String(r)}(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}r.r(n),r.d(n,{Web3AuthNoModal:()=>Ue}),r(1149);var i=r(2699),o=r(7847),s=r.n(o),a=r(8094);function u(e,t,r){try{Reflect.apply(e,t,r)}catch(e){setTimeout((()=>{throw e}))}}r(8797),r(7033),r(3171);class c extends i.EventEmitter{emit(e){let t="error"===e;const r=this._events;if(void 0!==r)t=t&&void 0===r.error;else if(!t)return!1;for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];if(t){let e;if(i.length>0&&([e]=i),e instanceof Error)throw e;const t=new Error("Unhandled error."+(e?` (${e.message})`:""));throw t.context=e,t}const s=r[e];if(void 0===s)return!1;if("function"==typeof s)u(s,this,i);else{const e=s.length,t=function(e){const t=e.length,r=new Array(t);for(let n=0;n<t;n+=1)r[n]=e[n];return r}(s);for(let r=0;r<e;r+=1)u(t[r],this,i)}return!0}}class l extends Error{constructor(e){let{code:r,message:n,data:i}=e;if(!Number.isInteger(r))throw new Error("code must be an integer");if(!n||"string"!=typeof n)throw new Error("message must be string");super(n),t(this,"code",void 0),t(this,"data",void 0),this.code=r,void 0!==i&&(this.data=i)}toString(){return s()({code:this.code,message:this.message,data:this.data,stack:this.stack})}}function f(e){return async(t,r,n,i)=>{let o;const s=new Promise((e=>{o=e}));let a=null,u=!1;const c=async()=>{u=!0,n((e=>{a=e,o()})),await s};try{await e(t,r,c),u?(await s,a(null)):i(null)}catch(e){a?a(e):i(e)}}}function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}class d extends c{constructor(){super(),t(this,"_middleware",void 0),this._middleware=[]}static async _runAllMiddleware(e,t,r){const n=[];let i=null,o=!1;for(const s of r)if([i,o]=await d._runMiddleware(e,t,s,n),o)break;return[i,o,n.reverse()]}static _runMiddleware(e,t,r,n){return new Promise((i=>{const o=e=>{const r=e||t.error;r&&(t.error=(0,a.Xy)(r)),i([r,!0])},s=e=>{t.error?o(t.error):(e&&("function"!=typeof e&&o(new l({code:-32603,message:"JRPCEngine: 'next' return handlers must be functions"})),n.push(e)),i([null,!1]))};try{r(e,t,s,o)}catch(e){o(e)}}))}static async _runReturnHandlers(e){for(const t of e)await new Promise(((e,r)=>{t((t=>t?r(t):e()))}))}static _checkForCompletion(e,t,r){if(!("result"in t)&&!("error"in t))throw new l({code:-32603,message:"Response has no error or result for request"});if(!r)throw new l({code:-32603,message:"Nothing ended request"})}push(e){this._middleware.push(e)}handle(e,t){if(t&&"function"!=typeof t)throw new Error('"callback" must be a function if provided.');return Array.isArray(e)?t?this._handleBatch(e,t):this._handleBatch(e):t?this._handle(e,t):this._promiseHandle(e)}asMiddleware(){return async(e,t,r,n)=>{try{const[i,o,s]=await d._runAllMiddleware(e,t,this._middleware);return o?(await d._runReturnHandlers(s),n(i)):r((async e=>{try{await d._runReturnHandlers(s)}catch(t){return e(t)}return e()}))}catch(e){return n(e)}}}async _handleBatch(e,t){try{const r=await Promise.all(e.map(this._promiseHandle.bind(this)));return t?t(null,r):r}catch(e){if(t)return t(e);throw e}}_promiseHandle(e){return new Promise((t=>{this._handle(e,((e,r)=>{t(r)}))}))}async _handle(e,r){if(!e||Array.isArray(e)||"object"!=typeof e){const e=new l({code:-32603,message:"request must be plain object"});return r(e,{id:void 0,jsonrpc:"2.0",error:e})}if("string"!=typeof e.method){const t=new l({code:-32603,message:"method must be string"});return r(t,{id:e.id,jsonrpc:"2.0",error:t})}const n=function(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?h(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e),i={id:n.id,jsonrpc:n.jsonrpc};let o=null;try{await this._processRequest(n,i)}catch(e){o=e}return o&&(delete i.result,i.error||(i.error=(0,a.Xy)(o))),r(o,i)}async _processRequest(e,t){const[r,n,i]=await d._runAllMiddleware(e,t,this._middleware);if(d._checkForCompletion(e,t,n),await d._runReturnHandlers(i),r)throw r}}function p(e){let t,r=!1,n=0;try{t=window[e],r=!0,n=t.length;const i="__storage_test__";return t.setItem(i,i),t.removeItem(i),!0}catch(e){return e&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&r&&0!==n}}Symbol("IGNORE_SUBSTREAM"),r(9487);class y{constructor(){t(this,"store",{})}getItem(e){return this.store[e]||null}setItem(e,t){this.store[e]=t}}t(class{constructor(e,r){t(this,"storage",void 0),t(this,"_storeKey",void 0),this.storage=r,this._storeKey=e;try{r.getItem(e)||this.resetStore()}catch(e){}}static getInstance(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"local";if(!this.instance){let r;r="local"===t&&p("localStorage")?window.localStorage:"session"===t&&p("sessionStorage")?window.sessionStorage:new y,this.instance=new this(e,r)}return this.instance}toJSON(){return this.storage.getItem(this._storeKey)}resetStore(){const e=this.getStore();return this.storage.setItem(this._storeKey,JSON.stringify({})),e}getStore(){return JSON.parse(this.storage.getItem(this._storeKey)||"{}")}get(e){return JSON.parse(this.storage.getItem(this._storeKey)||"{}")[e]}set(e,t){const r=JSON.parse(this.storage.getItem(this._storeKey)||"{}");r[e]=t,this.storage.setItem(this._storeKey,JSON.stringify(r))}},"instance",void 0);var g,m=(g=function(e,t){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},g(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}g(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),b=function(e){function t(t,r){var n,i,o,s=this.constructor,a=e.call(this,t,r)||this;return Object.defineProperty(a,"name",{value:s.name,enumerable:!1,configurable:!0}),n=a,i=s.prototype,(o=Object.setPrototypeOf)?o(n,i):n.__proto__=i,function(e,t){void 0===t&&(t=e.constructor);var r=Error.captureStackTrace;r&&r(e,t)}(a),a}return m(t,e),t}(Error);r(1344);var w=r(9640),v=r.n(w);function _(e){this.message=e}function E(e){this.message=e}v().getLogger("http-helpers").setLevel(w.levels.INFO),_.prototype=new Error,_.prototype.name="InvalidCharacterError","undefined"!=typeof window&&window.atob&&window.atob.bind(window),E.prototype=new Error,E.prototype.name="InvalidTokenError";const A={EIP155:"eip155",SOLANA:"solana",OTHER:"other"},S="multichain",T=(e,t)=>{if(e===A.OTHER)return null;const r=t?"number"==typeof t?t:parseInt(t,16):(e=>{if(e===A.EIP155)return 1;if(e===A.SOLANA)return 1;throw new Error(`Chain namespace ${e} is not supported`)})(e);return e===A.EIP155?(e=>{const t=A.EIP155;return 1===e?{chainNamespace:t,chainId:"0x1",rpcTarget:"https://rpc.ankr.com/eth",displayName:"Ethereum Mainnet",blockExplorer:"https://etherscan.io/",ticker:"ETH",tickerName:"Ethereum",decimals:18}:5===e?{chainNamespace:t,chainId:"0x5",rpcTarget:"https://rpc.ankr.com/eth_goerli",displayName:"Goerli Testnet",blockExplorer:"https://goerli.etherscan.io/",ticker:"ETH",tickerName:"Ethereum",decimals:18}:11155111===e?{chainNamespace:t,chainId:"0xaa36a7",rpcTarget:"https://rpc.ankr.com/eth_sepolia",displayName:"Sepolia Testnet",blockExplorer:"https://sepolia.etherscan.io/",ticker:"ETH",tickerName:"Ethereum",decimals:18}:137===e?{chainNamespace:t,chainId:"0x89",rpcTarget:"https://rpc.ankr.com/polygon",displayName:"Polygon Mainnet",blockExplorer:"https://polygonscan.com",ticker:"MATIC",tickerName:"Polygon"}:80001===e?{chainNamespace:t,chainId:"0x13881",rpcTarget:"https://rpc.ankr.com/polygon_mumbai",displayName:"Polygon Mumbai Testnet",blockExplorer:"https://mumbai.polygonscan.com/",ticker:"MATIC",tickerName:"Polygon",decimals:18}:56===e?{chainNamespace:t,chainId:"0x38",rpcTarget:"https://rpc.ankr.com/bsc",displayName:"Binance SmartChain Mainnet",blockExplorer:"https://bscscan.com",ticker:"BNB",tickerName:"Binance SmartChain",decimals:18}:97===e?{chainNamespace:t,chainId:"0x61",rpcTarget:"https://rpc.ankr.com/bsc_testnet_chapel",displayName:"Binance SmartChain Testnet",blockExplorer:"https://testnet.bscscan.com",ticker:"BNB",tickerName:"Binance SmartChain",decimals:18}:25===e?{chainNamespace:t,chainId:"0x19",rpcTarget:"https://rpc.cronos.org",displayName:"Cronos Mainnet",blockExplorer:"https://cronoscan.com/",ticker:"CRO",tickerName:"Cronos"}:338===e?{chainNamespace:t,chainId:"0x152",rpcTarget:"https://rpc-t3.cronos.org/",displayName:"Cronos Testnet",blockExplorer:"https://cronoscan.com/",ticker:"CRO",tickerName:"Cronos",decimals:18}:8217===e?{chainNamespace:t,chainId:"0x2019",rpcTarget:"https://public-node-api.klaytnapi.com/v1/cypress",displayName:"Klaytn Mainnet",blockExplorer:"https://scope.klaytn.com",ticker:"KLAY",tickerName:"Klaytn",decimals:18}:null})(r):e===A.SOLANA?(e=>{const t=A.SOLANA;return 1===e?{chainNamespace:t,chainId:"0x1",rpcTarget:"https://rpc.ankr.com/solana",displayName:"Solana Mainnet",blockExplorer:"https://explorer.solana.com",ticker:"SOL",tickerName:"Solana",decimals:9}:2===e?{chainNamespace:t,chainId:"0x2",rpcTarget:"https://api.testnet.solana.com",displayName:"Solana Testnet",blockExplorer:"https://explorer.solana.com?cluster=testnet",ticker:"SOL",tickerName:"Solana",decimals:9}:3===e?{chainNamespace:t,chainId:"0x3",rpcTarget:"https://api.devnet.solana.com",displayName:"Solana Devnet",blockExplorer:"https://explorer.solana.com?cluster=devnet",ticker:"SOL",tickerName:"Solana",decimals:9}:null})(r):null};class B extends b{constructor(e,r){super(r),t(this,"code",void 0),t(this,"message",void 0),this.code=e,this.message=r||"",Object.defineProperty(this,"name",{value:"Web3AuthError"})}toJSON(){return{name:this.name,code:this.code,message:this.message}}toString(){return JSON.stringify(this.toJSON())}}class O extends B{constructor(e,t){super(e,t),Object.defineProperty(this,"name",{value:"WalletInitializationError"})}static fromCode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new O(e,`${O.messages[e]}, ${t}`)}static notFound(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return O.fromCode(5001,e)}static notInstalled(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return O.fromCode(5002,e)}static notReady(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return O.fromCode(5003,e)}static windowBlocked(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return O.fromCode(5004,e)}static windowClosed(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return O.fromCode(5005,e)}static incompatibleChainNameSpace(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return O.fromCode(5006,e)}static duplicateAdapterError(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return O.fromCode(5007,e)}static invalidProviderConfigError(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return O.fromCode(5008,e)}static providerNotReadyError(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return O.fromCode(5009,e)}static rpcConnectionError(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return O.fromCode(5010,e)}static invalidParams(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return O.fromCode(5011,e)}static invalidNetwork(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return O.fromCode(5013,e)}}t(O,"messages",{5e3:"Custom",5001:"Wallet is not found",5002:"Wallet is not installed",5003:"Wallet is not ready yet",5004:"Wallet window is blocked",5005:"Wallet window has been closed by the user",5006:"Incompatible chain namespace provided",5007:"Adapter has already been included",5008:"Invalid provider Config",5009:"Provider is not ready yet",5010:"Failed to connect with rpc url",5011:"Invalid params passed in",5013:"Invalid network provided"});class N extends B{constructor(e,t){super(e,t),Object.defineProperty(this,"name",{value:"WalletLoginError"})}static fromCode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new N(e,`${N.messages[e]}. ${t}`)}static connectionError(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return N.fromCode(5111,e)}static disconnectionError(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return N.fromCode(5112,e)}static notConnectedError(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return N.fromCode(5113,e)}static popupClosed(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return N.fromCode(5114,e)}static mfaEnabled(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return N.fromCode(5115,e)}static chainConfigNotAdded(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return N.fromCode(5116,e)}static unsupportedOperation(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return N.fromCode(5117,e)}static coreKitKeyNotFound(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return N.fromCode(5118,e)}static userNotLoggedIn(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return N.fromCode(5119,e)}}t(N,"messages",{5e3:"Custom",5111:"Failed to connect with wallet",5112:"Failed to disconnect from wallet",5113:"Wallet is not connected",5114:"Wallet popup has been closed by the user",5115:"User has already enabled mfa, please use the @web3auth/web3auth-web sdk for login with mfa",5116:"Chain config has not been added. Please add the chain config before calling switchChain",5117:"Unsupported operation",5118:"useCoreKitKey flag is enabled but coreKitKey is not available",5119:"User not logged in."});class x extends B{constructor(e,t){super(e,t),Object.defineProperty(this,"name",{value:"WalletOperationsError"})}static fromCode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new x(e,`${x.messages[e]}, ${t}`)}static chainIDNotAllowed(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return x.fromCode(5201,e)}static operationNotAllowed(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return x.fromCode(5202,e)}}function P(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function C(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?P(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t(x,"messages",{5e3:"Custom",5201:"Provided chainId is not allowed",5202:"This operation is not allowed"});const I={OPENLOGIN:"openlogin",WALLET_CONNECT_V1:"wallet-connect-v1",WALLET_CONNECT_V2:"wallet-connect-v2"},R=C({TORUS_SOLANA:"torus-solana",PHANTOM:"phantom",SOLFLARE:"solflare",SLOPE:"slope"},I),L=C({TORUS_EVM:"torus-evm",METAMASK:"metamask",COINBASE:"coinbase"},I),j=C(C({},L),R);function k(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function M(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?k(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}R.TORUS_SOLANA,R.PHANTOM,R.SOLFLARE,R.SLOPE,L.TORUS_EVM,L.METAMASK,L.COINBASE;const U={NOT_READY:"not_ready",READY:"ready",CONNECTING:"connecting",CONNECTED:"connected",DISCONNECTED:"disconnected",ERRORED:"errored"},z=M(M({},U),{},{ADAPTER_DATA_UPDATED:"adapter_data_updated",CACHE_CLEAR:"cache_clear"});var D=v().getLogger("web3auth-logger");function F(e){let t,r=!1,n=0;try{t=window[e],r=!0,n=t.length;const i="__storage_test__";return t.setItem(i,i),t.removeItem(i),!0}catch(e){const t=e;return!(!t||22!==t.code&&1014!==t.code&&"QuotaExceededError"!==t.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==t.name||!r||0===n)}}function V(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function $(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?V(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const H=$($({},A),{},{MULTICHAIN:"multichain"});var W=r(3349),q=r.n(W),G=(r(5372),/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i),K=Math.ceil,J=Math.floor,Z="[BigNumber Error] ",Y=Z+"Number primitive has more than 15 significant digits: ",X=1e14,Q=14,ee=9007199254740991,te=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],re=1e7,ne=1e9;function ie(e){var t=0|e;return e>0||e===t?t:t-1}function oe(e){for(var t,r,n=1,i=e.length,o=e[0]+"";n<i;){for(t=e[n++]+"",r=Q-t.length;r--;t="0"+t);o+=t}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function se(e,t){var r,n,i=e.c,o=t.c,s=e.s,a=t.s,u=e.e,c=t.e;if(!s||!a)return null;if(r=i&&!i[0],n=o&&!o[0],r||n)return r?n?0:-a:s;if(s!=a)return s;if(r=s<0,n=u==c,!i||!o)return n?0:!i^r?1:-1;if(!n)return u>c^r?1:-1;for(a=(u=i.length)<(c=o.length)?u:c,s=0;s<a;s++)if(i[s]!=o[s])return i[s]>o[s]^r?1:-1;return u==c?0:u>c^r?1:-1}function ae(e,t,r,n){if(e<t||e>r||e!==J(e))throw Error(Z+(n||"Argument")+("number"==typeof e?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function ue(e){var t=e.c.length-1;return ie(e.e/Q)==t&&e.c[t]%2!=0}function ce(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function le(e,t,r){var n,i;if(t<0){for(i=r+".";++t;i+=r);e=i+e}else if(++t>(n=e.length)){for(i=r,t-=n;--t;i+=r);e+=i}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}function fe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function he(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?fe(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}!function e(t){var r,n,i,o,s,a,u,c,l,f,h=B.prototype={constructor:B,toString:null,valueOf:null},d=new B(1),p=20,y=4,g=-7,m=21,b=-1e7,w=1e7,v=!1,_=1,E=0,A={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},S="0123456789abcdefghijklmnopqrstuvwxyz",T=!0;function B(e,t){var r,o,s,a,u,c,l,f,h=this;if(!(h instanceof B))return new B(e,t);if(null==t){if(e&&!0===e._isBigNumber)return h.s=e.s,void(!e.c||e.e>w?h.c=h.e=null:e.e<b?h.c=[h.e=0]:(h.e=e.e,h.c=e.c.slice()));if((c="number"==typeof e)&&0*e==0){if(h.s=1/e<0?(e=-e,-1):1,e===~~e){for(a=0,u=e;u>=10;u/=10,a++);return void(a>w?h.c=h.e=null:(h.e=a,h.c=[e]))}f=String(e)}else{if(!G.test(f=String(e)))return i(h,f,c);h.s=45==f.charCodeAt(0)?(f=f.slice(1),-1):1}(a=f.indexOf("."))>-1&&(f=f.replace(".","")),(u=f.search(/e/i))>0?(a<0&&(a=u),a+=+f.slice(u+1),f=f.substring(0,u)):a<0&&(a=f.length)}else{if(ae(t,2,S.length,"Base"),10==t&&T)return P(h=new B(e),p+h.e+1,y);if(f=String(e),c="number"==typeof e){if(0*e!=0)return i(h,f,c,t);if(h.s=1/e<0?(f=f.slice(1),-1):1,B.DEBUG&&f.replace(/^0\.0*|\./,"").length>15)throw Error(Y+e)}else h.s=45===f.charCodeAt(0)?(f=f.slice(1),-1):1;for(r=S.slice(0,t),a=u=0,l=f.length;u<l;u++)if(r.indexOf(o=f.charAt(u))<0){if("."==o){if(u>a){a=l;continue}}else if(!s&&(f==f.toUpperCase()&&(f=f.toLowerCase())||f==f.toLowerCase()&&(f=f.toUpperCase()))){s=!0,u=-1,a=0;continue}return i(h,String(e),c,t)}c=!1,(a=(f=n(f,t,10,h.s)).indexOf("."))>-1?f=f.replace(".",""):a=f.length}for(u=0;48===f.charCodeAt(u);u++);for(l=f.length;48===f.charCodeAt(--l););if(f=f.slice(u,++l)){if(l-=u,c&&B.DEBUG&&l>15&&(e>ee||e!==J(e)))throw Error(Y+h.s*e);if((a=a-u-1)>w)h.c=h.e=null;else if(a<b)h.c=[h.e=0];else{if(h.e=a,h.c=[],u=(a+1)%Q,a<0&&(u+=Q),u<l){for(u&&h.c.push(+f.slice(0,u)),l-=Q;u<l;)h.c.push(+f.slice(u,u+=Q));u=Q-(f=f.slice(u)).length}else u-=l;for(;u--;f+="0");h.c.push(+f)}}else h.c=[h.e=0]}function O(e,t,r,n){var i,o,s,a,u;if(null==r?r=y:ae(r,0,8),!e.c)return e.toString();if(i=e.c[0],s=e.e,null==t)u=oe(e.c),u=1==n||2==n&&(s<=g||s>=m)?ce(u,s):le(u,s,"0");else if(o=(e=P(new B(e),t,r)).e,a=(u=oe(e.c)).length,1==n||2==n&&(t<=o||o<=g)){for(;a<t;u+="0",a++);u=ce(u,o)}else if(t-=s,u=le(u,o,"0"),o+1>a){if(--t>0)for(u+=".";t--;u+="0");}else if((t+=o-a)>0)for(o+1==a&&(u+=".");t--;u+="0");return e.s<0&&i?"-"+u:u}function N(e,t){for(var r,n=1,i=new B(e[0]);n<e.length;n++){if(!(r=new B(e[n])).s){i=r;break}t.call(i,r)&&(i=r)}return i}function x(e,t,r){for(var n=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,n++);return(r=n+r*Q-1)>w?e.c=e.e=null:r<b?e.c=[e.e=0]:(e.e=r,e.c=t),e}function P(e,t,r,n){var i,o,s,a,u,c,l,f=e.c,h=te;if(f){e:{for(i=1,a=f[0];a>=10;a/=10,i++);if((o=t-i)<0)o+=Q,s=t,l=(u=f[c=0])/h[i-s-1]%10|0;else if((c=K((o+1)/Q))>=f.length){if(!n)break e;for(;f.length<=c;f.push(0));u=l=0,i=1,s=(o%=Q)-Q+1}else{for(u=a=f[c],i=1;a>=10;a/=10,i++);l=(s=(o%=Q)-Q+i)<0?0:u/h[i-s-1]%10|0}if(n=n||t<0||null!=f[c+1]||(s<0?u:u%h[i-s-1]),n=r<4?(l||n)&&(0==r||r==(e.s<0?3:2)):l>5||5==l&&(4==r||n||6==r&&(o>0?s>0?u/h[i-s]:0:f[c-1])%10&1||r==(e.s<0?8:7)),t<1||!f[0])return f.length=0,n?(t-=e.e+1,f[0]=h[(Q-t%Q)%Q],e.e=-t||0):f[0]=e.e=0,e;if(0==o?(f.length=c,a=1,c--):(f.length=c+1,a=h[Q-o],f[c]=s>0?J(u/h[i-s]%h[s])*a:0),n)for(;;){if(0==c){for(o=1,s=f[0];s>=10;s/=10,o++);for(s=f[0]+=a,a=1;s>=10;s/=10,a++);o!=a&&(e.e++,f[0]==X&&(f[0]=1));break}if(f[c]+=a,f[c]!=X)break;f[c--]=0,a=1}for(o=f.length;0===f[--o];f.pop());}e.e>w?e.c=e.e=null:e.e<b&&(e.c=[e.e=0])}return e}function C(e){var t,r=e.e;return null===r?e.toString():(t=oe(e.c),t=r<=g||r>=m?ce(t,r):le(t,r,"0"),e.s<0?"-"+t:t)}return B.clone=e,B.ROUND_UP=0,B.ROUND_DOWN=1,B.ROUND_CEIL=2,B.ROUND_FLOOR=3,B.ROUND_HALF_UP=4,B.ROUND_HALF_DOWN=5,B.ROUND_HALF_EVEN=6,B.ROUND_HALF_CEIL=7,B.ROUND_HALF_FLOOR=8,B.EUCLID=9,B.config=B.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(Z+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(ae(r=e[t],0,ne,t),p=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(ae(r=e[t],0,8,t),y=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(ae(r[0],-ne,0,t),ae(r[1],0,ne,t),g=r[0],m=r[1]):(ae(r,-ne,ne,t),g=-(m=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)ae(r[0],-ne,-1,t),ae(r[1],1,ne,t),b=r[0],w=r[1];else{if(ae(r,-ne,ne,t),!r)throw Error(Z+t+" cannot be zero: "+r);b=-(w=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(Z+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw v=!r,Error(Z+"crypto unavailable");v=r}else v=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(ae(r=e[t],0,9,t),_=r),e.hasOwnProperty(t="POW_PRECISION")&&(ae(r=e[t],0,ne,t),E=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(Z+t+" not an object: "+r);A=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(Z+t+" invalid: "+r);T="0123456789"==r.slice(0,10),S=r}}return{DECIMAL_PLACES:p,ROUNDING_MODE:y,EXPONENTIAL_AT:[g,m],RANGE:[b,w],CRYPTO:v,MODULO_MODE:_,POW_PRECISION:E,FORMAT:A,ALPHABET:S}},B.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!B.DEBUG)return!0;var t,r,n=e.c,i=e.e,o=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===o||-1===o)&&i>=-ne&&i<=ne&&i===J(i)){if(0===n[0]){if(0===i&&1===n.length)return!0;break e}if((t=(i+1)%Q)<1&&(t+=Q),String(n[0]).length==t){for(t=0;t<n.length;t++)if((r=n[t])<0||r>=X||r!==J(r))break e;if(0!==r)return!0}}}else if(null===n&&null===i&&(null===o||1===o||-1===o))return!0;throw Error(Z+"Invalid BigNumber: "+e)},B.maximum=B.max=function(){return N(arguments,h.lt)},B.minimum=B.min=function(){return N(arguments,h.gt)},B.random=(o=9007199254740992,s=Math.random()*o&2097151?function(){return J(Math.random()*o)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,i,o,a=0,u=[],c=new B(d);if(null==e?e=p:ae(e,0,ne),i=K(e/Q),v)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));a<i;)(o=131072*t[a]+(t[a+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[a]=r[0],t[a+1]=r[1]):(u.push(o%1e14),a+=2);a=i/2}else{if(!crypto.randomBytes)throw v=!1,Error(Z+"crypto unavailable");for(t=crypto.randomBytes(i*=7);a<i;)(o=281474976710656*(31&t[a])+1099511627776*t[a+1]+4294967296*t[a+2]+16777216*t[a+3]+(t[a+4]<<16)+(t[a+5]<<8)+t[a+6])>=9e15?crypto.randomBytes(7).copy(t,a):(u.push(o%1e14),a+=7);a=i/7}if(!v)for(;a<i;)(o=s())<9e15&&(u[a++]=o%1e14);for(i=u[--a],e%=Q,i&&e&&(o=te[Q-e],u[a]=J(i/o)*o);0===u[a];u.pop(),a--);if(a<0)u=[n=0];else{for(n=-1;0===u[0];u.splice(0,1),n-=Q);for(a=1,o=u[0];o>=10;o/=10,a++);a<Q&&(n-=Q-a)}return c.e=n,c.c=u,c}),B.sum=function(){for(var e=1,t=arguments,r=new B(t[0]);e<t.length;)r=r.plus(t[e++]);return r},n=function(){var e="0123456789";function t(e,t,r,n){for(var i,o,s=[0],a=0,u=e.length;a<u;){for(o=s.length;o--;s[o]*=t);for(s[0]+=n.indexOf(e.charAt(a++)),i=0;i<s.length;i++)s[i]>r-1&&(null==s[i+1]&&(s[i+1]=0),s[i+1]+=s[i]/r|0,s[i]%=r)}return s.reverse()}return function(n,i,o,s,a){var u,c,l,f,h,d,g,m,b=n.indexOf("."),w=p,v=y;for(b>=0&&(f=E,E=0,n=n.replace(".",""),d=(m=new B(i)).pow(n.length-b),E=f,m.c=t(le(oe(d.c),d.e,"0"),10,o,e),m.e=m.c.length),l=f=(g=t(n,i,o,a?(u=S,e):(u=e,S))).length;0==g[--f];g.pop());if(!g[0])return u.charAt(0);if(b<0?--l:(d.c=g,d.e=l,d.s=s,g=(d=r(d,m,w,v,o)).c,h=d.r,l=d.e),b=g[c=l+w+1],f=o/2,h=h||c<0||null!=g[c+1],h=v<4?(null!=b||h)&&(0==v||v==(d.s<0?3:2)):b>f||b==f&&(4==v||h||6==v&&1&g[c-1]||v==(d.s<0?8:7)),c<1||!g[0])n=h?le(u.charAt(1),-w,u.charAt(0)):u.charAt(0);else{if(g.length=c,h)for(--o;++g[--c]>o;)g[c]=0,c||(++l,g=[1].concat(g));for(f=g.length;!g[--f];);for(b=0,n="";b<=f;n+=u.charAt(g[b++]));n=le(n,l,u.charAt(0))}return n}}(),r=function(){function e(e,t,r){var n,i,o,s,a=0,u=e.length,c=t%re,l=t/re|0;for(e=e.slice();u--;)a=((i=c*(o=e[u]%re)+(n=l*o+(s=e[u]/re|0)*c)%re*re+a)/r|0)+(n/re|0)+l*s,e[u]=i%r;return a&&(e=[a].concat(e)),e}function t(e,t,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;i<r;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]<t[r]?1:0,e[r]=i*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,i,o,s,a){var u,c,l,f,h,d,p,y,g,m,b,w,v,_,E,A,S,T=n.s==i.s?1:-1,O=n.c,N=i.c;if(!(O&&O[0]&&N&&N[0]))return new B(n.s&&i.s&&(O?!N||O[0]!=N[0]:N)?O&&0==O[0]||!N?0*T:T/0:NaN);for(g=(y=new B(T)).c=[],T=o+(c=n.e-i.e)+1,a||(a=X,c=ie(n.e/Q)-ie(i.e/Q),T=T/Q|0),l=0;N[l]==(O[l]||0);l++);if(N[l]>(O[l]||0)&&c--,T<0)g.push(1),f=!0;else{for(_=O.length,A=N.length,l=0,T+=2,(h=J(a/(N[0]+1)))>1&&(N=e(N,h,a),O=e(O,h,a),A=N.length,_=O.length),v=A,b=(m=O.slice(0,A)).length;b<A;m[b++]=0);S=N.slice(),S=[0].concat(S),E=N[0],N[1]>=a/2&&E++;do{if(h=0,(u=t(N,m,A,b))<0){if(w=m[0],A!=b&&(w=w*a+(m[1]||0)),(h=J(w/E))>1)for(h>=a&&(h=a-1),p=(d=e(N,h,a)).length,b=m.length;1==t(d,m,p,b);)h--,r(d,A<p?S:N,p,a),p=d.length,u=1;else 0==h&&(u=h=1),p=(d=N.slice()).length;if(p<b&&(d=[0].concat(d)),r(m,d,b,a),b=m.length,-1==u)for(;t(N,m,A,b)<1;)h++,r(m,A<b?S:N,b,a),b=m.length}else 0===u&&(h++,m=[0]);g[l++]=h,m[0]?m[b++]=O[v]||0:(m=[O[v]],b=1)}while((v++<_||null!=m[0])&&T--);f=null!=m[0],g[0]||g.splice(0,1)}if(a==X){for(l=1,T=g[0];T>=10;T/=10,l++);P(y,o+(y.e=l+c*Q-1)+1,s,f)}else y.e=c,y.r=+f;return y}}(),a=/^(-?)0([xbo])(?=\w[\w.]*$)/i,u=/^([^.]+)\.$/,c=/^\.([^.]+)$/,l=/^-?(Infinity|NaN)$/,f=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(e,t,r,n){var i,o=r?t:t.replace(f,"");if(l.test(o))e.s=isNaN(o)?null:o<0?-1:1;else{if(!r&&(o=o.replace(a,(function(e,t,r){return i="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?e:t})),n&&(i=n,o=o.replace(u,"$1").replace(c,"0.$1")),t!=o))return new B(o,i);if(B.DEBUG)throw Error(Z+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},h.absoluteValue=h.abs=function(){var e=new B(this);return e.s<0&&(e.s=1),e},h.comparedTo=function(e,t){return se(this,new B(e,t))},h.decimalPlaces=h.dp=function(e,t){var r,n,i,o=this;if(null!=e)return ae(e,0,ne),null==t?t=y:ae(t,0,8),P(new B(o),e+o.e+1,t);if(!(r=o.c))return null;if(n=((i=r.length-1)-ie(this.e/Q))*Q,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},h.dividedBy=h.div=function(e,t){return r(this,new B(e,t),p,y)},h.dividedToIntegerBy=h.idiv=function(e,t){return r(this,new B(e,t),0,1)},h.exponentiatedBy=h.pow=function(e,t){var r,n,i,o,s,a,u,c,l=this;if((e=new B(e)).c&&!e.isInteger())throw Error(Z+"Exponent not an integer: "+C(e));if(null!=t&&(t=new B(t)),s=e.e>14,!l.c||!l.c[0]||1==l.c[0]&&!l.e&&1==l.c.length||!e.c||!e.c[0])return c=new B(Math.pow(+C(l),s?e.s*(2-ue(e)):+C(e))),t?c.mod(t):c;if(a=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new B(NaN);(n=!a&&l.isInteger()&&t.isInteger())&&(l=l.mod(t))}else{if(e.e>9&&(l.e>0||l.e<-1||(0==l.e?l.c[0]>1||s&&l.c[1]>=24e7:l.c[0]<8e13||s&&l.c[0]<=9999975e7)))return o=l.s<0&&ue(e)?-0:0,l.e>-1&&(o=1/o),new B(a?1/o:o);E&&(o=K(E/Q+2))}for(s?(r=new B(.5),a&&(e.s=1),u=ue(e)):u=(i=Math.abs(+C(e)))%2,c=new B(d);;){if(u){if(!(c=c.times(l)).c)break;o?c.c.length>o&&(c.c.length=o):n&&(c=c.mod(t))}if(i){if(0===(i=J(i/2)))break;u=i%2}else if(P(e=e.times(r),e.e+1,1),e.e>14)u=ue(e);else{if(0==(i=+C(e)))break;u=i%2}l=l.times(l),o?l.c&&l.c.length>o&&(l.c.length=o):n&&(l=l.mod(t))}return n?c:(a&&(c=d.div(c)),t?c.mod(t):o?P(c,E,y,void 0):c)},h.integerValue=function(e){var t=new B(this);return null==e?e=y:ae(e,0,8),P(t,t.e+1,e)},h.isEqualTo=h.eq=function(e,t){return 0===se(this,new B(e,t))},h.isFinite=function(){return!!this.c},h.isGreaterThan=h.gt=function(e,t){return se(this,new B(e,t))>0},h.isGreaterThanOrEqualTo=h.gte=function(e,t){return 1===(t=se(this,new B(e,t)))||0===t},h.isInteger=function(){return!!this.c&&ie(this.e/Q)>this.c.length-2},h.isLessThan=h.lt=function(e,t){return se(this,new B(e,t))<0},h.isLessThanOrEqualTo=h.lte=function(e,t){return-1===(t=se(this,new B(e,t)))||0===t},h.isNaN=function(){return!this.s},h.isNegative=function(){return this.s<0},h.isPositive=function(){return this.s>0},h.isZero=function(){return!!this.c&&0==this.c[0]},h.minus=function(e,t){var r,n,i,o,s=this,a=s.s;if(t=(e=new B(e,t)).s,!a||!t)return new B(NaN);if(a!=t)return e.s=-t,s.plus(e);var u=s.e/Q,c=e.e/Q,l=s.c,f=e.c;if(!u||!c){if(!l||!f)return l?(e.s=-t,e):new B(f?s:NaN);if(!l[0]||!f[0])return f[0]?(e.s=-t,e):new B(l[0]?s:3==y?-0:0)}if(u=ie(u),c=ie(c),l=l.slice(),a=u-c){for((o=a<0)?(a=-a,i=l):(c=u,i=f),i.reverse(),t=a;t--;i.push(0));i.reverse()}else for(n=(o=(a=l.length)<(t=f.length))?a:t,a=t=0;t<n;t++)if(l[t]!=f[t]){o=l[t]<f[t];break}if(o&&(i=l,l=f,f=i,e.s=-e.s),(t=(n=f.length)-(r=l.length))>0)for(;t--;l[r++]=0);for(t=X-1;n>a;){if(l[--n]<f[n]){for(r=n;r&&!l[--r];l[r]=t);--l[r],l[n]+=X}l[n]-=f[n]}for(;0==l[0];l.splice(0,1),--c);return l[0]?x(e,l,c):(e.s=3==y?-1:1,e.c=[e.e=0],e)},h.modulo=h.mod=function(e,t){var n,i,o=this;return e=new B(e,t),!o.c||!e.s||e.c&&!e.c[0]?new B(NaN):!e.c||o.c&&!o.c[0]?new B(o):(9==_?(i=e.s,e.s=1,n=r(o,e,0,3),e.s=i,n.s*=i):n=r(o,e,0,_),(e=o.minus(n.times(e))).c[0]||1!=_||(e.s=o.s),e)},h.multipliedBy=h.times=function(e,t){var r,n,i,o,s,a,u,c,l,f,h,d,p,y,g,m=this,b=m.c,w=(e=new B(e,t)).c;if(!(b&&w&&b[0]&&w[0]))return!m.s||!e.s||b&&!b[0]&&!w||w&&!w[0]&&!b?e.c=e.e=e.s=null:(e.s*=m.s,b&&w?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=ie(m.e/Q)+ie(e.e/Q),e.s*=m.s,(u=b.length)<(f=w.length)&&(p=b,b=w,w=p,i=u,u=f,f=i),i=u+f,p=[];i--;p.push(0));for(y=X,g=re,i=f;--i>=0;){for(r=0,h=w[i]%g,d=w[i]/g|0,o=i+(s=u);o>i;)r=((c=h*(c=b[--s]%g)+(a=d*c+(l=b[s]/g|0)*h)%g*g+p[o]+r)/y|0)+(a/g|0)+d*l,p[o--]=c%y;p[o]=r}return r?++n:p.splice(0,1),x(e,p,n)},h.negated=function(){var e=new B(this);return e.s=-e.s||null,e},h.plus=function(e,t){var r,n=this,i=n.s;if(t=(e=new B(e,t)).s,!i||!t)return new B(NaN);if(i!=t)return e.s=-t,n.minus(e);var o=n.e/Q,s=e.e/Q,a=n.c,u=e.c;if(!o||!s){if(!a||!u)return new B(i/0);if(!a[0]||!u[0])return u[0]?e:new B(a[0]?n:0*i)}if(o=ie(o),s=ie(s),a=a.slice(),i=o-s){for(i>0?(s=o,r=u):(i=-i,r=a),r.reverse();i--;r.push(0));r.reverse()}for((i=a.length)-(t=u.length)<0&&(r=u,u=a,a=r,t=i),i=0;t;)i=(a[--t]=a[t]+u[t]+i)/X|0,a[t]=X===a[t]?0:a[t]%X;return i&&(a=[i].concat(a),++s),x(e,a,s)},h.precision=h.sd=function(e,t){var r,n,i,o=this;if(null!=e&&e!==!!e)return ae(e,1,ne),null==t?t=y:ae(t,0,8),P(new B(o),e,t);if(!(r=o.c))return null;if(n=(i=r.length-1)*Q+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return e&&o.e+1>n&&(n=o.e+1),n},h.shiftedBy=function(e){return ae(e,-9007199254740991,ee),this.times("1e"+e)},h.squareRoot=h.sqrt=function(){var e,t,n,i,o,s=this,a=s.c,u=s.s,c=s.e,l=p+4,f=new B("0.5");if(1!==u||!a||!a[0])return new B(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);if(0==(u=Math.sqrt(+C(s)))||u==1/0?(((t=oe(a)).length+c)%2==0&&(t+="0"),u=Math.sqrt(+t),c=ie((c+1)/2)-(c<0||c%2),n=new B(t=u==1/0?"5e"+c:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+c)):n=new B(u+""),n.c[0])for((u=(c=n.e)+l)<3&&(u=0);;)if(o=n,n=f.times(o.plus(r(s,o,l,1))),oe(o.c).slice(0,u)===(t=oe(n.c)).slice(0,u)){if(n.e<c&&--u,"9999"!=(t=t.slice(u-3,u+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(P(n,n.e+p+2,1),e=!n.times(n).eq(s));break}if(!i&&(P(o,o.e+p+2,0),o.times(o).eq(s))){n=o;break}l+=4,u+=4,i=1}return P(n,n.e+p+1,y,e)},h.toExponential=function(e,t){return null!=e&&(ae(e,0,ne),e++),O(this,e,t,1)},h.toFixed=function(e,t){return null!=e&&(ae(e,0,ne),e=e+this.e+1),O(this,e,t)},h.toFormat=function(e,t,r){var n,i=this;if(null==r)null!=e&&t&&"object"==typeof t?(r=t,t=null):e&&"object"==typeof e?(r=e,e=t=null):r=A;else if("object"!=typeof r)throw Error(Z+"Argument not an object: "+r);if(n=i.toFixed(e,t),i.c){var o,s=n.split("."),a=+r.groupSize,u=+r.secondaryGroupSize,c=r.groupSeparator||"",l=s[0],f=s[1],h=i.s<0,d=h?l.slice(1):l,p=d.length;if(u&&(o=a,a=u,u=o,p-=o),a>0&&p>0){for(o=p%a||a,l=d.substr(0,o);o<p;o+=a)l+=c+d.substr(o,a);u>0&&(l+=c+d.slice(o)),h&&(l="-"+l)}n=f?l+(r.decimalSeparator||"")+((u=+r.fractionGroupSize)?f.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):f):l}return(r.prefix||"")+n+(r.suffix||"")},h.toFraction=function(e){var t,n,i,o,s,a,u,c,l,f,h,p,g=this,m=g.c;if(null!=e&&(!(u=new B(e)).isInteger()&&(u.c||1!==u.s)||u.lt(d)))throw Error(Z+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+C(u));if(!m)return new B(g);for(t=new B(d),l=n=new B(d),i=c=new B(d),p=oe(m),s=t.e=p.length-g.e-1,t.c[0]=te[(a=s%Q)<0?Q+a:a],e=!e||u.comparedTo(t)>0?s>0?t:l:u,a=w,w=1/0,u=new B(p),c.c[0]=0;f=r(u,t,0,1),1!=(o=n.plus(f.times(i))).comparedTo(e);)n=i,i=o,l=c.plus(f.times(o=l)),c=o,t=u.minus(f.times(o=t)),u=o;return o=r(e.minus(n),i,0,1),c=c.plus(o.times(l)),n=n.plus(o.times(i)),c.s=l.s=g.s,h=r(l,i,s*=2,y).minus(g).abs().comparedTo(r(c,n,s,y).minus(g).abs())<1?[l,i]:[c,n],w=a,h},h.toNumber=function(){return+C(this)},h.toPrecision=function(e,t){return null!=e&&ae(e,1,ne),O(this,e,t,2)},h.toString=function(e){var t,r=this,i=r.s,o=r.e;return null===o?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=o<=g||o>=m?ce(oe(r.c),o):le(oe(r.c),o,"0"):10===e&&T?t=le(oe((r=P(new B(r),p+o+1,y)).c),r.e,"0"):(ae(e,2,S.length,"Base"),t=n(le(oe(r.c),o,"0"),10,e,i,!0)),i<0&&r.c[0]&&(t="-"+t)),t},h.valueOf=h.toJSON=function(){return C(this)},h._isBigNumber=!0,h[Symbol.toStringTag]="BigNumber",h[Symbol.for("nodejs.util.inspect.custom")]=h.valueOf,null!=t&&B.set(t),B}(),r(7160),r(6635),r(8834).Buffer;class de extends c{constructor(e){let{config:r={},state:n={}}=e;super(),t(this,"defaultConfig",{}),t(this,"defaultState",{}),t(this,"disabled",!1),t(this,"name","BaseController"),t(this,"initialConfig",void 0),t(this,"initialState",void 0),t(this,"internalConfig",this.defaultConfig),t(this,"internalState",this.defaultState),this.initialState=n,this.initialConfig=r}get config(){return this.internalConfig}get state(){return this.internalState}configure(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(arguments.length>2&&void 0!==arguments[2]&&!arguments[2])for(const t in e)void 0!==this.internalConfig[t]&&(this.internalConfig[t]=e[t],this[t]=e[t]);else{this.internalConfig=t?e:Object.assign(this.internalConfig,e);for(const e in this.internalConfig)void 0!==this.internalConfig[e]&&(this[e]=this.internalConfig[e])}}update(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.internalState=he(t?{}:he({},this.internalState),e),this.emit("store",this.internalState)}initialize(){return this.internalState=this.defaultState,this.internalConfig=this.defaultConfig,this.configure(this.initialConfig),this.update(this.initialState),this}}const pe=()=>!0,ye=["newListener","removeListener"],ge=e=>!ye.includes(e);function me(e,t){let r=(t||{}).eventFilter||pe;if("string"==typeof r&&"skipInternal"===r&&(r=ge),"function"!=typeof r)throw new Error("createEventEmitterProxy - Invalid eventFilter");let n=e,i=e=>{const t=n;n=e,t.eventNames().filter(r).forEach((r=>{(function(e,t){return void 0!==e.rawListeners?e.rawListeners(t):e.listeners(t)})(t,r).forEach((t=>e.on(r,t)))})),t.removeAllListeners()};return new Proxy({},{get:(e,t)=>"setTarget"===t?i:n[t],set:(e,t,r)=>"setTarget"===t?(i=r,!0):(n[t]=r,!0)})}function be(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function we(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?be(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):be(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const ve=q()();function _e(e){const t=new c;return t.sendAsync=async t=>{const r=await e.handle(t);if(r.error){var n,i;const e=(0,a.Xy)(r.error,{fallbackError:{message:(null===(n=r.error)||void 0===n?void 0:n.message)||r.error.toString(),code:(null===(i=r.error)||void 0===i?void 0:i.code)||-32603}});throw a.Sy.rpc.internal(e)}return r.result},t.send=(t,r)=>{if("function"!=typeof r)throw new Error('Must provide callback to "send" method.');e.handle(t,r)},e.on&&e.on("notification",(e=>{t.emit("data",null,e)})),t.request=async e=>{const r=we(we({},e),{},{id:ve(),jsonrpc:"2.0"});return await t.sendAsync(r)},t}const Ee=["Gateway timeout","ETIMEDOUT","failed to parse response body","Failed to fetch"];function Ae(e){switch(e.status){case 405:throw a.Sy.rpc.methodNotFound();case 418:throw a.Sy.rpc.internal({message:"Request is being rate limited."});case 503:case 504:throw a.Sy.rpc.internal({message:"Gateway timeout. The request took too long to process.This can happen when querying over too wide a block range."})}}function Se(e){return new Promise((t=>{setTimeout(t,e)}))}function Te(e,t){if(200!==e.status)throw a.Sy.rpc.internal({message:`Non-200 status code: '${e.status}'`,data:t});if(t.error)throw a.Sy.rpc.internal({data:t.error});return t.result}var Be;function Oe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ne(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Oe(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}!function(e){e.approved="approved",e.cancelled="cancelled",e.confirmed="confirmed",e.failed="failed",e.finalized="finalized",e.processed="processed",e.rejected="rejected",e.signed="signed",e.submitted="submitted",e.unapproved="unapproved",e.dropped="dropped",e.expired="expired"}(Be||(Be={}));class xe extends de{constructor(e){let{config:r,state:n}=e;if(super({config:r,state:n}),t(this,"_providerEngineProxy",null),!r.chainConfig)throw O.invalidProviderConfigError("Please provide chainConfig");if(!r.chainConfig.chainId)throw O.invalidProviderConfigError("Please provide chainId inside chainConfig");if(!r.chainConfig.rpcTarget)throw O.invalidProviderConfigError("Please provide rpcTarget inside chainConfig");this.defaultState={chainId:"loading"},this.defaultConfig={chainConfig:r.chainConfig,networks:{[r.chainConfig.chainId]:r.chainConfig}},super.initialize()}get provider(){return this._providerEngineProxy}set provider(e){throw new Error("Method not implemented.")}addChain(e){if(!e.chainId)throw a.Sy.rpc.invalidParams("chainId is required");if(!e.rpcTarget)throw a.Sy.rpc.invalidParams("chainId is required");this.configure({networks:Ne(Ne({},this.config.networks),{},{[e.chainId]:e})})}getChainConfig(e){var t;const r=null===(t=this.config.networks)||void 0===t?void 0:t[e];if(!r)throw a.Sy.rpc.invalidRequest(`Chain ${e} is not supported, please add chainConfig for it`);return r}getProviderEngineProxy(){return this._providerEngineProxy}updateProviderEngineProxy(e){this._providerEngineProxy?this._providerEngineProxy.setTarget(e):this._providerEngineProxy=me(e)}}function Pe(e){return(t,r,n,i)=>"chainId"===t.method?(r.result=e,i()):n()}function Ce(e){return(t,r,n,i)=>"provider_config"===t.method?(r.result=e,i()):n()}function Ie(e){const{chainId:t,rpcTarget:r}=e,n=function(e){let{rpcTarget:t,originHttpHeaderKey:r}=e;return f((async(e,n,i)=>{const{fetchUrl:o,fetchParams:s}=function(e){let{req:t,rpcTarget:r,originHttpHeaderKey:n}=e;const i=new URL(r),o={id:t.id,jsonrpc:t.jsonrpc,method:t.method,params:t.params},s=t.origin,a={method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(o)};return n&&s&&(a.headers[n]=s),{fetchUrl:i.href,fetchParams:a}}({req:e,rpcTarget:t,originHttpHeaderKey:r});for(let e=0;e<5;e++){try{const e=await fetch(o,s);Ae(e);const t=await e.json(),r=Te(e,t);return void(n.result=r)}catch(e){const t=e.toString();if(!Ee.some((e=>t.includes(e))))throw e}await Se(1e3)}}))}({rpcTarget:r});return{networkMiddleware:function(e){const t=new d;return e.forEach((e=>t.push(e))),t.asMiddleware()}([Pe(t),Ce(e),n]),fetchMiddleware:n}}class Re extends xe{constructor(e){let{config:t,state:r}=e;super({config:t,state:r})}async setupProvider(){const{networkMiddleware:e}=Ie(this.config.chainConfig),t=new d;t.push(e);const r=_e(t);this.updateProviderEngineProxy(r)}async switchChain(e){if(!this._providerEngineProxy)throw a.Sy.provider.custom({message:"Provider is not initialized",code:4902});const t=this.getChainConfig(e.chainId);this.update({chainId:"loading"}),this.configure({chainConfig:t}),await this.setupProvider()}updateProviderEngineProxy(e){this._providerEngineProxy?this._providerEngineProxy.setTarget(e):this._providerEngineProxy=me(e)}getProviderEngineProxy(){return this._providerEngineProxy}lookupNetwork(){throw new Error("Method not implemented.")}}t(Re,"getProviderInstance",(async e=>{const t=new Re({config:{chainConfig:e.chainConfig}});return await t.setupProvider(),t}));class Le{constructor(){t(this,"_providerEngineProxy",null)}get provider(){return this._providerEngineProxy}set provider(e){throw new Error("Method not implemented.")}addChain(e){throw new Error("Method not implemented.")}async setupProvider(e){const t=this.getPrivKeyMiddleware(e),r=new d;r.push(t);const n=_e(r);this.updateProviderEngineProxy(n)}async switchChain(e){return Promise.resolve()}getProviderEngineProxy(){return this._providerEngineProxy}updateProviderEngineProxy(e){this._providerEngineProxy?this._providerEngineProxy.setTarget(e):this._providerEngineProxy=me(e)}getPrivKeyMiddleware(e){const t={getPrivatekey:async()=>e};return this.createPrivKeyMiddleware(t)}createPrivKeyMiddleware(e){let{getPrivatekey:t}=e;return r={private_key:f((async function(e,r){r.result=await t()}))},(e,t,n,i)=>{const o=r[e.method];return void 0===o?n():"function"==typeof o?o(e,t,n,i):(t.result=o,i())};var r}}function je(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ke(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?je(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):je(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t(Le,"getProviderInstance",(async e=>{const t=new Le;return await t.setupProvider(e.privKey),t})),q()();const Me="Web3Auth-cachedAdapter";class Ue extends c{constructor(e){var r,n,i,o;if(super(),t(this,"coreOptions",void 0),t(this,"connectedAdapterName",null),t(this,"status",U.NOT_READY),t(this,"cachedAdapter",null),t(this,"walletAdapters",{}),t(this,"commonJRPCProvider",null),t(this,"plugins",{}),t(this,"storage","localStorage"),!e.clientId)throw O.invalidParams("Please provide a valid clientId in constructor");if(e.enableLogging?D.enableAll():D.disableAll(),null===(r=e.chainConfig)||void 0===r||!r.chainNamespace||!Object.values(A).includes(null===(n=e.chainConfig)||void 0===n?void 0:n.chainNamespace))throw O.invalidParams("Please provide a valid chainNamespace in chainConfig");"session"===e.storageKey&&(this.storage="sessionStorage"),this.cachedAdapter=F(this.storage)?window[this.storage].getItem(Me):null,this.coreOptions=ke(ke({},e),{},{chainConfig:ke(ke({},T(null===(i=e.chainConfig)||void 0===i?void 0:i.chainNamespace,null===(o=e.chainConfig)||void 0===o?void 0:o.chainId)||{}),e.chainConfig)}),this.subscribeToAdapterEvents=this.subscribeToAdapterEvents.bind(this)}get connected(){return Boolean(this.connectedAdapterName)}get provider(){return this.status!==U.NOT_READY&&this.commonJRPCProvider?this.commonJRPCProvider.provider:null}set provider(e){throw new Error("Not implemented")}async init(){const e=Object.keys(this.walletAdapters).map((e=>{if(this.subscribeToAdapterEvents(this.walletAdapters[e]),this.walletAdapters[e].chainConfigProxy)this.walletAdapters[e].setAdapterSettings({sessionTime:this.coreOptions.sessionTime,clientId:this.coreOptions.clientId,web3AuthNetwork:this.coreOptions.web3AuthNetwork,useCoreKitKey:this.coreOptions.useCoreKitKey});else{const t=this.coreOptions.chainConfig;if(!t.chainNamespace)throw O.invalidParams("Please provide chainNamespace in chainConfig");this.walletAdapters[e].setAdapterSettings({chainConfig:t,sessionTime:this.coreOptions.sessionTime,clientId:this.coreOptions.clientId,web3AuthNetwork:this.coreOptions.web3AuthNetwork,useCoreKitKey:this.coreOptions.useCoreKitKey})}return this.walletAdapters[e].init({autoConnect:this.cachedAdapter===e}).catch((e=>D.error(e)))}));this.commonJRPCProvider=await Re.getProviderInstance({chainConfig:this.coreOptions.chainConfig}),this.status=U.READY,await Promise.all(e)}configureAdapter(e){this.checkInitRequirements();const t=this.coreOptions.chainConfig;if(!t.chainNamespace)throw O.invalidParams("Please provide chainNamespace in chainConfig");if(this.walletAdapters[e.name])throw O.duplicateAdapterError(`Wallet adapter for ${e.name} already exists`);if(e.adapterNamespace!==S&&e.adapterNamespace!==t.chainNamespace)throw O.incompatibleChainNameSpace(`This wallet adapter belongs to ${e.adapterNamespace} which is incompatible with currently used namespace: ${t.chainNamespace}`);if(e.name===j.WALLET_CONNECT_V2&&this.walletAdapters[j.WALLET_CONNECT_V1])throw O.invalidParams("Either one of wallet connect v2 or wallet connect v1 can be used, wallet connect v1 is already added to adapter lists.");if(e.name===j.WALLET_CONNECT_V1&&this.walletAdapters[j.WALLET_CONNECT_V2])throw O.invalidParams("Either one of wallet connect v2 or wallet connect v1 can be used, wallet connect v2 is already added to adapter lists.");return e.adapterNamespace===S&&e.currentChainNamespace&&t.chainNamespace!==e.currentChainNamespace&&e.setAdapterSettings({chainConfig:t}),this.walletAdapters[e.name]=e,this}clearCache(){F(this.storage)&&(window[this.storage].removeItem(Me),this.cachedAdapter=null)}async addChain(e){if(this.status===U.CONNECTED&&this.connectedAdapterName)return this.walletAdapters[this.connectedAdapterName].addChain(e);if(this.commonJRPCProvider)return this.commonJRPCProvider.addChain(e);throw O.notReady("No wallet is ready")}async switchChain(e){if(this.status===U.CONNECTED&&this.connectedAdapterName)return this.walletAdapters[this.connectedAdapterName].switchChain(e);if(this.commonJRPCProvider)return this.commonJRPCProvider.switchChain(e);throw O.notReady("No wallet is connected")}async connectTo(e,t){if(!this.walletAdapters[e]||!this.commonJRPCProvider)throw O.notFound(`Please add wallet adapter for ${e} wallet, before connecting`);const r=await this.walletAdapters[e].connect(t);return this.commonJRPCProvider.updateProviderEngineProxy(r),this.provider}async logout(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{cleanup:!1};if(this.status!==U.CONNECTED||!this.connectedAdapterName)throw N.notConnectedError("No wallet is connected");await this.walletAdapters[this.connectedAdapterName].disconnect(e)}async getUserInfo(){if(D.debug("Getting user info",this.status,this.connectedAdapterName),this.status!==U.CONNECTED||!this.connectedAdapterName)throw N.notConnectedError("No wallet is connected");return this.walletAdapters[this.connectedAdapterName].getUserInfo()}async authenticateUser(){if(this.status!==U.CONNECTED||!this.connectedAdapterName)throw N.notConnectedError("No wallet is connected");return this.walletAdapters[this.connectedAdapterName].authenticateUser()}async addPlugin(e){if(this.plugins[e.name])throw new Error(`Plugin ${e.name} already exist`);if(e.pluginNamespace!==H.MULTICHAIN&&e.pluginNamespace!==this.coreOptions.chainConfig.chainNamespace)throw new Error(`This plugin belongs to ${e.pluginNamespace} namespace which is incompatible with currently used namespace: ${this.coreOptions.chainConfig.chainNamespace}`);return this.plugins[e.name]=e,this}subscribeToAdapterEvents(e){e.on(z.CONNECTED,(async e=>{if(!this.commonJRPCProvider)throw O.notFound("CommonJrpcProvider not found");const{provider:t}=this.walletAdapters[e.adapter];this.commonJRPCProvider.updateProviderEngineProxy(t),this.status=U.CONNECTED,this.connectedAdapterName=e.adapter,this.cacheWallet(e.adapter),D.debug("connected",this.status,this.connectedAdapterName),Object.values(this.plugins).map((async t=>{try{if(!t.SUPPORTED_ADAPTERS.includes(e.adapter))return;await t.initWithWeb3Auth(this),await t.connect()}catch(e){if(5211===e.code)return;D.error(e)}})),this.emit(z.CONNECTED,ke({},e))})),e.on(z.DISCONNECTED,(async e=>{if(this.status=U.READY,F(this.storage)){const e=window[this.storage].getItem(Me);this.connectedAdapterName===e&&this.clearCache()}D.debug("disconnected",this.status,this.connectedAdapterName),await Promise.all(Object.values(this.plugins).map((e=>e.disconnect().catch((e=>{5211!==e.code&&D.error(e)}))))),this.connectedAdapterName=null,this.emit(z.DISCONNECTED,e)})),e.on(z.CONNECTING,(e=>{this.status=U.CONNECTING,this.emit(z.CONNECTING,e),D.debug("connecting",this.status,this.connectedAdapterName)})),e.on(z.ERRORED,(e=>{this.status=U.ERRORED,this.clearCache(),this.emit(z.ERRORED,e),D.debug("errored",this.status,this.connectedAdapterName)})),e.on(z.ADAPTER_DATA_UPDATED,(e=>{D.debug("adapter data updated",e),this.emit(z.ADAPTER_DATA_UPDATED,e)})),e.on(z.CACHE_CLEAR,(e=>{D.debug("adapter cache clear",e),F(this.storage)&&this.clearCache()}))}checkInitRequirements(){if(this.status===U.CONNECTING)throw O.notReady("Already pending connection");if(this.status===U.CONNECTED)throw O.notReady("Already connected");if(this.status===U.READY)throw O.notReady("Adapter is already initialized")}cacheWallet(e){F(this.storage)&&(window[this.storage].setItem(Me,e),this.cachedAdapter=e)}}})(),n})()));
3
3
  //# sourceMappingURL=noModal.umd.min.js.map