mirror of
https://github.com/status-im/js-waku-examples.git
synced 2025-02-27 22:20:47 +00:00
2 lines
1.7 MiB
2 lines
1.7 MiB
/*! For license information please see main.07090d62.js.LICENSE.txt */
|
|
(()=>{var __webpack_modules__={8101:(e,t,r)=>{"use strict";e.exports=r(1284)},1284:(e,t,r)=>{"use strict";var n=t;function i(){n.util._configure(),n.Writer._configure(n.BufferWriter),n.Reader._configure(n.BufferReader)}n.build="minimal",n.Writer=r(4876),n.BufferWriter=r(1632),n.Reader=r(3426),n.BufferReader=r(6162),n.util=r(3612),n.rpc=r(3377),n.roots=r(8801),n.configure=i,i()},3426:(e,t,r)=>{"use strict";e.exports=c;var n,i=r(3612),o=i.LongBits,s=i.utf8;function a(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function c(e){this.buf=e,this.pos=0,this.len=e.length}var l="undefined"!==typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new c(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new c(e);throw Error("illegal buffer")},u=function(){return i.Buffer?function(e){return(c.create=function(e){return i.Buffer.isBuffer(e)?new n(e):l(e)})(e)}:l};function h(){var e=new o(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw a(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw a(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function d(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function f(){if(this.pos+8>this.len)throw a(this,8);return new o(d(this.buf,this.pos+=4),d(this.buf,this.pos+=4))}c.create=u(),c.prototype._slice=i.Array.prototype.subarray||i.Array.prototype.slice,c.prototype.uint32=function(){var e=4294967295;return function(){if(e=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return e;if((this.pos+=5)>this.len)throw this.pos=this.len,a(this,10);return e}}(),c.prototype.int32=function(){return 0|this.uint32()},c.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},c.prototype.bool=function(){return 0!==this.uint32()},c.prototype.fixed32=function(){if(this.pos+4>this.len)throw a(this,4);return d(this.buf,this.pos+=4)},c.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return 0|d(this.buf,this.pos+=4)},c.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var e=i.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},c.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var e=i.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},c.prototype.bytes=function(){var e=this.uint32(),t=this.pos,r=this.pos+e;if(r>this.len)throw a(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(t,r):t===r?new this.buf.constructor(0):this._slice.call(this.buf,t,r)},c.prototype.string=function(){var e=this.bytes();return s.read(e,0,e.length)},c.prototype.skip=function(e){if("number"===typeof e){if(this.pos+e>this.len)throw a(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw a(this)}while(128&this.buf[this.pos++]);return this},c.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!==(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},c._configure=function(e){n=e,c.create=u(),n._configure();var t=i.Long?"toLong":"toNumber";i.merge(c.prototype,{int64:function(){return h.call(this)[t](!1)},uint64:function(){return h.call(this)[t](!0)},sint64:function(){return h.call(this).zzDecode()[t](!1)},fixed64:function(){return f.call(this)[t](!0)},sfixed64:function(){return f.call(this)[t](!1)}})}},6162:(e,t,r)=>{"use strict";e.exports=o;var n=r(3426);(o.prototype=Object.create(n.prototype)).constructor=o;var i=r(3612);function o(e){n.call(this,e)}o._configure=function(){i.Buffer&&(o.prototype._slice=i.Buffer.prototype.slice)},o.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},o._configure()},8801:e=>{"use strict";e.exports={}},3377:(e,t,r)=>{"use strict";t.Service=r(739)},739:(e,t,r)=>{"use strict";e.exports=i;var n=r(3612);function i(e,t,r){if("function"!==typeof e)throw TypeError("rpcImpl must be a function");n.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(r)}(i.prototype=Object.create(n.EventEmitter.prototype)).constructor=i,i.prototype.rpcCall=function e(t,r,i,o,s){if(!o)throw TypeError("request must be specified");var a=this;if(!s)return n.asPromise(e,a,t,r,i,o);if(a.rpcImpl)try{return a.rpcImpl(t,r[a.requestDelimited?"encodeDelimited":"encode"](o).finish(),(function(e,r){if(e)return a.emit("error",e,t),s(e);if(null!==r){if(!(r instanceof i))try{r=i[a.responseDelimited?"decodeDelimited":"decode"](r)}catch(e){return a.emit("error",e,t),s(e)}return a.emit("data",r,t),s(null,r)}a.end(!0)}))}catch(c){return a.emit("error",c,t),void setTimeout((function(){s(c)}),0)}else setTimeout((function(){s(Error("already ended"))}),0)},i.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},8029:(e,t,r)=>{"use strict";e.exports=i;var n=r(3612);function i(e,t){this.lo=e>>>0,this.hi=t>>>0}var o=i.zero=new i(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1};var s=i.zeroHash="\0\0\0\0\0\0\0\0";i.fromNumber=function(e){if(0===e)return o;var t=e<0;t&&(e=-e);var r=e>>>0,n=(e-r)/4294967296>>>0;return t&&(n=~n>>>0,r=~r>>>0,++r>4294967295&&(r=0,++n>4294967295&&(n=0))),new i(r,n)},i.from=function(e){if("number"===typeof e)return i.fromNumber(e);if(n.isString(e)){if(!n.Long)return i.fromNumber(parseInt(e,10));e=n.Long.fromString(e)}return e.low||e.high?new i(e.low>>>0,e.high>>>0):o},i.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,r=~this.hi>>>0;return t||(r=r+1>>>0),-(t+4294967296*r)}return this.lo+4294967296*this.hi},i.prototype.toLong=function(e){return n.Long?new n.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var a=String.prototype.charCodeAt;i.fromHash=function(e){return e===s?o:new i((a.call(e,0)|a.call(e,1)<<8|a.call(e,2)<<16|a.call(e,3)<<24)>>>0,(a.call(e,4)|a.call(e,5)<<8|a.call(e,6)<<16|a.call(e,7)<<24)>>>0)},i.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},i.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},i.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},i.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:r<128?9:10}},3612:function(e,t,r){"use strict";var n=t;function i(e,t,r){for(var n=Object.keys(t),i=0;i<n.length;++i)void 0!==e[n[i]]&&r||(e[n[i]]=t[n[i]]);return e}function o(e){function t(e,r){if(!(this instanceof t))return new t(e,r);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),r&&i(this,r)}return(t.prototype=Object.create(Error.prototype)).constructor=t,Object.defineProperty(t.prototype,"name",{get:function(){return e}}),t.prototype.toString=function(){return this.name+": "+this.message},t}n.asPromise=r(7223),n.base64=r(1938),n.EventEmitter=r(6597),n.float=r(2678),n.inquire=r(7640),n.utf8=r(2842),n.pool=r(110),n.LongBits=r(8029),n.isNode=Boolean("undefined"!==typeof r.g&&r.g&&r.g.process&&r.g.process.versions&&r.g.process.versions.node),n.global=n.isNode&&r.g||"undefined"!==typeof window&&window||"undefined"!==typeof self&&self||this,n.emptyArray=Object.freeze?Object.freeze([]):[],n.emptyObject=Object.freeze?Object.freeze({}):{},n.isInteger=Number.isInteger||function(e){return"number"===typeof e&&isFinite(e)&&Math.floor(e)===e},n.isString=function(e){return"string"===typeof e||e instanceof String},n.isObject=function(e){return e&&"object"===typeof e},n.isset=n.isSet=function(e,t){var r=e[t];return!(null==r||!e.hasOwnProperty(t))&&("object"!==typeof r||(Array.isArray(r)?r.length:Object.keys(r).length)>0)},n.Buffer=function(){try{var e=n.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(t){return null}}(),n._Buffer_from=null,n._Buffer_allocUnsafe=null,n.newBuffer=function(e){return"number"===typeof e?n.Buffer?n._Buffer_allocUnsafe(e):new n.Array(e):n.Buffer?n._Buffer_from(e):"undefined"===typeof Uint8Array?e:new Uint8Array(e)},n.Array="undefined"!==typeof Uint8Array?Uint8Array:Array,n.Long=n.global.dcodeIO&&n.global.dcodeIO.Long||n.global.Long||n.inquire("long"),n.key2Re=/^true|false|0|1$/,n.key32Re=/^-?(?:0|[1-9][0-9]*)$/,n.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,n.longToHash=function(e){return e?n.LongBits.from(e).toHash():n.LongBits.zeroHash},n.longFromHash=function(e,t){var r=n.LongBits.fromHash(e);return n.Long?n.Long.fromBits(r.lo,r.hi,t):r.toNumber(Boolean(t))},n.merge=i,n.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},n.newError=o,n.ProtocolError=o("ProtocolError"),n.oneOfGetter=function(e){for(var t={},r=0;r<e.length;++r)t[e[r]]=1;return function(){for(var e=Object.keys(this),r=e.length-1;r>-1;--r)if(1===t[e[r]]&&void 0!==this[e[r]]&&null!==this[e[r]])return e[r]}},n.oneOfSetter=function(e){return function(t){for(var r=0;r<e.length;++r)e[r]!==t&&delete this[e[r]]}},n.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},n._configure=function(){var e=n.Buffer;e?(n._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,r){return new e(t,r)},n._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}):n._Buffer_from=n._Buffer_allocUnsafe=null}},4876:(e,t,r)=>{"use strict";e.exports=h;var n,i=r(3612),o=i.LongBits,s=i.base64,a=i.utf8;function c(e,t,r){this.fn=e,this.len=t,this.next=void 0,this.val=r}function l(){}function u(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function h(){this.len=0,this.head=new c(l,0,0),this.tail=this.head,this.states=null}var d=function(){return i.Buffer?function(){return(h.create=function(){return new n})()}:function(){return new h}};function f(e,t,r){t[r]=255&e}function p(e,t){this.len=e,this.next=void 0,this.val=t}function g(e,t,r){for(;e.hi;)t[r++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[r++]=127&e.lo|128,e.lo=e.lo>>>7;t[r++]=e.lo}function m(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}h.create=d(),h.alloc=function(e){return new i.Array(e)},i.Array!==Array&&(h.alloc=i.pool(h.alloc,i.Array.prototype.subarray)),h.prototype._push=function(e,t,r){return this.tail=this.tail.next=new c(e,t,r),this.len+=t,this},p.prototype=Object.create(c.prototype),p.prototype.fn=function(e,t,r){for(;e>127;)t[r++]=127&e|128,e>>>=7;t[r]=e},h.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new p((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},h.prototype.int32=function(e){return e<0?this._push(g,10,o.fromNumber(e)):this.uint32(e)},h.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},h.prototype.uint64=function(e){var t=o.from(e);return this._push(g,t.length(),t)},h.prototype.int64=h.prototype.uint64,h.prototype.sint64=function(e){var t=o.from(e).zzEncode();return this._push(g,t.length(),t)},h.prototype.bool=function(e){return this._push(f,1,e?1:0)},h.prototype.fixed32=function(e){return this._push(m,4,e>>>0)},h.prototype.sfixed32=h.prototype.fixed32,h.prototype.fixed64=function(e){var t=o.from(e);return this._push(m,4,t.lo)._push(m,4,t.hi)},h.prototype.sfixed64=h.prototype.fixed64,h.prototype.float=function(e){return this._push(i.float.writeFloatLE,4,e)},h.prototype.double=function(e){return this._push(i.float.writeDoubleLE,8,e)};var y=i.Array.prototype.set?function(e,t,r){t.set(e,r)}:function(e,t,r){for(var n=0;n<e.length;++n)t[r+n]=e[n]};h.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this._push(f,1,0);if(i.isString(e)){var r=h.alloc(t=s.length(e));s.decode(e,r,0),e=r}return this.uint32(t)._push(y,t,e)},h.prototype.string=function(e){var t=a.length(e);return t?this.uint32(t)._push(a.write,t,e):this._push(f,1,0)},h.prototype.fork=function(){return this.states=new u(this),this.head=this.tail=new c(l,0,0),this.len=0,this},h.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new c(l,0,0),this.len=0),this},h.prototype.ldelim=function(){var e=this.head,t=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=e.next,this.tail=t,this.len+=r),this},h.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),r=0;e;)e.fn(e.val,t,r),r+=e.len,e=e.next;return t},h._configure=function(e){n=e,h.create=d(),n._configure()}},1632:(e,t,r)=>{"use strict";e.exports=o;var n=r(4876);(o.prototype=Object.create(n.prototype)).constructor=o;var i=r(3612);function o(){n.call(this)}function s(e,t,r){e.length<40?i.utf8.write(e,t,r):t.utf8Write?t.utf8Write(e,r):t.write(e,r)}o._configure=function(){o.alloc=i._Buffer_allocUnsafe,o.writeBytesBuffer=i.Buffer&&i.Buffer.prototype instanceof Uint8Array&&"set"===i.Buffer.prototype.set.name?function(e,t,r){t.set(e,r)}:function(e,t,r){if(e.copy)e.copy(t,r,0,e.length);else for(var n=0;n<e.length;)t[r++]=e[n++]}},o.prototype.bytes=function(e){i.isString(e)&&(e=i._Buffer_from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this._push(o.writeBytesBuffer,t,e),this},o.prototype.string=function(e){var t=i.Buffer.byteLength(e);return this.uint32(t),t&&this._push(s,t,e),this},o._configure()},8603:(e,t,r)=>{"use strict";r.r(t),r.d(t,{AbiCoder:()=>re,ConstructorFragment:()=>S,ErrorFragment:()=>k,EventFragment:()=>v,FormatTypes:()=>f,Fragment:()=>y,FunctionFragment:()=>_,Indexed:()=>ue,Interface:()=>fe,LogDescription:()=>ae,ParamType:()=>g,TransactionDescription:()=>ce,checkResultErrors:()=>N,defaultAbiCoder:()=>ne});var n=r(9560),i=r(4812),o=r(2735);const s="abi/5.7.0",a=new o.Logger(s),c={};let l={calldata:!0,memory:!0,storage:!0},u={calldata:!0,memory:!0};function h(e,t){if("bytes"===e||"string"===e){if(l[t])return!0}else if("address"===e){if("payable"===t)return!0}else if((e.indexOf("[")>=0||"tuple"===e)&&u[t])return!0;return(l[t]||"payable"===t)&&a.throwArgumentError("invalid modifier","name",t),!1}function d(e,t){for(let r in t)(0,i.defineReadOnly)(e,r,t[r])}const f=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),p=new RegExp(/^(.*)\[([0-9]*)\]$/);class g{constructor(e,t){e!==c&&a.throwError("use fromString",o.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),d(this,t);let r=this.type.match(p);d(this,r?{arrayLength:parseInt(r[2]||"-1"),arrayChildren:g.fromObject({type:r[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}format(e){if(e||(e=f.sighash),f[e]||a.throwArgumentError("invalid format type","format",e),e===f.json){let t={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"===typeof this.indexed&&(t.indexed=this.indexed),this.components&&(t.components=this.components.map((t=>JSON.parse(t.format(e))))),JSON.stringify(t)}let t="";return"array"===this.baseType?(t+=this.arrayChildren.format(e),t+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(e!==f.sighash&&(t+=this.type),t+="("+this.components.map((t=>t.format(e))).join(e===f.full?", ":",")+")"):t+=this.type,e!==f.sighash&&(!0===this.indexed&&(t+=" indexed"),e===f.full&&this.name&&(t+=" "+this.name)),t}static from(e,t){return"string"===typeof e?g.fromString(e,t):g.fromObject(e)}static fromObject(e){return g.isParamType(e)?e:new g(c,{name:e.name||null,type:C(e.type),indexed:null==e.indexed?null:!!e.indexed,components:e.components?e.components.map(g.fromObject):null})}static fromString(e,t){return r=function(e,t){let r=e;function n(t){a.throwArgumentError("unexpected character at position ".concat(t),"param",e)}function i(e){let r={type:"",name:"",parent:e,state:{allowType:!0}};return t&&(r.indexed=!1),r}e=e.replace(/\s/g," ");let o={type:"",name:"",state:{allowType:!0}},s=o;for(let a=0;a<e.length;a++){let r=e[a];switch(r){case"(":s.state.allowType&&""===s.type?s.type="tuple":s.state.allowParams||n(a),s.state.allowType=!1,s.type=C(s.type),s.components=[i(s)],s=s.components[0];break;case")":delete s.state,"indexed"===s.name&&(t||n(a),s.indexed=!0,s.name=""),h(s.type,s.name)&&(s.name=""),s.type=C(s.type);let e=s;s=s.parent,s||n(a),delete e.parent,s.state.allowParams=!1,s.state.allowName=!0,s.state.allowArray=!0;break;case",":delete s.state,"indexed"===s.name&&(t||n(a),s.indexed=!0,s.name=""),h(s.type,s.name)&&(s.name=""),s.type=C(s.type);let o=i(s.parent);s.parent.components.push(o),delete s.parent,s=o;break;case" ":s.state.allowType&&""!==s.type&&(s.type=C(s.type),delete s.state.allowType,s.state.allowName=!0,s.state.allowParams=!0),s.state.allowName&&""!==s.name&&("indexed"===s.name?(t||n(a),s.indexed&&n(a),s.indexed=!0,s.name=""):h(s.type,s.name)?s.name="":s.state.allowName=!1);break;case"[":s.state.allowArray||n(a),s.type+=r,s.state.allowArray=!1,s.state.allowName=!1,s.state.readArray=!0;break;case"]":s.state.readArray||n(a),s.type+=r,s.state.readArray=!1,s.state.allowArray=!0,s.state.allowName=!0;break;default:s.state.allowType?(s.type+=r,s.state.allowParams=!0,s.state.allowArray=!0):s.state.allowName?(s.name+=r,delete s.state.allowArray):s.state.readArray?s.type+=r:n(a)}}return s.parent&&a.throwArgumentError("unexpected eof","param",e),delete o.state,"indexed"===s.name?(t||n(r.length-7),s.indexed&&n(r.length-7),s.indexed=!0,s.name=""):h(s.type,s.name)&&(s.name=""),o.type=C(o.type),o}(e,!!t),g.fromObject({name:r.name,type:r.type,indexed:r.indexed,components:r.components});var r}static isParamType(e){return!(null==e||!e._isParamType)}}function m(e,t){return function(e){e=e.trim();let t=[],r="",n=0;for(let i=0;i<e.length;i++){let o=e[i];","===o&&0===n?(t.push(r),r=""):(r+=o,"("===o?n++:")"===o&&(n--,-1===n&&a.throwArgumentError("unbalanced parenthesis","value",e)))}r&&t.push(r);return t}(e).map((e=>g.fromString(e,t)))}class y{constructor(e,t){e!==c&&a.throwError("use a static from method",o.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),d(this,t),this._isFragment=!0,Object.freeze(this)}static from(e){return y.isFragment(e)?e:"string"===typeof e?y.fromString(e):y.fromObject(e)}static fromObject(e){if(y.isFragment(e))return e;switch(e.type){case"function":return _.fromObject(e);case"event":return v.fromObject(e);case"constructor":return S.fromObject(e);case"error":return k.fromObject(e);case"fallback":case"receive":return null}return a.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return"event"===(e=(e=(e=e.replace(/\s/g," ")).replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ")).trim()).split(" ")[0]?v.fromString(e.substring(5).trim()):"function"===e.split(" ")[0]?_.fromString(e.substring(8).trim()):"constructor"===e.split("(")[0].trim()?S.fromString(e.trim()):"error"===e.split(" ")[0]?k.fromString(e.substring(5).trim()):a.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!(!e||!e._isFragment)}}class v extends y{format(e){if(e||(e=f.sighash),f[e]||a.throwArgumentError("invalid format type","format",e),e===f.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});let t="";return e!==f.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map((t=>t.format(e))).join(e===f.full?", ":",")+") ",e!==f.sighash&&this.anonymous&&(t+="anonymous "),t.trim()}static from(e){return"string"===typeof e?v.fromString(e):v.fromObject(e)}static fromObject(e){if(v.isEventFragment(e))return e;"event"!==e.type&&a.throwArgumentError("invalid event object","value",e);const t={name:I(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(g.fromObject):[],type:"event"};return new v(c,t)}static fromString(e){let t=e.match(R);t||a.throwArgumentError("invalid event string","value",e);let r=!1;return t[3].split(" ").forEach((e=>{switch(e.trim()){case"anonymous":r=!0;break;case"":break;default:a.warn("unknown modifier: "+e)}})),v.fromObject({name:t[1].trim(),anonymous:r,inputs:m(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&"event"===e.type}}function b(e,t){t.gas=null;let r=e.split("@");return 1!==r.length?(r.length>2&&a.throwArgumentError("invalid human-readable ABI signature","value",e),r[1].match(/^[0-9]+$/)||a.throwArgumentError("invalid human-readable ABI signature gas","value",e),t.gas=n.O$.from(r[1]),r[0]):e}function w(e,t){t.constant=!1,t.payable=!1,t.stateMutability="nonpayable",e.split(" ").forEach((e=>{switch(e.trim()){case"constant":t.constant=!0;break;case"payable":t.payable=!0,t.stateMutability="payable";break;case"nonpayable":t.payable=!1,t.stateMutability="nonpayable";break;case"pure":t.constant=!0,t.stateMutability="pure";break;case"view":t.constant=!0,t.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+e)}}))}function E(e){let t={constant:!1,payable:!0,stateMutability:"payable"};return null!=e.stateMutability?(t.stateMutability=e.stateMutability,t.constant="view"===t.stateMutability||"pure"===t.stateMutability,null!=e.constant&&!!e.constant!==t.constant&&a.throwArgumentError("cannot have constant function with mutability "+t.stateMutability,"value",e),t.payable="payable"===t.stateMutability,null!=e.payable&&!!e.payable!==t.payable&&a.throwArgumentError("cannot have payable function with mutability "+t.stateMutability,"value",e)):null!=e.payable?(t.payable=!!e.payable,null!=e.constant||t.payable||"constructor"===e.type||a.throwArgumentError("unable to determine stateMutability","value",e),t.constant=!!e.constant,t.constant?t.stateMutability="view":t.stateMutability=t.payable?"payable":"nonpayable",t.payable&&t.constant&&a.throwArgumentError("cannot have constant payable function","value",e)):null!=e.constant?(t.constant=!!e.constant,t.payable=!t.constant,t.stateMutability=t.constant?"view":"payable"):"constructor"!==e.type&&a.throwArgumentError("unable to determine stateMutability","value",e),t}class S extends y{format(e){if(e||(e=f.sighash),f[e]||a.throwArgumentError("invalid format type","format",e),e===f.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});e===f.sighash&&a.throwError("cannot format a constructor for sighash",o.Logger.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let t="constructor("+this.inputs.map((t=>t.format(e))).join(e===f.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "),t.trim()}static from(e){return"string"===typeof e?S.fromString(e):S.fromObject(e)}static fromObject(e){if(S.isConstructorFragment(e))return e;"constructor"!==e.type&&a.throwArgumentError("invalid constructor object","value",e);let t=E(e);t.constant&&a.throwArgumentError("constructor cannot be constant","value",e);const r={name:null,type:e.type,inputs:e.inputs?e.inputs.map(g.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?n.O$.from(e.gas):null};return new S(c,r)}static fromString(e){let t={type:"constructor"},r=(e=b(e,t)).match(R);return r&&"constructor"===r[1].trim()||a.throwArgumentError("invalid constructor string","value",e),t.inputs=m(r[2].trim(),!1),w(r[3].trim(),t),S.fromObject(t)}static isConstructorFragment(e){return e&&e._isFragment&&"constructor"===e.type}}class _ extends S{format(e){if(e||(e=f.sighash),f[e]||a.throwArgumentError("invalid format type","format",e),e===f.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e)))),outputs:this.outputs.map((t=>JSON.parse(t.format(e))))});let t="";return e!==f.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map((t=>t.format(e))).join(e===f.full?", ":",")+") ",e!==f.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map((t=>t.format(e))).join(", ")+") "),null!=this.gas&&(t+="@"+this.gas.toString()+" ")),t.trim()}static from(e){return"string"===typeof e?_.fromString(e):_.fromObject(e)}static fromObject(e){if(_.isFunctionFragment(e))return e;"function"!==e.type&&a.throwArgumentError("invalid function object","value",e);let t=E(e);const r={type:e.type,name:I(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(g.fromObject):[],outputs:e.outputs?e.outputs.map(g.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?n.O$.from(e.gas):null};return new _(c,r)}static fromString(e){let t={type:"function"},r=(e=b(e,t)).split(" returns ");r.length>2&&a.throwArgumentError("invalid function string","value",e);let n=r[0].match(R);if(n||a.throwArgumentError("invalid function signature","value",e),t.name=n[1].trim(),t.name&&I(t.name),t.inputs=m(n[2],!1),w(n[3].trim(),t),r.length>1){let n=r[1].match(R);""==n[1].trim()&&""==n[3].trim()||a.throwArgumentError("unexpected tokens","value",e),t.outputs=m(n[2],!1)}else t.outputs=[];return _.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&"function"===e.type}}function A(e){const t=e.format();return"Error(string)"!==t&&"Panic(uint256)"!==t||a.throwArgumentError("cannot specify user defined ".concat(t," error"),"fragment",e),e}class k extends y{format(e){if(e||(e=f.sighash),f[e]||a.throwArgumentError("invalid format type","format",e),e===f.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});let t="";return e!==f.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map((t=>t.format(e))).join(e===f.full?", ":",")+") ",t.trim()}static from(e){return"string"===typeof e?k.fromString(e):k.fromObject(e)}static fromObject(e){if(k.isErrorFragment(e))return e;"error"!==e.type&&a.throwArgumentError("invalid error object","value",e);const t={type:e.type,name:I(e.name),inputs:e.inputs?e.inputs.map(g.fromObject):[]};return A(new k(c,t))}static fromString(e){let t={type:"error"},r=e.match(R);return r||a.throwArgumentError("invalid error signature","value",e),t.name=r[1].trim(),t.name&&I(t.name),t.inputs=m(r[2],!1),A(k.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&"error"===e.type}}function C(e){return e.match(/^uint($|[^1-9])/)?e="uint256"+e.substring(4):e.match(/^int($|[^1-9])/)&&(e="int256"+e.substring(3)),e}const x=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function I(e){return e&&e.match(x)||a.throwArgumentError('invalid identifier "'.concat(e,'"'),"value",e),e}const R=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");var P=r(2009);const T=new o.Logger(s);function N(e){const t=[],r=function(e,n){if(Array.isArray(n))for(let o in n){const s=e.slice();s.push(o);try{r(s,n[o])}catch(i){t.push({path:s,error:i})}}};return r([],e),t}class D{constructor(e,t,r,n){this.name=e,this.type=t,this.localName=r,this.dynamic=n}_throwError(e,t){T.throwArgumentError(e,this.localName,t)}}class O{constructor(e){(0,i.defineReadOnly)(this,"wordSize",e||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(e)}get data(){return(0,P.hexConcat)(this._data)}get length(){return this._dataLength}_writeData(e){return this._data.push(e),this._dataLength+=e.length,e.length}appendWriter(e){return this._writeData((0,P.concat)(e._data))}writeBytes(e){let t=(0,P.arrayify)(e);const r=t.length%this.wordSize;return r&&(t=(0,P.concat)([t,this._padding.slice(r)])),this._writeData(t)}_getValue(e){let t=(0,P.arrayify)(n.O$.from(e));return t.length>this.wordSize&&T.throwError("value out-of-bounds",o.Logger.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=(0,P.concat)([this._padding.slice(t.length%this.wordSize),t])),t}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){const e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,t=>{this._data[e]=this._getValue(t)}}}class M{constructor(e,t,r,n){(0,i.defineReadOnly)(this,"_data",(0,P.arrayify)(e)),(0,i.defineReadOnly)(this,"wordSize",t||32),(0,i.defineReadOnly)(this,"_coerceFunc",r),(0,i.defineReadOnly)(this,"allowLoose",n),this._offset=0}get data(){return(0,P.hexlify)(this._data)}get consumed(){return this._offset}static coerce(e,t){let r=e.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(t=t.toNumber()),t}coerce(e,t){return this._coerceFunc?this._coerceFunc(e,t):M.coerce(e,t)}_peekBytes(e,t,r){let n=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+n>this._data.length&&(this.allowLoose&&r&&this._offset+t<=this._data.length?n=t:T.throwError("data out-of-bounds",o.Logger.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}subReader(e){return new M(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,t){let r=this._peekBytes(0,e,!!t);return this._offset+=r.length,r.slice(0,e)}readValue(){return n.O$.from(this.readBytes(this.wordSize))}}var B=r(8552);class L extends D{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=(0,B.getAddress)(t)}catch(r){this._throwError(r.message,t)}return e.writeValue(t)}decode(e){return(0,B.getAddress)((0,P.hexZeroPad)(e.readValue().toHexString(),20))}}class U extends D{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}}const F=new o.Logger(s);function j(e,t,r){let n=null;if(Array.isArray(r))n=r;else if(r&&"object"===typeof r){let e={};n=t.map((t=>{const n=t.localName;return n||F.throwError("cannot encode object for signature with missing names",o.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),e[n]&&F.throwError("cannot encode object for signature with duplicate names",o.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),e[n]=!0,r[n]}))}else F.throwArgumentError("invalid tuple value","tuple",r);t.length!==n.length&&F.throwArgumentError("types/value length mismatch","tuple",r);let i=new O(e.wordSize),s=new O(e.wordSize),a=[];t.forEach(((e,t)=>{let r=n[t];if(e.dynamic){let t=s.length;e.encode(s,r);let n=i.writeUpdatableValue();a.push((e=>{n(e+t)}))}else e.encode(i,r)})),a.forEach((e=>{e(i.length)}));let c=e.appendWriter(i);return c+=e.appendWriter(s),c}function z(e,t){let r=[],n=e.subReader(0);t.forEach((t=>{let i=null;if(t.dynamic){let r=e.readValue(),a=n.subReader(r.toNumber());try{i=t.decode(a)}catch(s){if(s.code===o.Logger.errors.BUFFER_OVERRUN)throw s;i=s,i.baseType=t.name,i.name=t.localName,i.type=t.type}}else try{i=t.decode(e)}catch(s){if(s.code===o.Logger.errors.BUFFER_OVERRUN)throw s;i=s,i.baseType=t.name,i.name=t.localName,i.type=t.type}void 0!=i&&r.push(i)}));const i=t.reduce(((e,t)=>{const r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});t.forEach(((e,t)=>{let n=e.localName;if(!n||1!==i[n])return;if("length"===n&&(n="_length"),null!=r[n])return;const o=r[t];o instanceof Error?Object.defineProperty(r,n,{enumerable:!0,get:()=>{throw o}}):r[n]=o}));for(let o=0;o<r.length;o++){const e=r[o];e instanceof Error&&Object.defineProperty(r,o,{enumerable:!0,get:()=>{throw e}})}return Object.freeze(r)}class K extends D{constructor(e,t,r){super("array",e.type+"["+(t>=0?t:"")+"]",r,-1===t||e.dynamic),this.coder=e,this.length=t}defaultValue(){const e=this.coder.defaultValue(),t=[];for(let r=0;r<this.length;r++)t.push(e);return t}encode(e,t){Array.isArray(t)||this._throwError("expected array value",t);let r=this.length;-1===r&&(r=t.length,e.writeValue(t.length)),F.checkArgumentCount(t.length,r,"coder array"+(this.localName?" "+this.localName:""));let n=[];for(let i=0;i<t.length;i++)n.push(this.coder);return j(e,n,t)}decode(e){let t=this.length;-1===t&&(t=e.readValue().toNumber(),32*t>e._data.length&&F.throwError("insufficient data length",o.Logger.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let r=[];for(let n=0;n<t;n++)r.push(new U(this.coder));return e.coerce(this.name,z(e,r))}}class q extends D{constructor(e){super("bool","bool",e,!1)}defaultValue(){return!1}encode(e,t){return e.writeValue(t?1:0)}decode(e){return e.coerce(this.type,!e.readValue().isZero())}}class Z extends D{constructor(e,t){super(e,e,t,!0)}defaultValue(){return"0x"}encode(e,t){t=(0,P.arrayify)(t);let r=e.writeValue(t.length);return r+=e.writeBytes(t),r}decode(e){return e.readBytes(e.readValue().toNumber(),!0)}}class V extends Z{constructor(e){super("bytes",e)}decode(e){return e.coerce(this.name,(0,P.hexlify)(super.decode(e)))}}class H extends D{constructor(e,t){let r="bytes"+String(e);super(r,r,t,!1),this.size=e}defaultValue(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+2*this.size)}encode(e,t){let r=(0,P.arrayify)(t);return r.length!==this.size&&this._throwError("incorrect data length",t),e.writeBytes(r)}decode(e){return e.coerce(this.name,(0,P.hexlify)(e.readBytes(this.size)))}}class W extends D{constructor(e){super("null","",e,!1)}defaultValue(){return null}encode(e,t){return null!=t&&this._throwError("not null",t),e.writeBytes([])}decode(e){return e.readBytes(0),e.coerce(this.name,null)}}var G=r(6321);class Y extends D{constructor(e,t,r){const n=(t?"int":"uint")+8*e;super(n,n,r,!1),this.size=e,this.signed=t}defaultValue(){return 0}encode(e,t){let r=n.O$.from(t),i=G.Bz.mask(8*e.wordSize);if(this.signed){let e=i.mask(8*this.size-1);(r.gt(e)||r.lt(e.add(G.fh).mul(G.tL)))&&this._throwError("value out-of-bounds",t)}else(r.lt(G._Y)||r.gt(i.mask(8*this.size)))&&this._throwError("value out-of-bounds",t);return r=r.toTwos(8*this.size).mask(8*this.size),this.signed&&(r=r.fromTwos(8*this.size).toTwos(8*e.wordSize)),e.writeValue(r)}decode(e){let t=e.readValue().mask(8*this.size);return this.signed&&(t=t.fromTwos(8*this.size)),e.coerce(this.name,t)}}var Q=r(1953);class J extends Z{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,(0,Q.Y0)(t))}decode(e){return(0,Q.ZN)(super.decode(e))}}class X extends D{constructor(e,t){let r=!1;const n=[];e.forEach((e=>{e.dynamic&&(r=!0),n.push(e.type)}));super("tuple","tuple("+n.join(",")+")",t,r),this.coders=e}defaultValue(){const e=[];this.coders.forEach((t=>{e.push(t.defaultValue())}));const t=this.coders.reduce(((e,t)=>{const r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});return this.coders.forEach(((r,n)=>{let i=r.localName;i&&1===t[i]&&("length"===i&&(i="_length"),null==e[i]&&(e[i]=e[n]))})),Object.freeze(e)}encode(e,t){return j(e,this.coders,t)}decode(e){return e.coerce(this.name,z(e,this.coders))}}const $=new o.Logger(s),ee=new RegExp(/^bytes([0-9]*)$/),te=new RegExp(/^(u?int)([0-9]*)$/);class re{constructor(e){(0,i.defineReadOnly)(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new L(e.name);case"bool":return new q(e.name);case"string":return new J(e.name);case"bytes":return new V(e.name);case"array":return new K(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new X((e.components||[]).map((e=>this._getCoder(e))),e.name);case"":return new W(e.name)}let t=e.type.match(te);if(t){let r=parseInt(t[2]||"256");return(0===r||r>256||r%8!==0)&&$.throwArgumentError("invalid "+t[1]+" bit length","param",e),new Y(r/8,"int"===t[1],e.name)}if(t=e.type.match(ee),t){let r=parseInt(t[1]);return(0===r||r>32)&&$.throwArgumentError("invalid bytes length","param",e),new H(r,e.name)}return $.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,t){return new M(e,this._getWordSize(),this.coerceFunc,t)}_getWriter(){return new O(this._getWordSize())}getDefaultValue(e){const t=e.map((e=>this._getCoder(g.from(e))));return new X(t,"_").defaultValue()}encode(e,t){e.length!==t.length&&$.throwError("types/values length mismatch",o.Logger.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});const r=e.map((e=>this._getCoder(g.from(e)))),n=new X(r,"_"),i=this._getWriter();return n.encode(i,t),i.data}decode(e,t,r){const n=e.map((e=>this._getCoder(g.from(e))));return new X(n,"_").decode(this._getReader((0,P.arrayify)(t),r))}}const ne=new re;var ie=r(3358),oe=r(1291);const se=new o.Logger(s);class ae extends i.Description{}class ce extends i.Description{}class le extends i.Description{}class ue extends i.Description{static isIndexed(e){return!(!e||!e._isIndexed)}}const he={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function de(e,t){const r=new Error("deferred error during ABI decoding triggered accessing ".concat(e));return r.error=t,r}class fe{constructor(e){let t=[];t="string"===typeof e?JSON.parse(e):e,(0,i.defineReadOnly)(this,"fragments",t.map((e=>y.from(e))).filter((e=>null!=e))),(0,i.defineReadOnly)(this,"_abiCoder",(0,i.getStatic)(new.target,"getAbiCoder")()),(0,i.defineReadOnly)(this,"functions",{}),(0,i.defineReadOnly)(this,"errors",{}),(0,i.defineReadOnly)(this,"events",{}),(0,i.defineReadOnly)(this,"structs",{}),this.fragments.forEach((e=>{let t=null;switch(e.type){case"constructor":return this.deploy?void se.warn("duplicate definition - constructor"):void(0,i.defineReadOnly)(this,"deploy",e);case"function":t=this.functions;break;case"event":t=this.events;break;case"error":t=this.errors;break;default:return}let r=e.format();t[r]?se.warn("duplicate definition - "+r):t[r]=e})),this.deploy||(0,i.defineReadOnly)(this,"deploy",S.from({payable:!1,type:"constructor"})),(0,i.defineReadOnly)(this,"_isInterface",!0)}format(e){e||(e=f.full),e===f.sighash&&se.throwArgumentError("interface does not support formatting sighash","format",e);const t=this.fragments.map((t=>t.format(e)));return e===f.json?JSON.stringify(t.map((e=>JSON.parse(e)))):t}static getAbiCoder(){return ne}static getAddress(e){return(0,B.getAddress)(e)}static getSighash(e){return(0,P.hexDataSlice)((0,ie.id)(e.format()),0,4)}static getEventTopic(e){return(0,ie.id)(e.format())}getFunction(e){if((0,P.isHexString)(e)){for(const t in this.functions)if(e===this.getSighash(t))return this.functions[t];se.throwArgumentError("no matching function","sighash",e)}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.functions).filter((e=>e.split("(")[0]===t));return 0===r.length?se.throwArgumentError("no matching function","name",t):r.length>1&&se.throwArgumentError("multiple matching functions","name",t),this.functions[r[0]]}const t=this.functions[_.fromString(e).format()];return t||se.throwArgumentError("no matching function","signature",e),t}getEvent(e){if((0,P.isHexString)(e)){const t=e.toLowerCase();for(const e in this.events)if(t===this.getEventTopic(e))return this.events[e];se.throwArgumentError("no matching event","topichash",t)}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.events).filter((e=>e.split("(")[0]===t));return 0===r.length?se.throwArgumentError("no matching event","name",t):r.length>1&&se.throwArgumentError("multiple matching events","name",t),this.events[r[0]]}const t=this.events[v.fromString(e).format()];return t||se.throwArgumentError("no matching event","signature",e),t}getError(e){if((0,P.isHexString)(e)){const t=(0,i.getStatic)(this.constructor,"getSighash");for(const r in this.errors){if(e===t(this.errors[r]))return this.errors[r]}se.throwArgumentError("no matching error","sighash",e)}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.errors).filter((e=>e.split("(")[0]===t));return 0===r.length?se.throwArgumentError("no matching error","name",t):r.length>1&&se.throwArgumentError("multiple matching errors","name",t),this.errors[r[0]]}const t=this.errors[_.fromString(e).format()];return t||se.throwArgumentError("no matching error","signature",e),t}getSighash(e){if("string"===typeof e)try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch(r){throw t}}return(0,i.getStatic)(this.constructor,"getSighash")(e)}getEventTopic(e){return"string"===typeof e&&(e=this.getEvent(e)),(0,i.getStatic)(this.constructor,"getEventTopic")(e)}_decodeParams(e,t){return this._abiCoder.decode(e,t)}_encodeParams(e,t){return this._abiCoder.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){"string"===typeof e&&(e=this.getError(e));const r=(0,P.arrayify)(t);return(0,P.hexlify)(r.slice(0,4))!==this.getSighash(e)&&se.throwArgumentError("data signature does not match error ".concat(e.name,"."),"data",(0,P.hexlify)(r)),this._decodeParams(e.inputs,r.slice(4))}encodeErrorResult(e,t){return"string"===typeof e&&(e=this.getError(e)),(0,P.hexlify)((0,P.concat)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionData(e,t){"string"===typeof e&&(e=this.getFunction(e));const r=(0,P.arrayify)(t);return(0,P.hexlify)(r.slice(0,4))!==this.getSighash(e)&&se.throwArgumentError("data signature does not match function ".concat(e.name,"."),"data",(0,P.hexlify)(r)),this._decodeParams(e.inputs,r.slice(4))}encodeFunctionData(e,t){return"string"===typeof e&&(e=this.getFunction(e)),(0,P.hexlify)((0,P.concat)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionResult(e,t){"string"===typeof e&&(e=this.getFunction(e));let r=(0,P.arrayify)(t),n=null,i="",s=null,a=null,c=null;switch(r.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,r)}catch(l){}break;case 4:{const e=(0,P.hexlify)(r.slice(0,4)),t=he[e];if(t)s=this._abiCoder.decode(t.inputs,r.slice(4)),a=t.name,c=t.signature,t.reason&&(n=s[0]),"Error"===a?i="; VM Exception while processing transaction: reverted with reason string ".concat(JSON.stringify(s[0])):"Panic"===a&&(i="; VM Exception while processing transaction: reverted with panic code ".concat(s[0]));else try{const t=this.getError(e);s=this._abiCoder.decode(t.inputs,r.slice(4)),a=t.name,c=t.format()}catch(l){}break}}return se.throwError("call revert exception"+i,o.Logger.errors.CALL_EXCEPTION,{method:e.format(),data:(0,P.hexlify)(t),errorArgs:s,errorName:a,errorSignature:c,reason:n})}encodeFunctionResult(e,t){return"string"===typeof e&&(e=this.getFunction(e)),(0,P.hexlify)(this._abiCoder.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){"string"===typeof e&&(e=this.getEvent(e)),t.length>e.inputs.length&&se.throwError("too many arguments for "+e.format(),o.Logger.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let r=[];e.anonymous||r.push(this.getEventTopic(e));const i=(e,t)=>"string"===e.type?(0,ie.id)(t):"bytes"===e.type?(0,oe.keccak256)((0,P.hexlify)(t)):("bool"===e.type&&"boolean"===typeof t&&(t=t?"0x01":"0x00"),e.type.match(/^u?int/)&&(t=n.O$.from(t).toHexString()),"address"===e.type&&this._abiCoder.encode(["address"],[t]),(0,P.hexZeroPad)((0,P.hexlify)(t),32));for(t.forEach(((t,n)=>{let o=e.inputs[n];o.indexed?null==t?r.push(null):"array"===o.baseType||"tuple"===o.baseType?se.throwArgumentError("filtering with tuples or arrays not supported","contract."+o.name,t):Array.isArray(t)?r.push(t.map((e=>i(o,e)))):r.push(i(o,t)):null!=t&&se.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+o.name,t)}));r.length&&null===r[r.length-1];)r.pop();return r}encodeEventLog(e,t){"string"===typeof e&&(e=this.getEvent(e));const r=[],n=[],i=[];return e.anonymous||r.push(this.getEventTopic(e)),t.length!==e.inputs.length&&se.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach(((e,o)=>{const s=t[o];if(e.indexed)if("string"===e.type)r.push((0,ie.id)(s));else if("bytes"===e.type)r.push((0,oe.keccak256)(s));else{if("tuple"===e.baseType||"array"===e.baseType)throw new Error("not implemented");r.push(this._abiCoder.encode([e.type],[s]))}else n.push(e),i.push(s)})),{data:this._abiCoder.encode(n,i),topics:r}}decodeEventLog(e,t,r){if("string"===typeof e&&(e=this.getEvent(e)),null!=r&&!e.anonymous){let t=this.getEventTopic(e);(0,P.isHexString)(r[0],32)&&r[0].toLowerCase()===t||se.throwError("fragment/topic mismatch",o.Logger.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:t,value:r[0]}),r=r.slice(1)}let n=[],i=[],s=[];e.inputs.forEach(((e,t)=>{e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(n.push(g.fromObject({type:"bytes32",name:e.name})),s.push(!0)):(n.push(e),s.push(!1)):(i.push(e),s.push(!1))}));let a=null!=r?this._abiCoder.decode(n,(0,P.concat)(r)):null,c=this._abiCoder.decode(i,t,!0),l=[],u=0,h=0;e.inputs.forEach(((e,t)=>{if(e.indexed)if(null==a)l[t]=new ue({_isIndexed:!0,hash:null});else if(s[t])l[t]=new ue({_isIndexed:!0,hash:a[h++]});else try{l[t]=a[h++]}catch(r){l[t]=r}else try{l[t]=c[u++]}catch(r){l[t]=r}if(e.name&&null==l[e.name]){const r=l[t];r instanceof Error?Object.defineProperty(l,e.name,{enumerable:!0,get:()=>{throw de("property ".concat(JSON.stringify(e.name)),r)}}):l[e.name]=r}}));for(let o=0;o<l.length;o++){const e=l[o];e instanceof Error&&Object.defineProperty(l,o,{enumerable:!0,get:()=>{throw de("index ".concat(o),e)}})}return Object.freeze(l)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new ce({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:n.O$.from(e.value||"0")}):null}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new ae({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)})}parseError(e){const t=(0,P.hexlify)(e);let r=this.getError(t.substring(0,10).toLowerCase());return r?new le({args:this._abiCoder.decode(r.inputs,"0x"+t.substring(10)),errorFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r)}):null}static isInterface(e){return!(!e||!e._isInterface)}}},5157:(e,t,r)=>{"use strict";r.d(t,{Sg:()=>c,zt:()=>l});var n=r(9560),i=r(4812),o=r(2735);var s=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(t){o(t)}}function a(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};const a=new o.Logger("abstract-provider/5.7.0");class c extends i.Description{static isForkEvent(e){return!(!e||!e._isForkEvent)}}class l{constructor(){a.checkAbstract(new.target,l),(0,i.defineReadOnly)(this,"_isProvider",!0)}getFeeData(){return s(this,void 0,void 0,(function*(){const{block:e,gasPrice:t}=yield(0,i.resolveProperties)({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch((e=>null))});let r=null,o=null,s=null;return e&&e.baseFeePerGas&&(r=e.baseFeePerGas,s=n.O$.from("1500000000"),o=e.baseFeePerGas.mul(2).add(s)),{lastBaseFeePerGas:r,maxFeePerGas:o,maxPriorityFeePerGas:s,gasPrice:t}}))}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}static isProvider(e){return!(!e||!e._isProvider)}}},5340:(e,t,r)=>{"use strict";r.d(t,{E:()=>l});var n=r(4812),i=r(2735);var o=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(t){o(t)}}function a(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};const s=new i.Logger("abstract-signer/5.7.0"),a=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],c=[i.Logger.errors.INSUFFICIENT_FUNDS,i.Logger.errors.NONCE_EXPIRED,i.Logger.errors.REPLACEMENT_UNDERPRICED];class l{constructor(){s.checkAbstract(new.target,l),(0,n.defineReadOnly)(this,"_isSigner",!0)}getBalance(e){return o(this,void 0,void 0,(function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)}))}getTransactionCount(e){return o(this,void 0,void 0,(function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)}))}estimateGas(e){return o(this,void 0,void 0,(function*(){this._checkProvider("estimateGas");const t=yield(0,n.resolveProperties)(this.checkTransaction(e));return yield this.provider.estimateGas(t)}))}call(e,t){return o(this,void 0,void 0,(function*(){this._checkProvider("call");const r=yield(0,n.resolveProperties)(this.checkTransaction(e));return yield this.provider.call(r,t)}))}sendTransaction(e){return o(this,void 0,void 0,(function*(){this._checkProvider("sendTransaction");const t=yield this.populateTransaction(e),r=yield this.signTransaction(t);return yield this.provider.sendTransaction(r)}))}getChainId(){return o(this,void 0,void 0,(function*(){this._checkProvider("getChainId");return(yield this.provider.getNetwork()).chainId}))}getGasPrice(){return o(this,void 0,void 0,(function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()}))}getFeeData(){return o(this,void 0,void 0,(function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()}))}resolveName(e){return o(this,void 0,void 0,(function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)}))}checkTransaction(e){for(const r in e)-1===a.indexOf(r)&&s.throwArgumentError("invalid transaction key: "+r,"transaction",e);const t=(0,n.shallowCopy)(e);return null==t.from?t.from=this.getAddress():t.from=Promise.all([Promise.resolve(t.from),this.getAddress()]).then((t=>(t[0].toLowerCase()!==t[1].toLowerCase()&&s.throwArgumentError("from address mismatch","transaction",e),t[0]))),t}populateTransaction(e){return o(this,void 0,void 0,(function*(){const t=yield(0,n.resolveProperties)(this.checkTransaction(e));null!=t.to&&(t.to=Promise.resolve(t.to).then((e=>o(this,void 0,void 0,(function*(){if(null==e)return null;const t=yield this.resolveName(e);return null==t&&s.throwArgumentError("provided ENS name resolves to null","tx.to",e),t})))),t.to.catch((e=>{})));const r=null!=t.maxFeePerGas||null!=t.maxPriorityFeePerGas;if(null==t.gasPrice||2!==t.type&&!r?0!==t.type&&1!==t.type||!r||s.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e):s.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e),2!==t.type&&null!=t.type||null==t.maxFeePerGas||null==t.maxPriorityFeePerGas)if(0===t.type||1===t.type)null==t.gasPrice&&(t.gasPrice=this.getGasPrice());else{const e=yield this.getFeeData();if(null==t.type)if(null!=e.maxFeePerGas&&null!=e.maxPriorityFeePerGas)if(t.type=2,null!=t.gasPrice){const e=t.gasPrice;delete t.gasPrice,t.maxFeePerGas=e,t.maxPriorityFeePerGas=e}else null==t.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null==t.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas);else null!=e.gasPrice?(r&&s.throwError("network does not support EIP-1559",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),null==t.gasPrice&&(t.gasPrice=e.gasPrice),t.type=0):s.throwError("failed to get consistent fee data",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else 2===t.type&&(null==t.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null==t.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas))}else t.type=2;return null==t.nonce&&(t.nonce=this.getTransactionCount("pending")),null==t.gasLimit&&(t.gasLimit=this.estimateGas(t).catch((e=>{if(c.indexOf(e.code)>=0)throw e;return s.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",i.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,tx:t})}))),null==t.chainId?t.chainId=this.getChainId():t.chainId=Promise.all([Promise.resolve(t.chainId),this.getChainId()]).then((t=>(0!==t[1]&&t[0]!==t[1]&&s.throwArgumentError("chainId address mismatch","transaction",e),t[0]))),yield(0,n.resolveProperties)(t)}))}_checkProvider(e){this.provider||s.throwError("missing provider",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!(!e||!e._isSigner)}}},8552:(e,t,r)=>{"use strict";r.r(t),r.d(t,{getAddress:()=>f,getContractAddress:()=>m,getCreate2Address:()=>y,getIcapAddress:()=>g,isAddress:()=>p});var n=r(2009),i=r(9560),o=r(1291),s=r(807);const a=new(r(2735).Logger)("address/5.7.0");function c(e){(0,n.isHexString)(e,20)||a.throwArgumentError("invalid address","address",e);const t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40);for(let n=0;n<40;n++)r[n]=t[n].charCodeAt(0);const i=(0,n.arrayify)((0,o.keccak256)(r));for(let n=0;n<40;n+=2)i[n>>1]>>4>=8&&(t[n]=t[n].toUpperCase()),(15&i[n>>1])>=8&&(t[n+1]=t[n+1].toUpperCase());return"0x"+t.join("")}const l={};for(let v=0;v<10;v++)l[String(v)]=String(v);for(let v=0;v<26;v++)l[String.fromCharCode(65+v)]=String(10+v);const u=Math.floor((h=9007199254740991,Math.log10?Math.log10(h):Math.log(h)/Math.LN10));var h;function d(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((e=>l[e])).join("");for(;t.length>=u;){let e=t.substring(0,u);t=parseInt(e,10)%97+t.substring(e.length)}let r=String(98-parseInt(t,10)%97);for(;r.length<2;)r="0"+r;return r}function f(e){let t=null;if("string"!==typeof e&&a.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),t=c(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&a.throwArgumentError("bad address checksum","address",e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==d(e)&&a.throwArgumentError("bad icap checksum","address",e),t=(0,i.g$)(e.substring(4));t.length<40;)t="0"+t;t=c("0x"+t)}else a.throwArgumentError("invalid address","address",e);return t}function p(e){try{return f(e),!0}catch(t){}return!1}function g(e){let t=(0,i.t2)(f(e).substring(2)).toUpperCase();for(;t.length<30;)t="0"+t;return"XE"+d("XE00"+t)+t}function m(e){let t=null;try{t=f(e.from)}catch(c){a.throwArgumentError("missing from address","transaction",e)}const r=(0,n.stripZeros)((0,n.arrayify)(i.O$.from(e.nonce).toHexString()));return f((0,n.hexDataSlice)((0,o.keccak256)((0,s.encode)([t,r])),12))}function y(e,t,r){return 32!==(0,n.hexDataLength)(t)&&a.throwArgumentError("salt must be 32 bytes","salt",t),32!==(0,n.hexDataLength)(r)&&a.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),f((0,n.hexDataSlice)((0,o.keccak256)((0,n.concat)(["0xff",f(e),t,r])),12))}},8853:(e,t,r)=>{"use strict";r.d(t,{J:()=>i,c:()=>o});var n=r(2009);function i(e){e=atob(e);const t=[];for(let r=0;r<e.length;r++)t.push(e.charCodeAt(r));return(0,n.arrayify)(t)}function o(e){e=(0,n.arrayify)(e);let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}},9515:(e,t,r)=>{"use strict";r.r(t),r.d(t,{decode:()=>n.J,encode:()=>n.c});var n=r(8853)},4247:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Base32:()=>s,Base58:()=>a,BaseX:()=>o});var n=r(2009),i=r(4812);class o{constructor(e){(0,i.defineReadOnly)(this,"alphabet",e),(0,i.defineReadOnly)(this,"base",e.length),(0,i.defineReadOnly)(this,"_alphabetMap",{}),(0,i.defineReadOnly)(this,"_leader",e.charAt(0));for(let t=0;t<e.length;t++)this._alphabetMap[e.charAt(t)]=t}encode(e){let t=(0,n.arrayify)(e);if(0===t.length)return"";let r=[0];for(let n=0;n<t.length;++n){let e=t[n];for(let t=0;t<r.length;++t)e+=r[t]<<8,r[t]=e%this.base,e=e/this.base|0;for(;e>0;)r.push(e%this.base),e=e/this.base|0}let i="";for(let n=0;0===t[n]&&n<t.length-1;++n)i+=this._leader;for(let n=r.length-1;n>=0;--n)i+=this.alphabet[r[n]];return i}decode(e){if("string"!==typeof e)throw new TypeError("Expected String");let t=[];if(0===e.length)return new Uint8Array(t);t.push(0);for(let r=0;r<e.length;r++){let n=this._alphabetMap[e[r]];if(void 0===n)throw new Error("Non-base"+this.base+" character");let i=n;for(let e=0;e<t.length;++e)i+=t[e]*this.base,t[e]=255&i,i>>=8;for(;i>0;)t.push(255&i),i>>=8}for(let r=0;e[r]===this._leader&&r<e.length-1;++r)t.push(0);return(0,n.arrayify)(new Uint8Array(t.reverse()))}}const s=new o("abcdefghijklmnopqrstuvwxyz234567"),a=new o("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},4227:(e,t,r)=>{"use strict";r.d(t,{i:()=>n});const n="bignumber/5.7.0"},9560:(e,t,r)=>{"use strict";r.d(t,{O$:()=>p,Zm:()=>d,g$:()=>b,t2:()=>w});var n=r(4166),i=r.n(n),o=r(2009),s=r(2735),a=r(4227),c=i().BN;const l=new s.Logger(a.i),u={},h=9007199254740991;function d(e){return null!=e&&(p.isBigNumber(e)||"number"===typeof e&&e%1===0||"string"===typeof e&&!!e.match(/^-?[0-9]+$/)||(0,o.isHexString)(e)||"bigint"===typeof e||(0,o.isBytes)(e))}let f=!1;class p{constructor(e,t){e!==u&&l.throwError("cannot call constructor directly; use BigNumber.from",s.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return m(y(this).fromTwos(e))}toTwos(e){return m(y(this).toTwos(e))}abs(){return"-"===this._hex[0]?p.from(this._hex.substring(1)):this}add(e){return m(y(this).add(y(e)))}sub(e){return m(y(this).sub(y(e)))}div(e){return p.from(e).isZero()&&v("division-by-zero","div"),m(y(this).div(y(e)))}mul(e){return m(y(this).mul(y(e)))}mod(e){const t=y(e);return t.isNeg()&&v("division-by-zero","mod"),m(y(this).umod(t))}pow(e){const t=y(e);return t.isNeg()&&v("negative-power","pow"),m(y(this).pow(t))}and(e){const t=y(e);return(this.isNegative()||t.isNeg())&&v("unbound-bitwise-result","and"),m(y(this).and(t))}or(e){const t=y(e);return(this.isNegative()||t.isNeg())&&v("unbound-bitwise-result","or"),m(y(this).or(t))}xor(e){const t=y(e);return(this.isNegative()||t.isNeg())&&v("unbound-bitwise-result","xor"),m(y(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&v("negative-width","mask"),m(y(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&v("negative-width","shl"),m(y(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&v("negative-width","shr"),m(y(this).shrn(e))}eq(e){return y(this).eq(y(e))}lt(e){return y(this).lt(y(e))}lte(e){return y(this).lte(y(e))}gt(e){return y(this).gt(y(e))}gte(e){return y(this).gte(y(e))}isNegative(){return"-"===this._hex[0]}isZero(){return y(this).isZero()}toNumber(){try{return y(this).toNumber()}catch(e){v("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(e){}return l.throwError("this platform does not support BigInt",s.Logger.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?f||(f=!0,l.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?l.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",s.Logger.errors.UNEXPECTED_ARGUMENT,{}):l.throwError("BigNumber.toString does not accept parameters",s.Logger.errors.UNEXPECTED_ARGUMENT,{})),y(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof p)return e;if("string"===typeof e)return e.match(/^-?0x[0-9a-f]+$/i)?new p(u,g(e)):e.match(/^-?[0-9]+$/)?new p(u,g(new c(e))):l.throwArgumentError("invalid BigNumber string","value",e);if("number"===typeof e)return e%1&&v("underflow","BigNumber.from",e),(e>=h||e<=-h)&&v("overflow","BigNumber.from",e),p.from(String(e));const t=e;if("bigint"===typeof t)return p.from(t.toString());if((0,o.isBytes)(t))return p.from((0,o.hexlify)(t));if(t)if(t.toHexString){const e=t.toHexString();if("string"===typeof e)return p.from(e)}else{let e=t._hex;if(null==e&&"BigNumber"===t.type&&(e=t.hex),"string"===typeof e&&((0,o.isHexString)(e)||"-"===e[0]&&(0,o.isHexString)(e.substring(1))))return p.from(e)}return l.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!(!e||!e._isBigNumber)}}function g(e){if("string"!==typeof e)return g(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&l.throwArgumentError("invalid hex","value",e),"0x00"===(e=g(e))?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&"0x00"===e.substring(0,4);)e="0x"+e.substring(4);return e}function m(e){return p.from(g(e))}function y(e){const t=p.from(e).toHexString();return"-"===t[0]?new c("-"+t.substring(3),16):new c(t.substring(2),16)}function v(e,t,r){const n={fault:e,operation:t};return null!=r&&(n.value=r),l.throwError(e,s.Logger.errors.NUMERIC_FAULT,n)}function b(e){return new c(e,36).toString(16)}function w(e){return new c(e,16).toString(36)}},2009:(e,t,r)=>{"use strict";r.r(t),r.d(t,{arrayify:()=>l,concat:()=>u,hexConcat:()=>v,hexDataLength:()=>m,hexDataSlice:()=>y,hexStripZeros:()=>w,hexValue:()=>b,hexZeroPad:()=>E,hexlify:()=>g,isBytes:()=>c,isBytesLike:()=>s,isHexString:()=>f,joinSignature:()=>_,splitSignature:()=>S,stripZeros:()=>h,zeroPad:()=>d});const n=new(r(2735).Logger)("bytes/5.7.0");function i(e){return!!e.toHexString}function o(e){return e.slice||(e.slice=function(){const t=Array.prototype.slice.call(arguments);return o(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function s(e){return f(e)&&!(e.length%2)||c(e)}function a(e){return"number"===typeof e&&e==e&&e%1===0}function c(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;if("string"===typeof e)return!1;if(!a(e.length)||e.length<0)return!1;for(let t=0;t<e.length;t++){const r=e[t];if(!a(r)||r<0||r>=256)return!1}return!0}function l(e,t){if(t||(t={}),"number"===typeof e){n.checkSafeUint53(e,"invalid arrayify value");const t=[];for(;e;)t.unshift(255&e),e=parseInt(String(e/256));return 0===t.length&&t.push(0),o(new Uint8Array(t))}if(t.allowMissingPrefix&&"string"===typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),i(e)&&(e=e.toHexString()),f(e)){let r=e.substring(2);r.length%2&&("left"===t.hexPad?r="0"+r:"right"===t.hexPad?r+="0":n.throwArgumentError("hex data is odd-length","value",e));const i=[];for(let e=0;e<r.length;e+=2)i.push(parseInt(r.substring(e,e+2),16));return o(new Uint8Array(i))}return c(e)?o(new Uint8Array(e)):n.throwArgumentError("invalid arrayify value","value",e)}function u(e){const t=e.map((e=>l(e))),r=t.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(r);return t.reduce(((e,t)=>(n.set(t,e),e+t.length)),0),o(n)}function h(e){let t=l(e);if(0===t.length)return t;let r=0;for(;r<t.length&&0===t[r];)r++;return r&&(t=t.slice(r)),t}function d(e,t){(e=l(e)).length>t&&n.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(t);return r.set(e,t-e.length),o(r)}function f(e,t){return!("string"!==typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(!t||e.length===2+2*t)}const p="0123456789abcdef";function g(e,t){if(t||(t={}),"number"===typeof e){n.checkSafeUint53(e,"invalid hexlify value");let t="";for(;e;)t=p[15&e]+t,e=Math.floor(e/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if("bigint"===typeof e)return(e=e.toString(16)).length%2?"0x0"+e:"0x"+e;if(t.allowMissingPrefix&&"string"===typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),i(e))return e.toHexString();if(f(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":n.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(c(e)){let t="0x";for(let r=0;r<e.length;r++){let n=e[r];t+=p[(240&n)>>4]+p[15&n]}return t}return n.throwArgumentError("invalid hexlify value","value",e)}function m(e){if("string"!==typeof e)e=g(e);else if(!f(e)||e.length%2)return null;return(e.length-2)/2}function y(e,t,r){return"string"!==typeof e?e=g(e):(!f(e)||e.length%2)&&n.throwArgumentError("invalid hexData","value",e),t=2+2*t,null!=r?"0x"+e.substring(t,2+2*r):"0x"+e.substring(t)}function v(e){let t="0x";return e.forEach((e=>{t+=g(e).substring(2)})),t}function b(e){const t=w(g(e,{hexPad:"left"}));return"0x"===t?"0x0":t}function w(e){"string"!==typeof e&&(e=g(e)),f(e)||n.throwArgumentError("invalid hex string","value",e),e=e.substring(2);let t=0;for(;t<e.length&&"0"===e[t];)t++;return"0x"+e.substring(t)}function E(e,t){for("string"!==typeof e?e=g(e):f(e)||n.throwArgumentError("invalid hex string","value",e),e.length>2*t+2&&n.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}function S(e){const t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(s(e)){let r=l(e);64===r.length?(t.v=27+(r[32]>>7),r[32]&=127,t.r=g(r.slice(0,32)),t.s=g(r.slice(32,64))):65===r.length?(t.r=g(r.slice(0,32)),t.s=g(r.slice(32,64)),t.v=r[64]):n.throwArgumentError("invalid signature string","signature",e),t.v<27&&(0===t.v||1===t.v?t.v+=27:n.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(r[32]|=128),t._vs=g(r.slice(32,64))}else{if(t.r=e.r,t.s=e.s,t.v=e.v,t.recoveryParam=e.recoveryParam,t._vs=e._vs,null!=t._vs){const r=d(l(t._vs),32);t._vs=g(r);const i=r[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=i:t.recoveryParam!==i&&n.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),r[0]&=127;const o=g(r);null==t.s?t.s=o:t.s!==o&&n.throwArgumentError("signature v mismatch _vs","signature",e)}if(null==t.recoveryParam)null==t.v?n.throwArgumentError("signature missing v and recoveryParam","signature",e):0===t.v||1===t.v?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2;else if(null==t.v)t.v=27+t.recoveryParam;else{const r=0===t.v||1===t.v?t.v:1-t.v%2;t.recoveryParam!==r&&n.throwArgumentError("signature recoveryParam mismatch v","signature",e)}null!=t.r&&f(t.r)?t.r=E(t.r,32):n.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&f(t.s)?t.s=E(t.s,32):n.throwArgumentError("signature missing or invalid s","signature",e);const r=l(t.s);r[0]>=128&&n.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(r[0]|=128);const i=g(r);t._vs&&(f(t._vs)||n.throwArgumentError("signature invalid _vs","signature",e),t._vs=E(t._vs,32)),null==t._vs?t._vs=i:t._vs!==i&&n.throwArgumentError("signature _vs mismatch v and s","signature",e)}return t.yParityAndS=t._vs,t.compact=t.r+t.yParityAndS.substring(2),t}function _(e){return g(u([(e=S(e)).r,e.s,e.recoveryParam?"0x1c":"0x1b"]))}},6321:(e,t,r)=>{"use strict";r.d(t,{Bz:()=>a,_Y:()=>o,fh:()=>s,tL:()=>i});var n=r(9560);const i=n.O$.from(-1),o=n.O$.from(0),s=n.O$.from(1),a=n.O$.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")},4160:(e,t,r)=>{"use strict";r.d(t,{R:()=>n});const n="0x0000000000000000000000000000000000000000000000000000000000000000"},2069:(e,t,r)=>{"use strict";r.d(t,{i:()=>n});const n="hash/5.7.0"},3358:(e,t,r)=>{"use strict";r.d(t,{id:()=>o});var n=r(1291),i=r(1953);function o(e){return(0,n.keccak256)((0,i.Y0)(e))}},5843:(e,t,r)=>{"use strict";r.r(t),r.d(t,{_TypedDataEncoder:()=>s.E,dnsEncode:()=>i.Kn,ensNormalize:()=>i.w3,hashMessage:()=>o.r,id:()=>n.id,isValidName:()=>i.r1,messagePrefix:()=>o.B,namehash:()=>i.VM});var n=r(3358),i=r(8565),o=r(8836),s=r(6454)},8836:(e,t,r)=>{"use strict";r.d(t,{B:()=>s,r:()=>a});var n=r(2009),i=r(1291),o=r(1953);const s="\x19Ethereum Signed Message:\n";function a(e){return"string"===typeof e&&(e=(0,o.Y0)(e)),(0,i.keccak256)((0,n.concat)([(0,o.Y0)(s),(0,o.Y0)(String(e.length)),e]))}},8565:(e,t,r)=>{"use strict";r.d(t,{Kn:()=>O,w3:()=>T,r1:()=>N,VM:()=>D});var n=r(2009),i=r(1953),o=r(1291),s=r(2735),a=r(2069);function c(e,t){null==t&&(t=1);const r=[],n=r.forEach,i=function(e,t){n.call(e,(function(e){t>0&&Array.isArray(e)?i(e,t-1):r.push(e)}))};return i(e,t),r}function l(e){return function(e){let t=0;return()=>e[t++]}(function(e){let t=0;function r(){return e[t++]<<8|e[t++]}let n=r(),i=1,o=[0,1];for(let w=1;w<n;w++)o.push(i+=r());let s=r(),a=t;t+=s;let c=0,l=0;function u(){return 0==c&&(l=l<<8|e[t++],c=8),l>>--c&1}const h=Math.pow(2,31),d=h>>>1,f=d>>1,p=h-1;let g=0;for(let w=0;w<31;w++)g=g<<1|u();let m=[],y=0,v=h;for(;;){let e=Math.floor(((g-y+1)*i-1)/v),t=0,r=n;for(;r-t>1;){let n=t+r>>>1;e<o[n]?r=n:t=n}if(0==t)break;m.push(t);let s=y+Math.floor(v*o[t]/i),a=y+Math.floor(v*o[t+1]/i)-1;for(;0==((s^a)&d);)g=g<<1&p|u(),s=s<<1&p,a=a<<1&p|1;for(;s&~a&f;)g=g&d|g<<1&p>>>1|u(),s=s<<1^d,a=(a^d)<<1|d|1;y=s,v=1+a-s}let b=n-4;return m.map((t=>{switch(t-b){case 3:return b+65792+(e[a++]<<16|e[a++]<<8|e[a++]);case 2:return b+256+(e[a++]<<8|e[a++]);case 1:return b+e[a++];default:return t-1}}))}(e))}function u(e){return 1&e?~e>>1:e>>1}function h(e,t){let r=Array(e);for(let n=0,i=-1;n<e;n++)r[n]=i+=1+t();return r}function d(e,t){let r=Array(e);for(let n=0,i=0;n<e;n++)r[n]=i+=u(t());return r}function f(e,t){let r=h(e(),e),n=e(),i=h(n,e),o=function(e,t){let r=Array(e);for(let n=0;n<e;n++)r[n]=1+t();return r}(n,e);for(let s=0;s<n;s++)for(let e=0;e<o[s];e++)r.push(i[s]+e);return t?r.map((e=>t[e])):r}function p(e,t,r){let n=Array(e).fill(void 0).map((()=>[]));for(let i=0;i<t;i++)d(e,r).forEach(((e,t)=>n[t].push(e)));return n}function g(e,t){let r=1+t(),n=t(),i=function(e){let t=[];for(;;){let r=e();if(0==r)break;t.push(r)}return t}(t);return c(p(i.length,1+e,t).map(((e,t)=>{const o=e[0],s=e.slice(1);return Array(i[t]).fill(void 0).map(((e,t)=>{let i=t*n;return[o+t*r,s.map((e=>e+i))]}))})))}function m(e,t){return p(1+t(),1+e,t).map((e=>[e[0],e.slice(1)]))}const y=l((0,r(8853).J)("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA==")),v=new Set(f(y)),b=new Set(f(y)),w=function(e){let t=[];for(;;){let r=e();if(0==r)break;t.push(g(r,e))}for(;;){let r=e()-1;if(r<0)break;t.push(m(r,e))}return function(e){const t={};for(let r=0;r<e.length;r++){const n=e[r];t[n[0]]=n[1]}return t}(c(t))}(y),E=function(e){let t=f(e).sort(((e,t)=>e-t));return function r(){let n=[];for(;;){let i=f(e,t);if(0==i.length)break;n.push({set:new Set(i),node:r()})}n.sort(((e,t)=>t.set.size-e.set.size));let i=e(),o=i%3;i=i/3|0;let s=!!(1&i);return i>>=1,{branches:n,valid:o,fe0f:s,save:1==i,check:2==i}}()}(y);function S(e){return(0,i.XL)(e)}function _(e){return e.filter((e=>65039!=e))}function A(e){for(let r of e.split(".")){let e=S(r);try{for(let t=e.lastIndexOf(95)-1;t>=0;t--)if(95!==e[t])throw new Error("underscore only allowed at start");if(e.length>=4&&e.every((e=>e<128))&&45===e[2]&&45===e[3])throw new Error("invalid label extension")}catch(t){throw new Error('Invalid label "'.concat(r,'": ').concat(t.message))}}return e}function k(e){return A(function(e,t){let r=S(e).reverse(),n=[];for(;r.length;){let e=C(r);if(e){n.push(...t(e));continue}let i=r.pop();if(v.has(i)){n.push(i);continue}if(b.has(i))continue;let o=w[i];if(!o)throw new Error("Disallowed codepoint: 0x".concat(i.toString(16).toUpperCase()));n.push(...o)}return A((i=String.fromCodePoint(...n),i.normalize("NFC")));var i}(e,_))}function C(e,t){var r;let n,i,o=E,s=[],a=e.length;for(t&&(t.length=0);a;){let c=e[--a];if(o=null===(r=o.branches.find((e=>e.set.has(c))))||void 0===r?void 0:r.node,!o)break;if(o.save)i=c;else if(o.check&&c===i)break;s.push(c),o.fe0f&&(s.push(65039),a>0&&65039==e[a-1]&&a--),o.valid&&(n=s.slice(),2==o.valid&&n.splice(1,1),t&&t.push(...e.slice(a).reverse()),e.length=a)}return n}const x=new s.Logger(a.i),I=new Uint8Array(32);function R(e){if(0===e.length)throw new Error("invalid ENS name; empty component");return e}function P(e){const t=(0,i.Y0)(k(e)),r=[];if(0===e.length)return r;let n=0;for(let i=0;i<t.length;i++){46===t[i]&&(r.push(R(t.slice(n,i))),n=i+1)}if(n>=t.length)throw new Error("invalid ENS name; empty component");return r.push(R(t.slice(n))),r}function T(e){return P(e).map((e=>(0,i.ZN)(e))).join(".")}function N(e){try{return 0!==P(e).length}catch(t){}return!1}function D(e){"string"!==typeof e&&x.throwArgumentError("invalid ENS name; not a string","name",e);let t=I;const r=P(e);for(;r.length;)t=(0,o.keccak256)((0,n.concat)([t,(0,o.keccak256)(r.pop())]));return(0,n.hexlify)(t)}function O(e){return(0,n.hexlify)((0,n.concat)(P(e).map((e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const t=new Uint8Array(e.length+1);return t.set(e,1),t[0]=t.length-1,t}))))+"00"}I.fill(0)},6454:(e,t,r)=>{"use strict";r.d(t,{E:()=>C});var n=r(8552),i=r(9560),o=r(2009),s=r(1291),a=r(4812),c=r(2735),l=r(2069),u=r(3358),h=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(t){o(t)}}function a(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};const d=new c.Logger(l.i),f=new Uint8Array(32);f.fill(0);const p=i.O$.from(-1),g=i.O$.from(0),m=i.O$.from(1),y=i.O$.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");const v=(0,o.hexZeroPad)(m.toHexString(),32),b=(0,o.hexZeroPad)(g.toHexString(),32),w={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},E=["name","version","chainId","verifyingContract","salt"];function S(e){return function(t){return"string"!==typeof t&&d.throwArgumentError("invalid domain value for ".concat(JSON.stringify(e)),"domain.".concat(e),t),t}}const _={name:S("name"),version:S("version"),chainId:function(e){try{return i.O$.from(e).toString()}catch(t){}return d.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",e)},verifyingContract:function(e){try{return(0,n.getAddress)(e).toLowerCase()}catch(t){}return d.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){try{const t=(0,o.arrayify)(e);if(32!==t.length)throw new Error("bad length");return(0,o.hexlify)(t)}catch(t){}return d.throwArgumentError('invalid domain value "salt"',"domain.salt",e)}};function A(e){{const t=e.match(/^(u?)int(\d*)$/);if(t){const r=""===t[1],n=parseInt(t[2]||"256");(n%8!==0||n>256||t[2]&&t[2]!==String(n))&&d.throwArgumentError("invalid numeric width","type",e);const s=y.mask(r?n-1:n),a=r?s.add(m).mul(p):g;return function(t){const r=i.O$.from(t);return(r.lt(a)||r.gt(s))&&d.throwArgumentError("value out-of-bounds for ".concat(e),"value",t),(0,o.hexZeroPad)(r.toTwos(256).toHexString(),32)}}}{const t=e.match(/^bytes(\d+)$/);if(t){const r=parseInt(t[1]);return(0===r||r>32||t[1]!==String(r))&&d.throwArgumentError("invalid bytes width","type",e),function(t){return(0,o.arrayify)(t).length!==r&&d.throwArgumentError("invalid length for ".concat(e),"value",t),function(e){const t=(0,o.arrayify)(e),r=t.length%32;return r?(0,o.hexConcat)([t,f.slice(r)]):(0,o.hexlify)(t)}(t)}}}switch(e){case"address":return function(e){return(0,o.hexZeroPad)((0,n.getAddress)(e),32)};case"bool":return function(e){return e?v:b};case"bytes":return function(e){return(0,s.keccak256)(e)};case"string":return function(e){return(0,u.id)(e)}}return null}function k(e,t){return"".concat(e,"(").concat(t.map((e=>{let{name:t,type:r}=e;return r+" "+t})).join(","),")")}class C{constructor(e){(0,a.defineReadOnly)(this,"types",Object.freeze((0,a.deepCopy)(e))),(0,a.defineReadOnly)(this,"_encoderCache",{}),(0,a.defineReadOnly)(this,"_types",{});const t={},r={},n={};Object.keys(e).forEach((e=>{t[e]={},r[e]=[],n[e]={}}));for(const o in e){const n={};e[o].forEach((i=>{n[i.name]&&d.throwArgumentError("duplicate variable name ".concat(JSON.stringify(i.name)," in ").concat(JSON.stringify(o)),"types",e),n[i.name]=!0;const s=i.type.match(/^([^\x5b]*)(\x5b|$)/)[1];s===o&&d.throwArgumentError("circular type reference to ".concat(JSON.stringify(s)),"types",e);A(s)||(r[s]||d.throwArgumentError("unknown type ".concat(JSON.stringify(s)),"types",e),r[s].push(o),t[o][s]=!0)}))}const i=Object.keys(r).filter((e=>0===r[e].length));0===i.length?d.throwArgumentError("missing primary type","types",e):i.length>1&&d.throwArgumentError("ambiguous primary types or unused types: ".concat(i.map((e=>JSON.stringify(e))).join(", ")),"types",e),(0,a.defineReadOnly)(this,"primaryType",i[0]),function i(o,s){s[o]&&d.throwArgumentError("circular type reference to ".concat(JSON.stringify(o)),"types",e),s[o]=!0,Object.keys(t[o]).forEach((e=>{r[e]&&(i(e,s),Object.keys(s).forEach((t=>{n[t][e]=!0})))})),delete s[o]}(this.primaryType,{});for(const o in n){const t=Object.keys(n[o]);t.sort(),this._types[o]=k(o,e[o])+t.map((t=>k(t,e[t]))).join("")}}getEncoder(e){let t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}_getEncoder(e){{const t=A(e);if(t)return t}const t=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(t){const e=t[1],r=this.getEncoder(e),n=parseInt(t[3]);return t=>{n>=0&&t.length!==n&&d.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t);let i=t.map(r);return this._types[e]&&(i=i.map(s.keccak256)),(0,s.keccak256)((0,o.hexConcat)(i))}}const r=this.types[e];if(r){const t=(0,u.id)(this._types[e]);return e=>{const n=r.map((t=>{let{name:r,type:n}=t;const i=this.getEncoder(n)(e[r]);return this._types[n]?(0,s.keccak256)(i):i}));return n.unshift(t),(0,o.hexConcat)(n)}}return d.throwArgumentError("unknown type: ".concat(e),"type",e)}encodeType(e){const t=this._types[e];return t||d.throwArgumentError("unknown type: ".concat(JSON.stringify(e)),"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return(0,s.keccak256)(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,r){if(A(e))return r(e,t);const n=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){const e=n[1],i=parseInt(n[3]);return i>=0&&t.length!==i&&d.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map((t=>this._visit(e,t,r)))}const i=this.types[e];return i?i.reduce(((e,n)=>{let{name:i,type:o}=n;return e[i]=this._visit(o,t[i],r),e}),{}):d.throwArgumentError("unknown type: ".concat(e),"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new C(e)}static getPrimaryType(e){return C.from(e).primaryType}static hashStruct(e,t,r){return C.from(t).hashStruct(e,r)}static hashDomain(e){const t=[];for(const r in e){const n=w[r];n||d.throwArgumentError("invalid typed-data domain key: ".concat(JSON.stringify(r)),"domain",e),t.push({name:r,type:n})}return t.sort(((e,t)=>E.indexOf(e.name)-E.indexOf(t.name))),C.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,r){return(0,o.hexConcat)(["0x1901",C.hashDomain(e),C.from(t).hash(r)])}static hash(e,t,r){return(0,s.keccak256)(C.encode(e,t,r))}static resolveNames(e,t,r,n){return h(this,void 0,void 0,(function*(){e=(0,a.shallowCopy)(e);const i={};e.verifyingContract&&!(0,o.isHexString)(e.verifyingContract,20)&&(i[e.verifyingContract]="0x");const s=C.from(t);s.visit(r,((e,t)=>("address"!==e||(0,o.isHexString)(t,20)||(i[t]="0x"),t)));for(const e in i)i[e]=yield n(e);return e.verifyingContract&&i[e.verifyingContract]&&(e.verifyingContract=i[e.verifyingContract]),r=s.visit(r,((e,t)=>"address"===e&&i[t]?i[t]:t)),{domain:e,value:r}}))}static getPayload(e,t,r){C.hashDomain(e);const n={},s=[];E.forEach((t=>{const r=e[t];null!=r&&(n[t]=_[t](r),s.push({name:t,type:w[t]}))}));const c=C.from(t),l=(0,a.shallowCopy)(t);return l.EIP712Domain?d.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",t):l.EIP712Domain=s,c.encode(r),{types:l,domain:n,primaryType:c.primaryType,message:c.visit(r,((e,t)=>{if(e.match(/^bytes(\d*)/))return(0,o.hexlify)((0,o.arrayify)(t));if(e.match(/^u?int/))return i.O$.from(t).toString();switch(e){case"address":return t.toLowerCase();case"bool":return!!t;case"string":return"string"!==typeof t&&d.throwArgumentError("invalid string","value",t),t}return d.throwArgumentError("unsupported type","type",e)}))}}}},9590:(e,t,r)=>{"use strict";r.r(t),r.d(t,{HDNode:()=>T,defaultPath:()=>P,entropyToMnemonic:()=>O,getAccountPath:()=>B,isValidMnemonic:()=>M,mnemonicToEntropy:()=>D,mnemonicToSeed:()=>N});var n=r(4247),i=r(2009),o=r(9560),s=r(1953),a=r(8060),c=r(4812),l=r(4760),u=r(3984),h=r(8427),d=r(5958),f=r(3358),p=r(2735);const g=new p.Logger("wordlists/5.7.0");class m{constructor(e){g.checkAbstract(new.target,m),(0,c.defineReadOnly)(this,"locale",e)}split(e){return e.toLowerCase().split(/ +/g)}join(e){return e.join(" ")}static check(e){const t=[];for(let r=0;r<2048;r++){const n=e.getWord(r);if(r!==e.getWordIndex(n))return"0x";t.push(n)}return(0,f.id)(t.join("\n")+"\n")}static register(e,t){t||(t=e.locale)}}let y=null;function v(e){if(null==y&&(y="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo".replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"!==m.check(e)))throw y=null,new Error("BIP39 Wordlist for en (English) FAILED")}const b=new class extends m{constructor(){super("en")}getWord(e){return v(this),y[e]}getWordIndex(e){return v(this),y.indexOf(e)}};m.register(b);const w={en:b},E=new p.Logger("hdnode/5.7.0"),S=o.O$.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),_=(0,s.Y0)("Bitcoin seed"),A=2147483648;function k(e){return(1<<e)-1<<8-e}function C(e){return(0,i.hexZeroPad)((0,i.hexlify)(e),32)}function x(e){return n.Base58.encode((0,i.concat)([e,(0,i.hexDataSlice)((0,u.JQ)((0,u.JQ)(e)),0,4)]))}function I(e){if(null==e)return w.en;if("string"===typeof e){const t=w[e];return null==t&&E.throwArgumentError("unknown locale","wordlist",e),t}return e}const R={},P="m/44'/60'/0'/0/0";class T{constructor(e,t,r,n,o,s,a,h){if(e!==R)throw new Error("HDNode constructor cannot be called directly");if(t){const e=new l.SigningKey(t);(0,c.defineReadOnly)(this,"privateKey",e.privateKey),(0,c.defineReadOnly)(this,"publicKey",e.compressedPublicKey)}else(0,c.defineReadOnly)(this,"privateKey",null),(0,c.defineReadOnly)(this,"publicKey",(0,i.hexlify)(r));(0,c.defineReadOnly)(this,"parentFingerprint",n),(0,c.defineReadOnly)(this,"fingerprint",(0,i.hexDataSlice)((0,u.bP)((0,u.JQ)(this.publicKey)),0,4)),(0,c.defineReadOnly)(this,"address",(0,d.computeAddress)(this.publicKey)),(0,c.defineReadOnly)(this,"chainCode",o),(0,c.defineReadOnly)(this,"index",s),(0,c.defineReadOnly)(this,"depth",a),null==h?((0,c.defineReadOnly)(this,"mnemonic",null),(0,c.defineReadOnly)(this,"path",null)):"string"===typeof h?((0,c.defineReadOnly)(this,"mnemonic",null),(0,c.defineReadOnly)(this,"path",h)):((0,c.defineReadOnly)(this,"mnemonic",h),(0,c.defineReadOnly)(this,"path",h.path))}get extendedKey(){if(this.depth>=256)throw new Error("Depth too large!");return x((0,i.concat)([null!=this.privateKey?"0x0488ADE4":"0x0488B21E",(0,i.hexlify)(this.depth),this.parentFingerprint,(0,i.hexZeroPad)((0,i.hexlify)(this.index),4),this.chainCode,null!=this.privateKey?(0,i.concat)(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new T(R,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let t=this.path;t&&(t+="/"+(2147483647&e));const r=new Uint8Array(37);if(e&A){if(!this.privateKey)throw new Error("cannot derive child of neutered node");r.set((0,i.arrayify)(this.privateKey),1),t&&(t+="'")}else r.set((0,i.arrayify)(this.publicKey));for(let i=24;i>=0;i-=8)r[33+(i>>3)]=e>>24-i&255;const n=(0,i.arrayify)((0,u.Gy)(h.p.sha512,this.chainCode,r)),s=n.slice(0,32),a=n.slice(32);let c=null,d=null;if(this.privateKey)c=C(o.O$.from(s).add(this.privateKey).mod(S));else{d=new l.SigningKey((0,i.hexlify)(s))._addPoint(this.publicKey)}let f=t;const p=this.mnemonic;return p&&(f=Object.freeze({phrase:p.phrase,path:t,locale:p.locale||"en"})),new T(R,c,d,this.fingerprint,C(a),e,this.depth+1,f)}derivePath(e){const t=e.split("/");if(0===t.length||"m"===t[0]&&0!==this.depth)throw new Error("invalid path - "+e);"m"===t[0]&&t.shift();let r=this;for(let n=0;n<t.length;n++){const e=t[n];if(e.match(/^[0-9]+'$/)){const t=parseInt(e.substring(0,e.length-1));if(t>=A)throw new Error("invalid path index - "+e);r=r._derive(A+t)}else{if(!e.match(/^[0-9]+$/))throw new Error("invalid path component - "+e);{const t=parseInt(e);if(t>=A)throw new Error("invalid path index - "+e);r=r._derive(t)}}}return r}static _fromSeed(e,t){const r=(0,i.arrayify)(e);if(r.length<16||r.length>64)throw new Error("invalid seed");const n=(0,i.arrayify)((0,u.Gy)(h.p.sha512,_,r));return new T(R,C(n.slice(0,32)),null,"0x00000000",C(n.slice(32)),0,0,t)}static fromMnemonic(e,t,r){return e=O(D(e,r=I(r)),r),T._fromSeed(N(e,t),{phrase:e,path:"m",locale:r.locale})}static fromSeed(e){return T._fromSeed(e,null)}static fromExtendedKey(e){const t=n.Base58.decode(e);82===t.length&&x(t.slice(0,78))===e||E.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const r=t[4],o=(0,i.hexlify)(t.slice(5,9)),s=parseInt((0,i.hexlify)(t.slice(9,13)).substring(2),16),a=(0,i.hexlify)(t.slice(13,45)),c=t.slice(45,78);switch((0,i.hexlify)(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new T(R,null,(0,i.hexlify)(c),o,a,s,r,null);case"0x0488ade4":case"0x04358394 ":if(0!==c[0])break;return new T(R,(0,i.hexlify)(c.slice(1)),null,o,a,s,r,null)}return E.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function N(e,t){t||(t="");const r=(0,s.Y0)("mnemonic"+t,s.Uj.NFKD);return(0,a.n)((0,s.Y0)(e,s.Uj.NFKD),r,2048,64,"sha512")}function D(e,t){t=I(t),E.checkNormalize();const r=t.split(e);if(r.length%3!==0)throw new Error("invalid mnemonic");const n=(0,i.arrayify)(new Uint8Array(Math.ceil(11*r.length/8)));let o=0;for(let i=0;i<r.length;i++){let e=t.getWordIndex(r[i].normalize("NFKD"));if(-1===e)throw new Error("invalid mnemonic");for(let t=0;t<11;t++)e&1<<10-t&&(n[o>>3]|=1<<7-o%8),o++}const s=32*r.length/3,a=k(r.length/3);if(((0,i.arrayify)((0,u.JQ)(n.slice(0,s/8)))[0]&a)!==(n[n.length-1]&a))throw new Error("invalid checksum");return(0,i.hexlify)(n.slice(0,s/8))}function O(e,t){if(t=I(t),(e=(0,i.arrayify)(e)).length%4!==0||e.length<16||e.length>32)throw new Error("invalid entropy");const r=[0];let n=11;for(let i=0;i<e.length;i++)n>8?(r[r.length-1]<<=8,r[r.length-1]|=e[i],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=e[i]>>8-n,r.push(e[i]&(1<<8-n)-1),n+=3);const o=e.length/4,s=(0,i.arrayify)((0,u.JQ)(e))[0]&k(o);return r[r.length-1]<<=o,r[r.length-1]|=s>>8-o,t.join(r.map((e=>t.getWord(e))))}function M(e,t){try{return D(e,t),!0}catch(r){}return!1}function B(e){return("number"!==typeof e||e<0||e>=A||e%1)&&E.throwArgumentError("invalid account index","index",e),"m/44'/60'/".concat(e,"'/0/0")}},5779:(e,t,r)=>{"use strict";r.d(t,{i:()=>n});const n="json-wallets/5.7.0"},5054:(e,t,r)=>{"use strict";r.r(t),r.d(t,{decryptCrowdsale:()=>m,decryptJsonWallet:()=>E,decryptJsonWalletSync:()=>S,decryptKeystore:()=>w.pe,decryptKeystoreSync:()=>w.hb,encryptKeystore:()=>w.HI,getJsonWalletAddress:()=>b,isCrowdsaleWallet:()=>y,isKeystoreWallet:()=>v});var n=r(7532),i=r.n(n),o=r(8552),s=r(2009),a=r(1291),c=r(8060),l=r(1953),u=r(4812),h=r(2735),d=r(5779),f=r(7211);const p=new h.Logger(d.i);class g extends u.Description{isCrowdsaleAccount(e){return!(!e||!e._isCrowdsaleAccount)}}function m(e,t){const r=JSON.parse(e);t=(0,f.Ij)(t);const n=(0,o.getAddress)((0,f.gx)(r,"ethaddr")),u=(0,f.p3)((0,f.gx)(r,"encseed"));u&&u.length%16===0||p.throwArgumentError("invalid encseed","json",e);const h=(0,s.arrayify)((0,c.n)(t,t,2e3,32,"sha256")).slice(0,16),d=u.slice(0,16),m=u.slice(16),y=new(i().ModeOfOperation.cbc)(h,d),v=i().padding.pkcs7.strip((0,s.arrayify)(y.decrypt(m)));let b="";for(let i=0;i<v.length;i++)b+=String.fromCharCode(v[i]);const w=(0,l.Y0)(b),E=(0,a.keccak256)(w);return new g({_isCrowdsaleAccount:!0,address:n,privateKey:E})}function y(e){let t=null;try{t=JSON.parse(e)}catch(r){return!1}return t.encseed&&t.ethaddr}function v(e){let t=null;try{t=JSON.parse(e)}catch(r){return!1}return!(!t.version||parseInt(t.version)!==t.version||3!==parseInt(t.version))}function b(e){if(y(e))try{return(0,o.getAddress)(JSON.parse(e).ethaddr)}catch(t){return null}if(v(e))try{return(0,o.getAddress)(JSON.parse(e).address)}catch(t){return null}return null}var w=r(2691);function E(e,t,r){if(y(e)){r&&r(0);const n=m(e,t);return r&&r(1),Promise.resolve(n)}return v(e)?(0,w.pe)(e,t,r):Promise.reject(new Error("invalid JSON wallet"))}function S(e,t){if(y(e))return m(e,t);if(v(e))return(0,w.hb)(e,t);throw new Error("invalid JSON wallet")}},2691:(e,t,r)=>{"use strict";r.d(t,{HI:()=>I,hb:()=>C,pe:()=>x});var n=r(7532),i=r.n(n),o=r(6125),s=r.n(o),a=r(8552),c=r(2009),l=r(9590),u=r(1291),h=r(8060),d=r(5722),f=r(4812),p=r(5958),g=r(7211),m=r(2735),y=r(5779),v=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(t){o(t)}}function a(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};const b=new m.Logger(y.i);function w(e){return null!=e&&e.mnemonic&&e.mnemonic.phrase}class E extends f.Description{isKeystoreAccount(e){return!(!e||!e._isKeystoreAccount)}}function S(e,t){const r=(0,g.p3)((0,g.gx)(e,"crypto/ciphertext"));if((0,c.hexlify)((0,u.keccak256)((0,c.concat)([t.slice(16,32),r]))).substring(2)!==(0,g.gx)(e,"crypto/mac").toLowerCase())throw new Error("invalid password");const n=function(e,t,r){if("aes-128-ctr"===(0,g.gx)(e,"crypto/cipher")){const n=(0,g.p3)((0,g.gx)(e,"crypto/cipherparams/iv")),o=new(i().Counter)(n),s=new(i().ModeOfOperation.ctr)(t,o);return(0,c.arrayify)(s.decrypt(r))}return null}(e,t.slice(0,16),r);n||b.throwError("unsupported cipher",m.Logger.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});const o=t.slice(32,64),s=(0,p.computeAddress)(n);if(e.address){let t=e.address.toLowerCase();if("0x"!==t.substring(0,2)&&(t="0x"+t),(0,a.getAddress)(t)!==s)throw new Error("address mismatch")}const h={_isKeystoreAccount:!0,address:s,privateKey:(0,c.hexlify)(n)};if("0.1"===(0,g.gx)(e,"x-ethers/version")){const t=(0,g.p3)((0,g.gx)(e,"x-ethers/mnemonicCiphertext")),r=(0,g.p3)((0,g.gx)(e,"x-ethers/mnemonicCounter")),n=new(i().Counter)(r),s=new(i().ModeOfOperation.ctr)(o,n),a=(0,g.gx)(e,"x-ethers/path")||l.defaultPath,u=(0,g.gx)(e,"x-ethers/locale")||"en",f=(0,c.arrayify)(s.decrypt(t));try{const e=(0,l.entropyToMnemonic)(f,u),t=l.HDNode.fromMnemonic(e,null,u).derivePath(a);if(t.privateKey!=h.privateKey)throw new Error("mnemonic mismatch");h.mnemonic=t.mnemonic}catch(d){if(d.code!==m.Logger.errors.INVALID_ARGUMENT||"wordlist"!==d.argument)throw d}}return new E(h)}function _(e,t,r,n,i){return(0,c.arrayify)((0,h.n)(e,t,r,n,i))}function A(e,t,r,n,i){return Promise.resolve(_(e,t,r,n,i))}function k(e,t,r,n,i){const o=(0,g.Ij)(t),s=(0,g.gx)(e,"crypto/kdf");if(s&&"string"===typeof s){const t=function(e,t){return b.throwArgumentError("invalid key-derivation function parameters",e,t)};if("scrypt"===s.toLowerCase()){const r=(0,g.p3)((0,g.gx)(e,"crypto/kdfparams/salt")),a=parseInt((0,g.gx)(e,"crypto/kdfparams/n")),c=parseInt((0,g.gx)(e,"crypto/kdfparams/r")),l=parseInt((0,g.gx)(e,"crypto/kdfparams/p"));a&&c&&l||t("kdf",s),0!==(a&a-1)&&t("N",a);const u=parseInt((0,g.gx)(e,"crypto/kdfparams/dklen"));return 32!==u&&t("dklen",u),n(o,r,a,c,l,64,i)}if("pbkdf2"===s.toLowerCase()){const n=(0,g.p3)((0,g.gx)(e,"crypto/kdfparams/salt"));let i=null;const s=(0,g.gx)(e,"crypto/kdfparams/prf");"hmac-sha256"===s?i="sha256":"hmac-sha512"===s?i="sha512":t("prf",s);const a=parseInt((0,g.gx)(e,"crypto/kdfparams/c")),c=parseInt((0,g.gx)(e,"crypto/kdfparams/dklen"));return 32!==c&&t("dklen",c),r(o,n,a,c,i)}}return b.throwArgumentError("unsupported key-derivation function","kdf",s)}function C(e,t){const r=JSON.parse(e);return S(r,k(r,t,_,s().syncScrypt))}function x(e,t,r){return v(this,void 0,void 0,(function*(){const n=JSON.parse(e);return S(n,yield k(n,t,A,s().scrypt,r))}))}function I(e,t,r,n){try{if((0,a.getAddress)(e.address)!==(0,p.computeAddress)(e.privateKey))throw new Error("address/privateKey mismatch");if(w(e)){const t=e.mnemonic;if(l.HDNode.fromMnemonic(t.phrase,null,t.locale).derivePath(t.path||l.defaultPath).privateKey!=e.privateKey)throw new Error("mnemonic mismatch")}}catch(C){return Promise.reject(C)}"function"!==typeof r||n||(n=r,r={}),r||(r={});const o=(0,c.arrayify)(e.privateKey),h=(0,g.Ij)(t);let f=null,m=null,y=null;if(w(e)){const t=e.mnemonic;f=(0,c.arrayify)((0,l.mnemonicToEntropy)(t.phrase,t.locale||"en")),m=t.path||l.defaultPath,y=t.locale||"en"}let v=r.client;v||(v="ethers.js");let b=null;b=r.salt?(0,c.arrayify)(r.salt):(0,d.O)(32);let E=null;if(r.iv){if(E=(0,c.arrayify)(r.iv),16!==E.length)throw new Error("invalid iv")}else E=(0,d.O)(16);let S=null;if(r.uuid){if(S=(0,c.arrayify)(r.uuid),16!==S.length)throw new Error("invalid uuid")}else S=(0,d.O)(16);let _=1<<17,A=8,k=1;return r.scrypt&&(r.scrypt.N&&(_=r.scrypt.N),r.scrypt.r&&(A=r.scrypt.r),r.scrypt.p&&(k=r.scrypt.p)),s().scrypt(h,b,_,A,k,64,n).then((t=>{const r=(t=(0,c.arrayify)(t)).slice(0,16),n=t.slice(16,32),s=t.slice(32,64),a=new(i().Counter)(E),l=new(i().ModeOfOperation.ctr)(r,a),h=(0,c.arrayify)(l.encrypt(o)),p=(0,u.keccak256)((0,c.concat)([n,h])),w={address:e.address.substring(2).toLowerCase(),id:(0,g.EH)(S),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:(0,c.hexlify)(E).substring(2)},ciphertext:(0,c.hexlify)(h).substring(2),kdf:"scrypt",kdfparams:{salt:(0,c.hexlify)(b).substring(2),n:_,dklen:32,p:k,r:A},mac:p.substring(2)}};if(f){const e=(0,d.O)(16),t=new(i().Counter)(e),r=new(i().ModeOfOperation.ctr)(s,t),n=(0,c.arrayify)(r.encrypt(f)),o=new Date,a=o.getUTCFullYear()+"-"+(0,g.VP)(o.getUTCMonth()+1,2)+"-"+(0,g.VP)(o.getUTCDate(),2)+"T"+(0,g.VP)(o.getUTCHours(),2)+"-"+(0,g.VP)(o.getUTCMinutes(),2)+"-"+(0,g.VP)(o.getUTCSeconds(),2)+".0Z";w["x-ethers"]={client:v,gethFilename:"UTC--"+a+"--"+w.address,mnemonicCounter:(0,c.hexlify)(e).substring(2),mnemonicCiphertext:(0,c.hexlify)(n).substring(2),path:m,locale:y,version:"0.1"}}return JSON.stringify(w)}))}},7211:(e,t,r)=>{"use strict";r.d(t,{EH:()=>l,Ij:()=>a,VP:()=>s,gx:()=>c,p3:()=>o});var n=r(2009),i=r(1953);function o(e){return"string"===typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),(0,n.arrayify)(e)}function s(e,t){for(e=String(e);e.length<t;)e="0"+e;return e}function a(e){return"string"===typeof e?(0,i.Y0)(e,i.Uj.NFKC):(0,n.arrayify)(e)}function c(e,t){let r=e;const n=t.toLowerCase().split("/");for(let i=0;i<n.length;i++){let e=null;for(const t in r)if(t.toLowerCase()===n[i]){e=r[t];break}if(null===e)return null;r=e}return r}function l(e){const t=(0,n.arrayify)(e);t[6]=15&t[6]|64,t[8]=63&t[8]|128;const r=(0,n.hexlify)(t);return[r.substring(2,10),r.substring(10,14),r.substring(14,18),r.substring(18,22),r.substring(22,34)].join("-")}},1291:(e,t,r)=>{"use strict";r.r(t),r.d(t,{keccak256:()=>s});var n=r(7676),i=r.n(n),o=r(2009);function s(e){return"0x"+i().keccak_256((0,o.arrayify)(e))}},2735:(e,t,r)=>{"use strict";r.r(t),r.d(t,{ErrorCode:()=>u,LogLevel:()=>l,Logger:()=>d});let n=!1,i=!1;const o={debug:1,default:2,info:2,warning:3,error:4,off:5};let s=o.default,a=null;const c=function(){try{const e=[];if(["NFD","NFC","NFKD","NFKC"].forEach((t=>{try{if("test"!=="test".normalize(t))throw new Error("bad normalize")}catch(r){e.push(t)}})),e.length)throw new Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(e){return e.message}return null}();var l,u;!function(e){e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR",e.OFF="OFF"}(l||(l={})),function(e){e.UNKNOWN_ERROR="UNKNOWN_ERROR",e.NOT_IMPLEMENTED="NOT_IMPLEMENTED",e.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",e.NETWORK_ERROR="NETWORK_ERROR",e.SERVER_ERROR="SERVER_ERROR",e.TIMEOUT="TIMEOUT",e.BUFFER_OVERRUN="BUFFER_OVERRUN",e.NUMERIC_FAULT="NUMERIC_FAULT",e.MISSING_NEW="MISSING_NEW",e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.MISSING_ARGUMENT="MISSING_ARGUMENT",e.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",e.CALL_EXCEPTION="CALL_EXCEPTION",e.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",e.NONCE_EXPIRED="NONCE_EXPIRED",e.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",e.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",e.TRANSACTION_REPLACED="TRANSACTION_REPLACED",e.ACTION_REJECTED="ACTION_REJECTED"}(u||(u={}));const h="0123456789abcdef";class d{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){const r=e.toLowerCase();null==o[r]&&this.throwArgumentError("invalid log level name","logLevel",e),s>o[r]||console.log.apply(console,t)}debug(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];this._log(d.levels.DEBUG,t)}info(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];this._log(d.levels.INFO,t)}warn(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];this._log(d.levels.WARNING,t)}makeError(e,t,r){if(i)return this.makeError("censored error",t,{});t||(t=d.errors.UNKNOWN_ERROR),r||(r={});const n=[];Object.keys(r).forEach((e=>{const t=r[e];try{if(t instanceof Uint8Array){let r="";for(let e=0;e<t.length;e++)r+=h[t[e]>>4],r+=h[15&t[e]];n.push(e+"=Uint8Array(0x"+r+")")}else n.push(e+"="+JSON.stringify(t))}catch(a){n.push(e+"="+JSON.stringify(r[e].toString()))}})),n.push("code=".concat(t)),n.push("version=".concat(this.version));const o=e;let s="";switch(t){case u.NUMERIC_FAULT:{s="NUMERIC_FAULT";const t=e;switch(t){case"overflow":case"underflow":case"division-by-zero":s+="-"+t;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result"}break}case u.CALL_EXCEPTION:case u.INSUFFICIENT_FUNDS:case u.MISSING_NEW:case u.NONCE_EXPIRED:case u.REPLACEMENT_UNDERPRICED:case u.TRANSACTION_REPLACED:case u.UNPREDICTABLE_GAS_LIMIT:s=t}s&&(e+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),n.length&&(e+=" ("+n.join(", ")+")");const a=new Error(e);return a.reason=o,a.code=t,Object.keys(r).forEach((function(e){a[e]=r[e]})),a}throwError(e,t,r){throw this.makeError(e,t,r)}throwArgumentError(e,t,r){return this.throwError(e,d.errors.INVALID_ARGUMENT,{argument:t,value:r})}assert(e,t,r,n){e||this.throwError(t,r,n)}assertArgument(e,t,r,n){e||this.throwArgumentError(t,r,n)}checkNormalize(e){null==e&&(e="platform missing String.prototype.normalize"),c&&this.throwError("platform missing String.prototype.normalize",d.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:c})}checkSafeUint53(e,t){"number"===typeof e&&(null==t&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,d.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,d.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,r){r=r?": "+r:"",e<t&&this.throwError("missing argument"+r,d.errors.MISSING_ARGUMENT,{count:e,expectedCount:t}),e>t&&this.throwError("too many arguments"+r,d.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){e!==Object&&null!=e||this.throwError("missing new",d.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",d.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):e!==Object&&null!=e||this.throwError("missing new",d.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return a||(a=new d("logger/5.7.0")),a}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",d.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),n){if(!e)return;this.globalLogger().throwError("error censorship permanent",d.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}i=!!e,n=!!t}static setLogLevel(e){const t=o[e.toLowerCase()];null!=t?s=t:d.globalLogger().warn("invalid log level - "+e)}static from(e){return new d(e)}}d.errors=u,d.levels=l},8060:(e,t,r)=>{"use strict";r.d(t,{n:()=>o});var n=r(2009),i=r(3984);function o(e,t,r,o,s){let a;e=(0,n.arrayify)(e),t=(0,n.arrayify)(t);let c=1;const l=new Uint8Array(o),u=new Uint8Array(t.length+4);let h,d;u.set(t);for(let f=1;f<=c;f++){u[t.length]=f>>24&255,u[t.length+1]=f>>16&255,u[t.length+2]=f>>8&255,u[t.length+3]=255&f;let p=(0,n.arrayify)((0,i.Gy)(s,e,u));a||(a=p.length,d=new Uint8Array(a),c=Math.ceil(o/a),h=o-(c-1)*a),d.set(p);for(let t=1;t<r;t++){p=(0,n.arrayify)((0,i.Gy)(s,e,p));for(let e=0;e<a;e++)d[e]^=p[e]}const g=(f-1)*a,m=f===c?h:a;l.set((0,n.arrayify)(d).slice(0,m),g)}return(0,n.hexlify)(l)}},4812:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Description:()=>g,checkProperties:()=>l,deepCopy:()=>p,defineReadOnly:()=>s,getStatic:()=>a,resolveProperties:()=>c,shallowCopy:()=>u});var n=r(2735);var i=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(t){o(t)}}function a(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};const o=new n.Logger("properties/5.7.0");function s(e,t,r){Object.defineProperty(e,t,{enumerable:!0,value:r,writable:!1})}function a(e,t){for(let r=0;r<32;r++){if(e[t])return e[t];if(!e.prototype||"object"!==typeof e.prototype)break;e=Object.getPrototypeOf(e.prototype).constructor}return null}function c(e){return i(this,void 0,void 0,(function*(){const t=Object.keys(e).map((t=>{const r=e[t];return Promise.resolve(r).then((e=>({key:t,value:e})))}));return(yield Promise.all(t)).reduce(((e,t)=>(e[t.key]=t.value,e)),{})}))}function l(e,t){e&&"object"===typeof e||o.throwArgumentError("invalid object","object",e),Object.keys(e).forEach((r=>{t[r]||o.throwArgumentError("invalid object key - "+r,"transaction:"+r,e)}))}function u(e){const t={};for(const r in e)t[r]=e[r];return t}const h={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function d(e){if(void 0===e||null===e||h[typeof e])return!0;if(Array.isArray(e)||"object"===typeof e){if(!Object.isFrozen(e))return!1;const r=Object.keys(e);for(let n=0;n<r.length;n++){let i=null;try{i=e[r[n]]}catch(t){continue}if(!d(i))return!1}return!0}return o.throwArgumentError("Cannot deepCopy ".concat(typeof e),"object",e)}function f(e){if(d(e))return e;if(Array.isArray(e))return Object.freeze(e.map((e=>p(e))));if("object"===typeof e){const t={};for(const r in e){const n=e[r];void 0!==n&&s(t,r,p(n))}return t}return o.throwArgumentError("Cannot deepCopy ".concat(typeof e),"object",e)}function p(e){return f(e)}class g{constructor(e){for(const t in e)this[t]=p(e[t])}}},9670:(e,t,r)=>{"use strict";r.r(t),r.d(t,{randomBytes:()=>n.O,shuffled:()=>i});var n=r(5722);function i(e){for(let t=(e=e.slice()).length-1;t>0;t--){const r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}},5722:(e,t,r)=>{"use strict";r.d(t,{O:()=>c});var n=r(2009),i=r(2735);const o=new i.Logger("random/5.7.0");const s=function(){if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof r.g)return r.g;throw new Error("unable to locate global object")}();let a=s.crypto||s.msCrypto;function c(e){(e<=0||e>1024||e%1||e!=e)&&o.throwArgumentError("invalid length","length",e);const t=new Uint8Array(e);return a.getRandomValues(t),(0,n.arrayify)(t)}a&&a.getRandomValues||(o.warn("WARNING: Missing strong random number source"),a={getRandomValues:function(e){return o.throwError("no secure random source avaialble",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}})},807:(e,t,r)=>{"use strict";r.r(t),r.d(t,{decode:()=>d,encode:()=>l});var n=r(2009),i=r(2735);const o=new i.Logger("rlp/5.7.0");function s(e){const t=[];for(;e;)t.unshift(255&e),e>>=8;return t}function a(e,t,r){let n=0;for(let i=0;i<r;i++)n=256*n+e[t+i];return n}function c(e){if(Array.isArray(e)){let t=[];if(e.forEach((function(e){t=t.concat(c(e))})),t.length<=55)return t.unshift(192+t.length),t;const r=s(t.length);return r.unshift(247+r.length),r.concat(t)}(0,n.isBytesLike)(e)||o.throwArgumentError("RLP object must be BytesLike","object",e);const t=Array.prototype.slice.call((0,n.arrayify)(e));if(1===t.length&&t[0]<=127)return t;if(t.length<=55)return t.unshift(128+t.length),t;const r=s(t.length);return r.unshift(183+r.length),r.concat(t)}function l(e){return(0,n.hexlify)(c(e))}function u(e,t,r,n){const s=[];for(;r<t+1+n;){const a=h(e,r);s.push(a.result),(r+=a.consumed)>t+1+n&&o.throwError("child data too short",i.Logger.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:s}}function h(e,t){if(0===e.length&&o.throwError("data too short",i.Logger.errors.BUFFER_OVERRUN,{}),e[t]>=248){const r=e[t]-247;t+1+r>e.length&&o.throwError("data short segment too short",i.Logger.errors.BUFFER_OVERRUN,{});const n=a(e,t+1,r);return t+1+r+n>e.length&&o.throwError("data long segment too short",i.Logger.errors.BUFFER_OVERRUN,{}),u(e,t,t+1+r,r+n)}if(e[t]>=192){const r=e[t]-192;return t+1+r>e.length&&o.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{}),u(e,t,t+1,r)}if(e[t]>=184){const r=e[t]-183;t+1+r>e.length&&o.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{});const s=a(e,t+1,r);t+1+r+s>e.length&&o.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{});return{consumed:1+r+s,result:(0,n.hexlify)(e.slice(t+1+r,t+1+r+s))}}if(e[t]>=128){const r=e[t]-128;t+1+r>e.length&&o.throwError("data too short",i.Logger.errors.BUFFER_OVERRUN,{});return{consumed:1+r,result:(0,n.hexlify)(e.slice(t+1,t+1+r))}}return{consumed:1,result:(0,n.hexlify)(e[t])}}function d(e){const t=(0,n.arrayify)(e),r=h(t,0);return r.consumed!==t.length&&o.throwArgumentError("invalid rlp data","data",e),r.result}},4517:(e,t,r)=>{"use strict";r.r(t),r.d(t,{SupportedAlgorithm:()=>i.p,computeHmac:()=>n.Gy,ripemd160:()=>n.bP,sha256:()=>n.JQ,sha512:()=>n.o});var n=r(3984),i=r(8427)},3984:(e,t,r)=>{"use strict";r.d(t,{Gy:()=>d,bP:()=>l,JQ:()=>u,o:()=>h});var n=r(7553),i=r.n(n),o=r(2009),s=r(8427),a=r(2735);const c=new a.Logger("sha2/5.7.0");function l(e){return"0x"+i().ripemd160().update((0,o.arrayify)(e)).digest("hex")}function u(e){return"0x"+i().sha256().update((0,o.arrayify)(e)).digest("hex")}function h(e){return"0x"+i().sha512().update((0,o.arrayify)(e)).digest("hex")}function d(e,t,r){return s.p[e]||c.throwError("unsupported algorithm "+e,a.Logger.errors.UNSUPPORTED_OPERATION,{operation:"hmac",algorithm:e}),"0x"+i().hmac(i()[e],(0,o.arrayify)(t)).update((0,o.arrayify)(r)).digest("hex")}},8427:(e,t,r)=>{"use strict";var n;r.d(t,{p:()=>n}),function(e){e.sha256="sha256",e.sha512="sha512"}(n||(n={}))},5220:function(e,t,r){!function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof r.g?r.g:"undefined"!=typeof self?self:{};function n(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}((void 0===t||null===t)&&r.path)}},r.exports),r.exports}var i=n((function(e){!function(t){for(var r=[null,0,{}],n=10,i=44032,o=4352,s=4449,a=4519,c=19,l=21,u=28,h=l*u,d=c*h,f=function(e,t){this.codepoint=e,this.feature=t},p={},g=[],m=0;m<=255;++m)g[m]=0;var y=[function(e,t,n){return t<60||13311<t&&t<42607?new f(t,r):e(t,n)},function(e,t,r){var i=p[t];return i||(i=e(t,r)).feature&&++g[t>>8&255]>n&&(p[t]=i),i},function(e,t,r){return r?e(t,r):new f(t,null)},function(e,t,r){var n;if(t<o||o+c<=t&&t<i||i+d<t)return e(t,r);if(o<=t&&t<o+c){var p={},g=(t-o)*l;for(n=0;n<l;++n)p[s+n]=i+u*(n+g);return new f(t,[,,p])}var m=t-i,y=m%u,v=[];if(0!==y)v[0]=[i+m-y,a+y];else for(v[0]=[o+Math.floor(m/h),s+Math.floor(m%h/u)],v[2]={},n=1;n<u;++n)v[2][a+n]=t+n;return new f(t,v)},function(e,t,n){var i=65280&t,o=(f.udata[i]||{})[t];return new f(t,o||r)}];f.fromCharCode=y.reduceRight((function(e,t){return function(r,n){return t(e,r,n)}}),null),f.isHighSurrogate=function(e){return e>=55296&&e<=56319},f.isLowSurrogate=function(e){return e>=56320&&e<=57343},f.prototype.prepFeature=function(){this.feature||(this.feature=f.fromCharCode(this.codepoint,!0).feature)},f.prototype.toString=function(){if(this.codepoint<65536)return String.fromCharCode(this.codepoint);var e=this.codepoint-65536;return String.fromCharCode(Math.floor(e/1024)+55296,e%1024+56320)},f.prototype.getDecomp=function(){return this.prepFeature(),this.feature[0]||null},f.prototype.isCompatibility=function(){return this.prepFeature(),!!this.feature[1]&&256&this.feature[1]},f.prototype.isExclude=function(){return this.prepFeature(),!!this.feature[1]&&512&this.feature[1]},f.prototype.getCanonicalClass=function(){return this.prepFeature(),this.feature[1]?255&this.feature[1]:0},f.prototype.getComposite=function(e){if(this.prepFeature(),!this.feature[2])return null;var t=this.feature[2][e.codepoint];return t?f.fromCharCode(t):null};var v=function(e){this.str=e,this.cursor=0};v.prototype.next=function(){if(this.str&&this.cursor<this.str.length){var e,t=this.str.charCodeAt(this.cursor++);return f.isHighSurrogate(t)&&this.cursor<this.str.length&&f.isLowSurrogate(e=this.str.charCodeAt(this.cursor))&&(t=1024*(t-55296)+(e-56320)+65536,++this.cursor),f.fromCharCode(t)}return this.str=null,null};var b=function(e,t){this.it=e,this.canonical=t,this.resBuf=[]};b.prototype.next=function(){if(0===this.resBuf.length){var e=this.it.next();if(!e)return null;this.resBuf=function e(t,r){var n=r.getDecomp();if(!n||t&&r.isCompatibility())return[r];for(var i=[],o=0;o<n.length;++o){var s=e(t,f.fromCharCode(n[o]));i=i.concat(s)}return i}(this.canonical,e)}return this.resBuf.shift()};var w=function(e){this.it=e,this.resBuf=[]};w.prototype.next=function(){var e;if(0===this.resBuf.length)do{var t=this.it.next();if(!t)break;e=t.getCanonicalClass();var r=this.resBuf.length;if(0!==e)for(;r>0&&!(this.resBuf[r-1].getCanonicalClass()<=e);--r);this.resBuf.splice(r,0,t)}while(0!==e);return this.resBuf.shift()};var E=function(e){this.it=e,this.procBuf=[],this.resBuf=[],this.lastClass=null};E.prototype.next=function(){for(;0===this.resBuf.length;){var e=this.it.next();if(!e){this.resBuf=this.procBuf,this.procBuf=[];break}if(0===this.procBuf.length)this.lastClass=e.getCanonicalClass(),this.procBuf.push(e);else{var t=this.procBuf[0].getComposite(e),r=e.getCanonicalClass();t&&(this.lastClass<r||0===this.lastClass)?this.procBuf[0]=t:(0===r&&(this.resBuf=this.procBuf,this.procBuf=[]),this.lastClass=r,this.procBuf.push(e))}}return this.resBuf.shift()};var S=function(e,t){for(var r,n=function(e,t){switch(e){case"NFD":return new w(new b(new v(t),!0));case"NFKD":return new w(new b(new v(t),!1));case"NFC":return new E(new w(new b(new v(t),!0)));case"NFKC":return new E(new w(new b(new v(t),!1)))}throw e+" is invalid"}(e,t),i="";r=n.next();)i+=r.toString();return i};f.udata={0:{60:[,,{824:8814}],61:[,,{824:8800}],62:[,,{824:8815}],65:[,,{768:192,769:193,770:194,771:195,772:256,774:258,775:550,776:196,777:7842,778:197,780:461,783:512,785:514,803:7840,805:7680,808:260}],66:[,,{775:7682,803:7684,817:7686}],67:[,,{769:262,770:264,775:266,780:268,807:199}],68:[,,{775:7690,780:270,803:7692,807:7696,813:7698,817:7694}],69:[,,{768:200,769:201,770:202,771:7868,772:274,774:276,775:278,776:203,777:7866,780:282,783:516,785:518,803:7864,807:552,808:280,813:7704,816:7706}],70:[,,{775:7710}],71:[,,{769:500,770:284,772:7712,774:286,775:288,780:486,807:290}],72:[,,{770:292,775:7714,776:7718,780:542,803:7716,807:7720,814:7722}],73:[,,{768:204,769:205,770:206,771:296,772:298,774:300,775:304,776:207,777:7880,780:463,783:520,785:522,803:7882,808:302,816:7724}],74:[,,{770:308}],75:[,,{769:7728,780:488,803:7730,807:310,817:7732}],76:[,,{769:313,780:317,803:7734,807:315,813:7740,817:7738}],77:[,,{769:7742,775:7744,803:7746}],78:[,,{768:504,769:323,771:209,775:7748,780:327,803:7750,807:325,813:7754,817:7752}],79:[,,{768:210,769:211,770:212,771:213,772:332,774:334,775:558,776:214,777:7886,779:336,780:465,783:524,785:526,795:416,803:7884,808:490}],80:[,,{769:7764,775:7766}],82:[,,{769:340,775:7768,780:344,783:528,785:530,803:7770,807:342,817:7774}],83:[,,{769:346,770:348,775:7776,780:352,803:7778,806:536,807:350}],84:[,,{775:7786,780:356,803:7788,806:538,807:354,813:7792,817:7790}],85:[,,{768:217,769:218,770:219,771:360,772:362,774:364,776:220,777:7910,778:366,779:368,780:467,783:532,785:534,795:431,803:7908,804:7794,808:370,813:7798,816:7796}],86:[,,{771:7804,803:7806}],87:[,,{768:7808,769:7810,770:372,775:7814,776:7812,803:7816}],88:[,,{775:7818,776:7820}],89:[,,{768:7922,769:221,770:374,771:7928,772:562,775:7822,776:376,777:7926,803:7924}],90:[,,{769:377,770:7824,775:379,780:381,803:7826,817:7828}],97:[,,{768:224,769:225,770:226,771:227,772:257,774:259,775:551,776:228,777:7843,778:229,780:462,783:513,785:515,803:7841,805:7681,808:261}],98:[,,{775:7683,803:7685,817:7687}],99:[,,{769:263,770:265,775:267,780:269,807:231}],100:[,,{775:7691,780:271,803:7693,807:7697,813:7699,817:7695}],101:[,,{768:232,769:233,770:234,771:7869,772:275,774:277,775:279,776:235,777:7867,780:283,783:517,785:519,803:7865,807:553,808:281,813:7705,816:7707}],102:[,,{775:7711}],103:[,,{769:501,770:285,772:7713,774:287,775:289,780:487,807:291}],104:[,,{770:293,775:7715,776:7719,780:543,803:7717,807:7721,814:7723,817:7830}],105:[,,{768:236,769:237,770:238,771:297,772:299,774:301,776:239,777:7881,780:464,783:521,785:523,803:7883,808:303,816:7725}],106:[,,{770:309,780:496}],107:[,,{769:7729,780:489,803:7731,807:311,817:7733}],108:[,,{769:314,780:318,803:7735,807:316,813:7741,817:7739}],109:[,,{769:7743,775:7745,803:7747}],110:[,,{768:505,769:324,771:241,775:7749,780:328,803:7751,807:326,813:7755,817:7753}],111:[,,{768:242,769:243,770:244,771:245,772:333,774:335,775:559,776:246,777:7887,779:337,780:466,783:525,785:527,795:417,803:7885,808:491}],112:[,,{769:7765,775:7767}],114:[,,{769:341,775:7769,780:345,783:529,785:531,803:7771,807:343,817:7775}],115:[,,{769:347,770:349,775:7777,780:353,803:7779,806:537,807:351}],116:[,,{775:7787,776:7831,780:357,803:7789,806:539,807:355,813:7793,817:7791}],117:[,,{768:249,769:250,770:251,771:361,772:363,774:365,776:252,777:7911,778:367,779:369,780:468,783:533,785:535,795:432,803:7909,804:7795,808:371,813:7799,816:7797}],118:[,,{771:7805,803:7807}],119:[,,{768:7809,769:7811,770:373,775:7815,776:7813,778:7832,803:7817}],120:[,,{775:7819,776:7821}],121:[,,{768:7923,769:253,770:375,771:7929,772:563,775:7823,776:255,777:7927,778:7833,803:7925}],122:[,,{769:378,770:7825,775:380,780:382,803:7827,817:7829}],160:[[32],256],168:[[32,776],256,{768:8173,769:901,834:8129}],170:[[97],256],175:[[32,772],256],178:[[50],256],179:[[51],256],180:[[32,769],256],181:[[956],256],184:[[32,807],256],185:[[49],256],186:[[111],256],188:[[49,8260,52],256],189:[[49,8260,50],256],190:[[51,8260,52],256],192:[[65,768]],193:[[65,769]],194:[[65,770],,{768:7846,769:7844,771:7850,777:7848}],195:[[65,771]],196:[[65,776],,{772:478}],197:[[65,778],,{769:506}],198:[,,{769:508,772:482}],199:[[67,807],,{769:7688}],200:[[69,768]],201:[[69,769]],202:[[69,770],,{768:7872,769:7870,771:7876,777:7874}],203:[[69,776]],204:[[73,768]],205:[[73,769]],206:[[73,770]],207:[[73,776],,{769:7726}],209:[[78,771]],210:[[79,768]],211:[[79,769]],212:[[79,770],,{768:7890,769:7888,771:7894,777:7892}],213:[[79,771],,{769:7756,772:556,776:7758}],214:[[79,776],,{772:554}],216:[,,{769:510}],217:[[85,768]],218:[[85,769]],219:[[85,770]],220:[[85,776],,{768:475,769:471,772:469,780:473}],221:[[89,769]],224:[[97,768]],225:[[97,769]],226:[[97,770],,{768:7847,769:7845,771:7851,777:7849}],227:[[97,771]],228:[[97,776],,{772:479}],229:[[97,778],,{769:507}],230:[,,{769:509,772:483}],231:[[99,807],,{769:7689}],232:[[101,768]],233:[[101,769]],234:[[101,770],,{768:7873,769:7871,771:7877,777:7875}],235:[[101,776]],236:[[105,768]],237:[[105,769]],238:[[105,770]],239:[[105,776],,{769:7727}],241:[[110,771]],242:[[111,768]],243:[[111,769]],244:[[111,770],,{768:7891,769:7889,771:7895,777:7893}],245:[[111,771],,{769:7757,772:557,776:7759}],246:[[111,776],,{772:555}],248:[,,{769:511}],249:[[117,768]],250:[[117,769]],251:[[117,770]],252:[[117,776],,{768:476,769:472,772:470,780:474}],253:[[121,769]],255:[[121,776]]},256:{256:[[65,772]],257:[[97,772]],258:[[65,774],,{768:7856,769:7854,771:7860,777:7858}],259:[[97,774],,{768:7857,769:7855,771:7861,777:7859}],260:[[65,808]],261:[[97,808]],262:[[67,769]],263:[[99,769]],264:[[67,770]],265:[[99,770]],266:[[67,775]],267:[[99,775]],268:[[67,780]],269:[[99,780]],270:[[68,780]],271:[[100,780]],274:[[69,772],,{768:7700,769:7702}],275:[[101,772],,{768:7701,769:7703}],276:[[69,774]],277:[[101,774]],278:[[69,775]],279:[[101,775]],280:[[69,808]],281:[[101,808]],282:[[69,780]],283:[[101,780]],284:[[71,770]],285:[[103,770]],286:[[71,774]],287:[[103,774]],288:[[71,775]],289:[[103,775]],290:[[71,807]],291:[[103,807]],292:[[72,770]],293:[[104,770]],296:[[73,771]],297:[[105,771]],298:[[73,772]],299:[[105,772]],300:[[73,774]],301:[[105,774]],302:[[73,808]],303:[[105,808]],304:[[73,775]],306:[[73,74],256],307:[[105,106],256],308:[[74,770]],309:[[106,770]],310:[[75,807]],311:[[107,807]],313:[[76,769]],314:[[108,769]],315:[[76,807]],316:[[108,807]],317:[[76,780]],318:[[108,780]],319:[[76,183],256],320:[[108,183],256],323:[[78,769]],324:[[110,769]],325:[[78,807]],326:[[110,807]],327:[[78,780]],328:[[110,780]],329:[[700,110],256],332:[[79,772],,{768:7760,769:7762}],333:[[111,772],,{768:7761,769:7763}],334:[[79,774]],335:[[111,774]],336:[[79,779]],337:[[111,779]],340:[[82,769]],341:[[114,769]],342:[[82,807]],343:[[114,807]],344:[[82,780]],345:[[114,780]],346:[[83,769],,{775:7780}],347:[[115,769],,{775:7781}],348:[[83,770]],349:[[115,770]],350:[[83,807]],351:[[115,807]],352:[[83,780],,{775:7782}],353:[[115,780],,{775:7783}],354:[[84,807]],355:[[116,807]],356:[[84,780]],357:[[116,780]],360:[[85,771],,{769:7800}],361:[[117,771],,{769:7801}],362:[[85,772],,{776:7802}],363:[[117,772],,{776:7803}],364:[[85,774]],365:[[117,774]],366:[[85,778]],367:[[117,778]],368:[[85,779]],369:[[117,779]],370:[[85,808]],371:[[117,808]],372:[[87,770]],373:[[119,770]],374:[[89,770]],375:[[121,770]],376:[[89,776]],377:[[90,769]],378:[[122,769]],379:[[90,775]],380:[[122,775]],381:[[90,780]],382:[[122,780]],383:[[115],256,{775:7835}],416:[[79,795],,{768:7900,769:7898,771:7904,777:7902,803:7906}],417:[[111,795],,{768:7901,769:7899,771:7905,777:7903,803:7907}],431:[[85,795],,{768:7914,769:7912,771:7918,777:7916,803:7920}],432:[[117,795],,{768:7915,769:7913,771:7919,777:7917,803:7921}],439:[,,{780:494}],452:[[68,381],256],453:[[68,382],256],454:[[100,382],256],455:[[76,74],256],456:[[76,106],256],457:[[108,106],256],458:[[78,74],256],459:[[78,106],256],460:[[110,106],256],461:[[65,780]],462:[[97,780]],463:[[73,780]],464:[[105,780]],465:[[79,780]],466:[[111,780]],467:[[85,780]],468:[[117,780]],469:[[220,772]],470:[[252,772]],471:[[220,769]],472:[[252,769]],473:[[220,780]],474:[[252,780]],475:[[220,768]],476:[[252,768]],478:[[196,772]],479:[[228,772]],480:[[550,772]],481:[[551,772]],482:[[198,772]],483:[[230,772]],486:[[71,780]],487:[[103,780]],488:[[75,780]],489:[[107,780]],490:[[79,808],,{772:492}],491:[[111,808],,{772:493}],492:[[490,772]],493:[[491,772]],494:[[439,780]],495:[[658,780]],496:[[106,780]],497:[[68,90],256],498:[[68,122],256],499:[[100,122],256],500:[[71,769]],501:[[103,769]],504:[[78,768]],505:[[110,768]],506:[[197,769]],507:[[229,769]],508:[[198,769]],509:[[230,769]],510:[[216,769]],511:[[248,769]],66045:[,220]},512:{512:[[65,783]],513:[[97,783]],514:[[65,785]],515:[[97,785]],516:[[69,783]],517:[[101,783]],518:[[69,785]],519:[[101,785]],520:[[73,783]],521:[[105,783]],522:[[73,785]],523:[[105,785]],524:[[79,783]],525:[[111,783]],526:[[79,785]],527:[[111,785]],528:[[82,783]],529:[[114,783]],530:[[82,785]],531:[[114,785]],532:[[85,783]],533:[[117,783]],534:[[85,785]],535:[[117,785]],536:[[83,806]],537:[[115,806]],538:[[84,806]],539:[[116,806]],542:[[72,780]],543:[[104,780]],550:[[65,775],,{772:480}],551:[[97,775],,{772:481}],552:[[69,807],,{774:7708}],553:[[101,807],,{774:7709}],554:[[214,772]],555:[[246,772]],556:[[213,772]],557:[[245,772]],558:[[79,775],,{772:560}],559:[[111,775],,{772:561}],560:[[558,772]],561:[[559,772]],562:[[89,772]],563:[[121,772]],658:[,,{780:495}],688:[[104],256],689:[[614],256],690:[[106],256],691:[[114],256],692:[[633],256],693:[[635],256],694:[[641],256],695:[[119],256],696:[[121],256],728:[[32,774],256],729:[[32,775],256],730:[[32,778],256],731:[[32,808],256],732:[[32,771],256],733:[[32,779],256],736:[[611],256],737:[[108],256],738:[[115],256],739:[[120],256],740:[[661],256],66272:[,220]},768:{768:[,230],769:[,230],770:[,230],771:[,230],772:[,230],773:[,230],774:[,230],775:[,230],776:[,230,{769:836}],777:[,230],778:[,230],779:[,230],780:[,230],781:[,230],782:[,230],783:[,230],784:[,230],785:[,230],786:[,230],787:[,230],788:[,230],789:[,232],790:[,220],791:[,220],792:[,220],793:[,220],794:[,232],795:[,216],796:[,220],797:[,220],798:[,220],799:[,220],800:[,220],801:[,202],802:[,202],803:[,220],804:[,220],805:[,220],806:[,220],807:[,202],808:[,202],809:[,220],810:[,220],811:[,220],812:[,220],813:[,220],814:[,220],815:[,220],816:[,220],817:[,220],818:[,220],819:[,220],820:[,1],821:[,1],822:[,1],823:[,1],824:[,1],825:[,220],826:[,220],827:[,220],828:[,220],829:[,230],830:[,230],831:[,230],832:[[768],230],833:[[769],230],834:[,230],835:[[787],230],836:[[776,769],230],837:[,240],838:[,230],839:[,220],840:[,220],841:[,220],842:[,230],843:[,230],844:[,230],845:[,220],846:[,220],848:[,230],849:[,230],850:[,230],851:[,220],852:[,220],853:[,220],854:[,220],855:[,230],856:[,232],857:[,220],858:[,220],859:[,230],860:[,233],861:[,234],862:[,234],863:[,233],864:[,234],865:[,234],866:[,233],867:[,230],868:[,230],869:[,230],870:[,230],871:[,230],872:[,230],873:[,230],874:[,230],875:[,230],876:[,230],877:[,230],878:[,230],879:[,230],884:[[697]],890:[[32,837],256],894:[[59]],900:[[32,769],256],901:[[168,769]],902:[[913,769]],903:[[183]],904:[[917,769]],905:[[919,769]],906:[[921,769]],908:[[927,769]],910:[[933,769]],911:[[937,769]],912:[[970,769]],913:[,,{768:8122,769:902,772:8121,774:8120,787:7944,788:7945,837:8124}],917:[,,{768:8136,769:904,787:7960,788:7961}],919:[,,{768:8138,769:905,787:7976,788:7977,837:8140}],921:[,,{768:8154,769:906,772:8153,774:8152,776:938,787:7992,788:7993}],927:[,,{768:8184,769:908,787:8008,788:8009}],929:[,,{788:8172}],933:[,,{768:8170,769:910,772:8169,774:8168,776:939,788:8025}],937:[,,{768:8186,769:911,787:8040,788:8041,837:8188}],938:[[921,776]],939:[[933,776]],940:[[945,769],,{837:8116}],941:[[949,769]],942:[[951,769],,{837:8132}],943:[[953,769]],944:[[971,769]],945:[,,{768:8048,769:940,772:8113,774:8112,787:7936,788:7937,834:8118,837:8115}],949:[,,{768:8050,769:941,787:7952,788:7953}],951:[,,{768:8052,769:942,787:7968,788:7969,834:8134,837:8131}],953:[,,{768:8054,769:943,772:8145,774:8144,776:970,787:7984,788:7985,834:8150}],959:[,,{768:8056,769:972,787:8e3,788:8001}],961:[,,{787:8164,788:8165}],965:[,,{768:8058,769:973,772:8161,774:8160,776:971,787:8016,788:8017,834:8166}],969:[,,{768:8060,769:974,787:8032,788:8033,834:8182,837:8179}],970:[[953,776],,{768:8146,769:912,834:8151}],971:[[965,776],,{768:8162,769:944,834:8167}],972:[[959,769]],973:[[965,769]],974:[[969,769],,{837:8180}],976:[[946],256],977:[[952],256],978:[[933],256,{769:979,776:980}],979:[[978,769]],980:[[978,776]],981:[[966],256],982:[[960],256],1008:[[954],256],1009:[[961],256],1010:[[962],256],1012:[[920],256],1013:[[949],256],1017:[[931],256],66422:[,230],66423:[,230],66424:[,230],66425:[,230],66426:[,230]},1024:{1024:[[1045,768]],1025:[[1045,776]],1027:[[1043,769]],1030:[,,{776:1031}],1031:[[1030,776]],1036:[[1050,769]],1037:[[1048,768]],1038:[[1059,774]],1040:[,,{774:1232,776:1234}],1043:[,,{769:1027}],1045:[,,{768:1024,774:1238,776:1025}],1046:[,,{774:1217,776:1244}],1047:[,,{776:1246}],1048:[,,{768:1037,772:1250,774:1049,776:1252}],1049:[[1048,774]],1050:[,,{769:1036}],1054:[,,{776:1254}],1059:[,,{772:1262,774:1038,776:1264,779:1266}],1063:[,,{776:1268}],1067:[,,{776:1272}],1069:[,,{776:1260}],1072:[,,{774:1233,776:1235}],1075:[,,{769:1107}],1077:[,,{768:1104,774:1239,776:1105}],1078:[,,{774:1218,776:1245}],1079:[,,{776:1247}],1080:[,,{768:1117,772:1251,774:1081,776:1253}],1081:[[1080,774]],1082:[,,{769:1116}],1086:[,,{776:1255}],1091:[,,{772:1263,774:1118,776:1265,779:1267}],1095:[,,{776:1269}],1099:[,,{776:1273}],1101:[,,{776:1261}],1104:[[1077,768]],1105:[[1077,776]],1107:[[1075,769]],1110:[,,{776:1111}],1111:[[1110,776]],1116:[[1082,769]],1117:[[1080,768]],1118:[[1091,774]],1140:[,,{783:1142}],1141:[,,{783:1143}],1142:[[1140,783]],1143:[[1141,783]],1155:[,230],1156:[,230],1157:[,230],1158:[,230],1159:[,230],1217:[[1046,774]],1218:[[1078,774]],1232:[[1040,774]],1233:[[1072,774]],1234:[[1040,776]],1235:[[1072,776]],1238:[[1045,774]],1239:[[1077,774]],1240:[,,{776:1242}],1241:[,,{776:1243}],1242:[[1240,776]],1243:[[1241,776]],1244:[[1046,776]],1245:[[1078,776]],1246:[[1047,776]],1247:[[1079,776]],1250:[[1048,772]],1251:[[1080,772]],1252:[[1048,776]],1253:[[1080,776]],1254:[[1054,776]],1255:[[1086,776]],1256:[,,{776:1258}],1257:[,,{776:1259}],1258:[[1256,776]],1259:[[1257,776]],1260:[[1069,776]],1261:[[1101,776]],1262:[[1059,772]],1263:[[1091,772]],1264:[[1059,776]],1265:[[1091,776]],1266:[[1059,779]],1267:[[1091,779]],1268:[[1063,776]],1269:[[1095,776]],1272:[[1067,776]],1273:[[1099,776]]},1280:{1415:[[1381,1410],256],1425:[,220],1426:[,230],1427:[,230],1428:[,230],1429:[,230],1430:[,220],1431:[,230],1432:[,230],1433:[,230],1434:[,222],1435:[,220],1436:[,230],1437:[,230],1438:[,230],1439:[,230],1440:[,230],1441:[,230],1442:[,220],1443:[,220],1444:[,220],1445:[,220],1446:[,220],1447:[,220],1448:[,230],1449:[,230],1450:[,220],1451:[,230],1452:[,230],1453:[,222],1454:[,228],1455:[,230],1456:[,10],1457:[,11],1458:[,12],1459:[,13],1460:[,14],1461:[,15],1462:[,16],1463:[,17],1464:[,18],1465:[,19],1466:[,19],1467:[,20],1468:[,21],1469:[,22],1471:[,23],1473:[,24],1474:[,25],1476:[,230],1477:[,220],1479:[,18]},1536:{1552:[,230],1553:[,230],1554:[,230],1555:[,230],1556:[,230],1557:[,230],1558:[,230],1559:[,230],1560:[,30],1561:[,31],1562:[,32],1570:[[1575,1619]],1571:[[1575,1620]],1572:[[1608,1620]],1573:[[1575,1621]],1574:[[1610,1620]],1575:[,,{1619:1570,1620:1571,1621:1573}],1608:[,,{1620:1572}],1610:[,,{1620:1574}],1611:[,27],1612:[,28],1613:[,29],1614:[,30],1615:[,31],1616:[,32],1617:[,33],1618:[,34],1619:[,230],1620:[,230],1621:[,220],1622:[,220],1623:[,230],1624:[,230],1625:[,230],1626:[,230],1627:[,230],1628:[,220],1629:[,230],1630:[,230],1631:[,220],1648:[,35],1653:[[1575,1652],256],1654:[[1608,1652],256],1655:[[1735,1652],256],1656:[[1610,1652],256],1728:[[1749,1620]],1729:[,,{1620:1730}],1730:[[1729,1620]],1746:[,,{1620:1747}],1747:[[1746,1620]],1749:[,,{1620:1728}],1750:[,230],1751:[,230],1752:[,230],1753:[,230],1754:[,230],1755:[,230],1756:[,230],1759:[,230],1760:[,230],1761:[,230],1762:[,230],1763:[,220],1764:[,230],1767:[,230],1768:[,230],1770:[,220],1771:[,230],1772:[,230],1773:[,220]},1792:{1809:[,36],1840:[,230],1841:[,220],1842:[,230],1843:[,230],1844:[,220],1845:[,230],1846:[,230],1847:[,220],1848:[,220],1849:[,220],1850:[,230],1851:[,220],1852:[,220],1853:[,230],1854:[,220],1855:[,230],1856:[,230],1857:[,230],1858:[,220],1859:[,230],1860:[,220],1861:[,230],1862:[,220],1863:[,230],1864:[,220],1865:[,230],1866:[,230],2027:[,230],2028:[,230],2029:[,230],2030:[,230],2031:[,230],2032:[,230],2033:[,230],2034:[,220],2035:[,230]},2048:{2070:[,230],2071:[,230],2072:[,230],2073:[,230],2075:[,230],2076:[,230],2077:[,230],2078:[,230],2079:[,230],2080:[,230],2081:[,230],2082:[,230],2083:[,230],2085:[,230],2086:[,230],2087:[,230],2089:[,230],2090:[,230],2091:[,230],2092:[,230],2093:[,230],2137:[,220],2138:[,220],2139:[,220],2276:[,230],2277:[,230],2278:[,220],2279:[,230],2280:[,230],2281:[,220],2282:[,230],2283:[,230],2284:[,230],2285:[,220],2286:[,220],2287:[,220],2288:[,27],2289:[,28],2290:[,29],2291:[,230],2292:[,230],2293:[,230],2294:[,220],2295:[,230],2296:[,230],2297:[,220],2298:[,220],2299:[,230],2300:[,230],2301:[,230],2302:[,230],2303:[,230]},2304:{2344:[,,{2364:2345}],2345:[[2344,2364]],2352:[,,{2364:2353}],2353:[[2352,2364]],2355:[,,{2364:2356}],2356:[[2355,2364]],2364:[,7],2381:[,9],2385:[,230],2386:[,220],2387:[,230],2388:[,230],2392:[[2325,2364],512],2393:[[2326,2364],512],2394:[[2327,2364],512],2395:[[2332,2364],512],2396:[[2337,2364],512],2397:[[2338,2364],512],2398:[[2347,2364],512],2399:[[2351,2364],512],2492:[,7],2503:[,,{2494:2507,2519:2508}],2507:[[2503,2494]],2508:[[2503,2519]],2509:[,9],2524:[[2465,2492],512],2525:[[2466,2492],512],2527:[[2479,2492],512]},2560:{2611:[[2610,2620],512],2614:[[2616,2620],512],2620:[,7],2637:[,9],2649:[[2582,2620],512],2650:[[2583,2620],512],2651:[[2588,2620],512],2654:[[2603,2620],512],2748:[,7],2765:[,9],68109:[,220],68111:[,230],68152:[,230],68153:[,1],68154:[,220],68159:[,9],68325:[,230],68326:[,220]},2816:{2876:[,7],2887:[,,{2878:2891,2902:2888,2903:2892}],2888:[[2887,2902]],2891:[[2887,2878]],2892:[[2887,2903]],2893:[,9],2908:[[2849,2876],512],2909:[[2850,2876],512],2962:[,,{3031:2964}],2964:[[2962,3031]],3014:[,,{3006:3018,3031:3020}],3015:[,,{3006:3019}],3018:[[3014,3006]],3019:[[3015,3006]],3020:[[3014,3031]],3021:[,9]},3072:{3142:[,,{3158:3144}],3144:[[3142,3158]],3149:[,9],3157:[,84],3158:[,91],3260:[,7],3263:[,,{3285:3264}],3264:[[3263,3285]],3270:[,,{3266:3274,3285:3271,3286:3272}],3271:[[3270,3285]],3272:[[3270,3286]],3274:[[3270,3266],,{3285:3275}],3275:[[3274,3285]],3277:[,9]},3328:{3398:[,,{3390:3402,3415:3404}],3399:[,,{3390:3403}],3402:[[3398,3390]],3403:[[3399,3390]],3404:[[3398,3415]],3405:[,9],3530:[,9],3545:[,,{3530:3546,3535:3548,3551:3550}],3546:[[3545,3530]],3548:[[3545,3535],,{3530:3549}],3549:[[3548,3530]],3550:[[3545,3551]]},3584:{3635:[[3661,3634],256],3640:[,103],3641:[,103],3642:[,9],3656:[,107],3657:[,107],3658:[,107],3659:[,107],3763:[[3789,3762],256],3768:[,118],3769:[,118],3784:[,122],3785:[,122],3786:[,122],3787:[,122],3804:[[3755,3737],256],3805:[[3755,3745],256]},3840:{3852:[[3851],256],3864:[,220],3865:[,220],3893:[,220],3895:[,220],3897:[,216],3907:[[3906,4023],512],3917:[[3916,4023],512],3922:[[3921,4023],512],3927:[[3926,4023],512],3932:[[3931,4023],512],3945:[[3904,4021],512],3953:[,129],3954:[,130],3955:[[3953,3954],512],3956:[,132],3957:[[3953,3956],512],3958:[[4018,3968],512],3959:[[4018,3969],256],3960:[[4019,3968],512],3961:[[4019,3969],256],3962:[,130],3963:[,130],3964:[,130],3965:[,130],3968:[,130],3969:[[3953,3968],512],3970:[,230],3971:[,230],3972:[,9],3974:[,230],3975:[,230],3987:[[3986,4023],512],3997:[[3996,4023],512],4002:[[4001,4023],512],4007:[[4006,4023],512],4012:[[4011,4023],512],4025:[[3984,4021],512],4038:[,220]},4096:{4133:[,,{4142:4134}],4134:[[4133,4142]],4151:[,7],4153:[,9],4154:[,9],4237:[,220],4348:[[4316],256],69702:[,9],69759:[,9],69785:[,,{69818:69786}],69786:[[69785,69818]],69787:[,,{69818:69788}],69788:[[69787,69818]],69797:[,,{69818:69803}],69803:[[69797,69818]],69817:[,9],69818:[,7]},4352:{69888:[,230],69889:[,230],69890:[,230],69934:[[69937,69927]],69935:[[69938,69927]],69937:[,,{69927:69934}],69938:[,,{69927:69935}],69939:[,9],69940:[,9],70003:[,7],70080:[,9]},4608:{70197:[,9],70198:[,7],70377:[,7],70378:[,9]},4864:{4957:[,230],4958:[,230],4959:[,230],70460:[,7],70471:[,,{70462:70475,70487:70476}],70475:[[70471,70462]],70476:[[70471,70487]],70477:[,9],70502:[,230],70503:[,230],70504:[,230],70505:[,230],70506:[,230],70507:[,230],70508:[,230],70512:[,230],70513:[,230],70514:[,230],70515:[,230],70516:[,230]},5120:{70841:[,,{70832:70844,70842:70843,70845:70846}],70843:[[70841,70842]],70844:[[70841,70832]],70846:[[70841,70845]],70850:[,9],70851:[,7]},5376:{71096:[,,{71087:71098}],71097:[,,{71087:71099}],71098:[[71096,71087]],71099:[[71097,71087]],71103:[,9],71104:[,7]},5632:{71231:[,9],71350:[,9],71351:[,7]},5888:{5908:[,9],5940:[,9],6098:[,9],6109:[,230]},6144:{6313:[,228]},6400:{6457:[,222],6458:[,230],6459:[,220]},6656:{6679:[,230],6680:[,220],6752:[,9],6773:[,230],6774:[,230],6775:[,230],6776:[,230],6777:[,230],6778:[,230],6779:[,230],6780:[,230],6783:[,220],6832:[,230],6833:[,230],6834:[,230],6835:[,230],6836:[,230],6837:[,220],6838:[,220],6839:[,220],6840:[,220],6841:[,220],6842:[,220],6843:[,230],6844:[,230],6845:[,220]},6912:{6917:[,,{6965:6918}],6918:[[6917,6965]],6919:[,,{6965:6920}],6920:[[6919,6965]],6921:[,,{6965:6922}],6922:[[6921,6965]],6923:[,,{6965:6924}],6924:[[6923,6965]],6925:[,,{6965:6926}],6926:[[6925,6965]],6929:[,,{6965:6930}],6930:[[6929,6965]],6964:[,7],6970:[,,{6965:6971}],6971:[[6970,6965]],6972:[,,{6965:6973}],6973:[[6972,6965]],6974:[,,{6965:6976}],6975:[,,{6965:6977}],6976:[[6974,6965]],6977:[[6975,6965]],6978:[,,{6965:6979}],6979:[[6978,6965]],6980:[,9],7019:[,230],7020:[,220],7021:[,230],7022:[,230],7023:[,230],7024:[,230],7025:[,230],7026:[,230],7027:[,230],7082:[,9],7083:[,9],7142:[,7],7154:[,9],7155:[,9]},7168:{7223:[,7],7376:[,230],7377:[,230],7378:[,230],7380:[,1],7381:[,220],7382:[,220],7383:[,220],7384:[,220],7385:[,220],7386:[,230],7387:[,230],7388:[,220],7389:[,220],7390:[,220],7391:[,220],7392:[,230],7394:[,1],7395:[,1],7396:[,1],7397:[,1],7398:[,1],7399:[,1],7400:[,1],7405:[,220],7412:[,230],7416:[,230],7417:[,230]},7424:{7468:[[65],256],7469:[[198],256],7470:[[66],256],7472:[[68],256],7473:[[69],256],7474:[[398],256],7475:[[71],256],7476:[[72],256],7477:[[73],256],7478:[[74],256],7479:[[75],256],7480:[[76],256],7481:[[77],256],7482:[[78],256],7484:[[79],256],7485:[[546],256],7486:[[80],256],7487:[[82],256],7488:[[84],256],7489:[[85],256],7490:[[87],256],7491:[[97],256],7492:[[592],256],7493:[[593],256],7494:[[7426],256],7495:[[98],256],7496:[[100],256],7497:[[101],256],7498:[[601],256],7499:[[603],256],7500:[[604],256],7501:[[103],256],7503:[[107],256],7504:[[109],256],7505:[[331],256],7506:[[111],256],7507:[[596],256],7508:[[7446],256],7509:[[7447],256],7510:[[112],256],7511:[[116],256],7512:[[117],256],7513:[[7453],256],7514:[[623],256],7515:[[118],256],7516:[[7461],256],7517:[[946],256],7518:[[947],256],7519:[[948],256],7520:[[966],256],7521:[[967],256],7522:[[105],256],7523:[[114],256],7524:[[117],256],7525:[[118],256],7526:[[946],256],7527:[[947],256],7528:[[961],256],7529:[[966],256],7530:[[967],256],7544:[[1085],256],7579:[[594],256],7580:[[99],256],7581:[[597],256],7582:[[240],256],7583:[[604],256],7584:[[102],256],7585:[[607],256],7586:[[609],256],7587:[[613],256],7588:[[616],256],7589:[[617],256],7590:[[618],256],7591:[[7547],256],7592:[[669],256],7593:[[621],256],7594:[[7557],256],7595:[[671],256],7596:[[625],256],7597:[[624],256],7598:[[626],256],7599:[[627],256],7600:[[628],256],7601:[[629],256],7602:[[632],256],7603:[[642],256],7604:[[643],256],7605:[[427],256],7606:[[649],256],7607:[[650],256],7608:[[7452],256],7609:[[651],256],7610:[[652],256],7611:[[122],256],7612:[[656],256],7613:[[657],256],7614:[[658],256],7615:[[952],256],7616:[,230],7617:[,230],7618:[,220],7619:[,230],7620:[,230],7621:[,230],7622:[,230],7623:[,230],7624:[,230],7625:[,230],7626:[,220],7627:[,230],7628:[,230],7629:[,234],7630:[,214],7631:[,220],7632:[,202],7633:[,230],7634:[,230],7635:[,230],7636:[,230],7637:[,230],7638:[,230],7639:[,230],7640:[,230],7641:[,230],7642:[,230],7643:[,230],7644:[,230],7645:[,230],7646:[,230],7647:[,230],7648:[,230],7649:[,230],7650:[,230],7651:[,230],7652:[,230],7653:[,230],7654:[,230],7655:[,230],7656:[,230],7657:[,230],7658:[,230],7659:[,230],7660:[,230],7661:[,230],7662:[,230],7663:[,230],7664:[,230],7665:[,230],7666:[,230],7667:[,230],7668:[,230],7669:[,230],7676:[,233],7677:[,220],7678:[,230],7679:[,220]},7680:{7680:[[65,805]],7681:[[97,805]],7682:[[66,775]],7683:[[98,775]],7684:[[66,803]],7685:[[98,803]],7686:[[66,817]],7687:[[98,817]],7688:[[199,769]],7689:[[231,769]],7690:[[68,775]],7691:[[100,775]],7692:[[68,803]],7693:[[100,803]],7694:[[68,817]],7695:[[100,817]],7696:[[68,807]],7697:[[100,807]],7698:[[68,813]],7699:[[100,813]],7700:[[274,768]],7701:[[275,768]],7702:[[274,769]],7703:[[275,769]],7704:[[69,813]],7705:[[101,813]],7706:[[69,816]],7707:[[101,816]],7708:[[552,774]],7709:[[553,774]],7710:[[70,775]],7711:[[102,775]],7712:[[71,772]],7713:[[103,772]],7714:[[72,775]],7715:[[104,775]],7716:[[72,803]],7717:[[104,803]],7718:[[72,776]],7719:[[104,776]],7720:[[72,807]],7721:[[104,807]],7722:[[72,814]],7723:[[104,814]],7724:[[73,816]],7725:[[105,816]],7726:[[207,769]],7727:[[239,769]],7728:[[75,769]],7729:[[107,769]],7730:[[75,803]],7731:[[107,803]],7732:[[75,817]],7733:[[107,817]],7734:[[76,803],,{772:7736}],7735:[[108,803],,{772:7737}],7736:[[7734,772]],7737:[[7735,772]],7738:[[76,817]],7739:[[108,817]],7740:[[76,813]],7741:[[108,813]],7742:[[77,769]],7743:[[109,769]],7744:[[77,775]],7745:[[109,775]],7746:[[77,803]],7747:[[109,803]],7748:[[78,775]],7749:[[110,775]],7750:[[78,803]],7751:[[110,803]],7752:[[78,817]],7753:[[110,817]],7754:[[78,813]],7755:[[110,813]],7756:[[213,769]],7757:[[245,769]],7758:[[213,776]],7759:[[245,776]],7760:[[332,768]],7761:[[333,768]],7762:[[332,769]],7763:[[333,769]],7764:[[80,769]],7765:[[112,769]],7766:[[80,775]],7767:[[112,775]],7768:[[82,775]],7769:[[114,775]],7770:[[82,803],,{772:7772}],7771:[[114,803],,{772:7773}],7772:[[7770,772]],7773:[[7771,772]],7774:[[82,817]],7775:[[114,817]],7776:[[83,775]],7777:[[115,775]],7778:[[83,803],,{775:7784}],7779:[[115,803],,{775:7785}],7780:[[346,775]],7781:[[347,775]],7782:[[352,775]],7783:[[353,775]],7784:[[7778,775]],7785:[[7779,775]],7786:[[84,775]],7787:[[116,775]],7788:[[84,803]],7789:[[116,803]],7790:[[84,817]],7791:[[116,817]],7792:[[84,813]],7793:[[116,813]],7794:[[85,804]],7795:[[117,804]],7796:[[85,816]],7797:[[117,816]],7798:[[85,813]],7799:[[117,813]],7800:[[360,769]],7801:[[361,769]],7802:[[362,776]],7803:[[363,776]],7804:[[86,771]],7805:[[118,771]],7806:[[86,803]],7807:[[118,803]],7808:[[87,768]],7809:[[119,768]],7810:[[87,769]],7811:[[119,769]],7812:[[87,776]],7813:[[119,776]],7814:[[87,775]],7815:[[119,775]],7816:[[87,803]],7817:[[119,803]],7818:[[88,775]],7819:[[120,775]],7820:[[88,776]],7821:[[120,776]],7822:[[89,775]],7823:[[121,775]],7824:[[90,770]],7825:[[122,770]],7826:[[90,803]],7827:[[122,803]],7828:[[90,817]],7829:[[122,817]],7830:[[104,817]],7831:[[116,776]],7832:[[119,778]],7833:[[121,778]],7834:[[97,702],256],7835:[[383,775]],7840:[[65,803],,{770:7852,774:7862}],7841:[[97,803],,{770:7853,774:7863}],7842:[[65,777]],7843:[[97,777]],7844:[[194,769]],7845:[[226,769]],7846:[[194,768]],7847:[[226,768]],7848:[[194,777]],7849:[[226,777]],7850:[[194,771]],7851:[[226,771]],7852:[[7840,770]],7853:[[7841,770]],7854:[[258,769]],7855:[[259,769]],7856:[[258,768]],7857:[[259,768]],7858:[[258,777]],7859:[[259,777]],7860:[[258,771]],7861:[[259,771]],7862:[[7840,774]],7863:[[7841,774]],7864:[[69,803],,{770:7878}],7865:[[101,803],,{770:7879}],7866:[[69,777]],7867:[[101,777]],7868:[[69,771]],7869:[[101,771]],7870:[[202,769]],7871:[[234,769]],7872:[[202,768]],7873:[[234,768]],7874:[[202,777]],7875:[[234,777]],7876:[[202,771]],7877:[[234,771]],7878:[[7864,770]],7879:[[7865,770]],7880:[[73,777]],7881:[[105,777]],7882:[[73,803]],7883:[[105,803]],7884:[[79,803],,{770:7896}],7885:[[111,803],,{770:7897}],7886:[[79,777]],7887:[[111,777]],7888:[[212,769]],7889:[[244,769]],7890:[[212,768]],7891:[[244,768]],7892:[[212,777]],7893:[[244,777]],7894:[[212,771]],7895:[[244,771]],7896:[[7884,770]],7897:[[7885,770]],7898:[[416,769]],7899:[[417,769]],7900:[[416,768]],7901:[[417,768]],7902:[[416,777]],7903:[[417,777]],7904:[[416,771]],7905:[[417,771]],7906:[[416,803]],7907:[[417,803]],7908:[[85,803]],7909:[[117,803]],7910:[[85,777]],7911:[[117,777]],7912:[[431,769]],7913:[[432,769]],7914:[[431,768]],7915:[[432,768]],7916:[[431,777]],7917:[[432,777]],7918:[[431,771]],7919:[[432,771]],7920:[[431,803]],7921:[[432,803]],7922:[[89,768]],7923:[[121,768]],7924:[[89,803]],7925:[[121,803]],7926:[[89,777]],7927:[[121,777]],7928:[[89,771]],7929:[[121,771]]},7936:{7936:[[945,787],,{768:7938,769:7940,834:7942,837:8064}],7937:[[945,788],,{768:7939,769:7941,834:7943,837:8065}],7938:[[7936,768],,{837:8066}],7939:[[7937,768],,{837:8067}],7940:[[7936,769],,{837:8068}],7941:[[7937,769],,{837:8069}],7942:[[7936,834],,{837:8070}],7943:[[7937,834],,{837:8071}],7944:[[913,787],,{768:7946,769:7948,834:7950,837:8072}],7945:[[913,788],,{768:7947,769:7949,834:7951,837:8073}],7946:[[7944,768],,{837:8074}],7947:[[7945,768],,{837:8075}],7948:[[7944,769],,{837:8076}],7949:[[7945,769],,{837:8077}],7950:[[7944,834],,{837:8078}],7951:[[7945,834],,{837:8079}],7952:[[949,787],,{768:7954,769:7956}],7953:[[949,788],,{768:7955,769:7957}],7954:[[7952,768]],7955:[[7953,768]],7956:[[7952,769]],7957:[[7953,769]],7960:[[917,787],,{768:7962,769:7964}],7961:[[917,788],,{768:7963,769:7965}],7962:[[7960,768]],7963:[[7961,768]],7964:[[7960,769]],7965:[[7961,769]],7968:[[951,787],,{768:7970,769:7972,834:7974,837:8080}],7969:[[951,788],,{768:7971,769:7973,834:7975,837:8081}],7970:[[7968,768],,{837:8082}],7971:[[7969,768],,{837:8083}],7972:[[7968,769],,{837:8084}],7973:[[7969,769],,{837:8085}],7974:[[7968,834],,{837:8086}],7975:[[7969,834],,{837:8087}],7976:[[919,787],,{768:7978,769:7980,834:7982,837:8088}],7977:[[919,788],,{768:7979,769:7981,834:7983,837:8089}],7978:[[7976,768],,{837:8090}],7979:[[7977,768],,{837:8091}],7980:[[7976,769],,{837:8092}],7981:[[7977,769],,{837:8093}],7982:[[7976,834],,{837:8094}],7983:[[7977,834],,{837:8095}],7984:[[953,787],,{768:7986,769:7988,834:7990}],7985:[[953,788],,{768:7987,769:7989,834:7991}],7986:[[7984,768]],7987:[[7985,768]],7988:[[7984,769]],7989:[[7985,769]],7990:[[7984,834]],7991:[[7985,834]],7992:[[921,787],,{768:7994,769:7996,834:7998}],7993:[[921,788],,{768:7995,769:7997,834:7999}],7994:[[7992,768]],7995:[[7993,768]],7996:[[7992,769]],7997:[[7993,769]],7998:[[7992,834]],7999:[[7993,834]],8e3:[[959,787],,{768:8002,769:8004}],8001:[[959,788],,{768:8003,769:8005}],8002:[[8e3,768]],8003:[[8001,768]],8004:[[8e3,769]],8005:[[8001,769]],8008:[[927,787],,{768:8010,769:8012}],8009:[[927,788],,{768:8011,769:8013}],8010:[[8008,768]],8011:[[8009,768]],8012:[[8008,769]],8013:[[8009,769]],8016:[[965,787],,{768:8018,769:8020,834:8022}],8017:[[965,788],,{768:8019,769:8021,834:8023}],8018:[[8016,768]],8019:[[8017,768]],8020:[[8016,769]],8021:[[8017,769]],8022:[[8016,834]],8023:[[8017,834]],8025:[[933,788],,{768:8027,769:8029,834:8031}],8027:[[8025,768]],8029:[[8025,769]],8031:[[8025,834]],8032:[[969,787],,{768:8034,769:8036,834:8038,837:8096}],8033:[[969,788],,{768:8035,769:8037,834:8039,837:8097}],8034:[[8032,768],,{837:8098}],8035:[[8033,768],,{837:8099}],8036:[[8032,769],,{837:8100}],8037:[[8033,769],,{837:8101}],8038:[[8032,834],,{837:8102}],8039:[[8033,834],,{837:8103}],8040:[[937,787],,{768:8042,769:8044,834:8046,837:8104}],8041:[[937,788],,{768:8043,769:8045,834:8047,837:8105}],8042:[[8040,768],,{837:8106}],8043:[[8041,768],,{837:8107}],8044:[[8040,769],,{837:8108}],8045:[[8041,769],,{837:8109}],8046:[[8040,834],,{837:8110}],8047:[[8041,834],,{837:8111}],8048:[[945,768],,{837:8114}],8049:[[940]],8050:[[949,768]],8051:[[941]],8052:[[951,768],,{837:8130}],8053:[[942]],8054:[[953,768]],8055:[[943]],8056:[[959,768]],8057:[[972]],8058:[[965,768]],8059:[[973]],8060:[[969,768],,{837:8178}],8061:[[974]],8064:[[7936,837]],8065:[[7937,837]],8066:[[7938,837]],8067:[[7939,837]],8068:[[7940,837]],8069:[[7941,837]],8070:[[7942,837]],8071:[[7943,837]],8072:[[7944,837]],8073:[[7945,837]],8074:[[7946,837]],8075:[[7947,837]],8076:[[7948,837]],8077:[[7949,837]],8078:[[7950,837]],8079:[[7951,837]],8080:[[7968,837]],8081:[[7969,837]],8082:[[7970,837]],8083:[[7971,837]],8084:[[7972,837]],8085:[[7973,837]],8086:[[7974,837]],8087:[[7975,837]],8088:[[7976,837]],8089:[[7977,837]],8090:[[7978,837]],8091:[[7979,837]],8092:[[7980,837]],8093:[[7981,837]],8094:[[7982,837]],8095:[[7983,837]],8096:[[8032,837]],8097:[[8033,837]],8098:[[8034,837]],8099:[[8035,837]],8100:[[8036,837]],8101:[[8037,837]],8102:[[8038,837]],8103:[[8039,837]],8104:[[8040,837]],8105:[[8041,837]],8106:[[8042,837]],8107:[[8043,837]],8108:[[8044,837]],8109:[[8045,837]],8110:[[8046,837]],8111:[[8047,837]],8112:[[945,774]],8113:[[945,772]],8114:[[8048,837]],8115:[[945,837]],8116:[[940,837]],8118:[[945,834],,{837:8119}],8119:[[8118,837]],8120:[[913,774]],8121:[[913,772]],8122:[[913,768]],8123:[[902]],8124:[[913,837]],8125:[[32,787],256],8126:[[953]],8127:[[32,787],256,{768:8141,769:8142,834:8143}],8128:[[32,834],256],8129:[[168,834]],8130:[[8052,837]],8131:[[951,837]],8132:[[942,837]],8134:[[951,834],,{837:8135}],8135:[[8134,837]],8136:[[917,768]],8137:[[904]],8138:[[919,768]],8139:[[905]],8140:[[919,837]],8141:[[8127,768]],8142:[[8127,769]],8143:[[8127,834]],8144:[[953,774]],8145:[[953,772]],8146:[[970,768]],8147:[[912]],8150:[[953,834]],8151:[[970,834]],8152:[[921,774]],8153:[[921,772]],8154:[[921,768]],8155:[[906]],8157:[[8190,768]],8158:[[8190,769]],8159:[[8190,834]],8160:[[965,774]],8161:[[965,772]],8162:[[971,768]],8163:[[944]],8164:[[961,787]],8165:[[961,788]],8166:[[965,834]],8167:[[971,834]],8168:[[933,774]],8169:[[933,772]],8170:[[933,768]],8171:[[910]],8172:[[929,788]],8173:[[168,768]],8174:[[901]],8175:[[96]],8178:[[8060,837]],8179:[[969,837]],8180:[[974,837]],8182:[[969,834],,{837:8183}],8183:[[8182,837]],8184:[[927,768]],8185:[[908]],8186:[[937,768]],8187:[[911]],8188:[[937,837]],8189:[[180]],8190:[[32,788],256,{768:8157,769:8158,834:8159}]},8192:{8192:[[8194]],8193:[[8195]],8194:[[32],256],8195:[[32],256],8196:[[32],256],8197:[[32],256],8198:[[32],256],8199:[[32],256],8200:[[32],256],8201:[[32],256],8202:[[32],256],8209:[[8208],256],8215:[[32,819],256],8228:[[46],256],8229:[[46,46],256],8230:[[46,46,46],256],8239:[[32],256],8243:[[8242,8242],256],8244:[[8242,8242,8242],256],8246:[[8245,8245],256],8247:[[8245,8245,8245],256],8252:[[33,33],256],8254:[[32,773],256],8263:[[63,63],256],8264:[[63,33],256],8265:[[33,63],256],8279:[[8242,8242,8242,8242],256],8287:[[32],256],8304:[[48],256],8305:[[105],256],8308:[[52],256],8309:[[53],256],8310:[[54],256],8311:[[55],256],8312:[[56],256],8313:[[57],256],8314:[[43],256],8315:[[8722],256],8316:[[61],256],8317:[[40],256],8318:[[41],256],8319:[[110],256],8320:[[48],256],8321:[[49],256],8322:[[50],256],8323:[[51],256],8324:[[52],256],8325:[[53],256],8326:[[54],256],8327:[[55],256],8328:[[56],256],8329:[[57],256],8330:[[43],256],8331:[[8722],256],8332:[[61],256],8333:[[40],256],8334:[[41],256],8336:[[97],256],8337:[[101],256],8338:[[111],256],8339:[[120],256],8340:[[601],256],8341:[[104],256],8342:[[107],256],8343:[[108],256],8344:[[109],256],8345:[[110],256],8346:[[112],256],8347:[[115],256],8348:[[116],256],8360:[[82,115],256],8400:[,230],8401:[,230],8402:[,1],8403:[,1],8404:[,230],8405:[,230],8406:[,230],8407:[,230],8408:[,1],8409:[,1],8410:[,1],8411:[,230],8412:[,230],8417:[,230],8421:[,1],8422:[,1],8423:[,230],8424:[,220],8425:[,230],8426:[,1],8427:[,1],8428:[,220],8429:[,220],8430:[,220],8431:[,220],8432:[,230]},8448:{8448:[[97,47,99],256],8449:[[97,47,115],256],8450:[[67],256],8451:[[176,67],256],8453:[[99,47,111],256],8454:[[99,47,117],256],8455:[[400],256],8457:[[176,70],256],8458:[[103],256],8459:[[72],256],8460:[[72],256],8461:[[72],256],8462:[[104],256],8463:[[295],256],8464:[[73],256],8465:[[73],256],8466:[[76],256],8467:[[108],256],8469:[[78],256],8470:[[78,111],256],8473:[[80],256],8474:[[81],256],8475:[[82],256],8476:[[82],256],8477:[[82],256],8480:[[83,77],256],8481:[[84,69,76],256],8482:[[84,77],256],8484:[[90],256],8486:[[937]],8488:[[90],256],8490:[[75]],8491:[[197]],8492:[[66],256],8493:[[67],256],8495:[[101],256],8496:[[69],256],8497:[[70],256],8499:[[77],256],8500:[[111],256],8501:[[1488],256],8502:[[1489],256],8503:[[1490],256],8504:[[1491],256],8505:[[105],256],8507:[[70,65,88],256],8508:[[960],256],8509:[[947],256],8510:[[915],256],8511:[[928],256],8512:[[8721],256],8517:[[68],256],8518:[[100],256],8519:[[101],256],8520:[[105],256],8521:[[106],256],8528:[[49,8260,55],256],8529:[[49,8260,57],256],8530:[[49,8260,49,48],256],8531:[[49,8260,51],256],8532:[[50,8260,51],256],8533:[[49,8260,53],256],8534:[[50,8260,53],256],8535:[[51,8260,53],256],8536:[[52,8260,53],256],8537:[[49,8260,54],256],8538:[[53,8260,54],256],8539:[[49,8260,56],256],8540:[[51,8260,56],256],8541:[[53,8260,56],256],8542:[[55,8260,56],256],8543:[[49,8260],256],8544:[[73],256],8545:[[73,73],256],8546:[[73,73,73],256],8547:[[73,86],256],8548:[[86],256],8549:[[86,73],256],8550:[[86,73,73],256],8551:[[86,73,73,73],256],8552:[[73,88],256],8553:[[88],256],8554:[[88,73],256],8555:[[88,73,73],256],8556:[[76],256],8557:[[67],256],8558:[[68],256],8559:[[77],256],8560:[[105],256],8561:[[105,105],256],8562:[[105,105,105],256],8563:[[105,118],256],8564:[[118],256],8565:[[118,105],256],8566:[[118,105,105],256],8567:[[118,105,105,105],256],8568:[[105,120],256],8569:[[120],256],8570:[[120,105],256],8571:[[120,105,105],256],8572:[[108],256],8573:[[99],256],8574:[[100],256],8575:[[109],256],8585:[[48,8260,51],256],8592:[,,{824:8602}],8594:[,,{824:8603}],8596:[,,{824:8622}],8602:[[8592,824]],8603:[[8594,824]],8622:[[8596,824]],8653:[[8656,824]],8654:[[8660,824]],8655:[[8658,824]],8656:[,,{824:8653}],8658:[,,{824:8655}],8660:[,,{824:8654}]},8704:{8707:[,,{824:8708}],8708:[[8707,824]],8712:[,,{824:8713}],8713:[[8712,824]],8715:[,,{824:8716}],8716:[[8715,824]],8739:[,,{824:8740}],8740:[[8739,824]],8741:[,,{824:8742}],8742:[[8741,824]],8748:[[8747,8747],256],8749:[[8747,8747,8747],256],8751:[[8750,8750],256],8752:[[8750,8750,8750],256],8764:[,,{824:8769}],8769:[[8764,824]],8771:[,,{824:8772}],8772:[[8771,824]],8773:[,,{824:8775}],8775:[[8773,824]],8776:[,,{824:8777}],8777:[[8776,824]],8781:[,,{824:8813}],8800:[[61,824]],8801:[,,{824:8802}],8802:[[8801,824]],8804:[,,{824:8816}],8805:[,,{824:8817}],8813:[[8781,824]],8814:[[60,824]],8815:[[62,824]],8816:[[8804,824]],8817:[[8805,824]],8818:[,,{824:8820}],8819:[,,{824:8821}],8820:[[8818,824]],8821:[[8819,824]],8822:[,,{824:8824}],8823:[,,{824:8825}],8824:[[8822,824]],8825:[[8823,824]],8826:[,,{824:8832}],8827:[,,{824:8833}],8828:[,,{824:8928}],8829:[,,{824:8929}],8832:[[8826,824]],8833:[[8827,824]],8834:[,,{824:8836}],8835:[,,{824:8837}],8836:[[8834,824]],8837:[[8835,824]],8838:[,,{824:8840}],8839:[,,{824:8841}],8840:[[8838,824]],8841:[[8839,824]],8849:[,,{824:8930}],8850:[,,{824:8931}],8866:[,,{824:8876}],8872:[,,{824:8877}],8873:[,,{824:8878}],8875:[,,{824:8879}],8876:[[8866,824]],8877:[[8872,824]],8878:[[8873,824]],8879:[[8875,824]],8882:[,,{824:8938}],8883:[,,{824:8939}],8884:[,,{824:8940}],8885:[,,{824:8941}],8928:[[8828,824]],8929:[[8829,824]],8930:[[8849,824]],8931:[[8850,824]],8938:[[8882,824]],8939:[[8883,824]],8940:[[8884,824]],8941:[[8885,824]]},8960:{9001:[[12296]],9002:[[12297]]},9216:{9312:[[49],256],9313:[[50],256],9314:[[51],256],9315:[[52],256],9316:[[53],256],9317:[[54],256],9318:[[55],256],9319:[[56],256],9320:[[57],256],9321:[[49,48],256],9322:[[49,49],256],9323:[[49,50],256],9324:[[49,51],256],9325:[[49,52],256],9326:[[49,53],256],9327:[[49,54],256],9328:[[49,55],256],9329:[[49,56],256],9330:[[49,57],256],9331:[[50,48],256],9332:[[40,49,41],256],9333:[[40,50,41],256],9334:[[40,51,41],256],9335:[[40,52,41],256],9336:[[40,53,41],256],9337:[[40,54,41],256],9338:[[40,55,41],256],9339:[[40,56,41],256],9340:[[40,57,41],256],9341:[[40,49,48,41],256],9342:[[40,49,49,41],256],9343:[[40,49,50,41],256],9344:[[40,49,51,41],256],9345:[[40,49,52,41],256],9346:[[40,49,53,41],256],9347:[[40,49,54,41],256],9348:[[40,49,55,41],256],9349:[[40,49,56,41],256],9350:[[40,49,57,41],256],9351:[[40,50,48,41],256],9352:[[49,46],256],9353:[[50,46],256],9354:[[51,46],256],9355:[[52,46],256],9356:[[53,46],256],9357:[[54,46],256],9358:[[55,46],256],9359:[[56,46],256],9360:[[57,46],256],9361:[[49,48,46],256],9362:[[49,49,46],256],9363:[[49,50,46],256],9364:[[49,51,46],256],9365:[[49,52,46],256],9366:[[49,53,46],256],9367:[[49,54,46],256],9368:[[49,55,46],256],9369:[[49,56,46],256],9370:[[49,57,46],256],9371:[[50,48,46],256],9372:[[40,97,41],256],9373:[[40,98,41],256],9374:[[40,99,41],256],9375:[[40,100,41],256],9376:[[40,101,41],256],9377:[[40,102,41],256],9378:[[40,103,41],256],9379:[[40,104,41],256],9380:[[40,105,41],256],9381:[[40,106,41],256],9382:[[40,107,41],256],9383:[[40,108,41],256],9384:[[40,109,41],256],9385:[[40,110,41],256],9386:[[40,111,41],256],9387:[[40,112,41],256],9388:[[40,113,41],256],9389:[[40,114,41],256],9390:[[40,115,41],256],9391:[[40,116,41],256],9392:[[40,117,41],256],9393:[[40,118,41],256],9394:[[40,119,41],256],9395:[[40,120,41],256],9396:[[40,121,41],256],9397:[[40,122,41],256],9398:[[65],256],9399:[[66],256],9400:[[67],256],9401:[[68],256],9402:[[69],256],9403:[[70],256],9404:[[71],256],9405:[[72],256],9406:[[73],256],9407:[[74],256],9408:[[75],256],9409:[[76],256],9410:[[77],256],9411:[[78],256],9412:[[79],256],9413:[[80],256],9414:[[81],256],9415:[[82],256],9416:[[83],256],9417:[[84],256],9418:[[85],256],9419:[[86],256],9420:[[87],256],9421:[[88],256],9422:[[89],256],9423:[[90],256],9424:[[97],256],9425:[[98],256],9426:[[99],256],9427:[[100],256],9428:[[101],256],9429:[[102],256],9430:[[103],256],9431:[[104],256],9432:[[105],256],9433:[[106],256],9434:[[107],256],9435:[[108],256],9436:[[109],256],9437:[[110],256],9438:[[111],256],9439:[[112],256],9440:[[113],256],9441:[[114],256],9442:[[115],256],9443:[[116],256],9444:[[117],256],9445:[[118],256],9446:[[119],256],9447:[[120],256],9448:[[121],256],9449:[[122],256],9450:[[48],256]},10752:{10764:[[8747,8747,8747,8747],256],10868:[[58,58,61],256],10869:[[61,61],256],10870:[[61,61,61],256],10972:[[10973,824],512]},11264:{11388:[[106],256],11389:[[86],256],11503:[,230],11504:[,230],11505:[,230]},11520:{11631:[[11617],256],11647:[,9],11744:[,230],11745:[,230],11746:[,230],11747:[,230],11748:[,230],11749:[,230],11750:[,230],11751:[,230],11752:[,230],11753:[,230],11754:[,230],11755:[,230],11756:[,230],11757:[,230],11758:[,230],11759:[,230],11760:[,230],11761:[,230],11762:[,230],11763:[,230],11764:[,230],11765:[,230],11766:[,230],11767:[,230],11768:[,230],11769:[,230],11770:[,230],11771:[,230],11772:[,230],11773:[,230],11774:[,230],11775:[,230]},11776:{11935:[[27597],256],12019:[[40863],256]},12032:{12032:[[19968],256],12033:[[20008],256],12034:[[20022],256],12035:[[20031],256],12036:[[20057],256],12037:[[20101],256],12038:[[20108],256],12039:[[20128],256],12040:[[20154],256],12041:[[20799],256],12042:[[20837],256],12043:[[20843],256],12044:[[20866],256],12045:[[20886],256],12046:[[20907],256],12047:[[20960],256],12048:[[20981],256],12049:[[20992],256],12050:[[21147],256],12051:[[21241],256],12052:[[21269],256],12053:[[21274],256],12054:[[21304],256],12055:[[21313],256],12056:[[21340],256],12057:[[21353],256],12058:[[21378],256],12059:[[21430],256],12060:[[21448],256],12061:[[21475],256],12062:[[22231],256],12063:[[22303],256],12064:[[22763],256],12065:[[22786],256],12066:[[22794],256],12067:[[22805],256],12068:[[22823],256],12069:[[22899],256],12070:[[23376],256],12071:[[23424],256],12072:[[23544],256],12073:[[23567],256],12074:[[23586],256],12075:[[23608],256],12076:[[23662],256],12077:[[23665],256],12078:[[24027],256],12079:[[24037],256],12080:[[24049],256],12081:[[24062],256],12082:[[24178],256],12083:[[24186],256],12084:[[24191],256],12085:[[24308],256],12086:[[24318],256],12087:[[24331],256],12088:[[24339],256],12089:[[24400],256],12090:[[24417],256],12091:[[24435],256],12092:[[24515],256],12093:[[25096],256],12094:[[25142],256],12095:[[25163],256],12096:[[25903],256],12097:[[25908],256],12098:[[25991],256],12099:[[26007],256],12100:[[26020],256],12101:[[26041],256],12102:[[26080],256],12103:[[26085],256],12104:[[26352],256],12105:[[26376],256],12106:[[26408],256],12107:[[27424],256],12108:[[27490],256],12109:[[27513],256],12110:[[27571],256],12111:[[27595],256],12112:[[27604],256],12113:[[27611],256],12114:[[27663],256],12115:[[27668],256],12116:[[27700],256],12117:[[28779],256],12118:[[29226],256],12119:[[29238],256],12120:[[29243],256],12121:[[29247],256],12122:[[29255],256],12123:[[29273],256],12124:[[29275],256],12125:[[29356],256],12126:[[29572],256],12127:[[29577],256],12128:[[29916],256],12129:[[29926],256],12130:[[29976],256],12131:[[29983],256],12132:[[29992],256],12133:[[3e4],256],12134:[[30091],256],12135:[[30098],256],12136:[[30326],256],12137:[[30333],256],12138:[[30382],256],12139:[[30399],256],12140:[[30446],256],12141:[[30683],256],12142:[[30690],256],12143:[[30707],256],12144:[[31034],256],12145:[[31160],256],12146:[[31166],256],12147:[[31348],256],12148:[[31435],256],12149:[[31481],256],12150:[[31859],256],12151:[[31992],256],12152:[[32566],256],12153:[[32593],256],12154:[[32650],256],12155:[[32701],256],12156:[[32769],256],12157:[[32780],256],12158:[[32786],256],12159:[[32819],256],12160:[[32895],256],12161:[[32905],256],12162:[[33251],256],12163:[[33258],256],12164:[[33267],256],12165:[[33276],256],12166:[[33292],256],12167:[[33307],256],12168:[[33311],256],12169:[[33390],256],12170:[[33394],256],12171:[[33400],256],12172:[[34381],256],12173:[[34411],256],12174:[[34880],256],12175:[[34892],256],12176:[[34915],256],12177:[[35198],256],12178:[[35211],256],12179:[[35282],256],12180:[[35328],256],12181:[[35895],256],12182:[[35910],256],12183:[[35925],256],12184:[[35960],256],12185:[[35997],256],12186:[[36196],256],12187:[[36208],256],12188:[[36275],256],12189:[[36523],256],12190:[[36554],256],12191:[[36763],256],12192:[[36784],256],12193:[[36789],256],12194:[[37009],256],12195:[[37193],256],12196:[[37318],256],12197:[[37324],256],12198:[[37329],256],12199:[[38263],256],12200:[[38272],256],12201:[[38428],256],12202:[[38582],256],12203:[[38585],256],12204:[[38632],256],12205:[[38737],256],12206:[[38750],256],12207:[[38754],256],12208:[[38761],256],12209:[[38859],256],12210:[[38893],256],12211:[[38899],256],12212:[[38913],256],12213:[[39080],256],12214:[[39131],256],12215:[[39135],256],12216:[[39318],256],12217:[[39321],256],12218:[[39340],256],12219:[[39592],256],12220:[[39640],256],12221:[[39647],256],12222:[[39717],256],12223:[[39727],256],12224:[[39730],256],12225:[[39740],256],12226:[[39770],256],12227:[[40165],256],12228:[[40565],256],12229:[[40575],256],12230:[[40613],256],12231:[[40635],256],12232:[[40643],256],12233:[[40653],256],12234:[[40657],256],12235:[[40697],256],12236:[[40701],256],12237:[[40718],256],12238:[[40723],256],12239:[[40736],256],12240:[[40763],256],12241:[[40778],256],12242:[[40786],256],12243:[[40845],256],12244:[[40860],256],12245:[[40864],256]},12288:{12288:[[32],256],12330:[,218],12331:[,228],12332:[,232],12333:[,222],12334:[,224],12335:[,224],12342:[[12306],256],12344:[[21313],256],12345:[[21316],256],12346:[[21317],256],12358:[,,{12441:12436}],12363:[,,{12441:12364}],12364:[[12363,12441]],12365:[,,{12441:12366}],12366:[[12365,12441]],12367:[,,{12441:12368}],12368:[[12367,12441]],12369:[,,{12441:12370}],12370:[[12369,12441]],12371:[,,{12441:12372}],12372:[[12371,12441]],12373:[,,{12441:12374}],12374:[[12373,12441]],12375:[,,{12441:12376}],12376:[[12375,12441]],12377:[,,{12441:12378}],12378:[[12377,12441]],12379:[,,{12441:12380}],12380:[[12379,12441]],12381:[,,{12441:12382}],12382:[[12381,12441]],12383:[,,{12441:12384}],12384:[[12383,12441]],12385:[,,{12441:12386}],12386:[[12385,12441]],12388:[,,{12441:12389}],12389:[[12388,12441]],12390:[,,{12441:12391}],12391:[[12390,12441]],12392:[,,{12441:12393}],12393:[[12392,12441]],12399:[,,{12441:12400,12442:12401}],12400:[[12399,12441]],12401:[[12399,12442]],12402:[,,{12441:12403,12442:12404}],12403:[[12402,12441]],12404:[[12402,12442]],12405:[,,{12441:12406,12442:12407}],12406:[[12405,12441]],12407:[[12405,12442]],12408:[,,{12441:12409,12442:12410}],12409:[[12408,12441]],12410:[[12408,12442]],12411:[,,{12441:12412,12442:12413}],12412:[[12411,12441]],12413:[[12411,12442]],12436:[[12358,12441]],12441:[,8],12442:[,8],12443:[[32,12441],256],12444:[[32,12442],256],12445:[,,{12441:12446}],12446:[[12445,12441]],12447:[[12424,12426],256],12454:[,,{12441:12532}],12459:[,,{12441:12460}],12460:[[12459,12441]],12461:[,,{12441:12462}],12462:[[12461,12441]],12463:[,,{12441:12464}],12464:[[12463,12441]],12465:[,,{12441:12466}],12466:[[12465,12441]],12467:[,,{12441:12468}],12468:[[12467,12441]],12469:[,,{12441:12470}],12470:[[12469,12441]],12471:[,,{12441:12472}],12472:[[12471,12441]],12473:[,,{12441:12474}],12474:[[12473,12441]],12475:[,,{12441:12476}],12476:[[12475,12441]],12477:[,,{12441:12478}],12478:[[12477,12441]],12479:[,,{12441:12480}],12480:[[12479,12441]],12481:[,,{12441:12482}],12482:[[12481,12441]],12484:[,,{12441:12485}],12485:[[12484,12441]],12486:[,,{12441:12487}],12487:[[12486,12441]],12488:[,,{12441:12489}],12489:[[12488,12441]],12495:[,,{12441:12496,12442:12497}],12496:[[12495,12441]],12497:[[12495,12442]],12498:[,,{12441:12499,12442:12500}],12499:[[12498,12441]],12500:[[12498,12442]],12501:[,,{12441:12502,12442:12503}],12502:[[12501,12441]],12503:[[12501,12442]],12504:[,,{12441:12505,12442:12506}],12505:[[12504,12441]],12506:[[12504,12442]],12507:[,,{12441:12508,12442:12509}],12508:[[12507,12441]],12509:[[12507,12442]],12527:[,,{12441:12535}],12528:[,,{12441:12536}],12529:[,,{12441:12537}],12530:[,,{12441:12538}],12532:[[12454,12441]],12535:[[12527,12441]],12536:[[12528,12441]],12537:[[12529,12441]],12538:[[12530,12441]],12541:[,,{12441:12542}],12542:[[12541,12441]],12543:[[12467,12488],256]},12544:{12593:[[4352],256],12594:[[4353],256],12595:[[4522],256],12596:[[4354],256],12597:[[4524],256],12598:[[4525],256],12599:[[4355],256],12600:[[4356],256],12601:[[4357],256],12602:[[4528],256],12603:[[4529],256],12604:[[4530],256],12605:[[4531],256],12606:[[4532],256],12607:[[4533],256],12608:[[4378],256],12609:[[4358],256],12610:[[4359],256],12611:[[4360],256],12612:[[4385],256],12613:[[4361],256],12614:[[4362],256],12615:[[4363],256],12616:[[4364],256],12617:[[4365],256],12618:[[4366],256],12619:[[4367],256],12620:[[4368],256],12621:[[4369],256],12622:[[4370],256],12623:[[4449],256],12624:[[4450],256],12625:[[4451],256],12626:[[4452],256],12627:[[4453],256],12628:[[4454],256],12629:[[4455],256],12630:[[4456],256],12631:[[4457],256],12632:[[4458],256],12633:[[4459],256],12634:[[4460],256],12635:[[4461],256],12636:[[4462],256],12637:[[4463],256],12638:[[4464],256],12639:[[4465],256],12640:[[4466],256],12641:[[4467],256],12642:[[4468],256],12643:[[4469],256],12644:[[4448],256],12645:[[4372],256],12646:[[4373],256],12647:[[4551],256],12648:[[4552],256],12649:[[4556],256],12650:[[4558],256],12651:[[4563],256],12652:[[4567],256],12653:[[4569],256],12654:[[4380],256],12655:[[4573],256],12656:[[4575],256],12657:[[4381],256],12658:[[4382],256],12659:[[4384],256],12660:[[4386],256],12661:[[4387],256],12662:[[4391],256],12663:[[4393],256],12664:[[4395],256],12665:[[4396],256],12666:[[4397],256],12667:[[4398],256],12668:[[4399],256],12669:[[4402],256],12670:[[4406],256],12671:[[4416],256],12672:[[4423],256],12673:[[4428],256],12674:[[4593],256],12675:[[4594],256],12676:[[4439],256],12677:[[4440],256],12678:[[4441],256],12679:[[4484],256],12680:[[4485],256],12681:[[4488],256],12682:[[4497],256],12683:[[4498],256],12684:[[4500],256],12685:[[4510],256],12686:[[4513],256],12690:[[19968],256],12691:[[20108],256],12692:[[19977],256],12693:[[22235],256],12694:[[19978],256],12695:[[20013],256],12696:[[19979],256],12697:[[30002],256],12698:[[20057],256],12699:[[19993],256],12700:[[19969],256],12701:[[22825],256],12702:[[22320],256],12703:[[20154],256]},12800:{12800:[[40,4352,41],256],12801:[[40,4354,41],256],12802:[[40,4355,41],256],12803:[[40,4357,41],256],12804:[[40,4358,41],256],12805:[[40,4359,41],256],12806:[[40,4361,41],256],12807:[[40,4363,41],256],12808:[[40,4364,41],256],12809:[[40,4366,41],256],12810:[[40,4367,41],256],12811:[[40,4368,41],256],12812:[[40,4369,41],256],12813:[[40,4370,41],256],12814:[[40,4352,4449,41],256],12815:[[40,4354,4449,41],256],12816:[[40,4355,4449,41],256],12817:[[40,4357,4449,41],256],12818:[[40,4358,4449,41],256],12819:[[40,4359,4449,41],256],12820:[[40,4361,4449,41],256],12821:[[40,4363,4449,41],256],12822:[[40,4364,4449,41],256],12823:[[40,4366,4449,41],256],12824:[[40,4367,4449,41],256],12825:[[40,4368,4449,41],256],12826:[[40,4369,4449,41],256],12827:[[40,4370,4449,41],256],12828:[[40,4364,4462,41],256],12829:[[40,4363,4457,4364,4453,4523,41],256],12830:[[40,4363,4457,4370,4462,41],256],12832:[[40,19968,41],256],12833:[[40,20108,41],256],12834:[[40,19977,41],256],12835:[[40,22235,41],256],12836:[[40,20116,41],256],12837:[[40,20845,41],256],12838:[[40,19971,41],256],12839:[[40,20843,41],256],12840:[[40,20061,41],256],12841:[[40,21313,41],256],12842:[[40,26376,41],256],12843:[[40,28779,41],256],12844:[[40,27700,41],256],12845:[[40,26408,41],256],12846:[[40,37329,41],256],12847:[[40,22303,41],256],12848:[[40,26085,41],256],12849:[[40,26666,41],256],12850:[[40,26377,41],256],12851:[[40,31038,41],256],12852:[[40,21517,41],256],12853:[[40,29305,41],256],12854:[[40,36001,41],256],12855:[[40,31069,41],256],12856:[[40,21172,41],256],12857:[[40,20195,41],256],12858:[[40,21628,41],256],12859:[[40,23398,41],256],12860:[[40,30435,41],256],12861:[[40,20225,41],256],12862:[[40,36039,41],256],12863:[[40,21332,41],256],12864:[[40,31085,41],256],12865:[[40,20241,41],256],12866:[[40,33258,41],256],12867:[[40,33267,41],256],12868:[[21839],256],12869:[[24188],256],12870:[[25991],256],12871:[[31631],256],12880:[[80,84,69],256],12881:[[50,49],256],12882:[[50,50],256],12883:[[50,51],256],12884:[[50,52],256],12885:[[50,53],256],12886:[[50,54],256],12887:[[50,55],256],12888:[[50,56],256],12889:[[50,57],256],12890:[[51,48],256],12891:[[51,49],256],12892:[[51,50],256],12893:[[51,51],256],12894:[[51,52],256],12895:[[51,53],256],12896:[[4352],256],12897:[[4354],256],12898:[[4355],256],12899:[[4357],256],12900:[[4358],256],12901:[[4359],256],12902:[[4361],256],12903:[[4363],256],12904:[[4364],256],12905:[[4366],256],12906:[[4367],256],12907:[[4368],256],12908:[[4369],256],12909:[[4370],256],12910:[[4352,4449],256],12911:[[4354,4449],256],12912:[[4355,4449],256],12913:[[4357,4449],256],12914:[[4358,4449],256],12915:[[4359,4449],256],12916:[[4361,4449],256],12917:[[4363,4449],256],12918:[[4364,4449],256],12919:[[4366,4449],256],12920:[[4367,4449],256],12921:[[4368,4449],256],12922:[[4369,4449],256],12923:[[4370,4449],256],12924:[[4366,4449,4535,4352,4457],256],12925:[[4364,4462,4363,4468],256],12926:[[4363,4462],256],12928:[[19968],256],12929:[[20108],256],12930:[[19977],256],12931:[[22235],256],12932:[[20116],256],12933:[[20845],256],12934:[[19971],256],12935:[[20843],256],12936:[[20061],256],12937:[[21313],256],12938:[[26376],256],12939:[[28779],256],12940:[[27700],256],12941:[[26408],256],12942:[[37329],256],12943:[[22303],256],12944:[[26085],256],12945:[[26666],256],12946:[[26377],256],12947:[[31038],256],12948:[[21517],256],12949:[[29305],256],12950:[[36001],256],12951:[[31069],256],12952:[[21172],256],12953:[[31192],256],12954:[[30007],256],12955:[[22899],256],12956:[[36969],256],12957:[[20778],256],12958:[[21360],256],12959:[[27880],256],12960:[[38917],256],12961:[[20241],256],12962:[[20889],256],12963:[[27491],256],12964:[[19978],256],12965:[[20013],256],12966:[[19979],256],12967:[[24038],256],12968:[[21491],256],12969:[[21307],256],12970:[[23447],256],12971:[[23398],256],12972:[[30435],256],12973:[[20225],256],12974:[[36039],256],12975:[[21332],256],12976:[[22812],256],12977:[[51,54],256],12978:[[51,55],256],12979:[[51,56],256],12980:[[51,57],256],12981:[[52,48],256],12982:[[52,49],256],12983:[[52,50],256],12984:[[52,51],256],12985:[[52,52],256],12986:[[52,53],256],12987:[[52,54],256],12988:[[52,55],256],12989:[[52,56],256],12990:[[52,57],256],12991:[[53,48],256],12992:[[49,26376],256],12993:[[50,26376],256],12994:[[51,26376],256],12995:[[52,26376],256],12996:[[53,26376],256],12997:[[54,26376],256],12998:[[55,26376],256],12999:[[56,26376],256],13e3:[[57,26376],256],13001:[[49,48,26376],256],13002:[[49,49,26376],256],13003:[[49,50,26376],256],13004:[[72,103],256],13005:[[101,114,103],256],13006:[[101,86],256],13007:[[76,84,68],256],13008:[[12450],256],13009:[[12452],256],13010:[[12454],256],13011:[[12456],256],13012:[[12458],256],13013:[[12459],256],13014:[[12461],256],13015:[[12463],256],13016:[[12465],256],13017:[[12467],256],13018:[[12469],256],13019:[[12471],256],13020:[[12473],256],13021:[[12475],256],13022:[[12477],256],13023:[[12479],256],13024:[[12481],256],13025:[[12484],256],13026:[[12486],256],13027:[[12488],256],13028:[[12490],256],13029:[[12491],256],13030:[[12492],256],13031:[[12493],256],13032:[[12494],256],13033:[[12495],256],13034:[[12498],256],13035:[[12501],256],13036:[[12504],256],13037:[[12507],256],13038:[[12510],256],13039:[[12511],256],13040:[[12512],256],13041:[[12513],256],13042:[[12514],256],13043:[[12516],256],13044:[[12518],256],13045:[[12520],256],13046:[[12521],256],13047:[[12522],256],13048:[[12523],256],13049:[[12524],256],13050:[[12525],256],13051:[[12527],256],13052:[[12528],256],13053:[[12529],256],13054:[[12530],256]},13056:{13056:[[12450,12497,12540,12488],256],13057:[[12450,12523,12501,12449],256],13058:[[12450,12531,12506,12450],256],13059:[[12450,12540,12523],256],13060:[[12452,12491,12531,12464],256],13061:[[12452,12531,12481],256],13062:[[12454,12457,12531],256],13063:[[12456,12473,12463,12540,12489],256],13064:[[12456,12540,12459,12540],256],13065:[[12458,12531,12473],256],13066:[[12458,12540,12512],256],13067:[[12459,12452,12522],256],13068:[[12459,12521,12483,12488],256],13069:[[12459,12525,12522,12540],256],13070:[[12460,12525,12531],256],13071:[[12460,12531,12510],256],13072:[[12462,12460],256],13073:[[12462,12491,12540],256],13074:[[12461,12517,12522,12540],256],13075:[[12462,12523,12480,12540],256],13076:[[12461,12525],256],13077:[[12461,12525,12464,12521,12512],256],13078:[[12461,12525,12513,12540,12488,12523],256],13079:[[12461,12525,12527,12483,12488],256],13080:[[12464,12521,12512],256],13081:[[12464,12521,12512,12488,12531],256],13082:[[12463,12523,12476,12452,12525],256],13083:[[12463,12525,12540,12493],256],13084:[[12465,12540,12473],256],13085:[[12467,12523,12490],256],13086:[[12467,12540,12509],256],13087:[[12469,12452,12463,12523],256],13088:[[12469,12531,12481,12540,12512],256],13089:[[12471,12522,12531,12464],256],13090:[[12475,12531,12481],256],13091:[[12475,12531,12488],256],13092:[[12480,12540,12473],256],13093:[[12487,12471],256],13094:[[12489,12523],256],13095:[[12488,12531],256],13096:[[12490,12494],256],13097:[[12494,12483,12488],256],13098:[[12495,12452,12484],256],13099:[[12497,12540,12475,12531,12488],256],13100:[[12497,12540,12484],256],13101:[[12496,12540,12524,12523],256],13102:[[12500,12450,12473,12488,12523],256],13103:[[12500,12463,12523],256],13104:[[12500,12467],256],13105:[[12499,12523],256],13106:[[12501,12449,12521,12483,12489],256],13107:[[12501,12451,12540,12488],256],13108:[[12502,12483,12471,12455,12523],256],13109:[[12501,12521,12531],256],13110:[[12504,12463,12479,12540,12523],256],13111:[[12506,12477],256],13112:[[12506,12491,12498],256],13113:[[12504,12523,12484],256],13114:[[12506,12531,12473],256],13115:[[12506,12540,12472],256],13116:[[12505,12540,12479],256],13117:[[12509,12452,12531,12488],256],13118:[[12508,12523,12488],256],13119:[[12507,12531],256],13120:[[12509,12531,12489],256],13121:[[12507,12540,12523],256],13122:[[12507,12540,12531],256],13123:[[12510,12452,12463,12525],256],13124:[[12510,12452,12523],256],13125:[[12510,12483,12495],256],13126:[[12510,12523,12463],256],13127:[[12510,12531,12471,12519,12531],256],13128:[[12511,12463,12525,12531],256],13129:[[12511,12522],256],13130:[[12511,12522,12496,12540,12523],256],13131:[[12513,12460],256],13132:[[12513,12460,12488,12531],256],13133:[[12513,12540,12488,12523],256],13134:[[12516,12540,12489],256],13135:[[12516,12540,12523],256],13136:[[12518,12450,12531],256],13137:[[12522,12483,12488,12523],256],13138:[[12522,12521],256],13139:[[12523,12500,12540],256],13140:[[12523,12540,12502,12523],256],13141:[[12524,12512],256],13142:[[12524,12531,12488,12466,12531],256],13143:[[12527,12483,12488],256],13144:[[48,28857],256],13145:[[49,28857],256],13146:[[50,28857],256],13147:[[51,28857],256],13148:[[52,28857],256],13149:[[53,28857],256],13150:[[54,28857],256],13151:[[55,28857],256],13152:[[56,28857],256],13153:[[57,28857],256],13154:[[49,48,28857],256],13155:[[49,49,28857],256],13156:[[49,50,28857],256],13157:[[49,51,28857],256],13158:[[49,52,28857],256],13159:[[49,53,28857],256],13160:[[49,54,28857],256],13161:[[49,55,28857],256],13162:[[49,56,28857],256],13163:[[49,57,28857],256],13164:[[50,48,28857],256],13165:[[50,49,28857],256],13166:[[50,50,28857],256],13167:[[50,51,28857],256],13168:[[50,52,28857],256],13169:[[104,80,97],256],13170:[[100,97],256],13171:[[65,85],256],13172:[[98,97,114],256],13173:[[111,86],256],13174:[[112,99],256],13175:[[100,109],256],13176:[[100,109,178],256],13177:[[100,109,179],256],13178:[[73,85],256],13179:[[24179,25104],256],13180:[[26157,21644],256],13181:[[22823,27491],256],13182:[[26126,27835],256],13183:[[26666,24335,20250,31038],256],13184:[[112,65],256],13185:[[110,65],256],13186:[[956,65],256],13187:[[109,65],256],13188:[[107,65],256],13189:[[75,66],256],13190:[[77,66],256],13191:[[71,66],256],13192:[[99,97,108],256],13193:[[107,99,97,108],256],13194:[[112,70],256],13195:[[110,70],256],13196:[[956,70],256],13197:[[956,103],256],13198:[[109,103],256],13199:[[107,103],256],13200:[[72,122],256],13201:[[107,72,122],256],13202:[[77,72,122],256],13203:[[71,72,122],256],13204:[[84,72,122],256],13205:[[956,8467],256],13206:[[109,8467],256],13207:[[100,8467],256],13208:[[107,8467],256],13209:[[102,109],256],13210:[[110,109],256],13211:[[956,109],256],13212:[[109,109],256],13213:[[99,109],256],13214:[[107,109],256],13215:[[109,109,178],256],13216:[[99,109,178],256],13217:[[109,178],256],13218:[[107,109,178],256],13219:[[109,109,179],256],13220:[[99,109,179],256],13221:[[109,179],256],13222:[[107,109,179],256],13223:[[109,8725,115],256],13224:[[109,8725,115,178],256],13225:[[80,97],256],13226:[[107,80,97],256],13227:[[77,80,97],256],13228:[[71,80,97],256],13229:[[114,97,100],256],13230:[[114,97,100,8725,115],256],13231:[[114,97,100,8725,115,178],256],13232:[[112,115],256],13233:[[110,115],256],13234:[[956,115],256],13235:[[109,115],256],13236:[[112,86],256],13237:[[110,86],256],13238:[[956,86],256],13239:[[109,86],256],13240:[[107,86],256],13241:[[77,86],256],13242:[[112,87],256],13243:[[110,87],256],13244:[[956,87],256],13245:[[109,87],256],13246:[[107,87],256],13247:[[77,87],256],13248:[[107,937],256],13249:[[77,937],256],13250:[[97,46,109,46],256],13251:[[66,113],256],13252:[[99,99],256],13253:[[99,100],256],13254:[[67,8725,107,103],256],13255:[[67,111,46],256],13256:[[100,66],256],13257:[[71,121],256],13258:[[104,97],256],13259:[[72,80],256],13260:[[105,110],256],13261:[[75,75],256],13262:[[75,77],256],13263:[[107,116],256],13264:[[108,109],256],13265:[[108,110],256],13266:[[108,111,103],256],13267:[[108,120],256],13268:[[109,98],256],13269:[[109,105,108],256],13270:[[109,111,108],256],13271:[[80,72],256],13272:[[112,46,109,46],256],13273:[[80,80,77],256],13274:[[80,82],256],13275:[[115,114],256],13276:[[83,118],256],13277:[[87,98],256],13278:[[86,8725,109],256],13279:[[65,8725,109],256],13280:[[49,26085],256],13281:[[50,26085],256],13282:[[51,26085],256],13283:[[52,26085],256],13284:[[53,26085],256],13285:[[54,26085],256],13286:[[55,26085],256],13287:[[56,26085],256],13288:[[57,26085],256],13289:[[49,48,26085],256],13290:[[49,49,26085],256],13291:[[49,50,26085],256],13292:[[49,51,26085],256],13293:[[49,52,26085],256],13294:[[49,53,26085],256],13295:[[49,54,26085],256],13296:[[49,55,26085],256],13297:[[49,56,26085],256],13298:[[49,57,26085],256],13299:[[50,48,26085],256],13300:[[50,49,26085],256],13301:[[50,50,26085],256],13302:[[50,51,26085],256],13303:[[50,52,26085],256],13304:[[50,53,26085],256],13305:[[50,54,26085],256],13306:[[50,55,26085],256],13307:[[50,56,26085],256],13308:[[50,57,26085],256],13309:[[51,48,26085],256],13310:[[51,49,26085],256],13311:[[103,97,108],256]},27136:{92912:[,1],92913:[,1],92914:[,1],92915:[,1],92916:[,1]},27392:{92976:[,230],92977:[,230],92978:[,230],92979:[,230],92980:[,230],92981:[,230],92982:[,230]},42496:{42607:[,230],42612:[,230],42613:[,230],42614:[,230],42615:[,230],42616:[,230],42617:[,230],42618:[,230],42619:[,230],42620:[,230],42621:[,230],42652:[[1098],256],42653:[[1100],256],42655:[,230],42736:[,230],42737:[,230]},42752:{42864:[[42863],256],43e3:[[294],256],43001:[[339],256]},43008:{43014:[,9],43204:[,9],43232:[,230],43233:[,230],43234:[,230],43235:[,230],43236:[,230],43237:[,230],43238:[,230],43239:[,230],43240:[,230],43241:[,230],43242:[,230],43243:[,230],43244:[,230],43245:[,230],43246:[,230],43247:[,230],43248:[,230],43249:[,230]},43264:{43307:[,220],43308:[,220],43309:[,220],43347:[,9],43443:[,7],43456:[,9]},43520:{43696:[,230],43698:[,230],43699:[,230],43700:[,220],43703:[,230],43704:[,230],43710:[,230],43711:[,230],43713:[,230],43766:[,9]},43776:{43868:[[42791],256],43869:[[43831],256],43870:[[619],256],43871:[[43858],256],44013:[,9]},48128:{113822:[,1]},53504:{119134:[[119127,119141],512],119135:[[119128,119141],512],119136:[[119135,119150],512],119137:[[119135,119151],512],119138:[[119135,119152],512],119139:[[119135,119153],512],119140:[[119135,119154],512],119141:[,216],119142:[,216],119143:[,1],119144:[,1],119145:[,1],119149:[,226],119150:[,216],119151:[,216],119152:[,216],119153:[,216],119154:[,216],119163:[,220],119164:[,220],119165:[,220],119166:[,220],119167:[,220],119168:[,220],119169:[,220],119170:[,220],119173:[,230],119174:[,230],119175:[,230],119176:[,230],119177:[,230],119178:[,220],119179:[,220],119210:[,230],119211:[,230],119212:[,230],119213:[,230],119227:[[119225,119141],512],119228:[[119226,119141],512],119229:[[119227,119150],512],119230:[[119228,119150],512],119231:[[119227,119151],512],119232:[[119228,119151],512]},53760:{119362:[,230],119363:[,230],119364:[,230]},54272:{119808:[[65],256],119809:[[66],256],119810:[[67],256],119811:[[68],256],119812:[[69],256],119813:[[70],256],119814:[[71],256],119815:[[72],256],119816:[[73],256],119817:[[74],256],119818:[[75],256],119819:[[76],256],119820:[[77],256],119821:[[78],256],119822:[[79],256],119823:[[80],256],119824:[[81],256],119825:[[82],256],119826:[[83],256],119827:[[84],256],119828:[[85],256],119829:[[86],256],119830:[[87],256],119831:[[88],256],119832:[[89],256],119833:[[90],256],119834:[[97],256],119835:[[98],256],119836:[[99],256],119837:[[100],256],119838:[[101],256],119839:[[102],256],119840:[[103],256],119841:[[104],256],119842:[[105],256],119843:[[106],256],119844:[[107],256],119845:[[108],256],119846:[[109],256],119847:[[110],256],119848:[[111],256],119849:[[112],256],119850:[[113],256],119851:[[114],256],119852:[[115],256],119853:[[116],256],119854:[[117],256],119855:[[118],256],119856:[[119],256],119857:[[120],256],119858:[[121],256],119859:[[122],256],119860:[[65],256],119861:[[66],256],119862:[[67],256],119863:[[68],256],119864:[[69],256],119865:[[70],256],119866:[[71],256],119867:[[72],256],119868:[[73],256],119869:[[74],256],119870:[[75],256],119871:[[76],256],119872:[[77],256],119873:[[78],256],119874:[[79],256],119875:[[80],256],119876:[[81],256],119877:[[82],256],119878:[[83],256],119879:[[84],256],119880:[[85],256],119881:[[86],256],119882:[[87],256],119883:[[88],256],119884:[[89],256],119885:[[90],256],119886:[[97],256],119887:[[98],256],119888:[[99],256],119889:[[100],256],119890:[[101],256],119891:[[102],256],119892:[[103],256],119894:[[105],256],119895:[[106],256],119896:[[107],256],119897:[[108],256],119898:[[109],256],119899:[[110],256],119900:[[111],256],119901:[[112],256],119902:[[113],256],119903:[[114],256],119904:[[115],256],119905:[[116],256],119906:[[117],256],119907:[[118],256],119908:[[119],256],119909:[[120],256],119910:[[121],256],119911:[[122],256],119912:[[65],256],119913:[[66],256],119914:[[67],256],119915:[[68],256],119916:[[69],256],119917:[[70],256],119918:[[71],256],119919:[[72],256],119920:[[73],256],119921:[[74],256],119922:[[75],256],119923:[[76],256],119924:[[77],256],119925:[[78],256],119926:[[79],256],119927:[[80],256],119928:[[81],256],119929:[[82],256],119930:[[83],256],119931:[[84],256],119932:[[85],256],119933:[[86],256],119934:[[87],256],119935:[[88],256],119936:[[89],256],119937:[[90],256],119938:[[97],256],119939:[[98],256],119940:[[99],256],119941:[[100],256],119942:[[101],256],119943:[[102],256],119944:[[103],256],119945:[[104],256],119946:[[105],256],119947:[[106],256],119948:[[107],256],119949:[[108],256],119950:[[109],256],119951:[[110],256],119952:[[111],256],119953:[[112],256],119954:[[113],256],119955:[[114],256],119956:[[115],256],119957:[[116],256],119958:[[117],256],119959:[[118],256],119960:[[119],256],119961:[[120],256],119962:[[121],256],119963:[[122],256],119964:[[65],256],119966:[[67],256],119967:[[68],256],119970:[[71],256],119973:[[74],256],119974:[[75],256],119977:[[78],256],119978:[[79],256],119979:[[80],256],119980:[[81],256],119982:[[83],256],119983:[[84],256],119984:[[85],256],119985:[[86],256],119986:[[87],256],119987:[[88],256],119988:[[89],256],119989:[[90],256],119990:[[97],256],119991:[[98],256],119992:[[99],256],119993:[[100],256],119995:[[102],256],119997:[[104],256],119998:[[105],256],119999:[[106],256],12e4:[[107],256],120001:[[108],256],120002:[[109],256],120003:[[110],256],120005:[[112],256],120006:[[113],256],120007:[[114],256],120008:[[115],256],120009:[[116],256],120010:[[117],256],120011:[[118],256],120012:[[119],256],120013:[[120],256],120014:[[121],256],120015:[[122],256],120016:[[65],256],120017:[[66],256],120018:[[67],256],120019:[[68],256],120020:[[69],256],120021:[[70],256],120022:[[71],256],120023:[[72],256],120024:[[73],256],120025:[[74],256],120026:[[75],256],120027:[[76],256],120028:[[77],256],120029:[[78],256],120030:[[79],256],120031:[[80],256],120032:[[81],256],120033:[[82],256],120034:[[83],256],120035:[[84],256],120036:[[85],256],120037:[[86],256],120038:[[87],256],120039:[[88],256],120040:[[89],256],120041:[[90],256],120042:[[97],256],120043:[[98],256],120044:[[99],256],120045:[[100],256],120046:[[101],256],120047:[[102],256],120048:[[103],256],120049:[[104],256],120050:[[105],256],120051:[[106],256],120052:[[107],256],120053:[[108],256],120054:[[109],256],120055:[[110],256],120056:[[111],256],120057:[[112],256],120058:[[113],256],120059:[[114],256],120060:[[115],256],120061:[[116],256],120062:[[117],256],120063:[[118],256]},54528:{120064:[[119],256],120065:[[120],256],120066:[[121],256],120067:[[122],256],120068:[[65],256],120069:[[66],256],120071:[[68],256],120072:[[69],256],120073:[[70],256],120074:[[71],256],120077:[[74],256],120078:[[75],256],120079:[[76],256],120080:[[77],256],120081:[[78],256],120082:[[79],256],120083:[[80],256],120084:[[81],256],120086:[[83],256],120087:[[84],256],120088:[[85],256],120089:[[86],256],120090:[[87],256],120091:[[88],256],120092:[[89],256],120094:[[97],256],120095:[[98],256],120096:[[99],256],120097:[[100],256],120098:[[101],256],120099:[[102],256],120100:[[103],256],120101:[[104],256],120102:[[105],256],120103:[[106],256],120104:[[107],256],120105:[[108],256],120106:[[109],256],120107:[[110],256],120108:[[111],256],120109:[[112],256],120110:[[113],256],120111:[[114],256],120112:[[115],256],120113:[[116],256],120114:[[117],256],120115:[[118],256],120116:[[119],256],120117:[[120],256],120118:[[121],256],120119:[[122],256],120120:[[65],256],120121:[[66],256],120123:[[68],256],120124:[[69],256],120125:[[70],256],120126:[[71],256],120128:[[73],256],120129:[[74],256],120130:[[75],256],120131:[[76],256],120132:[[77],256],120134:[[79],256],120138:[[83],256],120139:[[84],256],120140:[[85],256],120141:[[86],256],120142:[[87],256],120143:[[88],256],120144:[[89],256],120146:[[97],256],120147:[[98],256],120148:[[99],256],120149:[[100],256],120150:[[101],256],120151:[[102],256],120152:[[103],256],120153:[[104],256],120154:[[105],256],120155:[[106],256],120156:[[107],256],120157:[[108],256],120158:[[109],256],120159:[[110],256],120160:[[111],256],120161:[[112],256],120162:[[113],256],120163:[[114],256],120164:[[115],256],120165:[[116],256],120166:[[117],256],120167:[[118],256],120168:[[119],256],120169:[[120],256],120170:[[121],256],120171:[[122],256],120172:[[65],256],120173:[[66],256],120174:[[67],256],120175:[[68],256],120176:[[69],256],120177:[[70],256],120178:[[71],256],120179:[[72],256],120180:[[73],256],120181:[[74],256],120182:[[75],256],120183:[[76],256],120184:[[77],256],120185:[[78],256],120186:[[79],256],120187:[[80],256],120188:[[81],256],120189:[[82],256],120190:[[83],256],120191:[[84],256],120192:[[85],256],120193:[[86],256],120194:[[87],256],120195:[[88],256],120196:[[89],256],120197:[[90],256],120198:[[97],256],120199:[[98],256],120200:[[99],256],120201:[[100],256],120202:[[101],256],120203:[[102],256],120204:[[103],256],120205:[[104],256],120206:[[105],256],120207:[[106],256],120208:[[107],256],120209:[[108],256],120210:[[109],256],120211:[[110],256],120212:[[111],256],120213:[[112],256],120214:[[113],256],120215:[[114],256],120216:[[115],256],120217:[[116],256],120218:[[117],256],120219:[[118],256],120220:[[119],256],120221:[[120],256],120222:[[121],256],120223:[[122],256],120224:[[65],256],120225:[[66],256],120226:[[67],256],120227:[[68],256],120228:[[69],256],120229:[[70],256],120230:[[71],256],120231:[[72],256],120232:[[73],256],120233:[[74],256],120234:[[75],256],120235:[[76],256],120236:[[77],256],120237:[[78],256],120238:[[79],256],120239:[[80],256],120240:[[81],256],120241:[[82],256],120242:[[83],256],120243:[[84],256],120244:[[85],256],120245:[[86],256],120246:[[87],256],120247:[[88],256],120248:[[89],256],120249:[[90],256],120250:[[97],256],120251:[[98],256],120252:[[99],256],120253:[[100],256],120254:[[101],256],120255:[[102],256],120256:[[103],256],120257:[[104],256],120258:[[105],256],120259:[[106],256],120260:[[107],256],120261:[[108],256],120262:[[109],256],120263:[[110],256],120264:[[111],256],120265:[[112],256],120266:[[113],256],120267:[[114],256],120268:[[115],256],120269:[[116],256],120270:[[117],256],120271:[[118],256],120272:[[119],256],120273:[[120],256],120274:[[121],256],120275:[[122],256],120276:[[65],256],120277:[[66],256],120278:[[67],256],120279:[[68],256],120280:[[69],256],120281:[[70],256],120282:[[71],256],120283:[[72],256],120284:[[73],256],120285:[[74],256],120286:[[75],256],120287:[[76],256],120288:[[77],256],120289:[[78],256],120290:[[79],256],120291:[[80],256],120292:[[81],256],120293:[[82],256],120294:[[83],256],120295:[[84],256],120296:[[85],256],120297:[[86],256],120298:[[87],256],120299:[[88],256],120300:[[89],256],120301:[[90],256],120302:[[97],256],120303:[[98],256],120304:[[99],256],120305:[[100],256],120306:[[101],256],120307:[[102],256],120308:[[103],256],120309:[[104],256],120310:[[105],256],120311:[[106],256],120312:[[107],256],120313:[[108],256],120314:[[109],256],120315:[[110],256],120316:[[111],256],120317:[[112],256],120318:[[113],256],120319:[[114],256]},54784:{120320:[[115],256],120321:[[116],256],120322:[[117],256],120323:[[118],256],120324:[[119],256],120325:[[120],256],120326:[[121],256],120327:[[122],256],120328:[[65],256],120329:[[66],256],120330:[[67],256],120331:[[68],256],120332:[[69],256],120333:[[70],256],120334:[[71],256],120335:[[72],256],120336:[[73],256],120337:[[74],256],120338:[[75],256],120339:[[76],256],120340:[[77],256],120341:[[78],256],120342:[[79],256],120343:[[80],256],120344:[[81],256],120345:[[82],256],120346:[[83],256],120347:[[84],256],120348:[[85],256],120349:[[86],256],120350:[[87],256],120351:[[88],256],120352:[[89],256],120353:[[90],256],120354:[[97],256],120355:[[98],256],120356:[[99],256],120357:[[100],256],120358:[[101],256],120359:[[102],256],120360:[[103],256],120361:[[104],256],120362:[[105],256],120363:[[106],256],120364:[[107],256],120365:[[108],256],120366:[[109],256],120367:[[110],256],120368:[[111],256],120369:[[112],256],120370:[[113],256],120371:[[114],256],120372:[[115],256],120373:[[116],256],120374:[[117],256],120375:[[118],256],120376:[[119],256],120377:[[120],256],120378:[[121],256],120379:[[122],256],120380:[[65],256],120381:[[66],256],120382:[[67],256],120383:[[68],256],120384:[[69],256],120385:[[70],256],120386:[[71],256],120387:[[72],256],120388:[[73],256],120389:[[74],256],120390:[[75],256],120391:[[76],256],120392:[[77],256],120393:[[78],256],120394:[[79],256],120395:[[80],256],120396:[[81],256],120397:[[82],256],120398:[[83],256],120399:[[84],256],120400:[[85],256],120401:[[86],256],120402:[[87],256],120403:[[88],256],120404:[[89],256],120405:[[90],256],120406:[[97],256],120407:[[98],256],120408:[[99],256],120409:[[100],256],120410:[[101],256],120411:[[102],256],120412:[[103],256],120413:[[104],256],120414:[[105],256],120415:[[106],256],120416:[[107],256],120417:[[108],256],120418:[[109],256],120419:[[110],256],120420:[[111],256],120421:[[112],256],120422:[[113],256],120423:[[114],256],120424:[[115],256],120425:[[116],256],120426:[[117],256],120427:[[118],256],120428:[[119],256],120429:[[120],256],120430:[[121],256],120431:[[122],256],120432:[[65],256],120433:[[66],256],120434:[[67],256],120435:[[68],256],120436:[[69],256],120437:[[70],256],120438:[[71],256],120439:[[72],256],120440:[[73],256],120441:[[74],256],120442:[[75],256],120443:[[76],256],120444:[[77],256],120445:[[78],256],120446:[[79],256],120447:[[80],256],120448:[[81],256],120449:[[82],256],120450:[[83],256],120451:[[84],256],120452:[[85],256],120453:[[86],256],120454:[[87],256],120455:[[88],256],120456:[[89],256],120457:[[90],256],120458:[[97],256],120459:[[98],256],120460:[[99],256],120461:[[100],256],120462:[[101],256],120463:[[102],256],120464:[[103],256],120465:[[104],256],120466:[[105],256],120467:[[106],256],120468:[[107],256],120469:[[108],256],120470:[[109],256],120471:[[110],256],120472:[[111],256],120473:[[112],256],120474:[[113],256],120475:[[114],256],120476:[[115],256],120477:[[116],256],120478:[[117],256],120479:[[118],256],120480:[[119],256],120481:[[120],256],120482:[[121],256],120483:[[122],256],120484:[[305],256],120485:[[567],256],120488:[[913],256],120489:[[914],256],120490:[[915],256],120491:[[916],256],120492:[[917],256],120493:[[918],256],120494:[[919],256],120495:[[920],256],120496:[[921],256],120497:[[922],256],120498:[[923],256],120499:[[924],256],120500:[[925],256],120501:[[926],256],120502:[[927],256],120503:[[928],256],120504:[[929],256],120505:[[1012],256],120506:[[931],256],120507:[[932],256],120508:[[933],256],120509:[[934],256],120510:[[935],256],120511:[[936],256],120512:[[937],256],120513:[[8711],256],120514:[[945],256],120515:[[946],256],120516:[[947],256],120517:[[948],256],120518:[[949],256],120519:[[950],256],120520:[[951],256],120521:[[952],256],120522:[[953],256],120523:[[954],256],120524:[[955],256],120525:[[956],256],120526:[[957],256],120527:[[958],256],120528:[[959],256],120529:[[960],256],120530:[[961],256],120531:[[962],256],120532:[[963],256],120533:[[964],256],120534:[[965],256],120535:[[966],256],120536:[[967],256],120537:[[968],256],120538:[[969],256],120539:[[8706],256],120540:[[1013],256],120541:[[977],256],120542:[[1008],256],120543:[[981],256],120544:[[1009],256],120545:[[982],256],120546:[[913],256],120547:[[914],256],120548:[[915],256],120549:[[916],256],120550:[[917],256],120551:[[918],256],120552:[[919],256],120553:[[920],256],120554:[[921],256],120555:[[922],256],120556:[[923],256],120557:[[924],256],120558:[[925],256],120559:[[926],256],120560:[[927],256],120561:[[928],256],120562:[[929],256],120563:[[1012],256],120564:[[931],256],120565:[[932],256],120566:[[933],256],120567:[[934],256],120568:[[935],256],120569:[[936],256],120570:[[937],256],120571:[[8711],256],120572:[[945],256],120573:[[946],256],120574:[[947],256],120575:[[948],256]},55040:{120576:[[949],256],120577:[[950],256],120578:[[951],256],120579:[[952],256],120580:[[953],256],120581:[[954],256],120582:[[955],256],120583:[[956],256],120584:[[957],256],120585:[[958],256],120586:[[959],256],120587:[[960],256],120588:[[961],256],120589:[[962],256],120590:[[963],256],120591:[[964],256],120592:[[965],256],120593:[[966],256],120594:[[967],256],120595:[[968],256],120596:[[969],256],120597:[[8706],256],120598:[[1013],256],120599:[[977],256],120600:[[1008],256],120601:[[981],256],120602:[[1009],256],120603:[[982],256],120604:[[913],256],120605:[[914],256],120606:[[915],256],120607:[[916],256],120608:[[917],256],120609:[[918],256],120610:[[919],256],120611:[[920],256],120612:[[921],256],120613:[[922],256],120614:[[923],256],120615:[[924],256],120616:[[925],256],120617:[[926],256],120618:[[927],256],120619:[[928],256],120620:[[929],256],120621:[[1012],256],120622:[[931],256],120623:[[932],256],120624:[[933],256],120625:[[934],256],120626:[[935],256],120627:[[936],256],120628:[[937],256],120629:[[8711],256],120630:[[945],256],120631:[[946],256],120632:[[947],256],120633:[[948],256],120634:[[949],256],120635:[[950],256],120636:[[951],256],120637:[[952],256],120638:[[953],256],120639:[[954],256],120640:[[955],256],120641:[[956],256],120642:[[957],256],120643:[[958],256],120644:[[959],256],120645:[[960],256],120646:[[961],256],120647:[[962],256],120648:[[963],256],120649:[[964],256],120650:[[965],256],120651:[[966],256],120652:[[967],256],120653:[[968],256],120654:[[969],256],120655:[[8706],256],120656:[[1013],256],120657:[[977],256],120658:[[1008],256],120659:[[981],256],120660:[[1009],256],120661:[[982],256],120662:[[913],256],120663:[[914],256],120664:[[915],256],120665:[[916],256],120666:[[917],256],120667:[[918],256],120668:[[919],256],120669:[[920],256],120670:[[921],256],120671:[[922],256],120672:[[923],256],120673:[[924],256],120674:[[925],256],120675:[[926],256],120676:[[927],256],120677:[[928],256],120678:[[929],256],120679:[[1012],256],120680:[[931],256],120681:[[932],256],120682:[[933],256],120683:[[934],256],120684:[[935],256],120685:[[936],256],120686:[[937],256],120687:[[8711],256],120688:[[945],256],120689:[[946],256],120690:[[947],256],120691:[[948],256],120692:[[949],256],120693:[[950],256],120694:[[951],256],120695:[[952],256],120696:[[953],256],120697:[[954],256],120698:[[955],256],120699:[[956],256],120700:[[957],256],120701:[[958],256],120702:[[959],256],120703:[[960],256],120704:[[961],256],120705:[[962],256],120706:[[963],256],120707:[[964],256],120708:[[965],256],120709:[[966],256],120710:[[967],256],120711:[[968],256],120712:[[969],256],120713:[[8706],256],120714:[[1013],256],120715:[[977],256],120716:[[1008],256],120717:[[981],256],120718:[[1009],256],120719:[[982],256],120720:[[913],256],120721:[[914],256],120722:[[915],256],120723:[[916],256],120724:[[917],256],120725:[[918],256],120726:[[919],256],120727:[[920],256],120728:[[921],256],120729:[[922],256],120730:[[923],256],120731:[[924],256],120732:[[925],256],120733:[[926],256],120734:[[927],256],120735:[[928],256],120736:[[929],256],120737:[[1012],256],120738:[[931],256],120739:[[932],256],120740:[[933],256],120741:[[934],256],120742:[[935],256],120743:[[936],256],120744:[[937],256],120745:[[8711],256],120746:[[945],256],120747:[[946],256],120748:[[947],256],120749:[[948],256],120750:[[949],256],120751:[[950],256],120752:[[951],256],120753:[[952],256],120754:[[953],256],120755:[[954],256],120756:[[955],256],120757:[[956],256],120758:[[957],256],120759:[[958],256],120760:[[959],256],120761:[[960],256],120762:[[961],256],120763:[[962],256],120764:[[963],256],120765:[[964],256],120766:[[965],256],120767:[[966],256],120768:[[967],256],120769:[[968],256],120770:[[969],256],120771:[[8706],256],120772:[[1013],256],120773:[[977],256],120774:[[1008],256],120775:[[981],256],120776:[[1009],256],120777:[[982],256],120778:[[988],256],120779:[[989],256],120782:[[48],256],120783:[[49],256],120784:[[50],256],120785:[[51],256],120786:[[52],256],120787:[[53],256],120788:[[54],256],120789:[[55],256],120790:[[56],256],120791:[[57],256],120792:[[48],256],120793:[[49],256],120794:[[50],256],120795:[[51],256],120796:[[52],256],120797:[[53],256],120798:[[54],256],120799:[[55],256],120800:[[56],256],120801:[[57],256],120802:[[48],256],120803:[[49],256],120804:[[50],256],120805:[[51],256],120806:[[52],256],120807:[[53],256],120808:[[54],256],120809:[[55],256],120810:[[56],256],120811:[[57],256],120812:[[48],256],120813:[[49],256],120814:[[50],256],120815:[[51],256],120816:[[52],256],120817:[[53],256],120818:[[54],256],120819:[[55],256],120820:[[56],256],120821:[[57],256],120822:[[48],256],120823:[[49],256],120824:[[50],256],120825:[[51],256],120826:[[52],256],120827:[[53],256],120828:[[54],256],120829:[[55],256],120830:[[56],256],120831:[[57],256]},59392:{125136:[,220],125137:[,220],125138:[,220],125139:[,220],125140:[,220],125141:[,220],125142:[,220]},60928:{126464:[[1575],256],126465:[[1576],256],126466:[[1580],256],126467:[[1583],256],126469:[[1608],256],126470:[[1586],256],126471:[[1581],256],126472:[[1591],256],126473:[[1610],256],126474:[[1603],256],126475:[[1604],256],126476:[[1605],256],126477:[[1606],256],126478:[[1587],256],126479:[[1593],256],126480:[[1601],256],126481:[[1589],256],126482:[[1602],256],126483:[[1585],256],126484:[[1588],256],126485:[[1578],256],126486:[[1579],256],126487:[[1582],256],126488:[[1584],256],126489:[[1590],256],126490:[[1592],256],126491:[[1594],256],126492:[[1646],256],126493:[[1722],256],126494:[[1697],256],126495:[[1647],256],126497:[[1576],256],126498:[[1580],256],126500:[[1607],256],126503:[[1581],256],126505:[[1610],256],126506:[[1603],256],126507:[[1604],256],126508:[[1605],256],126509:[[1606],256],126510:[[1587],256],126511:[[1593],256],126512:[[1601],256],126513:[[1589],256],126514:[[1602],256],126516:[[1588],256],126517:[[1578],256],126518:[[1579],256],126519:[[1582],256],126521:[[1590],256],126523:[[1594],256],126530:[[1580],256],126535:[[1581],256],126537:[[1610],256],126539:[[1604],256],126541:[[1606],256],126542:[[1587],256],126543:[[1593],256],126545:[[1589],256],126546:[[1602],256],126548:[[1588],256],126551:[[1582],256],126553:[[1590],256],126555:[[1594],256],126557:[[1722],256],126559:[[1647],256],126561:[[1576],256],126562:[[1580],256],126564:[[1607],256],126567:[[1581],256],126568:[[1591],256],126569:[[1610],256],126570:[[1603],256],126572:[[1605],256],126573:[[1606],256],126574:[[1587],256],126575:[[1593],256],126576:[[1601],256],126577:[[1589],256],126578:[[1602],256],126580:[[1588],256],126581:[[1578],256],126582:[[1579],256],126583:[[1582],256],126585:[[1590],256],126586:[[1592],256],126587:[[1594],256],126588:[[1646],256],126590:[[1697],256],126592:[[1575],256],126593:[[1576],256],126594:[[1580],256],126595:[[1583],256],126596:[[1607],256],126597:[[1608],256],126598:[[1586],256],126599:[[1581],256],126600:[[1591],256],126601:[[1610],256],126603:[[1604],256],126604:[[1605],256],126605:[[1606],256],126606:[[1587],256],126607:[[1593],256],126608:[[1601],256],126609:[[1589],256],126610:[[1602],256],126611:[[1585],256],126612:[[1588],256],126613:[[1578],256],126614:[[1579],256],126615:[[1582],256],126616:[[1584],256],126617:[[1590],256],126618:[[1592],256],126619:[[1594],256],126625:[[1576],256],126626:[[1580],256],126627:[[1583],256],126629:[[1608],256],126630:[[1586],256],126631:[[1581],256],126632:[[1591],256],126633:[[1610],256],126635:[[1604],256],126636:[[1605],256],126637:[[1606],256],126638:[[1587],256],126639:[[1593],256],126640:[[1601],256],126641:[[1589],256],126642:[[1602],256],126643:[[1585],256],126644:[[1588],256],126645:[[1578],256],126646:[[1579],256],126647:[[1582],256],126648:[[1584],256],126649:[[1590],256],126650:[[1592],256],126651:[[1594],256]},61696:{127232:[[48,46],256],127233:[[48,44],256],127234:[[49,44],256],127235:[[50,44],256],127236:[[51,44],256],127237:[[52,44],256],127238:[[53,44],256],127239:[[54,44],256],127240:[[55,44],256],127241:[[56,44],256],127242:[[57,44],256],127248:[[40,65,41],256],127249:[[40,66,41],256],127250:[[40,67,41],256],127251:[[40,68,41],256],127252:[[40,69,41],256],127253:[[40,70,41],256],127254:[[40,71,41],256],127255:[[40,72,41],256],127256:[[40,73,41],256],127257:[[40,74,41],256],127258:[[40,75,41],256],127259:[[40,76,41],256],127260:[[40,77,41],256],127261:[[40,78,41],256],127262:[[40,79,41],256],127263:[[40,80,41],256],127264:[[40,81,41],256],127265:[[40,82,41],256],127266:[[40,83,41],256],127267:[[40,84,41],256],127268:[[40,85,41],256],127269:[[40,86,41],256],127270:[[40,87,41],256],127271:[[40,88,41],256],127272:[[40,89,41],256],127273:[[40,90,41],256],127274:[[12308,83,12309],256],127275:[[67],256],127276:[[82],256],127277:[[67,68],256],127278:[[87,90],256],127280:[[65],256],127281:[[66],256],127282:[[67],256],127283:[[68],256],127284:[[69],256],127285:[[70],256],127286:[[71],256],127287:[[72],256],127288:[[73],256],127289:[[74],256],127290:[[75],256],127291:[[76],256],127292:[[77],256],127293:[[78],256],127294:[[79],256],127295:[[80],256],127296:[[81],256],127297:[[82],256],127298:[[83],256],127299:[[84],256],127300:[[85],256],127301:[[86],256],127302:[[87],256],127303:[[88],256],127304:[[89],256],127305:[[90],256],127306:[[72,86],256],127307:[[77,86],256],127308:[[83,68],256],127309:[[83,83],256],127310:[[80,80,86],256],127311:[[87,67],256],127338:[[77,67],256],127339:[[77,68],256],127376:[[68,74],256]},61952:{127488:[[12411,12363],256],127489:[[12467,12467],256],127490:[[12469],256],127504:[[25163],256],127505:[[23383],256],127506:[[21452],256],127507:[[12487],256],127508:[[20108],256],127509:[[22810],256],127510:[[35299],256],127511:[[22825],256],127512:[[20132],256],127513:[[26144],256],127514:[[28961],256],127515:[[26009],256],127516:[[21069],256],127517:[[24460],256],127518:[[20877],256],127519:[[26032],256],127520:[[21021],256],127521:[[32066],256],127522:[[29983],256],127523:[[36009],256],127524:[[22768],256],127525:[[21561],256],127526:[[28436],256],127527:[[25237],256],127528:[[25429],256],127529:[[19968],256],127530:[[19977],256],127531:[[36938],256],127532:[[24038],256],127533:[[20013],256],127534:[[21491],256],127535:[[25351],256],127536:[[36208],256],127537:[[25171],256],127538:[[31105],256],127539:[[31354],256],127540:[[21512],256],127541:[[28288],256],127542:[[26377],256],127543:[[26376],256],127544:[[30003],256],127545:[[21106],256],127546:[[21942],256],127552:[[12308,26412,12309],256],127553:[[12308,19977,12309],256],127554:[[12308,20108,12309],256],127555:[[12308,23433,12309],256],127556:[[12308,28857,12309],256],127557:[[12308,25171,12309],256],127558:[[12308,30423,12309],256],127559:[[12308,21213,12309],256],127560:[[12308,25943,12309],256],127568:[[24471],256],127569:[[21487],256]},63488:{194560:[[20029]],194561:[[20024]],194562:[[20033]],194563:[[131362]],194564:[[20320]],194565:[[20398]],194566:[[20411]],194567:[[20482]],194568:[[20602]],194569:[[20633]],194570:[[20711]],194571:[[20687]],194572:[[13470]],194573:[[132666]],194574:[[20813]],194575:[[20820]],194576:[[20836]],194577:[[20855]],194578:[[132380]],194579:[[13497]],194580:[[20839]],194581:[[20877]],194582:[[132427]],194583:[[20887]],194584:[[20900]],194585:[[20172]],194586:[[20908]],194587:[[20917]],194588:[[168415]],194589:[[20981]],194590:[[20995]],194591:[[13535]],194592:[[21051]],194593:[[21062]],194594:[[21106]],194595:[[21111]],194596:[[13589]],194597:[[21191]],194598:[[21193]],194599:[[21220]],194600:[[21242]],194601:[[21253]],194602:[[21254]],194603:[[21271]],194604:[[21321]],194605:[[21329]],194606:[[21338]],194607:[[21363]],194608:[[21373]],194609:[[21375]],194610:[[21375]],194611:[[21375]],194612:[[133676]],194613:[[28784]],194614:[[21450]],194615:[[21471]],194616:[[133987]],194617:[[21483]],194618:[[21489]],194619:[[21510]],194620:[[21662]],194621:[[21560]],194622:[[21576]],194623:[[21608]],194624:[[21666]],194625:[[21750]],194626:[[21776]],194627:[[21843]],194628:[[21859]],194629:[[21892]],194630:[[21892]],194631:[[21913]],194632:[[21931]],194633:[[21939]],194634:[[21954]],194635:[[22294]],194636:[[22022]],194637:[[22295]],194638:[[22097]],194639:[[22132]],194640:[[20999]],194641:[[22766]],194642:[[22478]],194643:[[22516]],194644:[[22541]],194645:[[22411]],194646:[[22578]],194647:[[22577]],194648:[[22700]],194649:[[136420]],194650:[[22770]],194651:[[22775]],194652:[[22790]],194653:[[22810]],194654:[[22818]],194655:[[22882]],194656:[[136872]],194657:[[136938]],194658:[[23020]],194659:[[23067]],194660:[[23079]],194661:[[23e3]],194662:[[23142]],194663:[[14062]],194664:[[14076]],194665:[[23304]],194666:[[23358]],194667:[[23358]],194668:[[137672]],194669:[[23491]],194670:[[23512]],194671:[[23527]],194672:[[23539]],194673:[[138008]],194674:[[23551]],194675:[[23558]],194676:[[24403]],194677:[[23586]],194678:[[14209]],194679:[[23648]],194680:[[23662]],194681:[[23744]],194682:[[23693]],194683:[[138724]],194684:[[23875]],194685:[[138726]],194686:[[23918]],194687:[[23915]],194688:[[23932]],194689:[[24033]],194690:[[24034]],194691:[[14383]],194692:[[24061]],194693:[[24104]],194694:[[24125]],194695:[[24169]],194696:[[14434]],194697:[[139651]],194698:[[14460]],194699:[[24240]],194700:[[24243]],194701:[[24246]],194702:[[24266]],194703:[[172946]],194704:[[24318]],194705:[[140081]],194706:[[140081]],194707:[[33281]],194708:[[24354]],194709:[[24354]],194710:[[14535]],194711:[[144056]],194712:[[156122]],194713:[[24418]],194714:[[24427]],194715:[[14563]],194716:[[24474]],194717:[[24525]],194718:[[24535]],194719:[[24569]],194720:[[24705]],194721:[[14650]],194722:[[14620]],194723:[[24724]],194724:[[141012]],194725:[[24775]],194726:[[24904]],194727:[[24908]],194728:[[24910]],194729:[[24908]],194730:[[24954]],194731:[[24974]],194732:[[25010]],194733:[[24996]],194734:[[25007]],194735:[[25054]],194736:[[25074]],194737:[[25078]],194738:[[25104]],194739:[[25115]],194740:[[25181]],194741:[[25265]],194742:[[25300]],194743:[[25424]],194744:[[142092]],194745:[[25405]],194746:[[25340]],194747:[[25448]],194748:[[25475]],194749:[[25572]],194750:[[142321]],194751:[[25634]],194752:[[25541]],194753:[[25513]],194754:[[14894]],194755:[[25705]],194756:[[25726]],194757:[[25757]],194758:[[25719]],194759:[[14956]],194760:[[25935]],194761:[[25964]],194762:[[143370]],194763:[[26083]],194764:[[26360]],194765:[[26185]],194766:[[15129]],194767:[[26257]],194768:[[15112]],194769:[[15076]],194770:[[20882]],194771:[[20885]],194772:[[26368]],194773:[[26268]],194774:[[32941]],194775:[[17369]],194776:[[26391]],194777:[[26395]],194778:[[26401]],194779:[[26462]],194780:[[26451]],194781:[[144323]],194782:[[15177]],194783:[[26618]],194784:[[26501]],194785:[[26706]],194786:[[26757]],194787:[[144493]],194788:[[26766]],194789:[[26655]],194790:[[26900]],194791:[[15261]],194792:[[26946]],194793:[[27043]],194794:[[27114]],194795:[[27304]],194796:[[145059]],194797:[[27355]],194798:[[15384]],194799:[[27425]],194800:[[145575]],194801:[[27476]],194802:[[15438]],194803:[[27506]],194804:[[27551]],194805:[[27578]],194806:[[27579]],194807:[[146061]],194808:[[138507]],194809:[[146170]],194810:[[27726]],194811:[[146620]],194812:[[27839]],194813:[[27853]],194814:[[27751]],194815:[[27926]]},63744:{63744:[[35912]],63745:[[26356]],63746:[[36554]],63747:[[36040]],63748:[[28369]],63749:[[20018]],63750:[[21477]],63751:[[40860]],63752:[[40860]],63753:[[22865]],63754:[[37329]],63755:[[21895]],63756:[[22856]],63757:[[25078]],63758:[[30313]],63759:[[32645]],63760:[[34367]],63761:[[34746]],63762:[[35064]],63763:[[37007]],63764:[[27138]],63765:[[27931]],63766:[[28889]],63767:[[29662]],63768:[[33853]],63769:[[37226]],63770:[[39409]],63771:[[20098]],63772:[[21365]],63773:[[27396]],63774:[[29211]],63775:[[34349]],63776:[[40478]],63777:[[23888]],63778:[[28651]],63779:[[34253]],63780:[[35172]],63781:[[25289]],63782:[[33240]],63783:[[34847]],63784:[[24266]],63785:[[26391]],63786:[[28010]],63787:[[29436]],63788:[[37070]],63789:[[20358]],63790:[[20919]],63791:[[21214]],63792:[[25796]],63793:[[27347]],63794:[[29200]],63795:[[30439]],63796:[[32769]],63797:[[34310]],63798:[[34396]],63799:[[36335]],63800:[[38706]],63801:[[39791]],63802:[[40442]],63803:[[30860]],63804:[[31103]],63805:[[32160]],63806:[[33737]],63807:[[37636]],63808:[[40575]],63809:[[35542]],63810:[[22751]],63811:[[24324]],63812:[[31840]],63813:[[32894]],63814:[[29282]],63815:[[30922]],63816:[[36034]],63817:[[38647]],63818:[[22744]],63819:[[23650]],63820:[[27155]],63821:[[28122]],63822:[[28431]],63823:[[32047]],63824:[[32311]],63825:[[38475]],63826:[[21202]],63827:[[32907]],63828:[[20956]],63829:[[20940]],63830:[[31260]],63831:[[32190]],63832:[[33777]],63833:[[38517]],63834:[[35712]],63835:[[25295]],63836:[[27138]],63837:[[35582]],63838:[[20025]],63839:[[23527]],63840:[[24594]],63841:[[29575]],63842:[[30064]],63843:[[21271]],63844:[[30971]],63845:[[20415]],63846:[[24489]],63847:[[19981]],63848:[[27852]],63849:[[25976]],63850:[[32034]],63851:[[21443]],63852:[[22622]],63853:[[30465]],63854:[[33865]],63855:[[35498]],63856:[[27578]],63857:[[36784]],63858:[[27784]],63859:[[25342]],63860:[[33509]],63861:[[25504]],63862:[[30053]],63863:[[20142]],63864:[[20841]],63865:[[20937]],63866:[[26753]],63867:[[31975]],63868:[[33391]],63869:[[35538]],63870:[[37327]],63871:[[21237]],63872:[[21570]],63873:[[22899]],63874:[[24300]],63875:[[26053]],63876:[[28670]],63877:[[31018]],63878:[[38317]],63879:[[39530]],63880:[[40599]],63881:[[40654]],63882:[[21147]],63883:[[26310]],63884:[[27511]],63885:[[36706]],63886:[[24180]],63887:[[24976]],63888:[[25088]],63889:[[25754]],63890:[[28451]],63891:[[29001]],63892:[[29833]],63893:[[31178]],63894:[[32244]],63895:[[32879]],63896:[[36646]],63897:[[34030]],63898:[[36899]],63899:[[37706]],63900:[[21015]],63901:[[21155]],63902:[[21693]],63903:[[28872]],63904:[[35010]],63905:[[35498]],63906:[[24265]],63907:[[24565]],63908:[[25467]],63909:[[27566]],63910:[[31806]],63911:[[29557]],63912:[[20196]],63913:[[22265]],63914:[[23527]],63915:[[23994]],63916:[[24604]],63917:[[29618]],63918:[[29801]],63919:[[32666]],63920:[[32838]],63921:[[37428]],63922:[[38646]],63923:[[38728]],63924:[[38936]],63925:[[20363]],63926:[[31150]],63927:[[37300]],63928:[[38584]],63929:[[24801]],63930:[[20102]],63931:[[20698]],63932:[[23534]],63933:[[23615]],63934:[[26009]],63935:[[27138]],63936:[[29134]],63937:[[30274]],63938:[[34044]],63939:[[36988]],63940:[[40845]],63941:[[26248]],63942:[[38446]],63943:[[21129]],63944:[[26491]],63945:[[26611]],63946:[[27969]],63947:[[28316]],63948:[[29705]],63949:[[30041]],63950:[[30827]],63951:[[32016]],63952:[[39006]],63953:[[20845]],63954:[[25134]],63955:[[38520]],63956:[[20523]],63957:[[23833]],63958:[[28138]],63959:[[36650]],63960:[[24459]],63961:[[24900]],63962:[[26647]],63963:[[29575]],63964:[[38534]],63965:[[21033]],63966:[[21519]],63967:[[23653]],63968:[[26131]],63969:[[26446]],63970:[[26792]],63971:[[27877]],63972:[[29702]],63973:[[30178]],63974:[[32633]],63975:[[35023]],63976:[[35041]],63977:[[37324]],63978:[[38626]],63979:[[21311]],63980:[[28346]],63981:[[21533]],63982:[[29136]],63983:[[29848]],63984:[[34298]],63985:[[38563]],63986:[[40023]],63987:[[40607]],63988:[[26519]],63989:[[28107]],63990:[[33256]],63991:[[31435]],63992:[[31520]],63993:[[31890]],63994:[[29376]],63995:[[28825]],63996:[[35672]],63997:[[20160]],63998:[[33590]],63999:[[21050]],194816:[[27966]],194817:[[28023]],194818:[[27969]],194819:[[28009]],194820:[[28024]],194821:[[28037]],194822:[[146718]],194823:[[27956]],194824:[[28207]],194825:[[28270]],194826:[[15667]],194827:[[28363]],194828:[[28359]],194829:[[147153]],194830:[[28153]],194831:[[28526]],194832:[[147294]],194833:[[147342]],194834:[[28614]],194835:[[28729]],194836:[[28702]],194837:[[28699]],194838:[[15766]],194839:[[28746]],194840:[[28797]],194841:[[28791]],194842:[[28845]],194843:[[132389]],194844:[[28997]],194845:[[148067]],194846:[[29084]],194847:[[148395]],194848:[[29224]],194849:[[29237]],194850:[[29264]],194851:[[149e3]],194852:[[29312]],194853:[[29333]],194854:[[149301]],194855:[[149524]],194856:[[29562]],194857:[[29579]],194858:[[16044]],194859:[[29605]],194860:[[16056]],194861:[[16056]],194862:[[29767]],194863:[[29788]],194864:[[29809]],194865:[[29829]],194866:[[29898]],194867:[[16155]],194868:[[29988]],194869:[[150582]],194870:[[30014]],194871:[[150674]],194872:[[30064]],194873:[[139679]],194874:[[30224]],194875:[[151457]],194876:[[151480]],194877:[[151620]],194878:[[16380]],194879:[[16392]],194880:[[30452]],194881:[[151795]],194882:[[151794]],194883:[[151833]],194884:[[151859]],194885:[[30494]],194886:[[30495]],194887:[[30495]],194888:[[30538]],194889:[[16441]],194890:[[30603]],194891:[[16454]],194892:[[16534]],194893:[[152605]],194894:[[30798]],194895:[[30860]],194896:[[30924]],194897:[[16611]],194898:[[153126]],194899:[[31062]],194900:[[153242]],194901:[[153285]],194902:[[31119]],194903:[[31211]],194904:[[16687]],194905:[[31296]],194906:[[31306]],194907:[[31311]],194908:[[153980]],194909:[[154279]],194910:[[154279]],194911:[[31470]],194912:[[16898]],194913:[[154539]],194914:[[31686]],194915:[[31689]],194916:[[16935]],194917:[[154752]],194918:[[31954]],194919:[[17056]],194920:[[31976]],194921:[[31971]],194922:[[32e3]],194923:[[155526]],194924:[[32099]],194925:[[17153]],194926:[[32199]],194927:[[32258]],194928:[[32325]],194929:[[17204]],194930:[[156200]],194931:[[156231]],194932:[[17241]],194933:[[156377]],194934:[[32634]],194935:[[156478]],194936:[[32661]],194937:[[32762]],194938:[[32773]],194939:[[156890]],194940:[[156963]],194941:[[32864]],194942:[[157096]],194943:[[32880]],194944:[[144223]],194945:[[17365]],194946:[[32946]],194947:[[33027]],194948:[[17419]],194949:[[33086]],194950:[[23221]],194951:[[157607]],194952:[[157621]],194953:[[144275]],194954:[[144284]],194955:[[33281]],194956:[[33284]],194957:[[36766]],194958:[[17515]],194959:[[33425]],194960:[[33419]],194961:[[33437]],194962:[[21171]],194963:[[33457]],194964:[[33459]],194965:[[33469]],194966:[[33510]],194967:[[158524]],194968:[[33509]],194969:[[33565]],194970:[[33635]],194971:[[33709]],194972:[[33571]],194973:[[33725]],194974:[[33767]],194975:[[33879]],194976:[[33619]],194977:[[33738]],194978:[[33740]],194979:[[33756]],194980:[[158774]],194981:[[159083]],194982:[[158933]],194983:[[17707]],194984:[[34033]],194985:[[34035]],194986:[[34070]],194987:[[160714]],194988:[[34148]],194989:[[159532]],194990:[[17757]],194991:[[17761]],194992:[[159665]],194993:[[159954]],194994:[[17771]],194995:[[34384]],194996:[[34396]],194997:[[34407]],194998:[[34409]],194999:[[34473]],195e3:[[34440]],195001:[[34574]],195002:[[34530]],195003:[[34681]],195004:[[34600]],195005:[[34667]],195006:[[34694]],195007:[[17879]],195008:[[34785]],195009:[[34817]],195010:[[17913]],195011:[[34912]],195012:[[34915]],195013:[[161383]],195014:[[35031]],195015:[[35038]],195016:[[17973]],195017:[[35066]],195018:[[13499]],195019:[[161966]],195020:[[162150]],195021:[[18110]],195022:[[18119]],195023:[[35488]],195024:[[35565]],195025:[[35722]],195026:[[35925]],195027:[[162984]],195028:[[36011]],195029:[[36033]],195030:[[36123]],195031:[[36215]],195032:[[163631]],195033:[[133124]],195034:[[36299]],195035:[[36284]],195036:[[36336]],195037:[[133342]],195038:[[36564]],195039:[[36664]],195040:[[165330]],195041:[[165357]],195042:[[37012]],195043:[[37105]],195044:[[37137]],195045:[[165678]],195046:[[37147]],195047:[[37432]],195048:[[37591]],195049:[[37592]],195050:[[37500]],195051:[[37881]],195052:[[37909]],195053:[[166906]],195054:[[38283]],195055:[[18837]],195056:[[38327]],195057:[[167287]],195058:[[18918]],195059:[[38595]],195060:[[23986]],195061:[[38691]],195062:[[168261]],195063:[[168474]],195064:[[19054]],195065:[[19062]],195066:[[38880]],195067:[[168970]],195068:[[19122]],195069:[[169110]],195070:[[38923]],195071:[[38923]]},64e3:{64e3:[[20999]],64001:[[24230]],64002:[[25299]],64003:[[31958]],64004:[[23429]],64005:[[27934]],64006:[[26292]],64007:[[36667]],64008:[[34892]],64009:[[38477]],64010:[[35211]],64011:[[24275]],64012:[[20800]],64013:[[21952]],64016:[[22618]],64018:[[26228]],64021:[[20958]],64022:[[29482]],64023:[[30410]],64024:[[31036]],64025:[[31070]],64026:[[31077]],64027:[[31119]],64028:[[38742]],64029:[[31934]],64030:[[32701]],64032:[[34322]],64034:[[35576]],64037:[[36920]],64038:[[37117]],64042:[[39151]],64043:[[39164]],64044:[[39208]],64045:[[40372]],64046:[[37086]],64047:[[38583]],64048:[[20398]],64049:[[20711]],64050:[[20813]],64051:[[21193]],64052:[[21220]],64053:[[21329]],64054:[[21917]],64055:[[22022]],64056:[[22120]],64057:[[22592]],64058:[[22696]],64059:[[23652]],64060:[[23662]],64061:[[24724]],64062:[[24936]],64063:[[24974]],64064:[[25074]],64065:[[25935]],64066:[[26082]],64067:[[26257]],64068:[[26757]],64069:[[28023]],64070:[[28186]],64071:[[28450]],64072:[[29038]],64073:[[29227]],64074:[[29730]],64075:[[30865]],64076:[[31038]],64077:[[31049]],64078:[[31048]],64079:[[31056]],64080:[[31062]],64081:[[31069]],64082:[[31117]],64083:[[31118]],64084:[[31296]],64085:[[31361]],64086:[[31680]],64087:[[32244]],64088:[[32265]],64089:[[32321]],64090:[[32626]],64091:[[32773]],64092:[[33261]],64093:[[33401]],64094:[[33401]],64095:[[33879]],64096:[[35088]],64097:[[35222]],64098:[[35585]],64099:[[35641]],64100:[[36051]],64101:[[36104]],64102:[[36790]],64103:[[36920]],64104:[[38627]],64105:[[38911]],64106:[[38971]],64107:[[24693]],64108:[[148206]],64109:[[33304]],64112:[[20006]],64113:[[20917]],64114:[[20840]],64115:[[20352]],64116:[[20805]],64117:[[20864]],64118:[[21191]],64119:[[21242]],64120:[[21917]],64121:[[21845]],64122:[[21913]],64123:[[21986]],64124:[[22618]],64125:[[22707]],64126:[[22852]],64127:[[22868]],64128:[[23138]],64129:[[23336]],64130:[[24274]],64131:[[24281]],64132:[[24425]],64133:[[24493]],64134:[[24792]],64135:[[24910]],64136:[[24840]],64137:[[24974]],64138:[[24928]],64139:[[25074]],64140:[[25140]],64141:[[25540]],64142:[[25628]],64143:[[25682]],64144:[[25942]],64145:[[26228]],64146:[[26391]],64147:[[26395]],64148:[[26454]],64149:[[27513]],64150:[[27578]],64151:[[27969]],64152:[[28379]],64153:[[28363]],64154:[[28450]],64155:[[28702]],64156:[[29038]],64157:[[30631]],64158:[[29237]],64159:[[29359]],64160:[[29482]],64161:[[29809]],64162:[[29958]],64163:[[30011]],64164:[[30237]],64165:[[30239]],64166:[[30410]],64167:[[30427]],64168:[[30452]],64169:[[30538]],64170:[[30528]],64171:[[30924]],64172:[[31409]],64173:[[31680]],64174:[[31867]],64175:[[32091]],64176:[[32244]],64177:[[32574]],64178:[[32773]],64179:[[33618]],64180:[[33775]],64181:[[34681]],64182:[[35137]],64183:[[35206]],64184:[[35222]],64185:[[35519]],64186:[[35576]],64187:[[35531]],64188:[[35585]],64189:[[35582]],64190:[[35565]],64191:[[35641]],64192:[[35722]],64193:[[36104]],64194:[[36664]],64195:[[36978]],64196:[[37273]],64197:[[37494]],64198:[[38524]],64199:[[38627]],64200:[[38742]],64201:[[38875]],64202:[[38911]],64203:[[38923]],64204:[[38971]],64205:[[39698]],64206:[[40860]],64207:[[141386]],64208:[[141380]],64209:[[144341]],64210:[[15261]],64211:[[16408]],64212:[[16441]],64213:[[152137]],64214:[[154832]],64215:[[163539]],64216:[[40771]],64217:[[40846]],195072:[[38953]],195073:[[169398]],195074:[[39138]],195075:[[19251]],195076:[[39209]],195077:[[39335]],195078:[[39362]],195079:[[39422]],195080:[[19406]],195081:[[170800]],195082:[[39698]],195083:[[4e4]],195084:[[40189]],195085:[[19662]],195086:[[19693]],195087:[[40295]],195088:[[172238]],195089:[[19704]],195090:[[172293]],195091:[[172558]],195092:[[172689]],195093:[[40635]],195094:[[19798]],195095:[[40697]],195096:[[40702]],195097:[[40709]],195098:[[40719]],195099:[[40726]],195100:[[40763]],195101:[[173568]]},64256:{64256:[[102,102],256],64257:[[102,105],256],64258:[[102,108],256],64259:[[102,102,105],256],64260:[[102,102,108],256],64261:[[383,116],256],64262:[[115,116],256],64275:[[1396,1398],256],64276:[[1396,1381],256],64277:[[1396,1387],256],64278:[[1406,1398],256],64279:[[1396,1389],256],64285:[[1497,1460],512],64286:[,26],64287:[[1522,1463],512],64288:[[1506],256],64289:[[1488],256],64290:[[1491],256],64291:[[1492],256],64292:[[1499],256],64293:[[1500],256],64294:[[1501],256],64295:[[1512],256],64296:[[1514],256],64297:[[43],256],64298:[[1513,1473],512],64299:[[1513,1474],512],64300:[[64329,1473],512],64301:[[64329,1474],512],64302:[[1488,1463],512],64303:[[1488,1464],512],64304:[[1488,1468],512],64305:[[1489,1468],512],64306:[[1490,1468],512],64307:[[1491,1468],512],64308:[[1492,1468],512],64309:[[1493,1468],512],64310:[[1494,1468],512],64312:[[1496,1468],512],64313:[[1497,1468],512],64314:[[1498,1468],512],64315:[[1499,1468],512],64316:[[1500,1468],512],64318:[[1502,1468],512],64320:[[1504,1468],512],64321:[[1505,1468],512],64323:[[1507,1468],512],64324:[[1508,1468],512],64326:[[1510,1468],512],64327:[[1511,1468],512],64328:[[1512,1468],512],64329:[[1513,1468],512],64330:[[1514,1468],512],64331:[[1493,1465],512],64332:[[1489,1471],512],64333:[[1499,1471],512],64334:[[1508,1471],512],64335:[[1488,1500],256],64336:[[1649],256],64337:[[1649],256],64338:[[1659],256],64339:[[1659],256],64340:[[1659],256],64341:[[1659],256],64342:[[1662],256],64343:[[1662],256],64344:[[1662],256],64345:[[1662],256],64346:[[1664],256],64347:[[1664],256],64348:[[1664],256],64349:[[1664],256],64350:[[1658],256],64351:[[1658],256],64352:[[1658],256],64353:[[1658],256],64354:[[1663],256],64355:[[1663],256],64356:[[1663],256],64357:[[1663],256],64358:[[1657],256],64359:[[1657],256],64360:[[1657],256],64361:[[1657],256],64362:[[1700],256],64363:[[1700],256],64364:[[1700],256],64365:[[1700],256],64366:[[1702],256],64367:[[1702],256],64368:[[1702],256],64369:[[1702],256],64370:[[1668],256],64371:[[1668],256],64372:[[1668],256],64373:[[1668],256],64374:[[1667],256],64375:[[1667],256],64376:[[1667],256],64377:[[1667],256],64378:[[1670],256],64379:[[1670],256],64380:[[1670],256],64381:[[1670],256],64382:[[1671],256],64383:[[1671],256],64384:[[1671],256],64385:[[1671],256],64386:[[1677],256],64387:[[1677],256],64388:[[1676],256],64389:[[1676],256],64390:[[1678],256],64391:[[1678],256],64392:[[1672],256],64393:[[1672],256],64394:[[1688],256],64395:[[1688],256],64396:[[1681],256],64397:[[1681],256],64398:[[1705],256],64399:[[1705],256],64400:[[1705],256],64401:[[1705],256],64402:[[1711],256],64403:[[1711],256],64404:[[1711],256],64405:[[1711],256],64406:[[1715],256],64407:[[1715],256],64408:[[1715],256],64409:[[1715],256],64410:[[1713],256],64411:[[1713],256],64412:[[1713],256],64413:[[1713],256],64414:[[1722],256],64415:[[1722],256],64416:[[1723],256],64417:[[1723],256],64418:[[1723],256],64419:[[1723],256],64420:[[1728],256],64421:[[1728],256],64422:[[1729],256],64423:[[1729],256],64424:[[1729],256],64425:[[1729],256],64426:[[1726],256],64427:[[1726],256],64428:[[1726],256],64429:[[1726],256],64430:[[1746],256],64431:[[1746],256],64432:[[1747],256],64433:[[1747],256],64467:[[1709],256],64468:[[1709],256],64469:[[1709],256],64470:[[1709],256],64471:[[1735],256],64472:[[1735],256],64473:[[1734],256],64474:[[1734],256],64475:[[1736],256],64476:[[1736],256],64477:[[1655],256],64478:[[1739],256],64479:[[1739],256],64480:[[1733],256],64481:[[1733],256],64482:[[1737],256],64483:[[1737],256],64484:[[1744],256],64485:[[1744],256],64486:[[1744],256],64487:[[1744],256],64488:[[1609],256],64489:[[1609],256],64490:[[1574,1575],256],64491:[[1574,1575],256],64492:[[1574,1749],256],64493:[[1574,1749],256],64494:[[1574,1608],256],64495:[[1574,1608],256],64496:[[1574,1735],256],64497:[[1574,1735],256],64498:[[1574,1734],256],64499:[[1574,1734],256],64500:[[1574,1736],256],64501:[[1574,1736],256],64502:[[1574,1744],256],64503:[[1574,1744],256],64504:[[1574,1744],256],64505:[[1574,1609],256],64506:[[1574,1609],256],64507:[[1574,1609],256],64508:[[1740],256],64509:[[1740],256],64510:[[1740],256],64511:[[1740],256]},64512:{64512:[[1574,1580],256],64513:[[1574,1581],256],64514:[[1574,1605],256],64515:[[1574,1609],256],64516:[[1574,1610],256],64517:[[1576,1580],256],64518:[[1576,1581],256],64519:[[1576,1582],256],64520:[[1576,1605],256],64521:[[1576,1609],256],64522:[[1576,1610],256],64523:[[1578,1580],256],64524:[[1578,1581],256],64525:[[1578,1582],256],64526:[[1578,1605],256],64527:[[1578,1609],256],64528:[[1578,1610],256],64529:[[1579,1580],256],64530:[[1579,1605],256],64531:[[1579,1609],256],64532:[[1579,1610],256],64533:[[1580,1581],256],64534:[[1580,1605],256],64535:[[1581,1580],256],64536:[[1581,1605],256],64537:[[1582,1580],256],64538:[[1582,1581],256],64539:[[1582,1605],256],64540:[[1587,1580],256],64541:[[1587,1581],256],64542:[[1587,1582],256],64543:[[1587,1605],256],64544:[[1589,1581],256],64545:[[1589,1605],256],64546:[[1590,1580],256],64547:[[1590,1581],256],64548:[[1590,1582],256],64549:[[1590,1605],256],64550:[[1591,1581],256],64551:[[1591,1605],256],64552:[[1592,1605],256],64553:[[1593,1580],256],64554:[[1593,1605],256],64555:[[1594,1580],256],64556:[[1594,1605],256],64557:[[1601,1580],256],64558:[[1601,1581],256],64559:[[1601,1582],256],64560:[[1601,1605],256],64561:[[1601,1609],256],64562:[[1601,1610],256],64563:[[1602,1581],256],64564:[[1602,1605],256],64565:[[1602,1609],256],64566:[[1602,1610],256],64567:[[1603,1575],256],64568:[[1603,1580],256],64569:[[1603,1581],256],64570:[[1603,1582],256],64571:[[1603,1604],256],64572:[[1603,1605],256],64573:[[1603,1609],256],64574:[[1603,1610],256],64575:[[1604,1580],256],64576:[[1604,1581],256],64577:[[1604,1582],256],64578:[[1604,1605],256],64579:[[1604,1609],256],64580:[[1604,1610],256],64581:[[1605,1580],256],64582:[[1605,1581],256],64583:[[1605,1582],256],64584:[[1605,1605],256],64585:[[1605,1609],256],64586:[[1605,1610],256],64587:[[1606,1580],256],64588:[[1606,1581],256],64589:[[1606,1582],256],64590:[[1606,1605],256],64591:[[1606,1609],256],64592:[[1606,1610],256],64593:[[1607,1580],256],64594:[[1607,1605],256],64595:[[1607,1609],256],64596:[[1607,1610],256],64597:[[1610,1580],256],64598:[[1610,1581],256],64599:[[1610,1582],256],64600:[[1610,1605],256],64601:[[1610,1609],256],64602:[[1610,1610],256],64603:[[1584,1648],256],64604:[[1585,1648],256],64605:[[1609,1648],256],64606:[[32,1612,1617],256],64607:[[32,1613,1617],256],64608:[[32,1614,1617],256],64609:[[32,1615,1617],256],64610:[[32,1616,1617],256],64611:[[32,1617,1648],256],64612:[[1574,1585],256],64613:[[1574,1586],256],64614:[[1574,1605],256],64615:[[1574,1606],256],64616:[[1574,1609],256],64617:[[1574,1610],256],64618:[[1576,1585],256],64619:[[1576,1586],256],64620:[[1576,1605],256],64621:[[1576,1606],256],64622:[[1576,1609],256],64623:[[1576,1610],256],64624:[[1578,1585],256],64625:[[1578,1586],256],64626:[[1578,1605],256],64627:[[1578,1606],256],64628:[[1578,1609],256],64629:[[1578,1610],256],64630:[[1579,1585],256],64631:[[1579,1586],256],64632:[[1579,1605],256],64633:[[1579,1606],256],64634:[[1579,1609],256],64635:[[1579,1610],256],64636:[[1601,1609],256],64637:[[1601,1610],256],64638:[[1602,1609],256],64639:[[1602,1610],256],64640:[[1603,1575],256],64641:[[1603,1604],256],64642:[[1603,1605],256],64643:[[1603,1609],256],64644:[[1603,1610],256],64645:[[1604,1605],256],64646:[[1604,1609],256],64647:[[1604,1610],256],64648:[[1605,1575],256],64649:[[1605,1605],256],64650:[[1606,1585],256],64651:[[1606,1586],256],64652:[[1606,1605],256],64653:[[1606,1606],256],64654:[[1606,1609],256],64655:[[1606,1610],256],64656:[[1609,1648],256],64657:[[1610,1585],256],64658:[[1610,1586],256],64659:[[1610,1605],256],64660:[[1610,1606],256],64661:[[1610,1609],256],64662:[[1610,1610],256],64663:[[1574,1580],256],64664:[[1574,1581],256],64665:[[1574,1582],256],64666:[[1574,1605],256],64667:[[1574,1607],256],64668:[[1576,1580],256],64669:[[1576,1581],256],64670:[[1576,1582],256],64671:[[1576,1605],256],64672:[[1576,1607],256],64673:[[1578,1580],256],64674:[[1578,1581],256],64675:[[1578,1582],256],64676:[[1578,1605],256],64677:[[1578,1607],256],64678:[[1579,1605],256],64679:[[1580,1581],256],64680:[[1580,1605],256],64681:[[1581,1580],256],64682:[[1581,1605],256],64683:[[1582,1580],256],64684:[[1582,1605],256],64685:[[1587,1580],256],64686:[[1587,1581],256],64687:[[1587,1582],256],64688:[[1587,1605],256],64689:[[1589,1581],256],64690:[[1589,1582],256],64691:[[1589,1605],256],64692:[[1590,1580],256],64693:[[1590,1581],256],64694:[[1590,1582],256],64695:[[1590,1605],256],64696:[[1591,1581],256],64697:[[1592,1605],256],64698:[[1593,1580],256],64699:[[1593,1605],256],64700:[[1594,1580],256],64701:[[1594,1605],256],64702:[[1601,1580],256],64703:[[1601,1581],256],64704:[[1601,1582],256],64705:[[1601,1605],256],64706:[[1602,1581],256],64707:[[1602,1605],256],64708:[[1603,1580],256],64709:[[1603,1581],256],64710:[[1603,1582],256],64711:[[1603,1604],256],64712:[[1603,1605],256],64713:[[1604,1580],256],64714:[[1604,1581],256],64715:[[1604,1582],256],64716:[[1604,1605],256],64717:[[1604,1607],256],64718:[[1605,1580],256],64719:[[1605,1581],256],64720:[[1605,1582],256],64721:[[1605,1605],256],64722:[[1606,1580],256],64723:[[1606,1581],256],64724:[[1606,1582],256],64725:[[1606,1605],256],64726:[[1606,1607],256],64727:[[1607,1580],256],64728:[[1607,1605],256],64729:[[1607,1648],256],64730:[[1610,1580],256],64731:[[1610,1581],256],64732:[[1610,1582],256],64733:[[1610,1605],256],64734:[[1610,1607],256],64735:[[1574,1605],256],64736:[[1574,1607],256],64737:[[1576,1605],256],64738:[[1576,1607],256],64739:[[1578,1605],256],64740:[[1578,1607],256],64741:[[1579,1605],256],64742:[[1579,1607],256],64743:[[1587,1605],256],64744:[[1587,1607],256],64745:[[1588,1605],256],64746:[[1588,1607],256],64747:[[1603,1604],256],64748:[[1603,1605],256],64749:[[1604,1605],256],64750:[[1606,1605],256],64751:[[1606,1607],256],64752:[[1610,1605],256],64753:[[1610,1607],256],64754:[[1600,1614,1617],256],64755:[[1600,1615,1617],256],64756:[[1600,1616,1617],256],64757:[[1591,1609],256],64758:[[1591,1610],256],64759:[[1593,1609],256],64760:[[1593,1610],256],64761:[[1594,1609],256],64762:[[1594,1610],256],64763:[[1587,1609],256],64764:[[1587,1610],256],64765:[[1588,1609],256],64766:[[1588,1610],256],64767:[[1581,1609],256]},64768:{64768:[[1581,1610],256],64769:[[1580,1609],256],64770:[[1580,1610],256],64771:[[1582,1609],256],64772:[[1582,1610],256],64773:[[1589,1609],256],64774:[[1589,1610],256],64775:[[1590,1609],256],64776:[[1590,1610],256],64777:[[1588,1580],256],64778:[[1588,1581],256],64779:[[1588,1582],256],64780:[[1588,1605],256],64781:[[1588,1585],256],64782:[[1587,1585],256],64783:[[1589,1585],256],64784:[[1590,1585],256],64785:[[1591,1609],256],64786:[[1591,1610],256],64787:[[1593,1609],256],64788:[[1593,1610],256],64789:[[1594,1609],256],64790:[[1594,1610],256],64791:[[1587,1609],256],64792:[[1587,1610],256],64793:[[1588,1609],256],64794:[[1588,1610],256],64795:[[1581,1609],256],64796:[[1581,1610],256],64797:[[1580,1609],256],64798:[[1580,1610],256],64799:[[1582,1609],256],64800:[[1582,1610],256],64801:[[1589,1609],256],64802:[[1589,1610],256],64803:[[1590,1609],256],64804:[[1590,1610],256],64805:[[1588,1580],256],64806:[[1588,1581],256],64807:[[1588,1582],256],64808:[[1588,1605],256],64809:[[1588,1585],256],64810:[[1587,1585],256],64811:[[1589,1585],256],64812:[[1590,1585],256],64813:[[1588,1580],256],64814:[[1588,1581],256],64815:[[1588,1582],256],64816:[[1588,1605],256],64817:[[1587,1607],256],64818:[[1588,1607],256],64819:[[1591,1605],256],64820:[[1587,1580],256],64821:[[1587,1581],256],64822:[[1587,1582],256],64823:[[1588,1580],256],64824:[[1588,1581],256],64825:[[1588,1582],256],64826:[[1591,1605],256],64827:[[1592,1605],256],64828:[[1575,1611],256],64829:[[1575,1611],256],64848:[[1578,1580,1605],256],64849:[[1578,1581,1580],256],64850:[[1578,1581,1580],256],64851:[[1578,1581,1605],256],64852:[[1578,1582,1605],256],64853:[[1578,1605,1580],256],64854:[[1578,1605,1581],256],64855:[[1578,1605,1582],256],64856:[[1580,1605,1581],256],64857:[[1580,1605,1581],256],64858:[[1581,1605,1610],256],64859:[[1581,1605,1609],256],64860:[[1587,1581,1580],256],64861:[[1587,1580,1581],256],64862:[[1587,1580,1609],256],64863:[[1587,1605,1581],256],64864:[[1587,1605,1581],256],64865:[[1587,1605,1580],256],64866:[[1587,1605,1605],256],64867:[[1587,1605,1605],256],64868:[[1589,1581,1581],256],64869:[[1589,1581,1581],256],64870:[[1589,1605,1605],256],64871:[[1588,1581,1605],256],64872:[[1588,1581,1605],256],64873:[[1588,1580,1610],256],64874:[[1588,1605,1582],256],64875:[[1588,1605,1582],256],64876:[[1588,1605,1605],256],64877:[[1588,1605,1605],256],64878:[[1590,1581,1609],256],64879:[[1590,1582,1605],256],64880:[[1590,1582,1605],256],64881:[[1591,1605,1581],256],64882:[[1591,1605,1581],256],64883:[[1591,1605,1605],256],64884:[[1591,1605,1610],256],64885:[[1593,1580,1605],256],64886:[[1593,1605,1605],256],64887:[[1593,1605,1605],256],64888:[[1593,1605,1609],256],64889:[[1594,1605,1605],256],64890:[[1594,1605,1610],256],64891:[[1594,1605,1609],256],64892:[[1601,1582,1605],256],64893:[[1601,1582,1605],256],64894:[[1602,1605,1581],256],64895:[[1602,1605,1605],256],64896:[[1604,1581,1605],256],64897:[[1604,1581,1610],256],64898:[[1604,1581,1609],256],64899:[[1604,1580,1580],256],64900:[[1604,1580,1580],256],64901:[[1604,1582,1605],256],64902:[[1604,1582,1605],256],64903:[[1604,1605,1581],256],64904:[[1604,1605,1581],256],64905:[[1605,1581,1580],256],64906:[[1605,1581,1605],256],64907:[[1605,1581,1610],256],64908:[[1605,1580,1581],256],64909:[[1605,1580,1605],256],64910:[[1605,1582,1580],256],64911:[[1605,1582,1605],256],64914:[[1605,1580,1582],256],64915:[[1607,1605,1580],256],64916:[[1607,1605,1605],256],64917:[[1606,1581,1605],256],64918:[[1606,1581,1609],256],64919:[[1606,1580,1605],256],64920:[[1606,1580,1605],256],64921:[[1606,1580,1609],256],64922:[[1606,1605,1610],256],64923:[[1606,1605,1609],256],64924:[[1610,1605,1605],256],64925:[[1610,1605,1605],256],64926:[[1576,1582,1610],256],64927:[[1578,1580,1610],256],64928:[[1578,1580,1609],256],64929:[[1578,1582,1610],256],64930:[[1578,1582,1609],256],64931:[[1578,1605,1610],256],64932:[[1578,1605,1609],256],64933:[[1580,1605,1610],256],64934:[[1580,1581,1609],256],64935:[[1580,1605,1609],256],64936:[[1587,1582,1609],256],64937:[[1589,1581,1610],256],64938:[[1588,1581,1610],256],64939:[[1590,1581,1610],256],64940:[[1604,1580,1610],256],64941:[[1604,1605,1610],256],64942:[[1610,1581,1610],256],64943:[[1610,1580,1610],256],64944:[[1610,1605,1610],256],64945:[[1605,1605,1610],256],64946:[[1602,1605,1610],256],64947:[[1606,1581,1610],256],64948:[[1602,1605,1581],256],64949:[[1604,1581,1605],256],64950:[[1593,1605,1610],256],64951:[[1603,1605,1610],256],64952:[[1606,1580,1581],256],64953:[[1605,1582,1610],256],64954:[[1604,1580,1605],256],64955:[[1603,1605,1605],256],64956:[[1604,1580,1605],256],64957:[[1606,1580,1581],256],64958:[[1580,1581,1610],256],64959:[[1581,1580,1610],256],64960:[[1605,1580,1610],256],64961:[[1601,1605,1610],256],64962:[[1576,1581,1610],256],64963:[[1603,1605,1605],256],64964:[[1593,1580,1605],256],64965:[[1589,1605,1605],256],64966:[[1587,1582,1610],256],64967:[[1606,1580,1610],256],65008:[[1589,1604,1746],256],65009:[[1602,1604,1746],256],65010:[[1575,1604,1604,1607],256],65011:[[1575,1603,1576,1585],256],65012:[[1605,1581,1605,1583],256],65013:[[1589,1604,1593,1605],256],65014:[[1585,1587,1608,1604],256],65015:[[1593,1604,1610,1607],256],65016:[[1608,1587,1604,1605],256],65017:[[1589,1604,1609],256],65018:[[1589,1604,1609,32,1575,1604,1604,1607,32,1593,1604,1610,1607,32,1608,1587,1604,1605],256],65019:[[1580,1604,32,1580,1604,1575,1604,1607],256],65020:[[1585,1740,1575,1604],256]},65024:{65040:[[44],256],65041:[[12289],256],65042:[[12290],256],65043:[[58],256],65044:[[59],256],65045:[[33],256],65046:[[63],256],65047:[[12310],256],65048:[[12311],256],65049:[[8230],256],65056:[,230],65057:[,230],65058:[,230],65059:[,230],65060:[,230],65061:[,230],65062:[,230],65063:[,220],65064:[,220],65065:[,220],65066:[,220],65067:[,220],65068:[,220],65069:[,220],65072:[[8229],256],65073:[[8212],256],65074:[[8211],256],65075:[[95],256],65076:[[95],256],65077:[[40],256],65078:[[41],256],65079:[[123],256],65080:[[125],256],65081:[[12308],256],65082:[[12309],256],65083:[[12304],256],65084:[[12305],256],65085:[[12298],256],65086:[[12299],256],65087:[[12296],256],65088:[[12297],256],65089:[[12300],256],65090:[[12301],256],65091:[[12302],256],65092:[[12303],256],65095:[[91],256],65096:[[93],256],65097:[[8254],256],65098:[[8254],256],65099:[[8254],256],65100:[[8254],256],65101:[[95],256],65102:[[95],256],65103:[[95],256],65104:[[44],256],65105:[[12289],256],65106:[[46],256],65108:[[59],256],65109:[[58],256],65110:[[63],256],65111:[[33],256],65112:[[8212],256],65113:[[40],256],65114:[[41],256],65115:[[123],256],65116:[[125],256],65117:[[12308],256],65118:[[12309],256],65119:[[35],256],65120:[[38],256],65121:[[42],256],65122:[[43],256],65123:[[45],256],65124:[[60],256],65125:[[62],256],65126:[[61],256],65128:[[92],256],65129:[[36],256],65130:[[37],256],65131:[[64],256],65136:[[32,1611],256],65137:[[1600,1611],256],65138:[[32,1612],256],65140:[[32,1613],256],65142:[[32,1614],256],65143:[[1600,1614],256],65144:[[32,1615],256],65145:[[1600,1615],256],65146:[[32,1616],256],65147:[[1600,1616],256],65148:[[32,1617],256],65149:[[1600,1617],256],65150:[[32,1618],256],65151:[[1600,1618],256],65152:[[1569],256],65153:[[1570],256],65154:[[1570],256],65155:[[1571],256],65156:[[1571],256],65157:[[1572],256],65158:[[1572],256],65159:[[1573],256],65160:[[1573],256],65161:[[1574],256],65162:[[1574],256],65163:[[1574],256],65164:[[1574],256],65165:[[1575],256],65166:[[1575],256],65167:[[1576],256],65168:[[1576],256],65169:[[1576],256],65170:[[1576],256],65171:[[1577],256],65172:[[1577],256],65173:[[1578],256],65174:[[1578],256],65175:[[1578],256],65176:[[1578],256],65177:[[1579],256],65178:[[1579],256],65179:[[1579],256],65180:[[1579],256],65181:[[1580],256],65182:[[1580],256],65183:[[1580],256],65184:[[1580],256],65185:[[1581],256],65186:[[1581],256],65187:[[1581],256],65188:[[1581],256],65189:[[1582],256],65190:[[1582],256],65191:[[1582],256],65192:[[1582],256],65193:[[1583],256],65194:[[1583],256],65195:[[1584],256],65196:[[1584],256],65197:[[1585],256],65198:[[1585],256],65199:[[1586],256],65200:[[1586],256],65201:[[1587],256],65202:[[1587],256],65203:[[1587],256],65204:[[1587],256],65205:[[1588],256],65206:[[1588],256],65207:[[1588],256],65208:[[1588],256],65209:[[1589],256],65210:[[1589],256],65211:[[1589],256],65212:[[1589],256],65213:[[1590],256],65214:[[1590],256],65215:[[1590],256],65216:[[1590],256],65217:[[1591],256],65218:[[1591],256],65219:[[1591],256],65220:[[1591],256],65221:[[1592],256],65222:[[1592],256],65223:[[1592],256],65224:[[1592],256],65225:[[1593],256],65226:[[1593],256],65227:[[1593],256],65228:[[1593],256],65229:[[1594],256],65230:[[1594],256],65231:[[1594],256],65232:[[1594],256],65233:[[1601],256],65234:[[1601],256],65235:[[1601],256],65236:[[1601],256],65237:[[1602],256],65238:[[1602],256],65239:[[1602],256],65240:[[1602],256],65241:[[1603],256],65242:[[1603],256],65243:[[1603],256],65244:[[1603],256],65245:[[1604],256],65246:[[1604],256],65247:[[1604],256],65248:[[1604],256],65249:[[1605],256],65250:[[1605],256],65251:[[1605],256],65252:[[1605],256],65253:[[1606],256],65254:[[1606],256],65255:[[1606],256],65256:[[1606],256],65257:[[1607],256],65258:[[1607],256],65259:[[1607],256],65260:[[1607],256],65261:[[1608],256],65262:[[1608],256],65263:[[1609],256],65264:[[1609],256],65265:[[1610],256],65266:[[1610],256],65267:[[1610],256],65268:[[1610],256],65269:[[1604,1570],256],65270:[[1604,1570],256],65271:[[1604,1571],256],65272:[[1604,1571],256],65273:[[1604,1573],256],65274:[[1604,1573],256],65275:[[1604,1575],256],65276:[[1604,1575],256]},65280:{65281:[[33],256],65282:[[34],256],65283:[[35],256],65284:[[36],256],65285:[[37],256],65286:[[38],256],65287:[[39],256],65288:[[40],256],65289:[[41],256],65290:[[42],256],65291:[[43],256],65292:[[44],256],65293:[[45],256],65294:[[46],256],65295:[[47],256],65296:[[48],256],65297:[[49],256],65298:[[50],256],65299:[[51],256],65300:[[52],256],65301:[[53],256],65302:[[54],256],65303:[[55],256],65304:[[56],256],65305:[[57],256],65306:[[58],256],65307:[[59],256],65308:[[60],256],65309:[[61],256],65310:[[62],256],65311:[[63],256],65312:[[64],256],65313:[[65],256],65314:[[66],256],65315:[[67],256],65316:[[68],256],65317:[[69],256],65318:[[70],256],65319:[[71],256],65320:[[72],256],65321:[[73],256],65322:[[74],256],65323:[[75],256],65324:[[76],256],65325:[[77],256],65326:[[78],256],65327:[[79],256],65328:[[80],256],65329:[[81],256],65330:[[82],256],65331:[[83],256],65332:[[84],256],65333:[[85],256],65334:[[86],256],65335:[[87],256],65336:[[88],256],65337:[[89],256],65338:[[90],256],65339:[[91],256],65340:[[92],256],65341:[[93],256],65342:[[94],256],65343:[[95],256],65344:[[96],256],65345:[[97],256],65346:[[98],256],65347:[[99],256],65348:[[100],256],65349:[[101],256],65350:[[102],256],65351:[[103],256],65352:[[104],256],65353:[[105],256],65354:[[106],256],65355:[[107],256],65356:[[108],256],65357:[[109],256],65358:[[110],256],65359:[[111],256],65360:[[112],256],65361:[[113],256],65362:[[114],256],65363:[[115],256],65364:[[116],256],65365:[[117],256],65366:[[118],256],65367:[[119],256],65368:[[120],256],65369:[[121],256],65370:[[122],256],65371:[[123],256],65372:[[124],256],65373:[[125],256],65374:[[126],256],65375:[[10629],256],65376:[[10630],256],65377:[[12290],256],65378:[[12300],256],65379:[[12301],256],65380:[[12289],256],65381:[[12539],256],65382:[[12530],256],65383:[[12449],256],65384:[[12451],256],65385:[[12453],256],65386:[[12455],256],65387:[[12457],256],65388:[[12515],256],65389:[[12517],256],65390:[[12519],256],65391:[[12483],256],65392:[[12540],256],65393:[[12450],256],65394:[[12452],256],65395:[[12454],256],65396:[[12456],256],65397:[[12458],256],65398:[[12459],256],65399:[[12461],256],65400:[[12463],256],65401:[[12465],256],65402:[[12467],256],65403:[[12469],256],65404:[[12471],256],65405:[[12473],256],65406:[[12475],256],65407:[[12477],256],65408:[[12479],256],65409:[[12481],256],65410:[[12484],256],65411:[[12486],256],65412:[[12488],256],65413:[[12490],256],65414:[[12491],256],65415:[[12492],256],65416:[[12493],256],65417:[[12494],256],65418:[[12495],256],65419:[[12498],256],65420:[[12501],256],65421:[[12504],256],65422:[[12507],256],65423:[[12510],256],65424:[[12511],256],65425:[[12512],256],65426:[[12513],256],65427:[[12514],256],65428:[[12516],256],65429:[[12518],256],65430:[[12520],256],65431:[[12521],256],65432:[[12522],256],65433:[[12523],256],65434:[[12524],256],65435:[[12525],256],65436:[[12527],256],65437:[[12531],256],65438:[[12441],256],65439:[[12442],256],65440:[[12644],256],65441:[[12593],256],65442:[[12594],256],65443:[[12595],256],65444:[[12596],256],65445:[[12597],256],65446:[[12598],256],65447:[[12599],256],65448:[[12600],256],65449:[[12601],256],65450:[[12602],256],65451:[[12603],256],65452:[[12604],256],65453:[[12605],256],65454:[[12606],256],65455:[[12607],256],65456:[[12608],256],65457:[[12609],256],65458:[[12610],256],65459:[[12611],256],65460:[[12612],256],65461:[[12613],256],65462:[[12614],256],65463:[[12615],256],65464:[[12616],256],65465:[[12617],256],65466:[[12618],256],65467:[[12619],256],65468:[[12620],256],65469:[[12621],256],65470:[[12622],256],65474:[[12623],256],65475:[[12624],256],65476:[[12625],256],65477:[[12626],256],65478:[[12627],256],65479:[[12628],256],65482:[[12629],256],65483:[[12630],256],65484:[[12631],256],65485:[[12632],256],65486:[[12633],256],65487:[[12634],256],65490:[[12635],256],65491:[[12636],256],65492:[[12637],256],65493:[[12638],256],65494:[[12639],256],65495:[[12640],256],65498:[[12641],256],65499:[[12642],256],65500:[[12643],256],65504:[[162],256],65505:[[163],256],65506:[[172],256],65507:[[175],256],65508:[[166],256],65509:[[165],256],65510:[[8361],256],65512:[[9474],256],65513:[[8592],256],65514:[[8593],256],65515:[[8594],256],65516:[[8595],256],65517:[[9632],256],65518:[[9675],256]}};var _={nfc:function(e){return S("NFC",e)},nfd:function(e){return S("NFD",e)},nfkc:function(e){return S("NFKC",e)},nfkd:function(e){return S("NFKD",e)}};e.exports=_,_.shimApplied=!1,String.prototype.normalize||(Object.defineProperty(String.prototype,"normalize",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=""+this,t=void 0===arguments[0]?"NFC":arguments[0];if(null===this||void 0===this)throw new TypeError("Cannot call method on "+Object.prototype.toString.call(this));if("NFC"===t)return _.nfc(e);if("NFD"===t)return _.nfd(e);if("NFKC"===t)return _.nfkc(e);if("NFKD"===t)return _.nfkd(e);throw new RangeError("Invalid normalization form: "+t)}}),_.shimApplied=!0)}()})),o=n((function(e,t){!function(e){if(e.atob)try{e.atob(" ")}catch(n){e.atob=(t=e.atob,(r=function(e){return t(String(e).replace(/[\t\n\f\r ]+/g,""))}).original=t,r)}else{var t,r,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;e.btoa=function(e){for(var t,r,i,o,s="",a=0,c=(e=String(e)).length%3;a<e.length;){if((r=e.charCodeAt(a++))>255||(i=e.charCodeAt(a++))>255||(o=e.charCodeAt(a++))>255)throw new TypeError("Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.");s+=n.charAt((t=r<<16|i<<8|o)>>18&63)+n.charAt(t>>12&63)+n.charAt(t>>6&63)+n.charAt(63&t)}return c?s.slice(0,c-3)+"===".substring(c):s},e.atob=function(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!i.test(e))throw new TypeError("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");e+="==".slice(2-(3&e.length));for(var t,r,o,s="",a=0;a<e.length;)t=n.indexOf(e.charAt(a++))<<18|n.indexOf(e.charAt(a++))<<12|(r=n.indexOf(e.charAt(a++)))<<6|(o=n.indexOf(e.charAt(a++))),s+=64===r?String.fromCharCode(t>>16&255):64===o?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return s}}}(t)}));!function(){var e=[];try{for(var r=[],n=["NFD","NFC","NFKD","NFKC"],s=0;s<n.length;s++)try{if("test"!=="test".normalize(n[s]))throw new Error("failed to normalize")}catch(e){r.push(n[s])}if(r.length)throw e.push("String.prototype.normalize (missing: "+r.join(", ")+")"),new Error("bad normalize");if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw e.push("String.prototype.normalize (broken)"),new Error("bad normalize")}catch(e){var a=i;String.prototype.normalize=function(e){var t=a[(e||"NFC").toLowerCase()];if(!t)throw new RangeError("invalid form - "+e);return t(this)}}var c=o;t.atob||(e.push("atob"),t.atob=c.atob),t.btoa||(e.push("btoa"),t.btoa=c.btoa),ArrayBuffer.isView||(e.push("ArrayBuffer.isView"),ArrayBuffer.isView=function(e){return!!e.buffer}),t.nextTick||(e.push("nextTick"),t.nextTick=function(e){setTimeout(e,0)}),t.crypto||(t.crypto={}),t.crypto.getRandomValues||(e.push("crypto.getRandomValues"),console.log("WARNING: This environment is missing a secure random source; generated private keys may be at risk, think VERY carefully about not adding a better secure source."),t.crypto.getRandomValues=function(e){for(var t=Math.floor((new Date).getTime())%e.length,r=0;r<e.length;r++)e[(t+r)%e.length]=Math.floor(256*Math.random())});try{var l=new FileReader;try{l.readAsArrayBuffer(new Blob(["hello"],{type:"text/plain"}))}catch(t){e.push("FileReader.prototype.readAsArrayBuffer"),FileReader.prototype.readAsArrayBuffer=function(e){if(this.readyState===this.LOADING)throw new Error("InvalidStateError");this._setReadyState(this.LOADING),this._result=null,this._error=null;var t=new FileReader;t.onloadend=()=>{var e=atob(t.result.split(",").pop().trim()),r=new ArrayBuffer(e.length);new Uint8Array(r).set(Array.from(e).map((e=>e.charCodeAt(0)))),this._result=r,this._setReadyState(this.DONE)},t.readAsDataURL(e)}}}catch(e){console.log("Missing FileReader; unsupported platform")}if(e.length)for(console.log("Shims Injected:"),s=0;s<e.length;s++)console.log(" - "+e[s])}(),e.default={},Object.defineProperty(e,"__esModule",{value:!0})}(t)},4760:(e,t,r)=>{"use strict";r.r(t),r.d(t,{SigningKey:()=>G,computePublicKey:()=>Q,recoverPublicKey:()=>Y});var n=r(4166),i=r.n(n),o=r(7553),s=r.n(o);"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof r.g?r.g:"undefined"!==typeof self&&self;function a(e,t,r){return r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}((void 0===t||null===t)&&r.path)}},e(r,r.exports),r.exports}var c=l;function l(e,t){if(!e)throw new Error(t||"Assertion failed")}l.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)};var u=a((function(e,t){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){(e=e.replace(/[^a-z0-9]+/gi,"")).length%2!==0&&(e="0"+e);for(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,s=255&i;o?r.push(o,s):r.push(s)}return r},r.zero2=n,r.toHex=i,r.encode=function(e,t){return"hex"===t?i(e):e}})),h=a((function(e,t){var r=t;r.assert=c,r.toArray=u.toArray,r.zero2=u.zero2,r.toHex=u.toHex,r.encode=u.encode,r.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(),s=0;s<n.length;s++){var a,c=o.andln(i-1);o.isOdd()?(a=c>(i>>1)-1?(i>>1)-c:c,o.isubn(a)):a=0,n[s]=a,o.iushrn(1)}return n},r.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 s,a,c=e.andln(3)+i&3,l=t.andln(3)+o&3;3===c&&(c=-1),3===l&&(l=-1),s=0===(1&c)?0:3!==(n=e.andln(7)+i&7)&&5!==n||2!==l?c:-c,r[0].push(s),a=0===(1&l)?0:3!==(n=t.andln(7)+o&7)&&5!==n||2!==c?l:-l,r[1].push(a),2*i===s+1&&(i=1-i),2*o===a+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},r.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},r.parseBytes=function(e){return"string"===typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new(i())(e,"hex","le")}})),d=h.getNAF,f=h.getJSF,p=h.assert;function g(e,t){this.type=e,this.p=new(i())(t.p,16),this.red=t.prime?i().red(t.prime):i().mont(this.p),this.zero=new(i())(0).toRed(this.red),this.one=new(i())(1).toRed(this.red),this.two=new(i())(2).toRed(this.red),this.n=t.n&&new(i())(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))}var m=g;function y(e,t){this.curve=e,this.type=t,this.precomputed=null}g.prototype.point=function(){throw new Error("Not implemented")},g.prototype.validate=function(){throw new Error("Not implemented")},g.prototype._fixedNafMul=function(e,t){p(e.precomputed);var r=e._getDoubles(),n=d(t,1,this._bitLength),i=(1<<r.step+1)-(r.step%2===0?2:1);i/=3;var o,s,a=[];for(o=0;o<n.length;o+=r.step){s=0;for(var c=o+r.step-1;c>=o;c--)s=(s<<1)+n[c];a.push(s)}for(var l=this.jpoint(null,null,null),u=this.jpoint(null,null,null),h=i;h>0;h--){for(o=0;o<a.length;o++)(s=a[o])===h?u=u.mixedAdd(r.points[o]):s===-h&&(u=u.mixedAdd(r.points[o].neg()));l=l.add(u)}return l.toP()},g.prototype._wnafMul=function(e,t){var r=4,n=e._getNAFPoints(r);r=n.wnd;for(var i=n.points,o=d(t,r,this._bitLength),s=this.jpoint(null,null,null),a=o.length-1;a>=0;a--){for(var c=0;a>=0&&0===o[a];a--)c++;if(a>=0&&c++,s=s.dblp(c),a<0)break;var l=o[a];p(0!==l),s="affine"===e.type?l>0?s.mixedAdd(i[l-1>>1]):s.mixedAdd(i[-l-1>>1].neg()):l>0?s.add(i[l-1>>1]):s.add(i[-l-1>>1].neg())}return"affine"===e.type?s.toP():s},g.prototype._wnafMulAdd=function(e,t,r,n,i){var o,s,a,c=this._wnafT1,l=this._wnafT2,u=this._wnafT3,h=0;for(o=0;o<n;o++){var p=(a=t[o])._getNAFPoints(e);c[o]=p.wnd,l[o]=p.points}for(o=n-1;o>=1;o-=2){var g=o-1,m=o;if(1===c[g]&&1===c[m]){var y=[t[g],null,null,t[m]];0===t[g].y.cmp(t[m].y)?(y[1]=t[g].add(t[m]),y[2]=t[g].toJ().mixedAdd(t[m].neg())):0===t[g].y.cmp(t[m].y.redNeg())?(y[1]=t[g].toJ().mixedAdd(t[m]),y[2]=t[g].add(t[m].neg())):(y[1]=t[g].toJ().mixedAdd(t[m]),y[2]=t[g].toJ().mixedAdd(t[m].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],b=f(r[g],r[m]);for(h=Math.max(b[0].length,h),u[g]=new Array(h),u[m]=new Array(h),s=0;s<h;s++){var w=0|b[0][s],E=0|b[1][s];u[g][s]=v[3*(w+1)+(E+1)],u[m][s]=0,l[g]=y}}else u[g]=d(r[g],c[g],this._bitLength),u[m]=d(r[m],c[m],this._bitLength),h=Math.max(u[g].length,h),h=Math.max(u[m].length,h)}var S=this.jpoint(null,null,null),_=this._wnafT4;for(o=h;o>=0;o--){for(var A=0;o>=0;){var k=!0;for(s=0;s<n;s++)_[s]=0|u[s][o],0!==_[s]&&(k=!1);if(!k)break;A++,o--}if(o>=0&&A++,S=S.dblp(A),o<0)break;for(s=0;s<n;s++){var C=_[s];0!==C&&(C>0?a=l[s][C-1>>1]:C<0&&(a=l[s][-C-1>>1].neg()),S="affine"===a.type?S.mixedAdd(a):S.add(a))}}for(o=0;o<n;o++)l[o]=null;return i?S:S.toP()},g.BasePoint=y,y.prototype.eq=function(){throw new Error("Not implemented")},y.prototype.validate=function(){return this.curve.validate(this)},g.prototype.decodePoint=function(e,t){e=h.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]?p(e[e.length-1]%2===0):7===e[0]&&p(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")},y.prototype.encodeCompressed=function(e){return this.encode(e,!0)},y.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))},y.prototype.encode=function(e,t){return h.encode(this._encode(t),e)},y.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},y.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)},y.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}},y.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}},y.prototype._getBeta=function(){return null},y.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t};var v=a((function(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}}})),b=h.assert;function w(e){m.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)}v(w,m);var E=w;function S(e,t,r,n){m.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 _(e,t,r,n){m.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}w.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],b(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)}}},w.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()]},w.prototype._getEndoBasis=function(e){for(var t,r,n,o,s,a,c,l,u,h=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=e,f=this.n.clone(),p=new(i())(1),g=new(i())(0),m=new(i())(0),y=new(i())(1),v=0;0!==d.cmpn(0);){var b=f.div(d);l=f.sub(b.mul(d)),u=m.sub(b.mul(p));var w=y.sub(b.mul(g));if(!n&&l.cmp(h)<0)t=c.neg(),r=p,n=l.neg(),o=u;else if(n&&2===++v)break;c=l,f=d,d=l,m=p,p=u,y=g,g=w}s=l.neg(),a=u;var E=n.sqr().add(o.sqr());return s.sqr().add(a.sqr()).cmp(E)>=0&&(s=t,a=r),n.negative&&(n=n.neg(),o=o.neg()),s.negative&&(s=s.neg(),a=a.neg()),[{a:n,b:o},{a:s,b:a}]},w.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),s=i.mul(r.a),a=o.mul(n.a),c=i.mul(r.b),l=o.mul(n.b);return{k1:e.sub(s).sub(a),k2:c.add(l).neg()}},w.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)},w.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)},w.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o<e.length;o++){var s=this._endoSplit(t[o]),a=e[o],c=a._getBeta();s.k1.negative&&(s.k1.ineg(),a=a.neg(!0)),s.k2.negative&&(s.k2.ineg(),c=c.neg(!0)),n[2*o]=a,n[2*o+1]=c,i[2*o]=s.k1,i[2*o+1]=s.k2}for(var l=this._wnafMulAdd(1,n,i,2*o,r),u=0;u<2*o;u++)n[u]=null,i[u]=null;return l},v(S,m.BasePoint),w.prototype.point=function(e,t,r){return new S(this,e,t,r)},w.prototype.pointFromJSON=function(e,t){return S.fromJSON(this,e,t)},S.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}},S.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]},S.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},S.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)+">"},S.prototype.isInfinity=function(){return this.inf},S.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)},S.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)),s=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,s)},S.prototype.getX=function(){return this.x.fromRed()},S.prototype.getY=function(){return this.y.fromRed()},S.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)},S.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)},S.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)},S.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))},S.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},S.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},v(_,m.BasePoint),w.prototype.jpoint=function(e,t,r){return new _(this,e,t,r)},_.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)},_.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},_.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)),s=e.y.redMul(r.redMul(this.z)),a=n.redSub(i),c=o.redSub(s);if(0===a.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var l=a.redSqr(),u=l.redMul(a),h=n.redMul(l),d=c.redSqr().redIAdd(u).redISub(h).redISub(h),f=c.redMul(h.redISub(d)).redISub(o.redMul(u)),p=this.z.redMul(e.z).redMul(a);return this.curve.jpoint(d,f,p)},_.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),s=r.redSub(n),a=i.redSub(o);if(0===s.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),l=c.redMul(s),u=r.redMul(c),h=a.redSqr().redIAdd(l).redISub(u).redISub(u),d=a.redMul(u.redISub(h)).redISub(i.redMul(l)),f=this.z.redMul(s);return this.curve.jpoint(h,d,f)},_.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,s=this.y,a=this.z,c=a.redSqr().redSqr(),l=s.redAdd(s);for(t=0;t<e;t++){var u=o.redSqr(),h=l.redSqr(),d=h.redSqr(),f=u.redAdd(u).redIAdd(u).redIAdd(n.redMul(c)),p=o.redMul(h),g=f.redSqr().redISub(p.redAdd(p)),m=p.redISub(g),y=f.redMul(m);y=y.redIAdd(y).redISub(d);var v=l.redMul(a);t+1<e&&(c=c.redMul(d)),o=g,a=v,l=y}return this.curve.jpoint(o,l.redMul(i),a)},_.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},_.prototype._zeroDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(n).redISub(o);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n),c=a.redSqr().redISub(s).redISub(s),l=o.redIAdd(o);l=(l=l.redIAdd(l)).redIAdd(l),e=c,t=a.redMul(s.redISub(c)).redISub(l),r=this.y.redAdd(this.y)}else{var u=this.x.redSqr(),h=this.y.redSqr(),d=h.redSqr(),f=this.x.redAdd(h).redSqr().redISub(u).redISub(d);f=f.redIAdd(f);var p=u.redAdd(u).redIAdd(u),g=p.redSqr(),m=d.redIAdd(d);m=(m=m.redIAdd(m)).redIAdd(m),e=g.redISub(f).redISub(f),t=p.redMul(f.redISub(e)).redISub(m),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(e,t,r)},_.prototype._threeDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(n).redISub(o);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),c=a.redSqr().redISub(s).redISub(s);e=c;var l=o.redIAdd(o);l=(l=l.redIAdd(l)).redIAdd(l),t=a.redMul(s.redISub(c)).redISub(l),r=this.y.redAdd(this.y)}else{var u=this.z.redSqr(),h=this.y.redSqr(),d=this.x.redMul(h),f=this.x.redSub(u).redMul(this.x.redAdd(u));f=f.redAdd(f).redIAdd(f);var p=d.redIAdd(d),g=(p=p.redIAdd(p)).redAdd(p);e=f.redSqr().redISub(g),r=this.y.redAdd(this.z).redSqr().redISub(h).redISub(u);var m=h.redSqr();m=(m=(m=m.redIAdd(m)).redIAdd(m)).redIAdd(m),t=f.redMul(p.redISub(e)).redISub(m)}return this.curve.jpoint(e,t,r)},_.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),o=t.redSqr(),s=r.redSqr(),a=o.redAdd(o).redIAdd(o).redIAdd(e.redMul(i)),c=t.redAdd(t),l=(c=c.redIAdd(c)).redMul(s),u=a.redSqr().redISub(l.redAdd(l)),h=l.redISub(u),d=s.redSqr();d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var f=a.redMul(h).redISub(d),p=r.redAdd(r).redMul(n);return this.curve.jpoint(u,f,p)},_.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(),s=this.x.redAdd(t).redSqr().redISub(e).redISub(n),a=(s=(s=(s=s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(o)).redSqr(),c=n.redIAdd(n);c=(c=(c=c.redIAdd(c)).redIAdd(c)).redIAdd(c);var l=i.redIAdd(s).redSqr().redISub(o).redISub(a).redISub(c),u=t.redMul(l);u=(u=u.redIAdd(u)).redIAdd(u);var h=this.x.redMul(a).redISub(u);h=(h=h.redIAdd(h)).redIAdd(h);var d=this.y.redMul(l.redMul(c.redISub(l)).redISub(s.redMul(a)));d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var f=this.z.redAdd(s).redSqr().redISub(r).redISub(a);return this.curve.jpoint(h,d,f)},_.prototype.mul=function(e,t){return e=new(i())(e,t),this.curve._wnafMul(this,e)},_.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)},_.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}},_.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)+">"},_.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var A=a((function(e,t){var r=t;r.base=m,r.short=E,r.mont=null,r.edwards=null})),k=a((function(e,t){var r,n=t,i=h.assert;function o(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,i(this.g.validate(),"Invalid curve"),i(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function a(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var r=new o(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=o,a("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:s().sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),a("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:s().sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),a("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:s().sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),a("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:s().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"]}),a("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:s().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"]}),a("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:s().sha256,gRed:!1,g:["9"]}),a("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:s().sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=null.crash()}catch(c){r=void 0}a("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:s().sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})}));function C(e){if(!(this instanceof C))return new C(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=u.toArray(e.entropy,e.entropyEnc||"hex"),r=u.toArray(e.nonce,e.nonceEnc||"hex"),n=u.toArray(e.pers,e.persEnc||"hex");c(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}var x=C;C.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},C.prototype._hmac=function(){return new(s().hmac)(this.hash,this.K)},C.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())},C.prototype.reseed=function(e,t,r,n){"string"!==typeof t&&(n=r,r=t,t=null),e=u.toArray(e,t),r=u.toArray(r,n),c(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},C.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=u.toArray(r,n||"hex"),this._update(r));for(var i=[];i.length<e;)this.V=this._hmac().update(this.V).digest(),i=i.concat(this.V);var o=i.slice(0,e);return this._update(r),this._reseed++,u.encode(o,t)};var I=h.assert;function R(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)}var P=R;R.fromPublic=function(e,t,r){return t instanceof R?t:new R(e,{pub:t,pubEnc:r})},R.fromPrivate=function(e,t,r){return t instanceof R?t:new R(e,{priv:t,privEnc:r})},R.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"}},R.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},R.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},R.prototype._importPrivate=function(e,t){this.priv=new(i())(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},R.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)},R.prototype.derive=function(e){return e.validate()||I(e.validate(),"public point not validated"),e.mul(this.priv).getX()},R.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},R.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},R.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var T=h.assert;function N(e,t){if(e instanceof N)return e;this._importDER(e,t)||(T(e.r&&e.s,"Signature without r or s"),this.r=new(i())(e.r,16),this.s=new(i())(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var D=N;function O(){this.place=0}function M(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,s=t.place;o<n;o++,s++)i<<=8,i|=e[s],i>>>=0;return!(i<=127)&&(t.place=s,i)}function B(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 L(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)}}N.prototype._importDER=function(e,t){e=h.toArray(e,t);var r=new O;if(48!==e[r.place++])return!1;var n=M(e,r);if(!1===n)return!1;if(n+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var o=M(e,r);if(!1===o)return!1;var s=e.slice(r.place,o+r.place);if(r.place+=o,2!==e[r.place++])return!1;var a=M(e,r);if(!1===a)return!1;if(e.length!==a+r.place)return!1;var c=e.slice(r.place,a+r.place);if(0===s[0]){if(!(128&s[1]))return!1;s=s.slice(1)}if(0===c[0]){if(!(128&c[1]))return!1;c=c.slice(1)}return this.r=new(i())(s),this.s=new(i())(c),this.recoveryParam=null,!0},N.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=B(t),r=B(r);!r[0]&&!(128&r[1]);)r=r.slice(1);var n=[2];L(n,t.length),(n=n.concat(t)).push(2),L(n,r.length);var i=n.concat(r),o=[48];return L(o,i.length),o=o.concat(i),h.encode(o,e)};var U=function(){throw new Error("unsupported")},F=h.assert;function j(e){if(!(this instanceof j))return new j(e);"string"===typeof e&&(F(Object.prototype.hasOwnProperty.call(k,e),"Unknown curve "+e),e=k[e]),e instanceof k.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}var z=j;j.prototype.keyPair=function(e){return new P(this,e)},j.prototype.keyFromPrivate=function(e,t){return P.fromPrivate(this,e,t)},j.prototype.keyFromPublic=function(e,t){return P.fromPublic(this,e,t)},j.prototype.genKeyPair=function(e){e||(e={});for(var t=new x({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||U(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new(i())(2));;){var o=new(i())(t.generate(r));if(!(o.cmp(n)>0))return o.iaddn(1),this.keyFromPrivate(o)}},j.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},j.prototype.sign=function(e,t,r,n){"object"===typeof r&&(n=r,r=null),n||(n={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new(i())(e,16));for(var o=this.n.byteLength(),s=t.getPrivate().toArray("be",o),a=e.toArray("be",o),c=new x({hash:this.hash,entropy:s,nonce:a,pers:n.pers,persEnc:n.persEnc||"utf8"}),l=this.n.sub(new(i())(1)),u=0;;u++){var h=n.k?n.k(u):new(i())(c.generate(this.n.byteLength()));if(!((h=this._truncateToN(h,!0)).cmpn(1)<=0||h.cmp(l)>=0)){var d=this.g.mul(h);if(!d.isInfinity()){var f=d.getX(),p=f.umod(this.n);if(0!==p.cmpn(0)){var g=h.invm(this.n).mul(p.mul(t.getPrivate()).iadd(e));if(0!==(g=g.umod(this.n)).cmpn(0)){var m=(d.getY().isOdd()?1:0)|(0!==f.cmp(p)?2:0);return n.canonical&&g.cmp(this.nh)>0&&(g=this.n.sub(g),m^=1),new D({r:p,s:g,recoveryParam:m})}}}}}},j.prototype.verify=function(e,t,r,n){e=this._truncateToN(new(i())(e,16)),r=this.keyFromPublic(r,n);var o=(t=new D(t,"hex")).r,s=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var a,c=s.invm(this.n),l=c.mul(e).umod(this.n),u=c.mul(o).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(l,r.getPublic(),u)).isInfinity()&&a.eqXToP(o):!(a=this.g.mulAdd(l,r.getPublic(),u)).isInfinity()&&0===a.getX().umod(this.n).cmp(o)},j.prototype.recoverPubKey=function(e,t,r,n){F((3&r)===r,"The recovery param is more than two bits"),t=new D(t,n);var o=this.n,s=new(i())(e),a=t.r,c=t.s,l=1&r,u=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&u)throw new Error("Unable to find sencond key candinate");a=u?this.curve.pointFromX(a.add(this.curve.n),l):this.curve.pointFromX(a,l);var h=t.r.invm(o),d=o.sub(s).mul(h).umod(o),f=c.mul(h).umod(o);return this.g.mulAdd(d,a,f)},j.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new D(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")};var K=a((function(e,t){var r=t;r.version="6.5.4",r.utils=h,r.rand=function(){throw new Error("unsupported")},r.curve=A,r.curves=k,r.ec=z,r.eddsa=null})).ec,q=r(2009),Z=r(4812);const V=new(r(2735).Logger)("signing-key/5.7.0");let H=null;function W(){return H||(H=new K("secp256k1")),H}class G{constructor(e){(0,Z.defineReadOnly)(this,"curve","secp256k1"),(0,Z.defineReadOnly)(this,"privateKey",(0,q.hexlify)(e)),32!==(0,q.hexDataLength)(this.privateKey)&&V.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const t=W().keyFromPrivate((0,q.arrayify)(this.privateKey));(0,Z.defineReadOnly)(this,"publicKey","0x"+t.getPublic(!1,"hex")),(0,Z.defineReadOnly)(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),(0,Z.defineReadOnly)(this,"_isSigningKey",!0)}_addPoint(e){const t=W().keyFromPublic((0,q.arrayify)(this.publicKey)),r=W().keyFromPublic((0,q.arrayify)(e));return"0x"+t.pub.add(r.pub).encodeCompressed("hex")}signDigest(e){const t=W().keyFromPrivate((0,q.arrayify)(this.privateKey)),r=(0,q.arrayify)(e);32!==r.length&&V.throwArgumentError("bad digest length","digest",e);const n=t.sign(r,{canonical:!0});return(0,q.splitSignature)({recoveryParam:n.recoveryParam,r:(0,q.hexZeroPad)("0x"+n.r.toString(16),32),s:(0,q.hexZeroPad)("0x"+n.s.toString(16),32)})}computeSharedSecret(e){const t=W().keyFromPrivate((0,q.arrayify)(this.privateKey)),r=W().keyFromPublic((0,q.arrayify)(Q(e)));return(0,q.hexZeroPad)("0x"+t.derive(r.getPublic()).toString(16),32)}static isSigningKey(e){return!(!e||!e._isSigningKey)}}function Y(e,t){const r=(0,q.splitSignature)(t),n={r:(0,q.arrayify)(r.r),s:(0,q.arrayify)(r.s)};return"0x"+W().recoverPubKey((0,q.arrayify)(e),n,r.recoveryParam).encode("hex",!1)}function Q(e,t){const r=(0,q.arrayify)(e);if(32===r.length){const e=new G(r);return t?"0x"+W().keyFromPrivate(r).getPublic(!0,"hex"):e.publicKey}return 33===r.length?t?(0,q.hexlify)(r):"0x"+W().keyFromPublic(r).getPublic(!1,"hex"):65===r.length?t?"0x"+W().keyFromPublic(r).getPublic(!0,"hex"):(0,q.hexlify)(r):V.throwArgumentError("invalid public or private key","key","[REDACTED]")}},6684:(e,t,r)=>{"use strict";r.r(t),r.d(t,{keccak256:()=>g,pack:()=>p,sha256:()=>m});var n=r(9560),i=r(2009),o=r(1291),s=r(3984),a=r(1953),c=r(2735);const l=new RegExp("^bytes([0-9]+)$"),u=new RegExp("^(u?int)([0-9]*)$"),h=new RegExp("^(.*)\\[([0-9]*)\\]$"),d=new c.Logger("solidity/5.7.0");function f(e,t,r){switch(e){case"address":return r?(0,i.zeroPad)(t,32):(0,i.arrayify)(t);case"string":return(0,a.Y0)(t);case"bytes":return(0,i.arrayify)(t);case"bool":return t=t?"0x01":"0x00",r?(0,i.zeroPad)(t,32):(0,i.arrayify)(t)}let o=e.match(u);if(o){let s=parseInt(o[2]||"256");return(o[2]&&String(s)!==o[2]||s%8!==0||0===s||s>256)&&d.throwArgumentError("invalid number type","type",e),r&&(s=256),t=n.O$.from(t).toTwos(s),(0,i.zeroPad)(t,s/8)}if(o=e.match(l),o){const n=parseInt(o[1]);return(String(n)!==o[1]||0===n||n>32)&&d.throwArgumentError("invalid bytes type","type",e),(0,i.arrayify)(t).byteLength!==n&&d.throwArgumentError("invalid value for ".concat(e),"value",t),r?(0,i.arrayify)((t+"0000000000000000000000000000000000000000000000000000000000000000").substring(0,66)):t}if(o=e.match(h),o&&Array.isArray(t)){const r=o[1];parseInt(o[2]||String(t.length))!=t.length&&d.throwArgumentError("invalid array length for ".concat(e),"value",t);const n=[];return t.forEach((function(e){n.push(f(r,e,!0))})),(0,i.concat)(n)}return d.throwArgumentError("invalid type","type",e)}function p(e,t){e.length!=t.length&&d.throwArgumentError("wrong number of values; expected ${ types.length }","values",t);const r=[];return e.forEach((function(e,n){r.push(f(e,t[n]))})),(0,i.hexlify)((0,i.concat)(r))}function g(e,t){return(0,o.keccak256)(p(e,t))}function m(e,t){return(0,s.JQ)(p(e,t))}},4965:(e,t,r)=>{"use strict";r.r(t),r.d(t,{UnicodeNormalizationForm:()=>o.Uj,Utf8ErrorFuncs:()=>o.te,Utf8ErrorReason:()=>o.Uw,_toEscapedUtf8String:()=>o.U$,formatBytes32String:()=>s,nameprep:()=>v,parseBytes32String:()=>a,toUtf8Bytes:()=>o.Y0,toUtf8CodePoints:()=>o.XL,toUtf8String:()=>o.ZN});var n=r(4160),i=r(2009),o=r(1953);function s(e){const t=(0,o.Y0)(e);if(t.length>31)throw new Error("bytes32 string must be less than 32 bytes");return(0,i.hexlify)((0,i.concat)([t,n.R]).slice(0,32))}function a(e){const t=(0,i.arrayify)(e);if(32!==t.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==t[31])throw new Error("invalid bytes32 string - no null terminator");let r=31;for(;0===t[r-1];)r--;return(0,o.ZN)(t.slice(0,r))}function c(e,t){t||(t=function(e){return[parseInt(e,16)]});let r=0,n={};return e.split(",").forEach((e=>{let i=e.split(":");r+=parseInt(i[0],16),n[r]=t(i[1])})),n}function l(e){let t=0;return e.split(",").map((e=>{let r=e.split("-");1===r.length?r[1]="0":""===r[1]&&(r[1]="1");let n=t+parseInt(r[0],16);return t=parseInt(r[1],16),{l:n,h:t}}))}function u(e,t){let r=0;for(let n=0;n<t.length;n++){let i=t[n];if(r+=i.l,e>=r&&e<=r+i.h&&(e-r)%(i.d||1)===0){if(i.e&&-1!==i.e.indexOf(e-r))continue;return i}}return null}const h=l("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),d="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map((e=>parseInt(e,16))),f=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],p=c("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),g=c("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),m=c("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",(function(e){if(e.length%4!==0)throw new Error("bad data");let t=[];for(let r=0;r<e.length;r+=4)t.push(parseInt(e.substring(r,r+4),16));return t})),y=l("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function v(e){if(e.match(/^[a-z0-9-]*$/i)&&e.length<=59)return e.toLowerCase();let t=(0,o.XL)(e);var r;r=t.map((e=>{if(d.indexOf(e)>=0)return[];if(e>=65024&&e<=65039)return[];let t=function(e){let t=u(e,f);if(t)return[e+t.s];let r=p[e];if(r)return r;let n=g[e];return n?[e+n[0]]:m[e]||null}(e);return t||[e]})),t=r.reduce(((e,t)=>(t.forEach((t=>{e.push(t)})),e)),[]),t=(0,o.XL)((0,o.uu)(t),o.Uj.NFKC),t.forEach((e=>{if(u(e,y))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")})),t.forEach((e=>{if(u(e,h))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")}));let n=(0,o.uu)(t);if("-"===n.substring(0,1)||"--"===n.substring(2,4)||"-"===n.substring(n.length-1))throw new Error("invalid hyphen");return n}},1953:(e,t,r)=>{"use strict";r.d(t,{Uj:()=>o,te:()=>c,Uw:()=>s,U$:()=>d,uu:()=>f,Y0:()=>u,XL:()=>g,ZN:()=>p});var n=r(2009);const i=new(r(2735).Logger)("strings/5.7.0");var o,s;function a(e,t,r,n,i){if(e===s.BAD_PREFIX||e===s.UNEXPECTED_CONTINUE){let e=0;for(let n=t+1;n<r.length&&r[n]>>6===2;n++)e++;return e}return e===s.OVERRUN?r.length-t-1:0}!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(o||(o={})),function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation"}(s||(s={}));const c=Object.freeze({error:function(e,t,r,n,o){return i.throwArgumentError("invalid codepoint at offset ".concat(t,"; ").concat(e),"bytes",r)},ignore:a,replace:function(e,t,r,n,i){return e===s.OVERLONG?(n.push(i),0):(n.push(65533),a(e,t,r))}});function l(e,t){null==t&&(t=c.error),e=(0,n.arrayify)(e);const r=[];let i=0;for(;i<e.length;){const n=e[i++];if(n>>7===0){r.push(n);continue}let o=null,a=null;if(192===(224&n))o=1,a=127;else if(224===(240&n))o=2,a=2047;else{if(240!==(248&n)){i+=t(128===(192&n)?s.UNEXPECTED_CONTINUE:s.BAD_PREFIX,i-1,e,r);continue}o=3,a=65535}if(i-1+o>=e.length){i+=t(s.OVERRUN,i-1,e,r);continue}let c=n&(1<<8-o-1)-1;for(let l=0;l<o;l++){let n=e[i];if(128!=(192&n)){i+=t(s.MISSING_CONTINUE,i,e,r),c=null;break}c=c<<6|63&n,i++}null!==c&&(c>1114111?i+=t(s.OUT_OF_RANGE,i-1-o,e,r,c):c>=55296&&c<=57343?i+=t(s.UTF16_SURROGATE,i-1-o,e,r,c):c<=a?i+=t(s.OVERLONG,i-1-o,e,r,c):r.push(c))}return r}function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.current;t!=o.current&&(i.checkNormalize(),e=e.normalize(t));let r=[];for(let n=0;n<e.length;n++){const t=e.charCodeAt(n);if(t<128)r.push(t);else if(t<2048)r.push(t>>6|192),r.push(63&t|128);else if(55296==(64512&t)){n++;const i=e.charCodeAt(n);if(n>=e.length||56320!==(64512&i))throw new Error("invalid utf-8 string");const o=65536+((1023&t)<<10)+(1023&i);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(63&o|128)}else r.push(t>>12|224),r.push(t>>6&63|128),r.push(63&t|128)}return(0,n.arrayify)(r)}function h(e){const t="0000"+e.toString(16);return"\\u"+t.substring(t.length-4)}function d(e,t){return'"'+l(e,t).map((e=>{if(e<256){switch(e){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(e>=32&&e<127)return String.fromCharCode(e)}return e<=65535?h(e):h(55296+((e-=65536)>>10&1023))+h(56320+(1023&e))})).join("")+'"'}function f(e){return e.map((e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e))))).join("")}function p(e,t){return f(l(e,t))}function g(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.current;return l(u(e,t))}},5958:(e,t,r)=>{"use strict";r.r(t),r.d(t,{TransactionTypes:()=>f,accessListify:()=>S,computeAddress:()=>v,parse:()=>I,recoverAddress:()=>b,serialize:()=>C});var n=r(8552),i=r(9560),o=r(2009),s=r(6321),a=r(1291),c=r(4812),l=r(807),u=r(4760),h=r(2735);const d=new h.Logger("transactions/5.7.0");var f;function p(e){return"0x"===e?null:(0,n.getAddress)(e)}function g(e){return"0x"===e?s._Y:i.O$.from(e)}!function(e){e[e.legacy=0]="legacy",e[e.eip2930=1]="eip2930",e[e.eip1559=2]="eip1559"}(f||(f={}));const m=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],y={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function v(e){const t=(0,u.computePublicKey)(e);return(0,n.getAddress)((0,o.hexDataSlice)((0,a.keccak256)((0,o.hexDataSlice)(t,1)),12))}function b(e,t){return v((0,u.recoverPublicKey)((0,o.arrayify)(e),t))}function w(e,t){const r=(0,o.stripZeros)(i.O$.from(e).toHexString());return r.length>32&&d.throwArgumentError("invalid length for "+t,"transaction:"+t,e),r}function E(e,t){return{address:(0,n.getAddress)(e),storageKeys:(t||[]).map(((t,r)=>(32!==(0,o.hexDataLength)(t)&&d.throwArgumentError("invalid access list storageKey","accessList[".concat(e,":").concat(r,"]"),t),t.toLowerCase())))}}function S(e){if(Array.isArray(e))return e.map(((e,t)=>Array.isArray(e)?(e.length>2&&d.throwArgumentError("access list expected to be [ address, storageKeys[] ]","value[".concat(t,"]"),e),E(e[0],e[1])):E(e.address,e.storageKeys)));const t=Object.keys(e).map((t=>{const r=e[t].reduce(((e,t)=>(e[t]=!0,e)),{});return E(t,Object.keys(r).sort())}));return t.sort(((e,t)=>e.address.localeCompare(t.address))),t}function _(e){return S(e).map((e=>[e.address,e.storageKeys]))}function A(e,t){if(null!=e.gasPrice){const t=i.O$.from(e.gasPrice),r=i.O$.from(e.maxFeePerGas||0);t.eq(r)||d.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:t,maxFeePerGas:r})}const r=[w(e.chainId||0,"chainId"),w(e.nonce||0,"nonce"),w(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),w(e.maxFeePerGas||0,"maxFeePerGas"),w(e.gasLimit||0,"gasLimit"),null!=e.to?(0,n.getAddress)(e.to):"0x",w(e.value||0,"value"),e.data||"0x",_(e.accessList||[])];if(t){const e=(0,o.splitSignature)(t);r.push(w(e.recoveryParam,"recoveryParam")),r.push((0,o.stripZeros)(e.r)),r.push((0,o.stripZeros)(e.s))}return(0,o.hexConcat)(["0x02",l.encode(r)])}function k(e,t){const r=[w(e.chainId||0,"chainId"),w(e.nonce||0,"nonce"),w(e.gasPrice||0,"gasPrice"),w(e.gasLimit||0,"gasLimit"),null!=e.to?(0,n.getAddress)(e.to):"0x",w(e.value||0,"value"),e.data||"0x",_(e.accessList||[])];if(t){const e=(0,o.splitSignature)(t);r.push(w(e.recoveryParam,"recoveryParam")),r.push((0,o.stripZeros)(e.r)),r.push((0,o.stripZeros)(e.s))}return(0,o.hexConcat)(["0x01",l.encode(r)])}function C(e,t){if(null==e.type||0===e.type)return null!=e.accessList&&d.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",e),function(e,t){(0,c.checkProperties)(e,y);const r=[];m.forEach((function(t){let n=e[t.name]||[];const i={};t.numeric&&(i.hexPad="left"),n=(0,o.arrayify)((0,o.hexlify)(n,i)),t.length&&n.length!==t.length&&n.length>0&&d.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n),t.maxLength&&(n=(0,o.stripZeros)(n),n.length>t.maxLength&&d.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n)),r.push((0,o.hexlify)(n))}));let n=0;if(null!=e.chainId?(n=e.chainId,"number"!==typeof n&&d.throwArgumentError("invalid transaction.chainId","transaction",e)):t&&!(0,o.isBytesLike)(t)&&t.v>28&&(n=Math.floor((t.v-35)/2)),0!==n&&(r.push((0,o.hexlify)(n)),r.push("0x"),r.push("0x")),!t)return l.encode(r);const i=(0,o.splitSignature)(t);let s=27+i.recoveryParam;return 0!==n?(r.pop(),r.pop(),r.pop(),s+=2*n+8,i.v>28&&i.v!==s&&d.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t)):i.v!==s&&d.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t),r.push((0,o.hexlify)(s)),r.push((0,o.stripZeros)((0,o.arrayify)(i.r))),r.push((0,o.stripZeros)((0,o.arrayify)(i.s))),l.encode(r)}(e,t);switch(e.type){case 1:return k(e,t);case 2:return A(e,t)}return d.throwError("unsupported transaction type: ".concat(e.type),h.Logger.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:e.type})}function x(e,t,r){try{const r=g(t[0]).toNumber();if(0!==r&&1!==r)throw new Error("bad recid");e.v=r}catch(n){d.throwArgumentError("invalid v for transaction type: 1","v",t[0])}e.r=(0,o.hexZeroPad)(t[1],32),e.s=(0,o.hexZeroPad)(t[2],32);try{const t=(0,a.keccak256)(r(e));e.from=b(t,{r:e.r,s:e.s,recoveryParam:e.v})}catch(n){}}function I(e){const t=(0,o.arrayify)(e);if(t[0]>127)return function(e){const t=l.decode(e);9!==t.length&&6!==t.length&&d.throwArgumentError("invalid raw transaction","rawTransaction",e);const r={nonce:g(t[0]).toNumber(),gasPrice:g(t[1]),gasLimit:g(t[2]),to:p(t[3]),value:g(t[4]),data:t[5],chainId:0};if(6===t.length)return r;try{r.v=i.O$.from(t[6]).toNumber()}catch(n){return r}if(r.r=(0,o.hexZeroPad)(t[7],32),r.s=(0,o.hexZeroPad)(t[8],32),i.O$.from(r.r).isZero()&&i.O$.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);let i=r.v-27;const s=t.slice(0,6);0!==r.chainId&&(s.push((0,o.hexlify)(r.chainId)),s.push("0x"),s.push("0x"),i-=2*r.chainId+8);const c=(0,a.keccak256)(l.encode(s));try{r.from=b(c,{r:(0,o.hexlify)(r.r),s:(0,o.hexlify)(r.s),recoveryParam:i})}catch(n){}r.hash=(0,a.keccak256)(e)}return r.type=null,r}(t);switch(t[0]){case 1:return function(e){const t=l.decode(e.slice(1));8!==t.length&&11!==t.length&&d.throwArgumentError("invalid component count for transaction type: 1","payload",(0,o.hexlify)(e));const r={type:1,chainId:g(t[0]).toNumber(),nonce:g(t[1]).toNumber(),gasPrice:g(t[2]),gasLimit:g(t[3]),to:p(t[4]),value:g(t[5]),data:t[6],accessList:S(t[7])};return 8===t.length||(r.hash=(0,a.keccak256)(e),x(r,t.slice(8),k)),r}(t);case 2:return function(e){const t=l.decode(e.slice(1));9!==t.length&&12!==t.length&&d.throwArgumentError("invalid component count for transaction type: 2","payload",(0,o.hexlify)(e));const r=g(t[2]),n=g(t[3]),i={type:2,chainId:g(t[0]).toNumber(),nonce:g(t[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:g(t[4]),to:p(t[5]),value:g(t[6]),data:t[7],accessList:S(t[8])};return 9===t.length||(i.hash=(0,a.keccak256)(e),x(i,t.slice(9),A)),i}(t)}return d.throwError("unsupported transaction type: ".concat(t[0]),h.Logger.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:t[0]})}},6955:(e,t,r)=>{"use strict";r.r(t),r.d(t,{commify:()=>S,formatEther:()=>k,formatUnits:()=>_,parseEther:()=>C,parseUnits:()=>A});var n=r(2009),i=r(2735),o=r(4227),s=r(9560);const a=new i.Logger(o.i),c={},l=s.O$.from(0),u=s.O$.from(-1);function h(e,t,r,n){const o={fault:t,operation:r};return void 0!==n&&(o.value=n),a.throwError(e,i.Logger.errors.NUMERIC_FAULT,o)}let d="0";for(;d.length<256;)d+=d;function f(e){if("number"!==typeof e)try{e=s.O$.from(e).toNumber()}catch(t){}return"number"===typeof e&&e>=0&&e<=256&&!(e%1)?"1"+d.substring(0,e):a.throwArgumentError("invalid decimal size","decimals",e)}function p(e,t){null==t&&(t=0);const r=f(t),n=(e=s.O$.from(e)).lt(l);n&&(e=e.mul(u));let i=e.mod(r).toString();for(;i.length<r.length-1;)i="0"+i;i=i.match(/^([0-9]*[1-9]|0)(0*)/)[1];const o=e.div(r).toString();return e=1===r.length?o:o+"."+i,n&&(e="-"+e),e}function g(e,t){null==t&&(t=0);const r=f(t);"string"===typeof e&&e.match(/^-?[0-9.]+$/)||a.throwArgumentError("invalid decimal value","value",e);const n="-"===e.substring(0,1);n&&(e=e.substring(1)),"."===e&&a.throwArgumentError("missing value","value",e);const i=e.split(".");i.length>2&&a.throwArgumentError("too many decimal points","value",e);let o=i[0],c=i[1];for(o||(o="0"),c||(c="0");"0"===c[c.length-1];)c=c.substring(0,c.length-1);for(c.length>r.length-1&&h("fractional component exceeds decimals","underflow","parseFixed"),""===c&&(c="0");c.length<r.length-1;)c+="0";const l=s.O$.from(o),d=s.O$.from(c);let p=l.mul(r).add(d);return n&&(p=p.mul(u)),p}class m{constructor(e,t,r,n){e!==c&&a.throwError("cannot use FixedFormat constructor; use FixedFormat.from",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.signed=t,this.width=r,this.decimals=n,this.name=(t?"":"u")+"fixed"+String(r)+"x"+String(n),this._multiplier=f(n),Object.freeze(this)}static from(e){if(e instanceof m)return e;"number"===typeof e&&(e="fixed128x".concat(e));let t=!0,r=128,n=18;if("string"===typeof e)if("fixed"===e);else if("ufixed"===e)t=!1;else{const i=e.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);i||a.throwArgumentError("invalid fixed format","format",e),t="u"!==i[1],r=parseInt(i[2]),n=parseInt(i[3])}else if(e){const i=(t,r,n)=>null==e[t]?n:(typeof e[t]!==r&&a.throwArgumentError("invalid fixed format ("+t+" not "+r+")","format."+t,e[t]),e[t]);t=i("signed","boolean",t),r=i("width","number",r),n=i("decimals","number",n)}return r%8&&a.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",r),n>80&&a.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",n),new m(c,t,r,n)}}class y{constructor(e,t,r,n){e!==c&&a.throwError("cannot use FixedNumber constructor; use FixedNumber.from",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=n,this._hex=t,this._value=r,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&a.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);const t=g(this._value,this.format.decimals),r=g(e._value,e.format.decimals);return y.fromValue(t.add(r),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const t=g(this._value,this.format.decimals),r=g(e._value,e.format.decimals);return y.fromValue(t.sub(r),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const t=g(this._value,this.format.decimals),r=g(e._value,e.format.decimals);return y.fromValue(t.mul(r).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);const t=g(this._value,this.format.decimals),r=g(e._value,e.format.decimals);return y.fromValue(t.mul(this.format._multiplier).div(r),this.format.decimals,this.format)}floor(){const e=this.toString().split(".");1===e.length&&e.push("0");let t=y.from(e[0],this.format);const r=!e[1].match(/^(0*)$/);return this.isNegative()&&r&&(t=t.subUnsafe(v.toFormat(t.format))),t}ceiling(){const e=this.toString().split(".");1===e.length&&e.push("0");let t=y.from(e[0],this.format);const r=!e[1].match(/^(0*)$/);return!this.isNegative()&&r&&(t=t.addUnsafe(v.toFormat(t.format))),t}round(e){null==e&&(e=0);const t=this.toString().split(".");if(1===t.length&&t.push("0"),(e<0||e>80||e%1)&&a.throwArgumentError("invalid decimal count","decimals",e),t[1].length<=e)return this;const r=y.from("1"+d.substring(0,e),this.format),n=b.toFormat(this.format);return this.mulUnsafe(r).addUnsafe(n).floor().divUnsafe(r)}isZero(){return"0.0"===this._value||"0"===this._value}isNegative(){return"-"===this._value[0]}toString(){return this._value}toHexString(e){if(null==e)return this._hex;e%8&&a.throwArgumentError("invalid byte width","width",e);const t=s.O$.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return(0,n.hexZeroPad)(t,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return y.fromString(this._value,e)}static fromValue(e,t,r){return null!=r||null==t||(0,s.Zm)(t)||(r=t,t=null),null==t&&(t=0),null==r&&(r="fixed"),y.fromString(p(e,t),m.from(r))}static fromString(e,t){null==t&&(t="fixed");const r=m.from(t),i=g(e,r.decimals);!r.signed&&i.lt(l)&&h("unsigned value cannot be negative","overflow","value",e);let o=null;r.signed?o=i.toTwos(r.width).toHexString():(o=i.toHexString(),o=(0,n.hexZeroPad)(o,r.width/8));const s=p(i,r.decimals);return new y(c,o,s,r)}static fromBytes(e,t){null==t&&(t="fixed");const r=m.from(t);if((0,n.arrayify)(e).length>r.width/8)throw new Error("overflow");let i=s.O$.from(e);r.signed&&(i=i.fromTwos(r.width));const o=i.toTwos((r.signed?0:1)+r.width).toHexString(),a=p(i,r.decimals);return new y(c,o,a,r)}static from(e,t){if("string"===typeof e)return y.fromString(e,t);if((0,n.isBytes)(e))return y.fromBytes(e,t);try{return y.fromValue(e,0,t)}catch(r){if(r.code!==i.Logger.errors.INVALID_ARGUMENT)throw r}return a.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!(!e||!e._isFixedNumber)}}const v=y.from(1),b=y.from("0.5"),w=new i.Logger("units/5.7.0"),E=["wei","kwei","mwei","gwei","szabo","finney","ether"];function S(e){const t=String(e).split(".");(t.length>2||!t[0].match(/^-?[0-9]*$/)||t[1]&&!t[1].match(/^[0-9]*$/)||"."===e||"-."===e)&&w.throwArgumentError("invalid value","value",e);let r=t[0],n="";for("-"===r.substring(0,1)&&(n="-",r=r.substring(1));"0"===r.substring(0,1);)r=r.substring(1);""===r&&(r="0");let i="";for(2===t.length&&(i="."+(t[1]||"0"));i.length>2&&"0"===i[i.length-1];)i=i.substring(0,i.length-1);const o=[];for(;r.length;){if(r.length<=3){o.unshift(r);break}{const e=r.length-3;o.unshift(r.substring(e)),r=r.substring(0,e)}}return n+o.join(",")+i}function _(e,t){if("string"===typeof t){const e=E.indexOf(t);-1!==e&&(t=3*e)}return p(e,null!=t?t:18)}function A(e,t){if("string"!==typeof e&&w.throwArgumentError("value must be a string","value",e),"string"===typeof t){const e=E.indexOf(t);-1!==e&&(t=3*e)}return g(e,null!=t?t:18)}function k(e){return _(e,18)}function C(e){return A(e,18)}},6204:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Wallet:()=>w,verifyMessage:()=>E,verifyTypedData:()=>S});var n=r(8552),i=r(5157),o=r(5340),s=r(2009),a=r(8836),c=r(6454),l=r(9590),u=r(1291),h=r(4812),d=r(5722),f=r(4760),p=r(2691),g=r(5054),m=r(5958),y=r(2735);var v=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(t){o(t)}}function a(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};const b=new y.Logger("wallet/5.7.0");class w extends o.E{constructor(e,t){if(super(),null!=(r=e)&&(0,s.isHexString)(r.privateKey,32)&&null!=r.address){const t=new f.SigningKey(e.privateKey);if((0,h.defineReadOnly)(this,"_signingKey",(()=>t)),(0,h.defineReadOnly)(this,"address",(0,m.computeAddress)(this.publicKey)),this.address!==(0,n.getAddress)(e.address)&&b.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),function(e){const t=e.mnemonic;return t&&t.phrase}(e)){const t=e.mnemonic;(0,h.defineReadOnly)(this,"_mnemonic",(()=>({phrase:t.phrase,path:t.path||l.defaultPath,locale:t.locale||"en"})));const r=this.mnemonic,n=l.HDNode.fromMnemonic(r.phrase,null,r.locale).derivePath(r.path);(0,m.computeAddress)(n.privateKey)!==this.address&&b.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else(0,h.defineReadOnly)(this,"_mnemonic",(()=>null))}else{if(f.SigningKey.isSigningKey(e))"secp256k1"!==e.curve&&b.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),(0,h.defineReadOnly)(this,"_signingKey",(()=>e));else{"string"===typeof e&&e.match(/^[0-9a-f]*$/i)&&64===e.length&&(e="0x"+e);const t=new f.SigningKey(e);(0,h.defineReadOnly)(this,"_signingKey",(()=>t))}(0,h.defineReadOnly)(this,"_mnemonic",(()=>null)),(0,h.defineReadOnly)(this,"address",(0,m.computeAddress)(this.publicKey))}var r;t&&!i.zt.isProvider(t)&&b.throwArgumentError("invalid provider","provider",t),(0,h.defineReadOnly)(this,"provider",t||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new w(this,e)}signTransaction(e){return(0,h.resolveProperties)(e).then((t=>{null!=t.from&&((0,n.getAddress)(t.from)!==this.address&&b.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);const r=this._signingKey().signDigest((0,u.keccak256)((0,m.serialize)(t)));return(0,m.serialize)(t,r)}))}signMessage(e){return v(this,void 0,void 0,(function*(){return(0,s.joinSignature)(this._signingKey().signDigest((0,a.r)(e)))}))}_signTypedData(e,t,r){return v(this,void 0,void 0,(function*(){const n=yield c.E.resolveNames(e,t,r,(e=>(null==this.provider&&b.throwError("cannot resolve ENS names without a provider",y.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:e}),this.provider.resolveName(e))));return(0,s.joinSignature)(this._signingKey().signDigest(c.E.hash(n.domain,t,n.value)))}))}encrypt(e,t,r){if("function"!==typeof t||r||(r=t,t={}),r&&"function"!==typeof r)throw new Error("invalid callback");return t||(t={}),(0,p.HI)(this,e,t,r)}static createRandom(e){let t=(0,d.O)(16);e||(e={}),e.extraEntropy&&(t=(0,s.arrayify)((0,s.hexDataSlice)((0,u.keccak256)((0,s.concat)([t,e.extraEntropy])),0,16)));const r=(0,l.entropyToMnemonic)(t,e.locale);return w.fromMnemonic(r,e.path,e.locale)}static fromEncryptedJson(e,t,r){return(0,g.decryptJsonWallet)(e,t,r).then((e=>new w(e)))}static fromEncryptedJsonSync(e,t){return new w((0,g.decryptJsonWalletSync)(e,t))}static fromMnemonic(e,t,r){return t||(t=l.defaultPath),new w(l.HDNode.fromMnemonic(e,null,r).derivePath(t))}}function E(e,t){return(0,m.recoverAddress)((0,a.r)(e),t)}function S(e,t,r,n){return(0,m.recoverAddress)(c.E.hash(e,t,r),n)}},8786:(e,t,r)=>{"use strict";r.r(t),r.d(t,{_fetchData:()=>p,fetchJson:()=>g,poll:()=>m});var n=r(8853),i=r(2009),o=r(4812),s=r(1953),a=r(2735);var c=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(t){o(t)}}function a(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};function l(e,t){return c(this,void 0,void 0,(function*(){null==t&&(t={});const r={method:t.method||"GET",headers:t.headers||{},body:t.body||void 0};if(!0!==t.skipFetchSetup&&(r.mode="cors",r.cache="no-cache",r.credentials="same-origin",r.redirect="follow",r.referrer="client"),null!=t.fetchOptions){const e=t.fetchOptions;e.mode&&(r.mode=e.mode),e.cache&&(r.cache=e.cache),e.credentials&&(r.credentials=e.credentials),e.redirect&&(r.redirect=e.redirect),e.referrer&&(r.referrer=e.referrer)}const n=yield fetch(e,r),o=yield n.arrayBuffer(),s={};return n.headers.forEach?n.headers.forEach(((e,t)=>{s[t.toLowerCase()]=e})):n.headers.keys().forEach((e=>{s[e.toLowerCase()]=n.headers.get(e)})),{headers:s,statusCode:n.status,statusMessage:n.statusText,body:(0,i.arrayify)(new Uint8Array(o))}}))}var u=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(t){o(t)}}function a(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};const h=new a.Logger("web/5.7.1");function d(e){return new Promise((t=>{setTimeout(t,e)}))}function f(e,t){if(null==e)return null;if("string"===typeof e)return e;if((0,i.isBytesLike)(e)){if(t&&("text"===t.split("/")[0]||"application/json"===t.split(";")[0].trim()))try{return(0,s.ZN)(e)}catch(r){}return(0,i.hexlify)(e)}return e}function p(e,t,r){const i="object"===typeof e&&null!=e.throttleLimit?e.throttleLimit:12;h.assertArgument(i>0&&i%1===0,"invalid connection throttle limit","connection.throttleLimit",i);const c="object"===typeof e?e.throttleCallback:null,p="object"===typeof e&&"number"===typeof e.throttleSlotInterval?e.throttleSlotInterval:100;h.assertArgument(p>0&&p%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",p);const g="object"===typeof e&&!!e.errorPassThrough,m={};let y=null;const v={method:"GET"};let b=!1,w=12e4;if("string"===typeof e)y=e;else if("object"===typeof e){if(null!=e&&null!=e.url||h.throwArgumentError("missing URL","connection.url",e),y=e.url,"number"===typeof e.timeout&&e.timeout>0&&(w=e.timeout),e.headers)for(const t in e.headers)m[t.toLowerCase()]={key:t,value:String(e.headers[t])},["if-none-match","if-modified-since"].indexOf(t.toLowerCase())>=0&&(b=!0);if(v.allowGzip=!!e.allowGzip,null!=e.user&&null!=e.password){"https:"!==y.substring(0,6)&&!0!==e.allowInsecureAuthentication&&h.throwError("basic authentication requires a secure https url",a.Logger.errors.INVALID_ARGUMENT,{argument:"url",url:y,user:e.user,password:"[REDACTED]"});const t=e.user+":"+e.password;m.authorization={key:"Authorization",value:"Basic "+(0,n.c)((0,s.Y0)(t))}}null!=e.skipFetchSetup&&(v.skipFetchSetup=!!e.skipFetchSetup),null!=e.fetchOptions&&(v.fetchOptions=(0,o.shallowCopy)(e.fetchOptions))}const E=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),S=y?y.match(E):null;if(S)try{const e={statusCode:200,statusMessage:"OK",headers:{"content-type":S[1]||"text/plain"},body:S[2]?(0,n.J)(S[3]):(_=S[3],(0,s.Y0)(_.replace(/%([0-9a-f][0-9a-f])/gi,((e,t)=>String.fromCharCode(parseInt(t,16))))))};let t=e.body;return r&&(t=r(e.body,e)),Promise.resolve(t)}catch(x){h.throwError("processing response error",a.Logger.errors.SERVER_ERROR,{body:f(S[1],S[2]),error:x,requestBody:null,requestMethod:"GET",url:y})}var _;t&&(v.method="POST",v.body=t,null==m["content-type"]&&(m["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==m["content-length"]&&(m["content-length"]={key:"Content-Length",value:String(t.length)}));const A={};Object.keys(m).forEach((e=>{const t=m[e];A[t.key]=t.value})),v.headers=A;const k=function(){let e=null;return{promise:new Promise((function(t,r){w&&(e=setTimeout((()=>{null!=e&&(e=null,r(h.makeError("timeout",a.Logger.errors.TIMEOUT,{requestBody:f(v.body,A["content-type"]),requestMethod:v.method,timeout:w,url:y})))}),w))})),cancel:function(){null!=e&&(clearTimeout(e),e=null)}}}(),C=function(){return u(this,void 0,void 0,(function*(){for(let e=0;e<i;e++){let t=null;try{if(t=yield l(y,v),e<i)if(301===t.statusCode||302===t.statusCode){const e=t.headers.location||"";if("GET"===v.method&&e.match(/^https:/)){y=t.headers.location;continue}}else if(429===t.statusCode){let r=!0;if(c&&(r=yield c(e,y)),r){let r=0;const n=t.headers["retry-after"];r="string"===typeof n&&n.match(/^[1-9][0-9]*$/)?1e3*parseInt(n):p*parseInt(String(Math.random()*Math.pow(2,e))),yield d(r);continue}}}catch(x){t=x.response,null==t&&(k.cancel(),h.throwError("missing response",a.Logger.errors.SERVER_ERROR,{requestBody:f(v.body,A["content-type"]),requestMethod:v.method,serverError:x,url:y}))}let n=t.body;if(b&&304===t.statusCode?n=null:!g&&(t.statusCode<200||t.statusCode>=300)&&(k.cancel(),h.throwError("bad response",a.Logger.errors.SERVER_ERROR,{status:t.statusCode,headers:t.headers,body:f(n,t.headers?t.headers["content-type"]:null),requestBody:f(v.body,A["content-type"]),requestMethod:v.method,url:y})),r)try{const e=yield r(n,t);return k.cancel(),e}catch(x){if(x.throttleRetry&&e<i){let t=!0;if(c&&(t=yield c(e,y)),t){const t=p*parseInt(String(Math.random()*Math.pow(2,e)));yield d(t);continue}}k.cancel(),h.throwError("processing response error",a.Logger.errors.SERVER_ERROR,{body:f(n,t.headers?t.headers["content-type"]:null),error:x,requestBody:f(v.body,A["content-type"]),requestMethod:v.method,url:y})}return k.cancel(),n}return h.throwError("failed response",a.Logger.errors.SERVER_ERROR,{requestBody:f(v.body,A["content-type"]),requestMethod:v.method,url:y})}))}();return Promise.race([k.promise,C])}function g(e,t,r){let n=null;if(null!=t){n=(0,s.Y0)(t);const r="string"===typeof e?{url:e}:(0,o.shallowCopy)(e);if(r.headers){0!==Object.keys(r.headers).filter((e=>"content-type"===e.toLowerCase())).length||(r.headers=(0,o.shallowCopy)(r.headers),r.headers["content-type"]="application/json")}else r.headers={"content-type":"application/json"};e=r}return p(e,n,((e,t)=>{let n=null;if(null!=e)try{n=JSON.parse((0,s.ZN)(e))}catch(i){h.throwError("invalid JSON",a.Logger.errors.SERVER_ERROR,{body:e,error:i})}return r&&(n=r(n,t)),n}))}function m(e,t){return t||(t={}),null==(t=(0,o.shallowCopy)(t)).floor&&(t.floor=0),null==t.ceiling&&(t.ceiling=1e4),null==t.interval&&(t.interval=250),new Promise((function(r,n){let i=null,o=!1;const s=()=>!o&&(o=!0,i&&clearTimeout(i),!0);t.timeout&&(i=setTimeout((()=>{s()&&n(new Error("timeout"))}),t.timeout));const a=t.retryLimit;let c=0;!function i(){return e().then((function(e){if(void 0!==e)s()&&r(e);else if(t.oncePoll)t.oncePoll.once("poll",i);else if(t.onceBlock)t.onceBlock.once("block",i);else if(!o){if(c++,c>a)return void(s()&&n(new Error("retry limit reached")));let e=t.interval*parseInt(String(Math.random()*Math.pow(2,c)));e<t.floor&&(e=t.floor),e>t.ceiling&&(e=t.ceiling),setTimeout(i,e)}return null}),(function(e){s()&&n(e)}))}()}))}},9687:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"}},3644:(e,t,r)=>{"use strict";r.d(t,{$n:()=>h,Fq:()=>l,_j:()=>u,mi:()=>a});var n=r(803);function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),r)}function o(e){if(e.type)return e;if("#"===e.charAt(0))return o(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),r=e.match(t);return r&&1===r[0].length&&(r=r.map((function(e){return e+e}))),r?"rgb".concat(4===r.length?"a":"","(").concat(r.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}(e));var t=e.indexOf("("),r=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(r))throw new Error((0,n.Z)(3,e));var i=e.substring(t+1,e.length-1).split(",");return{type:r,values:i=i.map((function(e){return parseFloat(e)}))}}function s(e){var t=e.type,r=e.values;return-1!==t.indexOf("rgb")?r=r.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(r[1]="".concat(r[1],"%"),r[2]="".concat(r[2],"%")),"".concat(t,"(").concat(r.join(", "),")")}function a(e,t){var r=c(e),n=c(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function c(e){var t="hsl"===(e=o(e)).type?o(function(e){var t=(e=o(e)).values,r=t[0],n=t[1]/100,i=t[2]/100,a=n*Math.min(i,1-i),c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+r/30)%12;return i-a*Math.max(Math.min(t-3,9-t,1),-1)},l="rgb",u=[Math.round(255*c(0)),Math.round(255*c(8)),Math.round(255*c(4))];return"hsla"===e.type&&(l+="a",u.push(t[3])),s({type:l,values:u})}(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function l(e,t){return e=o(e),t=i(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,s(e)}function u(e,t){if(e=o(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var r=0;r<3;r+=1)e.values[r]*=1-t;return s(e)}function h(e,t){if(e=o(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;return s(e)}},1423:(e,t,r)=>{"use strict";r.d(t,{A:()=>X,Z:()=>$});var n=r(5987),i=r(8272),o=r(7462),s=["xs","sm","md","lg","xl"];function a(e){var t=e.values,r=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,i=e.unit,a=void 0===i?"px":i,c=e.step,l=void 0===c?5:c,u=(0,n.Z)(e,["values","unit","step"]);function h(e){var t="number"===typeof r[e]?r[e]:e;return"@media (min-width:".concat(t).concat(a,")")}function d(e,t){var n=s.indexOf(t);return n===s.length-1?h(e):"@media (min-width:".concat("number"===typeof r[e]?r[e]:e).concat(a,") and ")+"(max-width:".concat((-1!==n&&"number"===typeof r[s[n+1]]?r[s[n+1]]:t)-l/100).concat(a,")")}return(0,o.Z)({keys:s,values:r,up:h,down:function(e){var t=s.indexOf(e)+1,n=r[s[t]];return t===s.length?h("xs"):"@media (max-width:".concat(("number"===typeof n&&t>0?n:e)-l/100).concat(a,")")},between:d,only:function(e){return d(e,e)},width:function(e){return r[e]}},u)}var c=r(4942);function l(e,t,r){var n;return(0,o.Z)({gutters:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return console.warn(["Material-UI: theme.mixins.gutters() is deprecated.","You can use the source of the mixin directly:","\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n [theme.breakpoints.up('sm')]: {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3),\n },\n "].join("\n")),(0,o.Z)({paddingLeft:t(2),paddingRight:t(2)},r,(0,c.Z)({},e.up("sm"),(0,o.Z)({paddingLeft:t(3),paddingRight:t(3)},r[e.up("sm")])))},toolbar:(n={minHeight:56},(0,c.Z)(n,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),(0,c.Z)(n,e.up("sm"),{minHeight:64}),n)},r)}var u=r(803);const h={black:"#000",white:"#fff"};const d={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"};const f={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"};const p={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"};const g={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"};const m={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"};const y={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"};var v=r(9687),b=r(3644),w={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:h.white,default:d[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},E={text:{primary:h.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:d[800],default:"#303030"},action:{active:h.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function S(e,t,r,n){var i=n.light||n,o=n.dark||1.5*n;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:"light"===t?e.light=(0,b.$n)(e.main,i):"dark"===t&&(e.dark=(0,b._j)(e.main,o)))}function _(e){var t=e.primary,r=void 0===t?{light:f[300],main:f[500],dark:f[700]}:t,s=e.secondary,a=void 0===s?{light:p.A200,main:p.A400,dark:p.A700}:s,c=e.error,l=void 0===c?{light:g[300],main:g[500],dark:g[700]}:c,_=e.warning,A=void 0===_?{light:m[300],main:m[500],dark:m[700]}:_,k=e.info,C=void 0===k?{light:y[300],main:y[500],dark:y[700]}:k,x=e.success,I=void 0===x?{light:v.Z[300],main:v.Z[500],dark:v.Z[700]}:x,R=e.type,P=void 0===R?"light":R,T=e.contrastThreshold,N=void 0===T?3:T,D=e.tonalOffset,O=void 0===D?.2:D,M=(0,n.Z)(e,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function B(e){return(0,b.mi)(e,E.text.primary)>=N?E.text.primary:w.text.primary}var L=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;if(!(e=(0,o.Z)({},e)).main&&e[t]&&(e.main=e[t]),!e.main)throw new Error((0,u.Z)(4,t));if("string"!==typeof e.main)throw new Error((0,u.Z)(5,JSON.stringify(e.main)));return S(e,"light",r,O),S(e,"dark",n,O),e.contrastText||(e.contrastText=B(e.main)),e},U={dark:E,light:w};return(0,i.Z)((0,o.Z)({common:h,type:P,primary:L(r),secondary:L(a,"A400","A200","A700"),error:L(l),warning:L(A),info:L(C),success:L(I),grey:d,contrastThreshold:N,getContrastText:B,augmentColor:L,tonalOffset:O},U[P]),M)}function A(e){return Math.round(1e5*e)/1e5}function k(e){return A(e)}var C={textTransform:"uppercase"},x='"Roboto", "Helvetica", "Arial", sans-serif';function I(e,t){var r="function"===typeof t?t(e):t,s=r.fontFamily,a=void 0===s?x:s,c=r.fontSize,l=void 0===c?14:c,u=r.fontWeightLight,h=void 0===u?300:u,d=r.fontWeightRegular,f=void 0===d?400:d,p=r.fontWeightMedium,g=void 0===p?500:p,m=r.fontWeightBold,y=void 0===m?700:m,v=r.htmlFontSize,b=void 0===v?16:v,w=r.allVariants,E=r.pxToRem,S=(0,n.Z)(r,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]);var _=l/14,I=E||function(e){return"".concat(e/b*_,"rem")},R=function(e,t,r,n,i){return(0,o.Z)({fontFamily:a,fontWeight:e,fontSize:I(t),lineHeight:r},a===x?{letterSpacing:"".concat(A(n/t),"em")}:{},i,w)},P={h1:R(h,96,1.167,-1.5),h2:R(h,60,1.2,-.5),h3:R(f,48,1.167,0),h4:R(f,34,1.235,.25),h5:R(f,24,1.334,0),h6:R(g,20,1.6,.15),subtitle1:R(f,16,1.75,.15),subtitle2:R(g,14,1.57,.1),body1:R(f,16,1.5,.15),body2:R(f,14,1.43,.15),button:R(g,14,1.75,.4,C),caption:R(f,12,1.66,.4),overline:R(f,12,2.66,1,C)};return(0,i.Z)((0,o.Z)({htmlFontSize:b,pxToRem:I,round:k,fontFamily:a,fontSize:l,fontWeightLight:h,fontWeightRegular:f,fontWeightMedium:g,fontWeightBold:y},P),S,{clone:!1})}function R(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}const P=["none",R(0,2,1,-1,0,1,1,0,0,1,3,0),R(0,3,1,-2,0,2,2,0,0,1,5,0),R(0,3,3,-2,0,3,4,0,0,1,8,0),R(0,2,4,-1,0,4,5,0,0,1,10,0),R(0,3,5,-1,0,5,8,0,0,1,14,0),R(0,3,5,-1,0,6,10,0,0,1,18,0),R(0,4,5,-2,0,7,10,1,0,2,16,1),R(0,5,5,-3,0,8,10,1,0,3,14,2),R(0,5,6,-3,0,9,12,1,0,3,16,2),R(0,6,6,-3,0,10,14,1,0,4,18,3),R(0,6,7,-4,0,11,15,1,0,4,20,3),R(0,7,8,-4,0,12,17,2,0,5,22,4),R(0,7,8,-4,0,13,19,2,0,5,24,4),R(0,7,9,-4,0,14,21,2,0,5,26,4),R(0,8,9,-5,0,15,22,2,0,6,28,5),R(0,8,10,-5,0,16,24,2,0,6,30,5),R(0,8,11,-5,0,17,26,2,0,6,32,5),R(0,9,11,-5,0,18,28,2,0,7,34,6),R(0,9,12,-6,0,19,29,2,0,7,36,6),R(0,10,13,-6,0,20,31,3,0,8,38,7),R(0,10,13,-6,0,21,33,3,0,8,40,7),R(0,10,14,-6,0,22,35,3,0,8,42,7),R(0,11,14,-7,0,23,36,3,0,9,44,8),R(0,11,15,-7,0,24,38,3,0,9,46,8)];const T={borderRadius:4};var N=r(885),D=r(1002),O={xs:0,sm:600,md:960,lg:1280,xl:1920},M={keys:["xs","sm","md","lg","xl"],up:function(e){return"@media (min-width:".concat(O[e],"px)")}};const B=function(e,t){return t?(0,i.Z)(e,t,{clone:!1}):e};var L={m:"margin",p:"padding"},U={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},F={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},j=function(e){var t={};return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}}((function(e){if(e.length>2){if(!F[e])return[e];e=F[e]}var t=e.split(""),r=(0,N.Z)(t,2),n=r[0],i=r[1],o=L[n],s=U[i]||"";return Array.isArray(s)?s.map((function(e){return o+e})):[o+s]})),z=["m","mt","mr","mb","ml","mx","my","p","pt","pr","pb","pl","px","py","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY"];function K(e){var t=e.spacing||8;return"number"===typeof t?function(e){return t*e}:Array.isArray(t)?function(e){return t[e]}:"function"===typeof t?t:function(){}}function q(e,t){return function(r){return e.reduce((function(e,n){return e[n]=function(e,t){if("string"===typeof t||null==t)return t;var r=e(Math.abs(t));return t>=0?r:"number"===typeof r?-r:"-".concat(r)}(t,r),e}),{})}}function Z(e){var t=K(e.theme);return Object.keys(e).map((function(r){if(-1===z.indexOf(r))return null;var n=q(j(r),t),i=e[r];return function(e,t,r){if(Array.isArray(t)){var n=e.theme.breakpoints||M;return t.reduce((function(e,i,o){return e[n.up(n.keys[o])]=r(t[o]),e}),{})}if("object"===(0,D.Z)(t)){var i=e.theme.breakpoints||M;return Object.keys(t).reduce((function(e,n){return e[i.up(n)]=r(t[n]),e}),{})}return r(t)}(e,i,n)})).reduce(B,{})}Z.propTypes={},Z.filterProps=z;function V(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;var t=K({spacing:e}),r=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return 0===r.length?t(1):1===r.length?t(r[0]):r.map((function(e){if("string"===typeof e)return e;var r=t(e);return"number"===typeof r?"".concat(r,"px"):r})).join(" ")};return Object.defineProperty(r,"unit",{get:function(){return e}}),r.mui=!0,r}var H={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},W={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function G(e){return"".concat(Math.round(e),"ms")}const Y={easing:H,duration:W,create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.duration,i=void 0===r?W.standard:r,o=t.easing,s=void 0===o?H.easeInOut:o,a=t.delay,c=void 0===a?0:a;(0,n.Z)(t,["duration","easing","delay"]);return(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"===typeof i?i:G(i)," ").concat(s," ").concat("string"===typeof c?c:G(c))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}};var Q=r(4398);function J(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,r=void 0===t?{}:t,o=e.mixins,s=void 0===o?{}:o,c=e.palette,u=void 0===c?{}:c,h=e.spacing,d=e.typography,f=void 0===d?{}:d,p=(0,n.Z)(e,["breakpoints","mixins","palette","spacing","typography"]),g=_(u),m=a(r),y=V(h),v=(0,i.Z)({breakpoints:m,direction:"ltr",mixins:l(m,y,s),overrides:{},palette:g,props:{},shadows:P,typography:I(g,f),spacing:y,shape:T,transitions:Y,zIndex:Q.Z},p),b=arguments.length,w=new Array(b>1?b-1:0),E=1;E<b;E++)w[E-1]=arguments[E];return v=w.reduce((function(e,t){return(0,i.Z)(e,t)}),v)}function X(){return J.apply(void 0,arguments)}const $=J},1187:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=(0,r(1423).Z)()},454:(e,t,r)=>{"use strict";r.d(t,{Z:()=>f});var n=r(7462),i=r(5987),o=r(7313),s=r(7861),a=r.n(s),c=r(5614),l=r(3621),u=r(8225);const h=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(r){var s=t.defaultTheme,h=t.withTheme,d=void 0!==h&&h,f=t.name,p=(0,i.Z)(t,["defaultTheme","withTheme","name"]);var g=f,m=(0,c.Z)(e,(0,n.Z)({defaultTheme:s,Component:r,name:f||r.displayName,classNamePrefix:g},p)),y=o.forwardRef((function(e,t){e.classes;var a,c=e.innerRef,h=(0,i.Z)(e,["classes","innerRef"]),p=m((0,n.Z)({},r.defaultProps,e)),g=h;return("string"===typeof f||d)&&(a=(0,u.Z)()||s,f&&(g=(0,l.Z)({theme:a,name:f,props:h})),d&&!g.theme&&(g.theme=a)),o.createElement(r,(0,n.Z)({ref:c||t,classes:p},g))}));return a()(y,r),y}};var d=r(1187);const f=function(e,t){return h(e,(0,n.Z)({defaultTheme:d.Z},t))}},4398:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500}},9685:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(803);function i(e){if("string"!==typeof e)throw new Error((0,n.Z)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},468:(e,t,r)=>{"use strict";function n(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.reduce((function(e,t){return null==t?e:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n),t.apply(this,n)}}),(function(){}))}r.d(t,{Z:()=>n})},2399:(e,t,r)=>{"use strict";r.d(t,{Z:()=>h});var n=r(7462),i=r(7313),o=r(5987),s=r(3061),a=r(454),c=r(9685),l=i.forwardRef((function(e,t){var r=e.children,a=e.classes,l=e.className,u=e.color,h=void 0===u?"inherit":u,d=e.component,f=void 0===d?"svg":d,p=e.fontSize,g=void 0===p?"medium":p,m=e.htmlColor,y=e.titleAccess,v=e.viewBox,b=void 0===v?"0 0 24 24":v,w=(0,o.Z)(e,["children","classes","className","color","component","fontSize","htmlColor","titleAccess","viewBox"]);return i.createElement(f,(0,n.Z)({className:(0,s.Z)(a.root,l,"inherit"!==h&&a["color".concat((0,c.Z)(h))],"default"!==g&&"medium"!==g&&a["fontSize".concat((0,c.Z)(g))]),focusable:"false",viewBox:b,color:m,"aria-hidden":!y||void 0,role:y?"img":void 0,ref:t},w),r,y?i.createElement("title",null,y):null)}));l.muiName="SvgIcon";const u=(0,a.Z)((function(e){return{root:{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,fontSize:e.typography.pxToRem(24),transition:e.transitions.create("fill",{duration:e.transitions.duration.shorter})},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorAction:{color:e.palette.action.active},colorError:{color:e.palette.error.main},colorDisabled:{color:e.palette.action.disabled},fontSizeInherit:{fontSize:"inherit"},fontSizeSmall:{fontSize:e.typography.pxToRem(20)},fontSizeLarge:{fontSize:e.typography.pxToRem(35)}}}),{name:"MuiSvgIcon"})(l);function h(e,t){var r=function(t,r){return i.createElement(u,(0,n.Z)({ref:r},t),e)};return r.muiName=u.muiName,i.memo(i.forwardRef(r))}},670:(e,t,r)=>{"use strict";function n(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function n(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];var s=this,a=function(){e.apply(s,i)};clearTimeout(t),t=setTimeout(a,r)}return n.clear=function(){clearTimeout(t)},n}r.d(t,{Z:()=>n})},9512:(e,t,r)=>{"use strict";r.r(t),r.d(t,{capitalize:()=>n.Z,createChainedFunction:()=>i.Z,createSvgIcon:()=>o.Z,debounce:()=>s.Z,deprecatedPropType:()=>a,isMuiElement:()=>c.Z,ownerDocument:()=>l.Z,ownerWindow:()=>u.Z,requirePropFactory:()=>h,setRef:()=>d.Z,unstable_useId:()=>v,unsupportedProp:()=>f,useControlled:()=>p.Z,useEventCallback:()=>g.Z,useForkRef:()=>m.Z,useIsFocusVisible:()=>b.Z});var n=r(9685),i=r(468),o=r(2399),s=r(670);function a(e,t){return function(){return null}}var c=r(2879),l=r(516),u=r(3958);function h(e){return function(){return null}}var d=r(1225);function f(e,t,r,n,i){return null}var p=r(794),g=r(2705),m=r(8088),y=r(7313);function v(e){var t=y.useState(e),r=t[0],n=t[1],i=e||r;return y.useEffect((function(){null==r&&n("mui-".concat(Math.round(1e5*Math.random())))}),[r]),i}var b=r(6790)},2879:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(7313);function i(e,t){return n.isValidElement(e)&&-1!==t.indexOf(e.type.muiName)}},516:(e,t,r)=>{"use strict";function n(e){return e&&e.ownerDocument||document}r.d(t,{Z:()=>n})},3958:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(516);function i(e){return(0,n.Z)(e).defaultView||window}},1225:(e,t,r)=>{"use strict";function n(e,t){"function"===typeof e?e(t):e&&(e.current=t)}r.d(t,{Z:()=>n})},794:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(7313);function i(e){var t=e.controlled,r=e.default,i=(e.name,e.state,n.useRef(void 0!==t).current),o=n.useState(r),s=o[0],a=o[1];return[i?t:s,n.useCallback((function(e){i||a(e)}),[])]}},2705:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(7313),i="undefined"!==typeof window?n.useLayoutEffect:n.useEffect;function o(e){var t=n.useRef(e);return i((function(){t.current=e})),n.useCallback((function(){return t.current.apply(void 0,arguments)}),[])}},8088:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(7313),i=r(1225);function o(e,t){return n.useMemo((function(){return null==e&&null==t?null:function(r){(0,i.Z)(e,r),(0,i.Z)(t,r)}}),[e,t])}},6790:(e,t,r)=>{"use strict";r.d(t,{Z:()=>p});var n=r(7313),i=r(1168),o=!0,s=!1,a=null,c={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function l(e){e.metaKey||e.altKey||e.ctrlKey||(o=!0)}function u(){o=!1}function h(){"hidden"===this.visibilityState&&s&&(o=!0)}function d(e){var t=e.target;try{return t.matches(":focus-visible")}catch(r){}return o||function(e){var t=e.type,r=e.tagName;return!("INPUT"!==r||!c[t]||e.readOnly)||"TEXTAREA"===r&&!e.readOnly||!!e.isContentEditable}(t)}function f(){s=!0,window.clearTimeout(a),a=window.setTimeout((function(){s=!1}),100)}function p(){return{isFocusVisible:d,onBlurVisible:f,ref:n.useCallback((function(e){var t,r=i.findDOMNode(e);null!=r&&((t=r.ownerDocument).addEventListener("keydown",l,!0),t.addEventListener("mousedown",u,!0),t.addEventListener("pointerdown",u,!0),t.addEventListener("touchstart",u,!0),t.addEventListener("visibilitychange",h,!0))}),[])}}},2908:(e,t,r)=>{"use strict";var n=r(4836),i=r(5263);t.Z=void 0;var o=i(r(7313)),s=(0,n(r(2293)).default)(o.createElement("path",{d:"M1 9l2 2c4.97-4.97 13.03-4.97 18 0l2-2C16.93 2.93 7.08 2.93 1 9zm8 8l3 3 3-3c-1.65-1.66-4.34-1.66-6 0zm-4-4l2 2c2.76-2.76 7.24-2.76 10 0l2-2C15.14 9.14 8.87 9.14 5 13z"}),"Wifi");t.Z=s},2293:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n.createSvgIcon}});var n=r(9512)},1994:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n="function"===typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__"},3621:(e,t,r)=>{"use strict";function n(e){var t=e.theme,r=e.name,n=e.props;if(!t||!t.props||!t.props[r])return n;var i,o=t.props[r];for(i in o)void 0===n[i]&&(n[i]=o[i]);return n}r.d(t,{Z:()=>n})},5614:(e,t,r)=>{"use strict";r.d(t,{Z:()=>vr});var n=r(5987),i=r(7462),o=r(7313),s="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};const a="object"===("undefined"===typeof window?"undefined":s(window))&&"object"===("undefined"===typeof document?"undefined":s(document))&&9===document.nodeType;var c=r(3144),l=r(1721),u=r(4236),h=r(3366),d={}.constructor;function f(e){if(null==e||"object"!==typeof e)return e;if(Array.isArray(e))return e.map(f);if(e.constructor!==d)return e;var t={};for(var r in e)t[r]=f(e[r]);return t}function p(e,t,r){void 0===e&&(e="unnamed");var n=r.jss,i=f(t),o=n.plugins.onCreateRule(e,i,r);return o||(e[0],null)}var g=function(e,t){for(var r="",n=0;n<e.length&&"!important"!==e[n];n++)r&&(r+=t),r+=e[n];return r},m=function(e){if(!Array.isArray(e))return e;var t="";if(Array.isArray(e[0]))for(var r=0;r<e.length&&"!important"!==e[r];r++)t&&(t+=", "),t+=g(e[r]," ");else t=g(e,", ");return"!important"===e[e.length-1]&&(t+=" !important"),t};function y(e){return e&&!1===e.format?{linebreak:"",space:""}:{linebreak:"\n",space:" "}}function v(e,t){for(var r="",n=0;n<t;n++)r+=" ";return r+e}function b(e,t,r){void 0===r&&(r={});var n="";if(!t)return n;var i=r.indent,o=void 0===i?0:i,s=t.fallbacks;!1===r.format&&(o=-1/0);var a=y(r),c=a.linebreak,l=a.space;if(e&&o++,s)if(Array.isArray(s))for(var u=0;u<s.length;u++){var h=s[u];for(var d in h){var f=h[d];null!=f&&(n&&(n+=c),n+=v(d+":"+l+m(f)+";",o))}}else for(var p in s){var g=s[p];null!=g&&(n&&(n+=c),n+=v(p+":"+l+m(g)+";",o))}for(var b in t){var w=t[b];null!=w&&"fallbacks"!==b&&(n&&(n+=c),n+=v(b+":"+l+m(w)+";",o))}return(n||r.allowEmpty)&&e?(n&&(n=""+c+n+c),v(""+e+l+"{"+n,--o)+v("}",o)):n}var w=/([[\].#*$><+~=|^:(),"'`\s])/g,E="undefined"!==typeof CSS&&CSS.escape,S=function(e){return E?E(e):e.replace(w,"\\$1")},_=function(){function e(e,t,r){this.type="style",this.isProcessed=!1;var n=r.sheet,i=r.Renderer;this.key=e,this.options=r,this.style=t,n?this.renderer=n.renderer:i&&(this.renderer=new i)}return e.prototype.prop=function(e,t,r){if(void 0===t)return this.style[e];var n=!!r&&r.force;if(!n&&this.style[e]===t)return this;var i=t;r&&!1===r.process||(i=this.options.jss.plugins.onChangeValue(t,e,this));var o=null==i||!1===i,s=e in this.style;if(o&&!s&&!n)return this;var a=o&&s;if(a?delete this.style[e]:this.style[e]=i,this.renderable&&this.renderer)return a?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,i),this;var c=this.options.sheet;return c&&c.attached,this},e}(),A=function(e){function t(t,r,n){var i;i=e.call(this,t,r,n)||this;var o=n.selector,s=n.scoped,a=n.sheet,c=n.generateId;return o?i.selectorText=o:!1!==s&&(i.id=c((0,u.Z)((0,u.Z)(i)),a),i.selectorText="."+S(i.id)),i}(0,l.Z)(t,e);var r=t.prototype;return r.applyTo=function(e){var t=this.renderer;if(t){var r=this.toJSON();for(var n in r)t.setProperty(e,n,r[n])}return this},r.toJSON=function(){var e={};for(var t in this.style){var r=this.style[t];"object"!==typeof r?e[t]=r:Array.isArray(r)&&(e[t]=m(r))}return e},r.toString=function(e){var t=this.options.sheet,r=!!t&&t.options.link?(0,i.Z)({},e,{allowEmpty:!0}):e;return b(this.selectorText,this.style,r)},(0,c.Z)(t,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,r=this.renderable;if(r&&t)t.setSelector(r,e)||t.replaceRule(r,this)}},get:function(){return this.selectorText}}]),t}(_),k={onCreateRule:function(e,t,r){return"@"===e[0]||r.parent&&"keyframes"===r.parent.type?null:new A(e,t,r)}},C={indent:1,children:!0},x=/@([\w-]+)/,I=function(){function e(e,t,r){this.type="conditional",this.isProcessed=!1,this.key=e;var n=e.match(x);for(var o in this.at=n?n[1]:"unknown",this.query=r.name||"@"+this.at,this.options=r,this.rules=new X((0,i.Z)({},r,{parent:this})),t)this.rules.add(o,t[o]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,r){var n=this.rules.add(e,t,r);return n?(this.options.jss.plugins.onProcessRule(n),n):null},t.replaceRule=function(e,t,r){var n=this.rules.replace(e,t,r);return n&&this.options.jss.plugins.onProcessRule(n),n},t.toString=function(e){void 0===e&&(e=C);var t=y(e).linebreak;if(null==e.indent&&(e.indent=C.indent),null==e.children&&(e.children=C.children),!1===e.children)return this.query+" {}";var r=this.rules.toString(e);return r?this.query+" {"+t+r+t+"}":""},e}(),R=/@media|@supports\s+/,P={onCreateRule:function(e,t,r){return R.test(e)?new I(e,t,r):null}},T={indent:1,children:!0},N=/@keyframes\s+([\w-]+)/,D=function(){function e(e,t,r){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var n=e.match(N);n&&n[1]?this.name=n[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=r;var o=r.scoped,s=r.sheet,a=r.generateId;for(var c in this.id=!1===o?this.name:S(a(this,s)),this.rules=new X((0,i.Z)({},r,{parent:this})),t)this.rules.add(c,t[c],(0,i.Z)({},r,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){void 0===e&&(e=T);var t=y(e).linebreak;if(null==e.indent&&(e.indent=T.indent),null==e.children&&(e.children=T.children),!1===e.children)return this.at+" "+this.id+" {}";var r=this.rules.toString(e);return r&&(r=""+t+r+t),this.at+" "+this.id+" {"+r+"}"},e}(),O=/@keyframes\s+/,M=/\$([\w-]+)/g,B=function(e,t){return"string"===typeof e?e.replace(M,(function(e,r){return r in t?t[r]:e})):e},L=function(e,t,r){var n=e[t],i=B(n,r);i!==n&&(e[t]=i)},U={onCreateRule:function(e,t,r){return"string"===typeof e&&O.test(e)?new D(e,t,r):null},onProcessStyle:function(e,t,r){return"style"===t.type&&r?("animation-name"in e&&L(e,"animation-name",r.keyframes),"animation"in e&&L(e,"animation",r.keyframes),e):e},onChangeValue:function(e,t,r){var n=r.options.sheet;if(!n)return e;switch(t){case"animation":case"animation-name":return B(e,n.keyframes);default:return e}}},F=function(e){function t(){return e.apply(this,arguments)||this}return(0,l.Z)(t,e),t.prototype.toString=function(e){var t=this.options.sheet,r=!!t&&t.options.link?(0,i.Z)({},e,{allowEmpty:!0}):e;return b(this.key,this.style,r)},t}(_),j={onCreateRule:function(e,t,r){return r.parent&&"keyframes"===r.parent.type?new F(e,t,r):null}},z=function(){function e(e,t,r){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=e,this.style=t,this.options=r}return e.prototype.toString=function(e){var t=y(e).linebreak;if(Array.isArray(this.style)){for(var r="",n=0;n<this.style.length;n++)r+=b(this.at,this.style[n]),this.style[n+1]&&(r+=t);return r}return b(this.at,this.style,e)},e}(),K=/@font-face/,q={onCreateRule:function(e,t,r){return K.test(e)?new z(e,t,r):null}},Z=function(){function e(e,t,r){this.type="viewport",this.at="@viewport",this.isProcessed=!1,this.key=e,this.style=t,this.options=r}return e.prototype.toString=function(e){return b(this.key,this.style,e)},e}(),V={onCreateRule:function(e,t,r){return"@viewport"===e||"@-ms-viewport"===e?new Z(e,t,r):null}},H=function(){function e(e,t,r){this.type="simple",this.isProcessed=!1,this.key=e,this.value=t,this.options=r}return e.prototype.toString=function(e){if(Array.isArray(this.value)){for(var t="",r=0;r<this.value.length;r++)t+=this.key+" "+this.value[r]+";",this.value[r+1]&&(t+="\n");return t}return this.key+" "+this.value+";"},e}(),W={"@charset":!0,"@import":!0,"@namespace":!0},G={onCreateRule:function(e,t,r){return e in W?new H(e,t,r):null}},Y=[k,P,U,j,q,V,G],Q={process:!0},J={force:!0,process:!0},X=function(){function e(e){this.map={},this.raw={},this.index=[],this.counter=0,this.options=e,this.classes=e.classes,this.keyframes=e.keyframes}var t=e.prototype;return t.add=function(e,t,r){var n=this.options,o=n.parent,s=n.sheet,a=n.jss,c=n.Renderer,l=n.generateId,u=n.scoped,h=(0,i.Z)({classes:this.classes,parent:o,sheet:s,jss:a,Renderer:c,generateId:l,scoped:u,name:e,keyframes:this.keyframes,selector:void 0},r),d=e;e in this.raw&&(d=e+"-d"+this.counter++),this.raw[d]=t,d in this.classes&&(h.selector="."+S(this.classes[d]));var f=p(d,t,h);if(!f)return null;this.register(f);var g=void 0===h.index?this.index.length:h.index;return this.index.splice(g,0,f),f},t.replace=function(e,t,r){var n=this.get(e),o=this.index.indexOf(n);n&&this.remove(n);var s=r;return-1!==o&&(s=(0,i.Z)({},r,{index:o})),this.add(e,t,s)},t.get=function(e){return this.map[e]},t.remove=function(e){this.unregister(e),delete this.raw[e.key],this.index.splice(this.index.indexOf(e),1)},t.indexOf=function(e){return this.index.indexOf(e)},t.process=function(){var e=this.options.jss.plugins;this.index.slice(0).forEach(e.onProcessRule,e)},t.register=function(e){this.map[e.key]=e,e instanceof A?(this.map[e.selector]=e,e.id&&(this.classes[e.key]=e.id)):e instanceof D&&this.keyframes&&(this.keyframes[e.name]=e.id)},t.unregister=function(e){delete this.map[e.key],e instanceof A?(delete this.map[e.selector],delete this.classes[e.key]):e instanceof D&&delete this.keyframes[e.name]},t.update=function(){var e,t,r;if("string"===typeof(arguments.length<=0?void 0:arguments[0])?(e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],r=arguments.length<=2?void 0:arguments[2]):(t=arguments.length<=0?void 0:arguments[0],r=arguments.length<=1?void 0:arguments[1],e=null),e)this.updateOne(this.get(e),t,r);else for(var n=0;n<this.index.length;n++)this.updateOne(this.index[n],t,r)},t.updateOne=function(t,r,n){void 0===n&&(n=Q);var i=this.options,o=i.jss.plugins,s=i.sheet;if(t.rules instanceof e)t.rules.update(r,n);else{var a=t.style;if(o.onUpdate(r,t,s,n),n.process&&a&&a!==t.style){for(var c in o.onProcessStyle(t.style,t,s),t.style){var l=t.style[c];l!==a[c]&&t.prop(c,l,J)}for(var u in a){var h=t.style[u],d=a[u];null==h&&h!==d&&t.prop(u,null,J)}}}},t.toString=function(e){for(var t="",r=this.options.sheet,n=!!r&&r.options.link,i=y(e).linebreak,o=0;o<this.index.length;o++){var s=this.index[o].toString(e);(s||n)&&(t&&(t+=i),t+=s)}return t},e}(),$=function(){function e(e,t){for(var r in this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=(0,i.Z)({},t,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),t.Renderer&&(this.renderer=new t.Renderer(this)),this.rules=new X(this.options),e)this.rules.add(r,e[r]);this.rules.process()}var t=e.prototype;return t.attach=function(){return this.attached||(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy()),this},t.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},t.addRule=function(e,t,r){var n=this.queue;this.attached&&!n&&(this.queue=[]);var i=this.rules.add(e,t,r);return i?(this.options.jss.plugins.onProcessRule(i),this.attached?this.deployed?(n?n.push(i):(this.insertRule(i),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0)),i):i:(this.deployed=!1,i)):null},t.replaceRule=function(e,t,r){var n=this.rules.get(e);if(!n)return this.addRule(e,t,r);var i=this.rules.replace(e,t,r);return i&&this.options.jss.plugins.onProcessRule(i),this.attached?this.deployed?(this.renderer&&(i?n.renderable&&this.renderer.replaceRule(n.renderable,i):this.renderer.deleteRule(n)),i):i:(this.deployed=!1,i)},t.insertRule=function(e){this.renderer&&this.renderer.insertRule(e)},t.addRules=function(e,t){var r=[];for(var n in e){var i=this.addRule(n,e[n],t);i&&r.push(i)}return r},t.getRule=function(e){return this.rules.get(e)},t.deleteRule=function(e){var t="object"===typeof e?e:this.rules.get(e);return!(!t||this.attached&&!t.renderable)&&(this.rules.remove(t),!(this.attached&&t.renderable&&this.renderer)||this.renderer.deleteRule(t.renderable))},t.indexOf=function(e){return this.rules.indexOf(e)},t.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},t.update=function(){var e;return(e=this.rules).update.apply(e,arguments),this},t.updateOne=function(e,t,r){return this.rules.updateOne(e,t,r),this},t.toString=function(e){return this.rules.toString(e)},e}(),ee=function(){function e(){this.plugins={internal:[],external:[]},this.registry={}}var t=e.prototype;return t.onCreateRule=function(e,t,r){for(var n=0;n<this.registry.onCreateRule.length;n++){var i=this.registry.onCreateRule[n](e,t,r);if(i)return i}return null},t.onProcessRule=function(e){if(!e.isProcessed){for(var t=e.options.sheet,r=0;r<this.registry.onProcessRule.length;r++)this.registry.onProcessRule[r](e,t);e.style&&this.onProcessStyle(e.style,e,t),e.isProcessed=!0}},t.onProcessStyle=function(e,t,r){for(var n=0;n<this.registry.onProcessStyle.length;n++)t.style=this.registry.onProcessStyle[n](t.style,t,r)},t.onProcessSheet=function(e){for(var t=0;t<this.registry.onProcessSheet.length;t++)this.registry.onProcessSheet[t](e)},t.onUpdate=function(e,t,r,n){for(var i=0;i<this.registry.onUpdate.length;i++)this.registry.onUpdate[i](e,t,r,n)},t.onChangeValue=function(e,t,r){for(var n=e,i=0;i<this.registry.onChangeValue.length;i++)n=this.registry.onChangeValue[i](n,t,r);return n},t.use=function(e,t){void 0===t&&(t={queue:"external"});var r=this.plugins[t.queue];-1===r.indexOf(e)&&(r.push(e),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce((function(e,t){for(var r in t)r in e&&e[r].push(t[r]);return e}),{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},e}(),te=function(){function e(){this.registry=[]}var t=e.prototype;return t.add=function(e){var t=this.registry,r=e.options.index;if(-1===t.indexOf(e))if(0===t.length||r>=this.index)t.push(e);else for(var n=0;n<t.length;n++)if(t[n].options.index>r)return void t.splice(n,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,r=t.attached,n=(0,h.Z)(t,["attached"]),i=y(n).linebreak,o="",s=0;s<this.registry.length;s++){var a=this.registry[s];null!=r&&a.attached!==r||(o&&(o+=i),o+=a.toString(n))}return o},(0,c.Z)(e,[{key:"index",get:function(){return 0===this.registry.length?0:this.registry[this.registry.length-1].options.index}}]),e}(),re=new te,ne="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window&&window.Math===Math?window:"undefined"!==typeof self&&self.Math===Math?self:Function("return this")(),ie="2f1acc6c3a606b082e5eef5e54414ffb";null==ne[ie]&&(ne[ie]=0);var oe=ne[ie]++,se=function(e){void 0===e&&(e={});var t=0;return function(r,n){t+=1;var i="",o="";return n&&(n.options.classNamePrefix&&(o=n.options.classNamePrefix),null!=n.options.jss.id&&(i=String(n.options.jss.id))),e.minify?""+(o||"c")+oe+i+t:o+r.key+"-"+oe+(i?"-"+i:"")+"-"+t}},ae=function(e){var t;return function(){return t||(t=e()),t}},ce=function(e,t){try{return e.attributeStyleMap?e.attributeStyleMap.get(t):e.style.getPropertyValue(t)}catch(r){return""}},le=function(e,t,r){try{var n=r;if(Array.isArray(r)&&(n=m(r)),e.attributeStyleMap)e.attributeStyleMap.set(t,n);else{var i=n?n.indexOf("!important"):-1,o=i>-1?n.substr(0,i-1):n;e.style.setProperty(t,o,i>-1?"important":"")}}catch(s){return!1}return!0},ue=function(e,t){try{e.attributeStyleMap?e.attributeStyleMap.delete(t):e.style.removeProperty(t)}catch(r){}},he=function(e,t){return e.selectorText=t,e.selectorText===t},de=ae((function(){return document.querySelector("head")}));function fe(e){var t=re.registry;if(t.length>0){var r=function(e,t){for(var r=0;r<e.length;r++){var n=e[r];if(n.attached&&n.options.index>t.index&&n.options.insertionPoint===t.insertionPoint)return n}return null}(t,e);if(r&&r.renderer)return{parent:r.renderer.element.parentNode,node:r.renderer.element};if(r=function(e,t){for(var r=e.length-1;r>=0;r--){var n=e[r];if(n.attached&&n.options.insertionPoint===t.insertionPoint)return n}return null}(t,e),r&&r.renderer)return{parent:r.renderer.element.parentNode,node:r.renderer.element.nextSibling}}var n=e.insertionPoint;if(n&&"string"===typeof n){var i=function(e){for(var t=de(),r=0;r<t.childNodes.length;r++){var n=t.childNodes[r];if(8===n.nodeType&&n.nodeValue.trim()===e)return n}return null}(n);if(i)return{parent:i.parentNode,node:i.nextSibling}}return!1}var pe=ae((function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null})),ge=function(e,t,r){try{"insertRule"in e?e.insertRule(t,r):"appendRule"in e&&e.appendRule(t)}catch(n){return!1}return e.cssRules[r]},me=function(e,t){var r=e.cssRules.length;return void 0===t||t>r?r:t},ye=function(){function e(e){this.getPropertyValue=ce,this.setProperty=le,this.removeProperty=ue,this.setSelector=he,this.hasInsertedRules=!1,this.cssRules=[],e&&re.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},r=t.media,n=t.meta,i=t.element;this.element=i||function(){var e=document.createElement("style");return e.textContent="\n",e}(),this.element.setAttribute("data-jss",""),r&&this.element.setAttribute("media",r),n&&this.element.setAttribute("data-meta",n);var o=pe();o&&this.element.setAttribute("nonce",o)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var r=t.insertionPoint,n=fe(t);if(!1!==n&&n.parent)n.parent.insertBefore(e,n.node);else if(r&&"number"===typeof r.nodeType){var i=r,o=i.parentNode;o&&o.insertBefore(e,i.nextSibling)}else de().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var e=this.element.parentNode;e&&e.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent="\n")}},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var r=0;r<e.index.length;r++)this.insertRule(e.index[r],r,t)},t.insertRule=function(e,t,r){if(void 0===r&&(r=this.element.sheet),e.rules){var n=e,i=r;if("conditional"===e.type||"keyframes"===e.type){var o=me(r,t);if(!1===(i=ge(r,n.toString({children:!1}),o)))return!1;this.refCssRule(e,o,i)}return this.insertRules(n.rules,i),i}var s=e.toString();if(!s)return!1;var a=me(r,t),c=ge(r,s,a);return!1!==c&&(this.hasInsertedRules=!0,this.refCssRule(e,a,c),c)},t.refCssRule=function(e,t,r){e.renderable=r,e.options.parent instanceof $&&this.cssRules.splice(t,0,r)},t.deleteRule=function(e){var t=this.element.sheet,r=this.indexOf(e);return-1!==r&&(t.deleteRule(r),this.cssRules.splice(r,1),!0)},t.indexOf=function(e){return this.cssRules.indexOf(e)},t.replaceRule=function(e,t){var r=this.indexOf(e);return-1!==r&&(this.element.sheet.deleteRule(r),this.cssRules.splice(r,1),this.insertRule(t,r))},t.getRules=function(){return this.element.sheet.cssRules},e}(),ve=0,be=function(){function e(e){this.id=ve++,this.version="10.9.2",this.plugins=new ee,this.options={id:{minify:!1},createGenerateId:se,Renderer:a?ye:null,plugins:[]},this.generateId=se({minify:!1});for(var t=0;t<Y.length;t++)this.plugins.use(Y[t],{queue:"internal"});this.setup(e)}var t=e.prototype;return t.setup=function(e){return void 0===e&&(e={}),e.createGenerateId&&(this.options.createGenerateId=e.createGenerateId),e.id&&(this.options.id=(0,i.Z)({},this.options.id,e.id)),(e.createGenerateId||e.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),null!=e.insertionPoint&&(this.options.insertionPoint=e.insertionPoint),"Renderer"in e&&(this.options.Renderer=e.Renderer),e.plugins&&this.use.apply(this,e.plugins),this},t.createStyleSheet=function(e,t){void 0===t&&(t={});var r=t.index;"number"!==typeof r&&(r=0===re.index?0:re.index+1);var n=new $(e,(0,i.Z)({},t,{jss:this,generateId:t.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:r}));return this.plugins.onProcessSheet(n),n},t.removeStyleSheet=function(e){return e.detach(),re.remove(e),this},t.createRule=function(e,t,r){if(void 0===t&&(t={}),void 0===r&&(r={}),"object"===typeof e)return this.createRule(void 0,e,t);var n=(0,i.Z)({},r,{name:e,jss:this,Renderer:this.options.Renderer});n.generateId||(n.generateId=this.generateId),n.classes||(n.classes={}),n.keyframes||(n.keyframes={});var o=p(e,t,n);return o&&this.plugins.onProcessRule(o),o},t.use=function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return r.forEach((function(t){e.plugins.use(t)})),this},e}(),we=function(e){return new be(e)},Ee="object"===typeof CSS&&null!=CSS&&"number"in CSS;function Se(e){var t=null;for(var r in e){var n=e[r],i=typeof n;if("function"===i)t||(t={}),t[r]=n;else if("object"===i&&null!==n&&!Array.isArray(n)){var o=Se(n);o&&(t||(t={}),t[r]=o)}}return t}we();var _e=r(9168),Ae={set:function(e,t,r,n){var i=e.get(t);i||(i=new Map,e.set(t,i)),i.set(r,n)},get:function(e,t,r){var n=e.get(t);return n?n.get(r):void 0},delete:function(e,t,r){e.get(t).delete(r)}};const ke=Ae;var Ce=r(8225),xe=r(1994),Ie=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];var Re=Date.now(),Pe="fnValues"+Re,Te="fnStyle"+ ++Re;const Ne=function(){return{onCreateRule:function(e,t,r){if("function"!==typeof t)return null;var n=p(e,{},r);return n[Te]=t,n},onProcessStyle:function(e,t){if(Pe in t||Te in t)return e;var r={};for(var n in e){var i=e[n];"function"===typeof i&&(delete e[n],r[n]=i)}return t[Pe]=r,e},onUpdate:function(e,t,r,n){var i=t,o=i[Te];o&&(i.style=o(e)||{});var s=i[Pe];if(s)for(var a in s)i.prop(a,s[a](e),n)}}};var De="@global",Oe="@global ",Me=function(){function e(e,t,r){for(var n in this.type="global",this.at=De,this.isProcessed=!1,this.key=e,this.options=r,this.rules=new X((0,i.Z)({},r,{parent:this})),t)this.rules.add(n,t[n]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,r){var n=this.rules.add(e,t,r);return n&&this.options.jss.plugins.onProcessRule(n),n},t.replaceRule=function(e,t,r){var n=this.rules.replace(e,t,r);return n&&this.options.jss.plugins.onProcessRule(n),n},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(e){return this.rules.toString(e)},e}(),Be=function(){function e(e,t,r){this.type="global",this.at=De,this.isProcessed=!1,this.key=e,this.options=r;var n=e.substr(Oe.length);this.rule=r.jss.createRule(n,t,(0,i.Z)({},r,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),Le=/\s*,\s*/g;function Ue(e,t){for(var r=e.split(Le),n="",i=0;i<r.length;i++)n+=t+" "+r[i].trim(),r[i+1]&&(n+=", ");return n}const Fe=function(){return{onCreateRule:function(e,t,r){if(!e)return null;if(e===De)return new Me(e,t,r);if("@"===e[0]&&e.substr(0,Oe.length)===Oe)return new Be(e,t,r);var n=r.parent;return n&&("global"===n.type||n.options.parent&&"global"===n.options.parent.type)&&(r.scoped=!1),r.selector||!1!==r.scoped||(r.selector=e),null},onProcessRule:function(e,t){"style"===e.type&&t&&(function(e,t){var r=e.options,n=e.style,o=n?n[De]:null;if(o){for(var s in o)t.addRule(s,o[s],(0,i.Z)({},r,{selector:Ue(s,e.selector)}));delete n[De]}}(e,t),function(e,t){var r=e.options,n=e.style;for(var o in n)if("@"===o[0]&&o.substr(0,De.length)===De){var s=Ue(o.substr(De.length),e.selector);t.addRule(s,n[o],(0,i.Z)({},r,{selector:s})),delete n[o]}}(e,t))}}};var je=/\s*,\s*/g,ze=/&/g,Ke=/\$([\w-]+)/g;const qe=function(){function e(e,t){return function(r,n){var i=e.getRule(n)||t&&t.getRule(n);return i?i.selector:n}}function t(e,t){for(var r=t.split(je),n=e.split(je),i="",o=0;o<r.length;o++)for(var s=r[o],a=0;a<n.length;a++){var c=n[a];i&&(i+=", "),i+=-1!==c.indexOf("&")?c.replace(ze,s):s+" "+c}return i}function r(e,t,r){if(r)return(0,i.Z)({},r,{index:r.index+1});var n=e.options.nestingLevel;n=void 0===n?1:n+1;var o=(0,i.Z)({},e.options,{nestingLevel:n,index:t.indexOf(e)+1});return delete o.name,o}return{onProcessStyle:function(n,o,s){if("style"!==o.type)return n;var a,c,l=o,u=l.options.parent;for(var h in n){var d=-1!==h.indexOf("&"),f="@"===h[0];if(d||f){if(a=r(l,u,a),d){var p=t(h,l.selector);c||(c=e(u,s)),p=p.replace(Ke,c);var g=l.key+"-"+h;"replaceRule"in u?u.replaceRule(g,n[h],(0,i.Z)({},a,{selector:p})):u.addRule(g,n[h],(0,i.Z)({},a,{selector:p}))}else f&&u.addRule(h,{},a).addRule(l.key,n[h],{selector:l.selector});delete n[h]}}return n}}};var Ze=/[A-Z]/g,Ve=/^ms-/,He={};function We(e){return"-"+e.toLowerCase()}const Ge=function(e){if(He.hasOwnProperty(e))return He[e];var t=e.replace(Ze,We);return He[e]=Ve.test(t)?"-"+t:t};function Ye(e){var t={};for(var r in e){t[0===r.indexOf("--")?r:Ge(r)]=e[r]}return e.fallbacks&&(Array.isArray(e.fallbacks)?t.fallbacks=e.fallbacks.map(Ye):t.fallbacks=Ye(e.fallbacks)),t}const Qe=function(){return{onProcessStyle:function(e){if(Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]=Ye(e[t]);return e}return Ye(e)},onChangeValue:function(e,t,r){if(0===t.indexOf("--"))return e;var n=Ge(t);return t===n?e:(r.prop(n,e),null)}}};var Je=Ee&&CSS?CSS.px:"px",Xe=Ee&&CSS?CSS.ms:"ms",$e=Ee&&CSS?CSS.percent:"%";function et(e){var t=/(-[a-z])/g,r=function(e){return e[1].toUpperCase()},n={};for(var i in e)n[i]=e[i],n[i.replace(t,r)]=e[i];return n}var tt=et({"animation-delay":Xe,"animation-duration":Xe,"background-position":Je,"background-position-x":Je,"background-position-y":Je,"background-size":Je,border:Je,"border-bottom":Je,"border-bottom-left-radius":Je,"border-bottom-right-radius":Je,"border-bottom-width":Je,"border-left":Je,"border-left-width":Je,"border-radius":Je,"border-right":Je,"border-right-width":Je,"border-top":Je,"border-top-left-radius":Je,"border-top-right-radius":Je,"border-top-width":Je,"border-width":Je,"border-block":Je,"border-block-end":Je,"border-block-end-width":Je,"border-block-start":Je,"border-block-start-width":Je,"border-block-width":Je,"border-inline":Je,"border-inline-end":Je,"border-inline-end-width":Je,"border-inline-start":Je,"border-inline-start-width":Je,"border-inline-width":Je,"border-start-start-radius":Je,"border-start-end-radius":Je,"border-end-start-radius":Je,"border-end-end-radius":Je,margin:Je,"margin-bottom":Je,"margin-left":Je,"margin-right":Je,"margin-top":Je,"margin-block":Je,"margin-block-end":Je,"margin-block-start":Je,"margin-inline":Je,"margin-inline-end":Je,"margin-inline-start":Je,padding:Je,"padding-bottom":Je,"padding-left":Je,"padding-right":Je,"padding-top":Je,"padding-block":Je,"padding-block-end":Je,"padding-block-start":Je,"padding-inline":Je,"padding-inline-end":Je,"padding-inline-start":Je,"mask-position-x":Je,"mask-position-y":Je,"mask-size":Je,height:Je,width:Je,"min-height":Je,"max-height":Je,"min-width":Je,"max-width":Je,bottom:Je,left:Je,top:Je,right:Je,inset:Je,"inset-block":Je,"inset-block-end":Je,"inset-block-start":Je,"inset-inline":Je,"inset-inline-end":Je,"inset-inline-start":Je,"box-shadow":Je,"text-shadow":Je,"column-gap":Je,"column-rule":Je,"column-rule-width":Je,"column-width":Je,"font-size":Je,"font-size-delta":Je,"letter-spacing":Je,"text-decoration-thickness":Je,"text-indent":Je,"text-stroke":Je,"text-stroke-width":Je,"word-spacing":Je,motion:Je,"motion-offset":Je,outline:Je,"outline-offset":Je,"outline-width":Je,perspective:Je,"perspective-origin-x":$e,"perspective-origin-y":$e,"transform-origin":$e,"transform-origin-x":$e,"transform-origin-y":$e,"transform-origin-z":$e,"transition-delay":Xe,"transition-duration":Xe,"vertical-align":Je,"flex-basis":Je,"shape-margin":Je,size:Je,gap:Je,grid:Je,"grid-gap":Je,"row-gap":Je,"grid-row-gap":Je,"grid-column-gap":Je,"grid-template-rows":Je,"grid-template-columns":Je,"grid-auto-rows":Je,"grid-auto-columns":Je,"box-shadow-x":Je,"box-shadow-y":Je,"box-shadow-blur":Je,"box-shadow-spread":Je,"font-line-height":Je,"text-shadow-x":Je,"text-shadow-y":Je,"text-shadow-blur":Je});function rt(e,t,r){if(null==t)return t;if(Array.isArray(t))for(var n=0;n<t.length;n++)t[n]=rt(e,t[n],r);else if("object"===typeof t)if("fallbacks"===e)for(var i in t)t[i]=rt(i,t[i],r);else for(var o in t)t[o]=rt(e+"-"+o,t[o],r);else if("number"===typeof t&&!1===isNaN(t)){var s=r[e]||tt[e];return!s||0===t&&s===Je?t.toString():"function"===typeof s?s(t).toString():""+t+s}return t}const nt=function(e){void 0===e&&(e={});var t=et(e);return{onProcessStyle:function(e,r){if("style"!==r.type)return e;for(var n in e)e[n]=rt(n,e[n],t);return e},onChangeValue:function(e,r){return rt(r,e,t)}}};var it=r(2982),ot="",st="",at="",ct="",lt=a&&"ontouchstart"in document.documentElement;if(a){var ut={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},ht=document.createElement("p").style;for(var dt in ut)if(dt+"Transform"in ht){ot=dt,st=ut[dt];break}"Webkit"===ot&&"msHyphens"in ht&&(ot="ms",st=ut.ms,ct="edge"),"Webkit"===ot&&"-apple-trailing-word"in ht&&(at="apple")}var ft=ot,pt=st,gt=at,mt=ct,yt=lt;var vt={noPrefill:["appearance"],supportedProperty:function(e){return"appearance"===e&&("ms"===ft?"-webkit-"+e:pt+e)}},bt={noPrefill:["color-adjust"],supportedProperty:function(e){return"color-adjust"===e&&("Webkit"===ft?pt+"print-"+e:e)}},wt=/[-\s]+(.)?/g;function Et(e,t){return t?t.toUpperCase():""}function St(e){return e.replace(wt,Et)}function _t(e){return St("-"+e)}var At,kt={noPrefill:["mask"],supportedProperty:function(e,t){if(!/^mask/.test(e))return!1;if("Webkit"===ft){var r="mask-image";if(St(r)in t)return e;if(ft+_t(r)in t)return pt+e}return e}},Ct={noPrefill:["text-orientation"],supportedProperty:function(e){return"text-orientation"===e&&("apple"!==gt||yt?e:pt+e)}},xt={noPrefill:["transform"],supportedProperty:function(e,t,r){return"transform"===e&&(r.transform?e:pt+e)}},It={noPrefill:["transition"],supportedProperty:function(e,t,r){return"transition"===e&&(r.transition?e:pt+e)}},Rt={noPrefill:["writing-mode"],supportedProperty:function(e){return"writing-mode"===e&&("Webkit"===ft||"ms"===ft&&"edge"!==mt?pt+e:e)}},Pt={noPrefill:["user-select"],supportedProperty:function(e){return"user-select"===e&&("Moz"===ft||"ms"===ft||"apple"===gt?pt+e:e)}},Tt={supportedProperty:function(e,t){return!!/^break-/.test(e)&&("Webkit"===ft?"WebkitColumn"+_t(e)in t&&pt+"column-"+e:"Moz"===ft&&("page"+_t(e)in t&&"page-"+e))}},Nt={supportedProperty:function(e,t){if(!/^(border|margin|padding)-inline/.test(e))return!1;if("Moz"===ft)return e;var r=e.replace("-inline","");return ft+_t(r)in t&&pt+r}},Dt={supportedProperty:function(e,t){return St(e)in t&&e}},Ot={supportedProperty:function(e,t){var r=_t(e);return"-"===e[0]||"-"===e[0]&&"-"===e[1]?e:ft+r in t?pt+e:"Webkit"!==ft&&"Webkit"+r in t&&"-webkit-"+e}},Mt={supportedProperty:function(e){return"scroll-snap"===e.substring(0,11)&&("ms"===ft?""+pt+e:e)}},Bt={supportedProperty:function(e){return"overscroll-behavior"===e&&("ms"===ft?pt+"scroll-chaining":e)}},Lt={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},Ut={supportedProperty:function(e,t){var r=Lt[e];return!!r&&(ft+_t(r)in t&&pt+r)}},Ft={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},jt=Object.keys(Ft),zt=function(e){return pt+e},Kt={supportedProperty:function(e,t,r){var n=r.multiple;if(jt.indexOf(e)>-1){var i=Ft[e];if(!Array.isArray(i))return ft+_t(i)in t&&pt+i;if(!n)return!1;for(var o=0;o<i.length;o++)if(!(ft+_t(i[0])in t))return!1;return i.map(zt)}return!1}},qt=[vt,bt,kt,Ct,xt,It,Rt,Pt,Tt,Nt,Dt,Ot,Mt,Bt,Ut,Kt],Zt=qt.filter((function(e){return e.supportedProperty})).map((function(e){return e.supportedProperty})),Vt=qt.filter((function(e){return e.noPrefill})).reduce((function(e,t){return e.push.apply(e,(0,it.Z)(t.noPrefill)),e}),[]),Ht={};if(a){At=document.createElement("p");var Wt=window.getComputedStyle(document.documentElement,"");for(var Gt in Wt)isNaN(Gt)||(Ht[Wt[Gt]]=Wt[Gt]);Vt.forEach((function(e){return delete Ht[e]}))}function Yt(e,t){if(void 0===t&&(t={}),!At)return e;if(null!=Ht[e])return Ht[e];"transition"!==e&&"transform"!==e||(t[e]=e in At.style);for(var r=0;r<Zt.length&&(Ht[e]=Zt[r](e,At.style,t),!Ht[e]);r++);try{At.style[e]=""}catch(n){return!1}return Ht[e]}var Qt,Jt={},Xt={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},$t=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;function er(e,t,r){if("var"===t)return"var";if("all"===t)return"all";if("all"===r)return", all";var n=t?Yt(t):", "+Yt(r);return n||(t||r)}function tr(e,t){var r=t;if(!Qt||"content"===e)return t;if("string"!==typeof r||!isNaN(parseInt(r,10)))return r;var n=e+r;if(null!=Jt[n])return Jt[n];try{Qt.style[e]=r}catch(i){return Jt[n]=!1,!1}if(Xt[e])r=r.replace($t,er);else if(""===Qt.style[e]&&("-ms-flex"===(r=pt+r)&&(Qt.style[e]="-ms-flexbox"),Qt.style[e]=r,""===Qt.style[e]))return Jt[n]=!1,!1;return Qt.style[e]="",Jt[n]=r,Jt[n]}a&&(Qt=document.createElement("p"));const rr=function(){function e(t){for(var r in t){var n=t[r];if("fallbacks"===r&&Array.isArray(n))t[r]=n.map(e);else{var i=!1,o=Yt(r);o&&o!==r&&(i=!0);var s=!1,a=tr(o,m(n));a&&a!==n&&(s=!0),(i||s)&&(i&&delete t[r],t[o||r]=a||n)}}return t}return{onProcessRule:function(e){if("keyframes"===e.type){var t=e;t.at=function(e){return"-"===e[1]||"ms"===ft?e:"@"+pt+"keyframes"+e.substr(10)}(t.at)}},onProcessStyle:function(t,r){return"style"!==r.type?t:e(t)},onChangeValue:function(e,t){return tr(t,m(e))||e}}};const nr=function(){var e=function(e,t){return e.length===t.length?e>t?1:-1:e.length-t.length};return{onProcessStyle:function(t,r){if("style"!==r.type)return t;for(var n={},i=Object.keys(t).sort(e),o=0;o<i.length;o++)n[i[o]]=t[i[o]];return n}}};var ir=we({plugins:[Ne(),Fe(),qe(),Qe(),nt(),"undefined"===typeof window?null:rr(),nr()]}),or=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.disableGlobal,r=void 0!==t&&t,n=e.productionPrefix,i=void 0===n?"jss":n,o=e.seed,s=void 0===o?"":o,a=""===s?"":"".concat(s,"-"),c=0,l=function(){return c+=1};return function(e,t){var n=t.options.name;if(n&&0===n.indexOf("Mui")&&!t.options.link&&!r){if(-1!==Ie.indexOf(e.key))return"Mui-".concat(e.key);var o="".concat(a).concat(n,"-").concat(e.key);return t.options.theme[xe.Z]&&""===s?"".concat(o,"-").concat(l()):o}return"".concat(a).concat(i).concat(l())}}(),sr={disableGeneration:!1,generateClassName:or,jss:ir,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},ar=o.createContext(sr);var cr=-1e9;function lr(){return cr+=1}var ur=r(8272);function hr(e){var t="function"===typeof e;return{create:function(r,n){var o;try{o=t?e(r):e}catch(c){throw c}if(!n||!r.overrides||!r.overrides[n])return o;var s=r.overrides[n],a=(0,i.Z)({},o);return Object.keys(s).forEach((function(e){a[e]=(0,ur.Z)(a[e],s[e])})),a},options:{}}}const dr={};function fr(e,t,r){var n=e.state;if(e.stylesOptions.disableGeneration)return t||{};n.cacheClasses||(n.cacheClasses={value:null,lastProp:null,lastJSS:{}});var i=!1;return n.classes!==n.cacheClasses.lastJSS&&(n.cacheClasses.lastJSS=n.classes,i=!0),t!==n.cacheClasses.lastProp&&(n.cacheClasses.lastProp=t,i=!0),i&&(n.cacheClasses.value=(0,_e.Z)({baseClasses:n.cacheClasses.lastJSS,newClasses:t,Component:r})),n.cacheClasses.value}function pr(e,t){var r=e.state,n=e.theme,o=e.stylesOptions,s=e.stylesCreator,a=e.name;if(!o.disableGeneration){var c=ke.get(o.sheetsManager,s,n);c||(c={refs:0,staticSheet:null,dynamicStyles:null},ke.set(o.sheetsManager,s,n,c));var l=(0,i.Z)({},s.options,o,{theme:n,flip:"boolean"===typeof o.flip?o.flip:"rtl"===n.direction});l.generateId=l.serverGenerateClassName||l.generateClassName;var u=o.sheetsRegistry;if(0===c.refs){var h;o.sheetsCache&&(h=ke.get(o.sheetsCache,s,n));var d=s.create(n,a);h||((h=o.jss.createStyleSheet(d,(0,i.Z)({link:!1},l))).attach(),o.sheetsCache&&ke.set(o.sheetsCache,s,n,h)),u&&u.add(h),c.staticSheet=h,c.dynamicStyles=Se(d)}if(c.dynamicStyles){var f=o.jss.createStyleSheet(c.dynamicStyles,(0,i.Z)({link:!0},l));f.update(t),f.attach(),r.dynamicSheet=f,r.classes=(0,_e.Z)({baseClasses:c.staticSheet.classes,newClasses:f.classes}),u&&u.add(f)}else r.classes=c.staticSheet.classes;c.refs+=1}}function gr(e,t){var r=e.state;r.dynamicSheet&&r.dynamicSheet.update(t)}function mr(e){var t=e.state,r=e.theme,n=e.stylesOptions,i=e.stylesCreator;if(!n.disableGeneration){var o=ke.get(n.sheetsManager,i,r);o.refs-=1;var s=n.sheetsRegistry;0===o.refs&&(ke.delete(n.sheetsManager,i,r),n.jss.removeStyleSheet(o.staticSheet),s&&s.remove(o.staticSheet)),t.dynamicSheet&&(n.jss.removeStyleSheet(t.dynamicSheet),s&&s.remove(t.dynamicSheet))}}function yr(e,t){var r,n=o.useRef([]),i=o.useMemo((function(){return{}}),t);n.current!==i&&(n.current=i,r=e()),o.useEffect((function(){return function(){r&&r()}}),[i])}function vr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.name,s=t.classNamePrefix,a=t.Component,c=t.defaultTheme,l=void 0===c?dr:c,u=(0,n.Z)(t,["name","classNamePrefix","Component","defaultTheme"]),h=hr(e),d=r||s||"makeStyles";h.options={index:lr(),name:r,meta:d,classNamePrefix:d};var f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,Ce.Z)()||l,n=(0,i.Z)({},o.useContext(ar),u),s=o.useRef(),c=o.useRef();yr((function(){var i={name:r,state:{},stylesCreator:h,stylesOptions:n,theme:t};return pr(i,e),c.current=!1,s.current=i,function(){mr(i)}}),[t,h]),o.useEffect((function(){c.current&&gr(s.current,e),c.current=!0}));var d=fr(s.current,e.classes,a);return d};return f}},9168:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(7462);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.baseClasses,r=e.newClasses;e.Component;if(!r)return t;var i=(0,n.Z)({},t);return Object.keys(r).forEach((function(e){r[e]&&(i[e]="".concat(t[e]," ").concat(r[e]))})),i}},3203:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=r(7313).createContext(null)},8225:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(7313),i=r(3203);function o(){return n.useContext(i.Z)}},8272:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(7462),i=r(1002);function o(e){return e&&"object"===(0,i.Z)(e)&&e.constructor===Object}function s(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},i=r.clone?(0,n.Z)({},e):e;return o(e)&&o(t)&&Object.keys(t).forEach((function(n){"__proto__"!==n&&(o(t[n])&&n in e?i[n]=s(e[n],t[n],r):i[n]=t[n])})),i}},803:(e,t,r)=>{"use strict";function n(e){for(var t="https://mui.com/production-error/?code="+e,r=1;r<arguments.length;r+=1)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified Material-UI error #"+e+"; visit "+t+" for the full message."}r.d(t,{Z:()=>n})},7223:e=>{"use strict";e.exports=function(e,t){var r=new Array(arguments.length-1),n=0,i=2,o=!0;for(;i<arguments.length;)r[n++]=arguments[i++];return new Promise((function(i,s){r[n]=function(e){if(o)if(o=!1,e)s(e);else{for(var t=new Array(arguments.length-1),r=0;r<t.length;)t[r++]=arguments[r];i.apply(null,t)}};try{e.apply(t||null,r)}catch(a){o&&(o=!1,s(a))}}))}},1938:(e,t)=>{"use strict";var r=t;r.length=function(e){var t=e.length;if(!t)return 0;for(var r=0;--t%4>1&&"="===e.charAt(t);)++r;return Math.ceil(3*e.length)/4-r};for(var n=new Array(64),i=new Array(123),o=0;o<64;)i[n[o]=o<26?o+65:o<52?o+71:o<62?o-4:o-59|43]=o++;r.encode=function(e,t,r){for(var i,o=null,s=[],a=0,c=0;t<r;){var l=e[t++];switch(c){case 0:s[a++]=n[l>>2],i=(3&l)<<4,c=1;break;case 1:s[a++]=n[i|l>>4],i=(15&l)<<2,c=2;break;case 2:s[a++]=n[i|l>>6],s[a++]=n[63&l],c=0}a>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,s)),a=0)}return c&&(s[a++]=n[i],s[a++]=61,1===c&&(s[a++]=61)),o?(a&&o.push(String.fromCharCode.apply(String,s.slice(0,a))),o.join("")):String.fromCharCode.apply(String,s.slice(0,a))};var s="invalid encoding";r.decode=function(e,t,r){for(var n,o=r,a=0,c=0;c<e.length;){var l=e.charCodeAt(c++);if(61===l&&a>1)break;if(void 0===(l=i[l]))throw Error(s);switch(a){case 0:n=l,a=1;break;case 1:t[r++]=n<<2|(48&l)>>4,n=l,a=2;break;case 2:t[r++]=(15&n)<<4|(60&l)>>2,n=l,a=3;break;case 3:t[r++]=(3&n)<<6|l,a=0}}if(1===a)throw Error(s);return r-o},r.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},7857:e=>{"use strict";function t(e,r){"string"===typeof e&&(r=e,e=void 0);var n=[];function i(e){if("string"!==typeof e){var r=o();if(t.verbose&&console.log("codegen: "+r),r="return "+r,e){for(var s=Object.keys(e),a=new Array(s.length+1),c=new Array(s.length),l=0;l<s.length;)a[l]=s[l],c[l]=e[s[l++]];return a[l]=r,Function.apply(null,a).apply(null,c)}return Function(r)()}for(var u=new Array(arguments.length-1),h=0;h<u.length;)u[h]=arguments[++h];if(h=0,e=e.replace(/%([%dfijs])/g,(function(e,t){var r=u[h++];switch(t){case"d":case"f":return String(Number(r));case"i":return String(Math.floor(r));case"j":return JSON.stringify(r);case"s":return String(r)}return"%"})),h!==u.length)throw Error("parameter count mismatch");return n.push(e),i}function o(t){return"function "+(t||r||"")+"("+(e&&e.join(",")||"")+"){\n "+n.join("\n ")+"\n}"}return i.toString=o,i}e.exports=t,t.verbose=!1},6597:e=>{"use strict";function t(){this._listeners={}}e.exports=t,t.prototype.on=function(e,t,r){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:r||this}),this},t.prototype.off=function(e,t){if(void 0===e)this._listeners={};else if(void 0===t)this._listeners[e]=[];else for(var r=this._listeners[e],n=0;n<r.length;)r[n].fn===t?r.splice(n,1):++n;return this},t.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var r=[],n=1;n<arguments.length;)r.push(arguments[n++]);for(n=0;n<t.length;)t[n].fn.apply(t[n++].ctx,r)}return this}},8774:(e,t,r)=>{"use strict";e.exports=o;var n=r(7223),i=r(7640)("fs");function o(e,t,r){return"function"===typeof t?(r=t,t={}):t||(t={}),r?!t.xhr&&i&&i.readFile?i.readFile(e,(function(n,i){return n&&"undefined"!==typeof XMLHttpRequest?o.xhr(e,t,r):n?r(n):r(null,t.binary?i:i.toString("utf8"))})):o.xhr(e,t,r):n(o,this,e,t)}o.xhr=function(e,t,r){var n=new XMLHttpRequest;n.onreadystatechange=function(){if(4===n.readyState){if(0!==n.status&&200!==n.status)return r(Error("status "+n.status));if(t.binary){var e=n.response;if(!e){e=[];for(var i=0;i<n.responseText.length;++i)e.push(255&n.responseText.charCodeAt(i))}return r(null,"undefined"!==typeof Uint8Array?new Uint8Array(e):e)}return r(null,n.responseText)}},t.binary&&("overrideMimeType"in n&&n.overrideMimeType("text/plain; charset=x-user-defined"),n.responseType="arraybuffer"),n.open("GET",e),n.send()}},2678:e=>{"use strict";function t(e){return"undefined"!==typeof Float32Array?function(){var t=new Float32Array([-0]),r=new Uint8Array(t.buffer),n=128===r[3];function i(e,n,i){t[0]=e,n[i]=r[0],n[i+1]=r[1],n[i+2]=r[2],n[i+3]=r[3]}function o(e,n,i){t[0]=e,n[i]=r[3],n[i+1]=r[2],n[i+2]=r[1],n[i+3]=r[0]}function s(e,n){return r[0]=e[n],r[1]=e[n+1],r[2]=e[n+2],r[3]=e[n+3],t[0]}function a(e,n){return r[3]=e[n],r[2]=e[n+1],r[1]=e[n+2],r[0]=e[n+3],t[0]}e.writeFloatLE=n?i:o,e.writeFloatBE=n?o:i,e.readFloatLE=n?s:a,e.readFloatBE=n?a:s}():function(){function t(e,t,r,n){var i=t<0?1:0;if(i&&(t=-t),0===t)e(1/t>0?0:2147483648,r,n);else if(isNaN(t))e(2143289344,r,n);else if(t>34028234663852886e22)e((i<<31|2139095040)>>>0,r,n);else if(t<11754943508222875e-54)e((i<<31|Math.round(t/1401298464324817e-60))>>>0,r,n);else{var o=Math.floor(Math.log(t)/Math.LN2);e((i<<31|o+127<<23|8388607&Math.round(t*Math.pow(2,-o)*8388608))>>>0,r,n)}}function s(e,t,r){var n=e(t,r),i=2*(n>>31)+1,o=n>>>23&255,s=8388607&n;return 255===o?s?NaN:i*(1/0):0===o?1401298464324817e-60*i*s:i*Math.pow(2,o-150)*(s+8388608)}e.writeFloatLE=t.bind(null,r),e.writeFloatBE=t.bind(null,n),e.readFloatLE=s.bind(null,i),e.readFloatBE=s.bind(null,o)}(),"undefined"!==typeof Float64Array?function(){var t=new Float64Array([-0]),r=new Uint8Array(t.buffer),n=128===r[7];function i(e,n,i){t[0]=e,n[i]=r[0],n[i+1]=r[1],n[i+2]=r[2],n[i+3]=r[3],n[i+4]=r[4],n[i+5]=r[5],n[i+6]=r[6],n[i+7]=r[7]}function o(e,n,i){t[0]=e,n[i]=r[7],n[i+1]=r[6],n[i+2]=r[5],n[i+3]=r[4],n[i+4]=r[3],n[i+5]=r[2],n[i+6]=r[1],n[i+7]=r[0]}function s(e,n){return r[0]=e[n],r[1]=e[n+1],r[2]=e[n+2],r[3]=e[n+3],r[4]=e[n+4],r[5]=e[n+5],r[6]=e[n+6],r[7]=e[n+7],t[0]}function a(e,n){return r[7]=e[n],r[6]=e[n+1],r[5]=e[n+2],r[4]=e[n+3],r[3]=e[n+4],r[2]=e[n+5],r[1]=e[n+6],r[0]=e[n+7],t[0]}e.writeDoubleLE=n?i:o,e.writeDoubleBE=n?o:i,e.readDoubleLE=n?s:a,e.readDoubleBE=n?a:s}():function(){function t(e,t,r,n,i,o){var s=n<0?1:0;if(s&&(n=-n),0===n)e(0,i,o+t),e(1/n>0?0:2147483648,i,o+r);else if(isNaN(n))e(0,i,o+t),e(2146959360,i,o+r);else if(n>17976931348623157e292)e(0,i,o+t),e((s<<31|2146435072)>>>0,i,o+r);else{var a;if(n<22250738585072014e-324)e((a=n/5e-324)>>>0,i,o+t),e((s<<31|a/4294967296)>>>0,i,o+r);else{var c=Math.floor(Math.log(n)/Math.LN2);1024===c&&(c=1023),e(4503599627370496*(a=n*Math.pow(2,-c))>>>0,i,o+t),e((s<<31|c+1023<<20|1048576*a&1048575)>>>0,i,o+r)}}}function s(e,t,r,n,i){var o=e(n,i+t),s=e(n,i+r),a=2*(s>>31)+1,c=s>>>20&2047,l=4294967296*(1048575&s)+o;return 2047===c?l?NaN:a*(1/0):0===c?5e-324*a*l:a*Math.pow(2,c-1075)*(l+4503599627370496)}e.writeDoubleLE=t.bind(null,r,0,4),e.writeDoubleBE=t.bind(null,n,4,0),e.readDoubleLE=s.bind(null,i,0,4),e.readDoubleBE=s.bind(null,o,4,0)}(),e}function r(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}function n(e,t,r){t[r]=e>>>24,t[r+1]=e>>>16&255,t[r+2]=e>>>8&255,t[r+3]=255&e}function i(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function o(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}e.exports=t(t)},7640:module=>{"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},8464:(e,t)=>{"use strict";var r=t,n=r.isAbsolute=function(e){return/^(?:\/|\w+:)/.test(e)},i=r.normalize=function(e){var t=(e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/")).split("/"),r=n(e),i="";r&&(i=t.shift()+"/");for(var o=0;o<t.length;)".."===t[o]?o>0&&".."!==t[o-1]?t.splice(--o,2):r?t.splice(o,1):++o:"."===t[o]?t.splice(o,1):++o;return i+t.join("/")};r.resolve=function(e,t,r){return r||(t=i(t)),n(t)?t:(r||(e=i(e)),(e=e.replace(/(?:\/|^)[^/]+$/,"")).length?i(e+"/"+t):t)}},110:e=>{"use strict";e.exports=function(e,t,r){var n=r||8192,i=n>>>1,o=null,s=n;return function(r){if(r<1||r>i)return e(r);s+r>n&&(o=e(n),s=0);var a=t.call(o,s,s+=r);return 7&s&&(s=1+(7|s)),a}}},2842:(e,t)=>{"use strict";var r=t;r.length=function(e){for(var t=0,r=0,n=0;n<e.length;++n)(r=e.charCodeAt(n))<128?t+=1:r<2048?t+=2:55296===(64512&r)&&56320===(64512&e.charCodeAt(n+1))?(++n,t+=4):t+=3;return t},r.read=function(e,t,r){if(r-t<1)return"";for(var n,i=null,o=[],s=0;t<r;)(n=e[t++])<128?o[s++]=n:n>191&&n<224?o[s++]=(31&n)<<6|63&e[t++]:n>239&&n<365?(n=((7&n)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,o[s++]=55296+(n>>10),o[s++]=56320+(1023&n)):o[s++]=(15&n)<<12|(63&e[t++])<<6|63&e[t++],s>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,o)),s=0);return i?(s&&i.push(String.fromCharCode.apply(String,o.slice(0,s))),i.join("")):String.fromCharCode.apply(String,o.slice(0,s))},r.write=function(e,t,r){for(var n,i,o=r,s=0;s<e.length;++s)(n=e.charCodeAt(s))<128?t[r++]=n:n<2048?(t[r++]=n>>6|192,t[r++]=63&n|128):55296===(64512&n)&&56320===(64512&(i=e.charCodeAt(s+1)))?(n=65536+((1023&n)<<10)+(1023&i),++s,t[r++]=n>>18|240,t[r++]=n>>12&63|128,t[r++]=n>>6&63|128,t[r++]=63&n|128):(t[r++]=n>>12|224,t[r++]=n>>6&63|128,t[r++]=63&n|128);return r-o}},7532:function(e){"use strict";!function(t){function r(e){return parseInt(e)===e}function n(e){if(!r(e.length))return!1;for(var t=0;t<e.length;t++)if(!r(e[t])||e[t]<0||e[t]>255)return!1;return!0}function i(e,t){if(e.buffer&&ArrayBuffer.isView(e)&&"Uint8Array"===e.name)return t&&(e=e.slice?e.slice():Array.prototype.slice.call(e)),e;if(Array.isArray(e)){if(!n(e))throw new Error("Array contains invalid value: "+e);return new Uint8Array(e)}if(r(e.length)&&n(e))return new Uint8Array(e);throw new Error("unsupported array-like object")}function o(e){return new Uint8Array(e)}function s(e,t,r,n,i){null==n&&null==i||(e=e.slice?e.slice(n,i):Array.prototype.slice.call(e,n,i)),t.set(e,r)}var a={toBytes:function(e){var t=[],r=0;for(e=encodeURI(e);r<e.length;){var n=e.charCodeAt(r++);37===n?(t.push(parseInt(e.substr(r,2),16)),r+=2):t.push(n)}return i(t)},fromBytes:function(e){for(var t=[],r=0;r<e.length;){var n=e[r];n<128?(t.push(String.fromCharCode(n)),r++):n>191&&n<224?(t.push(String.fromCharCode((31&n)<<6|63&e[r+1])),r+=2):(t.push(String.fromCharCode((15&n)<<12|(63&e[r+1])<<6|63&e[r+2])),r+=3)}return t.join("")}},c=function(){var e="0123456789abcdef";return{toBytes:function(e){for(var t=[],r=0;r<e.length;r+=2)t.push(parseInt(e.substr(r,2),16));return t},fromBytes:function(t){for(var r=[],n=0;n<t.length;n++){var i=t[n];r.push(e[(240&i)>>4]+e[15&i])}return r.join("")}}}(),l={16:10,24:12,32:14},u=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],h=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],d=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],f=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],p=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],g=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],m=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],y=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],v=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],b=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],w=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],E=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],S=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],_=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],A=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function k(e){for(var t=[],r=0;r<e.length;r+=4)t.push(e[r]<<24|e[r+1]<<16|e[r+2]<<8|e[r+3]);return t}var C=function(e){if(!(this instanceof C))throw Error("AES must be instanitated with `new`");Object.defineProperty(this,"key",{value:i(e,!0)}),this._prepare()};C.prototype._prepare=function(){var e=l[this.key.length];if(null==e)throw new Error("invalid key size (must be 16, 24 or 32 bytes)");this._Ke=[],this._Kd=[];for(var t=0;t<=e;t++)this._Ke.push([0,0,0,0]),this._Kd.push([0,0,0,0]);var r,n=4*(e+1),i=this.key.length/4,o=k(this.key);for(t=0;t<i;t++)r=t>>2,this._Ke[r][t%4]=o[t],this._Kd[e-r][t%4]=o[t];for(var s,a=0,c=i;c<n;){if(s=o[i-1],o[0]^=h[s>>16&255]<<24^h[s>>8&255]<<16^h[255&s]<<8^h[s>>24&255]^u[a]<<24,a+=1,8!=i)for(t=1;t<i;t++)o[t]^=o[t-1];else{for(t=1;t<i/2;t++)o[t]^=o[t-1];s=o[i/2-1],o[i/2]^=h[255&s]^h[s>>8&255]<<8^h[s>>16&255]<<16^h[s>>24&255]<<24;for(t=i/2+1;t<i;t++)o[t]^=o[t-1]}for(t=0;t<i&&c<n;)d=c>>2,f=c%4,this._Ke[d][f]=o[t],this._Kd[e-d][f]=o[t++],c++}for(var d=1;d<e;d++)for(var f=0;f<4;f++)s=this._Kd[d][f],this._Kd[d][f]=E[s>>24&255]^S[s>>16&255]^_[s>>8&255]^A[255&s]},C.prototype.encrypt=function(e){if(16!=e.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var t=this._Ke.length-1,r=[0,0,0,0],n=k(e),i=0;i<4;i++)n[i]^=this._Ke[0][i];for(var s=1;s<t;s++){for(i=0;i<4;i++)r[i]=f[n[i]>>24&255]^p[n[(i+1)%4]>>16&255]^g[n[(i+2)%4]>>8&255]^m[255&n[(i+3)%4]]^this._Ke[s][i];n=r.slice()}var a,c=o(16);for(i=0;i<4;i++)a=this._Ke[t][i],c[4*i]=255&(h[n[i]>>24&255]^a>>24),c[4*i+1]=255&(h[n[(i+1)%4]>>16&255]^a>>16),c[4*i+2]=255&(h[n[(i+2)%4]>>8&255]^a>>8),c[4*i+3]=255&(h[255&n[(i+3)%4]]^a);return c},C.prototype.decrypt=function(e){if(16!=e.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var t=this._Kd.length-1,r=[0,0,0,0],n=k(e),i=0;i<4;i++)n[i]^=this._Kd[0][i];for(var s=1;s<t;s++){for(i=0;i<4;i++)r[i]=y[n[i]>>24&255]^v[n[(i+3)%4]>>16&255]^b[n[(i+2)%4]>>8&255]^w[255&n[(i+1)%4]]^this._Kd[s][i];n=r.slice()}var a,c=o(16);for(i=0;i<4;i++)a=this._Kd[t][i],c[4*i]=255&(d[n[i]>>24&255]^a>>24),c[4*i+1]=255&(d[n[(i+3)%4]>>16&255]^a>>16),c[4*i+2]=255&(d[n[(i+2)%4]>>8&255]^a>>8),c[4*i+3]=255&(d[255&n[(i+1)%4]]^a);return c};var x=function(e){if(!(this instanceof x))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new C(e)};x.prototype.encrypt=function(e){if((e=i(e)).length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=o(e.length),r=o(16),n=0;n<e.length;n+=16)s(e,r,0,n,n+16),s(r=this._aes.encrypt(r),t,n);return t},x.prototype.decrypt=function(e){if((e=i(e)).length%16!==0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var t=o(e.length),r=o(16),n=0;n<e.length;n+=16)s(e,r,0,n,n+16),s(r=this._aes.decrypt(r),t,n);return t};var I=function(e,t){if(!(this instanceof I))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Block Chaining",this.name="cbc",t){if(16!=t.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else t=o(16);this._lastCipherblock=i(t,!0),this._aes=new C(e)};I.prototype.encrypt=function(e){if((e=i(e)).length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=o(e.length),r=o(16),n=0;n<e.length;n+=16){s(e,r,0,n,n+16);for(var a=0;a<16;a++)r[a]^=this._lastCipherblock[a];this._lastCipherblock=this._aes.encrypt(r),s(this._lastCipherblock,t,n)}return t},I.prototype.decrypt=function(e){if((e=i(e)).length%16!==0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var t=o(e.length),r=o(16),n=0;n<e.length;n+=16){s(e,r,0,n,n+16),r=this._aes.decrypt(r);for(var a=0;a<16;a++)t[n+a]=r[a]^this._lastCipherblock[a];s(e,this._lastCipherblock,0,n,n+16)}return t};var R=function(e,t,r){if(!(this instanceof R))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Feedback",this.name="cfb",t){if(16!=t.length)throw new Error("invalid initialation vector size (must be 16 size)")}else t=o(16);r||(r=1),this.segmentSize=r,this._shiftRegister=i(t,!0),this._aes=new C(e)};R.prototype.encrypt=function(e){if(e.length%this.segmentSize!=0)throw new Error("invalid plaintext size (must be segmentSize bytes)");for(var t,r=i(e,!0),n=0;n<r.length;n+=this.segmentSize){t=this._aes.encrypt(this._shiftRegister);for(var o=0;o<this.segmentSize;o++)r[n+o]^=t[o];s(this._shiftRegister,this._shiftRegister,0,this.segmentSize),s(r,this._shiftRegister,16-this.segmentSize,n,n+this.segmentSize)}return r},R.prototype.decrypt=function(e){if(e.length%this.segmentSize!=0)throw new Error("invalid ciphertext size (must be segmentSize bytes)");for(var t,r=i(e,!0),n=0;n<r.length;n+=this.segmentSize){t=this._aes.encrypt(this._shiftRegister);for(var o=0;o<this.segmentSize;o++)r[n+o]^=t[o];s(this._shiftRegister,this._shiftRegister,0,this.segmentSize),s(e,this._shiftRegister,16-this.segmentSize,n,n+this.segmentSize)}return r};var P=function(e,t){if(!(this instanceof P))throw Error("AES must be instanitated with `new`");if(this.description="Output Feedback",this.name="ofb",t){if(16!=t.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else t=o(16);this._lastPrecipher=i(t,!0),this._lastPrecipherIndex=16,this._aes=new C(e)};P.prototype.encrypt=function(e){for(var t=i(e,!0),r=0;r<t.length;r++)16===this._lastPrecipherIndex&&(this._lastPrecipher=this._aes.encrypt(this._lastPrecipher),this._lastPrecipherIndex=0),t[r]^=this._lastPrecipher[this._lastPrecipherIndex++];return t},P.prototype.decrypt=P.prototype.encrypt;var T=function(e){if(!(this instanceof T))throw Error("Counter must be instanitated with `new`");0===e||e||(e=1),"number"===typeof e?(this._counter=o(16),this.setValue(e)):this.setBytes(e)};T.prototype.setValue=function(e){if("number"!==typeof e||parseInt(e)!=e)throw new Error("invalid counter value (must be an integer)");for(var t=15;t>=0;--t)this._counter[t]=e%256,e>>=8},T.prototype.setBytes=function(e){if(16!=(e=i(e,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=e},T.prototype.increment=function(){for(var e=15;e>=0;e--){if(255!==this._counter[e]){this._counter[e]++;break}this._counter[e]=0}};var N=function(e,t){if(!(this instanceof N))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",t instanceof T||(t=new T(t)),this._counter=t,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new C(e)};N.prototype.encrypt=function(e){for(var t=i(e,!0),r=0;r<t.length;r++)16===this._remainingCounterIndex&&(this._remainingCounter=this._aes.encrypt(this._counter._counter),this._remainingCounterIndex=0,this._counter.increment()),t[r]^=this._remainingCounter[this._remainingCounterIndex++];return t},N.prototype.decrypt=N.prototype.encrypt;var D={AES:C,Counter:T,ModeOfOperation:{ecb:x,cbc:I,cfb:R,ofb:P,ctr:N},utils:{hex:c,utf8:a},padding:{pkcs7:{pad:function(e){var t=16-(e=i(e,!0)).length%16,r=o(e.length+t);s(e,r);for(var n=e.length;n<r.length;n++)r[n]=t;return r},strip:function(e){if((e=i(e,!0)).length<16)throw new Error("PKCS#7 invalid length");var t=e[e.length-1];if(t>16)throw new Error("PKCS#7 padding byte out of range");for(var r=e.length-t,n=0;n<t;n++)if(e[r+n]!==t)throw new Error("PKCS#7 invalid padding byte");var a=o(r);return s(e,a,0,0,r),a}}},_arrayTest:{coerceArray:i,createArray:o,copyArray:s}};e.exports=D}()},5109:e=>{"use strict";for(var t="qpzry9x8gf2tvdw0s3jn54khce6mua7l",r={},n=0;n<t.length;n++){var i=t.charAt(n);if(void 0!==r[i])throw new TypeError(i+" is ambiguous");r[i]=n}function o(e){var t=e>>25;return(33554431&e)<<5^996825010&-(t>>0&1)^642813549&-(t>>1&1)^513874426&-(t>>2&1)^1027748829&-(t>>3&1)^705979059&-(t>>4&1)}function s(e){for(var t=1,r=0;r<e.length;++r){var n=e.charCodeAt(r);if(n<33||n>126)return"Invalid prefix ("+e+")";t=o(t)^n>>5}for(t=o(t),r=0;r<e.length;++r){var i=e.charCodeAt(r);t=o(t)^31&i}return t}function a(e,t){if(t=t||90,e.length<8)return e+" too short";if(e.length>t)return"Exceeds length limit";var n=e.toLowerCase(),i=e.toUpperCase();if(e!==n&&e!==i)return"Mixed-case string "+e;var a=(e=n).lastIndexOf("1");if(-1===a)return"No separator character for "+e;if(0===a)return"Missing prefix for "+e;var c=e.slice(0,a),l=e.slice(a+1);if(l.length<6)return"Data too short";var u=s(c);if("string"===typeof u)return u;for(var h=[],d=0;d<l.length;++d){var f=l.charAt(d),p=r[f];if(void 0===p)return"Unknown character "+f;u=o(u)^p,d+6>=l.length||h.push(p)}return 1!==u?"Invalid checksum for "+e:{prefix:c,words:h}}function c(e,t,r,n){for(var i=0,o=0,s=(1<<r)-1,a=[],c=0;c<e.length;++c)for(i=i<<t|e[c],o+=t;o>=r;)o-=r,a.push(i>>o&s);if(n)o>0&&a.push(i<<r-o&s);else{if(o>=t)return"Excess padding";if(i<<r-o&s)return"Non-zero padding"}return a}e.exports={decodeUnsafe:function(){var e=a.apply(null,arguments);if("object"===typeof e)return e},decode:function(e){var t=a.apply(null,arguments);if("object"===typeof t)return t;throw new Error(t)},encode:function(e,r,n){if(n=n||90,e.length+7+r.length>n)throw new TypeError("Exceeds length limit");var i=s(e=e.toLowerCase());if("string"===typeof i)throw new Error(i);for(var a=e+"1",c=0;c<r.length;++c){var l=r[c];if(l>>5!==0)throw new Error("Non 5-bit word");i=o(i)^l,a+=t.charAt(l)}for(c=0;c<6;++c)i=o(i);for(i^=1,c=0;c<6;++c){a+=t.charAt(i>>5*(5-c)&31)}return a},toWordsUnsafe:function(e){var t=c(e,8,5,!0);if(Array.isArray(t))return t},toWords:function(e){var t=c(e,8,5,!0);if(Array.isArray(t))return t;throw new Error(t)},fromWordsUnsafe:function(e){var t=c(e,5,8,!1);if(Array.isArray(t))return t},fromWords:function(e){var t=c(e,5,8,!1);if(Array.isArray(t))return t;throw new Error(t)}}},4166: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 s;"object"===typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(6601).Buffer}catch(I){}function a(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 c(e,t,r){var n=a(e,r);return r-1>=t&&(n|=a(e,r-1)<<4),n}function l(e,t,r,i){for(var o=0,s=0,a=Math.min(e.length,r),c=t;c<a;c++){var l=e.charCodeAt(c)-48;o*=i,s=l>=49?l-49+10:l>=17?l-17+10:l,n(l>=0&&s<i,"Invalid character"),o+=s}return o}function u(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,s,a=0;if("be"===r)for(i=e.length-1,o=0;i>=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<e.length;i+=3)s=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=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,s=0;if("be"===r)for(n=e.length-1;n>=t;n-=2)i=c(e,t,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(e.length-t)%2===0?t+1:t;n<e.length;n+=2)i=c(e,t,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=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,s=o%n,a=Math.min(o,o-s)+r,c=0,u=r;u<a;u+=n)c=l(e,u,u+n,t),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==s){var h=1;for(c=l(e,u,e.length,t),u=0;u<s;u++)h*=t;this.imuln(h),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}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){u(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")]=h}catch(I){o.prototype.inspect=h}else o.prototype.inspect=h;function h(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],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];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,s=0;s<this.length;s++){var a=this.words[s],c=(16777215&(a<<i|o)).toString(16);o=a>>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==o||s!==this.length-1?d[6-c.length]+c+r:c+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 l=f[e],u=p[e];r="";var h=this.clone();for(h.negative=0;!h.isZero();){var g=h.modrn(u).toString(e);r=(h=h.idivn(u)).isZero()?g+r:d[l-g.length]+g+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)},s&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(s,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function g(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],s=i*o,a=67108863&s,c=s/67108864|0;r.words[0]=a;for(var l=1;l<n;l++){for(var u=c>>>26,h=67108863&c,d=Math.min(l,t.length-1),f=Math.max(0,l-e.length+1);f<=d;f++){var p=l-f|0;u+=(s=(i=0|e.words[p])*(o=0|t.words[f])+h)/67108864|0,h=67108863&s}r.words[l]=0|h,c=0|u}return 0!==c?r.words[l]=0|c:r.length--,r._strip()}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 s=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,i),s},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;e[r++]=255&s,r<e.length&&(e[r++]=s>>8&255),r<e.length&&(e[r++]=s>>16&255),6===o?(r<e.length&&(e[r++]=s>>24&255),n=0,o=0):(n=s>>>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 s=this.words[i]<<o|n;e[r--]=255&s,r>=0&&(e[r--]=s>>8&255),r>=0&&(e[r--]=s>>16&255),6===o?(r>=0&&(e[r--]=s>>24&255),n=0,o=0):(n=s>>>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,s=0;s<n.length;s++)o=(t=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<r.length;s++)o=(t=(0|r.words[s])+o)>>26,this.words[s]=67108863&t;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var m=function(e,t,r){var n,i,o,s=e.words,a=t.words,c=r.words,l=0,u=0|s[0],h=8191&u,d=u>>>13,f=0|s[1],p=8191&f,g=f>>>13,m=0|s[2],y=8191&m,v=m>>>13,b=0|s[3],w=8191&b,E=b>>>13,S=0|s[4],_=8191&S,A=S>>>13,k=0|s[5],C=8191&k,x=k>>>13,I=0|s[6],R=8191&I,P=I>>>13,T=0|s[7],N=8191&T,D=T>>>13,O=0|s[8],M=8191&O,B=O>>>13,L=0|s[9],U=8191&L,F=L>>>13,j=0|a[0],z=8191&j,K=j>>>13,q=0|a[1],Z=8191&q,V=q>>>13,H=0|a[2],W=8191&H,G=H>>>13,Y=0|a[3],Q=8191&Y,J=Y>>>13,X=0|a[4],$=8191&X,ee=X>>>13,te=0|a[5],re=8191&te,ne=te>>>13,ie=0|a[6],oe=8191&ie,se=ie>>>13,ae=0|a[7],ce=8191&ae,le=ae>>>13,ue=0|a[8],he=8191&ue,de=ue>>>13,fe=0|a[9],pe=8191&fe,ge=fe>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(l+(n=Math.imul(h,z))|0)+((8191&(i=(i=Math.imul(h,K))+Math.imul(d,z)|0))<<13)|0;l=((o=Math.imul(d,K))+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,K))+Math.imul(g,z)|0,o=Math.imul(g,K);var ye=(l+(n=n+Math.imul(h,Z)|0)|0)+((8191&(i=(i=i+Math.imul(h,V)|0)+Math.imul(d,Z)|0))<<13)|0;l=((o=o+Math.imul(d,V)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,z),i=(i=Math.imul(y,K))+Math.imul(v,z)|0,o=Math.imul(v,K),n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(g,Z)|0,o=o+Math.imul(g,V)|0;var ve=(l+(n=n+Math.imul(h,W)|0)|0)+((8191&(i=(i=i+Math.imul(h,G)|0)+Math.imul(d,W)|0))<<13)|0;l=((o=o+Math.imul(d,G)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(w,z),i=(i=Math.imul(w,K))+Math.imul(E,z)|0,o=Math.imul(E,K),n=n+Math.imul(y,Z)|0,i=(i=i+Math.imul(y,V)|0)+Math.imul(v,Z)|0,o=o+Math.imul(v,V)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(g,W)|0,o=o+Math.imul(g,G)|0;var be=(l+(n=n+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,J)|0)+Math.imul(d,Q)|0))<<13)|0;l=((o=o+Math.imul(d,J)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(_,z),i=(i=Math.imul(_,K))+Math.imul(A,z)|0,o=Math.imul(A,K),n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(E,Z)|0,o=o+Math.imul(E,V)|0,n=n+Math.imul(y,W)|0,i=(i=i+Math.imul(y,G)|0)+Math.imul(v,W)|0,o=o+Math.imul(v,G)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,J)|0;var we=(l+(n=n+Math.imul(h,$)|0)|0)+((8191&(i=(i=i+Math.imul(h,ee)|0)+Math.imul(d,$)|0))<<13)|0;l=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(C,z),i=(i=Math.imul(C,K))+Math.imul(x,z)|0,o=Math.imul(x,K),n=n+Math.imul(_,Z)|0,i=(i=i+Math.imul(_,V)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,V)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(E,W)|0,o=o+Math.imul(E,G)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,J)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,J)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,ee)|0;var Ee=(l+(n=n+Math.imul(h,re)|0)|0)+((8191&(i=(i=i+Math.imul(h,ne)|0)+Math.imul(d,re)|0))<<13)|0;l=((o=o+Math.imul(d,ne)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(R,z),i=(i=Math.imul(R,K))+Math.imul(P,z)|0,o=Math.imul(P,K),n=n+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,V)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,V)|0,n=n+Math.imul(_,W)|0,i=(i=i+Math.imul(_,G)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,J)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(g,re)|0,o=o+Math.imul(g,ne)|0;var Se=(l+(n=n+Math.imul(h,oe)|0)|0)+((8191&(i=(i=i+Math.imul(h,se)|0)+Math.imul(d,oe)|0))<<13)|0;l=((o=o+Math.imul(d,se)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(N,z),i=(i=Math.imul(N,K))+Math.imul(D,z)|0,o=Math.imul(D,K),n=n+Math.imul(R,Z)|0,i=(i=i+Math.imul(R,V)|0)+Math.imul(P,Z)|0,o=o+Math.imul(P,V)|0,n=n+Math.imul(C,W)|0,i=(i=i+Math.imul(C,G)|0)+Math.imul(x,W)|0,o=o+Math.imul(x,G)|0,n=n+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,J)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,J)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,ee)|0,n=n+Math.imul(y,re)|0,i=(i=i+Math.imul(y,ne)|0)+Math.imul(v,re)|0,o=o+Math.imul(v,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,se)|0)+Math.imul(g,oe)|0,o=o+Math.imul(g,se)|0;var _e=(l+(n=n+Math.imul(h,ce)|0)|0)+((8191&(i=(i=i+Math.imul(h,le)|0)+Math.imul(d,ce)|0))<<13)|0;l=((o=o+Math.imul(d,le)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(M,z),i=(i=Math.imul(M,K))+Math.imul(B,z)|0,o=Math.imul(B,K),n=n+Math.imul(N,Z)|0,i=(i=i+Math.imul(N,V)|0)+Math.imul(D,Z)|0,o=o+Math.imul(D,V)|0,n=n+Math.imul(R,W)|0,i=(i=i+Math.imul(R,G)|0)+Math.imul(P,W)|0,o=o+Math.imul(P,G)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,J)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,J)|0,n=n+Math.imul(_,$)|0,i=(i=i+Math.imul(_,ee)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(E,re)|0,o=o+Math.imul(E,ne)|0,n=n+Math.imul(y,oe)|0,i=(i=i+Math.imul(y,se)|0)+Math.imul(v,oe)|0,o=o+Math.imul(v,se)|0,n=n+Math.imul(p,ce)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(g,ce)|0,o=o+Math.imul(g,le)|0;var Ae=(l+(n=n+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,de)|0)+Math.imul(d,he)|0))<<13)|0;l=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(U,z),i=(i=Math.imul(U,K))+Math.imul(F,z)|0,o=Math.imul(F,K),n=n+Math.imul(M,Z)|0,i=(i=i+Math.imul(M,V)|0)+Math.imul(B,Z)|0,o=o+Math.imul(B,V)|0,n=n+Math.imul(N,W)|0,i=(i=i+Math.imul(N,G)|0)+Math.imul(D,W)|0,o=o+Math.imul(D,G)|0,n=n+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,J)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,J)|0,n=n+Math.imul(C,$)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,ee)|0,n=n+Math.imul(_,re)|0,i=(i=i+Math.imul(_,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,se)|0)+Math.imul(E,oe)|0,o=o+Math.imul(E,se)|0,n=n+Math.imul(y,ce)|0,i=(i=i+Math.imul(y,le)|0)+Math.imul(v,ce)|0,o=o+Math.imul(v,le)|0,n=n+Math.imul(p,he)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(g,he)|0,o=o+Math.imul(g,de)|0;var ke=(l+(n=n+Math.imul(h,pe)|0)|0)+((8191&(i=(i=i+Math.imul(h,ge)|0)+Math.imul(d,pe)|0))<<13)|0;l=((o=o+Math.imul(d,ge)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(U,Z),i=(i=Math.imul(U,V))+Math.imul(F,Z)|0,o=Math.imul(F,V),n=n+Math.imul(M,W)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(B,W)|0,o=o+Math.imul(B,G)|0,n=n+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,J)|0)+Math.imul(D,Q)|0,o=o+Math.imul(D,J)|0,n=n+Math.imul(R,$)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(P,$)|0,o=o+Math.imul(P,ee)|0,n=n+Math.imul(C,re)|0,i=(i=i+Math.imul(C,ne)|0)+Math.imul(x,re)|0,o=o+Math.imul(x,ne)|0,n=n+Math.imul(_,oe)|0,i=(i=i+Math.imul(_,se)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,se)|0,n=n+Math.imul(w,ce)|0,i=(i=i+Math.imul(w,le)|0)+Math.imul(E,ce)|0,o=o+Math.imul(E,le)|0,n=n+Math.imul(y,he)|0,i=(i=i+Math.imul(y,de)|0)+Math.imul(v,he)|0,o=o+Math.imul(v,de)|0;var Ce=(l+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ge)|0)+Math.imul(g,pe)|0))<<13)|0;l=((o=o+Math.imul(g,ge)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(U,W),i=(i=Math.imul(U,G))+Math.imul(F,W)|0,o=Math.imul(F,G),n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,J)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,J)|0,n=n+Math.imul(N,$)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,ee)|0,n=n+Math.imul(R,re)|0,i=(i=i+Math.imul(R,ne)|0)+Math.imul(P,re)|0,o=o+Math.imul(P,ne)|0,n=n+Math.imul(C,oe)|0,i=(i=i+Math.imul(C,se)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,se)|0,n=n+Math.imul(_,ce)|0,i=(i=i+Math.imul(_,le)|0)+Math.imul(A,ce)|0,o=o+Math.imul(A,le)|0,n=n+Math.imul(w,he)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(E,he)|0,o=o+Math.imul(E,de)|0;var xe=(l+(n=n+Math.imul(y,pe)|0)|0)+((8191&(i=(i=i+Math.imul(y,ge)|0)+Math.imul(v,pe)|0))<<13)|0;l=((o=o+Math.imul(v,ge)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(U,Q),i=(i=Math.imul(U,J))+Math.imul(F,Q)|0,o=Math.imul(F,J),n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,ee)|0,n=n+Math.imul(N,re)|0,i=(i=i+Math.imul(N,ne)|0)+Math.imul(D,re)|0,o=o+Math.imul(D,ne)|0,n=n+Math.imul(R,oe)|0,i=(i=i+Math.imul(R,se)|0)+Math.imul(P,oe)|0,o=o+Math.imul(P,se)|0,n=n+Math.imul(C,ce)|0,i=(i=i+Math.imul(C,le)|0)+Math.imul(x,ce)|0,o=o+Math.imul(x,le)|0,n=n+Math.imul(_,he)|0,i=(i=i+Math.imul(_,de)|0)+Math.imul(A,he)|0,o=o+Math.imul(A,de)|0;var Ie=(l+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,ge)|0)+Math.imul(E,pe)|0))<<13)|0;l=((o=o+Math.imul(E,ge)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(U,$),i=(i=Math.imul(U,ee))+Math.imul(F,$)|0,o=Math.imul(F,ee),n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(B,re)|0,o=o+Math.imul(B,ne)|0,n=n+Math.imul(N,oe)|0,i=(i=i+Math.imul(N,se)|0)+Math.imul(D,oe)|0,o=o+Math.imul(D,se)|0,n=n+Math.imul(R,ce)|0,i=(i=i+Math.imul(R,le)|0)+Math.imul(P,ce)|0,o=o+Math.imul(P,le)|0,n=n+Math.imul(C,he)|0,i=(i=i+Math.imul(C,de)|0)+Math.imul(x,he)|0,o=o+Math.imul(x,de)|0;var Re=(l+(n=n+Math.imul(_,pe)|0)|0)+((8191&(i=(i=i+Math.imul(_,ge)|0)+Math.imul(A,pe)|0))<<13)|0;l=((o=o+Math.imul(A,ge)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(U,re),i=(i=Math.imul(U,ne))+Math.imul(F,re)|0,o=Math.imul(F,ne),n=n+Math.imul(M,oe)|0,i=(i=i+Math.imul(M,se)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,se)|0,n=n+Math.imul(N,ce)|0,i=(i=i+Math.imul(N,le)|0)+Math.imul(D,ce)|0,o=o+Math.imul(D,le)|0,n=n+Math.imul(R,he)|0,i=(i=i+Math.imul(R,de)|0)+Math.imul(P,he)|0,o=o+Math.imul(P,de)|0;var Pe=(l+(n=n+Math.imul(C,pe)|0)|0)+((8191&(i=(i=i+Math.imul(C,ge)|0)+Math.imul(x,pe)|0))<<13)|0;l=((o=o+Math.imul(x,ge)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(U,oe),i=(i=Math.imul(U,se))+Math.imul(F,oe)|0,o=Math.imul(F,se),n=n+Math.imul(M,ce)|0,i=(i=i+Math.imul(M,le)|0)+Math.imul(B,ce)|0,o=o+Math.imul(B,le)|0,n=n+Math.imul(N,he)|0,i=(i=i+Math.imul(N,de)|0)+Math.imul(D,he)|0,o=o+Math.imul(D,de)|0;var Te=(l+(n=n+Math.imul(R,pe)|0)|0)+((8191&(i=(i=i+Math.imul(R,ge)|0)+Math.imul(P,pe)|0))<<13)|0;l=((o=o+Math.imul(P,ge)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(U,ce),i=(i=Math.imul(U,le))+Math.imul(F,ce)|0,o=Math.imul(F,le),n=n+Math.imul(M,he)|0,i=(i=i+Math.imul(M,de)|0)+Math.imul(B,he)|0,o=o+Math.imul(B,de)|0;var Ne=(l+(n=n+Math.imul(N,pe)|0)|0)+((8191&(i=(i=i+Math.imul(N,ge)|0)+Math.imul(D,pe)|0))<<13)|0;l=((o=o+Math.imul(D,ge)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,n=Math.imul(U,he),i=(i=Math.imul(U,de))+Math.imul(F,he)|0,o=Math.imul(F,de);var De=(l+(n=n+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,ge)|0)+Math.imul(B,pe)|0))<<13)|0;l=((o=o+Math.imul(B,ge)|0)+(i>>>13)|0)+(De>>>26)|0,De&=67108863;var Oe=(l+(n=Math.imul(U,pe))|0)+((8191&(i=(i=Math.imul(U,ge))+Math.imul(F,pe)|0))<<13)|0;return l=((o=Math.imul(F,ge))+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,c[0]=me,c[1]=ye,c[2]=ve,c[3]=be,c[4]=we,c[5]=Ee,c[6]=Se,c[7]=_e,c[8]=Ae,c[9]=ke,c[10]=Ce,c[11]=xe,c[12]=Ie,c[13]=Re,c[14]=Pe,c[15]=Te,c[16]=Ne,c[17]=De,c[18]=Oe,0!==l&&(c[19]=l,r.length++),r};function y(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 s=i;i=0;for(var a=67108863&n,c=Math.min(o,t.length-1),l=Math.max(0,o-e.length+1);l<=c;l++){var u=o-l,h=(0|e.words[u])*(0|t.words[l]),d=67108863&h;a=67108863&(d=d+a|0),i+=(s=(s=s+(h/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function v(e,t,r){return y(e,t,r)}function b(e,t){this.x=e,this.y=t}Math.imul||(m=g),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):r<63?g(this,e,t):r<1024?y(this,e,t):v(this,e,t)},b.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},b.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},b.prototype.permute=function(e,t,r,n,i,o){for(var s=0;s<o;s++)n[s]=t[e[s]],i[s]=r[e[s]]},b.prototype.transform=function(e,t,r,n,i,o){this.permute(o,e,t,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,c=Math.cos(2*Math.PI/a),l=Math.sin(2*Math.PI/a),u=0;u<i;u+=a)for(var h=c,d=l,f=0;f<s;f++){var p=r[u+f],g=n[u+f],m=r[u+f+s],y=n[u+f+s],v=h*m-d*y;y=h*y+d*m,m=v,r[u+f]=p+m,n[u+f]=g+y,r[u+f+s]=p-m,n[u+f+s]=g-y,f!==a&&(v=c*h-l*d,d=c*d+l*h,h=v)}},b.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},b.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}},b.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},b.prototype.convert13b=function(e,t,r,i){for(var o=0,s=0;s<t;s++)o+=0|e[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*t;s<i;++s)r[s]=0;n(0===o),n(0===(-8192&o))},b.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},b.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),c=new Array(n),l=new Array(n),u=new Array(n),h=new Array(n),d=r.words;d.length=n,this.convert13b(e.words,e.length,s,n),this.convert13b(t.words,t.length,l,n),this.transform(s,o,a,c,n,i),this.transform(l,o,u,h,n,i);for(var f=0;f<n;f++){var p=a[f]*u[f]-c[f]*h[f];c[f]=a[f]*h[f]+c[f]*u[f],a[f]=p}return this.conjugate(a,c,n),this.transform(a,c,d,o,n,i),this.conjugate(d,o,n),this.normalize13b(d,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),v(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,s=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=s>>>26,this.words[i]=67108863&s}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 s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,c=(0|this.words[t])-a<<r;this.words[t]=c|s,s=a>>>26-r}s&&(this.words[t]=s,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,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,c=r;if(i-=s,i=Math.max(0,i),c){for(var l=0;l<s;l++)c.words[l]=this.words[l];c.length=s}if(0===s);else if(this.length>s)for(this.length-=s,l=0;l<this.length;l++)this.words[l]=this.words[l+s];else this.words[0]=0,this.length=1;var u=0;for(l=this.length-1;l>=0&&(0!==u||l>=i);l--){var h=0|this.words[l];this.words[l]=u<<26-o|h>>>o,u=h&a}return c&&0!==u&&(c.words[c.length++]=u),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,s=e.length+r;this._expand(s);var a=0;for(i=0;i<e.length;i++){o=(0|this.words[i+r])+a;var c=(0|e.words[i])*t;a=((o-=67108863&c)>>26)-(c/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this._strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>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,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,c=n.length-i.length;if("mod"!==t){(a=new o(null)).length=c+1,a.words=new Array(a.length);for(var l=0;l<a.length;l++)a.words[l]=0}var u=n.clone()._ishlnsubmul(i,1,c);0===u.negative&&(n=u,a&&(a.words[c]=1));for(var h=c-1;h>=0;h--){var d=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(d=Math.min(d/s|0,67108863),n._ishlnsubmul(i,d,h);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);a&&(a.words[h]=d)}return a&&a._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:a||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?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!==(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):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,s,a},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),s=new o(0),a=new o(0),c=new o(1),l=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++l;for(var u=r.clone(),h=t.clone();!t.isZero();){for(var d=0,f=1;0===(t.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(u),s.isub(h)),i.iushrn(1),s.iushrn(1);for(var p=0,g=1;0===(r.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||c.isOdd())&&(a.iadd(u),c.isub(h)),a.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(a),s.isub(c)):(r.isub(t),a.isub(i),c.isub(s))}return{a:a,b:c,gcd:r.iushln(l)}},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,s=new o(1),a=new o(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var l=0,u=1;0===(t.words[0]&u)&&l<26;++l,u<<=1);if(l>0)for(t.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);for(var h=0,d=1;0===(r.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(r.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(a)):(r.isub(t),a.isub(s))}return(i=0===t.cmpn(1)?s:a).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,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=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 C(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 w={k256:null,p224:null,p192:null,p25519:null};function E(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(){E.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){E.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function A(){E.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function k(){E.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function C(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 x(e){C.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)}E.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},E.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},E.prototype.split=function(e,t){e.iushrn(this.n,0,t)},E.prototype.imulK=function(e){return e.imul(this.k)},i(S,E),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 s=0|e.words[i];e.words[i-10]=(s&r)<<4|o>>>22,o=s}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),i(A,E),i(k,E),k.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(w[e])return w[e];var t;if("k256"===e)t=new S;else if("p224"===e)t=new _;else if("p192"===e)t=new A;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new k}return w[e]=t,t},C.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},C.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")},C.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(u(e,e.umod(this.m)._forceRed(this)),e)},C.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},C.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)},C.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},C.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)},C.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},C.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},C.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},C.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},C.prototype.isqr=function(e){return this.imul(e,e.clone())},C.prototype.sqr=function(e){return this.mul(e,e)},C.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),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),c=a.redNeg(),l=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new o(2*u*u).toRed(this);0!==this.pow(u,l).cmp(c);)u.redIAdd(c);for(var h=this.pow(u,i),d=this.pow(e,i.addn(1).iushrn(1)),f=this.pow(e,i),p=s;0!==f.cmp(a);){for(var g=f,m=0;0!==g.cmp(a);m++)g=g.redSqr();n(m<p);var y=this.pow(h,new o(1).iushln(p-m-1));d=d.redMul(y),h=y.redSqr(),f=f.redMul(h),p=m}return d},C.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},C.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],s=0,a=0,c=t.bitLength()%26;for(0===c&&(c=26),n=t.length-1;n>=0;n--){for(var l=t.words[n],u=c-1;u>=0;u--){var h=l>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==s?(s<<=1,s|=h,(4===++a||0===n&&0===u)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}c=26}return i},C.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},C.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new x(e)},i(x,C),x.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},x.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},x.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)},x.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),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},x.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},3061:(e,t,r)=>{"use strict";function n(e){var t,r,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=n(e[t]))&&(i&&(i+=" "),i+=r);else for(t in e)e[t]&&(i&&(i+=" "),i+=t);return i}r.d(t,{Z:()=>i});const i=function(){for(var e,t,r=0,i="";r<arguments.length;)(e=arguments[r++])&&(t=n(e))&&(i&&(i+=" "),i+=t);return i}},4054:(e,t,r)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(i=n))})),t.splice(i,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(r){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(r){}!e&&"undefined"!==typeof process&&"env"in process&&(e={NODE_ENV:"production",PUBLIC_URL:"/eth-pm",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.DEBUG);return e},t.useColors=function(){if("undefined"!==typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!==typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!==typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=r(7175)(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},7175:(e,t,r)=>{e.exports=function(e){function t(e){let r,i,o,s=null;function a(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];if(!a.enabled)return;const o=a,s=Number(new Date),c=s-(r||s);o.diff=c,o.prev=r,o.curr=s,r=s,n[0]=t.coerce(n[0]),"string"!==typeof n[0]&&n.unshift("%O");let l=0;n[0]=n[0].replace(/%([a-zA-Z%])/g,((e,r)=>{if("%%"===e)return"%";l++;const i=t.formatters[r];if("function"===typeof i){const t=n[l];e=i.call(o,t),n.splice(l,1),l--}return e})),t.formatArgs.call(o,n);const u=o.log||t.log;u.apply(o,n)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=n,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(i!==t.namespaces&&(i=t.namespaces,o=t.enabled(e)),o),set:e=>{s=e}}),"function"===typeof t.init&&t.init(a),a}function n(e,r){const n=t(this.namespace+("undefined"===typeof r?":":r)+e);return n.log=this.log,n}function i(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(i),...t.skips.map(i).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"===typeof e?e:"").split(/[\s,]+/),i=n.length;for(r=0;r<i;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=r(5187),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((r=>{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}},3331:e=>{"use strict";function t(e,t){t=t||{};this._head=0,this._tail=0,this._capacity=t.capacity,this._capacityMask=3,this._list=new Array(4),Array.isArray(e)&&this._fromArray(e)}t.prototype.peekAt=function(e){var t=e;if(t===(0|t)){var r=this.size();if(!(t>=r||t<-r))return t<0&&(t+=r),t=this._head+t&this._capacityMask,this._list[t]}},t.prototype.get=function(e){return this.peekAt(e)},t.prototype.peek=function(){if(this._head!==this._tail)return this._list[this._head]},t.prototype.peekFront=function(){return this.peek()},t.prototype.peekBack=function(){return this.peekAt(-1)},Object.defineProperty(t.prototype,"length",{get:function(){return this.size()}}),t.prototype.size=function(){return this._head===this._tail?0:this._head<this._tail?this._tail-this._head:this._capacityMask+1-(this._head-this._tail)},t.prototype.unshift=function(e){if(void 0===e)return this.size();var t=this._list.length;return this._head=this._head-1+t&this._capacityMask,this._list[this._head]=e,this._tail===this._head&&this._growArray(),this._capacity&&this.size()>this._capacity&&this.pop(),this._head<this._tail?this._tail-this._head:this._capacityMask+1-(this._head-this._tail)},t.prototype.shift=function(){var e=this._head;if(e!==this._tail){var t=this._list[e];return this._list[e]=void 0,this._head=e+1&this._capacityMask,e<2&&this._tail>1e4&&this._tail<=this._list.length>>>2&&this._shrinkArray(),t}},t.prototype.push=function(e){if(void 0===e)return this.size();var t=this._tail;return this._list[t]=e,this._tail=t+1&this._capacityMask,this._tail===this._head&&this._growArray(),this._capacity&&this.size()>this._capacity&&this.shift(),this._head<this._tail?this._tail-this._head:this._capacityMask+1-(this._head-this._tail)},t.prototype.pop=function(){var e=this._tail;if(e!==this._head){var t=this._list.length;this._tail=e-1+t&this._capacityMask;var r=this._list[this._tail];return this._list[this._tail]=void 0,this._head<2&&e>1e4&&e<=t>>>2&&this._shrinkArray(),r}},t.prototype.removeOne=function(e){var t=e;if(t===(0|t)&&this._head!==this._tail){var r=this.size(),n=this._list.length;if(!(t>=r||t<-r)){t<0&&(t+=r),t=this._head+t&this._capacityMask;var i,o=this._list[t];if(e<r/2){for(i=e;i>0;i--)this._list[t]=this._list[t=t-1+n&this._capacityMask];this._list[t]=void 0,this._head=this._head+1+n&this._capacityMask}else{for(i=r-1-e;i>0;i--)this._list[t]=this._list[t=t+1+n&this._capacityMask];this._list[t]=void 0,this._tail=this._tail-1+n&this._capacityMask}return o}}},t.prototype.remove=function(e,t){var r,n=e,i=t;if(n===(0|n)&&this._head!==this._tail){var o=this.size(),s=this._list.length;if(!(n>=o||n<-o||t<1)){if(n<0&&(n+=o),1===t||!t)return(r=new Array(1))[0]=this.removeOne(n),r;if(0===n&&n+t>=o)return r=this.toArray(),this.clear(),r;var a;for(n+t>o&&(t=o-n),r=new Array(t),a=0;a<t;a++)r[a]=this._list[this._head+n+a&this._capacityMask];if(n=this._head+n&this._capacityMask,e+t===o){for(this._tail=this._tail-t+s&this._capacityMask,a=t;a>0;a--)this._list[n=n+1+s&this._capacityMask]=void 0;return r}if(0===e){for(this._head=this._head+t+s&this._capacityMask,a=t-1;a>0;a--)this._list[n=n+1+s&this._capacityMask]=void 0;return r}if(n<o/2){for(this._head=this._head+e+t+s&this._capacityMask,a=e;a>0;a--)this.unshift(this._list[n=n-1+s&this._capacityMask]);for(n=this._head-1+s&this._capacityMask;i>0;)this._list[n=n-1+s&this._capacityMask]=void 0,i--;e<0&&(this._tail=n)}else{for(this._tail=n,n=n+t+s&this._capacityMask,a=o-(t+e);a>0;a--)this.push(this._list[n++]);for(n=this._tail;i>0;)this._list[n=n+1+s&this._capacityMask]=void 0,i--}return this._head<2&&this._tail>1e4&&this._tail<=s>>>2&&this._shrinkArray(),r}}},t.prototype.splice=function(e,t){var r=e;if(r===(0|r)){var n=this.size();if(r<0&&(r+=n),!(r>n)){if(arguments.length>2){var i,o,s,a=arguments.length,c=this._list.length,l=2;if(!n||r<n/2){for(o=new Array(r),i=0;i<r;i++)o[i]=this._list[this._head+i&this._capacityMask];for(0===t?(s=[],r>0&&(this._head=this._head+r+c&this._capacityMask)):(s=this.remove(r,t),this._head=this._head+r+c&this._capacityMask);a>l;)this.unshift(arguments[--a]);for(i=r;i>0;i--)this.unshift(o[i-1])}else{var u=(o=new Array(n-(r+t))).length;for(i=0;i<u;i++)o[i]=this._list[this._head+r+t+i&this._capacityMask];for(0===t?(s=[],r!=n&&(this._tail=this._head+r+c&this._capacityMask)):(s=this.remove(r,t),this._tail=this._tail-u+c&this._capacityMask);l<a;)this.push(arguments[l++]);for(i=0;i<u;i++)this.push(o[i])}return s}return this.remove(r,t)}}},t.prototype.clear=function(){this._head=0,this._tail=0},t.prototype.isEmpty=function(){return this._head===this._tail},t.prototype.toArray=function(){return this._copyArray(!1)},t.prototype._fromArray=function(e){for(var t=0;t<e.length;t++)this.push(e[t])},t.prototype._copyArray=function(e){var t,r=[],n=this._list,i=n.length;if(e||this._head>this._tail){for(t=this._head;t<i;t++)r.push(n[t]);for(t=0;t<this._tail;t++)r.push(n[t])}else for(t=this._head;t<this._tail;t++)r.push(n[t]);return r},t.prototype._growArray=function(){this._head&&(this._list=this._copyArray(!0),this._head=0),this._tail=this._list.length,this._list.length<<=1,this._capacityMask=this._capacityMask<<1|1},t.prototype._shrinkArray=function(){this._list.length>>>=1,this._capacityMask>>>=1},e.exports=t},1425:e=>{"use strict";function t(e,t){for(const r in t)Object.defineProperty(e,r,{value:t[r],enumerable:!0,configurable:!0});return e}e.exports=function(e,r,n){if(!e||"string"===typeof e)throw new TypeError("Please pass an Error to err-code");n||(n={}),"object"===typeof r&&(n=r,r=""),r&&(n.code=r);try{return t(e,n)}catch(i){n.message=e.message,n.stack=e.stack;const r=function(){};r.prototype=Object.create(Object.getPrototypeOf(e));return t(new r,n)}}},2388: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.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.formatBytes32String=t.Utf8ErrorFuncs=t.toUtf8String=t.toUtf8CodePoints=t.toUtf8Bytes=t._toEscapedUtf8String=t.nameprep=t.hexDataSlice=t.hexDataLength=t.hexZeroPad=t.hexValue=t.hexStripZeros=t.hexConcat=t.isHexString=t.hexlify=t.base64=t.base58=t.TransactionDescription=t.LogDescription=t.Interface=t.SigningKey=t.HDNode=t.defaultPath=t.isBytesLike=t.isBytes=t.zeroPad=t.stripZeros=t.concat=t.arrayify=t.shallowCopy=t.resolveProperties=t.getStatic=t.defineReadOnly=t.deepCopy=t.checkProperties=t.poll=t.fetchJson=t._fetchData=t.RLP=t.Logger=t.checkResultErrors=t.FormatTypes=t.ParamType=t.FunctionFragment=t.EventFragment=t.ErrorFragment=t.ConstructorFragment=t.Fragment=t.defaultAbiCoder=t.AbiCoder=void 0,t.Indexed=t.Utf8ErrorReason=t.UnicodeNormalizationForm=t.SupportedAlgorithm=t.mnemonicToSeed=t.isValidMnemonic=t.entropyToMnemonic=t.mnemonicToEntropy=t.getAccountPath=t.verifyTypedData=t.verifyMessage=t.recoverPublicKey=t.computePublicKey=t.recoverAddress=t.computeAddress=t.getJsonWalletAddress=t.TransactionTypes=t.serializeTransaction=t.parseTransaction=t.accessListify=t.joinSignature=t.splitSignature=t.soliditySha256=t.solidityKeccak256=t.solidityPack=t.shuffled=t.randomBytes=t.sha512=t.sha256=t.ripemd160=t.keccak256=t.computeHmac=t.commify=t.parseUnits=t.formatUnits=t.parseEther=t.formatEther=t.isAddress=t.getCreate2Address=t.getContractAddress=t.getIcapAddress=t.getAddress=t._TypedDataEncoder=t.id=t.isValidName=t.namehash=t.hashMessage=t.dnsEncode=t.parseBytes32String=void 0;var s=r(8603);Object.defineProperty(t,"AbiCoder",{enumerable:!0,get:function(){return s.AbiCoder}}),Object.defineProperty(t,"checkResultErrors",{enumerable:!0,get:function(){return s.checkResultErrors}}),Object.defineProperty(t,"ConstructorFragment",{enumerable:!0,get:function(){return s.ConstructorFragment}}),Object.defineProperty(t,"defaultAbiCoder",{enumerable:!0,get:function(){return s.defaultAbiCoder}}),Object.defineProperty(t,"ErrorFragment",{enumerable:!0,get:function(){return s.ErrorFragment}}),Object.defineProperty(t,"EventFragment",{enumerable:!0,get:function(){return s.EventFragment}}),Object.defineProperty(t,"FormatTypes",{enumerable:!0,get:function(){return s.FormatTypes}}),Object.defineProperty(t,"Fragment",{enumerable:!0,get:function(){return s.Fragment}}),Object.defineProperty(t,"FunctionFragment",{enumerable:!0,get:function(){return s.FunctionFragment}}),Object.defineProperty(t,"Indexed",{enumerable:!0,get:function(){return s.Indexed}}),Object.defineProperty(t,"Interface",{enumerable:!0,get:function(){return s.Interface}}),Object.defineProperty(t,"LogDescription",{enumerable:!0,get:function(){return s.LogDescription}}),Object.defineProperty(t,"ParamType",{enumerable:!0,get:function(){return s.ParamType}}),Object.defineProperty(t,"TransactionDescription",{enumerable:!0,get:function(){return s.TransactionDescription}});var a=r(8552);Object.defineProperty(t,"getAddress",{enumerable:!0,get:function(){return a.getAddress}}),Object.defineProperty(t,"getCreate2Address",{enumerable:!0,get:function(){return a.getCreate2Address}}),Object.defineProperty(t,"getContractAddress",{enumerable:!0,get:function(){return a.getContractAddress}}),Object.defineProperty(t,"getIcapAddress",{enumerable:!0,get:function(){return a.getIcapAddress}}),Object.defineProperty(t,"isAddress",{enumerable:!0,get:function(){return a.isAddress}});var c=o(r(9515));t.base64=c;var l=r(4247);Object.defineProperty(t,"base58",{enumerable:!0,get:function(){return l.Base58}});var u=r(2009);Object.defineProperty(t,"arrayify",{enumerable:!0,get:function(){return u.arrayify}}),Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return u.concat}}),Object.defineProperty(t,"hexConcat",{enumerable:!0,get:function(){return u.hexConcat}}),Object.defineProperty(t,"hexDataSlice",{enumerable:!0,get:function(){return u.hexDataSlice}}),Object.defineProperty(t,"hexDataLength",{enumerable:!0,get:function(){return u.hexDataLength}}),Object.defineProperty(t,"hexlify",{enumerable:!0,get:function(){return u.hexlify}}),Object.defineProperty(t,"hexStripZeros",{enumerable:!0,get:function(){return u.hexStripZeros}}),Object.defineProperty(t,"hexValue",{enumerable:!0,get:function(){return u.hexValue}}),Object.defineProperty(t,"hexZeroPad",{enumerable:!0,get:function(){return u.hexZeroPad}}),Object.defineProperty(t,"isBytes",{enumerable:!0,get:function(){return u.isBytes}}),Object.defineProperty(t,"isBytesLike",{enumerable:!0,get:function(){return u.isBytesLike}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return u.isHexString}}),Object.defineProperty(t,"joinSignature",{enumerable:!0,get:function(){return u.joinSignature}}),Object.defineProperty(t,"zeroPad",{enumerable:!0,get:function(){return u.zeroPad}}),Object.defineProperty(t,"splitSignature",{enumerable:!0,get:function(){return u.splitSignature}}),Object.defineProperty(t,"stripZeros",{enumerable:!0,get:function(){return u.stripZeros}});var h=r(5843);Object.defineProperty(t,"_TypedDataEncoder",{enumerable:!0,get:function(){return h._TypedDataEncoder}}),Object.defineProperty(t,"dnsEncode",{enumerable:!0,get:function(){return h.dnsEncode}}),Object.defineProperty(t,"hashMessage",{enumerable:!0,get:function(){return h.hashMessage}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return h.id}}),Object.defineProperty(t,"isValidName",{enumerable:!0,get:function(){return h.isValidName}}),Object.defineProperty(t,"namehash",{enumerable:!0,get:function(){return h.namehash}});var d=r(9590);Object.defineProperty(t,"defaultPath",{enumerable:!0,get:function(){return d.defaultPath}}),Object.defineProperty(t,"entropyToMnemonic",{enumerable:!0,get:function(){return d.entropyToMnemonic}}),Object.defineProperty(t,"getAccountPath",{enumerable:!0,get:function(){return d.getAccountPath}}),Object.defineProperty(t,"HDNode",{enumerable:!0,get:function(){return d.HDNode}}),Object.defineProperty(t,"isValidMnemonic",{enumerable:!0,get:function(){return d.isValidMnemonic}}),Object.defineProperty(t,"mnemonicToEntropy",{enumerable:!0,get:function(){return d.mnemonicToEntropy}}),Object.defineProperty(t,"mnemonicToSeed",{enumerable:!0,get:function(){return d.mnemonicToSeed}});var f=r(5054);Object.defineProperty(t,"getJsonWalletAddress",{enumerable:!0,get:function(){return f.getJsonWalletAddress}});var p=r(1291);Object.defineProperty(t,"keccak256",{enumerable:!0,get:function(){return p.keccak256}});var g=r(2735);Object.defineProperty(t,"Logger",{enumerable:!0,get:function(){return g.Logger}});var m=r(4517);Object.defineProperty(t,"computeHmac",{enumerable:!0,get:function(){return m.computeHmac}}),Object.defineProperty(t,"ripemd160",{enumerable:!0,get:function(){return m.ripemd160}}),Object.defineProperty(t,"sha256",{enumerable:!0,get:function(){return m.sha256}}),Object.defineProperty(t,"sha512",{enumerable:!0,get:function(){return m.sha512}});var y=r(6684);Object.defineProperty(t,"solidityKeccak256",{enumerable:!0,get:function(){return y.keccak256}}),Object.defineProperty(t,"solidityPack",{enumerable:!0,get:function(){return y.pack}}),Object.defineProperty(t,"soliditySha256",{enumerable:!0,get:function(){return y.sha256}});var v=r(9670);Object.defineProperty(t,"randomBytes",{enumerable:!0,get:function(){return v.randomBytes}}),Object.defineProperty(t,"shuffled",{enumerable:!0,get:function(){return v.shuffled}});var b=r(4812);Object.defineProperty(t,"checkProperties",{enumerable:!0,get:function(){return b.checkProperties}}),Object.defineProperty(t,"deepCopy",{enumerable:!0,get:function(){return b.deepCopy}}),Object.defineProperty(t,"defineReadOnly",{enumerable:!0,get:function(){return b.defineReadOnly}}),Object.defineProperty(t,"getStatic",{enumerable:!0,get:function(){return b.getStatic}}),Object.defineProperty(t,"resolveProperties",{enumerable:!0,get:function(){return b.resolveProperties}}),Object.defineProperty(t,"shallowCopy",{enumerable:!0,get:function(){return b.shallowCopy}});var w=o(r(807));t.RLP=w;var E=r(4760);Object.defineProperty(t,"computePublicKey",{enumerable:!0,get:function(){return E.computePublicKey}}),Object.defineProperty(t,"recoverPublicKey",{enumerable:!0,get:function(){return E.recoverPublicKey}}),Object.defineProperty(t,"SigningKey",{enumerable:!0,get:function(){return E.SigningKey}});var S=r(4965);Object.defineProperty(t,"formatBytes32String",{enumerable:!0,get:function(){return S.formatBytes32String}}),Object.defineProperty(t,"nameprep",{enumerable:!0,get:function(){return S.nameprep}}),Object.defineProperty(t,"parseBytes32String",{enumerable:!0,get:function(){return S.parseBytes32String}}),Object.defineProperty(t,"_toEscapedUtf8String",{enumerable:!0,get:function(){return S._toEscapedUtf8String}}),Object.defineProperty(t,"toUtf8Bytes",{enumerable:!0,get:function(){return S.toUtf8Bytes}}),Object.defineProperty(t,"toUtf8CodePoints",{enumerable:!0,get:function(){return S.toUtf8CodePoints}}),Object.defineProperty(t,"toUtf8String",{enumerable:!0,get:function(){return S.toUtf8String}}),Object.defineProperty(t,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return S.Utf8ErrorFuncs}});var _=r(5958);Object.defineProperty(t,"accessListify",{enumerable:!0,get:function(){return _.accessListify}}),Object.defineProperty(t,"computeAddress",{enumerable:!0,get:function(){return _.computeAddress}}),Object.defineProperty(t,"parseTransaction",{enumerable:!0,get:function(){return _.parse}}),Object.defineProperty(t,"recoverAddress",{enumerable:!0,get:function(){return _.recoverAddress}}),Object.defineProperty(t,"serializeTransaction",{enumerable:!0,get:function(){return _.serialize}}),Object.defineProperty(t,"TransactionTypes",{enumerable:!0,get:function(){return _.TransactionTypes}});var A=r(6955);Object.defineProperty(t,"commify",{enumerable:!0,get:function(){return A.commify}}),Object.defineProperty(t,"formatEther",{enumerable:!0,get:function(){return A.formatEther}}),Object.defineProperty(t,"parseEther",{enumerable:!0,get:function(){return A.parseEther}}),Object.defineProperty(t,"formatUnits",{enumerable:!0,get:function(){return A.formatUnits}}),Object.defineProperty(t,"parseUnits",{enumerable:!0,get:function(){return A.parseUnits}});var k=r(6204);Object.defineProperty(t,"verifyMessage",{enumerable:!0,get:function(){return k.verifyMessage}}),Object.defineProperty(t,"verifyTypedData",{enumerable:!0,get:function(){return k.verifyTypedData}});var C=r(8786);Object.defineProperty(t,"_fetchData",{enumerable:!0,get:function(){return C._fetchData}}),Object.defineProperty(t,"fetchJson",{enumerable:!0,get:function(){return C.fetchJson}}),Object.defineProperty(t,"poll",{enumerable:!0,get:function(){return C.poll}});var x=r(4517);Object.defineProperty(t,"SupportedAlgorithm",{enumerable:!0,get:function(){return x.SupportedAlgorithm}});var I=r(4965);Object.defineProperty(t,"UnicodeNormalizationForm",{enumerable:!0,get:function(){return I.UnicodeNormalizationForm}}),Object.defineProperty(t,"Utf8ErrorReason",{enumerable:!0,get:function(){return I.Utf8ErrorReason}})},3751:(e,t,r)=>{"use strict";const n=r(6840);t.zN=n.EventIterator,n.EventIterator},6840:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(){this.pullQueue=[],this.pushQueue=[],this.eventHandlers={},this.isPaused=!1,this.isStopped=!1}push(e){if(this.isStopped)return;const t={value:e,done:!1};if(this.pullQueue.length){const e=this.pullQueue.shift();e&&e.resolve(t)}else this.pushQueue.push(Promise.resolve(t)),void 0!==this.highWaterMark&&this.pushQueue.length>=this.highWaterMark&&!this.isPaused&&(this.isPaused=!0,this.eventHandlers.highWater?this.eventHandlers.highWater():console&&console.warn("EventIterator queue reached ".concat(this.pushQueue.length," items")))}stop(){if(!this.isStopped){this.isStopped=!0,this.remove();for(const e of this.pullQueue)e.resolve({value:void 0,done:!0});this.pullQueue.length=0}}fail(e){if(!this.isStopped)if(this.isStopped=!0,this.remove(),this.pullQueue.length){for(const t of this.pullQueue)t.reject(e);this.pullQueue.length=0}else{const t=Promise.reject(e);t.catch((()=>{})),this.pushQueue.push(t)}}remove(){Promise.resolve().then((()=>{this.removeCallback&&this.removeCallback()}))}[Symbol.asyncIterator](){return{next:e=>{const t=this.pushQueue.shift();return t?(void 0!==this.lowWaterMark&&this.pushQueue.length<=this.lowWaterMark&&this.isPaused&&(this.isPaused=!1,this.eventHandlers.lowWater&&this.eventHandlers.lowWater()),t):this.isStopped?Promise.resolve({value:void 0,done:!0}):new Promise(((e,t)=>{this.pullQueue.push({resolve:e,reject:t})}))},return:()=>(this.isStopped=!0,this.pushQueue.length=0,this.remove(),Promise.resolve({value:void 0,done:!0}))}}}class n{constructor(e){let{highWaterMark:t=100,lowWaterMark:n=1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=new r;i.highWaterMark=t,i.lowWaterMark=n,i.removeCallback=e({push:e=>i.push(e),stop:()=>i.stop(),fail:e=>i.fail(e),on:(e,t)=>{i.eventHandlers[e]=t}})||(()=>{}),this[Symbol.asyncIterator]=()=>i[Symbol.asyncIterator](),Object.freeze(this)}}t.EventIterator=n,t.default=n},548:e=>{"use strict";var t=Object.prototype.hasOwnProperty,r="~";function n(){}function i(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function o(e,t,n,o,s){if("function"!==typeof n)throw new TypeError("The listener must be a function");var a=new i(n,o||e,s),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],a]:e._events[c].push(a):(e._events[c]=a,e._eventsCount++),e}function s(e,t){0===--e._eventsCount?e._events=new n:delete e._events[t]}function a(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),a.prototype.eventNames=function(){var e,n,i=[];if(0===this._eventsCount)return i;for(n in e=this._events)t.call(e,n)&&i.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},a.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,s=new Array(o);i<o;i++)s[i]=n[i].fn;return s},a.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},a.prototype.emit=function(e,t,n,i,o,s){var a=r?r+e:e;if(!this._events[a])return!1;var c,l,u=this._events[a],h=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),h){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,n),!0;case 4:return u.fn.call(u.context,t,n,i),!0;case 5:return u.fn.call(u.context,t,n,i,o),!0;case 6:return u.fn.call(u.context,t,n,i,o,s),!0}for(l=1,c=new Array(h-1);l<h;l++)c[l-1]=arguments[l];u.fn.apply(u.context,c)}else{var d,f=u.length;for(l=0;l<f;l++)switch(u[l].once&&this.removeListener(e,u[l].fn,void 0,!0),h){case 1:u[l].fn.call(u[l].context);break;case 2:u[l].fn.call(u[l].context,t);break;case 3:u[l].fn.call(u[l].context,t,n);break;case 4:u[l].fn.call(u[l].context,t,n,i);break;default:if(!c)for(d=1,c=new Array(h-1);d<h;d++)c[d-1]=arguments[d];u[l].fn.apply(u[l].context,c)}}return!0},a.prototype.on=function(e,t,r){return o(this,e,t,r,!1)},a.prototype.once=function(e,t,r){return o(this,e,t,r,!0)},a.prototype.removeListener=function(e,t,n,i){var o=r?r+e:e;if(!this._events[o])return this;if(!t)return s(this,o),this;var a=this._events[o];if(a.fn)a.fn!==t||i&&!a.once||n&&a.context!==n||s(this,o);else{for(var c=0,l=[],u=a.length;c<u;c++)(a[c].fn!==t||i&&!a[c].once||n&&a[c].context!==n)&&l.push(a[c]);l.length?this._events[o]=1===l.length?l[0]:l:s(this,o)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&s(this,t)):(this._events=new n,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=r,a.EventEmitter=a,e.exports=a},8041: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))}g(e,t,o,{once:!0}),"error"!==t&&function(e,t,r){"function"===typeof e.on&&g(e,"error",t,r)}(e,i,{once:!0})}))},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 c(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function l(e,t,r,n){var i,o,s;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=c(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,function(e){console&&console.warn&&console.warn(e)}(l)}return e}function u(){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 h(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=u.bind(n);return i.listener=r,n.wrapFn=i,i}function d(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 f(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 g(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 c(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 c=o[e];if(void 0===c)return!1;if("function"===typeof c)n(c,this,t);else{var l=c.length,u=p(c,l);for(r=0;r<l;++r)n(u[r],this,t)}return!0},o.prototype.addListener=function(e,t){return l(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return l(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,h(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,h(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 d(this,e,!0)},o.prototype.rawListeners=function(e){return d(this,e,!1)},o.listenerCount=function(e,t){return"function"===typeof e.listenerCount?e.listenerCount(t):f.call(e,t)},o.prototype.listenerCount=f,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},7553:(e,t,r)=>{var n=t;n.utils=r(7657),n.common=r(3345),n.sha=r(395),n.ripemd=r(5751),n.hmac=r(9161),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},3345:(e,t,r)=>{"use strict";var n=r(7657),i=r(5701);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}},9161:(e,t,r)=>{"use strict";var n=r(7657),i=r(5701);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)}},5751:(e,t,r)=>{"use strict";var n=r(7657),i=r(3345),o=n.rotl32,s=n.sum32,a=n.sum32_3,c=n.sum32_4,l=i.BlockHash;function u(){if(!(this instanceof u))return new u;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function h(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 d(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function f(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}n.inherits(u,l),t.ripemd160=u,u.blockSize=512,u.outSize=160,u.hmacStrength=192,u.padLength=64,u.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],i=this.h[2],l=this.h[3],u=this.h[4],v=r,b=n,w=i,E=l,S=u,_=0;_<80;_++){var A=s(o(c(r,h(_,n,i,l),e[p[_]+t],d(_)),m[_]),u);r=u,u=l,l=o(i,10),i=n,n=A,A=s(o(c(v,h(79-_,b,w,E),e[g[_]+t],f(_)),y[_]),S),v=S,S=E,E=o(w,10),w=b,b=A}A=a(this.h[1],i,E),this.h[1]=a(this.h[2],l,S),this.h[2]=a(this.h[3],u,v),this.h[3]=a(this.h[4],r,b),this.h[4]=a(this.h[0],n,w),this.h[0]=A},u.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],g=[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],m=[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],y=[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]},395:(e,t,r)=>{"use strict";t.sha1=r(1405),t.sha224=r(7452),t.sha256=r(1611),t.sha384=r(996),t.sha512=r(166)},1405:(e,t,r)=>{"use strict";var n=r(7657),i=r(3345),o=r(3089),s=n.rotl32,a=n.sum32,c=n.sum32_5,l=o.ft_1,u=i.BlockHash,h=[1518500249,1859775393,2400959708,3395469782];function d(){if(!(this instanceof d))return new d;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(d,u),e.exports=d,d.blockSize=512,d.outSize=160,d.hmacStrength=80,d.padLength=64,d.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]=s(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var i=this.h[0],o=this.h[1],u=this.h[2],d=this.h[3],f=this.h[4];for(n=0;n<r.length;n++){var p=~~(n/20),g=c(s(i,5),l(p,o,u,d),f,r[n],h[p]);f=d,d=u,u=s(o,30),o=i,i=g}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],u),this.h[3]=a(this.h[3],d),this.h[4]=a(this.h[4],f)},d.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},7452:(e,t,r)=>{"use strict";var n=r(7657),i=r(1611);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")}},1611:(e,t,r)=>{"use strict";var n=r(7657),i=r(3345),o=r(3089),s=r(5701),a=n.sum32,c=n.sum32_4,l=n.sum32_5,u=o.ch32,h=o.maj32,d=o.s0_256,f=o.s1_256,p=o.g0_256,g=o.g1_256,m=i.BlockHash,y=[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 v(){if(!(this instanceof v))return new v;m.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=y,this.W=new Array(64)}n.inherits(v,m),e.exports=v,v.blockSize=512,v.outSize=256,v.hmacStrength=192,v.padLength=64,v.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]=c(g(r[n-2]),r[n-7],p(r[n-15]),r[n-16]);var i=this.h[0],o=this.h[1],m=this.h[2],y=this.h[3],v=this.h[4],b=this.h[5],w=this.h[6],E=this.h[7];for(s(this.k.length===r.length),n=0;n<r.length;n++){var S=l(E,f(v),u(v,b,w),this.k[n],r[n]),_=a(d(i),h(i,o,m));E=w,w=b,b=v,v=a(y,S),y=m,m=o,o=i,i=a(S,_)}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],m),this.h[3]=a(this.h[3],y),this.h[4]=a(this.h[4],v),this.h[5]=a(this.h[5],b),this.h[6]=a(this.h[6],w),this.h[7]=a(this.h[7],E)},v.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},996:(e,t,r)=>{"use strict";var n=r(7657),i=r(166);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")}},166:(e,t,r)=>{"use strict";var n=r(7657),i=r(3345),o=r(5701),s=n.rotr64_hi,a=n.rotr64_lo,c=n.shr64_hi,l=n.shr64_lo,u=n.sum64,h=n.sum64_hi,d=n.sum64_lo,f=n.sum64_4_hi,p=n.sum64_4_lo,g=n.sum64_5_hi,m=n.sum64_5_lo,y=i.BlockHash,v=[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 b(){if(!(this instanceof b))return new b;y.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=v,this.W=new Array(160)}function w(e,t,r,n,i){var o=e&r^~e&i;return o<0&&(o+=4294967296),o}function E(e,t,r,n,i,o){var s=t&n^~t&o;return s<0&&(s+=4294967296),s}function S(e,t,r,n,i){var o=e&r^e&i^r&i;return o<0&&(o+=4294967296),o}function _(e,t,r,n,i,o){var s=t&n^t&o^n&o;return s<0&&(s+=4294967296),s}function A(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=a(e,t,28)^a(t,e,2)^a(t,e,7);return r<0&&(r+=4294967296),r}function C(e,t){var r=s(e,t,14)^s(e,t,18)^s(t,e,9);return r<0&&(r+=4294967296),r}function x(e,t){var r=a(e,t,14)^a(e,t,18)^a(t,e,9);return r<0&&(r+=4294967296),r}function I(e,t){var r=s(e,t,1)^s(e,t,8)^c(e,t,7);return r<0&&(r+=4294967296),r}function R(e,t){var r=a(e,t,1)^a(e,t,8)^l(e,t,7);return r<0&&(r+=4294967296),r}function P(e,t){var r=s(e,t,19)^s(t,e,29)^c(e,t,6);return r<0&&(r+=4294967296),r}function T(e,t){var r=a(e,t,19)^a(t,e,29)^l(e,t,6);return r<0&&(r+=4294967296),r}n.inherits(b,y),e.exports=b,b.blockSize=1024,b.outSize=512,b.hmacStrength=192,b.padLength=128,b.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=P(r[n-4],r[n-3]),o=T(r[n-4],r[n-3]),s=r[n-14],a=r[n-13],c=I(r[n-30],r[n-29]),l=R(r[n-30],r[n-29]),u=r[n-32],h=r[n-31];r[n]=f(i,o,s,a,c,l,u,h),r[n+1]=p(i,o,s,a,c,l,u,h)}},b.prototype._update=function(e,t){this._prepareBlock(e,t);var r=this.W,n=this.h[0],i=this.h[1],s=this.h[2],a=this.h[3],c=this.h[4],l=this.h[5],f=this.h[6],p=this.h[7],y=this.h[8],v=this.h[9],b=this.h[10],I=this.h[11],R=this.h[12],P=this.h[13],T=this.h[14],N=this.h[15];o(this.k.length===r.length);for(var D=0;D<r.length;D+=2){var O=T,M=N,B=C(y,v),L=x(y,v),U=w(y,v,b,I,R),F=E(y,v,b,I,R,P),j=this.k[D],z=this.k[D+1],K=r[D],q=r[D+1],Z=g(O,M,B,L,U,F,j,z,K,q),V=m(O,M,B,L,U,F,j,z,K,q);O=A(n,i),M=k(n,i),B=S(n,i,s,a,c),L=_(n,i,s,a,c,l);var H=h(O,M,B,L),W=d(O,M,B,L);T=R,N=P,R=b,P=I,b=y,I=v,y=h(f,p,Z,V),v=d(p,p,Z,V),f=c,p=l,c=s,l=a,s=n,a=i,n=h(Z,V,H,W),i=d(Z,V,H,W)}u(this.h,0,n,i),u(this.h,2,s,a),u(this.h,4,c,l),u(this.h,6,f,p),u(this.h,8,y,v),u(this.h,10,b,I),u(this.h,12,R,P),u(this.h,14,T,N)},b.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},3089:(e,t,r)=>{"use strict";var n=r(7657).rotr32;function i(e,t,r){return e&t^~e&r}function o(e,t,r){return e&t^e&r^t&r}function s(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?s(t,r,n):2===e?o(t,r,n):void 0},t.ch32=i,t.maj32=o,t.p32=s,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}},7657:(e,t,r)=>{"use strict";var n=r(5701),i=r(273);function o(e,t){return 55296===(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320===(64512&e.charCodeAt(t+1)))}function s(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function a(e){return 1===e.length?"0"+e:e}function c(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 s=e.charCodeAt(i);s<128?r[n++]=s:s<2048?(r[n++]=s>>6|192,r[n++]=63&s|128):o(e,i)?(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++i)),r[n++]=s>>18|240,r[n++]=s>>12&63|128,r[n++]=s>>6&63|128,r[n++]=63&s|128):(r[n++]=s>>12|224,r[n++]=s>>6&63|128,r[n++]=63&s|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+=a(e[r].toString(16));return t},t.htonl=s,t.toHex32=function(e,t){for(var r="",n=0;n<e.length;n++){var i=e[n];"little"===t&&(i=s(i)),r+=c(i.toString(16))}return r},t.zero2=a,t.zero8=c,t.join32=function(e,t,r,i){var o=r-t;n(o%4===0);for(var s=new Array(o/4),a=0,c=t;a<s.length;a++,c+=4){var l;l="big"===i?e[c]<<24|e[c+1]<<16|e[c+2]<<8|e[c+3]:e[c+3]<<24|e[c+2]<<16|e[c+1]<<8|e[c],s[a]=l>>>0}return s},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,s=(o<n?1:0)+r+i;e[t]=s>>>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,s,a){var c=0,l=t;return c+=(l=l+n>>>0)<t?1:0,c+=(l=l+o>>>0)<o?1:0,e+r+i+s+(c+=(l=l+a>>>0)<a?1:0)>>>0},t.sum64_4_lo=function(e,t,r,n,i,o,s,a){return t+n+o+a>>>0},t.sum64_5_hi=function(e,t,r,n,i,o,s,a,c,l){var u=0,h=t;return u+=(h=h+n>>>0)<t?1:0,u+=(h=h+o>>>0)<o?1:0,u+=(h=h+a>>>0)<a?1:0,e+r+i+s+c+(u+=(h=h+l>>>0)<l?1:0)>>>0},t.sum64_5_lo=function(e,t,r,n,i,o,s,a,c,l){return t+n+o+a+l>>>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}},1026:(e,t,r)=>{var n;!function(){"use strict";var t="object"===typeof window?window:{};!t.HI_BASE32_NO_NODE_JS&&"object"===typeof process&&process.versions&&process.versions.node&&(t=r.g);var i=!t.HI_BASE32_NO_COMMON_JS&&e.exports,o=r.amdO,s="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567".split(""),a={A:0,B:1,C:2,D:3,E:4,F:5,G:6,H:7,I:8,J:9,K:10,L:11,M:12,N:13,O:14,P:15,Q:16,R:17,S:18,T:19,U:20,V:21,W:22,X:23,Y:24,Z:25,2:26,3:27,4:28,5:29,6:30,7:31},c=[0,0,0,0,0,0,0,0],l=function(e,t){t.length>10&&(t="..."+t.substr(-10));var r=new Error("Decoded data is not valid UTF-8. Maybe try base32.decode.asBytes()? Partial data after reading "+e+" bytes: "+t+" <-");throw r.position=e,r},u=function(e){if(""===e)return[];if(!/^[A-Z2-7=]+$/.test(e))throw new Error("Invalid base32 characters");for(var t,r,n,i,o,s,c,l,u=[],h=0,d=(e=e.replace(/=/g,"")).length,f=0,p=d>>3<<3;f<p;)t=a[e.charAt(f++)],r=a[e.charAt(f++)],n=a[e.charAt(f++)],i=a[e.charAt(f++)],o=a[e.charAt(f++)],s=a[e.charAt(f++)],c=a[e.charAt(f++)],l=a[e.charAt(f++)],u[h++]=255&(t<<3|r>>>2),u[h++]=255&(r<<6|n<<1|i>>>4),u[h++]=255&(i<<4|o>>>1),u[h++]=255&(o<<7|s<<2|c>>>3),u[h++]=255&(c<<5|l);var g=d-p;return 2===g?(t=a[e.charAt(f++)],r=a[e.charAt(f++)],u[h++]=255&(t<<3|r>>>2)):4===g?(t=a[e.charAt(f++)],r=a[e.charAt(f++)],n=a[e.charAt(f++)],i=a[e.charAt(f++)],u[h++]=255&(t<<3|r>>>2),u[h++]=255&(r<<6|n<<1|i>>>4)):5===g?(t=a[e.charAt(f++)],r=a[e.charAt(f++)],n=a[e.charAt(f++)],i=a[e.charAt(f++)],o=a[e.charAt(f++)],u[h++]=255&(t<<3|r>>>2),u[h++]=255&(r<<6|n<<1|i>>>4),u[h++]=255&(i<<4|o>>>1)):7===g&&(t=a[e.charAt(f++)],r=a[e.charAt(f++)],n=a[e.charAt(f++)],i=a[e.charAt(f++)],o=a[e.charAt(f++)],s=a[e.charAt(f++)],c=a[e.charAt(f++)],u[h++]=255&(t<<3|r>>>2),u[h++]=255&(r<<6|n<<1|i>>>4),u[h++]=255&(i<<4|o>>>1),u[h++]=255&(o<<7|s<<2|c>>>3)),u},h=function(e,t){if(!t)return function(e){for(var t,r,n="",i=e.length,o=0,s=0;o<i;)if((t=e[o++])<=127)n+=String.fromCharCode(t);else{t>191&&t<=223?(r=31&t,s=1):t<=239?(r=15&t,s=2):t<=247?(r=7&t,s=3):l(o,n);for(var a=0;a<s;++a)((t=e[o++])<128||t>191)&&l(o,n),r<<=6,r+=63&t;r>=55296&&r<=57343&&l(o,n),r>1114111&&l(o,n),r<=65535?n+=String.fromCharCode(r):(r-=65536,n+=String.fromCharCode(55296+(r>>10)),n+=String.fromCharCode(56320+(1023&r)))}return n}(u(e));if(""===e)return"";if(!/^[A-Z2-7=]+$/.test(e))throw new Error("Invalid base32 characters");var r,n,i,o,s,c,h,d,f="",p=e.indexOf("=");-1===p&&(p=e.length);for(var g=0,m=p>>3<<3;g<m;)r=a[e.charAt(g++)],n=a[e.charAt(g++)],i=a[e.charAt(g++)],o=a[e.charAt(g++)],s=a[e.charAt(g++)],c=a[e.charAt(g++)],h=a[e.charAt(g++)],d=a[e.charAt(g++)],f+=String.fromCharCode(255&(r<<3|n>>>2))+String.fromCharCode(255&(n<<6|i<<1|o>>>4))+String.fromCharCode(255&(o<<4|s>>>1))+String.fromCharCode(255&(s<<7|c<<2|h>>>3))+String.fromCharCode(255&(h<<5|d));var y=p-m;return 2===y?(r=a[e.charAt(g++)],n=a[e.charAt(g++)],f+=String.fromCharCode(255&(r<<3|n>>>2))):4===y?(r=a[e.charAt(g++)],n=a[e.charAt(g++)],i=a[e.charAt(g++)],o=a[e.charAt(g++)],f+=String.fromCharCode(255&(r<<3|n>>>2))+String.fromCharCode(255&(n<<6|i<<1|o>>>4))):5===y?(r=a[e.charAt(g++)],n=a[e.charAt(g++)],i=a[e.charAt(g++)],o=a[e.charAt(g++)],s=a[e.charAt(g++)],f+=String.fromCharCode(255&(r<<3|n>>>2))+String.fromCharCode(255&(n<<6|i<<1|o>>>4))+String.fromCharCode(255&(o<<4|s>>>1))):7===y&&(r=a[e.charAt(g++)],n=a[e.charAt(g++)],i=a[e.charAt(g++)],o=a[e.charAt(g++)],s=a[e.charAt(g++)],c=a[e.charAt(g++)],h=a[e.charAt(g++)],f+=String.fromCharCode(255&(r<<3|n>>>2))+String.fromCharCode(255&(n<<6|i<<1|o>>>4))+String.fromCharCode(255&(o<<4|s>>>1))+String.fromCharCode(255&(s<<7|c<<2|h>>>3))),f},d={encode:function(e,t){var r="string"!==typeof e;return r&&e.constructor===ArrayBuffer&&(e=new Uint8Array(e)),r?function(e){for(var t,r,n,i,o,a="",c=e.length,l=0,u=5*parseInt(c/5);l<u;)t=e[l++],r=e[l++],n=e[l++],i=e[l++],o=e[l++],a+=s[t>>>3]+s[31&(t<<2|r>>>6)]+s[r>>>1&31]+s[31&(r<<4|n>>>4)]+s[31&(n<<1|i>>>7)]+s[i>>>2&31]+s[31&(i<<3|o>>>5)]+s[31&o];var h=c-u;return 1===h?(t=e[l],a+=s[t>>>3]+s[t<<2&31]+"======"):2===h?(t=e[l++],r=e[l],a+=s[t>>>3]+s[31&(t<<2|r>>>6)]+s[r>>>1&31]+s[r<<4&31]+"===="):3===h?(t=e[l++],r=e[l++],n=e[l],a+=s[t>>>3]+s[31&(t<<2|r>>>6)]+s[r>>>1&31]+s[31&(r<<4|n>>>4)]+s[n<<1&31]+"==="):4===h&&(t=e[l++],r=e[l++],n=e[l++],i=e[l],a+=s[t>>>3]+s[31&(t<<2|r>>>6)]+s[r>>>1&31]+s[31&(r<<4|n>>>4)]+s[31&(n<<1|i>>>7)]+s[i>>>2&31]+s[i<<3&31]+"="),a}(e):t?function(e){for(var t,r,n,i,o,a="",c=e.length,l=0,u=5*parseInt(c/5);l<u;)t=e.charCodeAt(l++),r=e.charCodeAt(l++),n=e.charCodeAt(l++),i=e.charCodeAt(l++),o=e.charCodeAt(l++),a+=s[t>>>3]+s[31&(t<<2|r>>>6)]+s[r>>>1&31]+s[31&(r<<4|n>>>4)]+s[31&(n<<1|i>>>7)]+s[i>>>2&31]+s[31&(i<<3|o>>>5)]+s[31&o];var h=c-u;return 1===h?(t=e.charCodeAt(l),a+=s[t>>>3]+s[t<<2&31]+"======"):2===h?(t=e.charCodeAt(l++),r=e.charCodeAt(l),a+=s[t>>>3]+s[31&(t<<2|r>>>6)]+s[r>>>1&31]+s[r<<4&31]+"===="):3===h?(t=e.charCodeAt(l++),r=e.charCodeAt(l++),n=e.charCodeAt(l),a+=s[t>>>3]+s[31&(t<<2|r>>>6)]+s[r>>>1&31]+s[31&(r<<4|n>>>4)]+s[n<<1&31]+"==="):4===h&&(t=e.charCodeAt(l++),r=e.charCodeAt(l++),n=e.charCodeAt(l++),i=e.charCodeAt(l),a+=s[t>>>3]+s[31&(t<<2|r>>>6)]+s[r>>>1&31]+s[31&(r<<4|n>>>4)]+s[31&(n<<1|i>>>7)]+s[i>>>2&31]+s[i<<3&31]+"="),a}(e):function(e){var t,r,n,i,o,a,l,u=!1,h="",d=0,f=0,p=e.length;if(""===e)return h;do{for(c[0]=c[5],c[1]=c[6],c[2]=c[7],l=f;d<p&&l<5;++d)(a=e.charCodeAt(d))<128?c[l++]=a:a<2048?(c[l++]=192|a>>6,c[l++]=128|63&a):a<55296||a>=57344?(c[l++]=224|a>>12,c[l++]=128|a>>6&63,c[l++]=128|63&a):(a=65536+((1023&a)<<10|1023&e.charCodeAt(++d)),c[l++]=240|a>>18,c[l++]=128|a>>12&63,c[l++]=128|a>>6&63,c[l++]=128|63&a);f=l-5,d===p&&++d,d>p&&l<6&&(u=!0),t=c[0],l>4?(r=c[1],n=c[2],i=c[3],o=c[4],h+=s[t>>>3]+s[31&(t<<2|r>>>6)]+s[r>>>1&31]+s[31&(r<<4|n>>>4)]+s[31&(n<<1|i>>>7)]+s[i>>>2&31]+s[31&(i<<3|o>>>5)]+s[31&o]):1===l?h+=s[t>>>3]+s[t<<2&31]+"======":2===l?(r=c[1],h+=s[t>>>3]+s[31&(t<<2|r>>>6)]+s[r>>>1&31]+s[r<<4&31]+"===="):3===l?(r=c[1],n=c[2],h+=s[t>>>3]+s[31&(t<<2|r>>>6)]+s[r>>>1&31]+s[31&(r<<4|n>>>4)]+s[n<<1&31]+"==="):(r=c[1],n=c[2],i=c[3],h+=s[t>>>3]+s[31&(t<<2|r>>>6)]+s[r>>>1&31]+s[31&(r<<4|n>>>4)]+s[31&(n<<1|i>>>7)]+s[i>>>2&31]+s[i<<3&31]+"=")}while(!u);return h}(e)},decode:h};h.asBytes=u,i?e.exports=d:(t.base32=d,o&&(void 0===(n=function(){return d}.call(d,r,d,e))||(e.exports=n)))}()},7861:(e,t,r)=>{"use strict";var n=r(9456),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function c(e){return n.isMemo(e)?s:a[e.$$typeof]||i}a[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[n.Memo]=s;var l=Object.defineProperty,u=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,r,n){if("string"!==typeof r){if(p){var i=f(r);i&&i!==p&&e(t,i,n)}var s=u(r);h&&(s=s.concat(h(r)));for(var a=c(t),g=c(r),m=0;m<s.length;++m){var y=s[m];if(!o[y]&&(!n||!n[y])&&(!g||!g[y])&&(!a||!a[y])){var v=d(r,y);try{l(t,y,v)}catch(b){}}}}return t}},229:(e,t)=>{"use strict";var r="function"===typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,o=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,a=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,u=r?Symbol.for("react.async_mode"):60111,h=r?Symbol.for("react.concurrent_mode"):60111,d=r?Symbol.for("react.forward_ref"):60112,f=r?Symbol.for("react.suspense"):60113,p=r?Symbol.for("react.suspense_list"):60120,g=r?Symbol.for("react.memo"):60115,m=r?Symbol.for("react.lazy"):60116,y=r?Symbol.for("react.block"):60121,v=r?Symbol.for("react.fundamental"):60117,b=r?Symbol.for("react.responder"):60118,w=r?Symbol.for("react.scope"):60119;function E(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case u:case h:case o:case a:case s:case f:return e;default:switch(e=e&&e.$$typeof){case l:case d:case m:case g:case c:return e;default:return t}}case i:return t}}}function S(e){return E(e)===h}t.AsyncMode=u,t.ConcurrentMode=h,t.ContextConsumer=l,t.ContextProvider=c,t.Element=n,t.ForwardRef=d,t.Fragment=o,t.Lazy=m,t.Memo=g,t.Portal=i,t.Profiler=a,t.StrictMode=s,t.Suspense=f,t.isAsyncMode=function(e){return S(e)||E(e)===u},t.isConcurrentMode=S,t.isContextConsumer=function(e){return E(e)===l},t.isContextProvider=function(e){return E(e)===c},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return E(e)===d},t.isFragment=function(e){return E(e)===o},t.isLazy=function(e){return E(e)===m},t.isMemo=function(e){return E(e)===g},t.isPortal=function(e){return E(e)===i},t.isProfiler=function(e){return E(e)===a},t.isStrictMode=function(e){return E(e)===s},t.isSuspense=function(e){return E(e)===f},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===o||e===h||e===a||e===s||e===f||e===p||"object"===typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===g||e.$$typeof===c||e.$$typeof===l||e.$$typeof===d||e.$$typeof===v||e.$$typeof===b||e.$$typeof===w||e.$$typeof===y)},t.typeOf=E},9456:(e,t,r)=>{"use strict";e.exports=r(229)},273: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}}},7967:function(e){!function(t){"use strict";const r="(0?\\d+|0x[a-f0-9]+)",n={fourOctet:new RegExp("^".concat(r,"\\.").concat(r,"\\.").concat(r,"\\.").concat(r,"$"),"i"),threeOctet:new RegExp("^".concat(r,"\\.").concat(r,"\\.").concat(r,"$"),"i"),twoOctet:new RegExp("^".concat(r,"\\.").concat(r,"$"),"i"),longValue:new RegExp("^".concat(r,"$"),"i")},i=new RegExp("^0[0-7]+$","i"),o=new RegExp("^0x[a-f0-9]+$","i"),s="%[0-9a-z]{1,}",a="(?:[0-9a-f]+::?)+",c={zoneIndex:new RegExp(s,"i"),native:new RegExp("^(::)?(".concat(a,")?([0-9a-f]+)?(::)?(").concat(s,")?$"),"i"),deprecatedTransitional:new RegExp("^(?:::)(".concat(r,"\\.").concat(r,"\\.").concat(r,"\\.").concat(r,"(").concat(s,")?)$"),"i"),transitional:new RegExp("^((?:".concat(a,")|(?:::)(?:").concat(a,")?)").concat(r,"\\.").concat(r,"\\.").concat(r,"\\.").concat(r,"(").concat(s,")?$"),"i")};function l(e,t){if(e.indexOf("::")!==e.lastIndexOf("::"))return null;let r,n,i=0,o=-1,s=(e.match(c.zoneIndex)||[])[0];for(s&&(s=s.substring(1),e=e.replace(/%.+$/,""));(o=e.indexOf(":",o+1))>=0;)i++;if("::"===e.substr(0,2)&&i--,"::"===e.substr(-2,2)&&i--,i>t)return null;for(n=t-i,r=":";n--;)r+="0:";return":"===(e=e.replace("::",r))[0]&&(e=e.slice(1)),":"===e[e.length-1]&&(e=e.slice(0,-1)),{parts:t=function(){const t=e.split(":"),r=[];for(let e=0;e<t.length;e++)r.push(parseInt(t[e],16));return r}(),zoneId:s}}function u(e,t,r,n){if(e.length!==t.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let i,o=0;for(;n>0;){if(i=r-n,i<0&&(i=0),e[o]>>i!==t[o]>>i)return!1;n-=r,o+=1}return!0}function h(e){if(o.test(e))return parseInt(e,16);if("0"===e[0]&&!isNaN(parseInt(e[1],10))){if(i.test(e))return parseInt(e,8);throw new Error("ipaddr: cannot parse ".concat(e," as octal"))}return parseInt(e,10)}function d(e,t){for(;e.length<t;)e="0".concat(e);return e}const f={};f.IPv4=function(){function e(e){if(4!==e.length)throw new Error("ipaddr: ipv4 octet count should be 4");let t,r;for(t=0;t<e.length;t++)if(r=e[t],!(0<=r&&r<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=e}return e.prototype.SpecialRanges={unspecified:[[new e([0,0,0,0]),8]],broadcast:[[new e([255,255,255,255]),32]],multicast:[[new e([224,0,0,0]),4]],linkLocal:[[new e([169,254,0,0]),16]],loopback:[[new e([127,0,0,0]),8]],carrierGradeNat:[[new e([100,64,0,0]),10]],private:[[new e([10,0,0,0]),8],[new e([172,16,0,0]),12],[new e([192,168,0,0]),16]],reserved:[[new e([192,0,0,0]),24],[new e([192,0,2,0]),24],[new e([192,88,99,0]),24],[new e([198,18,0,0]),15],[new e([198,51,100,0]),24],[new e([203,0,113,0]),24],[new e([240,0,0,0]),4]]},e.prototype.kind=function(){return"ipv4"},e.prototype.match=function(e,t){let r;if(void 0===t&&(r=e,e=r[0],t=r[1]),"ipv4"!==e.kind())throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return u(this.octets,e.octets,8,t)},e.prototype.prefixLengthFromSubnetMask=function(){let e=0,t=!1;const r={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0};let n,i,o;for(n=3;n>=0;n-=1){if(i=this.octets[n],!(i in r))return null;if(o=r[i],t&&0!==o)return null;8!==o&&(t=!0),e+=o}return 32-e},e.prototype.range=function(){return f.subnetMatch(this,this.SpecialRanges)},e.prototype.toByteArray=function(){return this.octets.slice(0)},e.prototype.toIPv4MappedAddress=function(){return f.IPv6.parse("::ffff:".concat(this.toString()))},e.prototype.toNormalizedString=function(){return this.toString()},e.prototype.toString=function(){return this.octets.join(".")},e}(),f.IPv4.broadcastAddressFromCIDR=function(e){try{const t=this.parseCIDR(e),r=t[0].toByteArray(),n=this.subnetMaskFromPrefixLength(t[1]).toByteArray(),i=[];let o=0;for(;o<4;)i.push(parseInt(r[o],10)|255^parseInt(n[o],10)),o++;return new this(i)}catch(t){throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},f.IPv4.isIPv4=function(e){return null!==this.parser(e)},f.IPv4.isValid=function(e){try{return new this(this.parser(e)),!0}catch(t){return!1}},f.IPv4.isValidFourPartDecimal=function(e){return!(!f.IPv4.isValid(e)||!e.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},f.IPv4.networkAddressFromCIDR=function(e){let t,r,n,i,o;try{for(t=this.parseCIDR(e),n=t[0].toByteArray(),o=this.subnetMaskFromPrefixLength(t[1]).toByteArray(),i=[],r=0;r<4;)i.push(parseInt(n[r],10)&parseInt(o[r],10)),r++;return new this(i)}catch(s){throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},f.IPv4.parse=function(e){const t=this.parser(e);if(null===t)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(t)},f.IPv4.parseCIDR=function(e){let t;if(t=e.match(/^(.+)\/(\d+)$/)){const e=parseInt(t[2]);if(e>=0&&e<=32){const r=[this.parse(t[1]),e];return Object.defineProperty(r,"toString",{value:function(){return this.join("/")}}),r}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},f.IPv4.parser=function(e){let t,r,i;if(t=e.match(n.fourOctet))return function(){const e=t.slice(1,6),n=[];for(let t=0;t<e.length;t++)r=e[t],n.push(h(r));return n}();if(t=e.match(n.longValue)){if(i=h(t[1]),i>4294967295||i<0)throw new Error("ipaddr: address outside defined range");return function(){const e=[];let t;for(t=0;t<=24;t+=8)e.push(i>>t&255);return e}().reverse()}return(t=e.match(n.twoOctet))?function(){const e=t.slice(1,4),r=[];if(i=h(e[1]),i>16777215||i<0)throw new Error("ipaddr: address outside defined range");return r.push(h(e[0])),r.push(i>>16&255),r.push(i>>8&255),r.push(255&i),r}():(t=e.match(n.threeOctet))?function(){const e=t.slice(1,5),r=[];if(i=h(e[2]),i>65535||i<0)throw new Error("ipaddr: address outside defined range");return r.push(h(e[0])),r.push(h(e[1])),r.push(i>>8&255),r.push(255&i),r}():null},f.IPv4.subnetMaskFromPrefixLength=function(e){if((e=parseInt(e))<0||e>32)throw new Error("ipaddr: invalid IPv4 prefix length");const t=[0,0,0,0];let r=0;const n=Math.floor(e/8);for(;r<n;)t[r]=255,r++;return n<4&&(t[n]=Math.pow(2,e%8)-1<<8-e%8),new this(t)},f.IPv6=function(){function e(e,t){let r,n;if(16===e.length)for(this.parts=[],r=0;r<=14;r+=2)this.parts.push(e[r]<<8|e[r+1]);else{if(8!==e.length)throw new Error("ipaddr: ipv6 part count should be 8 or 16");this.parts=e}for(r=0;r<this.parts.length;r++)if(n=this.parts[r],!(0<=n&&n<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");t&&(this.zoneId=t)}return e.prototype.SpecialRanges={unspecified:[new e([0,0,0,0,0,0,0,0]),128],linkLocal:[new e([65152,0,0,0,0,0,0,0]),10],multicast:[new e([65280,0,0,0,0,0,0,0]),8],loopback:[new e([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new e([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new e([0,0,0,0,0,65535,0,0]),96],rfc6145:[new e([0,0,0,0,65535,0,0,0]),96],rfc6052:[new e([100,65435,0,0,0,0,0,0]),96],"6to4":[new e([8194,0,0,0,0,0,0,0]),16],teredo:[new e([8193,0,0,0,0,0,0,0]),32],reserved:[[new e([8193,3512,0,0,0,0,0,0]),32]],benchmarking:[new e([8193,2,0,0,0,0,0,0]),48],amt:[new e([8193,3,0,0,0,0,0,0]),32],as112v6:[new e([8193,4,274,0,0,0,0,0]),48],deprecated:[new e([8193,16,0,0,0,0,0,0]),28],orchid2:[new e([8193,32,0,0,0,0,0,0]),28]},e.prototype.isIPv4MappedAddress=function(){return"ipv4Mapped"===this.range()},e.prototype.kind=function(){return"ipv6"},e.prototype.match=function(e,t){let r;if(void 0===t&&(r=e,e=r[0],t=r[1]),"ipv6"!==e.kind())throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return u(this.parts,e.parts,16,t)},e.prototype.prefixLengthFromSubnetMask=function(){let e=0,t=!1;const r={0:16,32768:15,49152:14,57344:13,61440:12,63488:11,64512:10,65024:9,65280:8,65408:7,65472:6,65504:5,65520:4,65528:3,65532:2,65534:1,65535:0};let n,i;for(let o=7;o>=0;o-=1){if(n=this.parts[o],!(n in r))return null;if(i=r[n],t&&0!==i)return null;16!==i&&(t=!0),e+=i}return 128-e},e.prototype.range=function(){return f.subnetMatch(this,this.SpecialRanges)},e.prototype.toByteArray=function(){let e;const t=[],r=this.parts;for(let n=0;n<r.length;n++)e=r[n],t.push(e>>8),t.push(255&e);return t},e.prototype.toFixedLengthString=function(){const e=function(){const e=[];for(let t=0;t<this.parts.length;t++)e.push(d(this.parts[t].toString(16),4));return e}.call(this).join(":");let t="";return this.zoneId&&(t="%".concat(this.zoneId)),e+t},e.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");const e=this.parts.slice(-2),t=e[0],r=e[1];return new f.IPv4([t>>8,255&t,r>>8,255&r])},e.prototype.toNormalizedString=function(){const e=function(){const e=[];for(let t=0;t<this.parts.length;t++)e.push(this.parts[t].toString(16));return e}.call(this).join(":");let t="";return this.zoneId&&(t="%".concat(this.zoneId)),e+t},e.prototype.toRFC5952String=function(){const e=/((^|:)(0(:|$)){2,})/g,t=this.toNormalizedString();let r,n=0,i=-1;for(;r=e.exec(t);)r[0].length>i&&(n=r.index,i=r[0].length);return i<0?t:"".concat(t.substring(0,n),"::").concat(t.substring(n+i))},e.prototype.toString=function(){return this.toRFC5952String()},e}(),f.IPv6.broadcastAddressFromCIDR=function(e){try{const t=this.parseCIDR(e),r=t[0].toByteArray(),n=this.subnetMaskFromPrefixLength(t[1]).toByteArray(),i=[];let o=0;for(;o<16;)i.push(parseInt(r[o],10)|255^parseInt(n[o],10)),o++;return new this(i)}catch(t){throw new Error("ipaddr: the address does not have IPv6 CIDR format (".concat(t,")"))}},f.IPv6.isIPv6=function(e){return null!==this.parser(e)},f.IPv6.isValid=function(e){if("string"===typeof e&&-1===e.indexOf(":"))return!1;try{const t=this.parser(e);return new this(t.parts,t.zoneId),!0}catch(t){return!1}},f.IPv6.networkAddressFromCIDR=function(e){let t,r,n,i,o;try{for(t=this.parseCIDR(e),n=t[0].toByteArray(),o=this.subnetMaskFromPrefixLength(t[1]).toByteArray(),i=[],r=0;r<16;)i.push(parseInt(n[r],10)&parseInt(o[r],10)),r++;return new this(i)}catch(s){throw new Error("ipaddr: the address does not have IPv6 CIDR format (".concat(s,")"))}},f.IPv6.parse=function(e){const t=this.parser(e);if(null===t.parts)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(t.parts,t.zoneId)},f.IPv6.parseCIDR=function(e){let t,r,n;if((r=e.match(/^(.+)\/(\d+)$/))&&(t=parseInt(r[2]),t>=0&&t<=128))return n=[this.parse(r[1]),t],Object.defineProperty(n,"toString",{value:function(){return this.join("/")}}),n;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},f.IPv6.parser=function(e){let t,r,n,i,o,s;if(n=e.match(c.deprecatedTransitional))return this.parser("::ffff:".concat(n[1]));if(c.native.test(e))return l(e,8);if((n=e.match(c.transitional))&&(s=n[6]||"",t=l(n[1].slice(0,-1)+s,6),t.parts)){for(o=[parseInt(n[2]),parseInt(n[3]),parseInt(n[4]),parseInt(n[5])],r=0;r<o.length;r++)if(i=o[r],!(0<=i&&i<=255))return null;return t.parts.push(o[0]<<8|o[1]),t.parts.push(o[2]<<8|o[3]),{parts:t.parts,zoneId:t.zoneId}}return null},f.IPv6.subnetMaskFromPrefixLength=function(e){if((e=parseInt(e))<0||e>128)throw new Error("ipaddr: invalid IPv6 prefix length");const t=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];let r=0;const n=Math.floor(e/8);for(;r<n;)t[r]=255,r++;return n<16&&(t[n]=Math.pow(2,e%8)-1<<8-e%8),new this(t)},f.fromByteArray=function(e){const t=e.length;if(4===t)return new f.IPv4(e);if(16===t)return new f.IPv6(e);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},f.isValid=function(e){return f.IPv6.isValid(e)||f.IPv4.isValid(e)},f.parse=function(e){if(f.IPv6.isValid(e))return f.IPv6.parse(e);if(f.IPv4.isValid(e))return f.IPv4.parse(e);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},f.parseCIDR=function(e){try{return f.IPv6.parseCIDR(e)}catch(t){try{return f.IPv4.parseCIDR(e)}catch(r){throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},f.process=function(e){const t=this.parse(e);return"ipv6"===t.kind()&&t.isIPv4MappedAddress()?t.toIPv4Address():t},f.subnetMatch=function(e,t,r){let n,i,o,s;for(i in void 0!==r&&null!==r||(r="unicast"),t)if(Object.prototype.hasOwnProperty.call(t,i))for(o=t[i],!o[0]||o[0]instanceof Array||(o=[o]),n=0;n<o.length;n++)if(s=o[n],e.kind()===s[0].kind()&&e.match.apply(e,s))return i;return r},e.exports?e.exports=f:t.ipaddr=f}(this)},6956:e=>{e.exports=function(){return"undefined"!==typeof window&&"object"===typeof window.process&&"renderer"===window.process.type||(!("undefined"===typeof process||"object"!==typeof process.versions||!process.versions.electron)||"object"===typeof navigator&&"string"===typeof navigator.userAgent&&navigator.userAgent.indexOf("Electron")>=0)}},3181:e=>{"use strict";e.exports=e=>{if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}},4114:(e,t,r)=>{"use strict";const{URLWithLegacySupport:n,format:i,URLSearchParams:o,defaultBase:s}=r(7401),a=r(8637);e.exports={URL:n,URLSearchParams:o,format:i,relative:a,defaultBase:s}},8637:(e,t,r)=>{"use strict";const{URLWithLegacySupport:n,format:i}=r(7401);e.exports=function(e){let t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=arguments.length>3?arguments[3]:void 0,a=r.protocol?r.protocol.replace(":",""):"http";a=(o[a]||s||a)+":";try{t=new n(e)}catch(l){t={}}const c=Object.assign({},r,{protocol:a||t.protocol,host:r.host||t.host});return new n(e,i(c)).toString()}},7401:e=>{"use strict";const t="undefined"!==typeof navigator&&"ReactNative"===navigator.product;const r=self.URL,n=t?"http://localhost":self.location?self.location.protocol+"//"+self.location.host:"";e.exports={URLWithLegacySupport:class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n;this.super=new r(e,t),this.path=this.pathname+this.search,this.auth=this.username&&this.password?this.username+":"+this.password:null,this.query=this.search&&this.search.startsWith("?")?this.search.slice(1):null}get hash(){return this.super.hash}get host(){return this.super.host}get hostname(){return this.super.hostname}get href(){return this.super.href}get origin(){return this.super.origin}get password(){return this.super.password}get pathname(){return this.super.pathname}get port(){return this.super.port}get protocol(){return this.super.protocol}get search(){return this.super.search}get searchParams(){return this.super.searchParams}get username(){return this.super.username}set hash(e){this.super.hash=e}set host(e){this.super.host=e}set hostname(e){this.super.hostname=e}set href(e){this.super.href=e}set password(e){this.super.password=e}set pathname(e){this.super.pathname=e}set port(e){this.super.port=e}set protocol(e){this.super.protocol=e}set search(e){this.super.search=e}set username(e){this.super.username=e}static createObjectURL(e){return r.createObjectURL(e)}static revokeObjectURL(e){r.revokeObjectURL(e)}toJSON(){return this.super.toJSON()}toString(){return this.super.toString()}format(){return this.toString()}},URLSearchParams:self.URLSearchParams,defaultBase:n,format:function(e){if("string"===typeof e){return new r(e).toString()}if(!(e instanceof r)){const t=e.username&&e.password?"".concat(e.username,":").concat(e.password,"@"):"",r=e.auth?e.auth+"@":"",n=e.port?":"+e.port:"",i=e.protocol?e.protocol+"//":"",o=e.host||"",s=e.hostname||"",a=e.search||(e.query?"?"+e.query:""),c=e.hash||"",l=e.pathname||"",u=e.path||l+a;return"".concat(i).concat(t||r).concat(o||s+n).concat(u).concat(c)}}}},7676:(e,t,r)=>{var n;!function(){"use strict";var i="input is invalid type",o="object"===typeof window,s=o?window:{};s.JS_SHA3_NO_WINDOW&&(o=!1);var a=!o&&"object"===typeof self;!s.JS_SHA3_NO_NODE_JS&&"object"===typeof process&&process.versions&&process.versions.node?s=r.g:a&&(s=self);var c=!s.JS_SHA3_NO_COMMON_JS&&e.exports,l=r.amdO,u=!s.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!==typeof ArrayBuffer,h="0123456789abcdef".split(""),d=[4,1024,262144,67108864],f=[0,8,16,24],p=[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],g=[224,256,384,512],m=[128,256],y=["hex","buffer","arrayBuffer","array","digest"],v={128:168,256:136};!s.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!u||!s.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"===typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var b=function(e,t,r){return function(n){return new O(e,t,e).update(n)[r]()}},w=function(e,t,r){return function(n,i){return new O(e,t,i).update(n)[r]()}},E=function(e,t,r){return function(t,n,i,o){return C["cshake"+e].update(t,n,i,o)[r]()}},S=function(e,t,r){return function(t,n,i,o){return C["kmac"+e].update(t,n,i,o)[r]()}},_=function(e,t,r,n){for(var i=0;i<y.length;++i){var o=y[i];e[o]=t(r,n,o)}return e},A=function(e,t){var r=b(e,t,"hex");return r.create=function(){return new O(e,t,e)},r.update=function(e){return r.create().update(e)},_(r,b,e,t)},k=[{name:"keccak",padding:[1,256,65536,16777216],bits:g,createMethod:A},{name:"sha3",padding:[6,1536,393216,100663296],bits:g,createMethod:A},{name:"shake",padding:[31,7936,2031616,520093696],bits:m,createMethod:function(e,t){var r=w(e,t,"hex");return r.create=function(r){return new O(e,t,r)},r.update=function(e,t){return r.create(t).update(e)},_(r,w,e,t)}},{name:"cshake",padding:d,bits:m,createMethod:function(e,t){var r=v[e],n=E(e,0,"hex");return n.create=function(n,i,o){return i||o?new O(e,t,n).bytepad([i,o],r):C["shake"+e].create(n)},n.update=function(e,t,r,i){return n.create(t,r,i).update(e)},_(n,E,e,t)}},{name:"kmac",padding:d,bits:m,createMethod:function(e,t){var r=v[e],n=S(e,0,"hex");return n.create=function(n,i,o){return new M(e,t,i).bytepad(["KMAC",o],r).bytepad([n],r)},n.update=function(e,t,r,i){return n.create(e,r,i).update(t)},_(n,S,e,t)}}],C={},x=[],I=0;I<k.length;++I)for(var R=k[I],P=R.bits,T=0;T<P.length;++T){var N=R.name+"_"+P[T];if(x.push(N),C[N]=R.createMethod(P[T],R.padding),"sha3"!==R.name){var D=R.name+P[T];x.push(D),C[D]=C[N]}}function O(e,t,r){this.blocks=[],this.s=[],this.padding=t,this.outputBits=r,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(e<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function M(e,t,r){O.call(this,e,t,r)}O.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(i);if(null===e)throw new Error(i);if(u&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!u||!ArrayBuffer.isView(e)))throw new Error(i);t=!0}for(var n,o,s=this.blocks,a=this.byteCount,c=e.length,l=this.blockCount,h=0,d=this.s;h<c;){if(this.reset)for(this.reset=!1,s[0]=this.block,n=1;n<l+1;++n)s[n]=0;if(t)for(n=this.start;h<c&&n<a;++h)s[n>>2]|=e[h]<<f[3&n++];else for(n=this.start;h<c&&n<a;++h)(o=e.charCodeAt(h))<128?s[n>>2]|=o<<f[3&n++]:o<2048?(s[n>>2]|=(192|o>>6)<<f[3&n++],s[n>>2]|=(128|63&o)<<f[3&n++]):o<55296||o>=57344?(s[n>>2]|=(224|o>>12)<<f[3&n++],s[n>>2]|=(128|o>>6&63)<<f[3&n++],s[n>>2]|=(128|63&o)<<f[3&n++]):(o=65536+((1023&o)<<10|1023&e.charCodeAt(++h)),s[n>>2]|=(240|o>>18)<<f[3&n++],s[n>>2]|=(128|o>>12&63)<<f[3&n++],s[n>>2]|=(128|o>>6&63)<<f[3&n++],s[n>>2]|=(128|63&o)<<f[3&n++]);if(this.lastByteIndex=n,n>=a){for(this.start=n-a,this.block=s[l],n=0;n<l;++n)d[n]^=s[n];B(d),this.reset=!0}else this.start=n}return this},O.prototype.encode=function(e,t){var r=255&e,n=1,i=[r];for(r=255&(e>>=8);r>0;)i.unshift(r),r=255&(e>>=8),++n;return t?i.push(n):i.unshift(n),this.update(i),i.length},O.prototype.encodeString=function(e){var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(i);if(null===e)throw new Error(i);if(u&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!u||!ArrayBuffer.isView(e)))throw new Error(i);t=!0}var n=0,o=e.length;if(t)n=o;else for(var s=0;s<e.length;++s){var a=e.charCodeAt(s);a<128?n+=1:a<2048?n+=2:a<55296||a>=57344?n+=3:(a=65536+((1023&a)<<10|1023&e.charCodeAt(++s)),n+=4)}return n+=this.encode(8*n),this.update(e),n},O.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n<e.length;++n)r+=this.encodeString(e[n]);var i=t-r%t,o=[];return o.length=i,this.update(o),this},O.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex,r=this.blockCount,n=this.s;if(e[t>>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t<r+1;++t)e[t]=0;for(e[r-1]|=2147483648,t=0;t<r;++t)n[t]^=e[t];B(n)}},O.prototype.toString=O.prototype.hex=function(){this.finalize();for(var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,s=0,a="";s<n;){for(o=0;o<t&&s<n;++o,++s)e=r[o],a+=h[e>>4&15]+h[15&e]+h[e>>12&15]+h[e>>8&15]+h[e>>20&15]+h[e>>16&15]+h[e>>28&15]+h[e>>24&15];s%t===0&&(B(r),o=0)}return i&&(e=r[o],a+=h[e>>4&15]+h[15&e],i>1&&(a+=h[e>>12&15]+h[e>>8&15]),i>2&&(a+=h[e>>20&15]+h[e>>16&15])),a},O.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,s=0,a=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(a);for(var c=new Uint32Array(e);s<n;){for(o=0;o<t&&s<n;++o,++s)c[s]=r[o];s%t===0&&B(r)}return i&&(c[o]=r[o],e=e.slice(0,a)),e},O.prototype.buffer=O.prototype.arrayBuffer,O.prototype.digest=O.prototype.array=function(){this.finalize();for(var e,t,r=this.blockCount,n=this.s,i=this.outputBlocks,o=this.extraBytes,s=0,a=0,c=[];a<i;){for(s=0;s<r&&a<i;++s,++a)e=a<<2,t=n[s],c[e]=255&t,c[e+1]=t>>8&255,c[e+2]=t>>16&255,c[e+3]=t>>24&255;a%r===0&&B(n)}return o&&(e=a<<2,t=n[s],c[e]=255&t,o>1&&(c[e+1]=t>>8&255),o>2&&(c[e+2]=t>>16&255)),c},M.prototype=new O,M.prototype.finalize=function(){return this.encode(this.outputBits,!0),O.prototype.finalize.call(this)};var B=function(e){var t,r,n,i,o,s,a,c,l,u,h,d,f,g,m,y,v,b,w,E,S,_,A,k,C,x,I,R,P,T,N,D,O,M,B,L,U,F,j,z,K,q,Z,V,H,W,G,Y,Q,J,X,$,ee,te,re,ne,ie,oe,se,ae,ce,le,ue;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],s=e[2]^e[12]^e[22]^e[32]^e[42],a=e[3]^e[13]^e[23]^e[33]^e[43],c=e[4]^e[14]^e[24]^e[34]^e[44],l=e[5]^e[15]^e[25]^e[35]^e[45],u=e[6]^e[16]^e[26]^e[36]^e[46],h=e[7]^e[17]^e[27]^e[37]^e[47],t=(d=e[8]^e[18]^e[28]^e[38]^e[48])^(s<<1|a>>>31),r=(f=e[9]^e[19]^e[29]^e[39]^e[49])^(a<<1|s>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(c<<1|l>>>31),r=o^(l<<1|c>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=s^(u<<1|h>>>31),r=a^(h<<1|u>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=c^(d<<1|f>>>31),r=l^(f<<1|d>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=u^(i<<1|o>>>31),r=h^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,g=e[0],m=e[1],W=e[11]<<4|e[10]>>>28,G=e[10]<<4|e[11]>>>28,R=e[20]<<3|e[21]>>>29,P=e[21]<<3|e[20]>>>29,ae=e[31]<<9|e[30]>>>23,ce=e[30]<<9|e[31]>>>23,q=e[40]<<18|e[41]>>>14,Z=e[41]<<18|e[40]>>>14,M=e[2]<<1|e[3]>>>31,B=e[3]<<1|e[2]>>>31,y=e[13]<<12|e[12]>>>20,v=e[12]<<12|e[13]>>>20,Y=e[22]<<10|e[23]>>>22,Q=e[23]<<10|e[22]>>>22,T=e[33]<<13|e[32]>>>19,N=e[32]<<13|e[33]>>>19,le=e[42]<<2|e[43]>>>30,ue=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,L=e[14]<<6|e[15]>>>26,U=e[15]<<6|e[14]>>>26,b=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,J=e[34]<<15|e[35]>>>17,X=e[35]<<15|e[34]>>>17,D=e[45]<<29|e[44]>>>3,O=e[44]<<29|e[45]>>>3,k=e[6]<<28|e[7]>>>4,C=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,F=e[26]<<25|e[27]>>>7,j=e[27]<<25|e[26]>>>7,E=e[36]<<21|e[37]>>>11,S=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,V=e[8]<<27|e[9]>>>5,H=e[9]<<27|e[8]>>>5,x=e[18]<<20|e[19]>>>12,I=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,se=e[28]<<7|e[29]>>>25,z=e[38]<<8|e[39]>>>24,K=e[39]<<8|e[38]>>>24,_=e[48]<<14|e[49]>>>18,A=e[49]<<14|e[48]>>>18,e[0]=g^~y&b,e[1]=m^~v&w,e[10]=k^~x&R,e[11]=C^~I&P,e[20]=M^~L&F,e[21]=B^~U&j,e[30]=V^~W&Y,e[31]=H^~G&Q,e[40]=te^~ne&oe,e[41]=re^~ie&se,e[2]=y^~b&E,e[3]=v^~w&S,e[12]=x^~R&T,e[13]=I^~P&N,e[22]=L^~F&z,e[23]=U^~j&K,e[32]=W^~Y&J,e[33]=G^~Q&X,e[42]=ne^~oe&ae,e[43]=ie^~se&ce,e[4]=b^~E&_,e[5]=w^~S&A,e[14]=R^~T&D,e[15]=P^~N&O,e[24]=F^~z&q,e[25]=j^~K&Z,e[34]=Y^~J&$,e[35]=Q^~X&ee,e[44]=oe^~ae&le,e[45]=se^~ce&ue,e[6]=E^~_&g,e[7]=S^~A&m,e[16]=T^~D&k,e[17]=N^~O&C,e[26]=z^~q&M,e[27]=K^~Z&B,e[36]=J^~$&V,e[37]=X^~ee&H,e[46]=ae^~le&te,e[47]=ce^~ue&re,e[8]=_^~g&y,e[9]=A^~m&v,e[18]=D^~k&x,e[19]=O^~C&I,e[28]=q^~M&L,e[29]=Z^~B&U,e[38]=$^~V&W,e[39]=ee^~H&G,e[48]=le^~te&ne,e[49]=ue^~re&ie,e[0]^=p[n],e[1]^=p[n+1]};if(c)e.exports=C;else{for(I=0;I<x.length;++I)s[x[I]]=C[x[I]];l&&(void 0===(n=function(){return C}.call(t,r,t,e))||(e.exports=n))}}()},308:function(e,t,r){"use strict";const n=r(3181),{hasOwnProperty:i}=Object.prototype,{propertyIsEnumerable:o}=Object,s=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0}),a=this,c={concatArrays:!1,ignoreUndefined:!1},l=e=>{const t=[];for(const r in e)i.call(e,r)&&t.push(r);if(Object.getOwnPropertySymbols){const r=Object.getOwnPropertySymbols(e);for(const n of r)o.call(e,n)&&t.push(n)}return t};function u(e){return Array.isArray(e)?function(e){const t=e.slice(0,0);return l(e).forEach((r=>{s(t,r,u(e[r]))})),t}(e):n(e)?function(e){const t=null===Object.getPrototypeOf(e)?Object.create(null):{};return l(e).forEach((r=>{s(t,r,u(e[r]))})),t}(e):e}const h=(e,t,r,n)=>(r.forEach((r=>{"undefined"===typeof t[r]&&n.ignoreUndefined||(r in e&&e[r]!==Object.getPrototypeOf(e)?s(e,r,d(e[r],t[r],n)):s(e,r,u(t[r])))})),e);function d(e,t,r){return r.concatArrays&&Array.isArray(e)&&Array.isArray(t)?((e,t,r)=>{let n=e.slice(0,0),o=0;return[e,t].forEach((t=>{const a=[];for(let r=0;r<t.length;r++)i.call(t,r)&&(a.push(String(r)),s(n,o++,t===e?t[r]:u(t[r])));n=h(n,t,l(t).filter((e=>!a.includes(e))),r)})),n})(e,t,r):n(t)&&n(e)?h(e,t,l(t),r):u(t)}e.exports=function(){const e=d(u(c),this!==a&&this||{},c);let t={_:{}};for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];for(const s of i)if(void 0!==s){if(!n(s))throw new TypeError("`"+s+"` is not an Option Object");t=d(t,{_:s},e)}return t._}},5701: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)}},5187:e=>{var t=1e3,r=60*t,n=60*r,i=24*n,o=7*i,s=365.25*i;function a(e,t,r,n){var i=t>=1.5*r;return Math.round(e/r)+" "+n+(i?"s":"")}e.exports=function(e,c){c=c||{};var l=typeof e;if("string"===l&&e.length>0)return function(e){if((e=String(e)).length>100)return;var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!a)return;var c=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*s;case"weeks":case"week":case"w":return c*o;case"days":case"day":case"d":return c*i;case"hours":case"hour":case"hrs":case"hr":case"h":return c*n;case"minutes":case"minute":case"mins":case"min":case"m":return c*r;case"seconds":case"second":case"secs":case"sec":case"s":return c*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(e);if("number"===l&&isFinite(e))return c.long?function(e){var o=Math.abs(e);if(o>=i)return a(e,o,i,"day");if(o>=n)return a(e,o,n,"hour");if(o>=r)return a(e,o,r,"minute");if(o>=t)return a(e,o,t,"second");return e+" ms"}(e):function(e){var o=Math.abs(e);if(o>=i)return Math.round(e/i)+"d";if(o>=n)return Math.round(e/n)+"h";if(o>=r)return Math.round(e/r)+"m";if(o>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},5181:function(e,t){(function(){var e,r,n,i,o,s,a,c;c=function(e){return[(e&255<<24)>>>24,(e&255<<16)>>>16,(65280&e)>>>8,255&e].join(".")},a=function(e){var t,n,i,o,s,a;for(t=[],i=o=0;o<=3&&0!==e.length;i=++o){if(i>0){if("."!==e[0])throw new Error("Invalid IP");e=e.substring(1)}s=(a=r(e))[0],n=a[1],e=e.substring(n),t.push(s)}if(0!==e.length)throw new Error("Invalid IP");switch(t.length){case 1:if(t[0]>4294967295)throw new Error("Invalid IP");return t[0]>>>0;case 2:if(t[0]>255||t[1]>16777215)throw new Error("Invalid IP");return(t[0]<<24|t[1])>>>0;case 3:if(t[0]>255||t[1]>255||t[2]>65535)throw new Error("Invalid IP");return(t[0]<<24|t[1]<<16|t[2])>>>0;case 4:if(t[0]>255||t[1]>255||t[2]>255||t[3]>255)throw new Error("Invalid IP");return(t[0]<<24|t[1]<<16|t[2]<<8|t[3])>>>0;default:throw new Error("Invalid IP")}},i=(n=function(e){return e.charCodeAt(0)})("0"),s=n("a"),o=n("A"),r=function(e){var t,r,a,c,l;for(c=0,t=10,r="9",a=0,e.length>1&&"0"===e[a]&&("x"===e[a+1]||"X"===e[a+1]?(a+=2,t=16):"0"<=e[a+1]&&e[a+1]<="9"&&(a++,t=8,r="7")),l=a;a<e.length;){if("0"<=e[a]&&e[a]<=r)c=c*t+(n(e[a])-i)>>>0;else{if(16!==t)break;if("a"<=e[a]&&e[a]<="f")c=c*t+(10+n(e[a])-s)>>>0;else{if(!("A"<=e[a]&&e[a]<="F"))break;c=c*t+(10+n(e[a])-o)>>>0}}if(c>4294967295)throw new Error("too large");a++}if(a===l)throw new Error("empty octet");return[c,a]},e=function(){function e(e,t){var r,n,i;if("string"!==typeof e)throw new Error("Missing `net' parameter");if(t||(i=e.split("/",2),e=i[0],t=i[1]),t||(t=32),"string"===typeof t&&t.indexOf(".")>-1){try{this.maskLong=a(t)}catch(o){throw o,new Error("Invalid mask: "+t)}for(r=n=32;n>=0;r=--n)if(this.maskLong===4294967295<<32-r>>>0){this.bitmask=r;break}}else{if(!t&&0!==t)throw new Error("Invalid mask: empty");this.bitmask=parseInt(t,10),this.maskLong=0,this.bitmask>0&&(this.maskLong=4294967295<<32-this.bitmask>>>0)}try{this.netLong=(a(e)&this.maskLong)>>>0}catch(o){throw o,new Error("Invalid net address: "+e)}if(!(this.bitmask<=32))throw new Error("Invalid mask for ip4: "+t);this.size=Math.pow(2,32-this.bitmask),this.base=c(this.netLong),this.mask=c(this.maskLong),this.hostmask=c(~this.maskLong),this.first=this.bitmask<=30?c(this.netLong+1):this.base,this.last=this.bitmask<=30?c(this.netLong+this.size-2):c(this.netLong+this.size-1),this.broadcast=this.bitmask<=30?c(this.netLong+this.size-1):void 0}return e.prototype.contains=function(t){return"string"===typeof t&&(t.indexOf("/")>0||4!==t.split(".").length)&&(t=new e(t)),t instanceof e?this.contains(t.base)&&this.contains(t.broadcast||t.last):(a(t)&this.maskLong)>>>0===(this.netLong&this.maskLong)>>>0},e.prototype.next=function(t){return null==t&&(t=1),new e(c(this.netLong+this.size*t),this.mask)},e.prototype.forEach=function(e){var t,r,n;for(n=a(this.first),r=a(this.last),t=0;n<=r;)e(c(n),n,t),t++,n++},e.prototype.toString=function(){return this.base+"/"+this.bitmask},e}(),t.ip2long=a,t.long2ip=c,t.Netmask=e}).call(this)},5332:(e,t,r)=>{var n=r(428);function i(e,t){n.cipher.registerAlgorithm(e,(function(){return new n.aes.Algorithm(e,t)}))}r(9205),r(8076),r(9491),e.exports=n.aes=n.aes||{},n.aes.startEncrypting=function(e,t,r,n){var i=p({key:e,output:r,decrypt:!1,mode:n});return i.start(t),i},n.aes.createEncryptionCipher=function(e,t){return p({key:e,output:null,decrypt:!1,mode:t})},n.aes.startDecrypting=function(e,t,r,n){var i=p({key:e,output:r,decrypt:!0,mode:n});return i.start(t),i},n.aes.createDecryptionCipher=function(e,t){return p({key:e,output:null,decrypt:!0,mode:t})},n.aes.Algorithm=function(e,t){u||h();var r=this;r.name=e,r.mode=new t({blockSize:16,cipher:{encrypt:function(e,t){return f(r._w,e,t,!1)},decrypt:function(e,t){return f(r._w,e,t,!0)}}}),r._init=!1},n.aes.Algorithm.prototype.initialize=function(e){if(!this._init){var t,r=e.key;if("string"!==typeof r||16!==r.length&&24!==r.length&&32!==r.length){if(n.util.isArray(r)&&(16===r.length||24===r.length||32===r.length)){t=r,r=n.util.createBuffer();for(var i=0;i<t.length;++i)r.putByte(t[i])}}else r=n.util.createBuffer(r);if(!n.util.isArray(r)){t=r,r=[];var o=t.length();if(16===o||24===o||32===o){o>>>=2;for(i=0;i<o;++i)r.push(t.getInt32())}}if(!n.util.isArray(r)||4!==r.length&&6!==r.length&&8!==r.length)throw new Error("Invalid key parameter.");var s=this.mode.name,a=-1!==["CFB","OFB","CTR","GCM"].indexOf(s);this._w=d(r,e.decrypt&&!a),this._init=!0}},n.aes._expandKey=function(e,t){return u||h(),d(e,t)},n.aes._updateBlock=f,i("AES-ECB",n.cipher.modes.ecb),i("AES-CBC",n.cipher.modes.cbc),i("AES-CFB",n.cipher.modes.cfb),i("AES-OFB",n.cipher.modes.ofb),i("AES-CTR",n.cipher.modes.ctr),i("AES-GCM",n.cipher.modes.gcm);var o,s,a,c,l,u=!1;function h(){u=!0,a=[0,1,2,4,8,16,32,64,128,27,54];for(var e=new Array(256),t=0;t<128;++t)e[t]=t<<1,e[t+128]=t+128<<1^283;o=new Array(256),s=new Array(256),c=new Array(4),l=new Array(4);for(t=0;t<4;++t)c[t]=new Array(256),l[t]=new Array(256);var r,n,i,h,d,f,p,g=0,m=0;for(t=0;t<256;++t){h=(h=m^m<<1^m<<2^m<<3^m<<4)>>8^255&h^99,o[g]=h,s[h]=g,f=(d=e[h])<<24^h<<16^h<<8^h^d,p=((r=e[g])^(n=e[r])^(i=e[n]))<<24^(g^i)<<16^(g^n^i)<<8^g^r^i;for(var y=0;y<4;++y)c[y][g]=f,l[y][h]=p,f=f<<24|f>>>8,p=p<<24|p>>>8;0===g?g=m=1:(g=r^e[e[e[r^i]]],m^=e[e[m]])}}function d(e,t){for(var r,n=e.slice(0),i=1,s=n.length,c=4*(s+6+1),u=s;u<c;++u)r=n[u-1],u%s===0?(r=o[r>>>16&255]<<24^o[r>>>8&255]<<16^o[255&r]<<8^o[r>>>24]^a[i]<<24,i++):s>6&&u%s===4&&(r=o[r>>>24]<<24^o[r>>>16&255]<<16^o[r>>>8&255]<<8^o[255&r]),n[u]=n[u-s]^r;if(t){for(var h,d=l[0],f=l[1],p=l[2],g=l[3],m=n.slice(0),y=(u=0,(c=n.length)-4);u<c;u+=4,y-=4)if(0===u||u===c-4)m[u]=n[y],m[u+1]=n[y+3],m[u+2]=n[y+2],m[u+3]=n[y+1];else for(var v=0;v<4;++v)h=n[y+v],m[u+(3&-v)]=d[o[h>>>24]]^f[o[h>>>16&255]]^p[o[h>>>8&255]]^g[o[255&h]];n=m}return n}function f(e,t,r,n){var i,a,u,h,d,f,p,g,m,y,v,b,w=e.length/4-1;n?(i=l[0],a=l[1],u=l[2],h=l[3],d=s):(i=c[0],a=c[1],u=c[2],h=c[3],d=o),f=t[0]^e[0],p=t[n?3:1]^e[1],g=t[2]^e[2],m=t[n?1:3]^e[3];for(var E=3,S=1;S<w;++S)y=i[f>>>24]^a[p>>>16&255]^u[g>>>8&255]^h[255&m]^e[++E],v=i[p>>>24]^a[g>>>16&255]^u[m>>>8&255]^h[255&f]^e[++E],b=i[g>>>24]^a[m>>>16&255]^u[f>>>8&255]^h[255&p]^e[++E],m=i[m>>>24]^a[f>>>16&255]^u[p>>>8&255]^h[255&g]^e[++E],f=y,p=v,g=b;r[0]=d[f>>>24]<<24^d[p>>>16&255]<<16^d[g>>>8&255]<<8^d[255&m]^e[++E],r[n?3:1]=d[p>>>24]<<24^d[g>>>16&255]<<16^d[m>>>8&255]<<8^d[255&f]^e[++E],r[2]=d[g>>>24]<<24^d[m>>>16&255]<<16^d[f>>>8&255]<<8^d[255&p]^e[++E],r[n?1:3]=d[m>>>24]<<24^d[f>>>16&255]<<16^d[p>>>8&255]<<8^d[255&g]^e[++E]}function p(e){var t,r="AES-"+((e=e||{}).mode||"CBC").toUpperCase(),i=(t=e.decrypt?n.cipher.createDecipher(r,e.key):n.cipher.createCipher(r,e.key)).start;return t.start=function(e,r){var o=null;r instanceof n.util.ByteBuffer&&(o=r,r={}),(r=r||{}).output=o,r.iv=e,i.call(t,r)},t}},5419:(e,t,r)=>{var n=r(428);r(9491),r(1346);var i=e.exports=n.asn1=n.asn1||{};function o(e,t,r){if(r>t){var n=new Error("Too few bytes to parse DER.");throw n.available=e.length(),n.remaining=t,n.requested=r,n}}i.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192},i.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30},i.create=function(e,t,r,o,s){if(n.util.isArray(o)){for(var a=[],c=0;c<o.length;++c)void 0!==o[c]&&a.push(o[c]);o=a}var l={tagClass:e,type:t,constructed:r,composed:r||n.util.isArray(o),value:o};return s&&"bitStringContents"in s&&(l.bitStringContents=s.bitStringContents,l.original=i.copy(l)),l},i.copy=function(e,t){var r;if(n.util.isArray(e)){r=[];for(var o=0;o<e.length;++o)r.push(i.copy(e[o],t));return r}return"string"===typeof e?e:(r={tagClass:e.tagClass,type:e.type,constructed:e.constructed,composed:e.composed,value:i.copy(e.value,t)},t&&!t.excludeBitStringContents&&(r.bitStringContents=e.bitStringContents),r)},i.equals=function(e,t,r){if(n.util.isArray(e)){if(!n.util.isArray(t))return!1;if(e.length!==t.length)return!1;for(var o=0;o<e.length;++o)if(!i.equals(e[o],t[o]))return!1;return!0}if(typeof e!==typeof t)return!1;if("string"===typeof e)return e===t;var s=e.tagClass===t.tagClass&&e.type===t.type&&e.constructed===t.constructed&&e.composed===t.composed&&i.equals(e.value,t.value);return r&&r.includeBitStringContents&&(s=s&&e.bitStringContents===t.bitStringContents),s},i.getBerValueLength=function(e){var t=e.getByte();if(128!==t)return 128&t?e.getInt((127&t)<<3):t};function s(e,t,r,n){var a;o(e,t,2);var c=e.getByte();t--;var l=192&c,u=31&c;a=e.length();var h,d,f=function(e,t){var r=e.getByte();if(t--,128!==r){var n;if(128&r){var i=127&r;o(e,t,i),n=e.getInt(i<<3)}else n=r;if(n<0)throw new Error("Negative length: "+n);return n}}(e,t);if(t-=a-e.length(),void 0!==f&&f>t){if(n.strict){var p=new Error("Too few bytes to read ASN.1 value.");throw p.available=e.length(),p.remaining=t,p.requested=f,p}f=t}var g=32===(32&c);if(g)if(h=[],void 0===f)for(;;){if(o(e,t,2),e.bytes(2)===String.fromCharCode(0,0)){e.getBytes(2),t-=2;break}a=e.length(),h.push(s(e,t,r+1,n)),t-=a-e.length()}else for(;f>0;)a=e.length(),h.push(s(e,f,r+1,n)),t-=a-e.length(),f-=a-e.length();if(void 0===h&&l===i.Class.UNIVERSAL&&u===i.Type.BITSTRING&&(d=e.bytes(f)),void 0===h&&n.decodeBitStrings&&l===i.Class.UNIVERSAL&&u===i.Type.BITSTRING&&f>1){var m=e.read,y=t,v=0;if(u===i.Type.BITSTRING&&(o(e,t,1),v=e.getByte(),t--),0===v)try{a=e.length();var b=s(e,t,r+1,{strict:!0,decodeBitStrings:!0}),w=a-e.length();t-=w,u==i.Type.BITSTRING&&w++;var E=b.tagClass;w!==f||E!==i.Class.UNIVERSAL&&E!==i.Class.CONTEXT_SPECIFIC||(h=[b])}catch(_){}void 0===h&&(e.read=m,t=y)}if(void 0===h){if(void 0===f){if(n.strict)throw new Error("Non-constructed ASN.1 object of indefinite length.");f=t}if(u===i.Type.BMPSTRING)for(h="";f>0;f-=2)o(e,t,2),h+=String.fromCharCode(e.getInt16()),t-=2;else h=e.getBytes(f),t-=f}var S=void 0===d?null:{bitStringContents:d};return i.create(l,u,g,h,S)}i.fromDer=function(e,t){void 0===t&&(t={strict:!0,parseAllBytes:!0,decodeBitStrings:!0}),"boolean"===typeof t&&(t={strict:t,parseAllBytes:!0,decodeBitStrings:!0}),"strict"in t||(t.strict=!0),"parseAllBytes"in t||(t.parseAllBytes=!0),"decodeBitStrings"in t||(t.decodeBitStrings=!0),"string"===typeof e&&(e=n.util.createBuffer(e));var r=e.length(),i=s(e,e.length(),0,t);if(t.parseAllBytes&&0!==e.length()){var o=new Error("Unparsed DER bytes remain after ASN.1 parsing.");throw o.byteCount=r,o.remaining=e.length(),o}return i},i.toDer=function(e){var t=n.util.createBuffer(),r=e.tagClass|e.type,o=n.util.createBuffer(),s=!1;if("bitStringContents"in e&&(s=!0,e.original&&(s=i.equals(e,e.original))),s)o.putBytes(e.bitStringContents);else if(e.composed){e.constructed?r|=32:o.putByte(0);for(var a=0;a<e.value.length;++a)void 0!==e.value[a]&&o.putBuffer(i.toDer(e.value[a]))}else if(e.type===i.Type.BMPSTRING)for(a=0;a<e.value.length;++a)o.putInt16(e.value.charCodeAt(a));else e.type===i.Type.INTEGER&&e.value.length>1&&(0===e.value.charCodeAt(0)&&0===(128&e.value.charCodeAt(1))||255===e.value.charCodeAt(0)&&128===(128&e.value.charCodeAt(1)))?o.putBytes(e.value.substr(1)):o.putBytes(e.value);if(t.putByte(r),o.length()<=127)t.putByte(127&o.length());else{var c=o.length(),l="";do{l+=String.fromCharCode(255&c),c>>>=8}while(c>0);t.putByte(128|l.length);for(a=l.length-1;a>=0;--a)t.putByte(l.charCodeAt(a))}return t.putBuffer(o),t},i.oidToDer=function(e){var t,r,i,o,s=e.split("."),a=n.util.createBuffer();a.putByte(40*parseInt(s[0],10)+parseInt(s[1],10));for(var c=2;c<s.length;++c){t=!0,r=[],i=parseInt(s[c],10);do{o=127&i,i>>>=7,t||(o|=128),r.push(o),t=!1}while(i>0);for(var l=r.length-1;l>=0;--l)a.putByte(r[l])}return a},i.derToOid=function(e){var t;"string"===typeof e&&(e=n.util.createBuffer(e));var r=e.getByte();t=Math.floor(r/40)+"."+r%40;for(var i=0;e.length()>0;)i<<=7,128&(r=e.getByte())?i+=127&r:(t+="."+(i+r),i=0);return t},i.utcTimeToDate=function(e){var t=new Date,r=parseInt(e.substr(0,2),10);r=r>=50?1900+r:2e3+r;var n=parseInt(e.substr(2,2),10)-1,i=parseInt(e.substr(4,2),10),o=parseInt(e.substr(6,2),10),s=parseInt(e.substr(8,2),10),a=0;if(e.length>11){var c=e.charAt(10),l=10;"+"!==c&&"-"!==c&&(a=parseInt(e.substr(10,2),10),l+=2)}if(t.setUTCFullYear(r,n,i),t.setUTCHours(o,s,a,0),l&&("+"===(c=e.charAt(l))||"-"===c)){var u=60*parseInt(e.substr(l+1,2),10)+parseInt(e.substr(l+4,2),10);u*=6e4,"+"===c?t.setTime(+t-u):t.setTime(+t+u)}return t},i.generalizedTimeToDate=function(e){var t=new Date,r=parseInt(e.substr(0,4),10),n=parseInt(e.substr(4,2),10)-1,i=parseInt(e.substr(6,2),10),o=parseInt(e.substr(8,2),10),s=parseInt(e.substr(10,2),10),a=parseInt(e.substr(12,2),10),c=0,l=0,u=!1;"Z"===e.charAt(e.length-1)&&(u=!0);var h=e.length-5,d=e.charAt(h);"+"!==d&&"-"!==d||(l=60*parseInt(e.substr(h+1,2),10)+parseInt(e.substr(h+4,2),10),l*=6e4,"+"===d&&(l*=-1),u=!0);return"."===e.charAt(14)&&(c=1e3*parseFloat(e.substr(14),10)),u?(t.setUTCFullYear(r,n,i),t.setUTCHours(o,s,a,c),t.setTime(+t+l)):(t.setFullYear(r,n,i),t.setHours(o,s,a,c)),t},i.dateToUtcTime=function(e){if("string"===typeof e)return e;var t="",r=[];r.push((""+e.getUTCFullYear()).substr(2)),r.push(""+(e.getUTCMonth()+1)),r.push(""+e.getUTCDate()),r.push(""+e.getUTCHours()),r.push(""+e.getUTCMinutes()),r.push(""+e.getUTCSeconds());for(var n=0;n<r.length;++n)r[n].length<2&&(t+="0"),t+=r[n];return t+="Z"},i.dateToGeneralizedTime=function(e){if("string"===typeof e)return e;var t="",r=[];r.push(""+e.getUTCFullYear()),r.push(""+(e.getUTCMonth()+1)),r.push(""+e.getUTCDate()),r.push(""+e.getUTCHours()),r.push(""+e.getUTCMinutes()),r.push(""+e.getUTCSeconds());for(var n=0;n<r.length;++n)r[n].length<2&&(t+="0"),t+=r[n];return t+="Z"},i.integerToDer=function(e){var t=n.util.createBuffer();if(e>=-128&&e<128)return t.putSignedInt(e,8);if(e>=-32768&&e<32768)return t.putSignedInt(e,16);if(e>=-8388608&&e<8388608)return t.putSignedInt(e,24);if(e>=-2147483648&&e<2147483648)return t.putSignedInt(e,32);var r=new Error("Integer too large; max is 32-bits.");throw r.integer=e,r},i.derToInteger=function(e){"string"===typeof e&&(e=n.util.createBuffer(e));var t=8*e.length();if(t>32)throw new Error("Integer too large; max is 32-bits.");return e.getSignedInt(t)},i.validate=function(e,t,r,o){var s=!1;if(e.tagClass!==t.tagClass&&"undefined"!==typeof t.tagClass||e.type!==t.type&&"undefined"!==typeof t.type)o&&(e.tagClass!==t.tagClass&&o.push("["+t.name+'] Expected tag class "'+t.tagClass+'", got "'+e.tagClass+'"'),e.type!==t.type&&o.push("["+t.name+'] Expected type "'+t.type+'", got "'+e.type+'"'));else if(e.constructed===t.constructed||"undefined"===typeof t.constructed){if(s=!0,t.value&&n.util.isArray(t.value))for(var a=0,c=0;s&&c<t.value.length;++c)s=t.value[c].optional||!1,e.value[a]&&((s=i.validate(e.value[a],t.value[c],r,o))?++a:t.value[c].optional&&(s=!0)),!s&&o&&o.push("["+t.name+'] Tag class "'+t.tagClass+'", type "'+t.type+'" expected value length "'+t.value.length+'", got "'+e.value.length+'"');if(s&&r)if(t.capture&&(r[t.capture]=e.value),t.captureAsn1&&(r[t.captureAsn1]=e),t.captureBitStringContents&&"bitStringContents"in e&&(r[t.captureBitStringContents]=e.bitStringContents),t.captureBitStringValue&&"bitStringContents"in e)if(e.bitStringContents.length<2)r[t.captureBitStringValue]="";else{if(0!==e.bitStringContents.charCodeAt(0))throw new Error("captureBitStringValue only supported for zero unused bits");r[t.captureBitStringValue]=e.bitStringContents.slice(1)}}else o&&o.push("["+t.name+'] Expected constructed "'+t.constructed+'", got "'+e.constructed+'"');return s};var a=/[^\\u0000-\\u00ff]/;i.prettyPrint=function(e,t,r){var o="";r=r||2,(t=t||0)>0&&(o+="\n");for(var s="",c=0;c<t*r;++c)s+=" ";switch(o+=s+"Tag: ",e.tagClass){case i.Class.UNIVERSAL:o+="Universal:";break;case i.Class.APPLICATION:o+="Application:";break;case i.Class.CONTEXT_SPECIFIC:o+="Context-Specific:";break;case i.Class.PRIVATE:o+="Private:"}if(e.tagClass===i.Class.UNIVERSAL)switch(o+=e.type,e.type){case i.Type.NONE:o+=" (None)";break;case i.Type.BOOLEAN:o+=" (Boolean)";break;case i.Type.INTEGER:o+=" (Integer)";break;case i.Type.BITSTRING:o+=" (Bit string)";break;case i.Type.OCTETSTRING:o+=" (Octet string)";break;case i.Type.NULL:o+=" (Null)";break;case i.Type.OID:o+=" (Object Identifier)";break;case i.Type.ODESC:o+=" (Object Descriptor)";break;case i.Type.EXTERNAL:o+=" (External or Instance of)";break;case i.Type.REAL:o+=" (Real)";break;case i.Type.ENUMERATED:o+=" (Enumerated)";break;case i.Type.EMBEDDED:o+=" (Embedded PDV)";break;case i.Type.UTF8:o+=" (UTF8)";break;case i.Type.ROID:o+=" (Relative Object Identifier)";break;case i.Type.SEQUENCE:o+=" (Sequence)";break;case i.Type.SET:o+=" (Set)";break;case i.Type.PRINTABLESTRING:o+=" (Printable String)";break;case i.Type.IA5String:o+=" (IA5String (ASCII))";break;case i.Type.UTCTIME:o+=" (UTC time)";break;case i.Type.GENERALIZEDTIME:o+=" (Generalized time)";break;case i.Type.BMPSTRING:o+=" (BMP String)"}else o+=e.type;if(o+="\n",o+=s+"Constructed: "+e.constructed+"\n",e.composed){var l=0,u="";for(c=0;c<e.value.length;++c)void 0!==e.value[c]&&(l+=1,u+=i.prettyPrint(e.value[c],t+1,r),c+1<e.value.length&&(u+=","));o+=s+"Sub values: "+l+u}else{if(o+=s+"Value: ",e.type===i.Type.OID){var h=i.derToOid(e.value);o+=h,n.pki&&n.pki.oids&&h in n.pki.oids&&(o+=" ("+n.pki.oids[h]+") ")}if(e.type===i.Type.INTEGER)try{o+=i.derToInteger(e.value)}catch(f){o+="0x"+n.util.bytesToHex(e.value)}else if(e.type===i.Type.BITSTRING){if(e.value.length>1?o+="0x"+n.util.bytesToHex(e.value.slice(1)):o+="(none)",e.value.length>0){var d=e.value.charCodeAt(0);1==d?o+=" (1 unused bit shown)":d>1&&(o+=" ("+d+" unused bits shown)")}}else if(e.type===i.Type.OCTETSTRING)a.test(e.value)||(o+="("+e.value+") "),o+="0x"+n.util.bytesToHex(e.value);else if(e.type===i.Type.UTF8)try{o+=n.util.decodeUtf8(e.value)}catch(p){if("URI malformed"!==p.message)throw p;o+="0x"+n.util.bytesToHex(e.value)+" (malformed UTF8)"}else e.type===i.Type.PRINTABLESTRING||e.type===i.Type.IA5String?o+=e.value:a.test(e.value)?o+="0x"+n.util.bytesToHex(e.value):0===e.value.length?o+="[null]":o+=e.value}return o}},4443:e=>{var t={};e.exports=t;var r={};t.encode=function(e,t,r){if("string"!==typeof t)throw new TypeError('"alphabet" must be a string.');if(void 0!==r&&"number"!==typeof r)throw new TypeError('"maxline" must be a number.');var n="";if(e instanceof Uint8Array){var i=0,o=t.length,s=t.charAt(0),a=[0];for(i=0;i<e.length;++i){for(var c=0,l=e[i];c<a.length;++c)l+=a[c]<<8,a[c]=l%o,l=l/o|0;for(;l>0;)a.push(l%o),l=l/o|0}for(i=0;0===e[i]&&i<e.length-1;++i)n+=s;for(i=a.length-1;i>=0;--i)n+=t[a[i]]}else n=function(e,t){var r=0,n=t.length,i=t.charAt(0),o=[0];for(r=0;r<e.length();++r){for(var s=0,a=e.at(r);s<o.length;++s)a+=o[s]<<8,o[s]=a%n,a=a/n|0;for(;a>0;)o.push(a%n),a=a/n|0}var c="";for(r=0;0===e.at(r)&&r<e.length()-1;++r)c+=i;for(r=o.length-1;r>=0;--r)c+=t[o[r]];return c}(e,t);if(r){var u=new RegExp(".{1,"+r+"}","g");n=n.match(u).join("\r\n")}return n},t.decode=function(e,t){if("string"!==typeof e)throw new TypeError('"input" must be a string.');if("string"!==typeof t)throw new TypeError('"alphabet" must be a string.');var n=r[t];if(!n){n=r[t]=[];for(var i=0;i<t.length;++i)n[t.charCodeAt(i)]=i}e=e.replace(/\s/g,"");var o=t.length,s=t.charAt(0),a=[0];for(i=0;i<e.length;i++){var c=n[e.charCodeAt(i)];if(void 0===c)return;for(var l=0,u=c;l<a.length;++l)u+=a[l]*o,a[l]=255&u,u>>=8;for(;u>0;)a.push(255&u),u>>=8}for(var h=0;e[h]===s&&h<e.length-1;++h)a.push(0);return"undefined"!==typeof Buffer?Buffer.from(a.reverse()):new Uint8Array(a.reverse())}},9205:(e,t,r)=>{var n=r(428);r(9491),e.exports=n.cipher=n.cipher||{},n.cipher.algorithms=n.cipher.algorithms||{},n.cipher.createCipher=function(e,t){var r=e;if("string"===typeof r&&(r=n.cipher.getAlgorithm(r))&&(r=r()),!r)throw new Error("Unsupported algorithm: "+e);return new n.cipher.BlockCipher({algorithm:r,key:t,decrypt:!1})},n.cipher.createDecipher=function(e,t){var r=e;if("string"===typeof r&&(r=n.cipher.getAlgorithm(r))&&(r=r()),!r)throw new Error("Unsupported algorithm: "+e);return new n.cipher.BlockCipher({algorithm:r,key:t,decrypt:!0})},n.cipher.registerAlgorithm=function(e,t){e=e.toUpperCase(),n.cipher.algorithms[e]=t},n.cipher.getAlgorithm=function(e){return(e=e.toUpperCase())in n.cipher.algorithms?n.cipher.algorithms[e]:null};var i=n.cipher.BlockCipher=function(e){this.algorithm=e.algorithm,this.mode=this.algorithm.mode,this.blockSize=this.mode.blockSize,this._finish=!1,this._input=null,this.output=null,this._op=e.decrypt?this.mode.decrypt:this.mode.encrypt,this._decrypt=e.decrypt,this.algorithm.initialize(e)};i.prototype.start=function(e){e=e||{};var t={};for(var r in e)t[r]=e[r];t.decrypt=this._decrypt,this._finish=!1,this._input=n.util.createBuffer(),this.output=e.output||n.util.createBuffer(),this.mode.start(t)},i.prototype.update=function(e){for(e&&this._input.putBuffer(e);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()},i.prototype.finish=function(e){!e||"ECB"!==this.mode.name&&"CBC"!==this.mode.name||(this.mode.pad=function(t){return e(this.blockSize,t,!1)},this.mode.unpad=function(t){return e(this.blockSize,t,!0)});var t={};return t.decrypt=this._decrypt,t.overflow=this._input.length()%this.blockSize,!(!this._decrypt&&this.mode.pad&&!this.mode.pad(this._input,t))&&(this._finish=!0,this.update(),!(this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,t))&&!(this.mode.afterFinish&&!this.mode.afterFinish(this.output,t)))}},8076:(e,t,r)=>{var n=r(428);r(9491),n.cipher=n.cipher||{};var i=e.exports=n.cipher.modes=n.cipher.modes||{};function o(e,t){if("string"===typeof e&&(e=n.util.createBuffer(e)),n.util.isArray(e)&&e.length>4){var r=e;e=n.util.createBuffer();for(var i=0;i<r.length;++i)e.putByte(r[i])}if(e.length()<t)throw new Error("Invalid IV length; got "+e.length()+" bytes and expected "+t+" bytes.");if(!n.util.isArray(e)){var o=[],s=t/4;for(i=0;i<s;++i)o.push(e.getInt32());e=o}return e}function s(e){e[e.length-1]=e[e.length-1]+1&4294967295}function a(e){return[e/4294967296|0,4294967295&e]}i.ecb=function(e){e=e||{},this.name="ECB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},i.ecb.prototype.start=function(e){},i.ecb.prototype.encrypt=function(e,t,r){if(e.length()<this.blockSize&&!(r&&e.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=e.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(n=0;n<this._ints;++n)t.putInt32(this._outBlock[n])},i.ecb.prototype.decrypt=function(e,t,r){if(e.length()<this.blockSize&&!(r&&e.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=e.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(n=0;n<this._ints;++n)t.putInt32(this._outBlock[n])},i.ecb.prototype.pad=function(e,t){var r=e.length()===this.blockSize?this.blockSize:this.blockSize-e.length();return e.fillWithByte(r,r),!0},i.ecb.prototype.unpad=function(e,t){if(t.overflow>0)return!1;var r=e.length(),n=e.at(r-1);return!(n>this.blockSize<<2)&&(e.truncate(n),!0)},i.cbc=function(e){e=e||{},this.name="CBC",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},i.cbc.prototype.start=function(e){if(null===e.iv){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else{if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=o(e.iv,this.blockSize),this._prev=this._iv.slice(0)}},i.cbc.prototype.encrypt=function(e,t,r){if(e.length()<this.blockSize&&!(r&&e.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=this._prev[n]^e.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(n=0;n<this._ints;++n)t.putInt32(this._outBlock[n]);this._prev=this._outBlock},i.cbc.prototype.decrypt=function(e,t,r){if(e.length()<this.blockSize&&!(r&&e.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=e.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(n=0;n<this._ints;++n)t.putInt32(this._prev[n]^this._outBlock[n]);this._prev=this._inBlock.slice(0)},i.cbc.prototype.pad=function(e,t){var r=e.length()===this.blockSize?this.blockSize:this.blockSize-e.length();return e.fillWithByte(r,r),!0},i.cbc.prototype.unpad=function(e,t){if(t.overflow>0)return!1;var r=e.length(),n=e.at(r-1);return!(n>this.blockSize<<2)&&(e.truncate(n),!0)},i.cfb=function(e){e=e||{},this.name="CFB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},i.cfb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=o(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.cfb.prototype.encrypt=function(e,t,r){var n=e.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i<this._ints;++i)this._inBlock[i]=e.getInt32()^this._outBlock[i],t.putInt32(this._inBlock[i]);else{var o=(this.blockSize-n)%this.blockSize;o>0&&(o=this.blockSize-o),this._partialOutput.clear();for(i=0;i<this._ints;++i)this._partialBlock[i]=e.getInt32()^this._outBlock[i],this._partialOutput.putInt32(this._partialBlock[i]);if(o>0)e.read-=this.blockSize;else for(i=0;i<this._ints;++i)this._inBlock[i]=this._partialBlock[i];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return t.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},i.cfb.prototype.decrypt=function(e,t,r){var n=e.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i<this._ints;++i)this._inBlock[i]=e.getInt32(),t.putInt32(this._inBlock[i]^this._outBlock[i]);else{var o=(this.blockSize-n)%this.blockSize;o>0&&(o=this.blockSize-o),this._partialOutput.clear();for(i=0;i<this._ints;++i)this._partialBlock[i]=e.getInt32(),this._partialOutput.putInt32(this._partialBlock[i]^this._outBlock[i]);if(o>0)e.read-=this.blockSize;else for(i=0;i<this._ints;++i)this._inBlock[i]=this._partialBlock[i];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return t.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},i.ofb=function(e){e=e||{},this.name="OFB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},i.ofb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=o(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.ofb.prototype.encrypt=function(e,t,r){var n=e.length();if(0===e.length())return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i<this._ints;++i)t.putInt32(e.getInt32()^this._outBlock[i]),this._inBlock[i]=this._outBlock[i];else{var o=(this.blockSize-n)%this.blockSize;o>0&&(o=this.blockSize-o),this._partialOutput.clear();for(i=0;i<this._ints;++i)this._partialOutput.putInt32(e.getInt32()^this._outBlock[i]);if(o>0)e.read-=this.blockSize;else for(i=0;i<this._ints;++i)this._inBlock[i]=this._outBlock[i];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return t.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},i.ofb.prototype.decrypt=i.ofb.prototype.encrypt,i.ctr=function(e){e=e||{},this.name="CTR",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},i.ctr.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=o(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.ctr.prototype.encrypt=function(e,t,r){var n=e.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i<this._ints;++i)t.putInt32(e.getInt32()^this._outBlock[i]);else{var o=(this.blockSize-n)%this.blockSize;o>0&&(o=this.blockSize-o),this._partialOutput.clear();for(i=0;i<this._ints;++i)this._partialOutput.putInt32(e.getInt32()^this._outBlock[i]);if(o>0&&(e.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return t.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}s(this._inBlock)},i.ctr.prototype.decrypt=i.ctr.prototype.encrypt,i.gcm=function(e){e=e||{},this.name="GCM",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0,this._R=3774873600},i.gcm.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");var t,r=n.util.createBuffer(e.iv);if(this._cipherLength=0,t="additionalData"in e?n.util.createBuffer(e.additionalData):n.util.createBuffer(),this._tagLength="tagLength"in e?e.tagLength:128,this._tag=null,e.decrypt&&(this._tag=n.util.createBuffer(e.tag).getBytes(),this._tag.length!==this._tagLength/8))throw new Error("Authentication tag does not match tag length.");this._hashBlock=new Array(this._ints),this.tag=null,this._hashSubkey=new Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits);var i=r.length();if(12===i)this._j0=[r.getInt32(),r.getInt32(),r.getInt32(),1];else{for(this._j0=[0,0,0,0];r.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[r.getInt32(),r.getInt32(),r.getInt32(),r.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(a(8*i)))}this._inBlock=this._j0.slice(0),s(this._inBlock),this._partialBytes=0,t=n.util.createBuffer(t),this._aDataLength=a(8*t.length());var o=t.length()%this.blockSize;for(o&&t.fillWithByte(0,this.blockSize-o),this._s=[0,0,0,0];t.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[t.getInt32(),t.getInt32(),t.getInt32(),t.getInt32()])},i.gcm.prototype.encrypt=function(e,t,r){var n=e.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize){for(var i=0;i<this._ints;++i)t.putInt32(this._outBlock[i]^=e.getInt32());this._cipherLength+=this.blockSize}else{var o=(this.blockSize-n)%this.blockSize;o>0&&(o=this.blockSize-o),this._partialOutput.clear();for(i=0;i<this._ints;++i)this._partialOutput.putInt32(e.getInt32()^this._outBlock[i]);if(o<=0||r){if(r){var a=n%this.blockSize;this._cipherLength+=a,this._partialOutput.truncate(this.blockSize-a)}else this._cipherLength+=this.blockSize;for(i=0;i<this._ints;++i)this._outBlock[i]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return e.read-=this.blockSize,t.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),s(this._inBlock)},i.gcm.prototype.decrypt=function(e,t,r){var n=e.length();if(n<this.blockSize&&!(r&&n>0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),s(this._inBlock),this._hashBlock[0]=e.getInt32(),this._hashBlock[1]=e.getInt32(),this._hashBlock[2]=e.getInt32(),this._hashBlock[3]=e.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var i=0;i<this._ints;++i)t.putInt32(this._outBlock[i]^this._hashBlock[i]);n<this.blockSize?this._cipherLength+=n%this.blockSize:this._cipherLength+=this.blockSize},i.gcm.prototype.afterFinish=function(e,t){var r=!0;t.decrypt&&t.overflow&&e.truncate(this.blockSize-t.overflow),this.tag=n.util.createBuffer();var i=this._aDataLength.concat(a(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,i);var o=[];this.cipher.encrypt(this._j0,o);for(var s=0;s<this._ints;++s)this.tag.putInt32(this._s[s]^o[s]);return this.tag.truncate(this.tag.length()%(this._tagLength/8)),t.decrypt&&this.tag.bytes()!==this._tag&&(r=!1),r},i.gcm.prototype.multiply=function(e,t){for(var r=[0,0,0,0],n=t.slice(0),i=0;i<128;++i){e[i/32|0]&1<<31-i%32&&(r[0]^=n[0],r[1]^=n[1],r[2]^=n[2],r[3]^=n[3]),this.pow(n,n)}return r},i.gcm.prototype.pow=function(e,t){for(var r=1&e[3],n=3;n>0;--n)t[n]=e[n]>>>1|(1&e[n-1])<<31;t[0]=e[0]>>>1,r&&(t[0]^=this._R)},i.gcm.prototype.tableMultiply=function(e){for(var t=[0,0,0,0],r=0;r<32;++r){var n=e[r/8|0]>>>4*(7-r%8)&15,i=this._m[r][n];t[0]^=i[0],t[1]^=i[1],t[2]^=i[2],t[3]^=i[3]}return t},i.gcm.prototype.ghash=function(e,t,r){return t[0]^=r[0],t[1]^=r[1],t[2]^=r[2],t[3]^=r[3],this.tableMultiply(t)},i.gcm.prototype.generateHashTable=function(e,t){for(var r=8/t,n=4*r,i=16*r,o=new Array(i),s=0;s<i;++s){var a=[0,0,0,0],c=(n-1-s%n)*t;a[s/n|0]=1<<t-1<<c,o[s]=this.generateSubHashTable(this.multiply(a,e),t)}return o},i.gcm.prototype.generateSubHashTable=function(e,t){var r=1<<t,n=r>>>1,i=new Array(r);i[n]=e.slice(0);for(var o=n>>>1;o>0;)this.pow(i[2*o],i[o]=[]),o>>=1;for(o=2;o<n;){for(var s=1;s<o;++s){var a=i[o],c=i[s];i[o+s]=[a[0]^c[0],a[1]^c[1],a[2]^c[2],a[3]^c[3]]}o*=2}for(i[0]=[0,0,0,0],o=n+1;o<r;++o){var l=i[o^n];i[o]=[e[0]^l[0],e[1]^l[1],e[2]^l[2],e[3]^l[3]]}return i}},5877:(e,t,r)=>{var n=r(428);function i(e,t){n.cipher.registerAlgorithm(e,(function(){return new n.des.Algorithm(e,t)}))}r(9205),r(8076),r(9491),e.exports=n.des=n.des||{},n.des.startEncrypting=function(e,t,r,n){var i=p({key:e,output:r,decrypt:!1,mode:n||(null===t?"ECB":"CBC")});return i.start(t),i},n.des.createEncryptionCipher=function(e,t){return p({key:e,output:null,decrypt:!1,mode:t})},n.des.startDecrypting=function(e,t,r,n){var i=p({key:e,output:r,decrypt:!0,mode:n||(null===t?"ECB":"CBC")});return i.start(t),i},n.des.createDecryptionCipher=function(e,t){return p({key:e,output:null,decrypt:!0,mode:t})},n.des.Algorithm=function(e,t){var r=this;r.name=e,r.mode=new t({blockSize:8,cipher:{encrypt:function(e,t){return f(r._keys,e,t,!1)},decrypt:function(e,t){return f(r._keys,e,t,!0)}}}),r._init=!1},n.des.Algorithm.prototype.initialize=function(e){if(!this._init){var t=n.util.createBuffer(e.key);if(0===this.name.indexOf("3DES")&&24!==t.length())throw new Error("Invalid Triple-DES key size: "+8*t.length());this._keys=function(e){for(var t,r=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],n=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],i=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],o=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],s=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],a=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],c=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],l=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],u=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],h=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],d=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],f=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],p=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],g=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],m=e.length()>8?3:1,y=[],v=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],b=0,w=0;w<m;w++){var E=e.getInt32(),S=e.getInt32();E^=(t=252645135&(E>>>4^S))<<4,E^=t=65535&((S^=t)>>>-16^E),E^=(t=858993459&(E>>>2^(S^=t<<-16)))<<2,E^=t=65535&((S^=t)>>>-16^E),E^=(t=1431655765&(E>>>1^(S^=t<<-16)))<<1,E^=t=16711935&((S^=t)>>>8^E),t=(E^=(t=1431655765&(E>>>1^(S^=t<<8)))<<1)<<8|(S^=t)>>>20&240,E=S<<24|S<<8&16711680|S>>>8&65280|S>>>24&240,S=t;for(var _=0;_<v.length;++_){v[_]?(E=E<<2|E>>>26,S=S<<2|S>>>26):(E=E<<1|E>>>27,S=S<<1|S>>>27),S&=-15;var A=r[(E&=-15)>>>28]|n[E>>>24&15]|i[E>>>20&15]|o[E>>>16&15]|s[E>>>12&15]|a[E>>>8&15]|c[E>>>4&15],k=l[S>>>28]|u[S>>>24&15]|h[S>>>20&15]|d[S>>>16&15]|f[S>>>12&15]|p[S>>>8&15]|g[S>>>4&15];t=65535&(k>>>16^A),y[b++]=A^t,y[b++]=k^t<<16}}return y}(t),this._init=!0}},i("DES-ECB",n.cipher.modes.ecb),i("DES-CBC",n.cipher.modes.cbc),i("DES-CFB",n.cipher.modes.cfb),i("DES-OFB",n.cipher.modes.ofb),i("DES-CTR",n.cipher.modes.ctr),i("3DES-ECB",n.cipher.modes.ecb),i("3DES-CBC",n.cipher.modes.cbc),i("3DES-CFB",n.cipher.modes.cfb),i("3DES-OFB",n.cipher.modes.ofb),i("3DES-CTR",n.cipher.modes.ctr);var o=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],s=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],a=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],c=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],l=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],u=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],h=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],d=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];function f(e,t,r,n){var i,f,p=32===e.length?3:9;i=3===p?n?[30,-2,-2]:[0,32,2]:n?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var g=t[0],m=t[1];g^=(f=252645135&(g>>>4^m))<<4,g^=(f=65535&(g>>>16^(m^=f)))<<16,g^=f=858993459&((m^=f)>>>2^g),g^=f=16711935&((m^=f<<2)>>>8^g),g=(g^=(f=1431655765&(g>>>1^(m^=f<<8)))<<1)<<1|g>>>31,m=(m^=f)<<1|m>>>31;for(var y=0;y<p;y+=3){for(var v=i[y+1],b=i[y+2],w=i[y];w!=v;w+=b){var E=m^e[w],S=(m>>>4|m<<28)^e[w+1];f=g,g=m,m=f^(s[E>>>24&63]|c[E>>>16&63]|u[E>>>8&63]|d[63&E]|o[S>>>24&63]|a[S>>>16&63]|l[S>>>8&63]|h[63&S])}f=g,g=m,m=f}m=m>>>1|m<<31,m^=f=1431655765&((g=g>>>1|g<<31)>>>1^m),m^=(f=16711935&(m>>>8^(g^=f<<1)))<<8,m^=(f=858993459&(m>>>2^(g^=f)))<<2,m^=f=65535&((g^=f)>>>16^m),m^=f=252645135&((g^=f<<16)>>>4^m),g^=f<<4,r[0]=g,r[1]=m}function p(e){var t,r="DES-"+((e=e||{}).mode||"CBC").toUpperCase(),i=(t=e.decrypt?n.cipher.createDecipher(r,e.key):n.cipher.createCipher(r,e.key)).start;return t.start=function(e,r){var o=null;r instanceof n.util.ByteBuffer&&(o=r,r={}),(r=r||{}).output=o,r.iv=e,i.call(t,r)},t}},428:e=>{e.exports={options:{usePureJavaScript:!1}}},5617:(e,t,r)=>{var n=r(428);r(9207),r(9491),(e.exports=n.hmac=n.hmac||{}).create=function(){var e=null,t=null,r=null,i=null,o={start:function(o,s){if(null!==o)if("string"===typeof o){if(!((o=o.toLowerCase())in n.md.algorithms))throw new Error('Unknown hash algorithm "'+o+'"');t=n.md.algorithms[o].create()}else t=o;if(null===s)s=e;else{if("string"===typeof s)s=n.util.createBuffer(s);else if(n.util.isArray(s)){var a=s;s=n.util.createBuffer();for(var c=0;c<a.length;++c)s.putByte(a[c])}var l=s.length();l>t.blockLength&&(t.start(),t.update(s.bytes()),s=t.digest()),r=n.util.createBuffer(),i=n.util.createBuffer(),l=s.length();for(c=0;c<l;++c){a=s.at(c);r.putByte(54^a),i.putByte(92^a)}if(l<t.blockLength)for(a=t.blockLength-l,c=0;c<a;++c)r.putByte(54),i.putByte(92);e=s,r=r.bytes(),i=i.bytes()}t.start(),t.update(r)},update:function(e){t.update(e)},getMac:function(){var e=t.digest().bytes();return t.start(),t.update(i),t.update(e),t.digest()}};return o.digest=o.getMac,o}},7834:(e,t,r)=>{var n,i=r(428);e.exports=i.jsbn=i.jsbn||{};function o(e,t,r){this.data=[],null!=e&&("number"==typeof e?this.fromNumber(e,t,r):null==t&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,t))}function s(){return new o(null)}function a(e,t,r,n,i,o){for(var s=16383&t,a=t>>14;--o>=0;){var c=16383&this.data[e],l=this.data[e++]>>14,u=a*c+l*s;i=((c=s*c+((16383&u)<<14)+r.data[n]+i)>>28)+(u>>14)+a*l,r.data[n++]=268435455&c}return i}i.jsbn.BigInteger=o,"undefined"===typeof navigator?(o.prototype.am=a,n=28):"Microsoft Internet Explorer"==navigator.appName?(o.prototype.am=function(e,t,r,n,i,o){for(var s=32767&t,a=t>>15;--o>=0;){var c=32767&this.data[e],l=this.data[e++]>>15,u=a*c+l*s;i=((c=s*c+((32767&u)<<15)+r.data[n]+(1073741823&i))>>>30)+(u>>>15)+a*l+(i>>>30),r.data[n++]=1073741823&c}return i},n=30):"Netscape"!=navigator.appName?(o.prototype.am=function(e,t,r,n,i,o){for(;--o>=0;){var s=t*this.data[e++]+r.data[n]+i;i=Math.floor(s/67108864),r.data[n++]=67108863&s}return i},n=26):(o.prototype.am=a,n=28),o.prototype.DB=n,o.prototype.DM=(1<<n)-1,o.prototype.DV=1<<n;o.prototype.FV=Math.pow(2,52),o.prototype.F1=52-n,o.prototype.F2=2*n-52;var c,l,u=new Array;for(c="0".charCodeAt(0),l=0;l<=9;++l)u[c++]=l;for(c="a".charCodeAt(0),l=10;l<36;++l)u[c++]=l;for(c="A".charCodeAt(0),l=10;l<36;++l)u[c++]=l;function h(e){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(e)}function d(e,t){var r=u[e.charCodeAt(t)];return null==r?-1:r}function f(e){var t=s();return t.fromInt(e),t}function p(e){var t,r=1;return 0!=(t=e>>>16)&&(e=t,r+=16),0!=(t=e>>8)&&(e=t,r+=8),0!=(t=e>>4)&&(e=t,r+=4),0!=(t=e>>2)&&(e=t,r+=2),0!=(t=e>>1)&&(e=t,r+=1),r}function g(e){this.m=e}function m(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}function y(e,t){return e&t}function v(e,t){return e|t}function b(e,t){return e^t}function w(e,t){return e&~t}function E(e){if(0==e)return-1;var t=0;return 0==(65535&e)&&(e>>=16,t+=16),0==(255&e)&&(e>>=8,t+=8),0==(15&e)&&(e>>=4,t+=4),0==(3&e)&&(e>>=2,t+=2),0==(1&e)&&++t,t}function S(e){for(var t=0;0!=e;)e&=e-1,++t;return t}function _(){}function A(e){return e}function k(e){this.r2=s(),this.q3=s(),o.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}g.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},g.prototype.revert=function(e){return e},g.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},g.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},g.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},m.prototype.convert=function(e){var t=s();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(o.ZERO)>0&&this.m.subTo(t,t),t},m.prototype.revert=function(e){var t=s();return e.copyTo(t),this.reduce(t),t},m.prototype.reduce=function(e){for(;e.t<=this.mt2;)e.data[e.t++]=0;for(var t=0;t<this.m.t;++t){var r=32767&e.data[t],n=r*this.mpl+((r*this.mph+(e.data[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(r=t+this.m.t,e.data[r]+=this.m.am(0,n,e,t,0,this.m.t);e.data[r]>=e.DV;)e.data[r]-=e.DV,e.data[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},m.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},m.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},o.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e.data[t]=this.data[t];e.t=this.t,e.s=this.s},o.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this.data[0]=e:e<-1?this.data[0]=e+this.DV:this.t=0},o.prototype.fromString=function(e,t){var r;if(16==t)r=4;else if(8==t)r=3;else if(256==t)r=8;else if(2==t)r=1;else if(32==t)r=5;else{if(4!=t)return void this.fromRadix(e,t);r=2}this.t=0,this.s=0;for(var n=e.length,i=!1,s=0;--n>=0;){var a=8==r?255&e[n]:d(e,n);a<0?"-"==e.charAt(n)&&(i=!0):(i=!1,0==s?this.data[this.t++]=a:s+r>this.DB?(this.data[this.t-1]|=(a&(1<<this.DB-s)-1)<<s,this.data[this.t++]=a>>this.DB-s):this.data[this.t-1]|=a<<s,(s+=r)>=this.DB&&(s-=this.DB))}8==r&&0!=(128&e[0])&&(this.s=-1,s>0&&(this.data[this.t-1]|=(1<<this.DB-s)-1<<s)),this.clamp(),i&&o.ZERO.subTo(this,this)},o.prototype.clamp=function(){for(var e=this.s&this.DM;this.t>0&&this.data[this.t-1]==e;)--this.t},o.prototype.dlShiftTo=function(e,t){var r;for(r=this.t-1;r>=0;--r)t.data[r+e]=this.data[r];for(r=e-1;r>=0;--r)t.data[r]=0;t.t=this.t+e,t.s=this.s},o.prototype.drShiftTo=function(e,t){for(var r=e;r<this.t;++r)t.data[r-e]=this.data[r];t.t=Math.max(this.t-e,0),t.s=this.s},o.prototype.lShiftTo=function(e,t){var r,n=e%this.DB,i=this.DB-n,o=(1<<i)-1,s=Math.floor(e/this.DB),a=this.s<<n&this.DM;for(r=this.t-1;r>=0;--r)t.data[r+s+1]=this.data[r]>>i|a,a=(this.data[r]&o)<<n;for(r=s-1;r>=0;--r)t.data[r]=0;t.data[s]=a,t.t=this.t+s+1,t.s=this.s,t.clamp()},o.prototype.rShiftTo=function(e,t){t.s=this.s;var r=Math.floor(e/this.DB);if(r>=this.t)t.t=0;else{var n=e%this.DB,i=this.DB-n,o=(1<<n)-1;t.data[0]=this.data[r]>>n;for(var s=r+1;s<this.t;++s)t.data[s-r-1]|=(this.data[s]&o)<<i,t.data[s-r]=this.data[s]>>n;n>0&&(t.data[this.t-r-1]|=(this.s&o)<<i),t.t=this.t-r,t.clamp()}},o.prototype.subTo=function(e,t){for(var r=0,n=0,i=Math.min(e.t,this.t);r<i;)n+=this.data[r]-e.data[r],t.data[r++]=n&this.DM,n>>=this.DB;if(e.t<this.t){for(n-=e.s;r<this.t;)n+=this.data[r],t.data[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<e.t;)n-=e.data[r],t.data[r++]=n&this.DM,n>>=this.DB;n-=e.s}t.s=n<0?-1:0,n<-1?t.data[r++]=this.DV+n:n>0&&(t.data[r++]=n),t.t=r,t.clamp()},o.prototype.multiplyTo=function(e,t){var r=this.abs(),n=e.abs(),i=r.t;for(t.t=i+n.t;--i>=0;)t.data[i]=0;for(i=0;i<n.t;++i)t.data[i+r.t]=r.am(0,n.data[i],t,i,0,r.t);t.s=0,t.clamp(),this.s!=e.s&&o.ZERO.subTo(t,t)},o.prototype.squareTo=function(e){for(var t=this.abs(),r=e.t=2*t.t;--r>=0;)e.data[r]=0;for(r=0;r<t.t-1;++r){var n=t.am(r,t.data[r],e,2*r,0,1);(e.data[r+t.t]+=t.am(r+1,2*t.data[r],e,2*r+1,n,t.t-r-1))>=t.DV&&(e.data[r+t.t]-=t.DV,e.data[r+t.t+1]=1)}e.t>0&&(e.data[e.t-1]+=t.am(r,t.data[r],e,2*r,0,1)),e.s=0,e.clamp()},o.prototype.divRemTo=function(e,t,r){var n=e.abs();if(!(n.t<=0)){var i=this.abs();if(i.t<n.t)return null!=t&&t.fromInt(0),void(null!=r&&this.copyTo(r));null==r&&(r=s());var a=s(),c=this.s,l=e.s,u=this.DB-p(n.data[n.t-1]);u>0?(n.lShiftTo(u,a),i.lShiftTo(u,r)):(n.copyTo(a),i.copyTo(r));var h=a.t,d=a.data[h-1];if(0!=d){var f=d*(1<<this.F1)+(h>1?a.data[h-2]>>this.F2:0),g=this.FV/f,m=(1<<this.F1)/f,y=1<<this.F2,v=r.t,b=v-h,w=null==t?s():t;for(a.dlShiftTo(b,w),r.compareTo(w)>=0&&(r.data[r.t++]=1,r.subTo(w,r)),o.ONE.dlShiftTo(h,w),w.subTo(a,a);a.t<h;)a.data[a.t++]=0;for(;--b>=0;){var E=r.data[--v]==d?this.DM:Math.floor(r.data[v]*g+(r.data[v-1]+y)*m);if((r.data[v]+=a.am(0,E,r,b,0,h))<E)for(a.dlShiftTo(b,w),r.subTo(w,r);r.data[v]<--E;)r.subTo(w,r)}null!=t&&(r.drShiftTo(h,t),c!=l&&o.ZERO.subTo(t,t)),r.t=h,r.clamp(),u>0&&r.rShiftTo(u,r),c<0&&o.ZERO.subTo(r,r)}}},o.prototype.invDigit=function(){if(this.t<1)return 0;var e=this.data[0];if(0==(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},o.prototype.isEven=function(){return 0==(this.t>0?1&this.data[0]:this.s)},o.prototype.exp=function(e,t){if(e>4294967295||e<1)return o.ONE;var r=s(),n=s(),i=t.convert(this),a=p(e)-1;for(i.copyTo(r);--a>=0;)if(t.sqrTo(r,n),(e&1<<a)>0)t.mulTo(n,i,r);else{var c=r;r=n,n=c}return t.revert(r)},o.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var r,n=(1<<t)-1,i=!1,o="",s=this.t,a=this.DB-s*this.DB%t;if(s-- >0)for(a<this.DB&&(r=this.data[s]>>a)>0&&(i=!0,o=h(r));s>=0;)a<t?(r=(this.data[s]&(1<<a)-1)<<t-a,r|=this.data[--s]>>(a+=this.DB-t)):(r=this.data[s]>>(a-=t)&n,a<=0&&(a+=this.DB,--s)),r>0&&(i=!0),i&&(o+=h(r));return i?o:"0"},o.prototype.negate=function(){var e=s();return o.ZERO.subTo(this,e),e},o.prototype.abs=function(){return this.s<0?this.negate():this},o.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var r=this.t;if(0!=(t=r-e.t))return this.s<0?-t:t;for(;--r>=0;)if(0!=(t=this.data[r]-e.data[r]))return t;return 0},o.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+p(this.data[this.t-1]^this.s&this.DM)},o.prototype.mod=function(e){var t=s();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(o.ZERO)>0&&e.subTo(t,t),t},o.prototype.modPowInt=function(e,t){var r;return r=e<256||t.isEven()?new g(t):new m(t),this.exp(e,r)},o.ZERO=f(0),o.ONE=f(1),_.prototype.convert=A,_.prototype.revert=A,_.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r)},_.prototype.sqrTo=function(e,t){e.squareTo(t)},k.prototype.convert=function(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=s();return e.copyTo(t),this.reduce(t),t},k.prototype.revert=function(e){return e},k.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},k.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},k.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)};var C=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509],x=(1<<26)/C[C.length-1];o.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},o.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),r=Math.pow(e,t),n=f(r),i=s(),o=s(),a="";for(this.divRemTo(n,i,o);i.signum()>0;)a=(r+o.intValue()).toString(e).substr(1)+a,i.divRemTo(n,i,o);return o.intValue().toString(e)+a},o.prototype.fromRadix=function(e,t){this.fromInt(0),null==t&&(t=10);for(var r=this.chunkSize(t),n=Math.pow(t,r),i=!1,s=0,a=0,c=0;c<e.length;++c){var l=d(e,c);l<0?"-"==e.charAt(c)&&0==this.signum()&&(i=!0):(a=t*a+l,++s>=r&&(this.dMultiply(n),this.dAddOffset(a,0),s=0,a=0))}s>0&&(this.dMultiply(Math.pow(t,s)),this.dAddOffset(a,0)),i&&o.ZERO.subTo(this,this)},o.prototype.fromNumber=function(e,t,r){if("number"==typeof t)if(e<2)this.fromInt(1);else for(this.fromNumber(e,r),this.testBit(e-1)||this.bitwiseTo(o.ONE.shiftLeft(e-1),v,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(o.ONE.shiftLeft(e-1),this);else{var n=new Array,i=7&e;n.length=1+(e>>3),t.nextBytes(n),i>0?n[0]&=(1<<i)-1:n[0]=0,this.fromString(n,256)}},o.prototype.bitwiseTo=function(e,t,r){var n,i,o=Math.min(e.t,this.t);for(n=0;n<o;++n)r.data[n]=t(this.data[n],e.data[n]);if(e.t<this.t){for(i=e.s&this.DM,n=o;n<this.t;++n)r.data[n]=t(this.data[n],i);r.t=this.t}else{for(i=this.s&this.DM,n=o;n<e.t;++n)r.data[n]=t(i,e.data[n]);r.t=e.t}r.s=t(this.s,e.s),r.clamp()},o.prototype.changeBit=function(e,t){var r=o.ONE.shiftLeft(e);return this.bitwiseTo(r,t,r),r},o.prototype.addTo=function(e,t){for(var r=0,n=0,i=Math.min(e.t,this.t);r<i;)n+=this.data[r]+e.data[r],t.data[r++]=n&this.DM,n>>=this.DB;if(e.t<this.t){for(n+=e.s;r<this.t;)n+=this.data[r],t.data[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<e.t;)n+=e.data[r],t.data[r++]=n&this.DM,n>>=this.DB;n+=e.s}t.s=n<0?-1:0,n>0?t.data[r++]=n:n<-1&&(t.data[r++]=this.DV+n),t.t=r,t.clamp()},o.prototype.dMultiply=function(e){this.data[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},o.prototype.dAddOffset=function(e,t){if(0!=e){for(;this.t<=t;)this.data[this.t++]=0;for(this.data[t]+=e;this.data[t]>=this.DV;)this.data[t]-=this.DV,++t>=this.t&&(this.data[this.t++]=0),++this.data[t]}},o.prototype.multiplyLowerTo=function(e,t,r){var n,i=Math.min(this.t+e.t,t);for(r.s=0,r.t=i;i>0;)r.data[--i]=0;for(n=r.t-this.t;i<n;++i)r.data[i+this.t]=this.am(0,e.data[i],r,i,0,this.t);for(n=Math.min(e.t,t);i<n;++i)this.am(0,e.data[i],r,i,0,t-i);r.clamp()},o.prototype.multiplyUpperTo=function(e,t,r){--t;var n=r.t=this.t+e.t-t;for(r.s=0;--n>=0;)r.data[n]=0;for(n=Math.max(t-this.t,0);n<e.t;++n)r.data[this.t+n-t]=this.am(t-n,e.data[n],r,0,0,this.t+n-t);r.clamp(),r.drShiftTo(1,r)},o.prototype.modInt=function(e){if(e<=0)return 0;var t=this.DV%e,r=this.s<0?e-1:0;if(this.t>0)if(0==t)r=this.data[0]%e;else for(var n=this.t-1;n>=0;--n)r=(t*r+this.data[n])%e;return r},o.prototype.millerRabin=function(e){var t=this.subtract(o.ONE),r=t.getLowestSetBit();if(r<=0)return!1;for(var n,i=t.shiftRight(r),s={nextBytes:function(e){for(var t=0;t<e.length;++t)e[t]=Math.floor(256*Math.random())}},a=0;a<e;++a){do{n=new o(this.bitLength(),s)}while(n.compareTo(o.ONE)<=0||n.compareTo(t)>=0);var c=n.modPow(i,this);if(0!=c.compareTo(o.ONE)&&0!=c.compareTo(t)){for(var l=1;l++<r&&0!=c.compareTo(t);)if(0==(c=c.modPowInt(2,this)).compareTo(o.ONE))return!1;if(0!=c.compareTo(t))return!1}}return!0},o.prototype.clone=function(){var e=s();return this.copyTo(e),e},o.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this.data[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this.data[0];if(0==this.t)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]},o.prototype.byteValue=function(){return 0==this.t?this.s:this.data[0]<<24>>24},o.prototype.shortValue=function(){return 0==this.t?this.s:this.data[0]<<16>>16},o.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this.data[0]<=0?0:1},o.prototype.toByteArray=function(){var e=this.t,t=new Array;t[0]=this.s;var r,n=this.DB-e*this.DB%8,i=0;if(e-- >0)for(n<this.DB&&(r=this.data[e]>>n)!=(this.s&this.DM)>>n&&(t[i++]=r|this.s<<this.DB-n);e>=0;)n<8?(r=(this.data[e]&(1<<n)-1)<<8-n,r|=this.data[--e]>>(n+=this.DB-8)):(r=this.data[e]>>(n-=8)&255,n<=0&&(n+=this.DB,--e)),0!=(128&r)&&(r|=-256),0==i&&(128&this.s)!=(128&r)&&++i,(i>0||r!=this.s)&&(t[i++]=r);return t},o.prototype.equals=function(e){return 0==this.compareTo(e)},o.prototype.min=function(e){return this.compareTo(e)<0?this:e},o.prototype.max=function(e){return this.compareTo(e)>0?this:e},o.prototype.and=function(e){var t=s();return this.bitwiseTo(e,y,t),t},o.prototype.or=function(e){var t=s();return this.bitwiseTo(e,v,t),t},o.prototype.xor=function(e){var t=s();return this.bitwiseTo(e,b,t),t},o.prototype.andNot=function(e){var t=s();return this.bitwiseTo(e,w,t),t},o.prototype.not=function(){for(var e=s(),t=0;t<this.t;++t)e.data[t]=this.DM&~this.data[t];return e.t=this.t,e.s=~this.s,e},o.prototype.shiftLeft=function(e){var t=s();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t},o.prototype.shiftRight=function(e){var t=s();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t},o.prototype.getLowestSetBit=function(){for(var e=0;e<this.t;++e)if(0!=this.data[e])return e*this.DB+E(this.data[e]);return this.s<0?this.t*this.DB:-1},o.prototype.bitCount=function(){for(var e=0,t=this.s&this.DM,r=0;r<this.t;++r)e+=S(this.data[r]^t);return e},o.prototype.testBit=function(e){var t=Math.floor(e/this.DB);return t>=this.t?0!=this.s:0!=(this.data[t]&1<<e%this.DB)},o.prototype.setBit=function(e){return this.changeBit(e,v)},o.prototype.clearBit=function(e){return this.changeBit(e,w)},o.prototype.flipBit=function(e){return this.changeBit(e,b)},o.prototype.add=function(e){var t=s();return this.addTo(e,t),t},o.prototype.subtract=function(e){var t=s();return this.subTo(e,t),t},o.prototype.multiply=function(e){var t=s();return this.multiplyTo(e,t),t},o.prototype.divide=function(e){var t=s();return this.divRemTo(e,t,null),t},o.prototype.remainder=function(e){var t=s();return this.divRemTo(e,null,t),t},o.prototype.divideAndRemainder=function(e){var t=s(),r=s();return this.divRemTo(e,t,r),new Array(t,r)},o.prototype.modPow=function(e,t){var r,n,i=e.bitLength(),o=f(1);if(i<=0)return o;r=i<18?1:i<48?3:i<144?4:i<768?5:6,n=i<8?new g(t):t.isEven()?new k(t):new m(t);var a=new Array,c=3,l=r-1,u=(1<<r)-1;if(a[1]=n.convert(this),r>1){var h=s();for(n.sqrTo(a[1],h);c<=u;)a[c]=s(),n.mulTo(h,a[c-2],a[c]),c+=2}var d,y,v=e.t-1,b=!0,w=s();for(i=p(e.data[v])-1;v>=0;){for(i>=l?d=e.data[v]>>i-l&u:(d=(e.data[v]&(1<<i+1)-1)<<l-i,v>0&&(d|=e.data[v-1]>>this.DB+i-l)),c=r;0==(1&d);)d>>=1,--c;if((i-=c)<0&&(i+=this.DB,--v),b)a[d].copyTo(o),b=!1;else{for(;c>1;)n.sqrTo(o,w),n.sqrTo(w,o),c-=2;c>0?n.sqrTo(o,w):(y=o,o=w,w=y),n.mulTo(w,a[d],o)}for(;v>=0&&0==(e.data[v]&1<<i);)n.sqrTo(o,w),y=o,o=w,w=y,--i<0&&(i=this.DB-1,--v)}return n.revert(o)},o.prototype.modInverse=function(e){var t=e.isEven();if(this.isEven()&&t||0==e.signum())return o.ZERO;for(var r=e.clone(),n=this.clone(),i=f(1),s=f(0),a=f(0),c=f(1);0!=r.signum();){for(;r.isEven();)r.rShiftTo(1,r),t?(i.isEven()&&s.isEven()||(i.addTo(this,i),s.subTo(e,s)),i.rShiftTo(1,i)):s.isEven()||s.subTo(e,s),s.rShiftTo(1,s);for(;n.isEven();)n.rShiftTo(1,n),t?(a.isEven()&&c.isEven()||(a.addTo(this,a),c.subTo(e,c)),a.rShiftTo(1,a)):c.isEven()||c.subTo(e,c),c.rShiftTo(1,c);r.compareTo(n)>=0?(r.subTo(n,r),t&&i.subTo(a,i),s.subTo(c,s)):(n.subTo(r,n),t&&a.subTo(i,a),c.subTo(s,c))}return 0!=n.compareTo(o.ONE)?o.ZERO:c.compareTo(e)>=0?c.subtract(e):c.signum()<0?(c.addTo(e,c),c.signum()<0?c.add(e):c):c},o.prototype.pow=function(e){return this.exp(e,new _)},o.prototype.gcd=function(e){var t=this.s<0?this.negate():this.clone(),r=e.s<0?e.negate():e.clone();if(t.compareTo(r)<0){var n=t;t=r,r=n}var i=t.getLowestSetBit(),o=r.getLowestSetBit();if(o<0)return t;for(i<o&&(o=i),o>0&&(t.rShiftTo(o,t),r.rShiftTo(o,r));t.signum()>0;)(i=t.getLowestSetBit())>0&&t.rShiftTo(i,t),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),t.compareTo(r)>=0?(t.subTo(r,t),t.rShiftTo(1,t)):(r.subTo(t,r),r.rShiftTo(1,r));return o>0&&r.lShiftTo(o,r),r},o.prototype.isProbablePrime=function(e){var t,r=this.abs();if(1==r.t&&r.data[0]<=C[C.length-1]){for(t=0;t<C.length;++t)if(r.data[0]==C[t])return!0;return!1}if(r.isEven())return!1;for(t=1;t<C.length;){for(var n=C[t],i=t+1;i<C.length&&n<x;)n*=C[i++];for(n=r.modInt(n);t<i;)if(n%C[t++]==0)return!1}return r.millerRabin(e)}},9207:(e,t,r)=>{var n=r(428);e.exports=n.md=n.md||{},n.md.algorithms=n.md.algorithms||{}},1346:(e,t,r)=>{var n=r(428);n.pki=n.pki||{};var i=e.exports=n.pki.oids=n.oids=n.oids||{};function o(e,t){i[e]=t,i[t]=e}function s(e,t){i[e]=t}o("1.2.840.113549.1.1.1","rsaEncryption"),o("1.2.840.113549.1.1.4","md5WithRSAEncryption"),o("1.2.840.113549.1.1.5","sha1WithRSAEncryption"),o("1.2.840.113549.1.1.7","RSAES-OAEP"),o("1.2.840.113549.1.1.8","mgf1"),o("1.2.840.113549.1.1.9","pSpecified"),o("1.2.840.113549.1.1.10","RSASSA-PSS"),o("1.2.840.113549.1.1.11","sha256WithRSAEncryption"),o("1.2.840.113549.1.1.12","sha384WithRSAEncryption"),o("1.2.840.113549.1.1.13","sha512WithRSAEncryption"),o("1.3.101.112","EdDSA25519"),o("1.2.840.10040.4.3","dsa-with-sha1"),o("1.3.14.3.2.7","desCBC"),o("1.3.14.3.2.26","sha1"),o("1.3.14.3.2.29","sha1WithRSASignature"),o("2.16.840.1.101.3.4.2.1","sha256"),o("2.16.840.1.101.3.4.2.2","sha384"),o("2.16.840.1.101.3.4.2.3","sha512"),o("2.16.840.1.101.3.4.2.4","sha224"),o("2.16.840.1.101.3.4.2.5","sha512-224"),o("2.16.840.1.101.3.4.2.6","sha512-256"),o("1.2.840.113549.2.2","md2"),o("1.2.840.113549.2.5","md5"),o("1.2.840.113549.1.7.1","data"),o("1.2.840.113549.1.7.2","signedData"),o("1.2.840.113549.1.7.3","envelopedData"),o("1.2.840.113549.1.7.4","signedAndEnvelopedData"),o("1.2.840.113549.1.7.5","digestedData"),o("1.2.840.113549.1.7.6","encryptedData"),o("1.2.840.113549.1.9.1","emailAddress"),o("1.2.840.113549.1.9.2","unstructuredName"),o("1.2.840.113549.1.9.3","contentType"),o("1.2.840.113549.1.9.4","messageDigest"),o("1.2.840.113549.1.9.5","signingTime"),o("1.2.840.113549.1.9.6","counterSignature"),o("1.2.840.113549.1.9.7","challengePassword"),o("1.2.840.113549.1.9.8","unstructuredAddress"),o("1.2.840.113549.1.9.14","extensionRequest"),o("1.2.840.113549.1.9.20","friendlyName"),o("1.2.840.113549.1.9.21","localKeyId"),o("1.2.840.113549.1.9.22.1","x509Certificate"),o("1.2.840.113549.1.12.10.1.1","keyBag"),o("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag"),o("1.2.840.113549.1.12.10.1.3","certBag"),o("1.2.840.113549.1.12.10.1.4","crlBag"),o("1.2.840.113549.1.12.10.1.5","secretBag"),o("1.2.840.113549.1.12.10.1.6","safeContentsBag"),o("1.2.840.113549.1.5.13","pkcs5PBES2"),o("1.2.840.113549.1.5.12","pkcs5PBKDF2"),o("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4"),o("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4"),o("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC"),o("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC"),o("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC"),o("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC"),o("1.2.840.113549.2.7","hmacWithSHA1"),o("1.2.840.113549.2.8","hmacWithSHA224"),o("1.2.840.113549.2.9","hmacWithSHA256"),o("1.2.840.113549.2.10","hmacWithSHA384"),o("1.2.840.113549.2.11","hmacWithSHA512"),o("1.2.840.113549.3.7","des-EDE3-CBC"),o("2.16.840.1.101.3.4.1.2","aes128-CBC"),o("2.16.840.1.101.3.4.1.22","aes192-CBC"),o("2.16.840.1.101.3.4.1.42","aes256-CBC"),o("2.5.4.3","commonName"),o("2.5.4.4","surname"),o("2.5.4.5","serialNumber"),o("2.5.4.6","countryName"),o("2.5.4.7","localityName"),o("2.5.4.8","stateOrProvinceName"),o("2.5.4.9","streetAddress"),o("2.5.4.10","organizationName"),o("2.5.4.11","organizationalUnitName"),o("2.5.4.12","title"),o("2.5.4.13","description"),o("2.5.4.15","businessCategory"),o("2.5.4.17","postalCode"),o("2.5.4.42","givenName"),o("1.3.6.1.4.1.311.60.2.1.2","jurisdictionOfIncorporationStateOrProvinceName"),o("1.3.6.1.4.1.311.60.2.1.3","jurisdictionOfIncorporationCountryName"),o("2.16.840.1.113730.1.1","nsCertType"),o("2.16.840.1.113730.1.13","nsComment"),s("2.5.29.1","authorityKeyIdentifier"),s("2.5.29.2","keyAttributes"),s("2.5.29.3","certificatePolicies"),s("2.5.29.4","keyUsageRestriction"),s("2.5.29.5","policyMapping"),s("2.5.29.6","subtreesConstraint"),s("2.5.29.7","subjectAltName"),s("2.5.29.8","issuerAltName"),s("2.5.29.9","subjectDirectoryAttributes"),s("2.5.29.10","basicConstraints"),s("2.5.29.11","nameConstraints"),s("2.5.29.12","policyConstraints"),s("2.5.29.13","basicConstraints"),o("2.5.29.14","subjectKeyIdentifier"),o("2.5.29.15","keyUsage"),s("2.5.29.16","privateKeyUsagePeriod"),o("2.5.29.17","subjectAltName"),o("2.5.29.18","issuerAltName"),o("2.5.29.19","basicConstraints"),s("2.5.29.20","cRLNumber"),s("2.5.29.21","cRLReason"),s("2.5.29.22","expirationDate"),s("2.5.29.23","instructionCode"),s("2.5.29.24","invalidityDate"),s("2.5.29.25","cRLDistributionPoints"),s("2.5.29.26","issuingDistributionPoint"),s("2.5.29.27","deltaCRLIndicator"),s("2.5.29.28","issuingDistributionPoint"),s("2.5.29.29","certificateIssuer"),s("2.5.29.30","nameConstraints"),o("2.5.29.31","cRLDistributionPoints"),o("2.5.29.32","certificatePolicies"),s("2.5.29.33","policyMappings"),s("2.5.29.34","policyConstraints"),o("2.5.29.35","authorityKeyIdentifier"),s("2.5.29.36","policyConstraints"),o("2.5.29.37","extKeyUsage"),s("2.5.29.46","freshestCRL"),s("2.5.29.54","inhibitAnyPolicy"),o("1.3.6.1.4.1.11129.2.4.2","timestampList"),o("1.3.6.1.5.5.7.1.1","authorityInfoAccess"),o("1.3.6.1.5.5.7.3.1","serverAuth"),o("1.3.6.1.5.5.7.3.2","clientAuth"),o("1.3.6.1.5.5.7.3.3","codeSigning"),o("1.3.6.1.5.5.7.3.4","emailProtection"),o("1.3.6.1.5.5.7.3.8","timeStamping")},6443:(e,t,r)=>{var n=r(428);if(r(5332),r(5419),r(5877),r(9207),r(1346),r(4021),r(197),r(5455),r(8177),r(3894),r(9491),"undefined"===typeof i)var i=n.jsbn.BigInteger;var o=n.asn1,s=n.pki=n.pki||{};e.exports=s.pbe=n.pbe=n.pbe||{};var a=s.oids,c={name:"EncryptedPrivateKeyInfo",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"encryptionOid"},{name:"AlgorithmIdentifier.parameters",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:o.Class.UNIVERSAL,type:o.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},l={name:"PBES2Algorithms",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:o.Class.UNIVERSAL,type:o.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"kdfIterationCount"},{name:"PBES2Algorithms.params.keyLength",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,optional:!0,capture:"keyLength"},{name:"PBES2Algorithms.params.prf",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,optional:!0,value:[{name:"PBES2Algorithms.params.prf.algorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"prfOid"}]}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:o.Class.UNIVERSAL,type:o.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},u={name:"pkcs-12PbeParams",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:o.Class.UNIVERSAL,type:o.Type.OCTETSTRING,constructed:!1,capture:"salt"},{name:"pkcs-12PbeParams.iterations",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"iterations"}]};function h(e,t){return e.start().update(t).digest().getBytes()}function d(e){var t;if(e){if(!(t=s.oids[o.derToOid(e)])){var r=new Error("Unsupported PRF OID.");throw r.oid=e,r.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],r}}else t="hmacWithSHA1";return f(t)}function f(e){var t=n.md;switch(e){case"hmacWithSHA224":t=n.md.sha512;case"hmacWithSHA1":case"hmacWithSHA256":case"hmacWithSHA384":case"hmacWithSHA512":e=e.substr(8).toLowerCase();break;default:var r=new Error("Unsupported PRF algorithm.");throw r.algorithm=e,r.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],r}if(!t||!(e in t))throw new Error("Unknown hash algorithm: "+e);return t[e].create()}s.encryptPrivateKeyInfo=function(e,t,r){(r=r||{}).saltSize=r.saltSize||8,r.count=r.count||2048,r.algorithm=r.algorithm||"aes128",r.prfAlgorithm=r.prfAlgorithm||"sha1";var i,c,l,u=n.random.getBytesSync(r.saltSize),h=r.count,d=o.integerToDer(h);if(0===r.algorithm.indexOf("aes")||"des"===r.algorithm){var p,g,m;switch(r.algorithm){case"aes128":i=16,p=16,g=a["aes128-CBC"],m=n.aes.createEncryptionCipher;break;case"aes192":i=24,p=16,g=a["aes192-CBC"],m=n.aes.createEncryptionCipher;break;case"aes256":i=32,p=16,g=a["aes256-CBC"],m=n.aes.createEncryptionCipher;break;case"des":i=8,p=8,g=a.desCBC,m=n.des.createEncryptionCipher;break;default:throw(S=new Error("Cannot encrypt private key. Unknown encryption algorithm.")).algorithm=r.algorithm,S}var y="hmacWith"+r.prfAlgorithm.toUpperCase(),v=f(y),b=n.pkcs5.pbkdf2(t,u,h,i,v),w=n.random.getBytesSync(p);(_=m(b)).start(w),_.update(o.toDer(e)),_.finish(),l=_.output.getBytes();var E=function(e,t,r,i){var a=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,e),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,t.getBytes())]);"hmacWithSHA1"!==i&&a.value.push(o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,n.util.hexToBytes(r.toString(16))),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(s.oids[i]).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.NULL,!1,"")]));return a}(u,d,i,y);c=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(a.pkcs5PBES2).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(a.pkcs5PBKDF2).getBytes()),E]),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(g).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,w)])])])}else{var S;if("3des"!==r.algorithm)throw(S=new Error("Cannot encrypt private key. Unknown encryption algorithm.")).algorithm=r.algorithm,S;i=24;var _,A=new n.util.ByteBuffer(u);b=s.pbe.generatePkcs12Key(t,A,1,h,i),w=s.pbe.generatePkcs12Key(t,A,2,h,i);(_=n.des.createEncryptionCipher(b)).start(w),_.update(o.toDer(e)),_.finish(),l=_.output.getBytes(),c=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(a["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,u),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,d.getBytes())])])}return o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[c,o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,l)])},s.decryptPrivateKeyInfo=function(e,t){var r=null,i={},a=[];if(!o.validate(e,c,i,a)){var l=new Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw l.errors=a,l}var u=o.derToOid(i.encryptionOid),h=s.pbe.getCipher(u,i.encryptionParams,t),d=n.util.createBuffer(i.encryptedData);return h.update(d),h.finish()&&(r=o.fromDer(h.output)),r},s.encryptedPrivateKeyToPem=function(e,t){var r={type:"ENCRYPTED PRIVATE KEY",body:o.toDer(e).getBytes()};return n.pem.encode(r,{maxline:t})},s.encryptedPrivateKeyFromPem=function(e){var t=n.pem.decode(e)[0];if("ENCRYPTED PRIVATE KEY"!==t.type){var r=new Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');throw r.headerType=t.type,r}if(t.procType&&"ENCRYPTED"===t.procType.type)throw new Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return o.fromDer(t.body)},s.encryptRsaPrivateKey=function(e,t,r){if(!(r=r||{}).legacy){var i=s.wrapRsaPrivateKey(s.privateKeyToAsn1(e));return i=s.encryptPrivateKeyInfo(i,t,r),s.encryptedPrivateKeyToPem(i)}var a,c,l,u;switch(r.algorithm){case"aes128":a="AES-128-CBC",l=16,c=n.random.getBytesSync(16),u=n.aes.createEncryptionCipher;break;case"aes192":a="AES-192-CBC",l=24,c=n.random.getBytesSync(16),u=n.aes.createEncryptionCipher;break;case"aes256":a="AES-256-CBC",l=32,c=n.random.getBytesSync(16),u=n.aes.createEncryptionCipher;break;case"3des":a="DES-EDE3-CBC",l=24,c=n.random.getBytesSync(8),u=n.des.createEncryptionCipher;break;case"des":a="DES-CBC",l=8,c=n.random.getBytesSync(8),u=n.des.createEncryptionCipher;break;default:var h=new Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+r.algorithm+'".');throw h.algorithm=r.algorithm,h}var d=u(n.pbe.opensslDeriveBytes(t,c.substr(0,8),l));d.start(c),d.update(o.toDer(s.privateKeyToAsn1(e))),d.finish();var f={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:a,parameters:n.util.bytesToHex(c).toUpperCase()},body:d.output.getBytes()};return n.pem.encode(f)},s.decryptRsaPrivateKey=function(e,t){var r=null,i=n.pem.decode(e)[0];if("ENCRYPTED PRIVATE KEY"!==i.type&&"PRIVATE KEY"!==i.type&&"RSA PRIVATE KEY"!==i.type)throw(l=new Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".')).headerType=l,l;if(i.procType&&"ENCRYPTED"===i.procType.type){var a,c;switch(i.dekInfo.algorithm){case"DES-CBC":a=8,c=n.des.createDecryptionCipher;break;case"DES-EDE3-CBC":a=24,c=n.des.createDecryptionCipher;break;case"AES-128-CBC":a=16,c=n.aes.createDecryptionCipher;break;case"AES-192-CBC":a=24,c=n.aes.createDecryptionCipher;break;case"AES-256-CBC":a=32,c=n.aes.createDecryptionCipher;break;case"RC2-40-CBC":a=5,c=function(e){return n.rc2.createDecryptionCipher(e,40)};break;case"RC2-64-CBC":a=8,c=function(e){return n.rc2.createDecryptionCipher(e,64)};break;case"RC2-128-CBC":a=16,c=function(e){return n.rc2.createDecryptionCipher(e,128)};break;default:var l;throw(l=new Error('Could not decrypt private key; unsupported encryption algorithm "'+i.dekInfo.algorithm+'".')).algorithm=i.dekInfo.algorithm,l}var u=n.util.hexToBytes(i.dekInfo.parameters),h=c(n.pbe.opensslDeriveBytes(t,u.substr(0,8),a));if(h.start(u),h.update(n.util.createBuffer(i.body)),!h.finish())return r;r=h.output.getBytes()}else r=i.body;return null!==(r="ENCRYPTED PRIVATE KEY"===i.type?s.decryptPrivateKeyInfo(o.fromDer(r),t):o.fromDer(r))&&(r=s.privateKeyFromAsn1(r)),r},s.pbe.generatePkcs12Key=function(e,t,r,i,o,s){var a,c;if("undefined"===typeof s||null===s){if(!("sha1"in n.md))throw new Error('"sha1" hash algorithm unavailable.');s=n.md.sha1.create()}var l=s.digestLength,u=s.blockLength,h=new n.util.ByteBuffer,d=new n.util.ByteBuffer;if(null!==e&&void 0!==e){for(c=0;c<e.length;c++)d.putInt16(e.charCodeAt(c));d.putInt16(0)}var f=d.length(),p=t.length(),g=new n.util.ByteBuffer;g.fillWithByte(r,u);var m=u*Math.ceil(p/u),y=new n.util.ByteBuffer;for(c=0;c<m;c++)y.putByte(t.at(c%p));var v=u*Math.ceil(f/u),b=new n.util.ByteBuffer;for(c=0;c<v;c++)b.putByte(d.at(c%f));var w=y;w.putBuffer(b);for(var E=Math.ceil(o/l),S=1;S<=E;S++){var _=new n.util.ByteBuffer;_.putBytes(g.bytes()),_.putBytes(w.bytes());for(var A=0;A<i;A++)s.start(),s.update(_.getBytes()),_=s.digest();var k=new n.util.ByteBuffer;for(c=0;c<u;c++)k.putByte(_.at(c%l));var C=Math.ceil(p/u)+Math.ceil(f/u),x=new n.util.ByteBuffer;for(a=0;a<C;a++){var I=new n.util.ByteBuffer(w.getBytes(u)),R=511;for(c=k.length()-1;c>=0;c--)R>>=8,R+=k.at(c)+I.at(c),I.setAt(c,255&R);x.putBuffer(I)}w=x,h.putBuffer(_)}return h.truncate(h.length()-o),h},s.pbe.getCipher=function(e,t,r){switch(e){case s.oids.pkcs5PBES2:return s.pbe.getCipherForPBES2(e,t,r);case s.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case s.oids["pbewithSHAAnd40BitRC2-CBC"]:return s.pbe.getCipherForPKCS12PBE(e,t,r);default:var n=new Error("Cannot read encrypted PBE data block. Unsupported OID.");throw n.oid=e,n.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],n}},s.pbe.getCipherForPBES2=function(e,t,r){var i,a={},c=[];if(!o.validate(t,l,a,c))throw(i=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")).errors=c,i;if((e=o.derToOid(a.kdfOid))!==s.oids.pkcs5PBKDF2)throw(i=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.")).oid=e,i.supportedOids=["pkcs5PBKDF2"],i;if((e=o.derToOid(a.encOid))!==s.oids["aes128-CBC"]&&e!==s.oids["aes192-CBC"]&&e!==s.oids["aes256-CBC"]&&e!==s.oids["des-EDE3-CBC"]&&e!==s.oids.desCBC)throw(i=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.")).oid=e,i.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],i;var u,h,f=a.kdfSalt,p=n.util.createBuffer(a.kdfIterationCount);switch(p=p.getInt(p.length()<<3),s.oids[e]){case"aes128-CBC":u=16,h=n.aes.createDecryptionCipher;break;case"aes192-CBC":u=24,h=n.aes.createDecryptionCipher;break;case"aes256-CBC":u=32,h=n.aes.createDecryptionCipher;break;case"des-EDE3-CBC":u=24,h=n.des.createDecryptionCipher;break;case"desCBC":u=8,h=n.des.createDecryptionCipher}var g=d(a.prfOid),m=n.pkcs5.pbkdf2(r,f,p,u,g),y=a.encIv,v=h(m);return v.start(y),v},s.pbe.getCipherForPKCS12PBE=function(e,t,r){var i={},a=[];if(!o.validate(t,u,i,a))throw(g=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")).errors=a,g;var c,l,h,f=n.util.createBuffer(i.salt),p=n.util.createBuffer(i.iterations);switch(p=p.getInt(p.length()<<3),e){case s.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:c=24,l=8,h=n.des.startDecrypting;break;case s.oids["pbewithSHAAnd40BitRC2-CBC"]:c=5,l=8,h=function(e,t){var r=n.rc2.createDecryptionCipher(e,40);return r.start(t,null),r};break;default:var g;throw(g=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.")).oid=e,g}var m=d(i.prfOid),y=s.pbe.generatePkcs12Key(r,f,1,p,c,m);return m.start(),h(y,s.pbe.generatePkcs12Key(r,f,2,p,l,m))},s.pbe.opensslDeriveBytes=function(e,t,r,i){if("undefined"===typeof i||null===i){if(!("md5"in n.md))throw new Error('"md5" hash algorithm unavailable.');i=n.md.md5.create()}null===t&&(t="");for(var o=[h(i,e+t)],s=16,a=1;s<r;++a,s+=16)o.push(h(i,o[a-1]+e+t));return o.join("").substr(0,r)}},4021:(e,t,r)=>{var n=r(428);r(5617),r(9207),r(9491);var i,o=n.pkcs5=n.pkcs5||{};n.util.isNodejs&&!n.options.usePureJavaScript&&(i=r(5819)),e.exports=n.pbkdf2=o.pbkdf2=function(e,t,r,o,s,a){if("function"===typeof s&&(a=s,s=null),n.util.isNodejs&&!n.options.usePureJavaScript&&i.pbkdf2&&(null===s||"object"!==typeof s)&&(i.pbkdf2Sync.length>4||!s||"sha1"===s))return"string"!==typeof s&&(s="sha1"),e=Buffer.from(e,"binary"),t=Buffer.from(t,"binary"),a?4===i.pbkdf2Sync.length?i.pbkdf2(e,t,r,o,(function(e,t){if(e)return a(e);a(null,t.toString("binary"))})):i.pbkdf2(e,t,r,o,s,(function(e,t){if(e)return a(e);a(null,t.toString("binary"))})):4===i.pbkdf2Sync.length?i.pbkdf2Sync(e,t,r,o).toString("binary"):i.pbkdf2Sync(e,t,r,o,s).toString("binary");if("undefined"!==typeof s&&null!==s||(s="sha1"),"string"===typeof s){if(!(s in n.md.algorithms))throw new Error("Unknown hash algorithm: "+s);s=n.md[s].create()}var c=s.digestLength;if(o>4294967295*c){var l=new Error("Derived key is too long.");if(a)return a(l);throw l}var u=Math.ceil(o/c),h=o-(u-1)*c,d=n.hmac.create();d.start(s,e);var f,p,g,m="";if(!a){for(var y=1;y<=u;++y){d.start(null,null),d.update(t),d.update(n.util.int32ToBytes(y)),f=g=d.digest().getBytes();for(var v=2;v<=r;++v)d.start(null,null),d.update(g),p=d.digest().getBytes(),f=n.util.xorBytes(f,p,c),g=p;m+=y<u?f:f.substr(0,h)}return m}y=1;function b(){if(y>u)return a(null,m);d.start(null,null),d.update(t),d.update(n.util.int32ToBytes(y)),f=g=d.digest().getBytes(),v=2,w()}function w(){if(v<=r)return d.start(null,null),d.update(g),p=d.digest().getBytes(),f=n.util.xorBytes(f,p,c),g=p,++v,n.util.setImmediate(w);m+=y<u?f:f.substr(0,h),++y,b()}b()}},197:(e,t,r)=>{var n=r(428);r(9491);var i=e.exports=n.pem=n.pem||{};function o(e){for(var t=e.name+": ",r=[],n=function(e,t){return" "+t},i=0;i<e.values.length;++i)r.push(e.values[i].replace(/^(\S+\r\n)/,n));t+=r.join(",")+"\r\n";var o=0,s=-1;for(i=0;i<t.length;++i,++o)if(o>65&&-1!==s){var a=t[s];","===a?(++s,t=t.substr(0,s)+"\r\n "+t.substr(s)):t=t.substr(0,s)+"\r\n"+a+t.substr(s+1),o=i-s-1,s=-1,++i}else" "!==t[i]&&"\t"!==t[i]&&","!==t[i]||(s=i);return t}function s(e){return e.replace(/^\s+/,"")}i.encode=function(e,t){t=t||{};var r,i="-----BEGIN "+e.type+"-----\r\n";if(e.procType&&(i+=o(r={name:"Proc-Type",values:[String(e.procType.version),e.procType.type]})),e.contentDomain&&(i+=o(r={name:"Content-Domain",values:[e.contentDomain]})),e.dekInfo&&(r={name:"DEK-Info",values:[e.dekInfo.algorithm]},e.dekInfo.parameters&&r.values.push(e.dekInfo.parameters),i+=o(r)),e.headers)for(var s=0;s<e.headers.length;++s)i+=o(e.headers[s]);return e.procType&&(i+="\r\n"),i+=n.util.encode64(e.body,t.maxline||64)+"\r\n",i+="-----END "+e.type+"-----\r\n"},i.decode=function(e){for(var t,r=[],i=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,o=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,a=/\r?\n/;t=i.exec(e);){var c=t[1];"NEW CERTIFICATE REQUEST"===c&&(c="CERTIFICATE REQUEST");var l={type:c,procType:null,contentDomain:null,dekInfo:null,headers:[],body:n.util.decode64(t[3])};if(r.push(l),t[2]){for(var u=t[2].split(a),h=0;t&&h<u.length;){for(var d=u[h].replace(/\s+$/,""),f=h+1;f<u.length;++f){var p=u[f];if(!/\s/.test(p[0]))break;d+=p,h=f}if(t=d.match(o)){for(var g={name:t[1],values:[]},m=t[2].split(","),y=0;y<m.length;++y)g.values.push(s(m[y]));if(l.procType)if(l.contentDomain||"Content-Domain"!==g.name)if(l.dekInfo||"DEK-Info"!==g.name)l.headers.push(g);else{if(0===g.values.length)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');l.dekInfo={algorithm:m[0],parameters:m[1]||null}}else l.contentDomain=m[0]||"";else{if("Proc-Type"!==g.name)throw new Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==g.values.length)throw new Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');l.procType={version:m[0],type:m[1]}}}++h}if("ENCRYPTED"===l.procType&&!l.dekInfo)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".')}}if(0===r.length)throw new Error("Invalid PEM formatted message.");return r}},9814:(e,t,r)=>{var n=r(428);r(9491),r(5455),r(6687);var i=e.exports=n.pkcs1=n.pkcs1||{};function o(e,t,r){r||(r=n.md.sha1.create());for(var i="",o=Math.ceil(t/r.digestLength),s=0;s<o;++s){var a=String.fromCharCode(s>>24&255,s>>16&255,s>>8&255,255&s);r.start(),r.update(e+a),i+=r.digest().getBytes()}return i.substring(0,t)}i.encode_rsa_oaep=function(e,t,r){var i,s,a,c;"string"===typeof r?(i=r,s=arguments[3]||void 0,a=arguments[4]||void 0):r&&(i=r.label||void 0,s=r.seed||void 0,a=r.md||void 0,r.mgf1&&r.mgf1.md&&(c=r.mgf1.md)),a?a.start():a=n.md.sha1.create(),c||(c=a);var l=Math.ceil(e.n.bitLength()/8),u=l-2*a.digestLength-2;if(t.length>u)throw(m=new Error("RSAES-OAEP input message length is too long.")).length=t.length,m.maxLength=u,m;i||(i=""),a.update(i,"raw");for(var h=a.digest(),d="",f=u-t.length,p=0;p<f;p++)d+="\0";var g=h.getBytes()+d+"\x01"+t;if(s){if(s.length!==a.digestLength){var m;throw(m=new Error("Invalid RSAES-OAEP seed. The seed length must match the digest length.")).seedLength=s.length,m.digestLength=a.digestLength,m}}else s=n.random.getBytes(a.digestLength);var y=o(s,l-a.digestLength-1,c),v=n.util.xorBytes(g,y,g.length),b=o(v,a.digestLength,c),w=n.util.xorBytes(s,b,s.length);return"\0"+w+v},i.decode_rsa_oaep=function(e,t,r){var i,s,a;"string"===typeof r?(i=r,s=arguments[3]||void 0):r&&(i=r.label||void 0,s=r.md||void 0,r.mgf1&&r.mgf1.md&&(a=r.mgf1.md));var c=Math.ceil(e.n.bitLength()/8);if(t.length!==c)throw(v=new Error("RSAES-OAEP encoded message length is invalid.")).length=t.length,v.expectedLength=c,v;if(void 0===s?s=n.md.sha1.create():s.start(),a||(a=s),c<2*s.digestLength+2)throw new Error("RSAES-OAEP key is too short for the hash function.");i||(i=""),s.update(i,"raw");for(var l=s.digest().getBytes(),u=t.charAt(0),h=t.substring(1,s.digestLength+1),d=t.substring(1+s.digestLength),f=o(d,s.digestLength,a),p=n.util.xorBytes(h,f,h.length),g=o(p,c-s.digestLength-1,a),m=n.util.xorBytes(d,g,d.length),y=m.substring(0,s.digestLength),v="\0"!==u,b=0;b<s.digestLength;++b)v|=l.charAt(b)!==y.charAt(b);for(var w=1,E=s.digestLength,S=s.digestLength;S<m.length;S++){var _=m.charCodeAt(S),A=1&_^1,k=w?65534:0;v|=_&k,E+=w&=A}if(v||1!==m.charCodeAt(E))throw new Error("Invalid RSAES-OAEP padding.");return m.substring(E+1)}},3694:(e,t,r)=>{var n=r(428);r(9491),r(7834),r(5455),function(){if(n.prime)e.exports=n.prime;else{var t=e.exports=n.prime=n.prime||{},r=n.jsbn.BigInteger,i=[6,4,2,4,2,4,6,2],o=new r(null);o.fromInt(30);var s=function(e,t){return e|t};t.generateProbablePrime=function(e,t,i){"function"===typeof t&&(i=t,t={});var o=(t=t||{}).algorithm||"PRIMEINC";"string"===typeof o&&(o={name:o}),o.options=o.options||{};var s=t.prng||n.random,c={nextBytes:function(e){for(var t=s.getBytesSync(e.length),r=0;r<e.length;++r)e[r]=t.charCodeAt(r)}};if("PRIMEINC"===o.name)return function(e,t,i,o){if("workers"in i)return function(e,t,i,o){if("undefined"===typeof Worker)return a(e,t,i,o);var s=l(e,t),c=i.workers,u=i.workLoad||100,h=30*u/8,d=i.workerScript||"forge/prime.worker.js";if(-1===c)return n.util.estimateCores((function(e,t){e&&(t=2),c=t-1,f()}));function f(){c=Math.max(1,c);for(var n=[],i=0;i<c;++i)n[i]=new Worker(d);for(i=0;i<c;++i)n[i].addEventListener("message",f);var a=!1;function f(i){if(!a){0;var c=i.data;if(c.found){for(var d=0;d<n.length;++d)n[d].terminate();return a=!0,o(null,new r(c.prime,16))}s.bitLength()>e&&(s=l(e,t));var f=s.toString(16);i.target.postMessage({hex:f,workLoad:u}),s.dAddOffset(h,0)}}}f()}(e,t,i,o);return a(e,t,i,o)}(e,c,o.options,i);throw new Error("Invalid prime generation algorithm: "+o.name)}}function a(e,t,r,n){var i=l(e,t),o=function(e){return e<=100?27:e<=150?18:e<=200?15:e<=250?12:e<=300?9:e<=350?8:e<=400?7:e<=500?6:e<=600?5:e<=800?4:e<=1250?3:2}(i.bitLength());"millerRabinTests"in r&&(o=r.millerRabinTests);var s=10;"maxBlockTime"in r&&(s=r.maxBlockTime),c(i,e,t,0,o,s,n)}function c(e,t,r,o,s,a,u){var h=+new Date;do{if(e.bitLength()>t&&(e=l(t,r)),e.isProbablePrime(s))return u(null,e);e.dAddOffset(i[o++%8],0)}while(a<0||+new Date-h<a);n.util.setImmediate((function(){c(e,t,r,o,s,a,u)}))}function l(e,t){var n=new r(e,t),i=e-1;return n.testBit(i)||n.bitwiseTo(r.ONE.shiftLeft(i),s,n),n.dAddOffset(31-n.mod(o).byteValue(),0),n}}()},7006:(e,t,r)=>{var n=r(428);r(9491);var i=null;!n.util.isNodejs||n.options.usePureJavaScript||process.versions["node-webkit"]||(i=r(5819)),(e.exports=n.prng=n.prng||{}).create=function(e){for(var t={plugin:e,key:null,seed:null,time:null,reseeds:0,generated:0,keyBytes:""},r=e.md,o=new Array(32),s=0;s<32;++s)o[s]=r.create();function a(){if(t.pools[0].messageLength>=32)return c();var e=32-t.pools[0].messageLength<<5;t.collect(t.seedFileSync(e)),c()}function c(){t.reseeds=4294967295===t.reseeds?0:t.reseeds+1;var e=t.plugin.md.create();e.update(t.keyBytes);for(var r=1,n=0;n<32;++n)t.reseeds%r===0&&(e.update(t.pools[n].digest().getBytes()),t.pools[n].start()),r<<=1;t.keyBytes=e.digest().getBytes(),e.start(),e.update(t.keyBytes);var i=e.digest().getBytes();t.key=t.plugin.formatKey(t.keyBytes),t.seed=t.plugin.formatSeed(i),t.generated=0}function l(e){var t=null,r=n.util.globalScope,i=r.crypto||r.msCrypto;i&&i.getRandomValues&&(t=function(e){return i.getRandomValues(e)});var o=n.util.createBuffer();if(t)for(;o.length()<e;){var s=Math.max(1,Math.min(e-o.length(),65536)/4),a=new Uint32Array(Math.floor(s));try{t(a);for(var c=0;c<a.length;++c)o.putInt32(a[c])}catch(f){if(!("undefined"!==typeof QuotaExceededError&&f instanceof QuotaExceededError))throw f}}if(o.length()<e)for(var l,u,h,d=Math.floor(65536*Math.random());o.length()<e;){u=16807*(65535&d),u+=(32767&(l=16807*(d>>16)))<<16,d=4294967295&(u=(2147483647&(u+=l>>15))+(u>>31));for(c=0;c<3;++c)h=d>>>(c<<3),h^=Math.floor(256*Math.random()),o.putByte(255&h)}return o.getBytes(e)}return t.pools=o,t.pool=0,t.generate=function(e,r){if(!r)return t.generateSync(e);var i=t.plugin.cipher,o=t.plugin.increment,s=t.plugin.formatKey,a=t.plugin.formatSeed,l=n.util.createBuffer();t.key=null,function u(h){if(h)return r(h);if(l.length()>=e)return r(null,l.getBytes(e));t.generated>1048575&&(t.key=null);if(null===t.key)return n.util.nextTick((function(){!function(e){if(t.pools[0].messageLength>=32)return c(),e();var r=32-t.pools[0].messageLength<<5;t.seedFile(r,(function(r,n){if(r)return e(r);t.collect(n),c(),e()}))}(u)}));var d=i(t.key,t.seed);t.generated+=d.length,l.putBytes(d),t.key=s(i(t.key,o(t.seed))),t.seed=a(i(t.key,t.seed)),n.util.setImmediate(u)}()},t.generateSync=function(e){var r=t.plugin.cipher,i=t.plugin.increment,o=t.plugin.formatKey,s=t.plugin.formatSeed;t.key=null;for(var c=n.util.createBuffer();c.length()<e;){t.generated>1048575&&(t.key=null),null===t.key&&a();var l=r(t.key,t.seed);t.generated+=l.length,c.putBytes(l),t.key=o(r(t.key,i(t.seed))),t.seed=s(r(t.key,t.seed))}return c.getBytes(e)},i?(t.seedFile=function(e,t){i.randomBytes(e,(function(e,r){if(e)return t(e);t(null,r.toString())}))},t.seedFileSync=function(e){return i.randomBytes(e).toString()}):(t.seedFile=function(e,t){try{t(null,l(e))}catch(r){t(r)}},t.seedFileSync=l),t.collect=function(e){for(var r=e.length,n=0;n<r;++n)t.pools[t.pool].update(e.substr(n,1)),t.pool=31===t.pool?0:t.pool+1},t.collectInt=function(e,r){for(var n="",i=0;i<r;i+=8)n+=String.fromCharCode(e>>i&255);t.collect(n)},t.registerWorker=function(e){if(e===self)t.seedFile=function(e,t){self.addEventListener("message",(function e(r){var n=r.data;n.forge&&n.forge.prng&&(self.removeEventListener("message",e),t(n.forge.prng.err,n.forge.prng.bytes))})),self.postMessage({forge:{prng:{needed:e}}})};else{e.addEventListener("message",(function(r){var n=r.data;n.forge&&n.forge.prng&&t.seedFile(n.forge.prng.needed,(function(t,r){e.postMessage({forge:{prng:{err:t,bytes:r}}})}))}))}},t}},5455:(e,t,r)=>{var n=r(428);r(5332),r(7153),r(7006),r(9491),n.random&&n.random.getBytes?e.exports=n.random:function(t){var r={},i=new Array(4),o=n.util.createBuffer();function s(){var e=n.prng.create(r);return e.getBytes=function(t,r){return e.generate(t,r)},e.getBytesSync=function(t){return e.generate(t)},e}r.formatKey=function(e){var t=n.util.createBuffer(e);return(e=new Array(4))[0]=t.getInt32(),e[1]=t.getInt32(),e[2]=t.getInt32(),e[3]=t.getInt32(),n.aes._expandKey(e,!1)},r.formatSeed=function(e){var t=n.util.createBuffer(e);return(e=new Array(4))[0]=t.getInt32(),e[1]=t.getInt32(),e[2]=t.getInt32(),e[3]=t.getInt32(),e},r.cipher=function(e,t){return n.aes._updateBlock(e,t,i,!1),o.putInt32(i[0]),o.putInt32(i[1]),o.putInt32(i[2]),o.putInt32(i[3]),o.getBytes()},r.increment=function(e){return++e[3],e},r.md=n.md.sha256;var a=s(),c=null,l=n.util.globalScope,u=l.crypto||l.msCrypto;if(u&&u.getRandomValues&&(c=function(e){return u.getRandomValues(e)}),n.options.usePureJavaScript||!n.util.isNodejs&&!c){if("undefined"===typeof window||window.document,a.collectInt(+new Date,32),"undefined"!==typeof navigator){var h="";for(var d in navigator)try{"string"==typeof navigator[d]&&(h+=navigator[d])}catch(f){}a.collect(h),h=null}t&&(t().mousemove((function(e){a.collectInt(e.clientX,16),a.collectInt(e.clientY,16)})),t().keypress((function(e){a.collectInt(e.charCode,8)})))}if(n.random)for(var d in a)n.random[d]=a[d];else n.random=a;n.random.createInstance=s,e.exports=n.random}("undefined"!==typeof jQuery?jQuery:null)},8177:(e,t,r)=>{var n=r(428);r(9491);var i=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],o=[1,2,3,5],s=function(e,t){return e<<t&65535|(65535&e)>>16-t},a=function(e,t){return(65535&e)>>t|e<<16-t&65535};e.exports=n.rc2=n.rc2||{},n.rc2.expandKey=function(e,t){"string"===typeof e&&(e=n.util.createBuffer(e)),t=t||128;var r,o=e,s=e.length(),a=t,c=Math.ceil(a/8),l=255>>(7&a);for(r=s;r<128;r++)o.putByte(i[o.at(r-1)+o.at(r-s)&255]);for(o.setAt(128-c,i[o.at(128-c)&l]),r=127-c;r>=0;r--)o.setAt(r,i[o.at(r+1)^o.at(r+c)]);return o};var c=function(e,t,r){var i,c,l,u,h=!1,d=null,f=null,p=null,g=[];for(e=n.rc2.expandKey(e,t),l=0;l<64;l++)g.push(e.getInt16Le());r?(i=function(e){for(l=0;l<4;l++)e[l]+=g[u]+(e[(l+3)%4]&e[(l+2)%4])+(~e[(l+3)%4]&e[(l+1)%4]),e[l]=s(e[l],o[l]),u++},c=function(e){for(l=0;l<4;l++)e[l]+=g[63&e[(l+3)%4]]}):(i=function(e){for(l=3;l>=0;l--)e[l]=a(e[l],o[l]),e[l]-=g[u]+(e[(l+3)%4]&e[(l+2)%4])+(~e[(l+3)%4]&e[(l+1)%4]),u--},c=function(e){for(l=3;l>=0;l--)e[l]-=g[63&e[(l+3)%4]]});var m=function(e){var t=[];for(l=0;l<4;l++){var n=d.getInt16Le();null!==p&&(r?n^=p.getInt16Le():p.putInt16Le(n)),t.push(65535&n)}u=r?0:63;for(var i=0;i<e.length;i++)for(var o=0;o<e[i][0];o++)e[i][1](t);for(l=0;l<4;l++)null!==p&&(r?p.putInt16Le(t[l]):t[l]^=p.getInt16Le()),f.putInt16Le(t[l])},y=null;return y={start:function(e,t){e&&"string"===typeof e&&(e=n.util.createBuffer(e)),h=!1,d=n.util.createBuffer(),f=t||new n.util.createBuffer,p=e,y.output=f},update:function(e){for(h||d.putBuffer(e);d.length()>=8;)m([[5,i],[1,c],[6,i],[1,c],[5,i]])},finish:function(e){var t=!0;if(r)if(e)t=e(8,d,!r);else{var n=8===d.length()?8:8-d.length();d.fillWithByte(n,n)}if(t&&(h=!0,y.update()),!r&&(t=0===d.length()))if(e)t=e(8,f,!r);else{var i=f.length(),o=f.at(i-1);o>i?t=!1:f.truncate(o)}return t}}};n.rc2.startEncrypting=function(e,t,r){var i=n.rc2.createEncryptionCipher(e,128);return i.start(t,r),i},n.rc2.createEncryptionCipher=function(e,t){return c(e,t,!0)},n.rc2.startDecrypting=function(e,t,r){var i=n.rc2.createDecryptionCipher(e,128);return i.start(t,r),i},n.rc2.createDecryptionCipher=function(e,t){return c(e,t,!1)}},3894:(e,t,r)=>{var n=r(428);if(r(5419),r(7834),r(1346),r(9814),r(3694),r(5455),r(9491),"undefined"===typeof i)var i=n.jsbn.BigInteger;var o=n.util.isNodejs?r(5819):null,s=n.asn1,a=n.util;n.pki=n.pki||{},e.exports=n.pki.rsa=n.rsa=n.rsa||{};var c=n.pki,l=[6,4,2,4,2,4,6,2],u={name:"PrivateKeyInfo",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:s.Class.UNIVERSAL,type:s.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},h={name:"RSAPrivateKey",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},d={name:"RSAPublicKey",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},f=n.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:s.Class.UNIVERSAL,type:s.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},p={name:"DigestInfo",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm.algorithmIdentifier",tagClass:s.Class.UNIVERSAL,type:s.Type.OID,constructed:!1,capture:"algorithmIdentifier"},{name:"DigestInfo.DigestAlgorithm.parameters",tagClass:s.Class.UNIVERSAL,type:s.Type.NULL,capture:"parameters",optional:!0,constructed:!1}]},{name:"DigestInfo.digest",tagClass:s.Class.UNIVERSAL,type:s.Type.OCTETSTRING,constructed:!1,capture:"digest"}]},g=function(e){var t;if(!(e.algorithm in c.oids)){var r=new Error("Unknown message digest algorithm.");throw r.algorithm=e.algorithm,r}t=c.oids[e.algorithm];var n=s.oidToDer(t).getBytes(),i=s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[]),o=s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[]);o.value.push(s.create(s.Class.UNIVERSAL,s.Type.OID,!1,n)),o.value.push(s.create(s.Class.UNIVERSAL,s.Type.NULL,!1,""));var a=s.create(s.Class.UNIVERSAL,s.Type.OCTETSTRING,!1,e.digest().getBytes());return i.value.push(o),i.value.push(a),s.toDer(i).getBytes()},m=function(e,t,r){if(r)return e.modPow(t.e,t.n);if(!t.p||!t.q)return e.modPow(t.d,t.n);var o;t.dP||(t.dP=t.d.mod(t.p.subtract(i.ONE))),t.dQ||(t.dQ=t.d.mod(t.q.subtract(i.ONE))),t.qInv||(t.qInv=t.q.modInverse(t.p));do{o=new i(n.util.bytesToHex(n.random.getBytes(t.n.bitLength()/8)),16)}while(o.compareTo(t.n)>=0||!o.gcd(t.n).equals(i.ONE));for(var s=(e=e.multiply(o.modPow(t.e,t.n)).mod(t.n)).mod(t.p).modPow(t.dP,t.p),a=e.mod(t.q).modPow(t.dQ,t.q);s.compareTo(a)<0;)s=s.add(t.p);var c=s.subtract(a).multiply(t.qInv).mod(t.p).multiply(t.q).add(a);return c=c.multiply(o.modInverse(t.n)).mod(t.n)};function y(e,t,r){var i=n.util.createBuffer(),o=Math.ceil(t.n.bitLength()/8);if(e.length>o-11){var s=new Error("Message is too long for PKCS#1 v1.5 padding.");throw s.length=e.length,s.max=o-11,s}i.putByte(0),i.putByte(r);var a,c=o-3-e.length;if(0===r||1===r){a=0===r?0:255;for(var l=0;l<c;++l)i.putByte(a)}else for(;c>0;){var u=0,h=n.random.getBytes(c);for(l=0;l<c;++l)0===(a=h.charCodeAt(l))?++u:i.putByte(a);c=u}return i.putByte(0),i.putBytes(e),i}function v(e,t,r,i){var o=Math.ceil(t.n.bitLength()/8),s=n.util.createBuffer(e),a=s.getByte(),c=s.getByte();if(0!==a||r&&0!==c&&1!==c||!r&&2!=c||r&&0===c&&"undefined"===typeof i)throw new Error("Encryption block is invalid.");var l=0;if(0===c){l=o-3-i;for(var u=0;u<l;++u)if(0!==s.getByte())throw new Error("Encryption block is invalid.")}else if(1===c)for(l=0;s.length()>1;){if(255!==s.getByte()){--s.read;break}++l}else if(2===c)for(l=0;s.length()>1;){if(0===s.getByte()){--s.read;break}++l}if(0!==s.getByte()||l!==o-3-s.length())throw new Error("Encryption block is invalid.");return s.getBytes()}function b(e,t,r){"function"===typeof t&&(r=t,t={});var o={algorithm:{name:(t=t||{}).algorithm||"PRIMEINC",options:{workers:t.workers||2,workLoad:t.workLoad||100,workerScript:t.workerScript}}};function s(){a(e.pBits,(function(t,n){return t?r(t):(e.p=n,null!==e.q?l(t,e.q):void a(e.qBits,l))}))}function a(e,t){n.prime.generateProbablePrime(e,o,t)}function l(t,n){if(t)return r(t);if(e.q=n,e.p.compareTo(e.q)<0){var o=e.p;e.p=e.q,e.q=o}if(0!==e.p.subtract(i.ONE).gcd(e.e).compareTo(i.ONE))return e.p=null,void s();if(0!==e.q.subtract(i.ONE).gcd(e.e).compareTo(i.ONE))return e.q=null,void a(e.qBits,l);if(e.p1=e.p.subtract(i.ONE),e.q1=e.q.subtract(i.ONE),e.phi=e.p1.multiply(e.q1),0!==e.phi.gcd(e.e).compareTo(i.ONE))return e.p=e.q=null,void s();if(e.n=e.p.multiply(e.q),e.n.bitLength()!==e.bits)return e.q=null,void a(e.qBits,l);var u=e.e.modInverse(e.phi);e.keys={privateKey:c.rsa.setPrivateKey(e.n,e.e,u,e.p,e.q,u.mod(e.p1),u.mod(e.q1),e.q.modInverse(e.p)),publicKey:c.rsa.setPublicKey(e.n,e.e)},r(null,e.keys)}"prng"in t&&(o.prng=t.prng),s()}function w(e){var t=e.toString(16);t[0]>="8"&&(t="00"+t);var r=n.util.hexToBytes(t);return r.length>1&&(0===r.charCodeAt(0)&&0===(128&r.charCodeAt(1))||255===r.charCodeAt(0)&&128===(128&r.charCodeAt(1)))?r.substr(1):r}function E(e){return e<=100?27:e<=150?18:e<=200?15:e<=250?12:e<=300?9:e<=350?8:e<=400?7:e<=500?6:e<=600?5:e<=800?4:e<=1250?3:2}function S(e){return n.util.isNodejs&&"function"===typeof o[e]}function _(e){return"undefined"!==typeof a.globalScope&&"object"===typeof a.globalScope.crypto&&"object"===typeof a.globalScope.crypto.subtle&&"function"===typeof a.globalScope.crypto.subtle[e]}function A(e){return"undefined"!==typeof a.globalScope&&"object"===typeof a.globalScope.msCrypto&&"object"===typeof a.globalScope.msCrypto.subtle&&"function"===typeof a.globalScope.msCrypto.subtle[e]}function k(e){for(var t=n.util.hexToBytes(e.toString(16)),r=new Uint8Array(t.length),i=0;i<t.length;++i)r[i]=t.charCodeAt(i);return r}c.rsa.encrypt=function(e,t,r){var o,s=r,a=Math.ceil(t.n.bitLength()/8);!1!==r&&!0!==r?(s=2===r,o=y(e,t,r)):(o=n.util.createBuffer()).putBytes(e);for(var c=new i(o.toHex(),16),l=m(c,t,s).toString(16),u=n.util.createBuffer(),h=a-Math.ceil(l.length/2);h>0;)u.putByte(0),--h;return u.putBytes(n.util.hexToBytes(l)),u.getBytes()},c.rsa.decrypt=function(e,t,r,o){var s=Math.ceil(t.n.bitLength()/8);if(e.length!==s){var a=new Error("Encrypted message length is invalid.");throw a.length=e.length,a.expected=s,a}var c=new i(n.util.createBuffer(e).toHex(),16);if(c.compareTo(t.n)>=0)throw new Error("Encrypted message is invalid.");for(var l=m(c,t,r).toString(16),u=n.util.createBuffer(),h=s-Math.ceil(l.length/2);h>0;)u.putByte(0),--h;return u.putBytes(n.util.hexToBytes(l)),!1!==o?v(u.getBytes(),t,r):u.getBytes()},c.rsa.createKeyPairGenerationState=function(e,t,r){"string"===typeof e&&(e=parseInt(e,10)),e=e||2048;var o,s=(r=r||{}).prng||n.random,a={nextBytes:function(e){for(var t=s.getBytesSync(e.length),r=0;r<e.length;++r)e[r]=t.charCodeAt(r)}},c=r.algorithm||"PRIMEINC";if("PRIMEINC"!==c)throw new Error("Invalid key generation algorithm: "+c);return(o={algorithm:c,state:0,bits:e,rng:a,eInt:t||65537,e:new i(null),p:null,q:null,qBits:e>>1,pBits:e-(e>>1),pqState:0,num:null,keys:null}).e.fromInt(o.eInt),o},c.rsa.stepKeyPairGenerationState=function(e,t){"algorithm"in e||(e.algorithm="PRIMEINC");var r=new i(null);r.fromInt(30);for(var n,o=0,s=function(e,t){return e|t},a=+new Date,u=0;null===e.keys&&(t<=0||u<t);){if(0===e.state){var h=null===e.p?e.pBits:e.qBits,d=h-1;0===e.pqState?(e.num=new i(h,e.rng),e.num.testBit(d)||e.num.bitwiseTo(i.ONE.shiftLeft(d),s,e.num),e.num.dAddOffset(31-e.num.mod(r).byteValue(),0),o=0,++e.pqState):1===e.pqState?e.num.bitLength()>h?e.pqState=0:e.num.isProbablePrime(E(e.num.bitLength()))?++e.pqState:e.num.dAddOffset(l[o++%8],0):2===e.pqState?e.pqState=0===e.num.subtract(i.ONE).gcd(e.e).compareTo(i.ONE)?3:0:3===e.pqState&&(e.pqState=0,null===e.p?e.p=e.num:e.q=e.num,null!==e.p&&null!==e.q&&++e.state,e.num=null)}else if(1===e.state)e.p.compareTo(e.q)<0&&(e.num=e.p,e.p=e.q,e.q=e.num),++e.state;else if(2===e.state)e.p1=e.p.subtract(i.ONE),e.q1=e.q.subtract(i.ONE),e.phi=e.p1.multiply(e.q1),++e.state;else if(3===e.state)0===e.phi.gcd(e.e).compareTo(i.ONE)?++e.state:(e.p=null,e.q=null,e.state=0);else if(4===e.state)e.n=e.p.multiply(e.q),e.n.bitLength()===e.bits?++e.state:(e.q=null,e.state=0);else if(5===e.state){var f=e.e.modInverse(e.phi);e.keys={privateKey:c.rsa.setPrivateKey(e.n,e.e,f,e.p,e.q,f.mod(e.p1),f.mod(e.q1),e.q.modInverse(e.p)),publicKey:c.rsa.setPublicKey(e.n,e.e)}}u+=(n=+new Date)-a,a=n}return null!==e.keys},c.rsa.generateKeyPair=function(e,t,r,i){if(1===arguments.length?"object"===typeof e?(r=e,e=void 0):"function"===typeof e&&(i=e,e=void 0):2===arguments.length?"number"===typeof e?"function"===typeof t?(i=t,t=void 0):"number"!==typeof t&&(r=t,t=void 0):(r=e,i=t,e=void 0,t=void 0):3===arguments.length&&("number"===typeof t?"function"===typeof r&&(i=r,r=void 0):(i=r,r=t,t=void 0)),r=r||{},void 0===e&&(e=r.bits||2048),void 0===t&&(t=r.e||65537),!n.options.usePureJavaScript&&!r.prng&&e>=256&&e<=16384&&(65537===t||3===t))if(i){if(S("generateKeyPair"))return o.generateKeyPair("rsa",{modulusLength:e,publicExponent:t,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}},(function(e,t,r){if(e)return i(e);i(null,{privateKey:c.privateKeyFromPem(r),publicKey:c.publicKeyFromPem(t)})}));if(_("generateKey")&&_("exportKey"))return a.globalScope.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:k(t),hash:{name:"SHA-256"}},!0,["sign","verify"]).then((function(e){return a.globalScope.crypto.subtle.exportKey("pkcs8",e.privateKey)})).then(void 0,(function(e){i(e)})).then((function(e){if(e){var t=c.privateKeyFromAsn1(s.fromDer(n.util.createBuffer(e)));i(null,{privateKey:t,publicKey:c.setRsaPublicKey(t.n,t.e)})}}));if(A("generateKey")&&A("exportKey")){var l=a.globalScope.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:k(t),hash:{name:"SHA-256"}},!0,["sign","verify"]);return l.oncomplete=function(e){var t=e.target.result,r=a.globalScope.msCrypto.subtle.exportKey("pkcs8",t.privateKey);r.oncomplete=function(e){var t=e.target.result,r=c.privateKeyFromAsn1(s.fromDer(n.util.createBuffer(t)));i(null,{privateKey:r,publicKey:c.setRsaPublicKey(r.n,r.e)})},r.onerror=function(e){i(e)}},void(l.onerror=function(e){i(e)})}}else if(S("generateKeyPairSync")){var u=o.generateKeyPairSync("rsa",{modulusLength:e,publicExponent:t,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}});return{privateKey:c.privateKeyFromPem(u.privateKey),publicKey:c.publicKeyFromPem(u.publicKey)}}var h=c.rsa.createKeyPairGenerationState(e,t,r);if(!i)return c.rsa.stepKeyPairGenerationState(h,0),h.keys;b(h,r,i)},c.setRsaPublicKey=c.rsa.setPublicKey=function(e,t){var r={n:e,e:t,encrypt:function(e,t,i){if("string"===typeof t?t=t.toUpperCase():void 0===t&&(t="RSAES-PKCS1-V1_5"),"RSAES-PKCS1-V1_5"===t)t={encode:function(e,t,r){return y(e,t,2).getBytes()}};else if("RSA-OAEP"===t||"RSAES-OAEP"===t)t={encode:function(e,t){return n.pkcs1.encode_rsa_oaep(t,e,i)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(t))t={encode:function(e){return e}};else if("string"===typeof t)throw new Error('Unsupported encryption scheme: "'+t+'".');var o=t.encode(e,r,!0);return c.rsa.encrypt(o,r,!0)},verify:function(e,t,i,o){"string"===typeof i?i=i.toUpperCase():void 0===i&&(i="RSASSA-PKCS1-V1_5"),void 0===o&&(o={_parseAllDigestBytes:!0}),"_parseAllDigestBytes"in o||(o._parseAllDigestBytes=!0),"RSASSA-PKCS1-V1_5"===i?i={verify:function(e,t){t=v(t,r,!0);var i=s.fromDer(t,{parseAllBytes:o._parseAllDigestBytes}),a={},c=[];if(!s.validate(i,p,a,c))throw(l=new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value.")).errors=c,l;var l,u=s.derToOid(a.algorithmIdentifier);if(u!==n.oids.md2&&u!==n.oids.md5&&u!==n.oids.sha1&&u!==n.oids.sha224&&u!==n.oids.sha256&&u!==n.oids.sha384&&u!==n.oids.sha512&&u!==n.oids["sha512-224"]&&u!==n.oids["sha512-256"])throw(l=new Error("Unknown RSASSA-PKCS1-v1_5 DigestAlgorithm identifier.")).oid=u,l;if((u===n.oids.md2||u===n.oids.md5)&&!("parameters"in a))throw new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value. Missing algorithm identifer NULL parameters.");return e===a.digest}}:"NONE"!==i&&"NULL"!==i&&null!==i||(i={verify:function(e,t){return e===(t=v(t,r,!0))}});var a=c.rsa.decrypt(t,r,!0,!1);return i.verify(e,a,r.n.bitLength())}};return r},c.setRsaPrivateKey=c.rsa.setPrivateKey=function(e,t,r,i,o,s,a,l){var u={n:e,e:t,d:r,p:i,q:o,dP:s,dQ:a,qInv:l,decrypt:function(e,t,r){"string"===typeof t?t=t.toUpperCase():void 0===t&&(t="RSAES-PKCS1-V1_5");var i=c.rsa.decrypt(e,u,!1,!1);if("RSAES-PKCS1-V1_5"===t)t={decode:v};else if("RSA-OAEP"===t||"RSAES-OAEP"===t)t={decode:function(e,t){return n.pkcs1.decode_rsa_oaep(t,e,r)}};else{if(-1===["RAW","NONE","NULL",null].indexOf(t))throw new Error('Unsupported encryption scheme: "'+t+'".');t={decode:function(e){return e}}}return t.decode(i,u,!1)},sign:function(e,t){var r=!1;"string"===typeof t&&(t=t.toUpperCase()),void 0===t||"RSASSA-PKCS1-V1_5"===t?(t={encode:g},r=1):"NONE"!==t&&"NULL"!==t&&null!==t||(t={encode:function(){return e}},r=1);var n=t.encode(e,u.n.bitLength());return c.rsa.encrypt(n,u,r)}};return u},c.wrapRsaPrivateKey=function(e){return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,s.integerToDer(0).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.OID,!1,s.oidToDer(c.oids.rsaEncryption).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.NULL,!1,"")]),s.create(s.Class.UNIVERSAL,s.Type.OCTETSTRING,!1,s.toDer(e).getBytes())])},c.privateKeyFromAsn1=function(e){var t,r,o,a,l,d,f,p,g={},m=[];if(s.validate(e,u,g,m)&&(e=s.fromDer(n.util.createBuffer(g.privateKey))),g={},m=[],!s.validate(e,h,g,m)){var y=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw y.errors=m,y}return t=n.util.createBuffer(g.privateKeyModulus).toHex(),r=n.util.createBuffer(g.privateKeyPublicExponent).toHex(),o=n.util.createBuffer(g.privateKeyPrivateExponent).toHex(),a=n.util.createBuffer(g.privateKeyPrime1).toHex(),l=n.util.createBuffer(g.privateKeyPrime2).toHex(),d=n.util.createBuffer(g.privateKeyExponent1).toHex(),f=n.util.createBuffer(g.privateKeyExponent2).toHex(),p=n.util.createBuffer(g.privateKeyCoefficient).toHex(),c.setRsaPrivateKey(new i(t,16),new i(r,16),new i(o,16),new i(a,16),new i(l,16),new i(d,16),new i(f,16),new i(p,16))},c.privateKeyToAsn1=c.privateKeyToRSAPrivateKey=function(e){return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,s.integerToDer(0).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,w(e.n)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,w(e.e)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,w(e.d)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,w(e.p)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,w(e.q)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,w(e.dP)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,w(e.dQ)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,w(e.qInv))])},c.publicKeyFromAsn1=function(e){var t={},r=[];if(s.validate(e,f,t,r)){var o,a=s.derToOid(t.publicKeyOid);if(a!==c.oids.rsaEncryption)throw(o=new Error("Cannot read public key. Unknown OID.")).oid=a,o;e=t.rsaPublicKey}if(r=[],!s.validate(e,d,t,r))throw(o=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.")).errors=r,o;var l=n.util.createBuffer(t.publicKeyModulus).toHex(),u=n.util.createBuffer(t.publicKeyExponent).toHex();return c.setRsaPublicKey(new i(l,16),new i(u,16))},c.publicKeyToAsn1=c.publicKeyToSubjectPublicKeyInfo=function(e){return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.OID,!1,s.oidToDer(c.oids.rsaEncryption).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.NULL,!1,"")]),s.create(s.Class.UNIVERSAL,s.Type.BITSTRING,!1,[c.publicKeyToRSAPublicKey(e)])])},c.publicKeyToRSAPublicKey=function(e){return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,w(e.n)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,w(e.e))])}},6687:(e,t,r)=>{var n=r(428);r(9207),r(9491);var i=e.exports=n.sha1=n.sha1||{};n.md.sha1=n.md.algorithms.sha1=i,i.create=function(){s||(o=String.fromCharCode(128),o+=n.util.fillString(String.fromCharCode(0),64),s=!0);var e=null,t=n.util.createBuffer(),r=new Array(80),i={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){i.messageLength=0,i.fullMessageLength=i.messageLength64=[];for(var r=i.messageLengthSize/4,o=0;o<r;++o)i.fullMessageLength.push(0);return t=n.util.createBuffer(),e={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520},i}};return i.start(),i.update=function(o,s){"utf8"===s&&(o=n.util.encodeUtf8(o));var c=o.length;i.messageLength+=c,c=[c/4294967296>>>0,c>>>0];for(var l=i.fullMessageLength.length-1;l>=0;--l)i.fullMessageLength[l]+=c[1],c[1]=c[0]+(i.fullMessageLength[l]/4294967296>>>0),i.fullMessageLength[l]=i.fullMessageLength[l]>>>0,c[0]=c[1]/4294967296>>>0;return t.putBytes(o),a(e,r,t),(t.read>2048||0===t.length())&&t.compact(),i},i.digest=function(){var s=n.util.createBuffer();s.putBytes(t.bytes());var c,l=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;s.putBytes(o.substr(0,i.blockLength-l));for(var u=8*i.fullMessageLength[0],h=0;h<i.fullMessageLength.length-1;++h)u+=(c=8*i.fullMessageLength[h+1])/4294967296>>>0,s.putInt32(u>>>0),u=c>>>0;s.putInt32(u);var d={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4};a(d,r,s);var f=n.util.createBuffer();return f.putInt32(d.h0),f.putInt32(d.h1),f.putInt32(d.h2),f.putInt32(d.h3),f.putInt32(d.h4),f},i};var o=null,s=!1;function a(e,t,r){for(var n,i,o,s,a,c,l,u=r.length();u>=64;){for(i=e.h0,o=e.h1,s=e.h2,a=e.h3,c=e.h4,l=0;l<16;++l)n=r.getInt32(),t[l]=n,n=(i<<5|i>>>27)+(a^o&(s^a))+c+1518500249+n,c=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;for(;l<20;++l)n=(n=t[l-3]^t[l-8]^t[l-14]^t[l-16])<<1|n>>>31,t[l]=n,n=(i<<5|i>>>27)+(a^o&(s^a))+c+1518500249+n,c=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;for(;l<32;++l)n=(n=t[l-3]^t[l-8]^t[l-14]^t[l-16])<<1|n>>>31,t[l]=n,n=(i<<5|i>>>27)+(o^s^a)+c+1859775393+n,c=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;for(;l<40;++l)n=(n=t[l-6]^t[l-16]^t[l-28]^t[l-32])<<2|n>>>30,t[l]=n,n=(i<<5|i>>>27)+(o^s^a)+c+1859775393+n,c=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;for(;l<60;++l)n=(n=t[l-6]^t[l-16]^t[l-28]^t[l-32])<<2|n>>>30,t[l]=n,n=(i<<5|i>>>27)+(o&s|a&(o^s))+c+2400959708+n,c=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;for(;l<80;++l)n=(n=t[l-6]^t[l-16]^t[l-28]^t[l-32])<<2|n>>>30,t[l]=n,n=(i<<5|i>>>27)+(o^s^a)+c+3395469782+n,c=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;e.h0=e.h0+i|0,e.h1=e.h1+o|0,e.h2=e.h2+s|0,e.h3=e.h3+a|0,e.h4=e.h4+c|0,u-=64}}},7153:(e,t,r)=>{var n=r(428);r(9207),r(9491);var i=e.exports=n.sha256=n.sha256||{};n.md.sha256=n.md.algorithms.sha256=i,i.create=function(){s||(o=String.fromCharCode(128),o+=n.util.fillString(String.fromCharCode(0),64),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=!0);var e=null,t=n.util.createBuffer(),r=new Array(64),i={algorithm:"sha256",blockLength:64,digestLength:32,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){i.messageLength=0,i.fullMessageLength=i.messageLength64=[];for(var r=i.messageLengthSize/4,o=0;o<r;++o)i.fullMessageLength.push(0);return t=n.util.createBuffer(),e={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225},i}};return i.start(),i.update=function(o,s){"utf8"===s&&(o=n.util.encodeUtf8(o));var a=o.length;i.messageLength+=a,a=[a/4294967296>>>0,a>>>0];for(var l=i.fullMessageLength.length-1;l>=0;--l)i.fullMessageLength[l]+=a[1],a[1]=a[0]+(i.fullMessageLength[l]/4294967296>>>0),i.fullMessageLength[l]=i.fullMessageLength[l]>>>0,a[0]=a[1]/4294967296>>>0;return t.putBytes(o),c(e,r,t),(t.read>2048||0===t.length())&&t.compact(),i},i.digest=function(){var s=n.util.createBuffer();s.putBytes(t.bytes());var a,l=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;s.putBytes(o.substr(0,i.blockLength-l));for(var u=8*i.fullMessageLength[0],h=0;h<i.fullMessageLength.length-1;++h)u+=(a=8*i.fullMessageLength[h+1])/4294967296>>>0,s.putInt32(u>>>0),u=a>>>0;s.putInt32(u);var d={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4,h5:e.h5,h6:e.h6,h7:e.h7};c(d,r,s);var f=n.util.createBuffer();return f.putInt32(d.h0),f.putInt32(d.h1),f.putInt32(d.h2),f.putInt32(d.h3),f.putInt32(d.h4),f.putInt32(d.h5),f.putInt32(d.h6),f.putInt32(d.h7),f},i};var o=null,s=!1,a=null;function c(e,t,r){for(var n,i,o,s,c,l,u,h,d,f,p,g,m,y=r.length();y>=64;){for(c=0;c<16;++c)t[c]=r.getInt32();for(;c<64;++c)n=((n=t[c-2])>>>17|n<<15)^(n>>>19|n<<13)^n>>>10,i=((i=t[c-15])>>>7|i<<25)^(i>>>18|i<<14)^i>>>3,t[c]=n+t[c-7]+i+t[c-16]|0;for(l=e.h0,u=e.h1,h=e.h2,d=e.h3,f=e.h4,p=e.h5,g=e.h6,m=e.h7,c=0;c<64;++c)o=(l>>>2|l<<30)^(l>>>13|l<<19)^(l>>>22|l<<10),s=l&u|h&(l^u),n=m+((f>>>6|f<<26)^(f>>>11|f<<21)^(f>>>25|f<<7))+(g^f&(p^g))+a[c]+t[c],m=g,g=p,p=f,f=d+n>>>0,d=h,h=u,u=l,l=n+(i=o+s)>>>0;e.h0=e.h0+l|0,e.h1=e.h1+u|0,e.h2=e.h2+h|0,e.h3=e.h3+d|0,e.h4=e.h4+f|0,e.h5=e.h5+p|0,e.h6=e.h6+g|0,e.h7=e.h7+m|0,y-=64}}},8222:(e,t,r)=>{var n=r(428);r(9207),r(9491);var i=e.exports=n.sha512=n.sha512||{};n.md.sha512=n.md.algorithms.sha512=i;var o=n.sha384=n.sha512.sha384=n.sha512.sha384||{};o.create=function(){return i.create("SHA-384")},n.md.sha384=n.md.algorithms.sha384=o,n.sha512.sha256=n.sha512.sha256||{create:function(){return i.create("SHA-512/256")}},n.md["sha512/256"]=n.md.algorithms["sha512/256"]=n.sha512.sha256,n.sha512.sha224=n.sha512.sha224||{create:function(){return i.create("SHA-512/224")}},n.md["sha512/224"]=n.md.algorithms["sha512/224"]=n.sha512.sha224,i.create=function(e){if(a||(s=String.fromCharCode(128),s+=n.util.fillString(String.fromCharCode(0),128),c=[[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]],(l={})["SHA-512"]=[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],[528734635,4215389547],[1541459225,327033209]],l["SHA-384"]=[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],l["SHA-512/256"]=[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,2827943907],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],l["SHA-512/224"]=[[2352822216,424955298],[1944164710,2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]],a=!0),"undefined"===typeof e&&(e="SHA-512"),!(e in l))throw new Error("Invalid SHA-512 algorithm: "+e);for(var t=l[e],r=null,i=n.util.createBuffer(),o=new Array(80),h=0;h<80;++h)o[h]=new Array(2);var d=64;switch(e){case"SHA-384":d=48;break;case"SHA-512/256":d=32;break;case"SHA-512/224":d=28}var f={algorithm:e.replace("-","").toLowerCase(),blockLength:128,digestLength:d,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){f.messageLength=0,f.fullMessageLength=f.messageLength128=[];for(var e=f.messageLengthSize/4,o=0;o<e;++o)f.fullMessageLength.push(0);i=n.util.createBuffer(),r=new Array(t.length);for(o=0;o<t.length;++o)r[o]=t[o].slice(0);return f}};return f.start(),f.update=function(e,t){"utf8"===t&&(e=n.util.encodeUtf8(e));var s=e.length;f.messageLength+=s,s=[s/4294967296>>>0,s>>>0];for(var a=f.fullMessageLength.length-1;a>=0;--a)f.fullMessageLength[a]+=s[1],s[1]=s[0]+(f.fullMessageLength[a]/4294967296>>>0),f.fullMessageLength[a]=f.fullMessageLength[a]>>>0,s[0]=s[1]/4294967296>>>0;return i.putBytes(e),u(r,o,i),(i.read>2048||0===i.length())&&i.compact(),f},f.digest=function(){var t=n.util.createBuffer();t.putBytes(i.bytes());var a,c=f.fullMessageLength[f.fullMessageLength.length-1]+f.messageLengthSize&f.blockLength-1;t.putBytes(s.substr(0,f.blockLength-c));for(var l=8*f.fullMessageLength[0],h=0;h<f.fullMessageLength.length-1;++h)l+=(a=8*f.fullMessageLength[h+1])/4294967296>>>0,t.putInt32(l>>>0),l=a>>>0;t.putInt32(l);var d=new Array(r.length);for(h=0;h<r.length;++h)d[h]=r[h].slice(0);u(d,o,t);var p,g=n.util.createBuffer();p="SHA-512"===e?d.length:"SHA-384"===e?d.length-2:d.length-4;for(h=0;h<p;++h)g.putInt32(d[h][0]),h===p-1&&"SHA-512/224"===e||g.putInt32(d[h][1]);return g},f};var s=null,a=!1,c=null,l=null;function u(e,t,r){for(var n,i,o,s,a,l,u,h,d,f,p,g,m,y,v,b,w,E,S,_,A,k,C,x,I,R,P,T,N,D,O,M,B,L=r.length();L>=128;){for(P=0;P<16;++P)t[P][0]=r.getInt32()>>>0,t[P][1]=r.getInt32()>>>0;for(;P<80;++P)n=(((T=(D=t[P-2])[0])>>>19|(N=D[1])<<13)^(N>>>29|T<<3)^T>>>6)>>>0,i=((T<<13|N>>>19)^(N<<3|T>>>29)^(T<<26|N>>>6))>>>0,o=(((T=(M=t[P-15])[0])>>>1|(N=M[1])<<31)^(T>>>8|N<<24)^T>>>7)>>>0,s=((T<<31|N>>>1)^(T<<24|N>>>8)^(T<<25|N>>>7))>>>0,O=t[P-7],B=t[P-16],N=i+O[1]+s+B[1],t[P][0]=n+O[0]+o+B[0]+(N/4294967296>>>0)>>>0,t[P][1]=N>>>0;for(p=e[0][0],g=e[0][1],m=e[1][0],y=e[1][1],v=e[2][0],b=e[2][1],w=e[3][0],E=e[3][1],S=e[4][0],_=e[4][1],A=e[5][0],k=e[5][1],C=e[6][0],x=e[6][1],I=e[7][0],R=e[7][1],P=0;P<80;++P)u=((S>>>14|_<<18)^(S>>>18|_<<14)^(_>>>9|S<<23))>>>0,h=(C^S&(A^C))>>>0,a=((p>>>28|g<<4)^(g>>>2|p<<30)^(g>>>7|p<<25))>>>0,l=((p<<4|g>>>28)^(g<<30|p>>>2)^(g<<25|p>>>7))>>>0,d=(p&m|v&(p^m))>>>0,f=(g&y|b&(g^y))>>>0,N=R+(((S<<18|_>>>14)^(S<<14|_>>>18)^(_<<23|S>>>9))>>>0)+((x^_&(k^x))>>>0)+c[P][1]+t[P][1],n=I+u+h+c[P][0]+t[P][0]+(N/4294967296>>>0)>>>0,i=N>>>0,o=a+d+((N=l+f)/4294967296>>>0)>>>0,s=N>>>0,I=C,R=x,C=A,x=k,A=S,k=_,S=w+n+((N=E+i)/4294967296>>>0)>>>0,_=N>>>0,w=v,E=b,v=m,b=y,m=p,y=g,p=n+o+((N=i+s)/4294967296>>>0)>>>0,g=N>>>0;N=e[0][1]+g,e[0][0]=e[0][0]+p+(N/4294967296>>>0)>>>0,e[0][1]=N>>>0,N=e[1][1]+y,e[1][0]=e[1][0]+m+(N/4294967296>>>0)>>>0,e[1][1]=N>>>0,N=e[2][1]+b,e[2][0]=e[2][0]+v+(N/4294967296>>>0)>>>0,e[2][1]=N>>>0,N=e[3][1]+E,e[3][0]=e[3][0]+w+(N/4294967296>>>0)>>>0,e[3][1]=N>>>0,N=e[4][1]+_,e[4][0]=e[4][0]+S+(N/4294967296>>>0)>>>0,e[4][1]=N>>>0,N=e[5][1]+k,e[5][0]=e[5][0]+A+(N/4294967296>>>0)>>>0,e[5][1]=N>>>0,N=e[6][1]+x,e[6][0]=e[6][0]+C+(N/4294967296>>>0)>>>0,e[6][1]=N>>>0,N=e[7][1]+R,e[7][0]=e[7][0]+I+(N/4294967296>>>0)>>>0,e[7][1]=N>>>0,L-=128}}},9491:(e,t,r)=>{var n=r(428),i=r(4443),o=e.exports=n.util=n.util||{};function s(e){if(8!==e&&16!==e&&24!==e&&32!==e)throw new Error("Only 8, 16, 24, or 32 bits supported: "+e)}function a(e){if(this.data="",this.read=0,"string"===typeof e)this.data=e;else if(o.isArrayBuffer(e)||o.isArrayBufferView(e))if("undefined"!==typeof Buffer&&e instanceof Buffer)this.data=e.toString("binary");else{var t=new Uint8Array(e);try{this.data=String.fromCharCode.apply(null,t)}catch(n){for(var r=0;r<t.length;++r)this.putByte(t[r])}}else(e instanceof a||"object"===typeof e&&"string"===typeof e.data&&"number"===typeof e.read)&&(this.data=e.data,this.read=e.read);this._constructedStringLength=0}!function(){if("undefined"!==typeof process&&process.nextTick&&!process.browser)return o.nextTick=process.nextTick,void("function"===typeof setImmediate?o.setImmediate=setImmediate:o.setImmediate=o.nextTick);if("function"===typeof setImmediate)return o.setImmediate=function(){return setImmediate.apply(void 0,arguments)},void(o.nextTick=function(e){return setImmediate(e)});if(o.setImmediate=function(e){setTimeout(e,0)},"undefined"!==typeof window&&"function"===typeof window.postMessage){var e="forge.setImmediate",t=[];o.setImmediate=function(r){t.push(r),1===t.length&&window.postMessage(e,"*")},window.addEventListener("message",(function(r){if(r.source===window&&r.data===e){r.stopPropagation();var n=t.slice();t.length=0,n.forEach((function(e){e()}))}}),!0)}if("undefined"!==typeof MutationObserver){var r=Date.now(),n=!0,i=document.createElement("div");t=[];new MutationObserver((function(){var e=t.slice();t.length=0,e.forEach((function(e){e()}))})).observe(i,{attributes:!0});var s=o.setImmediate;o.setImmediate=function(e){Date.now()-r>15?(r=Date.now(),s(e)):(t.push(e),1===t.length&&i.setAttribute("a",n=!n))}}o.nextTick=o.setImmediate}(),o.isNodejs="undefined"!==typeof process&&process.versions&&process.versions.node,o.globalScope=o.isNodejs?r.g:"undefined"===typeof self?window:self,o.isArray=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},o.isArrayBuffer=function(e){return"undefined"!==typeof ArrayBuffer&&e instanceof ArrayBuffer},o.isArrayBufferView=function(e){return e&&o.isArrayBuffer(e.buffer)&&void 0!==e.byteLength},o.ByteBuffer=a,o.ByteStringBuffer=a;o.ByteStringBuffer.prototype._optimizeConstructedString=function(e){this._constructedStringLength+=e,this._constructedStringLength>4096&&(this.data.substr(0,1),this._constructedStringLength=0)},o.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read},o.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0},o.ByteStringBuffer.prototype.putByte=function(e){return this.putBytes(String.fromCharCode(e))},o.ByteStringBuffer.prototype.fillWithByte=function(e,t){e=String.fromCharCode(e);for(var r=this.data;t>0;)1&t&&(r+=e),(t>>>=1)>0&&(e+=e);return this.data=r,this._optimizeConstructedString(t),this},o.ByteStringBuffer.prototype.putBytes=function(e){return this.data+=e,this._optimizeConstructedString(e.length),this},o.ByteStringBuffer.prototype.putString=function(e){return this.putBytes(o.encodeUtf8(e))},o.ByteStringBuffer.prototype.putInt16=function(e){return this.putBytes(String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},o.ByteStringBuffer.prototype.putInt24=function(e){return this.putBytes(String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},o.ByteStringBuffer.prototype.putInt32=function(e){return this.putBytes(String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},o.ByteStringBuffer.prototype.putInt16Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255))},o.ByteStringBuffer.prototype.putInt24Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255))},o.ByteStringBuffer.prototype.putInt32Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>24&255))},o.ByteStringBuffer.prototype.putInt=function(e,t){s(t);var r="";do{t-=8,r+=String.fromCharCode(e>>t&255)}while(t>0);return this.putBytes(r)},o.ByteStringBuffer.prototype.putSignedInt=function(e,t){return e<0&&(e+=2<<t-1),this.putInt(e,t)},o.ByteStringBuffer.prototype.putBuffer=function(e){return this.putBytes(e.getBytes())},o.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)},o.ByteStringBuffer.prototype.getInt16=function(){var e=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);return this.read+=2,e},o.ByteStringBuffer.prototype.getInt24=function(){var e=this.data.charCodeAt(this.read)<<16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);return this.read+=3,e},o.ByteStringBuffer.prototype.getInt32=function(){var e=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);return this.read+=4,e},o.ByteStringBuffer.prototype.getInt16Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;return this.read+=2,e},o.ByteStringBuffer.prototype.getInt24Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;return this.read+=3,e},o.ByteStringBuffer.prototype.getInt32Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;return this.read+=4,e},o.ByteStringBuffer.prototype.getInt=function(e){s(e);var t=0;do{t=(t<<8)+this.data.charCodeAt(this.read++),e-=8}while(e>0);return t},o.ByteStringBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),r=2<<e-2;return t>=r&&(t-=r<<1),t},o.ByteStringBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):0===e?t="":(t=0===this.read?this.data:this.data.slice(this.read),this.clear()),t},o.ByteStringBuffer.prototype.bytes=function(e){return"undefined"===typeof e?this.data.slice(this.read):this.data.slice(this.read,this.read+e)},o.ByteStringBuffer.prototype.at=function(e){return this.data.charCodeAt(this.read+e)},o.ByteStringBuffer.prototype.setAt=function(e,t){return this.data=this.data.substr(0,this.read+e)+String.fromCharCode(t)+this.data.substr(this.read+e+1),this},o.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)},o.ByteStringBuffer.prototype.copy=function(){var e=o.createBuffer(this.data);return e.read=this.read,e},o.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this},o.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this},o.ByteStringBuffer.prototype.truncate=function(e){var t=Math.max(0,this.length()-e);return this.data=this.data.substr(this.read,t),this.read=0,this},o.ByteStringBuffer.prototype.toHex=function(){for(var e="",t=this.read;t<this.data.length;++t){var r=this.data.charCodeAt(t);r<16&&(e+="0"),e+=r.toString(16)}return e},o.ByteStringBuffer.prototype.toString=function(){return o.decodeUtf8(this.bytes())},o.DataBuffer=function(e,t){t=t||{},this.read=t.readOffset||0,this.growSize=t.growSize||1024;var r=o.isArrayBuffer(e),n=o.isArrayBufferView(e);if(r||n)return this.data=r?new DataView(e):new DataView(e.buffer,e.byteOffset,e.byteLength),void(this.write="writeOffset"in t?t.writeOffset:this.data.byteLength);this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!==e&&void 0!==e&&this.putBytes(e),"writeOffset"in t&&(this.write=t.writeOffset)},o.DataBuffer.prototype.length=function(){return this.write-this.read},o.DataBuffer.prototype.isEmpty=function(){return this.length()<=0},o.DataBuffer.prototype.accommodate=function(e,t){if(this.length()>=e)return this;t=Math.max(t||this.growSize,e);var r=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),n=new Uint8Array(this.length()+t);return n.set(r),this.data=new DataView(n.buffer),this},o.DataBuffer.prototype.putByte=function(e){return this.accommodate(1),this.data.setUint8(this.write++,e),this},o.DataBuffer.prototype.fillWithByte=function(e,t){this.accommodate(t);for(var r=0;r<t;++r)this.data.setUint8(e);return this},o.DataBuffer.prototype.putBytes=function(e,t){if(o.isArrayBufferView(e)){var r=(n=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)).byteLength-n.byteOffset;return this.accommodate(r),new Uint8Array(this.data.buffer,this.write).set(n),this.write+=r,this}if(o.isArrayBuffer(e)){var n=new Uint8Array(e);return this.accommodate(n.byteLength),new Uint8Array(this.data.buffer).set(n,this.write),this.write+=n.byteLength,this}if(e instanceof o.DataBuffer||"object"===typeof e&&"number"===typeof e.read&&"number"===typeof e.write&&o.isArrayBufferView(e.data)){n=new Uint8Array(e.data.byteLength,e.read,e.length());return this.accommodate(n.byteLength),new Uint8Array(e.data.byteLength,this.write).set(n),this.write+=n.byteLength,this}if(e instanceof o.ByteStringBuffer&&(e=e.data,t="binary"),t=t||"binary","string"===typeof e){var i;if("hex"===t)return this.accommodate(Math.ceil(e.length/2)),i=new Uint8Array(this.data.buffer,this.write),this.write+=o.binary.hex.decode(e,i,this.write),this;if("base64"===t)return this.accommodate(3*Math.ceil(e.length/4)),i=new Uint8Array(this.data.buffer,this.write),this.write+=o.binary.base64.decode(e,i,this.write),this;if("utf8"===t&&(e=o.encodeUtf8(e),t="binary"),"binary"===t||"raw"===t)return this.accommodate(e.length),i=new Uint8Array(this.data.buffer,this.write),this.write+=o.binary.raw.decode(i),this;if("utf16"===t)return this.accommodate(2*e.length),i=new Uint16Array(this.data.buffer,this.write),this.write+=o.text.utf16.encode(i),this;throw new Error("Invalid encoding: "+t)}throw Error("Invalid parameter: "+e)},o.DataBuffer.prototype.putBuffer=function(e){return this.putBytes(e),e.clear(),this},o.DataBuffer.prototype.putString=function(e){return this.putBytes(e,"utf16")},o.DataBuffer.prototype.putInt16=function(e){return this.accommodate(2),this.data.setInt16(this.write,e),this.write+=2,this},o.DataBuffer.prototype.putInt24=function(e){return this.accommodate(3),this.data.setInt16(this.write,e>>8&65535),this.data.setInt8(this.write,e>>16&255),this.write+=3,this},o.DataBuffer.prototype.putInt32=function(e){return this.accommodate(4),this.data.setInt32(this.write,e),this.write+=4,this},o.DataBuffer.prototype.putInt16Le=function(e){return this.accommodate(2),this.data.setInt16(this.write,e,!0),this.write+=2,this},o.DataBuffer.prototype.putInt24Le=function(e){return this.accommodate(3),this.data.setInt8(this.write,e>>16&255),this.data.setInt16(this.write,e>>8&65535,!0),this.write+=3,this},o.DataBuffer.prototype.putInt32Le=function(e){return this.accommodate(4),this.data.setInt32(this.write,e,!0),this.write+=4,this},o.DataBuffer.prototype.putInt=function(e,t){s(t),this.accommodate(t/8);do{t-=8,this.data.setInt8(this.write++,e>>t&255)}while(t>0);return this},o.DataBuffer.prototype.putSignedInt=function(e,t){return s(t),this.accommodate(t/8),e<0&&(e+=2<<t-1),this.putInt(e,t)},o.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)},o.DataBuffer.prototype.getInt16=function(){var e=this.data.getInt16(this.read);return this.read+=2,e},o.DataBuffer.prototype.getInt24=function(){var e=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);return this.read+=3,e},o.DataBuffer.prototype.getInt32=function(){var e=this.data.getInt32(this.read);return this.read+=4,e},o.DataBuffer.prototype.getInt16Le=function(){var e=this.data.getInt16(this.read,!0);return this.read+=2,e},o.DataBuffer.prototype.getInt24Le=function(){var e=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;return this.read+=3,e},o.DataBuffer.prototype.getInt32Le=function(){var e=this.data.getInt32(this.read,!0);return this.read+=4,e},o.DataBuffer.prototype.getInt=function(e){s(e);var t=0;do{t=(t<<8)+this.data.getInt8(this.read++),e-=8}while(e>0);return t},o.DataBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),r=2<<e-2;return t>=r&&(t-=r<<1),t},o.DataBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):0===e?t="":(t=0===this.read?this.data:this.data.slice(this.read),this.clear()),t},o.DataBuffer.prototype.bytes=function(e){return"undefined"===typeof e?this.data.slice(this.read):this.data.slice(this.read,this.read+e)},o.DataBuffer.prototype.at=function(e){return this.data.getUint8(this.read+e)},o.DataBuffer.prototype.setAt=function(e,t){return this.data.setUint8(e,t),this},o.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)},o.DataBuffer.prototype.copy=function(){return new o.DataBuffer(this)},o.DataBuffer.prototype.compact=function(){if(this.read>0){var e=new Uint8Array(this.data.buffer,this.read),t=new Uint8Array(e.byteLength);t.set(e),this.data=new DataView(t),this.write-=this.read,this.read=0}return this},o.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this},o.DataBuffer.prototype.truncate=function(e){return this.write=Math.max(0,this.length()-e),this.read=Math.min(this.read,this.write),this},o.DataBuffer.prototype.toHex=function(){for(var e="",t=this.read;t<this.data.byteLength;++t){var r=this.data.getUint8(t);r<16&&(e+="0"),e+=r.toString(16)}return e},o.DataBuffer.prototype.toString=function(e){var t=new Uint8Array(this.data,this.read,this.length());if("binary"===(e=e||"utf8")||"raw"===e)return o.binary.raw.encode(t);if("hex"===e)return o.binary.hex.encode(t);if("base64"===e)return o.binary.base64.encode(t);if("utf8"===e)return o.text.utf8.decode(t);if("utf16"===e)return o.text.utf16.decode(t);throw new Error("Invalid encoding: "+e)},o.createBuffer=function(e,t){return t=t||"raw",void 0!==e&&"utf8"===t&&(e=o.encodeUtf8(e)),new o.ByteBuffer(e)},o.fillString=function(e,t){for(var r="";t>0;)1&t&&(r+=e),(t>>>=1)>0&&(e+=e);return r},o.xorBytes=function(e,t,r){for(var n="",i="",o="",s=0,a=0;r>0;--r,++s)i=e.charCodeAt(s)^t.charCodeAt(s),a>=10&&(n+=o,o="",a=0),o+=String.fromCharCode(i),++a;return n+=o},o.hexToBytes=function(e){var t="",r=0;for(!0&e.length&&(r=1,t+=String.fromCharCode(parseInt(e[0],16)));r<e.length;r+=2)t+=String.fromCharCode(parseInt(e.substr(r,2),16));return t},o.bytesToHex=function(e){return o.createBuffer(e).toHex()},o.int32ToBytes=function(e){return String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e)};var c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],u="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";o.encode64=function(e,t){for(var r,n,i,o="",s="",a=0;a<e.length;)r=e.charCodeAt(a++),n=e.charCodeAt(a++),i=e.charCodeAt(a++),o+=c.charAt(r>>2),o+=c.charAt((3&r)<<4|n>>4),isNaN(n)?o+="==":(o+=c.charAt((15&n)<<2|i>>6),o+=isNaN(i)?"=":c.charAt(63&i)),t&&o.length>t&&(s+=o.substr(0,t)+"\r\n",o=o.substr(t));return s+=o},o.decode64=function(e){e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var t,r,n,i,o="",s=0;s<e.length;)t=l[e.charCodeAt(s++)-43],r=l[e.charCodeAt(s++)-43],n=l[e.charCodeAt(s++)-43],i=l[e.charCodeAt(s++)-43],o+=String.fromCharCode(t<<2|r>>4),64!==n&&(o+=String.fromCharCode((15&r)<<4|n>>2),64!==i&&(o+=String.fromCharCode((3&n)<<6|i)));return o},o.encodeUtf8=function(e){return unescape(encodeURIComponent(e))},o.decodeUtf8=function(e){return decodeURIComponent(escape(e))},o.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:i.encode,decode:i.decode}},o.binary.raw.encode=function(e){return String.fromCharCode.apply(null,e)},o.binary.raw.decode=function(e,t,r){var n=t;n||(n=new Uint8Array(e.length));for(var i=r=r||0,o=0;o<e.length;++o)n[i++]=e.charCodeAt(o);return t?i-r:n},o.binary.hex.encode=o.bytesToHex,o.binary.hex.decode=function(e,t,r){var n=t;n||(n=new Uint8Array(Math.ceil(e.length/2)));var i=0,o=r=r||0;for(1&e.length&&(i=1,n[o++]=parseInt(e[0],16));i<e.length;i+=2)n[o++]=parseInt(e.substr(i,2),16);return t?o-r:n},o.binary.base64.encode=function(e,t){for(var r,n,i,o="",s="",a=0;a<e.byteLength;)r=e[a++],n=e[a++],i=e[a++],o+=c.charAt(r>>2),o+=c.charAt((3&r)<<4|n>>4),isNaN(n)?o+="==":(o+=c.charAt((15&n)<<2|i>>6),o+=isNaN(i)?"=":c.charAt(63&i)),t&&o.length>t&&(s+=o.substr(0,t)+"\r\n",o=o.substr(t));return s+=o},o.binary.base64.decode=function(e,t,r){var n,i,o,s,a=t;a||(a=new Uint8Array(3*Math.ceil(e.length/4))),e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var c=0,u=r=r||0;c<e.length;)n=l[e.charCodeAt(c++)-43],i=l[e.charCodeAt(c++)-43],o=l[e.charCodeAt(c++)-43],s=l[e.charCodeAt(c++)-43],a[u++]=n<<2|i>>4,64!==o&&(a[u++]=(15&i)<<4|o>>2,64!==s&&(a[u++]=(3&o)<<6|s));return t?u-r:a.subarray(0,u)},o.binary.base58.encode=function(e,t){return o.binary.baseN.encode(e,u,t)},o.binary.base58.decode=function(e,t){return o.binary.baseN.decode(e,u,t)},o.text={utf8:{},utf16:{}},o.text.utf8.encode=function(e,t,r){e=o.encodeUtf8(e);var n=t;n||(n=new Uint8Array(e.length));for(var i=r=r||0,s=0;s<e.length;++s)n[i++]=e.charCodeAt(s);return t?i-r:n},o.text.utf8.decode=function(e){return o.decodeUtf8(String.fromCharCode.apply(null,e))},o.text.utf16.encode=function(e,t,r){var n=t;n||(n=new Uint8Array(2*e.length));for(var i=new Uint16Array(n.buffer),o=r=r||0,s=r,a=0;a<e.length;++a)i[s++]=e.charCodeAt(a),o+=2;return t?o-r:n},o.text.utf16.decode=function(e){return String.fromCharCode.apply(null,new Uint16Array(e.buffer))},o.deflate=function(e,t,r){if(t=o.decode64(e.deflate(o.encode64(t)).rval),r){var n=2;32&t.charCodeAt(1)&&(n=6),t=t.substring(n,t.length-4)}return t},o.inflate=function(e,t,r){var n=e.inflate(o.encode64(t)).rval;return null===n?null:o.decode64(n)};var h=function(e,t,r){if(!e)throw new Error("WebStorage not available.");var n;if(null===r?n=e.removeItem(t):(r=o.encode64(JSON.stringify(r)),n=e.setItem(t,r)),"undefined"!==typeof n&&!0!==n.rval){var i=new Error(n.error.message);throw i.id=n.error.id,i.name=n.error.name,i}},d=function(e,t){if(!e)throw new Error("WebStorage not available.");var r=e.getItem(t);if(e.init)if(null===r.rval){if(r.error){var n=new Error(r.error.message);throw n.id=r.error.id,n.name=r.error.name,n}r=null}else r=r.rval;return null!==r&&(r=JSON.parse(o.decode64(r))),r},f=function(e,t,r,n){var i=d(e,t);null===i&&(i={}),i[r]=n,h(e,t,i)},p=function(e,t,r){var n=d(e,t);return null!==n&&(n=r in n?n[r]:null),n},g=function(e,t,r){var n=d(e,t);if(null!==n&&r in n){delete n[r];var i=!0;for(var o in n){i=!1;break}i&&(n=null),h(e,t,n)}},m=function(e,t){h(e,t,null)},y=function(e,t,r){var n,i=null;"undefined"===typeof r&&(r=["web","flash"]);var o=!1,s=null;for(var a in r){n=r[a];try{if("flash"===n||"both"===n){if(null===t[0])throw new Error("Flash local storage not available.");i=e.apply(this,t),o="flash"===n}"web"!==n&&"both"!==n||(t[0]=localStorage,i=e.apply(this,t),o=!0)}catch(c){s=c}if(o)break}if(!o)throw s;return i};o.setItem=function(e,t,r,n,i){y(f,arguments,i)},o.getItem=function(e,t,r,n){return y(p,arguments,n)},o.removeItem=function(e,t,r,n){y(g,arguments,n)},o.clearItems=function(e,t,r){y(m,arguments,r)},o.isEmpty=function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},o.format=function(e){for(var t,r,n=/%./g,i=0,o=[],s=0;t=n.exec(e);){(r=e.substring(s,n.lastIndex-2)).length>0&&o.push(r),s=n.lastIndex;var a=t[0][1];switch(a){case"s":case"o":i<arguments.length?o.push(arguments[1+i++]):o.push("<?>");break;case"%":o.push("%");break;default:o.push("<%"+a+"?>")}}return o.push(e.substring(s)),o.join("")},o.formatNumber=function(e,t,r,n){var i=e,o=isNaN(t=Math.abs(t))?2:t,s=void 0===r?",":r,a=void 0===n?".":n,c=i<0?"-":"",l=parseInt(i=Math.abs(+i||0).toFixed(o),10)+"",u=l.length>3?l.length%3:0;return c+(u?l.substr(0,u)+a:"")+l.substr(u).replace(/(\d{3})(?=\d)/g,"$1"+a)+(o?s+Math.abs(i-l).toFixed(o).slice(2):"")},o.formatSize=function(e){return e=e>=1073741824?o.formatNumber(e/1073741824,2,".","")+" GiB":e>=1048576?o.formatNumber(e/1048576,2,".","")+" MiB":e>=1024?o.formatNumber(e/1024,0)+" KiB":o.formatNumber(e,0)+" bytes"},o.bytesFromIP=function(e){return-1!==e.indexOf(".")?o.bytesFromIPv4(e):-1!==e.indexOf(":")?o.bytesFromIPv6(e):null},o.bytesFromIPv4=function(e){if(4!==(e=e.split(".")).length)return null;for(var t=o.createBuffer(),r=0;r<e.length;++r){var n=parseInt(e[r],10);if(isNaN(n))return null;t.putByte(n)}return t.getBytes()},o.bytesFromIPv6=function(e){for(var t=0,r=2*(8-(e=e.split(":").filter((function(e){return 0===e.length&&++t,!0}))).length+t),n=o.createBuffer(),i=0;i<8;++i)if(e[i]&&0!==e[i].length){var s=o.hexToBytes(e[i]);s.length<2&&n.putByte(0),n.putBytes(s)}else n.fillWithByte(0,r),r=0;return n.getBytes()},o.bytesToIP=function(e){return 4===e.length?o.bytesToIPv4(e):16===e.length?o.bytesToIPv6(e):null},o.bytesToIPv4=function(e){if(4!==e.length)return null;for(var t=[],r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t.join(".")},o.bytesToIPv6=function(e){if(16!==e.length)return null;for(var t=[],r=[],n=0,i=0;i<e.length;i+=2){for(var s=o.bytesToHex(e[i]+e[i+1]);"0"===s[0]&&"0"!==s;)s=s.substr(1);if("0"===s){var a=r[r.length-1],c=t.length;a&&c===a.end+1?(a.end=c,a.end-a.start>r[n].end-r[n].start&&(n=r.length-1)):r.push({start:c,end:c})}t.push(s)}if(r.length>0){var l=r[n];l.end-l.start>0&&(t.splice(l.start,l.end-l.start+1,""),0===l.start&&t.unshift(""),7===l.end&&t.push(""))}return t.join(":")},o.estimateCores=function(e,t){if("function"===typeof e&&(t=e,e={}),e=e||{},"cores"in o&&!e.update)return t(null,o.cores);if("undefined"!==typeof navigator&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return o.cores=navigator.hardwareConcurrency,t(null,o.cores);if("undefined"===typeof Worker)return o.cores=1,t(null,o.cores);if("undefined"===typeof Blob)return o.cores=2,t(null,o.cores);var r=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",(function(e){for(var t=Date.now(),r=t+4;Date.now()<r;);self.postMessage({st:t,et:r})}))}.toString(),")()"],{type:"application/javascript"}));!function e(n,i,s){if(0===i){var a=Math.floor(n.reduce((function(e,t){return e+t}),0)/n.length);return o.cores=Math.max(1,a),URL.revokeObjectURL(r),t(null,o.cores)}!function(e,t){for(var n=[],i=[],o=0;o<e;++o){var s=new Worker(r);s.addEventListener("message",(function(r){if(i.push(r.data),i.length===e){for(var o=0;o<e;++o)n[o].terminate();t(null,i)}})),n.push(s)}for(o=0;o<e;++o)n[o].postMessage(o)}(s,(function(t,r){n.push(function(e,t){for(var r=[],n=0;n<e;++n)for(var i=t[n],o=r[n]=[],s=0;s<e;++s)if(n!==s){var a=t[s];(i.st>a.st&&i.st<a.et||a.st>i.st&&a.st<i.et)&&o.push(s)}return r.reduce((function(e,t){return Math.max(e,t.length)}),0)}(s,r)),e(n,i-1,s)}))}([],5,16)}},6567:(e,t,r)=>{"use strict";e.exports=r(7661)},4597:(e,t,r)=>{"use strict";var n=t,i=r(6531),o=r(8052);function s(e,t,r,n){var o=!1;if(t.resolvedType)if(t.resolvedType instanceof i){e("switch(d%s){",n);for(var s=t.resolvedType.values,a=Object.keys(s),c=0;c<a.length;++c)s[a[c]]!==t.typeDefault||o||(e("default:")('if(typeof(d%s)==="number"){m%s=d%s;break}',n,n,n),t.repeated||e("break"),o=!0),e("case%j:",a[c])("case %i:",s[a[c]])("m%s=%j",n,s[a[c]])("break");e("}")}else e('if(typeof d%s!=="object")',n)("throw TypeError(%j)",t.fullName+": object expected")("m%s=types[%i].fromObject(d%s)",n,r,n);else{var l=!1;switch(t.type){case"double":case"float":e("m%s=Number(d%s)",n,n);break;case"uint32":case"fixed32":e("m%s=d%s>>>0",n,n);break;case"int32":case"sint32":case"sfixed32":e("m%s=d%s|0",n,n);break;case"uint64":l=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",n,n,l)('else if(typeof d%s==="string")',n)("m%s=parseInt(d%s,10)",n,n)('else if(typeof d%s==="number")',n)("m%s=d%s",n,n)('else if(typeof d%s==="object")',n)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",n,n,n,l?"true":"");break;case"bytes":e('if(typeof d%s==="string")',n)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",n,n,n)("else if(d%s.length >= 0)",n)("m%s=d%s",n,n);break;case"string":e("m%s=String(d%s)",n,n);break;case"bool":e("m%s=Boolean(d%s)",n,n)}}return e}function a(e,t,r,n){if(t.resolvedType)t.resolvedType instanceof i?e("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s",n,r,n,n,r,n,n):e("d%s=types[%i].toObject(m%s,o)",n,r,n);else{var o=!1;switch(t.type){case"double":case"float":e("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",n,n,n,n);break;case"uint64":o=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e('if(typeof m%s==="number")',n)("d%s=o.longs===String?String(m%s):m%s",n,n,n)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",n,n,n,n,o?"true":"",n);break;case"bytes":e("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",n,n,n,n,n);break;default:e("d%s=m%s",n,n)}}return e}n.fromObject=function(e){var t=e.fieldsArray,r=o.codegen(["d"],e.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!t.length)return r("return new this.ctor");r("var m=new this.ctor");for(var n=0;n<t.length;++n){var a=t[n].resolve(),c=o.safeProp(a.name);a.map?(r("if(d%s){",c)('if(typeof d%s!=="object")',c)("throw TypeError(%j)",a.fullName+": object expected")("m%s={}",c)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",c),s(r,a,n,c+"[ks[i]]")("}")("}")):a.repeated?(r("if(d%s){",c)("if(!Array.isArray(d%s))",c)("throw TypeError(%j)",a.fullName+": array expected")("m%s=[]",c)("for(var i=0;i<d%s.length;++i){",c),s(r,a,n,c+"[i]")("}")("}")):(a.resolvedType instanceof i||r("if(d%s!=null){",c),s(r,a,n,c),a.resolvedType instanceof i||r("}"))}return r("return m")},n.toObject=function(e){var t=e.fieldsArray.slice().sort(o.compareFieldsById);if(!t.length)return o.codegen()("return {}");for(var r=o.codegen(["m","o"],e.name+"$toObject")("if(!o)")("o={}")("var d={}"),n=[],s=[],c=[],l=0;l<t.length;++l)t[l].partOf||(t[l].resolve().repeated?n:t[l].map?s:c).push(t[l]);if(n.length){for(r("if(o.arrays||o.defaults){"),l=0;l<n.length;++l)r("d%s=[]",o.safeProp(n[l].name));r("}")}if(s.length){for(r("if(o.objects||o.defaults){"),l=0;l<s.length;++l)r("d%s={}",o.safeProp(s[l].name));r("}")}if(c.length){for(r("if(o.defaults){"),l=0;l<c.length;++l){var u=c[l],h=o.safeProp(u.name);if(u.resolvedType instanceof i)r("d%s=o.enums===String?%j:%j",h,u.resolvedType.valuesById[u.typeDefault],u.typeDefault);else if(u.long)r("if(util.Long){")("var n=new util.Long(%i,%i,%j)",u.typeDefault.low,u.typeDefault.high,u.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",h)("}else")("d%s=o.longs===String?%j:%i",h,u.typeDefault.toString(),u.typeDefault.toNumber());else if(u.bytes){var d="["+Array.prototype.slice.call(u.typeDefault).join(",")+"]";r("if(o.bytes===String)d%s=%j",h,String.fromCharCode.apply(String,u.typeDefault))("else{")("d%s=%s",h,d)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",h,h)("}")}else r("d%s=%j",h,u.typeDefault)}r("}")}var f=!1;for(l=0;l<t.length;++l){u=t[l];var p=e._fieldsArray.indexOf(u);h=o.safeProp(u.name);u.map?(f||(f=!0,r("var ks2")),r("if(m%s&&(ks2=Object.keys(m%s)).length){",h,h)("d%s={}",h)("for(var j=0;j<ks2.length;++j){"),a(r,u,p,h+"[ks2[j]]")("}")):u.repeated?(r("if(m%s&&m%s.length){",h,h)("d%s=[]",h)("for(var j=0;j<m%s.length;++j){",h),a(r,u,p,h+"[j]")("}")):(r("if(m%s!=null&&m.hasOwnProperty(%j)){",h,u.name),a(r,u,p,h),u.partOf&&r("if(o.oneofs)")("d%s=%j",o.safeProp(u.partOf.name),u.name)),r("}")}return r("return d")}},1625:(e,t,r)=>{"use strict";e.exports=function(e){var t=o.codegen(["r","l"],e.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(e.fieldsArray.filter((function(e){return e.map})).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()");e.group&&t("if((t&7)===4)")("break");t("switch(t>>>3){");for(var r=0;r<e.fieldsArray.length;++r){var a=e._fieldsArray[r].resolve(),c=a.resolvedType instanceof n?"int32":a.type,l="m"+o.safeProp(a.name);t("case %i: {",a.id),a.map?(t("if(%s===util.emptyObject)",l)("%s={}",l)("var c2 = r.uint32()+r.pos"),void 0!==i.defaults[a.keyType]?t("k=%j",i.defaults[a.keyType]):t("k=null"),void 0!==i.defaults[c]?t("value=%j",i.defaults[c]):t("value=null"),t("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",a.keyType)("case 2:"),void 0===i.basic[c]?t("value=types[%i].decode(r,r.uint32())",r):t("value=r.%s()",c),t("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),void 0!==i.long[a.keyType]?t('%s[typeof k==="object"?util.longToHash(k):k]=value',l):t("%s[k]=value",l)):a.repeated?(t("if(!(%s&&%s.length))",l,l)("%s=[]",l),void 0!==i.packed[c]&&t("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",l,c)("}else"),void 0===i.basic[c]?t(a.resolvedType.group?"%s.push(types[%i].decode(r))":"%s.push(types[%i].decode(r,r.uint32()))",l,r):t("%s.push(r.%s())",l,c)):void 0===i.basic[c]?t(a.resolvedType.group?"%s=types[%i].decode(r)":"%s=types[%i].decode(r,r.uint32())",l,r):t("%s=r.%s()",l,c),t("break")("}")}for(t("default:")("r.skipType(t&7)")("break")("}")("}"),r=0;r<e._fieldsArray.length;++r){var u=e._fieldsArray[r];u.required&&t("if(!m.hasOwnProperty(%j))",u.name)("throw util.ProtocolError(%j,{instance:m})",s(u))}return t("return m")};var n=r(6531),i=r(5028),o=r(8052);function s(e){return"missing required '"+e.name+"'"}},6652:(e,t,r)=>{"use strict";e.exports=function(e){for(var t,r=o.codegen(["m","w"],e.name+"$encode")("if(!w)")("w=Writer.create()"),a=e.fieldsArray.slice().sort(o.compareFieldsById),c=0;c<a.length;++c){var l=a[c].resolve(),u=e._fieldsArray.indexOf(l),h=l.resolvedType instanceof n?"int32":l.type,d=i.basic[h];t="m"+o.safeProp(l.name),l.map?(r("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",t,l.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",t)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(l.id<<3|2)>>>0,8|i.mapKey[l.keyType],l.keyType),void 0===d?r("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",u,t):r(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|d,h,t),r("}")("}")):l.repeated?(r("if(%s!=null&&%s.length){",t,t),l.packed&&void 0!==i.packed[h]?r("w.uint32(%i).fork()",(l.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",t)("w.%s(%s[i])",h,t)("w.ldelim()"):(r("for(var i=0;i<%s.length;++i)",t),void 0===d?s(r,l,u,t+"[i]"):r("w.uint32(%i).%s(%s[i])",(l.id<<3|d)>>>0,h,t)),r("}")):(l.optional&&r("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",t,l.name),void 0===d?s(r,l,u,t):r("w.uint32(%i).%s(%s)",(l.id<<3|d)>>>0,h,t))}return r("return w")};var n=r(6531),i=r(5028),o=r(8052);function s(e,t,r,n){return t.resolvedType.group?e("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",r,n,(t.id<<3|3)>>>0,(t.id<<3|4)>>>0):e("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",r,n,(t.id<<3|2)>>>0)}},6531:(e,t,r)=>{"use strict";e.exports=s;var n=r(2028);((s.prototype=Object.create(n.prototype)).constructor=s).className="Enum";var i=r(706),o=r(8052);function s(e,t,r,i,o,s){if(n.call(this,e,r),t&&"object"!==typeof t)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=i,this.comments=o||{},this.valuesOptions=s,this.reserved=void 0,t)for(var a=Object.keys(t),c=0;c<a.length;++c)"number"===typeof t[a[c]]&&(this.valuesById[this.values[a[c]]=t[a[c]]]=a[c])}s.fromJSON=function(e,t){var r=new s(e,t.values,t.options,t.comment,t.comments);return r.reserved=t.reserved,r},s.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return o.toObject(["options",this.options,"valuesOptions",this.valuesOptions,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"comment",t?this.comment:void 0,"comments",t?this.comments:void 0])},s.prototype.add=function(e,t,r,n){if(!o.isString(e))throw TypeError("name must be a string");if(!o.isInteger(t))throw TypeError("id must be an integer");if(void 0!==this.values[e])throw Error("duplicate name '"+e+"' in "+this);if(this.isReservedId(t))throw Error("id "+t+" is reserved in "+this);if(this.isReservedName(e))throw Error("name '"+e+"' is reserved in "+this);if(void 0!==this.valuesById[t]){if(!this.options||!this.options.allow_alias)throw Error("duplicate id "+t+" in "+this);this.values[e]=t}else this.valuesById[this.values[e]=t]=e;return n&&(void 0===this.valuesOptions&&(this.valuesOptions={}),this.valuesOptions[e]=n||null),this.comments[e]=r||null,this},s.prototype.remove=function(e){if(!o.isString(e))throw TypeError("name must be a string");var t=this.values[e];if(null==t)throw Error("name '"+e+"' does not exist in "+this);return delete this.valuesById[t],delete this.values[e],delete this.comments[e],this.valuesOptions&&delete this.valuesOptions[e],this},s.prototype.isReservedId=function(e){return i.isReservedId(this.reserved,e)},s.prototype.isReservedName=function(e){return i.isReservedName(this.reserved,e)}},6151:(e,t,r)=>{"use strict";e.exports=l;var n=r(2028);((l.prototype=Object.create(n.prototype)).constructor=l).className="Field";var i,o=r(6531),s=r(5028),a=r(8052),c=/^required|optional|repeated$/;function l(e,t,r,i,o,l,u){if(a.isObject(i)?(u=o,l=i,i=o=void 0):a.isObject(o)&&(u=l,l=o,o=void 0),n.call(this,e,l),!a.isInteger(t)||t<0)throw TypeError("id must be a non-negative integer");if(!a.isString(r))throw TypeError("type must be a string");if(void 0!==i&&!c.test(i=i.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(void 0!==o&&!a.isString(o))throw TypeError("extend must be a string");"proto3_optional"===i&&(i="optional"),this.rule=i&&"optional"!==i?i:void 0,this.type=r,this.id=t,this.extend=o||void 0,this.required="required"===i,this.optional=!this.required,this.repeated="repeated"===i,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!a.Long&&void 0!==s.long[r],this.bytes="bytes"===r,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this._packed=null,this.comment=u}l.fromJSON=function(e,t){return new l(e,t.id,t.type,t.rule,t.extend,t.options,t.comment)},Object.defineProperty(l.prototype,"packed",{get:function(){return null===this._packed&&(this._packed=!1!==this.getOption("packed")),this._packed}}),l.prototype.setOption=function(e,t,r){return"packed"===e&&(this._packed=null),n.prototype.setOption.call(this,e,t,r)},l.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return a.toObject(["rule","optional"!==this.rule&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},l.prototype.resolve=function(){if(this.resolved)return this;if(void 0===(this.typeDefault=s.defaults[this.type])?(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof i?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]):this.options&&this.options.proto3_optional&&(this.typeDefault=null),this.options&&null!=this.options.default&&(this.typeDefault=this.options.default,this.resolvedType instanceof o&&"string"===typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(!0!==this.options.packed&&(void 0===this.options.packed||!this.resolvedType||this.resolvedType instanceof o)||delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=a.Long.fromNumber(this.typeDefault,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&"string"===typeof this.typeDefault){var e;a.base64.test(this.typeDefault)?a.base64.decode(this.typeDefault,e=a.newBuffer(a.base64.length(this.typeDefault)),0):a.utf8.write(this.typeDefault,e=a.newBuffer(a.utf8.length(this.typeDefault)),0),this.typeDefault=e}return this.map?this.defaultValue=a.emptyObject:this.repeated?this.defaultValue=a.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof i&&(this.parent.ctor.prototype[this.name]=this.defaultValue),n.prototype.resolve.call(this)},l.d=function(e,t,r,n){return"function"===typeof t?t=a.decorateType(t).name:t&&"object"===typeof t&&(t=a.decorateEnum(t).name),function(i,o){a.decorateType(i.constructor).add(new l(o,e,t,r,{default:n}))}},l._configure=function(e){i=e}},7661:(e,t,r)=>{"use strict";var n=e.exports=r(9488);n.build="light",n.load=function(e,t,r){return"function"===typeof t?(r=t,t=new n.Root):t||(t=new n.Root),t.load(e,r)},n.loadSync=function(e,t){return t||(t=new n.Root),t.loadSync(e)},n.encoder=r(6652),n.decoder=r(1625),n.verifier=r(2962),n.converter=r(4597),n.ReflectionObject=r(2028),n.Namespace=r(706),n.Root=r(2808),n.Enum=r(6531),n.Type=r(9549),n.Field=r(6151),n.OneOf=r(9825),n.MapField=r(1686),n.Service=r(2342),n.Method=r(5597),n.Message=r(9140),n.wrappers=r(2481),n.types=r(5028),n.util=r(8052),n.ReflectionObject._configure(n.Root),n.Namespace._configure(n.Type,n.Service,n.Enum),n.Root._configure(n.Type),n.Field._configure(n.Type)},9488:(e,t,r)=>{"use strict";var n=t;function i(){n.util._configure(),n.Writer._configure(n.BufferWriter),n.Reader._configure(n.BufferReader)}n.build="minimal",n.Writer=r(8050),n.BufferWriter=r(2149),n.Reader=r(2422),n.BufferReader=r(4148),n.util=r(9716),n.rpc=r(7523),n.roots=r(3107),n.configure=i,i()},1686:(e,t,r)=>{"use strict";e.exports=s;var n=r(6151);((s.prototype=Object.create(n.prototype)).constructor=s).className="MapField";var i=r(5028),o=r(8052);function s(e,t,r,i,s,a){if(n.call(this,e,t,i,void 0,void 0,s,a),!o.isString(r))throw TypeError("keyType must be a string");this.keyType=r,this.resolvedKeyType=null,this.map=!0}s.fromJSON=function(e,t){return new s(e,t.id,t.keyType,t.type,t.options,t.comment)},s.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return o.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},s.prototype.resolve=function(){if(this.resolved)return this;if(void 0===i.mapKey[this.keyType])throw Error("invalid key type: "+this.keyType);return n.prototype.resolve.call(this)},s.d=function(e,t,r){return"function"===typeof r?r=o.decorateType(r).name:r&&"object"===typeof r&&(r=o.decorateEnum(r).name),function(n,i){o.decorateType(n.constructor).add(new s(i,e,t,r))}}},9140:(e,t,r)=>{"use strict";e.exports=i;var n=r(9716);function i(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)this[t[r]]=e[t[r]]}i.create=function(e){return this.$type.create(e)},i.encode=function(e,t){return this.$type.encode(e,t)},i.encodeDelimited=function(e,t){return this.$type.encodeDelimited(e,t)},i.decode=function(e){return this.$type.decode(e)},i.decodeDelimited=function(e){return this.$type.decodeDelimited(e)},i.verify=function(e){return this.$type.verify(e)},i.fromObject=function(e){return this.$type.fromObject(e)},i.toObject=function(e,t){return this.$type.toObject(e,t)},i.prototype.toJSON=function(){return this.$type.toObject(this,n.toJSONOptions)}},5597:(e,t,r)=>{"use strict";e.exports=o;var n=r(2028);((o.prototype=Object.create(n.prototype)).constructor=o).className="Method";var i=r(8052);function o(e,t,r,o,s,a,c,l,u){if(i.isObject(s)?(c=s,s=a=void 0):i.isObject(a)&&(c=a,a=void 0),void 0!==t&&!i.isString(t))throw TypeError("type must be a string");if(!i.isString(r))throw TypeError("requestType must be a string");if(!i.isString(o))throw TypeError("responseType must be a string");n.call(this,e,c),this.type=t||"rpc",this.requestType=r,this.requestStream=!!s||void 0,this.responseType=o,this.responseStream=!!a||void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=l,this.parsedOptions=u}o.fromJSON=function(e,t){return new o(e,t.type,t.requestType,t.responseType,t.requestStream,t.responseStream,t.options,t.comment,t.parsedOptions)},o.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return i.toObject(["type","rpc"!==this.type&&this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",t?this.comment:void 0,"parsedOptions",this.parsedOptions])},o.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),n.prototype.resolve.call(this))}},706:(e,t,r)=>{"use strict";e.exports=h;var n=r(2028);((h.prototype=Object.create(n.prototype)).constructor=h).className="Namespace";var i,o,s,a=r(6151),c=r(8052),l=r(9825);function u(e,t){if(e&&e.length){for(var r={},n=0;n<e.length;++n)r[e[n].name]=e[n].toJSON(t);return r}}function h(e,t){n.call(this,e,t),this.nested=void 0,this._nestedArray=null}function d(e){return e._nestedArray=null,e}h.fromJSON=function(e,t){return new h(e,t.options).addJSON(t.nested)},h.arrayToJSON=u,h.isReservedId=function(e,t){if(e)for(var r=0;r<e.length;++r)if("string"!==typeof e[r]&&e[r][0]<=t&&e[r][1]>t)return!0;return!1},h.isReservedName=function(e,t){if(e)for(var r=0;r<e.length;++r)if(e[r]===t)return!0;return!1},Object.defineProperty(h.prototype,"nestedArray",{get:function(){return this._nestedArray||(this._nestedArray=c.toArray(this.nested))}}),h.prototype.toJSON=function(e){return c.toObject(["options",this.options,"nested",u(this.nestedArray,e)])},h.prototype.addJSON=function(e){if(e)for(var t,r=Object.keys(e),n=0;n<r.length;++n)t=e[r[n]],this.add((void 0!==t.fields?i.fromJSON:void 0!==t.values?s.fromJSON:void 0!==t.methods?o.fromJSON:void 0!==t.id?a.fromJSON:h.fromJSON)(r[n],t));return this},h.prototype.get=function(e){return this.nested&&this.nested[e]||null},h.prototype.getEnum=function(e){if(this.nested&&this.nested[e]instanceof s)return this.nested[e].values;throw Error("no such enum: "+e)},h.prototype.add=function(e){if(!(e instanceof a&&void 0!==e.extend||e instanceof i||e instanceof l||e instanceof s||e instanceof o||e instanceof h))throw TypeError("object must be a valid nested object");if(this.nested){var t=this.get(e.name);if(t){if(!(t instanceof h&&e instanceof h)||t instanceof i||t instanceof o)throw Error("duplicate name '"+e.name+"' in "+this);for(var r=t.nestedArray,n=0;n<r.length;++n)e.add(r[n]);this.remove(t),this.nested||(this.nested={}),e.setOptions(t.options,!0)}}else this.nested={};return this.nested[e.name]=e,e.onAdd(this),d(this)},h.prototype.remove=function(e){if(!(e instanceof n))throw TypeError("object must be a ReflectionObject");if(e.parent!==this)throw Error(e+" is not a member of "+this);return delete this.nested[e.name],Object.keys(this.nested).length||(this.nested=void 0),e.onRemove(this),d(this)},h.prototype.define=function(e,t){if(c.isString(e))e=e.split(".");else if(!Array.isArray(e))throw TypeError("illegal path");if(e&&e.length&&""===e[0])throw Error("path must be relative");for(var r=this;e.length>0;){var n=e.shift();if(r.nested&&r.nested[n]){if(!((r=r.nested[n])instanceof h))throw Error("path conflicts with non-namespace objects")}else r.add(r=new h(n))}return t&&r.addJSON(t),r},h.prototype.resolveAll=function(){for(var e=this.nestedArray,t=0;t<e.length;)e[t]instanceof h?e[t++].resolveAll():e[t++].resolve();return this.resolve()},h.prototype.lookup=function(e,t,r){if("boolean"===typeof t?(r=t,t=void 0):t&&!Array.isArray(t)&&(t=[t]),c.isString(e)&&e.length){if("."===e)return this.root;e=e.split(".")}else if(!e.length)return this;if(""===e[0])return this.root.lookup(e.slice(1),t);var n=this.get(e[0]);if(n){if(1===e.length){if(!t||t.indexOf(n.constructor)>-1)return n}else if(n instanceof h&&(n=n.lookup(e.slice(1),t,!0)))return n}else for(var i=0;i<this.nestedArray.length;++i)if(this._nestedArray[i]instanceof h&&(n=this._nestedArray[i].lookup(e,t,!0)))return n;return null===this.parent||r?null:this.parent.lookup(e,t)},h.prototype.lookupType=function(e){var t=this.lookup(e,[i]);if(!t)throw Error("no such type: "+e);return t},h.prototype.lookupEnum=function(e){var t=this.lookup(e,[s]);if(!t)throw Error("no such Enum '"+e+"' in "+this);return t},h.prototype.lookupTypeOrEnum=function(e){var t=this.lookup(e,[i,s]);if(!t)throw Error("no such Type or Enum '"+e+"' in "+this);return t},h.prototype.lookupService=function(e){var t=this.lookup(e,[o]);if(!t)throw Error("no such Service '"+e+"' in "+this);return t},h._configure=function(e,t,r){i=e,o=t,s=r}},2028:(e,t,r)=>{"use strict";e.exports=o,o.className="ReflectionObject";var n,i=r(8052);function o(e,t){if(!i.isString(e))throw TypeError("name must be a string");if(t&&!i.isObject(t))throw TypeError("options must be an object");this.options=t,this.parsedOptions=null,this.name=e,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}Object.defineProperties(o.prototype,{root:{get:function(){for(var e=this;null!==e.parent;)e=e.parent;return e}},fullName:{get:function(){for(var e=[this.name],t=this.parent;t;)e.unshift(t.name),t=t.parent;return e.join(".")}}}),o.prototype.toJSON=function(){throw Error()},o.prototype.onAdd=function(e){this.parent&&this.parent!==e&&this.parent.remove(this),this.parent=e,this.resolved=!1;var t=e.root;t instanceof n&&t._handleAdd(this)},o.prototype.onRemove=function(e){var t=e.root;t instanceof n&&t._handleRemove(this),this.parent=null,this.resolved=!1},o.prototype.resolve=function(){return this.resolved||this.root instanceof n&&(this.resolved=!0),this},o.prototype.getOption=function(e){if(this.options)return this.options[e]},o.prototype.setOption=function(e,t,r){return r&&this.options&&void 0!==this.options[e]||((this.options||(this.options={}))[e]=t),this},o.prototype.setParsedOption=function(e,t,r){this.parsedOptions||(this.parsedOptions=[]);var n=this.parsedOptions;if(r){var o=n.find((function(t){return Object.prototype.hasOwnProperty.call(t,e)}));if(o){var s=o[e];i.setProperty(s,r,t)}else(o={})[e]=i.setProperty({},r,t),n.push(o)}else{var a={};a[e]=t,n.push(a)}return this},o.prototype.setOptions=function(e,t){if(e)for(var r=Object.keys(e),n=0;n<r.length;++n)this.setOption(r[n],e[r[n]],t);return this},o.prototype.toString=function(){var e=this.constructor.className,t=this.fullName;return t.length?e+" "+t:e},o._configure=function(e){n=e}},9825:(e,t,r)=>{"use strict";e.exports=s;var n=r(2028);((s.prototype=Object.create(n.prototype)).constructor=s).className="OneOf";var i=r(6151),o=r(8052);function s(e,t,r,i){if(Array.isArray(t)||(r=t,t=void 0),n.call(this,e,r),void 0!==t&&!Array.isArray(t))throw TypeError("fieldNames must be an Array");this.oneof=t||[],this.fieldsArray=[],this.comment=i}function a(e){if(e.parent)for(var t=0;t<e.fieldsArray.length;++t)e.fieldsArray[t].parent||e.parent.add(e.fieldsArray[t])}s.fromJSON=function(e,t){return new s(e,t.oneof,t.options,t.comment)},s.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return o.toObject(["options",this.options,"oneof",this.oneof,"comment",t?this.comment:void 0])},s.prototype.add=function(e){if(!(e instanceof i))throw TypeError("field must be a Field");return e.parent&&e.parent!==this.parent&&e.parent.remove(e),this.oneof.push(e.name),this.fieldsArray.push(e),e.partOf=this,a(this),this},s.prototype.remove=function(e){if(!(e instanceof i))throw TypeError("field must be a Field");var t=this.fieldsArray.indexOf(e);if(t<0)throw Error(e+" is not a member of "+this);return this.fieldsArray.splice(t,1),(t=this.oneof.indexOf(e.name))>-1&&this.oneof.splice(t,1),e.partOf=null,this},s.prototype.onAdd=function(e){n.prototype.onAdd.call(this,e);for(var t=0;t<this.oneof.length;++t){var r=e.get(this.oneof[t]);r&&!r.partOf&&(r.partOf=this,this.fieldsArray.push(r))}a(this)},s.prototype.onRemove=function(e){for(var t,r=0;r<this.fieldsArray.length;++r)(t=this.fieldsArray[r]).parent&&t.parent.remove(t);n.prototype.onRemove.call(this,e)},s.d=function(){for(var e=new Array(arguments.length),t=0;t<arguments.length;)e[t]=arguments[t++];return function(t,r){o.decorateType(t.constructor).add(new s(r,e)),Object.defineProperty(t,r,{get:o.oneOfGetter(e),set:o.oneOfSetter(e)})}}},2422:(e,t,r)=>{"use strict";e.exports=c;var n,i=r(9716),o=i.LongBits,s=i.utf8;function a(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function c(e){this.buf=e,this.pos=0,this.len=e.length}var l="undefined"!==typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new c(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new c(e);throw Error("illegal buffer")},u=function(){return i.Buffer?function(e){return(c.create=function(e){return i.Buffer.isBuffer(e)?new n(e):l(e)})(e)}:l};function h(){var e=new o(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw a(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw a(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function d(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function f(){if(this.pos+8>this.len)throw a(this,8);return new o(d(this.buf,this.pos+=4),d(this.buf,this.pos+=4))}c.create=u(),c.prototype._slice=i.Array.prototype.subarray||i.Array.prototype.slice,c.prototype.uint32=function(){var e=4294967295;return function(){if(e=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return e;if((this.pos+=5)>this.len)throw this.pos=this.len,a(this,10);return e}}(),c.prototype.int32=function(){return 0|this.uint32()},c.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},c.prototype.bool=function(){return 0!==this.uint32()},c.prototype.fixed32=function(){if(this.pos+4>this.len)throw a(this,4);return d(this.buf,this.pos+=4)},c.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return 0|d(this.buf,this.pos+=4)},c.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var e=i.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},c.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var e=i.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},c.prototype.bytes=function(){var e=this.uint32(),t=this.pos,r=this.pos+e;if(r>this.len)throw a(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(t,r):t===r?new this.buf.constructor(0):this._slice.call(this.buf,t,r)},c.prototype.string=function(){var e=this.bytes();return s.read(e,0,e.length)},c.prototype.skip=function(e){if("number"===typeof e){if(this.pos+e>this.len)throw a(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw a(this)}while(128&this.buf[this.pos++]);return this},c.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!==(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},c._configure=function(e){n=e,c.create=u(),n._configure();var t=i.Long?"toLong":"toNumber";i.merge(c.prototype,{int64:function(){return h.call(this)[t](!1)},uint64:function(){return h.call(this)[t](!0)},sint64:function(){return h.call(this).zzDecode()[t](!1)},fixed64:function(){return f.call(this)[t](!0)},sfixed64:function(){return f.call(this)[t](!1)}})}},4148:(e,t,r)=>{"use strict";e.exports=o;var n=r(2422);(o.prototype=Object.create(n.prototype)).constructor=o;var i=r(9716);function o(e){n.call(this,e)}o._configure=function(){i.Buffer&&(o.prototype._slice=i.Buffer.prototype.slice)},o.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},o._configure()},2808:(e,t,r)=>{"use strict";e.exports=h;var n=r(706);((h.prototype=Object.create(n.prototype)).constructor=h).className="Root";var i,o,s,a=r(6151),c=r(6531),l=r(9825),u=r(8052);function h(e){n.call(this,"",e),this.deferred=[],this.files=[]}function d(){}h.fromJSON=function(e,t){return t||(t=new h),e.options&&t.setOptions(e.options),t.addJSON(e.nested)},h.prototype.resolvePath=u.path.resolve,h.prototype.fetch=u.fetch,h.prototype.load=function e(t,r,n){"function"===typeof r&&(n=r,r=void 0);var i=this;if(!n)return u.asPromise(e,i,t,r);var a=n===d;function c(e,t){if(n){if(a)throw e;var r=n;n=null,r(e,t)}}function l(e){var t=e.lastIndexOf("google/protobuf/");if(t>-1){var r=e.substring(t);if(r in s)return r}return null}function h(e,t){try{if(u.isString(t)&&"{"===t.charAt(0)&&(t=JSON.parse(t)),u.isString(t)){o.filename=e;var n,s=o(t,i,r),h=0;if(s.imports)for(;h<s.imports.length;++h)(n=l(s.imports[h])||i.resolvePath(e,s.imports[h]))&&f(n);if(s.weakImports)for(h=0;h<s.weakImports.length;++h)(n=l(s.weakImports[h])||i.resolvePath(e,s.weakImports[h]))&&f(n,!0)}else i.setOptions(t.options).addJSON(t.nested)}catch(d){c(d)}a||p||c(null,i)}function f(e,t){if(!(i.files.indexOf(e)>-1))if(i.files.push(e),e in s)a?h(e,s[e]):(++p,setTimeout((function(){--p,h(e,s[e])})));else if(a){var r;try{r=u.fs.readFileSync(e).toString("utf8")}catch(o){return void(t||c(o))}h(e,r)}else++p,i.fetch(e,(function(r,o){--p,n&&(r?t?p||c(null,i):c(r):h(e,o))}))}var p=0;u.isString(t)&&(t=[t]);for(var g,m=0;m<t.length;++m)(g=i.resolvePath("",t[m]))&&f(g);if(a)return i;p||c(null,i)},h.prototype.loadSync=function(e,t){if(!u.isNode)throw Error("not supported");return this.load(e,t,d)},h.prototype.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map((function(e){return"'extend "+e.extend+"' in "+e.parent.fullName})).join(", "));return n.prototype.resolveAll.call(this)};var f=/^[A-Z]/;function p(e,t){var r=t.parent.lookup(t.extend);if(r){var n=new a(t.fullName,t.id,t.type,t.rule,void 0,t.options);return n.declaringField=t,t.extensionField=n,r.add(n),!0}return!1}h.prototype._handleAdd=function(e){if(e instanceof a)void 0===e.extend||e.extensionField||p(0,e)||this.deferred.push(e);else if(e instanceof c)f.test(e.name)&&(e.parent[e.name]=e.values);else if(!(e instanceof l)){if(e instanceof i)for(var t=0;t<this.deferred.length;)p(0,this.deferred[t])?this.deferred.splice(t,1):++t;for(var r=0;r<e.nestedArray.length;++r)this._handleAdd(e._nestedArray[r]);f.test(e.name)&&(e.parent[e.name]=e)}},h.prototype._handleRemove=function(e){if(e instanceof a){if(void 0!==e.extend)if(e.extensionField)e.extensionField.parent.remove(e.extensionField),e.extensionField=null;else{var t=this.deferred.indexOf(e);t>-1&&this.deferred.splice(t,1)}}else if(e instanceof c)f.test(e.name)&&delete e.parent[e.name];else if(e instanceof n){for(var r=0;r<e.nestedArray.length;++r)this._handleRemove(e._nestedArray[r]);f.test(e.name)&&delete e.parent[e.name]}},h._configure=function(e,t,r){i=e,o=t,s=r}},3107:e=>{"use strict";e.exports={}},7523:(e,t,r)=>{"use strict";t.Service=r(1331)},1331:(e,t,r)=>{"use strict";e.exports=i;var n=r(9716);function i(e,t,r){if("function"!==typeof e)throw TypeError("rpcImpl must be a function");n.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(r)}(i.prototype=Object.create(n.EventEmitter.prototype)).constructor=i,i.prototype.rpcCall=function e(t,r,i,o,s){if(!o)throw TypeError("request must be specified");var a=this;if(!s)return n.asPromise(e,a,t,r,i,o);if(a.rpcImpl)try{return a.rpcImpl(t,r[a.requestDelimited?"encodeDelimited":"encode"](o).finish(),(function(e,r){if(e)return a.emit("error",e,t),s(e);if(null!==r){if(!(r instanceof i))try{r=i[a.responseDelimited?"decodeDelimited":"decode"](r)}catch(e){return a.emit("error",e,t),s(e)}return a.emit("data",r,t),s(null,r)}a.end(!0)}))}catch(c){return a.emit("error",c,t),void setTimeout((function(){s(c)}),0)}else setTimeout((function(){s(Error("already ended"))}),0)},i.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},2342:(e,t,r)=>{"use strict";e.exports=a;var n=r(706);((a.prototype=Object.create(n.prototype)).constructor=a).className="Service";var i=r(5597),o=r(8052),s=r(7523);function a(e,t){n.call(this,e,t),this.methods={},this._methodsArray=null}function c(e){return e._methodsArray=null,e}a.fromJSON=function(e,t){var r=new a(e,t.options);if(t.methods)for(var n=Object.keys(t.methods),o=0;o<n.length;++o)r.add(i.fromJSON(n[o],t.methods[n[o]]));return t.nested&&r.addJSON(t.nested),r.comment=t.comment,r},a.prototype.toJSON=function(e){var t=n.prototype.toJSON.call(this,e),r=!!e&&Boolean(e.keepComments);return o.toObject(["options",t&&t.options||void 0,"methods",n.arrayToJSON(this.methodsArray,e)||{},"nested",t&&t.nested||void 0,"comment",r?this.comment:void 0])},Object.defineProperty(a.prototype,"methodsArray",{get:function(){return this._methodsArray||(this._methodsArray=o.toArray(this.methods))}}),a.prototype.get=function(e){return this.methods[e]||n.prototype.get.call(this,e)},a.prototype.resolveAll=function(){for(var e=this.methodsArray,t=0;t<e.length;++t)e[t].resolve();return n.prototype.resolve.call(this)},a.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);return e instanceof i?(this.methods[e.name]=e,e.parent=this,c(this)):n.prototype.add.call(this,e)},a.prototype.remove=function(e){if(e instanceof i){if(this.methods[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.methods[e.name],e.parent=null,c(this)}return n.prototype.remove.call(this,e)},a.prototype.create=function(e,t,r){for(var n,i=new s.Service(e,t,r),a=0;a<this.methodsArray.length;++a){var c=o.lcFirst((n=this._methodsArray[a]).resolve().name).replace(/[^$\w_]/g,"");i[c]=o.codegen(["r","c"],o.isReserved(c)?c+"_":c)("return this.rpcCall(m,q,s,r,c)")({m:n,q:n.resolvedRequestType.ctor,s:n.resolvedResponseType.ctor})}return i}},9549:(e,t,r)=>{"use strict";e.exports=v;var n=r(706);((v.prototype=Object.create(n.prototype)).constructor=v).className="Type";var i=r(6531),o=r(9825),s=r(6151),a=r(1686),c=r(2342),l=r(9140),u=r(2422),h=r(8050),d=r(8052),f=r(6652),p=r(1625),g=r(2962),m=r(4597),y=r(2481);function v(e,t){n.call(this,e,t),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this._fieldsById=null,this._fieldsArray=null,this._oneofsArray=null,this._ctor=null}function b(e){return e._fieldsById=e._fieldsArray=e._oneofsArray=null,delete e.encode,delete e.decode,delete e.verify,e}Object.defineProperties(v.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var e=Object.keys(this.fields),t=0;t<e.length;++t){var r=this.fields[e[t]],n=r.id;if(this._fieldsById[n])throw Error("duplicate id "+n+" in "+this);this._fieldsById[n]=r}return this._fieldsById}},fieldsArray:{get:function(){return this._fieldsArray||(this._fieldsArray=d.toArray(this.fields))}},oneofsArray:{get:function(){return this._oneofsArray||(this._oneofsArray=d.toArray(this.oneofs))}},ctor:{get:function(){return this._ctor||(this.ctor=v.generateConstructor(this)())},set:function(e){var t=e.prototype;t instanceof l||((e.prototype=new l).constructor=e,d.merge(e.prototype,t)),e.$type=e.prototype.$type=this,d.merge(e,l,!0),this._ctor=e;for(var r=0;r<this.fieldsArray.length;++r)this._fieldsArray[r].resolve();var n={};for(r=0;r<this.oneofsArray.length;++r)n[this._oneofsArray[r].resolve().name]={get:d.oneOfGetter(this._oneofsArray[r].oneof),set:d.oneOfSetter(this._oneofsArray[r].oneof)};r&&Object.defineProperties(e.prototype,n)}}}),v.generateConstructor=function(e){for(var t,r=d.codegen(["p"],e.name),n=0;n<e.fieldsArray.length;++n)(t=e._fieldsArray[n]).map?r("this%s={}",d.safeProp(t.name)):t.repeated&&r("this%s=[]",d.safeProp(t.name));return r("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]")},v.fromJSON=function(e,t){var r=new v(e,t.options);r.extensions=t.extensions,r.reserved=t.reserved;for(var l=Object.keys(t.fields),u=0;u<l.length;++u)r.add(("undefined"!==typeof t.fields[l[u]].keyType?a.fromJSON:s.fromJSON)(l[u],t.fields[l[u]]));if(t.oneofs)for(l=Object.keys(t.oneofs),u=0;u<l.length;++u)r.add(o.fromJSON(l[u],t.oneofs[l[u]]));if(t.nested)for(l=Object.keys(t.nested),u=0;u<l.length;++u){var h=t.nested[l[u]];r.add((void 0!==h.id?s.fromJSON:void 0!==h.fields?v.fromJSON:void 0!==h.values?i.fromJSON:void 0!==h.methods?c.fromJSON:n.fromJSON)(l[u],h))}return t.extensions&&t.extensions.length&&(r.extensions=t.extensions),t.reserved&&t.reserved.length&&(r.reserved=t.reserved),t.group&&(r.group=!0),t.comment&&(r.comment=t.comment),r},v.prototype.toJSON=function(e){var t=n.prototype.toJSON.call(this,e),r=!!e&&Boolean(e.keepComments);return d.toObject(["options",t&&t.options||void 0,"oneofs",n.arrayToJSON(this.oneofsArray,e),"fields",n.arrayToJSON(this.fieldsArray.filter((function(e){return!e.declaringField})),e)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:void 0,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"group",this.group||void 0,"nested",t&&t.nested||void 0,"comment",r?this.comment:void 0])},v.prototype.resolveAll=function(){for(var e=this.fieldsArray,t=0;t<e.length;)e[t++].resolve();var r=this.oneofsArray;for(t=0;t<r.length;)r[t++].resolve();return n.prototype.resolveAll.call(this)},v.prototype.get=function(e){return this.fields[e]||this.oneofs&&this.oneofs[e]||this.nested&&this.nested[e]||null},v.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);if(e instanceof s&&void 0===e.extend){if(this._fieldsById?this._fieldsById[e.id]:this.fieldsById[e.id])throw Error("duplicate id "+e.id+" in "+this);if(this.isReservedId(e.id))throw Error("id "+e.id+" is reserved in "+this);if(this.isReservedName(e.name))throw Error("name '"+e.name+"' is reserved in "+this);return e.parent&&e.parent.remove(e),this.fields[e.name]=e,e.message=this,e.onAdd(this),b(this)}return e instanceof o?(this.oneofs||(this.oneofs={}),this.oneofs[e.name]=e,e.onAdd(this),b(this)):n.prototype.add.call(this,e)},v.prototype.remove=function(e){if(e instanceof s&&void 0===e.extend){if(!this.fields||this.fields[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.fields[e.name],e.parent=null,e.onRemove(this),b(this)}if(e instanceof o){if(!this.oneofs||this.oneofs[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.oneofs[e.name],e.parent=null,e.onRemove(this),b(this)}return n.prototype.remove.call(this,e)},v.prototype.isReservedId=function(e){return n.isReservedId(this.reserved,e)},v.prototype.isReservedName=function(e){return n.isReservedName(this.reserved,e)},v.prototype.create=function(e){return new this.ctor(e)},v.prototype.setup=function(){for(var e=this.fullName,t=[],r=0;r<this.fieldsArray.length;++r)t.push(this._fieldsArray[r].resolve().resolvedType);this.encode=f(this)({Writer:h,types:t,util:d}),this.decode=p(this)({Reader:u,types:t,util:d}),this.verify=g(this)({types:t,util:d}),this.fromObject=m.fromObject(this)({types:t,util:d}),this.toObject=m.toObject(this)({types:t,util:d});var n=y[e];if(n){var i=Object.create(this);i.fromObject=this.fromObject,this.fromObject=n.fromObject.bind(i),i.toObject=this.toObject,this.toObject=n.toObject.bind(i)}return this},v.prototype.encode=function(e,t){return this.setup().encode(e,t)},v.prototype.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},v.prototype.decode=function(e,t){return this.setup().decode(e,t)},v.prototype.decodeDelimited=function(e){return e instanceof u||(e=u.create(e)),this.decode(e,e.uint32())},v.prototype.verify=function(e){return this.setup().verify(e)},v.prototype.fromObject=function(e){return this.setup().fromObject(e)},v.prototype.toObject=function(e,t){return this.setup().toObject(e,t)},v.d=function(e){return function(t){d.decorateType(t,e)}}},5028:(e,t,r)=>{"use strict";var n=t,i=r(8052),o=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function s(e,t){var r=0,n={};for(t|=0;r<e.length;)n[o[r+t]]=e[r++];return n}n.basic=s([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),n.defaults=s([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",i.emptyArray,null]),n.long=s([0,0,0,1,1],7),n.mapKey=s([0,0,0,5,5,0,0,0,1,1,0,2],2),n.packed=s([1,5,0,0,0,5,5,0,0,0,1,1,0])},8052:(e,t,r)=>{"use strict";var n,i,o=e.exports=r(9716),s=r(3107);o.codegen=r(7857),o.fetch=r(8774),o.path=r(8464),o.fs=o.inquire("fs"),o.toArray=function(e){if(e){for(var t=Object.keys(e),r=new Array(t.length),n=0;n<t.length;)r[n]=e[t[n++]];return r}return[]},o.toObject=function(e){for(var t={},r=0;r<e.length;){var n=e[r++],i=e[r++];void 0!==i&&(t[n]=i)}return t};var a=/\\/g,c=/"/g;o.isReserved=function(e){return/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(e)},o.safeProp=function(e){return!/^[$\w_]+$/.test(e)||o.isReserved(e)?'["'+e.replace(a,"\\\\").replace(c,'\\"')+'"]':"."+e},o.ucFirst=function(e){return e.charAt(0).toUpperCase()+e.substring(1)};var l=/_([a-z])/g;o.camelCase=function(e){return e.substring(0,1)+e.substring(1).replace(l,(function(e,t){return t.toUpperCase()}))},o.compareFieldsById=function(e,t){return e.id-t.id},o.decorateType=function(e,t){if(e.$type)return t&&e.$type.name!==t&&(o.decorateRoot.remove(e.$type),e.$type.name=t,o.decorateRoot.add(e.$type)),e.$type;n||(n=r(9549));var i=new n(t||e.name);return o.decorateRoot.add(i),i.ctor=e,Object.defineProperty(e,"$type",{value:i,enumerable:!1}),Object.defineProperty(e.prototype,"$type",{value:i,enumerable:!1}),i};var u=0;o.decorateEnum=function(e){if(e.$type)return e.$type;i||(i=r(6531));var t=new i("Enum"+u++,e);return o.decorateRoot.add(t),Object.defineProperty(e,"$type",{value:t,enumerable:!1}),t},o.setProperty=function(e,t,r){if("object"!==typeof e)throw TypeError("dst must be an object");if(!t)throw TypeError("path must be specified");return function e(t,r,n){var i=r.shift();if("__proto__"===i)return t;if(r.length>0)t[i]=e(t[i]||{},r,n);else{var o=t[i];o&&(n=[].concat(o).concat(n)),t[i]=n}return t}(e,t=t.split("."),r)},Object.defineProperty(o,"decorateRoot",{get:function(){return s.decorated||(s.decorated=new(r(2808)))}})},6112:(e,t,r)=>{"use strict";e.exports=i;var n=r(9716);function i(e,t){this.lo=e>>>0,this.hi=t>>>0}var o=i.zero=new i(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1};var s=i.zeroHash="\0\0\0\0\0\0\0\0";i.fromNumber=function(e){if(0===e)return o;var t=e<0;t&&(e=-e);var r=e>>>0,n=(e-r)/4294967296>>>0;return t&&(n=~n>>>0,r=~r>>>0,++r>4294967295&&(r=0,++n>4294967295&&(n=0))),new i(r,n)},i.from=function(e){if("number"===typeof e)return i.fromNumber(e);if(n.isString(e)){if(!n.Long)return i.fromNumber(parseInt(e,10));e=n.Long.fromString(e)}return e.low||e.high?new i(e.low>>>0,e.high>>>0):o},i.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,r=~this.hi>>>0;return t||(r=r+1>>>0),-(t+4294967296*r)}return this.lo+4294967296*this.hi},i.prototype.toLong=function(e){return n.Long?new n.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var a=String.prototype.charCodeAt;i.fromHash=function(e){return e===s?o:new i((a.call(e,0)|a.call(e,1)<<8|a.call(e,2)<<16|a.call(e,3)<<24)>>>0,(a.call(e,4)|a.call(e,5)<<8|a.call(e,6)<<16|a.call(e,7)<<24)>>>0)},i.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},i.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},i.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},i.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:r<128?9:10}},9716:function(e,t,r){"use strict";var n=t;function i(e,t,r){for(var n=Object.keys(t),i=0;i<n.length;++i)void 0!==e[n[i]]&&r||(e[n[i]]=t[n[i]]);return e}function o(e){function t(e,r){if(!(this instanceof t))return new t(e,r);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),r&&i(this,r)}return t.prototype=Object.create(Error.prototype,{constructor:{value:t,writable:!0,enumerable:!1,configurable:!0},name:{get:()=>e,set:void 0,enumerable:!1,configurable:!0},toString:{value(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),t}n.asPromise=r(7223),n.base64=r(1938),n.EventEmitter=r(6597),n.float=r(2678),n.inquire=r(7640),n.utf8=r(2842),n.pool=r(110),n.LongBits=r(6112),n.isNode=Boolean("undefined"!==typeof r.g&&r.g&&r.g.process&&r.g.process.versions&&r.g.process.versions.node),n.global=n.isNode&&r.g||"undefined"!==typeof window&&window||"undefined"!==typeof self&&self||this,n.emptyArray=Object.freeze?Object.freeze([]):[],n.emptyObject=Object.freeze?Object.freeze({}):{},n.isInteger=Number.isInteger||function(e){return"number"===typeof e&&isFinite(e)&&Math.floor(e)===e},n.isString=function(e){return"string"===typeof e||e instanceof String},n.isObject=function(e){return e&&"object"===typeof e},n.isset=n.isSet=function(e,t){var r=e[t];return!(null==r||!e.hasOwnProperty(t))&&("object"!==typeof r||(Array.isArray(r)?r.length:Object.keys(r).length)>0)},n.Buffer=function(){try{var e=n.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(t){return null}}(),n._Buffer_from=null,n._Buffer_allocUnsafe=null,n.newBuffer=function(e){return"number"===typeof e?n.Buffer?n._Buffer_allocUnsafe(e):new n.Array(e):n.Buffer?n._Buffer_from(e):"undefined"===typeof Uint8Array?e:new Uint8Array(e)},n.Array="undefined"!==typeof Uint8Array?Uint8Array:Array,n.Long=n.global.dcodeIO&&n.global.dcodeIO.Long||n.global.Long||n.inquire("long"),n.key2Re=/^true|false|0|1$/,n.key32Re=/^-?(?:0|[1-9][0-9]*)$/,n.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,n.longToHash=function(e){return e?n.LongBits.from(e).toHash():n.LongBits.zeroHash},n.longFromHash=function(e,t){var r=n.LongBits.fromHash(e);return n.Long?n.Long.fromBits(r.lo,r.hi,t):r.toNumber(Boolean(t))},n.merge=i,n.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},n.newError=o,n.ProtocolError=o("ProtocolError"),n.oneOfGetter=function(e){for(var t={},r=0;r<e.length;++r)t[e[r]]=1;return function(){for(var e=Object.keys(this),r=e.length-1;r>-1;--r)if(1===t[e[r]]&&void 0!==this[e[r]]&&null!==this[e[r]])return e[r]}},n.oneOfSetter=function(e){return function(t){for(var r=0;r<e.length;++r)e[r]!==t&&delete this[e[r]]}},n.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},n._configure=function(){var e=n.Buffer;e?(n._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,r){return new e(t,r)},n._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}):n._Buffer_from=n._Buffer_allocUnsafe=null}},2962:(e,t,r)=>{"use strict";e.exports=function(e){var t=i.codegen(["m"],e.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),r=e.oneofsArray,n={};r.length&&t("var p={}");for(var c=0;c<e.fieldsArray.length;++c){var l=e._fieldsArray[c].resolve(),u="m"+i.safeProp(l.name);if(l.optional&&t("if(%s!=null&&m.hasOwnProperty(%j)){",u,l.name),l.map)t("if(!util.isObject(%s))",u)("return%j",o(l,"object"))("var k=Object.keys(%s)",u)("for(var i=0;i<k.length;++i){"),a(t,l,"k[i]"),s(t,l,c,u+"[k[i]]")("}");else if(l.repeated)t("if(!Array.isArray(%s))",u)("return%j",o(l,"array"))("for(var i=0;i<%s.length;++i){",u),s(t,l,c,u+"[i]")("}");else{if(l.partOf){var h=i.safeProp(l.partOf.name);1===n[l.partOf.name]&&t("if(p%s===1)",h)("return%j",l.partOf.name+": multiple values"),n[l.partOf.name]=1,t("p%s=1",h)}s(t,l,c,u)}l.optional&&t("}")}return t("return null")};var n=r(6531),i=r(8052);function o(e,t){return e.name+": "+t+(e.repeated&&"array"!==t?"[]":e.map&&"object"!==t?"{k:"+e.keyType+"}":"")+" expected"}function s(e,t,r,i){if(t.resolvedType)if(t.resolvedType instanceof n){e("switch(%s){",i)("default:")("return%j",o(t,"enum value"));for(var s=Object.keys(t.resolvedType.values),a=0;a<s.length;++a)e("case %i:",t.resolvedType.values[s[a]]);e("break")("}")}else e("{")("var e=types[%i].verify(%s);",r,i)("if(e)")("return%j+e",t.name+".")("}");else switch(t.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.isInteger(%s))",i)("return%j",o(t,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",i,i,i,i)("return%j",o(t,"integer|Long"));break;case"float":case"double":e('if(typeof %s!=="number")',i)("return%j",o(t,"number"));break;case"bool":e('if(typeof %s!=="boolean")',i)("return%j",o(t,"boolean"));break;case"string":e("if(!util.isString(%s))",i)("return%j",o(t,"string"));break;case"bytes":e('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',i,i,i)("return%j",o(t,"buffer"))}return e}function a(e,t,r){switch(t.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.key32Re.test(%s))",r)("return%j",o(t,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.key64Re.test(%s))",r)("return%j",o(t,"integer|Long key"));break;case"bool":e("if(!util.key2Re.test(%s))",r)("return%j",o(t,"boolean key"))}return e}},2481:(e,t,r)=>{"use strict";var n=t,i=r(9140);n[".google.protobuf.Any"]={fromObject:function(e){if(e&&e["@type"]){var t=e["@type"].substring(e["@type"].lastIndexOf("/")+1),r=this.lookup(t);if(r){var n="."===e["@type"].charAt(0)?e["@type"].slice(1):e["@type"];return-1===n.indexOf("/")&&(n="/"+n),this.create({type_url:n,value:r.encode(r.fromObject(e)).finish()})}}return this.fromObject(e)},toObject:function(e,t){var r="",n="";if(t&&t.json&&e.type_url&&e.value){n=e.type_url.substring(e.type_url.lastIndexOf("/")+1),r=e.type_url.substring(0,e.type_url.lastIndexOf("/")+1);var o=this.lookup(n);o&&(e=o.decode(e.value))}if(!(e instanceof this.ctor)&&e instanceof i){var s=e.$type.toObject(e,t);return""===r&&(r="type.googleapis.com/"),n=r+("."===e.$type.fullName[0]?e.$type.fullName.slice(1):e.$type.fullName),s["@type"]=n,s}return this.toObject(e,t)}}},8050:(e,t,r)=>{"use strict";e.exports=h;var n,i=r(9716),o=i.LongBits,s=i.base64,a=i.utf8;function c(e,t,r){this.fn=e,this.len=t,this.next=void 0,this.val=r}function l(){}function u(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function h(){this.len=0,this.head=new c(l,0,0),this.tail=this.head,this.states=null}var d=function(){return i.Buffer?function(){return(h.create=function(){return new n})()}:function(){return new h}};function f(e,t,r){t[r]=255&e}function p(e,t){this.len=e,this.next=void 0,this.val=t}function g(e,t,r){for(;e.hi;)t[r++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[r++]=127&e.lo|128,e.lo=e.lo>>>7;t[r++]=e.lo}function m(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}h.create=d(),h.alloc=function(e){return new i.Array(e)},i.Array!==Array&&(h.alloc=i.pool(h.alloc,i.Array.prototype.subarray)),h.prototype._push=function(e,t,r){return this.tail=this.tail.next=new c(e,t,r),this.len+=t,this},p.prototype=Object.create(c.prototype),p.prototype.fn=function(e,t,r){for(;e>127;)t[r++]=127&e|128,e>>>=7;t[r]=e},h.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new p((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},h.prototype.int32=function(e){return e<0?this._push(g,10,o.fromNumber(e)):this.uint32(e)},h.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},h.prototype.uint64=function(e){var t=o.from(e);return this._push(g,t.length(),t)},h.prototype.int64=h.prototype.uint64,h.prototype.sint64=function(e){var t=o.from(e).zzEncode();return this._push(g,t.length(),t)},h.prototype.bool=function(e){return this._push(f,1,e?1:0)},h.prototype.fixed32=function(e){return this._push(m,4,e>>>0)},h.prototype.sfixed32=h.prototype.fixed32,h.prototype.fixed64=function(e){var t=o.from(e);return this._push(m,4,t.lo)._push(m,4,t.hi)},h.prototype.sfixed64=h.prototype.fixed64,h.prototype.float=function(e){return this._push(i.float.writeFloatLE,4,e)},h.prototype.double=function(e){return this._push(i.float.writeDoubleLE,8,e)};var y=i.Array.prototype.set?function(e,t,r){t.set(e,r)}:function(e,t,r){for(var n=0;n<e.length;++n)t[r+n]=e[n]};h.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this._push(f,1,0);if(i.isString(e)){var r=h.alloc(t=s.length(e));s.decode(e,r,0),e=r}return this.uint32(t)._push(y,t,e)},h.prototype.string=function(e){var t=a.length(e);return t?this.uint32(t)._push(a.write,t,e):this._push(f,1,0)},h.prototype.fork=function(){return this.states=new u(this),this.head=this.tail=new c(l,0,0),this.len=0,this},h.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new c(l,0,0),this.len=0),this},h.prototype.ldelim=function(){var e=this.head,t=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=e.next,this.tail=t,this.len+=r),this},h.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),r=0;e;)e.fn(e.val,t,r),r+=e.len,e=e.next;return t},h._configure=function(e){n=e,h.create=d(),n._configure()}},2149:(e,t,r)=>{"use strict";e.exports=o;var n=r(8050);(o.prototype=Object.create(n.prototype)).constructor=o;var i=r(9716);function o(){n.call(this)}function s(e,t,r){e.length<40?i.utf8.write(e,t,r):t.utf8Write?t.utf8Write(e,r):t.write(e,r)}o._configure=function(){o.alloc=i._Buffer_allocUnsafe,o.writeBytesBuffer=i.Buffer&&i.Buffer.prototype instanceof Uint8Array&&"set"===i.Buffer.prototype.set.name?function(e,t,r){t.set(e,r)}:function(e,t,r){if(e.copy)e.copy(t,r,0,e.length);else for(var n=0;n<e.length;)t[r++]=e[n++]}},o.prototype.bytes=function(e){i.isString(e)&&(e=i._Buffer_from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this._push(o.writeBytesBuffer,t,e),this},o.prototype.string=function(e){var t=i.Buffer.byteLength(e);return this.uint32(t),t&&this._push(s,t,e),this},o._configure()},4607:(e,t,r)=>{const n=r(8059),i=r(7660),o=r(4418),s=r(1898),{RateLimiterClusterMaster:a,RateLimiterClusterMasterPM2:c,RateLimiterCluster:l}=r(1963),u=r(6027),h=r(8025),d=r(1664),f=r(9794),p=r(7497),g=r(6437),m=r(2319);e.exports={RateLimiterRedis:n,RateLimiterMongo:i,RateLimiterMySQL:o,RateLimiterPostgres:s,RateLimiterMemory:u,RateLimiterMemcache:h,RateLimiterClusterMaster:a,RateLimiterClusterMasterPM2:c,RateLimiterCluster:l,RLWrapperBlackAndWhite:d,RateLimiterUnion:f,RateLimiterQueue:p,BurstyRateLimiter:g,RateLimiterRes:m}},6437:(e,t,r)=>{const n=r(2319);e.exports=class{constructor(e,t){this._rateLimiter=e,this._burstLimiter=t}_combineRes(e,t){return e?new n(e.remainingPoints,Math.min(e.msBeforeNext,t?t.msBeforeNext:0),e.consumedPoints,e.isFirstInDuration):null}consume(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._rateLimiter.consume(e,t,r).catch((i=>i instanceof n?this._burstLimiter.consume(e,t,r).then((e=>Promise.resolve(this._combineRes(i,e)))).catch((e=>e instanceof n?Promise.reject(this._combineRes(i,e)):Promise.reject(e))):Promise.reject(i)))}get(e){return Promise.all([this._rateLimiter.get(e),this._burstLimiter.get(e)]).then((e=>{let[t,r]=e;return this._combineRes(t,r)}))}get points(){return this._rateLimiter.points}}},1664:(e,t,r)=>{const n=r(2319);e.exports=class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.limiter=e.limiter,this.blackList=e.blackList,this.whiteList=e.whiteList,this.isBlackListed=e.isBlackListed,this.isWhiteListed=e.isWhiteListed,this.runActionAnyway=e.runActionAnyway}get limiter(){return this._limiter}set limiter(e){if("undefined"===typeof e)throw new Error("limiter is not set");this._limiter=e}get runActionAnyway(){return this._runActionAnyway}set runActionAnyway(e){this._runActionAnyway="undefined"!==typeof e&&e}get blackList(){return this._blackList}set blackList(e){this._blackList=Array.isArray(e)?e:[]}get isBlackListed(){return this._isBlackListed}set isBlackListed(e){if("undefined"===typeof e&&(e=()=>!1),"function"!==typeof e)throw new Error("isBlackListed must be function");this._isBlackListed=e}get whiteList(){return this._whiteList}set whiteList(e){this._whiteList=Array.isArray(e)?e:[]}get isWhiteListed(){return this._isWhiteListed}set isWhiteListed(e){if("undefined"===typeof e&&(e=()=>!1),"function"!==typeof e)throw new Error("isWhiteListed must be function");this._isWhiteListed=e}isBlackListedSomewhere(e){return this.blackList.indexOf(e)>=0||this.isBlackListed(e)}isWhiteListedSomewhere(e){return this.whiteList.indexOf(e)>=0||this.isWhiteListed(e)}getBlackRes(){return new n(0,Number.MAX_SAFE_INTEGER,0,!1)}getWhiteRes(){return new n(Number.MAX_SAFE_INTEGER,0,0,!1)}rejectBlack(){return Promise.reject(this.getBlackRes())}resolveBlack(){return Promise.resolve(this.getBlackRes())}resolveWhite(){return Promise.resolve(this.getWhiteRes())}consume(e){let t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.isWhiteListedSomewhere(e)?t=this.resolveWhite():this.isBlackListedSomewhere(e)&&(t=this.rejectBlack()),"undefined"===typeof t?this.limiter.consume(e,r):(this.runActionAnyway&&this.limiter.consume(e,r).catch((()=>{})),t)}block(e,t){let r;return this.isWhiteListedSomewhere(e)?r=this.resolveWhite():this.isBlackListedSomewhere(e)&&(r=this.resolveBlack()),"undefined"===typeof r?this.limiter.block(e,t):(this.runActionAnyway&&this.limiter.block(e,t).catch((()=>{})),r)}penalty(e,t){let r;return this.isWhiteListedSomewhere(e)?r=this.resolveWhite():this.isBlackListedSomewhere(e)&&(r=this.resolveBlack()),"undefined"===typeof r?this.limiter.penalty(e,t):(this.runActionAnyway&&this.limiter.penalty(e,t).catch((()=>{})),r)}reward(e,t){let r;return this.isWhiteListedSomewhere(e)?r=this.resolveWhite():this.isBlackListedSomewhere(e)&&(r=this.resolveBlack()),"undefined"===typeof r?this.limiter.reward(e,t):(this.runActionAnyway&&this.limiter.reward(e,t).catch((()=>{})),r)}get(e){let t;return this.isWhiteListedSomewhere(e)?t=this.resolveWhite():this.isBlackListedSomewhere(e)&&(t=this.resolveBlack()),"undefined"===typeof t||this.runActionAnyway?this.limiter.get(e):t}delete(e){return this.limiter.delete(e)}}},4698:e=>{e.exports=class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.points=e.points,this.duration=e.duration,this.blockDuration=e.blockDuration,this.execEvenly=e.execEvenly,this.execEvenlyMinDelayMs=e.execEvenlyMinDelayMs,this.keyPrefix=e.keyPrefix}get points(){return this._points}set points(e){this._points=e>=0?e:4}get duration(){return this._duration}set duration(e){this._duration="undefined"===typeof e?1:e}get msDuration(){return 1e3*this.duration}get blockDuration(){return this._blockDuration}set blockDuration(e){this._blockDuration="undefined"===typeof e?0:e}get msBlockDuration(){return 1e3*this.blockDuration}get execEvenly(){return this._execEvenly}set execEvenly(e){this._execEvenly="undefined"!==typeof e&&Boolean(e)}get execEvenlyMinDelayMs(){return this._execEvenlyMinDelayMs}set execEvenlyMinDelayMs(e){this._execEvenlyMinDelayMs="undefined"===typeof e?Math.ceil(this.msDuration/this.points):e}get keyPrefix(){return this._keyPrefix}set keyPrefix(e){if("undefined"===typeof e&&(e="rlflx"),"string"!==typeof e)throw new Error("keyPrefix must be string");this._keyPrefix=e}_getKeySecDuration(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e&&e.customDuration>=0?e.customDuration:this.duration}getKey(e){return this.keyPrefix.length>0?"".concat(this.keyPrefix,":").concat(e):e}parseKey(e){return e.substring(this.keyPrefix.length)}consume(){throw new Error("You have to implement the method 'consume'!")}penalty(){throw new Error("You have to implement the method 'penalty'!")}reward(){throw new Error("You have to implement the method 'reward'!")}get(){throw new Error("You have to implement the method 'get'!")}set(){throw new Error("You have to implement the method 'set'!")}block(){throw new Error("You have to implement the method 'block'!")}delete(){throw new Error("You have to implement the method 'delete'!")}}},1963:(e,t,r)=>{const n=r(1265),i=r(5539),o=r(4698),s=r(6027),a=r(2319),c="rate_limiter_flexible";let l=null;const u=function(e,t,r,n){let i;i=null===n||!0===n||!1===n?n:{remainingPoints:n.remainingPoints,msBeforeNext:n.msBeforeNext,consumedPoints:n.consumedPoints,isFirstInDuration:n.isFirstInDuration},e.send({channel:c,keyPrefix:t.keyPrefix,promiseId:t.promiseId,type:r,data:i})},h=function(e){setTimeout((()=>{this._initiated?process.send(e):"undefined"!==typeof this._promises[e.promiseId]&&h.call(this,e)}),30)},d=function(e,t,r,n,i){const o={channel:c,keyPrefix:this.keyPrefix,func:e,promiseId:t,data:{key:r,arg:n,opts:i}};this._initiated?process.send(o):h.call(this,o)},f=function(e,t){if(!t||t.channel!==c||"undefined"===typeof this._rateLimiters[t.keyPrefix])return!1;let r;switch(t.func){case"consume":r=this._rateLimiters[t.keyPrefix].consume(t.data.key,t.data.arg,t.data.opts);break;case"penalty":r=this._rateLimiters[t.keyPrefix].penalty(t.data.key,t.data.arg,t.data.opts);break;case"reward":r=this._rateLimiters[t.keyPrefix].reward(t.data.key,t.data.arg,t.data.opts);break;case"block":r=this._rateLimiters[t.keyPrefix].block(t.data.key,t.data.arg,t.data.opts);break;case"get":r=this._rateLimiters[t.keyPrefix].get(t.data.key,t.data.opts);break;case"delete":r=this._rateLimiters[t.keyPrefix].delete(t.data.key,t.data.opts);break;default:return!1}r&&r.then((r=>{u(e,t,"resolve",r)})).catch((r=>{u(e,t,"reject",r)}))},p=function(e){if(!e||e.channel!==c||e.keyPrefix!==this.keyPrefix)return!1;if(this._promises[e.promiseId]){let t;switch(clearTimeout(this._promises[e.promiseId].timeoutId),t=null===e.data||!0===e.data||!1===e.data?e.data:new a(e.data.remainingPoints,e.data.msBeforeNext,e.data.consumedPoints,e.data.isFirstInDuration),e.type){case"resolve":this._promises[e.promiseId].resolve(t);break;case"reject":this._promises[e.promiseId].reject(t);break;default:throw new Error("RateLimiterCluster: no such message type '".concat(e.type,"'"))}delete this._promises[e.promiseId]}},g=function(){return{points:this.points,duration:this.duration,blockDuration:this.blockDuration,execEvenly:this.execEvenly,execEvenlyMinDelayMs:this.execEvenlyMinDelayMs,keyPrefix:this.keyPrefix}},m=function(e,t){const r=process.hrtime();let n=r[0].toString()+r[1].toString();return"undefined"!==typeof this._promises[n]&&(n+=i.randomBytes(12).toString("base64")),this._promises[n]={resolve:e,reject:t,timeoutId:setTimeout((()=>{delete this._promises[n],t(new Error("RateLimiterCluster timeout: no answer from master in time"))}),this.timeoutMs)},n};e.exports={RateLimiterClusterMaster:class{constructor(){if(l)return l;this._rateLimiters={},n.setMaxListeners(0),n.on("message",((e,t)=>{t&&t.channel===c&&"init"===t.type?("undefined"===typeof this._rateLimiters[t.opts.keyPrefix]&&(this._rateLimiters[t.opts.keyPrefix]=new s(t.opts)),e.send({channel:c,type:"init",keyPrefix:t.opts.keyPrefix})):f.call(this,e,t)})),l=this}},RateLimiterClusterMasterPM2:class{constructor(e){if(l)return l;this._rateLimiters={},e.launchBus(((t,r)=>{r.on("process:msg",(t=>{const r=t.raw;if(r&&r.channel===c&&"init"===r.type)"undefined"===typeof this._rateLimiters[r.opts.keyPrefix]&&(this._rateLimiters[r.opts.keyPrefix]=new s(r.opts)),e.sendDataToProcessId(t.process.pm_id,{data:{},topic:c,channel:c,type:"init",keyPrefix:r.opts.keyPrefix},((e,t)=>{e&&console.log(e,t)}));else{f.call(this,{send:r=>{const n=r;n.topic=c,"undefined"===typeof n.data&&(n.data={}),e.sendDataToProcessId(t.process.pm_id,n,((e,t)=>{e&&console.log(e,t)}))}},r)}}))})),l=this}},RateLimiterCluster:class extends o{get timeoutMs(){return this._timeoutMs}set timeoutMs(e){this._timeoutMs="undefined"===typeof e?5e3:Math.abs(parseInt(e))}constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(e),process.setMaxListeners(0),this.timeoutMs=e.timeoutMs,this._initiated=!1,process.on("message",(e=>{e&&e.channel===c&&"init"===e.type&&e.keyPrefix===this.keyPrefix?this._initiated=!0:p.call(this,e)})),process.send({channel:c,type:"init",opts:g.call(this)}),this._promises={}}consume(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Promise(((n,i)=>{const o=m.call(this,n,i);d.call(this,"consume",o,e,t,r)}))}penalty(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Promise(((n,i)=>{const o=m.call(this,n,i);d.call(this,"penalty",o,e,t,r)}))}reward(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Promise(((n,i)=>{const o=m.call(this,n,i);d.call(this,"reward",o,e,t,r)}))}block(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Promise(((n,i)=>{const o=m.call(this,n,i);d.call(this,"block",o,e,t,r)}))}get(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(((r,n)=>{const i=m.call(this,r,n);d.call(this,"get",i,e,t)}))}delete(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(((r,n)=>{const i=m.call(this,r,n);d.call(this,"delete",i,e,t)}))}}}},8025:(e,t,r)=>{const n=r(6053),i=r(2319);e.exports=class extends n{constructor(e){super(e),this.client=e.storeClient}_getRateLimiterRes(e,t,r){const n=new i;return n.consumedPoints=parseInt(r.consumedPoints),n.isFirstInDuration=r.consumedPoints===t,n.remainingPoints=Math.max(this.points-n.consumedPoints,0),n.msBeforeNext=r.msBeforeNext,n}_upsert(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return new Promise(((o,s)=>{const a=Date.now(),c=Math.floor(r/1e3);n?this.client.set(e,t,c,(r=>{r?s(r):this.client.set("".concat(e,"_expire"),c>0?a+1e3*c:-1,c,(()=>{o({consumedPoints:t,msBeforeNext:c>0?1e3*c:-1})}))})):this.client.incr(e,t,((l,u)=>{l||!1===u?this.client.add(e,t,c,((l,u)=>{if(l||!u)if("undefined"===typeof i.attemptNumber||i.attemptNumber<3){const a=Object.assign({},i);a.attemptNumber=a.attemptNumber?a.attemptNumber+1:1,this._upsert(e,t,r,n,a).then((e=>o(e))).catch((e=>s(e)))}else s(new Error("Can not add key"));else this.client.add("".concat(e,"_expire"),c>0?a+1e3*c:-1,c,(()=>{o({consumedPoints:t,msBeforeNext:c>0?1e3*c:-1})}))})):this.client.get("".concat(e,"_expire"),((e,t)=>{if(e)s(e);else{const e=!1===t?0:t,r={consumedPoints:u,msBeforeNext:e>=0?Math.max(e-a,0):-1};o(r)}}))}))}))}_get(e){return new Promise(((t,r)=>{const n=Date.now();this.client.get(e,((i,o)=>{o?this.client.get("".concat(e,"_expire"),((e,i)=>{if(e)r(e);else{const e=!1===i?0:i,r={consumedPoints:o,msBeforeNext:e>=0?Math.max(e-n,0):-1};t(r)}})):t(null)}))}))}_delete(e){return new Promise(((t,r)=>{this.client.del(e,((n,i)=>{n?r(n):!1===i?t(i):this.client.del("".concat(e,"_expire"),(e=>{e?r(e):t(i)}))}))}))}}},6027:(e,t,r)=>{const n=r(4698),i=r(6375),o=r(2319);e.exports=class extends n{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),this._memoryStorage=new i}consume(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Promise(((n,i)=>{const o=this.getKey(e),s=this._getKeySecDuration(r);let a=this._memoryStorage.incrby(o,t,s);if(a.remainingPoints=Math.max(this.points-a.consumedPoints,0),a.consumedPoints>this.points)this.blockDuration>0&&a.consumedPoints<=this.points+t&&(a=this._memoryStorage.set(o,a.consumedPoints,this.blockDuration)),i(a);else if(this.execEvenly&&a.msBeforeNext>0&&!a.isFirstInDuration){let e=Math.ceil(a.msBeforeNext/(a.remainingPoints+2));e<this.execEvenlyMinDelayMs&&(e=a.consumedPoints*this.execEvenlyMinDelayMs),setTimeout(n,e,a)}else n(a)}))}penalty(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=this.getKey(e);return new Promise((e=>{const i=this._getKeySecDuration(r),o=this._memoryStorage.incrby(n,t,i);o.remainingPoints=Math.max(this.points-o.consumedPoints,0),e(o)}))}reward(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=this.getKey(e);return new Promise((e=>{const i=this._getKeySecDuration(r),o=this._memoryStorage.incrby(n,-t,i);o.remainingPoints=Math.max(this.points-o.consumedPoints,0),e(o)}))}block(e,t){const r=1e3*t,n=this.points+1;return this._memoryStorage.set(this.getKey(e),n,t),Promise.resolve(new o(0,0===r?-1:r,n))}set(e,t,r){const n=1e3*(r>=0?r:this.duration);return this._memoryStorage.set(this.getKey(e),t,r),Promise.resolve(new o(0,0===n?-1:n,t))}get(e){const t=this._memoryStorage.get(this.getKey(e));return null!==t&&(t.remainingPoints=Math.max(this.points-t.consumedPoints,0)),Promise.resolve(t)}delete(e){return Promise.resolve(this._memoryStorage.delete(this.getKey(e)))}}},7660:(e,t,r)=>{const n=r(6053),i=r(2319);function o(e){try{const t=e.client?e.client:e,{version:r}=t.topology.s.options.metadata.driver,n=r.split(".").map((e=>parseInt(e)));return{major:n[0],feature:n[1],patch:n[2]}}catch(t){return{major:0,feature:0,patch:0}}}class s extends n{constructor(e){super(e),this.dbName=e.dbName,this.tableName=e.tableName,this.indexKeyPrefix=e.indexKeyPrefix,e.mongo?this.client=e.mongo:this.client=e.storeClient,"function"===typeof this.client.then?this.client.then((e=>{this.client=e,this._initCollection(),this._driverVersion=o(this.client)})):(this._initCollection(),this._driverVersion=o(this.client))}get dbName(){return this._dbName}set dbName(e){this._dbName="undefined"===typeof e?s.getDbName():e}static getDbName(){return"node-rate-limiter-flexible"}get tableName(){return this._tableName}set tableName(e){this._tableName="undefined"===typeof e?this.keyPrefix:e}get client(){return this._client}set client(e){if("undefined"===typeof e)throw new Error("mongo is not set");this._client=e}get indexKeyPrefix(){return this._indexKeyPrefix}set indexKeyPrefix(e){this._indexKeyPrefix=e||{}}_initCollection(){const e=("function"===typeof this.client.db?this.client.db(this.dbName):this.client).collection(this.tableName);e.createIndex({expire:-1},{expireAfterSeconds:0}),e.createIndex(Object.assign({},this.indexKeyPrefix,{key:1}),{unique:!0}),this._collection=e}_getRateLimiterRes(e,t,r){const n=new i;let o;return o="undefined"===typeof r.value?r:r.value,n.isFirstInDuration=o.points===t,n.consumedPoints=o.points,n.remainingPoints=Math.max(this.points-n.consumedPoints,0),n.msBeforeNext=null!==o.expire?Math.max(new Date(o.expire).getTime()-Date.now(),0):-1,n}_upsert(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};if(!this._collection)return Promise.reject(Error("Mongo connection is not established"));const o=i.attrs||{};let s,a;n?(s={key:e},s=Object.assign(s,o),a={$set:{key:e,points:t,expire:r>0?new Date(Date.now()+r):null}},a.$set=Object.assign(a.$set,o)):(s={$or:[{expire:{$gt:new Date}},{expire:{$eq:null}}],key:e},s=Object.assign(s,o),a={$setOnInsert:{key:e,expire:r>0?new Date(Date.now()+r):null},$inc:{points:t}},a.$setOnInsert=Object.assign(a.$setOnInsert,o));const c={upsert:!0};return this._driverVersion.major>=4||3===this._driverVersion.major&&this._driverVersion.feature>=7||this._driverVersion.feature>=6&&this._driverVersion.patch>=7?c.returnDocument="after":c.returnOriginal=!1,new Promise(((i,l)=>{this._collection.findOneAndUpdate(s,a,c).then((e=>{i(e)})).catch((s=>{if(s&&11e3===s.code){const s=Object.assign({$or:[{expire:{$lte:new Date}},{expire:{$eq:null}}],key:e},o),a={$set:Object.assign({key:e,points:t,expire:r>0?new Date(Date.now()+r):null},o)};this._collection.findOneAndUpdate(s,a,c).then((e=>{i(e)})).catch((o=>{o&&11e3===o.code?this._upsert(e,t,r,n).then((e=>i(e))).catch((e=>l(e))):l(o)}))}else l(s)}))}))}_get(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this._collection)return Promise.reject(Error("Mongo connection is not established"));const r=t.attrs||{},n=Object.assign({key:e,$or:[{expire:{$gt:new Date}},{expire:{$eq:null}}]},r);return this._collection.findOne(n)}_delete(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this._collection)return Promise.reject(Error("Mongo connection is not established"));const r=t.attrs||{},n=Object.assign({key:e},r);return this._collection.deleteOne(n).then((e=>e.deletedCount>0))}}e.exports=s},4418:(e,t,r)=>{const n=r(6053),i=r(2319);e.exports=class extends n{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;super(e),this.client=e.storeClient,this.clientType=e.storeType,this.dbName=e.dbName,this.tableName=e.tableName,this.clearExpiredByTimeout=e.clearExpiredByTimeout,this.tableCreated=e.tableCreated,this.tableCreated?(this.clearExpiredByTimeout&&this._clearExpiredHourAgo(),"function"===typeof t&&t()):this._createDbAndTable().then((()=>{this.tableCreated=!0,this.clearExpiredByTimeout&&this._clearExpiredHourAgo(),"function"===typeof t&&t()})).catch((e=>{if("function"!==typeof t)throw e;t(e)}))}clearExpired(e){return new Promise((t=>{this._getConnection().then((r=>{r.query("DELETE FROM ??.?? WHERE expire < ?",[this.dbName,this.tableName,e],(()=>{this._releaseConnection(r),t()}))})).catch((()=>{t()}))}))}_clearExpiredHourAgo(){this._clearExpiredTimeoutId&&clearTimeout(this._clearExpiredTimeoutId),this._clearExpiredTimeoutId=setTimeout((()=>{this.clearExpired(Date.now()-36e5).then((()=>{this._clearExpiredHourAgo()}))}),3e5),this._clearExpiredTimeoutId.unref()}_getConnection(){switch(this.clientType){case"pool":return new Promise(((e,t)=>{this.client.getConnection(((r,n)=>{if(r)return t(r);e(n)}))}));case"sequelize":return this.client.connectionManager.getConnection();case"knex":return this.client.client.acquireConnection();default:return Promise.resolve(this.client)}}_releaseConnection(e){switch(this.clientType){case"pool":return e.release();case"sequelize":return this.client.connectionManager.releaseConnection(e);case"knex":return this.client.client.releaseConnection(e);default:return!0}}_createDbAndTable(){return new Promise(((e,t)=>{this._getConnection().then((r=>{r.query("CREATE DATABASE IF NOT EXISTS `".concat(this.dbName,"`;"),(n=>{if(n)return this._releaseConnection(r),t(n);r.query(this._getCreateTableStmt(),(n=>{if(n)return this._releaseConnection(r),t(n);this._releaseConnection(r),e()}))}))})).catch((e=>{t(e)}))}))}_getCreateTableStmt(){return"CREATE TABLE IF NOT EXISTS `".concat(this.dbName,"`.`").concat(this.tableName,"` (")+"`key` VARCHAR(255) CHARACTER SET utf8 NOT NULL,`points` INT(9) NOT NULL default 0,`expire` BIGINT UNSIGNED,PRIMARY KEY (`key`)) ENGINE = INNODB;"}get clientType(){return this._clientType}set clientType(e){if("undefined"===typeof e)if("Connection"===this.client.constructor.name)e="connection";else if("Pool"===this.client.constructor.name)e="pool";else{if("Sequelize"!==this.client.constructor.name)throw new Error("storeType is not defined");e="sequelize"}this._clientType=e.toLowerCase()}get dbName(){return this._dbName}set dbName(e){this._dbName="undefined"===typeof e?"rtlmtrflx":e}get tableName(){return this._tableName}set tableName(e){this._tableName="undefined"===typeof e?this.keyPrefix:e}get tableCreated(){return this._tableCreated}set tableCreated(e){this._tableCreated="undefined"!==typeof e&&!!e}get clearExpiredByTimeout(){return this._clearExpiredByTimeout}set clearExpiredByTimeout(e){this._clearExpiredByTimeout="undefined"===typeof e||Boolean(e)}_getRateLimiterRes(e,t,r){const n=new i,[o]=r;return n.isFirstInDuration=t===o.points,n.consumedPoints=n.isFirstInDuration?t:o.points,n.remainingPoints=Math.max(this.points-n.consumedPoints,0),n.msBeforeNext=o.expire?Math.max(o.expire-Date.now(),0):-1,n}_upsertTransaction(e,t,r,n,i){return new Promise(((o,s)=>{e.query("BEGIN",(a=>{if(a)return e.rollback(),s(a);const c=Date.now(),l=n>0?c+n:null;let u,h;i?(u="INSERT INTO ??.?? VALUES (?, ?, ?)\n ON DUPLICATE KEY UPDATE \n points = ?, \n expire = ?;",h=[this.dbName,this.tableName,t,r,l,r,l]):(u="INSERT INTO ??.?? VALUES (?, ?, ?)\n ON DUPLICATE KEY UPDATE \n points = IF(expire <= ?, ?, points + (?)), \n expire = IF(expire <= ?, ?, expire);",h=[this.dbName,this.tableName,t,r,l,c,r,r,c,l]),e.query(u,h,(r=>{if(r)return e.rollback(),s(r);e.query("SELECT points, expire FROM ??.?? WHERE `key` = ?;",[this.dbName,this.tableName,t],((t,r)=>{if(t)return e.rollback(),s(t);e.query("COMMIT",(t=>{if(t)return e.rollback(),s(t);o(r)}))}))}))}))}))}_upsert(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return this.tableCreated?new Promise(((i,o)=>{this._getConnection().then((s=>{this._upsertTransaction(s,e,t,r,n).then((e=>{i(e),this._releaseConnection(s)})).catch((e=>{o(e),this._releaseConnection(s)}))})).catch((e=>{o(e)}))})):Promise.reject(Error("Table is not created yet"))}_get(e){return this.tableCreated?new Promise(((t,r)=>{this._getConnection().then((n=>{n.query("SELECT points, expire FROM ??.?? WHERE `key` = ? AND (`expire` > ? OR `expire` IS NULL)",[this.dbName,this.tableName,e,Date.now()],((e,i)=>{e?r(e):0===i.length?t(null):t(i),this._releaseConnection(n)}))})).catch((e=>{r(e)}))})):Promise.reject(Error("Table is not created yet"))}_delete(e){return this.tableCreated?new Promise(((t,r)=>{this._getConnection().then((n=>{n.query("DELETE FROM ??.?? WHERE `key` = ?",[this.dbName,this.tableName,e],((e,i)=>{e?r(e):t(i.affectedRows>0),this._releaseConnection(n)}))})).catch((e=>{r(e)}))})):Promise.reject(Error("Table is not created yet"))}}},1898:(e,t,r)=>{const n=r(6053),i=r(2319);e.exports=class extends n{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;super(e),this.client=e.storeClient,this.clientType=e.storeType,this.tableName=e.tableName,this.clearExpiredByTimeout=e.clearExpiredByTimeout,this.tableCreated=e.tableCreated,this.tableCreated?"function"===typeof t&&t():this._createTable().then((()=>{this.tableCreated=!0,this.clearExpiredByTimeout&&this._clearExpiredHourAgo(),"function"===typeof t&&t()})).catch((e=>{if("function"!==typeof t)throw e;t(e)}))}clearExpired(e){return new Promise((t=>{const r={name:"rlflx-clear-expired",text:"DELETE FROM ".concat(this.tableName," WHERE expire < $1"),values:[e]};this._query(r).then((()=>{t()})).catch((()=>{t()}))}))}_clearExpiredHourAgo(){this._clearExpiredTimeoutId&&clearTimeout(this._clearExpiredTimeoutId),this._clearExpiredTimeoutId=setTimeout((()=>{this.clearExpired(Date.now()-36e5).then((()=>{this._clearExpiredHourAgo()}))}),3e5),this._clearExpiredTimeoutId.unref()}_getConnection(){switch(this.clientType){case"pool":default:return Promise.resolve(this.client);case"sequelize":return this.client.connectionManager.getConnection();case"knex":return this.client.client.acquireConnection();case"typeorm":return Promise.resolve(this.client.driver.master)}}_releaseConnection(e){switch(this.clientType){case"pool":case"typeorm":default:return!0;case"sequelize":return this.client.connectionManager.releaseConnection(e);case"knex":return this.client.client.releaseConnection(e)}}_createTable(){return new Promise(((e,t)=>{this._query({text:this._getCreateTableStmt()}).then((()=>{e()})).catch((r=>{"23505"===r.code?e():t(r)}))}))}_getCreateTableStmt(){return"CREATE TABLE IF NOT EXISTS ".concat(this.tableName," ( \n key varchar(255) PRIMARY KEY,\n points integer NOT NULL DEFAULT 0,\n expire bigint\n );")}get clientType(){return this._clientType}set clientType(e){const t=this.client.constructor.name;if("undefined"===typeof e)if("Client"===t)e="client";else if("Pool"===t||"BoundPool"===t)e="pool";else{if("Sequelize"!==t)throw new Error("storeType is not defined");e="sequelize"}this._clientType=e.toLowerCase()}get tableName(){return this._tableName}set tableName(e){this._tableName="undefined"===typeof e?this.keyPrefix:e}get tableCreated(){return this._tableCreated}set tableCreated(e){this._tableCreated="undefined"!==typeof e&&!!e}get clearExpiredByTimeout(){return this._clearExpiredByTimeout}set clearExpiredByTimeout(e){this._clearExpiredByTimeout="undefined"===typeof e||Boolean(e)}_getRateLimiterRes(e,t,r){const n=new i,o=r.rows[0];return n.isFirstInDuration=t===o.points,n.consumedPoints=n.isFirstInDuration?t:o.points,n.remainingPoints=Math.max(this.points-n.consumedPoints,0),n.msBeforeNext=o.expire?Math.max(o.expire-Date.now(),0):-1,n}_query(e){const t=this.tableName.toLowerCase(),r={name:"".concat(t,":").concat(e.name),text:e.text,values:e.values};return new Promise(((e,t)=>{this._getConnection().then((n=>{n.query(r).then((t=>{e(t),this._releaseConnection(n)})).catch((e=>{t(e),this._releaseConnection(n)}))})).catch((e=>{t(e)}))}))}_upsert(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!this.tableCreated)return Promise.reject(Error("Table is not created yet"));const i=r>0?Date.now()+r:null,o=n?" $3 ":" CASE\n WHEN ".concat(this.tableName,".expire <= $4 THEN $3\n ELSE ").concat(this.tableName,".expire\n END ");return this._query({name:n?"rlflx-upsert-force":"rlflx-upsert",text:"\n INSERT INTO ".concat(this.tableName," VALUES ($1, $2, $3)\n ON CONFLICT(key) DO UPDATE SET\n points = CASE\n WHEN (").concat(this.tableName,".expire <= $4 OR 1=").concat(n?1:0,") THEN $2\n ELSE ").concat(this.tableName,".points + ($2)\n END,\n expire = ").concat(o,"\n RETURNING points, expire;"),values:[e,t,i,Date.now()]})}_get(e){return this.tableCreated?new Promise(((t,r)=>{this._query({name:"rlflx-get",text:"\n SELECT points, expire FROM ".concat(this.tableName," WHERE key = $1 AND (expire > $2 OR expire IS NULL);"),values:[e,Date.now()]}).then((e=>{0===e.rowCount&&(e=null),t(e)})).catch((e=>{r(e)}))})):Promise.reject(Error("Table is not created yet"))}_delete(e){return this.tableCreated?this._query({name:"rlflx-delete",text:"DELETE FROM ".concat(this.tableName," WHERE key = $1"),values:[e]}).then((e=>e.rowCount>0)):Promise.reject(Error("Table is not created yet"))}}},7497:(e,t,r)=>{const n=r(3964),i=4294967295,o="limiter";e.exports=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{maxQueueSize:i};this._queueLimiters={KEY_DEFAULT:new s(e,t)},this._limiterFlexible=e,this._maxQueueSize=t.maxQueueSize}getTokensRemaining(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o;return this._queueLimiters[e]?this._queueLimiters[e].getTokensRemaining():Promise.resolve(this._limiterFlexible.points)}removeTokens(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o;return this._queueLimiters[t]||(this._queueLimiters[t]=new s(this._limiterFlexible,{key:t,maxQueueSize:this._maxQueueSize})),this._queueLimiters[t].removeTokens(e)}};class s{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{maxQueueSize:i,key:o};this._key=t.key,this._waitTimeout=null,this._queue=[],this._limiterFlexible=e,this._maxQueueSize=t.maxQueueSize}getTokensRemaining(){return this._limiterFlexible.get(this._key).then((e=>null!==e?e.remainingPoints:this._limiterFlexible.points))}removeTokens(e){const t=this;return new Promise(((r,i)=>{e>t._limiterFlexible.points?i(new n("Requested tokens ".concat(e," exceeds maximum ").concat(t._limiterFlexible.points," tokens per interval"))):t._queue.length>0?t._queueRequest.call(t,r,i,e):t._limiterFlexible.consume(t._key,e).then((e=>{r(e.remainingPoints)})).catch((n=>{n instanceof Error?i(n):(t._queueRequest.call(t,r,i,e),null===t._waitTimeout&&(t._waitTimeout=setTimeout(t._processFIFO.bind(t),n.msBeforeNext)))}))}))}_queueRequest(e,t,r){const i=this;i._queue.length<i._maxQueueSize?i._queue.push({resolve:e,reject:t,tokens:r}):t(new n("Number of requests reached it's maximum ".concat(i._maxQueueSize)))}_processFIFO(){const e=this;if(null!==e._waitTimeout&&(clearTimeout(e._waitTimeout),e._waitTimeout=null),0===e._queue.length)return;const t=e._queue.shift();e._limiterFlexible.consume(e._key,t.tokens).then((r=>{t.resolve(r.remainingPoints),e._processFIFO.call(e)})).catch((r=>{r instanceof Error?(t.reject(r),e._processFIFO.call(e)):(e._queue.unshift(t),null===e._waitTimeout&&(e._waitTimeout=setTimeout(e._processFIFO.bind(e),r.msBeforeNext)))}))}}},8059:(e,t,r)=>{const n=r(6053),i=r(2319),o="redis.call('set', KEYS[1], 0, 'EX', ARGV[2], 'NX') local consumed = redis.call('incrby', KEYS[1], ARGV[1]) local ttl = redis.call('pttl', KEYS[1]) if ttl == -1 then redis.call('expire', KEYS[1], ARGV[2]) ttl = 1000 * ARGV[2] end return {consumed, ttl} ";e.exports=class extends n{constructor(e){super(e),e.redis?this.client=e.redis:this.client=e.storeClient,this._rejectIfRedisNotReady=!!e.rejectIfRedisNotReady,"function"===typeof this.client.defineCommand&&this.client.defineCommand("rlflxIncr",{numberOfKeys:1,lua:o})}_isRedisReady(){return!this._rejectIfRedisNotReady||(!this.client.status||"ready"===this.client.status)&&!("function"===typeof this.client.isReady&&!this.client.isReady())}_getRateLimiterRes(e,t,r){let[n,o]=r;Array.isArray(n)&&([,n]=n,[,o]=o);const s=new i;return s.consumedPoints=parseInt(n),s.isFirstInDuration=s.consumedPoints===t,s.remainingPoints=Math.max(this.points-s.consumedPoints,0),s.msBeforeNext=o,s}_upsert(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return new Promise(((i,s)=>{if(!this._isRedisReady())return s(new Error("Redis connection is not ready"));const a=Math.floor(r/1e3),c=this.client.multi();if(n)a>0?c.set(e,t,"EX",a):c.set(e,t),c.pttl(e).exec(((e,t)=>e?s(e):i(t)));else if(a>0){const r=function(e,t){return e?s(e):i(t)};"function"===typeof this.client.rlflxIncr?this.client.rlflxIncr(e,t,a,r):this.client.eval(o,1,e,t,a,r)}else c.incrby(e,t).pttl(e).exec(((e,t)=>e?s(e):i(t)))}))}_get(e){return new Promise(((t,r)=>{if(!this._isRedisReady())return r(new Error("Redis connection is not ready"));this.client.multi().get(e).pttl(e).exec(((e,n)=>{if(e)r(e);else{const[e]=n;if(null===e)return t(null);t(n)}}))}))}_delete(e){return new Promise(((t,r)=>{this.client.del(e,((e,n)=>{e?r(e):t(n>0)}))}))}}},2319:e=>{e.exports=class{constructor(e,t,r,n){this.remainingPoints="undefined"===typeof e?0:e,this.msBeforeNext="undefined"===typeof t?0:t,this.consumedPoints="undefined"===typeof r?0:r,this.isFirstInDuration="undefined"!==typeof n&&n}get msBeforeNext(){return this._msBeforeNext}set msBeforeNext(e){return this._msBeforeNext=e,this}get remainingPoints(){return this._remainingPoints}set remainingPoints(e){return this._remainingPoints=e,this}get consumedPoints(){return this._consumedPoints}set consumedPoints(e){return this._consumedPoints=e,this}get isFirstInDuration(){return this._isFirstInDuration}set isFirstInDuration(e){this._isFirstInDuration=Boolean(e)}_getDecoratedProperties(){return{remainingPoints:this.remainingPoints,msBeforeNext:this.msBeforeNext,consumedPoints:this.consumedPoints,isFirstInDuration:this.isFirstInDuration}}[Symbol.for("nodejs.util.inspect.custom")](){return this._getDecoratedProperties()}toString(){return JSON.stringify(this._getDecoratedProperties())}toJSON(){return this._getDecoratedProperties()}}},6053:(e,t,r)=>{const n=r(4698),i=r(6194),o=r(2319);e.exports=class extends n{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(e),this.inMemoryBlockOnConsumed=e.inMemoryBlockOnConsumed||e.inmemoryBlockOnConsumed,this.inMemoryBlockDuration=e.inMemoryBlockDuration||e.inmemoryBlockDuration,this.insuranceLimiter=e.insuranceLimiter,this._inMemoryBlockedKeys=new i}get client(){return this._client}set client(e){if("undefined"===typeof e)throw new Error("storeClient is not set");this._client=e}_afterConsume(e,t,r,n,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};const s=this._getRateLimiterRes(r,n,i);if(this.inMemoryBlockOnConsumed>0&&!(this.inMemoryBlockDuration>0)&&s.consumedPoints>=this.inMemoryBlockOnConsumed)return this._inMemoryBlockedKeys.addMs(r,s.msBeforeNext),s.consumedPoints>this.points?t(s):e(s);if(s.consumedPoints>this.points){let e=Promise.resolve();this.blockDuration>0&&s.consumedPoints<=this.points+n&&(s.msBeforeNext=this.msBlockDuration,e=this._block(r,s.consumedPoints,this.msBlockDuration,o)),this.inMemoryBlockOnConsumed>0&&s.consumedPoints>=this.inMemoryBlockOnConsumed&&(this._inMemoryBlockedKeys.add(r,this.inMemoryBlockDuration),s.msBeforeNext=this.msInMemoryBlockDuration),e.then((()=>{t(s)})).catch((e=>{t(e)}))}else if(this.execEvenly&&s.msBeforeNext>0&&!s.isFirstInDuration){let t=Math.ceil(s.msBeforeNext/(s.remainingPoints+2));t<this.execEvenlyMinDelayMs&&(t=s.consumedPoints*this.execEvenlyMinDelayMs),setTimeout(e,t,s)}else e(s)}_handleError(e,t,r,i,o){let s=arguments.length>5&&void 0!==arguments[5]&&arguments[5],a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{};this.insuranceLimiter instanceof n?this.insuranceLimiter[t](o,s,a).then((e=>{r(e)})).catch((e=>{i(e)})):i(e)}get _inmemoryBlockedKeys(){return this._inMemoryBlockedKeys}getInmemoryBlockMsBeforeExpire(e){return this.getInMemoryBlockMsBeforeExpire(e)}get inmemoryBlockOnConsumed(){return this.inMemoryBlockOnConsumed}set inmemoryBlockOnConsumed(e){this.inMemoryBlockOnConsumed=e}get inmemoryBlockDuration(){return this.inMemoryBlockDuration}set inmemoryBlockDuration(e){this.inMemoryBlockDuration=e}get msInmemoryBlockDuration(){return 1e3*this.inMemoryBlockDuration}getInMemoryBlockMsBeforeExpire(e){return this.inMemoryBlockOnConsumed>0?this._inMemoryBlockedKeys.msBeforeExpire(e):0}get inMemoryBlockOnConsumed(){return this._inMemoryBlockOnConsumed}set inMemoryBlockOnConsumed(e){if(this._inMemoryBlockOnConsumed=e?parseInt(e):0,this.inMemoryBlockOnConsumed>0&&this.points>this.inMemoryBlockOnConsumed)throw new Error('inMemoryBlockOnConsumed option must be greater or equal "points" option')}get inMemoryBlockDuration(){return this._inMemoryBlockDuration}set inMemoryBlockDuration(e){if(this._inMemoryBlockDuration=e?parseInt(e):0,this.inMemoryBlockDuration>0&&0===this.inMemoryBlockOnConsumed)throw new Error("inMemoryBlockOnConsumed option must be set up")}get msInMemoryBlockDuration(){return 1e3*this._inMemoryBlockDuration}get insuranceLimiter(){return this._insuranceLimiter}set insuranceLimiter(e){if("undefined"!==typeof e&&!(e instanceof n))throw new Error("insuranceLimiter must be instance of RateLimiterAbstract");this._insuranceLimiter=e,this._insuranceLimiter&&(this._insuranceLimiter.blockDuration=this.blockDuration,this._insuranceLimiter.execEvenly=this.execEvenly)}block(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=1e3*t;return this._block(this.getKey(e),this.points+1,n,r)}set(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=1e3*(r>=0?r:this.duration);return this._block(this.getKey(e),t,i,n)}consume(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Promise(((n,i)=>{const s=this.getKey(e),a=this.getInMemoryBlockMsBeforeExpire(s);if(a>0)return i(new o(0,a));this._upsert(s,t,1e3*this._getKeySecDuration(r),!1,r).then((e=>{this._afterConsume(n,i,s,t,e)})).catch((o=>{this._handleError(o,"consume",n,i,e,t,r)}))}))}penalty(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=this.getKey(e);return new Promise(((i,o)=>{this._upsert(n,t,1e3*this._getKeySecDuration(r),!1,r).then((e=>{i(this._getRateLimiterRes(n,t,e))})).catch((n=>{this._handleError(n,"penalty",i,o,e,t,r)}))}))}reward(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=this.getKey(e);return new Promise(((i,o)=>{this._upsert(n,-t,1e3*this._getKeySecDuration(r),!1,r).then((e=>{i(this._getRateLimiterRes(n,-t,e))})).catch((n=>{this._handleError(n,"reward",i,o,e,t,r)}))}))}get(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=this.getKey(e);return new Promise(((n,i)=>{this._get(r,t).then((e=>{n(null===e||"undefined"===typeof e?null:this._getRateLimiterRes(r,0,e))})).catch((r=>{this._handleError(r,"get",n,i,e,t)}))}))}delete(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=this.getKey(e);return new Promise(((n,i)=>{this._delete(r,t).then((e=>{this._inMemoryBlockedKeys.delete(r),n(e)})).catch((r=>{this._handleError(r,"delete",n,i,e,t)}))}))}deleteInMemoryBlockedAll(){this._inMemoryBlockedKeys.delete()}_getRateLimiterRes(e,t,r){throw new Error("You have to implement the method '_getRateLimiterRes'!")}_block(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return new Promise(((i,s)=>{this._upsert(e,t,r,!0,n).then((()=>{i(new o(0,r>0?r:-1,t))})).catch((t=>{this._handleError(t,"block",i,s,this.parseKey(e),r/1e3,n)}))}))}_get(e){throw new Error("You have to implement the method '_get'!")}_delete(e){throw new Error("You have to implement the method '_delete'!")}_upsert(e,t,r){throw new Error("You have to implement the method '_upsert'!")}}},9794:(e,t,r)=>{const n=r(4698);e.exports=class{constructor(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];if(t.length<1)throw new Error("RateLimiterUnion: at least one limiter have to be passed");t.forEach((e=>{if(!(e instanceof n))throw new Error("RateLimiterUnion: all limiters have to be instance of RateLimiterAbstract")})),this._limiters=t}consume(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return new Promise(((r,n)=>{const i=[];this._limiters.forEach((r=>{i.push(r.consume(e,t).catch((e=>({rejected:!0,rej:e}))))})),Promise.all(i).then((e=>{const t={};let i=!1;e.forEach((e=>{!0===e.rejected&&(i=!0)}));for(let r=0;r<e.length;r++)i&&!0===e[r].rejected?t[this._limiters[r].keyPrefix]=e[r].rej:i||(t[this._limiters[r].keyPrefix]=e[r]);i?n(t):r(t)}))}))}}},7570:e=>{e.exports=class{constructor(){this._keys={},this._addedKeysAmount=0}collectExpired(){const e=Date.now();Object.keys(this._keys).forEach((t=>{this._keys[t]<=e&&delete this._keys[t]})),this._addedKeysAmount=Object.keys(this._keys).length}add(e,t){this.addMs(e,1e3*t)}addMs(e,t){this._keys[e]=Date.now()+t,this._addedKeysAmount++,this._addedKeysAmount>999&&this.collectExpired()}msBeforeExpire(e){const t=this._keys[e];if(t&&t>=Date.now()){this.collectExpired();const e=Date.now();return t>=e?t-e:0}return 0}delete(e){e?delete this._keys[e]:Object.keys(this._keys).forEach((e=>{delete this._keys[e]}))}}},6194:(e,t,r)=>{const n=r(7570);e.exports=n},6375:(e,t,r)=>{const n=r(8381),i=r(2319);e.exports=class{constructor(){this._storage={}}incrby(e,t,r){if(this._storage[e]){const n=this._storage[e].expiresAt?this._storage[e].expiresAt.getTime()-(new Date).getTime():-1;return 0!==n?(this._storage[e].value=this._storage[e].value+t,new i(0,n,this._storage[e].value,!1)):this.set(e,t,r)}return this.set(e,t,r)}set(e,t,r){const o=1e3*r;return this._storage[e]&&this._storage[e].timeoutId&&clearTimeout(this._storage[e].timeoutId),this._storage[e]=new n(t,o>0?new Date(Date.now()+o):null),o>0&&(this._storage[e].timeoutId=setTimeout((()=>{delete this._storage[e]}),o),this._storage[e].timeoutId.unref&&this._storage[e].timeoutId.unref()),new i(0,0===o?-1:o,this._storage[e].value,!0)}get(e){if(this._storage[e]){const t=this._storage[e].expiresAt?this._storage[e].expiresAt.getTime()-(new Date).getTime():-1;return new i(0,t,this._storage[e].value,!1)}return null}delete(e){return!!this._storage[e]&&(this._storage[e].timeoutId&&clearTimeout(this._storage[e].timeoutId),delete this._storage[e],!0)}}},8381:e=>{e.exports=class{constructor(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.value=e,this.expiresAt=t,this.timeoutId=r}get value(){return this._value}set value(e){this._value=parseInt(e)}get expiresAt(){return this._expiresAt}set expiresAt(e){e instanceof Date||!Number.isInteger(e)||(e=new Date(e)),this._expiresAt=e}get timeoutId(){return this._timeoutId}set timeoutId(e){this._timeoutId=e}}},3964:e=>{e.exports=class extends Error{constructor(e,t){super(),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="CustomError",this.message=e,t&&(this.extra=t)}}},534:(e,t,r)=>{"use strict";var n=r(7313),i=r(2224);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=new Set,a={};function c(e,t){l(e,t),l(e+"Capture",t)}function l(e,t){for(a[e]=t,e=0;e<t.length;e++)s.add(t[e])}var u=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),h=Object.prototype.hasOwnProperty,d=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,f={},p={};function g(e,t,r,n,i,o,s){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var m={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){m[e]=new g(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];m[t]=new g(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){m[e]=new g(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){m[e]=new g(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){m[e]=new g(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){m[e]=new g(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){m[e]=new g(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){m[e]=new g(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){m[e]=new g(e,5,!1,e.toLowerCase(),null,!1,!1)}));var y=/[\-:]([a-z])/g;function v(e){return e[1].toUpperCase()}function b(e,t,r,n){var i=m.hasOwnProperty(t)?m[t]:null;(null!==i?0!==i.type:n||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,r,n){if(null===t||"undefined"===typeof t||function(e,t,r,n){if(null!==r&&0===r.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!n&&(null!==r?!r.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,r,n))return!0;if(n)return!1;if(null!==r)switch(r.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,r,i,n)&&(r=null),n||null===i?function(e){return!!h.call(p,e)||!h.call(f,e)&&(d.test(e)?p[e]=!0:(f[e]=!0,!1))}(t)&&(null===r?e.removeAttribute(t):e.setAttribute(t,""+r)):i.mustUseProperty?e[i.propertyName]=null===r?3!==i.type&&"":r:(t=i.attributeName,n=i.attributeNamespace,null===r?e.removeAttribute(t):(r=3===(i=i.type)||4===i&&!0===r?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(y,v);m[t]=new g(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(y,v);m[t]=new g(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(y,v);m[t]=new g(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){m[e]=new g(e,1,!1,e.toLowerCase(),null,!1,!1)})),m.xlinkHref=new g("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){m[e]=new g(e,1,!1,e.toLowerCase(),null,!0,!0)}));var w=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,E=Symbol.for("react.element"),S=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),C=Symbol.for("react.provider"),x=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),N=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var D=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var O=Symbol.iterator;function M(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=O&&e[O]||e["@@iterator"])?e:null}var B,L=Object.assign;function U(e){if(void 0===B)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);B=t&&t[1]||""}return"\n"+B+e}var F=!1;function j(e,t){if(!e||F)return"";F=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(l){var n=l}Reflect.construct(e,[],t)}else{try{t.call()}catch(l){n=l}e.call(t.prototype)}else{try{throw Error()}catch(l){n=l}e()}}catch(l){if(l&&n&&"string"===typeof l.stack){for(var i=l.stack.split("\n"),o=n.stack.split("\n"),s=i.length-1,a=o.length-1;1<=s&&0<=a&&i[s]!==o[a];)a--;for(;1<=s&&0<=a;s--,a--)if(i[s]!==o[a]){if(1!==s||1!==a)do{if(s--,0>--a||i[s]!==o[a]){var c="\n"+i[s].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}}while(1<=s&&0<=a);break}}}finally{F=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?U(e):""}function z(e){switch(e.tag){case 5:return U(e.type);case 16:return U("Lazy");case 13:return U("Suspense");case 19:return U("SuspenseList");case 0:case 2:case 15:return e=j(e.type,!1);case 11:return e=j(e.type.render,!1);case 1:return e=j(e.type,!0);default:return""}}function K(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case _:return"Fragment";case S:return"Portal";case k:return"Profiler";case A:return"StrictMode";case R:return"Suspense";case P:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case x:return(e.displayName||"Context")+".Consumer";case C:return(e._context.displayName||"Context")+".Provider";case I:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case T:return null!==(t=e.displayName||null)?t:K(e.type)||"Memo";case N:t=e._payload,e=e._init;try{return K(e(t))}catch(r){}}return null}function q(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return K(t);case 8:return t===A?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"===typeof t)return t.displayName||t.name||null;if("string"===typeof t)return t}return null}function Z(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function V(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function H(e){e._valueTracker||(e._valueTracker=function(e){var t=V(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof r&&"function"===typeof r.get&&"function"===typeof r.set){var i=r.get,o=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function W(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=V(e)?e.checked?"true":"false":e.value),(e=n)!==r&&(t.setValue(e),!0)}function G(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Y(e,t){var r=t.checked;return L({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=r?r:e._wrapperState.initialChecked})}function Q(e,t){var r=null==t.defaultValue?"":t.defaultValue,n=null!=t.checked?t.checked:t.defaultChecked;r=Z(null!=t.value?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function J(e,t){null!=(t=t.checked)&&b(e,"checked",t,!1)}function X(e,t){J(e,t);var r=Z(t.value),n=t.type;if(null!=r)"number"===n?(0===r&&""===e.value||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if("submit"===n||"reset"===n)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,r):t.hasOwnProperty("defaultValue")&&ee(e,t.type,Z(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function $(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!("submit"!==n&&"reset"!==n||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}""!==(r=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==r&&(e.name=r)}function ee(e,t,r){"number"===t&&G(e.ownerDocument)===e||(null==r?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var te=Array.isArray;function re(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i<r.length;i++)t["$"+r[i]]=!0;for(r=0;r<e.length;r++)i=t.hasOwnProperty("$"+e[r].value),e[r].selected!==i&&(e[r].selected=i),i&&n&&(e[r].defaultSelected=!0)}else{for(r=""+Z(r),t=null,i=0;i<e.length;i++){if(e[i].value===r)return e[i].selected=!0,void(n&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function ne(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(o(91));return L({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ie(e,t){var r=t.value;if(null==r){if(r=t.children,t=t.defaultValue,null!=r){if(null!=t)throw Error(o(92));if(te(r)){if(1<r.length)throw Error(o(93));r=r[0]}t=r}null==t&&(t=""),r=t}e._wrapperState={initialValue:Z(r)}}function oe(e,t){var r=Z(t.value),n=Z(t.defaultValue);null!=r&&((r=""+r)!==e.value&&(e.value=r),null==t.defaultValue&&e.defaultValue!==r&&(e.defaultValue=r)),null!=n&&(e.defaultValue=""+n)}function se(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function ae(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ce(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?ae(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var le,ue,he=(ue=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((le=le||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=le.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,r,n){MSApp.execUnsafeLocalFunction((function(){return ue(e,t)}))}:ue);function de(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&3===r.nodeType)return void(r.nodeValue=t)}e.textContent=t}var fe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},pe=["Webkit","ms","Moz","O"];function ge(e,t,r){return null==t||"boolean"===typeof t||""===t?"":r||"number"!==typeof t||0===t||fe.hasOwnProperty(e)&&fe[e]?(""+t).trim():t+"px"}function me(e,t){for(var r in e=e.style,t)if(t.hasOwnProperty(r)){var n=0===r.indexOf("--"),i=ge(r,t[r],n);"float"===r&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}Object.keys(fe).forEach((function(e){pe.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fe[t]=fe[e]}))}));var ye=L({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ve(e,t){if(t){if(ye[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(o(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(o(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(o(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(o(62))}}function be(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var we=null;function Ee(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Se=null,_e=null,Ae=null;function ke(e){if(e=bi(e)){if("function"!==typeof Se)throw Error(o(280));var t=e.stateNode;t&&(t=Ei(t),Se(e.stateNode,e.type,t))}}function Ce(e){_e?Ae?Ae.push(e):Ae=[e]:_e=e}function xe(){if(_e){var e=_e,t=Ae;if(Ae=_e=null,ke(e),t)for(e=0;e<t.length;e++)ke(t[e])}}function Ie(e,t){return e(t)}function Re(){}var Pe=!1;function Te(e,t,r){if(Pe)return e(t,r);Pe=!0;try{return Ie(e,t,r)}finally{Pe=!1,(null!==_e||null!==Ae)&&(Re(),xe())}}function Ne(e,t){var r=e.stateNode;if(null===r)return null;var n=Ei(r);if(null===n)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(n=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!n;break e;default:e=!1}if(e)return null;if(r&&"function"!==typeof r)throw Error(o(231,t,typeof r));return r}var De=!1;if(u)try{var Oe={};Object.defineProperty(Oe,"passive",{get:function(){De=!0}}),window.addEventListener("test",Oe,Oe),window.removeEventListener("test",Oe,Oe)}catch(ue){De=!1}function Me(e,t,r,n,i,o,s,a,c){var l=Array.prototype.slice.call(arguments,3);try{t.apply(r,l)}catch(u){this.onError(u)}}var Be=!1,Le=null,Ue=!1,Fe=null,je={onError:function(e){Be=!0,Le=e}};function ze(e,t,r,n,i,o,s,a,c){Be=!1,Le=null,Me.apply(je,arguments)}function Ke(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(4098&(t=e).flags)&&(r=t.return),e=t.return}while(e)}return 3===t.tag?r:null}function qe(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Ze(e){if(Ke(e)!==e)throw Error(o(188))}function Ve(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ke(e)))throw Error(o(188));return t!==e?null:e}for(var r=e,n=t;;){var i=r.return;if(null===i)break;var s=i.alternate;if(null===s){if(null!==(n=i.return)){r=n;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===r)return Ze(i),e;if(s===n)return Ze(i),t;s=s.sibling}throw Error(o(188))}if(r.return!==n.return)r=i,n=s;else{for(var a=!1,c=i.child;c;){if(c===r){a=!0,r=i,n=s;break}if(c===n){a=!0,n=i,r=s;break}c=c.sibling}if(!a){for(c=s.child;c;){if(c===r){a=!0,r=s,n=i;break}if(c===n){a=!0,n=s,r=i;break}c=c.sibling}if(!a)throw Error(o(189))}}if(r.alternate!==n)throw Error(o(190))}if(3!==r.tag)throw Error(o(188));return r.stateNode.current===r?e:t}(e))?He(e):null}function He(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=He(e);if(null!==t)return t;e=e.sibling}return null}var We=i.unstable_scheduleCallback,Ge=i.unstable_cancelCallback,Ye=i.unstable_shouldYield,Qe=i.unstable_requestPaint,Je=i.unstable_now,Xe=i.unstable_getCurrentPriorityLevel,$e=i.unstable_ImmediatePriority,et=i.unstable_UserBlockingPriority,tt=i.unstable_NormalPriority,rt=i.unstable_LowPriority,nt=i.unstable_IdlePriority,it=null,ot=null;var st=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(at(e)/ct|0)|0},at=Math.log,ct=Math.LN2;var lt=64,ut=4194304;function ht(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function dt(e,t){var r=e.pendingLanes;if(0===r)return 0;var n=0,i=e.suspendedLanes,o=e.pingedLanes,s=268435455&r;if(0!==s){var a=s&~i;0!==a?n=ht(a):0!==(o&=s)&&(n=ht(o))}else 0!==(s=r&~i)?n=ht(s):0!==o&&(n=ht(o));if(0===n)return 0;if(0!==t&&t!==n&&0===(t&i)&&((i=n&-n)>=(o=t&-t)||16===i&&0!==(4194240&o)))return t;if(0!==(4&n)&&(n|=16&r),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=n;0<t;)i=1<<(r=31-st(t)),n|=e[r],t&=~i;return n}function ft(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function pt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function gt(){var e=lt;return 0===(4194240&(lt<<=1))&&(lt=64),e}function mt(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function yt(e,t,r){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-st(t)]=r}function vt(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-st(r),i=1<<n;i&t|e[n]&t&&(e[n]|=t),r&=~i}}var bt=0;function wt(e){return 1<(e&=-e)?4<e?0!==(268435455&e)?16:536870912:4:1}var Et,St,_t,At,kt,Ct=!1,xt=[],It=null,Rt=null,Pt=null,Tt=new Map,Nt=new Map,Dt=[],Ot="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Mt(e,t){switch(e){case"focusin":case"focusout":It=null;break;case"dragenter":case"dragleave":Rt=null;break;case"mouseover":case"mouseout":Pt=null;break;case"pointerover":case"pointerout":Tt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Nt.delete(t.pointerId)}}function Bt(e,t,r,n,i,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:o,targetContainers:[i]},null!==t&&(null!==(t=bi(t))&&St(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function Lt(e){var t=vi(e.target);if(null!==t){var r=Ke(t);if(null!==r)if(13===(t=r.tag)){if(null!==(t=qe(r)))return e.blockedOn=t,void kt(e.priority,(function(){_t(r)}))}else if(3===t&&r.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===r.tag?r.stateNode.containerInfo:null)}e.blockedOn=null}function Ut(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var r=Yt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==r)return null!==(t=bi(r))&&St(t),e.blockedOn=r,!1;var n=new(r=e.nativeEvent).constructor(r.type,r);we=n,r.target.dispatchEvent(n),we=null,t.shift()}return!0}function Ft(e,t,r){Ut(e)&&r.delete(t)}function jt(){Ct=!1,null!==It&&Ut(It)&&(It=null),null!==Rt&&Ut(Rt)&&(Rt=null),null!==Pt&&Ut(Pt)&&(Pt=null),Tt.forEach(Ft),Nt.forEach(Ft)}function zt(e,t){e.blockedOn===t&&(e.blockedOn=null,Ct||(Ct=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,jt)))}function Kt(e){function t(t){return zt(t,e)}if(0<xt.length){zt(xt[0],e);for(var r=1;r<xt.length;r++){var n=xt[r];n.blockedOn===e&&(n.blockedOn=null)}}for(null!==It&&zt(It,e),null!==Rt&&zt(Rt,e),null!==Pt&&zt(Pt,e),Tt.forEach(t),Nt.forEach(t),r=0;r<Dt.length;r++)(n=Dt[r]).blockedOn===e&&(n.blockedOn=null);for(;0<Dt.length&&null===(r=Dt[0]).blockedOn;)Lt(r),null===r.blockedOn&&Dt.shift()}var qt=w.ReactCurrentBatchConfig,Zt=!0;function Vt(e,t,r,n){var i=bt,o=qt.transition;qt.transition=null;try{bt=1,Wt(e,t,r,n)}finally{bt=i,qt.transition=o}}function Ht(e,t,r,n){var i=bt,o=qt.transition;qt.transition=null;try{bt=4,Wt(e,t,r,n)}finally{bt=i,qt.transition=o}}function Wt(e,t,r,n){if(Zt){var i=Yt(e,t,r,n);if(null===i)Zn(e,t,n,Gt,r),Mt(e,n);else if(function(e,t,r,n,i){switch(t){case"focusin":return It=Bt(It,e,t,r,n,i),!0;case"dragenter":return Rt=Bt(Rt,e,t,r,n,i),!0;case"mouseover":return Pt=Bt(Pt,e,t,r,n,i),!0;case"pointerover":var o=i.pointerId;return Tt.set(o,Bt(Tt.get(o)||null,e,t,r,n,i)),!0;case"gotpointercapture":return o=i.pointerId,Nt.set(o,Bt(Nt.get(o)||null,e,t,r,n,i)),!0}return!1}(i,e,t,r,n))n.stopPropagation();else if(Mt(e,n),4&t&&-1<Ot.indexOf(e)){for(;null!==i;){var o=bi(i);if(null!==o&&Et(o),null===(o=Yt(e,t,r,n))&&Zn(e,t,n,Gt,r),o===i)break;i=o}null!==i&&n.stopPropagation()}else Zn(e,t,n,null,r)}}var Gt=null;function Yt(e,t,r,n){if(Gt=null,null!==(e=vi(e=Ee(n))))if(null===(t=Ke(e)))e=null;else if(13===(r=t.tag)){if(null!==(e=qe(t)))return e;e=null}else if(3===r){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Gt=e,null}function Qt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Xe()){case $e:return 1;case et:return 4;case tt:case rt:return 16;case nt:return 536870912;default:return 16}default:return 16}}var Jt=null,Xt=null,$t=null;function er(){if($t)return $t;var e,t,r=Xt,n=r.length,i="value"in Jt?Jt.value:Jt.textContent,o=i.length;for(e=0;e<n&&r[e]===i[e];e++);var s=n-e;for(t=1;t<=s&&r[n-t]===i[o-t];t++);return $t=i.slice(e,1<t?1-t:void 0)}function tr(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function rr(){return!0}function nr(){return!1}function ir(e){function t(t,r,n,i,o){for(var s in this._reactName=t,this._targetInst=n,this.type=r,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(s)&&(t=e[s],this[s]=t?t(i):i[s]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?rr:nr,this.isPropagationStopped=nr,this}return L(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=rr)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=rr)},persist:function(){},isPersistent:rr}),t}var or,sr,ar,cr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},lr=ir(cr),ur=L({},cr,{view:0,detail:0}),hr=ir(ur),dr=L({},ur,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ar,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ar&&(ar&&"mousemove"===e.type?(or=e.screenX-ar.screenX,sr=e.screenY-ar.screenY):sr=or=0,ar=e),or)},movementY:function(e){return"movementY"in e?e.movementY:sr}}),fr=ir(dr),pr=ir(L({},dr,{dataTransfer:0})),gr=ir(L({},ur,{relatedTarget:0})),mr=ir(L({},cr,{animationName:0,elapsedTime:0,pseudoElement:0})),yr=L({},cr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),vr=ir(yr),br=ir(L({},cr,{data:0})),wr={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Er={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Sr={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function _r(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Sr[e])&&!!t[e]}function Ar(){return _r}var kr=L({},ur,{key:function(e){if(e.key){var t=wr[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tr(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Er[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ar,charCode:function(e){return"keypress"===e.type?tr(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tr(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Cr=ir(kr),xr=ir(L({},dr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Ir=ir(L({},ur,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ar})),Rr=ir(L({},cr,{propertyName:0,elapsedTime:0,pseudoElement:0})),Pr=L({},dr,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Tr=ir(Pr),Nr=[9,13,27,32],Dr=u&&"CompositionEvent"in window,Or=null;u&&"documentMode"in document&&(Or=document.documentMode);var Mr=u&&"TextEvent"in window&&!Or,Br=u&&(!Dr||Or&&8<Or&&11>=Or),Lr=String.fromCharCode(32),Ur=!1;function Fr(e,t){switch(e){case"keyup":return-1!==Nr.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jr(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var zr=!1;var Kr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function qr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Kr[e.type]:"textarea"===t}function Zr(e,t,r,n){Ce(n),0<(t=Hn(t,"onChange")).length&&(r=new lr("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Vr=null,Hr=null;function Wr(e){Un(e,0)}function Gr(e){if(W(wi(e)))return e}function Yr(e,t){if("change"===e)return t}var Qr=!1;if(u){var Jr;if(u){var Xr="oninput"in document;if(!Xr){var $r=document.createElement("div");$r.setAttribute("oninput","return;"),Xr="function"===typeof $r.oninput}Jr=Xr}else Jr=!1;Qr=Jr&&(!document.documentMode||9<document.documentMode)}function en(){Vr&&(Vr.detachEvent("onpropertychange",tn),Hr=Vr=null)}function tn(e){if("value"===e.propertyName&&Gr(Hr)){var t=[];Zr(t,Hr,e,Ee(e)),Te(Wr,t)}}function rn(e,t,r){"focusin"===e?(en(),Hr=r,(Vr=t).attachEvent("onpropertychange",tn)):"focusout"===e&&en()}function nn(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Gr(Hr)}function on(e,t){if("click"===e)return Gr(t)}function sn(e,t){if("input"===e||"change"===e)return Gr(t)}var an="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t};function cn(e,t){if(an(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var i=r[n];if(!h.call(t,i)||!an(e[i],t[i]))return!1}return!0}function ln(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function un(e,t){var r,n=ln(e);for(e=0;n;){if(3===n.nodeType){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=ln(n)}}function hn(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?hn(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function dn(){for(var e=window,t=G();t instanceof e.HTMLIFrameElement;){try{var r="string"===typeof t.contentWindow.location.href}catch(n){r=!1}if(!r)break;t=G((e=t.contentWindow).document)}return t}function fn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function pn(e){var t=dn(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&hn(r.ownerDocument.documentElement,r)){if(null!==n&&fn(r))if(t=n.start,void 0===(e=n.end)&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if((e=(t=r.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=r.textContent.length,o=Math.min(n.start,i);n=void 0===n.end?o:Math.min(n.end,i),!e.extend&&o>n&&(i=n,n=o,o=i),i=un(r,o);var s=un(r,n);i&&s&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),o>n?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}for(t=[],e=r;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"===typeof r.focus&&r.focus(),r=0;r<t.length;r++)(e=t[r]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var gn=u&&"documentMode"in document&&11>=document.documentMode,mn=null,yn=null,vn=null,bn=!1;function wn(e,t,r){var n=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;bn||null==mn||mn!==G(n)||("selectionStart"in(n=mn)&&fn(n)?n={start:n.selectionStart,end:n.selectionEnd}:n={anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},vn&&cn(vn,n)||(vn=n,0<(n=Hn(yn,"onSelect")).length&&(t=new lr("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=mn)))}function En(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Sn={animationend:En("Animation","AnimationEnd"),animationiteration:En("Animation","AnimationIteration"),animationstart:En("Animation","AnimationStart"),transitionend:En("Transition","TransitionEnd")},_n={},An={};function kn(e){if(_n[e])return _n[e];if(!Sn[e])return e;var t,r=Sn[e];for(t in r)if(r.hasOwnProperty(t)&&t in An)return _n[e]=r[t];return e}u&&(An=document.createElement("div").style,"AnimationEvent"in window||(delete Sn.animationend.animation,delete Sn.animationiteration.animation,delete Sn.animationstart.animation),"TransitionEvent"in window||delete Sn.transitionend.transition);var Cn=kn("animationend"),xn=kn("animationiteration"),In=kn("animationstart"),Rn=kn("transitionend"),Pn=new Map,Tn="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Nn(e,t){Pn.set(e,t),c(t,[e])}for(var Dn=0;Dn<Tn.length;Dn++){var On=Tn[Dn];Nn(On.toLowerCase(),"on"+(On[0].toUpperCase()+On.slice(1)))}Nn(Cn,"onAnimationEnd"),Nn(xn,"onAnimationIteration"),Nn(In,"onAnimationStart"),Nn("dblclick","onDoubleClick"),Nn("focusin","onFocus"),Nn("focusout","onBlur"),Nn(Rn,"onTransitionEnd"),l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),c("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),c("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),c("onBeforeInput",["compositionend","keypress","textInput","paste"]),c("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Mn="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Bn=new Set("cancel close invalid load scroll toggle".split(" ").concat(Mn));function Ln(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,function(e,t,r,n,i,s,a,c,l){if(ze.apply(this,arguments),Be){if(!Be)throw Error(o(198));var u=Le;Be=!1,Le=null,Ue||(Ue=!0,Fe=u)}}(n,t,void 0,e),e.currentTarget=null}function Un(e,t){t=0!==(4&t);for(var r=0;r<e.length;r++){var n=e[r],i=n.event;n=n.listeners;e:{var o=void 0;if(t)for(var s=n.length-1;0<=s;s--){var a=n[s],c=a.instance,l=a.currentTarget;if(a=a.listener,c!==o&&i.isPropagationStopped())break e;Ln(i,a,l),o=c}else for(s=0;s<n.length;s++){if(c=(a=n[s]).instance,l=a.currentTarget,a=a.listener,c!==o&&i.isPropagationStopped())break e;Ln(i,a,l),o=c}}}if(Ue)throw e=Fe,Ue=!1,Fe=null,e}function Fn(e,t){var r=t[gi];void 0===r&&(r=t[gi]=new Set);var n=e+"__bubble";r.has(n)||(qn(t,e,2,!1),r.add(n))}function jn(e,t,r){var n=0;t&&(n|=4),qn(r,e,n,t)}var zn="_reactListening"+Math.random().toString(36).slice(2);function Kn(e){if(!e[zn]){e[zn]=!0,s.forEach((function(t){"selectionchange"!==t&&(Bn.has(t)||jn(t,!1,e),jn(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[zn]||(t[zn]=!0,jn("selectionchange",!1,t))}}function qn(e,t,r,n){switch(Qt(t)){case 1:var i=Vt;break;case 4:i=Ht;break;default:i=Wt}r=i.bind(null,t,r,e),i=void 0,!De||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),n?void 0!==i?e.addEventListener(t,r,{capture:!0,passive:i}):e.addEventListener(t,r,!0):void 0!==i?e.addEventListener(t,r,{passive:i}):e.addEventListener(t,r,!1)}function Zn(e,t,r,n,i){var o=n;if(0===(1&t)&&0===(2&t)&&null!==n)e:for(;;){if(null===n)return;var s=n.tag;if(3===s||4===s){var a=n.stateNode.containerInfo;if(a===i||8===a.nodeType&&a.parentNode===i)break;if(4===s)for(s=n.return;null!==s;){var c=s.tag;if((3===c||4===c)&&((c=s.stateNode.containerInfo)===i||8===c.nodeType&&c.parentNode===i))return;s=s.return}for(;null!==a;){if(null===(s=vi(a)))return;if(5===(c=s.tag)||6===c){n=o=s;continue e}a=a.parentNode}}n=n.return}Te((function(){var n=o,i=Ee(r),s=[];e:{var a=Pn.get(e);if(void 0!==a){var c=lr,l=e;switch(e){case"keypress":if(0===tr(r))break e;case"keydown":case"keyup":c=Cr;break;case"focusin":l="focus",c=gr;break;case"focusout":l="blur",c=gr;break;case"beforeblur":case"afterblur":c=gr;break;case"click":if(2===r.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":c=fr;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":c=pr;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":c=Ir;break;case Cn:case xn:case In:c=mr;break;case Rn:c=Rr;break;case"scroll":c=hr;break;case"wheel":c=Tr;break;case"copy":case"cut":case"paste":c=vr;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":c=xr}var u=0!==(4&t),h=!u&&"scroll"===e,d=u?null!==a?a+"Capture":null:a;u=[];for(var f,p=n;null!==p;){var g=(f=p).stateNode;if(5===f.tag&&null!==g&&(f=g,null!==d&&(null!=(g=Ne(p,d))&&u.push(Vn(p,g,f)))),h)break;p=p.return}0<u.length&&(a=new c(a,l,null,r,i),s.push({event:a,listeners:u}))}}if(0===(7&t)){if(c="mouseout"===e||"pointerout"===e,(!(a="mouseover"===e||"pointerover"===e)||r===we||!(l=r.relatedTarget||r.fromElement)||!vi(l)&&!l[pi])&&(c||a)&&(a=i.window===i?i:(a=i.ownerDocument)?a.defaultView||a.parentWindow:window,c?(c=n,null!==(l=(l=r.relatedTarget||r.toElement)?vi(l):null)&&(l!==(h=Ke(l))||5!==l.tag&&6!==l.tag)&&(l=null)):(c=null,l=n),c!==l)){if(u=fr,g="onMouseLeave",d="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(u=xr,g="onPointerLeave",d="onPointerEnter",p="pointer"),h=null==c?a:wi(c),f=null==l?a:wi(l),(a=new u(g,p+"leave",c,r,i)).target=h,a.relatedTarget=f,g=null,vi(i)===n&&((u=new u(d,p+"enter",l,r,i)).target=f,u.relatedTarget=h,g=u),h=g,c&&l)e:{for(d=l,p=0,f=u=c;f;f=Wn(f))p++;for(f=0,g=d;g;g=Wn(g))f++;for(;0<p-f;)u=Wn(u),p--;for(;0<f-p;)d=Wn(d),f--;for(;p--;){if(u===d||null!==d&&u===d.alternate)break e;u=Wn(u),d=Wn(d)}u=null}else u=null;null!==c&&Gn(s,a,c,u,!1),null!==l&&null!==h&&Gn(s,h,l,u,!0)}if("select"===(c=(a=n?wi(n):window).nodeName&&a.nodeName.toLowerCase())||"input"===c&&"file"===a.type)var m=Yr;else if(qr(a))if(Qr)m=sn;else{m=nn;var y=rn}else(c=a.nodeName)&&"input"===c.toLowerCase()&&("checkbox"===a.type||"radio"===a.type)&&(m=on);switch(m&&(m=m(e,n))?Zr(s,m,r,i):(y&&y(e,a,n),"focusout"===e&&(y=a._wrapperState)&&y.controlled&&"number"===a.type&&ee(a,"number",a.value)),y=n?wi(n):window,e){case"focusin":(qr(y)||"true"===y.contentEditable)&&(mn=y,yn=n,vn=null);break;case"focusout":vn=yn=mn=null;break;case"mousedown":bn=!0;break;case"contextmenu":case"mouseup":case"dragend":bn=!1,wn(s,r,i);break;case"selectionchange":if(gn)break;case"keydown":case"keyup":wn(s,r,i)}var v;if(Dr)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else zr?Fr(e,r)&&(b="onCompositionEnd"):"keydown"===e&&229===r.keyCode&&(b="onCompositionStart");b&&(Br&&"ko"!==r.locale&&(zr||"onCompositionStart"!==b?"onCompositionEnd"===b&&zr&&(v=er()):(Xt="value"in(Jt=i)?Jt.value:Jt.textContent,zr=!0)),0<(y=Hn(n,b)).length&&(b=new br(b,e,null,r,i),s.push({event:b,listeners:y}),v?b.data=v:null!==(v=jr(r))&&(b.data=v))),(v=Mr?function(e,t){switch(e){case"compositionend":return jr(t);case"keypress":return 32!==t.which?null:(Ur=!0,Lr);case"textInput":return(e=t.data)===Lr&&Ur?null:e;default:return null}}(e,r):function(e,t){if(zr)return"compositionend"===e||!Dr&&Fr(e,t)?(e=er(),$t=Xt=Jt=null,zr=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Br&&"ko"!==t.locale?null:t.data}}(e,r))&&(0<(n=Hn(n,"onBeforeInput")).length&&(i=new br("onBeforeInput","beforeinput",null,r,i),s.push({event:i,listeners:n}),i.data=v))}Un(s,t)}))}function Vn(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Hn(e,t){for(var r=t+"Capture",n=[];null!==e;){var i=e,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=Ne(e,r))&&n.unshift(Vn(e,o,i)),null!=(o=Ne(e,t))&&n.push(Vn(e,o,i))),e=e.return}return n}function Wn(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Gn(e,t,r,n,i){for(var o=t._reactName,s=[];null!==r&&r!==n;){var a=r,c=a.alternate,l=a.stateNode;if(null!==c&&c===n)break;5===a.tag&&null!==l&&(a=l,i?null!=(c=Ne(r,o))&&s.unshift(Vn(r,c,a)):i||null!=(c=Ne(r,o))&&s.push(Vn(r,c,a))),r=r.return}0!==s.length&&e.push({event:t,listeners:s})}var Yn=/\r\n?/g,Qn=/\u0000|\uFFFD/g;function Jn(e){return("string"===typeof e?e:""+e).replace(Yn,"\n").replace(Qn,"")}function Xn(e,t,r){if(t=Jn(t),Jn(e)!==t&&r)throw Error(o(425))}function $n(){}var ei=null,ti=null;function ri(e,t){return"textarea"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ni="function"===typeof setTimeout?setTimeout:void 0,ii="function"===typeof clearTimeout?clearTimeout:void 0,oi="function"===typeof Promise?Promise:void 0,si="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof oi?function(e){return oi.resolve(null).then(e).catch(ai)}:ni;function ai(e){setTimeout((function(){throw e}))}function ci(e,t){var r=t,n=0;do{var i=r.nextSibling;if(e.removeChild(r),i&&8===i.nodeType)if("/$"===(r=i.data)){if(0===n)return e.removeChild(i),void Kt(t);n--}else"$"!==r&&"$?"!==r&&"$!"!==r||n++;r=i}while(r);Kt(t)}function li(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function ui(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var r=e.data;if("$"===r||"$!"===r||"$?"===r){if(0===t)return e;t--}else"/$"===r&&t++}e=e.previousSibling}return null}var hi=Math.random().toString(36).slice(2),di="__reactFiber$"+hi,fi="__reactProps$"+hi,pi="__reactContainer$"+hi,gi="__reactEvents$"+hi,mi="__reactListeners$"+hi,yi="__reactHandles$"+hi;function vi(e){var t=e[di];if(t)return t;for(var r=e.parentNode;r;){if(t=r[pi]||r[di]){if(r=t.alternate,null!==t.child||null!==r&&null!==r.child)for(e=ui(e);null!==e;){if(r=e[di])return r;e=ui(e)}return t}r=(e=r).parentNode}return null}function bi(e){return!(e=e[di]||e[pi])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function wi(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(o(33))}function Ei(e){return e[fi]||null}var Si=[],_i=-1;function Ai(e){return{current:e}}function ki(e){0>_i||(e.current=Si[_i],Si[_i]=null,_i--)}function Ci(e,t){_i++,Si[_i]=e.current,e.current=t}var xi={},Ii=Ai(xi),Ri=Ai(!1),Pi=xi;function Ti(e,t){var r=e.type.contextTypes;if(!r)return xi;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in r)o[i]=t[i];return n&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Ni(e){return null!==(e=e.childContextTypes)&&void 0!==e}function Di(){ki(Ri),ki(Ii)}function Oi(e,t,r){if(Ii.current!==xi)throw Error(o(168));Ci(Ii,t),Ci(Ri,r)}function Mi(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,"function"!==typeof n.getChildContext)return r;for(var i in n=n.getChildContext())if(!(i in t))throw Error(o(108,q(e)||"Unknown",i));return L({},r,n)}function Bi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||xi,Pi=Ii.current,Ci(Ii,e),Ci(Ri,Ri.current),!0}function Li(e,t,r){var n=e.stateNode;if(!n)throw Error(o(169));r?(e=Mi(e,t,Pi),n.__reactInternalMemoizedMergedChildContext=e,ki(Ri),ki(Ii),Ci(Ii,e)):ki(Ri),Ci(Ri,r)}var Ui=null,Fi=!1,ji=!1;function zi(e){null===Ui?Ui=[e]:Ui.push(e)}function Ki(){if(!ji&&null!==Ui){ji=!0;var e=0,t=bt;try{var r=Ui;for(bt=1;e<r.length;e++){var n=r[e];do{n=n(!0)}while(null!==n)}Ui=null,Fi=!1}catch(i){throw null!==Ui&&(Ui=Ui.slice(e+1)),We($e,Ki),i}finally{bt=t,ji=!1}}return null}var qi=[],Zi=0,Vi=null,Hi=0,Wi=[],Gi=0,Yi=null,Qi=1,Ji="";function Xi(e,t){qi[Zi++]=Hi,qi[Zi++]=Vi,Vi=e,Hi=t}function $i(e,t,r){Wi[Gi++]=Qi,Wi[Gi++]=Ji,Wi[Gi++]=Yi,Yi=e;var n=Qi;e=Ji;var i=32-st(n)-1;n&=~(1<<i),r+=1;var o=32-st(t)+i;if(30<o){var s=i-i%5;o=(n&(1<<s)-1).toString(32),n>>=s,i-=s,Qi=1<<32-st(t)+i|r<<i|n,Ji=o+e}else Qi=1<<o|r<<i|n,Ji=e}function eo(e){null!==e.return&&(Xi(e,1),$i(e,1,0))}function to(e){for(;e===Vi;)Vi=qi[--Zi],qi[Zi]=null,Hi=qi[--Zi],qi[Zi]=null;for(;e===Yi;)Yi=Wi[--Gi],Wi[Gi]=null,Ji=Wi[--Gi],Wi[Gi]=null,Qi=Wi[--Gi],Wi[Gi]=null}var ro=null,no=null,io=!1,oo=null;function so(e,t){var r=Tl(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,null===(t=e.deletions)?(e.deletions=[r],e.flags|=16):t.push(r)}function ao(e,t){switch(e.tag){case 5:var r=e.type;return null!==(t=1!==t.nodeType||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,ro=e,no=li(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,ro=e,no=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(r=null!==Yi?{id:Qi,overflow:Ji}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},(r=Tl(18,null,null,0)).stateNode=t,r.return=e,e.child=r,ro=e,no=null,!0);default:return!1}}function co(e){return 0!==(1&e.mode)&&0===(128&e.flags)}function lo(e){if(io){var t=no;if(t){var r=t;if(!ao(e,t)){if(co(e))throw Error(o(418));t=li(r.nextSibling);var n=ro;t&&ao(e,t)?so(n,r):(e.flags=-4097&e.flags|2,io=!1,ro=e)}}else{if(co(e))throw Error(o(418));e.flags=-4097&e.flags|2,io=!1,ro=e}}}function uo(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;ro=e}function ho(e){if(e!==ro)return!1;if(!io)return uo(e),io=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!ri(e.type,e.memoizedProps)),t&&(t=no)){if(co(e))throw fo(),Error(o(418));for(;t;)so(e,t),t=li(t.nextSibling)}if(uo(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(o(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var r=e.data;if("/$"===r){if(0===t){no=li(e.nextSibling);break e}t--}else"$"!==r&&"$!"!==r&&"$?"!==r||t++}e=e.nextSibling}no=null}}else no=ro?li(e.stateNode.nextSibling):null;return!0}function fo(){for(var e=no;e;)e=li(e.nextSibling)}function po(){no=ro=null,io=!1}function go(e){null===oo?oo=[e]:oo.push(e)}var mo=w.ReactCurrentBatchConfig;function yo(e,t){if(e&&e.defaultProps){for(var r in t=L({},t),e=e.defaultProps)void 0===t[r]&&(t[r]=e[r]);return t}return t}var vo=Ai(null),bo=null,wo=null,Eo=null;function So(){Eo=wo=bo=null}function _o(e){var t=vo.current;ki(vo),e._currentValue=t}function Ao(e,t,r){for(;null!==e;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==n&&(n.childLanes|=t)):null!==n&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function ko(e,t){bo=e,Eo=wo=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(wa=!0),e.firstContext=null)}function Co(e){var t=e._currentValue;if(Eo!==e)if(e={context:e,memoizedValue:t,next:null},null===wo){if(null===bo)throw Error(o(308));wo=e,bo.dependencies={lanes:0,firstContext:e}}else wo=wo.next=e;return t}var xo=null;function Io(e){null===xo?xo=[e]:xo.push(e)}function Ro(e,t,r,n){var i=t.interleaved;return null===i?(r.next=r,Io(t)):(r.next=i.next,i.next=r),t.interleaved=r,Po(e,n)}function Po(e,t){e.lanes|=t;var r=e.alternate;for(null!==r&&(r.lanes|=t),r=e,e=e.return;null!==e;)e.childLanes|=t,null!==(r=e.alternate)&&(r.childLanes|=t),r=e,e=e.return;return 3===r.tag?r.stateNode:null}var To=!1;function No(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Do(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Oo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Mo(e,t,r){var n=e.updateQueue;if(null===n)return null;if(n=n.shared,0!==(2&Ic)){var i=n.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),n.pending=t,Po(e,r)}return null===(i=n.interleaved)?(t.next=t,Io(n)):(t.next=i.next,i.next=t),n.interleaved=t,Po(e,r)}function Bo(e,t,r){if(null!==(t=t.updateQueue)&&(t=t.shared,0!==(4194240&r))){var n=t.lanes;r|=n&=e.pendingLanes,t.lanes=r,vt(e,r)}}function Lo(e,t){var r=e.updateQueue,n=e.alternate;if(null!==n&&r===(n=n.updateQueue)){var i=null,o=null;if(null!==(r=r.firstBaseUpdate)){do{var s={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};null===o?i=o=s:o=o.next=s,r=r.next}while(null!==r);null===o?i=o=t:o=o.next=t}else i=o=t;return r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:n.shared,effects:n.effects},void(e.updateQueue=r)}null===(e=r.lastBaseUpdate)?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Uo(e,t,r,n){var i=e.updateQueue;To=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(null!==a){i.shared.pending=null;var c=a,l=c.next;c.next=null,null===s?o=l:s.next=l,s=c;var u=e.alternate;null!==u&&((a=(u=u.updateQueue).lastBaseUpdate)!==s&&(null===a?u.firstBaseUpdate=l:a.next=l,u.lastBaseUpdate=c))}if(null!==o){var h=i.baseState;for(s=0,u=l=c=null,a=o;;){var d=a.lane,f=a.eventTime;if((n&d)===d){null!==u&&(u=u.next={eventTime:f,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=e,g=a;switch(d=t,f=r,g.tag){case 1:if("function"===typeof(p=g.payload)){h=p.call(f,h,d);break e}h=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null===(d="function"===typeof(p=g.payload)?p.call(f,h,d):p)||void 0===d)break e;h=L({},h,d);break e;case 2:To=!0}}null!==a.callback&&0!==a.lane&&(e.flags|=64,null===(d=i.effects)?i.effects=[a]:d.push(a))}else f={eventTime:f,lane:d,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===u?(l=u=f,c=h):u=u.next=f,s|=d;if(null===(a=a.next)){if(null===(a=i.shared.pending))break;a=(d=a).next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}if(null===u&&(c=h),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,null!==(t=i.shared.interleaved)){i=t;do{s|=i.lane,i=i.next}while(i!==t)}else null===o&&(i.shared.lanes=0);Bc|=s,e.lanes=s,e.memoizedState=h}}function Fo(e,t,r){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var n=e[t],i=n.callback;if(null!==i){if(n.callback=null,n=r,"function"!==typeof i)throw Error(o(191,i));i.call(n)}}}var jo=(new n.Component).refs;function zo(e,t,r,n){r=null===(r=r(n,t=e.memoizedState))||void 0===r?t:L({},t,r),e.memoizedState=r,0===e.lanes&&(e.updateQueue.baseState=r)}var Ko={isMounted:function(e){return!!(e=e._reactInternals)&&Ke(e)===e},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=el(),i=tl(e),o=Oo(n,i);o.payload=t,void 0!==r&&null!==r&&(o.callback=r),null!==(t=Mo(e,o,i))&&(rl(t,e,i,n),Bo(t,e,i))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=el(),i=tl(e),o=Oo(n,i);o.tag=1,o.payload=t,void 0!==r&&null!==r&&(o.callback=r),null!==(t=Mo(e,o,i))&&(rl(t,e,i,n),Bo(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=el(),n=tl(e),i=Oo(r,n);i.tag=2,void 0!==t&&null!==t&&(i.callback=t),null!==(t=Mo(e,i,n))&&(rl(t,e,n,r),Bo(t,e,n))}};function qo(e,t,r,n,i,o,s){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(n,o,s):!t.prototype||!t.prototype.isPureReactComponent||(!cn(r,n)||!cn(i,o))}function Zo(e,t,r){var n=!1,i=xi,o=t.contextType;return"object"===typeof o&&null!==o?o=Co(o):(i=Ni(t)?Pi:Ii.current,o=(n=null!==(n=t.contextTypes)&&void 0!==n)?Ti(e,i):xi),t=new t(r,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=Ko,e.stateNode=t,t._reactInternals=e,n&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function Vo(e,t,r,n){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(r,n),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&Ko.enqueueReplaceState(t,t.state,null)}function Ho(e,t,r,n){var i=e.stateNode;i.props=r,i.state=e.memoizedState,i.refs=jo,No(e);var o=t.contextType;"object"===typeof o&&null!==o?i.context=Co(o):(o=Ni(t)?Pi:Ii.current,i.context=Ti(e,o)),i.state=e.memoizedState,"function"===typeof(o=t.getDerivedStateFromProps)&&(zo(e,t,o,r),i.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof i.getSnapshotBeforeUpdate||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||(t=i.state,"function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&Ko.enqueueReplaceState(i,i.state,null),Uo(e,r,i,n),i.state=e.memoizedState),"function"===typeof i.componentDidMount&&(e.flags|=4194308)}function Wo(e,t,r){if(null!==(e=r.ref)&&"function"!==typeof e&&"object"!==typeof e){if(r._owner){if(r=r._owner){if(1!==r.tag)throw Error(o(309));var n=r.stateNode}if(!n)throw Error(o(147,e));var i=n,s=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===s?t.ref:(t=function(e){var t=i.refs;t===jo&&(t=i.refs={}),null===e?delete t[s]:t[s]=e},t._stringRef=s,t)}if("string"!==typeof e)throw Error(o(284));if(!r._owner)throw Error(o(290,e))}return e}function Go(e,t){throw e=Object.prototype.toString.call(t),Error(o(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Yo(e){return(0,e._init)(e._payload)}function Qo(e){function t(t,r){if(e){var n=t.deletions;null===n?(t.deletions=[r],t.flags|=16):n.push(r)}}function r(r,n){if(!e)return null;for(;null!==n;)t(r,n),n=n.sibling;return null}function n(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Dl(e,t)).index=0,e.sibling=null,e}function s(t,r,n){return t.index=n,e?null!==(n=t.alternate)?(n=n.index)<r?(t.flags|=2,r):n:(t.flags|=2,r):(t.flags|=1048576,r)}function a(t){return e&&null===t.alternate&&(t.flags|=2),t}function c(e,t,r,n){return null===t||6!==t.tag?((t=Ll(r,e.mode,n)).return=e,t):((t=i(t,r)).return=e,t)}function l(e,t,r,n){var o=r.type;return o===_?h(e,t,r.props.children,n,r.key):null!==t&&(t.elementType===o||"object"===typeof o&&null!==o&&o.$$typeof===N&&Yo(o)===t.type)?((n=i(t,r.props)).ref=Wo(e,t,r),n.return=e,n):((n=Ol(r.type,r.key,r.props,null,e.mode,n)).ref=Wo(e,t,r),n.return=e,n)}function u(e,t,r,n){return null===t||4!==t.tag||t.stateNode.containerInfo!==r.containerInfo||t.stateNode.implementation!==r.implementation?((t=Ul(r,e.mode,n)).return=e,t):((t=i(t,r.children||[])).return=e,t)}function h(e,t,r,n,o){return null===t||7!==t.tag?((t=Ml(r,e.mode,n,o)).return=e,t):((t=i(t,r)).return=e,t)}function d(e,t,r){if("string"===typeof t&&""!==t||"number"===typeof t)return(t=Ll(""+t,e.mode,r)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case E:return(r=Ol(t.type,t.key,t.props,null,e.mode,r)).ref=Wo(e,null,t),r.return=e,r;case S:return(t=Ul(t,e.mode,r)).return=e,t;case N:return d(e,(0,t._init)(t._payload),r)}if(te(t)||M(t))return(t=Ml(t,e.mode,r,null)).return=e,t;Go(e,t)}return null}function f(e,t,r,n){var i=null!==t?t.key:null;if("string"===typeof r&&""!==r||"number"===typeof r)return null!==i?null:c(e,t,""+r,n);if("object"===typeof r&&null!==r){switch(r.$$typeof){case E:return r.key===i?l(e,t,r,n):null;case S:return r.key===i?u(e,t,r,n):null;case N:return f(e,t,(i=r._init)(r._payload),n)}if(te(r)||M(r))return null!==i?null:h(e,t,r,n,null);Go(e,r)}return null}function p(e,t,r,n,i){if("string"===typeof n&&""!==n||"number"===typeof n)return c(t,e=e.get(r)||null,""+n,i);if("object"===typeof n&&null!==n){switch(n.$$typeof){case E:return l(t,e=e.get(null===n.key?r:n.key)||null,n,i);case S:return u(t,e=e.get(null===n.key?r:n.key)||null,n,i);case N:return p(e,t,r,(0,n._init)(n._payload),i)}if(te(n)||M(n))return h(t,e=e.get(r)||null,n,i,null);Go(t,n)}return null}function g(i,o,a,c){for(var l=null,u=null,h=o,g=o=0,m=null;null!==h&&g<a.length;g++){h.index>g?(m=h,h=null):m=h.sibling;var y=f(i,h,a[g],c);if(null===y){null===h&&(h=m);break}e&&h&&null===y.alternate&&t(i,h),o=s(y,o,g),null===u?l=y:u.sibling=y,u=y,h=m}if(g===a.length)return r(i,h),io&&Xi(i,g),l;if(null===h){for(;g<a.length;g++)null!==(h=d(i,a[g],c))&&(o=s(h,o,g),null===u?l=h:u.sibling=h,u=h);return io&&Xi(i,g),l}for(h=n(i,h);g<a.length;g++)null!==(m=p(h,i,g,a[g],c))&&(e&&null!==m.alternate&&h.delete(null===m.key?g:m.key),o=s(m,o,g),null===u?l=m:u.sibling=m,u=m);return e&&h.forEach((function(e){return t(i,e)})),io&&Xi(i,g),l}function m(i,a,c,l){var u=M(c);if("function"!==typeof u)throw Error(o(150));if(null==(c=u.call(c)))throw Error(o(151));for(var h=u=null,g=a,m=a=0,y=null,v=c.next();null!==g&&!v.done;m++,v=c.next()){g.index>m?(y=g,g=null):y=g.sibling;var b=f(i,g,v.value,l);if(null===b){null===g&&(g=y);break}e&&g&&null===b.alternate&&t(i,g),a=s(b,a,m),null===h?u=b:h.sibling=b,h=b,g=y}if(v.done)return r(i,g),io&&Xi(i,m),u;if(null===g){for(;!v.done;m++,v=c.next())null!==(v=d(i,v.value,l))&&(a=s(v,a,m),null===h?u=v:h.sibling=v,h=v);return io&&Xi(i,m),u}for(g=n(i,g);!v.done;m++,v=c.next())null!==(v=p(g,i,m,v.value,l))&&(e&&null!==v.alternate&&g.delete(null===v.key?m:v.key),a=s(v,a,m),null===h?u=v:h.sibling=v,h=v);return e&&g.forEach((function(e){return t(i,e)})),io&&Xi(i,m),u}return function e(n,o,s,c){if("object"===typeof s&&null!==s&&s.type===_&&null===s.key&&(s=s.props.children),"object"===typeof s&&null!==s){switch(s.$$typeof){case E:e:{for(var l=s.key,u=o;null!==u;){if(u.key===l){if((l=s.type)===_){if(7===u.tag){r(n,u.sibling),(o=i(u,s.props.children)).return=n,n=o;break e}}else if(u.elementType===l||"object"===typeof l&&null!==l&&l.$$typeof===N&&Yo(l)===u.type){r(n,u.sibling),(o=i(u,s.props)).ref=Wo(n,u,s),o.return=n,n=o;break e}r(n,u);break}t(n,u),u=u.sibling}s.type===_?((o=Ml(s.props.children,n.mode,c,s.key)).return=n,n=o):((c=Ol(s.type,s.key,s.props,null,n.mode,c)).ref=Wo(n,o,s),c.return=n,n=c)}return a(n);case S:e:{for(u=s.key;null!==o;){if(o.key===u){if(4===o.tag&&o.stateNode.containerInfo===s.containerInfo&&o.stateNode.implementation===s.implementation){r(n,o.sibling),(o=i(o,s.children||[])).return=n,n=o;break e}r(n,o);break}t(n,o),o=o.sibling}(o=Ul(s,n.mode,c)).return=n,n=o}return a(n);case N:return e(n,o,(u=s._init)(s._payload),c)}if(te(s))return g(n,o,s,c);if(M(s))return m(n,o,s,c);Go(n,s)}return"string"===typeof s&&""!==s||"number"===typeof s?(s=""+s,null!==o&&6===o.tag?(r(n,o.sibling),(o=i(o,s)).return=n,n=o):(r(n,o),(o=Ll(s,n.mode,c)).return=n,n=o),a(n)):r(n,o)}}var Jo=Qo(!0),Xo=Qo(!1),$o={},es=Ai($o),ts=Ai($o),rs=Ai($o);function ns(e){if(e===$o)throw Error(o(174));return e}function is(e,t){switch(Ci(rs,t),Ci(ts,e),Ci(es,$o),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ce(null,"");break;default:t=ce(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}ki(es),Ci(es,t)}function os(){ki(es),ki(ts),ki(rs)}function ss(e){ns(rs.current);var t=ns(es.current),r=ce(t,e.type);t!==r&&(Ci(ts,e),Ci(es,r))}function as(e){ts.current===e&&(ki(es),ki(ts))}var cs=Ai(0);function ls(e){for(var t=e;null!==t;){if(13===t.tag){var r=t.memoizedState;if(null!==r&&(null===(r=r.dehydrated)||"$?"===r.data||"$!"===r.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var us=[];function hs(){for(var e=0;e<us.length;e++)us[e]._workInProgressVersionPrimary=null;us.length=0}var ds=w.ReactCurrentDispatcher,fs=w.ReactCurrentBatchConfig,ps=0,gs=null,ms=null,ys=null,vs=!1,bs=!1,ws=0,Es=0;function Ss(){throw Error(o(321))}function _s(e,t){if(null===t)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!an(e[r],t[r]))return!1;return!0}function As(e,t,r,n,i,s){if(ps=s,gs=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ds.current=null===e||null===e.memoizedState?aa:ca,e=r(n,i),bs){s=0;do{if(bs=!1,ws=0,25<=s)throw Error(o(301));s+=1,ys=ms=null,t.updateQueue=null,ds.current=la,e=r(n,i)}while(bs)}if(ds.current=sa,t=null!==ms&&null!==ms.next,ps=0,ys=ms=gs=null,vs=!1,t)throw Error(o(300));return e}function ks(){var e=0!==ws;return ws=0,e}function Cs(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ys?gs.memoizedState=ys=e:ys=ys.next=e,ys}function xs(){if(null===ms){var e=gs.alternate;e=null!==e?e.memoizedState:null}else e=ms.next;var t=null===ys?gs.memoizedState:ys.next;if(null!==t)ys=t,ms=e;else{if(null===e)throw Error(o(310));e={memoizedState:(ms=e).memoizedState,baseState:ms.baseState,baseQueue:ms.baseQueue,queue:ms.queue,next:null},null===ys?gs.memoizedState=ys=e:ys=ys.next=e}return ys}function Is(e,t){return"function"===typeof t?t(e):t}function Rs(e){var t=xs(),r=t.queue;if(null===r)throw Error(o(311));r.lastRenderedReducer=e;var n=ms,i=n.baseQueue,s=r.pending;if(null!==s){if(null!==i){var a=i.next;i.next=s.next,s.next=a}n.baseQueue=i=s,r.pending=null}if(null!==i){s=i.next,n=n.baseState;var c=a=null,l=null,u=s;do{var h=u.lane;if((ps&h)===h)null!==l&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),n=u.hasEagerState?u.eagerState:e(n,u.action);else{var d={lane:h,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===l?(c=l=d,a=n):l=l.next=d,gs.lanes|=h,Bc|=h}u=u.next}while(null!==u&&u!==s);null===l?a=n:l.next=c,an(n,t.memoizedState)||(wa=!0),t.memoizedState=n,t.baseState=a,t.baseQueue=l,r.lastRenderedState=n}if(null!==(e=r.interleaved)){i=e;do{s=i.lane,gs.lanes|=s,Bc|=s,i=i.next}while(i!==e)}else null===i&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Ps(e){var t=xs(),r=t.queue;if(null===r)throw Error(o(311));r.lastRenderedReducer=e;var n=r.dispatch,i=r.pending,s=t.memoizedState;if(null!==i){r.pending=null;var a=i=i.next;do{s=e(s,a.action),a=a.next}while(a!==i);an(s,t.memoizedState)||(wa=!0),t.memoizedState=s,null===t.baseQueue&&(t.baseState=s),r.lastRenderedState=s}return[s,n]}function Ts(){}function Ns(e,t){var r=gs,n=xs(),i=t(),s=!an(n.memoizedState,i);if(s&&(n.memoizedState=i,wa=!0),n=n.queue,Zs(Ms.bind(null,r,n,e),[e]),n.getSnapshot!==t||s||null!==ys&&1&ys.memoizedState.tag){if(r.flags|=2048,Fs(9,Os.bind(null,r,n,i,t),void 0,null),null===Rc)throw Error(o(349));0!==(30&ps)||Ds(r,t,i)}return i}function Ds(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},null===(t=gs.updateQueue)?(t={lastEffect:null,stores:null},gs.updateQueue=t,t.stores=[e]):null===(r=t.stores)?t.stores=[e]:r.push(e)}function Os(e,t,r,n){t.value=r,t.getSnapshot=n,Bs(t)&&Ls(e)}function Ms(e,t,r){return r((function(){Bs(t)&&Ls(e)}))}function Bs(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!an(e,r)}catch(n){return!0}}function Ls(e){var t=Po(e,1);null!==t&&rl(t,e,1,-1)}function Us(e){var t=Cs();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Is,lastRenderedState:e},t.queue=e,e=e.dispatch=ra.bind(null,gs,e),[t.memoizedState,e]}function Fs(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},null===(t=gs.updateQueue)?(t={lastEffect:null,stores:null},gs.updateQueue=t,t.lastEffect=e.next=e):null===(r=t.lastEffect)?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e),e}function js(){return xs().memoizedState}function zs(e,t,r,n){var i=Cs();gs.flags|=e,i.memoizedState=Fs(1|t,r,void 0,void 0===n?null:n)}function Ks(e,t,r,n){var i=xs();n=void 0===n?null:n;var o=void 0;if(null!==ms){var s=ms.memoizedState;if(o=s.destroy,null!==n&&_s(n,s.deps))return void(i.memoizedState=Fs(t,r,o,n))}gs.flags|=e,i.memoizedState=Fs(1|t,r,o,n)}function qs(e,t){return zs(8390656,8,e,t)}function Zs(e,t){return Ks(2048,8,e,t)}function Vs(e,t){return Ks(4,2,e,t)}function Hs(e,t){return Ks(4,4,e,t)}function Ws(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Gs(e,t,r){return r=null!==r&&void 0!==r?r.concat([e]):null,Ks(4,4,Ws.bind(null,t,e),r)}function Ys(){}function Qs(e,t){var r=xs();t=void 0===t?null:t;var n=r.memoizedState;return null!==n&&null!==t&&_s(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function Js(e,t){var r=xs();t=void 0===t?null:t;var n=r.memoizedState;return null!==n&&null!==t&&_s(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function Xs(e,t,r){return 0===(21&ps)?(e.baseState&&(e.baseState=!1,wa=!0),e.memoizedState=r):(an(r,t)||(r=gt(),gs.lanes|=r,Bc|=r,e.baseState=!0),t)}function $s(e,t){var r=bt;bt=0!==r&&4>r?r:4,e(!0);var n=fs.transition;fs.transition={};try{e(!1),t()}finally{bt=r,fs.transition=n}}function ea(){return xs().memoizedState}function ta(e,t,r){var n=tl(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},na(e))ia(t,r);else if(null!==(r=Ro(e,t,r,n))){rl(r,e,n,el()),oa(r,t,n)}}function ra(e,t,r){var n=tl(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(na(e))ia(t,i);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var s=t.lastRenderedState,a=o(s,r);if(i.hasEagerState=!0,i.eagerState=a,an(a,s)){var c=t.interleaved;return null===c?(i.next=i,Io(t)):(i.next=c.next,c.next=i),void(t.interleaved=i)}}catch(l){}null!==(r=Ro(e,t,i,n))&&(rl(r,e,n,i=el()),oa(r,t,n))}}function na(e){var t=e.alternate;return e===gs||null!==t&&t===gs}function ia(e,t){bs=vs=!0;var r=e.pending;null===r?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function oa(e,t,r){if(0!==(4194240&r)){var n=t.lanes;r|=n&=e.pendingLanes,t.lanes=r,vt(e,r)}}var sa={readContext:Co,useCallback:Ss,useContext:Ss,useEffect:Ss,useImperativeHandle:Ss,useInsertionEffect:Ss,useLayoutEffect:Ss,useMemo:Ss,useReducer:Ss,useRef:Ss,useState:Ss,useDebugValue:Ss,useDeferredValue:Ss,useTransition:Ss,useMutableSource:Ss,useSyncExternalStore:Ss,useId:Ss,unstable_isNewReconciler:!1},aa={readContext:Co,useCallback:function(e,t){return Cs().memoizedState=[e,void 0===t?null:t],e},useContext:Co,useEffect:qs,useImperativeHandle:function(e,t,r){return r=null!==r&&void 0!==r?r.concat([e]):null,zs(4194308,4,Ws.bind(null,t,e),r)},useLayoutEffect:function(e,t){return zs(4194308,4,e,t)},useInsertionEffect:function(e,t){return zs(4,2,e,t)},useMemo:function(e,t){var r=Cs();return t=void 0===t?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Cs();return t=void 0!==r?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=ta.bind(null,gs,e),[n.memoizedState,e]},useRef:function(e){return e={current:e},Cs().memoizedState=e},useState:Us,useDebugValue:Ys,useDeferredValue:function(e){return Cs().memoizedState=e},useTransition:function(){var e=Us(!1),t=e[0];return e=$s.bind(null,e[1]),Cs().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=gs,i=Cs();if(io){if(void 0===r)throw Error(o(407));r=r()}else{if(r=t(),null===Rc)throw Error(o(349));0!==(30&ps)||Ds(n,t,r)}i.memoizedState=r;var s={value:r,getSnapshot:t};return i.queue=s,qs(Ms.bind(null,n,s,e),[e]),n.flags|=2048,Fs(9,Os.bind(null,n,s,r,t),void 0,null),r},useId:function(){var e=Cs(),t=Rc.identifierPrefix;if(io){var r=Ji;t=":"+t+"R"+(r=(Qi&~(1<<32-st(Qi)-1)).toString(32)+r),0<(r=ws++)&&(t+="H"+r.toString(32)),t+=":"}else t=":"+t+"r"+(r=Es++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ca={readContext:Co,useCallback:Qs,useContext:Co,useEffect:Zs,useImperativeHandle:Gs,useInsertionEffect:Vs,useLayoutEffect:Hs,useMemo:Js,useReducer:Rs,useRef:js,useState:function(){return Rs(Is)},useDebugValue:Ys,useDeferredValue:function(e){return Xs(xs(),ms.memoizedState,e)},useTransition:function(){return[Rs(Is)[0],xs().memoizedState]},useMutableSource:Ts,useSyncExternalStore:Ns,useId:ea,unstable_isNewReconciler:!1},la={readContext:Co,useCallback:Qs,useContext:Co,useEffect:Zs,useImperativeHandle:Gs,useInsertionEffect:Vs,useLayoutEffect:Hs,useMemo:Js,useReducer:Ps,useRef:js,useState:function(){return Ps(Is)},useDebugValue:Ys,useDeferredValue:function(e){var t=xs();return null===ms?t.memoizedState=e:Xs(t,ms.memoizedState,e)},useTransition:function(){return[Ps(Is)[0],xs().memoizedState]},useMutableSource:Ts,useSyncExternalStore:Ns,useId:ea,unstable_isNewReconciler:!1};function ua(e,t){try{var r="",n=t;do{r+=z(n),n=n.return}while(n);var i=r}catch(o){i="\nError generating stack: "+o.message+"\n"+o.stack}return{value:e,source:t,stack:i,digest:null}}function ha(e,t,r){return{value:e,source:null,stack:null!=r?r:null,digest:null!=t?t:null}}function da(e,t){try{console.error(t.value)}catch(r){setTimeout((function(){throw r}))}}var fa="function"===typeof WeakMap?WeakMap:Map;function pa(e,t,r){(r=Oo(-1,r)).tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){Zc||(Zc=!0,Vc=n),da(0,t)},r}function ga(e,t,r){(r=Oo(-1,r)).tag=3;var n=e.type.getDerivedStateFromError;if("function"===typeof n){var i=t.value;r.payload=function(){return n(i)},r.callback=function(){da(0,t)}}var o=e.stateNode;return null!==o&&"function"===typeof o.componentDidCatch&&(r.callback=function(){da(0,t),"function"!==typeof n&&(null===Hc?Hc=new Set([this]):Hc.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),r}function ma(e,t,r){var n=e.pingCache;if(null===n){n=e.pingCache=new fa;var i=new Set;n.set(t,i)}else void 0===(i=n.get(t))&&(i=new Set,n.set(t,i));i.has(r)||(i.add(r),e=kl.bind(null,e,t,r),t.then(e,e))}function ya(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function va(e,t,r,n,i){return 0===(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,1===r.tag&&(null===r.alternate?r.tag=17:((t=Oo(-1,1)).tag=2,Mo(r,t,1))),r.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var ba=w.ReactCurrentOwner,wa=!1;function Ea(e,t,r,n){t.child=null===e?Xo(t,null,r,n):Jo(t,e.child,r,n)}function Sa(e,t,r,n,i){r=r.render;var o=t.ref;return ko(t,i),n=As(e,t,r,n,o,i),r=ks(),null===e||wa?(io&&r&&eo(t),t.flags|=1,Ea(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Za(e,t,i))}function _a(e,t,r,n,i){if(null===e){var o=r.type;return"function"!==typeof o||Nl(o)||void 0!==o.defaultProps||null!==r.compare||void 0!==r.defaultProps?((e=Ol(r.type,null,n,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,Aa(e,t,o,n,i))}if(o=e.child,0===(e.lanes&i)){var s=o.memoizedProps;if((r=null!==(r=r.compare)?r:cn)(s,n)&&e.ref===t.ref)return Za(e,t,i)}return t.flags|=1,(e=Dl(o,n)).ref=t.ref,e.return=t,t.child=e}function Aa(e,t,r,n,i){if(null!==e){var o=e.memoizedProps;if(cn(o,n)&&e.ref===t.ref){if(wa=!1,t.pendingProps=n=o,0===(e.lanes&i))return t.lanes=e.lanes,Za(e,t,i);0!==(131072&e.flags)&&(wa=!0)}}return xa(e,t,r,n,i)}function ka(e,t,r){var n=t.pendingProps,i=n.children,o=null!==e?e.memoizedState:null;if("hidden"===n.mode)if(0===(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ci(Dc,Nc),Nc|=r;else{if(0===(1073741824&r))return e=null!==o?o.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ci(Dc,Nc),Nc|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=null!==o?o.baseLanes:r,Ci(Dc,Nc),Nc|=n}else null!==o?(n=o.baseLanes|r,t.memoizedState=null):n=r,Ci(Dc,Nc),Nc|=n;return Ea(e,t,i,r),t.child}function Ca(e,t){var r=t.ref;(null===e&&null!==r||null!==e&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function xa(e,t,r,n,i){var o=Ni(r)?Pi:Ii.current;return o=Ti(t,o),ko(t,i),r=As(e,t,r,n,o,i),n=ks(),null===e||wa?(io&&n&&eo(t),t.flags|=1,Ea(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Za(e,t,i))}function Ia(e,t,r,n,i){if(Ni(r)){var o=!0;Bi(t)}else o=!1;if(ko(t,i),null===t.stateNode)qa(e,t),Zo(t,r,n),Ho(t,r,n,i),n=!0;else if(null===e){var s=t.stateNode,a=t.memoizedProps;s.props=a;var c=s.context,l=r.contextType;"object"===typeof l&&null!==l?l=Co(l):l=Ti(t,l=Ni(r)?Pi:Ii.current);var u=r.getDerivedStateFromProps,h="function"===typeof u||"function"===typeof s.getSnapshotBeforeUpdate;h||"function"!==typeof s.UNSAFE_componentWillReceiveProps&&"function"!==typeof s.componentWillReceiveProps||(a!==n||c!==l)&&Vo(t,s,n,l),To=!1;var d=t.memoizedState;s.state=d,Uo(t,n,s,i),c=t.memoizedState,a!==n||d!==c||Ri.current||To?("function"===typeof u&&(zo(t,r,u,n),c=t.memoizedState),(a=To||qo(t,r,a,n,d,c,l))?(h||"function"!==typeof s.UNSAFE_componentWillMount&&"function"!==typeof s.componentWillMount||("function"===typeof s.componentWillMount&&s.componentWillMount(),"function"===typeof s.UNSAFE_componentWillMount&&s.UNSAFE_componentWillMount()),"function"===typeof s.componentDidMount&&(t.flags|=4194308)):("function"===typeof s.componentDidMount&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=c),s.props=n,s.state=c,s.context=l,n=a):("function"===typeof s.componentDidMount&&(t.flags|=4194308),n=!1)}else{s=t.stateNode,Do(e,t),a=t.memoizedProps,l=t.type===t.elementType?a:yo(t.type,a),s.props=l,h=t.pendingProps,d=s.context,"object"===typeof(c=r.contextType)&&null!==c?c=Co(c):c=Ti(t,c=Ni(r)?Pi:Ii.current);var f=r.getDerivedStateFromProps;(u="function"===typeof f||"function"===typeof s.getSnapshotBeforeUpdate)||"function"!==typeof s.UNSAFE_componentWillReceiveProps&&"function"!==typeof s.componentWillReceiveProps||(a!==h||d!==c)&&Vo(t,s,n,c),To=!1,d=t.memoizedState,s.state=d,Uo(t,n,s,i);var p=t.memoizedState;a!==h||d!==p||Ri.current||To?("function"===typeof f&&(zo(t,r,f,n),p=t.memoizedState),(l=To||qo(t,r,l,n,d,p,c)||!1)?(u||"function"!==typeof s.UNSAFE_componentWillUpdate&&"function"!==typeof s.componentWillUpdate||("function"===typeof s.componentWillUpdate&&s.componentWillUpdate(n,p,c),"function"===typeof s.UNSAFE_componentWillUpdate&&s.UNSAFE_componentWillUpdate(n,p,c)),"function"===typeof s.componentDidUpdate&&(t.flags|=4),"function"===typeof s.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!==typeof s.componentDidUpdate||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!==typeof s.getSnapshotBeforeUpdate||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=p),s.props=n,s.state=p,s.context=c,n=l):("function"!==typeof s.componentDidUpdate||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!==typeof s.getSnapshotBeforeUpdate||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),n=!1)}return Ra(e,t,r,n,o,i)}function Ra(e,t,r,n,i,o){Ca(e,t);var s=0!==(128&t.flags);if(!n&&!s)return i&&Li(t,r,!1),Za(e,t,o);n=t.stateNode,ba.current=t;var a=s&&"function"!==typeof r.getDerivedStateFromError?null:n.render();return t.flags|=1,null!==e&&s?(t.child=Jo(t,e.child,null,o),t.child=Jo(t,null,a,o)):Ea(e,t,a,o),t.memoizedState=n.state,i&&Li(t,r,!0),t.child}function Pa(e){var t=e.stateNode;t.pendingContext?Oi(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Oi(0,t.context,!1),is(e,t.containerInfo)}function Ta(e,t,r,n,i){return po(),go(i),t.flags|=256,Ea(e,t,r,n),t.child}var Na,Da,Oa,Ma={dehydrated:null,treeContext:null,retryLane:0};function Ba(e){return{baseLanes:e,cachePool:null,transitions:null}}function La(e,t,r){var n,i=t.pendingProps,s=cs.current,a=!1,c=0!==(128&t.flags);if((n=c)||(n=(null===e||null!==e.memoizedState)&&0!==(2&s)),n?(a=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(s|=1),Ci(cs,1&s),null===e)return lo(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0===(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(c=i.children,e=i.fallback,a?(i=t.mode,a=t.child,c={mode:"hidden",children:c},0===(1&i)&&null!==a?(a.childLanes=0,a.pendingProps=c):a=Bl(c,i,0,null),e=Ml(e,i,r,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Ba(r),t.memoizedState=Ma,e):Ua(t,c));if(null!==(s=e.memoizedState)&&null!==(n=s.dehydrated))return function(e,t,r,n,i,s,a){if(r)return 256&t.flags?(t.flags&=-257,Fa(e,t,a,n=ha(Error(o(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(s=n.fallback,i=t.mode,n=Bl({mode:"visible",children:n.children},i,0,null),(s=Ml(s,i,a,null)).flags|=2,n.return=t,s.return=t,n.sibling=s,t.child=n,0!==(1&t.mode)&&Jo(t,e.child,null,a),t.child.memoizedState=Ba(a),t.memoizedState=Ma,s);if(0===(1&t.mode))return Fa(e,t,a,null);if("$!"===i.data){if(n=i.nextSibling&&i.nextSibling.dataset)var c=n.dgst;return n=c,Fa(e,t,a,n=ha(s=Error(o(419)),n,void 0))}if(c=0!==(a&e.childLanes),wa||c){if(null!==(n=Rc)){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=0!==(i&(n.suspendedLanes|a))?0:i)&&i!==s.retryLane&&(s.retryLane=i,Po(e,i),rl(n,e,i,-1))}return gl(),Fa(e,t,a,n=ha(Error(o(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=xl.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,no=li(i.nextSibling),ro=t,io=!0,oo=null,null!==e&&(Wi[Gi++]=Qi,Wi[Gi++]=Ji,Wi[Gi++]=Yi,Qi=e.id,Ji=e.overflow,Yi=t),t=Ua(t,n.children),t.flags|=4096,t)}(e,t,c,i,n,s,r);if(a){a=i.fallback,c=t.mode,n=(s=e.child).sibling;var l={mode:"hidden",children:i.children};return 0===(1&c)&&t.child!==s?((i=t.child).childLanes=0,i.pendingProps=l,t.deletions=null):(i=Dl(s,l)).subtreeFlags=14680064&s.subtreeFlags,null!==n?a=Dl(n,a):(a=Ml(a,c,r,null)).flags|=2,a.return=t,i.return=t,i.sibling=a,t.child=i,i=a,a=t.child,c=null===(c=e.child.memoizedState)?Ba(r):{baseLanes:c.baseLanes|r,cachePool:null,transitions:c.transitions},a.memoizedState=c,a.childLanes=e.childLanes&~r,t.memoizedState=Ma,i}return e=(a=e.child).sibling,i=Dl(a,{mode:"visible",children:i.children}),0===(1&t.mode)&&(i.lanes=r),i.return=t,i.sibling=null,null!==e&&(null===(r=t.deletions)?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=i,t.memoizedState=null,i}function Ua(e,t){return(t=Bl({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Fa(e,t,r,n){return null!==n&&go(n),Jo(t,e.child,null,r),(e=Ua(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function ja(e,t,r){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),Ao(e.return,t,r)}function za(e,t,r,n,i){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=n,o.tail=r,o.tailMode=i)}function Ka(e,t,r){var n=t.pendingProps,i=n.revealOrder,o=n.tail;if(Ea(e,t,n.children,r),0!==(2&(n=cs.current)))n=1&n|2,t.flags|=128;else{if(null!==e&&0!==(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&ja(e,r,t);else if(19===e.tag)ja(e,r,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(Ci(cs,n),0===(1&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(r=t.child,i=null;null!==r;)null!==(e=r.alternate)&&null===ls(e)&&(i=r),r=r.sibling;null===(r=i)?(i=t.child,t.child=null):(i=r.sibling,r.sibling=null),za(t,!1,i,r,o);break;case"backwards":for(r=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===ls(e)){t.child=i;break}e=i.sibling,i.sibling=r,r=i,i=e}za(t,!0,r,null,o);break;case"together":za(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function qa(e,t){0===(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Za(e,t,r){if(null!==e&&(t.dependencies=e.dependencies),Bc|=t.lanes,0===(r&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(o(153));if(null!==t.child){for(r=Dl(e=t.child,e.pendingProps),t.child=r,r.return=t;null!==e.sibling;)e=e.sibling,(r=r.sibling=Dl(e,e.pendingProps)).return=t;r.sibling=null}return t.child}function Va(e,t){if(!io)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;null!==t;)null!==t.alternate&&(r=t),t=t.sibling;null===r?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;null!==r;)null!==r.alternate&&(n=r),r=r.sibling;null===n?t||null===e.tail?e.tail=null:e.tail.sibling=null:n.sibling=null}}function Ha(e){var t=null!==e.alternate&&e.alternate.child===e.child,r=0,n=0;if(t)for(var i=e.child;null!==i;)r|=i.lanes|i.childLanes,n|=14680064&i.subtreeFlags,n|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function Wa(e,t,r){var n=t.pendingProps;switch(to(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ha(t),null;case 1:case 17:return Ni(t.type)&&Di(),Ha(t),null;case 3:return n=t.stateNode,os(),ki(Ri),ki(Ii),hs(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||(ho(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0===(256&t.flags)||(t.flags|=1024,null!==oo&&(sl(oo),oo=null))),Ha(t),null;case 5:as(t);var i=ns(rs.current);if(r=t.type,null!==e&&null!=t.stateNode)Da(e,t,r,n),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(null===t.stateNode)throw Error(o(166));return Ha(t),null}if(e=ns(es.current),ho(t)){n=t.stateNode,r=t.type;var s=t.memoizedProps;switch(n[di]=t,n[fi]=s,e=0!==(1&t.mode),r){case"dialog":Fn("cancel",n),Fn("close",n);break;case"iframe":case"object":case"embed":Fn("load",n);break;case"video":case"audio":for(i=0;i<Mn.length;i++)Fn(Mn[i],n);break;case"source":Fn("error",n);break;case"img":case"image":case"link":Fn("error",n),Fn("load",n);break;case"details":Fn("toggle",n);break;case"input":Q(n,s),Fn("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!s.multiple},Fn("invalid",n);break;case"textarea":ie(n,s),Fn("invalid",n)}for(var c in ve(r,s),i=null,s)if(s.hasOwnProperty(c)){var l=s[c];"children"===c?"string"===typeof l?n.textContent!==l&&(!0!==s.suppressHydrationWarning&&Xn(n.textContent,l,e),i=["children",l]):"number"===typeof l&&n.textContent!==""+l&&(!0!==s.suppressHydrationWarning&&Xn(n.textContent,l,e),i=["children",""+l]):a.hasOwnProperty(c)&&null!=l&&"onScroll"===c&&Fn("scroll",n)}switch(r){case"input":H(n),$(n,s,!0);break;case"textarea":H(n),se(n);break;case"select":case"option":break;default:"function"===typeof s.onClick&&(n.onclick=$n)}n=i,t.updateQueue=n,null!==n&&(t.flags|=4)}else{c=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=ae(r)),"http://www.w3.org/1999/xhtml"===e?"script"===r?((e=c.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof n.is?e=c.createElement(r,{is:n.is}):(e=c.createElement(r),"select"===r&&(c=e,n.multiple?c.multiple=!0:n.size&&(c.size=n.size))):e=c.createElementNS(e,r),e[di]=t,e[fi]=n,Na(e,t),t.stateNode=e;e:{switch(c=be(r,n),r){case"dialog":Fn("cancel",e),Fn("close",e),i=n;break;case"iframe":case"object":case"embed":Fn("load",e),i=n;break;case"video":case"audio":for(i=0;i<Mn.length;i++)Fn(Mn[i],e);i=n;break;case"source":Fn("error",e),i=n;break;case"img":case"image":case"link":Fn("error",e),Fn("load",e),i=n;break;case"details":Fn("toggle",e),i=n;break;case"input":Q(e,n),i=Y(e,n),Fn("invalid",e);break;case"option":default:i=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},i=L({},n,{value:void 0}),Fn("invalid",e);break;case"textarea":ie(e,n),i=ne(e,n),Fn("invalid",e)}for(s in ve(r,i),l=i)if(l.hasOwnProperty(s)){var u=l[s];"style"===s?me(e,u):"dangerouslySetInnerHTML"===s?null!=(u=u?u.__html:void 0)&&he(e,u):"children"===s?"string"===typeof u?("textarea"!==r||""!==u)&&de(e,u):"number"===typeof u&&de(e,""+u):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(a.hasOwnProperty(s)?null!=u&&"onScroll"===s&&Fn("scroll",e):null!=u&&b(e,s,u,c))}switch(r){case"input":H(e),$(e,n,!1);break;case"textarea":H(e),se(e);break;case"option":null!=n.value&&e.setAttribute("value",""+Z(n.value));break;case"select":e.multiple=!!n.multiple,null!=(s=n.value)?re(e,!!n.multiple,s,!1):null!=n.defaultValue&&re(e,!!n.multiple,n.defaultValue,!0);break;default:"function"===typeof i.onClick&&(e.onclick=$n)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Ha(t),null;case 6:if(e&&null!=t.stateNode)Oa(0,t,e.memoizedProps,n);else{if("string"!==typeof n&&null===t.stateNode)throw Error(o(166));if(r=ns(rs.current),ns(es.current),ho(t)){if(n=t.stateNode,r=t.memoizedProps,n[di]=t,(s=n.nodeValue!==r)&&null!==(e=ro))switch(e.tag){case 3:Xn(n.nodeValue,r,0!==(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Xn(n.nodeValue,r,0!==(1&e.mode))}s&&(t.flags|=4)}else(n=(9===r.nodeType?r:r.ownerDocument).createTextNode(n))[di]=t,t.stateNode=n}return Ha(t),null;case 13:if(ki(cs),n=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(io&&null!==no&&0!==(1&t.mode)&&0===(128&t.flags))fo(),po(),t.flags|=98560,s=!1;else if(s=ho(t),null!==n&&null!==n.dehydrated){if(null===e){if(!s)throw Error(o(318));if(!(s=null!==(s=t.memoizedState)?s.dehydrated:null))throw Error(o(317));s[di]=t}else po(),0===(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Ha(t),s=!1}else null!==oo&&(sl(oo),oo=null),s=!0;if(!s)return 65536&t.flags?t:null}return 0!==(128&t.flags)?(t.lanes=r,t):((n=null!==n)!==(null!==e&&null!==e.memoizedState)&&n&&(t.child.flags|=8192,0!==(1&t.mode)&&(null===e||0!==(1&cs.current)?0===Oc&&(Oc=3):gl())),null!==t.updateQueue&&(t.flags|=4),Ha(t),null);case 4:return os(),null===e&&Kn(t.stateNode.containerInfo),Ha(t),null;case 10:return _o(t.type._context),Ha(t),null;case 19:if(ki(cs),null===(s=t.memoizedState))return Ha(t),null;if(n=0!==(128&t.flags),null===(c=s.rendering))if(n)Va(s,!1);else{if(0!==Oc||null!==e&&0!==(128&e.flags))for(e=t.child;null!==e;){if(null!==(c=ls(e))){for(t.flags|=128,Va(s,!1),null!==(n=c.updateQueue)&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;null!==r;)e=n,(s=r).flags&=14680066,null===(c=s.alternate)?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=c.childLanes,s.lanes=c.lanes,s.child=c.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=c.memoizedProps,s.memoizedState=c.memoizedState,s.updateQueue=c.updateQueue,s.type=c.type,e=c.dependencies,s.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return Ci(cs,1&cs.current|2),t.child}e=e.sibling}null!==s.tail&&Je()>Kc&&(t.flags|=128,n=!0,Va(s,!1),t.lanes=4194304)}else{if(!n)if(null!==(e=ls(c))){if(t.flags|=128,n=!0,null!==(r=e.updateQueue)&&(t.updateQueue=r,t.flags|=4),Va(s,!0),null===s.tail&&"hidden"===s.tailMode&&!c.alternate&&!io)return Ha(t),null}else 2*Je()-s.renderingStartTime>Kc&&1073741824!==r&&(t.flags|=128,n=!0,Va(s,!1),t.lanes=4194304);s.isBackwards?(c.sibling=t.child,t.child=c):(null!==(r=s.last)?r.sibling=c:t.child=c,s.last=c)}return null!==s.tail?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Je(),t.sibling=null,r=cs.current,Ci(cs,n?1&r|2:1&r),t):(Ha(t),null);case 22:case 23:return hl(),n=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==n&&(t.flags|=8192),n&&0!==(1&t.mode)?0!==(1073741824&Nc)&&(Ha(t),6&t.subtreeFlags&&(t.flags|=8192)):Ha(t),null;case 24:case 25:return null}throw Error(o(156,t.tag))}function Ga(e,t){switch(to(t),t.tag){case 1:return Ni(t.type)&&Di(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return os(),ki(Ri),ki(Ii),hs(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 5:return as(t),null;case 13:if(ki(cs),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(o(340));po()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return ki(cs),null;case 4:return os(),null;case 10:return _o(t.type._context),null;case 22:case 23:return hl(),null;default:return null}}Na=function(e,t){for(var r=t.child;null!==r;){if(5===r.tag||6===r.tag)e.appendChild(r.stateNode);else if(4!==r.tag&&null!==r.child){r.child.return=r,r=r.child;continue}if(r===t)break;for(;null===r.sibling;){if(null===r.return||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}},Da=function(e,t,r,n){var i=e.memoizedProps;if(i!==n){e=t.stateNode,ns(es.current);var o,s=null;switch(r){case"input":i=Y(e,i),n=Y(e,n),s=[];break;case"select":i=L({},i,{value:void 0}),n=L({},n,{value:void 0}),s=[];break;case"textarea":i=ne(e,i),n=ne(e,n),s=[];break;default:"function"!==typeof i.onClick&&"function"===typeof n.onClick&&(e.onclick=$n)}for(u in ve(r,n),r=null,i)if(!n.hasOwnProperty(u)&&i.hasOwnProperty(u)&&null!=i[u])if("style"===u){var c=i[u];for(o in c)c.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(a.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in n){var l=n[u];if(c=null!=i?i[u]:void 0,n.hasOwnProperty(u)&&l!==c&&(null!=l||null!=c))if("style"===u)if(c){for(o in c)!c.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in l)l.hasOwnProperty(o)&&c[o]!==l[o]&&(r||(r={}),r[o]=l[o])}else r||(s||(s=[]),s.push(u,r)),r=l;else"dangerouslySetInnerHTML"===u?(l=l?l.__html:void 0,c=c?c.__html:void 0,null!=l&&c!==l&&(s=s||[]).push(u,l)):"children"===u?"string"!==typeof l&&"number"!==typeof l||(s=s||[]).push(u,""+l):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(a.hasOwnProperty(u)?(null!=l&&"onScroll"===u&&Fn("scroll",e),s||c===l||(s=[])):(s=s||[]).push(u,l))}r&&(s=s||[]).push("style",r);var u=s;(t.updateQueue=u)&&(t.flags|=4)}},Oa=function(e,t,r,n){r!==n&&(t.flags|=4)};var Ya=!1,Qa=!1,Ja="function"===typeof WeakSet?WeakSet:Set,Xa=null;function $a(e,t){var r=e.ref;if(null!==r)if("function"===typeof r)try{r(null)}catch(n){Al(e,t,n)}else r.current=null}function ec(e,t,r){try{r()}catch(n){Al(e,t,n)}}var tc=!1;function rc(e,t,r){var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var i=n=n.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,void 0!==o&&ec(t,r,o)}i=i.next}while(i!==n)}}function nc(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function ic(e){var t=e.ref;if(null!==t){var r=e.stateNode;e.tag,e=r,"function"===typeof t?t(e):t.current=e}}function oc(e){var t=e.alternate;null!==t&&(e.alternate=null,oc(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[di],delete t[fi],delete t[gi],delete t[mi],delete t[yi])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function sc(e){return 5===e.tag||3===e.tag||4===e.tag}function ac(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||sc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function cc(e,t,r){var n=e.tag;if(5===n||6===n)e=e.stateNode,t?8===r.nodeType?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(8===r.nodeType?(t=r.parentNode).insertBefore(e,r):(t=r).appendChild(e),null!==(r=r._reactRootContainer)&&void 0!==r||null!==t.onclick||(t.onclick=$n));else if(4!==n&&null!==(e=e.child))for(cc(e,t,r),e=e.sibling;null!==e;)cc(e,t,r),e=e.sibling}function lc(e,t,r){var n=e.tag;if(5===n||6===n)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(4!==n&&null!==(e=e.child))for(lc(e,t,r),e=e.sibling;null!==e;)lc(e,t,r),e=e.sibling}var uc=null,hc=!1;function dc(e,t,r){for(r=r.child;null!==r;)fc(e,t,r),r=r.sibling}function fc(e,t,r){if(ot&&"function"===typeof ot.onCommitFiberUnmount)try{ot.onCommitFiberUnmount(it,r)}catch(a){}switch(r.tag){case 5:Qa||$a(r,t);case 6:var n=uc,i=hc;uc=null,dc(e,t,r),hc=i,null!==(uc=n)&&(hc?(e=uc,r=r.stateNode,8===e.nodeType?e.parentNode.removeChild(r):e.removeChild(r)):uc.removeChild(r.stateNode));break;case 18:null!==uc&&(hc?(e=uc,r=r.stateNode,8===e.nodeType?ci(e.parentNode,r):1===e.nodeType&&ci(e,r),Kt(e)):ci(uc,r.stateNode));break;case 4:n=uc,i=hc,uc=r.stateNode.containerInfo,hc=!0,dc(e,t,r),uc=n,hc=i;break;case 0:case 11:case 14:case 15:if(!Qa&&(null!==(n=r.updateQueue)&&null!==(n=n.lastEffect))){i=n=n.next;do{var o=i,s=o.destroy;o=o.tag,void 0!==s&&(0!==(2&o)||0!==(4&o))&&ec(r,t,s),i=i.next}while(i!==n)}dc(e,t,r);break;case 1:if(!Qa&&($a(r,t),"function"===typeof(n=r.stateNode).componentWillUnmount))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){Al(r,t,a)}dc(e,t,r);break;case 21:dc(e,t,r);break;case 22:1&r.mode?(Qa=(n=Qa)||null!==r.memoizedState,dc(e,t,r),Qa=n):dc(e,t,r);break;default:dc(e,t,r)}}function pc(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var r=e.stateNode;null===r&&(r=e.stateNode=new Ja),t.forEach((function(t){var n=Il.bind(null,e,t);r.has(t)||(r.add(t),t.then(n,n))}))}}function gc(e,t){var r=t.deletions;if(null!==r)for(var n=0;n<r.length;n++){var i=r[n];try{var s=e,a=t,c=a;e:for(;null!==c;){switch(c.tag){case 5:uc=c.stateNode,hc=!1;break e;case 3:case 4:uc=c.stateNode.containerInfo,hc=!0;break e}c=c.return}if(null===uc)throw Error(o(160));fc(s,a,i),uc=null,hc=!1;var l=i.alternate;null!==l&&(l.return=null),i.return=null}catch(u){Al(i,t,u)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)mc(t,e),t=t.sibling}function mc(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(gc(t,e),yc(e),4&n){try{rc(3,e,e.return),nc(3,e)}catch(m){Al(e,e.return,m)}try{rc(5,e,e.return)}catch(m){Al(e,e.return,m)}}break;case 1:gc(t,e),yc(e),512&n&&null!==r&&$a(r,r.return);break;case 5:if(gc(t,e),yc(e),512&n&&null!==r&&$a(r,r.return),32&e.flags){var i=e.stateNode;try{de(i,"")}catch(m){Al(e,e.return,m)}}if(4&n&&null!=(i=e.stateNode)){var s=e.memoizedProps,a=null!==r?r.memoizedProps:s,c=e.type,l=e.updateQueue;if(e.updateQueue=null,null!==l)try{"input"===c&&"radio"===s.type&&null!=s.name&&J(i,s),be(c,a);var u=be(c,s);for(a=0;a<l.length;a+=2){var h=l[a],d=l[a+1];"style"===h?me(i,d):"dangerouslySetInnerHTML"===h?he(i,d):"children"===h?de(i,d):b(i,h,d,u)}switch(c){case"input":X(i,s);break;case"textarea":oe(i,s);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var p=s.value;null!=p?re(i,!!s.multiple,p,!1):f!==!!s.multiple&&(null!=s.defaultValue?re(i,!!s.multiple,s.defaultValue,!0):re(i,!!s.multiple,s.multiple?[]:"",!1))}i[fi]=s}catch(m){Al(e,e.return,m)}}break;case 6:if(gc(t,e),yc(e),4&n){if(null===e.stateNode)throw Error(o(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(m){Al(e,e.return,m)}}break;case 3:if(gc(t,e),yc(e),4&n&&null!==r&&r.memoizedState.isDehydrated)try{Kt(t.containerInfo)}catch(m){Al(e,e.return,m)}break;case 4:default:gc(t,e),yc(e);break;case 13:gc(t,e),yc(e),8192&(i=e.child).flags&&(s=null!==i.memoizedState,i.stateNode.isHidden=s,!s||null!==i.alternate&&null!==i.alternate.memoizedState||(zc=Je())),4&n&&pc(e);break;case 22:if(h=null!==r&&null!==r.memoizedState,1&e.mode?(Qa=(u=Qa)||h,gc(t,e),Qa=u):gc(t,e),yc(e),8192&n){if(u=null!==e.memoizedState,(e.stateNode.isHidden=u)&&!h&&0!==(1&e.mode))for(Xa=e,h=e.child;null!==h;){for(d=Xa=h;null!==Xa;){switch(p=(f=Xa).child,f.tag){case 0:case 11:case 14:case 15:rc(4,f,f.return);break;case 1:$a(f,f.return);var g=f.stateNode;if("function"===typeof g.componentWillUnmount){n=f,r=f.return;try{t=n,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(m){Al(n,r,m)}}break;case 5:$a(f,f.return);break;case 22:if(null!==f.memoizedState){Ec(d);continue}}null!==p?(p.return=f,Xa=p):Ec(d)}h=h.sibling}e:for(h=null,d=e;;){if(5===d.tag){if(null===h){h=d;try{i=d.stateNode,u?"function"===typeof(s=i.style).setProperty?s.setProperty("display","none","important"):s.display="none":(c=d.stateNode,a=void 0!==(l=d.memoizedProps.style)&&null!==l&&l.hasOwnProperty("display")?l.display:null,c.style.display=ge("display",a))}catch(m){Al(e,e.return,m)}}}else if(6===d.tag){if(null===h)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(m){Al(e,e.return,m)}}else if((22!==d.tag&&23!==d.tag||null===d.memoizedState||d===e)&&null!==d.child){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;null===d.sibling;){if(null===d.return||d.return===e)break e;h===d&&(h=null),d=d.return}h===d&&(h=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:gc(t,e),yc(e),4&n&&pc(e);case 21:}}function yc(e){var t=e.flags;if(2&t){try{e:{for(var r=e.return;null!==r;){if(sc(r)){var n=r;break e}r=r.return}throw Error(o(160))}switch(n.tag){case 5:var i=n.stateNode;32&n.flags&&(de(i,""),n.flags&=-33),lc(e,ac(e),i);break;case 3:case 4:var s=n.stateNode.containerInfo;cc(e,ac(e),s);break;default:throw Error(o(161))}}catch(a){Al(e,e.return,a)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function vc(e,t,r){Xa=e,bc(e,t,r)}function bc(e,t,r){for(var n=0!==(1&e.mode);null!==Xa;){var i=Xa,o=i.child;if(22===i.tag&&n){var s=null!==i.memoizedState||Ya;if(!s){var a=i.alternate,c=null!==a&&null!==a.memoizedState||Qa;a=Ya;var l=Qa;if(Ya=s,(Qa=c)&&!l)for(Xa=i;null!==Xa;)c=(s=Xa).child,22===s.tag&&null!==s.memoizedState?Sc(i):null!==c?(c.return=s,Xa=c):Sc(i);for(;null!==o;)Xa=o,bc(o,t,r),o=o.sibling;Xa=i,Ya=a,Qa=l}wc(e)}else 0!==(8772&i.subtreeFlags)&&null!==o?(o.return=i,Xa=o):wc(e)}}function wc(e){for(;null!==Xa;){var t=Xa;if(0!==(8772&t.flags)){var r=t.alternate;try{if(0!==(8772&t.flags))switch(t.tag){case 0:case 11:case 15:Qa||nc(5,t);break;case 1:var n=t.stateNode;if(4&t.flags&&!Qa)if(null===r)n.componentDidMount();else{var i=t.elementType===t.type?r.memoizedProps:yo(t.type,r.memoizedProps);n.componentDidUpdate(i,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;null!==s&&Fo(t,s,n);break;case 3:var a=t.updateQueue;if(null!==a){if(r=null,null!==t.child)switch(t.child.tag){case 5:case 1:r=t.child.stateNode}Fo(t,a,r)}break;case 5:var c=t.stateNode;if(null===r&&4&t.flags){r=c;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var u=t.alternate;if(null!==u){var h=u.memoizedState;if(null!==h){var d=h.dehydrated;null!==d&&Kt(d)}}}break;default:throw Error(o(163))}Qa||512&t.flags&&ic(t)}catch(f){Al(t,t.return,f)}}if(t===e){Xa=null;break}if(null!==(r=t.sibling)){r.return=t.return,Xa=r;break}Xa=t.return}}function Ec(e){for(;null!==Xa;){var t=Xa;if(t===e){Xa=null;break}var r=t.sibling;if(null!==r){r.return=t.return,Xa=r;break}Xa=t.return}}function Sc(e){for(;null!==Xa;){var t=Xa;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{nc(4,t)}catch(c){Al(t,r,c)}break;case 1:var n=t.stateNode;if("function"===typeof n.componentDidMount){var i=t.return;try{n.componentDidMount()}catch(c){Al(t,i,c)}}var o=t.return;try{ic(t)}catch(c){Al(t,o,c)}break;case 5:var s=t.return;try{ic(t)}catch(c){Al(t,s,c)}}}catch(c){Al(t,t.return,c)}if(t===e){Xa=null;break}var a=t.sibling;if(null!==a){a.return=t.return,Xa=a;break}Xa=t.return}}var _c,Ac=Math.ceil,kc=w.ReactCurrentDispatcher,Cc=w.ReactCurrentOwner,xc=w.ReactCurrentBatchConfig,Ic=0,Rc=null,Pc=null,Tc=0,Nc=0,Dc=Ai(0),Oc=0,Mc=null,Bc=0,Lc=0,Uc=0,Fc=null,jc=null,zc=0,Kc=1/0,qc=null,Zc=!1,Vc=null,Hc=null,Wc=!1,Gc=null,Yc=0,Qc=0,Jc=null,Xc=-1,$c=0;function el(){return 0!==(6&Ic)?Je():-1!==Xc?Xc:Xc=Je()}function tl(e){return 0===(1&e.mode)?1:0!==(2&Ic)&&0!==Tc?Tc&-Tc:null!==mo.transition?(0===$c&&($c=gt()),$c):0!==(e=bt)?e:e=void 0===(e=window.event)?16:Qt(e.type)}function rl(e,t,r,n){if(50<Qc)throw Qc=0,Jc=null,Error(o(185));yt(e,r,n),0!==(2&Ic)&&e===Rc||(e===Rc&&(0===(2&Ic)&&(Lc|=r),4===Oc&&al(e,Tc)),nl(e,n),1===r&&0===Ic&&0===(1&t.mode)&&(Kc=Je()+500,Fi&&Ki()))}function nl(e,t){var r=e.callbackNode;!function(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var s=31-st(o),a=1<<s,c=i[s];-1===c?0!==(a&r)&&0===(a&n)||(i[s]=ft(a,t)):c<=t&&(e.expiredLanes|=a),o&=~a}}(e,t);var n=dt(e,e===Rc?Tc:0);if(0===n)null!==r&&Ge(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(null!=r&&Ge(r),1===t)0===e.tag?function(e){Fi=!0,zi(e)}(cl.bind(null,e)):zi(cl.bind(null,e)),si((function(){0===(6&Ic)&&Ki()})),r=null;else{switch(wt(n)){case 1:r=$e;break;case 4:r=et;break;case 16:default:r=tt;break;case 536870912:r=nt}r=Rl(r,il.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function il(e,t){if(Xc=-1,$c=0,0!==(6&Ic))throw Error(o(327));var r=e.callbackNode;if(Sl()&&e.callbackNode!==r)return null;var n=dt(e,e===Rc?Tc:0);if(0===n)return null;if(0!==(30&n)||0!==(n&e.expiredLanes)||t)t=ml(e,n);else{t=n;var i=Ic;Ic|=2;var s=pl();for(Rc===e&&Tc===t||(qc=null,Kc=Je()+500,dl(e,t));;)try{vl();break}catch(c){fl(e,c)}So(),kc.current=s,Ic=i,null!==Pc?t=0:(Rc=null,Tc=0,t=Oc)}if(0!==t){if(2===t&&(0!==(i=pt(e))&&(n=i,t=ol(e,i))),1===t)throw r=Mc,dl(e,0),al(e,n),nl(e,Je()),r;if(6===t)al(e,n);else{if(i=e.current.alternate,0===(30&n)&&!function(e){for(var t=e;;){if(16384&t.flags){var r=t.updateQueue;if(null!==r&&null!==(r=r.stores))for(var n=0;n<r.length;n++){var i=r[n],o=i.getSnapshot;i=i.value;try{if(!an(o(),i))return!1}catch(a){return!1}}}if(r=t.child,16384&t.subtreeFlags&&null!==r)r.return=t,t=r;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(i)&&(2===(t=ml(e,n))&&(0!==(s=pt(e))&&(n=s,t=ol(e,s))),1===t))throw r=Mc,dl(e,0),al(e,n),nl(e,Je()),r;switch(e.finishedWork=i,e.finishedLanes=n,t){case 0:case 1:throw Error(o(345));case 2:case 5:El(e,jc,qc);break;case 3:if(al(e,n),(130023424&n)===n&&10<(t=zc+500-Je())){if(0!==dt(e,0))break;if(((i=e.suspendedLanes)&n)!==n){el(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=ni(El.bind(null,e,jc,qc),t);break}El(e,jc,qc);break;case 4:if(al(e,n),(4194240&n)===n)break;for(t=e.eventTimes,i=-1;0<n;){var a=31-st(n);s=1<<a,(a=t[a])>i&&(i=a),n&=~s}if(n=i,10<(n=(120>(n=Je()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Ac(n/1960))-n)){e.timeoutHandle=ni(El.bind(null,e,jc,qc),n);break}El(e,jc,qc);break;default:throw Error(o(329))}}}return nl(e,Je()),e.callbackNode===r?il.bind(null,e):null}function ol(e,t){var r=Fc;return e.current.memoizedState.isDehydrated&&(dl(e,t).flags|=256),2!==(e=ml(e,t))&&(t=jc,jc=r,null!==t&&sl(t)),e}function sl(e){null===jc?jc=e:jc.push.apply(jc,e)}function al(e,t){for(t&=~Uc,t&=~Lc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-st(t),n=1<<r;e[r]=-1,t&=~n}}function cl(e){if(0!==(6&Ic))throw Error(o(327));Sl();var t=dt(e,0);if(0===(1&t))return nl(e,Je()),null;var r=ml(e,t);if(0!==e.tag&&2===r){var n=pt(e);0!==n&&(t=n,r=ol(e,n))}if(1===r)throw r=Mc,dl(e,0),al(e,t),nl(e,Je()),r;if(6===r)throw Error(o(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,El(e,jc,qc),nl(e,Je()),null}function ll(e,t){var r=Ic;Ic|=1;try{return e(t)}finally{0===(Ic=r)&&(Kc=Je()+500,Fi&&Ki())}}function ul(e){null!==Gc&&0===Gc.tag&&0===(6&Ic)&&Sl();var t=Ic;Ic|=1;var r=xc.transition,n=bt;try{if(xc.transition=null,bt=1,e)return e()}finally{bt=n,xc.transition=r,0===(6&(Ic=t))&&Ki()}}function hl(){Nc=Dc.current,ki(Dc)}function dl(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(-1!==r&&(e.timeoutHandle=-1,ii(r)),null!==Pc)for(r=Pc.return;null!==r;){var n=r;switch(to(n),n.tag){case 1:null!==(n=n.type.childContextTypes)&&void 0!==n&&Di();break;case 3:os(),ki(Ri),ki(Ii),hs();break;case 5:as(n);break;case 4:os();break;case 13:case 19:ki(cs);break;case 10:_o(n.type._context);break;case 22:case 23:hl()}r=r.return}if(Rc=e,Pc=e=Dl(e.current,null),Tc=Nc=t,Oc=0,Mc=null,Uc=Lc=Bc=0,jc=Fc=null,null!==xo){for(t=0;t<xo.length;t++)if(null!==(n=(r=xo[t]).interleaved)){r.interleaved=null;var i=n.next,o=r.pending;if(null!==o){var s=o.next;o.next=i,n.next=s}r.pending=n}xo=null}return e}function fl(e,t){for(;;){var r=Pc;try{if(So(),ds.current=sa,vs){for(var n=gs.memoizedState;null!==n;){var i=n.queue;null!==i&&(i.pending=null),n=n.next}vs=!1}if(ps=0,ys=ms=gs=null,bs=!1,ws=0,Cc.current=null,null===r||null===r.return){Oc=1,Mc=t,Pc=null;break}e:{var s=e,a=r.return,c=r,l=t;if(t=Tc,c.flags|=32768,null!==l&&"object"===typeof l&&"function"===typeof l.then){var u=l,h=c,d=h.tag;if(0===(1&h.mode)&&(0===d||11===d||15===d)){var f=h.alternate;f?(h.updateQueue=f.updateQueue,h.memoizedState=f.memoizedState,h.lanes=f.lanes):(h.updateQueue=null,h.memoizedState=null)}var p=ya(a);if(null!==p){p.flags&=-257,va(p,a,c,0,t),1&p.mode&&ma(s,u,t),l=u;var g=(t=p).updateQueue;if(null===g){var m=new Set;m.add(l),t.updateQueue=m}else g.add(l);break e}if(0===(1&t)){ma(s,u,t),gl();break e}l=Error(o(426))}else if(io&&1&c.mode){var y=ya(a);if(null!==y){0===(65536&y.flags)&&(y.flags|=256),va(y,a,c,0,t),go(ua(l,c));break e}}s=l=ua(l,c),4!==Oc&&(Oc=2),null===Fc?Fc=[s]:Fc.push(s),s=a;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t,Lo(s,pa(0,l,t));break e;case 1:c=l;var v=s.type,b=s.stateNode;if(0===(128&s.flags)&&("function"===typeof v.getDerivedStateFromError||null!==b&&"function"===typeof b.componentDidCatch&&(null===Hc||!Hc.has(b)))){s.flags|=65536,t&=-t,s.lanes|=t,Lo(s,ga(s,c,t));break e}}s=s.return}while(null!==s)}wl(r)}catch(w){t=w,Pc===r&&null!==r&&(Pc=r=r.return);continue}break}}function pl(){var e=kc.current;return kc.current=sa,null===e?sa:e}function gl(){0!==Oc&&3!==Oc&&2!==Oc||(Oc=4),null===Rc||0===(268435455&Bc)&&0===(268435455&Lc)||al(Rc,Tc)}function ml(e,t){var r=Ic;Ic|=2;var n=pl();for(Rc===e&&Tc===t||(qc=null,dl(e,t));;)try{yl();break}catch(i){fl(e,i)}if(So(),Ic=r,kc.current=n,null!==Pc)throw Error(o(261));return Rc=null,Tc=0,Oc}function yl(){for(;null!==Pc;)bl(Pc)}function vl(){for(;null!==Pc&&!Ye();)bl(Pc)}function bl(e){var t=_c(e.alternate,e,Nc);e.memoizedProps=e.pendingProps,null===t?wl(e):Pc=t,Cc.current=null}function wl(e){var t=e;do{var r=t.alternate;if(e=t.return,0===(32768&t.flags)){if(null!==(r=Wa(r,t,Nc)))return void(Pc=r)}else{if(null!==(r=Ga(r,t)))return r.flags&=32767,void(Pc=r);if(null===e)return Oc=6,void(Pc=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Pc=t);Pc=t=e}while(null!==t);0===Oc&&(Oc=5)}function El(e,t,r){var n=bt,i=xc.transition;try{xc.transition=null,bt=1,function(e,t,r,n){do{Sl()}while(null!==Gc);if(0!==(6&Ic))throw Error(o(327));r=e.finishedWork;var i=e.finishedLanes;if(null===r)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(o(177));e.callbackNode=null,e.callbackPriority=0;var s=r.lanes|r.childLanes;if(function(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var i=31-st(r),o=1<<i;t[i]=0,n[i]=-1,e[i]=-1,r&=~o}}(e,s),e===Rc&&(Pc=Rc=null,Tc=0),0===(2064&r.subtreeFlags)&&0===(2064&r.flags)||Wc||(Wc=!0,Rl(tt,(function(){return Sl(),null}))),s=0!==(15990&r.flags),0!==(15990&r.subtreeFlags)||s){s=xc.transition,xc.transition=null;var a=bt;bt=1;var c=Ic;Ic|=4,Cc.current=null,function(e,t){if(ei=Zt,fn(e=dn())){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{var n=(r=(r=e.ownerDocument)&&r.defaultView||window).getSelection&&r.getSelection();if(n&&0!==n.rangeCount){r=n.anchorNode;var i=n.anchorOffset,s=n.focusNode;n=n.focusOffset;try{r.nodeType,s.nodeType}catch(E){r=null;break e}var a=0,c=-1,l=-1,u=0,h=0,d=e,f=null;t:for(;;){for(var p;d!==r||0!==i&&3!==d.nodeType||(c=a+i),d!==s||0!==n&&3!==d.nodeType||(l=a+n),3===d.nodeType&&(a+=d.nodeValue.length),null!==(p=d.firstChild);)f=d,d=p;for(;;){if(d===e)break t;if(f===r&&++u===i&&(c=a),f===s&&++h===n&&(l=a),null!==(p=d.nextSibling))break;f=(d=f).parentNode}d=p}r=-1===c||-1===l?null:{start:c,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(ti={focusedElem:e,selectionRange:r},Zt=!1,Xa=t;null!==Xa;)if(e=(t=Xa).child,0!==(1028&t.subtreeFlags)&&null!==e)e.return=t,Xa=e;else for(;null!==Xa;){t=Xa;try{var g=t.alternate;if(0!==(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==g){var m=g.memoizedProps,y=g.memoizedState,v=t.stateNode,b=v.getSnapshotBeforeUpdate(t.elementType===t.type?m:yo(t.type,m),y);v.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var w=t.stateNode.containerInfo;1===w.nodeType?w.textContent="":9===w.nodeType&&w.documentElement&&w.removeChild(w.documentElement);break;default:throw Error(o(163))}}catch(E){Al(t,t.return,E)}if(null!==(e=t.sibling)){e.return=t.return,Xa=e;break}Xa=t.return}g=tc,tc=!1}(e,r),mc(r,e),pn(ti),Zt=!!ei,ti=ei=null,e.current=r,vc(r,e,i),Qe(),Ic=c,bt=a,xc.transition=s}else e.current=r;if(Wc&&(Wc=!1,Gc=e,Yc=i),s=e.pendingLanes,0===s&&(Hc=null),function(e){if(ot&&"function"===typeof ot.onCommitFiberRoot)try{ot.onCommitFiberRoot(it,e,void 0,128===(128&e.current.flags))}catch(t){}}(r.stateNode),nl(e,Je()),null!==t)for(n=e.onRecoverableError,r=0;r<t.length;r++)i=t[r],n(i.value,{componentStack:i.stack,digest:i.digest});if(Zc)throw Zc=!1,e=Vc,Vc=null,e;0!==(1&Yc)&&0!==e.tag&&Sl(),s=e.pendingLanes,0!==(1&s)?e===Jc?Qc++:(Qc=0,Jc=e):Qc=0,Ki()}(e,t,r,n)}finally{xc.transition=i,bt=n}return null}function Sl(){if(null!==Gc){var e=wt(Yc),t=xc.transition,r=bt;try{if(xc.transition=null,bt=16>e?16:e,null===Gc)var n=!1;else{if(e=Gc,Gc=null,Yc=0,0!==(6&Ic))throw Error(o(331));var i=Ic;for(Ic|=4,Xa=e.current;null!==Xa;){var s=Xa,a=s.child;if(0!==(16&Xa.flags)){var c=s.deletions;if(null!==c){for(var l=0;l<c.length;l++){var u=c[l];for(Xa=u;null!==Xa;){var h=Xa;switch(h.tag){case 0:case 11:case 15:rc(8,h,s)}var d=h.child;if(null!==d)d.return=h,Xa=d;else for(;null!==Xa;){var f=(h=Xa).sibling,p=h.return;if(oc(h),h===u){Xa=null;break}if(null!==f){f.return=p,Xa=f;break}Xa=p}}}var g=s.alternate;if(null!==g){var m=g.child;if(null!==m){g.child=null;do{var y=m.sibling;m.sibling=null,m=y}while(null!==m)}}Xa=s}}if(0!==(2064&s.subtreeFlags)&&null!==a)a.return=s,Xa=a;else e:for(;null!==Xa;){if(0!==(2048&(s=Xa).flags))switch(s.tag){case 0:case 11:case 15:rc(9,s,s.return)}var v=s.sibling;if(null!==v){v.return=s.return,Xa=v;break e}Xa=s.return}}var b=e.current;for(Xa=b;null!==Xa;){var w=(a=Xa).child;if(0!==(2064&a.subtreeFlags)&&null!==w)w.return=a,Xa=w;else e:for(a=b;null!==Xa;){if(0!==(2048&(c=Xa).flags))try{switch(c.tag){case 0:case 11:case 15:nc(9,c)}}catch(S){Al(c,c.return,S)}if(c===a){Xa=null;break e}var E=c.sibling;if(null!==E){E.return=c.return,Xa=E;break e}Xa=c.return}}if(Ic=i,Ki(),ot&&"function"===typeof ot.onPostCommitFiberRoot)try{ot.onPostCommitFiberRoot(it,e)}catch(S){}n=!0}return n}finally{bt=r,xc.transition=t}}return!1}function _l(e,t,r){e=Mo(e,t=pa(0,t=ua(r,t),1),1),t=el(),null!==e&&(yt(e,1,t),nl(e,t))}function Al(e,t,r){if(3===e.tag)_l(e,e,r);else for(;null!==t;){if(3===t.tag){_l(t,e,r);break}if(1===t.tag){var n=t.stateNode;if("function"===typeof t.type.getDerivedStateFromError||"function"===typeof n.componentDidCatch&&(null===Hc||!Hc.has(n))){t=Mo(t,e=ga(t,e=ua(r,e),1),1),e=el(),null!==t&&(yt(t,1,e),nl(t,e));break}}t=t.return}}function kl(e,t,r){var n=e.pingCache;null!==n&&n.delete(t),t=el(),e.pingedLanes|=e.suspendedLanes&r,Rc===e&&(Tc&r)===r&&(4===Oc||3===Oc&&(130023424&Tc)===Tc&&500>Je()-zc?dl(e,0):Uc|=r),nl(e,t)}function Cl(e,t){0===t&&(0===(1&e.mode)?t=1:(t=ut,0===(130023424&(ut<<=1))&&(ut=4194304)));var r=el();null!==(e=Po(e,t))&&(yt(e,t,r),nl(e,r))}function xl(e){var t=e.memoizedState,r=0;null!==t&&(r=t.retryLane),Cl(e,r)}function Il(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,i=e.memoizedState;null!==i&&(r=i.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(o(314))}null!==n&&n.delete(t),Cl(e,r)}function Rl(e,t){return We(e,t)}function Pl(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Tl(e,t,r,n){return new Pl(e,t,r,n)}function Nl(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Dl(e,t){var r=e.alternate;return null===r?((r=Tl(e.tag,t,e.key,e.mode)).elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=14680064&e.flags,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Ol(e,t,r,n,i,s){var a=2;if(n=e,"function"===typeof e)Nl(e)&&(a=1);else if("string"===typeof e)a=5;else e:switch(e){case _:return Ml(r.children,i,s,t);case A:a=8,i|=8;break;case k:return(e=Tl(12,r,t,2|i)).elementType=k,e.lanes=s,e;case R:return(e=Tl(13,r,t,i)).elementType=R,e.lanes=s,e;case P:return(e=Tl(19,r,t,i)).elementType=P,e.lanes=s,e;case D:return Bl(r,i,s,t);default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case C:a=10;break e;case x:a=9;break e;case I:a=11;break e;case T:a=14;break e;case N:a=16,n=null;break e}throw Error(o(130,null==e?e:typeof e,""))}return(t=Tl(a,r,t,i)).elementType=e,t.type=n,t.lanes=s,t}function Ml(e,t,r,n){return(e=Tl(7,e,n,t)).lanes=r,e}function Bl(e,t,r,n){return(e=Tl(22,e,n,t)).elementType=D,e.lanes=r,e.stateNode={isHidden:!1},e}function Ll(e,t,r){return(e=Tl(6,e,null,t)).lanes=r,e}function Ul(e,t,r){return(t=Tl(4,null!==e.children?e.children:[],e.key,t)).lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Fl(e,t,r,n,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=mt(0),this.expirationTimes=mt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mt(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function jl(e,t,r,n,i,o,s,a,c){return e=new Fl(e,t,r,a,c),1===t?(t=1,!0===o&&(t|=8)):t=0,o=Tl(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},No(o),e}function zl(e,t,r){var n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:S,key:null==n?null:""+n,children:e,containerInfo:t,implementation:r}}function Kl(e){if(!e)return xi;e:{if(Ke(e=e._reactInternals)!==e||1!==e.tag)throw Error(o(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ni(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(o(171))}if(1===e.tag){var r=e.type;if(Ni(r))return Mi(e,r,t)}return t}function ql(e,t,r,n,i,o,s,a,c){return(e=jl(r,n,!0,e,0,o,0,a,c)).context=Kl(null),r=e.current,(o=Oo(n=el(),i=tl(r))).callback=void 0!==t&&null!==t?t:null,Mo(r,o,i),e.current.lanes=i,yt(e,i,n),nl(e,n),e}function Zl(e,t,r,n){var i=t.current,o=el(),s=tl(i);return r=Kl(r),null===t.context?t.context=r:t.pendingContext=r,(t=Oo(o,s)).payload={element:e},null!==(n=void 0===n?null:n)&&(t.callback=n),null!==(e=Mo(i,t,s))&&(rl(e,i,s,o),Bo(e,i,s)),s}function Vl(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Hl(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var r=e.retryLane;e.retryLane=0!==r&&r<t?r:t}}function Wl(e,t){Hl(e,t),(e=e.alternate)&&Hl(e,t)}_c=function(e,t,r){if(null!==e)if(e.memoizedProps!==t.pendingProps||Ri.current)wa=!0;else{if(0===(e.lanes&r)&&0===(128&t.flags))return wa=!1,function(e,t,r){switch(t.tag){case 3:Pa(t),po();break;case 5:ss(t);break;case 1:Ni(t.type)&&Bi(t);break;case 4:is(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,i=t.memoizedProps.value;Ci(vo,n._currentValue),n._currentValue=i;break;case 13:if(null!==(n=t.memoizedState))return null!==n.dehydrated?(Ci(cs,1&cs.current),t.flags|=128,null):0!==(r&t.child.childLanes)?La(e,t,r):(Ci(cs,1&cs.current),null!==(e=Za(e,t,r))?e.sibling:null);Ci(cs,1&cs.current);break;case 19:if(n=0!==(r&t.childLanes),0!==(128&e.flags)){if(n)return Ka(e,t,r);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ci(cs,cs.current),n)break;return null;case 22:case 23:return t.lanes=0,ka(e,t,r)}return Za(e,t,r)}(e,t,r);wa=0!==(131072&e.flags)}else wa=!1,io&&0!==(1048576&t.flags)&&$i(t,Hi,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;qa(e,t),e=t.pendingProps;var i=Ti(t,Ii.current);ko(t,r),i=As(null,t,n,e,i,r);var s=ks();return t.flags|=1,"object"===typeof i&&null!==i&&"function"===typeof i.render&&void 0===i.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ni(n)?(s=!0,Bi(t)):s=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,No(t),i.updater=Ko,t.stateNode=i,i._reactInternals=t,Ho(t,n,e,r),t=Ra(null,t,n,!0,s,r)):(t.tag=0,io&&s&&eo(t),Ea(null,t,i,r),t=t.child),t;case 16:n=t.elementType;e:{switch(qa(e,t),e=t.pendingProps,n=(i=n._init)(n._payload),t.type=n,i=t.tag=function(e){if("function"===typeof e)return Nl(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===I)return 11;if(e===T)return 14}return 2}(n),e=yo(n,e),i){case 0:t=xa(null,t,n,e,r);break e;case 1:t=Ia(null,t,n,e,r);break e;case 11:t=Sa(null,t,n,e,r);break e;case 14:t=_a(null,t,n,yo(n.type,e),r);break e}throw Error(o(306,n,""))}return t;case 0:return n=t.type,i=t.pendingProps,xa(e,t,n,i=t.elementType===n?i:yo(n,i),r);case 1:return n=t.type,i=t.pendingProps,Ia(e,t,n,i=t.elementType===n?i:yo(n,i),r);case 3:e:{if(Pa(t),null===e)throw Error(o(387));n=t.pendingProps,i=(s=t.memoizedState).element,Do(e,t),Uo(t,n,null,r);var a=t.memoizedState;if(n=a.element,s.isDehydrated){if(s={element:n,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=s,t.memoizedState=s,256&t.flags){t=Ta(e,t,n,r,i=ua(Error(o(423)),t));break e}if(n!==i){t=Ta(e,t,n,r,i=ua(Error(o(424)),t));break e}for(no=li(t.stateNode.containerInfo.firstChild),ro=t,io=!0,oo=null,r=Xo(t,null,n,r),t.child=r;r;)r.flags=-3&r.flags|4096,r=r.sibling}else{if(po(),n===i){t=Za(e,t,r);break e}Ea(e,t,n,r)}t=t.child}return t;case 5:return ss(t),null===e&&lo(t),n=t.type,i=t.pendingProps,s=null!==e?e.memoizedProps:null,a=i.children,ri(n,i)?a=null:null!==s&&ri(n,s)&&(t.flags|=32),Ca(e,t),Ea(e,t,a,r),t.child;case 6:return null===e&&lo(t),null;case 13:return La(e,t,r);case 4:return is(t,t.stateNode.containerInfo),n=t.pendingProps,null===e?t.child=Jo(t,null,n,r):Ea(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,Sa(e,t,n,i=t.elementType===n?i:yo(n,i),r);case 7:return Ea(e,t,t.pendingProps,r),t.child;case 8:case 12:return Ea(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,i=t.pendingProps,s=t.memoizedProps,a=i.value,Ci(vo,n._currentValue),n._currentValue=a,null!==s)if(an(s.value,a)){if(s.children===i.children&&!Ri.current){t=Za(e,t,r);break e}}else for(null!==(s=t.child)&&(s.return=t);null!==s;){var c=s.dependencies;if(null!==c){a=s.child;for(var l=c.firstContext;null!==l;){if(l.context===n){if(1===s.tag){(l=Oo(-1,r&-r)).tag=2;var u=s.updateQueue;if(null!==u){var h=(u=u.shared).pending;null===h?l.next=l:(l.next=h.next,h.next=l),u.pending=l}}s.lanes|=r,null!==(l=s.alternate)&&(l.lanes|=r),Ao(s.return,r,t),c.lanes|=r;break}l=l.next}}else if(10===s.tag)a=s.type===t.type?null:s.child;else if(18===s.tag){if(null===(a=s.return))throw Error(o(341));a.lanes|=r,null!==(c=a.alternate)&&(c.lanes|=r),Ao(a,r,t),a=s.sibling}else a=s.child;if(null!==a)a.return=s;else for(a=s;null!==a;){if(a===t){a=null;break}if(null!==(s=a.sibling)){s.return=a.return,a=s;break}a=a.return}s=a}Ea(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,n=t.pendingProps.children,ko(t,r),n=n(i=Co(i)),t.flags|=1,Ea(e,t,n,r),t.child;case 14:return i=yo(n=t.type,t.pendingProps),_a(e,t,n,i=yo(n.type,i),r);case 15:return Aa(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:yo(n,i),qa(e,t),t.tag=1,Ni(n)?(e=!0,Bi(t)):e=!1,ko(t,r),Zo(t,n,i),Ho(t,n,i,r),Ra(null,t,n,!0,e,r);case 19:return Ka(e,t,r);case 22:return ka(e,t,r)}throw Error(o(156,t.tag))};var Gl="function"===typeof reportError?reportError:function(e){console.error(e)};function Yl(e){this._internalRoot=e}function Ql(e){this._internalRoot=e}function Jl(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Xl(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function $l(){}function eu(e,t,r,n,i){var o=r._reactRootContainer;if(o){var s=o;if("function"===typeof i){var a=i;i=function(){var e=Vl(s);a.call(e)}}Zl(t,s,e,i)}else s=function(e,t,r,n,i){if(i){if("function"===typeof n){var o=n;n=function(){var e=Vl(s);o.call(e)}}var s=ql(t,n,e,0,null,!1,0,"",$l);return e._reactRootContainer=s,e[pi]=s.current,Kn(8===e.nodeType?e.parentNode:e),ul(),s}for(;i=e.lastChild;)e.removeChild(i);if("function"===typeof n){var a=n;n=function(){var e=Vl(c);a.call(e)}}var c=jl(e,0,!1,null,0,!1,0,"",$l);return e._reactRootContainer=c,e[pi]=c.current,Kn(8===e.nodeType?e.parentNode:e),ul((function(){Zl(t,c,r,n)})),c}(r,t,e,i,n);return Vl(s)}Ql.prototype.render=Yl.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(o(409));Zl(e,t,null,null)},Ql.prototype.unmount=Yl.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;ul((function(){Zl(null,e,null,null)})),t[pi]=null}},Ql.prototype.unstable_scheduleHydration=function(e){if(e){var t=At();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Dt.length&&0!==t&&t<Dt[r].priority;r++);Dt.splice(r,0,e),0===r&&Lt(e)}},Et=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=ht(t.pendingLanes);0!==r&&(vt(t,1|r),nl(t,Je()),0===(6&Ic)&&(Kc=Je()+500,Ki()))}break;case 13:ul((function(){var t=Po(e,1);if(null!==t){var r=el();rl(t,e,1,r)}})),Wl(e,1)}},St=function(e){if(13===e.tag){var t=Po(e,134217728);if(null!==t)rl(t,e,134217728,el());Wl(e,134217728)}},_t=function(e){if(13===e.tag){var t=tl(e),r=Po(e,t);if(null!==r)rl(r,e,t,el());Wl(e,t)}},At=function(){return bt},kt=function(e,t){var r=bt;try{return bt=e,t()}finally{bt=r}},Se=function(e,t,r){switch(t){case"input":if(X(e,r),t=r.name,"radio"===r.type&&null!=t){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var i=Ei(n);if(!i)throw Error(o(90));W(n),X(n,i)}}}break;case"textarea":oe(e,r);break;case"select":null!=(t=r.value)&&re(e,!!r.multiple,t,!1)}},Ie=ll,Re=ul;var tu={usingClientEntryPoint:!1,Events:[bi,wi,Ei,Ce,xe,ll]},ru={findFiberByHostInstance:vi,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},nu={bundleType:ru.bundleType,version:ru.version,rendererPackageName:ru.rendererPackageName,rendererConfig:ru.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:w.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ve(e))?null:e.stateNode},findFiberByHostInstance:ru.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var iu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!iu.isDisabled&&iu.supportsFiber)try{it=iu.inject(nu),ot=iu}catch(ue){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tu,t.createPortal=function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Jl(t))throw Error(o(200));return zl(e,t,null,r)},t.createRoot=function(e,t){if(!Jl(e))throw Error(o(299));var r=!1,n="",i=Gl;return null!==t&&void 0!==t&&(!0===t.unstable_strictMode&&(r=!0),void 0!==t.identifierPrefix&&(n=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=jl(e,1,!1,null,0,r,0,n,i),e[pi]=t.current,Kn(8===e.nodeType?e.parentNode:e),new Yl(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(o(188));throw e=Object.keys(e).join(","),Error(o(268,e))}return e=null===(e=Ve(t))?null:e.stateNode},t.flushSync=function(e){return ul(e)},t.hydrate=function(e,t,r){if(!Xl(t))throw Error(o(200));return eu(null,e,t,!0,r)},t.hydrateRoot=function(e,t,r){if(!Jl(e))throw Error(o(405));var n=null!=r&&r.hydratedSources||null,i=!1,s="",a=Gl;if(null!==r&&void 0!==r&&(!0===r.unstable_strictMode&&(i=!0),void 0!==r.identifierPrefix&&(s=r.identifierPrefix),void 0!==r.onRecoverableError&&(a=r.onRecoverableError)),t=ql(t,null,e,1,null!=r?r:null,i,0,s,a),e[pi]=t.current,Kn(e),n)for(e=0;e<n.length;e++)i=(i=(r=n[e])._getVersion)(r._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[r,i]:t.mutableSourceEagerHydrationData.push(r,i);return new Ql(t)},t.render=function(e,t,r){if(!Xl(t))throw Error(o(200));return eu(null,e,t,!1,r)},t.unmountComponentAtNode=function(e){if(!Xl(e))throw Error(o(40));return!!e._reactRootContainer&&(ul((function(){eu(null,null,e,!1,(function(){e._reactRootContainer=null,e[pi]=null}))})),!0)},t.unstable_batchedUpdates=ll,t.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!Xl(r))throw Error(o(200));if(null==e||void 0===e._reactInternals)throw Error(o(38));return eu(e,t,r,!1,n)},t.version="18.2.0-next-9e3b772b8-20220608"},1168:(e,t,r)=>{"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=r(534)},1624:(e,t)=>{"use strict";var r=60103,n=60106,i=60107,o=60108,s=60114,a=60109,c=60110,l=60112,u=60113,h=60120,d=60115,f=60116,p=60121,g=60122,m=60117,y=60129,v=60131;if("function"===typeof Symbol&&Symbol.for){var b=Symbol.for;r=b("react.element"),n=b("react.portal"),i=b("react.fragment"),o=b("react.strict_mode"),s=b("react.profiler"),a=b("react.provider"),c=b("react.context"),l=b("react.forward_ref"),u=b("react.suspense"),h=b("react.suspense_list"),d=b("react.memo"),f=b("react.lazy"),p=b("react.block"),g=b("react.server.block"),m=b("react.fundamental"),y=b("react.debug_trace_mode"),v=b("react.legacy_hidden")}function w(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case i:case s:case o:case u:case h:return e;default:switch(e=e&&e.$$typeof){case c:case l:case f:case d:case a:return e;default:return t}}case n:return t}}}},6214:(e,t,r)=>{"use strict";r(1624)},5918:(e,t,r)=>{"use strict";var n=r(7313),i=Symbol.for("react.element"),o=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,r){var n,o={},l=null,u=null;for(n in void 0!==r&&(l=""+r),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(u=t.ref),t)s.call(t,n)&&!c.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===o[n]&&(o[n]=t[n]);return{$$typeof:i,type:e,key:l,ref:u,props:o,_owner:a.current}}t.jsx=l,t.jsxs=l},306:(e,t)=>{"use strict";var r=Symbol.for("react.element"),n=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),c=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.iterator;var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,m={};function y(e,t,r){this.props=e,this.context=t,this.refs=m,this.updater=r||p}function v(){}function b(e,t,r){this.props=e,this.context=t,this.refs=m,this.updater=r||p}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=y.prototype;var w=b.prototype=new v;w.constructor=b,g(w,y.prototype),w.isPureReactComponent=!0;var E=Array.isArray,S=Object.prototype.hasOwnProperty,_={current:null},A={key:!0,ref:!0,__self:!0,__source:!0};function k(e,t,n){var i,o={},s=null,a=null;if(null!=t)for(i in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(s=""+t.key),t)S.call(t,i)&&!A.hasOwnProperty(i)&&(o[i]=t[i]);var c=arguments.length-2;if(1===c)o.children=n;else if(1<c){for(var l=Array(c),u=0;u<c;u++)l[u]=arguments[u+2];o.children=l}if(e&&e.defaultProps)for(i in c=e.defaultProps)void 0===o[i]&&(o[i]=c[i]);return{$$typeof:r,type:e,key:s,ref:a,props:o,_owner:_.current}}function C(e){return"object"===typeof e&&null!==e&&e.$$typeof===r}var x=/\/+/g;function I(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function R(e,t,i,o,s){var a=typeof e;"undefined"!==a&&"boolean"!==a||(e=null);var c=!1;if(null===e)c=!0;else switch(a){case"string":case"number":c=!0;break;case"object":switch(e.$$typeof){case r:case n:c=!0}}if(c)return s=s(c=e),e=""===o?"."+I(c,0):o,E(s)?(i="",null!=e&&(i=e.replace(x,"$&/")+"/"),R(s,t,i,"",(function(e){return e}))):null!=s&&(C(s)&&(s=function(e,t){return{$$typeof:r,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(s,i+(!s.key||c&&c.key===s.key?"":(""+s.key).replace(x,"$&/")+"/")+e)),t.push(s)),1;if(c=0,o=""===o?".":o+":",E(e))for(var l=0;l<e.length;l++){var u=o+I(a=e[l],l);c+=R(a,t,i,u,s)}else if(u=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=f&&e[f]||e["@@iterator"])?e:null}(e),"function"===typeof u)for(e=u.call(e),l=0;!(a=e.next()).done;)c+=R(a=a.value,t,i,u=o+I(a,l++),s);else if("object"===a)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return c}function P(e,t,r){if(null==e)return e;var n=[],i=0;return R(e,n,"","",(function(e){return t.call(r,e,i++)})),n}function T(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var N={current:null},D={transition:null},O={ReactCurrentDispatcher:N,ReactCurrentBatchConfig:D,ReactCurrentOwner:_};t.Children={map:P,forEach:function(e,t,r){P(e,(function(){t.apply(this,arguments)}),r)},count:function(e){var t=0;return P(e,(function(){t++})),t},toArray:function(e){return P(e,(function(e){return e}))||[]},only:function(e){if(!C(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=y,t.Fragment=i,t.Profiler=s,t.PureComponent=b,t.StrictMode=o,t.Suspense=u,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=O,t.cloneElement=function(e,t,n){if(null===e||void 0===e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var i=g({},e.props),o=e.key,s=e.ref,a=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,a=_.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(l in t)S.call(t,l)&&!A.hasOwnProperty(l)&&(i[l]=void 0===t[l]&&void 0!==c?c[l]:t[l])}var l=arguments.length-2;if(1===l)i.children=n;else if(1<l){c=Array(l);for(var u=0;u<l;u++)c[u]=arguments[u+2];i.children=c}return{$$typeof:r,type:e.type,key:o,ref:s,props:i,_owner:a}},t.createContext=function(e){return(e={$$typeof:c,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},t.createElement=k,t.createFactory=function(e){var t=k.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:l,render:e}},t.isValidElement=C,t.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:T}},t.memo=function(e,t){return{$$typeof:h,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=D.transition;D.transition={};try{e()}finally{D.transition=t}},t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},t.useCallback=function(e,t){return N.current.useCallback(e,t)},t.useContext=function(e){return N.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return N.current.useDeferredValue(e)},t.useEffect=function(e,t){return N.current.useEffect(e,t)},t.useId=function(){return N.current.useId()},t.useImperativeHandle=function(e,t,r){return N.current.useImperativeHandle(e,t,r)},t.useInsertionEffect=function(e,t){return N.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return N.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return N.current.useMemo(e,t)},t.useReducer=function(e,t,r){return N.current.useReducer(e,t,r)},t.useRef=function(e){return N.current.useRef(e)},t.useState=function(e){return N.current.useState(e)},t.useSyncExternalStore=function(e,t,r){return N.current.useSyncExternalStore(e,t,r)},t.useTransition=function(){return N.current.useTransition()},t.version="18.2.0"},7313:(e,t,r)=>{"use strict";e.exports=r(306)},6417:(e,t,r)=>{"use strict";e.exports=r(5918)},7326:(e,t,r)=>{"use strict";e.exports=s;var n=r(5187),i=s.prototype,o=new Date%1e9;function s(e){e=e||{},this.id=e.id||(1e9*Math.random()>>>0)+o++,this.max=e.max||1/0,this.items=e.items||[],this._lookup={},this.size=this.items.length,this.lastModified=new Date(e.lastModified||new Date);for(var t,r,n=this.items.length;n--;)t=this.items[n],r=new Date(t.expires)-new Date,this._lookup[t.key]=t,r>0?this.expire(t.key,r):r<=0&&this.delete(t.key)}i.has=function(e){return e in this._lookup},i.get=function(e){if(!this.has(e))return null;var t=this._lookup[e];return t.refresh&&this.expire(e,t.refresh),this.items.splice(this.items.indexOf(t),1),this.items.push(t),t.value},i.meta=function(e){if(!this.has(e))return null;var t=this._lookup[e];return"meta"in t?t.meta:null},i.set=function(e,t,r){var n=this._lookup[e],i=this._lookup[e]={key:e,value:t};return this.lastModified=new Date,n?(clearTimeout(n.timeout),this.items.splice(this.items.indexOf(n),1,i)):(this.size>=this.max&&this.delete(this.items[0].key),this.items.push(i),this.size++),r&&("ttl"in r&&this.expire(e,r.ttl),"meta"in r&&(i.meta=r.meta),r.refresh&&(i.refresh=r.ttl)),this},i.delete=function(e){var t=this._lookup[e];return!!t&&(this.lastModified=new Date,this.items.splice(this.items.indexOf(t),1),clearTimeout(t.timeout),delete this._lookup[e],this.size--,this)},i.expire=function(e,t){var r=t||0,i=this._lookup[e];if(!i)return this;if("string"===typeof r&&(r=n(t)),"number"!==typeof r)throw new TypeError("Expiration time must be a string or number.");return clearTimeout(i.timeout),i.timeout=setTimeout(this.delete.bind(this,i.key),r),i.expires=Number(new Date)+r,this},i.clear=function(){for(var e=this.items.length;e--;)this.delete(this.items[e].key);return this},i.toJSON=function(){for(var e,t=new Array(this.items.length),r=t.length;r--;)e=this.items[r],t[r]={key:e.key,meta:e.meta,value:e.value,expires:e.expires,refresh:e.refresh};return{id:this.id,max:isFinite(this.max)?this.max:void 0,lastModified:this.lastModified,items:t}}},9593:(e,t,r)=>{"use strict";var n=r(7540),i=/[\/\?<>\\:\*\|"]/g,o=/[\x00-\x1f\x80-\x9f]/g,s=/^\.+$/,a=/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i,c=/[\. ]+$/;function l(e,t){if("string"!==typeof e)throw new Error("Input must be string");var r=e.replace(i,t).replace(o,t).replace(s,t).replace(a,t).replace(c,t);return n(r,255)}e.exports=function(e,t){var r=t&&t.replacement||"",n=l(e,r);return""===r?n:l(n,"")}},3095:(e,t)=>{"use strict";function r(e,t){var r=e.length;e.push(t);e:for(;0<r;){var n=r-1>>>1,i=e[n];if(!(0<o(i,t)))break e;e[n]=t,e[r]=i,r=n}}function n(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],r=e.pop();if(r!==t){e[0]=r;e:for(var n=0,i=e.length,s=i>>>1;n<s;){var a=2*(n+1)-1,c=e[a],l=a+1,u=e[l];if(0>o(c,r))l<i&&0>o(u,c)?(e[n]=u,e[l]=r,n=l):(e[n]=c,e[a]=r,n=a);else{if(!(l<i&&0>o(u,r)))break e;e[n]=u,e[l]=r,n=l}}}return t}function o(e,t){var r=e.sortIndex-t.sortIndex;return 0!==r?r:e.id-t.id}if("object"===typeof performance&&"function"===typeof performance.now){var s=performance;t.unstable_now=function(){return s.now()}}else{var a=Date,c=a.now();t.unstable_now=function(){return a.now()-c}}var l=[],u=[],h=1,d=null,f=3,p=!1,g=!1,m=!1,y="function"===typeof setTimeout?setTimeout:null,v="function"===typeof clearTimeout?clearTimeout:null,b="undefined"!==typeof setImmediate?setImmediate:null;function w(e){for(var t=n(u);null!==t;){if(null===t.callback)i(u);else{if(!(t.startTime<=e))break;i(u),t.sortIndex=t.expirationTime,r(l,t)}t=n(u)}}function E(e){if(m=!1,w(e),!g)if(null!==n(l))g=!0,D(S);else{var t=n(u);null!==t&&O(E,t.startTime-e)}}function S(e,r){g=!1,m&&(m=!1,v(C),C=-1),p=!0;var o=f;try{for(w(r),d=n(l);null!==d&&(!(d.expirationTime>r)||e&&!R());){var s=d.callback;if("function"===typeof s){d.callback=null,f=d.priorityLevel;var a=s(d.expirationTime<=r);r=t.unstable_now(),"function"===typeof a?d.callback=a:d===n(l)&&i(l),w(r)}else i(l);d=n(l)}if(null!==d)var c=!0;else{var h=n(u);null!==h&&O(E,h.startTime-r),c=!1}return c}finally{d=null,f=o,p=!1}}"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var _,A=!1,k=null,C=-1,x=5,I=-1;function R(){return!(t.unstable_now()-I<x)}function P(){if(null!==k){var e=t.unstable_now();I=e;var r=!0;try{r=k(!0,e)}finally{r?_():(A=!1,k=null)}}else A=!1}if("function"===typeof b)_=function(){b(P)};else if("undefined"!==typeof MessageChannel){var T=new MessageChannel,N=T.port2;T.port1.onmessage=P,_=function(){N.postMessage(null)}}else _=function(){y(P,0)};function D(e){k=e,A||(A=!0,_())}function O(e,r){C=y((function(){e(t.unstable_now())}),r)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){g||p||(g=!0,D(S))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):x=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return f},t.unstable_getFirstCallbackNode=function(){return n(l)},t.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var r=f;f=t;try{return e()}finally{f=r}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=f;f=e;try{return t()}finally{f=r}},t.unstable_scheduleCallback=function(e,i,o){var s=t.unstable_now();switch("object"===typeof o&&null!==o?o="number"===typeof(o=o.delay)&&0<o?s+o:s:o=s,e){case 1:var a=-1;break;case 2:a=250;break;case 5:a=1073741823;break;case 4:a=1e4;break;default:a=5e3}return e={id:h++,callback:i,priorityLevel:e,startTime:o,expirationTime:a=o+a,sortIndex:-1},o>s?(e.sortIndex=o,r(u,e),null===n(l)&&e===n(u)&&(m?(v(C),C=-1):m=!0,O(E,o-s))):(e.sortIndex=a,r(l,e),g||p||(g=!0,D(S))),e},t.unstable_shouldYield=R,t.unstable_wrapCallback=function(e){var t=f;return function(){var r=f;f=t;try{return e.apply(this,arguments)}finally{f=r}}}},2224:(e,t,r)=>{"use strict";e.exports=r(3095)},6125:function(e){"use strict";!function(t){const r=2147483647;function n(e){const t=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]);let r=1779033703,n=3144134277,i=1013904242,o=2773480762,s=1359893119,a=2600822924,c=528734635,l=1541459225;const u=new Uint32Array(64);function h(e){let h=0,d=e.length;for(;d>=64;){let f,p,g,m,y,v=r,b=n,w=i,E=o,S=s,_=a,A=c,k=l;for(p=0;p<16;p++)g=h+4*p,u[p]=(255&e[g])<<24|(255&e[g+1])<<16|(255&e[g+2])<<8|255&e[g+3];for(p=16;p<64;p++)f=u[p-2],m=(f>>>17|f<<15)^(f>>>19|f<<13)^f>>>10,f=u[p-15],y=(f>>>7|f<<25)^(f>>>18|f<<14)^f>>>3,u[p]=(m+u[p-7]|0)+(y+u[p-16]|0)|0;for(p=0;p<64;p++)m=(((S>>>6|S<<26)^(S>>>11|S<<21)^(S>>>25|S<<7))+(S&_^~S&A)|0)+(k+(t[p]+u[p]|0)|0)|0,y=((v>>>2|v<<30)^(v>>>13|v<<19)^(v>>>22|v<<10))+(v&b^v&w^b&w)|0,k=A,A=_,_=S,S=E+m|0,E=w,w=b,b=v,v=m+y|0;r=r+v|0,n=n+b|0,i=i+w|0,o=o+E|0,s=s+S|0,a=a+_|0,c=c+A|0,l=l+k|0,h+=64,d-=64}}h(e);let d,f=e.length%64,p=e.length/536870912|0,g=e.length<<3,m=f<56?56:120,y=e.slice(e.length-f,e.length);for(y.push(128),d=f+1;d<m;d++)y.push(0);return y.push(p>>>24&255),y.push(p>>>16&255),y.push(p>>>8&255),y.push(p>>>0&255),y.push(g>>>24&255),y.push(g>>>16&255),y.push(g>>>8&255),y.push(g>>>0&255),h(y),[r>>>24&255,r>>>16&255,r>>>8&255,r>>>0&255,n>>>24&255,n>>>16&255,n>>>8&255,n>>>0&255,i>>>24&255,i>>>16&255,i>>>8&255,i>>>0&255,o>>>24&255,o>>>16&255,o>>>8&255,o>>>0&255,s>>>24&255,s>>>16&255,s>>>8&255,s>>>0&255,a>>>24&255,a>>>16&255,a>>>8&255,a>>>0&255,c>>>24&255,c>>>16&255,c>>>8&255,c>>>0&255,l>>>24&255,l>>>16&255,l>>>8&255,l>>>0&255]}function i(e,t,r){e=e.length<=64?e:n(e);const i=64+t.length+4,o=new Array(i),s=new Array(64);let a,c=[];for(a=0;a<64;a++)o[a]=54;for(a=0;a<e.length;a++)o[a]^=e[a];for(a=0;a<t.length;a++)o[64+a]=t[a];for(a=i-4;a<i;a++)o[a]=0;for(a=0;a<64;a++)s[a]=92;for(a=0;a<e.length;a++)s[a]^=e[a];function l(){for(let e=i-1;e>=i-4;e--){if(o[e]++,o[e]<=255)return;o[e]=0}}for(;r>=32;)l(),c=c.concat(n(s.concat(n(o)))),r-=32;return r>0&&(l(),c=c.concat(n(s.concat(n(o))).slice(0,r))),c}function o(e,t,r,n,i){let o;for(l(e,16*(2*r-1),i,0,16),o=0;o<2*r;o++)c(e,16*o,i,16),a(i,n),l(i,0,e,t+16*o,16);for(o=0;o<r;o++)l(e,t+2*o*16,e,16*o,16);for(o=0;o<r;o++)l(e,t+16*(2*o+1),e,16*(o+r),16)}function s(e,t){return e<<t|e>>>32-t}function a(e,t){l(e,0,t,0,16);for(let r=8;r>0;r-=2)t[4]^=s(t[0]+t[12],7),t[8]^=s(t[4]+t[0],9),t[12]^=s(t[8]+t[4],13),t[0]^=s(t[12]+t[8],18),t[9]^=s(t[5]+t[1],7),t[13]^=s(t[9]+t[5],9),t[1]^=s(t[13]+t[9],13),t[5]^=s(t[1]+t[13],18),t[14]^=s(t[10]+t[6],7),t[2]^=s(t[14]+t[10],9),t[6]^=s(t[2]+t[14],13),t[10]^=s(t[6]+t[2],18),t[3]^=s(t[15]+t[11],7),t[7]^=s(t[3]+t[15],9),t[11]^=s(t[7]+t[3],13),t[15]^=s(t[11]+t[7],18),t[1]^=s(t[0]+t[3],7),t[2]^=s(t[1]+t[0],9),t[3]^=s(t[2]+t[1],13),t[0]^=s(t[3]+t[2],18),t[6]^=s(t[5]+t[4],7),t[7]^=s(t[6]+t[5],9),t[4]^=s(t[7]+t[6],13),t[5]^=s(t[4]+t[7],18),t[11]^=s(t[10]+t[9],7),t[8]^=s(t[11]+t[10],9),t[9]^=s(t[8]+t[11],13),t[10]^=s(t[9]+t[8],18),t[12]^=s(t[15]+t[14],7),t[13]^=s(t[12]+t[15],9),t[14]^=s(t[13]+t[12],13),t[15]^=s(t[14]+t[13],18);for(let r=0;r<16;++r)e[r]+=t[r]}function c(e,t,r,n){for(let i=0;i<n;i++)r[i]^=e[t+i]}function l(e,t,r,n,i){for(;i--;)r[n++]=e[t++]}function u(e){if(!e||"number"!==typeof e.length)return!1;for(let t=0;t<e.length;t++){const r=e[t];if("number"!==typeof r||r%1||r<0||r>=256)return!1}return!0}function h(e,t){if("number"!==typeof e||e%1)throw new Error("invalid "+t);return e}function d(e,t,n,s,a,d,f){if(n=h(n,"N"),s=h(s,"r"),a=h(a,"p"),d=h(d,"dkLen"),0===n||0!==(n&n-1))throw new Error("N must be power of 2");if(n>r/128/s)throw new Error("N too large");if(s>r/128/a)throw new Error("r too large");if(!u(e))throw new Error("password must be an array or buffer");if(e=Array.prototype.slice.call(e),!u(t))throw new Error("salt must be an array or buffer");t=Array.prototype.slice.call(t);let p=i(e,t,128*a*s);const g=new Uint32Array(32*a*s);for(let r=0;r<g.length;r++){const e=4*r;g[r]=(255&p[e+3])<<24|(255&p[e+2])<<16|(255&p[e+1])<<8|(255&p[e+0])<<0}const m=new Uint32Array(64*s),y=new Uint32Array(32*s*n),v=32*s,b=new Uint32Array(16),w=new Uint32Array(16),E=a*n*2;let S,_,A=0,k=null,C=!1,x=0,I=0;const R=f?parseInt(1e3/s):4294967295,P="undefined"!==typeof setImmediate?setImmediate:setTimeout,T=function(){if(C)return f(new Error("cancelled"),A/E);let t;switch(x){case 0:_=32*I*s,l(g,_,m,0,v),x=1,S=0;case 1:t=n-S,t>R&&(t=R);for(let e=0;e<t;e++)l(m,0,y,(S+e)*v,v),o(m,v,s,b,w);if(S+=t,A+=t,f){const e=parseInt(1e3*A/E);if(e!==k){if(C=f(null,A/E),C)break;k=e}}if(S<n)break;S=0,x=2;case 2:t=n-S,t>R&&(t=R);for(let e=0;e<t;e++){const e=m[16*(2*s-1)]&n-1;c(y,e*v,m,v),o(m,v,s,b,w)}if(S+=t,A+=t,f){const e=parseInt(1e3*A/E);if(e!==k){if(C=f(null,A/E),C)break;k=e}}if(S<n)break;if(l(m,0,g,_,v),I++,I<a){x=0;break}p=[];for(let e=0;e<g.length;e++)p.push(g[e]>>0&255),p.push(g[e]>>8&255),p.push(g[e]>>16&255),p.push(g[e]>>24&255);const r=i(e,p,d);return f&&f(null,1,r),r}f&&P(T)};if(!f)for(;;){const e=T();if(void 0!=e)return e}T()}const f={scrypt:function(e,t,r,n,i,o,s){return new Promise((function(a,c){let l=0;s&&s(0),d(e,t,r,n,i,o,(function(e,t,r){if(e)c(e);else if(r)s&&1!==l&&s(1),a(new Uint8Array(r));else if(s&&t!==l)return l=t,s(t)}))}))},syncScrypt:function(e,t,r,n,i,o){return new Uint8Array(d(e,t,r,n,i,o))}};e.exports=f}()},7540:(e,t,r)=>{"use strict";var n=r(819),i=r(5392);e.exports=n.bind(null,i)},819:e=>{"use strict";function t(e){return e>=55296&&e<=56319}function r(e){return e>=56320&&e<=57343}e.exports=function(e,n,i){if("string"!==typeof n)throw new Error("Input must be string");for(var o,s,a=n.length,c=0,l=0;l<a;l+=1){if(o=n.charCodeAt(l),s=n[l],t(o)&&r(n.charCodeAt(l+1))&&(s+=n[l+=1]),(c+=e(s))===i)return n.slice(0,l+1);if(c>i)return n.slice(0,l-s.length+1)}return n}},5392:e=>{"use strict";function t(e){return e>=55296&&e<=56319}function r(e){return e>=56320&&e<=57343}e.exports=function(e){if("string"!==typeof e)throw new Error("Input must be string");for(var n=e.length,i=0,o=null,s=null,a=0;a<n;a++)r(o=e.charCodeAt(a))?null!=s&&t(s)?i+=1:i+=3:o<=127?i+=1:o>=128&&o<=2047?i+=2:o>=2048&&o<=65535&&(i+=3),s=o;return i}},1418:e=>{e.exports=function e(t,r){var n,i=0,o=0,s=r=r||0,a=t.length;do{if(s>=a||o>49)throw e.bytes=0,new RangeError("Could not decode varint");n=t[s++],i+=o<28?(127&n)<<o:(127&n)*Math.pow(2,o),o+=7}while(n>=128);return e.bytes=s-r,i}},3383:e=>{e.exports=function e(r,n,i){if(Number.MAX_SAFE_INTEGER&&r>Number.MAX_SAFE_INTEGER)throw e.bytes=0,new RangeError("Could not encode varint");n=n||[];var o=i=i||0;for(;r>=t;)n[i++]=255&r|128,r/=128;for(;-128&r;)n[i++]=255&r|128,r>>>=7;return n[i]=0|r,e.bytes=i-o+1,n};var t=Math.pow(2,31)},6796:(e,t,r)=>{e.exports={encode:r(3383),decode:r(1418),encodingLength:r(6201)}},6201:e=>{var t=Math.pow(2,7),r=Math.pow(2,14),n=Math.pow(2,21),i=Math.pow(2,28),o=Math.pow(2,35),s=Math.pow(2,42),a=Math.pow(2,49),c=Math.pow(2,56),l=Math.pow(2,63);e.exports=function(e){return e<t?1:e<r?2:e<n?3:e<i?4:e<o?5:e<s?6:e<a?7:e<c?8:e<l?9:10}},7420:()=>{},5856:()=>{},7761:()=>{},6601:()=>{},5819:()=>{},1265:()=>{},5539:()=>{},4836:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},5263:(e,t,r)=>{var n=r(8698).default;function i(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}e.exports=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!==typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var o={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var c=s?Object.getOwnPropertyDescriptor(e,a):null;c&&(c.get||c.set)?Object.defineProperty(o,a,c):o[a]=e[a]}return o.default=e,r&&r.set(e,o),o},e.exports.__esModule=!0,e.exports.default=e.exports},8698:e=>{function t(r){return e.exports=t="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.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},7656:function(e,t,r){var n,i,o;i=[r(8101)],void 0===(o="function"===typeof(n=function(e){"use strict";var t=e.Reader,r=e.Writer,n=e.util,i=e.roots.default||(e.roots.default={});return i.RPC=function(){function o(e){if(this.subscriptions=[],this.messages=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var s;return o.prototype.subscriptions=n.emptyArray,o.prototype.messages=n.emptyArray,o.prototype.control=null,Object.defineProperty(o.prototype,"_control",{get:n.oneOfGetter(s=["control"]),set:n.oneOfSetter(s)}),o.encode=function(e,t){if(t||(t=r.create()),null!=e.subscriptions&&e.subscriptions.length)for(var n=0;n<e.subscriptions.length;++n)i.RPC.SubOpts.encode(e.subscriptions[n],t.uint32(10).fork()).ldelim();if(null!=e.messages&&e.messages.length)for(n=0;n<e.messages.length;++n)i.RPC.Message.encode(e.messages[n],t.uint32(18).fork()).ldelim();return null!=e.control&&Object.hasOwnProperty.call(e,"control")&&i.RPC.ControlMessage.encode(e.control,t.uint32(26).fork()).ldelim(),t},o.decode=function(e,r){e instanceof t||(e=t.create(e));for(var n=void 0===r?e.len:e.pos+r,o=new i.RPC;e.pos<n;){var s=e.uint32();switch(s>>>3){case 1:o.subscriptions&&o.subscriptions.length||(o.subscriptions=[]),o.subscriptions.push(i.RPC.SubOpts.decode(e,e.uint32()));break;case 2:o.messages&&o.messages.length||(o.messages=[]),o.messages.push(i.RPC.Message.decode(e,e.uint32()));break;case 3:o.control=i.RPC.ControlMessage.decode(e,e.uint32());break;default:e.skipType(7&s)}}return o},o.fromObject=function(e){if(e instanceof i.RPC)return e;var t=new i.RPC;if(e.subscriptions){if(!Array.isArray(e.subscriptions))throw TypeError(".RPC.subscriptions: array expected");t.subscriptions=[];for(var r=0;r<e.subscriptions.length;++r){if("object"!==typeof e.subscriptions[r])throw TypeError(".RPC.subscriptions: object expected");t.subscriptions[r]=i.RPC.SubOpts.fromObject(e.subscriptions[r])}}if(e.messages){if(!Array.isArray(e.messages))throw TypeError(".RPC.messages: array expected");for(t.messages=[],r=0;r<e.messages.length;++r){if("object"!==typeof e.messages[r])throw TypeError(".RPC.messages: object expected");t.messages[r]=i.RPC.Message.fromObject(e.messages[r])}}if(null!=e.control){if("object"!==typeof e.control)throw TypeError(".RPC.control: object expected");t.control=i.RPC.ControlMessage.fromObject(e.control)}return t},o.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.subscriptions=[],r.messages=[]),e.subscriptions&&e.subscriptions.length){r.subscriptions=[];for(var n=0;n<e.subscriptions.length;++n)r.subscriptions[n]=i.RPC.SubOpts.toObject(e.subscriptions[n],t)}if(e.messages&&e.messages.length)for(r.messages=[],n=0;n<e.messages.length;++n)r.messages[n]=i.RPC.Message.toObject(e.messages[n],t);return null!=e.control&&e.hasOwnProperty("control")&&(r.control=i.RPC.ControlMessage.toObject(e.control,t),t.oneofs&&(r._control="control")),r},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.SubOpts=function(){function o(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var s;return o.prototype.subscribe=null,o.prototype.topic=null,Object.defineProperty(o.prototype,"_subscribe",{get:n.oneOfGetter(s=["subscribe"]),set:n.oneOfSetter(s)}),Object.defineProperty(o.prototype,"_topic",{get:n.oneOfGetter(s=["topic"]),set:n.oneOfSetter(s)}),o.encode=function(e,t){return t||(t=r.create()),null!=e.subscribe&&Object.hasOwnProperty.call(e,"subscribe")&&t.uint32(8).bool(e.subscribe),null!=e.topic&&Object.hasOwnProperty.call(e,"topic")&&t.uint32(18).string(e.topic),t},o.decode=function(e,r){e instanceof t||(e=t.create(e));for(var n=void 0===r?e.len:e.pos+r,o=new i.RPC.SubOpts;e.pos<n;){var s=e.uint32();switch(s>>>3){case 1:o.subscribe=e.bool();break;case 2:o.topic=e.string();break;default:e.skipType(7&s)}}return o},o.fromObject=function(e){if(e instanceof i.RPC.SubOpts)return e;var t=new i.RPC.SubOpts;return null!=e.subscribe&&(t.subscribe=Boolean(e.subscribe)),null!=e.topic&&(t.topic=String(e.topic)),t},o.toObject=function(e,t){t||(t={});var r={};return null!=e.subscribe&&e.hasOwnProperty("subscribe")&&(r.subscribe=e.subscribe,t.oneofs&&(r._subscribe="subscribe")),null!=e.topic&&e.hasOwnProperty("topic")&&(r.topic=e.topic,t.oneofs&&(r._topic="topic")),r},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o}(),o.Message=function(){function o(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var s;return o.prototype.from=null,o.prototype.data=null,o.prototype.seqno=null,o.prototype.topic="",o.prototype.signature=null,o.prototype.key=null,Object.defineProperty(o.prototype,"_from",{get:n.oneOfGetter(s=["from"]),set:n.oneOfSetter(s)}),Object.defineProperty(o.prototype,"_data",{get:n.oneOfGetter(s=["data"]),set:n.oneOfSetter(s)}),Object.defineProperty(o.prototype,"_seqno",{get:n.oneOfGetter(s=["seqno"]),set:n.oneOfSetter(s)}),Object.defineProperty(o.prototype,"_signature",{get:n.oneOfGetter(s=["signature"]),set:n.oneOfSetter(s)}),Object.defineProperty(o.prototype,"_key",{get:n.oneOfGetter(s=["key"]),set:n.oneOfSetter(s)}),o.encode=function(e,t){return t||(t=r.create()),null!=e.from&&Object.hasOwnProperty.call(e,"from")&&t.uint32(10).bytes(e.from),null!=e.data&&Object.hasOwnProperty.call(e,"data")&&t.uint32(18).bytes(e.data),null!=e.seqno&&Object.hasOwnProperty.call(e,"seqno")&&t.uint32(26).bytes(e.seqno),t.uint32(34).string(e.topic),null!=e.signature&&Object.hasOwnProperty.call(e,"signature")&&t.uint32(42).bytes(e.signature),null!=e.key&&Object.hasOwnProperty.call(e,"key")&&t.uint32(50).bytes(e.key),t},o.decode=function(e,r){e instanceof t||(e=t.create(e));for(var o=void 0===r?e.len:e.pos+r,s=new i.RPC.Message;e.pos<o;){var a=e.uint32();switch(a>>>3){case 1:s.from=e.bytes();break;case 2:s.data=e.bytes();break;case 3:s.seqno=e.bytes();break;case 4:s.topic=e.string();break;case 5:s.signature=e.bytes();break;case 6:s.key=e.bytes();break;default:e.skipType(7&a)}}if(!s.hasOwnProperty("topic"))throw n.ProtocolError("missing required 'topic'",{instance:s});return s},o.fromObject=function(e){if(e instanceof i.RPC.Message)return e;var t=new i.RPC.Message;return null!=e.from&&("string"===typeof e.from?n.base64.decode(e.from,t.from=n.newBuffer(n.base64.length(e.from)),0):e.from.length&&(t.from=e.from)),null!=e.data&&("string"===typeof e.data?n.base64.decode(e.data,t.data=n.newBuffer(n.base64.length(e.data)),0):e.data.length&&(t.data=e.data)),null!=e.seqno&&("string"===typeof e.seqno?n.base64.decode(e.seqno,t.seqno=n.newBuffer(n.base64.length(e.seqno)),0):e.seqno.length&&(t.seqno=e.seqno)),null!=e.topic&&(t.topic=String(e.topic)),null!=e.signature&&("string"===typeof e.signature?n.base64.decode(e.signature,t.signature=n.newBuffer(n.base64.length(e.signature)),0):e.signature.length&&(t.signature=e.signature)),null!=e.key&&("string"===typeof e.key?n.base64.decode(e.key,t.key=n.newBuffer(n.base64.length(e.key)),0):e.key.length&&(t.key=e.key)),t},o.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.topic=""),null!=e.from&&e.hasOwnProperty("from")&&(r.from=t.bytes===String?n.base64.encode(e.from,0,e.from.length):t.bytes===Array?Array.prototype.slice.call(e.from):e.from,t.oneofs&&(r._from="from")),null!=e.data&&e.hasOwnProperty("data")&&(r.data=t.bytes===String?n.base64.encode(e.data,0,e.data.length):t.bytes===Array?Array.prototype.slice.call(e.data):e.data,t.oneofs&&(r._data="data")),null!=e.seqno&&e.hasOwnProperty("seqno")&&(r.seqno=t.bytes===String?n.base64.encode(e.seqno,0,e.seqno.length):t.bytes===Array?Array.prototype.slice.call(e.seqno):e.seqno,t.oneofs&&(r._seqno="seqno")),null!=e.topic&&e.hasOwnProperty("topic")&&(r.topic=e.topic),null!=e.signature&&e.hasOwnProperty("signature")&&(r.signature=t.bytes===String?n.base64.encode(e.signature,0,e.signature.length):t.bytes===Array?Array.prototype.slice.call(e.signature):e.signature,t.oneofs&&(r._signature="signature")),null!=e.key&&e.hasOwnProperty("key")&&(r.key=t.bytes===String?n.base64.encode(e.key,0,e.key.length):t.bytes===Array?Array.prototype.slice.call(e.key):e.key,t.oneofs&&(r._key="key")),r},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o}(),o.ControlMessage=function(){function o(e){if(this.ihave=[],this.iwant=[],this.graft=[],this.prune=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return o.prototype.ihave=n.emptyArray,o.prototype.iwant=n.emptyArray,o.prototype.graft=n.emptyArray,o.prototype.prune=n.emptyArray,o.encode=function(e,t){if(t||(t=r.create()),null!=e.ihave&&e.ihave.length)for(var n=0;n<e.ihave.length;++n)i.RPC.ControlIHave.encode(e.ihave[n],t.uint32(10).fork()).ldelim();if(null!=e.iwant&&e.iwant.length)for(n=0;n<e.iwant.length;++n)i.RPC.ControlIWant.encode(e.iwant[n],t.uint32(18).fork()).ldelim();if(null!=e.graft&&e.graft.length)for(n=0;n<e.graft.length;++n)i.RPC.ControlGraft.encode(e.graft[n],t.uint32(26).fork()).ldelim();if(null!=e.prune&&e.prune.length)for(n=0;n<e.prune.length;++n)i.RPC.ControlPrune.encode(e.prune[n],t.uint32(34).fork()).ldelim();return t},o.decode=function(e,r){e instanceof t||(e=t.create(e));for(var n=void 0===r?e.len:e.pos+r,o=new i.RPC.ControlMessage;e.pos<n;){var s=e.uint32();switch(s>>>3){case 1:o.ihave&&o.ihave.length||(o.ihave=[]),o.ihave.push(i.RPC.ControlIHave.decode(e,e.uint32()));break;case 2:o.iwant&&o.iwant.length||(o.iwant=[]),o.iwant.push(i.RPC.ControlIWant.decode(e,e.uint32()));break;case 3:o.graft&&o.graft.length||(o.graft=[]),o.graft.push(i.RPC.ControlGraft.decode(e,e.uint32()));break;case 4:o.prune&&o.prune.length||(o.prune=[]),o.prune.push(i.RPC.ControlPrune.decode(e,e.uint32()));break;default:e.skipType(7&s)}}return o},o.fromObject=function(e){if(e instanceof i.RPC.ControlMessage)return e;var t=new i.RPC.ControlMessage;if(e.ihave){if(!Array.isArray(e.ihave))throw TypeError(".RPC.ControlMessage.ihave: array expected");t.ihave=[];for(var r=0;r<e.ihave.length;++r){if("object"!==typeof e.ihave[r])throw TypeError(".RPC.ControlMessage.ihave: object expected");t.ihave[r]=i.RPC.ControlIHave.fromObject(e.ihave[r])}}if(e.iwant){if(!Array.isArray(e.iwant))throw TypeError(".RPC.ControlMessage.iwant: array expected");for(t.iwant=[],r=0;r<e.iwant.length;++r){if("object"!==typeof e.iwant[r])throw TypeError(".RPC.ControlMessage.iwant: object expected");t.iwant[r]=i.RPC.ControlIWant.fromObject(e.iwant[r])}}if(e.graft){if(!Array.isArray(e.graft))throw TypeError(".RPC.ControlMessage.graft: array expected");for(t.graft=[],r=0;r<e.graft.length;++r){if("object"!==typeof e.graft[r])throw TypeError(".RPC.ControlMessage.graft: object expected");t.graft[r]=i.RPC.ControlGraft.fromObject(e.graft[r])}}if(e.prune){if(!Array.isArray(e.prune))throw TypeError(".RPC.ControlMessage.prune: array expected");for(t.prune=[],r=0;r<e.prune.length;++r){if("object"!==typeof e.prune[r])throw TypeError(".RPC.ControlMessage.prune: object expected");t.prune[r]=i.RPC.ControlPrune.fromObject(e.prune[r])}}return t},o.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.ihave=[],r.iwant=[],r.graft=[],r.prune=[]),e.ihave&&e.ihave.length){r.ihave=[];for(var n=0;n<e.ihave.length;++n)r.ihave[n]=i.RPC.ControlIHave.toObject(e.ihave[n],t)}if(e.iwant&&e.iwant.length)for(r.iwant=[],n=0;n<e.iwant.length;++n)r.iwant[n]=i.RPC.ControlIWant.toObject(e.iwant[n],t);if(e.graft&&e.graft.length)for(r.graft=[],n=0;n<e.graft.length;++n)r.graft[n]=i.RPC.ControlGraft.toObject(e.graft[n],t);if(e.prune&&e.prune.length)for(r.prune=[],n=0;n<e.prune.length;++n)r.prune[n]=i.RPC.ControlPrune.toObject(e.prune[n],t);return r},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o}(),o.ControlIHave=function(){function o(e){if(this.messageIDs=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var s;return o.prototype.topicID=null,o.prototype.messageIDs=n.emptyArray,Object.defineProperty(o.prototype,"_topicID",{get:n.oneOfGetter(s=["topicID"]),set:n.oneOfSetter(s)}),o.encode=function(e,t){if(t||(t=r.create()),null!=e.topicID&&Object.hasOwnProperty.call(e,"topicID")&&t.uint32(10).string(e.topicID),null!=e.messageIDs&&e.messageIDs.length)for(var n=0;n<e.messageIDs.length;++n)t.uint32(18).bytes(e.messageIDs[n]);return t},o.decode=function(e,r){e instanceof t||(e=t.create(e));for(var n=void 0===r?e.len:e.pos+r,o=new i.RPC.ControlIHave;e.pos<n;){var s=e.uint32();switch(s>>>3){case 1:o.topicID=e.string();break;case 2:o.messageIDs&&o.messageIDs.length||(o.messageIDs=[]),o.messageIDs.push(e.bytes());break;default:e.skipType(7&s)}}return o},o.fromObject=function(e){if(e instanceof i.RPC.ControlIHave)return e;var t=new i.RPC.ControlIHave;if(null!=e.topicID&&(t.topicID=String(e.topicID)),e.messageIDs){if(!Array.isArray(e.messageIDs))throw TypeError(".RPC.ControlIHave.messageIDs: array expected");t.messageIDs=[];for(var r=0;r<e.messageIDs.length;++r)"string"===typeof e.messageIDs[r]?n.base64.decode(e.messageIDs[r],t.messageIDs[r]=n.newBuffer(n.base64.length(e.messageIDs[r])),0):e.messageIDs[r].length&&(t.messageIDs[r]=e.messageIDs[r])}return t},o.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.messageIDs=[]),null!=e.topicID&&e.hasOwnProperty("topicID")&&(r.topicID=e.topicID,t.oneofs&&(r._topicID="topicID")),e.messageIDs&&e.messageIDs.length){r.messageIDs=[];for(var i=0;i<e.messageIDs.length;++i)r.messageIDs[i]=t.bytes===String?n.base64.encode(e.messageIDs[i],0,e.messageIDs[i].length):t.bytes===Array?Array.prototype.slice.call(e.messageIDs[i]):e.messageIDs[i]}return r},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o}(),o.ControlIWant=function(){function o(e){if(this.messageIDs=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return o.prototype.messageIDs=n.emptyArray,o.encode=function(e,t){if(t||(t=r.create()),null!=e.messageIDs&&e.messageIDs.length)for(var n=0;n<e.messageIDs.length;++n)t.uint32(10).bytes(e.messageIDs[n]);return t},o.decode=function(e,r){e instanceof t||(e=t.create(e));for(var n=void 0===r?e.len:e.pos+r,o=new i.RPC.ControlIWant;e.pos<n;){var s=e.uint32();s>>>3===1?(o.messageIDs&&o.messageIDs.length||(o.messageIDs=[]),o.messageIDs.push(e.bytes())):e.skipType(7&s)}return o},o.fromObject=function(e){if(e instanceof i.RPC.ControlIWant)return e;var t=new i.RPC.ControlIWant;if(e.messageIDs){if(!Array.isArray(e.messageIDs))throw TypeError(".RPC.ControlIWant.messageIDs: array expected");t.messageIDs=[];for(var r=0;r<e.messageIDs.length;++r)"string"===typeof e.messageIDs[r]?n.base64.decode(e.messageIDs[r],t.messageIDs[r]=n.newBuffer(n.base64.length(e.messageIDs[r])),0):e.messageIDs[r].length&&(t.messageIDs[r]=e.messageIDs[r])}return t},o.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.messageIDs=[]),e.messageIDs&&e.messageIDs.length){r.messageIDs=[];for(var i=0;i<e.messageIDs.length;++i)r.messageIDs[i]=t.bytes===String?n.base64.encode(e.messageIDs[i],0,e.messageIDs[i].length):t.bytes===Array?Array.prototype.slice.call(e.messageIDs[i]):e.messageIDs[i]}return r},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o}(),o.ControlGraft=function(){function o(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var s;return o.prototype.topicID=null,Object.defineProperty(o.prototype,"_topicID",{get:n.oneOfGetter(s=["topicID"]),set:n.oneOfSetter(s)}),o.encode=function(e,t){return t||(t=r.create()),null!=e.topicID&&Object.hasOwnProperty.call(e,"topicID")&&t.uint32(10).string(e.topicID),t},o.decode=function(e,r){e instanceof t||(e=t.create(e));for(var n=void 0===r?e.len:e.pos+r,o=new i.RPC.ControlGraft;e.pos<n;){var s=e.uint32();s>>>3===1?o.topicID=e.string():e.skipType(7&s)}return o},o.fromObject=function(e){if(e instanceof i.RPC.ControlGraft)return e;var t=new i.RPC.ControlGraft;return null!=e.topicID&&(t.topicID=String(e.topicID)),t},o.toObject=function(e,t){t||(t={});var r={};return null!=e.topicID&&e.hasOwnProperty("topicID")&&(r.topicID=e.topicID,t.oneofs&&(r._topicID="topicID")),r},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o}(),o.ControlPrune=function(){function o(e){if(this.peers=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var s;return o.prototype.topicID=null,o.prototype.peers=n.emptyArray,o.prototype.backoff=null,Object.defineProperty(o.prototype,"_topicID",{get:n.oneOfGetter(s=["topicID"]),set:n.oneOfSetter(s)}),Object.defineProperty(o.prototype,"_backoff",{get:n.oneOfGetter(s=["backoff"]),set:n.oneOfSetter(s)}),o.encode=function(e,t){if(t||(t=r.create()),null!=e.topicID&&Object.hasOwnProperty.call(e,"topicID")&&t.uint32(10).string(e.topicID),null!=e.peers&&e.peers.length)for(var n=0;n<e.peers.length;++n)i.RPC.PeerInfo.encode(e.peers[n],t.uint32(18).fork()).ldelim();return null!=e.backoff&&Object.hasOwnProperty.call(e,"backoff")&&t.uint32(24).uint64(e.backoff),t},o.decode=function(e,r){e instanceof t||(e=t.create(e));for(var n=void 0===r?e.len:e.pos+r,o=new i.RPC.ControlPrune;e.pos<n;){var s=e.uint32();switch(s>>>3){case 1:o.topicID=e.string();break;case 2:o.peers&&o.peers.length||(o.peers=[]),o.peers.push(i.RPC.PeerInfo.decode(e,e.uint32()));break;case 3:o.backoff=e.uint64();break;default:e.skipType(7&s)}}return o},o.fromObject=function(e){if(e instanceof i.RPC.ControlPrune)return e;var t=new i.RPC.ControlPrune;if(null!=e.topicID&&(t.topicID=String(e.topicID)),e.peers){if(!Array.isArray(e.peers))throw TypeError(".RPC.ControlPrune.peers: array expected");t.peers=[];for(var r=0;r<e.peers.length;++r){if("object"!==typeof e.peers[r])throw TypeError(".RPC.ControlPrune.peers: object expected");t.peers[r]=i.RPC.PeerInfo.fromObject(e.peers[r])}}return null!=e.backoff&&(n.Long?(t.backoff=n.Long.fromValue(e.backoff)).unsigned=!0:"string"===typeof e.backoff?t.backoff=parseInt(e.backoff,10):"number"===typeof e.backoff?t.backoff=e.backoff:"object"===typeof e.backoff&&(t.backoff=new n.LongBits(e.backoff.low>>>0,e.backoff.high>>>0).toNumber(!0))),t},o.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.peers=[]),null!=e.topicID&&e.hasOwnProperty("topicID")&&(r.topicID=e.topicID,t.oneofs&&(r._topicID="topicID")),e.peers&&e.peers.length){r.peers=[];for(var o=0;o<e.peers.length;++o)r.peers[o]=i.RPC.PeerInfo.toObject(e.peers[o],t)}return null!=e.backoff&&e.hasOwnProperty("backoff")&&("number"===typeof e.backoff?r.backoff=t.longs===String?String(e.backoff):e.backoff:r.backoff=t.longs===String?n.Long.prototype.toString.call(e.backoff):t.longs===Number?new n.LongBits(e.backoff.low>>>0,e.backoff.high>>>0).toNumber(!0):e.backoff,t.oneofs&&(r._backoff="backoff")),r},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o}(),o.PeerInfo=function(){function o(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}var s;return o.prototype.peerID=null,o.prototype.signedPeerRecord=null,Object.defineProperty(o.prototype,"_peerID",{get:n.oneOfGetter(s=["peerID"]),set:n.oneOfSetter(s)}),Object.defineProperty(o.prototype,"_signedPeerRecord",{get:n.oneOfGetter(s=["signedPeerRecord"]),set:n.oneOfSetter(s)}),o.encode=function(e,t){return t||(t=r.create()),null!=e.peerID&&Object.hasOwnProperty.call(e,"peerID")&&t.uint32(10).bytes(e.peerID),null!=e.signedPeerRecord&&Object.hasOwnProperty.call(e,"signedPeerRecord")&&t.uint32(18).bytes(e.signedPeerRecord),t},o.decode=function(e,r){e instanceof t||(e=t.create(e));for(var n=void 0===r?e.len:e.pos+r,o=new i.RPC.PeerInfo;e.pos<n;){var s=e.uint32();switch(s>>>3){case 1:o.peerID=e.bytes();break;case 2:o.signedPeerRecord=e.bytes();break;default:e.skipType(7&s)}}return o},o.fromObject=function(e){if(e instanceof i.RPC.PeerInfo)return e;var t=new i.RPC.PeerInfo;return null!=e.peerID&&("string"===typeof e.peerID?n.base64.decode(e.peerID,t.peerID=n.newBuffer(n.base64.length(e.peerID)),0):e.peerID.length&&(t.peerID=e.peerID)),null!=e.signedPeerRecord&&("string"===typeof e.signedPeerRecord?n.base64.decode(e.signedPeerRecord,t.signedPeerRecord=n.newBuffer(n.base64.length(e.signedPeerRecord)),0):e.signedPeerRecord.length&&(t.signedPeerRecord=e.signedPeerRecord)),t},o.toObject=function(e,t){t||(t={});var r={};return null!=e.peerID&&e.hasOwnProperty("peerID")&&(r.peerID=t.bytes===String?n.base64.encode(e.peerID,0,e.peerID.length):t.bytes===Array?Array.prototype.slice.call(e.peerID):e.peerID,t.oneofs&&(r._peerID="peerID")),null!=e.signedPeerRecord&&e.hasOwnProperty("signedPeerRecord")&&(r.signedPeerRecord=t.bytes===String?n.base64.encode(e.signedPeerRecord,0,e.signedPeerRecord.length):t.bytes===Array?Array.prototype.slice.call(e.signedPeerRecord):e.signedPeerRecord,t.oneofs&&(r._signedPeerRecord="signedPeerRecord")),r},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o}(),o}(),i})?n.apply(t,i):n)||(e.exports=o)},907:(e,t,r)=>{"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}r.d(t,{Z:()=>n})},4236:(e,t,r)=>{"use strict";function n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}r.d(t,{Z:()=>n})},3144:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(9142);function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(0,n.Z)(i.key),i)}}function o(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}},4942:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(9142);function i(e,t,r){return(t=(0,n.Z)(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},7462:(e,t,r)=>{"use strict";function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},n.apply(this,arguments)}r.d(t,{Z:()=>n})},1721:(e,t,r)=>{"use strict";function n(e,t){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},n(e,t)}function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,n(e,t)}r.d(t,{Z:()=>i})},5987:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(3366);function i(e,t){if(null==e)return{};var r,i,o=(0,n.Z)(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}},3366:(e,t,r)=>{"use strict";function n(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}r.d(t,{Z:()=>n})},885:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(181);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,s,a=[],c=!0,l=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=o.call(r)).done)&&(a.push(n.value),a.length!==t);c=!0);}catch(u){l=!0,i=u}finally{try{if(!c&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(l)throw i}}return a}}(e,t)||(0,n.Z)(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},2982:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(907);var i=r(181);function o(e){return function(e){if(Array.isArray(e))return(0,n.Z)(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||(0,i.Z)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},9142:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(1002);function i(e){var t=function(e,t){if("object"!==(0,n.Z)(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!==(0,n.Z)(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===(0,n.Z)(t)?t:String(t)}},1002:(e,t,r)=>{"use strict";function n(e){return n="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},n(e)}r.d(t,{Z:()=>n})},181:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(907);function i(e,t){if(e){if("string"===typeof e)return(0,n.Z)(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?(0,n.Z)(e,t):void 0}}}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__webpack_require__),r.loaded=!0,r.exports}__webpack_require__.amdO={},__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;__webpack_require__.t=function(r,n){if(1&n&&(r=this(r)),8&n)return r;if("object"===typeof r&&r){if(4&n&&r.__esModule)return r;if(16&n&&"function"===typeof r.then)return r}var i=Object.create(null);__webpack_require__.r(i);var o={};e=e||[null,t({}),t([]),t(t)];for(var s=2&n&&r;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>o[e]=()=>r[e]));return o.default=()=>r,__webpack_require__.d(i,o),i}})(),__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var __webpack_exports__={};(()=>{"use strict";var e={};__webpack_require__.r(e),__webpack_require__.d(e,{identity:()=>hr});var t={};__webpack_require__.r(t),__webpack_require__.d(t,{base2:()=>dr});var r={};__webpack_require__.r(r),__webpack_require__.d(r,{base8:()=>fr});var n={};__webpack_require__.r(n),__webpack_require__.d(n,{base10:()=>pr});var i={};__webpack_require__.r(i),__webpack_require__.d(i,{base16:()=>gr,base16upper:()=>mr});var o={};__webpack_require__.r(o),__webpack_require__.d(o,{base32:()=>yr,base32hex:()=>Er,base32hexpad:()=>_r,base32hexpadupper:()=>Ar,base32hexupper:()=>Sr,base32pad:()=>br,base32padupper:()=>wr,base32upper:()=>vr,base32z:()=>kr});var s={};__webpack_require__.r(s),__webpack_require__.d(s,{base36:()=>Cr,base36upper:()=>xr});var a={};__webpack_require__.r(a),__webpack_require__.d(a,{base58btc:()=>Ir,base58flickr:()=>Rr});var c={};__webpack_require__.r(c),__webpack_require__.d(c,{base64:()=>Pr,base64pad:()=>Tr,base64url:()=>Nr,base64urlpad:()=>Dr});var l={};__webpack_require__.r(l),__webpack_require__.d(l,{base256emoji:()=>Lr});var u={};__webpack_require__.r(u),__webpack_require__.d(u,{sha256:()=>on,sha512:()=>sn});var h={};__webpack_require__.r(h),__webpack_require__.d(h,{identity:()=>cn});var d={};__webpack_require__.r(d),__webpack_require__.d(d,{code:()=>un,decode:()=>dn,encode:()=>hn,name:()=>ln});var f={};__webpack_require__.r(f),__webpack_require__.d(f,{code:()=>mn,decode:()=>vn,encode:()=>yn,name:()=>gn});var p={};__webpack_require__.r(p),__webpack_require__.d(p,{base58btc:()=>Zi,base58flickr:()=>Vi});var g={};__webpack_require__.r(g),__webpack_require__.d(g,{base32:()=>ho,base32hex:()=>mo,base32hexpad:()=>vo,base32hexpadupper:()=>bo,base32hexupper:()=>yo,base32pad:()=>po,base32padupper:()=>go,base32upper:()=>fo,base32z:()=>wo});var m={};__webpack_require__.r(m),__webpack_require__.d(m,{identity:()=>Mo});var y={};__webpack_require__.r(y),__webpack_require__.d(y,{base2:()=>Bo});var v={};__webpack_require__.r(v),__webpack_require__.d(v,{base8:()=>Lo});var b={};__webpack_require__.r(b),__webpack_require__.d(b,{base10:()=>Uo});var w={};__webpack_require__.r(w),__webpack_require__.d(w,{base16:()=>Fo,base16upper:()=>jo});var E={};__webpack_require__.r(E),__webpack_require__.d(E,{base36:()=>zo,base36upper:()=>Ko});var S={};__webpack_require__.r(S),__webpack_require__.d(S,{base64:()=>qo,base64pad:()=>Zo,base64url:()=>Vo,base64urlpad:()=>Ho});var _={};__webpack_require__.r(_),__webpack_require__.d(_,{base256emoji:()=>Qo});var A={};__webpack_require__.r(A),__webpack_require__.d(A,{sha256:()=>es,sha512:()=>ts});var k={};__webpack_require__.r(k),__webpack_require__.d(k,{identity:()=>ns});var C={};__webpack_require__.r(C),__webpack_require__.d(C,{code:()=>os,decode:()=>as,encode:()=>ss,name:()=>is});var x={};__webpack_require__.r(x),__webpack_require__.d(x,{code:()=>hs,decode:()=>fs,encode:()=>ds,name:()=>us});var I={};__webpack_require__.r(I),__webpack_require__.d(I,{base58btc:()=>eh,base58flickr:()=>th});var R={};__webpack_require__.r(R),__webpack_require__.d(R,{identity:()=>Sh});var P={};__webpack_require__.r(P),__webpack_require__.d(P,{sha256:()=>Ch,sha512:()=>xh});var T={};__webpack_require__.r(T),__webpack_require__.d(T,{base64:()=>Pd,base64pad:()=>Td,base64url:()=>Nd,base64urlpad:()=>Dd});var N={};__webpack_require__.r(N),__webpack_require__.d(N,{Ed25519PrivateKey:()=>qd,Ed25519PublicKey:()=>Kd,generateKeyPair:()=>Hd,generateKeyPairFromSeed:()=>Wd,unmarshalEd25519PrivateKey:()=>Zd,unmarshalEd25519PublicKey:()=>Vd});var D={};__webpack_require__.r(D),__webpack_require__.d(D,{RsaPrivateKey:()=>af,RsaPublicKey:()=>sf,fromJwk:()=>uf,generateKeyPair:()=>hf,unmarshalRsaPrivateKey:()=>cf,unmarshalRsaPublicKey:()=>lf});var O={};__webpack_require__.r(O),__webpack_require__.d(O,{Secp256k1PrivateKey:()=>pf,Secp256k1PublicKey:()=>ff,generateKeyPair:()=>yf,unmarshalSecp256k1PrivateKey:()=>gf,unmarshalSecp256k1PublicKey:()=>mf});var M={};__webpack_require__.r(M),__webpack_require__.d(M,{identity:()=>Cf});var B={};__webpack_require__.r(B),__webpack_require__.d(B,{base2:()=>xf});var L={};__webpack_require__.r(L),__webpack_require__.d(L,{base8:()=>If});var U={};__webpack_require__.r(U),__webpack_require__.d(U,{base10:()=>Rf});var F={};__webpack_require__.r(F),__webpack_require__.d(F,{base16:()=>Pf,base16upper:()=>Tf});var j={};__webpack_require__.r(j),__webpack_require__.d(j,{base32:()=>Nf,base32hex:()=>Bf,base32hexpad:()=>Uf,base32hexpadupper:()=>Ff,base32hexupper:()=>Lf,base32pad:()=>Of,base32padupper:()=>Mf,base32upper:()=>Df,base32z:()=>jf});var z={};__webpack_require__.r(z),__webpack_require__.d(z,{base36:()=>zf,base36upper:()=>Kf});var K={};__webpack_require__.r(K),__webpack_require__.d(K,{base256emoji:()=>Hf});var q={};__webpack_require__.r(q),__webpack_require__.d(q,{code:()=>Gf,decode:()=>Qf,encode:()=>Yf,name:()=>Wf});var Z={};__webpack_require__.r(Z),__webpack_require__.d(Z,{code:()=>ep,decode:()=>rp,encode:()=>tp,name:()=>$f});var V=__webpack_require__(7313),H=__webpack_require__(1168),W=(__webpack_require__(5220),__webpack_require__(4942)),G=__webpack_require__(2422),Y=__webpack_require__(4148),Q=__webpack_require__(9716),J=__webpack_require__(8050),X=__webpack_require__(2149);Q._configure(),G._configure(Y),J._configure(X);const $=["uint64","int64","sint64","fixed64","sfixed64"];function ee(e){return function(e){for(const t of $){if(null==e[t])continue;const r=e[t];e[t]=function(){return BigInt(r.call(this).toString())}}return e}(new G(e))}function te(){return function(e){for(const t of $){if(null==e[t])continue;const r=e[t];e[t]=function(e){return r.call(this,e.toString())}}return e}(J.create())}function re(e,t){const r=ee(e instanceof Uint8Array?e:e.subarray());return t.decode(r)}function ne(e,t){const r=te();return t.encode(e,r,{lengthDelimited:!1}),r.finish()}var ie,oe,se,ae,ce,le,ue,he,de,fe,pe,ge,me,ye,ve,be,we,Ee,Se,_e,Ae,ke,Ce,xe,Ie,Re,Pe,Te,Ne,De,Oe;function Me(e,t,r,n){return{name:e,type:t,encode:r,decode:n}}function Be(e){function t(t){if(null==e[t.toString()])throw new Error("Invalid enum value");return e[t]}return Me("enum",ie.VARINT,(function(e,r){const n=t(e);r.int32(n)}),(function(e){return t(e.int32())}))}function Le(e,t){return Me("message",ie.LENGTH_DELIMITED,e,t)}!function(e){e[e.VARINT=0]="VARINT",e[e.BIT64=1]="BIT64",e[e.LENGTH_DELIMITED=2]="LENGTH_DELIMITED",e[e.START_GROUP=3]="START_GROUP",e[e.END_GROUP=4]="END_GROUP",e[e.BIT32=5]="BIT32"}(ie||(ie={})),function(e){let t;e.codec=()=>(null==t&&(t=Le((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!1!==r.lengthDelimited&&t.fork(),null!=e.proof&&e.proof.byteLength>0&&(t.uint32(10),t.bytes(e.proof)),null!=e.merkleRoot&&e.merkleRoot.byteLength>0&&(t.uint32(18),t.bytes(e.merkleRoot)),null!=e.epoch&&e.epoch.byteLength>0&&(t.uint32(26),t.bytes(e.epoch)),null!=e.shareX&&e.shareX.byteLength>0&&(t.uint32(34),t.bytes(e.shareX)),null!=e.shareY&&e.shareY.byteLength>0&&(t.uint32(42),t.bytes(e.shareY)),null!=e.nullifier&&e.nullifier.byteLength>0&&(t.uint32(50),t.bytes(e.nullifier)),null!=e.rlnIdentifier&&e.rlnIdentifier.byteLength>0&&(t.uint32(58),t.bytes(e.rlnIdentifier)),!1!==r.lengthDelimited&&t.ldelim()}),((e,t)=>{const r={proof:new Uint8Array(0),merkleRoot:new Uint8Array(0),epoch:new Uint8Array(0),shareX:new Uint8Array(0),shareY:new Uint8Array(0),nullifier:new Uint8Array(0),rlnIdentifier:new Uint8Array(0)},n=null==t?e.len:e.pos+t;for(;e.pos<n;){const t=e.uint32();switch(t>>>3){case 1:r.proof=e.bytes();break;case 2:r.merkleRoot=e.bytes();break;case 3:r.epoch=e.bytes();break;case 4:r.shareX=e.bytes();break;case 5:r.shareY=e.bytes();break;case 6:r.nullifier=e.bytes();break;case 7:r.rlnIdentifier=e.bytes();break;default:e.skipType(7&t)}}return r}))),t),e.encode=t=>ne(t,e.codec()),e.decode=t=>re(t,e.codec())}(oe||(oe={})),function(e){let t;e.codec=()=>(null==t&&(t=Le((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!1!==r.lengthDelimited&&t.fork(),null!=e.payload&&e.payload.byteLength>0&&(t.uint32(10),t.bytes(e.payload)),null!=e.contentTopic&&""!==e.contentTopic&&(t.uint32(18),t.string(e.contentTopic)),null!=e.version&&(t.uint32(24),t.uint32(e.version)),null!=e.timestamp&&(t.uint32(80),t.sint64(e.timestamp)),null!=e.meta&&(t.uint32(90),t.bytes(e.meta)),null!=e.rateLimitProof&&(t.uint32(170),oe.codec().encode(e.rateLimitProof,t)),null!=e.ephemeral&&(t.uint32(248),t.bool(e.ephemeral)),!1!==r.lengthDelimited&&t.ldelim()}),((e,t)=>{const r={payload:new Uint8Array(0),contentTopic:""},n=null==t?e.len:e.pos+t;for(;e.pos<n;){const t=e.uint32();switch(t>>>3){case 1:r.payload=e.bytes();break;case 2:r.contentTopic=e.string();break;case 3:r.version=e.uint32();break;case 10:r.timestamp=e.sint64();break;case 11:r.meta=e.bytes();break;case 21:r.rateLimitProof=oe.codec().decode(e,e.uint32());break;case 31:r.ephemeral=e.bool();break;default:e.skipType(7&t)}}return r}))),t),e.encode=t=>ne(t,e.codec()),e.decode=t=>re(t,e.codec())}(se||(se={})),function(e){let t,r;!function(e){let t;e.codec=()=>(null==t&&(t=Le((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!1!==r.lengthDelimited&&t.fork(),null!=e.contentTopic&&""!==e.contentTopic&&(t.uint32(10),t.string(e.contentTopic)),!1!==r.lengthDelimited&&t.ldelim()}),((e,t)=>{const r={contentTopic:""},n=null==t?e.len:e.pos+t;for(;e.pos<n;){const t=e.uint32();if(t>>>3===1)r.contentTopic=e.string();else e.skipType(7&t)}return r}))),t),e.encode=t=>ne(t,e.codec()),e.decode=t=>re(t,e.codec())}(t=e.ContentFilter||(e.ContentFilter={})),e.codec=()=>(null==r&&(r=Le((function(t,r){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!1!==n.lengthDelimited&&r.fork(),null!=t.subscribe&&!1!==t.subscribe&&(r.uint32(8),r.bool(t.subscribe)),null!=t.topic&&""!==t.topic&&(r.uint32(18),r.string(t.topic)),null!=t.contentFilters)for(const i of t.contentFilters)r.uint32(26),e.ContentFilter.codec().encode(i,r);!1!==n.lengthDelimited&&r.ldelim()}),((t,r)=>{const n={subscribe:!1,topic:"",contentFilters:[]},i=null==r?t.len:t.pos+r;for(;t.pos<i;){const r=t.uint32();switch(r>>>3){case 1:n.subscribe=t.bool();break;case 2:n.topic=t.string();break;case 3:n.contentFilters.push(e.ContentFilter.codec().decode(t,t.uint32()));break;default:t.skipType(7&r)}}return n}))),r),e.encode=t=>ne(t,e.codec()),e.decode=t=>re(t,e.codec())}(ae||(ae={})),function(e){let t;e.codec=()=>(null==t&&(t=Le((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!1!==r.lengthDelimited&&t.fork(),null!=e.messages)for(const n of e.messages)t.uint32(10),he.codec().encode(n,t);!1!==r.lengthDelimited&&t.ldelim()}),((e,t)=>{const r={messages:[]},n=null==t?e.len:e.pos+t;for(;e.pos<n;){const t=e.uint32();if(t>>>3===1)r.messages.push(he.codec().decode(e,e.uint32()));else e.skipType(7&t)}return r}))),t),e.encode=t=>ne(t,e.codec()),e.decode=t=>re(t,e.codec())}(ce||(ce={})),function(e){let t;e.codec=()=>(null==t&&(t=Le((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!1!==r.lengthDelimited&&t.fork(),null!=e.requestId&&""!==e.requestId&&(t.uint32(10),t.string(e.requestId)),null!=e.request&&(t.uint32(18),ae.codec().encode(e.request,t)),null!=e.push&&(t.uint32(26),ce.codec().encode(e.push,t)),!1!==r.lengthDelimited&&t.ldelim()}),((e,t)=>{const r={requestId:""},n=null==t?e.len:e.pos+t;for(;e.pos<n;){const t=e.uint32();switch(t>>>3){case 1:r.requestId=e.string();break;case 2:r.request=ae.codec().decode(e,e.uint32());break;case 3:r.push=ce.codec().decode(e,e.uint32());break;default:e.skipType(7&t)}}return r}))),t),e.encode=t=>ne(t,e.codec()),e.decode=t=>re(t,e.codec())}(le||(le={})),function(e){let t;e.codec=()=>(null==t&&(t=Le((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!1!==r.lengthDelimited&&t.fork(),null!=e.proof&&e.proof.byteLength>0&&(t.uint32(10),t.bytes(e.proof)),null!=e.merkleRoot&&e.merkleRoot.byteLength>0&&(t.uint32(18),t.bytes(e.merkleRoot)),null!=e.epoch&&e.epoch.byteLength>0&&(t.uint32(26),t.bytes(e.epoch)),null!=e.shareX&&e.shareX.byteLength>0&&(t.uint32(34),t.bytes(e.shareX)),null!=e.shareY&&e.shareY.byteLength>0&&(t.uint32(42),t.bytes(e.shareY)),null!=e.nullifier&&e.nullifier.byteLength>0&&(t.uint32(50),t.bytes(e.nullifier)),null!=e.rlnIdentifier&&e.rlnIdentifier.byteLength>0&&(t.uint32(58),t.bytes(e.rlnIdentifier)),!1!==r.lengthDelimited&&t.ldelim()}),((e,t)=>{const r={proof:new Uint8Array(0),merkleRoot:new Uint8Array(0),epoch:new Uint8Array(0),shareX:new Uint8Array(0),shareY:new Uint8Array(0),nullifier:new Uint8Array(0),rlnIdentifier:new Uint8Array(0)},n=null==t?e.len:e.pos+t;for(;e.pos<n;){const t=e.uint32();switch(t>>>3){case 1:r.proof=e.bytes();break;case 2:r.merkleRoot=e.bytes();break;case 3:r.epoch=e.bytes();break;case 4:r.shareX=e.bytes();break;case 5:r.shareY=e.bytes();break;case 6:r.nullifier=e.bytes();break;case 7:r.rlnIdentifier=e.bytes();break;default:e.skipType(7&t)}}return r}))),t),e.encode=t=>ne(t,e.codec()),e.decode=t=>re(t,e.codec())}(ue||(ue={})),function(e){let t;e.codec=()=>(null==t&&(t=Le((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!1!==r.lengthDelimited&&t.fork(),null!=e.payload&&e.payload.byteLength>0&&(t.uint32(10),t.bytes(e.payload)),null!=e.contentTopic&&""!==e.contentTopic&&(t.uint32(18),t.string(e.contentTopic)),null!=e.version&&(t.uint32(24),t.uint32(e.version)),null!=e.timestamp&&(t.uint32(80),t.sint64(e.timestamp)),null!=e.meta&&(t.uint32(90),t.bytes(e.meta)),null!=e.rateLimitProof&&(t.uint32(170),ue.codec().encode(e.rateLimitProof,t)),null!=e.ephemeral&&(t.uint32(248),t.bool(e.ephemeral)),!1!==r.lengthDelimited&&t.ldelim()}),((e,t)=>{const r={payload:new Uint8Array(0),contentTopic:""},n=null==t?e.len:e.pos+t;for(;e.pos<n;){const t=e.uint32();switch(t>>>3){case 1:r.payload=e.bytes();break;case 2:r.contentTopic=e.string();break;case 3:r.version=e.uint32();break;case 10:r.timestamp=e.sint64();break;case 11:r.meta=e.bytes();break;case 21:r.rateLimitProof=ue.codec().decode(e,e.uint32());break;case 31:r.ephemeral=e.bool();break;default:e.skipType(7&t)}}return r}))),t),e.encode=t=>ne(t,e.codec()),e.decode=t=>re(t,e.codec())}(he||(he={})),function(e){let t;e.codec=()=>(null==t&&(t=Le((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!1!==r.lengthDelimited&&t.fork(),null!=e.contentTopic&&""!==e.contentTopic&&(t.uint32(18),t.string(e.contentTopic)),!1!==r.lengthDelimited&&t.ldelim()}),((e,t)=>{const r={contentTopic:""},n=null==t?e.len:e.pos+t;for(;e.pos<n;){const t=e.uint32();if(t>>>3===2)r.contentTopic=e.string();else e.skipType(7&t)}return r}))),t),e.encode=t=>ne(t,e.codec()),e.decode=t=>re(t,e.codec())}(de||(de={})),function(e){let t,r,n;!function(e){e.SUBSCRIBER_PING="SUBSCRIBER_PING",e.SUBSCRIBE="SUBSCRIBE",e.UNSUBSCRIBE="UNSUBSCRIBE",e.UNSUBSCRIBE_ALL="UNSUBSCRIBE_ALL"}(t=e.FilterSubscribeType||(e.FilterSubscribeType={})),function(e){e[e.SUBSCRIBER_PING=0]="SUBSCRIBER_PING",e[e.SUBSCRIBE=1]="SUBSCRIBE",e[e.UNSUBSCRIBE=2]="UNSUBSCRIBE",e[e.UNSUBSCRIBE_ALL=3]="UNSUBSCRIBE_ALL"}(r||(r={})),function(e){e.codec=()=>Be(r)}(t=e.FilterSubscribeType||(e.FilterSubscribeType={})),e.codec=()=>(null==n&&(n=Le((function(t,n){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!1!==i.lengthDelimited&&n.fork(),null!=t.requestId&&""!==t.requestId&&(n.uint32(10),n.string(t.requestId)),null!=t.filterSubscribeType&&0!==r[t.filterSubscribeType]&&(n.uint32(16),e.FilterSubscribeType.codec().encode(t.filterSubscribeType,n)),null!=t.pubsubTopic&&(n.uint32(82),n.string(t.pubsubTopic)),null!=t.contentTopics)for(const e of t.contentTopics)n.uint32(90),n.string(e);!1!==i.lengthDelimited&&n.ldelim()}),((r,n)=>{const i={requestId:"",filterSubscribeType:t.SUBSCRIBER_PING,contentTopics:[]},o=null==n?r.len:r.pos+n;for(;r.pos<o;){const t=r.uint32();switch(t>>>3){case 1:i.requestId=r.string();break;case 2:i.filterSubscribeType=e.FilterSubscribeType.codec().decode(r);break;case 10:i.pubsubTopic=r.string();break;case 11:i.contentTopics.push(r.string());break;default:r.skipType(7&t)}}return i}))),n),e.encode=t=>ne(t,e.codec()),e.decode=t=>re(t,e.codec())}(fe||(fe={})),function(e){let t;e.codec=()=>(null==t&&(t=Le((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!1!==r.lengthDelimited&&t.fork(),null!=e.requestId&&""!==e.requestId&&(t.uint32(10),t.string(e.requestId)),null!=e.statusCode&&0!==e.statusCode&&(t.uint32(80),t.uint32(e.statusCode)),null!=e.statusDesc&&(t.uint32(90),t.string(e.statusDesc)),!1!==r.lengthDelimited&&t.ldelim()}),((e,t)=>{const r={requestId:"",statusCode:0},n=null==t?e.len:e.pos+t;for(;e.pos<n;){const t=e.uint32();switch(t>>>3){case 1:r.requestId=e.string();break;case 10:r.statusCode=e.uint32();break;case 11:r.statusDesc=e.string();break;default:e.skipType(7&t)}}return r}))),t),e.encode=t=>ne(t,e.codec()),e.decode=t=>re(t,e.codec())}(pe||(pe={})),function(e){let t;e.codec=()=>(null==t&&(t=Le((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!1!==r.lengthDelimited&&t.fork(),null!=e.wakuMessage&&(t.uint32(10),ye.codec().encode(e.wakuMessage,t)),null!=e.pubsubTopic&&(t.uint32(18),t.string(e.pubsubTopic)),!1!==r.lengthDelimited&&t.ldelim()}),((e,t)=>{const r={},n=null==t?e.len:e.pos+t;for(;e.pos<n;){const t=e.uint32();switch(t>>>3){case 1:r.wakuMessage=ye.codec().decode(e,e.uint32());break;case 2:r.pubsubTopic=e.string();break;default:e.skipType(7&t)}}return r}))),t),e.encode=t=>ne(t,e.codec()),e.decode=t=>re(t,e.codec())}(ge||(ge={})),function(e){let t;e.codec=()=>(null==t&&(t=Le((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!1!==r.lengthDelimited&&t.fork(),null!=e.proof&&e.proof.byteLength>0&&(t.uint32(10),t.bytes(e.proof)),null!=e.merkleRoot&&e.merkleRoot.byteLength>0&&(t.uint32(18),t.bytes(e.merkleRoot)),null!=e.epoch&&e.epoch.byteLength>0&&(t.uint32(26),t.bytes(e.epoch)),null!=e.shareX&&e.shareX.byteLength>0&&(t.uint32(34),t.bytes(e.shareX)),null!=e.shareY&&e.shareY.byteLength>0&&(t.uint32(42),t.bytes(e.shareY)),null!=e.nullifier&&e.nullifier.byteLength>0&&(t.uint32(50),t.bytes(e.nullifier)),null!=e.rlnIdentifier&&e.rlnIdentifier.byteLength>0&&(t.uint32(58),t.bytes(e.rlnIdentifier)),!1!==r.lengthDelimited&&t.ldelim()}),((e,t)=>{const r={proof:new Uint8Array(0),merkleRoot:new Uint8Array(0),epoch:new Uint8Array(0),shareX:new Uint8Array(0),shareY:new Uint8Array(0),nullifier:new Uint8Array(0),rlnIdentifier:new Uint8Array(0)},n=null==t?e.len:e.pos+t;for(;e.pos<n;){const t=e.uint32();switch(t>>>3){case 1:r.proof=e.bytes();break;case 2:r.merkleRoot=e.bytes();break;case 3:r.epoch=e.bytes();break;case 4:r.shareX=e.bytes();break;case 5:r.shareY=e.bytes();break;case 6:r.nullifier=e.bytes();break;case 7:r.rlnIdentifier=e.bytes();break;default:e.skipType(7&t)}}return r}))),t),e.encode=t=>ne(t,e.codec()),e.decode=t=>re(t,e.codec())}(me||(me={})),function(e){let t;e.codec=()=>(null==t&&(t=Le((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!1!==r.lengthDelimited&&t.fork(),null!=e.payload&&e.payload.byteLength>0&&(t.uint32(10),t.bytes(e.payload)),null!=e.contentTopic&&""!==e.contentTopic&&(t.uint32(18),t.string(e.contentTopic)),null!=e.version&&(t.uint32(24),t.uint32(e.version)),null!=e.timestamp&&(t.uint32(80),t.sint64(e.timestamp)),null!=e.meta&&(t.uint32(90),t.bytes(e.meta)),null!=e.rateLimitProof&&(t.uint32(170),me.codec().encode(e.rateLimitProof,t)),null!=e.ephemeral&&(t.uint32(248),t.bool(e.ephemeral)),!1!==r.lengthDelimited&&t.ldelim()}),((e,t)=>{const r={payload:new Uint8Array(0),contentTopic:""},n=null==t?e.len:e.pos+t;for(;e.pos<n;){const t=e.uint32();switch(t>>>3){case 1:r.payload=e.bytes();break;case 2:r.contentTopic=e.string();break;case 3:r.version=e.uint32();break;case 10:r.timestamp=e.sint64();break;case 11:r.meta=e.bytes();break;case 21:r.rateLimitProof=me.codec().decode(e,e.uint32());break;case 31:r.ephemeral=e.bool();break;default:e.skipType(7&t)}}return r}))),t),e.encode=t=>ne(t,e.codec()),e.decode=t=>re(t,e.codec())}(ye||(ye={})),function(e){let t;e.codec=()=>(null==t&&(t=Le((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!1!==r.lengthDelimited&&t.fork(),null!=e.pubsubTopic&&""!==e.pubsubTopic&&(t.uint32(10),t.string(e.pubsubTopic)),null!=e.message&&(t.uint32(18),Se.codec().encode(e.message,t)),!1!==r.lengthDelimited&&t.ldelim()}),((e,t)=>{const r={pubsubTopic:""},n=null==t?e.len:e.pos+t;for(;e.pos<n;){const t=e.uint32();switch(t>>>3){case 1:r.pubsubTopic=e.string();break;case 2:r.message=Se.codec().decode(e,e.uint32());break;default:e.skipType(7&t)}}return r}))),t),e.encode=t=>ne(t,e.codec()),e.decode=t=>re(t,e.codec())}(ve||(ve={})),function(e){let t;e.codec=()=>(null==t&&(t=Le((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!1!==r.lengthDelimited&&t.fork(),null!=e.isSuccess&&!1!==e.isSuccess&&(t.uint32(8),t.bool(e.isSuccess)),null!=e.info&&(t.uint32(18),t.string(e.info)),!1!==r.lengthDelimited&&t.ldelim()}),((e,t)=>{const r={isSuccess:!1},n=null==t?e.len:e.pos+t;for(;e.pos<n;){const t=e.uint32();switch(t>>>3){case 1:r.isSuccess=e.bool();break;case 2:r.info=e.string();break;default:e.skipType(7&t)}}return r}))),t),e.encode=t=>ne(t,e.codec()),e.decode=t=>re(t,e.codec())}(be||(be={})),function(e){let t;e.codec=()=>(null==t&&(t=Le((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!1!==r.lengthDelimited&&t.fork(),null!=e.requestId&&""!==e.requestId&&(t.uint32(10),t.string(e.requestId)),null!=e.request&&(t.uint32(18),ve.codec().encode(e.request,t)),null!=e.response&&(t.uint32(26),be.codec().encode(e.response,t)),!1!==r.lengthDelimited&&t.ldelim()}),((e,t)=>{const r={requestId:""},n=null==t?e.len:e.pos+t;for(;e.pos<n;){const t=e.uint32();switch(t>>>3){case 1:r.requestId=e.string();break;case 2:r.request=ve.codec().decode(e,e.uint32());break;case 3:r.response=be.codec().decode(e,e.uint32());break;default:e.skipType(7&t)}}return r}))),t),e.encode=t=>ne(t,e.codec()),e.decode=t=>re(t,e.codec())}(we||(we={})),function(e){let t;e.codec=()=>(null==t&&(t=Le((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!1!==r.lengthDelimited&&t.fork(),null!=e.proof&&e.proof.byteLength>0&&(t.uint32(10),t.bytes(e.proof)),null!=e.merkleRoot&&e.merkleRoot.byteLength>0&&(t.uint32(18),t.bytes(e.merkleRoot)),null!=e.epoch&&e.epoch.byteLength>0&&(t.uint32(26),t.bytes(e.epoch)),null!=e.shareX&&e.shareX.byteLength>0&&(t.uint32(34),t.bytes(e.shareX)),null!=e.shareY&&e.shareY.byteLength>0&&(t.uint32(42),t.bytes(e.shareY)),null!=e.nullifier&&e.nullifier.byteLength>0&&(t.uint32(50),t.bytes(e.nullifier)),null!=e.rlnIdentifier&&e.rlnIdentifier.byteLength>0&&(t.uint32(58),t.bytes(e.rlnIdentifier)),!1!==r.lengthDelimited&&t.ldelim()}),((e,t)=>{const r={proof:new Uint8Array(0),merkleRoot:new Uint8Array(0),epoch:new Uint8Array(0),shareX:new Uint8Array(0),shareY:new Uint8Array(0),nullifier:new Uint8Array(0),rlnIdentifier:new Uint8Array(0)},n=null==t?e.len:e.pos+t;for(;e.pos<n;){const t=e.uint32();switch(t>>>3){case 1:r.proof=e.bytes();break;case 2:r.merkleRoot=e.bytes();break;case 3:r.epoch=e.bytes();break;case 4:r.shareX=e.bytes();break;case 5:r.shareY=e.bytes();break;case 6:r.nullifier=e.bytes();break;case 7:r.rlnIdentifier=e.bytes();break;default:e.skipType(7&t)}}return r}))),t),e.encode=t=>ne(t,e.codec()),e.decode=t=>re(t,e.codec())}(Ee||(Ee={})),function(e){let t;e.codec=()=>(null==t&&(t=Le((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!1!==r.lengthDelimited&&t.fork(),null!=e.payload&&e.payload.byteLength>0&&(t.uint32(10),t.bytes(e.payload)),null!=e.contentTopic&&""!==e.contentTopic&&(t.uint32(18),t.string(e.contentTopic)),null!=e.version&&(t.uint32(24),t.uint32(e.version)),null!=e.timestamp&&(t.uint32(80),t.sint64(e.timestamp)),null!=e.meta&&(t.uint32(90),t.bytes(e.meta)),null!=e.rateLimitProof&&(t.uint32(170),Ee.codec().encode(e.rateLimitProof,t)),null!=e.ephemeral&&(t.uint32(248),t.bool(e.ephemeral)),!1!==r.lengthDelimited&&t.ldelim()}),((e,t)=>{const r={payload:new Uint8Array(0),contentTopic:""},n=null==t?e.len:e.pos+t;for(;e.pos<n;){const t=e.uint32();switch(t>>>3){case 1:r.payload=e.bytes();break;case 2:r.contentTopic=e.string();break;case 3:r.version=e.uint32();break;case 10:r.timestamp=e.sint64();break;case 11:r.meta=e.bytes();break;case 21:r.rateLimitProof=Ee.codec().decode(e,e.uint32());break;case 31:r.ephemeral=e.bool();break;default:e.skipType(7&t)}}return r}))),t),e.encode=t=>ne(t,e.codec()),e.decode=t=>re(t,e.codec())}(Se||(Se={})),function(e){let t;e.codec=()=>(null==t&&(t=Le((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!1!==r.lengthDelimited&&t.fork(),null!=e.digest&&e.digest.byteLength>0&&(t.uint32(10),t.bytes(e.digest)),null!=e.receiverTime&&0n!==e.receiverTime&&(t.uint32(16),t.sint64(e.receiverTime)),null!=e.senderTime&&0n!==e.senderTime&&(t.uint32(24),t.sint64(e.senderTime)),null!=e.pubsubTopic&&""!==e.pubsubTopic&&(t.uint32(34),t.string(e.pubsubTopic)),!1!==r.lengthDelimited&&t.ldelim()}),((e,t)=>{const r={digest:new Uint8Array(0),receiverTime:0n,senderTime:0n,pubsubTopic:""},n=null==t?e.len:e.pos+t;for(;e.pos<n;){const t=e.uint32();switch(t>>>3){case 1:r.digest=e.bytes();break;case 2:r.receiverTime=e.sint64();break;case 3:r.senderTime=e.sint64();break;case 4:r.pubsubTopic=e.string();break;default:e.skipType(7&t)}}return r}))),t),e.encode=t=>ne(t,e.codec()),e.decode=t=>re(t,e.codec())}(_e||(_e={})),function(e){let t,r,n;!function(e){e.BACKWARD="BACKWARD",e.FORWARD="FORWARD"}(t=e.Direction||(e.Direction={})),function(e){e[e.BACKWARD=0]="BACKWARD",e[e.FORWARD=1]="FORWARD"}(r||(r={})),function(e){e.codec=()=>Be(r)}(t=e.Direction||(e.Direction={})),e.codec=()=>(null==n&&(n=Le((function(t,r){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!1!==n.lengthDelimited&&r.fork(),null!=t.pageSize&&(r.uint32(8),r.uint64(t.pageSize)),null!=t.cursor&&(r.uint32(18),_e.codec().encode(t.cursor,r)),null!=t.direction&&(r.uint32(24),e.Direction.codec().encode(t.direction,r)),!1!==n.lengthDelimited&&r.ldelim()}),((t,r)=>{const n={},i=null==r?t.len:t.pos+r;for(;t.pos<i;){const r=t.uint32();switch(r>>>3){case 1:n.pageSize=t.uint64();break;case 2:n.cursor=_e.codec().decode(t,t.uint32());break;case 3:n.direction=e.Direction.codec().decode(t);break;default:t.skipType(7&r)}}return n}))),n),e.encode=t=>ne(t,e.codec()),e.decode=t=>re(t,e.codec())}(Ae||(Ae={})),function(e){let t;e.codec=()=>(null==t&&(t=Le((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!1!==r.lengthDelimited&&t.fork(),null!=e.contentTopic&&""!==e.contentTopic&&(t.uint32(10),t.string(e.contentTopic)),!1!==r.lengthDelimited&&t.ldelim()}),((e,t)=>{const r={contentTopic:""},n=null==t?e.len:e.pos+t;for(;e.pos<n;){const t=e.uint32();if(t>>>3===1)r.contentTopic=e.string();else e.skipType(7&t)}return r}))),t),e.encode=t=>ne(t,e.codec()),e.decode=t=>re(t,e.codec())}(ke||(ke={})),function(e){let t;e.codec=()=>(null==t&&(t=Le((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!1!==r.lengthDelimited&&t.fork(),null!=e.pubsubTopic&&(t.uint32(18),t.string(e.pubsubTopic)),null!=e.contentFilters)for(const n of e.contentFilters)t.uint32(26),ke.codec().encode(n,t);null!=e.pagingInfo&&(t.uint32(34),Ae.codec().encode(e.pagingInfo,t)),null!=e.startTime&&(t.uint32(40),t.sint64(e.startTime)),null!=e.endTime&&(t.uint32(48),t.sint64(e.endTime)),!1!==r.lengthDelimited&&t.ldelim()}),((e,t)=>{const r={contentFilters:[]},n=null==t?e.len:e.pos+t;for(;e.pos<n;){const t=e.uint32();switch(t>>>3){case 2:r.pubsubTopic=e.string();break;case 3:r.contentFilters.push(ke.codec().decode(e,e.uint32()));break;case 4:r.pagingInfo=Ae.codec().decode(e,e.uint32());break;case 5:r.startTime=e.sint64();break;case 6:r.endTime=e.sint64();break;default:e.skipType(7&t)}}return r}))),t),e.encode=t=>ne(t,e.codec()),e.decode=t=>re(t,e.codec())}(Ce||(Ce={})),function(e){let t,r,n;!function(e){e.NONE="NONE",e.INVALID_CURSOR="INVALID_CURSOR"}(t=e.HistoryError||(e.HistoryError={})),function(e){e[e.NONE=0]="NONE",e[e.INVALID_CURSOR=1]="INVALID_CURSOR"}(r||(r={})),function(e){e.codec=()=>Be(r)}(t=e.HistoryError||(e.HistoryError={})),e.codec=()=>(null==n&&(n=Le((function(t,n){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!1!==i.lengthDelimited&&n.fork(),null!=t.messages)for(const e of t.messages)n.uint32(18),Pe.codec().encode(e,n);null!=t.pagingInfo&&(n.uint32(26),Ae.codec().encode(t.pagingInfo,n)),null!=t.error&&0!==r[t.error]&&(n.uint32(32),e.HistoryError.codec().encode(t.error,n)),!1!==i.lengthDelimited&&n.ldelim()}),((r,n)=>{const i={messages:[],error:t.NONE},o=null==n?r.len:r.pos+n;for(;r.pos<o;){const t=r.uint32();switch(t>>>3){case 2:i.messages.push(Pe.codec().decode(r,r.uint32()));break;case 3:i.pagingInfo=Ae.codec().decode(r,r.uint32());break;case 4:i.error=e.HistoryError.codec().decode(r);break;default:r.skipType(7&t)}}return i}))),n),e.encode=t=>ne(t,e.codec()),e.decode=t=>re(t,e.codec())}(xe||(xe={})),function(e){let t;e.codec=()=>(null==t&&(t=Le((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!1!==r.lengthDelimited&&t.fork(),null!=e.requestId&&""!==e.requestId&&(t.uint32(10),t.string(e.requestId)),null!=e.query&&(t.uint32(18),Ce.codec().encode(e.query,t)),null!=e.response&&(t.uint32(26),xe.codec().encode(e.response,t)),!1!==r.lengthDelimited&&t.ldelim()}),((e,t)=>{const r={requestId:""},n=null==t?e.len:e.pos+t;for(;e.pos<n;){const t=e.uint32();switch(t>>>3){case 1:r.requestId=e.string();break;case 2:r.query=Ce.codec().decode(e,e.uint32());break;case 3:r.response=xe.codec().decode(e,e.uint32());break;default:e.skipType(7&t)}}return r}))),t),e.encode=t=>ne(t,e.codec()),e.decode=t=>re(t,e.codec())}(Ie||(Ie={})),function(e){let t;e.codec=()=>(null==t&&(t=Le((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!1!==r.lengthDelimited&&t.fork(),null!=e.proof&&e.proof.byteLength>0&&(t.uint32(10),t.bytes(e.proof)),null!=e.merkleRoot&&e.merkleRoot.byteLength>0&&(t.uint32(18),t.bytes(e.merkleRoot)),null!=e.epoch&&e.epoch.byteLength>0&&(t.uint32(26),t.bytes(e.epoch)),null!=e.shareX&&e.shareX.byteLength>0&&(t.uint32(34),t.bytes(e.shareX)),null!=e.shareY&&e.shareY.byteLength>0&&(t.uint32(42),t.bytes(e.shareY)),null!=e.nullifier&&e.nullifier.byteLength>0&&(t.uint32(50),t.bytes(e.nullifier)),null!=e.rlnIdentifier&&e.rlnIdentifier.byteLength>0&&(t.uint32(58),t.bytes(e.rlnIdentifier)),!1!==r.lengthDelimited&&t.ldelim()}),((e,t)=>{const r={proof:new Uint8Array(0),merkleRoot:new Uint8Array(0),epoch:new Uint8Array(0),shareX:new Uint8Array(0),shareY:new Uint8Array(0),nullifier:new Uint8Array(0),rlnIdentifier:new Uint8Array(0)},n=null==t?e.len:e.pos+t;for(;e.pos<n;){const t=e.uint32();switch(t>>>3){case 1:r.proof=e.bytes();break;case 2:r.merkleRoot=e.bytes();break;case 3:r.epoch=e.bytes();break;case 4:r.shareX=e.bytes();break;case 5:r.shareY=e.bytes();break;case 6:r.nullifier=e.bytes();break;case 7:r.rlnIdentifier=e.bytes();break;default:e.skipType(7&t)}}return r}))),t),e.encode=t=>ne(t,e.codec()),e.decode=t=>re(t,e.codec())}(Re||(Re={})),function(e){let t;e.codec=()=>(null==t&&(t=Le((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!1!==r.lengthDelimited&&t.fork(),null!=e.payload&&e.payload.byteLength>0&&(t.uint32(10),t.bytes(e.payload)),null!=e.contentTopic&&""!==e.contentTopic&&(t.uint32(18),t.string(e.contentTopic)),null!=e.version&&(t.uint32(24),t.uint32(e.version)),null!=e.timestamp&&(t.uint32(80),t.sint64(e.timestamp)),null!=e.meta&&(t.uint32(90),t.bytes(e.meta)),null!=e.rateLimitProof&&(t.uint32(170),Re.codec().encode(e.rateLimitProof,t)),null!=e.ephemeral&&(t.uint32(248),t.bool(e.ephemeral)),!1!==r.lengthDelimited&&t.ldelim()}),((e,t)=>{const r={payload:new Uint8Array(0),contentTopic:""},n=null==t?e.len:e.pos+t;for(;e.pos<n;){const t=e.uint32();switch(t>>>3){case 1:r.payload=e.bytes();break;case 2:r.contentTopic=e.string();break;case 3:r.version=e.uint32();break;case 10:r.timestamp=e.sint64();break;case 11:r.meta=e.bytes();break;case 21:r.rateLimitProof=Re.codec().decode(e,e.uint32());break;case 31:r.ephemeral=e.bool();break;default:e.skipType(7&t)}}return r}))),t),e.encode=t=>ne(t,e.codec()),e.decode=t=>re(t,e.codec())}(Pe||(Pe={})),function(e){let t;e.codec=()=>(null==t&&(t=Le((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!1!==r.lengthDelimited&&t.fork(),null!=e.enr&&(t.uint32(10),t.bytes(e.enr)),!1!==r.lengthDelimited&&t.ldelim()}),((e,t)=>{const r={},n=null==t?e.len:e.pos+t;for(;e.pos<n;){const t=e.uint32();if(t>>>3===1)r.enr=e.bytes();else e.skipType(7&t)}return r}))),t),e.encode=t=>ne(t,e.codec()),e.decode=t=>re(t,e.codec())}(Te||(Te={})),function(e){let t;e.codec=()=>(null==t&&(t=Le((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!1!==r.lengthDelimited&&t.fork(),null!=e.numPeers&&(t.uint32(8),t.uint64(e.numPeers)),!1!==r.lengthDelimited&&t.ldelim()}),((e,t)=>{const r={},n=null==t?e.len:e.pos+t;for(;e.pos<n;){const t=e.uint32();if(t>>>3===1)r.numPeers=e.uint64();else e.skipType(7&t)}return r}))),t),e.encode=t=>ne(t,e.codec()),e.decode=t=>re(t,e.codec())}(Ne||(Ne={})),function(e){let t;e.codec=()=>(null==t&&(t=Le((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!1!==r.lengthDelimited&&t.fork(),null!=e.peerInfos)for(const n of e.peerInfos)t.uint32(10),Te.codec().encode(n,t);!1!==r.lengthDelimited&&t.ldelim()}),((e,t)=>{const r={peerInfos:[]},n=null==t?e.len:e.pos+t;for(;e.pos<n;){const t=e.uint32();if(t>>>3===1)r.peerInfos.push(Te.codec().decode(e,e.uint32()));else e.skipType(7&t)}return r}))),t),e.encode=t=>ne(t,e.codec()),e.decode=t=>re(t,e.codec())}(De||(De={})),function(e){let t;e.codec=()=>(null==t&&(t=Le((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!1!==r.lengthDelimited&&t.fork(),null!=e.query&&(t.uint32(10),Ne.codec().encode(e.query,t)),null!=e.response&&(t.uint32(18),De.codec().encode(e.response,t)),!1!==r.lengthDelimited&&t.ldelim()}),((e,t)=>{const r={},n=null==t?e.len:e.pos+t;for(;e.pos<n;){const t=e.uint32();switch(t>>>3){case 1:r.query=Ne.codec().decode(e,e.uint32());break;case 2:r.response=De.codec().decode(e,e.uint32());break;default:e.skipType(7&t)}}return r}))),t),e.encode=t=>ne(t,e.codec()),e.decode=t=>re(t,e.codec())}(Oe||(Oe={}));var Ue=__webpack_require__(4054);const Fe=Ue("waku:message:version-0"),je=BigInt(1e6);class ze{constructor(e,t){(0,W.Z)(this,"pubSubTopic",void 0),(0,W.Z)(this,"proto",void 0),this.pubSubTopic=e,this.proto=t}get ephemeral(){return Boolean(this.proto.ephemeral)}get payload(){return this.proto.payload}get contentTopic(){return this.proto.contentTopic}get _rawTimestamp(){return this.proto.timestamp}get timestamp(){try{if(this.proto.timestamp){const e=this.proto.timestamp/je;return new Date(Number(e))}return}catch(e){return}}get meta(){return this.proto.meta}get version(){var e;return null!==(e=this.proto.version)&&void 0!==e?e:0}get rateLimitProof(){return this.proto.rateLimitProof}}class Ke{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2?arguments[2]:void 0;if((0,W.Z)(this,"contentTopic",void 0),(0,W.Z)(this,"ephemeral",void 0),(0,W.Z)(this,"metaSetter",void 0),this.contentTopic=e,this.ephemeral=t,this.metaSetter=r,!e||""===e)throw new Error("Content topic must be specified")}async toWire(e){return se.encode(await this.toProtoObj(e))}async toProtoObj(e){var t;const r=null!==(t=e.timestamp)&&void 0!==t?t:new Date,n={payload:e.payload,version:0,contentTopic:this.contentTopic,timestamp:BigInt(r.valueOf())*je,meta:void 0,rateLimitProof:e.rateLimitProof,ephemeral:this.ephemeral};if(this.metaSetter){const e=this.metaSetter(n);return{...n,meta:e}}return n}}class qe{constructor(e){if((0,W.Z)(this,"contentTopic",void 0),this.contentTopic=e,!e||""===e)throw new Error("Content topic must be specified")}fromWireToProtoObj(e){var t,r,n,i,o;const s=se.decode(e);return Fe("Message decoded",s),Promise.resolve({payload:s.payload,contentTopic:s.contentTopic,version:null!==(t=s.version)&&void 0!==t?t:void 0,timestamp:null!==(r=s.timestamp)&&void 0!==r?r:void 0,meta:null!==(n=s.meta)&&void 0!==n?n:void 0,rateLimitProof:null!==(i=s.rateLimitProof)&&void 0!==i?i:void 0,ephemeral:null!==(o=s.ephemeral)&&void 0!==o&&o})}async fromProtoObj(e,t){var r;return null!==(r=t.version)&&void 0!==r&&r?(Fe("Failed to decode due to incorrect version, expected:",0,", actual:",t.version),Promise.resolve(void 0)):new ze(e,t)}}class Ze extends ze{constructor(e,t,r,n,i){super(e,t),(0,W.Z)(this,"signature",void 0),(0,W.Z)(this,"signaturePublicKey",void 0),(0,W.Z)(this,"_decodedPayload",void 0),this.signature=n,this.signaturePublicKey=i,this._decodedPayload=r}get payload(){return this._decodedPayload}}var Ve=__webpack_require__(5856),He=__webpack_require__.t(Ve,2);const We=BigInt(0),Ge=BigInt(1),Ye=BigInt(2),Qe=BigInt(3),Je=BigInt(8),Xe=Object.freeze({a:We,b:BigInt(7),P:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:Ge,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee")}),$e=(e,t)=>(e+t/Ye)/t,et={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar(e){const{n:t}=Xe,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-Ge*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=r,s=BigInt("0x100000000000000000000000000000000"),a=$e(o*e,t),c=$e(-n*e,t);let l=Ct(e-a*r-c*i,t),u=Ct(-a*n-c*o,t);const h=l>s,d=u>s;if(h&&(l=t-l),d&&(u=t-u),l>s||u>s)throw new Error("splitScalarEndo: Endomorphism failed, k="+e);return{k1neg:h,k1:l,k2neg:d,k2:u}}},tt=32,rt=32;function nt(e){const{a:t,b:r}=Xe,n=Ct(e*e),i=Ct(n*e);return Ct(i+t*e+r)}const it=Xe.a===We;class ot extends Error{constructor(e){super(e)}}function st(e){if(!(e instanceof at))throw new TypeError("JacobianPoint expected")}class at{constructor(e,t,r){this.x=e,this.y=t,this.z=r}static fromAffine(e){if(!(e instanceof ut))throw new TypeError("JacobianPoint#fromAffine: expected Point");return e.equals(ut.ZERO)?at.ZERO:new at(e.x,e.y,Ge)}static toAffineBatch(e){const t=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Xe.P;const r=new Array(e.length),n=It(e.reduce(((e,n,i)=>n===We?e:(r[i]=e,Ct(e*n,t))),Ge),t);return e.reduceRight(((e,n,i)=>n===We?e:(r[i]=Ct(e*r[i],t),Ct(e*n,t))),n),r}(e.map((e=>e.z)));return e.map(((e,r)=>e.toAffine(t[r])))}static normalizeZ(e){return at.toAffineBatch(e).map(at.fromAffine)}equals(e){st(e);const{x:t,y:r,z:n}=this,{x:i,y:o,z:s}=e,a=Ct(n*n),c=Ct(s*s),l=Ct(t*c),u=Ct(i*a),h=Ct(Ct(r*s)*c),d=Ct(Ct(o*n)*a);return l===u&&h===d}negate(){return new at(this.x,Ct(-this.y),this.z)}double(){const{x:e,y:t,z:r}=this,n=Ct(e*e),i=Ct(t*t),o=Ct(i*i),s=e+i,a=Ct(Ye*(Ct(s*s)-n-o)),c=Ct(Qe*n),l=Ct(c*c),u=Ct(l-Ye*a),h=Ct(c*(a-u)-Je*o),d=Ct(Ye*t*r);return new at(u,h,d)}add(e){st(e);const{x:t,y:r,z:n}=this,{x:i,y:o,z:s}=e;if(i===We||o===We)return this;if(t===We||r===We)return e;const a=Ct(n*n),c=Ct(s*s),l=Ct(t*c),u=Ct(i*a),h=Ct(Ct(r*s)*c),d=Ct(Ct(o*n)*a),f=Ct(u-l),p=Ct(d-h);if(f===We)return p===We?this.double():at.ZERO;const g=Ct(f*f),m=Ct(f*g),y=Ct(l*g),v=Ct(p*p-m-Ye*y),b=Ct(p*(y-v)-h*m),w=Ct(n*s*f);return new at(v,b,w)}subtract(e){return this.add(e.negate())}multiplyUnsafe(e){const t=at.ZERO;if("bigint"===typeof e&&e===We)return t;let r=kt(e);if(r===Ge)return this;if(!it){let e=t,n=this;for(;r>We;)r&Ge&&(e=e.add(n)),n=n.double(),r>>=Ge;return e}let{k1neg:n,k1:i,k2neg:o,k2:s}=et.splitScalar(r),a=t,c=t,l=this;for(;i>We||s>We;)i&Ge&&(a=a.add(l)),s&Ge&&(c=c.add(l)),l=l.double(),i>>=Ge,s>>=Ge;return n&&(a=a.negate()),o&&(c=c.negate()),c=new at(Ct(c.x*et.beta),c.y,c.z),a.add(c)}precomputeWindow(e){const t=it?128/e+1:256/e+1,r=[];let n=this,i=n;for(let o=0;o<t;o++){i=n,r.push(i);for(let t=1;t<2**(e-1);t++)i=i.add(n),r.push(i);n=i.double()}return r}wNAF(e,t){!t&&this.equals(at.BASE)&&(t=ut.BASE);const r=t&&t._WINDOW_SIZE||1;if(256%r)throw new Error("Point#wNAF: Invalid precomputation window, must be power of 2");let n=t&<.get(t);n||(n=this.precomputeWindow(r),t&&1!==r&&(n=at.normalizeZ(n),lt.set(t,n)));let i=at.ZERO,o=at.BASE;const s=1+(it?128/r:256/r),a=2**(r-1),c=BigInt(2**r-1),l=2**r,u=BigInt(r);for(let h=0;h<s;h++){const t=h*a;let r=Number(e&c);e>>=u,r>a&&(r-=l,e+=Ge);const s=t,d=t+Math.abs(r)-1,f=h%2!==0,p=r<0;0===r?o=o.add(ct(f,n[s])):i=i.add(ct(p,n[d]))}return{p:i,f:o}}multiply(e,t){let r,n,i=kt(e);if(it){const{k1neg:e,k1:o,k2neg:s,k2:a}=et.splitScalar(i);let{p:c,f:l}=this.wNAF(o,t),{p:u,f:h}=this.wNAF(a,t);c=ct(e,c),u=ct(s,u),u=new at(Ct(u.x*et.beta),u.y,u.z),r=c.add(u),n=l.add(h)}else{const{p:e,f:o}=this.wNAF(i,t);r=e,n=o}return at.normalizeZ([r,n])[0]}toAffine(e){const{x:t,y:r,z:n}=this,i=this.equals(at.ZERO);null==e&&(e=i?Je:It(n));const o=e,s=Ct(o*o),a=Ct(s*o),c=Ct(t*s),l=Ct(r*a),u=Ct(n*o);if(i)return ut.ZERO;if(u!==Ge)throw new Error("invZ was invalid");return new ut(c,l)}}function ct(e,t){const r=t.negate();return e?r:t}at.BASE=new at(Xe.Gx,Xe.Gy,Ge),at.ZERO=new at(We,Ge,We);const lt=new WeakMap;class ut{constructor(e,t){this.x=e,this.y=t}_setWindowSize(e){this._WINDOW_SIZE=e,lt.delete(this)}hasEvenY(){return this.y%Ye===We}static fromCompressedHex(e){const t=32===e.length,r=_t(t?e:e.subarray(1));if(!Mt(r))throw new Error("Point is not on curve");let n=function(e){const{P:t}=Xe,r=BigInt(6),n=BigInt(11),i=BigInt(22),o=BigInt(23),s=BigInt(44),a=BigInt(88),c=e*e*e%t,l=c*c*e%t,u=xt(l,Qe)*l%t,h=xt(u,Qe)*l%t,d=xt(h,Ye)*c%t,f=xt(d,n)*d%t,p=xt(f,i)*f%t,g=xt(p,s)*p%t,m=xt(g,a)*g%t,y=xt(m,s)*p%t,v=xt(y,Qe)*l%t,b=xt(v,o)*f%t,w=xt(b,r)*c%t,E=xt(w,Ye);if(E*E%t!==e)throw new Error("Cannot find square root");return E}(nt(r));const i=(n&Ge)===Ge;if(t)i&&(n=Ct(-n));else{1===(1&e[0])!==i&&(n=Ct(-n))}const o=new ut(r,n);return o.assertValidity(),o}static fromUncompressedHex(e){const t=_t(e.subarray(1,33)),r=_t(e.subarray(33,65)),n=new ut(t,r);return n.assertValidity(),n}static fromHex(e){const t=At(e),r=t.length,n=t[0];if(r===tt)return this.fromCompressedHex(t);if(33===r&&(2===n||3===n))return this.fromCompressedHex(t);if(65===r&&4===n)return this.fromUncompressedHex(t);throw new Error("Point.fromHex: received invalid point. Expected 32-".concat(33," compressed bytes or ").concat(65," uncompressed bytes, not ").concat(r))}static fromPrivateKey(e){return ut.BASE.multiply(Lt(e))}static fromSignature(e,t,r){const{r:n,s:i}=Ft(t);if(![0,1,2,3].includes(r))throw new Error("Cannot recover: invalid recovery bit");const o=Pt(At(e)),{n:s}=Xe,a=2===r||3===r?n+s:n,c=It(a,s),l=Ct(-o*c,s),u=Ct(i*c,s),h=1&r?"03":"02",d=ut.fromHex(h+vt(a)),f=ut.BASE.multiplyAndAddUnsafe(d,l,u);if(!f)throw new Error("Cannot recover signature: point at infinify");return f.assertValidity(),f}toRawBytes(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return St(this.toHex(e))}toHex(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=vt(this.x);if(e){const e=this.hasEvenY()?"02":"03";return"".concat(e).concat(t)}return"04".concat(t).concat(vt(this.y))}toHexX(){return this.toHex(!0).slice(2)}toRawX(){return this.toRawBytes(!0).slice(1)}assertValidity(){const e="Point is not on elliptic curve",{x:t,y:r}=this;if(!Mt(t)||!Mt(r))throw new Error(e);const n=Ct(r*r);if(Ct(n-nt(t))!==We)throw new Error(e)}equals(e){return this.x===e.x&&this.y===e.y}negate(){return new ut(this.x,Ct(-this.y))}double(){return at.fromAffine(this).double().toAffine()}add(e){return at.fromAffine(this).add(at.fromAffine(e)).toAffine()}subtract(e){return this.add(e.negate())}multiply(e){return at.fromAffine(this).multiply(e,this).toAffine()}multiplyAndAddUnsafe(e,t,r){const n=at.fromAffine(this),i=t===We||t===Ge||this!==ut.BASE?n.multiplyUnsafe(t):n.multiply(t),o=at.fromAffine(e).multiplyUnsafe(r),s=i.add(o);return s.equals(at.ZERO)?void 0:s.toAffine()}}function ht(e){return Number.parseInt(e[0],16)>=8?"00"+e:e}function dt(e){if(e.length<2||2!==e[0])throw new Error("Invalid signature integer tag: ".concat(mt(e)));const t=e[1],r=e.subarray(2,t+2);if(!t||r.length!==t)throw new Error("Invalid signature integer: wrong length");if(0===r[0]&&r[1]<=127)throw new Error("Invalid signature integer: trailing length");return{data:_t(r),left:e.subarray(t+2)}}ut.BASE=new ut(Xe.Gx,Xe.Gy),ut.ZERO=new ut(We,We);class ft{constructor(e,t){this.r=e,this.s=t,this.assertValidity()}static fromCompact(e){const t=e instanceof Uint8Array,r="Signature.fromCompact";if("string"!==typeof e&&!t)throw new TypeError("".concat(r,": Expected string or Uint8Array"));const n=t?mt(e):e;if(128!==n.length)throw new Error("".concat(r,": Expected 64-byte hex"));return new ft(Et(n.slice(0,64)),Et(n.slice(64,128)))}static fromDER(e){const t=e instanceof Uint8Array;if("string"!==typeof e&&!t)throw new TypeError("Signature.fromDER: Expected string or Uint8Array");const{r:r,s:n}=function(e){if(e.length<2||48!=e[0])throw new Error("Invalid signature tag: ".concat(mt(e)));if(e[1]!==e.length-2)throw new Error("Invalid signature: incorrect length");const{data:t,left:r}=dt(e.subarray(2)),{data:n,left:i}=dt(r);if(i.length)throw new Error("Invalid signature: left bytes after parsing: ".concat(mt(i)));return{r:t,s:n}}(t?e:St(e));return new ft(r,n)}static fromHex(e){return this.fromDER(e)}assertValidity(){const{r:e,s:t}=this;if(!Ot(e))throw new Error("Invalid Signature: r must be 0 < r < n");if(!Ot(t))throw new Error("Invalid Signature: s must be 0 < s < n")}hasHighS(){const e=Xe.n>>Ge;return this.s>e}normalizeS(){return this.hasHighS()?new ft(this.r,Ct(-this.s,Xe.n)):this}toDERRawBytes(){return St(this.toDERHex())}toDERHex(){const e=ht(wt(this.s)),t=ht(wt(this.r)),r=e.length/2,n=t.length/2,i=wt(r),o=wt(n),s=wt(n+r+4);return"30".concat(s,"02").concat(o).concat(t,"02").concat(i).concat(e)}toRawBytes(){return this.toDERRawBytes()}toHex(){return this.toDERHex()}toCompactRawBytes(){return St(this.toCompactHex())}toCompactHex(){return vt(this.r)+vt(this.s)}}function pt(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];if(!t.every((e=>e instanceof Uint8Array)))throw new Error("Uint8Array list expected");if(1===t.length)return t[0];const n=t.reduce(((e,t)=>e+t.length),0),i=new Uint8Array(n);for(let o=0,s=0;o<t.length;o++){const e=t[o];i.set(e,s),s+=e.length}return i}const gt=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function mt(e){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");let t="";for(let r=0;r<e.length;r++)t+=gt[e[r]];return t}const yt=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000");function vt(e){if("bigint"!==typeof e)throw new Error("Expected bigint");if(!(We<=e&&e<yt))throw new Error("Expected number 0 <= n < 2^256");return e.toString(16).padStart(64,"0")}function bt(e){const t=St(vt(e));if(32!==t.length)throw new Error("Error: expected 32 bytes");return t}function wt(e){const t=e.toString(16);return 1&t.length?"0".concat(t):t}function Et(e){if("string"!==typeof e)throw new TypeError("hexToNumber: expected string, got "+typeof e);return BigInt("0x".concat(e))}function St(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"+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 _t(e){return Et(mt(e))}function At(e){return e instanceof Uint8Array?Uint8Array.from(e):St(e)}function kt(e){if("number"===typeof e&&Number.isSafeInteger(e)&&e>0)return BigInt(e);if("bigint"===typeof e&&Ot(e))return e;throw new TypeError("Expected valid private scalar: 0 < scalar < curve.n")}function Ct(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Xe.P;const r=e%t;return r>=We?r:t+r}function xt(e,t){const{P:r}=Xe;let n=e;for(;t-- >We;)n*=n,n%=r;return n}function It(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Xe.P;if(e===We||t<=We)throw new Error("invert: expected positive integers, got n=".concat(e," mod=").concat(t));let r=Ct(e,t),n=t,i=We,o=Ge,s=Ge,a=We;for(;r!==We;){const e=n/r,t=n%r,c=i-s*e,l=o-a*e;n=r,r=t,i=s,o=a,s=c,a=l}const c=n;if(c!==Ge)throw new Error("invert: does not exist");return Ct(i,t)}function Rt(e){const t=8*e.length-256,r=_t(e);return t>0?r>>BigInt(t):r}function Pt(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const r=Rt(e);if(t)return r;const{n:n}=Xe;return r>=n?r-n:r}let Tt,Nt;class Dt{constructor(e,t){if(this.hashLen=e,this.qByteLen=t,"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");this.v=new Uint8Array(e).fill(1),this.k=new Uint8Array(e).fill(0),this.counter=0}hmac(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Xt.hmacSha256(this.k,...t)}hmacSync(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Nt(this.k,...t)}checkSync(){if("function"!==typeof Nt)throw new ot("hmacSha256Sync needs to be set")}incr(){if(this.counter>=1e3)throw new Error("Tried 1,000 k values for sign(), all were invalid");this.counter+=1}async reseed(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Uint8Array;this.k=await this.hmac(this.v,Uint8Array.from([0]),e),this.v=await this.hmac(this.v),0!==e.length&&(this.k=await this.hmac(this.v,Uint8Array.from([1]),e),this.v=await this.hmac(this.v))}reseedSync(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Uint8Array;this.checkSync(),this.k=this.hmacSync(this.v,Uint8Array.from([0]),e),this.v=this.hmacSync(this.v),0!==e.length&&(this.k=this.hmacSync(this.v,Uint8Array.from([1]),e),this.v=this.hmacSync(this.v))}async generate(){this.incr();let e=0;const t=[];for(;e<this.qByteLen;){this.v=await this.hmac(this.v);const r=this.v.slice();t.push(r),e+=this.v.length}return pt(...t)}generateSync(){this.checkSync(),this.incr();let e=0;const t=[];for(;e<this.qByteLen;){this.v=this.hmacSync(this.v);const r=this.v.slice();t.push(r),e+=this.v.length}return pt(...t)}}function Ot(e){return We<e&&e<Xe.n}function Mt(e){return We<e&&e<Xe.P}function Bt(e,t,r){let n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const{n:i}=Xe,o=Pt(e,!0);if(!Ot(o))return;const s=It(o,i),a=ut.BASE.multiply(o),c=Ct(a.x,i);if(c===We)return;const l=Ct(s*Ct(t+r*c,i),i);if(l===We)return;let u=new ft(c,l),h=(a.x===u.r?0:2)|Number(a.y&Ge);return n&&u.hasHighS()&&(u=u.normalizeS(),h^=1),{sig:u,recovery:h}}function Lt(e){let t;if("bigint"===typeof e)t=e;else if("number"===typeof e&&Number.isSafeInteger(e)&&e>0)t=BigInt(e);else if("string"===typeof e){if(64!==e.length)throw new Error("Expected 32 bytes of private key");t=Et(e)}else{if(!(e instanceof Uint8Array))throw new TypeError("Expected valid private key");if(e.length!==rt)throw new Error("Expected 32 bytes of private key");t=_t(e)}if(!Ot(t))throw new Error("Expected private key: 0 < key < n");return t}function Ut(e){return e instanceof ut?(e.assertValidity(),e):ut.fromHex(e)}function Ft(e){if(e instanceof ft)return e.assertValidity(),e;try{return ft.fromDER(e)}catch(t){return ft.fromCompact(e)}}function jt(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return ut.fromPrivateKey(e).toRawBytes(t)}function zt(e){const t=e instanceof Uint8Array,r="string"===typeof e,n=(t||r)&&e.length;return t?33===n||65===n:r?66===n||130===n:e instanceof ut}function Kt(e){return _t(e.length>tt?e.slice(0,tt):e)}function qt(e){const t=Kt(e),r=Ct(t,Xe.n);return Zt(r<We?t:r)}function Zt(e){return bt(e)}function Vt(e,t,r){if(null==e)throw new Error('sign: expected valid message hash, not "'.concat(e,'"'));const n=At(e),i=Lt(t),o=[Zt(i),qt(n)];if(null!=r){!0===r&&(r=Xt.randomBytes(tt));const e=At(r);if(e.length!==tt)throw new Error("sign: Expected ".concat(tt," bytes of extra data"));o.push(e)}return{seed:pt(...o),m:Kt(n),d:i}}function Ht(e,t){const{sig:r,recovery:n}=e,{der:i,recovered:o}=Object.assign({canonical:!0,der:!0},t),s=i?r.toDERRawBytes():r.toCompactRawBytes();return o?[s,n]:s}async function Wt(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{seed:n,m:i,d:o}=Vt(e,t,r.extraEntropy),s=new Dt(32,rt);let a;for(await s.reseed(n);!(a=Bt(await s.generate(),i,o,r.canonical));)await s.reseed();return Ht(a,r)}const Gt={strict:!0};function Yt(e,t,r){let n,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Gt;try{n=Ft(e),t=At(t)}catch(g){return!1}const{r:o,s:s}=n;if(i.strict&&n.hasHighS())return!1;const a=Pt(t);let c;try{c=Ut(r)}catch(g){return!1}const{n:l}=Xe,u=It(s,l),h=Ct(a*u,l),d=Ct(o*u,l),f=ut.BASE.multiplyAndAddUnsafe(c,h,d);if(!f)return!1;const p=Ct(f.x,l);return p===o}ut.BASE._setWindowSize(8);const Qt={node:He,web:"object"===typeof self&&"crypto"in self?self.crypto:void 0},Jt={},Xt={bytesToHex:mt,hexToBytes:St,concatBytes:pt,mod:Ct,invert:It,isValidPrivateKey(e){try{return Lt(e),!0}catch(t){return!1}},_bigintTo32Bytes:bt,_normalizePrivateKey:Lt,hashToPrivateKey:e=>{if((e=At(e)).length<40||e.length>1024)throw new Error("Expected valid bytes of private key as per FIPS 186");return bt(Ct(_t(e),Xe.n-Ge)+Ge)},randomBytes:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:32;if(Qt.web)return Qt.web.getRandomValues(new Uint8Array(e));if(Qt.node){const{randomBytes:t}=Qt.node;return Uint8Array.from(t(e))}throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>Xt.hashToPrivateKey(Xt.randomBytes(40)),precompute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ut.BASE;const r=t===ut.BASE?t:new ut(t.x,t.y);return r._setWindowSize(e),r.multiply(Qe),r},sha256:async function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];if(Qt.web){const e=await Qt.web.subtle.digest("SHA-256",pt(...t));return new Uint8Array(e)}if(Qt.node){const{createHash:e}=Qt.node,r=e("sha256");return t.forEach((e=>r.update(e))),Uint8Array.from(r.digest())}throw new Error("The environment doesn't have sha256 function")},hmacSha256:async function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(Qt.web){const t=await Qt.web.subtle.importKey("raw",e,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),n=pt(...r),i=await Qt.web.subtle.sign("HMAC",t,n);return new Uint8Array(i)}if(Qt.node){const{createHmac:t}=Qt.node,n=t("sha256",e);return r.forEach((e=>n.update(e))),Uint8Array.from(n.digest())}throw new Error("The environment doesn't have hmac-sha256 function")},sha256Sync:void 0,hmacSha256Sync:void 0,taggedHash:async function(e){let t=Jt[e];if(void 0===t){const r=await Xt.sha256(Uint8Array.from(e,(e=>e.charCodeAt(0))));t=pt(r,r),Jt[e]=t}for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return Xt.sha256(t,...n)},taggedHashSync:function(e){if("function"!==typeof Tt)throw new ot("sha256Sync is undefined, you need to set it");let t=Jt[e];if(void 0===t){const r=Tt(Uint8Array.from(e,(e=>e.charCodeAt(0))));t=pt(r,r),Jt[e]=t}for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return Tt(t,...n)},_JacobianPoint:at};function $t(e){return null!=globalThis.Buffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}Object.defineProperties(Xt,{sha256Sync:{configurable:!1,get:()=>Tt,set(e){Tt||(Tt=e)}},hmacSha256Sync:{configurable:!1,get:()=>Nt,set(e){Nt||(Nt=e)}}});var er=function(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<e.length;i++){var o=e.charAt(i),s=o.charCodeAt(0);if(255!==r[s])throw new TypeError(o+" is ambiguous");r[s]=i}var a=e.length,c=e.charAt(0),l=Math.log(a)/Math.log(256),u=Math.log(256)/Math.log(a);function h(e){if("string"!==typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;var t=0;if(" "!==e[t]){for(var n=0,i=0;e[t]===c;)n++,t++;for(var o=(e.length-t)*l+1>>>0,s=new Uint8Array(o);e[t];){var u=r[e.charCodeAt(t)];if(255===u)return;for(var h=0,d=o-1;(0!==u||h<i)&&-1!==d;d--,h++)u+=a*s[d]>>>0,s[d]=u%256>>>0,u=u/256>>>0;if(0!==u)throw new Error("Non-zero carry");i=h,t++}if(" "!==e[t]){for(var f=o-i;f!==o&&0===s[f];)f++;for(var p=new Uint8Array(n+(o-f)),g=n;f!==o;)p[g++]=s[f++];return p}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var r=0,n=0,i=0,o=t.length;i!==o&&0===t[i];)i++,r++;for(var s=(o-i)*u+1>>>0,l=new Uint8Array(s);i!==o;){for(var h=t[i],d=0,f=s-1;(0!==h||d<n)&&-1!==f;f--,d++)h+=256*l[f]>>>0,l[f]=h%a>>>0,h=h/a>>>0;if(0!==h)throw new Error("Non-zero carry");n=d,i++}for(var p=s-n;p!==s&&0===l[p];)p++;for(var g=c.repeat(r);p<s;++p)g+=e.charAt(l[p]);return g},decodeUnsafe:h,decode:function(e){var r=h(e);if(r)return r;throw new Error("Non-".concat(t," character"))}}};const tr=er,rr=(new Uint8Array(0),e=>{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")});class nr{constructor(e,t,r){this.name=e,this.prefix=t,this.baseEncode=r}encode(e){if(e instanceof Uint8Array)return"".concat(this.prefix).concat(this.baseEncode(e));throw Error("Unknown type, must be binary type")}}class ir{constructor(e,t,r){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=r}decode(e){if("string"===typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error("Unable to decode multibase string ".concat(JSON.stringify(e),", ").concat(this.name," decoder only supports inputs prefixed with ").concat(this.prefix));return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return sr(this,e)}}class or{constructor(e){this.decoders=e}or(e){return sr(this,e)}decode(e){const t=e[0],r=this.decoders[t];if(r)return r.decode(e);throw RangeError("Unable to decode multibase string ".concat(JSON.stringify(e),", only inputs prefixed with ").concat(Object.keys(this.decoders)," are supported"))}}const sr=(e,t)=>new or({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class ar{constructor(e,t,r,n){this.name=e,this.prefix=t,this.baseEncode=r,this.baseDecode=n,this.encoder=new nr(e,t,r),this.decoder=new ir(e,t,n)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const cr=e=>{let{name:t,prefix:r,encode:n,decode:i}=e;return new ar(t,r,n,i)},lr=e=>{let{prefix:t,name:r,alphabet:n}=e;const{encode:i,decode:o}=tr(n,r);return cr({prefix:t,name:r,encode:i,decode:e=>rr(o(e))})},ur=e=>{let{name:t,prefix:r,bitsPerChar:n,alphabet:i}=e;return cr({prefix:r,name:t,encode:e=>((e,t,r)=>{const n="="===t[t.length-1],i=(1<<r)-1;let o="",s=0,a=0;for(let c=0;c<e.length;++c)for(a=a<<8|e[c],s+=8;s>r;)s-=r,o+=t[i&a>>s];if(s&&(o+=t[i&a<<r-s]),n)for(;o.length*r&7;)o+="=";return o})(e,i,n),decode:e=>((e,t,r,n)=>{const i={};for(let u=0;u<t.length;++u)i[t[u]]=u;let o=e.length;for(;"="===e[o-1];)--o;const s=new Uint8Array(o*r/8|0);let a=0,c=0,l=0;for(let u=0;u<o;++u){const t=i[e[u]];if(void 0===t)throw new SyntaxError("Non-".concat(n," character"));c=c<<r|t,a+=r,a>=8&&(a-=8,s[l++]=255&c>>a)}if(a>=r||255&c<<8-a)throw new SyntaxError("Unexpected end of data");return s})(e,i,n,t)})},hr=cr({prefix:"\0",name:"identity",encode:e=>{return t=e,(new TextDecoder).decode(t);var t},decode:e=>(e=>(new TextEncoder).encode(e))(e)}),dr=ur({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),fr=ur({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),pr=lr({prefix:"9",name:"base10",alphabet:"0123456789"}),gr=ur({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),mr=ur({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),yr=ur({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),vr=ur({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),br=ur({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),wr=ur({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),Er=ur({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),Sr=ur({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),_r=ur({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),Ar=ur({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),kr=ur({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),Cr=lr({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),xr=lr({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),Ir=lr({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Rr=lr({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),Pr=ur({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),Tr=ur({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Nr=ur({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Dr=ur({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),Or=Array.from("\ud83d\ude80\ud83e\ude90\u2604\ud83d\udef0\ud83c\udf0c\ud83c\udf11\ud83c\udf12\ud83c\udf13\ud83c\udf14\ud83c\udf15\ud83c\udf16\ud83c\udf17\ud83c\udf18\ud83c\udf0d\ud83c\udf0f\ud83c\udf0e\ud83d\udc09\u2600\ud83d\udcbb\ud83d\udda5\ud83d\udcbe\ud83d\udcbf\ud83d\ude02\u2764\ud83d\ude0d\ud83e\udd23\ud83d\ude0a\ud83d\ude4f\ud83d\udc95\ud83d\ude2d\ud83d\ude18\ud83d\udc4d\ud83d\ude05\ud83d\udc4f\ud83d\ude01\ud83d\udd25\ud83e\udd70\ud83d\udc94\ud83d\udc96\ud83d\udc99\ud83d\ude22\ud83e\udd14\ud83d\ude06\ud83d\ude44\ud83d\udcaa\ud83d\ude09\u263a\ud83d\udc4c\ud83e\udd17\ud83d\udc9c\ud83d\ude14\ud83d\ude0e\ud83d\ude07\ud83c\udf39\ud83e\udd26\ud83c\udf89\ud83d\udc9e\u270c\u2728\ud83e\udd37\ud83d\ude31\ud83d\ude0c\ud83c\udf38\ud83d\ude4c\ud83d\ude0b\ud83d\udc97\ud83d\udc9a\ud83d\ude0f\ud83d\udc9b\ud83d\ude42\ud83d\udc93\ud83e\udd29\ud83d\ude04\ud83d\ude00\ud83d\udda4\ud83d\ude03\ud83d\udcaf\ud83d\ude48\ud83d\udc47\ud83c\udfb6\ud83d\ude12\ud83e\udd2d\u2763\ud83d\ude1c\ud83d\udc8b\ud83d\udc40\ud83d\ude2a\ud83d\ude11\ud83d\udca5\ud83d\ude4b\ud83d\ude1e\ud83d\ude29\ud83d\ude21\ud83e\udd2a\ud83d\udc4a\ud83e\udd73\ud83d\ude25\ud83e\udd24\ud83d\udc49\ud83d\udc83\ud83d\ude33\u270b\ud83d\ude1a\ud83d\ude1d\ud83d\ude34\ud83c\udf1f\ud83d\ude2c\ud83d\ude43\ud83c\udf40\ud83c\udf37\ud83d\ude3b\ud83d\ude13\u2b50\u2705\ud83e\udd7a\ud83c\udf08\ud83d\ude08\ud83e\udd18\ud83d\udca6\u2714\ud83d\ude23\ud83c\udfc3\ud83d\udc90\u2639\ud83c\udf8a\ud83d\udc98\ud83d\ude20\u261d\ud83d\ude15\ud83c\udf3a\ud83c\udf82\ud83c\udf3b\ud83d\ude10\ud83d\udd95\ud83d\udc9d\ud83d\ude4a\ud83d\ude39\ud83d\udde3\ud83d\udcab\ud83d\udc80\ud83d\udc51\ud83c\udfb5\ud83e\udd1e\ud83d\ude1b\ud83d\udd34\ud83d\ude24\ud83c\udf3c\ud83d\ude2b\u26bd\ud83e\udd19\u2615\ud83c\udfc6\ud83e\udd2b\ud83d\udc48\ud83d\ude2e\ud83d\ude46\ud83c\udf7b\ud83c\udf43\ud83d\udc36\ud83d\udc81\ud83d\ude32\ud83c\udf3f\ud83e\udde1\ud83c\udf81\u26a1\ud83c\udf1e\ud83c\udf88\u274c\u270a\ud83d\udc4b\ud83d\ude30\ud83e\udd28\ud83d\ude36\ud83e\udd1d\ud83d\udeb6\ud83d\udcb0\ud83c\udf53\ud83d\udca2\ud83e\udd1f\ud83d\ude41\ud83d\udea8\ud83d\udca8\ud83e\udd2c\u2708\ud83c\udf80\ud83c\udf7a\ud83e\udd13\ud83d\ude19\ud83d\udc9f\ud83c\udf31\ud83d\ude16\ud83d\udc76\ud83e\udd74\u25b6\u27a1\u2753\ud83d\udc8e\ud83d\udcb8\u2b07\ud83d\ude28\ud83c\udf1a\ud83e\udd8b\ud83d\ude37\ud83d\udd7a\u26a0\ud83d\ude45\ud83d\ude1f\ud83d\ude35\ud83d\udc4e\ud83e\udd32\ud83e\udd20\ud83e\udd27\ud83d\udccc\ud83d\udd35\ud83d\udc85\ud83e\uddd0\ud83d\udc3e\ud83c\udf52\ud83d\ude17\ud83e\udd11\ud83c\udf0a\ud83e\udd2f\ud83d\udc37\u260e\ud83d\udca7\ud83d\ude2f\ud83d\udc86\ud83d\udc46\ud83c\udfa4\ud83d\ude47\ud83c\udf51\u2744\ud83c\udf34\ud83d\udca3\ud83d\udc38\ud83d\udc8c\ud83d\udccd\ud83e\udd40\ud83e\udd22\ud83d\udc45\ud83d\udca1\ud83d\udca9\ud83d\udc50\ud83d\udcf8\ud83d\udc7b\ud83e\udd10\ud83e\udd2e\ud83c\udfbc\ud83e\udd75\ud83d\udea9\ud83c\udf4e\ud83c\udf4a\ud83d\udc7c\ud83d\udc8d\ud83d\udce3\ud83e\udd42"),Mr=Or.reduce(((e,t,r)=>(e[r]=t,e)),[]),Br=Or.reduce(((e,t,r)=>(e[t.codePointAt(0)]=r,e)),[]);const Lr=cr({prefix:"\ud83d\ude80",name:"base256emoji",encode:function(e){return e.reduce(((e,t)=>e+=Mr[t]),"")},decode:function(e){const t=[];for(const r of e){const e=Br[r.codePointAt(0)];if(void 0===e)throw new Error("Non-base256emoji character: ".concat(r));t.push(e)}return new Uint8Array(t)}});var Ur=function e(t,r,n){r=r||[];var i=n=n||0;for(;t>=Fr;)r[n++]=255&t|128,t/=128;for(;-128&t;)r[n++]=255&t|128,t>>>=7;return r[n]=0|t,e.bytes=n-i+1,r},Fr=Math.pow(2,31);var jr=function e(t,r){var n,i=0,o=0,s=r=r||0,a=t.length;do{if(s>=a)throw e.bytes=0,new RangeError("Could not decode varint");n=t[s++],i+=o<28?(127&n)<<o:(127&n)*Math.pow(2,o),o+=7}while(n>=128);return e.bytes=s-r,i};var zr=Math.pow(2,7),Kr=Math.pow(2,14),qr=Math.pow(2,21),Zr=Math.pow(2,28),Vr=Math.pow(2,35),Hr=Math.pow(2,42),Wr=Math.pow(2,49),Gr=Math.pow(2,56),Yr=Math.pow(2,63);const Qr={encode:Ur,decode:jr,encodingLength:function(e){return e<zr?1:e<Kr?2:e<qr?3:e<Zr?4:e<Vr?5:e<Hr?6:e<Wr?7:e<Gr?8:e<Yr?9:10}},Jr=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Qr.encode(e,t,r),t},Xr=e=>Qr.encodingLength(e),$r=(e,t)=>{const r=t.byteLength,n=Xr(e),i=n+Xr(r),o=new Uint8Array(i+r);return Jr(e,o,0),Jr(r,o,n),o.set(t,i),new en(e,r,t,o)};class en{constructor(e,t,r,n){this.code=e,this.size=t,this.digest=r,this.bytes=n}}const tn=e=>{let{name:t,code:r,encode:n}=e;return new rn(t,r,n)};class rn{constructor(e,t,r){this.name=e,this.code=t,this.encode=r}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?$r(this.code,t):t.then((e=>$r(this.code,e)))}throw Error("Unknown type, must be binary type")}}const nn=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),on=tn({name:"sha2-256",code:18,encode:nn("SHA-256")}),sn=tn({name:"sha2-512",code:19,encode:nn("SHA-512")}),an=rr,cn={code:0,name:"identity",encode:an,digest:e=>$r(0,an(e))},ln="raw",un=85,hn=e=>rr(e),dn=e=>rr(e),fn=new TextEncoder,pn=new TextDecoder,gn="json",mn=512,yn=e=>fn.encode(JSON.stringify(e)),vn=e=>JSON.parse(pn.decode(e));new WeakMap;class bn{constructor(e,t,r,n){this.code=t,this.version=e,this.multihash=r,this.bytes=n,this["/"]=n}get asCID(){return this}get byteOffset(){return this.bytes.byteOffset}get byteLength(){return this.bytes.byteLength}toV0(){switch(this.version){case 0:return this;case 1:{const{code:e,multihash:t}=this;if(e!==DAG_PB_CODE)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(t.code!==SHA_256_CODE)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return bn.createV0(t)}default:throw Error("Can not convert CID version ".concat(this.version," to version 0. This is a bug please report"))}}toV1(){switch(this.version){case 0:{const{code:e,digest:t}=this.multihash,r=Digest.create(e,t);return bn.createV1(this.code,r)}case 1:return this;default:throw Error("Can not convert CID version ".concat(this.version," to version 1. This is a bug please report"))}}equals(e){return bn.equals(this,e)}static equals(e,t){const r=t;return r&&e.code===r.code&&e.version===r.version&&Digest.equals(e.multihash,r.multihash)}toString(e){return format(this,e)}toJSON(){return{"/":format(this)}}link(){return this}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return"CID(".concat(this.toString(),")")}static asCID(e){if(null==e)return null;const t=e;if(t instanceof bn)return t;if(null!=t["/"]&&t["/"]===t.bytes||t.asCID===t){const{version:e,code:r,multihash:n,bytes:i}=t;return new bn(e,r,n,i||encodeCID(e,r,n.bytes))}if(!0===t[cidSymbol]){const{version:e,multihash:r,code:n}=t,i=Digest.decode(r);return bn.create(e,n,i)}return null}static create(e,t,r){if("number"!==typeof t)throw new Error("String codecs are no longer supported");if(!(r.bytes instanceof Uint8Array))throw new Error("Invalid digest");switch(e){case 0:if(t!==DAG_PB_CODE)throw new Error("Version 0 CID must use dag-pb (code: ".concat(DAG_PB_CODE,") block encoding"));return new bn(e,t,r,r.bytes);case 1:{const n=encodeCID(e,t,r.bytes);return new bn(e,t,r,n)}default:throw new Error("Invalid version")}}static createV0(e){return bn.create(0,DAG_PB_CODE,e)}static createV1(e,t){return bn.create(1,e,t)}static decode(e){const[t,r]=bn.decodeFirst(e);if(r.length)throw new Error("Incorrect length");return t}static decodeFirst(e){const t=bn.inspectBytes(e),r=t.size-t.multihashSize,n=coerce(e.subarray(r,r+t.multihashSize));if(n.byteLength!==t.multihashSize)throw new Error("Incorrect length");const i=n.subarray(t.multihashSize-t.digestSize),o=new Digest.Digest(t.multihashCode,t.digestSize,i,n);return[0===t.version?bn.createV0(o):bn.createV1(t.codec,o),e.subarray(t.size)]}static inspectBytes(e){let t=0;const r=()=>{const[r,n]=varint.decode(e.subarray(t));return n,r};let n=r(),i=DAG_PB_CODE;if(18===n?(0,0):r(),0!==n&&1!==n)throw new RangeError("Invalid CID version ".concat(n));const o=t,s=r(),a=r(),c=t+a;return{version:n,codec:i,multihashCode:s,digestSize:a,multihashSize:c-o,size:c}}static parse(e,t){const[r,n]=parseCIDtoBytes(e,t),i=bn.decode(n);if(0===i.version&&"Q"!==e[0])throw Error("Version 0 CID string must not include multibase prefix");return baseCache(i).set(r,e),i}}Symbol.for("@ipld/js-cid/CID");const wn={...e,...t,...r,...n,...i,...o,...s,...a,...c,...l};function En(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return null!=(null===(e=globalThis.Buffer)||void 0===e?void 0:e.alloc)?$t(globalThis.Buffer.alloc(t)):new Uint8Array(t)}function Sn(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return null!=(null===(e=globalThis.Buffer)||void 0===e?void 0:e.allocUnsafe)?$t(globalThis.Buffer.allocUnsafe(t)):new Uint8Array(t)}function _n(e,t,r,n){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:n}}}const An=_n("utf8","u",(e=>"u"+new TextDecoder("utf8").decode(e)),(e=>(new TextEncoder).encode(e.substring(1)))),kn=_n("ascii","a",(e=>{let t="a";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t}),(e=>{const t=Sn((e=e.substring(1)).length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t})),Cn={utf8:An,"utf-8":An,hex:wn.base16,latin1:kn,ascii:kn,binary:kn,...wn};function xn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8";const r=Cn[t];if(null==r)throw new Error('Unsupported encoding "'.concat(t,'"'));return"utf8"!==t&&"utf-8"!==t||null==globalThis.Buffer||null==globalThis.Buffer.from?r.decoder.decode("".concat(r.prefix).concat(e)):$t(globalThis.Buffer.from(e,"utf-8"))}function In(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8";const r=Cn[t];if(null==r)throw new Error('Unsupported encoding "'.concat(t,'"'));return"utf8"!==t&&"utf-8"!==t||null==globalThis.Buffer||null==globalThis.Buffer.from?r.encoder.encode(e).substring(1):globalThis.Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("utf8")}function Rn(e){if("string"===typeof e){return xn(e.replace(/^0x/i,"").toLowerCase(),"base16")}return e}const Pn=e=>In(e,"base16"),Tn=e=>In(e,"utf8"),Nn=e=>xn(e,"utf8");function Dn(e,t){const r=null!==t&&void 0!==t?t:e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(r);let i=0;for(const o of e)n.set(o,i),i+=o.length;return n}const On=12,Mn={name:"AES-GCM",length:128},Bn=32;var Ln=__webpack_require__(7761),Un=__webpack_require__(7676);const Fn={node:Ln,web:"object"===typeof self&&"crypto"in self?self.crypto:void 0};function jn(){if(Fn.web)return Fn.web.subtle;if(Fn.node)return Fn.node.webcrypto.subtle;throw new Error("The environment doesn't have Crypto Subtle API (if in the browser, be sure to use to be in a secure context, ie, https)")}const zn=Xt.randomBytes,Kn=Xt.sha256;const qn=jt;function Zn(e){return new Uint8Array(Un.keccak256.arrayBuffer(e))}function Vn(e,t){let r=1,n=0,i=Promise.resolve(new Uint8Array);for(;n<t;){const t=new Uint8Array([r>>24,r>>16,r>>8,r]),o=Dn([t,e],t.length+e.length),s=Kn(o);i=i.then((e=>s.then((t=>{const r=new Uint8Array(t);return Dn([e,r],e.length+r.length)})))),n+=32,r+=1}return i}function Hn(e,t){if(32!==e.length)throw new Error("Bad private key, it should be 32 bytes but it's actually ".concat(e.length," bytes long"));if(65!==t.length)throw new Error("Bad public key, it should be 65 bytes but it's actually ".concat(t.length," bytes long"));if(4!==t[0])throw new Error("Bad public key, a valid public key would begin with 4");{const r=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(zt(e))throw new TypeError("getSharedSecret: first arg must be private key");if(!zt(t))throw new TypeError("getSharedSecret: second arg must be public key");const n=Ut(t);return n.assertValidity(),n.multiply(Lt(e)).toRawBytes(r)}(e,t,!0);return new Uint8Array(Rn(r).slice(1))}}async function Wn(e,t){const r=zn(32),n=Hn(r,e),i=await Vn(n,32),o=zn(16),s=i.slice(0,16),a=await(c=o,l=s,u=t,jn().importKey("raw",l,"AES-CTR",!1,["encrypt"]).then((e=>jn().encrypt({name:"AES-CTR",counter:c,length:128},e,u))).then((e=>new Uint8Array(e))));var c,l,u;const h=Dn([o,a],o.length+a.length),d=await Kn(i.slice(16)),f=await function(e,t){const r={name:"HMAC",hash:{name:"SHA-256"}};return jn().importKey("raw",e,r,!1,["sign"]).then((e=>jn().sign(r,e,t))).then((e=>new Uint8Array(e)))}(d,h),p=jt(r,!1);return Dn([p,h,f],p.length+h.length+f.length)}async function Gn(e,t){if(t.length<=113)throw new Error("Invalid Ciphertext. Data is too small. It should ba at least ".concat(113," bytes"));if(4!==t[0])throw new Error("Not a valid ciphertext. It should begin with 4 but actually begin with ".concat(t[0]));{const o=t.slice(0,65),s=t.length-113,a=t.slice(65,81),c=t.slice(65,81+s),l=c.slice(16),u=t.slice(81+s),h=Hn(e,o),d=await Vn(h,32),[f,p]=await Kn(d.slice(16)).then((e=>[d.slice(0,16),e]));if(!await function(e,t,r){const n={name:"HMAC",hash:{name:"SHA-256"}};return jn().importKey("raw",e,n,!1,["verify"]).then((e=>jn().verify(n,e,r,t)))}(p,c,u))throw new Error("Incorrect MAC");return r=a,n=f,i=l,jn().importKey("raw",n,"AES-CTR",!1,["decrypt"]).then((e=>jn().decrypt({name:"AES-CTR",counter:r,length:128},e,i))).then((e=>new Uint8Array(e)))}var r,n,i}async function Yn(e,t){const r=zn(On),n=await async function(e,t,r){return jn().importKey("raw",t,Mn,!1,["encrypt"]).then((t=>jn().encrypt({iv:e,...Mn},t,r))).then((e=>new Uint8Array(e)))}(r,Rn(t),e);return Dn([n,r])}async function Qn(e,t){const r=e.length-On,n=e.slice(0,r);return async function(e,t,r){return jn().importKey("raw",t,Mn,!1,["decrypt"]).then((t=>jn().decrypt({iv:e,...Mn},t,r))).then((e=>new Uint8Array(e)))}(e.slice(r),Rn(t),n)}function Jn(e){let t=1;for(let r=e.length;r>=256;r/=256)t++;return t}function Xn(e,t){const r=new DataView(t.slice(64).buffer).getUint8(0);return function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return ut.fromSignature(e,t,r).toRawBytes(n)}(e,ft.fromCompact(t.slice(0,64)),r,!1)}async function $n(e,t){let r=new Uint8Array([0]);r=function(e,t){const r=Jn(t);let n=new Uint8Array(4);return new DataView(n.buffer).setUint32(0,t.length,!0),n=n.slice(0,r),(e=Dn([e,n]))[0]|=r,e}(r,e),r=Dn([r,e]);let n=1+Jn(e)+e.length;t&&(n+=65);const i=256-n%256,o=zn(i);if(a=i,(s=o).length!==a||!(a<=3||-1!==s.findIndex((e=>0!==e))))throw new Error("failed to generate random padding of size "+i);var s,a;if(r=Dn([r,o]),t){r[0]|=4;const e=Zn(r),n=await async function(e,t){const[r,n]=await Wt(e,t,{recovered:!0,der:!1});return Dn([r,new Uint8Array([n])],r.length+1)}(e,t);r=Dn([r,n])}return r}function ei(e){const t=function(e){return 3&new DataView(e.buffer).getUint8(0)}(e);if(0===t)return;const r=function(e,t){let r=e.slice(1,1+t);return t<4&&(r=Dn([r,new Uint8Array(4-t)],4)),new DataView(r.buffer).getInt32(0,!0)}(e,t),n=1+t,i=e.slice(n,n+r),o=function(e){return 4==(4&new DataView(e.buffer).getUint8(0))}(e);let s;if(o){const t=function(e){return e.slice(e.length-65,e.length)}(e),r=function(e,t){return Zn(t?e.slice(0,e.length-65):e)}(e,o);s={signature:t,publicKey:Xn(r,t)}}return{payload:i,sig:s}}const ti=Ue("waku:message-encryption:ecies");class ri{constructor(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4?arguments[4]:void 0;if((0,W.Z)(this,"contentTopic",void 0),(0,W.Z)(this,"publicKey",void 0),(0,W.Z)(this,"sigPrivKey",void 0),(0,W.Z)(this,"ephemeral",void 0),(0,W.Z)(this,"metaSetter",void 0),this.contentTopic=e,this.publicKey=t,this.sigPrivKey=r,this.ephemeral=n,this.metaSetter=i,!e||""===e)throw new Error("Content topic must be specified")}async toWire(e){const t=await this.toProtoObj(e);if(t)return he.encode(t)}async toProtoObj(e){var t;const r=null!==(t=e.timestamp)&&void 0!==t?t:new Date,n=await $n(e.payload,this.sigPrivKey),i={payload:await async function(e,t){return Wn(Rn(t),e)}(n,this.publicKey),version:oi,contentTopic:this.contentTopic,timestamp:BigInt(r.valueOf())*ii,meta:void 0,rateLimitProof:e.rateLimitProof,ephemeral:this.ephemeral};if(this.metaSetter){const e=this.metaSetter(i);return{...i,meta:e}}return i}}class ni extends qe{constructor(e,t){super(e),(0,W.Z)(this,"privateKey",void 0),this.privateKey=t}async fromProtoObj(e,t){var r,n;const i=t.payload;if(t.version!==oi)return void ti("Failed to decrypt due to incorrect version, expected:",oi,", actual:",t.version);let o;try{o=await async function(e,t){return Gn(t,e)}(i,this.privateKey)}catch(a){return void ti("Failed to decrypt message using asymmetric decryption for contentTopic: ".concat(this.contentTopic),a)}if(!o)return void ti("Failed to decrypt payload for contentTopic ".concat(this.contentTopic));const s=ei(o);if(s)return ti("Message decrypted",t),new Ze(e,t,s.payload,null===(r=s.sig)||void 0===r?void 0:r.signature,null===(n=s.sig)||void 0===n?void 0:n.publicKey);ti("Failed to decode payload for contentTopic ".concat(this.contentTopic))}}const ii=BigInt(1e6),oi=1,si=Ue("waku:message-encryption:symmetric");class ai{constructor(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4?arguments[4]:void 0;if((0,W.Z)(this,"contentTopic",void 0),(0,W.Z)(this,"symKey",void 0),(0,W.Z)(this,"sigPrivKey",void 0),(0,W.Z)(this,"ephemeral",void 0),(0,W.Z)(this,"metaSetter",void 0),this.contentTopic=e,this.symKey=t,this.sigPrivKey=r,this.ephemeral=n,this.metaSetter=i,!e||""===e)throw new Error("Content topic must be specified")}async toWire(e){const t=await this.toProtoObj(e);if(t)return he.encode(t)}async toProtoObj(e){var t;const r=null!==(t=e.timestamp)&&void 0!==t?t:new Date,n=await $n(e.payload,this.sigPrivKey),i={payload:await Yn(n,this.symKey),version:oi,contentTopic:this.contentTopic,timestamp:BigInt(r.valueOf())*ii,meta:void 0,rateLimitProof:e.rateLimitProof,ephemeral:this.ephemeral};if(this.metaSetter){const e=this.metaSetter(i);return{...i,meta:e}}return i}}class ci extends qe{constructor(e,t){super(e),(0,W.Z)(this,"symKey",void 0),this.symKey=t}async fromProtoObj(e,t){var r,n;const i=t.payload;if(t.version!==oi)return void si("Failed to decrypt due to incorrect version, expected:",oi,", actual:",t.version);let o;try{o=await Qn(i,this.symKey)}catch(a){return void si("Failed to decrypt message using asymmetric decryption for contentTopic: ".concat(this.contentTopic),a)}if(!o)return void si("Failed to decrypt payload for contentTopic ".concat(this.contentTopic));const s=ei(o);if(s)return si("Message decrypted",t),new Ze(e,t,s.payload,null===(r=s.sig)||void 0===r?void 0:r.signature,null===(n=s.sig)||void 0===n?void 0:n.publicKey);si("Failed to decode payload for contentTopic ".concat(this.contentTopic))}}var li=__webpack_require__(6567);const ui=li.Root,hi=li.Type,di=li.Field;class fi{constructor(e){this.payload=e}encode(){const e=fi.Type.create(this.payload);return fi.Type.encode(e).finish()}static decode(e){const t=fi.Type.decode(e);if(t.signature&&t.encryptionPublicKey&&t.ethAddress)return new fi(t);console.log("Field missing on decoded Public Key Message",t)}get encryptionPublicKey(){return this.payload.encryptionPublicKey}get ethAddress(){return this.payload.ethAddress}get signature(){return this.payload.signature}}fi.Type=new hi("PublicKeyMessage").add(new di("encryptionPublicKey",1,"bytes")).add(new di("ethAddress",2,"bytes")).add(new di("signature",3,"bytes")),fi.Root=(new ui).define("messages").add(fi.Type);class pi{constructor(e){this.payload=e}encode(){const e=pi.Type.create(this.payload);return pi.Type.encode(e).finish()}static decode(e){const t=pi.Type.decode(e);if(t.toAddress&&t.message)return new pi(t);console.log("Field missing on decoded Private Message",t)}get toAddress(){return this.payload.toAddress}get message(){return this.payload.message}}var gi,mi,yi,vi,bi;function wi(e,t){if(e===t)return!0;if(e.byteLength!==t.byteLength)return!1;for(let r=0;r<e.byteLength;r++)if(e[r]!==t[r])return!1;return!0}pi.Type=new hi("PrivateMessage").add(new di("toAddress",1,"bytes")).add(new di("message",2,"string")),pi.Root=(new ui).define("messages").add(pi.Type),function(e){e.Relay="relay",e.Store="store",e.LightPush="lightpush",e.Filter="filter"}(gi||(gi={})),function(e){e.GENERIC_FAIL="Generic error",e.ENCODE_FAILED="Failed to encode",e.DECODE_FAILED="Failed to decode",e.SIZE_TOO_BIG="Size is too big",e.NO_RPC_RESPONSE="No RPC response"}(mi||(mi={})),function(e){e.BACKWARD="backward",e.FORWARD="forward"}(yi||(yi={})),function(e){e.BOOTSTRAP="bootstrap",e.PEER_EXCHANGE="peer-exchange"}(vi||(vi={})),function(e){e.PEER_DISCOVERY_BOOTSTRAP="peer:discovery:bootstrap",e.PEER_DISCOVERY_PEER_EXCHANGE="peer:discovery:peer-exchange",e.PEER_CONNECT_BOOTSTRAP="peer:connected:bootstrap",e.PEER_CONNECT_PEER_EXCHANGE="peer:connected:peer-exchange"}(bi||(bi={}));const Ei=Symbol.for("@libp2p/peer-id");function Si(e){return null!=e&&Boolean(e[Ei])}function _i(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Ai(e,t,r){_i(e,t),t.set(e,r)}function ki(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function Ci(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,ki(e,t,"get"))}function xi(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,ki(e,t,"set"),r),r}class Ii extends Error{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"The operation was aborted"),(0,W.Z)(this,"code",void 0),(0,W.Z)(this,"type",void 0),this.code=Ii.code,this.type=Ii.type}}(0,W.Z)(Ii,"code","ABORT_ERR"),(0,W.Z)(Ii,"type","aborted");class Ri extends Error{constructor(e,t,r){var n;super(e),(0,W.Z)(this,"code",void 0),(0,W.Z)(this,"props",void 0),this.code=t,this.name=null!==(n=null===r||void 0===r?void 0:r.name)&&void 0!==n?n:"CodeError",this.props=null!==r&&void 0!==r?r:{}}}class Pi extends Error{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Unexpected Peer"),(0,W.Z)(this,"code",void 0),this.code=Pi.code}}(0,W.Z)(Pi,"code","ERR_UNEXPECTED_PEER");class Ti extends Error{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Invalid crypto exchange"),(0,W.Z)(this,"code",void 0),this.code=Ti.code}}(0,W.Z)(Ti,"code","ERR_INVALID_CRYPTO_EXCHANGE");class Ni extends Error{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Invalid crypto transmission"),(0,W.Z)(this,"code",void 0),this.code=Ni.code}}(0,W.Z)(Ni,"code","ERR_INVALID_CRYPTO_TRANSMISSION");var Di=function(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<e.length;i++){var o=e.charAt(i),s=o.charCodeAt(0);if(255!==r[s])throw new TypeError(o+" is ambiguous");r[s]=i}var a=e.length,c=e.charAt(0),l=Math.log(a)/Math.log(256),u=Math.log(256)/Math.log(a);function h(e){if("string"!==typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;var t=0;if(" "!==e[t]){for(var n=0,i=0;e[t]===c;)n++,t++;for(var o=(e.length-t)*l+1>>>0,s=new Uint8Array(o);e[t];){var u=r[e.charCodeAt(t)];if(255===u)return;for(var h=0,d=o-1;(0!==u||h<i)&&-1!==d;d--,h++)u+=a*s[d]>>>0,s[d]=u%256>>>0,u=u/256>>>0;if(0!==u)throw new Error("Non-zero carry");i=h,t++}if(" "!==e[t]){for(var f=o-i;f!==o&&0===s[f];)f++;for(var p=new Uint8Array(n+(o-f)),g=n;f!==o;)p[g++]=s[f++];return p}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var r=0,n=0,i=0,o=t.length;i!==o&&0===t[i];)i++,r++;for(var s=(o-i)*u+1>>>0,l=new Uint8Array(s);i!==o;){for(var h=t[i],d=0,f=s-1;(0!==h||d<n)&&-1!==f;f--,d++)h+=256*l[f]>>>0,l[f]=h%a>>>0,h=h/a>>>0;if(0!==h)throw new Error("Non-zero carry");n=d,i++}for(var p=s-n;p!==s&&0===l[p];)p++;for(var g=c.repeat(r);p<s;++p)g+=e.charAt(l[p]);return g},decodeUnsafe:h,decode:function(e){var r=h(e);if(r)return r;throw new Error("Non-".concat(t," character"))}}};const Oi=Di,Mi=(new Uint8Array(0),e=>{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")});class Bi{constructor(e,t,r){this.name=e,this.prefix=t,this.baseEncode=r}encode(e){if(e instanceof Uint8Array)return"".concat(this.prefix).concat(this.baseEncode(e));throw Error("Unknown type, must be binary type")}}class Li{constructor(e,t,r){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=r}decode(e){if("string"===typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error("Unable to decode multibase string ".concat(JSON.stringify(e),", ").concat(this.name," decoder only supports inputs prefixed with ").concat(this.prefix));return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return Fi(this,e)}}class Ui{constructor(e){this.decoders=e}or(e){return Fi(this,e)}decode(e){const t=e[0],r=this.decoders[t];if(r)return r.decode(e);throw RangeError("Unable to decode multibase string ".concat(JSON.stringify(e),", only inputs prefixed with ").concat(Object.keys(this.decoders)," are supported"))}}const Fi=(e,t)=>new Ui({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class ji{constructor(e,t,r,n){this.name=e,this.prefix=t,this.baseEncode=r,this.baseDecode=n,this.encoder=new Bi(e,t,r),this.decoder=new Li(e,t,n)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const zi=e=>{let{name:t,prefix:r,encode:n,decode:i}=e;return new ji(t,r,n,i)},Ki=e=>{let{prefix:t,name:r,alphabet:n}=e;const{encode:i,decode:o}=Oi(n,r);return zi({prefix:t,name:r,encode:i,decode:e=>Mi(o(e))})},qi=e=>{let{name:t,prefix:r,bitsPerChar:n,alphabet:i}=e;return zi({prefix:r,name:t,encode:e=>((e,t,r)=>{const n="="===t[t.length-1],i=(1<<r)-1;let o="",s=0,a=0;for(let c=0;c<e.length;++c)for(a=a<<8|e[c],s+=8;s>r;)s-=r,o+=t[i&a>>s];if(s&&(o+=t[i&a<<r-s]),n)for(;o.length*r&7;)o+="=";return o})(e,i,n),decode:e=>((e,t,r,n)=>{const i={};for(let u=0;u<t.length;++u)i[t[u]]=u;let o=e.length;for(;"="===e[o-1];)--o;const s=new Uint8Array(o*r/8|0);let a=0,c=0,l=0;for(let u=0;u<o;++u){const t=i[e[u]];if(void 0===t)throw new SyntaxError("Non-".concat(n," character"));c=c<<r|t,a+=r,a>=8&&(a-=8,s[l++]=255&c>>a)}if(a>=r||255&c<<8-a)throw new SyntaxError("Unexpected end of data");return s})(e,i,n,t)})},Zi=Ki({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Vi=Ki({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var Hi=function e(t,r,n){r=r||[];var i=n=n||0;for(;t>=Wi;)r[n++]=255&t|128,t/=128;for(;-128&t;)r[n++]=255&t|128,t>>>=7;return r[n]=0|t,e.bytes=n-i+1,r},Wi=Math.pow(2,31);var Gi=function e(t,r){var n,i=0,o=0,s=r=r||0,a=t.length;do{if(s>=a)throw e.bytes=0,new RangeError("Could not decode varint");n=t[s++],i+=o<28?(127&n)<<o:(127&n)*Math.pow(2,o),o+=7}while(n>=128);return e.bytes=s-r,i};var Yi=Math.pow(2,7),Qi=Math.pow(2,14),Ji=Math.pow(2,21),Xi=Math.pow(2,28),$i=Math.pow(2,35),eo=Math.pow(2,42),to=Math.pow(2,49),ro=Math.pow(2,56),no=Math.pow(2,63);const io={encode:Hi,decode:Gi,encodingLength:function(e){return e<Yi?1:e<Qi?2:e<Ji?3:e<Xi?4:e<$i?5:e<eo?6:e<to?7:e<ro?8:e<no?9:10}},oo=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const r=io.decode(e,t);return[r,io.decode.bytes]},so=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return io.encode(e,t,r),t},ao=e=>io.encodingLength(e),co=(e,t)=>{const r=t.byteLength,n=ao(e),i=n+ao(r),o=new Uint8Array(i+r);return so(e,o,0),so(r,o,n),o.set(t,i),new uo(e,r,t,o)},lo=e=>{const t=Mi(e),[r,n]=oo(t),[i,o]=oo(t.subarray(n)),s=t.subarray(n+o);if(s.byteLength!==i)throw new Error("Incorrect length");return new uo(r,i,s,t)};class uo{constructor(e,t,r,n){this.code=e,this.size=t,this.digest=r,this.bytes=n}}const ho=qi({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),fo=qi({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),po=qi({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),go=qi({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),mo=qi({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),yo=qi({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),vo=qi({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),bo=qi({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),wo=qi({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),Eo=(e,t)=>{const{bytes:r,version:n}=e;return 0===n?Co(r,_o(e),t||Zi.encoder):xo(r,_o(e),t||ho.encoder)},So=new WeakMap,_o=e=>{const t=So.get(e);if(null==t){const t=new Map;return So.set(e,t),t}return t};class Ao{constructor(e,t,r,n){this.code=t,this.version=e,this.multihash=r,this.bytes=n,this["/"]=n}get asCID(){return this}get byteOffset(){return this.bytes.byteOffset}get byteLength(){return this.bytes.byteLength}toV0(){switch(this.version){case 0:return this;case 1:{const{code:e,multihash:t}=this;if(e!==Io)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(t.code!==Ro)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return Ao.createV0(t)}default:throw Error("Can not convert CID version ".concat(this.version," to version 0. This is a bug please report"))}}toV1(){switch(this.version){case 0:{const{code:e,digest:t}=this.multihash,r=co(e,t);return Ao.createV1(this.code,r)}case 1:return this;default:throw Error("Can not convert CID version ".concat(this.version," to version 1. This is a bug please report"))}}equals(e){return Ao.equals(this,e)}static equals(e,t){const r=t;return r&&e.code===r.code&&e.version===r.version&&((e,t)=>{if(e===t)return!0;{const r=t;return e.code===r.code&&e.size===r.size&&r.bytes instanceof Uint8Array&&((e,t)=>{if(e===t)return!0;if(e.byteLength!==t.byteLength)return!1;for(let r=0;r<e.byteLength;r++)if(e[r]!==t[r])return!1;return!0})(e.bytes,r.bytes)}})(e.multihash,r.multihash)}toString(e){return Eo(this,e)}toJSON(){return{"/":Eo(this)}}link(){return this}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return"CID(".concat(this.toString(),")")}static asCID(e){if(null==e)return null;const t=e;if(t instanceof Ao)return t;if(null!=t["/"]&&t["/"]===t.bytes||t.asCID===t){const{version:e,code:r,multihash:n,bytes:i}=t;return new Ao(e,r,n,i||Po(e,r,n.bytes))}if(!0===t[To]){const{version:e,multihash:r,code:n}=t,i=lo(r);return Ao.create(e,n,i)}return null}static create(e,t,r){if("number"!==typeof t)throw new Error("String codecs are no longer supported");if(!(r.bytes instanceof Uint8Array))throw new Error("Invalid digest");switch(e){case 0:if(t!==Io)throw new Error("Version 0 CID must use dag-pb (code: ".concat(Io,") block encoding"));return new Ao(e,t,r,r.bytes);case 1:{const n=Po(e,t,r.bytes);return new Ao(e,t,r,n)}default:throw new Error("Invalid version")}}static createV0(e){return Ao.create(0,Io,e)}static createV1(e,t){return Ao.create(1,e,t)}static decode(e){const[t,r]=Ao.decodeFirst(e);if(r.length)throw new Error("Incorrect length");return t}static decodeFirst(e){const t=Ao.inspectBytes(e),r=t.size-t.multihashSize,n=Mi(e.subarray(r,r+t.multihashSize));if(n.byteLength!==t.multihashSize)throw new Error("Incorrect length");const i=n.subarray(t.multihashSize-t.digestSize),o=new uo(t.multihashCode,t.digestSize,i,n);return[0===t.version?Ao.createV0(o):Ao.createV1(t.codec,o),e.subarray(t.size)]}static inspectBytes(e){let t=0;const r=()=>{const[r,n]=oo(e.subarray(t));return t+=n,r};let n=r(),i=Io;if(18===n?(n=0,t=0):i=r(),0!==n&&1!==n)throw new RangeError("Invalid CID version ".concat(n));const o=t,s=r(),a=r(),c=t+a;return{version:n,codec:i,multihashCode:s,digestSize:a,multihashSize:c-o,size:c}}static parse(e,t){const[r,n]=ko(e,t),i=Ao.decode(n);if(0===i.version&&"Q"!==e[0])throw Error("Version 0 CID string must not include multibase prefix");return _o(i).set(r,e),i}}const ko=(e,t)=>{switch(e[0]){case"Q":{const r=t||Zi;return[Zi.prefix,r.decode("".concat(Zi.prefix).concat(e))]}case Zi.prefix:{const r=t||Zi;return[Zi.prefix,r.decode(e)]}case ho.prefix:{const r=t||ho;return[ho.prefix,r.decode(e)]}default:if(null==t)throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");return[e[0],t.decode(e)]}},Co=(e,t,r)=>{const{prefix:n}=r;if(n!==Zi.prefix)throw Error("Cannot string encode V0 in ".concat(r.name," encoding"));const i=t.get(n);if(null==i){const i=r.encode(e).slice(1);return t.set(n,i),i}return i},xo=(e,t,r)=>{const{prefix:n}=r,i=t.get(n);if(null==i){const i=r.encode(e);return t.set(n,i),i}return i},Io=112,Ro=18,Po=(e,t,r)=>{const n=ao(e),i=n+ao(t),o=new Uint8Array(i+r.byteLength);return so(e,o,0),so(t,o,n),o.set(r,i),o},To=Symbol.for("@ipld/js-cid/CID");function No(e,t){null==t&&(t=e.reduce(((e,t)=>e+t.length),0));const r=Sn(t);let n=0;for(const i of e)r.set(i,n),n+=i.length;return $t(r)}var Do=__webpack_require__(6796);const Oo=new class{constructor(){(0,W.Z)(this,"index",0),(0,W.Z)(this,"input","")}new(e){return this.index=0,this.input=e,this}readAtomically(e){const t=this.index,r=e();return void 0===r&&(this.index=t),r}parseWith(e){const t=e();if(this.index===this.input.length)return t}peekChar(){if(!(this.index>=this.input.length))return this.input[this.index]}readChar(){if(!(this.index>=this.input.length))return this.input[this.index++]}readGivenChar(e){return this.readAtomically((()=>{const t=this.readChar();if(t===e)return t}))}readSeparator(e,t,r){return this.readAtomically((()=>{if(!(t>0&&void 0===this.readGivenChar(e)))return r()}))}readNumber(e,t,r,n){return this.readAtomically((()=>{let i=0,o=0;const s=this.peekChar();if(void 0===s)return;const a="0"===s,c=2**(8*n)-1;for(;;){const r=this.readAtomically((()=>{const t=this.readChar();if(void 0===t)return;const r=Number.parseInt(t,e);return Number.isNaN(r)?void 0:r}));if(void 0===r)break;if(i*=e,i+=r,i>c)return;if(o+=1,void 0!==t&&o>t)return}return 0===o||!r&&a&&o>1?void 0:i}))}readIPv4Addr(){return this.readAtomically((()=>{const e=new Uint8Array(4);for(let t=0;t<e.length;t++){const r=this.readSeparator(".",t,(()=>this.readNumber(10,3,!1,1)));if(void 0===r)return;e[t]=r}return e}))}readIPv6Addr(){const e=e=>{for(let t=0;t<e.length/2;t++){const r=2*t;if(t<e.length-3){const n=this.readSeparator(":",t,(()=>this.readIPv4Addr()));if(void 0!==n)return e[r]=n[0],e[r+1]=n[1],e[r+2]=n[2],e[r+3]=n[3],[r+4,!0]}const n=this.readSeparator(":",t,(()=>this.readNumber(16,4,!0,2)));if(void 0===n)return[r,!1];e[r]=n>>8,e[r+1]=255&n}return[e.length,!1]};return this.readAtomically((()=>{const t=new Uint8Array(16),[r,n]=e(t);if(16===r)return t;if(n)return;if(void 0===this.readGivenChar(":"))return;if(void 0===this.readGivenChar(":"))return;const i=new Uint8Array(14),o=16-(r+2),[s]=e(i.subarray(0,o));return t.set(i.subarray(0,s),16-s),t}))}readIPAddr(){var e;return null!==(e=this.readIPv4Addr())&&void 0!==e?e:this.readIPv6Addr()}};parseInt("0xFFFF",16),new Uint8Array([0,0,0,0,0,0,0,0,0,0,255,255]);const Mo=zi({prefix:"\0",name:"identity",encode:e=>{return t=e,(new TextDecoder).decode(t);var t},decode:e=>(e=>(new TextEncoder).encode(e))(e)}),Bo=qi({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),Lo=qi({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),Uo=Ki({prefix:"9",name:"base10",alphabet:"0123456789"}),Fo=qi({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),jo=qi({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),zo=Ki({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),Ko=Ki({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),qo=qi({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),Zo=qi({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Vo=qi({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Ho=qi({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),Wo=Array.from("\ud83d\ude80\ud83e\ude90\u2604\ud83d\udef0\ud83c\udf0c\ud83c\udf11\ud83c\udf12\ud83c\udf13\ud83c\udf14\ud83c\udf15\ud83c\udf16\ud83c\udf17\ud83c\udf18\ud83c\udf0d\ud83c\udf0f\ud83c\udf0e\ud83d\udc09\u2600\ud83d\udcbb\ud83d\udda5\ud83d\udcbe\ud83d\udcbf\ud83d\ude02\u2764\ud83d\ude0d\ud83e\udd23\ud83d\ude0a\ud83d\ude4f\ud83d\udc95\ud83d\ude2d\ud83d\ude18\ud83d\udc4d\ud83d\ude05\ud83d\udc4f\ud83d\ude01\ud83d\udd25\ud83e\udd70\ud83d\udc94\ud83d\udc96\ud83d\udc99\ud83d\ude22\ud83e\udd14\ud83d\ude06\ud83d\ude44\ud83d\udcaa\ud83d\ude09\u263a\ud83d\udc4c\ud83e\udd17\ud83d\udc9c\ud83d\ude14\ud83d\ude0e\ud83d\ude07\ud83c\udf39\ud83e\udd26\ud83c\udf89\ud83d\udc9e\u270c\u2728\ud83e\udd37\ud83d\ude31\ud83d\ude0c\ud83c\udf38\ud83d\ude4c\ud83d\ude0b\ud83d\udc97\ud83d\udc9a\ud83d\ude0f\ud83d\udc9b\ud83d\ude42\ud83d\udc93\ud83e\udd29\ud83d\ude04\ud83d\ude00\ud83d\udda4\ud83d\ude03\ud83d\udcaf\ud83d\ude48\ud83d\udc47\ud83c\udfb6\ud83d\ude12\ud83e\udd2d\u2763\ud83d\ude1c\ud83d\udc8b\ud83d\udc40\ud83d\ude2a\ud83d\ude11\ud83d\udca5\ud83d\ude4b\ud83d\ude1e\ud83d\ude29\ud83d\ude21\ud83e\udd2a\ud83d\udc4a\ud83e\udd73\ud83d\ude25\ud83e\udd24\ud83d\udc49\ud83d\udc83\ud83d\ude33\u270b\ud83d\ude1a\ud83d\ude1d\ud83d\ude34\ud83c\udf1f\ud83d\ude2c\ud83d\ude43\ud83c\udf40\ud83c\udf37\ud83d\ude3b\ud83d\ude13\u2b50\u2705\ud83e\udd7a\ud83c\udf08\ud83d\ude08\ud83e\udd18\ud83d\udca6\u2714\ud83d\ude23\ud83c\udfc3\ud83d\udc90\u2639\ud83c\udf8a\ud83d\udc98\ud83d\ude20\u261d\ud83d\ude15\ud83c\udf3a\ud83c\udf82\ud83c\udf3b\ud83d\ude10\ud83d\udd95\ud83d\udc9d\ud83d\ude4a\ud83d\ude39\ud83d\udde3\ud83d\udcab\ud83d\udc80\ud83d\udc51\ud83c\udfb5\ud83e\udd1e\ud83d\ude1b\ud83d\udd34\ud83d\ude24\ud83c\udf3c\ud83d\ude2b\u26bd\ud83e\udd19\u2615\ud83c\udfc6\ud83e\udd2b\ud83d\udc48\ud83d\ude2e\ud83d\ude46\ud83c\udf7b\ud83c\udf43\ud83d\udc36\ud83d\udc81\ud83d\ude32\ud83c\udf3f\ud83e\udde1\ud83c\udf81\u26a1\ud83c\udf1e\ud83c\udf88\u274c\u270a\ud83d\udc4b\ud83d\ude30\ud83e\udd28\ud83d\ude36\ud83e\udd1d\ud83d\udeb6\ud83d\udcb0\ud83c\udf53\ud83d\udca2\ud83e\udd1f\ud83d\ude41\ud83d\udea8\ud83d\udca8\ud83e\udd2c\u2708\ud83c\udf80\ud83c\udf7a\ud83e\udd13\ud83d\ude19\ud83d\udc9f\ud83c\udf31\ud83d\ude16\ud83d\udc76\ud83e\udd74\u25b6\u27a1\u2753\ud83d\udc8e\ud83d\udcb8\u2b07\ud83d\ude28\ud83c\udf1a\ud83e\udd8b\ud83d\ude37\ud83d\udd7a\u26a0\ud83d\ude45\ud83d\ude1f\ud83d\ude35\ud83d\udc4e\ud83e\udd32\ud83e\udd20\ud83e\udd27\ud83d\udccc\ud83d\udd35\ud83d\udc85\ud83e\uddd0\ud83d\udc3e\ud83c\udf52\ud83d\ude17\ud83e\udd11\ud83c\udf0a\ud83e\udd2f\ud83d\udc37\u260e\ud83d\udca7\ud83d\ude2f\ud83d\udc86\ud83d\udc46\ud83c\udfa4\ud83d\ude47\ud83c\udf51\u2744\ud83c\udf34\ud83d\udca3\ud83d\udc38\ud83d\udc8c\ud83d\udccd\ud83e\udd40\ud83e\udd22\ud83d\udc45\ud83d\udca1\ud83d\udca9\ud83d\udc50\ud83d\udcf8\ud83d\udc7b\ud83e\udd10\ud83e\udd2e\ud83c\udfbc\ud83e\udd75\ud83d\udea9\ud83c\udf4e\ud83c\udf4a\ud83d\udc7c\ud83d\udc8d\ud83d\udce3\ud83e\udd42"),Go=Wo.reduce(((e,t,r)=>(e[r]=t,e)),[]),Yo=Wo.reduce(((e,t,r)=>(e[t.codePointAt(0)]=r,e)),[]);const Qo=zi({prefix:"\ud83d\ude80",name:"base256emoji",encode:function(e){return e.reduce(((e,t)=>e+=Go[t]),"")},decode:function(e){const t=[];for(const r of e){const e=Yo[r.codePointAt(0)];if(void 0===e)throw new Error("Non-base256emoji character: ".concat(r));t.push(e)}return new Uint8Array(t)}}),Jo=e=>{let{name:t,code:r,encode:n}=e;return new Xo(t,r,n)};class Xo{constructor(e,t,r){this.name=e,this.code=t,this.encode=r}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?co(this.code,t):t.then((e=>co(this.code,e)))}throw Error("Unknown type, must be binary type")}}const $o=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),es=Jo({name:"sha2-256",code:18,encode:$o("SHA-256")}),ts=Jo({name:"sha2-512",code:19,encode:$o("SHA-512")}),rs=Mi,ns={code:0,name:"identity",encode:rs,digest:e=>co(0,rs(e))},is="raw",os=85,ss=e=>Mi(e),as=e=>Mi(e),cs=new TextEncoder,ls=new TextDecoder,us="json",hs=512,ds=e=>cs.encode(JSON.stringify(e)),fs=e=>JSON.parse(ls.decode(e)),ps={...m,...y,...v,...b,...w,...g,...E,...p,...S,..._};function gs(e){return Boolean(function(e){if(!(e.length>15))return Oo.new(e).parseWith((()=>Oo.readIPv4Addr()))}(e))}function ms(e){return Boolean(function(e){if(!(e.length>45))return Oo.new(e).parseWith((()=>Oo.readIPv6Addr()))}(e))}function ys(e){return Boolean(function(e){if(!(e.length>45))return Oo.new(e).parseWith((()=>Oo.readIPAddr()))}(e))}const vs=gs,bs=ms,ws=function(e){let t=0;if(e=e.toString().trim(),vs(e)){const r=new Uint8Array(t+4);return e.split(/\./g).forEach((e=>{r[t++]=255&parseInt(e,10)})),r}if(bs(e)){const r=e.split(":",8);let n;for(n=0;n<r.length;n++){let e;vs(r[n])&&(e=ws(r[n]),r[n]=In(e.slice(0,2),"base16")),null!=e&&++n<8&&r.splice(n,0,In(e.slice(2,4),"base16"))}if(""===r[0])for(;r.length<8;)r.unshift("0");else if(""===r[r.length-1])for(;r.length<8;)r.push("0");else if(r.length<8){for(n=0;n<r.length&&""!==r[n];n++);const e=[n,1];for(n=9-r.length;n>0;n--)e.push("0");r.splice.apply(r,e)}const i=new Uint8Array(t+16);for(n=0;n<r.length;n++){const e=parseInt(r[n],16);i[t++]=e>>8&255,i[t++]=255&e}return i}throw new Error("invalid ip address")},Es=-1,Ss={},_s={};function As(e){if("number"===typeof e){if(null!=_s[e])return _s[e];throw new Error("no protocol with code: ".concat(e))}if("string"===typeof e){if(null!=Ss[e])return Ss[e];throw new Error("no protocol with name: ".concat(e))}throw new Error("invalid protocol id type: ".concat(typeof e))}[[4,32,"ip4"],[6,16,"tcp"],[33,16,"dccp"],[41,128,"ip6"],[42,Es,"ip6zone"],[43,8,"ipcidr"],[53,Es,"dns",!0],[54,Es,"dns4",!0],[55,Es,"dns6",!0],[56,Es,"dnsaddr",!0],[132,16,"sctp"],[273,16,"udp"],[275,0,"p2p-webrtc-star"],[276,0,"p2p-webrtc-direct"],[277,0,"p2p-stardust"],[280,0,"webrtc-direct"],[281,0,"webrtc"],[290,0,"p2p-circuit"],[301,0,"udt"],[302,0,"utp"],[400,Es,"unix",!1,!0],[421,Es,"ipfs"],[421,Es,"p2p"],[443,0,"https"],[444,96,"onion"],[445,296,"onion3"],[446,Es,"garlic64"],[448,0,"tls"],[449,Es,"sni"],[460,0,"quic"],[461,0,"quic-v1"],[465,0,"webtransport"],[466,Es,"certhash"],[477,0,"ws"],[478,0,"wss"],[479,0,"p2p-websocket-star"],[480,0,"http"],[777,Es,"memory"]].forEach((e=>{const t=function(e,t,r,n,i){return{code:e,size:t,name:r,resolvable:Boolean(n),path:Boolean(i)}}(...e);_s[t.code]=t,Ss[t.name]=t}));As("ip4"),As("ip6"),As("ipcidr");function ks(e,t){switch(As(e).code){case 4:case 41:return function(e){const t=function(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0;r=~~r,n=null!==(t=n)&&void 0!==t?t:e.length-r;const i=new DataView(e.buffer);if(4===n){const t=[];for(let i=0;i<n;i++)t.push(e[r+i]);return t.join(".")}if(16===n){const e=[];for(let t=0;t<n;t+=2)e.push(i.getUint16(r+t).toString(16));return e.join(":").replace(/(^|:)0(:0)*:0(:|$)/,"$1::$3").replace(/:{3,4}/,"::")}return""}(e,0,e.length);if(null==t)throw new Error("ipBuff is required");if(!ys(t))throw new Error("invalid ip address");return t}(t);case 42:case 53:case 54:case 55:case 56:case 400:case 449:case 777:return Ds(t);case 6:case 273:case 33:case 132:return Ts(t).toString();case 421:return function(e){const t=Do.decode(e),r=e.slice(Do.decode.bytes);if(r.length!==t)throw new Error("inconsistent lengths");return In(r,"base58btc")}(t);case 444:case 445:return Os(t);case 466:return function(e){const t=Do.decode(e),r=e.slice(Do.decode.bytes);if(r.length!==t)throw new Error("inconsistent lengths");return"u"+In(r,"base64url")}(t);default:return In(t,"base16")}}function Cs(e,t){switch(As(e).code){case 4:case 41:return Rs(t);case 42:case 53:case 54:case 55:case 56:case 400:case 449:case 777:return Ns(t);case 6:case 273:case 33:case 132:return Ps(parseInt(t,10));case 421:return function(e){let t;t="Q"===e[0]||"1"===e[0]?lo(Zi.decode("z".concat(e))).bytes:Ao.parse(e).multihash.bytes;const r=Uint8Array.from(Do.encode(t.length));return No([r,t],r.length+t.length)}(t);case 444:return function(e){const t=e.split(":");if(2!==t.length)throw new Error("failed to parse onion addr: [\"'".concat(t.join('", "'),"'\"]' does not contain a port number"));if(16!==t[0].length)throw new Error("failed to parse onion addr: ".concat(t[0]," not a Tor onion address."));const r=ho.decode("b"+t[0]),n=parseInt(t[1],10);if(n<1||n>65536)throw new Error("Port number is not in range(1, 65536)");const i=Ps(n);return No([r,i],r.length+i.length)}(t);case 445:return function(e){const t=e.split(":");if(2!==t.length)throw new Error("failed to parse onion addr: [\"'".concat(t.join('", "'),"'\"]' does not contain a port number"));if(56!==t[0].length)throw new Error("failed to parse onion addr: ".concat(t[0]," not a Tor onion3 address."));const r=ho.decode("b".concat(t[0])),n=parseInt(t[1],10);if(n<1||n>65536)throw new Error("Port number is not in range(1, 65536)");const i=Ps(n);return No([r,i],r.length+i.length)}(t);case 466:return function(e){const t=Is.decode(e),r=Uint8Array.from(Do.encode(t.length));return No([r,t],r.length+t.length)}(t);default:return xn(t,"base16")}}const xs=Object.values(ps).map((e=>e.decoder)),Is=function(){let e=xs[0].or(xs[1]);return xs.slice(2).forEach((t=>e=e.or(t))),e}();function Rs(e){if(!ys(e))throw new Error("invalid ip address");return ws(e)}function Ps(e){const t=new ArrayBuffer(2);return new DataView(t).setUint16(0,e),new Uint8Array(t)}function Ts(e){return new DataView(e.buffer).getUint16(e.byteOffset)}function Ns(e){const t=xn(e),r=Uint8Array.from(Do.encode(t.length));return No([r,t],r.length+t.length)}function Ds(e){const t=Do.decode(e);if((e=e.slice(Do.decode.bytes)).length!==t)throw new Error("inconsistent lengths");return In(e)}function Os(e){const t=e.slice(0,e.length-2),r=e.slice(e.length-2),n=In(t,"base32"),i=Ts(r);return"".concat(n,":").concat(i)}function Ms(e){const t=[],r=[];let n=null,i=0;for(;i<e.length;){var o;const s=Do.decode(e,i),a=null!==(o=Do.decode.bytes)&&void 0!==o?o:0,c=As(s),l=Us(c,e.slice(i+a));if(0===l){t.push([s]),r.push([s]),i+=a;continue}const u=e.slice(i+a,i+a+l);if(i+=l+a,i>e.length)throw js("Invalid address Uint8Array: "+In(e,"base16"));t.push([s,u]);const h=ks(s,u);if(r.push([s,h]),!0===c.path){n=h;break}}return{bytes:Uint8Array.from(e),string:Bs(r),tuples:t,stringTuples:r,path:n}}function Bs(e){const t=[];return e.map((e=>{const r=As(e[0]);return t.push(r.name),e.length>1&&null!=e[1]&&t.push(e[1]),null})),Fs(t.join("/"))}function Ls(e){return No(e.map((e=>{const t=As(e[0]);let r=Uint8Array.from(Do.encode(t.code));return e.length>1&&null!=e[1]&&(r=No([r,e[1]])),r})))}function Us(e,t){if(e.size>0)return e.size/8;if(0===e.size)return 0;var r;return Do.decode(t)+(null!==(r=Do.decode.bytes)&&void 0!==r?r:0)}function Fs(e){return"/"+e.trim().split("/").filter((e=>e)).join("/")}function js(e){return new Error("Error parsing address: "+e)}const zs=Symbol.for("nodejs.util.inspect.custom"),Ks=[As("dns").code,As("dns4").code,As("dns6").code,As("dnsaddr").code],qs=new Map,Zs=Symbol.for("@multiformats/js-multiaddr/multiaddr");function Vs(e){return Boolean(null===e||void 0===e?void 0:e[Zs])}var Hs,Ws=new WeakMap,Gs=new WeakMap,Ys=new WeakMap,Qs=new WeakMap;class Js{constructor(e){let t;if((0,W.Z)(this,"bytes",void 0),Ai(this,Ws,{writable:!0,value:void 0}),Ai(this,Gs,{writable:!0,value:void 0}),Ai(this,Ys,{writable:!0,value:void 0}),Ai(this,Qs,{writable:!0,value:void 0}),(0,W.Z)(this,Zs,!0),null==e&&(e=""),e instanceof Uint8Array)t=Ms(e);else if("string"===typeof e){if(e.length>0&&"/"!==e.charAt(0))throw new Error('multiaddr "'.concat(e,'" must start with a "/"'));t=function(e){const t=[],r=[];let n=null;const i=(e=Fs(e)).split("/").slice(1);if(1===i.length&&""===i[0])return{bytes:new Uint8Array,string:"/",tuples:[],stringTuples:[],path:null};for(let o=0;o<i.length;o++){const s=As(i[o]);if(0===s.size){t.push([s.code]),r.push([s.code]);continue}if(o++,o>=i.length)throw js("invalid address: "+e);if(!0===s.path){n=Fs(i.slice(o).join("/")),t.push([s.code,Cs(s.code,n)]),r.push([s.code,n]);break}const a=Cs(s.code,i[o]);t.push([s.code,a]),r.push([s.code,ks(s.code,a)])}return{string:Bs(r),bytes:Ls(t),tuples:t,stringTuples:r,path:n}}(e)}else{if(!Vs(e))throw new Error("addr must be a string, Buffer, or another Multiaddr");t=Ms(e.bytes)}this.bytes=t.bytes,xi(this,Ws,t.string),xi(this,Gs,t.tuples),xi(this,Ys,t.stringTuples),xi(this,Qs,t.path)}toString(){return Ci(this,Ws)}toJSON(){return this.toString()}toOptions(){let e,t,r,n,i="";const o=As("tcp"),s=As("udp"),a=As("ip4"),c=As("ip6"),l=As("dns6"),u=As("ip6zone");for(const[h,d]of this.stringTuples())h===u.code&&(i="%".concat(null!==d&&void 0!==d?d:"")),Ks.includes(h)&&(t=o.name,n=443,r="".concat(null!==d&&void 0!==d?d:"").concat(i),e=h===l.code?6:4),h!==o.code&&h!==s.code||(t=As(h).name,n=parseInt(null!==d&&void 0!==d?d:"")),h!==a.code&&h!==c.code||(t=As(h).name,r="".concat(null!==d&&void 0!==d?d:"").concat(i),e=h===c.code?6:4);if(null==e||null==t||null==r||null==n)throw new Error('multiaddr must have a valid format: "/{ip4, ip6, dns4, dns6, dnsaddr}/{address}/{tcp, udp}/{port}".');return{family:e,host:r,transport:t,port:n}}protos(){return Ci(this,Gs).map((e=>{let[t]=e;return Object.assign({},As(t))}))}protoCodes(){return Ci(this,Gs).map((e=>{let[t]=e;return t}))}protoNames(){return Ci(this,Gs).map((e=>{let[t]=e;return As(t).name}))}tuples(){return Ci(this,Gs)}stringTuples(){return Ci(this,Ys)}encapsulate(e){return e=new Js(e),new Js(this.toString()+e.toString())}decapsulate(e){const t=e.toString(),r=this.toString(),n=r.lastIndexOf(t);if(n<0)throw new Error("Address ".concat(this.toString()," does not contain subaddress: ").concat(e.toString()));return new Js(r.slice(0,n))}decapsulateCode(e){const t=this.tuples();for(let r=t.length-1;r>=0;r--)if(t[r][0]===e)return new Js(Ls(t.slice(0,r)));return this}getPeerId(){try{let e=[];this.stringTuples().forEach((t=>{let[r,n]=t;r===Ss.p2p.code&&e.push([r,n]),r===Ss["p2p-circuit"].code&&(e=[])}));const t=e.pop();if(null!=(null===t||void 0===t?void 0:t[1])){const e=t[1];return"Q"===e[0]||"1"===e[0]?In(Zi.decode("z".concat(e)),"base58btc"):In(Ao.parse(e).multihash.bytes,"base58btc")}return null}catch(e){return null}}getPath(){return Ci(this,Qs)}equals(e){return wi(this.bytes,e.bytes)}async resolve(e){const t=this.protos().find((e=>e.resolvable));if(null==t)return[this];const r=qs.get(t.name);if(null==r)throw new Ri("no available resolver for ".concat(t.name),"ERR_NO_AVAILABLE_RESOLVER");return(await r(this,e)).map((e=>new Js(e)))}nodeAddress(){const e=this.toOptions();if("tcp"!==e.transport&&"udp"!==e.transport)throw new Error('multiaddr must have a valid format - no protocol with name: "'.concat(e.transport,'". Must have a valid transport protocol: "{tcp, udp}"'));return{family:e.family,address:e.host,port:e.port}}isThinWaistAddress(e){const t=(null!==e&&void 0!==e?e:this).protos();return 2===t.length&&((4===t[0].code||41===t[0].code)&&(6===t[1].code||273===t[1].code))}[zs](){return"Multiaddr(".concat(Ci(this,Ws),")")}}function Xs(e){return new Js(e)}var $s=new WeakMap;class ea extends EventTarget{constructor(){super(...arguments),Ai(this,$s,{writable:!0,value:new Map})}listenerCount(e){const t=Ci(this,$s).get(e);return null==t?0:t.length}addEventListener(e,t,r){var n;super.addEventListener(e,t,r);let i=Ci(this,$s).get(e);null==i&&(i=[],Ci(this,$s).set(e,i)),i.push({callback:t,once:null!==(n=!0!==r&&!1!==r&&(null===r||void 0===r?void 0:r.once))&&void 0!==n&&n})}removeEventListener(e,t,r){super.removeEventListener(e.toString(),null!==t&&void 0!==t?t:null,r);let n=Ci(this,$s).get(e);null!=n&&(n=n.filter((e=>{let{callback:r}=e;return r!==t})),Ci(this,$s).set(e,n))}dispatchEvent(e){const t=super.dispatchEvent(e);let r=Ci(this,$s).get(e.type);return null==r||(r=r.filter((e=>{let{once:t}=e;return!t})),Ci(this,$s).set(e.type,r)),t}safeDispatchEvent(e,t){return this.dispatchEvent(new ra(e,t))}}class ta extends Event{constructor(e,t){super(e,t),(0,W.Z)(this,"detail",void 0),this.detail=null===t||void 0===t?void 0:t.detail}}const ra=null!==(Hs=globalThis.CustomEvent)&&void 0!==Hs?Hs:ta,na=Ue("waku:keep-alive");class ia{constructor(e,t){(0,W.Z)(this,"pingKeepAliveTimers",void 0),(0,W.Z)(this,"relayKeepAliveTimers",void 0),(0,W.Z)(this,"options",void 0),(0,W.Z)(this,"relay",void 0),this.pingKeepAliveTimers=new Map,this.relayKeepAliveTimers=new Map,this.options=e,this.relay=t}start(e,t){this.stop(e);const{pingKeepAlive:r,relayKeepAlive:n}=this.options,i=e.toString();if(0!==r){const n=setInterval((()=>{t.ping(e).catch((e=>{na("Ping failed (".concat(i,")"),e)}))}),1e3*r);this.pingKeepAliveTimers.set(i,n)}const o=this.relay;if(o&&0!==n){const t=function(e){let{contentTopic:t,ephemeral:r,metaSetter:n}=e;return new Ke(t,r,n)}({contentTopic:"/relay-ping/1/ping/null",ephemeral:!0}),r=setInterval((()=>{na("Sending Waku Relay ping message"),o.send(t,{payload:new Uint8Array([1])}).catch((e=>na("Failed to send relay ping",e)))}),1e3*n);this.relayKeepAliveTimers.set(e,r)}}stop(e){const t=e.toString();this.pingKeepAliveTimers.has(t)&&(clearInterval(this.pingKeepAliveTimers.get(t)),this.pingKeepAliveTimers.delete(t)),this.relayKeepAliveTimers.has(e)&&(clearInterval(this.relayKeepAliveTimers.get(e)),this.relayKeepAliveTimers.delete(e))}stopAll(){for(const e of[...Object.values(this.pingKeepAliveTimers),...Object.values(this.relayKeepAliveTimers)])clearInterval(e);this.pingKeepAliveTimers.clear(),this.relayKeepAliveTimers.clear()}}const oa=Ue("waku:connection-manager");class sa extends ea{static create(e,t,r,n,i){let o=sa.instances.get(e);return o||(o=new sa(t,r,n,i),sa.instances.set(e,o)),o}async getPeersByDiscovery(){const e=await this.libp2p.peerStore.all(),t=this.libp2p.getConnections().map((e=>e.remotePeer)),r=[],n=[],i=[],o=[];for(const s of e){const e=await this.getTagNamesForPeer(s.id);e.includes(vi.BOOTSTRAP)?r.push(s):e.includes(vi.PEER_EXCHANGE)&&n.push(s)}for(const s of t){const e=await this.libp2p.peerStore.get(s),t=await this.getTagNamesForPeer(s);t.includes(vi.BOOTSTRAP)?i.push(e):t.includes(vi.PEER_EXCHANGE)&&o.push(e)}return{DISCOVERED:{[vi.BOOTSTRAP]:r,[vi.PEER_EXCHANGE]:n},CONNECTED:{[vi.BOOTSTRAP]:i,[vi.PEER_EXCHANGE]:o}}}constructor(e,t,r,n){super(),(0,W.Z)(this,"keepAliveManager",void 0),(0,W.Z)(this,"options",void 0),(0,W.Z)(this,"libp2p",void 0),(0,W.Z)(this,"dialAttemptsForPeer",new Map),(0,W.Z)(this,"dialErrorsForPeer",new Map),(0,W.Z)(this,"currentActiveDialCount",0),(0,W.Z)(this,"pendingPeerDialQueue",[]),(0,W.Z)(this,"onEventHandlers",{"peer:discovery":e=>{(async()=>{const{id:t}=e.detail,r=(await this.getTagNamesForPeer(t)).includes(vi.BOOTSTRAP);this.dispatchEvent(new ra(r?bi.PEER_DISCOVERY_BOOTSTRAP:bi.PEER_DISCOVERY_PEER_EXCHANGE,{detail:t}));try{await this.attemptDial(t)}catch(n){oa("Error dialing peer ".concat(t.toString()," : ").concat(n))}})()},"peer:connect":e=>{(async()=>{const t=e.detail;this.keepAliveManager.start(t,this.libp2p.services.ping);if((await this.getTagNamesForPeer(t)).includes(vi.BOOTSTRAP)){this.libp2p.getConnections().filter((e=>e.tags.includes(vi.BOOTSTRAP))).length>this.options.maxBootstrapPeersAllowed?await this.dropConnection(t):this.dispatchEvent(new ra(bi.PEER_CONNECT_BOOTSTRAP,{detail:t}))}else this.dispatchEvent(new ra(bi.PEER_CONNECT_PEER_EXCHANGE,{detail:t}))})()},"peer:disconnect":()=>e=>{this.keepAliveManager.stop(e.detail)}}),this.libp2p=e,this.options={maxDialAttemptsForPeer:3,maxBootstrapPeersAllowed:1,maxParallelDials:3,...n},this.keepAliveManager=new ia(t,r),this.run().then((()=>oa("Connection Manager is now running"))).catch((e=>oa("Unexpected error while running service",e))),this.dialPeerStorePeers().catch((e=>oa("Unexpected error while dialing peer store peers",e)))}async dialPeerStorePeers(){const e=await this.libp2p.peerStore.all(),t=[];for(const n of e)this.libp2p.getConnections().find((e=>e.remotePeer===n.id))||t.push(this.attemptDial(n.id));try{await Promise.all(t)}catch(r){oa("Unexpected error while dialing peer store peers",r)}}async run(){this.startPeerDiscoveryListener(),this.startPeerConnectionListener(),this.startPeerDisconnectionListener()}stop(){this.keepAliveManager.stopAll(),this.libp2p.removeEventListener("peer:connect",this.onEventHandlers["peer:connect"]),this.libp2p.removeEventListener("peer:disconnect",this.onEventHandlers["peer:disconnect"]),this.libp2p.removeEventListener("peer:discovery",this.onEventHandlers["peer:discovery"])}async dialPeer(e){this.currentActiveDialCount+=1;let t=0;for(;t<this.options.maxDialAttemptsForPeer;)try{oa("Dialing peer ".concat(e.toString()," on attempt ").concat(t+1)),await this.libp2p.dial(e);const r=await this.getTagNamesForPeer(e);this.libp2p.getConnections(e).forEach((e=>{e.tags=Array.from(new Set([...e.tags,...r]))})),this.dialAttemptsForPeer.delete(e.toString());break}catch(r){r instanceof AggregateError?oa("Error dialing peer ".concat(e.toString()," - ").concat(r.errors)):oa("Error dialing peer ".concat(e.toString()," - ").concat(r.message)),this.dialErrorsForPeer.set(e.toString(),r),t++,this.dialAttemptsForPeer.set(e.toString(),t)}if(this.currentActiveDialCount--,this.processDialQueue(),t===this.options.maxDialAttemptsForPeer)try{const t=this.dialErrorsForPeer.get(e.toString());let r;r=t instanceof AggregateError?JSON.stringify(t.errors[0]):t.message,oa("Deleting undialable peer ".concat(e.toString()," from peer store. Error: ").concat(r)),this.dialErrorsForPeer.delete(e.toString()),await this.libp2p.peerStore.delete(e)}catch(r){throw new Error("Error deleting undialable peer ".concat(e.toString()," from peer store - ").concat(r))}}async dropConnection(e){try{this.keepAliveManager.stop(e),await this.libp2p.hangUp(e),oa("Dropped connection with peer ".concat(e.toString()))}catch(t){oa("Error dropping connection with peer ".concat(e.toString()," - ").concat(t))}}processDialQueue(){if(this.pendingPeerDialQueue.length>0&&this.currentActiveDialCount<this.options.maxParallelDials){const e=this.pendingPeerDialQueue.shift();if(!e)return;this.attemptDial(e).catch((e=>{oa(e)}))}}startPeerDiscoveryListener(){this.libp2p.addEventListener("peer:discovery",this.onEventHandlers["peer:discovery"])}startPeerConnectionListener(){this.libp2p.addEventListener("peer:connect",this.onEventHandlers["peer:connect"])}startPeerDisconnectionListener(){this.libp2p.addEventListener("peer:disconnect",this.onEventHandlers["peer:disconnect"])}async attemptDial(e){this.currentActiveDialCount>=this.options.maxParallelDials?this.pendingPeerDialQueue.push(e):await this.shouldDialPeer(e)&&this.dialPeer(e).catch((t=>{throw"Error dialing peer ".concat(e.toString()," : ").concat(t)}))}async shouldDialPeer(e){if(this.libp2p.getConnections(e).length>0)return!1;if(!(await this.getTagNamesForPeer(e)).some((e=>e===vi.BOOTSTRAP)))return!0;if(this.libp2p.getConnections().filter((e=>e.tags.find((e=>e===vi.BOOTSTRAP)))).length<this.options.maxBootstrapPeersAllowed)return!0;return!1}async getTagNamesForPeer(e){try{const t=await this.libp2p.peerStore.get(e);return Array.from(t.tags.keys())}catch(t){return oa("Failed to get peer ".concat(e,", error: ").concat(t)),[]}}}(0,W.Z)(sa,"instances",new Map);const aa=Ue("waku:waku");class ca{constructor(e,t,r,n,i,o){(0,W.Z)(this,"libp2p",void 0),(0,W.Z)(this,"relay",void 0),(0,W.Z)(this,"store",void 0),(0,W.Z)(this,"filter",void 0),(0,W.Z)(this,"lightPush",void 0),(0,W.Z)(this,"connectionManager",void 0),this.libp2p=t,r&&(this.store=r(t)),i&&(this.filter=i(t)),n&&(this.lightPush=n(t)),o&&(this.relay=o(t));const s=e.pingKeepAlive||0,a=this.relay?e.relayKeepAlive||300:0,c=this.libp2p.peerId.toString();this.connectionManager=sa.create(c,t,{pingKeepAlive:s,relayKeepAlive:a},this.relay),aa("Waku node created",c,"relay: ".concat(!!this.relay,", store: ").concat(!!this.store,", light push: ").concat(!!this.lightPush,", filter: ").concat(!!this.filter))}async dial(e,t){const r=null!==t&&void 0!==t?t:[],n=function(e){return Si(e)?e:Xs(e)}(e);"undefined"===typeof t&&(this.relay&&r.push(gi.Relay),this.store&&r.push(gi.Store),this.filter&&r.push(gi.Filter),this.lightPush&&r.push(gi.LightPush));const i=[];return r.includes(gi.Relay)&&(this.relay?this.relay.gossipSub.multicodecs.forEach((e=>i.push(e))):aa("Relay codec not included in dial codec: protocol not mounted locally")),r.includes(gi.Store)&&(this.store?i.push(this.store.multicodec):aa("Store codec not included in dial codec: protocol not mounted locally")),r.includes(gi.LightPush)&&(this.lightPush?i.push(this.lightPush.multicodec):aa("Light Push codec not included in dial codec: protocol not mounted locally")),r.includes(gi.Filter)&&(this.filter?i.push(this.filter.multicodec):aa("Filter codec not included in dial codec: protocol not mounted locally")),aa("Dialing to ".concat(n.toString()," with protocols ").concat(r)),this.libp2p.dialProtocol(n,i)}async start(){await this.libp2p.start()}async stop(){this.connectionManager.stop(),await this.libp2p.stop()}isStarted(){return this.libp2p.isStarted()}getLocalMultiaddrWithID(){const e=this.libp2p.getMultiaddrs().find((e=>e.toString().match(/127\.0\.0\.1/)));if(!e||""===e.toString())throw"Not listening on localhost";return e+"/p2p/"+this.libp2p.peerId.toString()}}const la=Symbol.for("@achingbrain/uint8arraylist");function ua(e,t){if(null==t||t<0)throw new RangeError("index is out of bounds");let r=0;for(const n of e){const e=r+n.byteLength;if(t<e)return{buf:n,index:t-r};r=e}throw new RangeError("index is out of bounds")}function ha(e){return Boolean(null===e||void 0===e?void 0:e[la])}class da{constructor(){Object.defineProperty(this,la,{value:!0}),this.bufs=[],this.length=0;for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];t.length>0&&this.appendAll(t)}*[Symbol.iterator](){yield*this.bufs}get byteLength(){return this.length}append(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];this.appendAll(t)}appendAll(e){let t=0;for(const r of e)if(r instanceof Uint8Array)t+=r.byteLength,this.bufs.push(r);else{if(!ha(r))throw new Error("Could not append value, must be an Uint8Array or a Uint8ArrayList");t+=r.byteLength,this.bufs.push(...r.bufs)}this.length+=t}prepend(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];this.prependAll(t)}prependAll(e){let t=0;for(const r of e.reverse())if(r instanceof Uint8Array)t+=r.byteLength,this.bufs.unshift(r);else{if(!ha(r))throw new Error("Could not prepend value, must be an Uint8Array or a Uint8ArrayList");t+=r.byteLength,this.bufs.unshift(...r.bufs)}this.length+=t}get(e){const t=ua(this.bufs,e);return t.buf[t.index]}set(e,t){const r=ua(this.bufs,e);r.buf[r.index]=t}write(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(e instanceof Uint8Array)for(let r=0;r<e.length;r++)this.set(t+r,e[r]);else{if(!ha(e))throw new Error("Could not write value, must be an Uint8Array or a Uint8ArrayList");for(let r=0;r<e.length;r++)this.set(t+r,e.get(r))}}consume(e){if(e=Math.trunc(e),!(Number.isNaN(e)||e<=0)){if(e===this.byteLength)return this.bufs=[],void(this.length=0);for(;this.bufs.length>0;){if(!(e>=this.bufs[0].byteLength)){this.bufs[0]=this.bufs[0].subarray(e),this.length-=e;break}e-=this.bufs[0].byteLength,this.length-=this.bufs[0].byteLength,this.bufs.shift()}}}slice(e,t){const{bufs:r,length:n}=this._subList(e,t);return No(r,n)}subarray(e,t){const{bufs:r,length:n}=this._subList(e,t);return 1===r.length?r[0]:No(r,n)}sublist(e,t){const{bufs:r,length:n}=this._subList(e,t),i=new da;return i.length=n,i.bufs=r,i}_subList(e,t){var r,n;if(e=null!==(r=e)&&void 0!==r?r:0,t=null!==(n=t)&&void 0!==n?n:this.length,e<0&&(e=this.length+e),t<0&&(t=this.length+t),e<0||t>this.length)throw new RangeError("index is out of bounds");if(e===t)return{bufs:[],length:0};if(0===e&&t===this.length)return{bufs:[...this.bufs],length:this.length};const i=[];let o=0;for(let s=0;s<this.bufs.length;s++){const r=this.bufs[s],n=o,a=n+r.byteLength;if(o=a,e>=a)continue;const c=e>=n&&e<a,l=t>n&&t<=a;if(c&&l){if(e===n&&t===a){i.push(r);break}const o=e-n;i.push(r.subarray(o,o+(t-e)));break}if(c){if(0===e){i.push(r);continue}i.push(r.subarray(e-n))}else{if(l){if(t===a){i.push(r);break}i.push(r.subarray(0,t-n));break}i.push(r)}}return{bufs:i,length:t-e}}indexOf(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!ha(e)&&!(e instanceof Uint8Array))throw new TypeError('The "value" argument must be a Uint8ArrayList or Uint8Array');const n=e instanceof Uint8Array?e:e.subarray();if(r=Number(null!==(t=r)&&void 0!==t?t:0),isNaN(r)&&(r=0),r<0&&(r=this.length+r),r<0&&(r=0),0===e.length)return r>this.length?this.length:r;const i=n.byteLength;if(0===i)throw new TypeError("search must be at least 1 byte long");const o=new Int32Array(256);for(let u=0;u<256;u++)o[u]=-1;for(let u=0;u<i;u++)o[n[u]]=u;const s=o,a=this.byteLength-n.byteLength,c=n.byteLength-1;let l;for(let u=r;u<=a;u+=l){l=0;for(let e=c;e>=0;e--){const t=this.get(u+e);if(n[e]!==t){l=Math.max(1,e-s[t]);break}}if(0===l)return u}return-1}getInt8(e){const t=this.subarray(e,e+1);return new DataView(t.buffer,t.byteOffset,t.byteLength).getInt8(0)}setInt8(e,t){const r=Sn(1);new DataView(r.buffer,r.byteOffset,r.byteLength).setInt8(0,t),this.write(r,e)}getInt16(e,t){const r=this.subarray(e,e+2);return new DataView(r.buffer,r.byteOffset,r.byteLength).getInt16(0,t)}setInt16(e,t,r){const n=En(2);new DataView(n.buffer,n.byteOffset,n.byteLength).setInt16(0,t,r),this.write(n,e)}getInt32(e,t){const r=this.subarray(e,e+4);return new DataView(r.buffer,r.byteOffset,r.byteLength).getInt32(0,t)}setInt32(e,t,r){const n=En(4);new DataView(n.buffer,n.byteOffset,n.byteLength).setInt32(0,t,r),this.write(n,e)}getBigInt64(e,t){const r=this.subarray(e,e+8);return new DataView(r.buffer,r.byteOffset,r.byteLength).getBigInt64(0,t)}setBigInt64(e,t,r){const n=En(8);new DataView(n.buffer,n.byteOffset,n.byteLength).setBigInt64(0,t,r),this.write(n,e)}getUint8(e){const t=this.subarray(e,e+1);return new DataView(t.buffer,t.byteOffset,t.byteLength).getUint8(0)}setUint8(e,t){const r=Sn(1);new DataView(r.buffer,r.byteOffset,r.byteLength).setUint8(0,t),this.write(r,e)}getUint16(e,t){const r=this.subarray(e,e+2);return new DataView(r.buffer,r.byteOffset,r.byteLength).getUint16(0,t)}setUint16(e,t,r){const n=En(2);new DataView(n.buffer,n.byteOffset,n.byteLength).setUint16(0,t,r),this.write(n,e)}getUint32(e,t){const r=this.subarray(e,e+4);return new DataView(r.buffer,r.byteOffset,r.byteLength).getUint32(0,t)}setUint32(e,t,r){const n=En(4);new DataView(n.buffer,n.byteOffset,n.byteLength).setUint32(0,t,r),this.write(n,e)}getBigUint64(e,t){const r=this.subarray(e,e+8);return new DataView(r.buffer,r.byteOffset,r.byteLength).getBigUint64(0,t)}setBigUint64(e,t,r){const n=En(8);new DataView(n.buffer,n.byteOffset,n.byteLength).setBigUint64(0,t,r),this.write(n,e)}getFloat32(e,t){const r=this.subarray(e,e+4);return new DataView(r.buffer,r.byteOffset,r.byteLength).getFloat32(0,t)}setFloat32(e,t,r){const n=En(4);new DataView(n.buffer,n.byteOffset,n.byteLength).setFloat32(0,t,r),this.write(n,e)}getFloat64(e,t){const r=this.subarray(e,e+8);return new DataView(r.buffer,r.byteOffset,r.byteLength).getFloat64(0,t)}setFloat64(e,t,r){const n=En(8);new DataView(n.buffer,n.byteOffset,n.byteLength).setFloat64(0,t,r),this.write(n,e)}equals(e){if(null==e)return!1;if(!(e instanceof da))return!1;if(e.bufs.length!==this.bufs.length)return!1;for(let t=0;t<this.bufs.length;t++)if(!wi(this.bufs[t],e.bufs[t]))return!1;return!0}static fromUint8Arrays(e,t){const r=new da;return r.bufs=e,null==t&&(t=e.reduce(((e,t)=>e+t.byteLength),0)),r.length=t,r}}function fa(e){return e instanceof Uint8Array?{get:t=>e[t],set(t,r){e[t]=r}}:{get:t=>e.get(t),set(t,r){e.set(t,r)}}}const pa=4294967296;class ga{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.hi=e,this.lo=t}toBigInt(e){if(!0===e)return BigInt(this.lo>>>0)+(BigInt(this.hi>>>0)<<32n);if(this.hi>>>31!==0){const e=1+~this.lo>>>0;let t=~this.hi>>>0;return 0===e&&(t=t+1>>>0),-(BigInt(e)+(BigInt(t)<<32n))}return BigInt(this.lo>>>0)+(BigInt(this.hi>>>0)<<32n)}toNumber(e){return Number(this.toBigInt(e))}zzDecode(){const e=-(1&this.lo),t=((this.lo>>>1|this.hi<<31)^e)>>>0,r=(this.hi>>>1^e)>>>0;return new ga(r,t)}zzEncode(){const e=this.hi>>31,t=((this.hi<<1|this.lo>>>31)^e)>>>0,r=(this.lo<<1^e)>>>0;return new ga(t,r)}toBytes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const r=fa(e);for(;this.hi>0;)r.set(t++,127&this.lo|128),this.lo=(this.lo>>>7|this.hi<<25)>>>0,this.hi>>>=7;for(;this.lo>127;)r.set(t++,127&this.lo|128),this.lo=this.lo>>>7;r.set(t++,this.lo)}static fromBigInt(e){if(0n===e)return new ga;const t=e<0;t&&(e=-e);let r=0|Number(e>>32n),n=0|Number(e-(BigInt(r)<<32n));return t&&(r=~r>>>0,n=~n>>>0,++n>pa&&(n=0,++r>pa&&(r=0))),new ga(r,n)}static fromNumber(e){if(0===e)return new ga;const t=e<0;t&&(e=-e);let r=e>>>0,n=(e-r)/4294967296>>>0;return t&&(n=~n>>>0,r=~r>>>0,++r>4294967295&&(r=0,++n>4294967295&&(n=0))),new ga(n,r)}static fromBytes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const r=fa(e),n=new ga;let i=0;if(e.length-t>4){for(;i<4;++i)if(n.lo=(n.lo|(127&r.get(t))<<7*i)>>>0,r.get(t++)<128)return n;if(n.lo=(n.lo|(127&r.get(t))<<28)>>>0,n.hi=(n.hi|(127&r.get(t))>>4)>>>0,r.get(t++)<128)return n;i=0}else for(;i<4;++i){if(t>=e.length)throw RangeError("index out of range: ".concat(t," > ").concat(e.length));if(n.lo=(n.lo|(127&r.get(t))<<7*i)>>>0,r.get(t++)<128)return n}if(e.length-t>4){for(;i<5;++i)if(n.hi=(n.hi|(127&r.get(t))<<7*i+3)>>>0,r.get(t++)<128)return n}else if(t<e.byteLength)for(;i<5;++i){if(t>=e.length)throw RangeError("index out of range: ".concat(t," > ").concat(e.length));if(n.hi=(n.hi|(127&r.get(t))<<7*i+3)>>>0,r.get(t++)<128)return n}throw RangeError("invalid varint encoding")}}const ma=Math.pow(2,7),ya=Math.pow(2,14),va=Math.pow(2,21),ba=Math.pow(2,28),wa=Math.pow(2,35),Ea=Math.pow(2,42),Sa=Math.pow(2,49),_a=Math.pow(2,56),Aa=Math.pow(2,63),ka={encodingLength:e=>e<ma?1:e<ya?2:e<va?3:e<ba?4:e<wa?5:e<Ea?6:e<Sa?7:e<_a?8:e<Aa?9:10,encode(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(null!=Number.MAX_SAFE_INTEGER&&e>Number.MAX_SAFE_INTEGER)throw new RangeError("Could not encode varint");return null==t&&(t=Sn(ka.encodingLength(e))),ga.fromNumber(e).toBytes(t,r),t},decode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return ga.fromBytes(e,t).toNumber(!0)}};function Ca(e){return null!=e[Symbol.asyncIterator]}const xa=e=>{const t=ka.encodingLength(e),r=Sn(t);return ka.encode(e,r),xa.bytes=t,r};function Ia(e,t){var r,n;const i=null!==(n=(t=null!==(r=t)&&void 0!==r?r:{}).lengthEncoder)&&void 0!==n?n:xa;function*o(e){const t=i(e.byteLength);t instanceof Uint8Array?yield t:yield*t,e instanceof Uint8Array?yield e:yield*e}return Ca(e)?async function*(){for await(const t of e)yield*o(t)}():function*(){for(const t of e)yield*o(t)}()}xa.bytes=0,Ia.single=(e,t)=>{var r,n;const i=null!==(n=(t=null!==(r=t)&&void 0!==r?r:{}).lengthEncoder)&&void 0!==n?n:xa;return new da(i(e.byteLength),e)};var Ra=__webpack_require__(1425);var Pa;!function(e){e[e.LENGTH=0]="LENGTH",e[e.DATA=1]="DATA"}(Pa||(Pa={}));const Ta=e=>{const t=ka.decode(e);return Ta.bytes=ka.encodingLength(t),t};function Na(e,t){var r,n,i;const o=new da;let s=Pa.LENGTH,a=-1;const c=null!==(r=null===t||void 0===t?void 0:t.lengthDecoder)&&void 0!==r?r:Ta,l=null!==(n=null===t||void 0===t?void 0:t.maxLengthLength)&&void 0!==n?n:8,u=null!==(i=null===t||void 0===t?void 0:t.maxDataLength)&&void 0!==i?i:4194304;function*h(){for(;o.byteLength>0;){if(s===Pa.LENGTH)try{if(a=c(o),a<0)throw Ra(new Error("invalid message length"),"ERR_INVALID_MSG_LENGTH");if(a>u)throw Ra(new Error("message length too long"),"ERR_MSG_DATA_TOO_LONG");const e=c.bytes;o.consume(e),null!=(null===t||void 0===t?void 0:t.onLength)&&t.onLength(a),s=Pa.DATA}catch(e){if(e instanceof RangeError){if(o.byteLength>l)throw Ra(new Error("message length length too long"),"ERR_MSG_LENGTH_TOO_LONG");break}throw e}if(s===Pa.DATA){if(o.byteLength<a)break;const e=o.sublist(0,a);o.consume(a),null!=(null===t||void 0===t?void 0:t.onData)&&t.onData(e),yield e,s=Pa.LENGTH}}}return Ca(e)?async function*(){for await(const t of e)o.append(t),yield*h();if(o.byteLength>0)throw Ra(new Error("unexpected end of input"),"ERR_UNEXPECTED_EOF")}():function*(){for(const t of e)o.append(t),yield*h();if(o.byteLength>0)throw Ra(new Error("unexpected end of input"),"ERR_UNEXPECTED_EOF")}()}function Da(){const e={};return e.promise=new Promise(((t,r)=>{e.resolve=t,e.reject=r})),e}Ta.bytes=0,Na.fromReader=(e,t)=>{let r=1;return Na(async function*(){for(;;)try{const{done:t,value:n}=await e.next(r);if(!0===t)return;null!=n&&(yield n)}catch(t){if("ERR_UNDER_READ"===t.code)return{done:!0,value:null};throw t}finally{r=1}}(),{...null!==t&&void 0!==t?t:{},onLength:e=>{r=e}})};class Oa{constructor(e){if((0,W.Z)(this,"buffer",void 0),(0,W.Z)(this,"mask",void 0),(0,W.Z)(this,"top",void 0),(0,W.Z)(this,"btm",void 0),(0,W.Z)(this,"next",void 0),!(e>0)||0!==(e-1&e))throw new Error("Max size for a FixedFIFO should be a power of two");this.buffer=new Array(e),this.mask=e-1,this.top=0,this.btm=0,this.next=null}push(e){return void 0===this.buffer[this.top]&&(this.buffer[this.top]=e,this.top=this.top+1&this.mask,!0)}shift(){const e=this.buffer[this.btm];if(void 0!==e)return this.buffer[this.btm]=void 0,this.btm=this.btm+1&this.mask,e}isEmpty(){return void 0===this.buffer[this.btm]}}class Ma{constructor(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,W.Z)(this,"size",void 0),(0,W.Z)(this,"hwm",void 0),(0,W.Z)(this,"head",void 0),(0,W.Z)(this,"tail",void 0),this.hwm=null!==(e=t.splitLimit)&&void 0!==e?e:16,this.head=new Oa(this.hwm),this.tail=this.head,this.size=0}calculateSize(e){return null!=(null===e||void 0===e?void 0:e.byteLength)?e.byteLength:1}push(e){if(null!=(null===e||void 0===e?void 0:e.value)&&(this.size+=this.calculateSize(e.value)),!this.head.push(e)){const t=this.head;this.head=t.next=new Oa(2*this.head.buffer.length),this.head.push(e)}}shift(){var e;let t=this.tail.shift();if(void 0===t&&null!=this.tail.next){const e=this.tail.next;this.tail.next=null,this.tail=e,t=this.tail.shift()}return null!=(null===(e=t)||void 0===e?void 0:e.value)&&(this.size-=this.calculateSize(t.value)),t}isEmpty(){return this.head.isEmpty()}}class Ba extends Error{constructor(e,t){super(null!==e&&void 0!==e?e:"The operation was aborted"),(0,W.Z)(this,"type",void 0),(0,W.Z)(this,"code",void 0),this.type="aborted",this.code=null!==t&&void 0!==t?t:"ABORT_ERR"}}function La(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e=>{const t=e.shift();if(null==t)return{done:!0};if(null!=t.error)throw t.error;return{done:!0===t.done,value:t.value}};return Ua(t,e)}function Ua(e,t){var r;let n,i,o,s=(t=null!==(r=t)&&void 0!==r?r:{}).onEnd,a=new Ma,c=Da();const l=e=>null!=i?i(e):(a.push(e),n),u=e=>{var r;if(o)return n;if(!0!==(null===(r=t)||void 0===r?void 0:r.objectMode)&&null==(null===e||void 0===e?void 0:e.byteLength))throw new Error("objectMode was not true but tried to push non-Uint8Array value");return l({done:!1,value:e})},h=e=>o?n:(o=!0,null!=e?(e=>(a=new Ma,null!=i?i({error:e}):(a.push({error:e}),n)))(e):l({done:!0}));if(n={[Symbol.asyncIterator](){return this},next:async()=>{try{return a.isEmpty()?o?{done:!0}:await new Promise(((t,r)=>{i=o=>{i=null,a.push(o);try{t(e(a))}catch(s){r(s)}return n}})):e(a)}finally{a.isEmpty()&&queueMicrotask((()=>{c.resolve(),c=Da()}))}},return:()=>(a=new Ma,h(),{done:!0}),throw:e=>(h(e),{done:!0}),push:u,end:h,get readableLength(){return a.size},onEmpty:async e=>{const t=null===e||void 0===e?void 0:e.signal;if(null===t||void 0===t||t.throwIfAborted(),a.isEmpty())return;let r,n;null!=t&&(r=new Promise(((e,r)=>{n=()=>{r(new Ba)},t.addEventListener("abort",n)})));try{await Promise.race([c.promise,r])}finally{null!=n&&null!=t&&(null===t||void 0===t||t.removeEventListener("abort",n))}}},null==s)return n;const d=n;return n={[Symbol.asyncIterator](){return this},next:()=>d.next(),throw:e=>(d.throw(e),null!=s&&(s(e),s=void 0),{done:!0}),return:()=>(d.return(),null!=s&&(s(),s=void 0),{done:!0}),push:u,end:e=>(d.end(e),null!=s&&(s(e),s=void 0),n),get readableLength(){return d.readableLength}},n}function Fa(e){return null!=e[Symbol.asyncIterator]}const ja=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];const n=[];for(const i of t)Fa(i)||n.push(i);return n.length===t.length?function*(){for(const e of n)yield*e}():async function*(){const e=La({objectMode:!0});Promise.resolve().then((async()=>{try{await Promise.all(t.map((async t=>{for await(const r of t)e.push(r)}))),e.end()}catch(r){e.end(r)}})),yield*e}()};function za(e){if(null==e)throw new Error("Empty pipeline");if(Va(e)){const t=e;e=()=>t.source}else if(Za(e)||qa(e)){const t=e;e=()=>t}for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];const i=[e,...r];if(i.length>1&&Va(i[i.length-1])&&(i[i.length-1]=i[i.length-1].sink),i.length>2)for(let o=1;o<i.length-1;o++)Va(i[o])&&(i[o]=Ha(i[o]));return Ka(...i)}const Ka=function(){let e;for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];for(;r.length>0;)e=r.shift()(e);return e},qa=e=>null!=(null===e||void 0===e?void 0:e[Symbol.asyncIterator]),Za=e=>null!=(null===e||void 0===e?void 0:e[Symbol.iterator]),Va=e=>null!=e&&(null!=e.sink&&null!=e.source),Ha=e=>t=>{const r=e.sink(t);if(null!=(null===r||void 0===r?void 0:r.then)){const t=La({objectMode:!0});let n;r.then((()=>{t.end()}),(e=>{t.end(e)}));const i=e.source;if(qa(i))n=async function*(){yield*i,t.end()};else{if(!Za(i))throw new Error("Unknown duplex source type - must be Iterable or AsyncIterable");n=function*(){yield*i,t.end()}}return ja(t,n())}return e.source};Ue("waku:libp2p-utils");Ue("waku:filter:v2");Ue("waku:light-push");function Wa(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("Wrong positive integer: ".concat(e))}function Ga(e){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(r.length>0&&!r.includes(e.length))throw new Error("Expected Uint8Array of length ".concat(r,", not of length=").concat(e.length))}const Ya={number:Wa,bool:function(e){if("boolean"!==typeof e)throw new Error("Expected boolean, not ".concat(e))},bytes:Ga,hash:function(e){if("function"!==typeof e||"function"!==typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");Wa(e.outputLen),Wa(e.blockLen)},exists:function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")},output:function(e,t){Ga(e);const r=t.outputLen;if(e.length<r)throw new Error("digestInto() expects output buffer of length at least ".concat(r))}},Qa=Ya,Ja="object"===typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,Xa=e=>e instanceof Uint8Array,$a=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),ec=(e,t)=>e<<32-t|e>>>t;if(!(68===new Uint8Array(new Uint32Array([287454020]).buffer)[0]))throw new Error("Non little-endian hardware is not supported");Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function tc(e){if("string"!==typeof e)throw new Error("utf8ToBytes expected string, got ".concat(typeof e));return new Uint8Array((new TextEncoder).encode(e))}function rc(e){if("string"===typeof e&&(e=tc(e)),!Xa(e))throw new Error("expected Uint8Array, got ".concat(typeof e));return e}class nc{clone(){return this._cloneInto()}}function ic(e){const t=t=>e().update(rc(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function oc(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:32;if(Ja&&"function"===typeof Ja.getRandomValues)return Ja.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}class sc extends nc{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=$a(this.buffer)}update(e){Qa.exists(this);const{view:t,buffer:r,blockLen:n}=this,i=(e=rc(e)).length;for(let o=0;o<i;){const s=Math.min(n-this.pos,i-o);if(s!==n)r.set(e.subarray(o,o+s),this.pos),this.pos+=s,o+=s,this.pos===n&&(this.process(t,0),this.pos=0);else{const t=$a(e);for(;n<=i-o;o+=n)this.process(t,o)}}return this.length+=e.length,this.roundClean(),this}digestInto(e){Qa.exists(this),Qa.output(e,this),this.finished=!0;const{buffer:t,view:r,blockLen:n,isLE:i}=this;let{pos:o}=this;t[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>n-o&&(this.process(r,0),o=0);for(let u=o;u<n;u++)t[u]=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),c=n?4:0,l=n?0:4;e.setUint32(t+c,s,n),e.setUint32(t+l,a,n)}(r,n-8,BigInt(8*this.length),i),this.process(r,0);const s=$a(e),a=this.outputLen;if(a%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const c=a/4,l=this.get();if(c>l.length)throw new Error("_sha2: outputLen bigger than state");for(let u=0;u<c;u++)s.setUint32(4*u,l[u],i)}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}}const ac=(e,t,r)=>e&t^e&r^t&r,cc=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]),lc=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),uc=new Uint32Array(64);class hc extends sc{constructor(){super(64,32,8,!1),this.A=0|lc[0],this.B=0|lc[1],this.C=0|lc[2],this.D=0|lc[3],this.E=0|lc[4],this.F=0|lc[5],this.G=0|lc[6],this.H=0|lc[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 h=0;h<16;h++,t+=4)uc[h]=e.getUint32(t,!1);for(let h=16;h<64;h++){const e=uc[h-15],t=uc[h-2],r=ec(e,7)^ec(e,18)^e>>>3,n=ec(t,17)^ec(t,19)^t>>>10;uc[h]=n+uc[h-7]+r+uc[h-16]|0}let{A:r,B:n,C:i,D:o,E:s,F:a,G:c,H:l}=this;for(let h=0;h<64;h++){const e=l+(ec(s,6)^ec(s,11)^ec(s,25))+((u=s)&a^~u&c)+cc[h]+uc[h]|0,t=(ec(r,2)^ec(r,13)^ec(r,22))+ac(r,n,i)|0;l=c,c=a,a=s,s=o+e|0,o=i,i=n,n=r,r=e+t|0}var u;r=r+this.A|0,n=n+this.B|0,i=i+this.C|0,o=o+this.D|0,s=s+this.E|0,a=a+this.F|0,c=c+this.G|0,l=l+this.H|0,this.set(r,n,i,o,s,a,c,l)}roundClean(){uc.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class dc extends hc{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}}const fc=ic((()=>new hc));ic((()=>new dc)),new Uint8Array;BigInt(1e6);var pc;!function(e){e.BACKWARD="backward",e.FORWARD="forward"}(pc||(pc={}));xe.HistoryError;Ue("waku:store");class gc extends Error{constructor(e){super(e),this.name="TimeoutError"}}class mc extends Error{constructor(e){super(),this.name="AbortError",this.message=e}}const yc=e=>void 0===globalThis.DOMException?new mc(e):new DOMException(e),vc=e=>{const t=void 0===e.reason?yc("This operation was aborted."):e.reason;return t instanceof Error?t:yc(t)};const bc=e=>{const t=e.on||e.addListener||e.addEventListener,r=e.off||e.removeListener||e.removeEventListener;if(!t||!r)throw new TypeError("Emitter is not compatible");return{addListener:t.bind(e),removeListener:r.bind(e)}};function wc(e,t,r){let n;const i=new Promise(((i,o)=>{if(!((r={rejectionEvents:["error"],multiArgs:!1,resolveImmediately:!1,...r}).count>=0)||r.count!==Number.POSITIVE_INFINITY&&!Number.isInteger(r.count))throw new TypeError("The `count` option should be at least 0 or more");const s=[t].flat(),a=[],{addListener:c,removeListener:l}=bc(e),u=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];const s=r.multiArgs?t:t[0];r.filter&&!r.filter(s)||(a.push(s),r.count===a.length&&(n(),i(a)))},h=e=>{n(),o(e)};n=()=>{for(const e of s)l(e,u);for(const e of r.rejectionEvents)l(e,h)};for(const e of s)c(e,u);for(const e of r.rejectionEvents)c(e,h);r.resolveImmediately&&i(a)}));if(i.cancel=n,"number"===typeof r.timeout){const e=function(e,t,r,n){let i;const o=new Promise(((o,s)=>{if("number"!==typeof t||1!==Math.sign(t))throw new TypeError("Expected `milliseconds` to be a positive number, got `".concat(t,"`"));if(t!==Number.POSITIVE_INFINITY){if((n={customTimers:{setTimeout:setTimeout,clearTimeout:clearTimeout},...n}).signal){const{signal:e}=n;e.aborted&&s(vc(e)),e.addEventListener("abort",(()=>{s(vc(e))}))}i=n.customTimers.setTimeout.call(void 0,(()=>{if("function"===typeof r){try{o(r())}catch(a){s(a)}return}const n="string"===typeof r?r:"Promise timed out after ".concat(t," milliseconds"),i=r instanceof Error?r:new gc(n);"function"===typeof e.cancel&&e.cancel(),s(i)}),t),(async()=>{try{o(await e)}catch(t){s(t)}finally{n.customTimers.clearTimeout.call(void 0,i)}})()}else o(e)}));return o.clear=()=>{clearTimeout(i),i=void 0},o}(i,r.timeout);return e.cancel=n,e}return i}function Ec(e,t,r){"function"===typeof r&&(r={filter:r});const n=wc(e,t,r={...r,count:1,resolveImmediately:!1}),i=n.then((e=>e[0]));return i.cancel=n.cancel,i}const Sc=Ue("waku:wait-for-remote-peer");async function _c(e,t,r){var n;if(t=null!==(n=t)&&void 0!==n?n:function(e){const t=[];e.relay&&t.push(gi.Relay);e.filter&&t.push(gi.Filter);e.store&&t.push(gi.Store);e.lightPush&&t.push(gi.LightPush);return t}(e),!e.isStarted())return Promise.reject("Waku node is not started");const i=[];if(t.includes(gi.Relay)){if(!e.relay)throw new Error("Cannot wait for Relay peer: protocol not mounted");i.push(async function(e){let t=e.getMeshPeers();for(;0==t.length;)await Ec(e.gossipSub,"gossipsub:heartbeat"),t=e.getMeshPeers()}(e.relay))}if(t.includes(gi.Store)){if(!e.store)throw new Error("Cannot wait for Store peer: protocol not mounted");i.push(Ac(e.store))}if(t.includes(gi.LightPush)){if(!e.lightPush)throw new Error("Cannot wait for LightPush peer: protocol not mounted");i.push(Ac(e.lightPush))}if(t.includes(gi.Filter)){if(!e.filter)throw new Error("Cannot wait for Filter peer: protocol not mounted");i.push(Ac(e.filter))}r?await async function(e,t,r){await Promise.race([e,kc(t,r)])}(Promise.all(i),r,"Timed out waiting for a remote peer."):await Promise.all(i)}async function Ac(e){const t=e.multicodec,r=await e.peers();r.length?Sc("".concat(t," peer found: "),r[0].id.toString()):await new Promise((r=>{const n=i=>{var o,s;null!==(o=i.detail)&&void 0!==o&&null!==(s=o.protocols)&&void 0!==s&&s.includes(t)&&(Sc("Resolving for",t,i.detail.protocols),e.removeLibp2pEventListener("peer:identify",n),r())};e.addLibp2pEventListener("peer:identify",n)}))}const kc=(e,t)=>new Promise(((r,n)=>setTimeout((()=>n(t)),e)));function Cc(){const e=Da();let t=!1;return{sink:async r=>{if(t)throw new Error("already piped");t=!0,e.resolve(r)},source:async function*(){const t=await e.promise;yield*t}()}}const xc=e=>ka.decode(e);function Ic(e,t){const r=La();e.sink(r).catch((e=>{r.end(e)})),e.sink=async e=>{for await(const t of e)r.push(t);r.end()};let n=e.source;null!=e.source[Symbol.iterator]?n=e.source[Symbol.iterator]():null!=e.source[Symbol.asyncIterator]&&(n=e.source[Symbol.asyncIterator]());const i=new da,o={read:async e=>{if(null==e){const{done:e,value:t}=await n.next();return!0===e?new da:t}for(;i.byteLength<e;){const{value:e,done:t}=await n.next();if(!0===t)throw Ra(new Error("unexpected end of input"),"ERR_UNEXPECTED_EOF");i.append(e)}const t=i.sublist(0,e);return i.consume(e),t},readLP:async()=>{var e;let r=-1;const n=new da,i=null!==(e=null===t||void 0===t?void 0:t.lengthDecoder)&&void 0!==e?e:xc;for(;;){n.append(await o.read(1));try{r=i(n)}catch(s){if(s instanceof RangeError)continue;throw s}if(r>-1)break;if(null!=(null===t||void 0===t?void 0:t.maxLengthLength)&&n.byteLength>t.maxLengthLength)throw Ra(new Error("message length length too long"),"ERR_MSG_LENGTH_TOO_LONG")}if(null!=(null===t||void 0===t?void 0:t.maxDataLength)&&r>t.maxDataLength)throw Ra(new Error("message length too long"),"ERR_MSG_DATA_TOO_LONG");return o.read(r)},readPB:async e=>{const t=await o.readLP();if(null==t)throw new Error("Value is null");const r=t instanceof Uint8Array?t:t.subarray();return e.decode(r)},write:e=>{e instanceof Uint8Array?r.push(e):r.push(e.subarray())},writeLP:e=>{o.write(Ia.single(e,t))},writePB:(e,t)=>{o.writeLP(t.encode(e))},pb:e=>({read:async()=>o.readPB(e),write:t=>{o.writePB(t,e)},unwrap:()=>o}),unwrap:()=>{const t=e.source;return e.source=async function*(){yield*i,yield*t}(),e}};return o}var Rc,Pc;xc.bytes=0;const Tc=65535,Nc=Boolean(null===(Rc=globalThis.process)||void 0===Rc||null===(Pc=Rc.env)||void 0===Pc?void 0:Pc.DUMP_SESSION_KEYS),Dc=e=>e instanceof Uint8Array,Oc=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4));if(!(68===new Uint8Array(new Uint32Array([287454020]).buffer)[0]))throw new Error("Non little-endian hardware is not supported");function Mc(e){if("string"!==typeof e)throw new Error("utf8ToBytes expected string, got ".concat(typeof e));return new Uint8Array((new TextEncoder).encode(e))}function Bc(e){if("string"===typeof e&&(e=Mc(e)),!Dc(e))throw new Error("expected Uint8Array, got ".concat(typeof e));return e}function Lc(e,t){if(void 0!==t&&("object"!==typeof t||(r=t,"[object Object]"!==Object.prototype.toString.call(r)||r.constructor!==Object)))throw new Error("Options should be object or undefined");var r;return Object.assign(e,t)}function Uc(e,t){if(!(e instanceof Uint8Array))throw new Error("Uint8Array expected");if("number"===typeof t&&e.length!==t)throw new Error("Uint8Array length ".concat(t," expected"))}function Fc(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),c=n?4:0,l=n?0:4;e.setUint32(t+c,s,n),e.setUint32(t+l,a,n)}function jc(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("Wrong positive integer: ".concat(e))}function zc(e){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(r.length>0&&!r.includes(e.length))throw new Error("Expected Uint8Array of length ".concat(r,", not of length=").concat(e.length))}const Kc={number:jc,bool:function(e){if("boolean"!==typeof e)throw new Error("Expected boolean, not ".concat(e))},bytes:zc,hash:function(e){if("function"!==typeof e||"function"!==typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");jc(e.outputLen),jc(e.blockLen)},exists:function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")},output:function(e,t){zc(e);const r=t.outputLen;if(e.length<r)throw new Error("digestInto() expects output buffer of length at least ".concat(r))}},qc=Kc,Zc=(e,t)=>255&e[t++]|(255&e[t++])<<8;class Vc{constructor(e){this.blockLen=16,this.outputLen=16,this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.pos=0,this.finished=!1,Uc(e=Bc(e),32);const t=Zc(e,0),r=Zc(e,2),n=Zc(e,4),i=Zc(e,6),o=Zc(e,8),s=Zc(e,10),a=Zc(e,12),c=Zc(e,14);this.r[0]=8191&t,this.r[1]=8191&(t>>>13|r<<3),this.r[2]=7939&(r>>>10|n<<6),this.r[3]=8191&(n>>>7|i<<9),this.r[4]=255&(i>>>4|o<<12),this.r[5]=o>>>1&8190,this.r[6]=8191&(o>>>14|s<<2),this.r[7]=8065&(s>>>11|a<<5),this.r[8]=8191&(a>>>8|c<<8),this.r[9]=c>>>5&127;for(let l=0;l<8;l++)this.pad[l]=Zc(e,16+2*l)}process(e,t){const r=arguments.length>2&&void 0!==arguments[2]&&arguments[2]?0:2048,{h:n,r:i}=this,o=i[0],s=i[1],a=i[2],c=i[3],l=i[4],u=i[5],h=i[6],d=i[7],f=i[8],p=i[9],g=Zc(e,t+0),m=Zc(e,t+2),y=Zc(e,t+4),v=Zc(e,t+6),b=Zc(e,t+8),w=Zc(e,t+10),E=Zc(e,t+12),S=Zc(e,t+14);let _=n[0]+(8191&g),A=n[1]+(8191&(g>>>13|m<<3)),k=n[2]+(8191&(m>>>10|y<<6)),C=n[3]+(8191&(y>>>7|v<<9)),x=n[4]+(8191&(v>>>4|b<<12)),I=n[5]+(b>>>1&8191),R=n[6]+(8191&(b>>>14|w<<2)),P=n[7]+(8191&(w>>>11|E<<5)),T=n[8]+(8191&(E>>>8|S<<8)),N=n[9]+(S>>>5|r),D=0,O=D+_*o+A*(5*p)+k*(5*f)+C*(5*d)+x*(5*h);D=O>>>13,O&=8191,O+=I*(5*u)+R*(5*l)+P*(5*c)+T*(5*a)+N*(5*s),D+=O>>>13,O&=8191;let M=D+_*s+A*o+k*(5*p)+C*(5*f)+x*(5*d);D=M>>>13,M&=8191,M+=I*(5*h)+R*(5*u)+P*(5*l)+T*(5*c)+N*(5*a),D+=M>>>13,M&=8191;let B=D+_*a+A*s+k*o+C*(5*p)+x*(5*f);D=B>>>13,B&=8191,B+=I*(5*d)+R*(5*h)+P*(5*u)+T*(5*l)+N*(5*c),D+=B>>>13,B&=8191;let L=D+_*c+A*a+k*s+C*o+x*(5*p);D=L>>>13,L&=8191,L+=I*(5*f)+R*(5*d)+P*(5*h)+T*(5*u)+N*(5*l),D+=L>>>13,L&=8191;let U=D+_*l+A*c+k*a+C*s+x*o;D=U>>>13,U&=8191,U+=I*(5*p)+R*(5*f)+P*(5*d)+T*(5*h)+N*(5*u),D+=U>>>13,U&=8191;let F=D+_*u+A*l+k*c+C*a+x*s;D=F>>>13,F&=8191,F+=I*o+R*(5*p)+P*(5*f)+T*(5*d)+N*(5*h),D+=F>>>13,F&=8191;let j=D+_*h+A*u+k*l+C*c+x*a;D=j>>>13,j&=8191,j+=I*s+R*o+P*(5*p)+T*(5*f)+N*(5*d),D+=j>>>13,j&=8191;let z=D+_*d+A*h+k*u+C*l+x*c;D=z>>>13,z&=8191,z+=I*a+R*s+P*o+T*(5*p)+N*(5*f),D+=z>>>13,z&=8191;let K=D+_*f+A*d+k*h+C*u+x*l;D=K>>>13,K&=8191,K+=I*c+R*a+P*s+T*o+N*(5*p),D+=K>>>13,K&=8191;let q=D+_*p+A*f+k*d+C*h+x*u;D=q>>>13,q&=8191,q+=I*l+R*c+P*a+T*s+N*o,D+=q>>>13,q&=8191,D=(D<<2)+D|0,D=D+O|0,O=8191&D,D>>>=13,M+=D,n[0]=O,n[1]=M,n[2]=B,n[3]=L,n[4]=U,n[5]=F,n[6]=j,n[7]=z,n[8]=K,n[9]=q}finalize(){const{h:e,pad:t}=this,r=new Uint16Array(10);let n=e[1]>>>13;e[1]&=8191;for(let s=2;s<10;s++)e[s]+=n,n=e[s]>>>13,e[s]&=8191;e[0]+=5*n,n=e[0]>>>13,e[0]&=8191,e[1]+=n,n=e[1]>>>13,e[1]&=8191,e[2]+=n,r[0]=e[0]+5,n=r[0]>>>13,r[0]&=8191;for(let s=1;s<10;s++)r[s]=e[s]+n,n=r[s]>>>13,r[s]&=8191;r[9]-=8192;let i=(1^n)-1;for(let s=0;s<10;s++)r[s]&=i;i=~i;for(let s=0;s<10;s++)e[s]=e[s]&i|r[s];e[0]=65535&(e[0]|e[1]<<13),e[1]=65535&(e[1]>>>3|e[2]<<10),e[2]=65535&(e[2]>>>6|e[3]<<7),e[3]=65535&(e[3]>>>9|e[4]<<4),e[4]=65535&(e[4]>>>12|e[5]<<1|e[6]<<14),e[5]=65535&(e[6]>>>2|e[7]<<11),e[6]=65535&(e[7]>>>5|e[8]<<8),e[7]=65535&(e[8]>>>8|e[9]<<5);let o=e[0]+t[0];e[0]=65535&o;for(let s=1;s<8;s++)o=(e[s]+t[s]|0)+(o>>>16)|0,e[s]=65535&o}update(e){qc.exists(this);const{buffer:t,blockLen:r}=this,n=(e=Bc(e)).length;for(let i=0;i<n;){const o=Math.min(r-this.pos,n-i);if(o!==r)t.set(e.subarray(i,i+o),this.pos),this.pos+=o,i+=o,this.pos===r&&(this.process(t,0,!1),this.pos=0);else for(;r<=n-i;i+=r)this.process(e,i)}return this}destroy(){this.h.fill(0),this.r.fill(0),this.buffer.fill(0),this.pad.fill(0)}digestInto(e){qc.exists(this),qc.output(e,this),this.finished=!0;const{buffer:t,h:r}=this;let{pos:n}=this;if(n){for(t[n++]=1;n<16;n++)t[n]=0;this.process(t,0,!0)}this.finalize();let i=0;for(let o=0;o<8;o++)e[i++]=r[o]>>>0,e[i++]=r[o]>>>8;return e}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const r=e.slice(0,t);return this.destroy(),r}}const Hc=function(e){const t=(t,r)=>e(r).update(Bc(t)).digest(),r=e(new Uint8Array(32));return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t}((e=>new Vc(e))),Wc=Mc("expand 16-byte k"),Gc=Mc("expand 32-byte k"),Yc=Oc(Wc),Qc=Oc(Gc),Jc=e=>!(e.byteOffset%4),Xc=e=>{const{core:t,rounds:r,counterRight:n,counterLen:i,allow128bitKeys:o,extendNonceFn:s,blockLen:a}=Lc({rounds:20,counterRight:!1,counterLen:8,allow128bitKeys:!0,blockLen:64},e);qc.number(i),qc.number(r),qc.number(a),qc.bool(n),qc.bool(o);const c=a/4;if(a%4!==0)throw new Error("Salsa/ChaCha: blockLen should be aligned to 4 bytes");return function(e,l,u,h){let d=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(qc.bytes(e),qc.bytes(l),qc.bytes(u),h||(h=new Uint8Array(u.length)),qc.bytes(h),qc.number(d),d<0||d>=2**32-1)throw new Error("Salsa/ChaCha: counter overflow");if(h.length<u.length)throw new Error("Salsa/ChaCha: output (".concat(h.length,") is shorter than data (").concat(u.length,")"));const f=[];let p,g;if(32===e.length)p=e,g=Qc;else{if(16!==e.length||!o)throw new Error("Salsa/ChaCha: wrong key length=".concat(e.length,", expected"));p=new Uint8Array(32),p.set(e),p.set(e,16),g=Yc,f.push(p)}if(s){if(l.length<=16)throw new Error("Salsa/ChaCha: extended nonce should be bigger than 16 bytes");p=s(g,p,l.subarray(0,16),new Uint8Array(32)),f.push(p),l=l.subarray(16)}const m=16-i;if(l.length!==m)throw new Error("Salsa/ChaCha: nonce should be ".concat(m," or 16 bytes"));if(12!==m){const e=new Uint8Array(12);e.set(l,n?0:12-l.length),f.push(l=e)}const y=new Uint8Array(a),v=Oc(y),b=Oc(p),w=Oc(l),E=Jc(u)&&Oc(u),S=Jc(h)&&Oc(h);f.push(v);const _=u.length;for(let n=0,i=d;n<_;i++){if(t(g,b,w,v,i,r),i>=2**32-1)throw new Error("Salsa/ChaCha: counter overflow");const e=Math.min(a,_-n);if(e===a&&S&&E){const e=n/4;if(n%4!==0)throw new Error("Salsa/ChaCha: wrong block position");for(let t=0;t<c;t++)S[e+t]=E[e+t]^v[t];n+=a}else{for(let t=0;t<e;t++)h[n+t]=u[n+t]^y[t];n+=e}}for(let t=0;t<f.length;t++)f[t].fill(0);return h}},$c=(e,t)=>e<<t|e>>>32-t;function el(e,t,r,n,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:20,s=e[0],a=e[1],c=e[2],l=e[3],u=t[0],h=t[1],d=t[2],f=t[3],p=t[4],g=t[5],m=t[6],y=t[7],v=i,b=r[0],w=r[1],E=r[2],S=s,_=a,A=c,k=l,C=u,x=h,I=d,R=f,P=p,T=g,N=m,D=y,O=v,M=b,B=w,L=E;for(let F=0;F<o;F+=2)S=S+C|0,O=$c(O^S,16),P=P+O|0,C=$c(C^P,12),S=S+C|0,O=$c(O^S,8),P=P+O|0,C=$c(C^P,7),_=_+x|0,M=$c(M^_,16),T=T+M|0,x=$c(x^T,12),_=_+x|0,M=$c(M^_,8),T=T+M|0,x=$c(x^T,7),A=A+I|0,B=$c(B^A,16),N=N+B|0,I=$c(I^N,12),A=A+I|0,B=$c(B^A,8),N=N+B|0,I=$c(I^N,7),k=k+R|0,L=$c(L^k,16),D=D+L|0,R=$c(R^D,12),k=k+R|0,L=$c(L^k,8),D=D+L|0,R=$c(R^D,7),S=S+x|0,L=$c(L^S,16),N=N+L|0,x=$c(x^N,12),S=S+x|0,L=$c(L^S,8),N=N+L|0,x=$c(x^N,7),_=_+I|0,O=$c(O^_,16),D=D+O|0,I=$c(I^D,12),_=_+I|0,O=$c(O^_,8),D=D+O|0,I=$c(I^D,7),A=A+R|0,M=$c(M^A,16),P=P+M|0,R=$c(R^P,12),A=A+R|0,M=$c(M^A,8),P=P+M|0,R=$c(R^P,7),k=k+C|0,B=$c(B^k,16),T=T+B|0,C=$c(C^T,12),k=k+C|0,B=$c(B^k,8),T=T+B|0,C=$c(C^T,7);let U=0;n[U++]=s+S|0,n[U++]=a+_|0,n[U++]=c+A|0,n[U++]=l+k|0,n[U++]=u+C|0,n[U++]=h+x|0,n[U++]=d+I|0,n[U++]=f+R|0,n[U++]=p+P|0,n[U++]=g+T|0,n[U++]=m+N|0,n[U++]=y+D|0,n[U++]=v+O|0,n[U++]=b+M|0,n[U++]=w+B|0,n[U++]=E+L|0}Xc({core:el,counterRight:!1,counterLen:8});const tl=Xc({core:el,counterRight:!1,counterLen:4,allow128bitKeys:!1}),rl=Xc({core:el,counterRight:!1,counterLen:8,extendNonceFn:function(e,t,r,n){const i=Oc(t),o=Oc(r),s=Oc(n);let a=e[0],c=e[1],l=e[2],u=e[3],h=i[0],d=i[1],f=i[2],p=i[3],g=i[4],m=i[5],y=i[6],v=i[7],b=o[0],w=o[1],E=o[2],S=o[3];for(let _=0;_<20;_+=2)a=a+h|0,b=$c(b^a,16),g=g+b|0,h=$c(h^g,12),a=a+h|0,b=$c(b^a,8),g=g+b|0,h=$c(h^g,7),c=c+d|0,w=$c(w^c,16),m=m+w|0,d=$c(d^m,12),c=c+d|0,w=$c(w^c,8),m=m+w|0,d=$c(d^m,7),l=l+f|0,E=$c(E^l,16),y=y+E|0,f=$c(f^y,12),l=l+f|0,E=$c(E^l,8),y=y+E|0,f=$c(f^y,7),u=u+p|0,S=$c(S^u,16),v=v+S|0,p=$c(p^v,12),u=u+p|0,S=$c(S^u,8),v=v+S|0,p=$c(p^v,7),a=a+d|0,S=$c(S^a,16),y=y+S|0,d=$c(d^y,12),a=a+d|0,S=$c(S^a,8),y=y+S|0,d=$c(d^y,7),c=c+f|0,b=$c(b^c,16),v=v+b|0,f=$c(f^v,12),c=c+f|0,b=$c(b^c,8),v=v+b|0,f=$c(f^v,7),l=l+p|0,w=$c(w^l,16),g=g+w|0,p=$c(p^g,12),l=l+p|0,w=$c(w^l,8),g=g+w|0,p=$c(p^g,7),u=u+h|0,E=$c(E^u,16),m=m+E|0,h=$c(h^m,12),u=u+h|0,E=$c(E^u,8),m=m+E|0,h=$c(h^m,7);return s[0]=a,s[1]=c,s[2]=l,s[3]=u,s[4]=b,s[5]=w,s[6]=E,s[7]=S,n},allow128bitKeys:!1}),nl=(Xc({core:el,counterRight:!1,counterLen:4,rounds:8}),Xc({core:el,counterRight:!1,counterLen:4,rounds:12}),new Uint8Array(16)),il=(e,t)=>{e.update(t);const r=t.length%16;r&&e.update(nl.subarray(r))},ol=(e,t,r,n,i)=>{const o=e(t,r,new Uint8Array(32)),s=Hc.create(o);i&&il(s,i),il(s,n);const a=new Uint8Array(16),c=(l=a,new DataView(l.buffer,l.byteOffset,l.byteLength));var l;Fc(c,0,BigInt(i?i.length:0),!0),Fc(c,8,BigInt(n.length),!0),s.update(a);const u=s.digest();return o.fill(0),u},sl=e=>(t,r,n)=>{const i=16;return Uc(t,32),Uc(r),{tagLength:i,encrypt:o=>{const s=new Uint8Array(o.length+i);e(t,r,o,s,1);const a=ol(e,t,r,s.subarray(0,-16),n);return s.set(a,o.length),s},decrypt:o=>{if(o.length<i)throw new Error("Encrypted data should be at least ".concat(i));const s=o.subarray(-16),a=o.subarray(0,-16);if(!function(e,t){if(e.length!==t.length)throw new Error("equalBytes: Different size of Uint8Arrays");let r=!0;for(let n=0;n<e.length;n++)r&&(r=e[n]===t[n]);return r}(s,ol(e,t,r,a,n)))throw new Error("Wrong tag");return e(t,r,a,void 0,1)}}},al=sl(tl),cl=(sl(rl),BigInt(2**32-1)),ll=BigInt(32);function ul(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t?{h:Number(e&cl),l:Number(e>>ll&cl)}:{h:0|Number(e>>ll&cl),l:0|Number(e&cl)}}const hl={fromBig:ul,split:function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let i=0;i<e.length;i++){const{h:o,l:s}=ul(e[i],t);[r[i],n[i]]=[o,s]}return[r,n]},toBig:(e,t)=>BigInt(e>>>0)<<ll|BigInt(t>>>0),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:function(e,t,r,n){const i=(t>>>0)+(n>>>0);return{h:e+r+(i/2**32|0)|0,l:0|i}},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)},[dl,fl]=hl.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map((e=>BigInt(e)))),pl=new Uint32Array(80),gl=new Uint32Array(80);class ml extends sc{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:t,Bh:r,Bl:n,Ch:i,Cl:o,Dh:s,Dl:a,Eh:c,El:l,Fh:u,Fl:h,Gh:d,Gl:f,Hh:p,Hl:g}=this;return[e,t,r,n,i,o,s,a,c,l,u,h,d,f,p,g]}set(e,t,r,n,i,o,s,a,c,l,u,h,d,f,p,g){this.Ah=0|e,this.Al=0|t,this.Bh=0|r,this.Bl=0|n,this.Ch=0|i,this.Cl=0|o,this.Dh=0|s,this.Dl=0|a,this.Eh=0|c,this.El=0|l,this.Fh=0|u,this.Fl=0|h,this.Gh=0|d,this.Gl=0|f,this.Hh=0|p,this.Hl=0|g}process(e,t){for(let v=0;v<16;v++,t+=4)pl[v]=e.getUint32(t),gl[v]=e.getUint32(t+=4);for(let v=16;v<80;v++){const e=0|pl[v-15],t=0|gl[v-15],r=hl.rotrSH(e,t,1)^hl.rotrSH(e,t,8)^hl.shrSH(e,t,7),n=hl.rotrSL(e,t,1)^hl.rotrSL(e,t,8)^hl.shrSL(e,t,7),i=0|pl[v-2],o=0|gl[v-2],s=hl.rotrSH(i,o,19)^hl.rotrBH(i,o,61)^hl.shrSH(i,o,6),a=hl.rotrSL(i,o,19)^hl.rotrBL(i,o,61)^hl.shrSL(i,o,6),c=hl.add4L(n,a,gl[v-7],gl[v-16]),l=hl.add4H(c,r,s,pl[v-7],pl[v-16]);pl[v]=0|l,gl[v]=0|c}let{Ah:r,Al:n,Bh:i,Bl:o,Ch:s,Cl:a,Dh:c,Dl:l,Eh:u,El:h,Fh:d,Fl:f,Gh:p,Gl:g,Hh:m,Hl:y}=this;for(let v=0;v<80;v++){const e=hl.rotrSH(u,h,14)^hl.rotrSH(u,h,18)^hl.rotrBH(u,h,41),t=hl.rotrSL(u,h,14)^hl.rotrSL(u,h,18)^hl.rotrBL(u,h,41),b=u&d^~u&p,w=h&f^~h&g,E=hl.add5L(y,t,w,fl[v],gl[v]),S=hl.add5H(E,m,e,b,dl[v],pl[v]),_=0|E,A=hl.rotrSH(r,n,28)^hl.rotrBH(r,n,34)^hl.rotrBH(r,n,39),k=hl.rotrSL(r,n,28)^hl.rotrBL(r,n,34)^hl.rotrBL(r,n,39),C=r&i^r&s^i&s,x=n&o^n&a^o&a;m=0|p,y=0|g,p=0|d,g=0|f,d=0|u,f=0|h,({h:u,l:h}=hl.add(0|c,0|l,0|S,0|_)),c=0|s,l=0|a,s=0|i,a=0|o,i=0|r,o=0|n;const I=hl.add3L(_,k,x);r=hl.add3H(I,S,A,C),n=0|I}({h:r,l:n}=hl.add(0|this.Ah,0|this.Al,0|r,0|n)),({h:i,l:o}=hl.add(0|this.Bh,0|this.Bl,0|i,0|o)),({h:s,l:a}=hl.add(0|this.Ch,0|this.Cl,0|s,0|a)),({h:c,l:l}=hl.add(0|this.Dh,0|this.Dl,0|c,0|l)),({h:u,l:h}=hl.add(0|this.Eh,0|this.El,0|u,0|h)),({h:d,l:f}=hl.add(0|this.Fh,0|this.Fl,0|d,0|f)),({h:p,l:g}=hl.add(0|this.Gh,0|this.Gl,0|p,0|g)),({h:m,l:y}=hl.add(0|this.Hh,0|this.Hl,0|m,0|y)),this.set(r,n,i,o,s,a,c,l,u,h,d,f,p,g,m,y)}roundClean(){pl.fill(0),gl.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class yl extends ml{constructor(){super(),this.Ah=-1942145080,this.Al=424955298,this.Bh=1944164710,this.Bl=-1982016298,this.Ch=502970286,this.Cl=855612546,this.Dh=1738396948,this.Dl=1479516111,this.Eh=258812777,this.El=2077511080,this.Fh=2011393907,this.Fl=79989058,this.Gh=1067287976,this.Gl=1780299464,this.Hh=286451373,this.Hl=-1848208735,this.outputLen=28}}class vl extends ml{constructor(){super(),this.Ah=573645204,this.Al=-64227540,this.Bh=-1621794909,this.Bl=-934517566,this.Ch=596883563,this.Cl=1867755857,this.Dh=-1774684391,this.Dl=1497426621,this.Eh=-1775747358,this.El=-1467023389,this.Fh=-1101128155,this.Fl=1401305490,this.Gh=721525244,this.Gl=746961066,this.Hh=246885852,this.Hl=-2117784414,this.outputLen=32}}class bl extends ml{constructor(){super(),this.Ah=-876896931,this.Al=-1056596264,this.Bh=1654270250,this.Bl=914150663,this.Ch=-1856437926,this.Cl=812702999,this.Dh=355462360,this.Dl=-150054599,this.Eh=1731405415,this.El=-4191439,this.Fh=-1900787065,this.Fl=1750603025,this.Gh=-619958771,this.Gl=1694076839,this.Hh=1203062813,this.Hl=-1090891868,this.outputLen=48}}const wl=ic((()=>new ml)),El=(ic((()=>new yl)),ic((()=>new vl)),ic((()=>new bl)),BigInt(0),BigInt(1)),Sl=BigInt(2),_l=e=>e instanceof Uint8Array,Al=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function kl(e){if(!_l(e))throw new Error("Uint8Array expected");let t="";for(let r=0;r<e.length;r++)t+=Al[e[r]];return t}function Cl(e){if("string"!==typeof e)throw new Error("hex string expected, got "+typeof e);return BigInt(""===e?"0":"0x".concat(e))}function xl(e){if("string"!==typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(t/2);for(let n=0;n<r.length;n++){const t=2*n,i=e.slice(t,t+2),o=Number.parseInt(i,16);if(Number.isNaN(o)||o<0)throw new Error("Invalid byte sequence");r[n]=o}return r}function Il(e){return Cl(kl(e))}function Rl(e){if(!_l(e))throw new Error("Uint8Array expected");return Cl(kl(Uint8Array.from(e).reverse()))}function Pl(e,t){return xl(e.toString(16).padStart(2*t,"0"))}function Tl(e,t){return Pl(e,t).reverse()}function Nl(e,t,r){let n;if("string"===typeof t)try{n=xl(t)}catch(o){throw new Error("".concat(e,' must be valid hex string, got "').concat(t,'". Cause: ').concat(o))}else{if(!_l(t))throw new Error("".concat(e," must be hex string or Uint8Array"));n=Uint8Array.from(t)}const i=n.length;if("number"===typeof r&&i!==r)throw new Error("".concat(e," expected ").concat(r," bytes, got ").concat(i));return n}function Dl(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];const n=new Uint8Array(t.reduce(((e,t)=>e+t.length),0));let i=0;return t.forEach((e=>{if(!_l(e))throw new Error("Uint8Array expected");n.set(e,i),i+=e.length})),n}const Ol=e=>(Sl<<BigInt(e-1))-El;const Ml={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)};function Bl(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=(t,r,n)=>{const i=Ml[r];if("function"!==typeof i)throw new Error('Invalid validator "'.concat(r,'", expected function'));const o=e[t];if((!n||void 0!==o)&&!i(o,e))throw new Error("Invalid param ".concat(String(t),"=").concat(o," (").concat(typeof o,"), expected ").concat(r))};for(const[i,o]of Object.entries(t))n(i,o,!1);for(const[i,o]of Object.entries(r))n(i,o,!0);return e}const Ll=BigInt(0),Ul=BigInt(1),Fl=BigInt(2),jl=BigInt(3),zl=BigInt(4),Kl=BigInt(5),ql=BigInt(8);BigInt(9),BigInt(16);function Zl(e,t){const r=e%t;return r>=Ll?r:t+r}function Vl(e,t,r){if(r<=Ll||t<Ll)throw new Error("Expected power/modulo > 0");if(r===Ul)return Ll;let n=Ul;for(;t>Ll;)t&Ul&&(n=n*e%r),e=e*e%r,t>>=Ul;return n}function Hl(e,t,r){let n=e;for(;t-- >Ll;)n*=n,n%=r;return n}function Wl(e,t){if(e===Ll||t<=Ll)throw new Error("invert: expected positive integers, got n=".concat(e," mod=").concat(t));let r=Zl(e,t),n=t,i=Ll,o=Ul,s=Ul,a=Ll;for(;r!==Ll;){const e=n/r,t=n%r,c=i-s*e,l=o-a*e;n=r,r=t,i=s,o=a,s=c,a=l}if(n!==Ul)throw new Error("invert: does not exist");return Zl(i,t)}function Gl(e){if(e%zl===jl){const t=(e+Ul)/zl;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%ql===Kl){const t=(e-Kl)/ql;return function(e,r){const n=e.mul(r,Fl),i=e.pow(n,t),o=e.mul(r,i),s=e.mul(e.mul(o,Fl),i),a=e.mul(o,e.sub(s,e.ONE));if(!e.eql(e.sqr(a),r))throw new Error("Cannot find square root");return a}}return function(e){const t=(e-Ul)/Fl;let r,n,i;for(r=e-Ul,n=0;r%Fl===Ll;r/=Fl,n++);for(i=Fl;i<e&&Vl(i,t,e)!==e-Ul;i++);if(1===n){const t=(e+Ul)/zl;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 o=(r+Ul)/Fl;return function(e,s){if(e.pow(s,t)===e.neg(e.ONE))throw new Error("Cannot find square root");let a=n,c=e.pow(e.mul(e.ONE,i),r),l=e.pow(s,o),u=e.pow(s,r);for(;!e.eql(u,e.ONE);){if(e.eql(u,e.ZERO))return e.ZERO;let t=1;for(let n=e.sqr(u);t<a&&!e.eql(n,e.ONE);t++)n=e.sqr(n);const r=e.pow(c,Ul<<BigInt(a-t-1));c=e.sqr(r),l=e.mul(l,r),u=e.mul(u,c),a=t}return l}}(e)}const Yl=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function Ql(e,t,r){if(r<Ll)throw new Error("Expected power > 0");if(r===Ll)return e.ONE;if(r===Ul)return t;let n=e.ONE,i=t;for(;r>Ll;)r&Ul&&(n=e.mul(n,i)),i=e.sqr(i),r>>=Ul;return n}function Jl(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 Xl(e,t){const r=void 0!==t?t:e.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}const $l=BigInt(0),eu=BigInt(1);function tu(e){return function(e){const t=Yl.reduce(((e,t)=>(e[t]="function",e)),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});Bl(e,t)}(e.Fp),Bl(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Xl(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}const ru=BigInt(0),nu=BigInt(1),iu=BigInt(2),ou=BigInt(8),su={zip215:!0};function au(e){const t=function(e){const t=tu(e);return Bl(e,{hash:"function",a:"bigint",d:"bigint",randomBytes:"function"},{adjustScalarBytes:"function",domain:"function",uvRatio:"function",mapToCurve:"function"}),Object.freeze({...t})}(e),{Fp:r,n:n,prehash:i,hash:o,randomBytes:s,nByteLength:a,h:c}=t,l=iu<<BigInt(8*a)-nu,u=r.create,h=t.uvRatio||((e,t)=>{try{return{isValid:!0,value:r.sqrt(e*r.inv(t))}}catch(n){return{isValid:!1,value:ru}}}),d=t.adjustScalarBytes||(e=>e),f=t.domain||((e,t,r)=>{if(t.length||r)throw new Error("Contexts/pre-hash are not supported");return e}),p=e=>"bigint"===typeof e&&ru<e,g=(e,t)=>p(e)&&p(t)&&e<t,m=e=>e===ru||g(e,l);function y(e,t){if(g(e,t))return e;throw new Error("Expected valid scalar < ".concat(t,", got ").concat(typeof e," ").concat(e))}function v(e){return e===ru?e:y(e,n)}const b=new Map;function w(e){if(!(e instanceof E))throw new Error("ExtendedPoint expected")}class E{constructor(e,t,r,n){if(this.ex=e,this.ey=t,this.ez=r,this.et=n,!m(e))throw new Error("x required");if(!m(t))throw new Error("y required");if(!m(r))throw new Error("z required");if(!m(n))throw new Error("t required")}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static fromAffine(e){if(e instanceof E)throw new Error("extended point not allowed");const{x:t,y:r}=e||{};if(!m(t)||!m(r))throw new Error("invalid affine point");return new E(t,r,nu,u(t*r))}static normalizeZ(e){const t=r.invertBatch(e.map((e=>e.ez)));return e.map(((e,r)=>e.toAffine(t[r]))).map(E.fromAffine)}_setWindowSize(e){this._WINDOW_SIZE=e,b.delete(this)}assertValidity(){const{a:e,d:r}=t;if(this.is0())throw new Error("bad point: ZERO");const{ex:n,ey:i,ez:o,et:s}=this,a=u(n*n),c=u(i*i),l=u(o*o),h=u(l*l),d=u(a*e);if(u(l*u(d+c))!==u(h+u(r*u(a*c))))throw new Error("bad point: equation left != right (1)");if(u(n*i)!==u(o*s))throw new Error("bad point: equation left != right (2)")}equals(e){w(e);const{ex:t,ey:r,ez:n}=this,{ex:i,ey:o,ez:s}=e,a=u(t*s),c=u(i*n),l=u(r*s),h=u(o*n);return a===c&&l===h}is0(){return this.equals(E.ZERO)}negate(){return new E(u(-this.ex),this.ey,this.ez,u(-this.et))}double(){const{a:e}=t,{ex:r,ey:n,ez:i}=this,o=u(r*r),s=u(n*n),a=u(iu*u(i*i)),c=u(e*o),l=r+n,h=u(u(l*l)-o-s),d=c+s,f=d-a,p=c-s,g=u(h*f),m=u(d*p),y=u(h*p),v=u(f*d);return new E(g,m,v,y)}add(e){w(e);const{a:r,d:n}=t,{ex:i,ey:o,ez:s,et:a}=this,{ex:c,ey:l,ez:h,et:d}=e;if(r===BigInt(-1)){const e=u((o-i)*(l+c)),t=u((o+i)*(l-c)),r=u(t-e);if(r===ru)return this.double();const n=u(s*iu*d),f=u(a*iu*h),p=f+n,g=t+e,m=f-n,y=u(p*r),v=u(g*m),b=u(p*m),w=u(r*g);return new E(y,v,w,b)}const f=u(i*c),p=u(o*l),g=u(a*n*d),m=u(s*h),y=u((i+o)*(c+l)-f-p),v=m-g,b=m+g,S=u(p-r*f),_=u(y*v),A=u(b*S),k=u(y*S),C=u(v*b);return new E(_,A,C,k)}subtract(e){return this.add(e.negate())}wNAF(e){return A.wNAFCached(this,b,e,E.normalizeZ)}multiply(e){const{p:t,f:r}=this.wNAF(y(e,n));return E.normalizeZ([t,r])[0]}multiplyUnsafe(e){let t=v(e);return t===ru?_:this.equals(_)||t===nu?this:this.equals(S)?this.wNAF(t).p:A.unsafeLadder(this,t)}isSmallOrder(){return this.multiplyUnsafe(c).is0()}isTorsionFree(){return A.unsafeLadder(this,n).is0()}toAffine(e){const{ex:t,ey:n,ez:i}=this,o=this.is0();null==e&&(e=o?ou:r.inv(i));const s=u(t*e),a=u(n*e),c=u(i*e);if(o)return{x:ru,y:nu};if(c!==nu)throw new Error("invZ was invalid");return{x:s,y:a}}clearCofactor(){const{h:e}=t;return e===nu?this:this.multiplyUnsafe(e)}static fromHex(e){let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{d:i,a:o}=t,s=r.BYTES,a=(e=Nl("pointHex",e,s)).slice(),c=e[s-1];a[s-1]=-129&c;const d=Rl(a);d===ru||y(d,n?l:r.ORDER);const f=u(d*d),p=u(f-nu),g=u(i*f-o);let{isValid:m,value:v}=h(p,g);if(!m)throw new Error("Point.fromHex: invalid y coordinate");const b=(v&nu)===nu,w=0!==(128&c);if(!n&&v===ru&&w)throw new Error("Point.fromHex: x=0 and x_0=1");return w!==b&&(v=u(-v)),E.fromAffine({x:v,y:d})}static fromPrivateKey(e){return x(e).point}toRawBytes(){const{x:e,y:t}=this.toAffine(),n=Tl(t,r.BYTES);return n[n.length-1]|=e&nu?128:0,n}toHex(){return kl(this.toRawBytes())}}E.BASE=new E(t.Gx,t.Gy,nu,u(t.Gx*t.Gy)),E.ZERO=new E(ru,nu,nu,ru);const{BASE:S,ZERO:_}=E,A=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>$l;)r&eu&&(n=n.add(i)),i=i.double(),r>>=eu;return n},precomputeWindow(e,t){const{windows:r,windowSize:i}=n(t),o=[];let s=e,a=s;for(let n=0;n<r;n++){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:s,windowSize:a}=n(t);let c=e.ZERO,l=e.BASE;const u=BigInt(2**t-1),h=2**t,d=BigInt(t);for(let e=0;e<s;e++){const t=e*a;let n=Number(o&u);o>>=d,n>a&&(n-=h,o+=eu);const s=t,f=t+Math.abs(n)-1,p=e%2!==0,g=n<0;0===n?l=l.add(r(p,i[s])):c=c.add(r(g,i[f]))}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)}}}(E,8*a);function k(e){return Zl(e,n)}function C(e){return k(Rl(e))}function x(e){const t=a;e=Nl("private key",e,t);const r=Nl("hashed private key",o(e),2*t),n=d(r.slice(0,t)),i=r.slice(t,2*t),s=C(n),c=S.multiply(s),l=c.toRawBytes();return{head:n,prefix:i,scalar:s,point:c,pointBytes:l}}function I(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Uint8Array;for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];const s=Dl(...r);return C(o(f(s,Nl("context",e),!!i)))}const R=su;S._setWindowSize(8);const P={getExtendedPublicKey:x,randomPrivateKey:()=>s(r.BYTES),precompute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:E.BASE;return t._setWindowSize(e),t.multiply(BigInt(3)),t}};return{CURVE:t,getPublicKey:function(e){return x(e).pointBytes},sign:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};e=Nl("message",e),i&&(e=i(e));const{prefix:o,scalar:s,pointBytes:c}=x(t),l=I(n.context,o,e),u=S.multiply(l).toRawBytes(),h=I(n.context,u,c,e),d=k(l+h*s);v(d);const f=Dl(u,Tl(d,r.BYTES));return Nl("result",f,2*a)},verify:function(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:R;const{context:s,zip215:a}=o,c=r.BYTES;e=Nl("signature",e,2*c),t=Nl("message",t),i&&(t=i(t));const l=Rl(e.slice(c,2*c));let u,h,d;try{u=E.fromHex(n,a),h=E.fromHex(e.slice(0,c),a),d=S.multiplyUnsafe(l)}catch(g){return!1}if(!a&&u.isSmallOrder())return!1;const f=I(s,h.toRawBytes(),u.toRawBytes(),t),p=h.add(u.multiplyUnsafe(f));return p.subtract(d).clearCofactor().equals(E.ZERO)},ExtendedPoint:E,utils:P}}const cu=BigInt(0),lu=BigInt(1);function uu(e){const t=(Bl(r=e,{a:"bigint"},{montgomeryBits:"isSafeInteger",nByteLength:"isSafeInteger",adjustScalarBytes:"function",domain:"function",powPminus2:"function",Gu:"bigint"}),Object.freeze({...r}));var r;const{P:n}=t,i=e=>Zl(e,n),o=t.montgomeryBits,s=Math.ceil(o/8),a=t.nByteLength,c=t.adjustScalarBytes||(e=>e),l=t.powPminus2||(e=>Vl(e,n-BigInt(2),n));function u(e,t,r){const n=i(e*(t-r));return[t=i(t-n),r=i(r+n)]}function h(e){if("bigint"===typeof e&&cu<=e&&e<n)return e;throw new Error("Expected valid scalar 0 < scalar < CURVE.P")}const d=(t.a-BigInt(2))/BigInt(4);function f(e){return Tl(i(e),s)}function p(e,t){const r=function(e){const t=Nl("u coordinate",e,s);return a===s&&(t[a-1]&=127),Rl(t)}(t),n=function(e){const t=Nl("scalar",e);if(t.length!==s&&t.length!==a)throw new Error("Expected ".concat(s," or ").concat(a," bytes, got ").concat(t.length));return Rl(c(t))}(e),p=function(e,t){const r=h(e),n=h(t),s=r;let a,c=lu,f=cu,p=r,g=lu,m=cu;for(let l=BigInt(o-1);l>=cu;l--){const e=n>>l&lu;m^=e,a=u(m,c,p),c=a[0],p=a[1],a=u(m,f,g),f=a[0],g=a[1],m=e;const t=c+f,r=i(t*t),o=c-f,h=i(o*o),y=r-h,v=p+g,b=i((p-g)*t),w=i(v*o),E=b+w,S=b-w;p=i(E*E),g=i(s*i(S*S)),c=i(r*h),f=i(y*(r+i(d*y)))}a=u(m,c,p),c=a[0],p=a[1],a=u(m,f,g),f=a[0],g=a[1];const y=l(f);return i(c*y)}(r,n);if(p===cu)throw new Error("Invalid private or public key received");return f(p)}const g=f(t.Gu);function m(e){return p(e,g)}return{scalarMult:p,scalarMultBase:m,getSharedSecret:(e,t)=>p(e,t),getPublicKey:e=>m(e),utils:{randomPrivateKey:()=>t.randomBytes(t.nByteLength)},GuBytes:g}}const hu=BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),du=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752"),fu=(BigInt(0),BigInt(1)),pu=BigInt(2),gu=BigInt(5),mu=BigInt(10),yu=BigInt(20),vu=BigInt(40),bu=BigInt(80);function wu(e){const t=hu,r=e*e%t*e%t,n=Hl(r,pu,t)*r%t,i=Hl(n,fu,t)*e%t,o=Hl(i,gu,t)*i%t,s=Hl(o,mu,t)*o%t,a=Hl(s,yu,t)*s%t,c=Hl(a,vu,t)*a%t,l=Hl(c,bu,t)*c%t,u=Hl(l,bu,t)*c%t,h=Hl(u,mu,t)*o%t;return{pow_p_5_8:Hl(h,pu,t)*e%t,b2:r}}function Eu(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}function Su(e,t){const r=hu,n=Zl(t*t*t,r),i=Zl(n*n*t,r);let o=Zl(e*n*wu(e*i).pow_p_5_8,r);const s=Zl(t*o*o,r),a=o,c=Zl(o*du,r),l=s===e,u=s===Zl(-e,r),h=s===Zl(-e*du,r);return l&&(o=a),(u||h)&&(o=c),(Zl(o,r)&Ul)===Ul&&(o=Zl(-o,r)),{isValid:l||u,value:o}}const _u=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(e<=Ll)throw new Error("Expected Fp ORDER > 0, got ".concat(e));const{nBitLength:i,nByteLength:o}=Xl(e,t);if(o>2048)throw new Error("Field lengths over 2048 bytes are not supported");const s=Gl(e),a=Object.freeze({ORDER:e,BITS:i,BYTES:o,MASK:Ol(i),ZERO:Ll,ONE:Ul,create:t=>Zl(t,e),isValid:t=>{if("bigint"!==typeof t)throw new Error("Invalid field element: expected bigint, got ".concat(typeof t));return Ll<=t&&t<e},is0:e=>e===Ll,isOdd:e=>(e&Ul)===Ul,neg:t=>Zl(-t,e),eql:(e,t)=>e===t,sqr:t=>Zl(t*t,e),add:(t,r)=>Zl(t+r,e),sub:(t,r)=>Zl(t-r,e),mul:(t,r)=>Zl(t*r,e),pow:(e,t)=>Ql(a,e,t),div:(t,r)=>Zl(t*Wl(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>Wl(t,e),sqrt:n.sqrt||(e=>s(a,e)),invertBatch:e=>Jl(a,e),cmov:(e,t,r)=>r?t:e,toBytes:e=>r?Tl(e,o):Pl(e,o),fromBytes:e=>{if(e.length!==o)throw new Error("Fp.fromBytes: expected ".concat(o,", got ").concat(e.length));return r?Rl(e):Il(e)}});return Object.freeze(a)}(hu,void 0,!0),Au={a:BigInt(-1),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),Fp:_u,n:BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),h:BigInt(8),Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960"),hash:wl,randomBytes:oc,adjustScalarBytes:Eu,uvRatio:Su};au(Au);function ku(e,t,r){if(t.length>255)throw new Error("Context is too big");return function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];const n=new Uint8Array(t.reduce(((e,t)=>e+t.length),0));let i=0;return t.forEach((e=>{if(!Xa(e))throw new Error("Uint8Array expected");n.set(e,i),i+=e.length})),n}(tc("SigEd25519 no Ed25519 collisions"),new Uint8Array([r?1:0,t.length]),t,e)}au({...Au,domain:ku}),au({...Au,domain:ku,prehash:wl});const Cu=(()=>uu({P:hu,a:BigInt(486662),montgomeryBits:255,nByteLength:32,Gu:BigInt(9),powPminus2:e=>{const t=hu,{pow_p_5_8:r,b2:n}=wu(e);return Zl(Hl(r,BigInt(3),t)*n,t)},adjustScalarBytes:Eu,randomBytes:oc}))();const xu=(_u.ORDER+BigInt(3))/BigInt(8);_u.pow(pu,xu),_u.sqrt(_u.neg(_u.ONE)),_u.ORDER,BigInt(5),BigInt(8),BigInt(486662);!function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const r=e.sqrt(t);e.isOdd(r)&&e.neg(r)}(_u,_u.neg(BigInt(486664)));BigInt("25063068953384623474111414158702152701244531502492656460079210482610430750235"),BigInt("54469307008909316920995813868745141605393597292927456921205312896311721017578"),BigInt("1159843021668779879193775521855586647937357759715417654439879720876111806838"),BigInt("40440834346308536858101042469323190826248399146238708352240133220865137265952"),BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");class Iu extends nc{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,Qa.hash(e);const r=rc(t);if(this.iHash=e.create(),"function"!==typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const n=this.blockLen,i=new Uint8Array(n);i.set(r.length>n?e.create().update(r).digest():r);for(let o=0;o<i.length;o++)i[o]^=54;this.iHash.update(i),this.oHash=e.create();for(let o=0;o<i.length;o++)i[o]^=106;this.oHash.update(i),i.fill(0)}update(e){return Qa.exists(this),this.iHash.update(e),this}digestInto(e){Qa.exists(this),Qa.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()}}const Ru=(e,t,r)=>new Iu(e,t).update(r).digest();function Pu(e,t,r){return Qa.hash(e),void 0===r&&(r=new Uint8Array(e.outputLen)),Ru(e,rc(r),rc(t))}Ru.create=(e,t)=>new Iu(e,t);const Tu=new Uint8Array([0]),Nu=new Uint8Array;function Du(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:32;if(Qa.hash(e),Qa.number(n),n>255*e.outputLen)throw new Error("Length should be <= 255*HashLen");const i=Math.ceil(n/e.outputLen);void 0===r&&(r=Nu);const o=new Uint8Array(i*e.outputLen),s=Ru.create(e,t),a=s._cloneInto(),c=new Uint8Array(s.outputLen);for(let l=0;l<i;l++)Tu[0]=l+1,a.update(0===l?Nu:c).update(r).update(Tu).digestInto(c),o.set(c,e.outputLen*l),s._cloneInto(a);return s.destroy(),a.destroy(),c.fill(0),Tu.fill(0),o.slice(0,n)}const Ou={hashSHA256:e=>fc(e),getHKDF(e,t){const r=Pu(fc,t,e),n=Du(fc,r,void 0,96);return[n.subarray(0,32),n.subarray(32,64),n.subarray(64,96)]},generateX25519KeyPair(){const e=Cu.utils.randomPrivateKey();return{publicKey:Cu.getPublicKey(e),privateKey:e}},generateX25519KeyPairFromSeed:e=>({publicKey:Cu.getPublicKey(e),privateKey:e}),generateX25519SharedKey:(e,t)=>Cu.getSharedSecret(e,t),chaCha20Poly1305Encrypt:(e,t,r,n)=>al(n,t,r).encrypt(e),chaCha20Poly1305Decrypt(e,t,r,n,i){const o=al(n,t,r).decrypt(e);return i?(i.set(o),o):o}},Mu=e=>{const t=(r=2,globalThis.Buffer?globalThis.Buffer.allocUnsafe(r):new Uint8Array(r));var r;return new DataView(t.buffer,t.byteOffset,t.byteLength).setUint16(0,e,!1),t};Mu.bytes=2;const Bu=e=>{if(e.length<2)throw RangeError("Could not decode int16BE");return e instanceof Uint8Array?new DataView(e.buffer,e.byteOffset,e.byteLength).getUint16(0,!1):e.getUint16(0)};Bu.bytes=2;class Lu extends Error{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Unexpected Peer"),(0,W.Z)(this,"code",void 0),this.code=Lu.code}}(0,W.Z)(Lu,"code","ERR_UNEXPECTED_PEER");class Uu extends Error{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Invalid crypto exchange"),(0,W.Z)(this,"code",void 0),this.code=Uu.code}}(0,W.Z)(Uu,"code","ERR_INVALID_CRYPTO_EXCHANGE");class Fu extends Error{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Invalid crypto transmission"),(0,W.Z)(this,"code",void 0),this.code=Fu.code}}(0,W.Z)(Fu,"code","ERR_INVALID_CRYPTO_TRANSMISSION");__webpack_require__(5419),__webpack_require__(6443);class ju extends Error{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"The operation was aborted"),(0,W.Z)(this,"code",void 0),(0,W.Z)(this,"type",void 0),this.code=ju.code,this.type=ju.type}}(0,W.Z)(ju,"code","ABORT_ERR"),(0,W.Z)(ju,"type","aborted");class zu extends Error{constructor(e,t,r){var n;super(e),(0,W.Z)(this,"code",void 0),(0,W.Z)(this,"props",void 0),this.code=t,this.name=null!==(n=null===r||void 0===r?void 0:r.name)&&void 0!==n?n:"CodeError",this.props=null!==r&&void 0!==r?r:{}}}var Ku=__webpack_require__(428);var qu=function(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<e.length;i++){var o=e.charAt(i),s=o.charCodeAt(0);if(255!==r[s])throw new TypeError(o+" is ambiguous");r[s]=i}var a=e.length,c=e.charAt(0),l=Math.log(a)/Math.log(256),u=Math.log(256)/Math.log(a);function h(e){if("string"!==typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;var t=0;if(" "!==e[t]){for(var n=0,i=0;e[t]===c;)n++,t++;for(var o=(e.length-t)*l+1>>>0,s=new Uint8Array(o);e[t];){var u=r[e.charCodeAt(t)];if(255===u)return;for(var h=0,d=o-1;(0!==u||h<i)&&-1!==d;d--,h++)u+=a*s[d]>>>0,s[d]=u%256>>>0,u=u/256>>>0;if(0!==u)throw new Error("Non-zero carry");i=h,t++}if(" "!==e[t]){for(var f=o-i;f!==o&&0===s[f];)f++;for(var p=new Uint8Array(n+(o-f)),g=n;f!==o;)p[g++]=s[f++];return p}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var r=0,n=0,i=0,o=t.length;i!==o&&0===t[i];)i++,r++;for(var s=(o-i)*u+1>>>0,l=new Uint8Array(s);i!==o;){for(var h=t[i],d=0,f=s-1;(0!==h||d<n)&&-1!==f;f--,d++)h+=256*l[f]>>>0,l[f]=h%a>>>0,h=h/a>>>0;if(0!==h)throw new Error("Non-zero carry");n=d,i++}for(var p=s-n;p!==s&&0===l[p];)p++;for(var g=c.repeat(r);p<s;++p)g+=e.charAt(l[p]);return g},decodeUnsafe:h,decode:function(e){var r=h(e);if(r)return r;throw new Error("Non-".concat(t," character"))}}};const Zu=qu,Vu=(new Uint8Array(0),e=>{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")});class Hu{constructor(e,t,r){this.name=e,this.prefix=t,this.baseEncode=r}encode(e){if(e instanceof Uint8Array)return"".concat(this.prefix).concat(this.baseEncode(e));throw Error("Unknown type, must be binary type")}}class Wu{constructor(e,t,r){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=r}decode(e){if("string"===typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error("Unable to decode multibase string ".concat(JSON.stringify(e),", ").concat(this.name," decoder only supports inputs prefixed with ").concat(this.prefix));return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return Yu(this,e)}}class Gu{constructor(e){this.decoders=e}or(e){return Yu(this,e)}decode(e){const t=e[0],r=this.decoders[t];if(r)return r.decode(e);throw RangeError("Unable to decode multibase string ".concat(JSON.stringify(e),", only inputs prefixed with ").concat(Object.keys(this.decoders)," are supported"))}}const Yu=(e,t)=>new Gu({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class Qu{constructor(e,t,r,n){this.name=e,this.prefix=t,this.baseEncode=r,this.baseDecode=n,this.encoder=new Hu(e,t,r),this.decoder=new Wu(e,t,n)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const Ju=e=>{let{name:t,prefix:r,encode:n,decode:i}=e;return new Qu(t,r,n,i)},Xu=e=>{let{prefix:t,name:r,alphabet:n}=e;const{encode:i,decode:o}=Zu(n,r);return Ju({prefix:t,name:r,encode:i,decode:e=>Vu(o(e))})},$u=e=>{let{name:t,prefix:r,bitsPerChar:n,alphabet:i}=e;return Ju({prefix:r,name:t,encode:e=>((e,t,r)=>{const n="="===t[t.length-1],i=(1<<r)-1;let o="",s=0,a=0;for(let c=0;c<e.length;++c)for(a=a<<8|e[c],s+=8;s>r;)s-=r,o+=t[i&a>>s];if(s&&(o+=t[i&a<<r-s]),n)for(;o.length*r&7;)o+="=";return o})(e,i,n),decode:e=>((e,t,r,n)=>{const i={};for(let u=0;u<t.length;++u)i[t[u]]=u;let o=e.length;for(;"="===e[o-1];)--o;const s=new Uint8Array(o*r/8|0);let a=0,c=0,l=0;for(let u=0;u<o;++u){const t=i[e[u]];if(void 0===t)throw new SyntaxError("Non-".concat(n," character"));c=c<<r|t,a+=r,a>=8&&(a-=8,s[l++]=255&c>>a)}if(a>=r||255&c<<8-a)throw new SyntaxError("Unexpected end of data");return s})(e,i,n,t)})},eh=Xu({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),th=Xu({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var rh=function e(t,r,n){r=r||[];var i=n=n||0;for(;t>=nh;)r[n++]=255&t|128,t/=128;for(;-128&t;)r[n++]=255&t|128,t>>>=7;return r[n]=0|t,e.bytes=n-i+1,r},nh=Math.pow(2,31);var ih=function e(t,r){var n,i=0,o=0,s=r=r||0,a=t.length;do{if(s>=a)throw e.bytes=0,new RangeError("Could not decode varint");n=t[s++],i+=o<28?(127&n)<<o:(127&n)*Math.pow(2,o),o+=7}while(n>=128);return e.bytes=s-r,i};var oh=Math.pow(2,7),sh=Math.pow(2,14),ah=Math.pow(2,21),ch=Math.pow(2,28),lh=Math.pow(2,35),uh=Math.pow(2,42),hh=Math.pow(2,49),dh=Math.pow(2,56),fh=Math.pow(2,63);const ph={encode:rh,decode:ih,encodingLength:function(e){return e<oh?1:e<sh?2:e<ah?3:e<ch?4:e<lh?5:e<uh?6:e<hh?7:e<dh?8:e<fh?9:10}},gh=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const r=ph.decode(e,t);return[r,ph.decode.bytes]},mh=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return ph.encode(e,t,r),t},yh=e=>ph.encodingLength(e),vh=(e,t)=>{const r=t.byteLength,n=yh(e),i=n+yh(r),o=new Uint8Array(i+r);return mh(e,o,0),mh(r,o,n),o.set(t,i),new wh(e,r,t,o)},bh=e=>{const t=Vu(e),[r,n]=gh(t),[i,o]=gh(t.subarray(n)),s=t.subarray(n+o);if(s.byteLength!==i)throw new Error("Incorrect length");return new wh(r,i,s,t)};class wh{constructor(e,t,r,n){this.code=e,this.size=t,this.digest=r,this.bytes=n}}const Eh=Vu,Sh={code:0,name:"identity",encode:Eh,digest:e=>vh(0,Eh(e))},_h=e=>{let{name:t,code:r,encode:n}=e;return new Ah(t,r,n)};class Ah{constructor(e,t,r){this.name=e,this.code=t,this.encode=r}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?vh(this.code,t):t.then((e=>vh(this.code,e)))}throw Error("Unknown type, must be binary type")}}const kh=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),Ch=_h({name:"sha2-256",code:18,encode:kh("SHA-256")}),xh=_h({name:"sha2-512",code:19,encode:kh("SHA-512")});var Ih=__webpack_require__(7420),Rh=__webpack_require__.t(Ih,2);const Ph=BigInt(0),Th=BigInt(1),Nh=BigInt(2),Dh=BigInt(8),Oh=BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),Mh=Object.freeze({a:BigInt(-1),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),P:BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),l:Oh,n:Oh,h:BigInt(8),Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960")}),Bh=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000"),Lh=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752"),Uh=(BigInt("6853475219497561581579357271197624642482790079785650197046958215289687604742"),BigInt("25063068953384623474111414158702152701244531502492656460079210482610430750235")),Fh=BigInt("54469307008909316920995813868745141605393597292927456921205312896311721017578"),jh=BigInt("1159843021668779879193775521855586647937357759715417654439879720876111806838"),zh=BigInt("40440834346308536858101042469323190826248399146238708352240133220865137265952");class Kh{constructor(e,t,r,n){this.x=e,this.y=t,this.z=r,this.t=n}static fromAffine(e){if(!(e instanceof Yh))throw new TypeError("ExtendedPoint#fromAffine: expected Point");return e.equals(Yh.ZERO)?Kh.ZERO:new Kh(e.x,e.y,Th,ad(e.x*e.y))}static toAffineBatch(e){const t=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Mh.P;const r=new Array(e.length),n=cd(e.reduce(((e,n,i)=>n===Ph?e:(r[i]=e,ad(e*n,t))),Th),t);return e.reduceRight(((e,n,i)=>n===Ph?e:(r[i]=ad(e*r[i],t),ad(e*n,t))),n),r}(e.map((e=>e.z)));return e.map(((e,r)=>e.toAffine(t[r])))}static normalizeZ(e){return this.toAffineBatch(e).map(this.fromAffine)}equals(e){Zh(e);const{x:t,y:r,z:n}=this,{x:i,y:o,z:s}=e,a=ad(t*s),c=ad(i*n),l=ad(r*s),u=ad(o*n);return a===c&&l===u}negate(){return new Kh(ad(-this.x),this.y,this.z,ad(-this.t))}double(){const{x:e,y:t,z:r}=this,{a:n}=Mh,i=ad(e*e),o=ad(t*t),s=ad(Nh*ad(r*r)),a=ad(n*i),c=e+t,l=ad(ad(c*c)-i-o),u=a+o,h=u-s,d=a-o,f=ad(l*h),p=ad(u*d),g=ad(l*d),m=ad(h*u);return new Kh(f,p,m,g)}add(e){Zh(e);const{x:t,y:r,z:n,t:i}=this,{x:o,y:s,z:a,t:c}=e,l=ad((r-t)*(s+o)),u=ad((r+t)*(s-o)),h=ad(u-l);if(h===Ph)return this.double();const d=ad(n*Nh*c),f=ad(i*Nh*a),p=f+d,g=u+l,m=f-d,y=ad(p*h),v=ad(g*m),b=ad(p*m),w=ad(h*g);return new Kh(y,v,w,b)}subtract(e){return this.add(e.negate())}precomputeWindow(e){const t=1+256/e,r=[];let n=this,i=n;for(let o=0;o<t;o++){i=n,r.push(i);for(let t=1;t<2**(e-1);t++)i=i.add(n),r.push(i);n=i.double()}return r}wNAF(e,t){!t&&this.equals(Kh.BASE)&&(t=Yh.BASE);const r=t&&t._WINDOW_SIZE||1;if(256%r)throw new Error("Point#wNAF: Invalid precomputation window, must be power of 2");let n=t&&Gh.get(t);n||(n=this.precomputeWindow(r),t&&1!==r&&(n=Kh.normalizeZ(n),Gh.set(t,n)));let i=Kh.ZERO,o=Kh.BASE;const s=1+256/r,a=2**(r-1),c=BigInt(2**r-1),l=2**r,u=BigInt(r);for(let h=0;h<s;h++){const t=h*a;let r=Number(e&c);e>>=u,r>a&&(r-=l,e+=Th);const s=t,d=t+Math.abs(r)-1,f=h%2!==0,p=r<0;0===r?o=o.add(qh(f,n[s])):i=i.add(qh(p,n[d]))}return Kh.normalizeZ([i,o])[0]}multiply(e,t){return this.wNAF(gd(e,Mh.l),t)}multiplyUnsafe(e){let t=gd(e,Mh.l,!1);const r=Kh.BASE,n=Kh.ZERO;if(t===Ph)return n;if(this.equals(n)||t===Th)return this;if(this.equals(r))return this.wNAF(t);let i=n,o=this;for(;t>Ph;)t&Th&&(i=i.add(o)),o=o.double(),t>>=Th;return i}isSmallOrder(){return this.multiplyUnsafe(Mh.h).equals(Kh.ZERO)}isTorsionFree(){let e=this.multiplyUnsafe(Mh.l/Nh).double();return Mh.l%Nh&&(e=e.add(this)),e.equals(Kh.ZERO)}toAffine(e){const{x:t,y:r,z:n}=this,i=this.equals(Kh.ZERO);null==e&&(e=i?Dh:cd(n));const o=ad(t*e),s=ad(r*e),a=ad(n*e);if(i)return Yh.ZERO;if(a!==Th)throw new Error("invZ was invalid");return new Yh(o,s)}fromRistrettoBytes(){Hh()}toRistrettoBytes(){Hh()}fromRistrettoHash(){Hh()}}function qh(e,t){const r=t.negate();return e?r:t}function Zh(e){if(!(e instanceof Kh))throw new TypeError("ExtendedPoint expected")}function Vh(e){if(!(e instanceof Wh))throw new TypeError("RistrettoPoint expected")}function Hh(){throw new Error("Legacy method: switch to RistrettoPoint")}Kh.BASE=new Kh(Mh.Gx,Mh.Gy,Th,ad(Mh.Gx*Mh.Gy)),Kh.ZERO=new Kh(Ph,Th,Th,Ph);class Wh{constructor(e){this.ep=e}static calcElligatorRistrettoMap(e){const{d:t}=Mh,r=ad(Lh*e*e),n=ad((r+Th)*jh);let i=BigInt(-1);const o=ad((i-t*r)*ad(r+t));let{isValid:s,value:a}=hd(n,o),c=ad(a*e);nd(c)||(c=ad(-c)),s||(a=c),s||(i=r);const l=ad(i*(r-Th)*zh-o),u=a*a,h=ad((a+a)*o),d=ad(l*Uh),f=ad(Th-u),p=ad(Th+u);return new Kh(ad(h*p),ad(f*d),ad(d*p),ad(h*f))}static hashToCurve(e){const t=sd((e=pd(e,64)).slice(0,32)),r=this.calcElligatorRistrettoMap(t),n=sd(e.slice(32,64)),i=this.calcElligatorRistrettoMap(n);return new Wh(r.add(i))}static fromHex(e){e=pd(e,32);const{a:t,d:r}=Mh,n="RistrettoPoint.fromHex: the hex is not valid encoding of RistrettoPoint",i=sd(e);if(!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}(rd(i),e)||nd(i))throw new Error(n);const o=ad(i*i),s=ad(Th+t*o),a=ad(Th-t*o),c=ad(s*s),l=ad(a*a),u=ad(t*r*c-l),{isValid:h,value:d}=dd(ad(u*l)),f=ad(d*a),p=ad(d*f*u);let g=ad((i+i)*f);nd(g)&&(g=ad(-g));const m=ad(s*p),y=ad(g*m);if(!h||nd(y)||m===Ph)throw new Error(n);return new Wh(new Kh(g,m,Th,y))}toRawBytes(){let{x:e,y:t,z:r,t:n}=this.ep;const i=ad(ad(r+t)*ad(r-t)),o=ad(e*t),s=ad(o*o),{value:a}=dd(ad(i*s)),c=ad(a*i),l=ad(a*o),u=ad(c*l*n);let h;if(nd(n*u)){let r=ad(t*Lh),n=ad(e*Lh);e=r,t=n,h=ad(c*Fh)}else h=l;nd(e*u)&&(t=ad(-t));let d=ad((r-t)*h);return nd(d)&&(d=ad(-d)),rd(d)}toHex(){return $h(this.toRawBytes())}toString(){return this.toHex()}equals(e){Vh(e);const t=this.ep,r=e.ep,n=ad(t.x*r.y)===ad(t.y*r.x),i=ad(t.y*r.y)===ad(t.x*r.x);return n||i}add(e){return Vh(e),new Wh(this.ep.add(e.ep))}subtract(e){return Vh(e),new Wh(this.ep.subtract(e.ep))}multiply(e){return new Wh(this.ep.multiply(e))}multiplyUnsafe(e){return new Wh(this.ep.multiplyUnsafe(e))}}Wh.BASE=new Wh(Kh.BASE),Wh.ZERO=new Wh(Kh.ZERO);const Gh=new WeakMap;class Yh{constructor(e,t){this.x=e,this.y=t}_setWindowSize(e){this._WINDOW_SIZE=e,Gh.delete(this)}static fromHex(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const{d:r,P:n}=Mh,i=(e=pd(e,32)).slice();i[31]=-129&e[31];const o=id(i);if(t&&o>=n)throw new Error("Expected 0 < hex < P");if(!t&&o>=Bh)throw new Error("Expected 0 < hex < 2**256");const s=ad(o*o),a=ad(s-Th),c=ad(r*s+Th);let{isValid:l,value:u}=hd(a,c);if(!l)throw new Error("Point.fromHex: invalid y coordinate");const h=(u&Th)===Th;return 0!==(128&e[31])!==h&&(u=ad(-u)),new Yh(u,o)}static async fromPrivateKey(e){return(await wd(e)).point}toRawBytes(){const e=rd(this.y);return e[31]|=this.x&Th?128:0,e}toHex(){return $h(this.toRawBytes())}toX25519(){const{y:e}=this;return rd(ad((Th+e)*cd(Th-e)))}isTorsionFree(){return Kh.fromAffine(this).isTorsionFree()}equals(e){return this.x===e.x&&this.y===e.y}negate(){return new Yh(ad(-this.x),this.y)}add(e){return Kh.fromAffine(this).add(Kh.fromAffine(e)).toAffine()}subtract(e){return this.add(e.negate())}multiply(e){return Kh.fromAffine(this).multiply(e,this).toAffine()}}Yh.BASE=new Yh(Mh.Gx,Mh.Gy),Yh.ZERO=new Yh(Ph,Th);class Qh{constructor(e,t){this.r=e,this.s=t,this.assertValidity()}static fromHex(e){const t=pd(e,64),r=Yh.fromHex(t.slice(0,32),!1),n=id(t.slice(32,64));return new Qh(r,n)}assertValidity(){const{r:e,s:t}=this;if(!(e instanceof Yh))throw new Error("Expected Point instance");return gd(t,Mh.l,!1),this}toRawBytes(){const e=new Uint8Array(64);return e.set(this.r.toRawBytes()),e.set(rd(this.s),32),e}toHex(){return $h(this.toRawBytes())}}function Jh(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];if(!t.every((e=>e instanceof Uint8Array)))throw new Error("Expected Uint8Array list");if(1===t.length)return t[0];const n=t.reduce(((e,t)=>e+t.length),0),i=new Uint8Array(n);for(let o=0,s=0;o<t.length;o++){const e=t[o];i.set(e,s),s+=e.length}return i}const Xh=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function $h(e){if(!(e instanceof Uint8Array))throw new Error("Uint8Array expected");let t="";for(let r=0;r<e.length;r++)t+=Xh[e[r]];return t}function ed(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}function td(e){return ed(e.toString(16).padStart(64,"0"))}function rd(e){return td(e).reverse()}function nd(e){return(ad(e)&Th)===Th}function id(e){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");return BigInt("0x"+$h(Uint8Array.from(e).reverse()))}const od=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function sd(e){return ad(id(e)&od)}function ad(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Mh.P;const r=e%t;return r>=Ph?r:t+r}function cd(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Mh.P;if(e===Ph||t<=Ph)throw new Error("invert: expected positive integers, got n=".concat(e," mod=").concat(t));let r=ad(e,t),n=t,i=Ph,o=Th,s=Th,a=Ph;for(;r!==Ph;){const e=n/r,t=n%r,c=i-s*e,l=o-a*e;n=r,r=t,i=s,o=a,s=c,a=l}const c=n;if(c!==Th)throw new Error("invert: does not exist");return ad(i,t)}function ld(e,t){const{P:r}=Mh;let n=e;for(;t-- >Ph;)n*=n,n%=r;return n}function ud(e){const{P:t}=Mh,r=BigInt(5),n=BigInt(10),i=BigInt(20),o=BigInt(40),s=BigInt(80),a=e*e%t*e%t,c=ld(a,Nh)*a%t,l=ld(c,Th)*e%t,u=ld(l,r)*l%t,h=ld(u,n)*u%t,d=ld(h,i)*h%t,f=ld(d,o)*d%t,p=ld(f,s)*f%t,g=ld(p,s)*f%t,m=ld(g,n)*u%t;return{pow_p_5_8:ld(m,Nh)*e%t,b2:a}}function hd(e,t){const r=ad(t*t*t),n=ad(r*r*t);let i=ad(e*r*ud(e*n).pow_p_5_8);const o=ad(t*i*i),s=i,a=ad(i*Lh),c=o===e,l=o===ad(-e),u=o===ad(-e*Lh);return c&&(i=s),(l||u)&&(i=a),nd(i)&&(i=ad(-i)),{isValid:c||l,value:i}}function dd(e){return hd(Th,e)}function fd(e){return ad(id(e),Mh.l)}function pd(e,t){const r=e instanceof Uint8Array?Uint8Array.from(e):ed(e);if("number"===typeof t&&r.length!==t)throw new Error("Expected ".concat(t," bytes"));return r}function gd(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!t)throw new TypeError("Specify max value");if("number"===typeof e&&Number.isSafeInteger(e)&&(e=BigInt(e)),"bigint"===typeof e&&e<t)if(r){if(Ph<e)return e}else if(Ph<=e)return e;throw new TypeError("Expected valid scalar: 0 < scalar < max")}function md(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}function yd(e){if(32!==(e="bigint"===typeof e||"number"===typeof e?td(gd(e,Bh)):pd(e)).length)throw new Error("Expected 32 bytes");return e}function vd(e){const t=md(e.slice(0,32)),r=e.slice(32,64),n=fd(t),i=Yh.BASE.multiply(n),o=i.toRawBytes();return{head:t,prefix:r,scalar:n,point:i,pointBytes:o}}let bd;async function wd(e){return vd(await kd.sha512(yd(e)))}async function Ed(e){return(await wd(e)).pointBytes}function Sd(e,t,r){t=pd(t),r instanceof Yh||(r=Yh.fromHex(r,!1));const{r:n,s:i}=e instanceof Qh?e.assertValidity():Qh.fromHex(e);return{r:n,s:i,SB:Kh.BASE.multiplyUnsafe(i),pub:r,msg:t}}function _d(e,t,r,n){const i=fd(n),o=Kh.fromAffine(e).multiplyUnsafe(i);return Kh.fromAffine(t).add(o).subtract(r).multiplyUnsafe(Mh.h).equals(Kh.ZERO)}Yh.BASE._setWindowSize(8);const Ad={node:Rh,web:"object"===typeof self&&"crypto"in self?self.crypto:void 0},kd={bytesToHex:$h,hexToBytes:ed,concatBytes:Jh,getExtendedPublicKey:wd,mod:ad,invert:cd,TORSION_SUBGROUP:["0100000000000000000000000000000000000000000000000000000000000000","c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac037a","0000000000000000000000000000000000000000000000000000000000000080","26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc05","ecffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f","26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc85","0000000000000000000000000000000000000000000000000000000000000000","c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac03fa"],hashToPrivateScalar:e=>{if((e=pd(e)).length<40||e.length>1024)throw new Error("Expected 40-1024 bytes of private key as per FIPS 186");return ad(id(e),Mh.l-Th)+Th},randomBytes:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:32;if(Ad.web)return Ad.web.getRandomValues(new Uint8Array(e));if(Ad.node){const{randomBytes:t}=Ad.node;return new Uint8Array(t(e).buffer)}throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>kd.randomBytes(32),sha512:async function(){const e=Jh(...arguments);if(Ad.web){const t=await Ad.web.subtle.digest("SHA-512",e.buffer);return new Uint8Array(t)}if(Ad.node)return Uint8Array.from(Ad.node.createHash("sha512").update(e).digest());throw new Error("The environment doesn't have sha512 function")},precompute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Yh.BASE;const r=t.equals(Yh.BASE)?t:new Yh(t.x,t.y);return r._setWindowSize(e),r.multiply(Nh),r},sha512Sync:void 0};Object.defineProperties(kd,{sha512Sync:{configurable:!1,get:()=>bd,set(e){bd||(bd=e)}}});const Cd=64;async function xd(e,t){return async function(e,t){e=pd(e);const{prefix:r,scalar:n,pointBytes:i}=await wd(t),o=fd(await kd.sha512(r,e)),s=Yh.BASE.multiply(o),a=ad(o+fd(await kd.sha512(s.toRawBytes(),i,e))*n,Mh.l);return new Qh(s,a).toRawBytes()}(t,e.subarray(0,32))}async function Id(e,t,r){return async function(e,t,r){const{r:n,SB:i,msg:o,pub:s}=Sd(e,t,r),a=await kd.sha512(n.toRawBytes(),s.toRawBytes(),o);return _d(s,n,i,a)}(t,r,e)}function Rd(e,t){const r=new Uint8Array(Cd);for(let n=0;n<32;n++)r[n]=e[n],r[32+n]=t[n];return r}const Pd=$u({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),Td=$u({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Nd=$u({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Dd=$u({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),Od={get(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:globalThis).crypto;if(null==e||null==e.subtle)throw Object.assign(new Error("Missing Web Crypto API. The most likely cause of this error is that this page is being accessed from an insecure context (i.e. not HTTPS). For more information and possible resolutions see https://github.com/libp2p/js-libp2p-crypto/blob/master/README.md#web-crypto-api"),{code:"ERR_MISSING_WEB_CRYPTO"});return e}},Md={alg:"A128GCM",ext:!0,k:"scm9jmO_4BJAgdwWGVulLg",key_ops:["encrypt","decrypt"],kty:"oct"};function Bd(e){var t,r,n,i,o,s;const a=null!==(t=null===e||void 0===e?void 0:e.algorithm)&&void 0!==t?t:"AES-GCM";let c=null!==(r=null===e||void 0===e?void 0:e.keyLength)&&void 0!==r?r:16;const l=null!==(n=null===e||void 0===e?void 0:e.nonceLength)&&void 0!==n?n:12,u=null!==(i=null===e||void 0===e?void 0:e.digest)&&void 0!==i?i:"SHA-256",h=null!==(o=null===e||void 0===e?void 0:e.saltLength)&&void 0!==o?o:16,d=null!==(s=null===e||void 0===e?void 0:e.iterations)&&void 0!==s?s:32767,f=Od.get();c*=8;return{encrypt:async function(e,t){const r=f.getRandomValues(new Uint8Array(h)),n=f.getRandomValues(new Uint8Array(l)),i={name:a,iv:n};let o;if("string"===typeof t&&(t=xn(t)),0===t.length){o=await f.subtle.importKey("jwk",Md,{name:"AES-GCM"},!0,["encrypt"]);try{const e={name:"PBKDF2",salt:r,iterations:d,hash:{name:u}},n=await f.subtle.importKey("raw",t,{name:"PBKDF2"},!1,["deriveKey"]);o=await f.subtle.deriveKey(e,n,{name:a,length:c},!0,["encrypt"])}catch{o=await f.subtle.importKey("jwk",Md,{name:"AES-GCM"},!0,["encrypt"])}}else{const e={name:"PBKDF2",salt:r,iterations:d,hash:{name:u}},n=await f.subtle.importKey("raw",t,{name:"PBKDF2"},!1,["deriveKey"]);o=await f.subtle.deriveKey(e,n,{name:a,length:c},!0,["encrypt"])}const s=await f.subtle.encrypt(i,o,e);return No([r,i.iv,new Uint8Array(s)])},decrypt:async function(e,t){const r=e.subarray(0,h),n=e.subarray(h,h+l),i=e.subarray(h+l),o={name:a,iv:n};let s;if("string"===typeof t&&(t=xn(t)),0===t.length)try{const e={name:"PBKDF2",salt:r,iterations:d,hash:{name:u}},n=await f.subtle.importKey("raw",t,{name:"PBKDF2"},!1,["deriveKey"]);s=await f.subtle.deriveKey(e,n,{name:a,length:c},!0,["decrypt"])}catch{s=await f.subtle.importKey("jwk",Md,{name:"AES-GCM"},!0,["decrypt"])}else{const e={name:"PBKDF2",salt:r,iterations:d,hash:{name:u}},n=await f.subtle.importKey("raw",t,{name:"PBKDF2"},!1,["deriveKey"]);s=await f.subtle.deriveKey(e,n,{name:a,length:c},!0,["decrypt"])}const p=await f.subtle.decrypt(o,s,i);return new Uint8Array(p)}}}async function Ld(e,t){const r=Bd(),n=await r.encrypt(e,t);return Pd.encode(n)}var Ud,Fd,jd,zd;!function(e){e.RSA="RSA",e.Ed25519="Ed25519",e.Secp256k1="Secp256k1"}(Ud||(Ud={})),function(e){e[e.RSA=0]="RSA",e[e.Ed25519=1]="Ed25519",e[e.Secp256k1=2]="Secp256k1"}(Fd||(Fd={})),function(e){e.codec=()=>Be(Fd)}(Ud||(Ud={})),function(e){let t;e.codec=()=>(null==t&&(t=Le((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!1!==r.lengthDelimited&&t.fork(),null!=e.Type&&(t.uint32(8),Ud.codec().encode(e.Type,t)),null!=e.Data&&(t.uint32(18),t.bytes(e.Data)),!1!==r.lengthDelimited&&t.ldelim()}),((e,t)=>{const r={},n=null==t?e.len:e.pos+t;for(;e.pos<n;){const t=e.uint32();switch(t>>>3){case 1:r.Type=Ud.codec().decode(e);break;case 2:r.Data=e.bytes();break;default:e.skipType(7&t)}}return r}))),t),e.encode=t=>ne(t,e.codec()),e.decode=t=>re(t,e.codec())}(jd||(jd={})),function(e){let t;e.codec=()=>(null==t&&(t=Le((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!1!==r.lengthDelimited&&t.fork(),null!=e.Type&&(t.uint32(8),Ud.codec().encode(e.Type,t)),null!=e.Data&&(t.uint32(18),t.bytes(e.Data)),!1!==r.lengthDelimited&&t.ldelim()}),((e,t)=>{const r={},n=null==t?e.len:e.pos+t;for(;e.pos<n;){const t=e.uint32();switch(t>>>3){case 1:r.Type=Ud.codec().decode(e);break;case 2:r.Data=e.bytes();break;default:e.skipType(7&t)}}return r}))),t),e.encode=t=>ne(t,e.codec()),e.decode=t=>re(t,e.codec())}(zd||(zd={}));class Kd{constructor(e){(0,W.Z)(this,"_key",void 0),this._key=Gd(e,32)}async verify(e,t){return Id(this._key,t,e)}marshal(){return this._key}get bytes(){return jd.encode({Type:Ud.Ed25519,Data:this.marshal()}).subarray()}equals(e){return wi(this.bytes,e.bytes)}async hash(){const{bytes:e}=await Ch.digest(this.bytes);return e}}class qd{constructor(e,t){(0,W.Z)(this,"_key",void 0),(0,W.Z)(this,"_publicKey",void 0),this._key=Gd(e,Cd),this._publicKey=Gd(t,32)}async sign(e){return xd(this._key,e)}get public(){return new Kd(this._publicKey)}marshal(){return this._key}get bytes(){return zd.encode({Type:Ud.Ed25519,Data:this.marshal()}).subarray()}equals(e){return wi(this.bytes,e.bytes)}async hash(){const{bytes:e}=await Ch.digest(this.bytes);return e}async id(){const e=Sh.digest(this.public.bytes);return eh.encode(e.bytes).substring(1)}async export(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"libp2p-key";if("libp2p-key"===t)return Ld(this.bytes,e);throw new zu("export format '".concat(t,"' is not supported"),"ERR_INVALID_EXPORT_FORMAT")}}function Zd(e){if(e.length>Cd){const t=(e=Gd(e,96)).subarray(0,Cd),r=e.subarray(Cd,e.length);return new qd(t,r)}const t=(e=Gd(e,Cd)).subarray(0,Cd),r=e.subarray(32);return new qd(t,r)}function Vd(e){return e=Gd(e,32),new Kd(e)}async function Hd(){const{privateKey:e,publicKey:t}=await async function(){const e=kd.randomPrivateKey(),t=await Ed(e);return{privateKey:Rd(e,t),publicKey:t}}();return new qd(e,t)}async function Wd(e){const{privateKey:t,publicKey:r}=await async function(e){if(32!==e.length)throw new TypeError('"seed" must be 32 bytes in length.');if(!(e instanceof Uint8Array))throw new TypeError('"seed" must be a node.js Buffer, or Uint8Array.');const t=e,r=await Ed(t);return{privateKey:Rd(t,r),publicKey:r}}(e);return new qd(t,r)}function Gd(e,t){var r;if((e=Uint8Array.from(null!==(r=e)&&void 0!==r?r:[])).length!==t)throw new zu("Key must be a Uint8Array of length ".concat(t,", got ").concat(e.length),"ERR_INVALID_KEY_TYPE");return e}var Yd=__webpack_require__(9491);__webpack_require__(7834);function Qd(e,t){let r=Uint8Array.from(e.abs().toByteArray());if(r=0===r[0]?r.subarray(1):r,null!=t){if(r.length>t)throw new Error("byte array longer than desired length");r=No([new Uint8Array(t-r.length),r])}return In(r,"base64url")}function Jd(e){const t=function(e,t){let r=xn(e,"base64urlpad");if(null!=t){if(r.length>t)throw new Error("byte array longer than desired length");r=No([new Uint8Array(t-r.length),r])}return r}(e);return new Ku.jsbn.BigInteger(In(t,"base16"),16)}const Xd={"P-256":256,"P-384":384,"P-521":521};Object.keys(Xd).join(" / ");__webpack_require__(8222);function $d(e){if(isNaN(e)||e<=0)throw new zu("random bytes length must be a Number bigger than 0","ERR_INVALID_LENGTH");return Xt.randomBytes(e)}__webpack_require__(3894);function ef(e,t){return t.map((t=>Jd(e[t])))}async function tf(e){const t=[await Od.get().subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["sign"]),await nf(e)],r=await rf({privateKey:t[0],publicKey:t[1]});return{privateKey:r[0],publicKey:r[1]}}async function rf(e){if(null==e.privateKey||null==e.publicKey)throw new zu("Private and public key are required","ERR_INVALID_PARAMETERS");return Promise.all([Od.get().subtle.exportKey("jwk",e.privateKey),Od.get().subtle.exportKey("jwk",e.publicKey)])}async function nf(e){return Od.get().subtle.importKey("jwk",{kty:e.kty,n:e.n,e:e.e},{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["verify"])}function of(e,t,r,n){const i=t?function(e){return Ku.pki.setRsaPublicKey(...ef(e,["n","e"]))}(e):function(e){return Ku.pki.setRsaPrivateKey(...ef(e,["n","e","d","p","q","dp","dq","qi"]))}(e);return xn(n(In(Uint8Array.from(r),"ascii"),i),"ascii")}class sf{constructor(e){(0,W.Z)(this,"_key",void 0),this._key=e}async verify(e,t){return async function(e,t,r){const n=await Od.get().subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["verify"]);return Od.get().subtle.verify({name:"RSASSA-PKCS1-v1_5"},n,t,r)}(this._key,t,e)}marshal(){return function(e){if(null==e.n||null==e.e)throw new zu("JWK was missing components","ERR_INVALID_PARAMETERS");const t=Ku.pki.publicKeyToAsn1({n:Jd(e.n),e:Jd(e.e)});return xn(Ku.asn1.toDer(t).getBytes(),"ascii")}(this._key)}get bytes(){return jd.encode({Type:Ud.RSA,Data:this.marshal()}).subarray()}encrypt(e){return of(this._key,!0,e,((e,t)=>t.encrypt(e)))}equals(e){return wi(this.bytes,e.bytes)}async hash(){const{bytes:e}=await Ch.digest(this.bytes);return e}}class af{constructor(e,t){(0,W.Z)(this,"_key",void 0),(0,W.Z)(this,"_publicKey",void 0),this._key=e,this._publicKey=t}genSecret(){return $d(16)}async sign(e){return async function(e,t){const r=await Od.get().subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["sign"]),n=await Od.get().subtle.sign({name:"RSASSA-PKCS1-v1_5"},r,Uint8Array.from(t));return new Uint8Array(n,0,n.byteLength)}(this._key,e)}get public(){if(null==this._publicKey)throw new zu("public key not provided","ERR_PUBKEY_NOT_PROVIDED");return new sf(this._publicKey)}decrypt(e){return of(this._key,!1,e,((e,t)=>t.decrypt(e)))}marshal(){return function(e){if(null==e.n||null==e.e||null==e.d||null==e.p||null==e.q||null==e.dp||null==e.dq||null==e.qi)throw new zu("JWK was missing components","ERR_INVALID_PARAMETERS");const t=Ku.pki.privateKeyToAsn1({n:Jd(e.n),e:Jd(e.e),d:Jd(e.d),p:Jd(e.p),q:Jd(e.q),dP:Jd(e.dp),dQ:Jd(e.dq),qInv:Jd(e.qi)});return xn(Ku.asn1.toDer(t).getBytes(),"ascii")}(this._key)}get bytes(){return zd.encode({Type:Ud.RSA,Data:this.marshal()}).subarray()}equals(e){return wi(this.bytes,e.bytes)}async hash(){const{bytes:e}=await Ch.digest(this.bytes);return e}async id(){return In(await this.public.hash(),"base58btc")}async export(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"pkcs-8";if("pkcs-8"===t){const t=new Ku.util.ByteBuffer(this.marshal()),r=Ku.asn1.fromDer(t),n=Ku.pki.privateKeyFromAsn1(r),i={algorithm:"aes256",count:1e4,saltSize:16,prfAlgorithm:"sha512"};return Ku.pki.encryptRsaPrivateKey(n,e,i)}if("libp2p-key"===t)return Ld(this.bytes,e);throw new zu("export format '".concat(t,"' is not supported"),"ERR_INVALID_EXPORT_FORMAT")}}async function cf(e){const t=function(e){const t=Ku.asn1.fromDer(In(e,"ascii")),r=Ku.pki.privateKeyFromAsn1(t);return{kty:"RSA",n:Qd(r.n),e:Qd(r.e),d:Qd(r.d),p:Qd(r.p),q:Qd(r.q),dp:Qd(r.dP),dq:Qd(r.dQ),qi:Qd(r.qInv),alg:"RS256"}}(e),r=await tf(t);return new af(r.privateKey,r.publicKey)}function lf(e){const t=function(e){const t=Ku.asn1.fromDer(In(e,"ascii")),r=Ku.pki.publicKeyFromAsn1(t);return{kty:"RSA",n:Qd(r.n),e:Qd(r.e)}}(e);return new sf(t)}async function uf(e){const t=await tf(e);return new af(t.privateKey,t.publicKey)}async function hf(e){const t=await async function(e){const t=await Od.get().subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-256"}},!0,["sign","verify"]),r=await rf(t);return{privateKey:r[0],publicKey:r[1]}}(e);return new af(t.privateKey,t.publicKey)}function df(e){try{ut.fromHex(e)}catch(t){throw new zu(String(t),"ERR_INVALID_PUBLIC_KEY")}}class ff{constructor(e){(0,W.Z)(this,"_key",void 0),df(e),this._key=e}async verify(e,t){return async function(e,t,r){try{const{digest:n}=await Ch.digest(r);return Yt(t,n,e)}catch(n){throw new zu(String(n),"ERR_INVALID_INPUT")}}(this._key,t,e)}marshal(){return e=this._key,ut.fromHex(e).toRawBytes(!0);var e}get bytes(){return jd.encode({Type:Ud.Secp256k1,Data:this.marshal()}).subarray()}equals(e){return wi(this.bytes,e.bytes)}async hash(){const{bytes:e}=await Ch.digest(this.bytes);return e}}class pf{constructor(e,t){(0,W.Z)(this,"_key",void 0),(0,W.Z)(this,"_publicKey",void 0),this._key=e,this._publicKey=null!==t&&void 0!==t?t:function(e){try{return jt(e,!0)}catch(t){throw new zu(String(t),"ERR_INVALID_PRIVATE_KEY")}}(e),function(e){try{jt(e,!0)}catch(t){throw new zu(String(t),"ERR_INVALID_PRIVATE_KEY")}}(this._key),df(this._publicKey)}async sign(e){return async function(e,t){const{digest:r}=await Ch.digest(t);try{return await Wt(r,e)}catch(n){throw new zu(String(n),"ERR_INVALID_INPUT")}}(this._key,e)}get public(){return new ff(this._publicKey)}marshal(){return this._key}get bytes(){return zd.encode({Type:Ud.Secp256k1,Data:this.marshal()}).subarray()}equals(e){return wi(this.bytes,e.bytes)}async hash(){const{bytes:e}=await Ch.digest(this.bytes);return e}async id(){return In(await this.public.hash(),"base58btc")}async export(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"libp2p-key";if("libp2p-key"===t)return Ld(this.bytes,e);throw new zu("export format '".concat(t,"' is not supported"),"ERR_INVALID_EXPORT_FORMAT")}}function gf(e){return new pf(e)}function mf(e){return new ff(e)}async function yf(){const e=Xt.randomPrivateKey();return new pf(e)}const vf={rsa:D,ed25519:N,secp256k1:O};function bf(e){const t=Object.keys(vf).join(" / ");return new zu("invalid or unsupported key type ".concat(e,". Must be ").concat(t),"ERR_UNSUPPORTED_KEY_TYPE")}function wf(e){if("rsa"===(e=e.toLowerCase())||"ed25519"===e||"secp256k1"===e)return vf[e];throw bf(e)}async function Ef(e,t){return wf(e).generateKeyPair(null!==t&&void 0!==t?t:2048)}function Sf(e){var t,r;const n=jd.decode(e),i=null!==(t=n.Data)&&void 0!==t?t:new Uint8Array;switch(n.Type){case Ud.RSA:return vf.rsa.unmarshalRsaPublicKey(i);case Ud.Ed25519:return vf.ed25519.unmarshalEd25519PublicKey(i);case Ud.Secp256k1:return vf.secp256k1.unmarshalSecp256k1PublicKey(i);default:throw bf(null!==(r=n.Type)&&void 0!==r?r:"RSA")}}function _f(e,t){var r;return wf(t=(null!==(r=t)&&void 0!==r?r:"rsa").toLowerCase()),e.bytes}async function Af(e){var t,r;const n=zd.decode(e),i=null!==(t=n.Data)&&void 0!==t?t:new Uint8Array;switch(n.Type){case Ud.RSA:return vf.rsa.unmarshalRsaPrivateKey(i);case Ud.Ed25519:return vf.ed25519.unmarshalEd25519PrivateKey(i);case Ud.Secp256k1:return vf.secp256k1.unmarshalSecp256k1PrivateKey(i);default:throw bf(null!==(r=n.Type)&&void 0!==r?r:"RSA")}}async function kf(e,t){try{const r=await async function(e,t){const r=Pd.decode(e);return Bd().decrypt(r,t)}(e,t);return await Af(r)}catch(i){}const r=Ku.pki.decryptRsaPrivateKey(e,t);if(null===r)throw new zu("Cannot read the key, most likely the password is wrong or not a RSA key","ERR_CANNOT_DECRYPT_PEM");let n=Ku.asn1.toDer(Ku.pki.privateKeyToAsn1(r));return n=xn(n.getBytes(),"ascii"),vf.rsa.unmarshalRsaPrivateKey(n)}const Cf=Ju({prefix:"\0",name:"identity",encode:e=>{return t=e,(new TextDecoder).decode(t);var t},decode:e=>(e=>(new TextEncoder).encode(e))(e)}),xf=$u({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),If=$u({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),Rf=Xu({prefix:"9",name:"base10",alphabet:"0123456789"}),Pf=$u({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),Tf=$u({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),Nf=$u({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),Df=$u({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),Of=$u({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),Mf=$u({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),Bf=$u({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),Lf=$u({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Uf=$u({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),Ff=$u({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),jf=$u({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),zf=Xu({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),Kf=Xu({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),qf=Array.from("\ud83d\ude80\ud83e\ude90\u2604\ud83d\udef0\ud83c\udf0c\ud83c\udf11\ud83c\udf12\ud83c\udf13\ud83c\udf14\ud83c\udf15\ud83c\udf16\ud83c\udf17\ud83c\udf18\ud83c\udf0d\ud83c\udf0f\ud83c\udf0e\ud83d\udc09\u2600\ud83d\udcbb\ud83d\udda5\ud83d\udcbe\ud83d\udcbf\ud83d\ude02\u2764\ud83d\ude0d\ud83e\udd23\ud83d\ude0a\ud83d\ude4f\ud83d\udc95\ud83d\ude2d\ud83d\ude18\ud83d\udc4d\ud83d\ude05\ud83d\udc4f\ud83d\ude01\ud83d\udd25\ud83e\udd70\ud83d\udc94\ud83d\udc96\ud83d\udc99\ud83d\ude22\ud83e\udd14\ud83d\ude06\ud83d\ude44\ud83d\udcaa\ud83d\ude09\u263a\ud83d\udc4c\ud83e\udd17\ud83d\udc9c\ud83d\ude14\ud83d\ude0e\ud83d\ude07\ud83c\udf39\ud83e\udd26\ud83c\udf89\ud83d\udc9e\u270c\u2728\ud83e\udd37\ud83d\ude31\ud83d\ude0c\ud83c\udf38\ud83d\ude4c\ud83d\ude0b\ud83d\udc97\ud83d\udc9a\ud83d\ude0f\ud83d\udc9b\ud83d\ude42\ud83d\udc93\ud83e\udd29\ud83d\ude04\ud83d\ude00\ud83d\udda4\ud83d\ude03\ud83d\udcaf\ud83d\ude48\ud83d\udc47\ud83c\udfb6\ud83d\ude12\ud83e\udd2d\u2763\ud83d\ude1c\ud83d\udc8b\ud83d\udc40\ud83d\ude2a\ud83d\ude11\ud83d\udca5\ud83d\ude4b\ud83d\ude1e\ud83d\ude29\ud83d\ude21\ud83e\udd2a\ud83d\udc4a\ud83e\udd73\ud83d\ude25\ud83e\udd24\ud83d\udc49\ud83d\udc83\ud83d\ude33\u270b\ud83d\ude1a\ud83d\ude1d\ud83d\ude34\ud83c\udf1f\ud83d\ude2c\ud83d\ude43\ud83c\udf40\ud83c\udf37\ud83d\ude3b\ud83d\ude13\u2b50\u2705\ud83e\udd7a\ud83c\udf08\ud83d\ude08\ud83e\udd18\ud83d\udca6\u2714\ud83d\ude23\ud83c\udfc3\ud83d\udc90\u2639\ud83c\udf8a\ud83d\udc98\ud83d\ude20\u261d\ud83d\ude15\ud83c\udf3a\ud83c\udf82\ud83c\udf3b\ud83d\ude10\ud83d\udd95\ud83d\udc9d\ud83d\ude4a\ud83d\ude39\ud83d\udde3\ud83d\udcab\ud83d\udc80\ud83d\udc51\ud83c\udfb5\ud83e\udd1e\ud83d\ude1b\ud83d\udd34\ud83d\ude24\ud83c\udf3c\ud83d\ude2b\u26bd\ud83e\udd19\u2615\ud83c\udfc6\ud83e\udd2b\ud83d\udc48\ud83d\ude2e\ud83d\ude46\ud83c\udf7b\ud83c\udf43\ud83d\udc36\ud83d\udc81\ud83d\ude32\ud83c\udf3f\ud83e\udde1\ud83c\udf81\u26a1\ud83c\udf1e\ud83c\udf88\u274c\u270a\ud83d\udc4b\ud83d\ude30\ud83e\udd28\ud83d\ude36\ud83e\udd1d\ud83d\udeb6\ud83d\udcb0\ud83c\udf53\ud83d\udca2\ud83e\udd1f\ud83d\ude41\ud83d\udea8\ud83d\udca8\ud83e\udd2c\u2708\ud83c\udf80\ud83c\udf7a\ud83e\udd13\ud83d\ude19\ud83d\udc9f\ud83c\udf31\ud83d\ude16\ud83d\udc76\ud83e\udd74\u25b6\u27a1\u2753\ud83d\udc8e\ud83d\udcb8\u2b07\ud83d\ude28\ud83c\udf1a\ud83e\udd8b\ud83d\ude37\ud83d\udd7a\u26a0\ud83d\ude45\ud83d\ude1f\ud83d\ude35\ud83d\udc4e\ud83e\udd32\ud83e\udd20\ud83e\udd27\ud83d\udccc\ud83d\udd35\ud83d\udc85\ud83e\uddd0\ud83d\udc3e\ud83c\udf52\ud83d\ude17\ud83e\udd11\ud83c\udf0a\ud83e\udd2f\ud83d\udc37\u260e\ud83d\udca7\ud83d\ude2f\ud83d\udc86\ud83d\udc46\ud83c\udfa4\ud83d\ude47\ud83c\udf51\u2744\ud83c\udf34\ud83d\udca3\ud83d\udc38\ud83d\udc8c\ud83d\udccd\ud83e\udd40\ud83e\udd22\ud83d\udc45\ud83d\udca1\ud83d\udca9\ud83d\udc50\ud83d\udcf8\ud83d\udc7b\ud83e\udd10\ud83e\udd2e\ud83c\udfbc\ud83e\udd75\ud83d\udea9\ud83c\udf4e\ud83c\udf4a\ud83d\udc7c\ud83d\udc8d\ud83d\udce3\ud83e\udd42"),Zf=qf.reduce(((e,t,r)=>(e[r]=t,e)),[]),Vf=qf.reduce(((e,t,r)=>(e[t.codePointAt(0)]=r,e)),[]);const Hf=Ju({prefix:"\ud83d\ude80",name:"base256emoji",encode:function(e){return e.reduce(((e,t)=>e+=Zf[t]),"")},decode:function(e){const t=[];for(const r of e){const e=Vf[r.codePointAt(0)];if(void 0===e)throw new Error("Non-base256emoji character: ".concat(r));t.push(e)}return new Uint8Array(t)}}),Wf="raw",Gf=85,Yf=e=>Vu(e),Qf=e=>Vu(e),Jf=new TextEncoder,Xf=new TextDecoder,$f="json",ep=512,tp=e=>Jf.encode(JSON.stringify(e)),rp=e=>JSON.parse(Xf.decode(e)),np=(e,t)=>{const{bytes:r,version:n}=e;return 0===n?cp(r,op(e),t||eh.encoder):lp(r,op(e),t||Nf.encoder)},ip=new WeakMap,op=e=>{const t=ip.get(e);if(null==t){const t=new Map;return ip.set(e,t),t}return t};class sp{constructor(e,t,r,n){this.code=t,this.version=e,this.multihash=r,this.bytes=n,this["/"]=n}get asCID(){return this}get byteOffset(){return this.bytes.byteOffset}get byteLength(){return this.bytes.byteLength}toV0(){switch(this.version){case 0:return this;case 1:{const{code:e,multihash:t}=this;if(e!==up)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(t.code!==hp)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return sp.createV0(t)}default:throw Error("Can not convert CID version ".concat(this.version," to version 0. This is a bug please report"))}}toV1(){switch(this.version){case 0:{const{code:e,digest:t}=this.multihash,r=vh(e,t);return sp.createV1(this.code,r)}case 1:return this;default:throw Error("Can not convert CID version ".concat(this.version," to version 1. This is a bug please report"))}}equals(e){return sp.equals(this,e)}static equals(e,t){const r=t;return r&&e.code===r.code&&e.version===r.version&&((e,t)=>{if(e===t)return!0;{const r=t;return e.code===r.code&&e.size===r.size&&r.bytes instanceof Uint8Array&&((e,t)=>{if(e===t)return!0;if(e.byteLength!==t.byteLength)return!1;for(let r=0;r<e.byteLength;r++)if(e[r]!==t[r])return!1;return!0})(e.bytes,r.bytes)}})(e.multihash,r.multihash)}toString(e){return np(this,e)}toJSON(){return{"/":np(this)}}link(){return this}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return"CID(".concat(this.toString(),")")}static asCID(e){if(null==e)return null;const t=e;if(t instanceof sp)return t;if(null!=t["/"]&&t["/"]===t.bytes||t.asCID===t){const{version:e,code:r,multihash:n,bytes:i}=t;return new sp(e,r,n,i||dp(e,r,n.bytes))}if(!0===t[fp]){const{version:e,multihash:r,code:n}=t,i=bh(r);return sp.create(e,n,i)}return null}static create(e,t,r){if("number"!==typeof t)throw new Error("String codecs are no longer supported");if(!(r.bytes instanceof Uint8Array))throw new Error("Invalid digest");switch(e){case 0:if(t!==up)throw new Error("Version 0 CID must use dag-pb (code: ".concat(up,") block encoding"));return new sp(e,t,r,r.bytes);case 1:{const n=dp(e,t,r.bytes);return new sp(e,t,r,n)}default:throw new Error("Invalid version")}}static createV0(e){return sp.create(0,up,e)}static createV1(e,t){return sp.create(1,e,t)}static decode(e){const[t,r]=sp.decodeFirst(e);if(r.length)throw new Error("Incorrect length");return t}static decodeFirst(e){const t=sp.inspectBytes(e),r=t.size-t.multihashSize,n=Vu(e.subarray(r,r+t.multihashSize));if(n.byteLength!==t.multihashSize)throw new Error("Incorrect length");const i=n.subarray(t.multihashSize-t.digestSize),o=new wh(t.multihashCode,t.digestSize,i,n);return[0===t.version?sp.createV0(o):sp.createV1(t.codec,o),e.subarray(t.size)]}static inspectBytes(e){let t=0;const r=()=>{const[r,n]=gh(e.subarray(t));return t+=n,r};let n=r(),i=up;if(18===n?(n=0,t=0):i=r(),0!==n&&1!==n)throw new RangeError("Invalid CID version ".concat(n));const o=t,s=r(),a=r(),c=t+a;return{version:n,codec:i,multihashCode:s,digestSize:a,multihashSize:c-o,size:c}}static parse(e,t){const[r,n]=ap(e,t),i=sp.decode(n);if(0===i.version&&"Q"!==e[0])throw Error("Version 0 CID string must not include multibase prefix");return op(i).set(r,e),i}}const ap=(e,t)=>{switch(e[0]){case"Q":{const r=t||eh;return[eh.prefix,r.decode("".concat(eh.prefix).concat(e))]}case eh.prefix:{const r=t||eh;return[eh.prefix,r.decode(e)]}case Nf.prefix:{const r=t||Nf;return[Nf.prefix,r.decode(e)]}default:if(null==t)throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");return[e[0],t.decode(e)]}},cp=(e,t,r)=>{const{prefix:n}=r;if(n!==eh.prefix)throw Error("Cannot string encode V0 in ".concat(r.name," encoding"));const i=t.get(n);if(null==i){const i=r.encode(e).slice(1);return t.set(n,i),i}return i},lp=(e,t,r)=>{const{prefix:n}=r,i=t.get(n);if(null==i){const i=r.encode(e);return t.set(n,i),i}return i},up=112,hp=18,dp=(e,t,r)=>{const n=yh(e),i=n+yh(t),o=new Uint8Array(i+r.byteLength);return mh(e,o,0),mh(t,o,n),o.set(r,i),o},fp=Symbol.for("@ipld/js-cid/CID"),pp={...M,...B,...L,...U,...F,...j,...z,...I,...T,...K};let gp;const mp=Symbol.for("nodejs.util.inspect.custom"),yp=Object.values(pp).map((e=>e.decoder)).reduce(((e,t)=>e.or(t)),pp.identity.decoder);gp=Symbol.toStringTag;class vp{constructor(e){(0,W.Z)(this,"type",void 0),(0,W.Z)(this,"multihash",void 0),(0,W.Z)(this,"privateKey",void 0),(0,W.Z)(this,"publicKey",void 0),(0,W.Z)(this,"string",void 0),(0,W.Z)(this,Ei,!0),this.type=e.type,this.multihash=e.multihash,this.privateKey=e.privateKey,Object.defineProperty(this,"string",{enumerable:!1,writable:!0})}get[gp](){return"PeerId(".concat(this.toString(),")")}toString(){return null==this.string&&(this.string=eh.encode(this.multihash.bytes).slice(1)),this.string}toCID(){return sp.createV1(114,this.multihash)}toBytes(){return this.multihash.bytes}toJSON(){return this.toString()}equals(e){var t;if(e instanceof Uint8Array)return wi(this.multihash.bytes,e);if("string"===typeof e)return Sp(e).equals(this);if(null!=(null===e||void 0===e||null===(t=e.multihash)||void 0===t?void 0:t.bytes))return wi(this.multihash.bytes,e.multihash.bytes);throw new Error("not valid Id")}[mp](){return"PeerId(".concat(this.toString(),")")}}class bp extends vp{constructor(e){super({...e,type:"RSA"}),(0,W.Z)(this,"type","RSA"),(0,W.Z)(this,"publicKey",void 0),this.publicKey=e.publicKey}}class wp extends vp{constructor(e){super({...e,type:"Ed25519"}),(0,W.Z)(this,"type","Ed25519"),(0,W.Z)(this,"publicKey",void 0),this.publicKey=e.multihash.digest}}class Ep extends vp{constructor(e){super({...e,type:"secp256k1"}),(0,W.Z)(this,"type","secp256k1"),(0,W.Z)(this,"publicKey",void 0),this.publicKey=e.multihash.digest}}function Sp(e,t){var r;if(t=null!==(r=t)&&void 0!==r?r:yp,"1"===e.charAt(0)||"Q"===e.charAt(0)){const t=bh(eh.decode("z".concat(e)));return e.startsWith("12D")?new wp({multihash:t}):e.startsWith("16U")?new Ep({multihash:t}):new bp({multihash:t})}return _p(yp.decode(e))}function _p(e){try{const t=bh(e);if(t.code===Sh.code){if(36===t.digest.length)return new wp({multihash:t});if(37===t.digest.length)return new Ep({multihash:t})}if(t.code===Ch.code)return new bp({multihash:t})}catch{return function(e){if(null==e||null==e.multihash||null==e.version||1===e.version&&114!==e.code)throw new Error("Supplied PeerID CID is invalid");const t=e.multihash;if(t.code===Ch.code)return new bp({multihash:e.multihash});if(t.code===Sh.code){if(36===t.digest.length)return new wp({multihash:e.multihash});if(37===t.digest.length)return new Ep({multihash:e.multihash})}throw new Error("Supplied PeerID CID is invalid")}(sp.decode(e))}throw new Error("Supplied PeerID CID is invalid")}async function Ap(e,t){return 36===e.length?new wp({multihash:vh(Sh.code,e),privateKey:t}):37===e.length?new Ep({multihash:vh(Sh.code,e),privateKey:t}):new bp({multihash:await Ch.digest(e),publicKey:e,privateKey:t})}var kp,Cp;async function xp(e,t,r){const n=await async function(e,t){if(null==e.privateKey)throw new Error("PrivateKey was missing from PeerId");return(await Af(e.privateKey)).sign(t)}(e,Pp(t));if(null==e.publicKey)throw new Error("PublicKey was missing from local PeerId");return function(e,t,r){return Cp.encode({identityKey:e,identitySig:t,extensions:null!==r&&void 0!==r?r:{webtransportCerthashes:[]}}).subarray()}(e.publicKey,n,r)}async function Ip(e){return Ap(e.identityKey)}function Rp(e){return Cp.decode(e)}function Pp(e){const t=xn("noise-libp2p-static-key:");return No([t,e],t.length+e.length)}async function Tp(e,t,r){const n=await Ap(t.identityKey);if(!n.equals(r))throw new Error("Payload identity key ".concat(n.toString()," does not match expected remote peer ").concat(r.toString()));const i=Pp(e);if(null==n.publicKey)throw new Error("PublicKey was missing from PeerId");if(null==t.identitySig)throw new Error("Signature was missing from message");const o=Sf(n.publicKey);if(!await o.verify(i,t.identitySig))throw new Error("Static key doesn't match to peer that signed payload!");return n}function Np(e){return e instanceof Uint8Array&&32===e.length}function Dp(e){let t=function(e){const t=()=>{};return t.enabled=!1,t.color="",t.diff=0,t.log=()=>{},t.namespace=e,t.destroy=()=>!0,t.extend=()=>t,t}("".concat(e,":trace"));return Ue.enabled("".concat(e,":trace"))&&null!=Ue.names.map((e=>e.toString())).find((e=>e.includes(":trace")))&&(t=Ue("".concat(e,":trace"))),Object.assign(Ue(e),{error:Ue("".concat(e,":error")),trace:t})}!function(e){let t;e.codec=()=>(null==t&&(t=Le((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!1!==r.lengthDelimited&&t.fork(),null!=e.webtransportCerthashes)for(const n of e.webtransportCerthashes)t.uint32(10),t.bytes(n);!1!==r.lengthDelimited&&t.ldelim()}),((e,t)=>{const r={webtransportCerthashes:[]},n=null==t?e.len:e.pos+t;for(;e.pos<n;){const t=e.uint32();if(t>>>3===1)r.webtransportCerthashes.push(e.bytes());else e.skipType(7&t)}return r}))),t),e.encode=t=>ne(t,e.codec()),e.decode=t=>re(t,e.codec())}(kp||(kp={})),function(e){let t;e.codec=()=>(null==t&&(t=Le((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var n,i;(!1!==r.lengthDelimited&&t.fork(),!0===r.writeDefaults||null!=e.identityKey&&e.identityKey.byteLength>0)&&(t.uint32(10),t.bytes(null!==(n=e.identityKey)&&void 0!==n?n:new Uint8Array(0)));(!0===r.writeDefaults||null!=e.identitySig&&e.identitySig.byteLength>0)&&(t.uint32(18),t.bytes(null!==(i=e.identitySig)&&void 0!==i?i:new Uint8Array(0)));null!=e.extensions&&(t.uint32(34),kp.codec().encode(e.extensions,t,{writeDefaults:!1})),!1!==r.lengthDelimited&&t.ldelim()}),((e,t)=>{const r={identityKey:new Uint8Array(0),identitySig:new Uint8Array(0)},n=null==t?e.len:e.pos+t;for(;e.pos<n;){const t=e.uint32();switch(t>>>3){case 1:r.identityKey=e.bytes();break;case 2:r.identitySig=e.bytes();break;case 4:r.extensions=kp.codec().decode(e,e.uint32());break;default:e.skipType(7&t)}}return r}))),t),e.encode=t=>ne(t,e.codec()),e.decode=t=>re(t,e.codec())}(Cp||(Cp={})),Ue.formatters.b=e=>null==e?"undefined":eh.baseEncode(e),Ue.formatters.t=e=>null==e?"undefined":Nf.baseEncode(e),Ue.formatters.m=e=>null==e?"undefined":Pd.baseEncode(e),Ue.formatters.p=e=>null==e?"undefined":e.toString(),Ue.formatters.c=e=>null==e?"undefined":e.toString(),Ue.formatters.k=e=>null==e?"undefined":e.toString(),Ue.formatters.a=e=>null==e?"undefined":e.toString();const Op=Dp("libp2p:noise");let Mp;function Bp(e){e?(Mp("LOCAL_PUBLIC_EPHEMERAL_KEY ".concat(In(e.publicKey,"hex"))),Mp("LOCAL_PRIVATE_EPHEMERAL_KEY ".concat(In(e.privateKey,"hex")))):Mp("Missing local ephemeral keys.")}function Lp(e){Mp("REMOTE_EPHEMERAL_PUBLIC_KEY ".concat(In(e,"hex")))}Mp=Nc?Op:Object.assign((()=>{}),{enabled:!1,trace:()=>{},error:()=>{}});class Up{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;(0,W.Z)(this,"n",void 0),(0,W.Z)(this,"bytes",void 0),(0,W.Z)(this,"view",void 0),this.n=e,this.bytes=new Uint8Array(12),this.view=new DataView(this.bytes.buffer,this.bytes.byteOffset,this.bytes.byteLength),this.view.setUint32(4,e,!0)}increment(){this.n++,this.view.setUint32(4,this.n,!0)}getBytes(){return this.bytes}getUint64(){return this.n}assertValue(){if(this.n>4294967295)throw new Error("Cipherstate has reached maximum n, a new handshake must be performed")}}class Fp{constructor(e){(0,W.Z)(this,"crypto",void 0),this.crypto=e}encryptWithAd(e,t,r){const n=this.encrypt(e.k,e.n,t,r);return e.n.increment(),n}decryptWithAd(e,t,r,n){const{plaintext:i,valid:o}=this.decrypt(e.k,e.n,t,r,n);return o&&e.n.increment(),{plaintext:i,valid:o}}hasKey(e){return!this.isEmptyKey(e.k)}createEmptyKey(){return new Uint8Array(32)}isEmptyKey(e){return wi(this.createEmptyKey(),e)}encrypt(e,t,r,n){return t.assertValue(),this.crypto.chaCha20Poly1305Encrypt(n,t.getBytes(),r,e)}encryptAndHash(e,t){let r;return r=this.hasKey(e.cs)?this.encryptWithAd(e.cs,e.h,t):t,this.mixHash(e,r),r}decrypt(e,t,r,n,i){t.assertValue();const o=this.crypto.chaCha20Poly1305Decrypt(n,t.getBytes(),r,e,i);return o?{plaintext:o,valid:!0}:{plaintext:new Uint8Array(0),valid:!1}}decryptAndHash(e,t){let r,n=!0;return this.hasKey(e.cs)?({plaintext:r,valid:n}=this.decryptWithAd(e.cs,e.h,t)):r=t,this.mixHash(e,t),{plaintext:r,valid:n}}dh(e,t){try{const r=this.crypto.generateX25519SharedKey(e,t);return 32===r.length?r:r.subarray(0,32)}catch(r){const e=r;return Op.error(e),new Uint8Array(32)}}mixHash(e,t){e.h=this.getHash(e.h,t)}getHash(e,t){return this.crypto.hashSHA256(No([e,t],e.length+t.length))}mixKey(e,t){const[r,n]=this.crypto.getHKDF(e.ck,t);e.cs=this.initializeKey(n),e.ck=r}initializeKey(e){return{k:e,n:new Up}}initializeSymmetric(e){const t=xn(e,"utf-8"),r=this.hashProtocolName(t),n=r,i=this.createEmptyKey();return{cs:this.initializeKey(i),ck:n,h:r}}hashProtocolName(e){if(e.length<=32){const t=new Uint8Array(32);return t.set(e),t}return this.getHash(e,new Uint8Array(0))}split(e){const[t,r]=this.crypto.getHKDF(e.ck,new Uint8Array(0));return{cs1:this.initializeKey(t),cs2:this.initializeKey(r)}}writeMessageRegular(e,t){const r=this.encryptWithAd(e,new Uint8Array(0),t);return{ne:this.createEmptyKey(),ns:new Uint8Array(0),ciphertext:r}}readMessageRegular(e,t){return this.decryptWithAd(e,new Uint8Array(0),t.ciphertext)}}class jp extends Fp{initializeInitiator(e,t,r,n){const i=this.initializeSymmetric("Noise_XX_25519_ChaChaPoly_SHA256");this.mixHash(i,e);return{ss:i,s:t,rs:r,psk:n,re:new Uint8Array(32)}}initializeResponder(e,t,r,n){const i=this.initializeSymmetric("Noise_XX_25519_ChaChaPoly_SHA256");this.mixHash(i,e);return{ss:i,s:t,rs:r,psk:n,re:new Uint8Array(32)}}writeMessageA(e,t,r){const n=new Uint8Array(0);e.e=void 0!==r?r:this.crypto.generateX25519KeyPair();const i=e.e.publicKey;this.mixHash(e.ss,i);return{ne:i,ns:n,ciphertext:this.encryptAndHash(e.ss,t)}}writeMessageB(e,t){e.e=this.crypto.generateX25519KeyPair();const r=e.e.publicKey;this.mixHash(e.ss,r),this.mixKey(e.ss,this.dh(e.e.privateKey,e.re));const n=e.s.publicKey,i=this.encryptAndHash(e.ss,n);this.mixKey(e.ss,this.dh(e.s.privateKey,e.re));return{ne:r,ns:i,ciphertext:this.encryptAndHash(e.ss,t)}}writeMessageC(e,t){const r=e.s.publicKey,n=this.encryptAndHash(e.ss,r);this.mixKey(e.ss,this.dh(e.s.privateKey,e.re));const i=this.encryptAndHash(e.ss,t),o={ne:this.createEmptyKey(),ns:n,ciphertext:i},{cs1:s,cs2:a}=this.split(e.ss);return{h:e.ss.h,messageBuffer:o,cs1:s,cs2:a}}readMessageA(e,t){return Np(t.ne)&&(e.re=t.ne),this.mixHash(e.ss,e.re),this.decryptAndHash(e.ss,t.ciphertext)}readMessageB(e,t){if(Np(t.ne)&&(e.re=t.ne),this.mixHash(e.ss,e.re),!e.e)throw new Error("Handshake state `e` param is missing.");this.mixKey(e.ss,this.dh(e.e.privateKey,e.re));const{plaintext:r,valid:n}=this.decryptAndHash(e.ss,t.ns);n&&Np(r)&&(e.rs=r),this.mixKey(e.ss,this.dh(e.e.privateKey,e.rs));const{plaintext:i,valid:o}=this.decryptAndHash(e.ss,t.ciphertext);return{plaintext:i,valid:n&&o}}readMessageC(e,t){const{plaintext:r,valid:n}=this.decryptAndHash(e.ss,t.ns);if(n&&Np(r)&&(e.rs=r),!e.e)throw new Error("Handshake state `e` param is missing.");this.mixKey(e.ss,this.dh(e.e.privateKey,e.rs));const{plaintext:i,valid:o}=this.decryptAndHash(e.ss,t.ciphertext),{cs1:s,cs2:a}=this.split(e.ss);return{h:e.ss.h,plaintext:i,valid:n&&o,cs1:s,cs2:a}}initSession(e,t,r){const n=this.createEmptyKey(),i=new Uint8Array(32);let o;return o=e?this.initializeInitiator(t,r,i,n):this.initializeResponder(t,r,i,n),{hs:o,i:e,mc:0}}sendMessage(e,t,r){let n;if(0===e.mc)n=this.writeMessageA(e.hs,t,r);else if(1===e.mc)n=this.writeMessageB(e.hs,t);else if(2===e.mc){const{h:r,messageBuffer:i,cs1:o,cs2:s}=this.writeMessageC(e.hs,t);n=i,e.h=r,e.cs1=o,e.cs2=s}else{if(!(e.mc>2))throw new Error("Session invalid.");if(e.i){if(!e.cs1)throw new Error("CS1 (cipher state) is not defined");n=this.writeMessageRegular(e.cs1,t)}else{if(!e.cs2)throw new Error("CS2 (cipher state) is not defined");n=this.writeMessageRegular(e.cs2,t)}}return e.mc++,n}recvMessage(e,t){let r=new Uint8Array(0),n=!1;if(0===e.mc)({plaintext:r,valid:n}=this.readMessageA(e.hs,t));else if(1===e.mc)({plaintext:r,valid:n}=this.readMessageB(e.hs,t));else if(2===e.mc){const{h:i,plaintext:o,valid:s,cs1:a,cs2:c}=this.readMessageC(e.hs,t);r=o,n=s,e.h=i,e.cs1=a,e.cs2=c}return e.mc++,{plaintext:r,valid:n}}}class zp{constructor(e,t,r,n,i,o,s,a){(0,W.Z)(this,"isInitiator",void 0),(0,W.Z)(this,"session",void 0),(0,W.Z)(this,"remotePeer",void 0),(0,W.Z)(this,"remoteExtensions",{webtransportCerthashes:[]}),(0,W.Z)(this,"payload",void 0),(0,W.Z)(this,"connection",void 0),(0,W.Z)(this,"xx",void 0),(0,W.Z)(this,"staticKeypair",void 0),(0,W.Z)(this,"prologue",void 0),this.isInitiator=e,this.payload=t,this.prologue=r,this.staticKeypair=i,this.connection=o,s&&(this.remotePeer=s),this.xx=null!==a&&void 0!==a?a:new jp(n),this.session=this.xx.initSession(this.isInitiator,this.prologue,this.staticKeypair)}async propose(){var e;if(e=this.session.hs.s,Mp("LOCAL_STATIC_PUBLIC_KEY ".concat(In(e.publicKey,"hex"))),Mp("LOCAL_STATIC_PRIVATE_KEY ".concat(In(e.privateKey,"hex"))),this.isInitiator){Op.trace("Stage 0 - Initiator starting to send first message.");const e=this.xx.sendMessage(this.session,new Uint8Array(0));this.connection.writeLP(function(e){return No([e.ne,e.ciphertext],e.ne.length+e.ciphertext.length)}(e)),Op.trace("Stage 0 - Initiator finished sending first message."),Bp(this.session.hs.e)}else{Op.trace("Stage 0 - Responder waiting to receive first message...");const e=function(e){if(e.length<32)throw new Error("Cannot decode stage 0 MessageBuffer: length less than 32 bytes.");return{ne:e.subarray(0,32),ciphertext:e.subarray(32,e.length),ns:new Uint8Array(0)}}((await this.connection.readLP()).subarray()),{valid:t}=this.xx.recvMessage(this.session,e);if(!t)throw new Uu("xx handshake stage 0 validation fail");Op.trace("Stage 0 - Responder received first message."),Lp(this.session.hs.re)}}async exchange(){if(this.isInitiator){Op.trace("Stage 1 - Initiator waiting to receive first message from responder...");const r=function(e){if(e.length<80)throw new Error("Cannot decode stage 1 MessageBuffer: length less than 80 bytes.");return{ne:e.subarray(0,32),ns:e.subarray(32,80),ciphertext:e.subarray(80,e.length)}}((await this.connection.readLP()).subarray()),{plaintext:n,valid:i}=this.xx.recvMessage(this.session,r);if(!i)throw new Uu("xx handshake stage 1 validation fail");Op.trace("Stage 1 - Initiator received the message."),Lp(this.session.hs.re),e=this.session.hs.rs,Mp("REMOTE_STATIC_PUBLIC_KEY ".concat(In(e,"hex"))),Op.trace("Initiator going to check remote's signature...");try{const e=Rp(n);this.remotePeer=this.remotePeer||await Ip(e),await Tp(this.session.hs.rs,e,this.remotePeer),this.setRemoteNoiseExtension(e.extensions)}catch(t){throw new Lu("Error occurred while verifying signed payload: ".concat(t.message))}Op.trace("All good with the signature!")}else{Op.trace("Stage 1 - Responder sending out first message with signed payload and static key.");const e=this.xx.sendMessage(this.session,this.payload);this.connection.writeLP(function(e){return No([e.ne,e.ns,e.ciphertext],e.ne.length+e.ns.length+e.ciphertext.length)}(e)),Op.trace("Stage 1 - Responder sent the second handshake message with signed payload."),Bp(this.session.hs.e)}var e}async finish(){if(this.isInitiator){Op.trace("Stage 2 - Initiator sending third handshake message.");const e=this.xx.sendMessage(this.session,this.payload);this.connection.writeLP(function(e){return No([e.ns,e.ciphertext],e.ns.length+e.ciphertext.length)}(e)),Op.trace("Stage 2 - Initiator sent message with signed payload.")}else{Op.trace("Stage 2 - Responder waiting for third handshake message...");const e=function(e){if(e.length<48)throw new Error("Cannot decode stage 2 MessageBuffer: length less than 48 bytes.");return{ne:new Uint8Array(0),ns:e.subarray(0,48),ciphertext:e.subarray(48,e.length)}}((await this.connection.readLP()).subarray()),{plaintext:r,valid:n}=this.xx.recvMessage(this.session,e);if(!n)throw new Uu("xx handshake stage 2 validation fail");Op.trace("Stage 2 - Responder received the message, finished handshake.");try{const e=Rp(r);this.remotePeer=this.remotePeer||await Ip(e),await Tp(this.session.hs.rs,e,this.remotePeer),this.setRemoteNoiseExtension(e.extensions)}catch(t){throw new Lu("Error occurred while verifying signed payload: ".concat(t.message))}}var e;(e=this.session).cs1&&e.cs2?(Mp("CIPHER_STATE_1 ".concat(e.cs1.n.getUint64()," ").concat(In(e.cs1.k,"hex"))),Mp("CIPHER_STATE_2 ".concat(e.cs2.n.getUint64()," ").concat(In(e.cs2.k,"hex")))):Mp("Missing cipher state.")}encrypt(e,t){const r=this.getCS(t);return this.xx.encryptWithAd(r,new Uint8Array(0),e)}decrypt(e,t,r){const n=this.getCS(t,!1);return this.xx.decryptWithAd(n,new Uint8Array(0),e,r)}getRemoteStaticKey(){return this.session.hs.rs}getCS(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!e.cs1||!e.cs2)throw new Uu("Handshake not completed properly, cipher state does not exist.");return this.isInitiator?t?e.cs1:e.cs2:t?e.cs2:e.cs1}setRemoteNoiseExtension(e){e&&(this.remoteExtensions=e)}}class Kp{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,W.Z)(this,"protocol","/noise"),(0,W.Z)(this,"crypto",void 0),(0,W.Z)(this,"prologue",void 0),(0,W.Z)(this,"staticKeys",void 0),(0,W.Z)(this,"extensions",void 0),(0,W.Z)(this,"metrics",void 0);const{staticNoiseKey:t,extensions:r,crypto:n,prologueBytes:i,metrics:o}=e;this.crypto=null!==n&&void 0!==n?n:Ou,this.extensions=r,this.metrics=o?function(e){return{xxHandshakeSuccesses:e.registerCounter("libp2p_noise_xxhandshake_successes_total",{help:"Total count of noise xxHandshakes successes_"}),xxHandshakeErrors:e.registerCounter("libp2p_noise_xxhandshake_error_total",{help:"Total count of noise xxHandshakes errors"}),encryptedPackets:e.registerCounter("libp2p_noise_encrypted_packets_total",{help:"Total count of noise encrypted packets successfully"}),decryptedPackets:e.registerCounter("libp2p_noise_decrypted_packets_total",{help:"Total count of noise decrypted packets"}),decryptErrors:e.registerCounter("libp2p_noise_decrypt_errors_total",{help:"Total count of noise decrypt errors"})}}(o):void 0,this.staticKeys=t?this.crypto.generateX25519KeyPairFromSeed(t):this.crypto.generateX25519KeyPair(),this.prologue=null!==i&&void 0!==i?i:new Uint8Array(0)}async secureOutbound(e,t,r){const n=Ic(t,{lengthEncoder:Mu,lengthDecoder:Bu,maxDataLength:Tc}),i=await this.performHandshake({connection:n,isInitiator:!0,localPeer:e,remotePeer:r});return{conn:await this.createSecureConnection(n,i),remoteExtensions:i.remoteExtensions,remotePeer:i.remotePeer}}async secureInbound(e,t,r){const n=Ic(t,{lengthEncoder:Mu,lengthDecoder:Bu,maxDataLength:Tc}),i=await this.performHandshake({connection:n,isInitiator:!1,localPeer:e,remotePeer:r});return{conn:await this.createSecureConnection(n,i),remotePeer:i.remotePeer,remoteExtensions:i.remoteExtensions}}async performHandshake(e){const t=await xp(e.localPeer,this.staticKeys.publicKey,this.extensions);return this.performXXHandshake(e,t)}async performXXHandshake(e,t){const{isInitiator:r,remotePeer:n,connection:i}=e,o=new zp(r,t,this.prologue,this.crypto,this.staticKeys,i,n);try{var s;await o.propose(),await o.exchange(),await o.finish(),null===(s=this.metrics)||void 0===s||s.xxHandshakeSuccesses.increment()}catch(c){var a;if(null===(a=this.metrics)||void 0===a||a.xxHandshakeErrors.increment(),c instanceof Error)throw c.message="Error occurred during XX handshake: ".concat(c.message),c}return o}async createSecureConnection(e,t){const[r,n]=function(){const e=Cc(),t=Cc();return[{source:e.source,sink:t.sink},{source:t.source,sink:e.sink}]}(),i=e.unwrap();return await za(r,function(e,t){return async function*(r){for await(const n of r)for(let r=0;r<n.length;r+=65519){let i=r+65519;i>n.length&&(i=n.length);const o=e.encrypt(n.subarray(r,i),e.session);null===t||void 0===t||t.encryptedPackets.increment(),yield Mu(o.byteLength),yield o}}}(t,this.metrics),i,(e=>Na(e,{lengthDecoder:Bu})),function(e,t){return async function*(r){for await(const n of r)for(let r=0;r<n.length;r+=Tc){let i=r+Tc;if(i>n.length&&(i=n.length),i-16<r)throw new Error("Invalid chunk");const o=n.subarray(r,i),s=n.subarray(r,i-16),{plaintext:a,valid:c}=e.decrypt(o,e.session,s);if(!c)throw null===t||void 0===t||t.decryptErrors.increment(),new Error("Failed to validate decrypted chunk");null===t||void 0===t||t.decryptedPackets.increment(),yield a}}}(t,this.metrics),r),n}}function qp(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return()=>new Kp(e)}class Zp extends Error{constructor(e,t){super(null!==e&&void 0!==e?e:"The operation was aborted"),this.type="aborted",this.code=null!==t&&void 0!==t?t:"ABORT_ERR"}}function Vp(e,t,r){const n=null!==r&&void 0!==r?r:{},i=function(e){if(null!=e){if("function"===typeof e[Symbol.iterator])return e[Symbol.iterator]();if("function"===typeof e[Symbol.asyncIterator])return e[Symbol.asyncIterator]();if("function"===typeof e.next)return e}throw new Error("argument is not an iterator or iterable")}(e);return async function*(){let r;const o=()=>{null!=r&&r()};for(t.addEventListener("abort",o);;){let a;try{if(t.aborted){const{abortMessage:e,abortCode:t}=n;throw new Zp(e,t)}const e=new Promise(((e,t)=>{r=()=>{const{abortMessage:e,abortCode:r}=n;t(new Zp(e,r))}}));a=await Promise.race([e,i.next()]),r=null}catch(s){t.removeEventListener("abort",o);const r="aborted"===s.type&&t.aborted;if(r&&null!=n.onAbort&&n.onAbort(e),"function"===typeof i.return)try{const e=i.return();e instanceof Promise&&e.catch((e=>{null!=n.onReturnError&&n.onReturnError(e)}))}catch(s){null!=n.onReturnError&&n.onReturnError(s)}if(r&&!0===n.returnOnAbort)return;throw s}if(!0===a.done)break;yield a.value}t.removeEventListener("abort",o)}()}function Hp(e,t,r){return n=>e(Vp(n,t,r))}function Wp(e,t,r){return{sink:Hp(e.sink,t,{...r,onAbort:void 0}),source:Vp(e.source,t,r)}}function Gp(e){const t=new globalThis.AbortController;function r(){t.abort();for(const t of e)null!=(null===t||void 0===t?void 0:t.removeEventListener)&&t.removeEventListener("abort",r)}for(const i of e){if(!0===(null===i||void 0===i?void 0:i.aborted)){r();break}null!=(null===i||void 0===i?void 0:i.addEventListener)&&i.addEventListener("abort",r)}const n=t.signal;return n.clear=function(){for(const t of e)null!=(null===t||void 0===t?void 0:t.removeEventListener)&&t.removeEventListener("abort",r)},n}var Yp,Qp=__webpack_require__(4607);!function(e){e[e.NEW_STREAM=0]="NEW_STREAM",e[e.MESSAGE_RECEIVER=1]="MESSAGE_RECEIVER",e[e.MESSAGE_INITIATOR=2]="MESSAGE_INITIATOR",e[e.CLOSE_RECEIVER=3]="CLOSE_RECEIVER",e[e.CLOSE_INITIATOR=4]="CLOSE_INITIATOR",e[e.RESET_RECEIVER=5]="RESET_RECEIVER",e[e.RESET_INITIATOR=6]="RESET_INITIATOR"}(Yp||(Yp={}));const Jp=Object.freeze({0:"NEW_STREAM",1:"MESSAGE_RECEIVER",2:"MESSAGE_INITIATOR",3:"CLOSE_RECEIVER",4:"CLOSE_INITIATOR",5:"RESET_RECEIVER",6:"RESET_INITIATOR"}),Xp=Object.freeze({NEW_STREAM:Yp.NEW_STREAM,MESSAGE:Yp.MESSAGE_INITIATOR,CLOSE:Yp.CLOSE_INITIATOR,RESET:Yp.RESET_INITIATOR}),$p=Object.freeze({MESSAGE:Yp.MESSAGE_RECEIVER,CLOSE:Yp.CLOSE_RECEIVER,RESET:Yp.RESET_RECEIVER}),eg=1<<20;class tg{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:eg,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4194304;(0,W.Z)(this,"_buffer",void 0),(0,W.Z)(this,"_headerInfo",void 0),(0,W.Z)(this,"_maxMessageSize",void 0),(0,W.Z)(this,"_maxUnprocessedMessageQueueSize",void 0),this._buffer=new da,this._headerInfo=null,this._maxMessageSize=e,this._maxUnprocessedMessageQueueSize=t}write(e){if(null==e||0===e.length)return[];if(this._buffer.append(e),this._buffer.byteLength>this._maxUnprocessedMessageQueueSize)throw Object.assign(new Error("unprocessed message queue size too large!"),{code:"ERR_MSG_QUEUE_TOO_BIG"});const t=[];for(;0!==this._buffer.length;){if(null==this._headerInfo)try{this._headerInfo=this._decodeHeader(this._buffer)}catch(r){if("ERR_MSG_TOO_BIG"===r.code)throw r;break}const{id:e,type:n,length:i,offset:o}=this._headerInfo;if(this._buffer.length-o<i)break;const s={id:e,type:n};n!==Yp.NEW_STREAM&&n!==Yp.MESSAGE_INITIATOR&&n!==Yp.MESSAGE_RECEIVER||(s.data=this._buffer.sublist(o,o+i)),t.push(s),this._buffer.consume(o+i),this._headerInfo=null}return t}_decodeHeader(e){const{value:t,offset:r}=ng(e),{value:n,offset:i}=ng(e,r),o=7&t;if(null==Jp[o])throw new Error("Invalid type received: ".concat(o));if(n>this._maxMessageSize)throw Object.assign(new Error("message size too large!"),{code:"ERR_MSG_TOO_BIG"});return{id:t>>3,type:o,offset:r+i,length:n}}}const rg=127;function ng(e){let t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=0,i=0,o=r;const s=e.length;do{if(o>=s||i>49)throw r=0,new RangeError("Could not decode varint");t=e.get(o++),n+=i<28?(t&rg)<<i:(t&rg)*Math.pow(2,i),i+=7}while(t>=128);return r=o-r,{value:n,offset:r}}const ig=1048576,og=(e,t)=>{t.append(e)};const sg=function(e,t){return null!=e[Symbol.asyncIterator]?async function*(){var r,n,i;let o=new da,s=!1,a=Da(),c=Number(null!==(r=null===t||void 0===t?void 0:t.size)&&void 0!==r?r:ig);if((isNaN(c)||0===c||c<0)&&(c=ig),c!==Math.round(c))throw new Error("Batch size must be an integer");const l=null!==(n=null===t||void 0===t?void 0:t.yieldAfter)&&void 0!==n?n:0,u=null!==(i=null===t||void 0===t?void 0:t.serialize)&&void 0!==i?i:og;for(Promise.resolve().then((async()=>{try{let t;for await(const r of e)u(r,o),o.byteLength>=c?(clearTimeout(t),a.resolve()):t=setTimeout((()=>{a.resolve()}),l);clearTimeout(t),a.resolve()}catch(t){a.reject(t)}finally{s=!0}}));!s;)if(await a.promise,a=Da(),o.byteLength>0){const e=o;o=new da,yield e.subarray()}}():function*(){var r,n;const i=new da;let o=Number(null!==(r=null===t||void 0===t?void 0:t.size)&&void 0!==r?r:ig);if((isNaN(o)||0===o||o<0)&&(o=ig),o!==Math.round(o))throw new Error("Batch size must be an integer");const s=null!==(n=null===t||void 0===t?void 0:t.serialize)&&void 0!==n?n:og;for(const t of e)s(t,i),i.byteLength>=o&&(yield i.subarray(0,o),i.consume(o));i.byteLength>0&&(yield i.subarray())}()};function ag(e){return new Uint8Array(e)}const cg=10240;const lg=new class{constructor(){(0,W.Z)(this,"_pool",void 0),(0,W.Z)(this,"_poolOffset",void 0),this._pool=ag(cg),this._poolOffset=0}write(e,t){var r,n;const i=this._pool;let o=this._poolOffset;Do.encode(e.id<<3|e.type,i,o),o+=null!==(r=Do.encode.bytes)&&void 0!==r?r:0,e.type!==Yp.NEW_STREAM&&e.type!==Yp.MESSAGE_INITIATOR&&e.type!==Yp.MESSAGE_RECEIVER||null==e.data?Do.encode(0,i,o):Do.encode(e.data.length,i,o),o+=null!==(n=Do.encode.bytes)&&void 0!==n?n:0;const s=i.subarray(this._poolOffset,o);cg-o<100?(this._pool=ag(cg),this._poolOffset=0):this._poolOffset=o,t.append(s),e.type!==Yp.NEW_STREAM&&e.type!==Yp.MESSAGE_INITIATOR&&e.type!==Yp.MESSAGE_RECEIVER||null==e.data||t.append(e.data)}};const ug=Dp("libp2p:stream"),hg="ERR_STREAM_RESET";function dg(e){return null!=e&&"function"===typeof e.then}class fg{constructor(e){var t;(0,W.Z)(this,"id",void 0),(0,W.Z)(this,"stat",void 0),(0,W.Z)(this,"metadata",void 0),(0,W.Z)(this,"source",void 0),(0,W.Z)(this,"abortController",void 0),(0,W.Z)(this,"resetController",void 0),(0,W.Z)(this,"closeController",void 0),(0,W.Z)(this,"sourceEnded",void 0),(0,W.Z)(this,"sinkEnded",void 0),(0,W.Z)(this,"sinkSunk",void 0),(0,W.Z)(this,"endErr",void 0),(0,W.Z)(this,"streamSource",void 0),(0,W.Z)(this,"onEnd",void 0),(0,W.Z)(this,"maxDataSize",void 0),this.abortController=new AbortController,this.resetController=new AbortController,this.closeController=new AbortController,this.sourceEnded=!1,this.sinkEnded=!1,this.sinkSunk=!1,this.id=e.id,this.metadata=null!==(t=e.metadata)&&void 0!==t?t:{},this.stat={direction:e.direction,timeline:{open:Date.now()}},this.maxDataSize=e.maxDataSize,this.onEnd=e.onEnd,this.source=this.streamSource=La({onEnd:()=>{if(null!==this.stat.timeline.reset){const e=this.sendCloseRead();dg(e)&&e.catch((e=>{ug.error("error while sending close read",e)}))}this.onSourceEnd()}}),this.sink=this.sink.bind(this)}onSourceEnd(e){this.sourceEnded||(this.stat.timeline.closeRead=Date.now(),this.sourceEnded=!0,ug.trace("%s stream %s source end - err: %o",this.stat.direction,this.id,e),null!=e&&null==this.endErr&&(this.endErr=e),this.sinkEnded&&(this.stat.timeline.close=Date.now(),null!=this.onEnd&&this.onEnd(this.endErr)))}onSinkEnd(e){this.sinkEnded||(this.stat.timeline.closeWrite=Date.now(),this.sinkEnded=!0,ug.trace("%s stream %s sink end - err: %o",this.stat.direction,this.id,e),null!=e&&null==this.endErr&&(this.endErr=e),this.sourceEnded&&(this.stat.timeline.close=Date.now(),null!=this.onEnd&&this.onEnd(this.endErr)))}close(){ug.trace("%s stream %s close",this.stat.direction,this.id),this.closeRead(),this.closeWrite()}closeRead(){ug.trace("%s stream %s closeRead",this.stat.direction,this.id),this.sourceEnded||this.streamSource.end()}closeWrite(){if(ug.trace("%s stream %s closeWrite",this.stat.direction,this.id),!this.sinkEnded){this.closeController.abort();try{const e=this.sendCloseWrite();dg(e)&&e.catch((e=>{ug.error("error while sending close write",e)}))}catch(e){ug.trace("%s stream %s error sending close",this.stat.direction,this.id,e)}this.onSinkEnd()}}abort(e){ug.trace("%s stream %s abort",this.stat.direction,this.id,e),this.streamSource.end(e),this.abortController.abort(),this.onSinkEnd(e)}reset(){const e=new zu("stream reset",hg);this.resetController.abort(),this.streamSource.end(e),this.onSinkEnd(e)}async sink(e){if(this.sinkSunk)throw new zu("sink already called on stream","ERR_DOUBLE_SINK");if(this.sinkSunk=!0,this.sinkEnded)throw new zu("stream closed for writing","ERR_SINK_ENDED");const t=Gp([this.abortController.signal,this.resetController.signal,this.closeController.signal]);try{if(e=Vp(e,t),"outbound"===this.stat.direction){const e=this.sendNewStream();dg(e)&&await e}for await(let t of e)for(;t.length>0;){if(t.length<=this.maxDataSize){const e=this.sendData(t instanceof Uint8Array?new da(t):t);dg(e)&&await e;break}t=t instanceof Uint8Array?new da(t):t;const e=this.sendData(t.sublist(0,this.maxDataSize));dg(e)&&await e,t.consume(this.maxDataSize)}}catch(r){if("aborted"===r.type&&"The operation was aborted"===r.message){if(this.closeController.signal.aborted)return;this.resetController.signal.aborted&&(r.message="stream reset",r.code=hg),this.abortController.signal.aborted&&(r.message="stream aborted",r.code="ERR_STREAM_ABORT")}if(r.code===hg)ug.trace("%s stream %s reset",this.stat.direction,this.id);else{ug.trace("%s stream %s error",this.stat.direction,this.id,r);try{const e=this.sendReset();dg(e)&&await e,this.stat.timeline.reset=Date.now()}catch(r){ug.trace("%s stream %s error sending reset",this.stat.direction,this.id,r)}}throw this.streamSource.end(r),this.onSinkEnd(r),r}finally{t.clear()}try{const e=this.sendCloseWrite();dg(e)&&await e}catch(r){ug.trace("%s stream %s error sending close",this.stat.direction,this.id,r)}this.onSinkEnd()}sourcePush(e){this.streamSource.push(e)}sourceReadableLength(){return this.streamSource.readableLength}}class pg extends fg{constructor(e){super(e),(0,W.Z)(this,"name",void 0),(0,W.Z)(this,"streamId",void 0),(0,W.Z)(this,"send",void 0),(0,W.Z)(this,"types",void 0),this.types="outbound"===e.direction?Xp:$p,this.send=e.send,this.name=e.name,this.streamId=e.streamId}sendNewStream(){this.send({id:this.streamId,type:Xp.NEW_STREAM,data:new da(xn(this.name))})}sendData(e){this.send({id:this.streamId,type:this.types.MESSAGE,data:e})}sendReset(){this.send({id:this.streamId,type:this.types.RESET})}sendCloseWrite(){this.send({id:this.streamId,type:this.types.CLOSE})}sendCloseRead(){}}const gg=Dp("libp2p:mplex");function mg(e){const t={...e,type:"".concat(Jp[e.type]," (").concat(e.type,")")};return e.type===Yp.NEW_STREAM&&(t.data=In(e.data instanceof Uint8Array?e.data:e.data.subarray())),e.type!==Yp.MESSAGE_INITIATOR&&e.type!==Yp.MESSAGE_RECEIVER||(t.data=In(e.data instanceof Uint8Array?e.data:e.data.subarray(),"base16")),t}class yg{constructor(e){var t,r;(0,W.Z)(this,"protocol","/mplex/6.7.0"),(0,W.Z)(this,"sink",void 0),(0,W.Z)(this,"source",void 0),(0,W.Z)(this,"_streamId",void 0),(0,W.Z)(this,"_streams",void 0),(0,W.Z)(this,"_init",void 0),(0,W.Z)(this,"_source",void 0),(0,W.Z)(this,"closeController",void 0),(0,W.Z)(this,"rateLimiter",void 0),e=null!==(t=e)&&void 0!==t?t:{},this._streamId=0,this._streams={initiators:new Map,receivers:new Map},this._init=e,this.sink=this._createSink();const n=this._createSource();this._source=n,this.source=n,this.closeController=new AbortController,this.rateLimiter=new Qp.RateLimiterMemory({points:null!==(r=e.disconnectThreshold)&&void 0!==r?r:5,duration:1})}get streams(){const e=[];for(const t of this._streams.initiators.values())e.push(t);for(const t of this._streams.receivers.values())e.push(t);return e}newStream(e){if(this.closeController.signal.aborted)throw new Error("Muxer already closed");const t=this._streamId++;e=null==e?t.toString():e.toString();const r=this._streams.initiators;return this._newStream({id:t,name:e,type:"initiator",registry:r})}close(e){this.closeController.signal.aborted||(null!=e?this.streams.forEach((t=>{t.abort(e)})):this.streams.forEach((e=>{e.close()})),this.closeController.abort())}_newReceiverStream(e){const{id:t,name:r}=e,n=this._streams.receivers;return this._newStream({id:t,name:r,type:"receiver",registry:n})}_newStream(e){var t;const{id:r,name:n,type:i,registry:o}=e;if(gg("new %s stream %s",i,r),"initiator"===i&&this._streams.initiators.size===(null!==(t=this._init.maxOutboundStreams)&&void 0!==t?t:1024))throw new zu("Too many outbound streams open","ERR_TOO_MANY_OUTBOUND_STREAMS");if(o.has(r))throw new Error("".concat(i," stream ").concat(r," already exists!"));const s=function(e){const{id:t,name:r,send:n,onEnd:i,type:o="initiator",maxMsgSize:s=eg}=e;return new pg({id:"initiator"===o?"i".concat(t):"r".concat(t),streamId:t,name:"".concat(null==r?t:r),direction:"initiator"===o?"outbound":"inbound",maxDataSize:s,onEnd:i,send:n})}({id:r,name:n,send:e=>{gg.enabled&&gg.trace("%s stream %s send",i,r,mg(e)),this._source.push(e)},type:i,onEnd:()=>{gg("%s stream with id %s and protocol %s ended",i,r,s.stat.protocol),o.delete(r),null!=this._init.onStreamEnd&&this._init.onStreamEnd(s)},maxMsgSize:this._init.maxMsgSize});return o.set(r,s),s}_createSink(){return async e=>{const t=Gp([this.closeController.signal,this._init.signal]);try{e=Vp(e,t);const r=new tg(this._init.maxMsgSize,this._init.maxUnprocessedMessageQueueSize);for await(const t of e)for(const e of r.write(t))await this._handleIncoming(e);this._source.end()}catch(r){gg("error in sink",r),this._source.end(r)}finally{t.clear()}}}_createSource(){const e=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e=>{let t;const r=[];for(;!e.isEmpty()&&(t=e.shift(),null!=t);){if(null!=t.error)throw t.error;!1===t.done&&r.push(t.value)}return null==t?{done:!0}:{done:!0===t.done,value:r}};return Ua(t,e)}({objectMode:!0,onEnd:e=>{this.close(e)}});return Object.assign(function(e){try{let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return async function*(){if(null!=t&&0!==t)yield*sg(e,{size:t,serialize:(e,t)=>{for(const r of e)lg.write(r,t)}});else for await(const t of e){const e=new da;for(const r of t)lg.write(r,e);yield e.subarray()}}()}catch(t){return Promise.reject(t)}}(e,this._init.minSendBytes),{push:e.push,end:e.end,return:e.return})}async _handleIncoming(e){var t;const{id:r,type:n}=e;if(gg.enabled&&gg.trace("incoming message",mg(e)),e.type===Yp.NEW_STREAM){var i;if(this._streams.receivers.size===(null!==(i=this._init.maxInboundStreams)&&void 0!==i?i:1024)){gg("too many inbound streams open"),this._source.push({id:r,type:Yp.RESET_RECEIVER});try{await this.rateLimiter.consume("new-stream",1)}catch{return gg("rate limit hit when opening too many new streams over the inbound stream limit - closing remote connection"),void this._source.end(new Error("Too many open streams"))}return}const t=this._newReceiverStream({id:r,name:In(e.data instanceof Uint8Array?e.data:e.data.subarray())});return void(null!=this._init.onIncomingStream&&this._init.onIncomingStream(t))}const o=(1===(1&n)?this._streams.initiators:this._streams.receivers).get(r);if(null==o)return void gg("missing stream %s for message type %s",r,Jp[n]);const s=null!==(t=this._init.maxStreamBufferSize)&&void 0!==t?t:4194304;switch(n){case Yp.MESSAGE_INITIATOR:case Yp.MESSAGE_RECEIVER:if(o.sourceReadableLength()>s){this._source.push({id:e.id,type:n===Yp.MESSAGE_INITIATOR?Yp.RESET_RECEIVER:Yp.RESET_INITIATOR});const t=new zu("Input buffer full - increase Mplex maxBufferSize to accommodate slow consumers","ERR_STREAM_INPUT_BUFFER_FULL");return void o.abort(t)}o.sourcePush(e.data);break;case Yp.CLOSE_INITIATOR:case Yp.CLOSE_RECEIVER:o.closeRead();break;case Yp.RESET_INITIATOR:case Yp.RESET_RECEIVER:o.reset();break;default:gg("unknown message type %s",n)}}}class vg{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,W.Z)(this,"protocol","/mplex/6.7.0"),(0,W.Z)(this,"_init",void 0),this._init=e}createStreamMuxer(){return new yg({...arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},...this._init})}}function bg(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return()=>new vg(e)}const wg=Symbol.for("@libp2p/transport");var Eg;function Sg(e){let t;try{t=As("sni").code}catch(r){return null}for(const[n,i]of e)if(n===t&&void 0!==i)return i;return null}function _g(e){return e.some((e=>{let[t,r]=e;return t===As("tls").code}))}function Ag(e,t,r){const n=kg[As(e).name];if(void 0===n)throw new Error("Can't interpret protocol ".concat(As(e).name));const i=n(t,r);return e===As("ip6").code?"[".concat(i,"]"):i}!function(e){e[e.FATAL_ALL=0]="FATAL_ALL",e[e.NO_FATAL=1]="NO_FATAL"}(Eg||(Eg={}));const kg={ip4:(e,t)=>e,ip6:(e,t)=>0===t.length?e:"[".concat(e,"]"),tcp:(e,t)=>{var r;const n=t.pop();if(void 0===n)throw new Error("Unexpected end of multiaddr");return"tcp://".concat(Ag(n[0],null!==(r=n[1])&&void 0!==r?r:"",t),":").concat(e)},udp:(e,t)=>{var r;const n=t.pop();if(void 0===n)throw new Error("Unexpected end of multiaddr");return"udp://".concat(Ag(n[0],null!==(r=n[1])&&void 0!==r?r:"",t),":").concat(e)},dnsaddr:(e,t)=>e,dns4:(e,t)=>e,dns6:(e,t)=>e,dns:(e,t)=>e,ipfs:(e,t)=>{var r;const n=t.pop();if(void 0===n)throw new Error("Unexpected end of multiaddr");return"".concat(Ag(n[0],null!==(r=n[1])&&void 0!==r?r:"",t),"/ipfs/").concat(e)},p2p:(e,t)=>{var r;const n=t.pop();if(void 0===n)throw new Error("Unexpected end of multiaddr");return"".concat(Ag(n[0],null!==(r=n[1])&&void 0!==r?r:"",t),"/p2p/").concat(e)},http:(e,t)=>{var r;const n=_g(t),i=Sg(t);if(n&&null!==i)return"https://".concat(i);const o=n?"https://":"http://",s=t.pop();if(void 0===s)throw new Error("Unexpected end of multiaddr");let a=Ag(s[0],null!==(r=s[1])&&void 0!==r?r:"",t);return a=a.replace("tcp://",""),"".concat(o).concat(a)},tls:(e,t)=>{var r;const n=t.pop();if(void 0===n)throw new Error("Unexpected end of multiaddr");return Ag(n[0],null!==(r=n[1])&&void 0!==r?r:"",t)},sni:(e,t)=>{var r;const n=t.pop();if(void 0===n)throw new Error("Unexpected end of multiaddr");return Ag(n[0],null!==(r=n[1])&&void 0!==r?r:"",t)},https:(e,t)=>{var r;const n=t.pop();if(void 0===n)throw new Error("Unexpected end of multiaddr");let i=Ag(n[0],null!==(r=n[1])&&void 0!==r?r:"",t);return i=i.replace("tcp://",""),"https://".concat(i)},ws:(e,t)=>{var r;const n=_g(t),i=Sg(t);if(n&&null!==i)return"wss://".concat(i);const o=n?"wss://":"ws://",s=t.pop();if(void 0===s)throw new Error("Unexpected end of multiaddr");let a=Ag(s[0],null!==(r=s[1])&&void 0!==r?r:"",t);return a=a.replace("tcp://",""),"".concat(o).concat(a)},wss:(e,t)=>{var r;const n=t.pop();if(void 0===n)throw new Error("Unexpected end of multiaddr");let i=Ag(n[0],null!==(r=n[1])&&void 0!==r?r:"",t);return i=i.replace("tcp://",""),"wss://".concat(i)},"p2p-websocket-star":(e,t)=>{var r;const n=t.pop();if(void 0===n)throw new Error("Unexpected end of multiaddr");return"".concat(Ag(n[0],null!==(r=n[1])&&void 0!==r?r:"",t),"/p2p-websocket-star")},"p2p-webrtc-star":(e,t)=>{var r;const n=t.pop();if(void 0===n)throw new Error("Unexpected end of multiaddr");return"".concat(Ag(n[0],null!==(r=n[1])&&void 0!==r?r:"",t),"/p2p-webrtc-star")},"p2p-webrtc-direct":(e,t)=>{var r;const n=t.pop();if(void 0===n)throw new Error("Unexpected end of multiaddr");return"".concat(Ag(n[0],null!==(r=n[1])&&void 0!==r?r:"",t),"/p2p-webrtc-direct")}};const Cg=WebSocket;var xg=__webpack_require__(3751);function Ig(e){var t;return e instanceof ArrayBuffer||"ArrayBuffer"===(null===e||void 0===e||null===(t=e.constructor)||void 0===t?void 0:t.name)&&"number"===typeof(null===e||void 0===e?void 0:e.byteLength)}const Rg=async e=>{if(e.readyState>=2)throw new Error("socket closed");1!==e.readyState&&await new Promise(((t,r)=>{function n(){e.removeEventListener("open",i),e.removeEventListener("error",o)}function i(){n(),t()}function o(t){var i;n(),r(null!==(i=t.error)&&void 0!==i?i:new Error("connect ECONNREFUSED ".concat(e.url)))}e.addEventListener("open",i),e.addEventListener("error",o)}))},Pg=(e,t)=>{var r;(t=null!==(r=t)&&void 0!==r?r:{}).closeOnEnd=!1!==t.closeOnEnd;return async r=>{for await(const t of r){try{await Rg(e)}catch(n){if("socket closed"===n.message)break;throw n}e.send(t)}null!=t.closeOnEnd&&e.readyState<=1&&await new Promise(((t,r)=>{e.addEventListener("close",(e=>{if(e.wasClean||1006===e.code)t();else{const t=Object.assign(new Error("ws error"),{event:e});r(t)}})),setTimeout((()=>{e.close()}))}))}},Tg=(e,t)=>{var r;t=null!==(r=t)&&void 0!==r?r:{};const n=(e=>{e.binaryType="arraybuffer";const t=async()=>{await new Promise(((t,r)=>{if(i)return void t();if(null!=n)return void r(n);const o=t=>{e.removeEventListener("open",s),e.removeEventListener("error",a),t()},s=()=>{o(t)},a=t=>{o((()=>{var n;r(null!==(n=t.error)&&void 0!==n?n:new Error("connect ECONNREFUSED ".concat(e.url)))}))};e.addEventListener("open",s),e.addEventListener("error",a)}))},r=async function*(){const r=new xg.zN((t=>{let{push:r,stop:n,fail:i}=t;const o=e=>{let t=null;"string"===typeof e.data&&(t=xn(e.data)),Ig(e.data)&&(t=new Uint8Array(e.data)),e.data instanceof Uint8Array&&(t=e.data),null!=t&&r(t)},s=e=>{var t;i(null!==(t=e.error)&&void 0!==t?t:new Error("Socket error"))};return e.addEventListener("message",o),e.addEventListener("error",s),e.addEventListener("close",n),()=>{e.removeEventListener("message",o),e.removeEventListener("error",s),e.removeEventListener("close",n)}}),{highWaterMark:1/0});await t();for await(const e of r)yield Ig(e)?new Uint8Array(e):e}();let n,i=1===e.readyState;return e.addEventListener("open",(()=>{i=!0,n=null})),e.addEventListener("close",(()=>{i=!1,n=null})),e.addEventListener("error",(t=>{var r;i||(n=null!==(r=t.error)&&void 0!==r?r:new Error("connect ECONNREFUSED ".concat(e.url)))})),Object.assign(r,{connected:t})})(e);let i=t.remoteAddress,o=t.remotePort;if(null!=e.url)try{const t=new URL(e.url);i=t.hostname,o=parseInt(t.port,10)}catch{}if(null==i||null==o)throw new Error("Remote connection did not have address and/or port");return{sink:Pg(e,t),source:n,connected:async()=>{await n.connected()},close:async()=>{e.readyState!==e.CONNECTING&&e.readyState!==e.OPEN||await new Promise((t=>{e.addEventListener("close",(()=>{t()})),e.close()}))},destroy:()=>{null!=e.terminate?e.terminate():e.close()},remoteAddress:i,remotePort:o,socket:e}};var Ng=__webpack_require__(4114);const Dg={http:"ws",https:"wss"};function Og(e,t){var r;t=null!==(r=t)&&void 0!==r?r:{};const n=((e,t)=>(0,Ng.relative)(e,t,Dg,"ws"))(e,("undefined"===typeof window?"":window.location).toString()),i=new Cg(n,t.websocket);return Tg(i,t)}var Mg=__webpack_require__(6956);const Bg="object"===typeof window&&"object"===typeof document&&9===document.nodeType,Lg=Mg(),Ug=Bg&&!Lg,Fg=Lg&&!Bg,jg=Lg&&Bg,zg="undefined"!==typeof globalThis.process&&"undefined"!==typeof globalThis.process.release&&"node"===globalThis.process.release.name&&!Lg,Kg="function"===typeof importScripts&&"undefined"!==typeof self&&"undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,qg=("undefined"!==typeof globalThis.process&&"undefined"!==typeof globalThis.process.env&&globalThis.process.env.NODE_ENV,"undefined"!==typeof navigator&&"ReactNative"===navigator.product),Zg=wm("dns4"),Vg=wm("dns6"),Hg=wm("dnsaddr"),Wg=bm(wm("dns"),Hg,Zg,Vg),Gg=bm(wm("ip4"),wm("ip6")),Yg=bm(vm(Gg,wm("tcp")),vm(Wg,wm("tcp"))),Qg=vm(Gg,wm("udp")),Jg=vm(Qg,wm("utp")),Xg=vm(Qg,wm("quic")),$g=vm(Qg,wm("quic-v1")),em=bm(vm(Yg,wm("ws")),vm(Wg,wm("ws"))),tm=bm(vm(em,wm("p2p")),em),rm=bm(vm(Yg,wm("wss")),vm(Wg,wm("wss")),vm(Yg,wm("tls"),wm("ws")),vm(Wg,wm("tls"),wm("ws"))),nm=bm(vm(rm,wm("p2p")),rm),im=bm(vm(Yg,wm("http")),vm(Gg,wm("http")),vm(Wg,wm("http"))),om=bm(vm(Yg,wm("https")),vm(Gg,wm("https")),vm(Wg,wm("https"))),sm=vm(Qg,wm("webrtc-direct"),wm("certhash")),am=bm(vm(sm,wm("p2p")),sm),cm=vm($g,wm("webtransport"),wm("certhash"),wm("certhash")),lm=bm(vm(cm,wm("p2p")),cm),um=bm(vm(tm,wm("p2p-webrtc-star"),wm("p2p")),vm(nm,wm("p2p-webrtc-star"),wm("p2p")),vm(tm,wm("p2p-webrtc-star")),vm(nm,wm("p2p-webrtc-star"))),hm=(bm(vm(tm,wm("p2p-websocket-star"),wm("p2p")),vm(nm,wm("p2p-websocket-star"),wm("p2p")),vm(tm,wm("p2p-websocket-star")),vm(nm,wm("p2p-websocket-star"))),bm(vm(im,wm("p2p-webrtc-direct"),wm("p2p")),vm(om,wm("p2p-webrtc-direct"),wm("p2p")),vm(im,wm("p2p-webrtc-direct")),vm(om,wm("p2p-webrtc-direct")))),dm=bm(em,rm,im,om,um,hm,Yg,Jg,Xg,Wg,am,lm),fm=(bm(vm(dm,wm("p2p-stardust"),wm("p2p")),vm(dm,wm("p2p-stardust"))),bm(vm(dm,wm("p2p")),um,hm,am,lm,wm("p2p"))),pm=bm(vm(fm,wm("p2p-circuit"),fm),vm(fm,wm("p2p-circuit")),vm(wm("p2p-circuit"),fm),vm(dm,wm("p2p-circuit")),vm(wm("p2p-circuit"),dm),wm("p2p-circuit")),gm=()=>bm(vm(pm,gm),pm),mm=gm();bm(vm(mm,fm,mm),vm(fm,mm),vm(mm,fm),mm,fm),bm(vm(mm,wm("webrtc"),wm("p2p")),vm(mm,wm("webrtc")),vm(dm,wm("webrtc"),wm("p2p")),vm(dm,wm("webrtc")),wm("webrtc"));function ym(e){return function(t){let r;try{r=Xs(t)}catch(i){return!1}const n=e(r.protoNames());return null!==n&&(!0===n||!1===n?n:0===n.length)}}function vm(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];function n(e){if(e.length<t.length)return null;let r=e;return t.some((t=>(r="function"===typeof t?t().partialMatch(e):t.partialMatch(e),Array.isArray(r)&&(e=r),null===r))),r}return{toString:function(){return"{ "+t.join(" ")+" }"},input:t,matches:ym(n),partialMatch:n}}function bm(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];function n(e){let r=null;return t.some((t=>{const n="function"===typeof t?t().partialMatch(e):t.partialMatch(e);return null!=n&&(r=n,!0)})),r}const i={toString:function(){return"{ "+t.join(" ")+" }"},input:t,matches:ym(n),partialMatch:n};return i}function wm(e){const t=e;return{toString:function(){return t},matches:function(e){let r;try{r=Xs(e)}catch(i){return!1}const n=r.protoNames();return 1===n.length&&n[0]===t},partialMatch:function(e){return 0===e.length?null:e[0]===t?e.slice(1):null}}}function Em(e){return e.filter((e=>{if(e.protoCodes().includes(290))return!1;const t=e.decapsulateCode(421);return tm.matches(t)||nm.matches(t)}))}class Sm extends Error{constructor(e){super(e),this.name="TimeoutError"}}class _m extends Error{constructor(e){super(),this.name="AbortError",this.message=e}}const Am=e=>void 0===globalThis.DOMException?new _m(e):new DOMException(e),km=e=>{const t=void 0===e.reason?Am("This operation was aborted."):e.reason;return t instanceof Error?t:Am(t)};function Cm(e,t){const{milliseconds:r,fallback:n,message:i,customTimers:o={setTimeout:setTimeout,clearTimeout:clearTimeout}}=t;let s;const a=new Promise(((a,c)=>{if("number"!==typeof r||1!==Math.sign(r))throw new TypeError("Expected `milliseconds` to be a positive number, got `".concat(r,"`"));if(t.signal){const{signal:e}=t;e.aborted&&c(km(e)),e.addEventListener("abort",(()=>{c(km(e))}))}if(r===Number.POSITIVE_INFINITY)return void e.then(a,c);const l=new Sm;s=o.setTimeout.call(void 0,(()=>{if(n)try{a(n())}catch(t){c(t)}else"function"===typeof e.cancel&&e.cancel(),!1===i?a():i instanceof Error?c(i):(l.message=null!==i&&void 0!==i?i:"Promise timed out after ".concat(r," milliseconds"),c(l))}),r),(async()=>{try{a(await e)}catch(t){c(t)}})()})).finally((()=>{a.clear()}));return a.clear=()=>{o.clearTimeout.call(void 0,s),s=void 0},a}const xm=Dp("libp2p:websockets:socket");let Im;const Rm=Dp("libp2p:websockets");Im=Symbol.toStringTag;class Pm{constructor(e){(0,W.Z)(this,"init",void 0),(0,W.Z)(this,Im,"@libp2p/websockets"),(0,W.Z)(this,wg,!0),this.init=e}async dial(e,t){var r;Rm("dialing %s",e),t=null!==(r=t)&&void 0!==r?r:{};const n=function(e,t,r){var n;const i={async sink(t){var n;null!=(null===(n=r)||void 0===n?void 0:n.signal)&&(t=Vp(t,r.signal));try{await e.sink(t)}catch(i){"aborted"!==i.type&&xm.error(i)}},source:null!=(r=null!==(n=r)&&void 0!==n?n:{}).signal?Vp(e.source,r.signal):e.source,remoteAddr:t,timeline:{open:Date.now()},async close(){const t=Date.now();try{await Cm(e.close(),{milliseconds:2e3})}catch(r){const{host:n,port:o}=i.remoteAddr.toOptions();xm("timeout closing stream to %s:%s after %dms, destroying it manually",n,o,Date.now()-t),e.destroy()}finally{i.timeline.close=Date.now()}}};return e.socket.addEventListener("close",(()=>{null==i.timeline.close&&(i.timeline.close=Date.now())}),{once:!0}),i}(await this._connect(e,t),e);Rm("new outbound connection %s",n.remoteAddr);const i=await t.upgrader.upgradeOutbound(n);return Rm("outbound connection %s upgraded",n.remoteAddr),i}async _connect(e,t){var r;if(!0===(null===t||void 0===t||null===(r=t.signal)||void 0===r?void 0:r.aborted))throw new ju;const n=e.toOptions();Rm("dialing %s:%s",n.host,n.port);const i=Da(),o=e=>{Rm.error("connection error:",e),i.reject(e)},s=Og(function(e,t){var r;const n=Xs(e).stringTuples(),i=n.pop();if(void 0===i)throw new Error("Unexpected end of multiaddr");const o=As(i[0]),s=kg[o.name];if(null==s)throw new Error("No interpreter found for ".concat(o.name));let a=s(null!==(r=i[1])&&void 0!==r?r:"",n);return!1!==(null===t||void 0===t?void 0:t.assumeHttp)&&i[0]===As("tcp").code&&(a=a.replace("tcp://","http://"),"443"!==i[1]&&"80"!==i[1]||("443"===i[1]&&(a=a.replace("http://","https://")),a=a.substring(0,a.lastIndexOf(":")))),a}(e),this.init);if(null!=s.socket.on?s.socket.on("error",o):s.socket.onerror=o,null==t.signal)return await Promise.race([s.connected(),i.promise]),Rm("connected %s",e),s;let a;const c=new Promise(((e,r)=>{var n,i;a=()=>{r(new ju),s.close().catch((e=>{Rm.error("error closing raw socket",e)}))},!0!==(null===t||void 0===t||null===(n=t.signal)||void 0===n?void 0:n.aborted)?null===t||void 0===t||null===(i=t.signal)||void 0===i||i.addEventListener("abort",a):a()}));try{await Promise.race([c,i.promise,s.connected()])}finally{var l;if(null!=a)null===t||void 0===t||null===(l=t.signal)||void 0===l||l.removeEventListener("abort",a)}return Rm("connected %s",e),s}createListener(e){return function(){throw new Error("WebSocket Servers can not be created in the browser!")}(this.init)}filter(e){var t,r;return e=Array.isArray(e)?e:[e],null!=(null===(t=this.init)||void 0===t?void 0:t.filter)?null===(r=this.init)||void 0===r?void 0:r.filter(e):Ug||Kg?function(e){return e.filter((e=>{if(e.protoCodes().includes(290))return!1;const t=e.decapsulateCode(421);return nm.matches(t)}))}(e):Em(e)}}function Tm(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return()=>new Pm(e)}const Nm=Symbol.for("@libp2p/peer-discovery");function Dm(e){return new Uint8Array(Un.keccak256.arrayBuffer(e))}function Om(e,t,r){try{return Yt(ft.fromCompact(e.slice(0,64)),t,r)}catch{return!1}}const Mm="Invalid record id";function Bm(e,t){switch(t){case"udp":return Bm(e,"udp4")||Bm(e,"udp6");case"tcp":return Bm(e,"tcp4")||Bm(e,"tcp6")}const r=t.endsWith("6"),n=e.get(r?"ip6":"ip");if(!n)return;const i=t.slice(0,3);let o;switch(i){case"udp":o=r?e.get("udp6"):e.get("udp");break;case"tcp":o=r?e.get("tcp6"):e.get("tcp");break;default:return}return o?function(e,t,r,n){let i=Xs("/"+e+"/"+ks(e,r));return i=i.encapsulate(Xs("/"+t+"/"+ks(t,n))),i}(r?"ip6":"ip4",i,n,o):void 0}function Lm(e){const t=e.reduce(((e,t)=>e+2+t.bytes.length),0),r=new Uint8Array(t),n=new DataView(r.buffer);let i=0;return e.forEach((e=>{if(e.getPeerId())throw new Error("`multiaddr` field MUST not contain peer id");n.setUint16(i,e.bytes.length),i+=2,r.set(e.bytes,i),i+=e.bytes.length})),r}function Um(e){let t=0;return e.lightPush&&(t+=1),t<<=1,e.filter&&(t+=1),t<<=1,e.store&&(t+=1),t<<=1,e.relay&&(t+=1),t}class Fm extends Map{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:BigInt(1),r=arguments.length>2?arguments[2]:void 0;super(Object.entries(e)),(0,W.Z)(this,"seq",void 0),(0,W.Z)(this,"signature",void 0),this.seq=t,this.signature=r}set(e,t){return this.signature=void 0,this.seq++,super.set(e,t)}get id(){const e=this.get("id");if(!e)throw new Error("id not found.");return Tn(e)}get publicKey(){if("v4"===this.id)return this.get("secp256k1");throw new Error(Mm)}get ip(){return jm(this,"ip","ip4")}set ip(e){Km(this,"ip","ip4",e)}get tcp(){return zm(this,"tcp","tcp")}set tcp(e){qm(this,"tcp","tcp",e)}get udp(){return zm(this,"udp","udp")}set udp(e){qm(this,"udp","udp",e)}get ip6(){return jm(this,"ip6","ip6")}set ip6(e){Km(this,"ip6","ip6",e)}get tcp6(){return zm(this,"tcp6","tcp")}set tcp6(e){qm(this,"tcp6","tcp",e)}get udp6(){return zm(this,"udp6","udp")}set udp6(e){qm(this,"udp6","udp",e)}get multiaddrs(){const e=this.get("multiaddrs");if(e)return function(e){const t=[];let r=0;for(;r<e.length;){const n=new DataView(e.buffer,r,2).getUint16(0);r+=2;const i=e.slice(r,r+n);r+=n,t.push(Xs(i))}return t}(e)}set multiaddrs(e){Zm(this,"multiaddrs",e,Lm)}get waku2(){const e=this.get("waku2");if(e)return function(e){const t={relay:!1,store:!1,filter:!1,lightPush:!1};return e%2&&(t.relay=!0),(e>>=1)%2&&(t.store=!0),(e>>=1)%2&&(t.filter=!0),(e>>=1)%2&&(t.lightPush=!0),t}(e[0])}set waku2(e){Zm(this,"waku2",e,(e=>new Uint8Array([Um(e)])))}}function jm(e,t,r){const n=e.get(t);if(n)return ks(r,n)}function zm(e,t,r){const n=e.get(t);if(n)return Number(ks(r,n))}function Km(e,t,r,n){Zm(e,t,n,Cs.bind({},r))}function qm(e,t,r,n){Km(e,t,r,null===n||void 0===n?void 0:n.toString(10))}function Zm(e,t,r,n){void 0!==r?e.set(t,n(r)):e.delete(t)}const Vm=Ue("waku:enr");var Hm,Wm;!function(e){e.TCP="tcp",e.UDP="udp"}(Hm||(Hm={})),function(e){e.TCP4="tcp4",e.UDP4="udp4",e.TCP6="tcp6",e.UDP6="udp6"}(Wm||(Wm={}));class Gm extends Fm{constructor(){super(...arguments),(0,W.Z)(this,"peerId",void 0),(0,W.Z)(this,"getLocationMultiaddr",Bm.bind({},this))}static async create(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:BigInt(1);const r=new Gm(e,t,arguments.length>2?arguments[2]:void 0);try{const e=r.publicKey;e&&(r.peerId=await function(e){return Ap(new vf.secp256k1.Secp256k1PublicKey(e).bytes,void 0)}(e))}catch(n){Vm("Could not calculate peer id for ENR",n)}return r}get nodeId(){if("v4"===this.id)return this.publicKey?function(e){const t=ut.fromHex(e).toRawBytes(!1);return Pn(Dm(t.slice(1)))}(this.publicKey):void 0;throw new Error(Mm)}setLocationMultiaddr(e){const t=e.protoNames();if(2!==t.length&&"udp"!==t[1]&&"tcp"!==t[1])throw new Error("Invalid multiaddr");const r=e.tuples();if(!r[0][1]||!r[1][1])throw new Error("Invalid multiaddr");4===r[0][0]?(this.set("ip",r[0][1]),this.set(t[1],r[1][1])):(this.set("ip6",r[0][1]),this.set(t[1]+"6",r[1][1]))}getAllLocationMultiaddrs(){var e;const t=[];for(const n of Object.values(Wm)){const e=this.getLocationMultiaddr(n);e&&t.push(e)}const r=null!==(e=this.multiaddrs)&&void 0!==e?e:[];return t.concat(r)}get peerInfo(){const e=this.peerId;if(e)return{id:e,multiaddrs:this.getAllLocationMultiaddrs(),protocols:[]}}getFullMultiaddr(e){if(this.peerId){const t=this.getLocationMultiaddr(e);if(t)return t.encapsulate("/p2p/".concat(this.peerId.toString()))}}getFullMultiaddrs(){if(this.peerId&&this.multiaddrs){const e=this.peerId;return this.multiaddrs.map((t=>t.encapsulate("/p2p/".concat(e.toString()))))}return[]}verify(e,t){if(!this.get("id")||"v4"!==this.id)throw new Error(Mm);if(!this.publicKey)throw new Error("Failed to verify ENR: No public key");return Om(t,Dm(e),this.publicKey)}async sign(e,t){if("v4"!==this.id)throw new Error(Mm);return this.signature=await async function(e,t){return Wt(Dm(t),e,{der:!1})}(t,e),this.signature}}(0,W.Z)(Gm,"RECORD_PREFIX","enr:");var Ym=__webpack_require__(807);class Qm{static fromString(e){if(!e.startsWith(Gm.RECORD_PREFIX))throw new Error("\"string encoded ENR must start with '".concat(Gm.RECORD_PREFIX,"'"));return Qm.fromRLP(xn(e.slice(4),"base64url"))}static fromRLP(e){return async function(e){const{signature:t,seq:r,kvs:n}=function(e){if(!Array.isArray(e))throw new Error("Decoded ENR must be an array");if(e.length%2!==0)throw new Error("Decoded ENR must have an even number of elements");const[t,r,...n]=e;if(!t||Array.isArray(t))throw new Error("Decoded ENR invalid signature: must be a byte array");if(!r||Array.isArray(r))throw new Error("Decoded ENR invalid sequence number: must be a byte array");return{signature:t,seq:r,kvs:n}}(e),i={};for(let c=0;c<n.length;c+=2)try{i[Tn(n[c])]=n[c+1]}catch(a){(0,Ue.log)("Failed to decode ENR key to UTF-8, skipping it",n[c],a)}const o=function(e){return e.length?BigInt("0x"+Pn(e)):BigInt(0)}(r),s=await Gm.create(i,o,t);return function(e,t,r,n){const i=Rn(Ym.encode([e,...t]));if(!r.verify(i,n))throw new Error("Unable to verify ENR signature")}(r,n,s,t),s}(Ym.decode(e).map(Rn))}}const Jm=/^(\d{1,3}\.){3,3}\d{1,3}$/,Xm=/^(::)?(((\d{1,3}\.){3}(\d{1,3}){1})?([0-9a-f]){0,4}:{0,2}){1,8}(::)?$/i,$m={name:"v4",size:4,isFormat:e=>Jm.test(e),encode(e,t,r){r=~~r,t=t||new Uint8Array(r+4);const n=e.length;let i=0;for(let o=0;o<n;){const n=e.charCodeAt(o++);46===n?(t[r++]=i,i=0):i=10*i+(n-48)}return t[r]=i,t},decode:(e,t)=>(t=~~t,"".concat(e[t++],".").concat(e[t++],".").concat(e[t++],".").concat(e[t]))},ey={name:"v6",size:16,isFormat:e=>e.length>0&&Xm.test(e),encode(e,t,r){let n=(r=~~r)+16,i=-1,o=0,s=0,a=!0,c=!1;t=t||new Uint8Array(r+16);for(let l=0;l<e.length;l++){let u=e.charCodeAt(l);58===u?(a?-1!==i?(r<n&&(t[r]=0),r<n-1&&(t[r+1]=0),r+=2):r<n&&(i=r):(!0===c?(r<n&&(t[r]=s),r++):(r<n&&(t[r]=o>>8),r<n-1&&(t[r+1]=255&o),r+=2),o=0,s=0),a=!0,c=!1):46===u?(r<n&&(t[r]=s),r++,s=0,o=0,a=!1,c=!0):(a=!1,u>=97?u-=87:u>=65?u-=55:(u-=48,s=10*s+u),o=(o<<4)+u)}if(!1===a)!0===c?(r<n&&(t[r]=s),r++):(r<n&&(t[r]=o>>8),r<n-1&&(t[r+1]=255&o),r+=2);else if(0===i)r<n&&(t[r]=0),r<n-1&&(t[r+1]=0),r+=2;else if(-1!==i){r+=2;for(let e=Math.min(r-1,n-1);e>=i+2;e--)t[e]=t[e-2];t[i]=0,t[i+1]=0,i=r}if(i!==r&&-1!==i)for(r>n-2&&(r=n-2);n>i;)t[--n]=r<n&&r>i?t[--r]:0;else for(;r<n;)t[r++]=0;return t},decode(e,t){t=~~t;let r="";for(let n=0;n<16;n+=2)0!==n&&(r+=":"),r+=(e[t+n]<<8|e[t+n+1]).toString(16);return r.replace(/(^|:)0(:0)*:0(:|$)/,"$1::$3").replace(/:{3,4}/,"::")}};function ty(e){if($m.isFormat(e))return $m.size;if(ey.isFormat(e))return ey.size;throw Error("Invalid ip address: ".concat(e))}function ry(e){switch(e){case 1:return"A";case 10:return"NULL";case 28:return"AAAA";case 18:return"AFSDB";case 42:return"APL";case 257:return"CAA";case 60:return"CDNSKEY";case 59:return"CDS";case 37:return"CERT";case 5:return"CNAME";case 49:return"DHCID";case 32769:return"DLV";case 39:return"DNAME";case 48:return"DNSKEY";case 43:return"DS";case 55:return"HIP";case 13:return"HINFO";case 45:return"IPSECKEY";case 25:return"KEY";case 36:return"KX";case 29:return"LOC";case 15:return"MX";case 35:return"NAPTR";case 2:return"NS";case 47:return"NSEC";case 50:return"NSEC3";case 51:return"NSEC3PARAM";case 12:return"PTR";case 46:return"RRSIG";case 17:return"RP";case 24:return"SIG";case 6:return"SOA";case 99:return"SPF";case 33:return"SRV";case 44:return"SSHFP";case 32768:return"TA";case 249:return"TKEY";case 52:return"TLSA";case 250:return"TSIG";case 16:return"TXT";case 252:return"AXFR";case 251:return"IXFR";case 41:return"OPT";case 255:return"ANY"}return"UNKNOWN_"+e}function ny(e){switch(e.toUpperCase()){case"A":return 1;case"NULL":return 10;case"AAAA":return 28;case"AFSDB":return 18;case"APL":return 42;case"CAA":return 257;case"CDNSKEY":return 60;case"CDS":return 59;case"CERT":return 37;case"CNAME":return 5;case"DHCID":return 49;case"DLV":return 32769;case"DNAME":return 39;case"DNSKEY":return 48;case"DS":return 43;case"HIP":return 55;case"HINFO":return 13;case"IPSECKEY":return 45;case"KEY":return 25;case"KX":return 36;case"LOC":return 29;case"MX":return 15;case"NAPTR":return 35;case"NS":return 2;case"NSEC":return 47;case"NSEC3":return 50;case"NSEC3PARAM":return 51;case"PTR":return 12;case"RRSIG":return 46;case"RP":return 17;case"SIG":return 24;case"SOA":return 6;case"SPF":return 99;case"SRV":return 33;case"SSHFP":return 44;case"TA":return 32768;case"TKEY":return 249;case"TLSA":return 52;case"TSIG":return 250;case"TXT":return 16;case"AXFR":return 252;case"IXFR":return 251;case"OPT":return 41;case"ANY":case"*":return 255}return e.toUpperCase().startsWith("UNKNOWN_")?parseInt(e.slice(8)):0}function iy(e){switch(e){case 0:return"NOERROR";case 1:return"FORMERR";case 2:return"SERVFAIL";case 3:return"NXDOMAIN";case 4:return"NOTIMP";case 5:return"REFUSED";case 6:return"YXDOMAIN";case 7:return"YXRRSET";case 8:return"NXRRSET";case 9:return"NOTAUTH";case 10:return"NOTZONE";case 11:return"RCODE_11";case 12:return"RCODE_12";case 13:return"RCODE_13";case 14:return"RCODE_14";case 15:return"RCODE_15"}return"RCODE_"+e}function oy(e){switch(e){case 0:return"QUERY";case 1:return"IQUERY";case 2:return"STATUS";case 3:return"OPCODE_3";case 4:return"NOTIFY";case 5:return"UPDATE";case 6:return"OPCODE_6";case 7:return"OPCODE_7";case 8:return"OPCODE_8";case 9:return"OPCODE_9";case 10:return"OPCODE_10";case 11:return"OPCODE_11";case 12:return"OPCODE_12";case 13:return"OPCODE_13";case 14:return"OPCODE_14";case 15:return"OPCODE_15"}return"OPCODE_"+e}function sy(e){switch(e){case 1:return"IN";case 2:return"CS";case 3:return"CH";case 4:return"HS";case 255:return"ANY"}return"UNKNOWN_"+e}function ay(e){switch(e.toUpperCase()){case"IN":return 1;case"CS":return 2;case"CH":return 3;case"HS":return 4;case"ANY":return 255}return 0}function cy(e){if("number"===typeof e)return e;if(!e)return-1;switch(e.toUpperCase()){case"OPTION_0":return 0;case"LLQ":return 1;case"UL":return 2;case"NSID":return 3;case"OPTION_4":return 4;case"DAU":return 5;case"DHU":return 6;case"N3U":return 7;case"CLIENT_SUBNET":return 8;case"EXPIRE":return 9;case"COOKIE":return 10;case"TCP_KEEPALIVE":return 11;case"PADDING":return 12;case"CHAIN":return 13;case"KEY_TAG":return 14;case"DEVICEID":return 26946;case"OPTION_65535":return 65535}const t=e.match(/_(\d+)$/);return t?parseInt(t[1],10):-1}const ly=55296,uy=56320;function hy(e){let t=0;const r=e.length;for(let n=0;n<r;n+=1){const i=e.charCodeAt(n);if(i<=127)t+=1;else if(i<=2047)t+=2;else if((63488&i)!==ly)t+=3;else{const o=n+1;if(o===r||i>=uy)t+=3;else{(64512&e.charCodeAt(o))!==uy?t+=3:(n=o,t+=4)}}}return t}function dy(e,t,r){const n=e.length;void 0!==r&&null!==r||(r=0),void 0===t&&(t=new Uint8Array(hy(e)+r));let i=r;for(let o=0;o<n;o+=1){let r=e.charCodeAt(o);if(r<=127)t[i++]=r;else if(r<=2047)t[i++]=192|(1984&r)>>6,t[i++]=128|63&r;else if((63488&r)!==ly)t[i++]=224|(61440&r)>>12,t[i++]=128|(4032&r)>>6,t[i++]=128|63&r;else{const s=o+1;if(s===n||r>=uy)t[i++]=239,t[i++]=191,t[i++]=189;else{const n=e.charCodeAt(s);(64512&n)!==uy?(t[i++]=239,t[i++]=191,t[i++]=189):(o=s,r=65536|(1023&r)<<10|1023&n,t[i++]=240|(1835008&r)>>18,t[i++]=128|(258048&r)>>12,t[i++]=128|(4032&r)>>6,t[i++]=128|63&r)}}}return dy.bytes=i-r,t}function fy(e,t,r){let n="";void 0!==t&&null!==t||(t=0),void 0!==r&&null!==r||(r=e.length);for(let i=t;i<r;){const t=e[i++];let r;if(t<=128)r=t;else if(t>191&&t<224)r=(31&t)<<6|63&e[i++];else if(t>239&&t<365){r=((7&t)<<18|(63&e[i++])<<12|(63&e[i++])<<6|63&e[i++])-65536;const o=ly|r>>10&1023;n+=String.fromCharCode(o),r=uy|1023&r}else r=(15&t)<<12|(63&e[i++])<<6|63&e[i++];n+=String.fromCharCode(r)}return fy.bytes=r-t,n}dy.bytes=0,fy.bytes=0;const py=e=>e instanceof Uint8Array;function gy(e){return"string"===typeof e?hy(e):e.byteLength}function my(e){return e instanceof Uint8Array?e:Array.isArray(e)?new Uint8Array(e):dy(e)}function yy(e,t,r){if("string"!==typeof t)throw new Error("unknown input type");return dy(t,e,r),dy.bytes}const vy=Math.pow(2,24),by=Math.pow(2,16),wy=Math.pow(2,8),Ey=(e,t)=>e[t]*vy+e[t+1]*by+e[t+2]*wy+e[t+3],Sy=(e,t)=>e[t]<<8|e[t+1],_y=(e,t,r)=>(t=+t,e[r+3]=t,t>>>=8,e[r+2]=t,t>>>=8,e[r+1]=t,t>>>=8,e[r]=t,r+4),Ay=(e,t,r)=>(e[r]=t>>8,e[r+1]=255&t,r+2);function ky(e,t,r,n,i){return r<0&&(n-=r,r=0),n<0&&(n=0),i<0?new Uint8Array(0):r>=t.length||n>=i?0:function(e,t,r,n,i){i-n>t.length-r&&(i=n+t.length-r);let o=i-n;const s=e.length-n;o>s&&(o=s);(0!==n||i<e.length)&&(e=new Uint8Array(e.buffer,e.byteOffset+n,o));return t.set(e,r),o}(e,t,r,n,i)}const Cy=32768;function xy(e){let{bytes:t=0,encode:r,decode:n,encodingLength:i}=e;return r.bytes=t,n.bytes=t,{encode:r,decode:n,encodingLength:i||(()=>t)}}const Iy=xy({encode(e,t,r){t||(t=new Uint8Array(Iy.encodingLength(e))),r||(r=0);const n=r,i=e.replace(/^\.|\.$/gm,"");if(i.length){const e=i.split(".");for(let n=0;n<e.length;n++){const i=yy(t,e[n],r+1);t[r]=i,r+=i+1}}return t[r++]=0,Iy.encode.bytes=r-n,t},decode(e,t){t||(t=0);const r=[];let n=t,i=0,o=0,s=!1;for(;;){if(t>=e.length)throw new Error("Cannot decode name (buffer overflow)");const a=e[t++];if(o+=s?0:1,0===a)break;if(0===(192&a)){if(t+a>e.length)throw new Error("Cannot decode name (buffer overflow)");if(i+=a+1,i>254)throw new Error("Cannot decode name (name too long)");r.push(fy(e,t,t+a)),t+=a,o+=s?0:a}else{if(192!==(192&a))throw new Error("Cannot decode name (bad label)");{if(t+1>e.length)throw new Error("Cannot decode name (buffer overflow)");const r=Sy(e,t-1)-49152;if(r>=n)throw new Error("Cannot decode name (bad pointer)");t=r,n=r,o+=s?0:1,s=!0}}}return Iy.decode.bytes=o,0===r.length?".":r.join(".")},encodingLength:e=>"."===e||".."===e?1:gy(e.replace(/^\.|\.$/gm,""))+2}),Ry=xy({encode(e,t,r){t||(t=new Uint8Array(Ry.encodingLength(e))),r||(r=0);const n=yy(t,e,r+1);return t[r]=n,Ry.encode.bytes=n+1,t},decode(e,t){t||(t=0);const r=e[t],n=fy(e,t+1,t+1+r);return Ry.decode.bytes=r+1,n},encodingLength:e=>gy(e)+1}),Py=xy({bytes:12,encode(e,t,r){t||(t=new Uint8Array(Py.encodingLength(e))),r||(r=0);const n=32767&(e.flags||0),i="response"===e.type?32768:0;return Ay(t,e.id||0,r),Ay(t,n|i,r+2),Ay(t,e.questions.length,r+4),Ay(t,e.answers.length,r+6),Ay(t,e.authorities.length,r+8),Ay(t,e.additionals.length,r+10),t},decode(e,t){if(t||(t=0),e.length<12)throw new Error("Header must be 12 bytes");const r=Sy(e,t+2);return{id:Sy(e,t),type:32768&r?"response":"query",flags:32767&r,flag_qr:1===(r>>15&1),opcode:oy(r>>11&15),flag_aa:1===(r>>10&1),flag_tc:1===(r>>9&1),flag_rd:1===(r>>8&1),flag_ra:1===(r>>7&1),flag_z:1===(r>>6&1),flag_ad:1===(r>>5&1),flag_cd:1===(r>>4&1),rcode:iy(15&r),questions:new Array(Sy(e,t+4)),answers:new Array(Sy(e,t+6)),authorities:new Array(Sy(e,t+8)),additionals:new Array(Sy(e,t+10))}},encodingLength:()=>12}),Ty=xy({encode(e,t,r){t||(t=new Uint8Array(Ty.encodingLength(e))),r||(r=0);const n=e.length;return Ay(t,n,r),ky(e,t,r+2,0,n),Ty.encode.bytes=n+2,t},decode(e,t){t||(t=0);const r=Sy(e,t),n=e.slice(t+2,t+2+r);return Ty.decode.bytes=r+2,n},encodingLength:e=>e.length+2}),Ny=xy({encode:(e,t,r)=>(t||(t=new Uint8Array(Ny.encodingLength(e))),r||(r=0),Iy.encode(e,t,r+2),Ay(t,Iy.encode.bytes,r),Ny.encode.bytes=Iy.encode.bytes+2,t),decode(e,t){t||(t=0);const r=Sy(e,t),n=Iy.decode(e,t+2);return Ny.decode.bytes=r+2,n},encodingLength:e=>Iy.encodingLength(e)+2}),Dy=xy({encode(e,t,r){t||(t=new Uint8Array(Dy.encodingLength(e))),r||(r=0);const n=r;return r+=2,Iy.encode(e.mname,t,r),r+=Iy.encode.bytes,Iy.encode(e.rname,t,r),r+=Iy.encode.bytes,_y(t,e.serial||0,r),r+=4,_y(t,e.refresh||0,r),r+=4,_y(t,e.retry||0,r),r+=4,_y(t,e.expire||0,r),r+=4,_y(t,e.minimum||0,r),Ay(t,(r+=4)-n-2,n),Dy.encode.bytes=r-n,t},decode(e,t){t||(t=0);const r=t,n={};return t+=2,n.mname=Iy.decode(e,t),t+=Iy.decode.bytes,n.rname=Iy.decode(e,t),t+=Iy.decode.bytes,n.serial=Ey(e,t),t+=4,n.refresh=Ey(e,t),t+=4,n.retry=Ey(e,t),t+=4,n.expire=Ey(e,t),t+=4,n.minimum=Ey(e,t),t+=4,Dy.decode.bytes=t-r,n},encodingLength:e=>22+Iy.encodingLength(e.mname)+Iy.encodingLength(e.rname)}),Oy=xy({encode(e,t,r){Array.isArray(e)||(e=[e]);for(let i=0;i<e.length;i++)if("string"===typeof e[i]&&(e[i]=my(e[i])),!py(e[i]))throw new Error("Must be a Buffer");t||(t=new Uint8Array(Oy.encodingLength(e))),r||(r=0);const n=r;return r+=2,e.forEach((function(e){t[r++]=e.length,ky(e,t,r,0,e.length),r+=e.length})),Ay(t,r-n-2,n),Oy.encode.bytes=r-n,t},decode(e,t){t||(t=0);const r=t;let n=Sy(e,t);t+=2;const i=[];for(;n>0;){const r=e[t++];if(--n,n<r)throw new Error("Buffer overflow");i.push(e.slice(t,t+r)),t+=r,n-=r}return Oy.decode.bytes=t-r,i},encodingLength(e){Array.isArray(e)||(e=[e]);let t=2;return e.forEach((function(e){t+="string"===typeof e?gy(e)+1:e.length+1})),t}}),My=xy({encode(e,t,r){t||(t=new Uint8Array(My.encodingLength(e))),r||(r=0),"string"===typeof e&&(e=my(e)),e||(e=new Uint8Array(0));const n=r;r+=2;const i=e.length;return ky(e,t,r,0,i),Ay(t,(r+=i)-n-2,n),My.encode.bytes=r-n,t},decode(e,t){t||(t=0);const r=t,n=Sy(e,t);t+=2;const i=e.slice(t,t+n);return t+=n,My.decode.bytes=t-r,i},encodingLength:e=>e?(py(e)?e.length:gy(e))+2:2}),By=xy({encode(e,t,r){t||(t=new Uint8Array(By.encodingLength(e))),r||(r=0);const n=r;return r+=2,Ry.encode(e.cpu,t,r),r+=Ry.encode.bytes,Ry.encode(e.os,t,r),r+=Ry.encode.bytes,Ay(t,r-n-2,n),By.encode.bytes=r-n,t},decode(e,t){t||(t=0);const r=t,n={};return t+=2,n.cpu=Ry.decode(e,t),t+=Ry.decode.bytes,n.os=Ry.decode(e,t),t+=Ry.decode.bytes,By.decode.bytes=t-r,n},encodingLength:e=>Ry.encodingLength(e.cpu)+Ry.encodingLength(e.os)+2}),Ly=xy({encode:(e,t,r)=>(t||(t=new Uint8Array(Ly.encodingLength(e))),r||(r=0),Iy.encode(e,t,r+2),Ay(t,Iy.encode.bytes,r),Ly.encode.bytes=Iy.encode.bytes+2,t),decode(e,t){t||(t=0);const r=Iy.decode(e,t+2);return Ly.decode.bytes=Iy.decode.bytes+2,r},encodingLength:e=>Iy.encodingLength(e)+2}),Uy=xy({encode(e,t,r){t||(t=new Uint8Array(Uy.encodingLength(e))),r||(r=0),Ay(t,e.priority||0,r+2),Ay(t,e.weight||0,r+4),Ay(t,e.port||0,r+6),Iy.encode(e.target,t,r+8);const n=Iy.encode.bytes+6;return Ay(t,n,r),Uy.encode.bytes=n+2,t},decode(e,t){t||(t=0);const r=Sy(e,t),n={};return n.priority=Sy(e,t+2),n.weight=Sy(e,t+4),n.port=Sy(e,t+6),n.target=Iy.decode(e,t+8),Uy.decode.bytes=r+2,n},encodingLength:e=>8+Iy.encodingLength(e.target)}),Fy=xy({encode(e,t,r){const n=Fy.encodingLength(e);return t||(t=new Uint8Array(Fy.encodingLength(e))),r||(r=0),e.issuerCritical&&(e.flags=Fy.ISSUER_CRITICAL),Ay(t,n-2,r),t[r+=2]=e.flags||0,r+=1,Ry.encode(e.tag,t,r),r+=Ry.encode.bytes,yy(t,e.value,r),r+=gy(e.value),Fy.encode.bytes=n,t},decode(e,t){t||(t=0);const r=Sy(e,t),n=t+=2,i={};return i.flags=e[t],t+=1,i.tag=Ry.decode(e,t),t+=Ry.decode.bytes,i.value=fy(e,t,n+r),i.issuerCritical=!!(i.flags&Fy.ISSUER_CRITICAL),Fy.decode.bytes=r+2,i},encodingLength:e=>Ry.encodingLength(e.tag)+Ry.encodingLength(e.value)+2});Fy.ISSUER_CRITICAL=128;const jy=xy({encode(e,t,r){t||(t=new Uint8Array(jy.encodingLength(e))),r||(r=0);const n=r;return r+=2,Ay(t,e.preference||0,r),r+=2,Iy.encode(e.exchange,t,r),r+=Iy.encode.bytes,Ay(t,r-n-2,n),jy.encode.bytes=r-n,t},decode(e,t){t||(t=0);const r=t,n={};return t+=2,n.preference=Sy(e,t),t+=2,n.exchange=Iy.decode(e,t),t+=Iy.decode.bytes,jy.decode.bytes=t-r,n},encodingLength:e=>4+Iy.encodingLength(e.exchange)}),zy=xy({encode:(e,t,r)=>(t||(t=new Uint8Array(zy.encodingLength(e))),r||(r=0),Ay(t,4,r),r+=2,$m.encode(e,t,r),t),decode(e,t){t||(t=0),t+=2;return $m.decode(e,t)},bytes:6}),Ky=xy({encode:(e,t,r)=>(t||(t=new Uint8Array(Ky.encodingLength(e))),r||(r=0),Ay(t,16,r),r+=2,ey.encode(e,t,r),Ky.encode.bytes=18,t),decode(e,t){t||(t=0),t+=2;const r=ey.decode(e,t);return Ky.decode.bytes=18,r},bytes:18}),qy=e=>new Uint8Array(e),Zy=xy({encode(e,t,r){t||(t=new Uint8Array(Zy.encodingLength(e))),r||(r=0);const n=r,i=cy(e.code);if(Ay(t,i,r),r+=2,e.data)Ay(t,e.data.length,r),r+=2,ky(e.data,t,r),r+=e.data.length;else switch(i){case 8:{const n=e.sourcePrefixLength||0,i=e.family||function(e){return ty(e)===$m.size?1:2}(e.ip),o=function(e,t,r){r=~~r;const n=ty(e);return"function"===typeof t&&(t=t(r+n)),n===$m.size?$m.encode(e,t,r):ey.encode(e,t,r)}(e.ip,qy),s=Math.ceil(n/8);Ay(t,s+4,r),Ay(t,i,r+=2),r+=2,t[r++]=n,t[r++]=e.scopePrefixLength||0,ky(o,t,r,0,s),r+=s}break;case 11:e.timeout?(Ay(t,2,r),r+=2,Ay(t,e.timeout,r),r+=2):(Ay(t,0,r),r+=2);break;case 12:{const n=e.length||0;Ay(t,n,r),r+=2,t.fill(0,r,r+n),r+=n}break;case 14:{const n=2*e.tags.length;Ay(t,n,r),r+=2;for(const i of e.tags)Ay(t,i,r),r+=2}break;default:throw new Error("Unknown roption code: ".concat(e.code))}return Zy.encode.bytes=r-n,t},decode(e,t){t||(t=0);const r={};r.code=Sy(e,t),r.type=function(e){switch(e){case 1:return"LLQ";case 2:return"UL";case 3:return"NSID";case 5:return"DAU";case 6:return"DHU";case 7:return"N3U";case 8:return"CLIENT_SUBNET";case 9:return"EXPIRE";case 10:return"COOKIE";case 11:return"TCP_KEEPALIVE";case 12:return"PADDING";case 13:return"CHAIN";case 14:return"KEY_TAG";case 26946:return"DEVICEID"}return e<0?null:"OPTION_".concat(e)}(r.code);const n=Sy(e,t+=2);switch(t+=2,r.data=e.slice(t,t+n),r.code){case 8:r.family=Sy(e,t),t+=2,r.sourcePrefixLength=e[t++],r.scopePrefixLength=e[t++];{const i=new Uint8Array(1===r.family?4:16);ky(e,i,0,t,t+n-4),r.ip=function(e,t,r){if(t=~~t,(r=r||e.length-t)===$m.size)return $m.decode(e,t,r);if(r===ey.size)return ey.decode(e,t,r);throw Error("Invalid buffer size needs to be ".concat($m.size," for v4 or ").concat(ey.size," for v6."))}(i)}break;case 11:n>0&&(r.timeout=Sy(e,t),t+=2);break;case 14:r.tags=[];for(let i=0;i<n;i+=2)r.tags.push(Sy(e,t)),t+=2}return Zy.decode.bytes=n+4,r},encodingLength(e){if(e.data)return e.data.length+4;switch(cy(e.code)){case 8:{const t=e.sourcePrefixLength||0;return Math.ceil(t/8)+8}case 11:return"number"===typeof e.timeout?6:4;case 12:return e.length+4;case 14:return 4+2*e.tags.length}throw new Error("Unknown roption code: ".concat(e.code))}}),Vy=xy({encode(e,t,r){t||(t=new Uint8Array(Vy.encodingLength(e))),r||(r=0);const n=r,i=lv(e,Zy);return Ay(t,i,r),r=uv(e,Zy,t,r+2),Vy.encode.bytes=r-n,t},decode(e,t){t||(t=0);const r=t,n=[];let i=Sy(e,t);t+=2;let o=0;for(;i>0;)n[o++]=Zy.decode(e,t),t+=Zy.decode.bytes,i-=Zy.decode.bytes;return Vy.decode.bytes=t-r,n},encodingLength:e=>2+lv(e||[],Zy)}),Hy=xy({encode(e,t,r){t||(t=new Uint8Array(Hy.encodingLength(e))),r||(r=0);const n=r,i=e.key;if(!py(i))throw new Error("Key must be a Buffer");return r+=2,Ay(t,e.flags,r),t[r+=2]=Hy.PROTOCOL_DNSSEC,t[r+=1]=e.algorithm,ky(i,t,r+=1,0,i.length),r+=i.length,Hy.encode.bytes=r-n,Ay(t,Hy.encode.bytes-2,n),t},decode(e,t){t||(t=0);const r=t,n={},i=Sy(e,t);if(t+=2,n.flags=Sy(e,t),e[t+=2]!==Hy.PROTOCOL_DNSSEC)throw new Error("Protocol must be 3");return t+=1,n.algorithm=e[t],t+=1,n.key=e.slice(t,r+i+2),t+=n.key.length,Hy.decode.bytes=t-r,n},encodingLength:e=>6+gy(e.key)});Hy.PROTOCOL_DNSSEC=3,Hy.ZONE_KEY=128,Hy.SECURE_ENTRYPOINT=32768;const Wy=xy({encode(e,t,r){t||(t=new Uint8Array(Wy.encodingLength(e))),r||(r=0);const n=r,i=e.signature;if(!py(i))throw new Error("Signature must be a Buffer");return r+=2,Ay(t,ny(e.typeCovered),r),t[r+=2]=e.algorithm,t[r+=1]=e.labels,r+=1,_y(t,e.originalTTL,r),r+=4,_y(t,e.expiration,r),r+=4,_y(t,e.inception,r),r+=4,Ay(t,e.keyTag,r),r+=2,Iy.encode(e.signersName,t,r),ky(i,t,r+=Iy.encode.bytes,0,i.length),r+=i.length,Wy.encode.bytes=r-n,Ay(t,Wy.encode.bytes-2,n),t},decode(e,t){t||(t=0);const r=t,n={},i=Sy(e,t);return t+=2,n.typeCovered=ry(Sy(e,t)),t+=2,n.algorithm=e[t],t+=1,n.labels=e[t],t+=1,n.originalTTL=Ey(e,t),t+=4,n.expiration=Ey(e,t),t+=4,n.inception=Ey(e,t),t+=4,n.keyTag=Sy(e,t),t+=2,n.signersName=Iy.decode(e,t),t+=Iy.decode.bytes,n.signature=e.slice(t,r+i+2),t+=n.signature.length,Wy.decode.bytes=t-r,n},encodingLength:e=>20+Iy.encodingLength(e.signersName)+gy(e.signature)}),Gy=xy({encode(e,t,r){t||(t=new Uint8Array(Gy.encodingLength(e))),r||(r=0);const n=r;return r+=2,Iy.encode(e.mbox||".",t,r),r+=Iy.encode.bytes,Iy.encode(e.txt||".",t,r),r+=Iy.encode.bytes,Gy.encode.bytes=r-n,Ay(t,Gy.encode.bytes-2,n),t},decode(e,t){t||(t=0);const r=t,n={};return t+=2,n.mbox=Iy.decode(e,t)||".",t+=Iy.decode.bytes,n.txt=Iy.decode(e,t)||".",t+=Iy.decode.bytes,Gy.decode.bytes=t-r,n},encodingLength:e=>2+Iy.encodingLength(e.mbox||".")+Iy.encodingLength(e.txt||".")}),Yy=xy({encode(e,t,r){t||(t=new Uint8Array(Yy.encodingLength(e))),r||(r=0);const n=r,i=[];for(let o=0;o<e.length;o++){const t=ny(e[o]);void 0===i[t>>8]&&(i[t>>8]=[]),i[t>>8][t>>3&31]|=1<<7-(7&t)}for(let o=0;o<i.length;o++)if(void 0!==i[o]){const e=my(i[o]);t[r]=o,t[r+=1]=e.length,ky(e,t,r+=1,0,e.length),r+=e.length}return Yy.encode.bytes=r-n,t},decode(e,t,r){t||(t=0);const n=t,i=[];for(;t-n<r;){const r=e[t],n=e[t+=1];t+=1;for(let o=0;o<n;o++){const n=e[t+o];for(let e=0;e<8;e++)if(n&1<<7-e){const t=ry(r<<8|o<<3|e);i.push(t)}}t+=n}return Yy.decode.bytes=t-n,i},encodingLength(e){const t=[];for(let n=0;n<e.length;n++){const r=ny(e[n]);t[r>>8]=Math.max(t[r>>8]||0,255&r)}let r=0;for(let n=0;n<t.length;n++)void 0!==t[n]&&(r+=2+Math.ceil((t[n]+1)/8));return r}}),Qy=xy({encode(e,t,r){t||(t=new Uint8Array(Qy.encodingLength(e))),r||(r=0);const n=r;return r+=2,Iy.encode(e.nextDomain,t,r),r+=Iy.encode.bytes,Yy.encode(e.rrtypes,t,r),r+=Yy.encode.bytes,Qy.encode.bytes=r-n,Ay(t,Qy.encode.bytes-2,n),t},decode(e,t){t||(t=0);const r=t,n={},i=Sy(e,t);return t+=2,n.nextDomain=Iy.decode(e,t),t+=Iy.decode.bytes,n.rrtypes=Yy.decode(e,t,i-(t-r)),t+=Yy.decode.bytes,Qy.decode.bytes=t-r,n},encodingLength:e=>2+Iy.encodingLength(e.nextDomain)+Yy.encodingLength(e.rrtypes)}),Jy=xy({encode(e,t,r){t||(t=new Uint8Array(Jy.encodingLength(e))),r||(r=0);const n=r,i=e.salt;if(!py(i))throw new Error("salt must be a Buffer");const o=e.nextDomain;if(!py(o))throw new Error("nextDomain must be a Buffer");return t[r+=2]=e.algorithm,t[r+=1]=e.flags,r+=1,Ay(t,e.iterations,r),t[r+=2]=i.length,ky(i,t,r+=1,0,i.length),t[r+=i.length]=o.length,ky(o,t,r+=1,0,o.length),r+=o.length,Yy.encode(e.rrtypes,t,r),r+=Yy.encode.bytes,Jy.encode.bytes=r-n,Ay(t,Jy.encode.bytes-2,n),t},decode(e,t){t||(t=0);const r=t,n={},i=Sy(e,t);t+=2,n.algorithm=e[t],t+=1,n.flags=e[t],t+=1,n.iterations=Sy(e,t);const o=e[t+=2];t+=1,n.salt=e.slice(t,t+o);const s=e[t+=o];return t+=1,n.nextDomain=e.slice(t,t+s),t+=s,n.rrtypes=Yy.decode(e,t,i-(t-r)),t+=Yy.decode.bytes,Jy.decode.bytes=t-r,n},encodingLength:e=>8+e.salt.length+e.nextDomain.length+Yy.encodingLength(e.rrtypes)}),Xy=xy({encode(e,t,r){t||(t=new Uint8Array(Xy.encodingLength(e))),r||(r=0);const n=r,i=e.digest;if(!py(i))throw new Error("Digest must be a Buffer");return r+=2,Ay(t,e.keyTag,r),t[r+=2]=e.algorithm,t[r+=1]=e.digestType,ky(i,t,r+=1,0,i.length),r+=i.length,Xy.encode.bytes=r-n,Ay(t,Xy.encode.bytes-2,n),t},decode(e,t){t||(t=0);const r=t,n={},i=Sy(e,t);return t+=2,n.keyTag=Sy(e,t),t+=2,n.algorithm=e[t],t+=1,n.digestType=e[t],t+=1,n.digest=e.slice(t,r+i+2),t+=n.digest.length,Xy.decode.bytes=t-r,n},encodingLength:e=>6+gy(e.digest)});function $y(e){switch(e.toUpperCase()){case"A":return zy;case"PTR":case"CNAME":case"DNAME":return Ly;case"TXT":return Oy;case"NULL":return My;case"AAAA":return Ky;case"SRV":return Uy;case"HINFO":return By;case"CAA":return Fy;case"NS":return Ny;case"SOA":return Dy;case"MX":return jy;case"OPT":return Vy;case"DNSKEY":return Hy;case"RRSIG":return Wy;case"RP":return Gy;case"NSEC":return Qy;case"NSEC3":return Jy;case"DS":return Xy}return Ty}const ev=xy({encode(e,t,r){t||(t=new Uint8Array(ev.encodingLength(e))),r||(r=0);const n=r;if(Iy.encode(e.name,t,r),r+=Iy.encode.bytes,Ay(t,ny(e.type),r),"OPT"===e.type.toUpperCase()){if("."!==e.name)throw new Error("OPT name must be root.");Ay(t,e.udpPayloadSize||4096,r+2),t[r+4]=e.extendedRcode||0,t[r+5]=e.ednsVersion||0,Ay(t,e.flags||0,r+6),r+=8,Vy.encode(e.options||[],t,r),r+=Vy.encode.bytes}else{let n=ay(void 0===e.class?"IN":e.class);e.flush&&(n|=Cy),Ay(t,n,r+2),_y(t,e.ttl||0,r+4),r+=8;const i=$y(e.type);i.encode(e.data,t,r),r+=i.encode.bytes}return ev.encode.bytes=r-n,t},decode(e,t){t||(t=0);const r={},n=t;if(r.name=Iy.decode(e,t),t+=Iy.decode.bytes,r.type=ry(Sy(e,t)),"OPT"===r.type)r.udpPayloadSize=Sy(e,t+2),r.extendedRcode=e[t+4],r.ednsVersion=e[t+5],r.flags=Sy(e,t+6),r.flag_do=1===(r.flags>>15&1),r.options=Vy.decode(e,t+8),t+=8+Vy.decode.bytes;else{const n=Sy(e,t+2);r.ttl=Ey(e,t+4),r.class=sy(-32769&n),r.flush=!!(n&Cy);const i=$y(r.type);r.data=i.decode(e,t+8),t+=8+i.decode.bytes}return ev.decode.bytes=t-n,r},encodingLength(e){const t=null!==e.data&&void 0!==e.data?e.data:e.options;return Iy.encodingLength(e.name)+8+$y(e.type).encodingLength(t)}}),tv=xy({encode(e,t,r){t||(t=new Uint8Array(tv.encodingLength(e))),r||(r=0);const n=r;return Iy.encode(e.name,t,r),r+=Iy.encode.bytes,Ay(t,ny(e.type),r),r+=2,Ay(t,ay(void 0===e.class?"IN":e.class),r),r+=2,tv.encode.bytes=r-n,e},decode(e,t){t||(t=0);const r=t,n={};n.name=Iy.decode(e,t),t+=Iy.decode.bytes,n.type=ry(Sy(e,t)),t+=2,n.class=sy(Sy(e,t)),t+=2;return!!(32768&n.class)&&(n.class&=-32769),tv.decode.bytes=t-r,n},encodingLength:e=>Iy.encodingLength(e.name)+4}),rv={encode:function(e,t,r){const n=!t;n&&(t=new Uint8Array(cv(e))),r||(r=0);const i=r;return e.questions||(e.questions=[]),e.answers||(e.answers=[]),e.authorities||(e.authorities=[]),e.additionals||(e.additionals=[]),Py.encode(e,t,r),r+=Py.encode.bytes,r=uv(e.questions,tv,t,r),r=uv(e.answers,ev,t,r),r=uv(e.authorities,ev,t,r),r=uv(e.additionals,ev,t,r),rv.encode.bytes=r-i,n&&sv.bytes!==t.length?t.slice(0,sv.bytes):t},decode:function(e,t){t||(t=0);const r=t,n=Py.decode(e,t);return t+=Py.decode.bytes,t=hv(n.questions,tv,e,t),t=hv(n.answers,ev,e,t),t=hv(n.authorities,ev,e,t),t=hv(n.additionals,ev,e,t),rv.decode.bytes=t-r,n},encodingLength:function(e){return Py.encodingLength(e)+lv(e.questions||[],tv)+lv(e.answers||[],ev)+lv(e.authorities||[],ev)+lv(e.additionals||[],ev)}};function nv(e,t){if(e.questions)throw new Error("Only one .question object expected instead of a .questions array!");const r=Object.assign({type:t},e);return r.question&&(r.questions=[r.question],delete r.question),r}rv.encode.bytes=0,rv.decode.bytes=0;const iv={encode:function(e,t,r){return t=rv.encode(nv(e,"query"),t,r),iv.encode.bytes=rv.encode.bytes,t},decode:function(e,t){const r=rv.decode(e,t);return iv.decode.bytes=rv.decode.bytes,r.questions&&(r.question=r.questions[0],delete r.questions),r},encodingLength:function(e){return rv.encodingLength(nv(e,"query"))}};iv.encode.bytes=0,iv.decode.bytes=0;const ov={encode:function(e,t,r){return t=rv.encode(nv(e,"response"),t,r),ov.encode.bytes=rv.encode.bytes,t},decode:function(e,t){const r=rv.decode(e,t);return ov.decode.bytes=rv.decode.bytes,r.questions&&(r.question=r.questions[0],delete r.questions),r},encodingLength:function(e){return rv.encodingLength(nv(e,"response"))}};ov.encode.bytes=0,ov.decode.bytes=0;const sv=rv.encode,av=rv.decode,cv=rv.encodingLength;function lv(e,t){let r=0;for(let n=0;n<e.length;n++)r+=t.encodingLength(e[n]);return r}function uv(e,t,r,n){for(let i=0;i<e.length;i++)t.encode(e[i],r,n),n+=t.encode.bytes;return n}function hv(e,t,r,n){for(let i=0;i<e.length;i++)e[i]=t.decode(r,n),n+=t.decode.bytes;return n}function dv(e,t,r,n){if(64!==t.length)throw new Error("Charset needs to be 64 characters long! (".concat(t.length,")"));const i=new Uint8Array(256),o=new Uint8Array(64);for(let c=0;c<64;c+=1){const e=t.charCodeAt(c);if(e>255)throw new Error("Character #".concat(c," in charset [code=").concat(e,", char=").concat(t.charAt(c),"] is too high! (max=255)"));if(0!==i[e])throw new Error("Character [code=".concat(e,", char=").concat(t.charAt(c),"] is more than once in the charset!"));i[e]=c,o[c]=e}const s=r.charCodeAt(0),a={name:e,encodingLength(e){const t=e.length,r=.75*t|0;return e.charCodeAt(t-1)===s?e.charCodeAt(t-2)===s?r-2:r-1:r},encode(e,t,r){null!==t&&void 0!==t||(t=new Uint8Array(a.encodingLength(e))),null!==r&&void 0!==r||(r=0);let n=e.length;e.charCodeAt(n-1)===s&&(e.charCodeAt(n-2)===s?n-=2:n-=1);const o=n%4,c=n-o;let l=r,u=0;for(;u<c;){const r=i[e.charCodeAt(u)]<<18|i[e.charCodeAt(u+1)]<<12|i[e.charCodeAt(u+2)]<<6|i[e.charCodeAt(u+3)];t[l++]=r>>16,t[l++]=r>>8,t[l++]=r,u+=4}if(3===o){const r=i[e.charCodeAt(u)]<<10|i[e.charCodeAt(u+1)]<<4|i[e.charCodeAt(u+2)]>>2;t[l++]=r>>8,t[l++]=r}else 2===o&&(t[l++]=i[e.charCodeAt(u)]<<2|i[e.charCodeAt(u+1)]>>4);return a.encode.bytes=l-r,t},decode(e,t,r){null!==t&&void 0!==t||(t=0),null!==r&&void 0!==r||(r=e.length);const i=r-t,c=i%3,l=t+i-c,u=[];for(let n=t;n<l;n+=3){const t=e[n]<<16|e[n+1]<<8|e[n+2];u.push(o[t>>18&63],o[t>>12&63],o[t>>6&63],o[63&t])}if(2===c){const t=(e[r-2]<<8)+e[r-1];u.push(o[t>>10],o[t>>4&63],o[t<<2&63]),1===n&&u.push(s)}else if(1===c){const t=e[r-1];u.push(o[t>>2],o[t<<4&63]),1===n&&u.push(s,s)}return a.decode.bytes=i,String.fromCharCode.apply(String,u)}};return a}dv("base64","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/","=",1);const fv=dv("base64-url","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_","=",2);let pv="undefined"!==typeof global?global.AbortError:"undefined"!==typeof window?window.AbortError:null;pv||(pv=class extends Error{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Request aborted.")}}),pv.prototype.name="AbortError",pv.prototype.code="ABORT_ERR";const gv="undefined"!==typeof globalThis&&globalThis.URL||require("url").URL;class mv extends Error{constructor(e,t,r){super("status="+t+" while requesting "+e+" ["+r+"]"),this.uri=e,this.status=t,this.method=r}toJSON(){return{code:this.code,uri:this.uri,status:this.status,method:this.method,endpoint:this.endpoint}}}mv.prototype.name="HTTPStatusError",mv.prototype.code="HTTP_STATUS";class yv extends Error{constructor(e,t){super(e),this.cause=t}toJSON(){return{message:this.message,endpoint:this.endpoint,code:this.code,cause:Ev(this.cause)}}}yv.prototype.name="ResponseError",yv.prototype.code="RESPONSE_ERR";class vv extends Error{constructor(e){super("Timeout (t="+e+")."),this.timeout=e}toJSON(){return{code:this.code,endpoint:this.endpoint,timeout:this.timeout}}}vv.prototype.name="TimeoutError",vv.prototype.code="ETIMEOUT";const bv=/^((\d{1,3}\.){3,3}\d{1,3})(:(\d{2,5}))?$/,wv=/^((::)?(((\d{1,3}\.){3}(\d{1,3}){1})?([0-9a-f]){0,4}:{0,2}){1,8}(::)?)(:(\d{2,5}))?$/i;function Ev(e){if("string"===typeof e)return{message:e};try{const t=JSON.stringify(e);if("{}"!==t)return JSON.parse(t)}catch(r){}const t={message:String(e.message||e)};return void 0!==e.code&&(t.code=String(e.code)),t}const Sv=/^(([a-z0-9]+:)\/\/)?([^/[\s:]+|\[[^\]]+\])?(:([^/\s]+))?(\/[^\s]*)?(.*)$/,_v=/\[(post|get|((ipv4|ipv6|name)=([^\]]+)))\]/gi,Av=/\[(((pk|name)=([^\]]+)))\]/gi;function kv(e,t){t.lastIndex=0;const r={};for(;;){const n=t.exec(e);if(!n)break;n[2]?r[n[3].toLowerCase()]=n[4]:r[n[1].toLowerCase()]=!0}return r}class Cv extends Error{constructor(e,t){super('Invalid Endpoint: unsupported protocol "'.concat(e,'" for endpoint: ').concat(t,", supported protocols: ").concat(xv.join(", "))),this.protocol=e,this.endpoint=t}toJSON(){return{code:this.code,endpoint:this.endpoint,timeout:this.timeout}}}Cv.prototype.name="InvalidProtocolError",Cv.prototype.code="EPROTOCOL";const xv=["http:","https:","udp4:","udp6:"];class Iv{constructor(e,t){this.name=e.name||null,this.protocol=e.protocol;const r="string"===typeof e.port?e.port=parseInt(e.port,10):e.port;if(void 0===r||null===r)this.port=t?"https:"===this.protocol?443:80:e.pk?443:53;else{if("number"!==typeof r&&!isNaN(r))throw new Error('Invalid Endpoint: port "'.concat(e.port,'" needs to be a number: ').concat(JSON.stringify(e)));this.port=r}}toJSON(){return this.toString()}}class Rv extends Iv{constructor(e){super(e,!1),this.pk=e.pk||null}toString(){const e=this.port!==(this.pk?443:53)?":".concat(this.port):"",t=this.pk?" [pk=".concat(this.pk,"]"):"",r=this.name?" [name=".concat(this.name,"]"):"";return"udp://".concat(this.ipv4||"[".concat(this.ipv6,"]")).concat(e).concat(t).concat(r)}}class Pv extends Rv{constructor(e){if(super(Object.assign({protocol:"udp4:"},e)),!e.ipv4||"string"!==typeof e.ipv4)throw new Error('Invalid Endpoint: .ipv4 "'.concat(e.ipv4,'" needs to be set: ').concat(JSON.stringify(e)));this.ipv4=e.ipv4}}class Tv extends Rv{constructor(e){if(super(Object.assign({protocol:"udp6:"},e)),!e.ipv6||"string"!==typeof e.ipv6)throw new Error('Invalid Endpoint: .ipv6 "'.concat(e.ipv6,'" needs to be set: ').concat(JSON.stringify(e)));this.ipv6=e.ipv6}}function Nv(e){return wv.test(e)&&!bv.test(e)?"[".concat(e,"]"):e}class Dv extends Iv{constructor(e){if(super(Object.assign({protocol:"https:"},e),!0),e.host||(e.ipv4&&(e.host=e.ipv4),e.ipv6&&(e.host="[".concat(e.ipv6,"]"))),!e.host||"string"!==typeof e.host)throw new Error('Invalid Endpoint: host "'.concat(e.path,'" needs to be set: ').concat(JSON.stringify(e)));if(this.host=e.host,this.path=e.path||"/dns-query",this.method=/^post$/i.test(e.method)?"POST":"GET",this.ipv4=e.ipv4,this.ipv6=e.ipv6,!this.ipv6){const e=wv.exec(this.host);e&&(this.ipv6=e[1])}this.ipv4||bv.test(this.host)&&(this.ipv4=this.host);const t="".concat(this.protocol,"//").concat(Nv(this.host),":").concat(this.port).concat(this.path);try{this.url=new gv(t)}catch(r){throw new Error(r.message+" [".concat(t,"]"))}}toString(){const e="https:"===this.protocol?"":"http://",t=this.port!==("https:"===this.protocol?443:80)?":".concat(this.port):"",r="GET"!==this.method?" [post]":"",n="/dns-query"===this.path?"":this.path,i=this.name?" [name=".concat(this.name,"]"):"",o=this.ipv4&&this.ipv4!==this.host?" [ipv4=".concat(this.ipv4,"]"):"",s=this.ipv6&&this.ipv6!==this.host?" [ipv6=".concat(this.ipv6,"]"):"";return"".concat(e).concat(Nv(this.host)).concat(t).concat(n).concat(r).concat(o).concat(s).concat(i)}}function Ov(e){let t;if("string"===typeof e)t=function(e){const t=Sv.exec(e),r=t[2]||"https:",n=t[3],i=t[5],o=t[6],s=t[7];if("https:"===r||"http:"===r){const e=kv(s,_v);return{name:e.name,protocol:r,ipv4:e.ipv4,ipv6:e.ipv6,host:n,port:i,path:o,method:e.post?"POST":"GET"}}if("udp:"===r||"udp4:"===r||"udp6:"===r){const t=kv(s,Av),o=/^\[(.*)\]$/.exec(n);if(o&&"udp4:"===r)throw new Error("Endpoint parsing error: Cannot use ipv6 host with udp4: (endpoint=".concat(e,")"));if(!o&&"udp6:"===r)throw new Error("Endpoint parsing error: Incorrectly formatted host for udp6: (endpoint=".concat(e,")"));return o?new Tv({protocol:"udp6:",ipv6:o[1],port:i,pk:t.pk,name:t.name}):new Pv({protocol:"udp4:",ipv4:n,port:i,pk:t.pk,name:t.name})}throw new Cv(r,e)}(e);else{if("object"!==typeof e||null===e||Array.isArray(e))throw new Error("Can not convert ".concat(e," to an endpoint"));if(e instanceof Iv)return e;t=e}null!==t.protocol&&void 0!==t.protocol||(t.protocol="https:");const r=t.protocol;if("udp4:"===r)return new Pv(t);if("udp6:"===r)return new Tv(t);if("https:"===r||"http:"===r)return new Dv(t);throw new Cv(r,JSON.stringify(t))}const Mv="application/dns-message";function Bv(){}function Lv(e,t,r,n,i){return new Promise(((o,s)=>{const a=new gv(e);"GET"===t&&r&&(a.search="?dns="+fv.decode(r));const c=a.toString(),l=new XMLHttpRequest;l.open(t,c,!0),l.setRequestHeader("Accept",Mv),"POST"===t&&l.setRequestHeader("Content-Type",Mv),l.responseType="arraybuffer",l.timeout=n,l.ontimeout=function(){u(new vv(n));try{l.abort()}catch(e){}},l.onreadystatechange=function(){if(l.readyState>1&&200!==l.status&&0!==l.status){u(new mv(c,l.status,t));try{l.abort()}catch(e){}}},l.onerror=function(){u(200===l.status?new Error("Inexplicable XHR Error"):new mv(c,l.status,t))},l.onload=function(){if(200!==l.status)u(new mv(c,l.status,t));else{let e;if("string"===typeof l.response)e=dy(l.response);else if(l.response instanceof Uint8Array)e=l.response;else{if(!(Array.isArray(l.response)||l.response instanceof ArrayBuffer))throw new Error("Unprocessable response "+l.response);e=new Uint8Array(l.response)}u(null,e)}},"POST"===t?l.send(r):l.send(),i&&i.addEventListener("abort",h);let u=function(e,t){u=Bv,i&&i.removeEventListener("abort",h),o(e?{error:e,response:l}:{data:t,response:l})};function h(){u(new pv);try{l.abort()}catch(e){}}}))}class Uv extends Error{constructor(e,t){super("".concat(DNS_RCODE_MESSAGE[e]||"Undefined error."," (rcode=").concat(e).concat(DNS_RCODE_ERROR[e]?", error=".concat(DNS_RCODE_ERROR[e]):"",", question=").concat(JSON.stringify(t),")")),this.rcode=e,this.code="DNS_RCODE_".concat(e),this.error=DNS_RCODE_ERROR[e],this.question=t}toJSON(){return{code:this.code,error:this.error,question:this.question,endpoint:this.endpoint}}}function Fv(e){const t=null===e.time||void 0===e.time?Date.now():e.time,r=function(e){return e.filter((e=>e.cors||e.endpoint.cors))}(e.data.map((e=>(e.endpoint=Ov(Object.assign({name:e.name},e.endpoint)),e)))),n=r.map((e=>e.endpoint));return{data:{resolvers:r,resolverByName:r.reduce(((e,t)=>(e[t.name]=t,e)),{}),endpoints:n,endpointByName:n.reduce(((e,t)=>(e[t.name]=t,e)),{})},time:t}}const jv=Fv({data:[{name:"adfree.usableprivacy.net",endpoint:{protocol:"https:",host:"adfree.usableprivacy.net"},description:"Public updns DoH service with advertising, tracker and malware filters.\nHosted in Europe by @usableprivacy, details see: https://docs.usableprivacy.com",country:"Germany",location:{lat:51.2993,long:9.491},filter:!0},{name:"adguard-dns-doh",endpoint:{protocol:"https:",host:"dns.adguard.com",ipv4:"94.140.15.15"},description:"Remove ads and protect your computer from malware (over DoH)",country:"France",location:{lat:48.8582,long:2.3387},filter:!0},{name:"adguard-dns-family-doh",endpoint:{protocol:"https:",host:"dns-family.adguard.com",ipv4:"94.140.15.16"},description:"Adguard DNS with safesearch and adult content blocking (over DoH)",country:"France",location:{lat:48.8582,long:2.3387},filter:!0},{name:"adguard-dns-unfiltered-doh",endpoint:{protocol:"https:",host:"dns-unfiltered.adguard.com",ipv4:"94.140.14.140"},description:"AdGuard public DNS servers without filters (over DoH)",country:"France",location:{lat:48.8582,long:2.3387}},{name:"ahadns-doh-chi",endpoint:{protocol:"https:",host:"doh.chi.ahadns.net",cors:!0},description:"A zero logging DNS with support for DNS-over-HTTPS (DoH) & DNS-over-TLS (DoT). Blocks ads, malware, trackers, viruses, ransomware, telemetry and more. No persistent logs. DNSSEC. Hosted in Chicago, USA. By https://ahadns.com/\nServer statistics can be seen at: https://statistics.ahadns.com/?server=chi",country:"United States",location:{lat:41.8483,long:-87.6517},filter:!0,cors:!0},{name:"ahadns-doh-in",endpoint:{protocol:"https:",host:"doh.in.ahadns.net",cors:!0},description:"A zero logging DNS with support for DNS-over-HTTPS (DoH) & DNS-over-TLS (DoT). Blocks ads, malware, trackers, viruses, ransomware, telemetry and more. No persistent logs. DNSSEC. Hosted in Mumbai, India. By https://ahadns.com/\nServer statistics can be seen at: https://statistics.ahadns.com/?server=in",country:"India",location:{lat:19.0748,long:72.8856},filter:!0,cors:!0},{name:"ahadns-doh-la",endpoint:{protocol:"https:",host:"doh.la.ahadns.net",cors:!0},description:"A zero logging DNS with support for DNS-over-HTTPS (DoH) & DNS-over-TLS (DoT). Blocks ads, malware, trackers, viruses, ransomware, telemetry and more. No persistent logs. DNSSEC. Hosted in Los Angeles, USA. By https://ahadns.com/\nServer statistics can be seen at: https://statistics.ahadns.com/?server=la",country:"United States",location:{lat:34.0549,long:-118.2578},filter:!0,cors:!0},{name:"ahadns-doh-nl",endpoint:{protocol:"https:",host:"doh.nl.ahadns.net",cors:!0},description:"A zero logging DNS with support for DNS-over-HTTPS (DoH) & DNS-over-TLS (DoT). Blocks ads, malware, trackers, viruses, ransomware, telemetry and more. No persistent logs. DNSSEC. Hosted in Amsterdam, Netherlands. By https://ahadns.com/\nServer statistics can be seen at: https://statistics.ahadns.com/?server=nl",country:"Netherlands",location:{lat:52.3824,long:4.8995},filter:!0,cors:!0},{name:"ahadns-doh-ny",endpoint:{protocol:"https:",host:"doh.ny.ahadns.net",cors:!0},description:"A zero logging DNS with support for DNS-over-HTTPS (DoH) & DNS-over-TLS (DoT). Blocks ads, malware, trackers, viruses, ransomware, telemetry and more. No persistent logs. DNSSEC. Hosted in New York. By https://ahadns.com/\nServer statistics can be seen at: https://statistics.ahadns.com/?server=ny",country:"United States",location:{lat:40.7308,long:-73.9975},filter:!0,cors:!0},{name:"ahadns-doh-pl",endpoint:{protocol:"https:",host:"doh.pl.ahadns.net",cors:!0},description:"A zero logging DNS with support for DNS-over-HTTPS (DoH) & DNS-over-TLS (DoT). Blocks ads, malware, trackers, viruses, ransomware, telemetry and more. No persistent logs. DNSSEC. Hosted in Poland. By https://ahadns.com/\nServer statistics can be seen at: https://statistics.ahadns.com/?server=pl",country:"Netherlands",location:{lat:52.3824,long:4.8995},filter:!0,cors:!0},{name:"alidns-doh",endpoint:{protocol:"https:",host:"dns.alidns.com",ipv4:"223.5.5.5",cors:!0},description:"A public DNS resolver that supports DoH/DoT in mainland China, provided by Alibaba-Cloud.\nWarning: GFW filtering rules are applied by that resolver.\nHomepage: https://alidns.com/",country:"China",location:{lat:34.7725,long:113.7266},filter:!0,log:!0,cors:!0},{name:"ams-ads-doh-nl",endpoint:{protocol:"https:",host:"dnsnl-noads.alekberg.net"},description:"Resolver in Amsterdam. DoH protocol. Non-logging. Blocks ads, malware and trackers. DNSSEC enabled.",country:"Romania",location:{lat:45.9968,long:24.997},filter:!0},{name:"ams-doh-nl",endpoint:{protocol:"https:",host:"dnsnl.alekberg.net"},description:"Resolver in Amsterdam. DoH protocol. Non-logging, non-filtering, DNSSEC.",country:"Romania",location:{lat:45.9968,long:24.997}},{name:"att",endpoint:{protocol:"https:",host:"dohtrial.att.net"},description:"AT&T test DoH server.",log:!0},{name:"bcn-ads-doh",endpoint:{protocol:"https:",host:"dnses-noads.alekberg.net"},description:"Resolver in Spain. DoH protocol. Non-logging, remove ads and malware, DNSSEC.",country:"Spain",location:{lat:41.3891,long:2.1611},filter:!0},{name:"bcn-doh",endpoint:{protocol:"https:",host:"dnses.alekberg.net"},description:"Resolver in Spain. DoH protocol. Non-logging, non-filtering, DNSSEC.",country:"Spain",location:{lat:41.3891,long:2.1611}},{name:"brahma-world",endpoint:{protocol:"https:",host:"dns.brahma.world"},description:"DNS-over-HTTPS server. Non Logging, filters ads, trackers and malware. DNSSEC ready, QNAME Minimization, No EDNS Client-Subnet.\nHosted in Stockholm, Sweden. (https://dns.brahma.world)",country:"United States",location:{lat:37.751,long:-97.822},filter:!0},{name:"cisco-doh",endpoint:{protocol:"https:",host:"doh.opendns.com",ipv4:"146.112.41.2"},description:"Remove your DNS blind spot (DoH protocol)\nWarning: modifies your queries to include a copy of your network\naddress when forwarding them to a selection of companies and organizations.",country:"United States",location:{lat:37.751,long:-97.822},filter:!0,log:!0},{name:"cloudflare",endpoint:{protocol:"https:",host:"dns.cloudflare.com",ipv4:"1.0.0.1",cors:!0},description:"Cloudflare DNS (anycast) - aka 1.1.1.1 / 1.0.0.1",country:"Australia",location:{lat:-33.494,long:143.2104},cors:!0},{name:"cloudflare-family",endpoint:{protocol:"https:",host:"family.cloudflare-dns.com",ipv4:"1.0.0.3",cors:!0},description:"Cloudflare DNS (anycast) with malware protection and parental control - aka 1.1.1.3 / 1.0.0.3",country:"Australia",location:{lat:-33.494,long:143.2104},filter:!0,cors:!0},{name:"cloudflare-ipv6",endpoint:{protocol:"https:",host:"1dot1dot1dot1.cloudflare-dns.com",cors:!0},description:"Cloudflare DNS over IPv6 (anycast)",country:"United States",location:{lat:37.751,long:-97.822},cors:!0},{name:"cloudflare-security",endpoint:{protocol:"https:",host:"security.cloudflare-dns.com",ipv4:"1.0.0.2",cors:!0},description:"Cloudflare DNS (anycast) with malware blocking - aka 1.1.1.2 / 1.0.0.2",country:"Australia",location:{lat:-33.494,long:143.2104},filter:!0,cors:!0},{name:"controld-block-malware",endpoint:{protocol:"https:",host:"freedns.controld.com",path:"/p1"},description:"ControlD Free DNS. Take CONTROL of your Internet. Block unwanted content, bypass geo-restrictions and be more productive. DoH protocol and No logging. - https://controld.com/free-dns\nThis DNS blocks Malware domains.",country:"Canada",location:{lat:43.6319,long:-79.3716},filter:!0},{name:"controld-block-malware-ad",endpoint:{protocol:"https:",host:"freedns.controld.com",path:"/p2"},description:"ControlD Free DNS. Take CONTROL of your Internet. Block unwanted content, bypass geo-restrictions and be more productive. DoH protocol and No logging. - https://controld.com/free-dns\nThis DNS blocks Malware, Ads & Tracking domains.",country:"Canada",location:{lat:43.6319,long:-79.3716},filter:!0},{name:"controld-block-malware-ad-social",endpoint:{protocol:"https:",host:"freedns.controld.com",path:"/p3"},description:"ControlD Free DNS. Take CONTROL of your Internet. Block unwanted content, bypass geo-restrictions and be more productive. DoH protocol and No logging. - https://controld.com/free-dns\nThis DNS blocks Malware, Ads & Tracking and Social Networks domains.",country:"Canada",location:{lat:43.6319,long:-79.3716},filter:!0},{name:"controld-family-friendly",endpoint:{protocol:"https:",host:"freedns.controld.com",path:"/family"},description:"ControlD Free DNS. Take CONTROL of your Internet. Block unwanted content, bypass geo-restrictions and be more productive. DoH protocol and No logging. - https://controld.com/free-dns\nThis DNS blocks Malware, Ads & Tracking, Adult Content and Drugs domains.",country:"Canada",location:{lat:43.6319,long:-79.3716},filter:!0},{name:"controld-uncensored",endpoint:{protocol:"https:",host:"freedns.controld.com",path:"/uncensored"},description:"ControlD Free DNS. Take CONTROL of your Internet. Block unwanted content, bypass geo-restrictions and be more productive. DoH protocol and No logging. - https://controld.com/free-dns\nThis DNS unblocks censored domains from various countries.",country:"Canada",location:{lat:43.6319,long:-79.3716}},{name:"controld-unfiltered",endpoint:{protocol:"https:",host:"freedns.controld.com",path:"/p0"},description:"ControlD Free DNS. Take CONTROL of your Internet. Block unwanted content, bypass geo-restrictions and be more productive. DoH protocol and No logging. - https://controld.com/free-dns\nThis is a Unfiltered DNS, no DNS record blocking or manipulation here, if you want to block Malware, Ads & Tracking or Social Network domains, use the other ControlD DNS configs.",country:"Canada",location:{lat:43.6319,long:-79.3716}},{name:"dns.digitale-gesellschaft.ch",endpoint:{protocol:"https:",host:"dns.digitale-gesellschaft.ch"},description:"Public DoH resolver operated by the Digital Society (https://www.digitale-gesellschaft.ch).\nHosted in Zurich, Switzerland.\nNon-logging, non-filtering, supports DNSSEC.",country:"Switzerland",location:{lat:47.1449,long:8.1551}},{name:"dns.ryan-palmer",endpoint:{protocol:"https:",host:"dns1.ryan-palmer.com"},description:"Non-logging, non-filtering, DNSSEC DoH Server. Hosted in the UK.",country:"United Kingdom",location:{lat:51.5164,long:-.093}},{name:"dns.sb",endpoint:{protocol:"https:",host:"doh.sb",ipv4:"185.222.222.222",cors:!0},description:"DNSSEC-enabled DoH server by https://xtom.com/\nhttps://dns.sb/doh/",country:"Unknown",location:{lat:47,long:8},cors:!0},{name:"dns.therifleman.name",endpoint:{protocol:"https:",host:"dns.therifleman.name"},description:"DNS-over-HTTPS DNS forwarder from Mumbai, India. Blocks web and Android trackers and ads.\nIP addresses are not logged, but queries are logged for 24 hours for debugging.\nReport issues, send suggestions @ joker349 at protonmail.com.\nAlso supports DoT (for android) @ dns.therifleman.name and plain DNS @ 172.104.206.174",country:"United States",location:{lat:37.751,long:-97.822},filter:!0},{name:"dnsforfamily-doh",endpoint:{protocol:"https:",host:"dns-doh.dnsforfamily.com"},description:"(DoH Protocol) (Now supports DNSSEC). Block adult websites, gambling websites, malwares and advertisements.\nIt also enforces safe search in: Google, YouTube, Bing, DuckDuckGo and Yandex.\nSocial websites like Facebook and Instagram are not blocked. No DNS queries are logged.\nAs of 26-May-2022 5.9 million websites are blocked and new websites are added to blacklist daily.\nCompletely free, no ads or any commercial motive. Operating for 4 years now.\nProvided by: https://dnsforfamily.com",country:"Finland",location:{lat:60.1758,long:24.9349},filter:!0},{name:"dnsforfamily-doh-no-safe-search",endpoint:{protocol:"https:",host:"dns-doh-no-safe-search.dnsforfamily.com"},description:"(DoH Protocol) (Now supports DNSSEC) Block adult websites, gambling websites, malwares and advertisements.\nUnlike other dnsforfamily servers, this one does not enforces safe search. So Google, YouTube, Bing, DuckDuckGo and Yandex are completely accessible without any restriction.\nSocial websites like Facebook and Instagram are not blocked. No DNS queries are logged.\nAs of 26-May-2022 5.9 million websites are blocked and new websites are added to blacklist daily.\nCompletely free, no ads or any commercial motive. Operating for 4 years now.\nWarning: This server is incompatible with anonymization.\nProvided by: https://dnsforfamily.com",country:"Finland",location:{lat:60.1758,long:24.9349},filter:!0},{name:"dnsforge.de",endpoint:{protocol:"https:",host:"dnsforge.de",cors:!0},description:"Public DoH resolver running with Pihole for Adblocking (https://dnsforge.de).\nNon-logging, AD-filtering, supports DNSSEC. Hosted in Germany.",country:"Germany",location:{lat:52.2998,long:9.447},filter:!0,cors:!0},{name:"dnshome-doh",endpoint:{protocol:"https:",host:"dns.dnshome.de"},description:"https://www.dnshome.de/ public resolver in Germany"},{name:"dnspod-doh",endpoint:{protocol:"https:",host:"doh.pub",cors:!0},description:"A public DNS resolver in mainland China provided by DNSPod (Tencent Cloud).\nhttps://www.dnspod.cn/Products/Public.DNS?lang=en",filter:!0,log:!0,cors:!0},{name:"dnswarden-asia-adblock-dohv4",endpoint:{protocol:"https:",host:"doh.asia.dnswarden.com",path:"/adblock"},description:"Hosted in Singapore. For more information look [here](https://github.com/bhanupratapys/dnswarden) or [here](https://dnswarden.com).",country:"Singapore",location:{lat:1.2929,long:103.8547},filter:!0},{name:"dnswarden-asia-adultfilter-dohv4",endpoint:{protocol:"https:",host:"doh.asia.dnswarden.com",path:"/adultfilter"},description:"Hosted in Singapore. For more information look [here](https://github.com/bhanupratapys/dnswarden) or [here](https://dnswarden.com).",country:"Singapore",location:{lat:1.2929,long:103.8547},filter:!0},{name:"dnswarden-asia-uncensor-dohv4",endpoint:{protocol:"https:",host:"doh.asia.dnswarden.com",path:"/uncensored"},description:"Hosted in Singapore. For more information look [here](https://github.com/bhanupratapys/dnswarden) or [here](https://dnswarden.com).",country:"Singapore",location:{lat:1.2929,long:103.8547}},{name:"dnswarden-eu-adblock-dohv4",endpoint:{protocol:"https:",host:"doh.eu.dnswarden.com"},description:"Hosted in Germany. For more information look [here](https://github.com/bhanupratapys/dnswarden) or [here](https://dnswarden.com).",country:"Germany",location:{lat:50.1103,long:8.7147},filter:!0},{name:"dnswarden-us-adblock-dohv4",endpoint:{protocol:"https:",host:"doh.us.dnswarden.com"},description:"Hosted in USA (Dallas) . For more information look [here](https://github.com/bhanupratapys/dnswarden) or [here](https://dnswarden.com).",country:"United States",location:{lat:32.7889,long:-96.8021},filter:!0},{name:"doh-ch-blahdns",endpoint:{protocol:"https:",host:"doh-ch.blahdns.com",cors:!0},description:"Blocks ad and Tracking, no Logging, DNSSEC, Hosted in Switzerland. By https://blahdns.com/",country:"Netherlands",location:{lat:52.3824,long:4.8995},filter:!0,cors:!0},{name:"doh-cleanbrowsing-adult",endpoint:{protocol:"https:",host:"doh.cleanbrowsing.org",path:"/doh/adult-filter/",cors:!0},description:"Blocks access to all adult, pornographic and explicit sites. It does\nnot block proxy or VPNs, nor mixed-content sites. Sites like Reddit\nare allowed. Google and Bing are set to the Safe Mode.\nBy https://cleanbrowsing.org/",filter:!0,cors:!0},{name:"doh-cleanbrowsing-family",endpoint:{protocol:"https:",host:"doh.cleanbrowsing.org",path:"/doh/family-filter/",cors:!0},description:"Blocks access to all adult, pornographic and explicit sites. It also\nblocks proxy and VPN domains that are used to bypass the filters.\nMixed content sites (like Reddit) are also blocked. Google, Bing and\nYoutube are set to the Safe Mode.\nBy https://cleanbrowsing.org/",filter:!0,cors:!0},{name:"doh-cleanbrowsing-security",endpoint:{protocol:"https:",host:"doh.cleanbrowsing.org",path:"/doh/security-filter/",cors:!0},description:"Block access to phishing, malware and malicious domains. It does not block adult content.\nBy https://cleanbrowsing.org/",filter:!0,cors:!0},{name:"doh-crypto-sx",endpoint:{protocol:"https:",host:"doh.crypto.sx",cors:!0},description:"DNS-over-HTTPS server. Anycast, no logs, no censorship, DNSSEC.\nBackend hosted by Scaleway, globally cached via Cloudflare.\nMaintained by Frank Denis.",country:"United States",location:{lat:37.751,long:-97.822},cors:!0},{name:"doh-crypto-sx-ipv6",endpoint:{protocol:"https:",host:"doh-ipv6.crypto.sx",cors:!0},description:"DNS-over-HTTPS server accessible over IPv6. Anycast, no logs, no censorship, DNSSEC.\nBackend hosted by Scaleway, globally cached via Cloudflare.\nMaintained by Frank Denis.",country:"United States",location:{lat:37.751,long:-97.822},cors:!0},{name:"doh-de-blahdns",endpoint:{protocol:"https:",host:"doh-de.blahdns.com",cors:!0},description:"Blocks ad and Tracking, no Logging, DNSSEC, Hosted in Germany. By https://blahdns.com/",country:"Germany",location:{lat:51.2993,long:9.491},filter:!0,cors:!0},{name:"doh-fi-blahdns",endpoint:{protocol:"https:",host:"doh-fi.blahdns.com",cors:!0},description:"Blocks ad and Tracking, no Logging, DNSSEC, Hosted in Finland. By https://blahdns.com/",country:"Finland",location:{lat:60.1758,long:24.9349},filter:!0,cors:!0},{name:"doh-ibksturm",endpoint:{protocol:"https:",host:"ibksturm.synology.me"},description:"DoH & DoT Server, No Logging, No Filters, DNSSEC\nRunning privately by ibksturm in Thurgau, Switzerland"},{name:"doh-jp-blahdns",endpoint:{protocol:"https:",host:"doh-jp.blahdns.com",cors:!0},description:"Blocks ad and Tracking, no Logging, DNSSEC, Hosted in Japan. By https://blahdns.com/",country:"Japan",location:{lat:35.6882,long:139.7532},filter:!0,cors:!0},{name:"doh.ffmuc.net",endpoint:{protocol:"https:",host:"doh.ffmuc.net"},description:"An open (non-logging, non-filtering, non-censoring) DoH resolver operated by Freifunk Munich with nodes in DE.\nhttps://ffmuc.net/",country:"Germany",location:{lat:51.2993,long:9.491}},{name:"doh.tiarap.org",endpoint:{protocol:"https:",host:"doh.tiarap.org"},description:"Non-Logging DNS-over-HTTPS server, cached via Cloudflare.\nFilters out ads, trackers and malware, NO ECS, supports DNSSEC.",country:"United States",location:{lat:37.751,long:-97.822},filter:!0},{name:"google",endpoint:{protocol:"https:",host:"dns.google",ipv4:"8.8.8.8",cors:!0},description:"Google DNS (anycast)",country:"United States",location:{lat:37.751,long:-97.822},log:!0,cors:!0},{name:"hdns",endpoint:{protocol:"https:",host:"query.hdns.io",cors:!0},description:"HDNS is a public DNS resolver that supports Handshake domains.\nhttps://www.hdns.io",country:"United States",location:{lat:37.7771,long:-122.406},cors:!0},{name:"he",endpoint:{protocol:"https:",host:"ordns.he.net"},description:"Hurricane Electric DoH server (anycast)\nUnknown logging policy.",country:"United States",location:{lat:37.751,long:-97.822},log:!0},{name:"id-gmail-doh",endpoint:{protocol:"https:",host:"doh.tiar.app"},description:"Non-Logging DNS-over-HTTPS server located in Singapore.\nFilters out ads, trackers and malware, supports DNSSEC, provided by id-gmail.",country:"Singapore",location:{lat:1.2929,long:103.8547},filter:!0},{name:"iij",endpoint:{protocol:"https:",host:"public.dns.iij.jp"},description:"DoH server operated by Internet Initiative Japan in Tokyo.\nhttps://www.iij.ad.jp/",country:"Japan",location:{lat:35.69,long:139.69},log:!0},{name:"iqdns-doh",endpoint:{protocol:"https:",host:"a.passcloud.xyz"},description:'Non-logging DoH service runned by V2EX.com user johnsonwil.\nReturns "no such domain" for anti-Chinese government websites. Supports DNSSEC.\nFor more information: https://www.v2ex.com/t/785666',filter:!0},{name:"jp.tiar.app-doh",endpoint:{protocol:"https:",host:"jp.tiar.app"},description:"Non-Logging, Non-Filtering DNS-over-HTTPS server in Japan.\nNo ECS, Support DNSSEC",country:"Japan",location:{lat:35.6882,long:139.7532}},{name:"jp.tiarap.org",endpoint:{protocol:"https:",host:"jp.tiarap.org"},description:"DNS-over-HTTPS Server. Non-Logging, Non-Filtering, No ECS, Support DNSSEC.\nCached via Cloudflare."},{name:"libredns",endpoint:{protocol:"https:",host:"doh.libredns.gr"},description:"DoH server in Germany. No logging, but no DNS padding and no DNSSEC support.\nhttps://libredns.gr/",country:"Germany",location:{lat:51.2993,long:9.491}},{name:"nextdns",endpoint:{protocol:"https:",host:"anycsast.dns.nextdns.io"},description:"NextDNS is a cloud-based private DNS service that gives you full control\nover what is allowed and what is blocked on the Internet.\nDNSSEC, Anycast, Non-logging, NoFilters\nhttps://www.nextdns.io/",country:"Netherlands",location:{lat:52.3891,long:4.6563}},{name:"nextdns-ultralow",endpoint:{protocol:"https:",host:"dns.nextdns.io",path:"/dnscrypt-proxy"},description:'NextDNS is a cloud-based private DNS service that gives you full control\nover what is allowed and what is blocked on the Internet.\nhttps://www.nextdns.io/\nTo select the server location, the "-ultralow" variant relies on bootstrap servers\ninstead of anycast.'},{name:"njalla-doh",endpoint:{protocol:"https:",host:"dns.njal.la",cors:!0},description:"Non-logging DoH server in Sweden operated by Njalla.\nhttps://dns.njal.la/",country:"Sweden",location:{lat:59.3247,long:18.056},cors:!0},{name:"odoh-cloudflare",endpoint:{protocol:"https:",host:"odoh.cloudflare-dns.com",cors:!0},description:"Cloudflare ODoH server.\nhttps://cloudflare.com",cors:!0},{name:"odoh-crypto-sx",endpoint:{protocol:"https:",host:"odoh.crypto.sx",cors:!0},description:"ODoH target server. Anycast, no logs.\nBackend hosted by Scaleway. Maintained by Frank Denis.",cors:!0},{name:"odoh-id-gmail",endpoint:{protocol:"https:",host:"doh.tiar.app",path:"/odoh"},description:"ODoH target server. Based in Singapore, no logs.\nFilter ads, trackers and malware.",filter:!0},{name:"odoh-jp.tiar.app",endpoint:{protocol:"https:",host:"jp.tiar.app",path:"/odoh"},description:"ODoH target server. no logs."},{name:"odoh-jp.tiarap.org",endpoint:{protocol:"https:",host:"jp.tiarap.org",path:"/odoh"},description:"ODoH target server via Cloudflare, no logs."},{name:"odoh-resolver4.dns.openinternet.io",endpoint:{protocol:"https:",host:"resolver4.dns.openinternet.io"},description:"ODoH target server. no logs, no filter, DNSSEC.\nRunning on dedicated hardware colocated at Sonic.net in Santa Rosa, CA in the United States.\nUses Sonic's recusrive DNS servers as upstream resolvers (but is not affiliated with Sonic\nin any way). Provided by https://openinternet.io"},{name:"odoh-tiarap.org",endpoint:{protocol:"https:",host:"doh.tiarap.org",path:"/odoh"},description:"ODoH target server via Cloudflare, no logs.\nFilter ads, trackers and malware.",filter:!0},{name:"publicarray-au2-doh",endpoint:{protocol:"https:",host:"doh-2.seby.io",cors:!0},description:"DNSSEC \u2022 OpenNIC \u2022 Non-logging \u2022 Uncensored - hosted on ovh.com.au\nMaintained by publicarray - https://dns.seby.io",country:"Australia",location:{lat:-33.8591,long:151.2002},cors:!0},{name:"puredns-doh",endpoint:{protocol:"https:",host:"puredns.org",ipv4:"146.190.6.13",cors:!0},description:"Public uncensored DNS resolver in Singapore - https://puredns.org\n** Only available in Indonesia and Singapore **",country:"United States",location:{lat:37.751,long:-97.822},cors:!0},{name:"quad101",endpoint:{protocol:"https:",host:"dns.twnic.tw",cors:!0},description:"DNSSEC-aware public resolver by the Taiwan Network Information Center (TWNIC)\nhttps://101.101.101.101/index_en.html",cors:!0},{name:"quad9-doh-ip4-port443-filter-ecs-pri",endpoint:{protocol:"https:",host:"dns11.quad9.net",ipv4:"149.112.112.11"},description:"Quad9 (anycast) dnssec/no-log/filter/ecs 9.9.9.11 - 149.112.112.11",country:"United States",location:{lat:37.751,long:-97.822},filter:!0},{name:"quad9-doh-ip4-port443-filter-pri",endpoint:{protocol:"https:",host:"dns.quad9.net",ipv4:"149.112.112.112"},description:"Quad9 (anycast) dnssec/no-log/filter 9.9.9.9 - 149.112.112.9 - 149.112.112.112",country:"United States",location:{lat:37.751,long:-97.822},filter:!0},{name:"quad9-doh-ip4-port443-nofilter-ecs-pri",endpoint:{protocol:"https:",host:"dns12.quad9.net",ipv4:"9.9.9.12"},description:"Quad9 (anycast) no-dnssec/no-log/no-filter/ecs 9.9.9.12 - 149.112.112.12",country:"United States",location:{lat:37.751,long:-97.822}},{name:"quad9-doh-ip4-port443-nofilter-pri",endpoint:{protocol:"https:",host:"dns10.quad9.net",ipv4:"149.112.112.10"},description:"Quad9 (anycast) no-dnssec/no-log/no-filter 9.9.9.10 - 149.112.112.10",country:"United States",location:{lat:37.751,long:-97.822}},{name:"quad9-doh-ip6-port5053-filter-pri",endpoint:{protocol:"https:",host:"dns9.quad9.net"},description:"Quad9 (anycast) dnssec/no-log/filter 2620:fe::fe - 2620:fe::9 - 2620:fe::fe:9",country:"United States",location:{lat:37.751,long:-97.822},filter:!0},{name:"safesurfer-doh",endpoint:{protocol:"https:",host:"doh.safesurfer.io"},description:"Family safety focused blocklist for over 2 million adult sites, as well as phishing and malware and more.\nFree to use, paid for customizing blocking for more categories+sites and viewing usage at my.safesurfer.io. Logs taken for viewing\nusage, data never sold - https://safesurfer.io",filter:!0,log:!0},{name:"sth-ads-doh-se",endpoint:{protocol:"https:",host:"dnsse-noads.alekberg.net"},description:"Resolver in Stockholm, Sweden. DoH server. Non-logging, remove ads and malware, DNSSEC.",country:"Bulgaria",location:{lat:42.696,long:23.332},filter:!0},{name:"sth-doh-se",endpoint:{protocol:"https:",host:"dnsse.alekberg.net"},description:"Resolver in Stockholm, Sweden. DoH server. Non-logging, non-filtering, DNSSEC.",country:"Bulgaria",location:{lat:42.696,long:23.332}},{name:"switch",endpoint:{protocol:"https:",host:"dns.switch.ch"},description:"Public DoH service provided by SWITCH in Switzerland\nhttps://www.switch.ch\nProvides protection against malware, but does not block ads.",filter:!0},{name:"uncensoreddns-dk-ipv4",endpoint:{protocol:"https:",host:"unicast.uncensoreddns.org"},description:"Also known as censurfridns.\nDoH, no logs, no filter, DNSSEC, unicast hosted in Denmark - https://blog.uncensoreddns.org",country:"Denmark",location:{lat:55.7123,long:12.0564}},{name:"uncensoreddns-ipv4",endpoint:{protocol:"https:",host:"anycast.uncensoreddns.org"},description:"Also known as censurfridns.\nDoH, no logs, no filter, DNSSEC, anycast - https://blog.uncensoreddns.org",country:"Denmark",location:{lat:55.7123,long:12.0564}},{name:"v.dnscrypt.uk-doh-ipv4",endpoint:{protocol:"https:",host:"v.dnscrypt.uk"},description:"DoH, no logs, uncensored, DNSSEC. Hosted in London UK on Digital Ocean\nhttps://www.dnscrypt.uk",country:"United Kingdom",location:{lat:51.4964,long:-.1224}}],time:1654187067783});function zv(e,t,r,n){return n&&n.aborted?Promise.reject(new pv):"udp4:"===e.protocol||"udp6:"===e.protocol?function(){throw new Error('Only "doh" endpoints are supported in the browser')}():function(e,t,r,n){return function(e,t,r,n,i){return Lv(e,t,r,n,i)}(e.url,e.method,sv(Object.assign({flags:256},t)),r,n).then((function(e){const t=e.data,r=e.response;let n=e.error;if(void 0===n)if(0===t.length)n=new yv("Empty.");else try{const e=av(t);return e.response=r,e}catch(i){n=new yv("Invalid packet (cause="+i.message+")",i)}throw Object.assign(n,{response:r})}))}(e,t,r,n)}const Kv=new gv("https://martinheidegger.github.io/dns-query/resolvers.json");function qv(e){return/^@/.test(e)}const Zv=new class{constructor(e){this.opts=Object.assign({timeout:5e3,update:!0,updateURL:Kv,persist:!1,localStoragePrefix:"dnsquery_",maxAge:3e5},e),this._dataP=null}_data(e,t){return e||null===this._dataP?(this._dataP=this.opts.update?async function(e,t,r,n){const i=t?t.localStoragePrefix+t.name:null;if(i)try{const e=JSON.parse(localStorage.getItem(i));if(e&&e.time>t.maxTime)return e}catch(a){}const{data:o}=await Lv(e,"GET",null,r,n),s={time:Date.now(),data:JSON.parse(fy(o))};if(i)try{localStorage.setItem(i,JSON.stringify(s))}catch(a){s.time=null}return s}(this.opts.updateURL,this.opts.persist?{name:"resolvers.json",localStoragePrefix:this.opts.localStoragePrefix,maxTime:Date.now()-this.opts.maxAge}:null,this.opts.timeout).then((e=>Fv({data:e.data.resolvers,time:e.time}))).catch((()=>t||jv)):Promise.resolve(jv),this._dataP):this._dataP.then((e=>e.time<Date.now()-this.opts.maxAge?this._data(!0,e):e))}data(){return this._data(!1).then((e=>e.data))}endpoints(e){if(null===e||void 0===e)return this.data().then((e=>e.endpoints));if("doh"===e&&(e=Wv),"dns"===e&&(e=Gv),"function"===typeof e)return this.data().then((t=>t.endpoints.filter(e)));if("string"===typeof e||"function"!==typeof e[Symbol.iterator])return Promise.reject(new Error("Endpoints (".concat(e,") needs to be iterable (array).")));if(-1===(e=Array.from(e).filter(Boolean)).findIndex(qv))try{return Promise.resolve(e.map(Ov))}catch(t){return Promise.reject(t)}return this.data().then((t=>e.map((e=>{if(qv(e)){const r=t.endpointByName[e.substring(1)];if(!r)throw new Error("Endpoint ".concat(e," is not known."));return r}return Ov(e)}))))}};function Vv(e,t){return t=Object.assign({retries:5,timeout:3e4},t),e.question?(r=t.endpoints,function(e){return null!==e&&"object"===typeof e&&"function"===typeof e.then}(r)?r:Promise.resolve(r)).then((r=>{if(!Array.isArray(r)||0===r.length)throw new Error("No endpoints defined to lookup dns records.");return Hv(r.map(Ov),function(e){const t=Object.assign({type:"query"},e);return delete t.question,t.questions=[],e.question&&t.questions.push(e.question),t}(e),t)})).then((e=>(e.question=e.questions[0],delete e.questions,e))):Promise.reject(new Error("To request data you need to specify a .question!"));var r}function Hv(e,t,r){const n=1===e.length?e[0]:e[Math.floor(Math.random()*e.length)%e.length];return zv(n,t,r.timeout,r.signal).then((e=>(e.endpoint=n.toString(),e)),(i=>{if("AbortError"===i.name||0===r.retries)throw i.endpoint=n.toString(),i;return r.retries>0&&(r.retries-=1),Hv(e,t,r)}))}function Wv(e){return"https:"===e.protocol||"http:"===e.protocol}function Gv(e){return"udp4:"===e.protocol||"udp6:"===e.protocol}const Yv=Ue("waku:dns-over-https");class Qv{static async create(e,t){const r=null!==e&&void 0!==e?e:await Zv.endpoints("doh");return new Qv(r,t)}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;(0,W.Z)(this,"endpoints",void 0),(0,W.Z)(this,"retries",void 0),this.endpoints=e,this.retries=t}async resolveTXT(e){let t;try{t=(await Vv({question:{type:"TXT",name:e}},{endpoints:this.endpoints,retries:this.retries})).answers}catch(i){throw Yv("query failed: ",i),new Error("DNS query failed")}if(!t)throw new Error("Could not resolve ".concat(e));const r=t.map((e=>e.data)),n=[];return r.forEach((e=>{"string"===typeof e?n.push(e):Array.isArray(e)?e.forEach((e=>{"string"===typeof e?n.push(e):n.push(Tn(e))})):n.push(Tn(e))})),n}}var Jv=__webpack_require__(1026);class Xv{static parseAndVerifyRoot(e,t){if(!e.startsWith(this.ROOT_PREFIX))throw new Error("ENRTree root entry must start with '".concat(this.ROOT_PREFIX,"'"));const r=Xv.parseRootValues(e),n=Jv.decode.asBytes(t),i=e.split(" sig")[0],o=Nn(i);if(!Om(xn(r.signature,"base64url").slice(0,64),Dm(o),new Uint8Array(n)))throw new Error("Unable to verify ENRTree root signature");return r.eRoot}static parseRootValues(e){const t=e.match(/^enrtree-root:v1 e=([^ ]+) l=([^ ]+) seq=(\d+) sig=([^ ]+)$/);if(!Array.isArray(t))throw new Error("Could not parse ENRTree root entry");t.shift();const[r,n,i,o]=t;if(!r)throw new Error("Could not parse 'e' value from ENRTree root entry");if(!n)throw new Error("Could not parse 'l' value from ENRTree root entry");if(!i)throw new Error("Could not parse 'seq' value from ENRTree root entry");if(!o)throw new Error("Could not parse 'sig' value from ENRTree root entry");return{eRoot:r,lRoot:n,seq:Number(i),signature:o}}static parseTree(e){if(!e.startsWith(this.TREE_PREFIX))throw new Error("ENRTree tree entry must start with '".concat(this.TREE_PREFIX,"'"));const t=e.match(/^enrtree:\/\/([^@]+)@(.+)$/);if(!Array.isArray(t))throw new Error("Could not parse ENRTree tree entry");t.shift();const[r,n]=t;if(!r)throw new Error("Could not parse public key from ENRTree tree entry");if(!n)throw new Error("Could not parse domain from ENRTree tree entry");return{publicKey:r,domain:n}}static parseBranch(e){if(!e.startsWith(this.BRANCH_PREFIX))throw new Error("ENRTree branch entry must start with '".concat(this.BRANCH_PREFIX,"'"));return e.split(this.BRANCH_PREFIX)[1].split(",")}}(0,W.Z)(Xv,"RECORD_PREFIX",Gm.RECORD_PREFIX),(0,W.Z)(Xv,"TREE_PREFIX","enrtree:"),(0,W.Z)(Xv,"BRANCH_PREFIX","enrtree-branch:"),(0,W.Z)(Xv,"ROOT_PREFIX","enrtree-root:");const $v=Ue("waku:discovery:fetch_nodes");function eb(e,t){return t.relay>=e.relay&&t.store>=e.store&&t.filter>=e.filter&&t.lightPush>=e.lightPush}function tb(e,t){if(!e.nodeId)return!1;for(const r of t)if(e.nodeId===r.nodeId)return!1;return!0}function rb(e,t){e.relay&&(t.relay+=1),e.store&&(t.store+=1),e.filter&&(t.filter+=1),e.lightPush&&(t.lightPush+=1)}function nb(e,t,r){if(eb(t,r))throw"Internal Error: Waku2 wanted capabilities are already fulfilled";const n=function(e,t){return{relay:t.relay<e.relay,store:t.store<e.store,filter:t.filter<e.filter,lightPush:t.lightPush<e.lightPush}}(t,r);return n.relay&&e.relay||n.store&&e.store||n.filter&&e.filter||n.lightPush&&e.lightPush}const ib=Ue("waku:discovery:dns");class ob{static async dnsOverHttp(e){return e||(e=await Qv.create()),new ob(e)}async getPeers(e,t){const r=Math.floor(Math.random()*e.length),{publicKey:n,domain:i}=Xv.parseTree(e[r]),o={domain:i,publicKey:n,visits:{}},s=await async function(e,t,r){var n,i,o,s;const a={relay:null!==(n=e.relay)&&void 0!==n?n:0,store:null!==(i=e.store)&&void 0!==i?i:0,filter:null!==(o=e.filter)&&void 0!==o?o:0,lightPush:null!==(s=e.lightPush)&&void 0!==s?s:0},c=a.relay+a.store+a.filter+a.lightPush,l={relay:0,store:0,filter:0,lightPush:0};let u=0;const h=[];for(;!eb(a,l)&&u<c+t;){const e=await r();e&&tb(e,h)&&(e.waku2&&nb(e.waku2,a,l)&&(rb(e.waku2,l),h.push(e)),$v("got new peer candidate from DNS address=".concat(e.nodeId,"@").concat(e.ip))),u++}return h}(t,this._errorTolerance,(()=>this._search(i,o)));return ib("retrieved peers: ",s.map((e=>{var t,r;return{id:null===(t=e.peerId)||void 0===t?void 0:t.toString(),multiaddrs:null===(r=e.multiaddrs)||void 0===r?void 0:r.map((e=>e.toString()))}}))),s}constructor(e){(0,W.Z)(this,"dns",void 0),(0,W.Z)(this,"_DNSTreeCache",void 0),(0,W.Z)(this,"_errorTolerance",10),this._DNSTreeCache={},this.dns=e}async*getNextPeer(e,t){const r=Math.floor(Math.random()*e.length),{publicKey:n,domain:i}=Xv.parseTree(e[r]),o={domain:i,publicKey:n,visits:{}};for await(const s of async function*(e,t,r){var n,i,o,s;const a={relay:null!==(n=e.relay)&&void 0!==n?n:0,store:null!==(i=e.store)&&void 0!==i?i:0,filter:null!==(o=e.filter)&&void 0!==o?o:0,lightPush:null!==(s=e.lightPush)&&void 0!==s?s:0},c=a.relay+a.store+a.filter+a.lightPush,l={relay:0,store:0,filter:0,lightPush:0};let u=0;const h=new Set;for(;!eb(a,l)&&u<c+t;){const e=await r();e&&e.nodeId&&!h.has(e.nodeId)&&(h.add(e.nodeId),e.waku2&&nb(e.waku2,a,l)&&(rb(e.waku2,l),yield e),$v("got new peer candidate from DNS address=".concat(e.nodeId,"@").concat(e.ip))),u++}}(t,this._errorTolerance,(()=>this._search(i,o))))yield s}async _search(e,t){try{const n=await this._getTXTRecord(e,t);let i,o;t.visits[e]=!0;const s=function(e){return e.startsWith(Xv.ROOT_PREFIX)?Xv.ROOT_PREFIX:e.startsWith(Xv.BRANCH_PREFIX)?Xv.BRANCH_PREFIX:e.startsWith(Xv.RECORD_PREFIX)?Xv.RECORD_PREFIX:""}(n);try{switch(s){case Xv.ROOT_PREFIX:return i=Xv.parseAndVerifyRoot(n,t.publicKey),await this._search(i,t);case Xv.BRANCH_PREFIX:return o=Xv.parseBranch(n),i=function(e,t){const r={};for(const[i,o]of e.entries())t.visits[o]&&(r[i]=!0);if(Object.keys(r).length===e.length)throw new Error("Unresolvable circular path detected");let n;do{n=Math.floor(Math.random()*e.length)}while(r[n]);return e[n]}(o,t),await this._search(i,t);case Xv.RECORD_PREFIX:return Qm.fromString(n);default:return null}}catch(r){return ib("Failed to search DNS tree ".concat(s," at subdomain ").concat(e,": ").concat(r)),null}}catch(r){return ib("Failed to retrieve TXT record at subdomain ".concat(e,": ").concat(r)),null}}async _getTXTRecord(e,t){if(this._DNSTreeCache[e])return this._DNSTreeCache[e];const r=e!==t.domain?"".concat(e,".").concat(t.domain):t.domain,n=await this.dns.resolveTXT(r);if(!n.length)throw new Error("Received empty result array while fetching TXT record");if(!n[0].length)throw new Error("Received empty TXT record");const i=n.join("");return this._DNSTreeCache[e]=i,i}}let sb;const ab=Ue("waku:peer-discovery-dns"),cb="enrtree://AOGECG2SPND25EEFMAJ5WF3KSGJNSGV356DSTL2YVLLZWIV6SAYBM@prod.waku.nodes.status.im",lb="bootstrap";sb=Symbol.toStringTag;class ub extends ea{constructor(e,t){super(),(0,W.Z)(this,"nextPeer",void 0),(0,W.Z)(this,"_started",void 0),(0,W.Z)(this,"_components",void 0),(0,W.Z)(this,"_options",void 0),this._started=!1,this._components=e,this._options=t;const{enrUrls:r}=t;ab("Use following EIP-1459 ENR Tree URLs: ",r)}async start(){if(ab("Starting peer discovery via dns"),this._started=!0,void 0===this.nextPeer){let{enrUrls:e}=this._options;Array.isArray(e)||(e=[e]);const{wantedNodeCapabilityCount:t}=this._options,r=await ob.dnsOverHttp();this.nextPeer=r.getNextPeer.bind(r,e,t)}for await(const r of this.nextPeer()){var e,t;if(!this._started)return;const n=r.peerInfo;if(!n)continue;const i={tags:{[lb]:{value:null!==(e=this._options.tagValue)&&void 0!==e?e:50,ttl:null!==(t=this._options.tagTTL)&&void 0!==t?t:1e8}}};let o=!1;if(await this._components.peerStore.has(n.id)){(await this._components.peerStore.get(n.id)).tags.has(lb)||(o=!0,await this._components.peerStore.merge(n.id,i))}else o=!0,await this._components.peerStore.save(n.id,i);o&&this.dispatchEvent(new ra("peer",{detail:n}))}}stop(){this._started=!1}get[Nm](){return!0}get[sb](){return"@waku/bootstrap"}}const hb=Symbol.for("@libp2p/topology");let db;const fb=()=>{};db=Symbol.toStringTag;class pb{constructor(e){var t,r,n,i;(0,W.Z)(this,"min",void 0),(0,W.Z)(this,"max",void 0),(0,W.Z)(this,"peers",void 0),(0,W.Z)(this,"onConnect",void 0),(0,W.Z)(this,"onDisconnect",void 0),(0,W.Z)(this,"registrar",void 0),(0,W.Z)(this,hb,!0),this.min=null!==(t=e.min)&&void 0!==t?t:0,this.max=null!==(r=e.max)&&void 0!==r?r:1/0,this.peers=new Set,this.onConnect=null!==(n=e.onConnect)&&void 0!==n?n:fb,this.onDisconnect=null!==(i=e.onDisconnect)&&void 0!==i?i:fb}get[db](){return hb.toString()}async setRegistrar(e){this.registrar=e}disconnect(e){this.onDisconnect(e)}}class gb{constructor(e,t,r){this.gossip=e,this.msgs=new Map,this.history=[],this.notValidatedCount=0,this.msgIdToStrFn=r;for(let n=0;n<t;n++)this.history[n]=[]}get size(){return this.msgs.size}put(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const{msgIdStr:n}=e;return!this.msgs.has(n)&&(this.msgs.set(n,{message:t,validated:r,originatingPeers:new Set,iwantCounts:new Map}),this.history[0].push({...e,topic:t.topic}),r||this.notValidatedCount++,!0)}observeDuplicate(e,t){const r=this.msgs.get(e);r&&!r.validated&&r.originatingPeers.add(t)}get(e){var t;return null===(t=this.msgs.get(this.msgIdToStrFn(e)))||void 0===t?void 0:t.message}getWithIWantCount(e,t){var r;const n=this.msgs.get(e);if(!n)return null;const i=(null!==(r=n.iwantCounts.get(t))&&void 0!==r?r:0)+1;return n.iwantCounts.set(t,i),{msg:n.message,count:i}}getGossipIDs(e){const t=new Map;for(let r=0;r<this.gossip;r++)this.history[r].forEach((r=>{const n=this.msgs.get(r.msgIdStr);if(n&&n.validated&&e.has(r.topic)){let e=t.get(r.topic);e||(e=[],t.set(r.topic,e)),e.push(r.msgId)}}));return t}validate(e){const t=this.msgs.get(e);if(!t)return null;t.validated||this.notValidatedCount--;const{message:r,originatingPeers:n}=t;return t.validated=!0,t.originatingPeers=new Set,{message:r,originatingPeers:n}}shift(){this.history[this.history.length-1].forEach((e=>{const t=this.msgs.get(e.msgIdStr);t&&(this.msgs.delete(e.msgIdStr),t.validated||this.notValidatedCount--)})),this.history.pop(),this.history.unshift([])}remove(e){const t=this.msgs.get(e);return t?(this.msgs.delete(e),t):null}}var mb=__webpack_require__(7656);const{RPC:yb}=mb,vb="/floodsub/1.0.0",bb="/meshsub/1.0.0",wb="/meshsub/1.1.0",Eb=5e3;function Sb(e){if(e.length<=1)return e;for(let t=0;t<e.length;t++){const r=Math.floor(Math.random()*Math.floor(e.length)),n=e[t];e[t]=e[r],e[r]=n}return e}function _b(e){return In(e,"base64")}const Ab="StrictSign",kb="StrictNoSign";var Cb,xb,Ib,Rb,Pb,Tb;function Nb(e){switch(e){case Cb.Ignore:return Rb.Ignore;case Cb.Reject:return Rb.Reject}}!function(e){e.Accept="accept",e.Ignore="ignore",e.Reject="reject"}(Cb||(Cb={})),function(e){e.StrictSign="StrictSign",e.StrictNoSign="StrictNoSign"}(xb||(xb={})),function(e){e[e.Signing=0]="Signing",e[e.Anonymous=1]="Anonymous"}(Ib||(Ib={})),function(e){e.Error="error",e.Ignore="ignore",e.Reject="reject",e.Blacklisted="blacklisted"}(Rb||(Rb={})),function(e){e.InvalidSignature="invalid_signature",e.InvalidSeqno="invalid_seqno",e.InvalidPeerId="invalid_peerid",e.SignaturePresent="signature_present",e.SeqnoPresent="seqno_present",e.FromPresent="from_present",e.TransformFailed="transform_failed"}(Pb||(Pb={})),function(e){e.duplicate="duplicate",e.invalid="invalid",e.valid="valid"}(Tb||(Tb={}));const Db="ERR_INVALID_PEER_SCORE_PARAMS",Ob={topics:{},topicScoreCap:10,appSpecificScore:()=>0,appSpecificWeight:10,IPColocationFactorWeight:-5,IPColocationFactorThreshold:10,IPColocationFactorWhitelist:new Set,behaviourPenaltyWeight:-10,behaviourPenaltyThreshold:0,behaviourPenaltyDecay:.2,decayInterval:1e3,decayToZero:.1,retainScore:36e5},Mb={topicWeight:.5,timeInMeshWeight:1,timeInMeshQuantum:1,timeInMeshCap:3600,firstMessageDeliveriesWeight:1,firstMessageDeliveriesDecay:.5,firstMessageDeliveriesCap:2e3,meshMessageDeliveriesWeight:-1,meshMessageDeliveriesDecay:.5,meshMessageDeliveriesCap:100,meshMessageDeliveriesThreshold:20,meshMessageDeliveriesWindow:10,meshMessageDeliveriesActivation:5e3,meshFailurePenaltyWeight:-1,meshFailurePenaltyDecay:.5,invalidMessageDeliveriesWeight:-1,invalidMessageDeliveriesDecay:.3};function Bb(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{...Ob,...e,topics:e.topics?Object.entries(e.topics).reduce(((e,t)=>{let[r,n]=t;return e[r]=Lb(n),e}),{}):{}}}function Lb(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{...Mb,...e}}function Ub(e){if(e.topicWeight<0)throw new zu("invalid topic weight; must be >= 0",Db);if(0===e.timeInMeshQuantum)throw new zu("invalid TimeInMeshQuantum; must be non zero",Db);if(e.timeInMeshWeight<0)throw new zu("invalid TimeInMeshWeight; must be positive (or 0 to disable)",Db);if(0!==e.timeInMeshWeight&&e.timeInMeshQuantum<=0)throw new zu("invalid TimeInMeshQuantum; must be positive",Db);if(0!==e.timeInMeshWeight&&e.timeInMeshCap<=0)throw new zu("invalid TimeInMeshCap; must be positive",Db);if(e.firstMessageDeliveriesWeight<0)throw new zu("invallid FirstMessageDeliveriesWeight; must be positive (or 0 to disable)",Db);if(0!==e.firstMessageDeliveriesWeight&&(e.firstMessageDeliveriesDecay<=0||e.firstMessageDeliveriesDecay>=1))throw new zu("invalid FirstMessageDeliveriesDecay; must be between 0 and 1",Db);if(0!==e.firstMessageDeliveriesWeight&&e.firstMessageDeliveriesCap<=0)throw new zu("invalid FirstMessageDeliveriesCap; must be positive",Db);if(e.meshMessageDeliveriesWeight>0)throw new zu("invalid MeshMessageDeliveriesWeight; must be negative (or 0 to disable)",Db);if(0!==e.meshMessageDeliveriesWeight&&(e.meshMessageDeliveriesDecay<=0||e.meshMessageDeliveriesDecay>=1))throw new zu("invalid MeshMessageDeliveriesDecay; must be between 0 and 1",Db);if(0!==e.meshMessageDeliveriesWeight&&e.meshMessageDeliveriesCap<=0)throw new zu("invalid MeshMessageDeliveriesCap; must be positive",Db);if(0!==e.meshMessageDeliveriesWeight&&e.meshMessageDeliveriesThreshold<=0)throw new zu("invalid MeshMessageDeliveriesThreshold; must be positive",Db);if(e.meshMessageDeliveriesWindow<0)throw new zu("invalid MeshMessageDeliveriesWindow; must be non-negative",Db);if(0!==e.meshMessageDeliveriesWeight&&e.meshMessageDeliveriesActivation<1e3)throw new zu("invalid MeshMessageDeliveriesActivation; must be at least 1s",Db);if(e.meshFailurePenaltyWeight>0)throw new zu("invalid MeshFailurePenaltyWeight; must be negative (or 0 to disable)",Db);if(0!==e.meshFailurePenaltyWeight&&(e.meshFailurePenaltyDecay<=0||e.meshFailurePenaltyDecay>=1))throw new zu("invalid MeshFailurePenaltyDecay; must be between 0 and 1",Db);if(e.invalidMessageDeliveriesWeight>0)throw new zu("invalid InvalidMessageDeliveriesWeight; must be negative (or 0 to disable)",Db);if(e.invalidMessageDeliveriesDecay<=0||e.invalidMessageDeliveriesDecay>=1)throw new zu("invalid InvalidMessageDeliveriesDecay; must be between 0 and 1",Db)}const Fb={gossipThreshold:-10,publishThreshold:-50,graylistThreshold:-80,acceptPXThreshold:10,opportunisticGraftThreshold:20};function jb(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{...Fb,...e}}function zb(e,t,r,n){let i=0;Object.entries(t.topics).forEach((e=>{let[t,n]=e;const o=r.topics[t];if(void 0===o)return;let s=0;if(n.inMesh){let e=n.meshTime/o.timeInMeshQuantum;e>o.timeInMeshCap&&(e=o.timeInMeshCap),s+=e*o.timeInMeshWeight}let a=n.firstMessageDeliveries;if(a>o.firstMessageDeliveriesCap&&(a=o.firstMessageDeliveriesCap),s+=a*o.firstMessageDeliveriesWeight,n.meshMessageDeliveriesActive&&n.meshMessageDeliveries<o.meshMessageDeliveriesThreshold){const e=o.meshMessageDeliveriesThreshold-n.meshMessageDeliveries;s+=e*e*o.meshMessageDeliveriesWeight}s+=n.meshFailurePenalty*o.meshFailurePenaltyWeight;s+=n.invalidMessageDeliveries*n.invalidMessageDeliveries*o.invalidMessageDeliveriesWeight,i+=s*o.topicWeight})),r.topicScoreCap>0&&i>r.topicScoreCap&&(i=r.topicScoreCap);const o=r.appSpecificScore(e);if(i+=o*r.appSpecificWeight,t.knownIPs.forEach((e=>{if(r.IPColocationFactorWhitelist.has(e))return;const t=n.get(e),o=t?t.size:0;if(o>r.IPColocationFactorThreshold){const e=o-r.IPColocationFactorThreshold;i+=e*e*r.IPColocationFactorWeight}})),t.behaviourPenalty>r.behaviourPenaltyThreshold){const e=t.behaviourPenalty-r.behaviourPenaltyThreshold;i+=e*e*r.behaviourPenaltyWeight}return i}var Kb,qb=__webpack_require__(3331);!function(e){e[e.unknown=0]="unknown",e[e.valid=1]="valid",e[e.invalid=2]="invalid",e[e.ignored=3]="ignored"}(Kb||(Kb={}));class Zb{constructor(){this.records=new Map,this.queue=new qb}getRecord(e){return this.records.get(e)}ensureRecord(e){let t=this.records.get(e);if(t)return t;t={status:Kb.unknown,firstSeenTsMs:Date.now(),validated:0,peers:new Set},this.records.set(e,t);const r={msgId:e,expire:Date.now()+12e4};return this.queue.push(r),t}gc(){const e=Date.now();let t=this.queue.peekFront();for(;t&&t.expire<e;)this.records.delete(t.msgId),this.queue.shift(),t=this.queue.peekFront()}clear(){this.records.clear(),this.queue.clear()}}function Vb(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>!0;const n=new Set;if(t<=0)return n;for(const i of e){if(n.size>=t)break;r(i)&&(n.add(i),e.delete(i))}return n}class Hb extends Map{constructor(e){super(),this.getDefault=e}getOrDefault(e){let t=super.get(e);return void 0===t&&(t=this.getDefault(),this.set(e,t)),t}}const Wb=Dp("libp2p:gossipsub:score");class Gb{constructor(e,t,r){var n;this.params=e,this.metrics=t,this.peerStats=new Map,this.peerIPs=new Hb((()=>new Set)),this.scoreCache=new Map,this.deliveryRecords=new Zb,function(e){for(const[r,n]of Object.entries(e.topics))try{Ub(n)}catch(t){throw new zu("invalid score parameters for topic ".concat(r,": ").concat(t.message),Db)}if(e.topicScoreCap<0)throw new zu("invalid topic score cap; must be positive (or 0 for no cap)",Db);if(null===e.appSpecificScore||void 0===e.appSpecificScore)throw new zu("missing application specific score function",Db);if(e.IPColocationFactorWeight>0)throw new zu("invalid IPColocationFactorWeight; must be negative (or 0 to disable)",Db);if(0!==e.IPColocationFactorWeight&&e.IPColocationFactorThreshold<1)throw new zu("invalid IPColocationFactorThreshold; must be at least 1",Db);if(e.behaviourPenaltyWeight>0)throw new zu("invalid BehaviourPenaltyWeight; must be negative (or 0 to disable)",Db);if(0!==e.behaviourPenaltyWeight&&(e.behaviourPenaltyDecay<=0||e.behaviourPenaltyDecay>=1))throw new zu("invalid BehaviourPenaltyDecay; must be between 0 and 1",Db);if(e.decayInterval<1e3)throw new zu("invalid DecayInterval; must be at least 1s",Db);if(e.decayToZero<=0||e.decayToZero>=1)throw new zu("invalid DecayToZero; must be between 0 and 1",Db)}(e),this.scoreCacheValidityMs=r.scoreCacheValidityMs,this.computeScore=null!==(n=r.computeScore)&&void 0!==n?n:zb}get size(){return this.peerStats.size}start(){this._backgroundInterval?Wb("Peer score already running"):(this._backgroundInterval=setInterval((()=>this.background()),this.params.decayInterval),Wb("started"))}stop(){this._backgroundInterval?(clearInterval(this._backgroundInterval),delete this._backgroundInterval,this.peerIPs.clear(),this.peerStats.clear(),this.deliveryRecords.clear(),Wb("stopped")):Wb("Peer score already stopped")}background(){this.refreshScores(),this.deliveryRecords.gc()}dumpPeerScoreStats(){return Object.fromEntries(Array.from(this.peerStats.entries()).map((e=>{let[t,r]=e;return[t,r]})))}messageFirstSeenTimestampMs(e){const t=this.deliveryRecords.getRecord(e);return t?t.firstSeenTsMs:null}refreshScores(){const e=Date.now(),t=this.params.decayToZero;this.peerStats.forEach(((r,n)=>{r.connected?(Object.entries(r.topics).forEach((r=>{let[n,i]=r;const o=this.params.topics[n];void 0!==o&&(i.firstMessageDeliveries*=o.firstMessageDeliveriesDecay,i.firstMessageDeliveries<t&&(i.firstMessageDeliveries=0),i.meshMessageDeliveries*=o.meshMessageDeliveriesDecay,i.meshMessageDeliveries<t&&(i.meshMessageDeliveries=0),i.meshFailurePenalty*=o.meshFailurePenaltyDecay,i.meshFailurePenalty<t&&(i.meshFailurePenalty=0),i.invalidMessageDeliveries*=o.invalidMessageDeliveriesDecay,i.invalidMessageDeliveries<t&&(i.invalidMessageDeliveries=0),i.inMesh&&(i.meshTime=e-i.graftTime,i.meshTime>o.meshMessageDeliveriesActivation&&(i.meshMessageDeliveriesActive=!0)))})),r.behaviourPenalty*=this.params.behaviourPenaltyDecay,r.behaviourPenalty<t&&(r.behaviourPenalty=0)):e>r.expire&&(this.removeIPsForPeer(n,r.knownIPs),this.peerStats.delete(n),this.scoreCache.delete(n))}))}score(e){var t,r;null===(t=this.metrics)||void 0===t||t.scoreFnCalls.inc();const n=this.peerStats.get(e);if(!n)return 0;const i=Date.now(),o=this.scoreCache.get(e);if(o&&o.cacheUntil>i)return o.score;null===(r=this.metrics)||void 0===r||r.scoreFnRuns.inc();const s=this.computeScore(e,n,this.params,this.peerIPs),a=i+this.scoreCacheValidityMs;var c;o?(null===(c=this.metrics)||void 0===c||c.scoreCachedDelta.observe(Math.abs(s-o.score)),o.score=s,o.cacheUntil=a):this.scoreCache.set(e,{score:s,cacheUntil:a});return s}addPenalty(e,t,r){const n=this.peerStats.get(e);var i;n&&(n.behaviourPenalty+=t,null===(i=this.metrics)||void 0===i||i.onScorePenalty(r))}addPeer(e){const t={connected:!0,expire:0,topics:{},knownIPs:new Set,behaviourPenalty:0};this.peerStats.set(e,t)}addIP(e,t){const r=this.peerStats.get(e);r&&r.knownIPs.add(t),this.peerIPs.getOrDefault(t).add(e)}removeIP(e,t){const r=this.peerStats.get(e);r&&r.knownIPs.delete(t);const n=this.peerIPs.get(t);n&&(n.delete(e),0===n.size&&this.peerIPs.delete(t))}removePeer(e){const t=this.peerStats.get(e);if(t){if(this.score(e)>0)return this.removeIPsForPeer(e,t.knownIPs),void this.peerStats.delete(e);Object.entries(t.topics).forEach((e=>{let[t,r]=e;r.firstMessageDeliveries=0;const n=this.params.topics[t].meshMessageDeliveriesThreshold;if(r.inMesh&&r.meshMessageDeliveriesActive&&r.meshMessageDeliveries<n){const e=n-r.meshMessageDeliveries;r.meshFailurePenalty+=e*e}r.inMesh=!1,r.meshMessageDeliveriesActive=!1})),t.connected=!1,t.expire=Date.now()+this.params.retainScore}}graft(e,t){const r=this.peerStats.get(e);if(r){const e=this.getPtopicStats(r,t);e&&(e.inMesh=!0,e.graftTime=Date.now(),e.meshTime=0,e.meshMessageDeliveriesActive=!1)}}prune(e,t){const r=this.peerStats.get(e);if(r){const e=this.getPtopicStats(r,t);if(e){const r=this.params.topics[t].meshMessageDeliveriesThreshold;if(e.meshMessageDeliveriesActive&&e.meshMessageDeliveries<r){const t=r-e.meshMessageDeliveries;e.meshFailurePenalty+=t*t}e.meshMessageDeliveriesActive=!1,e.inMesh=!1}}}validateMessage(e){this.deliveryRecords.ensureRecord(e)}deliverMessage(e,t,r){this.markFirstMessageDelivery(e,r);const n=this.deliveryRecords.ensureRecord(t),i=Date.now();n.status===Kb.unknown?(n.status=Kb.valid,n.validated=i,n.peers.forEach((t=>{t!==e.toString()&&this.markDuplicateMessageDelivery(t,r)}))):Wb("unexpected delivery: message from %s was first seen %s ago and has delivery status %s",e,i-n.firstSeenTsMs,Kb[n.status])}rejectInvalidMessage(e,t){this.markInvalidMessageDelivery(e,t)}rejectMessage(e,t,r,n){switch(n){case Rb.Error:return void this.markInvalidMessageDelivery(e,r);case Rb.Blacklisted:return}const i=this.deliveryRecords.ensureRecord(t);if(i.status===Kb.unknown){if(n===Rb.Ignore)return i.status=Kb.ignored,void i.peers.clear();i.status=Kb.invalid,this.markInvalidMessageDelivery(e,r),i.peers.forEach((e=>{this.markInvalidMessageDelivery(e,r)})),i.peers.clear()}else Wb("unexpected rejection: message from %s was first seen %s ago and has delivery status %d",e,Date.now()-i.firstSeenTsMs,Kb[i.status])}duplicateMessage(e,t,r){const n=this.deliveryRecords.ensureRecord(t);if(!n.peers.has(e))switch(n.status){case Kb.unknown:n.peers.add(e);break;case Kb.valid:n.peers.add(e),this.markDuplicateMessageDelivery(e,r,n.validated);break;case Kb.invalid:this.markInvalidMessageDelivery(e,r);case Kb.ignored:}}markInvalidMessageDelivery(e,t){const r=this.peerStats.get(e);if(r){const e=this.getPtopicStats(r,t);e&&(e.invalidMessageDeliveries+=1)}}markFirstMessageDelivery(e,t){const r=this.peerStats.get(e);if(r){const e=this.getPtopicStats(r,t);if(e){let r=this.params.topics[t].firstMessageDeliveriesCap;e.firstMessageDeliveries=Math.min(r,e.firstMessageDeliveries+1),e.inMesh&&(r=this.params.topics[t].meshMessageDeliveriesCap,e.meshMessageDeliveries=Math.min(r,e.meshMessageDeliveries+1))}}}markDuplicateMessageDelivery(e,t,r){const n=this.peerStats.get(e);if(n){const e=void 0!==r?Date.now():0,o=this.getPtopicStats(n,t);if(o&&o.inMesh){const n=this.params.topics[t];if(void 0!==r){var i;const o=e-r,s=o>n.meshMessageDeliveriesWindow;if(null===(i=this.metrics)||void 0===i||i.onDuplicateMsgDelivery(t,o,s),s)return}const s=n.meshMessageDeliveriesCap;o.meshMessageDeliveries=Math.min(s,o.meshMessageDeliveries+1)}}}removeIPsForPeer(e,t){for(const r of t){const t=this.peerIPs.get(r);t&&(t.delete(e),0===t.size&&this.peerIPs.delete(r))}}getPtopicStats(e,t){let r=e.topics[t];return void 0!==r?r:void 0!==this.params.topics[t]?(r={inMesh:!1,graftTime:0,meshTime:0,firstMessageDeliveries:0,meshMessageDeliveries:0,meshMessageDeliveriesActive:!1,meshFailurePenalty:0,invalidMessageDeliveries:0},e.topics[t]=r,r):null}}class Yb{constructor(e,t,r){this.gossipsubIWantFollowupMs=e,this.msgIdToStrFn=t,this.metrics=r,this.promises=new Map,this.requestMsByMsg=new Map,this.requestMsByMsgExpire=10*e}get size(){return this.promises.size}get requestMsByMsgSize(){return this.requestMsByMsg.size}addPromise(e,t){const r=t[Math.floor(Math.random()*t.length)],n=this.msgIdToStrFn(r);let i=this.promises.get(n);i||(i=new Map,this.promises.set(n,i));const o=Date.now();i.has(e)||(i.set(e,o+this.gossipsubIWantFollowupMs),this.metrics&&(this.metrics.iwantPromiseStarted.inc(1),this.requestMsByMsg.has(n)||this.requestMsByMsg.set(n,o)))}getBrokenPromises(){var e;const t=Date.now(),r=new Map;let n=0;return this.promises.forEach(((e,i)=>{e.forEach(((i,o)=>{var s;i<t&&(r.set(o,(null!==(s=r.get(o))&&void 0!==s?s:0)+1),e.delete(o),n++)})),e.size||this.promises.delete(i)})),null===(e=this.metrics)||void 0===e||e.iwantPromiseBroken.inc(n),r}deliverMessage(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.trackMessage(e);const r=this.promises.get(e);r&&(this.promises.delete(e),this.metrics&&(this.metrics.iwantPromiseResolved.inc(1),t&&this.metrics.iwantPromiseResolvedFromDuplicate.inc(1),this.metrics.iwantPromiseResolvedPeers.inc(r.size)))}rejectMessage(e,t){this.trackMessage(e),t!==Rb.Error&&this.promises.delete(e)}clear(){this.promises.clear()}prune(){var e;const t=Date.now()-this.requestMsByMsgExpire;let r=0;for(const[n,i]of this.requestMsByMsg.entries()){if(!(i<t))break;this.requestMsByMsg.delete(n),r++}null===(e=this.metrics)||void 0===e||e.iwantMessagePruned.inc(r)}trackMessage(e){if(this.metrics){const t=this.requestMsByMsg.get(e);void 0!==t&&(this.metrics.iwantPromiseDeliveryTime.observe((Date.now()-t)/1e3),this.requestMsByMsg.delete(e))}}}class Qb{constructor(e){this.entries=new Map,this.validityMs=e.validityMs}get size(){return this.entries.size}put(e,t){return!!this.entries.has(e)||(this.entries.set(e,{value:t,validUntilMs:Date.now()+this.validityMs}),!1)}prune(){const e=Date.now();for(const[t,r]of this.entries.entries()){if(!(r.validUntilMs<e))break;this.entries.delete(t)}}has(e){return this.entries.has(e)}get(e){const t=this.entries.get(e);return t&&t.validUntilMs>=Date.now()?t.value:void 0}clear(){this.entries.clear()}}var Jb,Xb,$b,ew,tw,rw;!function(e){e.forward="forward",e.publish="publish"}(Jb||(Jb={})),function(e){e.Fanout="fanout",e.Random="random",e.Subscribed="subscribed",e.Outbound="outbound",e.NotEnough="not_enough",e.Opportunistic="opportunistic"}(Xb||(Xb={})),function(e){e.Dc="disconnected",e.BadScore="bad_score",e.Prune="prune",e.Excess="excess"}($b||($b={})),function(e){e.GraftBackoff="graft_backoff",e.BrokenPromise="broken_promise",e.MessageDeficit="message_deficit",e.IPColocation="IP_colocation"}(ew||(ew={})),function(e){e.LowScore="low_score",e.MaxIhave="max_ihave",e.MaxIasked="max_iasked"}(tw||(tw={})),function(e){e.graylist="graylist",e.publish="publish",e.gossip="gossip",e.mesh="mesh"}(rw||(rw={}));__webpack_require__(5332);var nw=__webpack_require__(4021);const iw={sha1:"sha1","sha2-256":"sha256","sha2-512":"sha512"};function ow(e,t,r,n,i){if("sha1"!==i&&"sha2-256"!==i&&"sha2-512"!==i){const e=Object.keys(iw).join(" / ");throw new zu("Hash '".concat(i,"' is unknown or not supported. Must be ").concat(e),"ERR_UNSUPPORTED_HASH_TYPE")}const o=nw(e,t,r,n,iw[i]);return Yd.encode64(o,null)}const sw=xn("libp2p-pubsub:");function aw(e){if("signed"!==e.type)throw new Error("expected signed message type");if(null==e.sequenceNumber)throw Error("missing seqno field");return((e,t)=>{const r=xn(t.toString(16).padStart(16,"0"),"base16"),n=new Uint8Array(e.length+r.length);return n.set(e,0),n.set(r,e.length),n})(e.from.toBytes(),e.sequenceNumber)}async function cw(e){return await Ch.encode(e.data)}function lw(e,t,r,n,i){let o=0;const s=new Map;if(Object.entries(t.topics).forEach((e=>{var t;let[n,a]=e;const c=null!==(t=i.get(n))&&void 0!==t?t:"unknown",l=r.topics[n];if(void 0===l)return;let u=s.get(c);u||(u={p1w:0,p2w:0,p3w:0,p3bw:0,p4w:0},s.set(c,u));let h=0,d=0,f=0,p=0,g=0;if(a.inMesh){h+=Math.max(a.meshTime/l.timeInMeshQuantum,l.timeInMeshCap)*l.timeInMeshWeight}let m=a.firstMessageDeliveries;if(m>l.firstMessageDeliveriesCap&&(m=l.firstMessageDeliveriesCap),d+=m*l.firstMessageDeliveriesWeight,a.meshMessageDeliveriesActive&&a.meshMessageDeliveries<l.meshMessageDeliveriesThreshold){const e=l.meshMessageDeliveriesThreshold-a.meshMessageDeliveries;f+=e*e*l.meshMessageDeliveriesWeight}p+=a.meshFailurePenalty*l.meshFailurePenaltyWeight;g+=a.invalidMessageDeliveries*a.invalidMessageDeliveries*l.invalidMessageDeliveriesWeight,o+=(h+d+f+p+g)*l.topicWeight,u.p1w+=h,u.p2w+=d,u.p3w+=f,u.p3bw+=p,u.p4w+=g})),r.topicScoreCap>0&&o>r.topicScoreCap){o=r.topicScoreCap;const e=r.topicScoreCap/o;for(const t of s.values())t.p1w*=e,t.p2w*=e,t.p3w*=e,t.p3bw*=e,t.p4w*=e}let a=0,c=0,l=0;a+=r.appSpecificScore(e)*r.appSpecificWeight,t.knownIPs.forEach((e=>{if(r.IPColocationFactorWhitelist.has(e))return;const t=n.get(e),i=t?t.size:0;if(i>r.IPColocationFactorThreshold){const e=i-r.IPColocationFactorThreshold;c+=e*e*r.IPColocationFactorWeight}}));return l+=t.behaviourPenalty*t.behaviourPenalty*r.behaviourPenaltyWeight,o+=a+c+l,{byTopic:s,p5w:a,p6w:c,p7w:l,score:o}}class uw{constructor(e,t,r){var n;this.rawStream=e,this.pushable=La({objectMode:!1}),this.closeController=new AbortController,this.maxBufferSize=null!==(n=r.maxBufferSize)&&void 0!==n?n:1/0,za(Vp(this.pushable,this.closeController.signal,{returnOnAbort:!0}),(e=>Ia(e)),this.rawStream).catch(t)}get protocol(){return this.rawStream.stat.protocol}push(e){if(this.pushable.readableLength>this.maxBufferSize)throw Error("OutboundStream buffer full, size > ".concat(this.maxBufferSize));this.pushable.push(e)}close(){this.closeController.abort(),this.pushable.return(),this.rawStream.close()}}class hw{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.rawStream=e,this.closeController=new AbortController,this.source=Vp(za(this.rawStream,(e=>Na(e,t))),this.closeController.signal,{returnOnAbort:!0})}close(){this.closeController.abort(),this.rawStream.close()}}var dw=__webpack_require__(8101);const fw={maxSubscriptions:1/0,maxMessages:1/0,maxIhaveMessageIDs:1/0,maxIwantMessageIDs:1/0,maxControlMessages:1/0,maxPeerInfos:1/0};function pw(e,t){t={...t};const r=dw.Reader.create(e),n=e.length,i=void 0===n?r.len:r.pos+n,o={};for(;r.pos<i;){const e=r.uint32();switch(e>>>3){case 1:o.subscriptions&&o.subscriptions.length||(o.subscriptions=[]),o.subscriptions.length<t.maxSubscriptions?o.subscriptions.push(gw(r,r.uint32())):r.skipType(7&e);break;case 2:o.messages&&o.messages.length||(o.messages=[]),o.messages.length<t.maxMessages?o.messages.push(mw(r,r.uint32())):r.skipType(7&e);break;case 3:o.control=yw(r,r.uint32(),t);break;default:r.skipType(7&e)}}return o}function gw(e,t){const r=void 0===t?e.len:e.pos+t,n={};for(;e.pos<r;){const t=e.uint32();switch(t>>>3){case 1:n.subscribe=e.bool();break;case 2:n.topic=e.string();break;default:e.skipType(7&t)}}return n}function mw(e,t){const r=void 0===t?e.len:e.pos+t,n={};for(;e.pos<r;){const t=e.uint32();switch(t>>>3){case 1:n.from=e.bytes();break;case 2:n.data=e.bytes();break;case 3:n.seqno=e.bytes();break;case 4:n.topic=e.string();break;case 5:n.signature=e.bytes();break;case 6:n.key=e.bytes();break;default:e.skipType(7&t)}}if(!n.topic)throw Error("missing required 'topic'");return n}function yw(e,t,r){const n=void 0===t?e.len:e.pos+t,i={};for(;e.pos<n;){const t=e.uint32();switch(t>>>3){case 1:i.ihave&&i.ihave.length||(i.ihave=[]),i.ihave.length<r.maxControlMessages?i.ihave.push(vw(e,e.uint32(),r)):e.skipType(7&t);break;case 2:i.iwant&&i.iwant.length||(i.iwant=[]),i.iwant.length<r.maxControlMessages?i.iwant.push(bw(e,e.uint32(),r)):e.skipType(7&t);break;case 3:i.graft&&i.graft.length||(i.graft=[]),i.graft.length<r.maxControlMessages?i.graft.push(ww(e,e.uint32())):e.skipType(7&t);break;case 4:i.prune&&i.prune.length||(i.prune=[]),i.prune.length<r.maxControlMessages?i.prune.push(Ew(e,e.uint32(),r)):e.skipType(7&t);break;default:e.skipType(7&t)}}return i}function vw(e,t,r){const n=void 0===t?e.len:e.pos+t,i={};for(;e.pos<n;){const t=e.uint32();switch(t>>>3){case 1:i.topicID=e.string();break;case 2:i.messageIDs&&i.messageIDs.length||(i.messageIDs=[]),r.maxIhaveMessageIDs-- >0?i.messageIDs.push(e.bytes()):e.skipType(7&t);break;default:e.skipType(7&t)}}return i}function bw(e,t,r){const n=void 0===t?e.len:e.pos+t,i={};for(;e.pos<n;){const t=e.uint32();if(t>>>3===1)i.messageIDs&&i.messageIDs.length||(i.messageIDs=[]),r.maxIwantMessageIDs-- >0?i.messageIDs.push(e.bytes()):e.skipType(7&t);else e.skipType(7&t)}return i}function ww(e,t){const r=void 0===t?e.len:e.pos+t,n={};for(;e.pos<r;){const t=e.uint32();if(t>>>3===1)n.topicID=e.string();else e.skipType(7&t)}return n}function Ew(e,t,r){const n=void 0===t?e.len:e.pos+t,i={};for(;e.pos<n;){const t=e.uint32();switch(t>>>3){case 1:i.topicID=e.string();break;case 2:i.peers&&i.peers.length||(i.peers=[]),r.maxPeerInfos-- >0?i.peers.push(Sw(e,e.uint32())):e.skipType(7&t);break;case 3:i.backoff=e.uint64();break;default:e.skipType(7&t)}}return i}function Sw(e,t){const r=void 0===t?e.len:e.pos+t,n={};for(;e.pos<r;){const t=e.uint32();switch(t>>>3){case 1:n.peerID=e.bytes();break;case 2:n.signedPeerRecord=e.bytes();break;default:e.skipType(7&t)}}return n}var _w;!function(e){e[e.ip4=4]="ip4",e[e.ip6=41]="ip6"}(_w||(_w={}));var Aw;!function(e){e[e.started=0]="started",e[e.stopped=1]="stopped"}(Aw||(Aw={}));class kw extends ea{constructor(e){var t,r,n,i;let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),this.multicodecs=[wb,bb],this.peers=new Set,this.streamsInbound=new Map,this.streamsOutbound=new Map,this.outboundInflightQueue=La({objectMode:!0}),this.direct=new Set,this.floodsubPeers=new Set,this.acceptFromWhitelist=new Map,this.topics=new Map,this.subscriptions=new Set,this.mesh=new Map,this.fanout=new Map,this.fanoutLastpub=new Map,this.gossip=new Map,this.control=new Map,this.peerhave=new Map,this.iasked=new Map,this.backoff=new Map,this.outbound=new Map,this.topicValidators=new Map,this.heartbeatTicks=0,this.directPeerInitial=null,this.status={code:Aw.stopped},this.heartbeatTimer=null,this.runHeartbeat=()=>{var e;const t=null===(e=this.metrics)||void 0===e?void 0:e.heartbeatDuration.startTimer();this.heartbeat().catch((e=>{this.log("Error running heartbeat",e)})).finally((()=>{if(null!=t&&t(),this.status.code===Aw.started){clearTimeout(this.status.heartbeatTimeout);let t=this.opts.heartbeatInterval-(Date.now()-this.status.hearbeatStartMs)%this.opts.heartbeatInterval;var e;if(t<.25*this.opts.heartbeatInterval)t+=this.opts.heartbeatInterval,null===(e=this.metrics)||void 0===e||e.heartbeatSkipped.inc();this.status.heartbeatTimeout=setTimeout(this.runHeartbeat,t)}}))};const s={fallbackToFloodsub:!0,floodPublish:!0,doPX:!1,directPeers:[],D:6,Dlo:4,Dhi:12,Dscore:4,Dout:2,Dlazy:6,heartbeatInterval:1e3,fanoutTTL:6e4,mcacheLength:5,mcacheGossip:3,seenTTL:12e4,gossipsubIWantFollowupMs:3e3,prunePeers:16,pruneBackoff:6e4,unsubcribeBackoff:1e4,graftFloodThreshold:1e4,opportunisticGraftPeers:2,opportunisticGraftTicks:60,directConnectTicks:300,...o,scoreParams:Bb(o.scoreParams),scoreThresholds:jb(o.scoreThresholds)};if(this.components=e,this.decodeRpcLimits=null!==(t=s.decodeRpcLimits)&&void 0!==t?t:fw,this.globalSignaturePolicy=null!==(r=s.globalSignaturePolicy)&&void 0!==r?r:Ab,s.fallbackToFloodsub&&this.multicodecs.push(vb),this.log=Dp(null!==(n=s.debugName)&&void 0!==n?n:"libp2p:gossipsub"),this.opts=s,this.direct=new Set(s.directPeers.map((e=>e.id.toString()))),this.seenCache=new Qb({validityMs:s.seenTTL}),this.publishedMessageIds=new Qb({validityMs:s.seenTTL}),o.msgIdFn)this.msgIdFn=o.msgIdFn;else switch(this.globalSignaturePolicy){case Ab:this.msgIdFn=aw;break;case kb:this.msgIdFn=cw}if(o.fastMsgIdFn&&(this.fastMsgIdFn=o.fastMsgIdFn,this.fastMsgIdCache=new Qb({validityMs:s.seenTTL})),this.msgIdToStrFn=null!==(i=o.msgIdToStrFn)&&void 0!==i?i:_b,this.mcache=o.messageCache||new gb(s.mcacheGossip,s.mcacheLength,this.msgIdToStrFn),o.dataTransform&&(this.dataTransform=o.dataTransform),o.metricsRegister){if(!o.metricsTopicStrToLabel)throw Error("Must set metricsTopicStrToLabel with metrics");const e=Math.max(...Object.values(s.scoreParams.topics).map((e=>e.meshMessageDeliveriesWindow)),1e3),t=function(e,t,r){return{protocolsEnabled:e.gauge({name:"gossipsub_protocol",help:"Status of enabled protocols",labelNames:["protocol"]}),topicSubscriptionStatus:e.gauge({name:"gossipsub_topic_subscription_status",help:"Status of our subscription to this topic",labelNames:["topicStr"]}),topicPeersCount:e.gauge({name:"gossipsub_topic_peer_count",help:"Number of peers subscribed to each topic",labelNames:["topicStr"]}),meshPeerCounts:e.gauge({name:"gossipsub_mesh_peer_count",help:"Number of peers in our mesh",labelNames:["topicStr"]}),meshPeerInclusionEvents:e.gauge({name:"gossipsub_mesh_peer_inclusion_events_total",help:"Number of times we include peers in a topic mesh for different reasons",labelNames:["reason"]}),meshPeerInclusionEventsByTopic:e.gauge({name:"gossipsub_mesh_peer_inclusion_events_by_topic_total",help:"Number of times we include peers in a topic",labelNames:["topic"]}),meshPeerChurnEvents:e.gauge({name:"gossipsub_peer_churn_events_total",help:"Number of times we remove peers in a topic mesh for different reasons",labelNames:["reason"]}),meshPeerChurnEventsByTopic:e.gauge({name:"gossipsub_peer_churn_events_by_topic_total",help:"Number of times we remove peers in a topic",labelNames:["topic"]}),peersPerProtocol:e.gauge({name:"gossipsub_peers_per_protocol_count",help:"Peers connected for each topic",labelNames:["protocol"]}),heartbeatDuration:e.histogram({name:"gossipsub_heartbeat_duration_seconds",help:"The time it takes to complete one iteration of the heartbeat",buckets:[.01,.1,1]}),heartbeatSkipped:e.gauge({name:"gossipsub_heartbeat_skipped",help:"Heartbeat run took longer than heartbeat interval so next is skipped"}),asyncValidationResult:e.gauge({name:"gossipsub_async_validation_result_total",help:"Message validation result",labelNames:["acceptance"]}),asyncValidationResultByTopic:e.gauge({name:"gossipsub_async_validation_result_by_topic_total",help:"Message validation result for each topic",labelNames:["topic"]}),asyncValidationMcacheHit:e.gauge({name:"gossipsub_async_validation_mcache_hit_total",help:"Async validation result reported by the user layer",labelNames:["hit"]}),asyncValidationDelayFromFirstSeenSec:e.histogram({name:"gossipsub_async_validation_delay_from_first_seen",help:"Async validation report delay from first seen in second",labelNames:["topic"],buckets:[.01,.03,.1,.3,1,3,10]}),asyncValidationUnknownFirstSeen:e.gauge({name:"gossipsub_async_validation_unknown_first_seen_count_total",help:"Async validation report unknown first seen value for message"}),peerReadStreamError:e.gauge({name:"gossipsub_peer_read_stream_err_count_total",help:"Peer read stream error"}),rpcRecvBytes:e.gauge({name:"gossipsub_rpc_recv_bytes_total",help:"RPC recv"}),rpcRecvCount:e.gauge({name:"gossipsub_rpc_recv_count_total",help:"RPC recv"}),rpcRecvSubscription:e.gauge({name:"gossipsub_rpc_recv_subscription_total",help:"RPC recv"}),rpcRecvMessage:e.gauge({name:"gossipsub_rpc_recv_message_total",help:"RPC recv"}),rpcRecvControl:e.gauge({name:"gossipsub_rpc_recv_control_total",help:"RPC recv"}),rpcRecvIHave:e.gauge({name:"gossipsub_rpc_recv_ihave_total",help:"RPC recv"}),rpcRecvIWant:e.gauge({name:"gossipsub_rpc_recv_iwant_total",help:"RPC recv"}),rpcRecvGraft:e.gauge({name:"gossipsub_rpc_recv_graft_total",help:"RPC recv"}),rpcRecvPrune:e.gauge({name:"gossipsub_rpc_recv_prune_total",help:"RPC recv"}),rpcDataError:e.gauge({name:"gossipsub_rpc_data_err_count_total",help:"RPC data error"}),rpcRecvError:e.gauge({name:"gossipsub_rpc_recv_err_count_total",help:"RPC recv error"}),rpcRecvNotAccepted:e.gauge({name:"gossipsub_rpc_rcv_not_accepted_total",help:"Total count of RPC dropped because acceptFrom() == false"}),rpcSentBytes:e.gauge({name:"gossipsub_rpc_sent_bytes_total",help:"RPC sent"}),rpcSentCount:e.gauge({name:"gossipsub_rpc_sent_count_total",help:"RPC sent"}),rpcSentSubscription:e.gauge({name:"gossipsub_rpc_sent_subscription_total",help:"RPC sent"}),rpcSentMessage:e.gauge({name:"gossipsub_rpc_sent_message_total",help:"RPC sent"}),rpcSentControl:e.gauge({name:"gossipsub_rpc_sent_control_total",help:"RPC sent"}),rpcSentIHave:e.gauge({name:"gossipsub_rpc_sent_ihave_total",help:"RPC sent"}),rpcSentIWant:e.gauge({name:"gossipsub_rpc_sent_iwant_total",help:"RPC sent"}),rpcSentGraft:e.gauge({name:"gossipsub_rpc_sent_graft_total",help:"RPC sent"}),rpcSentPrune:e.gauge({name:"gossipsub_rpc_sent_prune_total",help:"RPC sent"}),msgPublishCount:e.gauge({name:"gossipsub_msg_publish_count_total",help:"Total count of msg published by topic",labelNames:["topic"]}),msgPublishPeersByTopic:e.gauge({name:"gossipsub_msg_publish_peers_total",help:"Total count of peers that we publish a msg to",labelNames:["topic"]}),msgPublishPeersByGroup:e.gauge({name:"gossipsub_msg_publish_peers_by_group",help:"Total count of peers (by group) that we publish a msg to",labelNames:["peerGroup"]}),msgPublishBytes:e.gauge({name:"gossipsub_msg_publish_bytes_total",help:"Total count of msg publish data.length bytes",labelNames:["topic"]}),msgForwardCount:e.gauge({name:"gossipsub_msg_forward_count_total",help:"Total count of msg forwarded by topic",labelNames:["topic"]}),msgForwardPeers:e.gauge({name:"gossipsub_msg_forward_peers_total",help:"Total count of peers that we forward a msg to",labelNames:["topic"]}),msgReceivedPreValidation:e.gauge({name:"gossipsub_msg_received_prevalidation_total",help:"Total count of recv msgs before any validation",labelNames:["topic"]}),msgReceivedError:e.gauge({name:"gossipsub_msg_received_error_total",help:"Total count of recv msgs error",labelNames:["topic"]}),msgReceivedStatus:e.gauge({name:"gossipsub_msg_received_status_total",help:"Tracks distribution of recv msgs by duplicate, invalid, valid",labelNames:["status"]}),msgReceivedTopic:e.gauge({name:"gossipsub_msg_received_topic_total",help:"Tracks distribution of recv msgs by topic label",labelNames:["topic"]}),msgReceivedInvalid:e.gauge({name:"gossipsub_msg_received_invalid_total",help:"Tracks specific reason of invalid",labelNames:["error"]}),msgReceivedInvalidByTopic:e.gauge({name:"gossipsub_msg_received_invalid_by_topic_total",help:"Tracks specific invalid message by topic",labelNames:["topic"]}),duplicateMsgDeliveryDelay:e.histogram({name:"gossisub_duplicate_msg_delivery_delay_seconds",help:"Time since the 1st duplicated message validated",labelNames:["topic"],buckets:[.25*r.maxMeshMessageDeliveriesWindowSec,.5*r.maxMeshMessageDeliveriesWindowSec,1*r.maxMeshMessageDeliveriesWindowSec,2*r.maxMeshMessageDeliveriesWindowSec,4*r.maxMeshMessageDeliveriesWindowSec]}),duplicateMsgLateDelivery:e.gauge({name:"gossisub_duplicate_msg_late_delivery_total",help:"Total count of late duplicate message delivery by topic, which triggers P3 penalty",labelNames:["topic"]}),duplicateMsgIgnored:e.gauge({name:"gossisub_ignored_published_duplicate_msgs_total",help:"Total count of published duplicate message ignored by topic",labelNames:["topic"]}),scoreFnCalls:e.gauge({name:"gossipsub_score_fn_calls_total",help:"Total times score() is called"}),scoreFnRuns:e.gauge({name:"gossipsub_score_fn_runs_total",help:"Total times score() call actually computed computeScore(), no cache"}),scoreCachedDelta:e.histogram({name:"gossipsub_score_cache_delta",help:"Delta of score between cached values that expired",buckets:[10,100,1e3]}),peersByScoreThreshold:e.gauge({name:"gossipsub_peers_by_score_threshold_count",help:"Current count of peers by score threshold",labelNames:["threshold"]}),score:e.avgMinMax({name:"gossipsub_score",help:"Avg min max of gossip scores"}),scoreWeights:e.avgMinMax({name:"gossipsub_score_weights",help:"Separate score weights",labelNames:["topic","p"]}),scorePerMesh:e.avgMinMax({name:"gossipsub_score_per_mesh",help:"Histogram of the scores for each mesh topic",labelNames:["topic"]}),scoringPenalties:e.gauge({name:"gossipsub_scoring_penalties_total",help:"A counter of the kind of penalties being applied to peers",labelNames:["penalty"]}),behaviourPenalty:e.histogram({name:"gossipsub_peer_stat_behaviour_penalty",help:"Current peer stat behaviour_penalty at each scrape",buckets:[.25*r.behaviourPenaltyThreshold,.5*r.behaviourPenaltyThreshold,1*r.behaviourPenaltyThreshold,2*r.behaviourPenaltyThreshold,4*r.behaviourPenaltyThreshold]}),ihaveRcvIgnored:e.gauge({name:"gossipsub_ihave_rcv_ignored_total",help:"Total received IHAVE messages that we ignore for some reason",labelNames:["reason"]}),ihaveRcvMsgids:e.gauge({name:"gossipsub_ihave_rcv_msgids_total",help:"Total received IHAVE messages by topic",labelNames:["topic"]}),ihaveRcvNotSeenMsgids:e.gauge({name:"gossipsub_ihave_rcv_not_seen_msgids_total",help:"Total messages per topic we do not have, not actual requests",labelNames:["topic"]}),iwantRcvMsgids:e.gauge({name:"gossipsub_iwant_rcv_msgids_total",help:"Total received IWANT messages by topic",labelNames:["topic"]}),iwantRcvDonthaveMsgids:e.gauge({name:"gossipsub_iwant_rcv_dont_have_msgids_total",help:"Total requested messageIDs that we do not have"}),iwantPromiseStarted:e.gauge({name:"gossipsub_iwant_promise_sent_total",help:"Total count of started IWANT promises"}),iwantPromiseResolved:e.gauge({name:"gossipsub_iwant_promise_resolved_total",help:"Total count of resolved IWANT promises"}),iwantPromiseResolvedFromDuplicate:e.gauge({name:"gossipsub_iwant_promise_resolved_from_duplicate_total",help:"Total count of resolved IWANT promises from duplicate messages"}),iwantPromiseResolvedPeers:e.gauge({name:"gossipsub_iwant_promise_resolved_peers",help:"Total count of peers we have asked IWANT promises that are resolved"}),iwantPromiseBroken:e.gauge({name:"gossipsub_iwant_promise_broken",help:"Total count of broken IWANT promises"}),iwantMessagePruned:e.gauge({name:"gossipsub_iwant_message_pruned",help:"Total count of pruned IWANT messages"}),iwantPromiseDeliveryTime:e.histogram({name:"gossipsub_iwant_promise_delivery_seconds",help:"Histogram of delivery time of resolved IWANT promises",buckets:[.5*r.gossipPromiseExpireSec,1*r.gossipPromiseExpireSec,2*r.gossipPromiseExpireSec,4*r.gossipPromiseExpireSec]}),iwantPromiseUntracked:e.gauge({name:"gossip_iwant_promise_untracked",help:"Total count of untracked IWANT promise"}),connectedPeersBackoffSec:e.histogram({name:"gossipsub_connected_peers_backoff_seconds",help:"Backoff time in seconds",buckets:[1,2,4,10,20,60,120]}),cacheSize:e.gauge({name:"gossipsub_cache_size",help:"Unbounded cache sizes",labelNames:["cache"]}),mcacheSize:e.gauge({name:"gossipsub_mcache_size",help:"Current mcache msg count"}),mcacheNotValidatedCount:e.gauge({name:"gossipsub_mcache_not_validated_count",help:"Current mcache msg count not validated"}),fastMsgIdCacheCollision:e.gauge({name:"gossipsub_fastmsgid_cache_collision_total",help:"Total count of key collisions on fastmsgid cache put"}),newConnectionCount:e.gauge({name:"gossipsub_new_connection_total",help:"Total new connection by status",labelNames:["status"]}),topicStrToLabel:t,toTopic(e){var t;return null!==(t=this.topicStrToLabel.get(e))&&void 0!==t?t:e},onJoin(e){this.topicSubscriptionStatus.set({topicStr:e},1),this.meshPeerCounts.set({topicStr:e},0)},onLeave(e){this.topicSubscriptionStatus.set({topicStr:e},0),this.meshPeerCounts.set({topicStr:e},0)},onAddToMesh(e,t,r){const n=this.toTopic(e);this.meshPeerInclusionEvents.inc({reason:t},r),this.meshPeerInclusionEventsByTopic.inc({topic:n},r)},onRemoveFromMesh(e,t,r){const n=this.toTopic(e);this.meshPeerChurnEvents.inc({reason:t},r),this.meshPeerChurnEventsByTopic.inc({topic:n},r)},onReportValidation(e,t,r){if(this.asyncValidationMcacheHit.inc({hit:null!=e?"hit":"miss"}),null!=e){const r=this.toTopic(e.message.topic);this.asyncValidationResult.inc({acceptance:t}),this.asyncValidationResultByTopic.inc({topic:r})}null!=r?this.asyncValidationDelayFromFirstSeenSec.observe((Date.now()-r)/1e3):this.asyncValidationUnknownFirstSeen.inc()},onScorePenalty(e){this.scoringPenalties.inc({penalty:e},1)},onIhaveRcv(e,t,r){const n=this.toTopic(e);this.ihaveRcvMsgids.inc({topic:n},t),this.ihaveRcvNotSeenMsgids.inc({topic:n},r)},onIwantRcv(e,t){for(const[r,n]of e){const e=this.toTopic(r);this.iwantRcvMsgids.inc({topic:e},n)}this.iwantRcvDonthaveMsgids.inc(t)},onForwardMsg(e,t){const r=this.toTopic(e);this.msgForwardCount.inc({topic:r},1),this.msgForwardPeers.inc({topic:r},t)},onPublishMsg(e,t,r,n){const i=this.toTopic(e);this.msgPublishCount.inc({topic:i},1),this.msgPublishBytes.inc({topic:i},r*n),this.msgPublishPeersByTopic.inc({topic:i},r),this.msgPublishPeersByGroup.inc({peerGroup:"direct"},t.direct),this.msgPublishPeersByGroup.inc({peerGroup:"floodsub"},t.floodsub),this.msgPublishPeersByGroup.inc({peerGroup:"mesh"},t.mesh),this.msgPublishPeersByGroup.inc({peerGroup:"fanout"},t.fanout)},onMsgRecvPreValidation(e){const t=this.toTopic(e);this.msgReceivedPreValidation.inc({topic:t},1)},onMsgRecvError(e){const t=this.toTopic(e);this.msgReceivedError.inc({topic:t},1)},onMsgRecvResult(e,t){const r=this.toTopic(e);this.msgReceivedTopic.inc({topic:r}),this.msgReceivedStatus.inc({status:t})},onMsgRecvInvalid(e,t){const r=this.toTopic(e),n=t.reason===Rb.Error?t.error:t.reason;this.msgReceivedInvalid.inc({error:n},1),this.msgReceivedInvalidByTopic.inc({topic:r},1)},onDuplicateMsgDelivery(e,t,r){if(this.duplicateMsgDeliveryDelay.observe(t/1e3),r){const t=this.toTopic(e);this.duplicateMsgLateDelivery.inc({topic:t},1)}},onPublishDuplicateMsg(e){const t=this.toTopic(e);this.duplicateMsgIgnored.inc({topic:t},1)},onPeerReadStreamError(){this.peerReadStreamError.inc(1)},onRpcRecvError(){this.rpcRecvError.inc(1)},onRpcDataError(){this.rpcDataError.inc(1)},onRpcRecv(e,t){this.rpcRecvBytes.inc(t),this.rpcRecvCount.inc(1),e.subscriptions&&this.rpcRecvSubscription.inc(e.subscriptions.length),e.messages&&this.rpcRecvMessage.inc(e.messages.length),e.control&&(this.rpcRecvControl.inc(1),e.control.ihave&&this.rpcRecvIHave.inc(e.control.ihave.length),e.control.iwant&&this.rpcRecvIWant.inc(e.control.iwant.length),e.control.graft&&this.rpcRecvGraft.inc(e.control.graft.length),e.control.prune&&this.rpcRecvPrune.inc(e.control.prune.length))},onRpcSent(e,t){if(this.rpcSentBytes.inc(t),this.rpcSentCount.inc(1),e.subscriptions&&this.rpcSentSubscription.inc(e.subscriptions.length),e.messages&&this.rpcSentMessage.inc(e.messages.length),e.control){var r,n,i,o,s,a,c,l;const t=null!==(r=null===(n=e.control.ihave)||void 0===n?void 0:n.length)&&void 0!==r?r:0,u=null!==(i=null===(o=e.control.iwant)||void 0===o?void 0:o.length)&&void 0!==i?i:0,h=null!==(s=null===(a=e.control.graft)||void 0===a?void 0:a.length)&&void 0!==s?s:0,d=null!==(c=null===(l=e.control.prune)||void 0===l?void 0:l.length)&&void 0!==c?c:0;t>0&&this.rpcSentIHave.inc(t),u>0&&this.rpcSentIWant.inc(u),h>0&&this.rpcSentGraft.inc(h),d>0&&this.rpcSentPrune.inc(d),(t>0||u>0||h>0||d>0)&&this.rpcSentControl.inc(1)}},registerScores(e,t){let r=0,n=0,i=0,o=0;for(const s of e)s>=t.graylistThreshold&&r++,s>=t.publishThreshold&&n++,s>=t.gossipThreshold&&i++,s>=0&&o++;this.peersByScoreThreshold.set({threshold:rw.graylist},r),this.peersByScoreThreshold.set({threshold:rw.publish},n),this.peersByScoreThreshold.set({threshold:rw.gossip},i),this.peersByScoreThreshold.set({threshold:rw.mesh},o),this.score.set(e)},registerScoreWeights(e){for(const[t,r]of e.byTopic)this.scoreWeights.set({topic:t,p:"p1"},r.p1w),this.scoreWeights.set({topic:t,p:"p2"},r.p2w),this.scoreWeights.set({topic:t,p:"p3"},r.p3w),this.scoreWeights.set({topic:t,p:"p3b"},r.p3bw),this.scoreWeights.set({topic:t,p:"p4"},r.p4w);this.scoreWeights.set({p:"p5"},e.p5w),this.scoreWeights.set({p:"p6"},e.p6w),this.scoreWeights.set({p:"p7"},e.p7w)},registerScorePerMesh(e,t){const r=new Map;e.forEach(((e,t)=>{var n;const i=null!==(n=this.topicStrToLabel.get(t))&&void 0!==n?n:"unknown";let o=r.get(i);o||(o=new Set,r.set(i,o)),e.forEach((e=>{var t;return null===(t=o)||void 0===t?void 0:t.add(e)}))}));for(const[n,i]of r){const e=[];i.forEach((r=>{var n;e.push(null!==(n=t.get(r))&&void 0!==n?n:0)})),this.scorePerMesh.set({topic:n},e)}}}}(o.metricsRegister,o.metricsTopicStrToLabel,{gossipPromiseExpireSec:this.opts.gossipsubIWantFollowupMs/1e3,behaviourPenaltyThreshold:s.scoreParams.behaviourPenaltyThreshold,maxMeshMessageDeliveriesWindowSec:e/1e3});t.mcacheSize.addCollect((()=>this.onScrapeMetrics(t)));for(const r of this.multicodecs)t.protocolsEnabled.set({protocol:r},1);this.metrics=t}else this.metrics=null;this.gossipTracer=new Yb(this.opts.gossipsubIWantFollowupMs,this.msgIdToStrFn,this.metrics),this.score=new Gb(this.opts.scoreParams,this.metrics,{scoreCacheValidityMs:s.heartbeatInterval}),this.maxInboundStreams=o.maxInboundStreams,this.maxOutboundStreams=o.maxOutboundStreams,this.allowedTopics=s.allowedTopics?new Set(s.allowedTopics):null}getPeers(){return[...this.peers.keys()].map((e=>Sp(e)))}isStarted(){return this.status.code===Aw.started}async start(){if(this.isStarted())return;this.log("starting"),this.publishConfig=await async function(e,t){switch(e){case Ab:{if(!t)throw Error("Must provide PeerId");if(null==t.privateKey)throw Error("Cannot sign message, no private key present");if(null==t.publicKey)throw Error("Cannot sign message, no public key present");const e=await Af(t.privateKey);return{type:Ib.Signing,author:t,key:t.publicKey,privateKey:e}}case kb:return{type:Ib.Anonymous};default:throw new Error('Unknown signature policy "'.concat(e,'"'))}}(this.globalSignaturePolicy,this.components.peerId),this.outboundInflightQueue=La({objectMode:!0}),za(this.outboundInflightQueue,(async e=>{for await(const{peerId:t,connection:r}of e)await this.createOutboundStream(t,r)})).catch((e=>this.log.error("outbound inflight queue error",e))),await Promise.all(this.opts.directPeers.map((async e=>{await this.components.peerStore.merge(e.id,{multiaddrs:e.addrs})})));const e=this.components.registrar;await Promise.all(this.multicodecs.map((t=>e.handle(t,this.onIncomingStream.bind(this),{maxInboundStreams:this.maxInboundStreams,maxOutboundStreams:this.maxOutboundStreams}))));const t=(r={onConnect:this.onPeerConnected.bind(this),onDisconnect:this.onPeerDisconnected.bind(this)},new pb(r));var r;const n=await Promise.all(this.multicodecs.map((r=>e.register(r,t)))),i=setTimeout(this.runHeartbeat,100);this.status={code:Aw.started,registrarTopologyIds:n,heartbeatTimeout:i,hearbeatStartMs:Date.now()+100},this.score.start(),this.directPeerInitial=setTimeout((()=>{Promise.resolve().then((async()=>{await Promise.all(Array.from(this.direct).map((async e=>await this.connect(e))))})).catch((e=>{this.log(e)}))}),1e3),this.log("started")}async stop(){if(this.log("stopping"),this.status.code!==Aw.started)return;const{registrarTopologyIds:e}=this.status;this.status={code:Aw.stopped};const t=this.components.registrar;await Promise.all(this.multicodecs.map((e=>t.unhandle(e)))),e.forEach((e=>t.unregister(e))),this.outboundInflightQueue.end();for(const r of this.streamsOutbound.values())r.close();this.streamsOutbound.clear();for(const r of this.streamsInbound.values())r.close();this.streamsInbound.clear(),this.peers.clear(),this.subscriptions.clear(),this.heartbeatTimer&&(this.heartbeatTimer.cancel(),this.heartbeatTimer=null),this.score.stop(),this.mesh.clear(),this.fanout.clear(),this.fanoutLastpub.clear(),this.gossip.clear(),this.control.clear(),this.peerhave.clear(),this.iasked.clear(),this.backoff.clear(),this.outbound.clear(),this.gossipTracer.clear(),this.seenCache.clear(),this.fastMsgIdCache&&this.fastMsgIdCache.clear(),this.directPeerInitial&&clearTimeout(this.directPeerInitial),this.log("stopped")}dumpPeerScoreStats(){return this.score.dumpPeerScoreStats()}onIncomingStream(e){let{stream:t,connection:r}=e;if(!this.isStarted())return;const n=r.remotePeer;this.addPeer(n,r.stat.direction,r.remoteAddr),this.createInboundStream(n,t),this.outboundInflightQueue.push({peerId:n,connection:r})}onPeerConnected(e,t){var r;null===(r=this.metrics)||void 0===r||r.newConnectionCount.inc({status:t.stat.status}),this.isStarted()&&"OPEN"===t.stat.status&&(this.addPeer(e,t.stat.direction,t.remoteAddr),this.outboundInflightQueue.push({peerId:e,connection:t}))}onPeerDisconnected(e){this.log("connection ended %p",e),this.removePeer(e)}async createOutboundStream(e,t){if(!this.isStarted())return;const r=e.toString();if(this.peers.has(r)&&!this.streamsOutbound.has(r))try{var n;const i=new uw(await t.newStream(this.multicodecs),(e=>this.log.error("outbound pipe error",e)),{maxBufferSize:this.opts.maxOutboundBufferSize});this.log("create outbound stream %p",e),this.streamsOutbound.set(r,i);const o=i.protocol;o===vb&&this.floodsubPeers.add(r),null===(n=this.metrics)||void 0===n||n.peersPerProtocol.inc({protocol:o},1),this.subscriptions.size>0&&(this.log("send subscriptions to",r),this.sendSubscriptions(r,Array.from(this.subscriptions),!0))}catch(i){this.log.error("createOutboundStream error",i)}}async createInboundStream(e,t){if(!this.isStarted())return;const r=e.toString();if(!this.peers.has(r))return;const n=this.streamsInbound.get(r);void 0!==n&&(this.log("replacing existing inbound steam %s",r),n.close()),this.log("create inbound stream %s",r);const i=new hw(t,{maxDataLength:this.opts.maxInboundDataLength});this.streamsInbound.set(r,i),this.pipePeerReadStream(e,i.source).catch((e=>this.log(e)))}addPeer(e,t,r){const n=e.toString();if(!this.peers.has(n)){this.log("new peer %p",e),this.peers.add(n),this.score.addPeer(n);const i=function(e){for(const t of e.tuples())switch(t[0]){case _w.ip4:case _w.ip6:return ks(t[0],t[1])}return null}(r);null!==i?this.score.addIP(n,i):this.log("Added peer has no IP in current address %s %s",n,r.toString()),this.outbound.has(n)||this.outbound.set(n,"outbound"===t)}}removePeer(e){const t=e.toString();if(!this.peers.has(t))return;this.log("delete peer %p",e),this.peers.delete(t);const r=this.streamsOutbound.get(t),n=this.streamsInbound.get(t);var i;r&&(null===(i=this.metrics)||void 0===i||i.peersPerProtocol.inc({protocol:r.protocol},-1));null===r||void 0===r||r.close(),null===n||void 0===n||n.close(),this.streamsOutbound.delete(t),this.streamsInbound.delete(t);for(const s of this.topics.values())s.delete(t);for(const[s,a]of this.mesh){var o;if(!0===a.delete(t))null===(o=this.metrics)||void 0===o||o.onRemoveFromMesh(s,$b.Dc,1)}for(const s of this.fanout.values())s.delete(t);this.floodsubPeers.delete(t),this.gossip.delete(t),this.control.delete(t),this.outbound.delete(t),this.score.removePeer(t),this.acceptFromWhitelist.delete(t)}get started(){return this.status.code===Aw.started}getMeshPeers(e){const t=this.mesh.get(e);return t?Array.from(t):[]}getSubscribers(e){const t=this.topics.get(e);return(t?Array.from(t):[]).map((e=>Sp(e)))}getTopics(){return Array.from(this.subscriptions)}async pipePeerReadStream(e,t){try{await za(t,(async t=>{for await(const a of t)try{var r;const t=a.subarray(),i=pw(t,this.decodeRpcLimits);if(null===(r=this.metrics)||void 0===r||r.onRpcRecv(i,t.length),this.opts.awaitRpcHandler)try{await this.handleReceivedRpc(e,i)}catch(o){var n;null===(n=this.metrics)||void 0===n||n.onRpcRecvError(),this.log(o)}else this.handleReceivedRpc(e,i).catch((e=>{var t;null===(t=this.metrics)||void 0===t||t.onRpcRecvError(),this.log(e)}))}catch(s){var i;null===(i=this.metrics)||void 0===i||i.onRpcDataError(),this.log(s)}}))}catch(n){var r;null===(r=this.metrics)||void 0===r||r.onPeerReadStreamError(),this.handlePeerReadStreamError(n,e)}}handlePeerReadStreamError(e,t){this.log.error(e),this.onPeerDisconnected(t)}async handleReceivedRpc(e,t){var r;if(!this.acceptFrom(e.toString()))return this.log("received message from unacceptable peer %p",e),void(null===(r=this.metrics)||void 0===r||r.rpcRecvNotAccepted.inc());const n=t.subscriptions?t.subscriptions.length:0,i=t.messages?t.messages.length:0;let o=0,s=0,a=0,c=0;if(t.control&&(t.control.ihave&&(o=t.control.ihave.length),t.control.iwant&&(s=t.control.iwant.length),t.control.graft&&(a=t.control.graft.length),t.control.prune&&(c=t.control.prune.length)),this.log("rpc.from ".concat(e.toString()," subscriptions ").concat(n," messages ").concat(i," ihave ").concat(o," iwant ").concat(s," graft ").concat(a," prune ").concat(c)),t.subscriptions&&t.subscriptions.length>0){const r=[];t.subscriptions.forEach((t=>{const n=t.topic,i=!0===t.subscribe;if(null!=n){if(this.allowedTopics&&!this.allowedTopics.has(n))return;this.handleReceivedSubscription(e,n,i),r.push({topic:n,subscribe:i})}})),this.dispatchEvent(new ra("subscription-change",{detail:{peerId:e,subscriptions:r}}))}if(t.messages)for(const l of t.messages){if(this.allowedTopics&&!this.allowedTopics.has(l.topic))continue;const t=this.handleReceivedMessage(e,l).catch((e=>{var t;null===(t=this.metrics)||void 0===t||t.onMsgRecvError(l.topic),this.log(e)}));this.opts.awaitRpcMessageHandler&&await t}t.control&&await this.handleControlMessage(e.toString(),t.control)}handleReceivedSubscription(e,t,r){this.log("subscription update from %p topic %s",e,t);let n=this.topics.get(t);null==n&&(n=new Set,this.topics.set(t,n)),r?n.add(e.toString()):n.delete(e.toString())}async handleReceivedMessage(e,t){var r,n,i;null===(r=this.metrics)||void 0===r||r.onMsgRecvPreValidation(t.topic);const o=await this.validateReceivedMessage(e,t);switch(null===(n=this.metrics)||void 0===n||n.onMsgRecvResult(t.topic,o.code),o.code){case Tb.duplicate:return this.score.duplicateMessage(e.toString(),o.msgIdStr,t.topic),this.gossipTracer.deliverMessage(o.msgIdStr,!0),void this.mcache.observeDuplicate(o.msgIdStr,e.toString());case Tb.invalid:if(o.msgIdStr){const r=o.msgIdStr;this.score.rejectMessage(e.toString(),r,t.topic,o.reason),this.gossipTracer.rejectMessage(r,o.reason)}else this.score.rejectInvalidMessage(e.toString(),t.topic);return void(null===(i=this.metrics)||void 0===i||i.onMsgRecvInvalid(t.topic,o));case Tb.valid:if(this.score.validateMessage(o.messageId.msgIdStr),this.gossipTracer.deliverMessage(o.messageId.msgIdStr),this.mcache.put(o.messageId,t,!this.opts.asyncValidation),this.subscriptions.has(t.topic)){this.components.peerId.equals(e)&&!this.opts.emitSelf||(super.dispatchEvent(new ra("gossipsub:message",{detail:{propagationSource:e,msgId:o.messageId.msgIdStr,msg:o.msg}})),super.dispatchEvent(new ra("message",{detail:o.msg})))}this.opts.asyncValidation||this.forwardMessage(o.messageId.msgIdStr,t,e.toString())}}async validateReceivedMessage(e,t){var r,n;const i=null===(r=this.fastMsgIdFn)||void 0===r?void 0:r.call(this,t),o=void 0!==i?null===(n=this.fastMsgIdCache)||void 0===n?void 0:n.get(i):void 0;if(o)return{code:Tb.duplicate,msgIdStr:o};const s=await async function(e,t){var r;switch(e){case kb:return null!=t.signature?{valid:!1,error:Pb.SignaturePresent}:null!=t.seqno?{valid:!1,error:Pb.SeqnoPresent}:null!=t.key?{valid:!1,error:Pb.FromPresent}:{valid:!0,message:{type:"unsigned",topic:t.topic,data:null!==(r=t.data)&&void 0!==r?r:new Uint8Array(0)}};case Ab:{var n,i;if(null==t.seqno)return{valid:!1,error:Pb.InvalidSeqno};if(8!==t.seqno.length)return{valid:!1,error:Pb.InvalidSeqno};if(null==t.signature)return{valid:!1,error:Pb.InvalidSignature};if(null==t.from)return{valid:!1,error:Pb.InvalidPeerId};let e,r;try{e=_p(t.from)}catch(o){return{valid:!1,error:Pb.InvalidPeerId}}if(t.key){if(r=Sf(t.key),void 0!==e.publicKey&&!wi(r.bytes,e.publicKey))return{valid:!1,error:Pb.InvalidPeerId}}else{if(null==e.publicKey)return{valid:!1,error:Pb.InvalidPeerId};r=Sf(e.publicKey)}const s={from:t.from,data:t.data,seqno:t.seqno,topic:t.topic,signature:void 0,key:void 0},a=No([sw,yb.Message.encode(s).finish()]);return await r.verify(a,t.signature)?{valid:!0,message:{type:"signed",from:e,data:null!==(n=t.data)&&void 0!==n?n:new Uint8Array(0),sequenceNumber:BigInt("0x".concat(In(t.seqno,"base16"))),topic:t.topic,signature:t.signature,key:null!==(i=t.key)&&void 0!==i?i:_f(r)}}:{valid:!1,error:Pb.InvalidSignature}}}}(this.globalSignaturePolicy,t);if(!s.valid)return{code:Tb.invalid,reason:Rb.Error,error:s.error};const a=s.message;try{this.dataTransform&&(a.data=this.dataTransform.inboundTransform(t.topic,a.data))}catch(f){return this.log("Invalid message, transform failed",f),{code:Tb.invalid,reason:Rb.Error,error:Pb.TransformFailed}}const c=await this.msgIdFn(a),l=this.msgIdToStrFn(c),u={msgId:c,msgIdStr:l};if(void 0!==i&&this.fastMsgIdCache){var h;if(this.fastMsgIdCache.put(i,l))null===(h=this.metrics)||void 0===h||h.fastMsgIdCacheCollision.inc()}if(this.seenCache.has(l))return{code:Tb.duplicate,msgIdStr:l};this.seenCache.put(l);const d=this.topicValidators.get(t.topic);if(null!=d){let t;try{t=await d(e,a)}catch(f){const e=f.code;"ERR_TOPIC_VALIDATOR_IGNORE"===e&&(t=Cb.Ignore),t="ERR_TOPIC_VALIDATOR_REJECT"===e?Cb.Reject:Cb.Ignore}if(t!==Cb.Accept)return{code:Tb.invalid,reason:Nb(t),msgIdStr:l}}return{code:Tb.valid,messageId:u,msg:a}}getScore(e){return this.score.score(e)}sendSubscriptions(e,t,r){this.sendRpc(e,{subscriptions:t.map((e=>({topic:e,subscribe:r})))})}async handleControlMessage(e,t){var r;if(void 0===t)return;const n=t.ihave?this.handleIHave(e,t.ihave):[],i=t.iwant?this.handleIWant(e,t.iwant):[],o=t.graft?await this.handleGraft(e,t.graft):[];if(t.prune&&await this.handlePrune(e,t.prune),!n.length&&!i.length&&!o.length)return;const s=this.sendRpc(e,{messages:i,control:{iwant:n,prune:o}}),a=null===(r=n[0])||void 0===r?void 0:r.messageIDs;var c;a&&(s?this.gossipTracer.addPromise(e,a):null===(c=this.metrics)||void 0===c||c.iwantPromiseUntracked.inc(1))}acceptFrom(e){if(this.direct.has(e))return!0;const t=Date.now(),r=this.acceptFromWhitelist.get(e);if(r&&r.messagesAccepted<128&&r.acceptUntil>=t)return r.messagesAccepted+=1,!0;const n=this.score.score(e);return n>=0?this.acceptFromWhitelist.set(e,{messagesAccepted:0,acceptUntil:t+1e3}):this.acceptFromWhitelist.delete(e),n>=this.opts.scoreThresholds.graylistThreshold}handleIHave(e,t){var r,n;if(!t.length)return[];const i=this.score.score(e);var o;if(i<this.opts.scoreThresholds.gossipThreshold)return this.log("IHAVE: ignoring peer %s with score below threshold [ score = %d ]",e,i),null===(o=this.metrics)||void 0===o||o.ihaveRcvIgnored.inc({reason:tw.LowScore}),[];const s=(null!==(r=this.peerhave.get(e))&&void 0!==r?r:0)+1;var a;if(this.peerhave.set(e,s),s>10)return this.log("IHAVE: peer %s has advertised too many times (%d) within this heartbeat interval; ignoring",e,s),null===(a=this.metrics)||void 0===a||a.ihaveRcvIgnored.inc({reason:tw.MaxIhave}),[];const c=null!==(n=this.iasked.get(e))&&void 0!==n?n:0;var l;if(c>=Eb)return this.log("IHAVE: peer %s has already advertised too many messages (%d); ignoring",e,c),null===(l=this.metrics)||void 0===l||l.ihaveRcvIgnored.inc({reason:tw.MaxIasked}),[];const u=new Map;if(t.forEach((e=>{var t;let{topicID:r,messageIDs:n}=e;if(!r||!n||!this.mesh.has(r))return;let i=0;n.forEach((e=>{const t=this.msgIdToStrFn(e);this.seenCache.has(t)||(u.set(t,e),i++)})),null===(t=this.metrics)||void 0===t||t.onIhaveRcv(r,n.length,i)})),!u.size)return[];let h=u.size;h+c>Eb&&(h=Eb-c),this.log("IHAVE: Asking for %d out of %d messages from %s",h,u.size,e);let d=Array.from(u.values());return Sb(d),d=d.slice(0,h),this.iasked.set(e,c+h),[{messageIDs:d}]}handleIWant(e,t){var r;if(!t.length)return[];const n=this.score.score(e);if(n<this.opts.scoreThresholds.gossipThreshold)return this.log("IWANT: ignoring peer %s with score below threshold [score = %d]",e,n),[];const i=new Map,o=new Map;let s=0;return t.forEach((t=>{let{messageIDs:r}=t;r&&r.forEach((t=>{var r;const n=this.msgIdToStrFn(t),a=this.mcache.getWithIWantCount(n,e);null!=a?(o.set(a.msg.topic,1+(null!==(r=o.get(a.msg.topic))&&void 0!==r?r:0)),a.count>3?this.log("IWANT: Peer %s has asked for message %s too many times: ignoring request",e,t):i.set(n,a.msg)):s++}))})),null===(r=this.metrics)||void 0===r||r.onIwantRcv(o,s),i.size?(this.log("IWANT: Sending %d messages to %s",i.size,e),Array.from(i.values())):(this.log("IWANT: Could not provide any wanted messages to %s",e),[])}async handleGraft(e,t){const r=[],n=this.score.score(e),i=Date.now();let o=this.opts.doPX;if(t.forEach((t=>{var s,a;let{topicID:c}=t;if(!c)return;const l=this.mesh.get(c);if(!l)return void(o=!1);if(l.has(e))return;if(this.direct.has(e))return this.log("GRAFT: ignoring request from direct peer %s",e),r.push(c),void(o=!1);const u=null===(s=this.backoff.get(c))||void 0===s?void 0:s.get(e);if("number"===typeof u&&i<u){this.log("GRAFT: ignoring backed off peer %s",e),this.score.addPenalty(e,1,ew.GraftBackoff),o=!1;const t=u+this.opts.graftFloodThreshold-this.opts.pruneBackoff;return i<t&&this.score.addPenalty(e,1,ew.GraftBackoff),this.addBackoff(e,c),void r.push(c)}return n<0?(this.log("GRAFT: ignoring peer %s with negative score: score=%d, topic=%s",e,n,c),r.push(c),o=!1,void this.addBackoff(e,c)):l.size>=this.opts.Dhi&&!this.outbound.get(e)?(r.push(c),void this.addBackoff(e,c)):(this.log("GRAFT: Add mesh link from %s in %s",e,c),this.score.graft(e,c),l.add(e),void(null===(a=this.metrics)||void 0===a||a.onAddToMesh(c,Xb.Subscribed,1)))})),!r.length)return[];return await Promise.all(r.map((t=>this.makePrune(e,t,o,false))))}async handlePrune(e,t){const r=this.score.score(e);for(const{topicID:i,backoff:o,peers:s}of t){if(null==i)continue;const t=this.mesh.get(i);if(!t)return;var n;if(this.log("PRUNE: Remove mesh link to %s in %s",e,i),this.score.prune(e,i),t.has(e))t.delete(e),null===(n=this.metrics)||void 0===n||n.onRemoveFromMesh(i,$b.Prune,1);if("number"===typeof o&&o>0?this.doAddBackoff(e,i,1e3*o):this.addBackoff(e,i),s&&s.length){if(r<this.opts.scoreThresholds.acceptPXThreshold){this.log("PRUNE: ignoring PX from peer %s with insufficient score [score = %d, topic = %s]",e,r,i);continue}await this.pxConnect(s)}}}addBackoff(e,t){this.doAddBackoff(e,t,this.opts.pruneBackoff)}doAddBackoff(e,t,r){var n;let i=this.backoff.get(t);i||(i=new Map,this.backoff.set(t,i));const o=Date.now()+r;(null!==(n=i.get(e))&&void 0!==n?n:0)<o&&i.set(e,o)}applyIwantPenalties(){this.gossipTracer.getBrokenPromises().forEach(((e,t)=>{this.log("peer %s didn't follow up in %d IWANT requests; adding penalty",t,e),this.score.addPenalty(t,e,ew.BrokenPromise)}))}clearBackoff(){if(this.heartbeatTicks%15!==0)return;const e=Date.now();this.backoff.forEach(((t,r)=>{t.forEach(((r,n)=>{r+1*this.opts.heartbeatInterval<e&&t.delete(n)})),0===t.size&&this.backoff.delete(r)}))}async directConnect(){const e=[];this.direct.forEach((t=>{this.streamsOutbound.has(t)||e.push(t)})),await Promise.all(e.map((async e=>await this.connect(e))))}async pxConnect(e){e.length>this.opts.prunePeers&&(Sb(e),e=e.slice(0,this.opts.prunePeers));const t=[];await Promise.all(e.map((async e=>{if(!e.peerID)return;const r=_p(e.peerID),n=r.toString();if(!this.peers.has(n))if(e.signedPeerRecord)try{if(!await this.components.peerStore.consumePeerRecord(e.signedPeerRecord,r))return void this.log("bogus peer record obtained through px: could not add peer record to address book");t.push(n)}catch(i){this.log("bogus peer record obtained through px: invalid signature or not a peer record")}else t.push(n)}))),t.length&&await Promise.all(t.map((async e=>await this.connect(e))))}async connect(e){this.log("Initiating connection with %s",e);const t=Sp(e),r=await this.components.connectionManager.openConnection(t);for(const n of this.multicodecs)for(const e of this.components.registrar.getTopologies(n))e.onConnect(t,r)}subscribe(e){if(this.status.code!==Aw.started)throw new Error("Pubsub has not started");if(!this.subscriptions.has(e)){this.subscriptions.add(e);for(const t of this.peers.keys())this.sendSubscriptions(t,[e],!0)}this.join(e)}unsubscribe(e){if(this.status.code!==Aw.started)throw new Error("Pubsub is not started");const t=this.subscriptions.delete(e);if(this.log("unsubscribe from %s - am subscribed %s",e,t),t)for(const r of this.peers.keys())this.sendSubscriptions(r,[e],!1);this.leave(e)}join(e){var t;if(this.status.code!==Aw.started)throw new Error("Gossipsub has not started");if(this.mesh.has(e))return;this.log("JOIN %s",e),null===(t=this.metrics)||void 0===t||t.onJoin(e);const r=new Set,n=this.backoff.get(e),i=this.fanout.get(e);var o;i&&(this.fanout.delete(e),this.fanoutLastpub.delete(e),i.forEach((e=>{this.direct.has(e)||!(this.score.score(e)>=0)||n&&n.has(e)||r.add(e)})),null===(o=this.metrics)||void 0===o||o.onAddToMesh(e,Xb.Fanout,r.size));if(r.size<this.opts.D){var s;const t=r.size;this.getRandomGossipPeers(e,this.opts.D,(e=>!r.has(e)&&!this.direct.has(e)&&this.score.score(e)>=0&&(!n||!n.has(e)))).forEach((e=>{r.add(e)})),null===(s=this.metrics)||void 0===s||s.onAddToMesh(e,Xb.Random,r.size-t)}this.mesh.set(e,r),r.forEach((t=>{this.log("JOIN: Add mesh link to %s in %s",t,e),this.sendGraft(t,e)}))}leave(e){var t;if(this.status.code!==Aw.started)throw new Error("Gossipsub has not started");this.log("LEAVE %s",e),null===(t=this.metrics)||void 0===t||t.onLeave(e);const r=this.mesh.get(e);r&&(Promise.all(Array.from(r).map((async t=>(this.log("LEAVE: Remove mesh link to %s in %s",t,e),await this.sendPrune(t,e))))).catch((e=>{this.log("Error sending prunes to mesh peers",e)})),this.mesh.delete(e))}selectPeersToForward(e,t,r){const n=new Set,i=this.topics.get(e);i&&(this.direct.forEach((e=>{!i.has(e)||t===e||null!==r&&void 0!==r&&r.has(e)||n.add(e)})),this.floodsubPeers.forEach((e=>{i.has(e)&&t!==e&&(null===r||void 0===r||!r.has(e))&&this.score.score(e)>=this.opts.scoreThresholds.publishThreshold&&n.add(e)})));const o=this.mesh.get(e);return o&&o.size>0&&o.forEach((e=>{t===e||null!==r&&void 0!==r&&r.has(e)||n.add(e)})),n}selectPeersToPublish(e){const t=new Set,r={direct:0,floodsub:0,mesh:0,fanout:0},n=this.topics.get(e);if(n)if(this.opts.floodPublish)n.forEach((e=>{this.direct.has(e)?(t.add(e),r.direct++):this.score.score(e)>=this.opts.scoreThresholds.publishThreshold&&(t.add(e),r.floodsub++)}));else{this.direct.forEach((e=>{n.has(e)&&(t.add(e),r.direct++)})),this.floodsubPeers.forEach((e=>{n.has(e)&&this.score.score(e)>=this.opts.scoreThresholds.publishThreshold&&(t.add(e),r.floodsub++)}));const i=this.mesh.get(e);if(i&&i.size>0)i.forEach((e=>{t.add(e),r.mesh++}));else{const n=this.fanout.get(e);if(n&&n.size>0)n.forEach((e=>{t.add(e),r.fanout++}));else{const n=this.getRandomGossipPeers(e,this.opts.D,(e=>this.score.score(e)>=this.opts.scoreThresholds.publishThreshold));n.size>0&&(this.fanout.set(e,n),n.forEach((e=>{t.add(e),r.fanout++})))}this.fanoutLastpub.set(e,Date.now())}}return{tosend:t,tosendCount:r}}forwardMessage(e,t,r,n){var i;r&&this.score.deliverMessage(r,e,t.topic);const o=this.selectPeersToForward(t.topic,r,n);o.forEach((e=>{this.sendRpc(e,{messages:[t]})})),null===(i=this.metrics)||void 0===i||i.onForwardMsg(t.topic,o.size)}async publish(e,t,r){var n,i,o;const s=this.dataTransform?this.dataTransform.outboundTransform(e,t):t;if(null==this.publishConfig)throw Error("PublishError.Uninitialized");const{raw:a,msg:c}=await async function(e,t,r,n){switch(e.type){case Ib.Signing:{const i={from:e.author.toBytes(),data:n,seqno:$d(8),topic:t,signature:void 0,key:void 0},o=No([sw,yb.Message.encode(i).finish()]);return i.signature=await e.privateKey.sign(o),i.key=e.key,{raw:i,msg:{type:"signed",from:e.author,data:r,sequenceNumber:BigInt("0x".concat(In(i.seqno,"base16"))),topic:t,signature:i.signature,key:i.key}}}case Ib.Anonymous:return{raw:{from:void 0,data:n,seqno:void 0,topic:t,signature:void 0,key:void 0},msg:{type:"unsigned",data:r,topic:t}}}}(this.publishConfig,e,t,s),l=await this.msgIdFn(c),u=this.msgIdToStrFn(l),h=null!==(n=null===r||void 0===r?void 0:r.ignoreDuplicatePublishError)&&void 0!==n?n:this.opts.ignoreDuplicatePublishError;if(this.seenCache.has(u)){var d;if(h)return null===(d=this.metrics)||void 0===d||d.onPublishDuplicateMsg(e),{recipients:[]};throw Error("PublishError.Duplicate")}const{tosend:f,tosendCount:p}=this.selectPeersToPublish(e),g=!0===this.opts.emitSelf&&this.subscriptions.has(e),m=null!==(i=null===r||void 0===r?void 0:r.allowPublishToZeroPeers)&&void 0!==i?i:this.opts.allowPublishToZeroPeers;if(0===f.size&&!m&&!g)throw Error("PublishError.InsufficientPeers");this.seenCache.put(u),this.mcache.put({msgId:l,msgIdStr:u},a,!0),this.publishedMessageIds.put(u);for(const y of f){this.sendRpc(y,{messages:[a]})||f.delete(y)}return null===(o=this.metrics)||void 0===o||o.onPublishMsg(e,p,f.size,null!=a.data?a.data.length:0),g&&(f.add(this.components.peerId.toString()),super.dispatchEvent(new ra("gossipsub:message",{detail:{propagationSource:this.components.peerId,msgId:u,msg:c}})),super.dispatchEvent(new ra("message",{detail:c}))),{recipients:Array.from(f.values()).map((e=>Sp(e)))}}reportMessageValidationResult(e,t,r){var n;let i;if(r===Cb.Accept){if(i=this.mcache.validate(e),null!=i){const{message:r,originatingPeers:n}=i;this.score.deliverMessage(t,e,r.topic),this.forwardMessage(e,i.message,t,n)}}else if(i=this.mcache.remove(e),i){const n=Nb(r),{message:o,originatingPeers:s}=i;this.score.rejectMessage(t,e,o.topic,n);for(const t of s)this.score.rejectMessage(t,e,o.topic,n)}const o=this.score.messageFirstSeenTimestampMs(e);null===(n=this.metrics)||void 0===n||n.onReportValidation(i,r,o)}sendGraft(e,t){const r=[{topicID:t}];this.sendRpc(e,{control:{graft:r}})}async sendPrune(e,t){const r=[await this.makePrune(e,t,this.opts.doPX,!0)];this.sendRpc(e,{control:{prune:r}})}sendRpc(e,t){var r;const n=this.streamsOutbound.get(e);if(!n)return this.log("Cannot send RPC to ".concat(e," as there is no open stream to it available")),!1;const i=this.control.get(e);i&&(this.piggybackControl(e,t,i),this.control.delete(e));const o=this.gossip.get(e);o&&(this.piggybackGossip(e,t,o),this.gossip.delete(e));const s=yb.encode(t).finish();try{n.push(s)}catch(a){return this.log.error("Cannot send rpc to ".concat(e),a),i&&this.control.set(e,i),o&&this.gossip.set(e,o),!1}return null===(r=this.metrics)||void 0===r||r.onRpcSent(t,s.length),!0}piggybackControl(e,t,r){if(r.graft){t.control||(t.control={}),t.control.graft||(t.control.graft=[]);for(const i of r.graft){var n;i.topicID&&null!==(n=this.mesh.get(i.topicID))&&void 0!==n&&n.has(e)&&t.control.graft.push(i)}}if(r.prune){t.control||(t.control={}),t.control.prune||(t.control.prune=[]);for(const n of r.prune){var i;!n.topicID||null!==(i=this.mesh.get(n.topicID))&&void 0!==i&&i.has(e)||t.control.prune.push(n)}}}piggybackGossip(e,t,r){t.control||(t.control={}),t.control.ihave=r}async sendGraftPrune(e,t,r){const n=this.opts.doPX;for(const[i,o]of e){const e=o.map((e=>({topicID:e})));let s=[];const a=t.get(i);a&&(s=await Promise.all(a.map((async e=>{var t;return await this.makePrune(i,e,n&&!(null!==(t=r.get(i))&&void 0!==t&&t),false)}))),t.delete(i)),this.sendRpc(i,{control:{graft:e,prune:s}})}for(const[i,o]of t){const e=await Promise.all(o.map((async e=>{var t;return await this.makePrune(i,e,n&&!(null!==(t=r.get(i))&&void 0!==t&&t),false)})));this.sendRpc(i,{control:{prune:e}})}}emitGossip(e){const t=this.mcache.getGossipIDs(new Set(e.keys()));for(const[n,i]of e){var r;this.doEmitGossip(n,i,null!==(r=t.get(n))&&void 0!==r?r:[])}}doEmitGossip(e,t,r){if(!r.length)return;if(Sb(r),r.length>Eb&&this.log("too many messages for gossip; will truncate IHAVE list (%d messages)",r.length),!t.size)return;let n=this.opts.Dlazy;const i=.25*t.size;let o=t;i>n&&(n=i),n>o.size?n=o.size:o=Sb(Array.from(o)).slice(0,n),o.forEach((t=>{let n=r;r.length>Eb&&(n=Sb(n.slice()).slice(0,Eb)),this.pushGossip(t,{topicID:e,messageIDs:n})}))}flush(){for(const[e,t]of this.gossip.entries())this.gossip.delete(e),this.sendRpc(e,{control:{ihave:t}});for(const[e,t]of this.control.entries())this.control.delete(e),this.sendRpc(e,{control:{graft:t.graft,prune:t.prune}})}pushGossip(e,t){this.log("Add gossip to %s",e);const r=this.gossip.get(e)||[];this.gossip.set(e,r.concat(t))}async makePrune(e,t,r,n){if(this.score.prune(e,t),this.streamsOutbound.get(e).protocol===bb)return{topicID:t,peers:[]};const i=n?this.opts.unsubcribeBackoff:this.opts.pruneBackoff,o=i/1e3;if(this.doAddBackoff(e,t,i),!r)return{topicID:t,peers:[],backoff:o};const s=this.getRandomGossipPeers(t,this.opts.prunePeers,(t=>t!==e&&this.score.score(t)>=0)),a=await Promise.all(Array.from(s).map((async e=>{var t;const r=Sp(e);let n;try{n=await this.components.peerStore.get(r)}catch(i){if("ERR_NOT_FOUND"!==i.code)throw i}return{peerID:r.toBytes(),signedPeerRecord:null===(t=n)||void 0===t?void 0:t.peerRecordEnvelope}})));return{topicID:t,peers:a,backoff:o}}async heartbeat(){var e,t;const{D:r,Dlo:n,Dhi:i,Dscore:o,Dout:s,fanoutTTL:a}=this.opts;this.heartbeatTicks++;const c=new Map,l=e=>{let t=c.get(e);return void 0===t&&(t=this.score.score(e),c.set(e,t)),t},u=new Map,h=new Map,d=new Map;this.clearBackoff(),this.peerhave.clear(),null===(e=this.metrics)||void 0===e||e.cacheSize.set({cache:"iasked"},this.iasked.size),this.iasked.clear(),this.applyIwantPenalties(),this.heartbeatTicks%this.opts.directConnectTicks===0&&await this.directConnect(),null===(t=this.fastMsgIdCache)||void 0===t||t.prune(),this.seenCache.prune(),this.gossipTracer.prune(),this.publishedMessageIds.prune();const f=new Map;this.mesh.forEach(((e,t)=>{const a=this.topics.get(t),c=new Set,p=new Set;if(f.set(t,p),a){const r=Sb(Array.from(a)),n=this.backoff.get(t);for(const t of r){const r=this.streamsOutbound.get(t);if(r&&this.multicodecs.includes(r.protocol)&&!e.has(t)&&!this.direct.has(t)){const e=l(t);n&&n.has(t)||!(e>=0)||c.add(t),e>=this.opts.scoreThresholds.gossipThreshold&&p.add(t)}}}const g=(r,n)=>{var i;this.log("HEARTBEAT: Remove mesh link to %s in %s",r,t),this.addBackoff(r,t),e.delete(r),l(r)>=this.opts.scoreThresholds.gossipThreshold&&p.add(r),null===(i=this.metrics)||void 0===i||i.onRemoveFromMesh(t,n,1);const o=h.get(r);o?o.push(t):h.set(r,[t])},m=(r,n)=>{var i;this.log("HEARTBEAT: Add mesh link to %s in %s",r,t),this.score.graft(r,t),e.add(r),p.delete(r),null===(i=this.metrics)||void 0===i||i.onAddToMesh(t,n,1);const o=u.get(r);o?o.push(t):u.set(r,[t])};if(e.forEach((e=>{const r=l(e);r<0&&(this.log("HEARTBEAT: Prune peer %s with negative score: score=%d, topic=%s",e,r,t),g(e,$b.BadScore),d.set(e,!0))})),e.size<n){const t=function(e,t){return Vb(e,t,(()=>!0))}(c,r-e.size);t.forEach((e=>{m(e,Xb.NotEnough)}))}if(e.size>i){let t=Array.from(e);t.sort(((e,t)=>l(t)-l(e))),t=t.slice(0,o).concat(Sb(t.slice(o)));let n=0;if(t.slice(0,r).forEach((e=>{this.outbound.get(e)&&n++})),n<s){const e=e=>{const r=t[e];for(let n=e;n>0;n--)t[n]=t[n-1];t[0]=r};if(n>0){let i=n;for(let n=1;n<r&&i>0;n++)this.outbound.get(t[n])&&(e(n),i--)}let i=r-n;for(let n=r;n<t.length&&i>0;n++)this.outbound.get(t[n])&&(e(n),i--)}t.slice(r).forEach((e=>{g(e,$b.Excess)}))}if(e.size>=n){let t=0;if(e.forEach((e=>{this.outbound.get(e)&&t++})),t<s){Vb(c,s-t,(e=>!0===this.outbound.get(e))).forEach((e=>{m(e,Xb.Outbound)}))}}if(this.heartbeatTicks%this.opts.opportunisticGraftTicks===0&&e.size>1){const r=Array.from(e).sort(((e,t)=>l(e)-l(t))),n=Math.floor(e.size/2),i=l(r[n]);if(i<this.opts.scoreThresholds.opportunisticGraftThreshold){const e=Vb(c,this.opts.opportunisticGraftPeers,(e=>l(e)>i));for(const r of e)this.log("HEARTBEAT: Opportunistically graft peer %s on topic %s",r,t),m(r,Xb.Opportunistic)}}}));const p=Date.now();this.fanoutLastpub.forEach(((e,t)=>{e+a<p&&(this.fanout.delete(t),this.fanoutLastpub.delete(t))})),this.fanout.forEach(((e,t)=>{const n=this.topics.get(t);e.forEach((t=>{(!n.has(t)||l(t)<this.opts.scoreThresholds.publishThreshold)&&e.delete(t)}));const i=this.topics.get(t),o=[],s=new Set;if(f.set(t,s),i){const t=Sb(Array.from(i));for(const r of t){const t=this.streamsOutbound.get(r);if(t&&this.multicodecs.includes(t.protocol)&&!e.has(r)&&!this.direct.has(r)){const e=l(r);e>=this.opts.scoreThresholds.publishThreshold&&o.push(r),e>=this.opts.scoreThresholds.gossipThreshold&&s.add(r)}}}if(e.size<r){const t=r-e.size;o.slice(0,t).forEach((t=>{e.add(t),null===s||void 0===s||s.delete(t)}))}})),this.emitGossip(f),await this.sendGraftPrune(u,h,d),this.flush(),this.mcache.shift(),this.dispatchEvent(new ra("gossipsub:heartbeat"))}getRandomGossipPeers(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>!0;const n=this.topics.get(e);if(!n)return new Set;let i=[];return n.forEach((e=>{const t=this.streamsOutbound.get(e);t&&this.multicodecs.includes(t.protocol)&&r(e)&&i.push(e)})),i=Sb(i),t>0&&i.length>t&&(i=i.slice(0,t)),new Set(i)}onScrapeMetrics(e){var t,r;e.mcacheSize.set(this.mcache.size),e.mcacheNotValidatedCount.set(this.mcache.notValidatedCount),e.cacheSize.set({cache:"direct"},this.direct.size),e.cacheSize.set({cache:"seenCache"},this.seenCache.size),e.cacheSize.set({cache:"fastMsgIdCache"},null!==(t=null===(r=this.fastMsgIdCache)||void 0===r?void 0:r.size)&&void 0!==t?t:0),e.cacheSize.set({cache:"publishedMessageIds"},this.publishedMessageIds.size),e.cacheSize.set({cache:"mcache"},this.mcache.size),e.cacheSize.set({cache:"score"},this.score.size),e.cacheSize.set({cache:"gossipTracer.promises"},this.gossipTracer.size),e.cacheSize.set({cache:"gossipTracer.requests"},this.gossipTracer.requestMsByMsgSize),e.cacheSize.set({cache:"topics"},this.topics.size),e.cacheSize.set({cache:"subscriptions"},this.subscriptions.size),e.cacheSize.set({cache:"mesh"},this.mesh.size),e.cacheSize.set({cache:"fanout"},this.fanout.size),e.cacheSize.set({cache:"peers"},this.peers.size),e.cacheSize.set({cache:"streamsOutbound"},this.streamsOutbound.size),e.cacheSize.set({cache:"streamsInbound"},this.streamsInbound.size),e.cacheSize.set({cache:"acceptFromWhitelist"},this.acceptFromWhitelist.size),e.cacheSize.set({cache:"gossip"},this.gossip.size),e.cacheSize.set({cache:"control"},this.control.size),e.cacheSize.set({cache:"peerhave"},this.peerhave.size),e.cacheSize.set({cache:"outbound"},this.outbound.size);let n=0;const i=Date.now();e.connectedPeersBackoffSec.reset();for(const u of this.backoff.values()){n+=u.size;for(const[t,r]of u.entries())this.peers.has(t)&&e.connectedPeersBackoffSec.observe(Math.max(0,r-i)/1e3)}e.cacheSize.set({cache:"backoff"},n);for(const[u,h]of this.topics)e.topicPeersCount.set({topicStr:u},h.size);for(const[u,h]of this.mesh)e.meshPeerCounts.set({topicStr:u},h.size);const o=[],s=new Map;e.behaviourPenalty.reset();for(const u of this.peers.keys()){var a,c;const t=this.score.score(u);o.push(t),s.set(u,t),e.behaviourPenalty.observe(null!==(a=null===(c=this.score.peerStats.get(u))||void 0===c?void 0:c.behaviourPenalty)&&void 0!==a?a:0)}e.registerScores(o,this.opts.scoreThresholds),e.registerScorePerMesh(this.mesh,s);const l=function(e,t,r,n,i){const o={byTopic:new Map,p5w:[],p6w:[],p7w:[],score:[]};for(const s of e){const e=t.get(s);if(e){const t=lw(s,e,r,n,i);for(const[e,r]of t.byTopic){let t=o.byTopic.get(e);t||(t={p1w:[],p2w:[],p3w:[],p3bw:[],p4w:[]},o.byTopic.set(e,t)),t.p1w.push(r.p1w),t.p2w.push(r.p2w),t.p3w.push(r.p3w),t.p3bw.push(r.p3bw),t.p4w.push(r.p4w)}o.p5w.push(t.p5w),o.p6w.push(t.p6w),o.p7w.push(t.p7w),o.score.push(t.score)}else o.p5w.push(0),o.p6w.push(0),o.p7w.push(0),o.score.push(0)}return o}(this.peers.keys(),this.score.peerStats,this.score.params,this.score.peerIPs,e.topicStrToLabel);e.registerScoreWeights(l)}}kw.multicodec=wb;function Cw(e){return new Promise((t=>{setTimeout(t,e)}))}const xw=["/vac/waku/relay/2.0.0"],Iw=Ue("waku:relay");function Rw(e,t){const r=performance.now();Iw("validating message from ".concat(e," received on ").concat(t.topic));let n=Cb.Accept;try{const e=se.decode(t.data);e.contentTopic&&e.contentTopic.length&&e.payload&&e.payload.length||(n=Cb.Reject)}catch(o){n=Cb.Reject}const i=performance.now();return Iw("Validation time (must be <100ms): ".concat(i-r,"ms")),n}const Pw=Ue("waku:message:topic-only");class Tw{constructor(e,t){(0,W.Z)(this,"pubSubTopic",void 0),(0,W.Z)(this,"proto",void 0),(0,W.Z)(this,"payload",new Uint8Array),(0,W.Z)(this,"rateLimitProof",void 0),(0,W.Z)(this,"timestamp",void 0),(0,W.Z)(this,"meta",void 0),(0,W.Z)(this,"ephemeral",void 0),this.pubSubTopic=e,this.proto=t}get contentTopic(){return this.proto.contentTopic}}class Nw{constructor(){(0,W.Z)(this,"contentTopic","")}fromWireToProtoObj(e){const t=de.decode(e);return Pw("Message decoded",t),Promise.resolve({contentTopic:t.contentTopic,payload:new Uint8Array,rateLimitProof:void 0,timestamp:void 0,meta:void 0,version:void 0,ephemeral:void 0})}async fromProtoObj(e,t){return new Tw(e,t)}}const Dw=Ue("waku:relay");class Ow{constructor(e,t){var r;if((0,W.Z)(this,"pubSubTopic",void 0),(0,W.Z)(this,"defaultDecoder",void 0),(0,W.Z)(this,"gossipSub",void 0),(0,W.Z)(this,"observers",void 0),!this.isRelayPubSub(e.services.pubsub))throw Error("Failed to initialize Relay. libp2p.pubsub does not support ".concat(Ow.multicodec));this.gossipSub=e.services.pubsub,this.pubSubTopic=null!==(r=null===t||void 0===t?void 0:t.pubSubTopic)&&void 0!==r?r:"/waku/2/default-waku/proto",this.gossipSub.isStarted()&&this.gossipSubSubscribe(this.pubSubTopic),this.observers=new Map,this.defaultDecoder=new Nw}async start(){if(this.gossipSub.isStarted())throw Error("GossipSub already started.");await this.gossipSub.start(),this.gossipSubSubscribe(this.pubSubTopic)}async send(e,t){if(t.payload.length/1048576>1)return Dw("Failed to send waku relay: message is bigger that 1MB"),{recipients:[],error:mi.SIZE_TOO_BIG};const r=await e.toWire(t);return r?this.gossipSub.publish(this.pubSubTopic,r):(Dw("Failed to encode message, aborting publish"),{recipients:[],error:mi.ENCODE_FAILED})}subscribe(e,t){const r=Array.isArray(e)?Mw(e,t):Mw([e],t);for(const n of r.keys()){const e=this.observers.get(n)||new Set,t=r.get(n)||new Set;this.observers.set(n,Bw(e,t))}return()=>{for(const e of r.keys()){const t=Lw(this.observers.get(e)||new Set,r.get(e)||new Set);t.size?this.observers.set(e,t):this.observers.delete(e)}}}toSubscriptionIterator(e,t){return async function(e,t,r,n){var i,o;const s=null!==(i=null===n||void 0===n?void 0:n.iteratorDelay)&&void 0!==i?i:60,a=[];let c;c=await e.subscribe(t,(e=>{a.push(e)}),r);const l=Number.isInteger(null===n||void 0===n?void 0:n.timeoutMs),u=null!==(o=null===n||void 0===n?void 0:n.timeoutMs)&&void 0!==o?o:0,h=Date.now();return{iterator:async function*(){for(;;){if(l&&Date.now()-h>=u)return;await Cw(s);const e=a.shift();if(!c&&0===a.length)return e;!e&&c||(yield e)}}(),async stop(){c&&(await c(),c=void 0)}}}(this,e,t)}getActiveSubscriptions(){const e=new Map;return e.set(this.pubSubTopic,this.observers.keys()),e}getMeshPeers(e){return this.gossipSub.getMeshPeers(null!==e&&void 0!==e?e:this.pubSubTopic)}async processIncomingMessage(e,t){const r=await this.defaultDecoder.fromWireToProtoObj(t);if(!r||!r.contentTopic)return void Dw("Message does not have a content topic, skipping");const n=this.observers.get(r.contentTopic);n&&await Promise.all(Array.from(n).map((n=>{let{decoder:i,callback:o}=n;return(async()=>{try{const n=await i.fromWireToProtoObj(t);if(!n)return void Dw("Internal error: message previously decoded failed on 2nd pass.");const s=await i.fromProtoObj(e,n);s?await o(s):Dw("Failed to decode messages on",r.contentTopic)}catch(n){Dw("Error while decoding message:",n)}})()})))}gossipSubSubscribe(e){this.gossipSub.addEventListener("gossipsub:message",(t=>{t.detail.msg.topic===e&&(Dw("Message received on ".concat(e)),this.processIncomingMessage(t.detail.msg.topic,t.detail.msg.data).catch((e=>Dw("Failed to process incoming message",e))))})),this.gossipSub.topicValidators.set(e,Rw),this.gossipSub.subscribe(e)}isRelayPubSub(e){var t;return(null===e||void 0===e||null===(t=e.multicodecs)||void 0===t?void 0:t.includes(Ow.multicodec))||!1}}function Mw(e,t){const r=Array.from(function(e){const t=new Map;return e.forEach((e=>{let r=t.get(e.contentTopic);r||(t.set(e.contentTopic,[]),r=t.get(e.contentTopic)),r.push(e)})),t}(e).entries()),n=r.map((e=>{let[r,n]=e;return[r,new Set(n.map((e=>({decoder:e,callback:t}))))]}));return new Map(n)}function Bw(e,t){for(const r of t.values())e.add(r);return e}function Lw(e,t){for(const r of t.values())e.has(r)&&e.delete(r);return e}function Uw(e,t){_i(e,t),t.add(e)}function Fw(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}(0,W.Z)(Ow,"multicodec",xw[0]);var jw=__webpack_require__(8041);const zw=Symbol.for("@libp2p/content-routing"),Kw=Symbol.for("@libp2p/peer-routing");let qw,Zw=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:21;return crypto.getRandomValues(new Uint8Array(e)).reduce(((e,t)=>e+=(t&=63)<36?t.toString(36):t<62?(t-26).toString(36).toUpperCase():t>62?"-":"_"),"")};const Vw="/",Hw=(new TextEncoder).encode(Vw),Ww=Hw[0];qw=Symbol.toStringTag;class Gw{constructor(e,t){if((0,W.Z)(this,"_buf",void 0),"string"===typeof e)this._buf=xn(e);else{if(!(e instanceof Uint8Array))throw new Error("Invalid key, should be String of Uint8Array");this._buf=e}if(null==t&&(t=!0),t&&this.clean(),0===this._buf.byteLength||this._buf[0]!==Ww)throw new Error("Invalid key")}toString(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"utf8";return In(this._buf,e)}uint8Array(){return this._buf}get[qw](){return"Key(".concat(this.toString(),")")}static withNamespaces(e){return new Gw(e.join(Vw))}static random(){return new Gw(Zw().replace(/-/g,""))}static asKey(e){return e instanceof Uint8Array||"string"===typeof e?new Gw(e):"function"===typeof e.uint8Array?new Gw(e.uint8Array()):null}clean(){if(null!=this._buf&&0!==this._buf.byteLength||(this._buf=Hw),this._buf[0]!==Ww){const e=new Uint8Array(this._buf.byteLength+1);e.fill(Ww,0,1),e.set(this._buf,1),this._buf=e}for(;this._buf.byteLength>1&&this._buf[this._buf.byteLength-1]===Ww;)this._buf=this._buf.subarray(0,-1)}less(e){const t=this.list(),r=e.list();for(let n=0;n<t.length;n++){if(r.length<n+1)return!1;const e=t[n],i=r[n];if(e<i)return!0;if(e>i)return!1}return t.length<r.length}reverse(){return Gw.withNamespaces(this.list().slice().reverse())}namespaces(){return this.list()}baseNamespace(){const e=this.namespaces();return e[e.length-1]}list(){return this.toString().split(Vw).slice(1)}type(){return function(e){const t=e.split(":");if(t.length<2)return"";return t.slice(0,-1).join(":")}(this.baseNamespace())}name(){return function(e){const t=e.split(":");return t[t.length-1]}(this.baseNamespace())}instance(e){return new Gw(this.toString()+":"+e)}path(){let e=this.parent().toString();return e.endsWith(Vw)||(e+=Vw),e+=this.type(),new Gw(e)}parent(){const e=this.list();return 1===e.length?new Gw(Vw):new Gw(e.slice(0,-1).join(Vw))}child(e){return this.toString()===Vw?e:e.toString()===Vw?this:new Gw(this.toString()+e.toString(),!1)}isAncestorOf(e){return e.toString()!==this.toString()&&e.toString().startsWith(this.toString())}isDecendantOf(e){return e.toString()!==this.toString()&&this.toString().startsWith(e.toString())}isTopLevel(){return 1===this.list().length}concat(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Gw.withNamespaces([...this.namespaces(),...(n=t.map((e=>e.namespaces())),[].concat(...n))]);var n}}const Yw=__webpack_require__(308);var Qw,Jw=__webpack_require__(9593);!function(e){e.ERR_INVALID_PARAMETERS="ERR_INVALID_PARAMETERS",e.ERR_INVALID_KEY_NAME="ERR_INVALID_KEY_NAME",e.ERR_INVALID_KEY_TYPE="ERR_INVALID_KEY_TYPE",e.ERR_KEY_ALREADY_EXISTS="ERR_KEY_ALREADY_EXISTS",e.ERR_INVALID_KEY_SIZE="ERR_INVALID_KEY_SIZE",e.ERR_KEY_NOT_FOUND="ERR_KEY_NOT_FOUND",e.ERR_OLD_KEY_NAME_INVALID="ERR_OLD_KEY_NAME_INVALID",e.ERR_NEW_KEY_NAME_INVALID="ERR_NEW_KEY_NAME_INVALID",e.ERR_PASSWORD_REQUIRED="ERR_PASSWORD_REQUIRED",e.ERR_PEM_REQUIRED="ERR_PEM_REQUIRED",e.ERR_CANNOT_READ_KEY="ERR_CANNOT_READ_KEY",e.ERR_MISSING_PRIVATE_KEY="ERR_MISSING_PRIVATE_KEY",e.ERR_INVALID_OLD_PASS_TYPE="ERR_INVALID_OLD_PASS_TYPE",e.ERR_INVALID_NEW_PASS_TYPE="ERR_INVALID_NEW_PASS_TYPE",e.ERR_INVALID_PASS_LENGTH="ERR_INVALID_PASS_LENGTH"}(Qw||(Qw={}));const Xw=Dp("libp2p:keychain"),$w="/info/",eE=new WeakMap,tE=14,rE=16,nE=1e3,iE={dek:{keyLength:64,iterationCount:1e4,salt:"you should override this value with a crypto secure random number",hash:"sha2-512"}};function oE(e){return null!=e&&("string"===typeof e&&(e===Jw(e.trim())&&e.length>0))}async function sE(){const e=800*Math.random()+200;await new Promise((t=>setTimeout(t,e)))}function aE(e){return new Gw("/pkcs8/"+e)}function cE(e){return new Gw($w+e)}class lE{constructor(e,t){var r,n,i,o,s,a,c,l,u,h;if((0,W.Z)(this,"components",void 0),(0,W.Z)(this,"init",void 0),this.components=e,this.init=Yw(iE,t),null!=this.init.pass&&(null===(r=this.init.pass)||void 0===r?void 0:r.length)<20)throw new Error("pass must be least 20 characters");if(null!=(null===(n=this.init.dek)||void 0===n?void 0:n.keyLength)&&this.init.dek.keyLength<tE)throw new Error("dek.keyLength must be least ".concat(tE," bytes"));if(null!=(null===(i=this.init.dek)||void 0===i||null===(o=i.salt)||void 0===o?void 0:o.length)&&this.init.dek.salt.length<rE)throw new Error("dek.saltLength must be least ".concat(rE," bytes"));if(null!=(null===(s=this.init.dek)||void 0===s?void 0:s.iterationCount)&&this.init.dek.iterationCount<nE)throw new Error("dek.iterationCount must be least ".concat(nE));const d=null!=this.init.pass&&null!=(null===(a=this.init.dek)||void 0===a?void 0:a.salt)?ow(this.init.pass,null===(c=this.init.dek)||void 0===c?void 0:c.salt,null===(l=this.init.dek)||void 0===l?void 0:l.iterationCount,null===(u=this.init.dek)||void 0===u?void 0:u.keyLength,null===(h=this.init.dek)||void 0===h?void 0:h.hash):"";eE.set(this,{dek:d})}static generateOptions(){const e=Object.assign({},iE),t=3*Math.ceil(rE/3);return e.dek.salt=In($d(t),"base64"),e}static get options(){return iE}async createKey(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2048;if(!oE(e)||"self"===e)throw await sE(),new zu("Invalid key name",Qw.ERR_INVALID_KEY_NAME);if("string"!==typeof t)throw await sE(),new zu("Invalid key type",Qw.ERR_INVALID_KEY_TYPE);const n=aE(e);if(await this.components.datastore.has(n))throw await sE(),new zu("Key name already exists",Qw.ERR_KEY_ALREADY_EXISTS);if("rsa"===t.toLowerCase())if(!Number.isSafeInteger(r)||r<2048)throw await sE(),new zu("Invalid RSA key size",Qw.ERR_INVALID_KEY_SIZE);let i;try{const o=await Ef(t,r),s=await o.id(),a=eE.get(this);if(null==a)throw new zu("dek missing",Qw.ERR_INVALID_PARAMETERS);const c=a.dek,l=await o.export(c);i={name:e,id:s};const u=this.components.datastore.batch();u.put(n,xn(l)),u.put(cE(e),xn(JSON.stringify(i))),await u.commit()}catch(o){throw await sE(),o}return i}async listKeys(){const e={prefix:$w},t=[];for await(const r of this.components.datastore.query(e))t.push(JSON.parse(In(r.value)));return t}async findKeyById(e){try{const t=(await this.listKeys()).find((t=>t.id===e));if(null==t)throw new zu("Key with id '".concat(e,"' does not exist."),Qw.ERR_KEY_NOT_FOUND);return t}catch(t){throw await sE(),t}}async findKeyByName(e){if(!oE(e))throw await sE(),new zu("Invalid key name '".concat(e,"'"),Qw.ERR_INVALID_KEY_NAME);const t=cE(e);try{const e=await this.components.datastore.get(t);return JSON.parse(In(e))}catch(r){throw await sE(),Xw.error(r),new zu("Key '".concat(e,"' does not exist."),Qw.ERR_KEY_NOT_FOUND)}}async removeKey(e){if(!oE(e)||"self"===e)throw await sE(),new zu("Invalid key name '".concat(e,"'"),Qw.ERR_INVALID_KEY_NAME);const t=aE(e),r=await this.findKeyByName(e),n=this.components.datastore.batch();return n.delete(t),n.delete(cE(e)),await n.commit(),r}async renameKey(e,t){if(!oE(e)||"self"===e)throw await sE(),new zu("Invalid old key name '".concat(e,"'"),Qw.ERR_OLD_KEY_NAME_INVALID);if(!oE(t)||"self"===t)throw await sE(),new zu("Invalid new key name '".concat(t,"'"),Qw.ERR_NEW_KEY_NAME_INVALID);const r=aE(e),n=aE(t),i=cE(e),o=cE(t);if(await this.components.datastore.has(n))throw await sE(),new zu("Key '".concat(t,"' already exists"),Qw.ERR_KEY_ALREADY_EXISTS);try{const e=await this.components.datastore.get(r),s=await this.components.datastore.get(i),a=JSON.parse(In(s));a.name=t;const c=this.components.datastore.batch();return c.put(n,e),c.put(o,xn(JSON.stringify(a))),c.delete(r),c.delete(i),await c.commit(),a}catch(s){throw await sE(),s}}async exportKey(e,t){if(!oE(e))throw await sE(),new zu("Invalid key name '".concat(e,"'"),Qw.ERR_INVALID_KEY_NAME);if(null==t)throw await sE(),new zu("Password is required",Qw.ERR_PASSWORD_REQUIRED);const r=aE(e);try{const e=In(await this.components.datastore.get(r)),n=eE.get(this);if(null==n)throw new zu("dek missing",Qw.ERR_INVALID_PARAMETERS);const i=n.dek,o=await kf(e,i);return await o.export(t)}catch(n){throw await sE(),n}}async exportPeerId(e){const t="temporary-password",r=await this.exportKey(e,t),n=await kf(r,t);return Ap(n.public.bytes,n.bytes)}async importKey(e,t,r){if(!oE(e)||"self"===e)throw await sE(),new zu("Invalid key name '".concat(e,"'"),Qw.ERR_INVALID_KEY_NAME);if(null==t)throw await sE(),new zu("PEM encoded key is required",Qw.ERR_PEM_REQUIRED);const n=aE(e);if(await this.components.datastore.has(n))throw await sE(),new zu("Key '".concat(e,"' already exists"),Qw.ERR_KEY_ALREADY_EXISTS);let i,o;try{i=await kf(t,r)}catch(c){throw await sE(),new zu("Cannot read the key, most likely the password is wrong",Qw.ERR_CANNOT_READ_KEY)}try{o=await i.id();const e=eE.get(this);if(null==e)throw new zu("dek missing",Qw.ERR_INVALID_PARAMETERS);const r=e.dek;t=await i.export(r)}catch(c){throw await sE(),c}const s={name:e,id:o},a=this.components.datastore.batch();return a.put(n,xn(t)),a.put(cE(e),xn(JSON.stringify(s))),await a.commit(),s}async importPeer(e,t){try{if(!oE(e))throw new zu("Invalid key name '".concat(e,"'"),Qw.ERR_INVALID_KEY_NAME);if(null==t)throw new zu("PeerId is required",Qw.ERR_MISSING_PRIVATE_KEY);if(null==t.privateKey)throw new zu("PeerId.privKey is required",Qw.ERR_MISSING_PRIVATE_KEY);const r=await Af(t.privateKey),n=aE(e);if(await this.components.datastore.has(n))throw await sE(),new zu("Key '".concat(e,"' already exists"),Qw.ERR_KEY_ALREADY_EXISTS);const i=eE.get(this);if(null==i)throw new zu("dek missing",Qw.ERR_INVALID_PARAMETERS);const o=i.dek,s=await r.export(o),a={name:e,id:t.toString()},c=this.components.datastore.batch();return c.put(n,xn(s)),c.put(cE(e),xn(JSON.stringify(a))),await c.commit(),a}catch(r){throw await sE(),r}}async getPrivateKey(e){if(!oE(e))throw await sE(),new zu("Invalid key name '".concat(e,"'"),Qw.ERR_INVALID_KEY_NAME);try{const t=aE(e);return In(await this.components.datastore.get(t))}catch(t){throw await sE(),Xw.error(t),new zu("Key '".concat(e,"' does not exist."),Qw.ERR_KEY_NOT_FOUND)}}async rotateKeychainPass(e,t){var r,n,i,o;if("string"!==typeof e)throw await sE(),new zu("Invalid old pass type '".concat(typeof e,"'"),Qw.ERR_INVALID_OLD_PASS_TYPE);if("string"!==typeof t)throw await sE(),new zu("Invalid new pass type '".concat(typeof t,"'"),Qw.ERR_INVALID_NEW_PASS_TYPE);if(t.length<20)throw await sE(),new zu("Invalid pass length ".concat(t.length),Qw.ERR_INVALID_PASS_LENGTH);Xw("recreating keychain");const s=eE.get(this);if(null==s)throw new zu("dek missing",Qw.ERR_INVALID_PARAMETERS);const a=s.dek;this.init.pass=t;const c=null!=t&&null!=(null===(r=this.init.dek)||void 0===r?void 0:r.salt)?ow(t,this.init.dek.salt,null===(n=this.init.dek)||void 0===n?void 0:n.iterationCount,null===(i=this.init.dek)||void 0===i?void 0:i.keyLength,null===(o=this.init.dek)||void 0===o?void 0:o.hash):"";eE.set(this,{dek:c});const l=await this.listKeys();for(const u of l){const e=In(await this.components.datastore.get(aE(u.name))),t=await kf(e,a),r=c.toString(),n=await t.export(r),i=this.components.datastore.batch(),o={name:u.name,id:u.id};i.put(aE(u.name),xn(n)),i.put(cE(u.name),xn(JSON.stringify(o))),await i.commit()}Xw("keychain reconstructed")}}function uE(e,t){const r={[Symbol.iterator]:()=>r,next:()=>{const r=e.next(),n=r.value;if(!0===r.done||null==n){return{done:!0,value:void 0}}return{done:!1,value:t(n)}}};return r}let hE,dE,fE;hE=Symbol.iterator;class pE{constructor(e){if((0,W.Z)(this,"map",void 0),this.map=new Map,null!=e)for(const[t,r]of e.entries())this.map.set(t.toString(),r)}[hE](){return this.entries()}clear(){this.map.clear()}delete(e){this.map.delete(e.toString())}entries(){return uE(this.map.entries(),(e=>[Sp(e[0]),e[1]]))}forEach(e){this.map.forEach(((t,r)=>{e(t,Sp(r),this)}))}get(e){return this.map.get(e.toString())}has(e){return this.map.has(e.toString())}set(e,t){this.map.set(e.toString(),t)}keys(){return uE(this.map.keys(),(e=>Sp(e)))}values(){return this.map.values()}get size(){return this.map.size}}dE=Symbol.iterator;class gE{constructor(e){if((0,W.Z)(this,"set",void 0),this.set=new Set,null!=e)for(const t of e)this.set.add(t.toString())}get size(){return this.set.size}[dE](){return this.values()}add(e){this.set.add(e.toString())}clear(){this.set.clear()}delete(e){this.set.delete(e.toString())}entries(){return uE(this.set.entries(),(e=>{const t=Sp(e[0]);return[t,t]}))}forEach(e){this.set.forEach((t=>{const r=Sp(t);e(r,r,this)}))}has(e){return this.set.has(e.toString())}values(){return uE(this.set.values(),(e=>Sp(e)))}intersection(e){const t=new gE;for(const r of e)this.has(r)&&t.add(r);return t}difference(e){const t=new gE;for(const r of this)e.has(r)||t.add(r);return t}union(e){const t=new gE;for(const r of e)t.add(r);for(const r of this)t.add(r);return t}}fE=Symbol.iterator;var mE;!function(e){let t;e.codec=()=>(null==t&&(t=Le((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!1!==r.lengthDelimited&&t.fork(),null!=e.id&&(t.uint32(10),t.bytes(e.id)),null!=e.pubKey&&(t.uint32(18),t.bytes(e.pubKey)),null!=e.privKey&&(t.uint32(26),t.bytes(e.privKey)),!1!==r.lengthDelimited&&t.ldelim()}),((e,t)=>{const r={},n=null==t?e.len:e.pos+t;for(;e.pos<n;){const t=e.uint32();switch(t>>>3){case 1:r.id=e.bytes();break;case 2:r.pubKey=e.bytes();break;case 3:r.privKey=e.bytes();break;default:e.skipType(7&t)}}return r}))),t),e.encode=t=>ne(t,e.codec()),e.decode=t=>re(t,e.codec())}(mE||(mE={}));async function yE(e){return Ap(_f(e.public),function(e,t){var r;return wf(t=(null!==(r=t)&&void 0!==r?r:"rsa").toLowerCase()),e.bytes}(e))}const vE="ERR_SIGNATURE_NOT_VALID";var bE;!function(e){let t;e.codec=()=>(null==t&&(t=Le((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!1!==r.lengthDelimited&&t.fork(),null!=e.publicKey&&e.publicKey.byteLength>0&&(t.uint32(10),t.bytes(e.publicKey)),null!=e.payloadType&&e.payloadType.byteLength>0&&(t.uint32(18),t.bytes(e.payloadType)),null!=e.payload&&e.payload.byteLength>0&&(t.uint32(26),t.bytes(e.payload)),null!=e.signature&&e.signature.byteLength>0&&(t.uint32(42),t.bytes(e.signature)),!1!==r.lengthDelimited&&t.ldelim()}),((e,t)=>{const r={publicKey:new Uint8Array(0),payloadType:new Uint8Array(0),payload:new Uint8Array(0),signature:new Uint8Array(0)},n=null==t?e.len:e.pos+t;for(;e.pos<n;){const t=e.uint32();switch(t>>>3){case 1:r.publicKey=e.bytes();break;case 2:r.payloadType=e.bytes();break;case 3:r.payload=e.bytes();break;case 5:r.signature=e.bytes();break;default:e.skipType(7&t)}}return r}))),t),e.encode=t=>ne(t,e.codec()),e.decode=t=>re(t,e.codec())}(bE||(bE={}));class wE{constructor(e){(0,W.Z)(this,"peerId",void 0),(0,W.Z)(this,"payloadType",void 0),(0,W.Z)(this,"payload",void 0),(0,W.Z)(this,"signature",void 0),(0,W.Z)(this,"marshaled",void 0);const{peerId:t,payloadType:r,payload:n,signature:i}=e;this.peerId=t,this.payloadType=r,this.payload=n,this.signature=i}marshal(){if(null==this.peerId.publicKey)throw new Error("Missing public key");return null==this.marshaled&&(this.marshaled=bE.encode({publicKey:this.peerId.publicKey,payloadType:this.payloadType,payload:this.payload.subarray(),signature:this.signature})),this.marshaled}equals(e){return wi(this.marshal(),e.marshal())}async validate(e){const t=EE(e,this.payloadType,this.payload);if(null==this.peerId.publicKey)throw new Error("Missing public key");return Sf(this.peerId.publicKey).verify(t.subarray(),this.signature)}}(0,W.Z)(wE,"createFromProtobuf",(async e=>{const t=bE.decode(e),r=await Ap(t.publicKey);return new wE({peerId:r,payloadType:t.payloadType,payload:t.payload,signature:t.signature})})),(0,W.Z)(wE,"seal",(async(e,t)=>{if(null==t.privateKey)throw new Error("Missing private key");const r=e.domain,n=e.codec,i=e.marshal(),o=EE(r,n,i),s=await Af(t.privateKey),a=await s.sign(o.subarray());return new wE({peerId:t,payloadType:n,payload:i,signature:a})})),(0,W.Z)(wE,"openAndCertify",(async(e,t)=>{const r=await wE.createFromProtobuf(e);if(!await r.validate(t))throw new zu("envelope signature is not valid for the given domain",vE);return r}));const EE=(e,t,r)=>{const n=xn(e),i=ka.encode(n.byteLength),o=ka.encode(t.length),s=ka.encode(r.length);return new da(i,n,o,t,s,r)};const SE=Uint8Array.from([3,1]);var _E;!function(e){let t,r;!function(e){let t;e.codec=()=>(null==t&&(t=Le((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!1!==r.lengthDelimited&&t.fork(),null!=e.multiaddr&&e.multiaddr.byteLength>0&&(t.uint32(10),t.bytes(e.multiaddr)),!1!==r.lengthDelimited&&t.ldelim()}),((e,t)=>{const r={multiaddr:new Uint8Array(0)},n=null==t?e.len:e.pos+t;for(;e.pos<n;){const t=e.uint32();if(t>>>3===1)r.multiaddr=e.bytes();else e.skipType(7&t)}return r}))),t),e.encode=t=>ne(t,e.codec()),e.decode=t=>re(t,e.codec())}(t=e.AddressInfo||(e.AddressInfo={})),e.codec=()=>(null==r&&(r=Le((function(t,r){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!1!==n.lengthDelimited&&r.fork(),null!=t.peerId&&t.peerId.byteLength>0&&(r.uint32(10),r.bytes(t.peerId)),null!=t.seq&&0n!==t.seq&&(r.uint32(16),r.uint64(t.seq)),null!=t.addresses)for(const i of t.addresses)r.uint32(26),e.AddressInfo.codec().encode(i,r);!1!==n.lengthDelimited&&r.ldelim()}),((t,r)=>{const n={peerId:new Uint8Array(0),seq:0n,addresses:[]},i=null==r?t.len:t.pos+r;for(;t.pos<i;){const r=t.uint32();switch(r>>>3){case 1:n.peerId=t.bytes();break;case 2:n.seq=t.uint64();break;case 3:n.addresses.push(e.AddressInfo.codec().decode(t,t.uint32()));break;default:t.skipType(7&r)}}return n}))),r),e.encode=t=>ne(t,e.codec()),e.decode=t=>re(t,e.codec())}(_E||(_E={}));class AE{constructor(e){(0,W.Z)(this,"peerId",void 0),(0,W.Z)(this,"multiaddrs",void 0),(0,W.Z)(this,"seqNumber",void 0),(0,W.Z)(this,"domain",AE.DOMAIN),(0,W.Z)(this,"codec",AE.CODEC),(0,W.Z)(this,"marshaled",void 0);const{peerId:t,multiaddrs:r,seqNumber:n}=e;this.peerId=t,this.multiaddrs=null!==r&&void 0!==r?r:[],this.seqNumber=null!==n&&void 0!==n?n:BigInt(Date.now())}marshal(){return null==this.marshaled&&(this.marshaled=_E.encode({peerId:this.peerId.toBytes(),seq:BigInt(this.seqNumber),addresses:this.multiaddrs.map((e=>({multiaddr:e.bytes})))})),this.marshaled}equals(e){return e instanceof AE&&(!!this.peerId.equals(e.peerId)&&(this.seqNumber===e.seqNumber&&!!function(e,t){const r=(e,t)=>e.toString().localeCompare(t.toString());return e.length===t.length&&(t.sort(r),e.sort(r).every(((e,r)=>t[r].equals(e))))}(this.multiaddrs,e.multiaddrs)))}}(0,W.Z)(AE,"createFromProtobuf",(e=>{var t;const r=_E.decode(e),n=_p(r.peerId),i=(null!==(t=r.addresses)&&void 0!==t?t:[]).map((e=>Xs(e.multiaddr))),o=r.seq;return new AE({peerId:n,multiaddrs:i,seqNumber:o})})),(0,W.Z)(AE,"DOMAIN","libp2p-peer-record"),(0,W.Z)(AE,"CODEC",SE);const kE=function(e){if(null!=e[Symbol.asyncIterator])return(async()=>{const t=[];for await(const r of e)t.push(r);return t})();const t=[];for(const r of e)t.push(r);return t};var CE=__webpack_require__(548);class xE extends Error{constructor(e){super(e),this.name="TimeoutError"}}class IE extends Error{constructor(e){super(),this.name="AbortError",this.message=e}}const RE=e=>void 0===globalThis.DOMException?new IE(e):new DOMException(e),PE=e=>{const t=void 0===e.reason?RE("This operation was aborted."):e.reason;return t instanceof Error?t:RE(t)};var TE,NE=function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"===typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};class DE{constructor(){TE.set(this,[])}enqueue(e,t){const r={priority:(t={priority:0,...t}).priority,run:e};if(this.size&&NE(this,TE,"f")[this.size-1].priority>=t.priority)return void NE(this,TE,"f").push(r);const n=function(e,t,r){let n=0,i=e.length;for(;i>0;){const o=Math.trunc(i/2);let s=n+o;r(e[s],t)<=0?(n=++s,i-=o+1):i=o}return n}(NE(this,TE,"f"),r,((e,t)=>t.priority-e.priority));NE(this,TE,"f").splice(n,0,r)}dequeue(){const e=NE(this,TE,"f").shift();return null===e||void 0===e?void 0:e.run}filter(e){return NE(this,TE,"f").filter((t=>t.priority===e.priority)).map((e=>e.run))}get size(){return NE(this,TE,"f").length}}TE=new WeakMap;var OE,ME,BE,LE,UE,FE,jE,zE,KE,qE,ZE,VE,HE,WE,GE,YE,QE,JE,XE,$E,eS,tS,rS,nS,iS,oS,sS=function(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"===typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r},aS=function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"===typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};class cS extends Error{}class lS extends CE{constructor(e){var t,r,n,i;if(super(),OE.add(this),ME.set(this,void 0),BE.set(this,void 0),LE.set(this,0),UE.set(this,void 0),FE.set(this,void 0),jE.set(this,0),zE.set(this,void 0),KE.set(this,void 0),qE.set(this,void 0),ZE.set(this,void 0),VE.set(this,0),HE.set(this,void 0),WE.set(this,void 0),GE.set(this,void 0),Object.defineProperty(this,"timeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),!("number"===typeof(e={carryoverConcurrencyCount:!1,intervalCap:Number.POSITIVE_INFINITY,interval:0,concurrency:Number.POSITIVE_INFINITY,autoStart:!0,queueClass:DE,...e}).intervalCap&&e.intervalCap>=1))throw new TypeError("Expected `intervalCap` to be a number from 1 and up, got `".concat(null!==(r=null===(t=e.intervalCap)||void 0===t?void 0:t.toString())&&void 0!==r?r:"","` (").concat(typeof e.intervalCap,")"));if(void 0===e.interval||!(Number.isFinite(e.interval)&&e.interval>=0))throw new TypeError("Expected `interval` to be a finite number >= 0, got `".concat(null!==(i=null===(n=e.interval)||void 0===n?void 0:n.toString())&&void 0!==i?i:"","` (").concat(typeof e.interval,")"));sS(this,ME,e.carryoverConcurrencyCount,"f"),sS(this,BE,e.intervalCap===Number.POSITIVE_INFINITY||0===e.interval,"f"),sS(this,UE,e.intervalCap,"f"),sS(this,FE,e.interval,"f"),sS(this,qE,new e.queueClass,"f"),sS(this,ZE,e.queueClass,"f"),this.concurrency=e.concurrency,this.timeout=e.timeout,sS(this,GE,!0===e.throwOnTimeout,"f"),sS(this,WE,!1===e.autoStart,"f")}get concurrency(){return aS(this,HE,"f")}set concurrency(e){if(!("number"===typeof e&&e>=1))throw new TypeError("Expected `concurrency` to be a number from 1 and up, got `".concat(e,"` (").concat(typeof e,")"));sS(this,HE,e,"f"),aS(this,OE,"m",nS).call(this)}async add(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t={timeout:this.timeout,throwOnTimeout:aS(this,GE,"f"),...t},new Promise(((r,n)=>{aS(this,qE,"f").enqueue((async()=>{var i,o,s;sS(this,VE,(o=aS(this,VE,"f"),++o),"f"),sS(this,LE,(s=aS(this,LE,"f"),++s),"f");try{if(null===(i=t.signal)||void 0===i?void 0:i.aborted)throw new cS("The task was aborted.");let n=e({signal:t.signal});t.timeout&&(n=function(e,t,r,n){let i;const o=new Promise(((o,s)=>{if("number"!==typeof t||1!==Math.sign(t))throw new TypeError("Expected `milliseconds` to be a positive number, got `".concat(t,"`"));if(t!==Number.POSITIVE_INFINITY){if((n={customTimers:{setTimeout:setTimeout,clearTimeout:clearTimeout},...n}).signal){const{signal:e}=n;e.aborted&&s(PE(e)),e.addEventListener("abort",(()=>{s(PE(e))}))}i=n.customTimers.setTimeout.call(void 0,(()=>{if("function"===typeof r){try{o(r())}catch(a){s(a)}return}const n="string"===typeof r?r:"Promise timed out after ".concat(t," milliseconds"),i=r instanceof Error?r:new xE(n);"function"===typeof e.cancel&&e.cancel(),s(i)}),t),(async()=>{try{o(await e)}catch(t){s(t)}finally{n.customTimers.clearTimeout.call(void 0,i)}})()}else o(e)}));return o.clear=()=>{clearTimeout(i),i=void 0},o}(Promise.resolve(n),t.timeout)),t.signal&&(n=Promise.race([n,aS(this,OE,"m",iS).call(this,t.signal)]));const o=await n;r(o),this.emit("completed",o)}catch(a){if(a instanceof xE&&!t.throwOnTimeout)return void r();n(a),this.emit("error",a)}finally{aS(this,OE,"m",JE).call(this)}}),t),this.emit("add"),aS(this,OE,"m",eS).call(this)}))}async addAll(e,t){return Promise.all(e.map((async e=>this.add(e,t))))}start(){return aS(this,WE,"f")?(sS(this,WE,!1,"f"),aS(this,OE,"m",nS).call(this),this):this}pause(){sS(this,WE,!0,"f")}clear(){sS(this,qE,new(aS(this,ZE,"f")),"f")}async onEmpty(){0!==aS(this,qE,"f").size&&await aS(this,OE,"m",oS).call(this,"empty")}async onSizeLessThan(e){aS(this,qE,"f").size<e||await aS(this,OE,"m",oS).call(this,"next",(()=>aS(this,qE,"f").size<e))}async onIdle(){0===aS(this,VE,"f")&&0===aS(this,qE,"f").size||await aS(this,OE,"m",oS).call(this,"idle")}get size(){return aS(this,qE,"f").size}sizeBy(e){return aS(this,qE,"f").filter(e).length}get pending(){return aS(this,VE,"f")}get isPaused(){return aS(this,WE,"f")}}ME=new WeakMap,BE=new WeakMap,LE=new WeakMap,UE=new WeakMap,FE=new WeakMap,jE=new WeakMap,zE=new WeakMap,KE=new WeakMap,qE=new WeakMap,ZE=new WeakMap,VE=new WeakMap,HE=new WeakMap,WE=new WeakMap,GE=new WeakMap,OE=new WeakSet,YE=function(){return aS(this,BE,"f")||aS(this,LE,"f")<aS(this,UE,"f")},QE=function(){return aS(this,VE,"f")<aS(this,HE,"f")},JE=function(){var e;sS(this,VE,(e=aS(this,VE,"f"),--e),"f"),aS(this,OE,"m",eS).call(this),this.emit("next")},XE=function(){aS(this,OE,"m",rS).call(this),aS(this,OE,"m",tS).call(this),sS(this,KE,void 0,"f")},$E=function(){const e=Date.now();if(void 0===aS(this,zE,"f")){const t=aS(this,jE,"f")-e;if(!(t<0))return void 0===aS(this,KE,"f")&&sS(this,KE,setTimeout((()=>{aS(this,OE,"m",XE).call(this)}),t),"f"),!0;sS(this,LE,aS(this,ME,"f")?aS(this,VE,"f"):0,"f")}return!1},eS=function(){if(0===aS(this,qE,"f").size)return aS(this,zE,"f")&&clearInterval(aS(this,zE,"f")),sS(this,zE,void 0,"f"),this.emit("empty"),0===aS(this,VE,"f")&&this.emit("idle"),!1;if(!aS(this,WE,"f")){const e=!aS(this,OE,"a",$E);if(aS(this,OE,"a",YE)&&aS(this,OE,"a",QE)){const t=aS(this,qE,"f").dequeue();return!!t&&(this.emit("active"),t(),e&&aS(this,OE,"m",tS).call(this),!0)}}return!1},tS=function(){aS(this,BE,"f")||void 0!==aS(this,zE,"f")||(sS(this,zE,setInterval((()=>{aS(this,OE,"m",rS).call(this)}),aS(this,FE,"f")),"f"),sS(this,jE,Date.now()+aS(this,FE,"f"),"f"))},rS=function(){0===aS(this,LE,"f")&&0===aS(this,VE,"f")&&aS(this,zE,"f")&&(clearInterval(aS(this,zE,"f")),sS(this,zE,void 0,"f")),sS(this,LE,aS(this,ME,"f")?aS(this,VE,"f"):0,"f"),aS(this,OE,"m",nS).call(this)},nS=function(){for(;aS(this,OE,"m",eS).call(this););},iS=async function(e){return new Promise(((t,r)=>{e.addEventListener("abort",(()=>{r(new cS("The task was aborted."))}),{once:!0})}))},oS=async function(e,t){return new Promise((r=>{const n=()=>{t&&!t()||(this.off(e,n),r())};this.on(e,n)}))};const uS="lock:worker:request-read",hS="lock:worker:release-read",dS="lock:master:grant-read",fS="lock:worker:request-write",pS="lock:worker:release-write",gS="lock:master:grant-write",mS={},yS=e=>{e.addEventListener("message",(t=>{yS.dispatchEvent("message",e,t)})),null!=e.port&&e.port.addEventListener("message",(t=>{yS.dispatchEvent("message",e,t)}))};yS.addEventListener=(e,t)=>{null==mS[e]&&(mS[e]=[]),mS[e].push(t)},yS.removeEventListener=(e,t)=>{null!=mS[e]&&(mS[e]=mS[e].filter((e=>e===t)))},yS.dispatchEvent=function(e,t,r){null!=mS[e]&&mS[e].forEach((e=>e(t,r)))};const vS=yS,bS=(e,t,r,n,i)=>(o,s)=>{if(s.data.type!==r)return;const a={type:s.data.type,name:s.data.name,identifier:s.data.identifier};e.dispatchEvent(new MessageEvent(t,{data:{name:a.name,handler:async()=>(o.postMessage({type:i,name:a.name,identifier:a.identifier}),await new Promise((e=>{const t=r=>{if(null==r||null==r.data)return;const i=r.data.type,s=(r.data.name,r.data.identifier);i===n&&s===a.identifier&&(o.removeEventListener("message",t),e())};o.addEventListener("message",t)})))}}))},wS=(e,t,r,n)=>async()=>{const i=Zw();return globalThis.postMessage({type:t,identifier:i,name:e}),await new Promise((t=>{const o=s=>{if(null==s||null==s.data)return;const a=s.data.type,c=s.data.identifier;a===r&&c===i&&(globalThis.removeEventListener("message",o),t((()=>{globalThis.postMessage({type:n,identifier:i,name:e})})))};globalThis.addEventListener("message",o)}))},ES={singleProcess:!1},SS={};let _S;async function AS(e,t){let r;const n=new Promise((e=>{r=e}));return e.add((async()=>await Cm((async()=>await new Promise((e=>{r((()=>{e()}))})))(),{milliseconds:t.timeout}))),await n}const kS={name:"lock",concurrency:1/0,timeout:846e5,singleProcess:!1};function CS(e){const t=Object.assign({},kS,e);return null==_S&&(_S=(e=>{if(e=Object.assign({},ES,e),Boolean(globalThis.document)||e.singleProcess){const e=new EventTarget;return vS.addEventListener("message",bS(e,"requestReadLock",uS,hS,dS)),vS.addEventListener("message",bS(e,"requestWriteLock",fS,pS,gS)),e}return{isWorker:!0,readLock:e=>wS(e,uS,dS,hS),writeLock:e=>wS(e,fS,gS,pS)}})(t),!0!==_S.isWorker&&(_S.addEventListener("requestReadLock",(e=>{null!=SS[e.data.name]&&SS[e.data.name].readLock().then((async t=>await e.data.handler().finally((()=>t()))))})),_S.addEventListener("requestWriteLock",(async e=>{null!=SS[e.data.name]&&SS[e.data.name].writeLock().then((async t=>await e.data.handler().finally((()=>t()))))})))),null==SS[t.name]&&(SS[t.name]=((e,t)=>{if(!0===_S.isWorker)return{readLock:_S.readLock(e,t),writeLock:_S.writeLock(e,t)};const r=new lS({concurrency:1});let n;return{async readLock(){if(null!=n)return await AS(n,t);n=new lS({concurrency:t.concurrency,autoStart:!1});const e=n,i=AS(n,t);return r.add((async()=>(e.start(),await e.onIdle().then((()=>{n===e&&(n=null)}))))),await i},writeLock:async()=>(n=null,await AS(r,t))}})(t.name,t)),SS[t.name]}const xS="ERR_INVALID_PARAMETERS";var IS,RS,PS;function TS(e,t){var r;const n=IS.decode(t);null!=n.publicKey&&null==e.publicKey&&(e=function(e){if("RSA"===e.type)return new bp(e);if("Ed25519"===e.type)return new wp(e);if("secp256k1"===e.type)return new Ep(e);throw new zu("Not a PeerId","ERR_INVALID_PARAMETERS")}({...e,publicKey:e.publicKey}));const i=new Map,o=BigInt(Date.now());for(const[s,a]of n.tags.entries())null!=a.expiry&&a.expiry<o||i.set(s,a);return{...n,id:e,addresses:n.addresses.map((e=>{let{multiaddr:t,isCertified:r}=e;return{multiaddr:Xs(t),isCertified:null!==r&&void 0!==r&&r}})),metadata:n.metadata,peerRecordEnvelope:null!==(r=n.peerRecordEnvelope)&&void 0!==r?r:void 0,tags:i}}!function(e){let t,r,n;!function(e){let t;e.codec=()=>(null==t&&(t=Le((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!1!==r.lengthDelimited&&t.fork(),null!=e.key&&""!==e.key&&(t.uint32(10),t.string(e.key)),null!=e.value&&e.value.byteLength>0&&(t.uint32(18),t.bytes(e.value)),!1!==r.lengthDelimited&&t.ldelim()}),((e,t)=>{const r={key:"",value:new Uint8Array(0)},n=null==t?e.len:e.pos+t;for(;e.pos<n;){const t=e.uint32();switch(t>>>3){case 1:r.key=e.string();break;case 2:r.value=e.bytes();break;default:e.skipType(7&t)}}return r}))),t),e.encode=t=>ne(t,e.codec()),e.decode=t=>re(t,e.codec())}(t=e.Peer$metadataEntry||(e.Peer$metadataEntry={})),function(e){let t;e.codec=()=>(null==t&&(t=Le((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!1!==r.lengthDelimited&&t.fork(),null!=e.key&&""!==e.key&&(t.uint32(10),t.string(e.key)),null!=e.value&&(t.uint32(18),PS.codec().encode(e.value,t)),!1!==r.lengthDelimited&&t.ldelim()}),((e,t)=>{const r={key:""},n=null==t?e.len:e.pos+t;for(;e.pos<n;){const t=e.uint32();switch(t>>>3){case 1:r.key=e.string();break;case 2:r.value=PS.codec().decode(e,e.uint32());break;default:e.skipType(7&t)}}return r}))),t),e.encode=t=>ne(t,e.codec()),e.decode=t=>re(t,e.codec())}(r=e.Peer$tagsEntry||(e.Peer$tagsEntry={})),e.codec=()=>(null==n&&(n=Le((function(t,r){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!1!==n.lengthDelimited&&r.fork(),null!=t.addresses)for(const e of t.addresses)r.uint32(10),RS.codec().encode(e,r);if(null!=t.protocols)for(const e of t.protocols)r.uint32(18),r.string(e);if(null!=t.publicKey&&(r.uint32(34),r.bytes(t.publicKey)),null!=t.peerRecordEnvelope&&(r.uint32(42),r.bytes(t.peerRecordEnvelope)),null!=t.metadata&&0!==t.metadata.size)for(const[i,o]of t.metadata.entries())r.uint32(50),e.Peer$metadataEntry.codec().encode({key:i,value:o},r);if(null!=t.tags&&0!==t.tags.size)for(const[i,o]of t.tags.entries())r.uint32(58),e.Peer$tagsEntry.codec().encode({key:i,value:o},r);!1!==n.lengthDelimited&&r.ldelim()}),((t,r)=>{const n={addresses:[],protocols:[],metadata:new Map,tags:new Map},i=null==r?t.len:t.pos+r;for(;t.pos<i;){const r=t.uint32();switch(r>>>3){case 1:n.addresses.push(RS.codec().decode(t,t.uint32()));break;case 2:n.protocols.push(t.string());break;case 4:n.publicKey=t.bytes();break;case 5:n.peerRecordEnvelope=t.bytes();break;case 6:{const r=e.Peer$metadataEntry.codec().decode(t,t.uint32());n.metadata.set(r.key,r.value);break}case 7:{const r=e.Peer$tagsEntry.codec().decode(t,t.uint32());n.tags.set(r.key,r.value);break}default:t.skipType(7&r)}}return n}))),n),e.encode=t=>ne(t,e.codec()),e.decode=t=>re(t,e.codec())}(IS||(IS={})),function(e){let t;e.codec=()=>(null==t&&(t=Le((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!1!==r.lengthDelimited&&t.fork(),null!=e.multiaddr&&e.multiaddr.byteLength>0&&(t.uint32(10),t.bytes(e.multiaddr)),null!=e.isCertified&&(t.uint32(16),t.bool(e.isCertified)),!1!==r.lengthDelimited&&t.ldelim()}),((e,t)=>{const r={multiaddr:new Uint8Array(0)},n=null==t?e.len:e.pos+t;for(;e.pos<n;){const t=e.uint32();switch(t>>>3){case 1:r.multiaddr=e.bytes();break;case 2:r.isCertified=e.bool();break;default:e.skipType(7&t)}}return r}))),t),e.encode=t=>ne(t,e.codec()),e.decode=t=>re(t,e.codec())}(RS||(RS={})),function(e){let t;e.codec=()=>(null==t&&(t=Le((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!1!==r.lengthDelimited&&t.fork(),null!=e.value&&0!==e.value&&(t.uint32(8),t.uint32(e.value)),null!=e.expiry&&(t.uint32(16),t.uint64(e.expiry)),!1!==r.lengthDelimited&&t.ldelim()}),((e,t)=>{const r={value:0},n=null==t?e.len:e.pos+t;for(;e.pos<n;){const t=e.uint32();switch(t>>>3){case 1:r.value=e.uint32();break;case 2:r.expiry=e.uint64();break;default:e.skipType(7&t)}}return r}))),t),e.encode=t=>ne(t,e.codec()),e.decode=t=>re(t,e.codec())}(PS||(PS={}));const NS="/peers/";function DS(e){if(!Si(e)||null==e.type)throw new zu("Invalid PeerId",xS);const t=e.toCID().toString();return new Gw("".concat(NS).concat(t))}async function OS(e,t,r){const n=new Map;for(const o of r){var i;if(null==o)continue;if(o.multiaddr instanceof Uint8Array&&(o.multiaddr=Xs(o.multiaddr)),!Vs(o.multiaddr))throw new zu("Multiaddr was invalid",xS);if(!await t(e,o.multiaddr))continue;const r=null!==(i=o.isCertified)&&void 0!==i&&i,s=o.multiaddr.toString(),a=n.get(s);null!=a?o.isCertified=a.isCertified||r:n.set(s,{multiaddr:o.multiaddr,isCertified:r})}return[...n.values()].sort(((e,t)=>e.multiaddr.toString().localeCompare(t.multiaddr.toString()))).map((e=>{let{isCertified:t,multiaddr:r}=e;return{isCertified:t,multiaddr:r.bytes}}))}async function MS(e,t,r,n){var i,o,s,a,c,l,u;if(null==t)throw new zu("Invalid PeerData",xS);if(null!=t.publicKey&&null!=e.publicKey&&!wi(t.publicKey,e.publicKey))throw new zu("publicKey bytes do not match peer id publicKey bytes",xS);const h=n.existingPeer;if(null!=h&&!e.equals(h.id))throw new zu("peer id did not match existing peer id",xS);let d=null!==(i=null===h||void 0===h?void 0:h.addresses)&&void 0!==i?i:[],f=new Set(null!==(o=null===h||void 0===h?void 0:h.protocols)&&void 0!==o?o:[]),p=null!==(s=null===h||void 0===h?void 0:h.metadata)&&void 0!==s?s:new Map,g=null!==(a=null===h||void 0===h?void 0:h.tags)&&void 0!==a?a:new Map,m=null===h||void 0===h?void 0:h.peerRecordEnvelope;if("patch"===r){if(null==t.multiaddrs&&null==t.addresses||(d=[],null!=t.multiaddrs&&d.push(...t.multiaddrs.map((e=>({isCertified:!1,multiaddr:e})))),null!=t.addresses&&d.push(...t.addresses)),null!=t.protocols&&(f=new Set(t.protocols)),null!=t.metadata){p=BS(t.metadata instanceof Map?[...t.metadata.entries()]:Object.entries(t.metadata),{validate:LS})}if(null!=t.tags){g=BS(t.tags instanceof Map?[...t.tags.entries()]:Object.entries(t.tags),{validate:US,map:FS})}null!=t.peerRecordEnvelope&&(m=t.peerRecordEnvelope)}if("merge"===r){if(null!=t.multiaddrs&&d.push(...t.multiaddrs.map((e=>({isCertified:!1,multiaddr:e})))),null!=t.addresses&&d.push(...t.addresses),null!=t.protocols&&(f=new Set([...f,...t.protocols])),null!=t.metadata){const e=t.metadata instanceof Map?[...t.metadata.entries()]:Object.entries(t.metadata);for(const[t,r]of e)null==r?p.delete(t):p.set(t,r);p=BS([...p.entries()],{validate:LS})}if(null!=t.tags){const e=t.tags instanceof Map?[...t.tags.entries()]:Object.entries(t.tags),r=new Map(g);for(const[t,n]of e)null==n?r.delete(t):r.set(t,n);g=BS([...r.entries()],{validate:US,map:FS})}null!=t.peerRecordEnvelope&&(m=t.peerRecordEnvelope)}const y={addresses:await OS(e,null!==(c=n.addressFilter)&&void 0!==c?c:async()=>!0,d),protocols:[...f.values()].sort(((e,t)=>e.localeCompare(t))),metadata:p,tags:g,publicKey:null!==(l=null!==(u=null===h||void 0===h?void 0:h.id.publicKey)&&void 0!==u?u:t.publicKey)&&void 0!==l?l:e.publicKey,peerRecordEnvelope:m};return"RSA"!==e.type&&delete y.publicKey,y}function BS(e,t){const r=new Map;for(const[o,s]of e)null!=s&&t.validate(o,s);for(const[o,s]of e.sort(((e,t)=>{let[r]=e,[n]=t;return r.localeCompare(n)}))){var n,i;if(null!=s)r.set(o,null!==(n=null===(i=t.map)||void 0===i?void 0:i.call(t,o,s))&&void 0!==n?n:s)}return r}function LS(e,t){if("string"!==typeof e)throw new zu("Metadata key must be a string",xS);if(!(t instanceof Uint8Array))throw new zu("Metadata value must be a Uint8Array",xS)}function US(e,t){if("string"!==typeof e)throw new zu("Tag name must be a string",xS);if(null!=t.value){if(parseInt("".concat(t.value),10)!==t.value)throw new zu("Tag value must be an integer",xS);if(t.value<0||t.value>100)throw new zu("Tag value must be between 0-100",xS)}if(null!=t.ttl){if(parseInt("".concat(t.ttl),10)!==t.ttl)throw new zu("Tag ttl must be an integer",xS);if(t.ttl<0)throw new zu("Tag ttl must be between greater than 0",xS)}}function FS(e,t){var r;let n;return null!=t.expiry&&(n=t.expiry),null!=t.ttl&&(n=BigInt(Date.now()+Number(t.ttl))),{value:null!==(r=t.value)&&void 0!==r?r:0,expiry:n}}function jS(e,t,r){const n=e.toString().split("/")[2],i=_p(Nf.decode(n)),o=r.get(i);if(null!=o)return o;const s=TS(i,t);return r.set(i,s),s}var zS=new WeakSet,KS=new WeakSet;class qS{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Uw(this,KS),Uw(this,zS),(0,W.Z)(this,"peerId",void 0),(0,W.Z)(this,"datastore",void 0),(0,W.Z)(this,"lock",void 0),(0,W.Z)(this,"addressFilter",void 0),this.peerId=e.peerId,this.datastore=e.datastore,this.addressFilter=t.addressFilter,this.lock=CS({name:"peer-store",singleProcess:!0})}async has(e){return this.datastore.has(DS(e))}async delete(e){if(this.peerId.equals(e))throw new zu("Cannot delete self peer",xS);await this.datastore.delete(DS(e))}async load(e){return TS(e,await this.datastore.get(DS(e)))}async save(e,t){const{existingBuf:r,existingPeer:n}=await Fw(this,zS,ZS).call(this,e),i=await MS(e,t,"patch",{addressFilter:this.addressFilter});return Fw(this,KS,VS).call(this,e,i,r,n)}async patch(e,t){const{existingBuf:r,existingPeer:n}=await Fw(this,zS,ZS).call(this,e),i=await MS(e,t,"patch",{addressFilter:this.addressFilter,existingPeer:n});return Fw(this,KS,VS).call(this,e,i,r,n)}async merge(e,t){const{existingBuf:r,existingPeer:n}=await Fw(this,zS,ZS).call(this,e),i=await MS(e,t,"merge",{addressFilter:this.addressFilter,existingPeer:n});return Fw(this,KS,VS).call(this,e,i,r,n)}async*all(e){const t=new pE;for await(const{key:r,value:n}of this.datastore.query(function(e,t){var r,n;return null==e?{}:{prefix:NS,filters:(null!==(r=e.filters)&&void 0!==r?r:[]).map((e=>r=>{let{key:n,value:i}=r;return e(jS(n,i,t))})),orders:(null!==(n=e.orders)&&void 0!==n?n:[]).map((e=>(r,n)=>e(jS(r.key,r.value,t),jS(n.key,n.value,t))))}}(null!==e&&void 0!==e?e:{},t))){const e=jS(r,n,t);e.id.equals(this.peerId)||(yield e)}}}async function ZS(e){try{const t=await this.datastore.get(DS(e));return{existingBuf:t,existingPeer:TS(e,t)}}catch(t){if("ERR_NOT_FOUND"!==t.code)throw t}return{}}async function VS(e,t,r,n){const i=IS.encode(t);return null!=r&&wi(i,r)?{peer:TS(e,i),previous:n,updated:!1}:(await this.datastore.put(DS(e),i),{peer:TS(e,i),previous:n,updated:!0})}const HS=Dp("libp2p:peer-store");var WS=new WeakSet;class GS{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Uw(this,WS),(0,W.Z)(this,"store",void 0),(0,W.Z)(this,"events",void 0),(0,W.Z)(this,"peerId",void 0),this.events=e.events,this.peerId=e.peerId,this.store=new qS(e,t)}async forEach(e,t){HS.trace("forEach await read lock");const r=await this.store.lock.readLock();HS.trace("forEach got read lock");try{for await(const r of this.store.all(t))e(r)}finally{HS.trace("forEach release read lock"),r()}}async all(e){HS.trace("all await read lock");const t=await this.store.lock.readLock();HS.trace("all got read lock");try{return await kE(this.store.all(e))}finally{HS.trace("all release read lock"),t()}}async delete(e){HS.trace("delete await write lock");const t=await this.store.lock.writeLock();HS.trace("delete got write lock");try{await this.store.delete(e)}finally{HS.trace("delete release write lock"),t()}}async has(e){HS.trace("has await read lock");const t=await this.store.lock.readLock();HS.trace("has got read lock");try{return await this.store.has(e)}finally{HS.trace("has release read lock"),t()}}async get(e){HS.trace("get await read lock");const t=await this.store.lock.readLock();HS.trace("get got read lock");try{return await this.store.load(e)}finally{HS.trace("get release read lock"),t()}}async save(e,t){HS.trace("save await write lock");const r=await this.store.lock.writeLock();HS.trace("save got write lock");try{const n=await this.store.save(e,t);return Fw(this,WS,YS).call(this,e,n),n.peer}finally{HS.trace("save release write lock"),r()}}async patch(e,t){HS.trace("patch await write lock");const r=await this.store.lock.writeLock();HS.trace("patch got write lock");try{const n=await this.store.patch(e,t);return Fw(this,WS,YS).call(this,e,n),n.peer}finally{HS.trace("patch release write lock"),r()}}async merge(e,t){HS.trace("merge await write lock");const r=await this.store.lock.writeLock();HS.trace("merge got write lock");try{const n=await this.store.merge(e,t);return Fw(this,WS,YS).call(this,e,n),n.peer}finally{HS.trace("merge release write lock"),r()}}async consumePeerRecord(e,t){var r;const n=await wE.openAndCertify(e,AE.DOMAIN);if(!1===(null===t||void 0===t?void 0:t.equals(n.peerId)))return HS("envelope peer id was not the expected peer id - expected: %p received: %p",t,n.peerId),!1;const i=AE.createFromProtobuf(n.payload);let o;try{o=await this.get(n.peerId)}catch(s){if("ERR_NOT_FOUND"!==s.code)throw s}if(null!=(null===(r=o)||void 0===r?void 0:r.peerRecordEnvelope)){const e=await wE.createFromProtobuf(o.peerRecordEnvelope),t=AE.createFromProtobuf(e.payload);if(t.seqNumber>=i.seqNumber)return HS("sequence number was lower or equal to existing sequence number - stored: %d received: %d",t.seqNumber,i.seqNumber),!1}return await this.patch(i.peerId,{peerRecordEnvelope:e,addresses:i.multiaddrs.map((e=>({isCertified:!0,multiaddr:e})))}),!0}}function YS(e,t){t.updated&&(this.peerId.equals(e)?this.events.safeDispatchEvent("self:peer:update",{detail:t}):this.events.safeDispatchEvent("peer:update",{detail:t}))}const QS=function(e){if(null!=e[Symbol.asyncIterator])return(async()=>{for await(const t of e);})();for(const t of e);};const JS=function(e){const[t,r]=null!=e[Symbol.asyncIterator]?[e[Symbol.asyncIterator](),Symbol.asyncIterator]:[e[Symbol.iterator](),Symbol.iterator],n=[];return{peek:()=>t.next(),push:e=>{n.push(e)},next:()=>n.length>0?{done:!1,value:n.shift()}:t.next(),[r](){return this}}};const XS=function(e,t){if(null!=e[Symbol.asyncIterator])return async function*(){for await(const r of e)await t(r)&&(yield r)}();const r=JS(e),{value:n,done:i}=r.next();if(!0===i)return function*(){}();const o=t(n);if("function"===typeof o.then)return async function*(){await o&&(yield n);for await(const e of r)await t(e)&&(yield e)}();const s=t;return function*(){!0===o&&(yield n);for(const e of r)s(e)&&(yield e)}()};const $S=function(e,t){return null!=e[Symbol.asyncIterator]?async function*(){const r=await kE(e);yield*r.sort(t)}():function*(){const r=kE(e);yield*r.sort(t)}()};const e_=function(e,t){return null!=e[Symbol.asyncIterator]?async function*(){let r=0;if(!(t<1))for await(const n of e)if(yield n,r++,r===t)return}():function*(){let r=0;if(!(t<1))for(const n of e)if(yield n,r++,r===t)return}()};class t_{put(e,t,r){return Promise.reject(new Error(".put is not implemented"))}get(e,t){return Promise.reject(new Error(".get is not implemented"))}has(e,t){return Promise.reject(new Error(".has is not implemented"))}delete(e,t){return Promise.reject(new Error(".delete is not implemented"))}putMany(e){try{var t=this;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return async function*(){for await(const{key:n,value:i}of e)await t.put(n,i,r),yield n}()}catch(r){return Promise.reject(r)}}getMany(e){try{var t=this;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return async function*(){for await(const n of e)yield{key:n,value:await t.get(n,r)}}()}catch(r){return Promise.reject(r)}}deleteMany(e){try{var t=this;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return async function*(){for await(const n of e)await t.delete(n,r),yield n}()}catch(r){return Promise.reject(r)}}batch(){let e=[],t=[];return{put(t,r){e.push({key:t,value:r})},delete(e){t.push(e)},commit:async r=>{await QS(this.putMany(e,r)),e=[],await QS(this.deleteMany(t,r)),t=[]}}}async*_all(e,t){throw new Error("._all is not implemented")}async*_allKeys(e,t){throw new Error("._allKeys is not implemented")}query(e,t){let r=this._all(e,t);if(null!=e.prefix){const t=e.prefix;r=XS(r,(e=>e.key.toString().startsWith(t)))}if(Array.isArray(e.filters)&&(r=e.filters.reduce(((e,t)=>XS(e,t)),r)),Array.isArray(e.orders)&&(r=e.orders.reduce(((e,t)=>$S(e,t)),r)),null!=e.offset){let t=0;const n=e.offset;r=XS(r,(()=>t++>=n))}return null!=e.limit&&(r=e_(r,e.limit)),r}queryKeys(e,t){let r=this._allKeys(e,t);if(null!=e.prefix){const t=e.prefix;r=XS(r,(e=>e.toString().startsWith(t)))}if(Array.isArray(e.filters)&&(r=e.filters.reduce(((e,t)=>XS(e,t)),r)),Array.isArray(e.orders)&&(r=e.orders.reduce(((e,t)=>$S(e,t)),r)),null!=e.offset){const t=e.offset;let n=0;r=XS(r,(()=>n++>=t))}return null!=e.limit&&(r=e_(r,e.limit)),r}}class r_ extends t_{constructor(){super(),(0,W.Z)(this,"data",void 0),this.data=new Map}put(e,t){return this.data.set(e.toString(),t),e}get(e){const t=this.data.get(e.toString());if(null==t)throw function(e){var t;return e=null!==(t=e)&&void 0!==t?t:new Error("Not Found"),Ra(e,"ERR_NOT_FOUND")}();return t}has(e){return this.data.has(e.toString())}delete(e){this.data.delete(e.toString())}*_all(){for(const[e,t]of this.data.entries())yield{key:new Gw(e),value:t}}*_allKeys(){for(const e of this.data.keys())yield new Gw(e)}}const n_=Dp("libp2p:address-manager"),i_=e=>e;function o_(e,t){const r=e.getPeerId();if(null!=r){Sp(r).equals(t)&&(e=e.decapsulate(Xs("/p2p/".concat(t.toString()))))}return e}class s_{constructor(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,W.Z)(this,"components",void 0),(0,W.Z)(this,"listen",void 0),(0,W.Z)(this,"announce",void 0),(0,W.Z)(this,"observed",void 0),(0,W.Z)(this,"announceFilter",void 0);const{listen:n=[],announce:i=[]}=r;this.components=e,this.listen=n.map((e=>e.toString())),this.announce=new Set(i.map((e=>e.toString()))),this.observed=new Map,this.announceFilter=null!==(t=r.announceFilter)&&void 0!==t?t:i_,this._updatePeerStoreAddresses=function(e,t){let r;return function(){clearTimeout(r),r=setTimeout((function(){r=void 0,e()}),t)}}(this._updatePeerStoreAddresses.bind(this),1e3),e.events.addEventListener("transport:listening",(()=>{this._updatePeerStoreAddresses()})),e.events.addEventListener("transport:close",(()=>{this._updatePeerStoreAddresses()}))}_updatePeerStoreAddresses(){const e=this.getAnnounceAddrs().concat(this.components.transportManager.getAddrs()).concat([...this.observed.entries()].filter((e=>{let[t,r]=e;return r.confident})).map((e=>{let[t]=e;return Xs(t)}))).map((e=>e.getPeerId()===this.components.peerId.toString()?e.decapsulate("/p2p/".concat(this.components.peerId.toString())):e));this.components.peerStore.patch(this.components.peerId,{multiaddrs:e}).catch((e=>{n_.error("error updating addresses",e)}))}getListenAddrs(){return Array.from(this.listen).map((e=>Xs(e)))}getAnnounceAddrs(){return Array.from(this.announce).map((e=>Xs(e)))}getObservedAddrs(){return Array.from(this.observed).map((e=>{let[t]=e;return Xs(t)}))}addObservedAddr(e){const t=(e=o_(e,this.components.peerId)).toString();this.observed.has(t)||this.observed.set(t,{confident:!1})}confirmObservedAddr(e){var t;const r=(e=o_(e,this.components.peerId)).toString(),n=(null!==(t=this.observed.get(r))&&void 0!==t?t:{confident:!1}).confident;this.observed.set(r,{confident:!0}),n||this._updatePeerStoreAddresses()}removeObservedAddr(e){const t=(e=o_(e,this.components.peerId)).toString();this.observed.delete(t)}getAddresses(){let e=this.getAnnounceAddrs().map((e=>e.toString()));0===e.length&&(e=this.components.transportManager.getAddrs().map((e=>e.toString()))),e=e.concat(Array.from(this.observed).filter((e=>{let[t,r]=e;return r.confident})).map((e=>{let[t]=e;return t})));const t=new Set(e);return this.announceFilter(Array.from(t).map((e=>Xs(e)))).map((e=>{var t;return!0===(null===(t=e.protos().pop())||void 0===t?void 0:t.path)||e.getPeerId()===this.components.peerId.toString()?e:e.encapsulate("/p2p/".concat(this.components.peerId.toString()))}))}}function a_(e){return null!=e&&"function"===typeof e.start&&"function"===typeof e.stop}class c_{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,W.Z)(this,"components",{}),(0,W.Z)(this,"_started",!1),this.components={};for(const[t,r]of Object.entries(e))this.components[t]=r}isStarted(){return this._started}async _invokeStartableMethod(e){await Promise.all(Object.values(this.components).filter((e=>a_(e))).map((async t=>{var r;await(null===(r=t[e])||void 0===r?void 0:r.call(t))})))}async beforeStart(){await this._invokeStartableMethod("beforeStart")}async start(){await this._invokeStartableMethod("start"),this._started=!0}async afterStart(){await this._invokeStartableMethod("afterStart")}async beforeStop(){await this._invokeStartableMethod("beforeStop")}async stop(){await this._invokeStartableMethod("stop"),this._started=!1}async afterStop(){await this._invokeStartableMethod("afterStop")}}const l_=["metrics","connectionProtector"],u_=["components","isStarted","beforeStart","start","afterStart","beforeStop","stop","afterStop","then","_invokeStartableMethod"];var h_=__webpack_require__(5181);const d_="[a-fA-F\\d:]",f_=e=>e&&e.includeBoundaries?"(?:(?<=\\s|^)(?=".concat(d_,")|(?<=").concat(d_,")(?=\\s|$))"):"",p_="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",g_="[a-fA-F\\d]{1,4}",m_="\n(?:\n(?:".concat(g_,":){7}(?:").concat(g_,"|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:").concat(g_,":){6}(?:").concat(p_,"|:").concat(g_,"|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:").concat(g_,":){5}(?::").concat(p_,"|(?::").concat(g_,"){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:").concat(g_,":){4}(?:(?::").concat(g_,"){0,1}:").concat(p_,"|(?::").concat(g_,"){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:").concat(g_,":){3}(?:(?::").concat(g_,"){0,2}:").concat(p_,"|(?::").concat(g_,"){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:").concat(g_,":){2}(?:(?::").concat(g_,"){0,3}:").concat(p_,"|(?::").concat(g_,"){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:").concat(g_,":){1}(?:(?::").concat(g_,"){0,4}:").concat(p_,"|(?::").concat(g_,"){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::(?:(?::").concat(g_,"){0,5}:").concat(p_,"|(?::").concat(g_,"){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1\n").replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),y_=new RegExp("(?:^".concat(p_,"$)|(?:^").concat(m_,"$)")),v_=new RegExp("^".concat(p_,"$")),b_=new RegExp("^".concat(m_,"$")),w_=e=>e&&e.exact?y_:new RegExp("(?:".concat(f_(e)).concat(p_).concat(f_(e),")|(?:").concat(f_(e)).concat(m_).concat(f_(e),")"),"g");w_.v4=e=>e&&e.exact?v_:new RegExp("".concat(f_(e)).concat(p_).concat(f_(e)),"g"),w_.v6=e=>e&&e.exact?b_:new RegExp("".concat(f_(e)).concat(m_).concat(f_(e)),"g");const E_=w_;var S_=__webpack_require__(7967);const{isValid:__,parse:A_}=S_,k_=["0.0.0.0/8","10.0.0.0/8","100.64.0.0/10","127.0.0.0/8","169.254.0.0/16","172.16.0.0/12","192.0.0.0/24","192.0.0.0/29","192.0.0.8/32","192.0.0.9/32","192.0.0.10/32","192.0.0.170/32","192.0.0.171/32","192.0.2.0/24","192.31.196.0/24","192.52.193.0/24","192.88.99.0/24","192.168.0.0/16","192.175.48.0/24","198.18.0.0/15","198.51.100.0/24","203.0.113.0/24","240.0.0.0/4","255.255.255.255/32"].map((e=>new h_.Netmask(e)));function C_(e){return/^::$/.test(e)||/^::1$/.test(e)||/^::f{4}:([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/.test(e)||/^::f{4}:0.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/.test(e)||/^64:ff9b::([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/.test(e)||/^100::([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4})$/.test(e)||/^2001::([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4})$/.test(e)||/^2001:2[0-9a-fA-F]:([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4})$/.test(e)||/^2001:db8:([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4})$/.test(e)||/^2002:([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4})$/.test(e)||/^f[c-d]([0-9a-fA-F]{2,2}):/i.test(e)||/^fe[8-9a-bA-B][0-9a-fA-F]:/i.test(e)||/^ff([0-9a-fA-F]{2,2}):/i.test(e)}const x_=e=>{if(__(e)){const t=A_(e);if("ipv4"===t.kind())return function(e){for(let t of k_)if(t.contains(e))return!0;return!1}(t.toNormalizedString());if("ipv6"===t.kind())return C_(e)}else if(ys(e)&&E_.v6().test(e))return C_(e)};function I_(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{denyDialPeer:async()=>!1,denyDialMultiaddr:async e=>{const t=e.stringTuples();return(4===t[0][0]||41===t[0][0])&&Boolean(x_("".concat(t[0][1])))},denyInboundConnection:async()=>!1,denyOutboundConnection:async()=>!1,denyInboundEncryptedConnection:async()=>!1,denyOutboundEncryptedConnection:async()=>!1,denyInboundUpgradedConnection:async()=>!1,denyOutboundUpgradedConnection:async()=>!1,filterMultiaddrForPeer:async()=>!0,...e}}function R_(e){try{const{address:t}=e.nodeAddress();return Boolean(x_(t))}catch{return!0}}function P_(e,t){const r=R_(e.multiaddr),n=R_(t.multiaddr);return r&&!n?1:!r&&n||e.isCertified&&!t.isCertified?-1:!e.isCertified&&t.isCertified?1:0}var T_=__webpack_require__(7326);const N_=globalThis.fetch,D_=globalThis.Headers;globalThis.Request,globalThis.Response;function O_(e,t,r){return"".concat(e,"?name=").concat(t,"&type=").concat(r)}async function M_(e,t){const r=await N_(e,{headers:new D_({accept:"application/dns-json"}),signal:t});return await r.json()}function B_(e,t){return"".concat(t,"_").concat(e)}const L_=Object.assign(Ue("dns-over-http-resolver"),{error:Ue("dns-over-http-resolver:error")});const U_=class{constructor(){var e,t,r;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._cache=new T_({max:null!==(e=null===n||void 0===n?void 0:n.maxCache)&&void 0!==e?e:100}),this._TXTcache=new T_({max:null!==(t=null===n||void 0===n?void 0:n.maxCache)&&void 0!==t?t:100}),this._servers=["https://cloudflare-dns.com/dns-query","https://dns.google/resolve"],this._request=null!==(r=n.request)&&void 0!==r?r:M_,this._abortControllers=[]}cancel(){this._abortControllers.forEach((e=>e.abort()))}getServers(){return this._servers}_getShuffledServers(){const e=[...this._servers];for(let t=e.length-1;t>0;t--){const r=Math.floor(Math.random()*t),n=e[t];e[t]=e[r],e[r]=n}return e}setServers(e){this._servers=e}async resolve(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"A";switch(t){case"A":return await this.resolve4(e);case"AAAA":return await this.resolve6(e);case"TXT":return await this.resolveTxt(e);default:throw new Error("".concat(t," is not supported"))}}async resolve4(e){const t="A",r=this._cache.get(B_(e,t));if(null!=r)return r;let n=!1;for(const o of this._getShuffledServers()){const r=new AbortController;this._abortControllers.push(r);try{const n=await this._request(O_(o,e,t),r.signal),i=n.Answer.map((e=>e.data)),s=Math.min(...n.Answer.map((e=>e.TTL)));return this._cache.set(B_(e,t),i,{ttl:s}),i}catch(i){r.signal.aborted&&(n=!0),L_.error("".concat(o," could not resolve ").concat(e," record ").concat(t))}finally{this._abortControllers=this._abortControllers.filter((e=>e!==r))}}if(n)throw Object.assign(new Error("queryA ECANCELLED"),{code:"ECANCELLED"});throw new Error("Could not resolve ".concat(e," record ").concat(t))}async resolve6(e){const t="AAAA",r=this._cache.get(B_(e,t));if(null!=r)return r;let n=!1;for(const o of this._getShuffledServers()){const r=new AbortController;this._abortControllers.push(r);try{const n=await this._request(O_(o,e,t),r.signal),i=n.Answer.map((e=>e.data)),s=Math.min(...n.Answer.map((e=>e.TTL)));return this._cache.set(B_(e,t),i,{ttl:s}),i}catch(i){r.signal.aborted&&(n=!0),L_.error("".concat(o," could not resolve ").concat(e," record ").concat(t))}finally{this._abortControllers=this._abortControllers.filter((e=>e!==r))}}if(n)throw Object.assign(new Error("queryAaaa ECANCELLED"),{code:"ECANCELLED"});throw new Error("Could not resolve ".concat(e," record ").concat(t))}async resolveTxt(e){const t="TXT",r=this._TXTcache.get(B_(e,t));if(null!=r)return r;let n=!1;for(const o of this._getShuffledServers()){const r=new AbortController;this._abortControllers.push(r);try{const n=await this._request(O_(o,e,t),r.signal),i=n.Answer.map((e=>[e.data.replace(/['"]+/g,"")])),s=Math.min(...n.Answer.map((e=>e.TTL)));return this._TXTcache.set(B_(e,t),i,{ttl:s}),i}catch(i){r.signal.aborted&&(n=!0),L_.error("".concat(o," could not resolve ").concat(e," record ").concat(t))}finally{this._abortControllers=this._abortControllers.filter((e=>e!==r))}}if(n)throw Object.assign(new Error("queryTxt ECANCELLED"),{code:"ECANCELLED"});throw new Error("Could not resolve ".concat(e," record ").concat(t))}clearCache(){this._cache.clear(),this._TXTcache.clear()}},F_=U_,{code:j_}=As("dnsaddr");async function z_(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=new F_;null!=r.signal&&r.signal.addEventListener("abort",(()=>{n.cancel()}));const i=e.getPeerId(),[,o]=null!==(t=e.stringTuples().find((e=>{let[t]=e;return t===j_})))&&void 0!==t?t:[];if(null==o)throw new Error("No hostname found in multiaddr");const s=await n.resolveTxt("_dnsaddr.".concat(o));let a=s.flat().map((e=>e.split("=")[1])).filter(Boolean);return null!=i&&(a=a.filter((e=>e.includes(i)))),a}var K_,q_;!function(e){e.NOT_STARTED_YET="The libp2p node is not started yet",e.DHT_DISABLED="DHT is not available",e.PUBSUB_DISABLED="PubSub is not available",e.CONN_ENCRYPTION_REQUIRED="At least one connection encryption module is required",e.ERR_TRANSPORTS_REQUIRED="At least one transport module is required",e.ERR_PROTECTOR_REQUIRED="Private network is enforced, but no protector was provided",e.NOT_FOUND="Not found"}(K_||(K_={})),function(e){e.DHT_DISABLED="ERR_DHT_DISABLED",e.ERR_PUBSUB_DISABLED="ERR_PUBSUB_DISABLED",e.PUBSUB_NOT_STARTED="ERR_PUBSUB_NOT_STARTED",e.DHT_NOT_STARTED="ERR_DHT_NOT_STARTED",e.CONN_ENCRYPTION_REQUIRED="ERR_CONN_ENCRYPTION_REQUIRED",e.ERR_TRANSPORTS_REQUIRED="ERR_TRANSPORTS_REQUIRED",e.ERR_PROTECTOR_REQUIRED="ERR_PROTECTOR_REQUIRED",e.ERR_PEER_DIAL_INTERCEPTED="ERR_PEER_DIAL_INTERCEPTED",e.ERR_CONNECTION_INTERCEPTED="ERR_CONNECTION_INTERCEPTED",e.ERR_INVALID_PROTOCOLS_FOR_STREAM="ERR_INVALID_PROTOCOLS_FOR_STREAM",e.ERR_CONNECTION_ENDED="ERR_CONNECTION_ENDED",e.ERR_CONNECTION_FAILED="ERR_CONNECTION_FAILED",e.ERR_NODE_NOT_STARTED="ERR_NODE_NOT_STARTED",e.ERR_ALREADY_ABORTED="ERR_ALREADY_ABORTED",e.ERR_TOO_MANY_ADDRESSES="ERR_TOO_MANY_ADDRESSES",e.ERR_NO_VALID_ADDRESSES="ERR_NO_VALID_ADDRESSES",e.ERR_RELAYED_DIAL="ERR_RELAYED_DIAL",e.ERR_DIALED_SELF="ERR_DIALED_SELF",e.ERR_DISCOVERED_SELF="ERR_DISCOVERED_SELF",e.ERR_DUPLICATE_TRANSPORT="ERR_DUPLICATE_TRANSPORT",e.ERR_ENCRYPTION_FAILED="ERR_ENCRYPTION_FAILED",e.ERR_HOP_REQUEST_FAILED="ERR_HOP_REQUEST_FAILED",e.ERR_INVALID_KEY="ERR_INVALID_KEY",e.ERR_INVALID_MESSAGE="ERR_INVALID_MESSAGE",e.ERR_INVALID_PARAMETERS="ERR_INVALID_PARAMETERS",e.ERR_INVALID_PEER="ERR_INVALID_PEER",e.ERR_MUXER_UNAVAILABLE="ERR_MUXER_UNAVAILABLE",e.ERR_NOT_FOUND="ERR_NOT_FOUND",e.ERR_TIMEOUT="ERR_TIMEOUT",e.ERR_TRANSPORT_UNAVAILABLE="ERR_TRANSPORT_UNAVAILABLE",e.ERR_TRANSPORT_DIAL_FAILED="ERR_TRANSPORT_DIAL_FAILED",e.ERR_UNSUPPORTED_PROTOCOL="ERR_UNSUPPORTED_PROTOCOL",e.ERR_PROTOCOL_HANDLER_ALREADY_REGISTERED="ERR_PROTOCOL_HANDLER_ALREADY_REGISTERED",e.ERR_INVALID_MULTIADDR="ERR_INVALID_MULTIADDR",e.ERR_SIGNATURE_NOT_VALID="ERR_SIGNATURE_NOT_VALID",e.ERR_FIND_SELF="ERR_FIND_SELF",e.ERR_NO_ROUTERS_AVAILABLE="ERR_NO_ROUTERS_AVAILABLE",e.ERR_CONNECTION_NOT_MULTIPLEXED="ERR_CONNECTION_NOT_MULTIPLEXED",e.ERR_NO_DIAL_TOKENS="ERR_NO_DIAL_TOKENS",e.ERR_KEYCHAIN_REQUIRED="ERR_KEYCHAIN_REQUIRED",e.ERR_INVALID_CMS="ERR_INVALID_CMS",e.ERR_MISSING_KEYS="ERR_MISSING_KEYS",e.ERR_NO_KEY="ERR_NO_KEY",e.ERR_INVALID_KEY_NAME="ERR_INVALID_KEY_NAME",e.ERR_INVALID_KEY_TYPE="ERR_INVALID_KEY_TYPE",e.ERR_KEY_ALREADY_EXISTS="ERR_KEY_ALREADY_EXISTS",e.ERR_INVALID_KEY_SIZE="ERR_INVALID_KEY_SIZE",e.ERR_KEY_NOT_FOUND="ERR_KEY_NOT_FOUND",e.ERR_OLD_KEY_NAME_INVALID="ERR_OLD_KEY_NAME_INVALID",e.ERR_NEW_KEY_NAME_INVALID="ERR_NEW_KEY_NAME_INVALID",e.ERR_PASSWORD_REQUIRED="ERR_PASSWORD_REQUIRED",e.ERR_PEM_REQUIRED="ERR_PEM_REQUIRED",e.ERR_CANNOT_READ_KEY="ERR_CANNOT_READ_KEY",e.ERR_MISSING_PRIVATE_KEY="ERR_MISSING_PRIVATE_KEY",e.ERR_MISSING_PUBLIC_KEY="ERR_MISSING_PUBLIC_KEY",e.ERR_INVALID_OLD_PASS_TYPE="ERR_INVALID_OLD_PASS_TYPE",e.ERR_INVALID_NEW_PASS_TYPE="ERR_INVALID_NEW_PASS_TYPE",e.ERR_INVALID_PASS_LENGTH="ERR_INVALID_PASS_LENGTH",e.ERR_NOT_IMPLEMENTED="ERR_NOT_IMPLEMENTED",e.ERR_WRONG_PING_ACK="ERR_WRONG_PING_ACK",e.ERR_INVALID_RECORD="ERR_INVALID_RECORD",e.ERR_ALREADY_SUCCEEDED="ERR_ALREADY_SUCCEEDED",e.ERR_NO_HANDLER_FOR_PROTOCOL="ERR_NO_HANDLER_FOR_PROTOCOL",e.ERR_TOO_MANY_OUTBOUND_PROTOCOL_STREAMS="ERR_TOO_MANY_OUTBOUND_PROTOCOL_STREAMS",e.ERR_TOO_MANY_INBOUND_PROTOCOL_STREAMS="ERR_TOO_MANY_INBOUND_PROTOCOL_STREAMS",e.ERR_CONNECTION_DENIED="ERR_CONNECTION_DENIED",e.ERR_TRANSFER_LIMIT_EXCEEDED="ERR_TRANSFER_LIMIT_EXCEEDED"}(q_||(q_={}));const Z_={addresses:{listen:[],announce:[],noAnnounce:[],announceFilter:e=>e},connectionManager:{resolvers:{dnsaddr:z_},addressSorter:P_},transportManager:{faultTolerance:Eg.FATAL_ALL}};const V_=Dp("libp2p:get-peer");function H_(e){if(Si(e))return{peerId:e,multiaddrs:[]};let t;if(Array.isArray(e)||(e=[e]),e.length>0){const r=e[0].getPeerId();t=null==r?void 0:Sp(r),e.forEach((e=>{if(!Vs(e))throw V_.error("multiaddr %s was invalid",e),new zu("Invalid Multiaddr",q_.ERR_INVALID_MULTIADDR);const r=e.getPeerId();if(null==r){if(null!=t)throw new zu("Multiaddrs must all have the same peer id or have no peer id",q_.ERR_INVALID_PARAMETERS)}else{const e=Sp(r);if(null==t||!t.equals(e))throw new zu("Multiaddrs must all have the same peer id or have no peer id",q_.ERR_INVALID_PARAMETERS)}}))}return{peerId:t,multiaddrs:e}}var W_=new WeakMap;class G_{constructor(){Ai(this,W_,{writable:!0,value:[]})}enqueue(e,t){var r;const n=null===t||void 0===t?void 0:t.peerId,i=null!==(r=null===t||void 0===t?void 0:t.priority)&&void 0!==r?r:0;if(null==n)throw new zu("missing peer id",q_.ERR_INVALID_PARAMETERS);const o={priority:i,peerId:n,run:e};if(this.size>0&&Ci(this,W_)[this.size-1].priority>=i)return void Ci(this,W_).push(o);const s=function(e,t,r){let n=0,i=e.length;for(;i>0;){const o=Math.trunc(i/2);let s=n+o;r(e[s],t)<=0?(n=++s,i-=o+1):i=o}return n}(Ci(this,W_),o,((e,t)=>t.priority-e.priority));Ci(this,W_).splice(s,0,o)}dequeue(){const e=Ci(this,W_).shift();return null===e||void 0===e?void 0:e.run}filter(e){if(null!=e.peerId){const t=e.peerId;return Ci(this,W_).filter((e=>t.equals(e.peerId))).map((e=>e.run))}return Ci(this,W_).filter((t=>t.priority===e.priority)).map((e=>e.run))}get size(){return Ci(this,W_).length}}class Y_ extends lS{constructor(){super({...arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},queueClass:G_})}hasJob(e){return this.sizeBy({peerId:e})>0}}const Q_=Dp("libp2p:connection-manager:auto-dial"),J_=50,X_=100,$_=25,eA=0,tA=5e3;class rA{constructor(e,t){var r,n,i,o,s;(0,W.Z)(this,"connectionManager",void 0),(0,W.Z)(this,"peerStore",void 0),(0,W.Z)(this,"queue",void 0),(0,W.Z)(this,"minConnections",void 0),(0,W.Z)(this,"autoDialPriority",void 0),(0,W.Z)(this,"autoDialIntervalMs",void 0),(0,W.Z)(this,"autoDialMaxQueueLength",void 0),(0,W.Z)(this,"autoDialInterval",void 0),(0,W.Z)(this,"started",void 0),(0,W.Z)(this,"running",void 0),this.connectionManager=e.connectionManager,this.peerStore=e.peerStore,this.minConnections=null!==(r=t.minConnections)&&void 0!==r?r:J_,this.autoDialPriority=null!==(n=t.autoDialPriority)&&void 0!==n?n:eA,this.autoDialIntervalMs=null!==(i=t.autoDialInterval)&&void 0!==i?i:tA,this.autoDialMaxQueueLength=null!==(o=t.maxQueueLength)&&void 0!==o?o:X_,this.started=!1,this.running=!1,this.queue=new Y_({concurrency:null!==(s=t.autoDialConcurrency)&&void 0!==s?s:$_}),this.queue.addListener("error",(e=>{Q_.error("error during auto-dial",e)})),e.events.addEventListener("connection:close",(()=>{this.autoDial().catch((e=>{Q_.error(e)}))}))}isStarted(){return this.started}start(){this.autoDialInterval=setTimeout((()=>{this.autoDial().catch((e=>{Q_.error("error while autodialing",e)}))}),this.autoDialIntervalMs),this.started=!0}afterStart(){this.autoDial().catch((e=>{Q_.error("error while autodialing",e)}))}stop(){this.queue.clear(),clearTimeout(this.autoDialInterval),this.started=!1,this.running=!1}async autoDial(){if(!this.started)return;const e=this.connectionManager.getConnectionsMap(),t=e.size;if(t>=this.minConnections)return void Q_.trace("have enough connections %d/%d",t,this.minConnections);if(this.queue.size>this.autoDialMaxQueueLength)return void Q_("not enough connections %d/%d but auto dial queue is full",t,this.minConnections);if(this.running)return void Q_("not enough connections %d/%d - but skipping autodial as it is already running",t,this.minConnections);this.running=!0,Q_("not enough connections %d/%d - will dial peers to increase the number of connections",t,this.minConnections);const r=new gE(this.connectionManager.getDialQueue().map((e=>e.peerId)).filter(Boolean)),n=await this.peerStore.all({filters:[t=>0===t.addresses.length?(Q_.trace("not autodialing %p because they have no addresses"),!1):e.has(t.id)?(Q_.trace("not autodialing %p because they are already connected"),!1):r.has(t.id)?(Q_.trace("not autodialing %p because they are already being dialed"),!1):!this.queue.hasJob(t.id)||(Q_.trace("not autodialing %p because they are already being autodialed"),!1)]}),i=n.sort((()=>Math.random()>.5?1:-1)),o=new pE;for(const a of i)o.has(a.id)||o.set(a.id,[...a.tags.values()].reduce(((e,t)=>e+t.value),0));const s=i.sort(((e,t)=>{var r,n;const i=null!==(r=o.get(e.id))&&void 0!==r?r:0,s=null!==(n=o.get(t.id))&&void 0!==n?n:0;return i>s?-1:i<s?1:0}));Q_("selected %d/%d peers to dial",s.length,n.length);for(const a of s)this.queue.add((async()=>{const e=this.connectionManager.getConnectionsMap().size;if(e>=this.minConnections)return Q_("got enough connections now %d/%d",e,this.minConnections),void this.queue.clear();Q_("connecting to a peerStore stored peer %p",a.id),await this.connectionManager.openConnection(a.id,{priority:this.autoDialPriority})}),{peerId:a.id}).catch((e=>{Q_.error("could not connect to peerStore stored peer",e)}));this.running=!1,this.started&&(this.autoDialInterval=setTimeout((()=>{this.autoDial().catch((e=>{Q_.error("error while autodialing",e)}))}),this.autoDialIntervalMs))}}const nA=Dp("libp2p:connection-manager:connection-pruner"),iA={maxConnections:300,allow:[]};class oA{constructor(e){var t,r;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,W.Z)(this,"maxConnections",void 0),(0,W.Z)(this,"connectionManager",void 0),(0,W.Z)(this,"peerStore",void 0),(0,W.Z)(this,"allow",void 0),(0,W.Z)(this,"events",void 0),this.maxConnections=null!==(t=n.maxConnections)&&void 0!==t?t:iA.maxConnections,this.allow=null!==(r=n.allow)&&void 0!==r?r:iA.allow,this.connectionManager=e.connectionManager,this.peerStore=e.peerStore,this.events=e.events,e.events.addEventListener("connection:open",(()=>{this.maybePruneConnections().catch((e=>{nA.error(e)}))}))}async maybePruneConnections(){const e=this.connectionManager.getConnections(),t=e.length,r=Math.max(t-this.maxConnections,0);if(nA("checking max connections limit %d/%d",t,this.maxConnections),t<=this.maxConnections)return;nA("max connections limit exceeded %d/%d, pruning %d connection(s)",t,this.maxConnections,r);const n=new pE;for(const a of e){const e=a.remotePeer;if(!n.has(e)){n.set(e,0);try{const t=await this.peerStore.get(e);n.set(e,[...t.tags.values()].reduce(((e,t)=>e+t.value),0))}catch(s){"ERR_NOT_FOUND"!==s.code&&nA.error("error loading peer tags",s)}}}const i=e.sort(((e,t)=>{var r,i;const o=null!==(r=n.get(e.remotePeer))&&void 0!==r?r:0,s=null!==(i=n.get(t.remotePeer))&&void 0!==i?i:0;if(o>s)return 1;if(o<s)return-1;const a=e.stat.timeline.open,c=t.stat.timeline.open;return a<c?1:a>c?-1:0})),o=[];for(const a of i){nA("too many connections open - closing a connection to %p",a.remotePeer);if(this.allow.some((e=>a.remoteAddr.toString().startsWith(e.toString())))||o.push(a),o.length===r)break}await Promise.all(o.map((async e=>{try{await e.close()}catch(s){nA.error(s)}}))),this.events.safeDispatchEvent("connection:prune",{detail:o})}}const sA=Dp("libp2p:connection-manager:utils");async function aA(e,t){if(!e.protoNames().includes("dnsaddr"))return[e];const r=await async function(e,t){try{e=Xs(e.toString());return await e.resolve(t)}catch(r){return sA.error("multiaddr ".concat(e.toString()," could not be resolved"),r),[]}}(e,t),n=(await Promise.all(r.map((async e=>aA(e,t))))).flat().reduce(((e,t)=>(null==e.find((e=>e.equals(t)))&&e.push(t),e)),[]);return sA("resolved %s to",e,n.map((e=>e.toString()))),n}const cA=Dp("libp2p:connection-manager:dial-queue"),lA={addressSorter:P_,maxParallelDials:100,maxPeerAddrsToDial:25,maxParallelDialsPerPeer:10,dialTimeout:3e4,resolvers:{dnsaddr:z_}};class uA{constructor(e){var t,r,n,i,o,s,a;let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,W.Z)(this,"pendingDials",void 0),(0,W.Z)(this,"queue",void 0),(0,W.Z)(this,"peerId",void 0),(0,W.Z)(this,"peerStore",void 0),(0,W.Z)(this,"connectionGater",void 0),(0,W.Z)(this,"transportManager",void 0),(0,W.Z)(this,"addressSorter",void 0),(0,W.Z)(this,"maxPeerAddrsToDial",void 0),(0,W.Z)(this,"maxParallelDialsPerPeer",void 0),(0,W.Z)(this,"dialTimeout",void 0),(0,W.Z)(this,"inProgressDialCount",void 0),(0,W.Z)(this,"pendingDialCount",void 0),(0,W.Z)(this,"shutDownController",void 0),this.addressSorter=null!==(t=c.addressSorter)&&void 0!==t?t:lA.addressSorter,this.maxPeerAddrsToDial=null!==(r=c.maxPeerAddrsToDial)&&void 0!==r?r:lA.maxPeerAddrsToDial,this.maxParallelDialsPerPeer=null!==(n=c.maxParallelDialsPerPeer)&&void 0!==n?n:lA.maxParallelDialsPerPeer,this.dialTimeout=null!==(i=c.dialTimeout)&&void 0!==i?i:lA.dialTimeout,this.peerId=e.peerId,this.peerStore=e.peerStore,this.connectionGater=e.connectionGater,this.transportManager=e.transportManager,this.shutDownController=new AbortController;try{null===jw.setMaxListeners||void 0===jw.setMaxListeners||(0,jw.setMaxListeners)(1/0,this.shutDownController.signal)}catch{}this.pendingDialCount=null===(o=e.metrics)||void 0===o?void 0:o.registerMetric("libp2p_dialler_pending_dials"),this.inProgressDialCount=null===(s=e.metrics)||void 0===s?void 0:s.registerMetric("libp2p_dialler_in_progress_dials"),this.pendingDials=[];for(const[u,h]of Object.entries(null!==(l=c.resolvers)&&void 0!==l?l:{})){var l;qs.set(u,h)}this.queue=new lS({concurrency:null!==(a=c.maxParallelDials)&&void 0!==a?a:lA.maxParallelDials}),this.queue.on("add",(()=>{var e,t;null===(e=this.pendingDialCount)||void 0===e||e.update(this.queue.size),null===(t=this.inProgressDialCount)||void 0===t||t.update(this.queue.pending)})),this.queue.on("active",(()=>{var e,t;null===(e=this.pendingDialCount)||void 0===e||e.update(this.queue.size),null===(t=this.inProgressDialCount)||void 0===t||t.update(this.queue.pending)})),this.queue.on("completed",(()=>{var e,t;null===(e=this.pendingDialCount)||void 0===e||e.update(this.queue.size),null===(t=this.inProgressDialCount)||void 0===t||t.update(this.queue.pending)})),this.queue.on("error",(e=>{var t,r;cA.error("error in dial queue",e),null===(t=this.pendingDialCount)||void 0===t||t.update(this.queue.size),null===(r=this.inProgressDialCount)||void 0===r||r.update(this.queue.pending)})),this.queue.on("empty",(()=>{var e,t;null===(e=this.pendingDialCount)||void 0===e||e.update(this.queue.size),null===(t=this.inProgressDialCount)||void 0===t||t.update(this.queue.pending)})),this.queue.on("idle",(()=>{var e,t;null===(e=this.pendingDialCount)||void 0===e||e.update(this.queue.size),null===(t=this.inProgressDialCount)||void 0===t||t.update(this.queue.pending)}))}stop(){this.shutDownController.abort()}async dial(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{peerId:r,multiaddrs:n}=H_(e),i=n.map((e=>({multiaddr:e,isCertified:!1}))),o=this.createDialAbortControllers(t.signal);let s;try{s=await this.calculateMultiaddrs(r,i,{...t,signal:o})}catch(l){throw o.clear(),l}const a=this.pendingDials.find((e=>!(null==e.peerId||null==r||!e.peerId.equals(r))||s.map((e=>{let{multiaddr:t}=e;return t.toString()})).join()===e.multiaddrs.map((e=>e.toString())).join()));if(null!=a)return cA("joining existing dial target for %p",r),o.clear(),a.promise;cA("creating dial target for",s.map((e=>{let{multiaddr:t}=e;return t.toString()})));const c={id:"".concat(parseInt(String(1e9*Math.random()),10).toString()).concat(Date.now()),status:"queued",peerId:r,multiaddrs:s.map((e=>{let{multiaddr:t}=e;return t}))};return c.promise=this.performDial(c,{...t,signal:o}).finally((()=>{this.pendingDials=this.pendingDials.filter((e=>e.id!==c.id)),o.clear()})).catch((e=>{if(cA.error("dial failed to %s",c.multiaddrs.map((e=>e.toString())).join(", "),e),o.aborted){throw new zu(e.message,q_.ERR_TIMEOUT)}throw e})),this.pendingDials.push(c),c.promise}createDialAbortControllers(e){const t=Gp([AbortSignal.timeout(this.dialTimeout),this.shutDownController.signal,e]);try{null===jw.setMaxListeners||void 0===jw.setMaxListeners||(0,jw.setMaxListeners)(1/0,t)}catch{}return t}async calculateMultiaddrs(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null!=e){var n,i;if(this.peerId.equals(e))throw new zu("Tried to dial self",q_.ERR_DIALED_SELF);if(!0===await(null===(n=(i=this.connectionGater).denyDialPeer)||void 0===n?void 0:n.call(i,e)))throw new zu("The dial request is blocked by gater.allowDialPeer",q_.ERR_PEER_DIAL_INTERCEPTED);if(0===t.length){cA("loading multiaddrs for %p",e);try{const r=await this.peerStore.get(e);t.push(...r.addresses),cA("loaded multiaddrs for %p",e,t.map((e=>{let{multiaddr:t}=e;return t.toString()})))}catch(h){if(h.code!==q_.ERR_NOT_FOUND)throw h}}}const o=(await Promise.all(t.map((async e=>{const t=await aA(e.multiaddr,r);return 1===t.length&&t[0].equals(e.multiaddr)?e:t.map((e=>({multiaddr:e,isCertified:!1})))})))).flat(),s=o.filter((e=>Boolean(this.transportManager.transportForMultiaddr(e.multiaddr)))),a=new Map;for(const d of s){const e=d.multiaddr.toString(),t=a.get(e);null==t?a.set(e,d):t.isCertified=t.isCertified||d.isCertified||!1}let c=[...a.values()];if((0===c.length||c.length>this.maxPeerAddrsToDial)&&(cA("addresses for %p before filtering",null!==e&&void 0!==e?e:"unknown peer",o.map((e=>{let{multiaddr:t}=e;return t.toString()}))),cA("addresses for %p after filtering",null!==e&&void 0!==e?e:"unknown peer",c.map((e=>{let{multiaddr:t}=e;return t.toString()})))),0===c.length)throw new zu("The dial request has no valid addresses",q_.ERR_NO_VALID_ADDRESSES);if(c.length>this.maxPeerAddrsToDial)throw new zu("dial with more addresses than allowed",q_.ERR_TOO_MANY_ADDRESSES);if(null!=e){const t="/p2p/".concat(e.toString());c=c.map((r=>{const n=r.multiaddr.getPeerId(),i=r.multiaddr.protos().pop();return!0===(null===i||void 0===i?void 0:i.path)?r:n!==e.toString()?{multiaddr:r.multiaddr.encapsulate(t),isCertified:r.isCertified}:r}))}const l=[];for(const d of c)null!=this.connectionGater.denyDialMultiaddr&&await this.connectionGater.denyDialMultiaddr(d.multiaddr)||l.push(d);const u=l.sort(this.addressSorter);if(0===u.length)throw new zu("The connection gater denied all addresses in the dial request",q_.ERR_NO_VALID_ADDRESSES);return u}async performDial(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=e.multiaddrs.map((()=>new AbortController));try{const n=new lS({concurrency:this.maxParallelDialsPerPeer});n.on("error",(e=>{cA.error("error dialling",e)}));const i=await Promise.any(e.multiaddrs.map((async(i,o)=>{const s=r[o];if(null==s)throw new zu("dialAction did not come with an AbortController",q_.ERR_INVALID_PARAMETERS);const a=function(){const e=[];for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];for(const o of r)if(null!=o){try{null===jw.setMaxListeners||void 0===jw.setMaxListeners||(0,jw.setMaxListeners)(1/0,o)}catch{}e.push(o)}const i=Gp(e);try{null===jw.setMaxListeners||void 0===jw.setMaxListeners||(0,jw.setMaxListeners)(1/0,i)}catch{}return i}(s.signal,t.signal);a.addEventListener("abort",(()=>{cA("dial to %s aborted",i)}));const c=Da();return await n.add((async()=>{if(a.aborted)return cA("dial to %s was aborted before reaching the head of the peer dial queue",i),void c.reject(new ju);await this.queue.add((async()=>{try{if(a.aborted)return cA("dial to %s was aborted before reaching the head of the dial queue",i),void c.reject(new ju);e.status="active";const n=await this.transportManager.dial(i,{...t,signal:a});if(s.signal.aborted)return cA("multiple dials succeeded, closing superfluous connection"),n.close().catch((e=>{cA.error("error closing superfluous connection",e)})),void c.reject(new ju);r[o]=void 0,r.forEach((e=>{void 0!==e&&e.abort()})),cA("dial to %s succeeded",i),c.resolve(n)}catch(n){cA.error("error during dial of %s",i,n),c.reject(n)}}),{...t,signal:a}).catch((e=>{c.reject(e)}))}),{signal:a}).catch((e=>{c.reject(e)})).finally((()=>{a.clear()})),c.promise})));if(null==i)throw new zu("successful dial led to empty object returned from peer dial queue",q_.ERR_TRANSPORT_DIAL_FAILED);return e.status="success",i}catch(n){if(e.status="error",1===e.multiaddrs.length&&"AggregateError"===n.name)throw n.errors[0];throw n}}}const hA=Dp("libp2p:connection-manager"),dA=50,fA=300,pA=5,gA=10,mA=25,yA=0,vA=100;class bA{constructor(e){var t,r,n,i,o,s,a,c,l,u,h,d,f,p;let g=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,W.Z)(this,"started",void 0),(0,W.Z)(this,"connections",void 0),(0,W.Z)(this,"allow",void 0),(0,W.Z)(this,"deny",void 0),(0,W.Z)(this,"maxIncomingPendingConnections",void 0),(0,W.Z)(this,"incomingPendingConnections",void 0),(0,W.Z)(this,"maxConnections",void 0),(0,W.Z)(this,"dialQueue",void 0),(0,W.Z)(this,"autoDial",void 0),(0,W.Z)(this,"connectionPruner",void 0),(0,W.Z)(this,"inboundConnectionRateLimiter",void 0),(0,W.Z)(this,"peerStore",void 0),(0,W.Z)(this,"metrics",void 0),(0,W.Z)(this,"events",void 0),this.maxConnections=null!==(t=g.maxConnections)&&void 0!==t?t:fA;const m=null!==(r=g.minConnections)&&void 0!==r?r:dA;if(this.maxConnections<m)throw new zu("Connection Manager maxConnections must be greater than minConnections",q_.ERR_INVALID_PARAMETERS);this.connections=new pE,this.started=!1,this.peerStore=e.peerStore,this.metrics=e.metrics,this.events=e.events,this.onConnect=this.onConnect.bind(this),this.onDisconnect=this.onDisconnect.bind(this),this.events.addEventListener("connection:open",this.onConnect),this.events.addEventListener("connection:close",this.onDisconnect),this.allow=(null!==(n=g.allow)&&void 0!==n?n:[]).map((e=>Xs(e))),this.deny=(null!==(i=g.deny)&&void 0!==i?i:[]).map((e=>Xs(e))),this.incomingPendingConnections=0,this.maxIncomingPendingConnections=null!==(o=g.maxIncomingPendingConnections)&&void 0!==o?o:gA,this.inboundConnectionRateLimiter=new Qp.RateLimiterMemory({points:null!==(s=g.inboundConnectionThreshold)&&void 0!==s?s:pA,duration:1}),this.autoDial=new rA({connectionManager:this,peerStore:e.peerStore,events:e.events},{minConnections:m,autoDialConcurrency:null!==(a=g.autoDialConcurrency)&&void 0!==a?a:mA,autoDialPriority:null!==(c=g.autoDialPriority)&&void 0!==c?c:yA,maxQueueLength:null!==(l=g.autoDialMaxQueueLength)&&void 0!==l?l:vA}),this.connectionPruner=new oA({connectionManager:this,peerStore:e.peerStore,events:e.events},{maxConnections:this.maxConnections,allow:this.allow}),this.dialQueue=new uA({peerId:e.peerId,metrics:e.metrics,peerStore:e.peerStore,transportManager:e.transportManager,connectionGater:e.connectionGater},{addressSorter:null!==(u=g.addressSorter)&&void 0!==u?u:P_,maxParallelDials:null!==(h=g.maxParallelDials)&&void 0!==h?h:100,maxPeerAddrsToDial:null!==(d=g.maxPeerAddrsToDial)&&void 0!==d?d:25,dialTimeout:null!==(f=g.dialTimeout)&&void 0!==f?f:3e4,resolvers:null!==(p=g.resolvers)&&void 0!==p?p:{dnsaddr:z_}})}isStarted(){return this.started}async start(){var e,t,r;null===(e=this.metrics)||void 0===e||e.registerMetricGroup("libp2p_connection_manager_connections",{calculate:()=>{const e={inbound:0,outbound:0};for(const t of this.connections.values())for(const r of t)"inbound"===r.stat.direction?e.inbound++:e.outbound++;return e}}),null===(t=this.metrics)||void 0===t||t.registerMetricGroup("libp2p_protocol_streams_total",{label:"protocol",calculate:()=>{const e={};for(const n of this.connections.values())for(const i of n)for(const n of i.streams){var t,r;const i="".concat(n.stat.direction," ").concat(null!==(t=n.stat.protocol)&&void 0!==t?t:"unnegotiated");e[i]=(null!==(r=e[i])&&void 0!==r?r:0)+1}return e}}),null===(r=this.metrics)||void 0===r||r.registerMetricGroup("libp2p_connection_manager_protocol_streams_per_connection_90th_percentile",{label:"protocol",calculate:()=>{const e={};for(const o of this.connections.values())for(const i of o){const o={};for(const e of i.streams){var t,r;const n="".concat(e.stat.direction," ").concat(null!==(t=e.stat.protocol)&&void 0!==t?t:"unnegotiated");o[n]=(null!==(r=o[n])&&void 0!==r?r:0)+1}for(const[t,r]of Object.entries(o)){var n;e[t]=null!==(n=e[t])&&void 0!==n?n:[],e[t].push(r)}}const i={};for(let[o,s]of Object.entries(e)){s=s.sort(((e,t)=>e-t));const e=Math.floor(.9*s.length);i[o]=s[e]}return i}}),this.autoDial.start(),this.started=!0,hA("started")}async afterStart(){Promise.resolve().then((async()=>{const e=await this.peerStore.all({filters:[e=>e.tags.has("keep-alive")]});await Promise.all(e.map((async e=>{await this.openConnection(e.id).catch((e=>{hA.error(e)}))})))})).catch((e=>{hA.error(e)})),this.autoDial.afterStart()}async stop(){this.dialQueue.stop(),this.autoDial.stop();const e=[];for(const t of this.connections.values())for(const r of t)e.push((async()=>{try{await r.close()}catch(e){hA.error(e)}})());hA("closing %d connections",e.length),await Promise.all(e),this.connections.clear(),hA("stopped")}onConnect(e){this._onConnect(e).catch((e=>{hA.error(e)}))}async _onConnect(e){const{detail:t}=e;if(!this.started)return void await t.close();const r=t.remotePeer,n=this.connections.get(r);let i=!1;null!=n?n.push(t):(i=!0,this.connections.set(r,[t])),null!=r.publicKey&&"RSA"===r.type&&await this.peerStore.patch(r,{publicKey:r.publicKey}),i&&this.events.safeDispatchEvent("peer:connect",{detail:t.remotePeer})}onDisconnect(e){const{detail:t}=e;if(!this.started)return;const r=t.remotePeer;let n=this.connections.get(r);null!=n&&n.length>1?(n=n.filter((e=>e.id!==t.id)),this.connections.set(r,n)):null!=n&&(this.connections.delete(r),this.events.safeDispatchEvent("peer:disconnect",{detail:t.remotePeer}))}getConnections(e){var t;if(null!=e)return null!==(t=this.connections.get(e))&&void 0!==t?t:[];let r=[];for(const n of this.connections.values())r=r.concat(n);return r}getConnectionsMap(){return this.connections}async openConnection(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isStarted())throw new zu("Not started",q_.ERR_NODE_NOT_STARTED);const{peerId:n}=H_(e);if(null!=n){hA("dial %p",n);const e=this.getConnections(n);if(e.length>0)return hA("had an existing connection to %p",n),e[0]}const i=await this.dialQueue.dial(e,{...r,priority:null!==(t=r.priority)&&void 0!==t?t:50});let o=this.connections.get(i.remotePeer);null==o&&(o=[],this.connections.set(i.remotePeer,o));let s=!1;for(const a of o)a.id===i.id&&(s=!0);return s||o.push(i),i}async closeConnections(e){var t;const r=null!==(t=this.connections.get(e))&&void 0!==t?t:[];await Promise.all(r.map((async e=>{await e.close()})))}async acceptIncomingConnection(e){if(this.deny.some((t=>e.remoteAddr.toString().startsWith(t.toString()))))return hA("connection from %s refused - connection remote address was in deny list",e.remoteAddr),!1;if(this.allow.some((t=>e.remoteAddr.toString().startsWith(t.toString()))))return this.incomingPendingConnections++,!0;if(this.incomingPendingConnections===this.maxIncomingPendingConnections)return hA("connection from %s refused - incomingPendingConnections exceeded by peer %s",e.remoteAddr),!1;if(e.remoteAddr.isThinWaistAddress()){const t=e.remoteAddr.nodeAddress().address;try{await this.inboundConnectionRateLimiter.consume(t,1)}catch{return hA("connection from %s refused - inboundConnectionThreshold exceeded by host %s",t,e.remoteAddr),!1}}return this.getConnections().length<this.maxConnections?(this.incomingPendingConnections++,!0):(hA("connection from %s refused - maxConnections exceeded",e.remoteAddr),!1)}afterUpgradeInbound(){this.incomingPendingConnections--}getDialQueue(){return this.dialQueue.pendingDials}}const wA=function(e,t){if(null!=e[Symbol.asyncIterator])return async function*(){for await(const r of e)yield t(r)}();const r=JS(e),{value:n,done:i}=r.next();if(!0===i)return function*(){}();const o=t(n);if("function"===typeof o.then)return async function*(){yield await o;for await(const e of r)yield t(e)}();const s=t;return function*(){yield o;for(const e of r)yield s(e)}()};async function*EA(e,t){yield*wA(e,(async e=>(await t.merge(e.id,{multiaddrs:e.multiaddrs}),e)))}function SA(e){const t=new Set;return XS(e,(e=>!t.has(e.id.toString())&&(t.add(e.id.toString()),!0)))}function _A(e){try{let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return async function*(){let r=0;for await(const t of e)r++,yield t;if(r<t)throw new zu("more peers required, seen: ".concat(r," min: ").concat(t),"NOT_FOUND")}()}catch(t){return Promise.reject(t)}}class AA{constructor(e,t){var r;(0,W.Z)(this,"routers",void 0),(0,W.Z)(this,"started",void 0),(0,W.Z)(this,"components",void 0),this.routers=null!==(r=t.routers)&&void 0!==r?r:[],this.started=!1,this.components=e}isStarted(){return this.started}async start(){this.started=!0}async stop(){this.started=!1}findProviders(e){try{var t=this;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return async function*(){if(0===t.routers.length)throw new zu("No content routers available",q_.ERR_NO_ROUTERS_AVAILABLE);yield*za(ja(...t.routers.map((t=>t.findProviders(e,r)))),(e=>EA(e,t.components.peerStore)),(e=>SA(e)),(e=>_A(e)))}()}catch(r){return Promise.reject(r)}}async provide(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(0===this.routers.length)throw new zu("No content routers available",q_.ERR_NO_ROUTERS_AVAILABLE);await Promise.all(this.routers.map((async r=>{await r.provide(e,t)})))}async put(e,t,r){if(!this.isStarted())throw new zu(K_.NOT_STARTED_YET,q_.DHT_NOT_STARTED);await Promise.all(this.routers.map((async n=>{await n.put(e,t,r)})))}async get(e,t){if(!this.isStarted())throw new zu(K_.NOT_STARTED_YET,q_.DHT_NOT_STARTED);return Promise.any(this.routers.map((async r=>r.get(e,t))))}}const kA=function(e){if(null!=e[Symbol.asyncIterator])return(async()=>{for await(const t of e)return t})();for(const t of e)return t},CA=Dp("libp2p:peer-routing");class xA{constructor(e,t){var r;(0,W.Z)(this,"components",void 0),(0,W.Z)(this,"routers",void 0),this.components=e,this.routers=null!==(r=t.routers)&&void 0!==r?r:[]}async findPeer(e,t){if(0===this.routers.length)throw new zu("No peer routers available",q_.ERR_NO_ROUTERS_AVAILABLE);if(e.toString()===this.components.peerId.toString())throw new zu("Should not try to find self",q_.ERR_FIND_SELF);const r=await za(ja(...this.routers.map((r=>async function*(){try{yield await r.findPeer(e,t)}catch(n){CA.error(n)}}()))),(e=>XS(e,Boolean)),(e=>EA(e,this.components.peerStore)),(async e=>kA(e)));if(null!=r)return r;throw new zu(K_.NOT_FOUND,q_.ERR_NOT_FOUND)}async*getClosestPeers(e,t){if(0===this.routers.length)throw new zu("No peer routers available",q_.ERR_NO_ROUTERS_AVAILABLE);yield*za(ja(...this.routers.map((r=>r.getClosestPeers(e,t)))),(e=>EA(e,this.components.peerStore)),(e=>SA(e)),(e=>_A(e)))}}const IA=Dp("libp2p:registrar");class RA{constructor(e){(0,W.Z)(this,"topologies",void 0),(0,W.Z)(this,"handlers",void 0),(0,W.Z)(this,"components",void 0),this.topologies=new Map,this.handlers=new Map,this.components=e,this._onDisconnect=this._onDisconnect.bind(this),this._onPeerUpdate=this._onPeerUpdate.bind(this),this._onConnect=this._onConnect.bind(this),this.components.events.addEventListener("peer:disconnect",this._onDisconnect),this.components.events.addEventListener("peer:connect",this._onConnect),this.components.events.addEventListener("peer:update",this._onPeerUpdate)}getProtocols(){return Array.from(new Set([...this.handlers.keys()])).sort()}getHandler(e){const t=this.handlers.get(e);if(null==t)throw new zu("No handler registered for protocol ".concat(e),q_.ERR_NO_HANDLER_FOR_PROTOCOL);return t}getTopologies(e){const t=this.topologies.get(e);return null==t?[]:[...t.values()]}async handle(e,t,r){if(this.handlers.has(e))throw new zu("Handler already registered for protocol ".concat(e),q_.ERR_PROTOCOL_HANDLER_ALREADY_REGISTERED);const n=Yw.bind({ignoreUndefined:!0})({maxInboundStreams:32,maxOutboundStreams:64},r);this.handlers.set(e,{handler:t,options:n}),await this.components.peerStore.merge(this.components.peerId,{protocols:[e]})}async unhandle(e){const t=Array.isArray(e)?e:[e];t.forEach((e=>{this.handlers.delete(e)})),await this.components.peerStore.patch(this.components.peerId,{protocols:t})}async register(e,t){if(null==(r=t)||!Boolean(r[hb]))throw IA.error("topology must be an instance of interfaces/topology"),new zu("topology must be an instance of interfaces/topology",q_.ERR_INVALID_PARAMETERS);var r;const n="".concat((1e9*Math.random()).toString(36)).concat(Date.now());let i=this.topologies.get(e);return null==i&&(i=new Map,this.topologies.set(e,i)),i.set(n,t),await t.setRegistrar(this),n}unregister(e){for(const[t,r]of this.topologies.entries())r.has(e)&&(r.delete(e),0===r.size&&this.topologies.delete(t))}_onDisconnect(e){const t=e.detail;this.components.peerStore.get(t).then((e=>{for(const r of e.protocols){const e=this.topologies.get(r);if(null!=e)for(const r of e.values())r.onDisconnect(t)}})).catch((e=>{e.code!==q_.ERR_NOT_FOUND&&IA.error("could not inform topologies of disconnecting peer %p",t,e)}))}_onConnect(e){const t=e.detail;this.components.peerStore.get(t).then((e=>{const r=this.components.connectionManager.getConnections(e.id)[0];if(null!=r)for(const n of e.protocols){const e=this.topologies.get(n);if(null!=e)for(const n of e.values())n.onConnect(t,r)}else IA("peer %p connected but the connection manager did not have a connection",e)})).catch((e=>{e.code!==q_.ERR_NOT_FOUND&&IA.error("could not inform topologies of connecting peer %p",t,e)}))}_onPeerUpdate(e){var t;const{peer:r,previous:n}=e.detail,i=(null!==(t=null===n||void 0===n?void 0:n.protocols)&&void 0!==t?t:[]).filter((e=>!r.protocols.includes(e))),o=r.protocols.filter((e=>{var t;return!(null!==(t=null===n||void 0===n?void 0:n.protocols)&&void 0!==t?t:[]).includes(e)}));for(const s of i){const e=this.topologies.get(s);if(null!=e)for(const t of e.values())t.onDisconnect(r.id)}for(const s of o){const e=this.topologies.get(s);if(null!=e)for(const t of e.values()){const e=this.components.connectionManager.getConnections(r.id)[0];null!=e&&t.onConnect(r.id,e)}}}}class PA extends Map{constructor(e){super(),(0,W.Z)(this,"metric",void 0);const{name:t,metrics:r}=e;this.metric=r.registerMetric(t),this.updateComponentMetric()}set(e,t){return super.set(e,t),this.updateComponentMetric(),this}delete(e){const t=super.delete(e);return this.updateComponentMetric(),t}clear(){super.clear(),this.updateComponentMetric()}updateComponentMetric(){this.metric.update(this.size)}}const TA=Dp("libp2p:transports");class NA{constructor(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,W.Z)(this,"components",void 0),(0,W.Z)(this,"transports",void 0),(0,W.Z)(this,"listeners",void 0),(0,W.Z)(this,"faultTolerance",void 0),(0,W.Z)(this,"started",void 0),this.components=e,this.started=!1,this.transports=new Map,this.listeners=function(e){const{name:t,metrics:r}=e;let n;return n=null!=r?new PA({name:t,metrics:r}):new Map,n}({name:"libp2p_transport_manager_listeners",metrics:this.components.metrics}),this.faultTolerance=null!==(t=r.faultTolerance)&&void 0!==t?t:Eg.FATAL_ALL}add(e){const t=e[Symbol.toStringTag];if(null==t)throw new zu("Transport must have a valid tag",q_.ERR_INVALID_KEY);if(this.transports.has(t))throw new zu("There is already a transport with the tag ".concat(t),q_.ERR_DUPLICATE_TRANSPORT);TA("adding transport %s",t),this.transports.set(t,e),this.listeners.has(t)||this.listeners.set(t,[])}isStarted(){return this.started}start(){this.started=!0}async afterStart(){const e=this.components.addressManager.getListenAddrs();await this.listen(e)}async stop(){const e=[];for(const[t,r]of this.listeners)for(TA("closing listeners for %s",t);r.length>0;){const t=r.pop();null!=t&&e.push(t.close())}await Promise.all(e),TA("all listeners closed");for(const t of this.listeners.keys())this.listeners.set(t,[]);this.started=!1}async dial(e,t){const r=this.transportForMultiaddr(e);if(null==r)throw new zu("No transport available for address ".concat(String(e)),q_.ERR_TRANSPORT_UNAVAILABLE);try{return await r.dial(e,{...t,upgrader:this.components.upgrader})}catch(n){throw null==n.code&&(n.code=q_.ERR_TRANSPORT_DIAL_FAILED),n}}getAddrs(){let e=[];for(const t of this.listeners.values())for(const r of t)e=[...e,...r.getAddrs()];return e}getTransports(){return Array.of(...this.transports.values())}getListeners(){return Array.of(...this.listeners.values()).flat()}transportForMultiaddr(e){for(const t of this.transports.values()){if(t.filter([e]).length>0)return t}}async listen(e){if(null==e||0===e.length)return void TA("no addresses were provided for listening, this node is dial only");const t=[];for(const[n,i]of this.transports.entries()){const o=i.filter(e),s=[];for(const e of o){var r;TA("creating listener for %s on %s",n,e);const t=i.createListener({upgrader:this.components.upgrader});let o=null!==(r=this.listeners.get(n))&&void 0!==r?r:[];null==o&&(o=[],this.listeners.set(n,o)),o.push(t),t.addEventListener("listening",(()=>{this.components.events.safeDispatchEvent("transport:listening",{detail:t})})),t.addEventListener("close",(()=>{const e=o.findIndex((e=>e===t));o.splice(e,1),this.components.events.safeDispatchEvent("transport:close",{detail:t})})),s.push(t.listen(e))}if(0===s.length){t.push(n);continue}if(null==(await Promise.allSettled(s)).find((e=>"fulfilled"===e.status))&&this.faultTolerance!==Eg.NO_FATAL)throw new zu("Transport (".concat(n,") could not listen on any available address"),q_.ERR_NO_VALID_ADDRESSES)}if(t.length===this.transports.size){const e="no valid addresses were provided for transports [".concat(t.join(", "),"]");if(this.faultTolerance===Eg.FATAL_ALL)throw new zu(e,q_.ERR_NO_VALID_ADDRESSES);TA("libp2p in dial mode only: ".concat(e))}}async remove(e){TA("removing %s",e);for(const r of null!==(t=this.listeners.get(e))&&void 0!==t?t:[]){var t;await r.close()}this.transports.delete(e),this.listeners.delete(e)}async removeAll(){const e=[];for(const t of this.transports.keys())e.push(this.remove(t));await Promise.all(e)}}const DA="/multistream/1.0.0";function OA(e){const t=La(),r=function(e){const t=async function*(){let t=yield,r=new da;for await(const n of e)if(null!=t)for(r.append(n);r.length>=t;){const e=r.sublist(0,t);if(r.consume(t),t=yield e,null==t){r.length>0&&(t=yield r,r=new da);break}}else r.append(n),t=yield r,r=new da;if(null!=t)throw Object.assign(new Error("stream ended before ".concat(t," bytes became available")),{code:"ERR_UNDER_READ",buffer:r})}();return t.next(),t}(e.source),n=Da();let i;const o=e.sink(async function*(){yield*t;const e=await n.promise;yield*e}());o.catch((e=>{i=e}));return{reader:r,writer:t,stream:{sink:async e=>{null==i?(n.resolve(e),await o):await Promise.reject(i)},source:r},rest:()=>t.end(),write:t.push,read:async()=>{const e=await r.next();if(null!=e.value)return e.value}}}const MA=Dp("libp2p:mss"),BA=xn("\n");function LA(e){const t=new da(e,BA);return Ia.single(t)}function UA(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=LA(t);!0===r.writeBytes?e.push(n.subarray()):e.push(n)}function FA(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=new da;for(const i of t)n.append(LA(i));!0===r.writeBytes?e.push(n.subarray()):e.push(n)}async function jA(e,t){const r=await async function(e,t){let r=1;const n={[Symbol.asyncIterator]:()=>n,next:async()=>e.next(r)};let i=n;null!=(null===t||void 0===t?void 0:t.signal)&&(i=Vp(n,t.signal));const o=e=>{r=e},s=await za(i,(e=>Na(e,{onLength:o,maxDataLength:1024})),(async e=>kA(e)));if(null==s||0===s.length)throw new zu("no buffer returned","ERR_INVALID_MULTISTREAM_SELECT_MESSAGE");if(s.get(s.byteLength-1)!==BA[0])throw MA.error("Invalid mss message - missing newline - %s",s.subarray()),new zu("missing newline","ERR_INVALID_MULTISTREAM_SELECT_MESSAGE");return s.sublist(0,-1)}(e,t);return In(r.subarray())}const zA=Dp("libp2p:mss:select");async function KA(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};t=Array.isArray(t)?[...t]:[t];const{reader:n,writer:i,rest:o,stream:s}=OA(e),a=t.shift();if(null==a)throw new Error("At least one protocol must be specified");zA.trace('select: write ["%s", "%s"]',DA,a);const c=xn(DA),l=xn(a);FA(i,[c,l],r);let u=await jA(n,r);if(zA.trace('select: read "%s"',u),u===DA&&(u=await jA(n,r),zA.trace('select: read "%s"',u)),u===a)return o(),{stream:s,protocol:a};for(const h of t){zA.trace('select: write "%s"',h),UA(i,xn(h),r);const e=await jA(n,r);if(zA.trace('select: read "%s" for "%s"',e,h),e===h)return o(),{stream:s,protocol:h}}throw o(),new zu("protocol selection failed","ERR_UNSUPPORTED_PROTOCOL")}const qA=Dp("libp2p:mss:handle");async function ZA(e,t,r){t=Array.isArray(t)?t:[t];const{writer:n,reader:i,rest:o,stream:s}=OA(e);for(;;){const e=await jA(i,r);if(qA.trace('read "%s"',e),e!==DA){if(t.includes(e))return UA(n,xn(e),r),qA.trace('respond with "%s" for "%s"',e,e),o(),{stream:s,protocol:e};"ls"!==e?(UA(n,xn("na"),r),qA('respond with "na" for "%s"',e)):(UA(n,new da(...t.map((e=>LA(xn(e))))),r),qA.trace('respond with "%s" for %s',t,e))}else qA.trace('respond with "%s" for "%s"',DA,e),UA(n,xn(DA),r)}}const VA=Symbol.for("@libp2p/connection");const HA="CLOSING",WA="CLOSED";let GA;const YA=Dp("libp2p:connection");GA=Symbol.toStringTag;class QA{constructor(e){(0,W.Z)(this,"id",void 0),(0,W.Z)(this,"remoteAddr",void 0),(0,W.Z)(this,"remotePeer",void 0),(0,W.Z)(this,"stat",void 0),(0,W.Z)(this,"tags",void 0),(0,W.Z)(this,"_newStream",void 0),(0,W.Z)(this,"_close",void 0),(0,W.Z)(this,"_getStreams",void 0),(0,W.Z)(this,"_closing",void 0),(0,W.Z)(this,GA,"Connection"),(0,W.Z)(this,VA,!0);const{remoteAddr:t,remotePeer:r,newStream:n,close:i,getStreams:o,stat:s}=e;this.id="".concat(parseInt(String(1e9*Math.random())).toString(36)).concat(Date.now()),this.remoteAddr=t,this.remotePeer=r,this.stat={...s,status:"OPEN"},this._newStream=n,this._close=i,this._getStreams=o,this.tags=[],this._closing=!1}get streams(){return this._getStreams()}async newStream(e,t){if(this.stat.status===HA)throw new zu("the connection is being closed","ERR_CONNECTION_BEING_CLOSED");if(this.stat.status===WA)throw new zu("the connection is closed","ERR_CONNECTION_CLOSED");Array.isArray(e)||(e=[e]);const r=await this._newStream(e,t);return r.stat.direction="outbound",r}addStream(e){e.stat.direction="inbound"}removeStream(e){}async close(){if(this.stat.status!==WA&&!this._closing){this.stat.status=HA;try{this.streams.forEach((e=>{e.close()}))}catch(e){YA.error(e)}this._closing=!0,await this._close(),this._closing=!1,this.stat.timeline.close=Date.now(),this.stat.status=WA}}}const JA=Dp("libp2p:upgrader");function XA(e,t){var r;let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{const{options:r}=t.getHandler(e);if(null!=r.maxOutboundStreams)return r.maxOutboundStreams}catch(i){if(i.code!==q_.ERR_NO_HANDLER_FOR_PROTOCOL)throw i}return null!==(r=n.maxOutboundStreams)&&void 0!==r?r:64}function $A(e,t,r){let n=0;return r.streams.forEach((r=>{r.stat.direction===t&&r.stat.protocol===e&&n++})),n}class ek{constructor(e,t){var r;(0,W.Z)(this,"components",void 0),(0,W.Z)(this,"connectionEncryption",void 0),(0,W.Z)(this,"muxers",void 0),(0,W.Z)(this,"inboundUpgradeTimeout",void 0),(0,W.Z)(this,"events",void 0),this.components=e,this.connectionEncryption=new Map,t.connectionEncryption.forEach((e=>{this.connectionEncryption.set(e.protocol,e)})),this.muxers=new Map,t.muxers.forEach((e=>{this.muxers.set(e.protocol,e)})),this.inboundUpgradeTimeout=null!==(r=t.inboundUpgradeTimeout)&&void 0!==r?r:3e4,this.events=e.events}async shouldBlockConnection(e,t,r){const n=this.components.connectionGater[r];if(void 0!==n&&await n(e,t))throw new zu("The multiaddr connection is blocked by gater.".concat(r),q_.ERR_CONNECTION_INTERCEPTED)}async upgradeInbound(e,t){if(!await this.components.connectionManager.acceptIncomingConnection(e))throw new zu("connection denied",q_.ERR_CONNECTION_DENIED);let r,n,i,o,s;const a=Gp([AbortSignal.timeout(this.inboundUpgradeTimeout)]);try{null===jw.setMaxListeners||void 0===jw.setMaxListeners||(0,jw.setMaxListeners)(1/0,a)}catch{}try{var c,l,u;const d=Wp(e,a);if(e.source=d.source,e.sink=d.sink,!0===await(null===(c=(l=this.components.connectionGater).denyInboundConnection)||void 0===c?void 0:c.call(l,e)))throw new zu("The multiaddr connection is blocked by gater.acceptConnection",q_.ERR_CONNECTION_INTERCEPTED);null===(u=this.components.metrics)||void 0===u||u.trackMultiaddrConnection(e),JA("starting the inbound connection upgrade");let f=e;if(!0!==(null===t||void 0===t?void 0:t.skipProtection)){const t=this.components.connectionProtector;null!=t&&(JA("protecting the inbound connection"),f=await t.protect(e))}try{if(r=f,!0!==(null===t||void 0===t?void 0:t.skipEncryption)){({conn:r,remotePeer:n,protocol:s}=await this._encryptInbound(f));const e={...f,...r};await this.shouldBlockConnection(n,e,"denyInboundEncryptedConnection")}else{const t=e.remoteAddr.getPeerId();if(null==t)throw new zu("inbound connection that skipped encryption must have a peer id",q_.ERR_INVALID_MULTIADDR);const r=Sp(t);s="native",n=r}if(i=r,null!=(null===t||void 0===t?void 0:t.muxerFactory))o=t.muxerFactory;else if(this.muxers.size>0){const e=await this._multiplexInbound({...f,...r},this.muxers);o=e.muxerFactory,i=e.stream}}catch(h){throw JA.error("Failed to upgrade inbound connection",h),h}return await this.shouldBlockConnection(n,e,"denyInboundUpgradedConnection"),JA("Successfully upgraded inbound connection"),this._createConnection({cryptoProtocol:s,direction:"inbound",maConn:e,upgradedConn:i,muxerFactory:o,remotePeer:n})}finally{this.components.connectionManager.afterUpgradeInbound(),a.clear()}}async upgradeOutbound(e,t){var r;const n=e.remoteAddr.getPeerId();let i,o,s,a,c,l;null!=n&&(i=Sp(n),await this.shouldBlockConnection(i,e,"denyOutboundConnection")),null===(r=this.components.metrics)||void 0===r||r.trackMultiaddrConnection(e),JA("Starting the outbound connection upgrade");let u=e;if(!0!==(null===t||void 0===t?void 0:t.skipProtection)){const t=this.components.connectionProtector;null!=t&&(u=await t.protect(e))}try{if(o=u,!0!==(null===t||void 0===t?void 0:t.skipEncryption)){({conn:o,remotePeer:s,protocol:c}=await this._encryptOutbound(u,i));const e={...u,...o};await this.shouldBlockConnection(s,e,"denyOutboundEncryptedConnection")}else{if(null==i)throw new zu("Encryption was skipped but no peer id was passed",q_.ERR_INVALID_PEER);c="native",s=i}if(a=o,null!=(null===t||void 0===t?void 0:t.muxerFactory))l=t.muxerFactory;else if(this.muxers.size>0){const e=await this._multiplexOutbound({...u,...o},this.muxers);l=e.muxerFactory,a=e.stream}}catch(h){throw JA.error("Failed to upgrade outbound connection",h),await e.close(h),h}return await this.shouldBlockConnection(s,e,"denyOutboundUpgradedConnection"),JA("Successfully upgraded outbound connection"),this._createConnection({cryptoProtocol:c,direction:"outbound",maConn:e,upgradedConn:a,muxerFactory:l,remotePeer:s})}_createConnection(e){var t,r,n=this;const{cryptoProtocol:i,direction:o,maConn:s,upgradedConn:a,remotePeer:c,muxerFactory:l}=e;let u,h,d;null!=l&&(u=l.createStreamMuxer({direction:o,onIncomingStream:e=>{null!=d&&Promise.resolve().then((async()=>{var t;const r=this.components.registrar.getProtocols(),{stream:n,protocol:i}=await ZA(e,r);if(JA("%s: incoming stream opened on %s",o,i),null==d)return;const s=function(e,t){try{const{options:r}=t.getHandler(e);return r.maxInboundStreams}catch(r){if(r.code!==q_.ERR_NO_HANDLER_FOR_PROTOCOL)throw r}return 32}(i,this.components.registrar);if($A(i,"inbound",d)===s){const t=new zu('Too many inbound protocol streams for protocol "'.concat(i,'" - limit ').concat(s),q_.ERR_TOO_MANY_INBOUND_PROTOCOL_STREAMS);throw e.abort(t),t}e.source=n.source,e.sink=n.sink,e.stat.protocol=i,await this.components.peerStore.merge(c,{protocols:[i]}),d.addStream(e),null===(t=this.components.metrics)||void 0===t||t.trackProtocolStream(e,d),this._onStream({connection:d,stream:e,protocol:i})})).catch((t=>{JA.error(t),null==e.stat.timeline.close&&e.close()}))},onStreamEnd:e=>{var t;null===(t=d)||void 0===t||t.removeStream(e.id)}}),h=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==u)throw new zu("Stream is not multiplexed",q_.ERR_MUXER_UNAVAILABLE);JA("%s: starting new stream on %s",o,e);const r=await u.newStream();try{var i;if(null==t.signal){JA("No abort signal was passed while trying to negotiate protocols %s falling back to default timeout",e),t.signal=AbortSignal.timeout(3e4);try{null===jw.setMaxListeners||void 0===jw.setMaxListeners||(0,jw.setMaxListeners)(1/0,t.signal)}catch{}}const{stream:o,protocol:s}=await KA(r,e,t),a=XA(s,n.components.registrar,t);if($A(s,"outbound",d)>=a){const e=new zu('Too many outbound protocol streams for protocol "'.concat(s,'" - limit ').concat(a),q_.ERR_TOO_MANY_OUTBOUND_PROTOCOL_STREAMS);throw r.abort(e),e}return await n.components.peerStore.merge(c,{protocols:[s]}),r.source=o.source,r.sink=o.sink,r.stat.protocol=s,null===(i=n.components.metrics)||void 0===i||i.trackProtocolStream(r,d),r}catch(s){if(JA.error("could not create new stream",s),null==r.stat.timeline.close&&r.close(),null!=s.code)throw s;throw new zu(String(s),q_.ERR_UNSUPPORTED_PROTOCOL)}},Promise.all([u.sink(a.source),a.sink(u.source)]).catch((e=>{JA.error(e)})));const f=s.timeline;s.timeline=new Proxy(f,{set:function(){return null!=d&&"close"===(arguments.length<=1?void 0:arguments[1])&&null!=(arguments.length<=2?void 0:arguments[2])&&null==f.close&&(async()=>{try{"OPEN"===d.stat.status&&await d.close()}catch(e){JA.error(e)}finally{n.events.safeDispatchEvent("connection:close",{detail:d})}})().catch((e=>{JA.error(e)})),Reflect.set(...arguments)}}),s.timeline.upgraded=Date.now();const p=()=>{throw new zu("connection is not multiplexed",q_.ERR_CONNECTION_NOT_MULTIPLEXED)};var g;return g={remoteAddr:s.remoteAddr,remotePeer:c,stat:{status:"OPEN",direction:o,timeline:s.timeline,multiplexer:null===(t=u)||void 0===t?void 0:t.protocol,encryption:i},newStream:null!==(r=h)&&void 0!==r?r:p,getStreams:()=>null!=u?u.streams:p(),close:async()=>{await s.close(),null!=u&&u.close()}},d=new QA(g),this.events.safeDispatchEvent("connection:open",{detail:d}),d}_onStream(e){const{connection:t,stream:r,protocol:n}=e,{handler:i}=this.components.registrar.getHandler(n);i({connection:t,stream:r})}async _encryptInbound(e){const t=Array.from(this.connectionEncryption.keys());JA("handling inbound crypto protocol selection",t);try{const{stream:r,protocol:n}=await ZA(e,t,{writeBytes:!0}),i=this.connectionEncryption.get(n);if(null==i)throw new Error("no crypto module found for ".concat(n));return JA("encrypting inbound connection..."),{...await i.secureInbound(this.components.peerId,r),protocol:n}}catch(r){throw new zu(String(r),q_.ERR_ENCRYPTION_FAILED)}}async _encryptOutbound(e,t){const r=Array.from(this.connectionEncryption.keys());JA("selecting outbound crypto protocol",r);try{const{stream:n,protocol:i}=await KA(e,r,{writeBytes:!0}),o=this.connectionEncryption.get(i);if(null==o)throw new Error("no crypto module found for ".concat(i));return JA("encrypting outbound connection to %p",t),{...await o.secureOutbound(this.components.peerId,n,t),protocol:i}}catch(n){throw new zu(String(n),q_.ERR_ENCRYPTION_FAILED)}}async _multiplexOutbound(e,t){const r=Array.from(t.keys());JA("outbound selecting muxer %s",r);try{const{stream:n,protocol:i}=await KA(e,r,{writeBytes:!0});JA("%s selected as muxer protocol",i);return{stream:n,muxerFactory:t.get(i)}}catch(n){throw JA.error("error multiplexing outbound stream",n),new zu(String(n),q_.ERR_MUXER_UNAVAILABLE)}}async _multiplexInbound(e,t){const r=Array.from(t.keys());JA("inbound handling muxers %s",r);try{const{stream:n,protocol:i}=await ZA(e,r,{writeBytes:!0});return{stream:n,muxerFactory:t.get(i)}}catch(n){throw JA.error("error multiplexing inbound stream",n),new zu(String(n),q_.ERR_MUXER_UNAVAILABLE)}}}const tk=Dp("libp2p");var rk=new WeakMap,nk=new WeakSet;class ik extends ea{constructor(e){var t,r,n,i,o,s;super(),Uw(this,nk),(0,W.Z)(this,"peerId",void 0),(0,W.Z)(this,"peerStore",void 0),(0,W.Z)(this,"contentRouting",void 0),(0,W.Z)(this,"peerRouting",void 0),(0,W.Z)(this,"keychain",void 0),(0,W.Z)(this,"metrics",void 0),(0,W.Z)(this,"services",void 0),(0,W.Z)(this,"components",void 0),Ai(this,rk,{writable:!0,value:void 0});const a=new ea,c=a.dispatchEvent.bind(a);a.dispatchEvent=e=>{const t=c(e),r=this.dispatchEvent(new ra(e.type,{detail:e.detail}));return t||r};try{null===jw.setMaxListeners||void 0===jw.setMaxListeners||(0,jw.setMaxListeners)(1/0,a)}catch{}xi(this,rk,!1),this.peerId=e.peerId,this.services={};const l=this.components=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=new c_(e),r=new Proxy(t,{get(e,r,n){if("string"===typeof r&&!u_.includes(r)){const e=t.components[r];if(null==e&&!l_.includes(r))throw new zu("".concat(r," not set"),"ERR_SERVICE_MISSING");return e}return Reflect.get(e,r,n)},set:(e,r,n)=>("string"===typeof r?t.components[r]=n:Reflect.set(e,r,n),!0)});return r}({peerId:e.peerId,events:a,datastore:null!==(t=e.datastore)&&void 0!==t?t:new r_,connectionGater:I_(e.connectionGater)});this.peerStore=this.configureComponent("peerStore",new GS(l,{addressFilter:this.components.connectionGater.filterMultiaddrForPeer,...e.peerStore})),null!=e.metrics&&(this.metrics=this.configureComponent("metrics",e.metrics(this.components))),l.events.addEventListener("peer:update",(e=>{null==e.detail.previous&&this.safeDispatchEvent("peer:discovery",{detail:e.detail.peer})})),null!=e.connectionProtector&&this.configureComponent("connectionProtector",e.connectionProtector(l)),this.components.upgrader=new ek(this.components,{connectionEncryption:(null!==(r=e.connectionEncryption)&&void 0!==r?r:[]).map(((e,t)=>this.configureComponent("connection-encryption-".concat(t),e(this.components)))),muxers:(null!==(n=e.streamMuxers)&&void 0!==n?n:[]).map(((e,t)=>this.configureComponent("stream-muxers-".concat(t),e(this.components)))),inboundUpgradeTimeout:e.connectionManager.inboundUpgradeTimeout}),this.configureComponent("transportManager",new NA(this.components,e.transportManager)),this.configureComponent("connectionManager",new bA(this.components,e.connectionManager)),this.configureComponent("registrar",new RA(this.components)),this.configureComponent("addressManager",new s_(this.components,e.addresses));const u=lE.generateOptions();this.keychain=this.configureComponent("keyChain",new lE(this.components,{...u,...e.keychain}));const h=(null!==(i=e.peerRouters)&&void 0!==i?i:[]).map(((e,t)=>this.configureComponent("peer-router-".concat(t),e(this.components))));this.peerRouting=this.components.peerRouting=this.configureComponent("peerRouting",new xA(this.components,{routers:h}));const d=(null!==(o=e.contentRouters)&&void 0!==o?o:[]).map(((e,t)=>this.configureComponent("content-router-".concat(t),e(this.components))));if(this.contentRouting=this.components.contentRouting=this.configureComponent("contentRouting",new AA(this.components,{routers:d})),(null!==(s=e.peerDiscovery)&&void 0!==s?s:[]).forEach(((e,t)=>{this.configureComponent("peer-discovery-".concat(t),e(this.components)).addEventListener("peer",(e=>{Fw(this,nk,ok).call(this,e)}))})),e.transports.forEach(((e,t)=>{this.components.transportManager.add(this.configureComponent("transport-".concat(t),e(this.components)))})),null!=e.services)for(const f of Object.keys(e.services)){const t=(0,e.services[f])(this.components);null!=t?(this.services[f]=t,this.configureComponent(f,t),null!=t[zw]&&(tk("registering service %s for content routing",f),d.push(t[zw])),null!=t[Kw]&&(tk("registering service %s for peer routing",f),h.push(t[Kw])),null!=t[Nm]&&(tk("registering service %s for peer discovery",f),t[Nm].addEventListener("peer",(e=>{Fw(this,nk,ok).call(this,e)})))):tk.error("service factory %s returned null or undefined instance",f)}}configureComponent(e,t){return null==t&&tk.error("component %s was null or undefined",e),this.components[e]=t,t}async start(){if(Ci(this,rk))return;xi(this,rk,!0),tk("libp2p is starting");null==(await this.keychain.listKeys()).find((e=>"self"===e.name))&&(tk("importing self key into keychain"),await this.keychain.importPeer("self",this.components.peerId));try{var e,t,r,n;await(null===(e=(t=this.components).beforeStart)||void 0===e?void 0:e.call(t)),await this.components.start(),await(null===(r=(n=this.components).afterStart)||void 0===r?void 0:r.call(n)),this.safeDispatchEvent("start",{detail:this}),tk("libp2p has started")}catch(i){throw tk.error("An error occurred starting libp2p",i),await this.stop(),i}}async stop(){var e,t,r,n;Ci(this,rk)&&(tk("libp2p is stopping"),xi(this,rk,!1),await(null===(e=(t=this.components).beforeStop)||void 0===e?void 0:e.call(t)),await this.components.stop(),await(null===(r=(n=this.components).afterStop)||void 0===r?void 0:r.call(n)),this.safeDispatchEvent("stop",{detail:this}),tk("libp2p has stopped"))}isStarted(){return Ci(this,rk)}getConnections(e){return this.components.connectionManager.getConnections(e)}getDialQueue(){return this.components.connectionManager.getDialQueue()}getPeers(){const e=new gE;for(const t of this.components.connectionManager.getConnections())e.add(t.remotePeer);return Array.from(e)}async dial(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.components.connectionManager.openConnection(e,t)}async dialProtocol(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null==t)throw new zu("no protocols were provided to open a stream",q_.ERR_INVALID_PROTOCOLS_FOR_STREAM);if(0===(t=Array.isArray(t)?t:[t]).length)throw new zu("no protocols were provided to open a stream",q_.ERR_INVALID_PROTOCOLS_FOR_STREAM);return(await this.dial(e,r)).newStream(t,r)}getMultiaddrs(){return this.components.addressManager.getAddresses()}getProtocols(){return this.components.registrar.getProtocols()}async hangUp(e){var t;Vs(e)&&(e=Sp(null!==(t=e.getPeerId())&&void 0!==t?t:""));await this.components.connectionManager.closeConnections(e)}async getPublicKey(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(tk("getPublicKey %p",e),null!=e.publicKey)return e.publicKey;const r=await this.peerStore.get(e);if(null!=r.id.publicKey)return r.id.publicKey;const n=No([xn("/pk/"),e.multihash.digest]),i=await this.contentRouting.get(n,t);return Sf(i),await this.peerStore.patch(e,{publicKey:i}),i}async handle(e,t,r){Array.isArray(e)||(e=[e]),await Promise.all(e.map((async e=>{await this.components.registrar.handle(e,t,r)})))}async unhandle(e){Array.isArray(e)||(e=[e]),await Promise.all(e.map((async e=>{await this.components.registrar.unhandle(e)})))}async register(e,t){return this.components.registrar.register(e,t)}unregister(e){this.components.registrar.unregister(e)}}function ok(e){const{detail:t}=e;t.id.toString()!==this.peerId.toString()?this.components.peerStore.merge(t.id,{multiaddrs:t.multiaddrs,protocols:t.protocols}).catch((e=>{tk.error(e)})):tk.error(new Error(q_.ERR_DISCOVERED_SELF))}async function sk(e){if(null==e.peerId){const r=e.datastore;if(null!=r)try{const t=new lE({datastore:r},Yw(lE.generateOptions(),e.keychain));e.peerId=await t.exportPeerId("self")}catch(t){if("ERR_NOT_FOUND"!==t.code)throw t}}return null==e.peerId&&(e.peerId=await(async()=>{const e=await Ef("Ed25519"),t=await yE(e);if("Ed25519"===t.type)return t;throw new Error('Generated unexpected PeerId type "'.concat(t.type,'"'))})()),new ik(function(e){var t,r;const n=Yw(Z_,e);if(null==n.transports||n.transports.length<1)throw new zu(K_.ERR_TRANSPORTS_REQUIRED,q_.ERR_TRANSPORTS_REQUIRED);if(null===n.connectionProtector&&null!=(null===(t=globalThis.process)||void 0===t||null===(r=t.env)||void 0===r?void 0:r.LIBP2P_FORCE_PNET))throw new zu(K_.ERR_PROTECTOR_REQUIRED,q_.ERR_PROTECTOR_REQUIRED);return n}(e))}const ak="js-libp2p/".concat("0.45.9");var ck;!function(e){let t;e.codec=()=>(null==t&&(t=Le((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!1!==r.lengthDelimited&&t.fork(),null!=e.protocolVersion&&(t.uint32(42),t.string(e.protocolVersion)),null!=e.agentVersion&&(t.uint32(50),t.string(e.agentVersion)),null!=e.publicKey&&(t.uint32(10),t.bytes(e.publicKey)),null!=e.listenAddrs)for(const n of e.listenAddrs)t.uint32(18),t.bytes(n);if(null!=e.observedAddr&&(t.uint32(34),t.bytes(e.observedAddr)),null!=e.protocols)for(const n of e.protocols)t.uint32(26),t.string(n);null!=e.signedPeerRecord&&(t.uint32(66),t.bytes(e.signedPeerRecord)),!1!==r.lengthDelimited&&t.ldelim()}),((e,t)=>{const r={listenAddrs:[],protocols:[]},n=null==t?e.len:e.pos+t;for(;e.pos<n;){const t=e.uint32();switch(t>>>3){case 5:r.protocolVersion=e.string();break;case 6:r.agentVersion=e.string();break;case 1:r.publicKey=e.bytes();break;case 2:r.listenAddrs.push(e.bytes());break;case 4:r.observedAddr=e.bytes();break;case 3:r.protocols.push(e.string());break;case 8:r.signedPeerRecord=e.bytes();break;default:e.skipType(7&t)}}return r}))),t),e.encode=t=>ne(t,e.codec()),e.decode=t=>re(t,e.codec())}(ck||(ck={}));const lk=Dp("libp2p:identify"),uk={protocolPrefix:"ipfs",agentVersion:ak,timeout:6e4,maxInboundStreams:1,maxOutboundStreams:1,maxPushIncomingStreams:1,maxPushOutgoingStreams:1,maxObservedAddresses:10,maxIdentifyMessageSize:8192};var hk=new WeakSet;class dk{constructor(e,t){var r,n,i,o,s,a,c,l,u,h,d;Uw(this,hk),(0,W.Z)(this,"identifyProtocolStr",void 0),(0,W.Z)(this,"identifyPushProtocolStr",void 0),(0,W.Z)(this,"host",void 0),(0,W.Z)(this,"started",void 0),(0,W.Z)(this,"timeout",void 0),(0,W.Z)(this,"peerId",void 0),(0,W.Z)(this,"peerStore",void 0),(0,W.Z)(this,"registrar",void 0),(0,W.Z)(this,"connectionManager",void 0),(0,W.Z)(this,"addressManager",void 0),(0,W.Z)(this,"maxInboundStreams",void 0),(0,W.Z)(this,"maxOutboundStreams",void 0),(0,W.Z)(this,"maxPushIncomingStreams",void 0),(0,W.Z)(this,"maxPushOutgoingStreams",void 0),(0,W.Z)(this,"maxIdentifyMessageSize",void 0),(0,W.Z)(this,"maxObservedAddresses",void 0),(0,W.Z)(this,"events",void 0),this.started=!1,this.peerId=e.peerId,this.peerStore=e.peerStore,this.registrar=e.registrar,this.addressManager=e.addressManager,this.connectionManager=e.connectionManager,this.events=e.events,this.identifyProtocolStr="/".concat(null!==(r=t.protocolPrefix)&&void 0!==r?r:uk.protocolPrefix,"/").concat("id","/").concat("1.0.0"),this.identifyPushProtocolStr="/".concat(null!==(n=t.protocolPrefix)&&void 0!==n?n:uk.protocolPrefix,"/").concat("id/push","/").concat("1.0.0"),this.timeout=null!==(i=t.timeout)&&void 0!==i?i:uk.timeout,this.maxInboundStreams=null!==(o=t.maxInboundStreams)&&void 0!==o?o:uk.maxInboundStreams,this.maxOutboundStreams=null!==(s=t.maxOutboundStreams)&&void 0!==s?s:uk.maxOutboundStreams,this.maxPushIncomingStreams=null!==(a=t.maxPushIncomingStreams)&&void 0!==a?a:uk.maxPushIncomingStreams,this.maxPushOutgoingStreams=null!==(c=t.maxPushOutgoingStreams)&&void 0!==c?c:uk.maxPushOutgoingStreams,this.maxIdentifyMessageSize=null!==(l=t.maxIdentifyMessageSize)&&void 0!==l?l:uk.maxIdentifyMessageSize,this.maxObservedAddresses=null!==(u=t.maxObservedAddresses)&&void 0!==u?u:uk.maxObservedAddresses,this.host={protocolVersion:"".concat(null!==(h=t.protocolPrefix)&&void 0!==h?h:uk.protocolPrefix,"/").concat("0.1.0"),agentVersion:null!==(d=t.agentVersion)&&void 0!==d?d:uk.agentVersion},e.events.addEventListener("connection:open",(e=>{const t=e.detail;this.identify(t).catch((e=>{lk.error("error during identify trigged by connection:open",e)}))})),e.events.addEventListener("self:peer:update",(e=>{this.push().catch((e=>{lk.error(e)}))})),this.host.agentVersion===ak&&(zg||Fg?this.host.agentVersion+=" UserAgent=".concat(globalThis.process.version):(Ug||Kg||jg||qg)&&(this.host.agentVersion+=" UserAgent=".concat(globalThis.navigator.userAgent)))}isStarted(){return this.started}async start(){this.started||(await this.peerStore.merge(this.peerId,{metadata:{AgentVersion:xn(this.host.agentVersion),ProtocolVersion:xn(this.host.protocolVersion)}}),await this.registrar.handle(this.identifyProtocolStr,(e=>{this._handleIdentify(e).catch((e=>{lk.error(e)}))}),{maxInboundStreams:this.maxInboundStreams,maxOutboundStreams:this.maxOutboundStreams}),await this.registrar.handle(this.identifyPushProtocolStr,(e=>{this._handlePush(e).catch((e=>{lk.error(e)}))}),{maxInboundStreams:this.maxPushIncomingStreams,maxOutboundStreams:this.maxPushOutgoingStreams}),this.started=!0)}async stop(){await this.registrar.unhandle(this.identifyProtocolStr),await this.registrar.unhandle(this.identifyPushProtocolStr),this.started=!1}async pushToConnections(e){var t,r;const n=this.addressManager.getAddresses().map((e=>e.decapsulateCode(As("p2p").code))),i=new AE({peerId:this.peerId,multiaddrs:n}),o=await wE.seal(i,this.peerId),s=this.registrar.getProtocols(),a=await this.peerStore.get(this.peerId),c=In(null!==(t=a.metadata.get("AgentVersion"))&&void 0!==t?t:xn(this.host.agentVersion)),l=In(null!==(r=a.metadata.get("ProtocolVersion"))&&void 0!==r?r:xn(this.host.protocolVersion)),u=e.map((async e=>{let t;const r=AbortSignal.timeout(this.timeout);try{null===jw.setMaxListeners||void 0===jw.setMaxListeners||(0,jw.setMaxListeners)(1/0,r)}catch{}try{t=await e.newStream([this.identifyPushProtocolStr],{signal:r});const i=Wp(t,r);await i.sink(za([ck.encode({listenAddrs:n.map((e=>e.bytes)),signedPeerRecord:o.marshal(),protocols:s,agentVersion:c,protocolVersion:l})],(e=>Ia(e))))}catch(i){lk.error("could not push identify update to peer",i)}finally{null!=t&&t.close()}}));await Promise.all(u)}async push(){if(!this.isStarted())return;const e=[];await Promise.all(this.connectionManager.getConnections().map((async t=>{try{if(!(await this.peerStore.get(t.remotePeer)).protocols.includes(this.identifyPushProtocolStr))return;e.push(t)}catch(r){if(r.code!==q_.ERR_NOT_FOUND)throw r}}))),await this.pushToConnections(e)}async _identify(e){let t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=Gp([AbortSignal.timeout(this.timeout),null===r||void 0===r?void 0:r.signal]);try{null===jw.setMaxListeners||void 0===jw.setMaxListeners||(0,jw.setMaxListeners)(1/0,n)}catch{}try{t=await e.newStream([this.identifyProtocolStr],{signal:n});const r=Wp(t,n),o=await za([],r,(e=>{var t;return Na(e,{maxDataLength:null!==(t=this.maxIdentifyMessageSize)&&void 0!==t?t:8192})}),(async e=>kA(e)));if(null==o)throw new zu("No data could be retrieved",q_.ERR_CONNECTION_ENDED);try{return ck.decode(o)}catch(i){throw new zu(String(i),q_.ERR_INVALID_MESSAGE)}}finally{null!=t&&t.close(),n.clear()}}async identify(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=await this._identify(e,r),{publicKey:i,protocols:o,observedAddr:s}=n;if(null==i)throw new zu("public key was missing from identify message",q_.ERR_MISSING_PUBLIC_KEY);const a=await Ap(i);if(!e.remotePeer.equals(a))throw new zu("identified peer does not match the expected peer",q_.ERR_INVALID_PEER);if(this.peerId.equals(a))throw new zu("identified peer is our own peer id?",q_.ERR_INVALID_PEER);const c=function(e){if(null!=e&&e.length>0)try{return Xs(e)}catch{}}(s);lk("identify completed for peer %p and protocols %o",a,o),lk("our observed address is %s",c),null!=c&&this.addressManager.getObservedAddrs().length<(null!==(t=this.maxObservedAddresses)&&void 0!==t?t:1/0)&&(lk("storing our observed address %s",null===c||void 0===c?void 0:c.toString()),this.addressManager.addObservedAddr(c));const l=await Fw(this,hk,fk).call(this,e.remotePeer,n),u={peerId:a,protocolVersion:n.protocolVersion,agentVersion:n.agentVersion,publicKey:n.publicKey,listenAddrs:n.listenAddrs.map((e=>Xs(e))),observedAddr:null==n.observedAddr?void 0:Xs(n.observedAddr),protocols:n.protocols,signedPeerRecord:l};this.events.safeDispatchEvent("peer:identify",{detail:u})}async _handleIdentify(e){const{connection:t,stream:r}=e,n=AbortSignal.timeout(this.timeout);try{null===jw.setMaxListeners||void 0===jw.setMaxListeners||(0,jw.setMaxListeners)(1/0,n)}catch{}try{var i;const e=null!==(i=this.peerId.publicKey)&&void 0!==i?i:new Uint8Array(0),o=await this.peerStore.get(this.peerId),s=this.addressManager.getAddresses().map((e=>e.decapsulateCode(As("p2p").code)));let a=o.peerRecordEnvelope;if(s.length>0&&null==a){const e=new AE({peerId:this.peerId,multiaddrs:s});a=(await wE.seal(e,this.peerId)).marshal().subarray()}const c=ck.encode({protocolVersion:this.host.protocolVersion,agentVersion:this.host.agentVersion,publicKey:e,listenAddrs:s.map((e=>e.bytes)),signedPeerRecord:a,observedAddr:t.remoteAddr.bytes,protocols:o.protocols}),l=Wp(r,n),u=za([c],(e=>Ia(e)));await l.sink(u)}catch(o){lk.error("could not respond to identify request",o)}finally{r.close()}}async _handlePush(e){const{connection:t,stream:r}=e;try{var n;if(this.peerId.equals(t.remotePeer))throw new Error("received push from ourselves?");const e=Ic(Wp(r,AbortSignal.timeout(this.timeout)),{maxDataLength:null!==(n=this.maxIdentifyMessageSize)&&void 0!==n?n:8192}),i=await e.readPB(ck);await Fw(this,hk,fk).call(this,t.remotePeer,i)}catch(i){return void lk.error("received invalid message",i)}finally{r.close()}lk("handled push from %p",t.remotePeer)}}async function fk(e,t){if(lk("received identify from %p",e),null==t)throw new Error("Message was null or undefined");const r={addresses:t.listenAddrs.map((e=>({isCertified:!1,multiaddr:Xs(e)}))),protocols:t.protocols,metadata:new Map,peerRecordEnvelope:t.signedPeerRecord};let n;if(null!=t.signedPeerRecord){lk("received signedPeerRecord in push from %p",e);let o=t.signedPeerRecord;const s=await wE.openAndCertify(o,AE.DOMAIN);let a,c=AE.createFromProtobuf(s.payload);if(!c.peerId.equals(s.peerId))throw new Error("signing key does not match PeerId in the PeerRecord");if(!e.equals(c.peerId))throw new Error("signing key does not match remote PeerId");try{a=await this.peerStore.get(c.peerId)}catch(i){if("ERR_NOT_FOUND"!==i.code)throw i}if(null!=a&&(r.metadata=a.metadata,null!=a.peerRecordEnvelope)){const e=await wE.createFromProtobuf(a.peerRecordEnvelope),t=AE.createFromProtobuf(e.payload);t.seqNumber>=c.seqNumber&&(lk("sequence number was lower or equal to existing sequence number - stored: %d received: %d",t.seqNumber,c.seqNumber),c=t,o=a.peerRecordEnvelope)}r.peerRecordEnvelope=o,r.addresses=c.multiaddrs.map((e=>({isCertified:!0,multiaddr:e}))),n={seq:c.seqNumber,addresses:c.multiaddrs}}else lk("%p did not send a signed peer record",e);return null!=t.agentVersion&&r.metadata.set("AgentVersion",xn(t.agentVersion)),null!=t.protocolVersion&&r.metadata.set("ProtocolVersion",xn(t.protocolVersion)),await this.peerStore.patch(e,r),n}function pk(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t=>new dk(t,e)}const gk=Dp("libp2p:ping");class mk{constructor(e,t){var r,n,i,o;(0,W.Z)(this,"protocol",void 0),(0,W.Z)(this,"components",void 0),(0,W.Z)(this,"started",void 0),(0,W.Z)(this,"timeout",void 0),(0,W.Z)(this,"maxInboundStreams",void 0),(0,W.Z)(this,"maxOutboundStreams",void 0),this.components=e,this.started=!1,this.protocol="/".concat(null!==(r=t.protocolPrefix)&&void 0!==r?r:"ipfs","/").concat("ping","/").concat("1.0.0"),this.timeout=null!==(n=t.timeout)&&void 0!==n?n:1e4,this.maxInboundStreams=null!==(i=t.maxInboundStreams)&&void 0!==i?i:2,this.maxOutboundStreams=null!==(o=t.maxOutboundStreams)&&void 0!==o?o:1}async start(){await this.components.registrar.handle(this.protocol,this.handleMessage,{maxInboundStreams:this.maxInboundStreams,maxOutboundStreams:this.maxOutboundStreams}),this.started=!0}async stop(){await this.components.registrar.unhandle(this.protocol),this.started=!1}isStarted(){return this.started}handleMessage(e){const{stream:t}=e;za(t,t).catch((e=>{gk.error(e)}))}async ping(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};gk("dialing %s to %p",this.protocol,e);const r=Date.now(),n=$d(32),i=await this.components.connectionManager.openConnection(e,t);let o;const s=Gp([AbortSignal.timeout(this.timeout),null===t||void 0===t?void 0:t.signal]);try{null===jw.setMaxListeners||void 0===jw.setMaxListeners||(0,jw.setMaxListeners)(1/0,s)}catch{}try{o=await i.newStream([this.protocol],{signal:s});const e=Wp(o,s),t=await za([n],e,(async e=>kA(e))),a=Date.now();if(null==t||!wi(n,t.subarray()))throw new zu("Received wrong ping ack",q_.ERR_WRONG_PING_ACK);return a-r}finally{null!=o&&o.close(),s.clear()}}}function yk(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t=>new mk(t,e)}const vk={lightPush:1,filter:1,store:1};async function bk(e){var t,r;const n=null!==(t=null===e||void 0===e?void 0:e.libp2p)&&void 0!==t?t:{},i=null!==(r=n.peerDiscovery)&&void 0!==r?r:[];null!==e&&void 0!==e&&e.defaultBootstrap&&(i.push(wk()),Object.assign(n,{peerDiscovery:i}));const o=await Ek(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t=>{e={...e,msgIdFn:e=>{let{data:t}=e;return fc(t)},globalSignaturePolicy:xb.StrictNoSign,fallbackToFloodsub:!1};const r=new kw(t,e);return r.multicodecs=xw,r}}(e),n,null===e||void 0===e?void 0:e.userAgent),s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t=>new Ow(t,e)}(e);return new ca(null!==e&&void 0!==e?e:{},o,void 0,void 0,void 0,s)}function wk(){return e=[cb],t=vk,r=>new ub(r,{enrUrls:e,wantedNodeCapabilityCount:t});var e,t}async function Ek(e,t,r){const n=e?{pubsub:e}:{};return async function(e){const t=await sk(e);return!1!==e.start&&await t.start(),t}({connectionManager:{minConnections:1},transports:[Tm({filter:Em})],streamMuxers:[bg()],connectionEncryption:[qp()],...t,services:{identify:pk({agentVersion:null!==r&&void 0!==r?r:"js-waku"}),ping:yk(),...n,...null===t||void 0===t?void 0:t.services}})}const Sk="/eth-pm/1/public-key/proto",_k="/eth-pm/1/private-message/proto";function Ak(e,t,r){if(console.log("Public Key Message received:",r),!r.payload)return;const n=fi.decode(r.payload);if(!n)return;if(e&&wi(n.ethAddress,Rn(e)))return;const i=function(e){const{domain:t,types:r,value:n}=Pk(e.encryptionPublicKey,"0x"+Pn(e.ethAddress));try{const i=Ck._TypedDataEncoder.hash(t,r,n),o=(0,Ck.recoverAddress)(i,e.signature);return console.log("Recovered",o),console.log("ethAddress","0x"+Pn(e.ethAddress)),wi(Rn(o),e.ethAddress)}catch(i){return console.error("Could not recover public key from signature",i),!1}}(n);console.log("Is Public Key Message valid?",i),i&&t((e=>(e.set(Pn(n.ethAddress),n.encryptionPublicKey),new Map(e))))}async function kk(e,t,r){if(console.log("Private Message received:",r),!r.payload)return;const n=pi.decode(r.payload);if(!n)return void console.log("Failed to decode Private Message");if(!wi(n.toAddress,Rn(t)))return;const i=r.timestamp?r.timestamp:new Date;console.log("Message decrypted:",n.message),e((e=>{const t=e.slice();return t.push({text:n.message,timestamp:i}),t}))}var Ck=__webpack_require__(2388);const xk=Rn((0,Ck.keccak256)(Nn(Sk)));async function Ik(){const e=zn(Bn);return{privateKey:e,publicKey:qn(e)}}async function Rk(e,t,r){const n=await async function(e,t,r){const{domain:n,types:i,value:o}=Pk(e,t),s=await r._signTypedData(n,i,o);return console.log("TYPED SIGNED:"+JSON.stringify(s)),Rn(s)}(t,e,r);return new fi({encryptionPublicKey:t,ethAddress:Rn(e),signature:Rn(n)})}function Pk(e,t){return{domain:{name:"Ethereum Private Message over Waku",version:"1"},value:{message:"By signing this message you certify that messages addressed to `ownerAddress` must be encrypted with `encryptionPublicKey`",encryptionPublicKey:Pn(e),ownerAddress:t},primaryType:"PublishEncryptionPublicKey",types:{PublishEncryptionPublicKey:[{name:"message",type:"string"},{name:"encryptionPublicKey",type:"string"},{name:"ownerAddress",type:"string"}]}}}var Tk=__webpack_require__(7462),Nk=__webpack_require__(5987),Dk=__webpack_require__(3061),Ok=__webpack_require__(454),Mk=__webpack_require__(9685),Bk=V.forwardRef((function(e,t){var r=e.classes,n=e.className,i=e.component,o=void 0===i?"div":i,s=e.square,a=void 0!==s&&s,c=e.elevation,l=void 0===c?1:c,u=e.variant,h=void 0===u?"elevation":u,d=(0,Nk.Z)(e,["classes","className","component","square","elevation","variant"]);return V.createElement(o,(0,Tk.Z)({className:(0,Dk.Z)(r.root,n,"outlined"===h?r.outlined:r["elevation".concat(l)],!a&&r.rounded),ref:t},d))}));const Lk=(0,Ok.Z)((function(e){var t={};return e.shadows.forEach((function(e,r){t["elevation".concat(r)]={boxShadow:e}})),(0,Tk.Z)({root:{backgroundColor:e.palette.background.paper,color:e.palette.text.primary,transition:e.transitions.create("box-shadow")},rounded:{borderRadius:e.shape.borderRadius},outlined:{border:"1px solid ".concat(e.palette.divider)}},t)}),{name:"MuiPaper"})(Bk);var Uk=V.forwardRef((function(e,t){var r=e.classes,n=e.className,i=e.color,o=void 0===i?"primary":i,s=e.position,a=void 0===s?"fixed":s,c=(0,Nk.Z)(e,["classes","className","color","position"]);return V.createElement(Lk,(0,Tk.Z)({square:!0,component:"header",elevation:4,className:(0,Dk.Z)(r.root,r["position".concat((0,Mk.Z)(a))],r["color".concat((0,Mk.Z)(o))],n,"fixed"===a&&"mui-fixed"),ref:t},c))}));const Fk=(0,Ok.Z)((function(e){var t="light"===e.palette.type?e.palette.grey[100]:e.palette.grey[900];return{root:{display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",zIndex:e.zIndex.appBar,flexShrink:0},positionFixed:{position:"fixed",top:0,left:"auto",right:0,"@media print":{position:"absolute"}},positionAbsolute:{position:"absolute",top:0,left:"auto",right:0},positionSticky:{position:"sticky",top:0,left:"auto",right:0},positionStatic:{position:"static"},positionRelative:{position:"relative"},colorDefault:{backgroundColor:t,color:e.palette.getContrastText(t)},colorPrimary:{backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText},colorSecondary:{backgroundColor:e.palette.secondary.main,color:e.palette.secondary.contrastText},colorInherit:{color:"inherit"},colorTransparent:{backgroundColor:"transparent",color:"inherit"}}}),{name:"MuiAppBar"})(Uk);var jk=V.forwardRef((function(e,t){var r=e.classes,n=e.className,i=e.component,o=void 0===i?"div":i,s=e.disableGutters,a=void 0!==s&&s,c=e.variant,l=void 0===c?"regular":c,u=(0,Nk.Z)(e,["classes","className","component","disableGutters","variant"]);return V.createElement(o,(0,Tk.Z)({className:(0,Dk.Z)(r.root,r[l],n,!a&&r.gutters),ref:t},u))}));const zk=(0,Ok.Z)((function(e){return{root:{position:"relative",display:"flex",alignItems:"center"},gutters:(0,W.Z)({paddingLeft:e.spacing(2),paddingRight:e.spacing(2)},e.breakpoints.up("sm"),{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}),regular:e.mixins.toolbar,dense:{minHeight:48}}}),{name:"MuiToolbar"})(jk);var Kk=__webpack_require__(3644),qk=__webpack_require__(8088),Zk=__webpack_require__(2705),Vk=__webpack_require__(6790),Hk=__webpack_require__(2982),Wk=__webpack_require__(3366),Gk=__webpack_require__(4236),Yk=__webpack_require__(1721);const Qk=V.createContext(null);function Jk(e,t){var r=Object.create(null);return e&&V.Children.map(e,(function(e){return e})).forEach((function(e){r[e.key]=function(e){return t&&(0,V.isValidElement)(e)?t(e):e}(e)})),r}function Xk(e,t,r){return null!=r[t]?r[t]:e.props[t]}function $k(e,t,r){var n=Jk(e.children),i=function(e,t){function r(r){return r in t?t[r]:e[r]}e=e||{},t=t||{};var n,i=Object.create(null),o=[];for(var s in e)s in t?o.length&&(i[s]=o,o=[]):o.push(s);var a={};for(var c in t){if(i[c])for(n=0;n<i[c].length;n++){var l=i[c][n];a[i[c][n]]=r(l)}a[c]=r(c)}for(n=0;n<o.length;n++)a[o[n]]=r(o[n]);return a}(t,n);return Object.keys(i).forEach((function(o){var s=i[o];if((0,V.isValidElement)(s)){var a=o in t,c=o in n,l=t[o],u=(0,V.isValidElement)(l)&&!l.props.in;!c||a&&!u?c||!a||u?c&&a&&(0,V.isValidElement)(l)&&(i[o]=(0,V.cloneElement)(s,{onExited:r.bind(null,s),in:l.props.in,exit:Xk(s,"exit",e),enter:Xk(s,"enter",e)})):i[o]=(0,V.cloneElement)(s,{in:!1}):i[o]=(0,V.cloneElement)(s,{onExited:r.bind(null,s),in:!0,exit:Xk(s,"exit",e),enter:Xk(s,"enter",e)})}})),i}var eC=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},tC=function(e){function t(t,r){var n,i=(n=e.call(this,t,r)||this).handleExited.bind((0,Gk.Z)(n));return n.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},n}(0,Yk.Z)(t,e);var r=t.prototype;return r.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},r.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var r,n,i=t.children,o=t.handleExited;return{children:t.firstRender?(r=e,n=o,Jk(r.children,(function(e){return(0,V.cloneElement)(e,{onExited:n.bind(null,e),in:!0,appear:Xk(e,"appear",r),enter:Xk(e,"enter",r),exit:Xk(e,"exit",r)})}))):$k(e,i,o),firstRender:!1}},r.handleExited=function(e,t){var r=Jk(this.props.children);e.key in r||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var r=(0,Tk.Z)({},t.children);return delete r[e.key],{children:r}})))},r.render=function(){var e=this.props,t=e.component,r=e.childFactory,n=(0,Wk.Z)(e,["component","childFactory"]),i=this.state.contextValue,o=eC(this.state.children).map(r);return delete n.appear,delete n.enter,delete n.exit,null===t?V.createElement(Qk.Provider,{value:i},o):V.createElement(Qk.Provider,{value:i},V.createElement(t,n,o))},t}(V.Component);tC.propTypes={},tC.defaultProps={component:"div",childFactory:function(e){return e}};const rC=tC;var nC="undefined"===typeof window?V.useEffect:V.useLayoutEffect;const iC=function(e){var t=e.classes,r=e.pulsate,n=void 0!==r&&r,i=e.rippleX,o=e.rippleY,s=e.rippleSize,a=e.in,c=e.onExited,l=void 0===c?function(){}:c,u=e.timeout,h=V.useState(!1),d=h[0],f=h[1],p=(0,Dk.Z)(t.ripple,t.rippleVisible,n&&t.ripplePulsate),g={width:s,height:s,top:-s/2+o,left:-s/2+i},m=(0,Dk.Z)(t.child,d&&t.childLeaving,n&&t.childPulsate),y=(0,Zk.Z)(l);return nC((function(){if(!a){f(!0);var e=setTimeout(y,u);return function(){clearTimeout(e)}}}),[y,a,u]),V.createElement("span",{className:p,style:g},V.createElement("span",{className:m}))};var oC=V.forwardRef((function(e,t){var r=e.center,n=void 0!==r&&r,i=e.classes,o=e.className,s=(0,Nk.Z)(e,["center","classes","className"]),a=V.useState([]),c=a[0],l=a[1],u=V.useRef(0),h=V.useRef(null);V.useEffect((function(){h.current&&(h.current(),h.current=null)}),[c]);var d=V.useRef(!1),f=V.useRef(null),p=V.useRef(null),g=V.useRef(null);V.useEffect((function(){return function(){clearTimeout(f.current)}}),[]);var m=V.useCallback((function(e){var t=e.pulsate,r=e.rippleX,n=e.rippleY,o=e.rippleSize,s=e.cb;l((function(e){return[].concat((0,Hk.Z)(e),[V.createElement(iC,{key:u.current,classes:i,timeout:550,pulsate:t,rippleX:r,rippleY:n,rippleSize:o})])})),u.current+=1,h.current=s}),[i]),y=V.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,i=t.pulsate,o=void 0!==i&&i,s=t.center,a=void 0===s?n||t.pulsate:s,c=t.fakeElement,l=void 0!==c&&c;if("mousedown"===e.type&&d.current)d.current=!1;else{"touchstart"===e.type&&(d.current=!0);var u,h,y,v=l?null:g.current,b=v?v.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(a||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)u=Math.round(b.width/2),h=Math.round(b.height/2);else{var w=e.touches?e.touches[0]:e,E=w.clientX,S=w.clientY;u=Math.round(E-b.left),h=Math.round(S-b.top)}if(a)(y=Math.sqrt((2*Math.pow(b.width,2)+Math.pow(b.height,2))/3))%2===0&&(y+=1);else{var _=2*Math.max(Math.abs((v?v.clientWidth:0)-u),u)+2,A=2*Math.max(Math.abs((v?v.clientHeight:0)-h),h)+2;y=Math.sqrt(Math.pow(_,2)+Math.pow(A,2))}e.touches?null===p.current&&(p.current=function(){m({pulsate:o,rippleX:u,rippleY:h,rippleSize:y,cb:r})},f.current=setTimeout((function(){p.current&&(p.current(),p.current=null)}),80)):m({pulsate:o,rippleX:u,rippleY:h,rippleSize:y,cb:r})}}),[n,m]),v=V.useCallback((function(){y({},{pulsate:!0})}),[y]),b=V.useCallback((function(e,t){if(clearTimeout(f.current),"touchend"===e.type&&p.current)return e.persist(),p.current(),p.current=null,void(f.current=setTimeout((function(){b(e,t)})));p.current=null,l((function(e){return e.length>0?e.slice(1):e})),h.current=t}),[]);return V.useImperativeHandle(t,(function(){return{pulsate:v,start:y,stop:b}}),[v,y,b]),V.createElement("span",(0,Tk.Z)({className:(0,Dk.Z)(i.root,o),ref:g},s),V.createElement(rC,{component:null,exit:!0},c))}));const sC=(0,Ok.Z)((function(e){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(e.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}}),{flip:!1,name:"MuiTouchRipple"})(V.memo(oC));var aC=V.forwardRef((function(e,t){var r=e.action,n=e.buttonRef,i=e.centerRipple,o=void 0!==i&&i,s=e.children,a=e.classes,c=e.className,l=e.component,u=void 0===l?"button":l,h=e.disabled,d=void 0!==h&&h,f=e.disableRipple,p=void 0!==f&&f,g=e.disableTouchRipple,m=void 0!==g&&g,y=e.focusRipple,v=void 0!==y&&y,b=e.focusVisibleClassName,w=e.onBlur,E=e.onClick,S=e.onFocus,_=e.onFocusVisible,A=e.onKeyDown,k=e.onKeyUp,C=e.onMouseDown,x=e.onMouseLeave,I=e.onMouseUp,R=e.onTouchEnd,P=e.onTouchMove,T=e.onTouchStart,N=e.onDragLeave,D=e.tabIndex,O=void 0===D?0:D,M=e.TouchRippleProps,B=e.type,L=void 0===B?"button":B,U=(0,Nk.Z)(e,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),F=V.useRef(null);var j=V.useRef(null),z=V.useState(!1),K=z[0],q=z[1];d&&K&&q(!1);var Z=(0,Vk.Z)(),W=Z.isFocusVisible,G=Z.onBlurVisible,Y=Z.ref;function Q(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:m;return(0,Zk.Z)((function(n){return t&&t(n),!r&&j.current&&j.current[e](n),!0}))}V.useImperativeHandle(r,(function(){return{focusVisible:function(){q(!0),F.current.focus()}}}),[]),V.useEffect((function(){K&&v&&!p&&j.current.pulsate()}),[p,v,K]);var J=Q("start",C),X=Q("stop",N),$=Q("stop",I),ee=Q("stop",(function(e){K&&e.preventDefault(),x&&x(e)})),te=Q("start",T),re=Q("stop",R),ne=Q("stop",P),ie=Q("stop",(function(e){K&&(G(e),q(!1)),w&&w(e)}),!1),oe=(0,Zk.Z)((function(e){F.current||(F.current=e.currentTarget),W(e)&&(q(!0),_&&_(e)),S&&S(e)})),se=function(){var e=H.findDOMNode(F.current);return u&&"button"!==u&&!("A"===e.tagName&&e.href)},ae=V.useRef(!1),ce=(0,Zk.Z)((function(e){v&&!ae.current&&K&&j.current&&" "===e.key&&(ae.current=!0,e.persist(),j.current.stop(e,(function(){j.current.start(e)}))),e.target===e.currentTarget&&se()&&" "===e.key&&e.preventDefault(),A&&A(e),e.target===e.currentTarget&&se()&&"Enter"===e.key&&!d&&(e.preventDefault(),E&&E(e))})),le=(0,Zk.Z)((function(e){v&&" "===e.key&&j.current&&K&&!e.defaultPrevented&&(ae.current=!1,e.persist(),j.current.stop(e,(function(){j.current.pulsate(e)}))),k&&k(e),E&&e.target===e.currentTarget&&se()&&" "===e.key&&!e.defaultPrevented&&E(e)})),ue=u;"button"===ue&&U.href&&(ue="a");var he={};"button"===ue?(he.type=L,he.disabled=d):("a"===ue&&U.href||(he.role="button"),he["aria-disabled"]=d);var de=(0,qk.Z)(n,t),fe=(0,qk.Z)(Y,F),pe=(0,qk.Z)(de,fe),ge=V.useState(!1),me=ge[0],ye=ge[1];V.useEffect((function(){ye(!0)}),[]);var ve=me&&!p&&!d;return V.createElement(ue,(0,Tk.Z)({className:(0,Dk.Z)(a.root,c,K&&[a.focusVisible,b],d&&a.disabled),onBlur:ie,onClick:E,onFocus:oe,onKeyDown:ce,onKeyUp:le,onMouseDown:J,onMouseLeave:ee,onMouseUp:$,onDragLeave:X,onTouchEnd:re,onTouchMove:ne,onTouchStart:te,ref:pe,tabIndex:d?-1:O},he,U),s,ve?V.createElement(sC,(0,Tk.Z)({ref:j,center:o},M)):null)}));const cC=(0,Ok.Z)({root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}},disabled:{},focusVisible:{}},{name:"MuiButtonBase"})(aC);var lC=V.forwardRef((function(e,t){var r=e.edge,n=void 0!==r&&r,i=e.children,o=e.classes,s=e.className,a=e.color,c=void 0===a?"default":a,l=e.disabled,u=void 0!==l&&l,h=e.disableFocusRipple,d=void 0!==h&&h,f=e.size,p=void 0===f?"medium":f,g=(0,Nk.Z)(e,["edge","children","classes","className","color","disabled","disableFocusRipple","size"]);return V.createElement(cC,(0,Tk.Z)({className:(0,Dk.Z)(o.root,s,"default"!==c&&o["color".concat((0,Mk.Z)(c))],u&&o.disabled,"small"===p&&o["size".concat((0,Mk.Z)(p))],{start:o.edgeStart,end:o.edgeEnd}[n]),centerRipple:!0,focusRipple:!d,disabled:u,ref:t},g),V.createElement("span",{className:o.label},i))}));const uC=(0,Ok.Z)((function(e){return{root:{textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:12,borderRadius:"50%",overflow:"visible",color:e.palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{backgroundColor:(0,Kk.Fq)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{backgroundColor:"transparent",color:e.palette.action.disabled}},edgeStart:{marginLeft:-12,"$sizeSmall&":{marginLeft:-3}},edgeEnd:{marginRight:-12,"$sizeSmall&":{marginRight:-3}},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:(0,Kk.Fq)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},colorSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:(0,Kk.Fq)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},disabled:{},sizeSmall:{padding:3,fontSize:e.typography.pxToRem(18)},label:{width:"100%",display:"flex",alignItems:"inherit",justifyContent:"inherit"}}}),{name:"MuiIconButton"})(lC);var hC={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},dC=V.forwardRef((function(e,t){var r=e.align,n=void 0===r?"inherit":r,i=e.classes,o=e.className,s=e.color,a=void 0===s?"initial":s,c=e.component,l=e.display,u=void 0===l?"initial":l,h=e.gutterBottom,d=void 0!==h&&h,f=e.noWrap,p=void 0!==f&&f,g=e.paragraph,m=void 0!==g&&g,y=e.variant,v=void 0===y?"body1":y,b=e.variantMapping,w=void 0===b?hC:b,E=(0,Nk.Z)(e,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),S=c||(m?"p":w[v]||hC[v])||"span";return V.createElement(S,(0,Tk.Z)({className:(0,Dk.Z)(i.root,o,"inherit"!==v&&i[v],"initial"!==a&&i["color".concat((0,Mk.Z)(a))],p&&i.noWrap,d&&i.gutterBottom,m&&i.paragraph,"inherit"!==n&&i["align".concat((0,Mk.Z)(n))],"initial"!==u&&i["display".concat((0,Mk.Z)(u))]),ref:t},E))}));const fC=(0,Ok.Z)((function(e){return{root:{margin:0},body2:e.typography.body2,body1:e.typography.body1,caption:e.typography.caption,button:e.typography.button,h1:e.typography.h1,h2:e.typography.h2,h3:e.typography.h3,h4:e.typography.h4,h5:e.typography.h5,h6:e.typography.h6,subtitle1:e.typography.subtitle1,subtitle2:e.typography.subtitle2,overline:e.typography.overline,srOnly:{position:"absolute",height:1,width:1,overflow:"hidden"},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right"},alignJustify:{textAlign:"justify"},noWrap:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},gutterBottom:{marginBottom:"0.35em"},paragraph:{marginBottom:16},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorTextPrimary:{color:e.palette.text.primary},colorTextSecondary:{color:e.palette.text.secondary},colorError:{color:e.palette.error.main},displayInline:{display:"inline"},displayBlock:{display:"block"}}}),{name:"MuiTypography"})(dC);var pC=V.forwardRef((function(e,t){var r=e.children,n=e.classes,i=e.className,o=e.color,s=void 0===o?"default":o,a=e.component,c=void 0===a?"button":a,l=e.disabled,u=void 0!==l&&l,h=e.disableElevation,d=void 0!==h&&h,f=e.disableFocusRipple,p=void 0!==f&&f,g=e.endIcon,m=e.focusVisibleClassName,y=e.fullWidth,v=void 0!==y&&y,b=e.size,w=void 0===b?"medium":b,E=e.startIcon,S=e.type,_=void 0===S?"button":S,A=e.variant,k=void 0===A?"text":A,C=(0,Nk.Z)(e,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"]),x=E&&V.createElement("span",{className:(0,Dk.Z)(n.startIcon,n["iconSize".concat((0,Mk.Z)(w))])},E),I=g&&V.createElement("span",{className:(0,Dk.Z)(n.endIcon,n["iconSize".concat((0,Mk.Z)(w))])},g);return V.createElement(cC,(0,Tk.Z)({className:(0,Dk.Z)(n.root,n[k],i,"inherit"===s?n.colorInherit:"default"!==s&&n["".concat(k).concat((0,Mk.Z)(s))],"medium"!==w&&[n["".concat(k,"Size").concat((0,Mk.Z)(w))],n["size".concat((0,Mk.Z)(w))]],d&&n.disableElevation,u&&n.disabled,v&&n.fullWidth),component:c,disabled:u,focusRipple:!p,focusVisibleClassName:(0,Dk.Z)(n.focusVisible,m),ref:t,type:_},C),V.createElement("span",{className:n.label},x,r,I))}));const gC=(0,Ok.Z)((function(e){return{root:(0,Tk.Z)({},e.typography.button,{boxSizing:"border-box",minWidth:64,padding:"6px 16px",borderRadius:e.shape.borderRadius,color:e.palette.text.primary,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none",backgroundColor:(0,Kk.Fq)(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"},"&$disabled":{backgroundColor:"transparent"}},"&$disabled":{color:e.palette.action.disabled}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},text:{padding:"6px 8px"},textPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:(0,Kk.Fq)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:(0,Kk.Fq)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlined:{padding:"5px 15px",border:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"&$disabled":{border:"1px solid ".concat(e.palette.action.disabledBackground)}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat((0,Kk.Fq)(e.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.primary.main),backgroundColor:(0,Kk.Fq)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat((0,Kk.Fq)(e.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.secondary.main),backgroundColor:(0,Kk.Fq)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{border:"1px solid ".concat(e.palette.action.disabled)}},contained:{color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],boxShadow:e.shadows[2],"&:hover":{backgroundColor:e.palette.grey.A100,boxShadow:e.shadows[4],"@media (hover: none)":{boxShadow:e.shadows[2],backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},"&$focusVisible":{boxShadow:e.shadows[6]},"&:active":{boxShadow:e.shadows[8]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}},containedPrimary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},containedSecondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},disableElevation:{boxShadow:"none","&:hover":{boxShadow:"none"},"&$focusVisible":{boxShadow:"none"},"&:active":{boxShadow:"none"},"&$disabled":{boxShadow:"none"}},focusVisible:{},disabled:{},colorInherit:{color:"inherit",borderColor:"currentColor"},textSizeSmall:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},textSizeLarge:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},outlinedSizeSmall:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},outlinedSizeLarge:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},containedSizeSmall:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},containedSizeLarge:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},sizeSmall:{},sizeLarge:{},fullWidth:{width:"100%"},startIcon:{display:"inherit",marginRight:8,marginLeft:-4,"&$iconSizeSmall":{marginLeft:-2}},endIcon:{display:"inherit",marginRight:-4,marginLeft:8,"&$iconSizeSmall":{marginRight:-2}},iconSizeSmall:{"& > *:first-child":{fontSize:18}},iconSizeMedium:{"& > *:first-child":{fontSize:20}},iconSizeLarge:{"& > *:first-child":{fontSize:22}}}}),{name:"MuiButton"})(pC);async function mC(e,t){const{salt:r,iv:n,cipher:i}=await async function(e,t){const r=await vC(t),n=window.crypto.getRandomValues(new Uint8Array(16)),i=await bC(r,n),o=(new TextEncoder).encode(JSON.stringify(e)),s=window.crypto.getRandomValues(new Uint8Array(12)),a=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:s},i,o);return{salt:n,iv:s,cipher:a}}(e,t),o={salt:Pn(r),iv:Pn(n),cipher:Pn(new Uint8Array(i))};localStorage.setItem("cipherEncryptionKeyPair",JSON.stringify(o))}async function yC(e){const t=localStorage.getItem("cipherEncryptionKeyPair");if(!t)return;const r=JSON.parse(t),n=Rn(r.salt),i=Rn(r.iv),o=Rn(r.cipher);return await async function(e,t,r,n){const i=await vC(n),o=await bC(i,e);try{let e=await window.crypto.subtle.decrypt({name:"AES-GCM",iv:t},o,r),n=new TextDecoder;return JSON.parse(n.decode(e))}catch(s){return}}(n,i,o,e)}function vC(e){const t=new TextEncoder;return window.crypto.subtle.importKey("raw",t.encode(e),{name:"PBKDF2"},!1,["deriveBits","deriveKey"])}function bC(e,t){return window.crypto.subtle.deriveKey({name:"PBKDF2",salt:t,iterations:1e5,hash:"SHA-256"},e,{name:"AES-GCM",length:256},!0,["encrypt","decrypt"])}var wC=__webpack_require__(6417);function EC(e){let{password:t,disabled:r,setEncryptionKeyPair:n}=e;return(0,wC.jsx)(gC,{variant:"contained",color:"primary",onClick:()=>{r||t&&yC(t).then((e=>{e&&(console.log("Encryption KeyPair loaded from storage"),n(e))}))},disabled:!t||r,children:"Load Encryption Key Pair from storage"})}function SC(e){let{password:t,EncryptionKeyPair:r}=e;return(0,wC.jsx)(gC,{variant:"contained",color:"primary",onClick:()=>{r&&t&&mC(r,t).then((()=>{console.log("Encryption KeyPair saved to storage")}))},disabled:!t||!r,children:"Save Encryption Key Pair to storage"})}var _C=__webpack_require__(5614),AC=__webpack_require__(1187);const kC=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,_C.Z)(e,(0,Tk.Z)({defaultTheme:AC.Z},t))};var CC=__webpack_require__(803);function xC(e){var t=e.props,r=e.states,n=e.muiFormControl;return r.reduce((function(e,r){return e[r]=t[r],n&&"undefined"===typeof t[r]&&(e[r]=n[r]),e}),{})}var IC=V.createContext();const RC=IC;var PC=__webpack_require__(670);function TC(e,t){return parseInt(e[t],10)||0}var NC="undefined"!==typeof window?V.useLayoutEffect:V.useEffect,DC={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"};const OC=V.forwardRef((function(e,t){var r=e.onChange,n=e.rows,i=e.rowsMax,o=e.rowsMin,s=e.maxRows,a=e.minRows,c=void 0===a?1:a,l=e.style,u=e.value,h=(0,Nk.Z)(e,["onChange","rows","rowsMax","rowsMin","maxRows","minRows","style","value"]),d=s||i,f=n||o||c,p=V.useRef(null!=u).current,g=V.useRef(null),m=(0,qk.Z)(t,g),y=V.useRef(null),v=V.useRef(0),b=V.useState({}),w=b[0],E=b[1],S=V.useCallback((function(){var t=g.current,r=window.getComputedStyle(t),n=y.current;n.style.width=r.width,n.value=t.value||e.placeholder||"x","\n"===n.value.slice(-1)&&(n.value+=" ");var i=r["box-sizing"],o=TC(r,"padding-bottom")+TC(r,"padding-top"),s=TC(r,"border-bottom-width")+TC(r,"border-top-width"),a=n.scrollHeight-o;n.value="x";var c=n.scrollHeight-o,l=a;f&&(l=Math.max(Number(f)*c,l)),d&&(l=Math.min(Number(d)*c,l));var u=(l=Math.max(l,c))+("border-box"===i?o+s:0),h=Math.abs(l-a)<=1;E((function(e){return v.current<20&&(u>0&&Math.abs((e.outerHeightStyle||0)-u)>1||e.overflow!==h)?(v.current+=1,{overflow:h,outerHeightStyle:u}):e}))}),[d,f,e.placeholder]);V.useEffect((function(){var e=(0,PC.Z)((function(){v.current=0,S()}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}),[S]),NC((function(){S()})),V.useEffect((function(){v.current=0}),[u]);return V.createElement(V.Fragment,null,V.createElement("textarea",(0,Tk.Z)({value:u,onChange:function(e){v.current=0,p||S(),r&&r(e)},ref:m,rows:f,style:(0,Tk.Z)({height:w.outerHeightStyle,overflow:w.overflow?"hidden":null},l)},h)),V.createElement("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:y,tabIndex:-1,style:(0,Tk.Z)({},DC,l)}))}));function MC(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function BC(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e&&(MC(e.value)&&""!==e.value||t&&MC(e.defaultValue)&&""!==e.defaultValue)}var LC="undefined"===typeof window?V.useEffect:V.useLayoutEffect,UC=V.forwardRef((function(e,t){var r=e["aria-describedby"],n=e.autoComplete,i=e.autoFocus,o=e.classes,s=e.className,a=(e.color,e.defaultValue),c=e.disabled,l=e.endAdornment,u=(e.error,e.fullWidth),h=void 0!==u&&u,d=e.id,f=e.inputComponent,p=void 0===f?"input":f,g=e.inputProps,m=void 0===g?{}:g,y=e.inputRef,v=(e.margin,e.multiline),b=void 0!==v&&v,w=e.name,E=e.onBlur,S=e.onChange,_=e.onClick,A=e.onFocus,k=e.onKeyDown,C=e.onKeyUp,x=e.placeholder,I=e.readOnly,R=e.renderSuffix,P=e.rows,T=e.rowsMax,N=e.rowsMin,D=e.maxRows,O=e.minRows,M=e.startAdornment,B=e.type,L=void 0===B?"text":B,U=e.value,F=(0,Nk.Z)(e,["aria-describedby","autoComplete","autoFocus","classes","className","color","defaultValue","disabled","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","rowsMax","rowsMin","maxRows","minRows","startAdornment","type","value"]),j=null!=m.value?m.value:U,z=V.useRef(null!=j).current,K=V.useRef(),q=V.useCallback((function(e){0}),[]),Z=(0,qk.Z)(m.ref,q),H=(0,qk.Z)(y,Z),W=(0,qk.Z)(K,H),G=V.useState(!1),Y=G[0],Q=G[1],J=V.useContext(IC);var X=xC({props:e,muiFormControl:J,states:["color","disabled","error","hiddenLabel","margin","required","filled"]});X.focused=J?J.focused:Y,V.useEffect((function(){!J&&c&&Y&&(Q(!1),E&&E())}),[J,c,Y,E]);var $=J&&J.onFilled,ee=J&&J.onEmpty,te=V.useCallback((function(e){BC(e)?$&&$():ee&&ee()}),[$,ee]);LC((function(){z&&te({value:j})}),[j,te,z]);V.useEffect((function(){te(K.current)}),[]);var re=p,ne=(0,Tk.Z)({},m,{ref:W});"string"!==typeof re?ne=(0,Tk.Z)({inputRef:W,type:L},ne,{ref:null}):b?!P||D||O||T||N?(ne=(0,Tk.Z)({minRows:P||O,rowsMax:T,maxRows:D},ne),re=OC):re="textarea":ne=(0,Tk.Z)({type:L},ne);return V.useEffect((function(){J&&J.setAdornedStart(Boolean(M))}),[J,M]),V.createElement("div",(0,Tk.Z)({className:(0,Dk.Z)(o.root,o["color".concat((0,Mk.Z)(X.color||"primary"))],s,X.disabled&&o.disabled,X.error&&o.error,h&&o.fullWidth,X.focused&&o.focused,J&&o.formControl,b&&o.multiline,M&&o.adornedStart,l&&o.adornedEnd,"dense"===X.margin&&o.marginDense),onClick:function(e){K.current&&e.currentTarget===e.target&&K.current.focus(),_&&_(e)},ref:t},F),M,V.createElement(RC.Provider,{value:null},V.createElement(re,(0,Tk.Z)({"aria-invalid":X.error,"aria-describedby":r,autoComplete:n,autoFocus:i,defaultValue:a,disabled:X.disabled,id:d,onAnimationStart:function(e){te("mui-auto-fill-cancel"===e.animationName?K.current:{value:"x"})},name:w,placeholder:x,readOnly:I,required:X.required,rows:P,value:j,onKeyDown:k,onKeyUp:C},ne,{className:(0,Dk.Z)(o.input,m.className,X.disabled&&o.disabled,b&&o.inputMultiline,X.hiddenLabel&&o.inputHiddenLabel,M&&o.inputAdornedStart,l&&o.inputAdornedEnd,"search"===L&&o.inputTypeSearch,"dense"===X.margin&&o.inputMarginDense),onBlur:function(e){E&&E(e),m.onBlur&&m.onBlur(e),J&&J.onBlur?J.onBlur(e):Q(!1)},onChange:function(e){if(!z){var t=e.target||K.current;if(null==t)throw new Error((0,CC.Z)(1));te({value:t.value})}for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];m.onChange&&m.onChange.apply(m,[e].concat(n)),S&&S.apply(void 0,[e].concat(n))},onFocus:function(e){X.disabled?e.stopPropagation():(A&&A(e),m.onFocus&&m.onFocus(e),J&&J.onFocus?J.onFocus(e):Q(!0))}}))),l,R?R((0,Tk.Z)({},X,{startAdornment:M})):null)}));const FC=(0,Ok.Z)((function(e){var t="light"===e.palette.type,r={color:"currentColor",opacity:t?.42:.5,transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},n={opacity:"0 !important"},i={opacity:t?.42:.5};return{"@global":{"@keyframes mui-auto-fill":{},"@keyframes mui-auto-fill-cancel":{}},root:(0,Tk.Z)({},e.typography.body1,{color:e.palette.text.primary,lineHeight:"1.1876em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center","&$disabled":{color:e.palette.text.disabled,cursor:"default"}}),formControl:{},focused:{},disabled:{},adornedStart:{},adornedEnd:{},error:{},marginDense:{},multiline:{padding:"".concat(6,"px 0 ").concat(7,"px"),"&$marginDense":{paddingTop:3}},colorSecondary:{},fullWidth:{width:"100%"},input:{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"".concat(6,"px 0 ").concat(7,"px"),border:0,boxSizing:"content-box",background:"none",height:"1.1876em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{"-webkit-appearance":"none"},"label[data-shrink=false] + $formControl &":{"&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&:-ms-input-placeholder":n,"&::-ms-input-placeholder":n,"&:focus::-webkit-input-placeholder":i,"&:focus::-moz-placeholder":i,"&:focus:-ms-input-placeholder":i,"&:focus::-ms-input-placeholder":i},"&$disabled":{opacity:1},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},inputMarginDense:{paddingTop:3},inputMultiline:{height:"auto",resize:"none",padding:0},inputTypeSearch:{"-moz-appearance":"textfield","-webkit-appearance":"textfield"},inputAdornedStart:{},inputAdornedEnd:{},inputHiddenLabel:{}}}),{name:"MuiInputBase"})(UC);var jC=V.forwardRef((function(e,t){var r=e.disableUnderline,n=e.classes,i=e.fullWidth,o=void 0!==i&&i,s=e.inputComponent,a=void 0===s?"input":s,c=e.multiline,l=void 0!==c&&c,u=e.type,h=void 0===u?"text":u,d=(0,Nk.Z)(e,["disableUnderline","classes","fullWidth","inputComponent","multiline","type"]);return V.createElement(FC,(0,Tk.Z)({classes:(0,Tk.Z)({},n,{root:(0,Dk.Z)(n.root,!r&&n.underline),underline:null}),fullWidth:o,inputComponent:a,multiline:l,ref:t,type:h},d))}));jC.muiName="Input";const zC=(0,Ok.Z)((function(e){var t="light"===e.palette.type?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return{root:{position:"relative"},formControl:{"label + &":{marginTop:16}},focused:{},disabled:{},colorSecondary:{"&$underline:after":{borderBottomColor:e.palette.secondary.main}},underline:{"&:after":{borderBottom:"2px solid ".concat(e.palette.primary.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:e.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:"1px solid ".concat(t),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},"&:hover:not($disabled):before":{borderBottom:"2px solid ".concat(e.palette.text.primary),"@media (hover: none)":{borderBottom:"1px solid ".concat(t)}},"&$disabled:before":{borderBottomStyle:"dotted"}},error:{},marginDense:{},multiline:{},fullWidth:{},input:{},inputMarginDense:{},inputMultiline:{},inputTypeSearch:{}}}),{name:"MuiInput"})(jC);var KC=V.forwardRef((function(e,t){var r=e.disableUnderline,n=e.classes,i=e.fullWidth,o=void 0!==i&&i,s=e.inputComponent,a=void 0===s?"input":s,c=e.multiline,l=void 0!==c&&c,u=e.type,h=void 0===u?"text":u,d=(0,Nk.Z)(e,["disableUnderline","classes","fullWidth","inputComponent","multiline","type"]);return V.createElement(FC,(0,Tk.Z)({classes:(0,Tk.Z)({},n,{root:(0,Dk.Z)(n.root,!r&&n.underline),underline:null}),fullWidth:o,inputComponent:a,multiline:l,ref:t,type:h},d))}));KC.muiName="Input";const qC=(0,Ok.Z)((function(e){var t="light"===e.palette.type,r=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",n=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.09)";return{root:{position:"relative",backgroundColor:n,borderTopLeftRadius:e.shape.borderRadius,borderTopRightRadius:e.shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:t?"rgba(0, 0, 0, 0.13)":"rgba(255, 255, 255, 0.13)","@media (hover: none)":{backgroundColor:n}},"&$focused":{backgroundColor:t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.09)"},"&$disabled":{backgroundColor:t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)"}},colorSecondary:{"&$underline:after":{borderBottomColor:e.palette.secondary.main}},underline:{"&:after":{borderBottom:"2px solid ".concat(e.palette.primary.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:e.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:"1px solid ".concat(r),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},"&:hover:before":{borderBottom:"1px solid ".concat(e.palette.text.primary)},"&$disabled:before":{borderBottomStyle:"dotted"}},focused:{},disabled:{},adornedStart:{paddingLeft:12},adornedEnd:{paddingRight:12},error:{},marginDense:{},multiline:{padding:"27px 12px 10px","&$marginDense":{paddingTop:23,paddingBottom:6}},input:{padding:"27px 12px 10px","&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.type?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.type?null:"#fff",caretColor:"light"===e.palette.type?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},inputMarginDense:{paddingTop:23,paddingBottom:6},inputHiddenLabel:{paddingTop:18,paddingBottom:19,"&$inputMarginDense":{paddingTop:10,paddingBottom:11}},inputMultiline:{padding:0},inputAdornedStart:{paddingLeft:0},inputAdornedEnd:{paddingRight:0}}}),{name:"MuiFilledInput"})(KC);var ZC=__webpack_require__(8225);function VC(){return(0,ZC.Z)()||AC.Z}var HC=V.forwardRef((function(e,t){e.children;var r=e.classes,n=e.className,i=e.label,o=e.labelWidth,s=e.notched,a=e.style,c=(0,Nk.Z)(e,["children","classes","className","label","labelWidth","notched","style"]),l="rtl"===VC().direction?"right":"left";if(void 0!==i)return V.createElement("fieldset",(0,Tk.Z)({"aria-hidden":!0,className:(0,Dk.Z)(r.root,n),ref:t,style:a},c),V.createElement("legend",{className:(0,Dk.Z)(r.legendLabelled,s&&r.legendNotched)},i?V.createElement("span",null,i):V.createElement("span",{dangerouslySetInnerHTML:{__html:"​"}})));var u=o>0?.75*o+8:.01;return V.createElement("fieldset",(0,Tk.Z)({"aria-hidden":!0,style:(0,Tk.Z)((0,W.Z)({},"padding".concat((0,Mk.Z)(l)),8),a),className:(0,Dk.Z)(r.root,n),ref:t},c),V.createElement("legend",{className:r.legend,style:{width:s?u:.01}},V.createElement("span",{dangerouslySetInnerHTML:{__html:"​"}})))}));const WC=(0,Ok.Z)((function(e){return{root:{position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden"},legend:{textAlign:"left",padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})},legendLabelled:{display:"block",width:"auto",textAlign:"left",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),"& > span":{paddingLeft:5,paddingRight:5,display:"inline-block"}},legendNotched:{maxWidth:1e3,transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}}),{name:"PrivateNotchedOutline"})(HC);var GC=V.forwardRef((function(e,t){var r=e.classes,n=e.fullWidth,i=void 0!==n&&n,o=e.inputComponent,s=void 0===o?"input":o,a=e.label,c=e.labelWidth,l=void 0===c?0:c,u=e.multiline,h=void 0!==u&&u,d=e.notched,f=e.type,p=void 0===f?"text":f,g=(0,Nk.Z)(e,["classes","fullWidth","inputComponent","label","labelWidth","multiline","notched","type"]);return V.createElement(FC,(0,Tk.Z)({renderSuffix:function(e){return V.createElement(WC,{className:r.notchedOutline,label:a,labelWidth:l,notched:"undefined"!==typeof d?d:Boolean(e.startAdornment||e.filled||e.focused)})},classes:(0,Tk.Z)({},r,{root:(0,Dk.Z)(r.root,r.underline),notchedOutline:null}),fullWidth:i,inputComponent:s,multiline:h,ref:t,type:p},g))}));GC.muiName="Input";const YC=(0,Ok.Z)((function(e){var t="light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{root:{position:"relative",borderRadius:e.shape.borderRadius,"&:hover $notchedOutline":{borderColor:e.palette.text.primary},"@media (hover: none)":{"&:hover $notchedOutline":{borderColor:t}},"&$focused $notchedOutline":{borderColor:e.palette.primary.main,borderWidth:2},"&$error $notchedOutline":{borderColor:e.palette.error.main},"&$disabled $notchedOutline":{borderColor:e.palette.action.disabled}},colorSecondary:{"&$focused $notchedOutline":{borderColor:e.palette.secondary.main}},focused:{},disabled:{},adornedStart:{paddingLeft:14},adornedEnd:{paddingRight:14},error:{},marginDense:{},multiline:{padding:"18.5px 14px","&$marginDense":{paddingTop:10.5,paddingBottom:10.5}},notchedOutline:{borderColor:t},input:{padding:"18.5px 14px","&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.type?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.type?null:"#fff",caretColor:"light"===e.palette.type?null:"#fff",borderRadius:"inherit"}},inputMarginDense:{paddingTop:10.5,paddingBottom:10.5},inputMultiline:{padding:0},inputAdornedStart:{paddingLeft:0},inputAdornedEnd:{paddingRight:0}}}),{name:"MuiOutlinedInput"})(GC);function QC(){return V.useContext(RC)}var JC=V.forwardRef((function(e,t){var r=e.children,n=e.classes,i=e.className,o=(e.color,e.component),s=void 0===o?"label":o,a=(e.disabled,e.error,e.filled,e.focused,e.required,(0,Nk.Z)(e,["children","classes","className","color","component","disabled","error","filled","focused","required"])),c=xC({props:e,muiFormControl:QC(),states:["color","required","focused","disabled","error","filled"]});return V.createElement(s,(0,Tk.Z)({className:(0,Dk.Z)(n.root,n["color".concat((0,Mk.Z)(c.color||"primary"))],i,c.disabled&&n.disabled,c.error&&n.error,c.filled&&n.filled,c.focused&&n.focused,c.required&&n.required),ref:t},a),r,c.required&&V.createElement("span",{"aria-hidden":!0,className:(0,Dk.Z)(n.asterisk,c.error&&n.error)},"\u2009","*"))}));const XC=(0,Ok.Z)((function(e){return{root:(0,Tk.Z)({color:e.palette.text.secondary},e.typography.body1,{lineHeight:1,padding:0,"&$focused":{color:e.palette.primary.main},"&$disabled":{color:e.palette.text.disabled},"&$error":{color:e.palette.error.main}}),colorSecondary:{"&$focused":{color:e.palette.secondary.main}},focused:{},disabled:{},error:{},filled:{},required:{},asterisk:{"&$error":{color:e.palette.error.main}}}}),{name:"MuiFormLabel"})(JC);var $C=V.forwardRef((function(e,t){var r=e.classes,n=e.className,i=e.disableAnimation,o=void 0!==i&&i,s=(e.margin,e.shrink),a=(e.variant,(0,Nk.Z)(e,["classes","className","disableAnimation","margin","shrink","variant"])),c=QC(),l=s;"undefined"===typeof l&&c&&(l=c.filled||c.focused||c.adornedStart);var u=xC({props:e,muiFormControl:c,states:["margin","variant"]});return V.createElement(XC,(0,Tk.Z)({"data-shrink":l,className:(0,Dk.Z)(r.root,n,c&&r.formControl,!o&&r.animated,l&&r.shrink,"dense"===u.margin&&r.marginDense,{filled:r.filled,outlined:r.outlined}[u.variant]),classes:{focused:r.focused,disabled:r.disabled,error:r.error,required:r.required,asterisk:r.asterisk},ref:t},a))}));const ex=(0,Ok.Z)((function(e){return{root:{display:"block",transformOrigin:"top left"},focused:{},disabled:{},error:{},required:{},asterisk:{},formControl:{position:"absolute",left:0,top:0,transform:"translate(0, 24px) scale(1)"},marginDense:{transform:"translate(0, 21px) scale(1)"},shrink:{transform:"translate(0, 1.5px) scale(0.75)",transformOrigin:"top left"},animated:{transition:e.transitions.create(["color","transform"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})},filled:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 20px) scale(1)","&$marginDense":{transform:"translate(12px, 17px) scale(1)"},"&$shrink":{transform:"translate(12px, 10px) scale(0.75)","&$marginDense":{transform:"translate(12px, 7px) scale(0.75)"}}},outlined:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 20px) scale(1)","&$marginDense":{transform:"translate(14px, 12px) scale(1)"},"&$shrink":{transform:"translate(14px, -6px) scale(0.75)"}}}}),{name:"MuiInputLabel"})($C);var tx=__webpack_require__(2879),rx=V.forwardRef((function(e,t){var r=e.children,n=e.classes,i=e.className,o=e.color,s=void 0===o?"primary":o,a=e.component,c=void 0===a?"div":a,l=e.disabled,u=void 0!==l&&l,h=e.error,d=void 0!==h&&h,f=e.fullWidth,p=void 0!==f&&f,g=e.focused,m=e.hiddenLabel,y=void 0!==m&&m,v=e.margin,b=void 0===v?"none":v,w=e.required,E=void 0!==w&&w,S=e.size,_=e.variant,A=void 0===_?"standard":_,k=(0,Nk.Z)(e,["children","classes","className","color","component","disabled","error","fullWidth","focused","hiddenLabel","margin","required","size","variant"]),C=V.useState((function(){var e=!1;return r&&V.Children.forEach(r,(function(t){if((0,tx.Z)(t,["Input","Select"])){var r=(0,tx.Z)(t,["Select"])?t.props.input:t;r&&r.props.startAdornment&&(e=!0)}})),e})),x=C[0],I=C[1],R=V.useState((function(){var e=!1;return r&&V.Children.forEach(r,(function(t){(0,tx.Z)(t,["Input","Select"])&&BC(t.props,!0)&&(e=!0)})),e})),P=R[0],T=R[1],N=V.useState(!1),D=N[0],O=N[1],M=void 0!==g?g:D;u&&M&&O(!1);var B=V.useCallback((function(){T(!0)}),[]),L={adornedStart:x,setAdornedStart:I,color:s,disabled:u,error:d,filled:P,focused:M,fullWidth:p,hiddenLabel:y,margin:("small"===S?"dense":void 0)||b,onBlur:function(){O(!1)},onEmpty:V.useCallback((function(){T(!1)}),[]),onFilled:B,onFocus:function(){O(!0)},registerEffect:undefined,required:E,variant:A};return V.createElement(RC.Provider,{value:L},V.createElement(c,(0,Tk.Z)({className:(0,Dk.Z)(n.root,i,"none"!==b&&n["margin".concat((0,Mk.Z)(b))],p&&n.fullWidth),ref:t},k),r))}));const nx=(0,Ok.Z)({root:{display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},marginNormal:{marginTop:16,marginBottom:8},marginDense:{marginTop:8,marginBottom:4},fullWidth:{width:"100%"}},{name:"MuiFormControl"})(rx);var ix=V.forwardRef((function(e,t){var r=e.children,n=e.classes,i=e.className,o=e.component,s=void 0===o?"p":o,a=(e.disabled,e.error,e.filled,e.focused,e.margin,e.required,e.variant,(0,Nk.Z)(e,["children","classes","className","component","disabled","error","filled","focused","margin","required","variant"])),c=xC({props:e,muiFormControl:QC(),states:["variant","margin","disabled","error","filled","focused","required"]});return V.createElement(s,(0,Tk.Z)({className:(0,Dk.Z)(n.root,("filled"===c.variant||"outlined"===c.variant)&&n.contained,i,c.disabled&&n.disabled,c.error&&n.error,c.filled&&n.filled,c.focused&&n.focused,c.required&&n.required,"dense"===c.margin&&n.marginDense),ref:t},a)," "===r?V.createElement("span",{dangerouslySetInnerHTML:{__html:"​"}}):r)}));const ox=(0,Ok.Z)((function(e){return{root:(0,Tk.Z)({color:e.palette.text.secondary},e.typography.caption,{textAlign:"left",marginTop:3,margin:0,"&$disabled":{color:e.palette.text.disabled},"&$error":{color:e.palette.error.main}}),error:{},disabled:{},marginDense:{marginTop:4},contained:{marginLeft:14,marginRight:14},focused:{},filled:{},required:{}}}),{name:"MuiFormHelperText"})(ix);var sx=__webpack_require__(9168),ax=__webpack_require__(885),cx=__webpack_require__(1002),lx=(__webpack_require__(6214),__webpack_require__(516)),ux=__webpack_require__(3958),hx=__webpack_require__(468),dx=__webpack_require__(3621),fx=__webpack_require__(1225);var px="undefined"!==typeof window?V.useLayoutEffect:V.useEffect;const gx=V.forwardRef((function(e,t){var r=e.children,n=e.container,i=e.disablePortal,o=void 0!==i&&i,s=e.onRendered,a=V.useState(null),c=a[0],l=a[1],u=(0,qk.Z)(V.isValidElement(r)?r.ref:null,t);return px((function(){o||l(function(e){return e="function"===typeof e?e():e,H.findDOMNode(e)}(n)||document.body)}),[n,o]),px((function(){if(c&&!o)return(0,fx.Z)(t,c),function(){(0,fx.Z)(t,null)}}),[t,c,o]),px((function(){s&&(c||o)&&s()}),[s,c,o]),o?V.isValidElement(r)?V.cloneElement(r,{ref:u}):r:c?H.createPortal(r,c):c}));var mx=__webpack_require__(4398);var yx=__webpack_require__(3144);function vx(){var e=document.createElement("div");e.style.width="99px",e.style.height="99px",e.style.position="absolute",e.style.top="-9999px",e.style.overflow="scroll",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}function bx(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function wx(e){return parseInt(window.getComputedStyle(e)["padding-right"],10)||0}function Ex(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4?arguments[4]:void 0,o=[t,r].concat((0,Hk.Z)(n)),s=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(e.children,(function(e){1===e.nodeType&&-1===o.indexOf(e)&&-1===s.indexOf(e.tagName)&&bx(e,i)}))}function Sx(e,t){var r=-1;return e.some((function(e,n){return!!t(e)&&(r=n,!0)})),r}function _x(e,t){var r,n=[],i=[],o=e.container;if(!t.disableScrollLock){if(function(e){var t=(0,lx.Z)(e);return t.body===e?(0,ux.Z)(t).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(o)){var s=vx();n.push({value:o.style.paddingRight,key:"padding-right",el:o}),o.style["padding-right"]="".concat(wx(o)+s,"px"),r=(0,lx.Z)(o).querySelectorAll(".mui-fixed"),[].forEach.call(r,(function(e){i.push(e.style.paddingRight),e.style.paddingRight="".concat(wx(e)+s,"px")}))}var a=o.parentElement,c="HTML"===a.nodeName&&"scroll"===window.getComputedStyle(a)["overflow-y"]?a:o;n.push({value:c.style.overflow,key:"overflow",el:c}),c.style.overflow="hidden"}return function(){r&&[].forEach.call(r,(function(e,t){i[t]?e.style.paddingRight=i[t]:e.style.removeProperty("padding-right")})),n.forEach((function(e){var t=e.value,r=e.el,n=e.key;t?r.style.setProperty(n,t):r.style.removeProperty(n)}))}}var Ax=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.modals=[],this.containers=[]}return(0,yx.Z)(e,[{key:"add",value:function(e,t){var r=this.modals.indexOf(e);if(-1!==r)return r;r=this.modals.length,this.modals.push(e),e.modalRef&&bx(e.modalRef,!1);var n=function(e){var t=[];return[].forEach.call(e.children,(function(e){e.getAttribute&&"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);Ex(t,e.mountNode,e.modalRef,n,!0);var i=Sx(this.containers,(function(e){return e.container===t}));return-1!==i?(this.containers[i].modals.push(e),r):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblingNodes:n}),r)}},{key:"mount",value:function(e,t){var r=Sx(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),n=this.containers[r];n.restore||(n.restore=_x(n,t))}},{key:"remove",value:function(e){var t=this.modals.indexOf(e);if(-1===t)return t;var r=Sx(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),n=this.containers[r];if(n.modals.splice(n.modals.indexOf(e),1),this.modals.splice(t,1),0===n.modals.length)n.restore&&n.restore(),e.modalRef&&bx(e.modalRef,!0),Ex(n.container,e.mountNode,e.modalRef,n.hiddenSiblingNodes,!1),this.containers.splice(r,1);else{var i=n.modals[n.modals.length-1];i.modalRef&&bx(i.modalRef,!1)}return t}},{key:"isTopModal",value:function(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}]),e}();const kx=function(e){var t=e.children,r=e.disableAutoFocus,n=void 0!==r&&r,i=e.disableEnforceFocus,o=void 0!==i&&i,s=e.disableRestoreFocus,a=void 0!==s&&s,c=e.getDoc,l=e.isEnabled,u=e.open,h=V.useRef(),d=V.useRef(null),f=V.useRef(null),p=V.useRef(),g=V.useRef(null),m=V.useCallback((function(e){g.current=H.findDOMNode(e)}),[]),y=(0,qk.Z)(t.ref,m),v=V.useRef();return V.useEffect((function(){v.current=u}),[u]),!v.current&&u&&"undefined"!==typeof window&&(p.current=c().activeElement),V.useEffect((function(){if(u){var e=(0,lx.Z)(g.current);n||!g.current||g.current.contains(e.activeElement)||(g.current.hasAttribute("tabIndex")||g.current.setAttribute("tabIndex",-1),g.current.focus());var t=function(){null!==g.current&&(e.hasFocus()&&!o&&l()&&!h.current?g.current&&!g.current.contains(e.activeElement)&&g.current.focus():h.current=!1)},r=function(t){!o&&l()&&9===t.keyCode&&e.activeElement===g.current&&(h.current=!0,t.shiftKey?f.current.focus():d.current.focus())};e.addEventListener("focus",t,!0),e.addEventListener("keydown",r,!0);var i=setInterval((function(){t()}),50);return function(){clearInterval(i),e.removeEventListener("focus",t,!0),e.removeEventListener("keydown",r,!0),a||(p.current&&p.current.focus&&p.current.focus(),p.current=null)}}}),[n,o,a,l,u]),V.createElement(V.Fragment,null,V.createElement("div",{tabIndex:0,ref:d,"data-test":"sentinelStart"}),V.cloneElement(t,{ref:y}),V.createElement("div",{tabIndex:0,ref:f,"data-test":"sentinelEnd"}))};var Cx={root:{zIndex:-1,position:"fixed",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}};const xx=V.forwardRef((function(e,t){var r=e.invisible,n=void 0!==r&&r,i=e.open,o=(0,Nk.Z)(e,["invisible","open"]);return i?V.createElement("div",(0,Tk.Z)({"aria-hidden":!0,ref:t},o,{style:(0,Tk.Z)({},Cx.root,n?Cx.invisible:{},o.style)})):null}));var Ix=new Ax,Rx=V.forwardRef((function(e,t){var r=(0,ZC.Z)(),n=(0,dx.Z)({name:"MuiModal",props:(0,Tk.Z)({},e),theme:r}),i=n.BackdropComponent,o=void 0===i?xx:i,s=n.BackdropProps,a=n.children,c=n.closeAfterTransition,l=void 0!==c&&c,u=n.container,h=n.disableAutoFocus,d=void 0!==h&&h,f=n.disableBackdropClick,p=void 0!==f&&f,g=n.disableEnforceFocus,m=void 0!==g&&g,y=n.disableEscapeKeyDown,v=void 0!==y&&y,b=n.disablePortal,w=void 0!==b&&b,E=n.disableRestoreFocus,S=void 0!==E&&E,_=n.disableScrollLock,A=void 0!==_&&_,k=n.hideBackdrop,C=void 0!==k&&k,x=n.keepMounted,I=void 0!==x&&x,R=n.manager,P=void 0===R?Ix:R,T=n.onBackdropClick,N=n.onClose,D=n.onEscapeKeyDown,O=n.onRendered,M=n.open,B=(0,Nk.Z)(n,["BackdropComponent","BackdropProps","children","closeAfterTransition","container","disableAutoFocus","disableBackdropClick","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onEscapeKeyDown","onRendered","open"]),L=V.useState(!0),U=L[0],F=L[1],j=V.useRef({}),z=V.useRef(null),K=V.useRef(null),q=(0,qk.Z)(K,t),Z=function(e){return!!e.children&&e.children.props.hasOwnProperty("in")}(n),W=function(){return(0,lx.Z)(z.current)},G=function(){return j.current.modalRef=K.current,j.current.mountNode=z.current,j.current},Y=function(){P.mount(G(),{disableScrollLock:A}),K.current.scrollTop=0},Q=(0,Zk.Z)((function(){var e=function(e){return e="function"===typeof e?e():e,H.findDOMNode(e)}(u)||W().body;P.add(G(),e),K.current&&Y()})),J=V.useCallback((function(){return P.isTopModal(G())}),[P]),X=(0,Zk.Z)((function(e){z.current=e,e&&(O&&O(),M&&J()?Y():bx(K.current,!0))})),$=V.useCallback((function(){P.remove(G())}),[P]);if(V.useEffect((function(){return function(){$()}}),[$]),V.useEffect((function(){M?Q():Z&&l||$()}),[M,$,Z,l,Q]),!I&&!M&&(!Z||U))return null;var ee=function(e){return{root:{position:"fixed",zIndex:e.zIndex.modal,right:0,bottom:0,top:0,left:0},hidden:{visibility:"hidden"}}}(r||{zIndex:mx.Z}),te={};return void 0===a.props.tabIndex&&(te.tabIndex=a.props.tabIndex||"-1"),Z&&(te.onEnter=(0,hx.Z)((function(){F(!1)}),a.props.onEnter),te.onExited=(0,hx.Z)((function(){F(!0),l&&$()}),a.props.onExited)),V.createElement(gx,{ref:X,container:u,disablePortal:w},V.createElement("div",(0,Tk.Z)({ref:q,onKeyDown:function(e){"Escape"===e.key&&J()&&(D&&D(e),v||(e.stopPropagation(),N&&N(e,"escapeKeyDown")))},role:"presentation"},B,{style:(0,Tk.Z)({},ee.root,!M&&U?ee.hidden:{},B.style)}),C?null:V.createElement(o,(0,Tk.Z)({open:M,onClick:function(e){e.target===e.currentTarget&&(T&&T(e),!p&&N&&N(e,"backdropClick"))}},s)),V.createElement(kx,{disableEnforceFocus:m,disableAutoFocus:d,disableRestoreFocus:S,getDoc:W,isEnabled:J,open:M},V.cloneElement(a,te))))}));const Px=Rx,Tx=!1;var Nx="unmounted",Dx="exited",Ox="entering",Mx="entered",Bx="exiting",Lx=function(e){function t(t,r){var n;n=e.call(this,t,r)||this;var i,o=r&&!r.isMounting?t.enter:t.appear;return n.appearStatus=null,t.in?o?(i=Dx,n.appearStatus=Ox):i=Mx:i=t.unmountOnExit||t.mountOnEnter?Nx:Dx,n.state={status:i},n.nextCallback=null,n}(0,Yk.Z)(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===Nx?{status:Dx}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(e){var t=null;if(e!==this.props){var r=this.state.status;this.props.in?r!==Ox&&r!==Mx&&(t=Ox):r!==Ox&&r!==Mx||(t=Bx)}this.updateStatus(!1,t)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var e,t,r,n=this.props.timeout;return e=t=r=n,null!=n&&"number"!==typeof n&&(e=n.exit,t=n.enter,r=void 0!==n.appear?n.appear:t),{exit:e,enter:t,appear:r}},r.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===Ox){if(this.props.unmountOnExit||this.props.mountOnEnter){var r=this.props.nodeRef?this.props.nodeRef.current:H.findDOMNode(this);r&&function(e){e.scrollTop}(r)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Dx&&this.setState({status:Nx})},r.performEnter=function(e){var t=this,r=this.props.enter,n=this.context?this.context.isMounting:e,i=this.props.nodeRef?[n]:[H.findDOMNode(this),n],o=i[0],s=i[1],a=this.getTimeouts(),c=n?a.appear:a.enter;!e&&!r||Tx?this.safeSetState({status:Mx},(function(){t.props.onEntered(o)})):(this.props.onEnter(o,s),this.safeSetState({status:Ox},(function(){t.props.onEntering(o,s),t.onTransitionEnd(c,(function(){t.safeSetState({status:Mx},(function(){t.props.onEntered(o,s)}))}))})))},r.performExit=function(){var e=this,t=this.props.exit,r=this.getTimeouts(),n=this.props.nodeRef?void 0:H.findDOMNode(this);t&&!Tx?(this.props.onExit(n),this.safeSetState({status:Bx},(function(){e.props.onExiting(n),e.onTransitionEnd(r.exit,(function(){e.safeSetState({status:Dx},(function(){e.props.onExited(n)}))}))}))):this.safeSetState({status:Dx},(function(){e.props.onExited(n)}))},r.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},r.setNextCallback=function(e){var t=this,r=!0;return this.nextCallback=function(n){r&&(r=!1,t.nextCallback=null,e(n))},this.nextCallback.cancel=function(){r=!1},this.nextCallback},r.onTransitionEnd=function(e,t){this.setNextCallback(t);var r=this.props.nodeRef?this.props.nodeRef.current:H.findDOMNode(this),n=null==e&&!this.props.addEndListener;if(r&&!n){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[r,this.nextCallback],o=i[0],s=i[1];this.props.addEndListener(o,s)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},r.render=function(){var e=this.state.status;if(e===Nx)return null;var t=this.props,r=t.children,n=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,(0,Wk.Z)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return V.createElement(Qk.Provider,{value:null},"function"===typeof r?r(e,n):V.cloneElement(V.Children.only(r),n))},t}(V.Component);function Ux(){}Lx.contextType=Qk,Lx.propTypes={},Lx.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ux,onEntering:Ux,onEntered:Ux,onExit:Ux,onExiting:Ux,onExited:Ux},Lx.UNMOUNTED=Nx,Lx.EXITED=Dx,Lx.ENTERING=Ox,Lx.ENTERED=Mx,Lx.EXITING=Bx;const Fx=Lx;function jx(e,t){var r=e.timeout,n=e.style,i=void 0===n?{}:n;return{duration:i.transitionDuration||"number"===typeof r?r:r[t.mode]||0,delay:i.transitionDelay}}function zx(e){return"scale(".concat(e,", ").concat(Math.pow(e,2),")")}var Kx={entering:{opacity:1,transform:zx(1)},entered:{opacity:1,transform:"none"}},qx=V.forwardRef((function(e,t){var r=e.children,n=e.disableStrictModeCompat,i=void 0!==n&&n,o=e.in,s=e.onEnter,a=e.onEntered,c=e.onEntering,l=e.onExit,u=e.onExited,h=e.onExiting,d=e.style,f=e.timeout,p=void 0===f?"auto":f,g=e.TransitionComponent,m=void 0===g?Fx:g,y=(0,Nk.Z)(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),v=V.useRef(),b=V.useRef(),w=VC(),E=w.unstable_strictMode&&!i,S=V.useRef(null),_=(0,qk.Z)(r.ref,t),A=(0,qk.Z)(E?S:void 0,_),k=function(e){return function(t,r){if(e){var n=E?[S.current,t]:[t,r],i=(0,ax.Z)(n,2),o=i[0],s=i[1];void 0===s?e(o):e(o,s)}}},C=k(c),x=k((function(e,t){!function(e){e.scrollTop}(e);var r,n=jx({style:d,timeout:p},{mode:"enter"}),i=n.duration,o=n.delay;"auto"===p?(r=w.transitions.getAutoHeightDuration(e.clientHeight),b.current=r):r=i,e.style.transition=[w.transitions.create("opacity",{duration:r,delay:o}),w.transitions.create("transform",{duration:.666*r,delay:o})].join(","),s&&s(e,t)})),I=k(a),R=k(h),P=k((function(e){var t,r=jx({style:d,timeout:p},{mode:"exit"}),n=r.duration,i=r.delay;"auto"===p?(t=w.transitions.getAutoHeightDuration(e.clientHeight),b.current=t):t=n,e.style.transition=[w.transitions.create("opacity",{duration:t,delay:i}),w.transitions.create("transform",{duration:.666*t,delay:i||.333*t})].join(","),e.style.opacity="0",e.style.transform=zx(.75),l&&l(e)})),T=k(u);return V.useEffect((function(){return function(){clearTimeout(v.current)}}),[]),V.createElement(m,(0,Tk.Z)({appear:!0,in:o,nodeRef:E?S:void 0,onEnter:x,onEntered:I,onEntering:C,onExit:P,onExited:T,onExiting:R,addEndListener:function(e,t){var r=E?e:t;"auto"===p&&(v.current=setTimeout(r,b.current||0))},timeout:"auto"===p?null:p},y),(function(e,t){return V.cloneElement(r,(0,Tk.Z)({style:(0,Tk.Z)({opacity:0,transform:zx(.75),visibility:"exited"!==e||o?void 0:"hidden"},Kx[e],d,r.props.style),ref:A},t))}))}));qx.muiSupportAuto=!0;const Zx=qx;function Vx(e,t){var r=0;return"number"===typeof t?r=t:"center"===t?r=e.height/2:"bottom"===t&&(r=e.height),r}function Hx(e,t){var r=0;return"number"===typeof t?r=t:"center"===t?r=e.width/2:"right"===t&&(r=e.width),r}function Wx(e){return[e.horizontal,e.vertical].map((function(e){return"number"===typeof e?"".concat(e,"px"):e})).join(" ")}function Gx(e){return"function"===typeof e?e():e}var Yx=V.forwardRef((function(e,t){var r=e.action,n=e.anchorEl,i=e.anchorOrigin,o=void 0===i?{vertical:"top",horizontal:"left"}:i,s=e.anchorPosition,a=e.anchorReference,c=void 0===a?"anchorEl":a,l=e.children,u=e.classes,h=e.className,d=e.container,f=e.elevation,p=void 0===f?8:f,g=e.getContentAnchorEl,m=e.marginThreshold,y=void 0===m?16:m,v=e.onEnter,b=e.onEntered,w=e.onEntering,E=e.onExit,S=e.onExited,_=e.onExiting,A=e.open,k=e.PaperProps,C=void 0===k?{}:k,x=e.transformOrigin,I=void 0===x?{vertical:"top",horizontal:"left"}:x,R=e.TransitionComponent,P=void 0===R?Zx:R,T=e.transitionDuration,N=void 0===T?"auto":T,D=e.TransitionProps,O=void 0===D?{}:D,M=(0,Nk.Z)(e,["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","classes","className","container","elevation","getContentAnchorEl","marginThreshold","onEnter","onEntered","onEntering","onExit","onExited","onExiting","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"]),B=V.useRef(),L=V.useCallback((function(e){if("anchorPosition"===c)return s;var t=Gx(n),r=(t&&1===t.nodeType?t:(0,lx.Z)(B.current).body).getBoundingClientRect(),i=0===e?o.vertical:"center";return{top:r.top+Vx(r,i),left:r.left+Hx(r,o.horizontal)}}),[n,o.horizontal,o.vertical,s,c]),U=V.useCallback((function(e){var t=0;if(g&&"anchorEl"===c){var r=g(e);if(r&&e.contains(r)){var n=function(e,t){for(var r=t,n=0;r&&r!==e;)n+=(r=r.parentElement).scrollTop;return n}(e,r);t=r.offsetTop+r.clientHeight/2-n||0}0}return t}),[o.vertical,c,g]),F=V.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{vertical:Vx(e,I.vertical)+t,horizontal:Hx(e,I.horizontal)}}),[I.horizontal,I.vertical]),j=V.useCallback((function(e){var t=U(e),r={width:e.offsetWidth,height:e.offsetHeight},i=F(r,t);if("none"===c)return{top:null,left:null,transformOrigin:Wx(i)};var o=L(t),s=o.top-i.vertical,a=o.left-i.horizontal,l=s+r.height,u=a+r.width,h=(0,ux.Z)(Gx(n)),d=h.innerHeight-y,f=h.innerWidth-y;if(s<y){var p=s-y;s-=p,i.vertical+=p}else if(l>d){var g=l-d;s-=g,i.vertical+=g}if(a<y){var m=a-y;a-=m,i.horizontal+=m}else if(u>f){var v=u-f;a-=v,i.horizontal+=v}return{top:"".concat(Math.round(s),"px"),left:"".concat(Math.round(a),"px"),transformOrigin:Wx(i)}}),[n,c,L,U,F,y]),z=V.useCallback((function(){var e=B.current;if(e){var t=j(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin}}),[j]),K=V.useCallback((function(e){B.current=H.findDOMNode(e)}),[]);V.useEffect((function(){A&&z()})),V.useImperativeHandle(r,(function(){return A?{updatePosition:function(){z()}}:null}),[A,z]),V.useEffect((function(){if(A){var e=(0,PC.Z)((function(){z()}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}}),[A,z]);var q=N;"auto"!==N||P.muiSupportAuto||(q=void 0);var Z=d||(n?(0,lx.Z)(Gx(n)).body:void 0);return V.createElement(Px,(0,Tk.Z)({container:Z,open:A,ref:t,BackdropProps:{invisible:!0},className:(0,Dk.Z)(u.root,h)},M),V.createElement(P,(0,Tk.Z)({appear:!0,in:A,onEnter:v,onEntered:b,onExit:E,onExited:S,onExiting:_,timeout:q},O,{onEntering:(0,hx.Z)((function(e,t){w&&w(e,t),z()}),O.onEntering)}),V.createElement(Lk,(0,Tk.Z)({elevation:p,ref:K},C,{className:(0,Dk.Z)(u.paper,C.className)}),l)))}));const Qx=(0,Ok.Z)({root:{},paper:{position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}},{name:"MuiPopover"})(Yx);const Jx=V.createContext({});var Xx=V.forwardRef((function(e,t){var r=e.children,n=e.classes,i=e.className,o=e.component,s=void 0===o?"ul":o,a=e.dense,c=void 0!==a&&a,l=e.disablePadding,u=void 0!==l&&l,h=e.subheader,d=(0,Nk.Z)(e,["children","classes","className","component","dense","disablePadding","subheader"]),f=V.useMemo((function(){return{dense:c}}),[c]);return V.createElement(Jx.Provider,{value:f},V.createElement(s,(0,Tk.Z)({className:(0,Dk.Z)(n.root,i,c&&n.dense,!u&&n.padding,h&&n.subheader),ref:t},d),h,r))}));const $x=(0,Ok.Z)({root:{listStyle:"none",margin:0,padding:0,position:"relative"},padding:{paddingTop:8,paddingBottom:8},dense:{},subheader:{paddingTop:0}},{name:"MuiList"})(Xx);function eI(e,t,r){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:r?null:e.firstChild}function tI(e,t,r){return e===t?r?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:r?null:e.lastChild}function rI(e,t){if(void 0===t)return!0;var r=e.innerText;return void 0===r&&(r=e.textContent),0!==(r=r.trim().toLowerCase()).length&&(t.repeating?r[0]===t.keys[0]:0===r.indexOf(t.keys.join("")))}function nI(e,t,r,n,i,o){for(var s=!1,a=i(e,t,!!t&&r);a;){if(a===e.firstChild){if(s)return;s=!0}var c=!n&&(a.disabled||"true"===a.getAttribute("aria-disabled"));if(a.hasAttribute("tabindex")&&rI(a,o)&&!c)return void a.focus();a=i(e,a,r)}}var iI="undefined"===typeof window?V.useEffect:V.useLayoutEffect,oI=V.forwardRef((function(e,t){var r=e.actions,n=e.autoFocus,i=void 0!==n&&n,o=e.autoFocusItem,s=void 0!==o&&o,a=e.children,c=e.className,l=e.disabledItemsFocusable,u=void 0!==l&&l,h=e.disableListWrap,d=void 0!==h&&h,f=e.onKeyDown,p=e.variant,g=void 0===p?"selectedMenu":p,m=(0,Nk.Z)(e,["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"]),y=V.useRef(null),v=V.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});iI((function(){i&&y.current.focus()}),[i]),V.useImperativeHandle(r,(function(){return{adjustStyleForScrollbar:function(e,t){var r=!y.current.style.width;if(e.clientHeight<y.current.clientHeight&&r){var n="".concat(vx(),"px");y.current.style["rtl"===t.direction?"paddingLeft":"paddingRight"]=n,y.current.style.width="calc(100% + ".concat(n,")")}return y.current}}}),[]);var b=V.useCallback((function(e){y.current=H.findDOMNode(e)}),[]),w=(0,qk.Z)(b,t),E=-1;V.Children.forEach(a,(function(e,t){V.isValidElement(e)&&(e.props.disabled||("selectedMenu"===g&&e.props.selected||-1===E)&&(E=t))}));var S=V.Children.map(a,(function(e,t){if(t===E){var r={};return s&&(r.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===g&&(r.tabIndex=0),V.cloneElement(e,r)}return e}));return V.createElement($x,(0,Tk.Z)({role:"menu",ref:w,className:c,onKeyDown:function(e){var t=y.current,r=e.key,n=(0,lx.Z)(t).activeElement;if("ArrowDown"===r)e.preventDefault(),nI(t,n,d,u,eI);else if("ArrowUp"===r)e.preventDefault(),nI(t,n,d,u,tI);else if("Home"===r)e.preventDefault(),nI(t,null,d,u,eI);else if("End"===r)e.preventDefault(),nI(t,null,d,u,tI);else if(1===r.length){var i=v.current,o=r.toLowerCase(),s=performance.now();i.keys.length>0&&(s-i.lastTime>500?(i.keys=[],i.repeating=!0,i.previousKeyMatched=!0):i.repeating&&o!==i.keys[0]&&(i.repeating=!1)),i.lastTime=s,i.keys.push(o);var a=n&&!i.repeating&&rI(n,i);i.previousKeyMatched&&(a||nI(t,n,!1,u,eI,i))?e.preventDefault():i.previousKeyMatched=!1}f&&f(e)},tabIndex:i?0:-1},m),S)}));const sI=oI;var aI={vertical:"top",horizontal:"right"},cI={vertical:"top",horizontal:"left"},lI=V.forwardRef((function(e,t){var r=e.autoFocus,n=void 0===r||r,i=e.children,o=e.classes,s=e.disableAutoFocusItem,a=void 0!==s&&s,c=e.MenuListProps,l=void 0===c?{}:c,u=e.onClose,h=e.onEntering,d=e.open,f=e.PaperProps,p=void 0===f?{}:f,g=e.PopoverClasses,m=e.transitionDuration,y=void 0===m?"auto":m,v=e.TransitionProps,b=(v=void 0===v?{}:v).onEntering,w=(0,Nk.Z)(v,["onEntering"]),E=e.variant,S=void 0===E?"selectedMenu":E,_=(0,Nk.Z)(e,["autoFocus","children","classes","disableAutoFocusItem","MenuListProps","onClose","onEntering","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant"]),A=VC(),k=n&&!a&&d,C=V.useRef(null),x=V.useRef(null),I=-1;V.Children.map(i,(function(e,t){V.isValidElement(e)&&(e.props.disabled||("menu"!==S&&e.props.selected||-1===I)&&(I=t))}));var R=V.Children.map(i,(function(e,t){return t===I?V.cloneElement(e,{ref:function(t){x.current=H.findDOMNode(t),(0,fx.Z)(e.ref,t)}}):e}));return V.createElement(Qx,(0,Tk.Z)({getContentAnchorEl:function(){return x.current},classes:g,onClose:u,TransitionProps:(0,Tk.Z)({onEntering:function(e,t){C.current&&C.current.adjustStyleForScrollbar(e,A),h&&h(e,t),b&&b(e,t)}},w),anchorOrigin:"rtl"===A.direction?aI:cI,transformOrigin:"rtl"===A.direction?aI:cI,PaperProps:(0,Tk.Z)({},p,{classes:(0,Tk.Z)({},p.classes,{root:o.paper})}),open:d,ref:t,transitionDuration:y},_),V.createElement(sI,(0,Tk.Z)({onKeyDown:function(e){"Tab"===e.key&&(e.preventDefault(),u&&u(e,"tabKeyDown"))},actions:C,autoFocus:n&&(-1===I||a),autoFocusItem:k,variant:S},l,{className:(0,Dk.Z)(o.list,l.className)}),R))}));const uI=(0,Ok.Z)({paper:{maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"},list:{outline:0}},{name:"MuiMenu"})(lI);var hI=__webpack_require__(794);function dI(e,t){return"object"===(0,cx.Z)(t)&&null!==t?e===t:String(e)===String(t)}const fI=V.forwardRef((function(e,t){var r=e["aria-label"],n=e.autoFocus,i=e.autoWidth,o=e.children,s=e.classes,a=e.className,c=e.defaultValue,l=e.disabled,u=e.displayEmpty,h=e.IconComponent,d=e.inputRef,f=e.labelId,p=e.MenuProps,g=void 0===p?{}:p,m=e.multiple,y=e.name,v=e.onBlur,b=e.onChange,w=e.onClose,E=e.onFocus,S=e.onOpen,_=e.open,A=e.readOnly,k=e.renderValue,C=e.SelectDisplayProps,x=void 0===C?{}:C,I=e.tabIndex,R=(e.type,e.value),P=e.variant,T=void 0===P?"standard":P,N=(0,Nk.Z)(e,["aria-label","autoFocus","autoWidth","children","classes","className","defaultValue","disabled","displayEmpty","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"]),D=(0,hI.Z)({controlled:R,default:c,name:"Select"}),O=(0,ax.Z)(D,2),M=O[0],B=O[1],L=V.useRef(null),U=V.useState(null),F=U[0],j=U[1],z=V.useRef(null!=_).current,K=V.useState(),q=K[0],Z=K[1],H=V.useState(!1),W=H[0],G=H[1],Y=(0,qk.Z)(t,d);V.useImperativeHandle(Y,(function(){return{focus:function(){F.focus()},node:L.current,value:M}}),[F,M]),V.useEffect((function(){n&&F&&F.focus()}),[n,F]),V.useEffect((function(){if(F){var e=(0,lx.Z)(F).getElementById(f);if(e){var t=function(){getSelection().isCollapsed&&F.focus()};return e.addEventListener("click",t),function(){e.removeEventListener("click",t)}}}}),[f,F]);var Q,J,X=function(e,t){e?S&&S(t):w&&w(t),z||(Z(i?null:F.clientWidth),G(e))},$=V.Children.toArray(o),ee=function(e){return function(t){var r;if(m||X(!1,t),m){r=Array.isArray(M)?M.slice():[];var n=M.indexOf(e.props.value);-1===n?r.push(e.props.value):r.splice(n,1)}else r=e.props.value;e.props.onClick&&e.props.onClick(t),M!==r&&(B(r),b&&(t.persist(),Object.defineProperty(t,"target",{writable:!0,value:{value:r,name:y}}),b(t,e)))}},te=null!==F&&(z?_:W);delete N["aria-invalid"];var re=[],ne=!1;(BC({value:M})||u)&&(k?Q=k(M):ne=!0);var ie=$.map((function(e){if(!V.isValidElement(e))return null;var t;if(m){if(!Array.isArray(M))throw new Error((0,CC.Z)(2));(t=M.some((function(t){return dI(t,e.props.value)})))&&ne&&re.push(e.props.children)}else(t=dI(M,e.props.value))&&ne&&(J=e.props.children);return t&&!0,V.cloneElement(e,{"aria-selected":t?"true":void 0,onClick:ee(e),onKeyUp:function(t){" "===t.key&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:"option",selected:t,value:void 0,"data-value":e.props.value})}));ne&&(Q=m?re.join(", "):J);var oe,se=q;!i&&z&&F&&(se=F.clientWidth),oe="undefined"!==typeof I?I:l?null:0;var ae=x.id||(y?"mui-component-select-".concat(y):void 0);return V.createElement(V.Fragment,null,V.createElement("div",(0,Tk.Z)({className:(0,Dk.Z)(s.root,s.select,s.selectMenu,s[T],a,l&&s.disabled),ref:j,tabIndex:oe,role:"button","aria-disabled":l?"true":void 0,"aria-expanded":te?"true":void 0,"aria-haspopup":"listbox","aria-label":r,"aria-labelledby":[f,ae].filter(Boolean).join(" ")||void 0,onKeyDown:function(e){if(!A){-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),X(!0,e))}},onMouseDown:l||A?null:function(e){0===e.button&&(e.preventDefault(),F.focus(),X(!0,e))},onBlur:function(e){!te&&v&&(e.persist(),Object.defineProperty(e,"target",{writable:!0,value:{value:M,name:y}}),v(e))},onFocus:E},x,{id:ae}),function(e){return null==e||"string"===typeof e&&!e.trim()}(Q)?V.createElement("span",{dangerouslySetInnerHTML:{__html:"​"}}):Q),V.createElement("input",(0,Tk.Z)({value:Array.isArray(M)?M.join(","):M,name:y,ref:L,"aria-hidden":!0,onChange:function(e){var t=$.map((function(e){return e.props.value})).indexOf(e.target.value);if(-1!==t){var r=$[t];B(r.props.value),b&&b(e,r)}},tabIndex:-1,className:s.nativeInput,autoFocus:n},N)),V.createElement(h,{className:(0,Dk.Z)(s.icon,s["icon".concat((0,Mk.Z)(T))],te&&s.iconOpen,l&&s.disabled)}),V.createElement(uI,(0,Tk.Z)({id:"menu-".concat(y||""),anchorEl:F,open:te,onClose:function(e){X(!1,e)}},g,{MenuListProps:(0,Tk.Z)({"aria-labelledby":f,role:"listbox",disableListWrap:!0},g.MenuListProps),PaperProps:(0,Tk.Z)({},g.PaperProps,{style:(0,Tk.Z)({minWidth:se},null!=g.PaperProps?g.PaperProps.style:null)})}),ie))}));const pI=(0,__webpack_require__(2399).Z)(V.createElement("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");const gI=V.forwardRef((function(e,t){var r=e.classes,n=e.className,i=e.disabled,o=e.IconComponent,s=e.inputRef,a=e.variant,c=void 0===a?"standard":a,l=(0,Nk.Z)(e,["classes","className","disabled","IconComponent","inputRef","variant"]);return V.createElement(V.Fragment,null,V.createElement("select",(0,Tk.Z)({className:(0,Dk.Z)(r.root,r.select,r[c],n,i&&r.disabled),disabled:i,ref:s||t},l)),e.multiple?null:V.createElement(o,{className:(0,Dk.Z)(r.icon,r["icon".concat((0,Mk.Z)(c))],i&&r.disabled)}))}));var mI=function(e){return{root:{},select:{"-moz-appearance":"none","-webkit-appearance":"none",userSelect:"none",borderRadius:0,minWidth:16,cursor:"pointer","&:focus":{backgroundColor:"light"===e.palette.type?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)",borderRadius:0},"&::-ms-expand":{display:"none"},"&$disabled":{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:e.palette.background.paper},"&&":{paddingRight:24}},filled:{"&&":{paddingRight:32}},outlined:{borderRadius:e.shape.borderRadius,"&&":{paddingRight:32}},selectMenu:{height:"auto",minHeight:"1.1876em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},disabled:{},icon:{position:"absolute",right:0,top:"calc(50% - 12px)",pointerEvents:"none",color:e.palette.action.active,"&$disabled":{color:e.palette.action.disabled}},iconOpen:{transform:"rotate(180deg)"},iconFilled:{right:7},iconOutlined:{right:7},nativeInput:{bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%"}}},yI=V.createElement(zC,null),vI=V.forwardRef((function(e,t){var r=e.children,n=e.classes,i=e.IconComponent,o=void 0===i?pI:i,s=e.input,a=void 0===s?yI:s,c=e.inputProps,l=(e.variant,(0,Nk.Z)(e,["children","classes","IconComponent","input","inputProps","variant"])),u=xC({props:e,muiFormControl:QC(),states:["variant"]});return V.cloneElement(a,(0,Tk.Z)({inputComponent:gI,inputProps:(0,Tk.Z)({children:r,classes:n,IconComponent:o,variant:u.variant,type:void 0},c,a?a.props.inputProps:{}),ref:t},l))}));vI.muiName="Select";(0,Ok.Z)(mI,{name:"MuiNativeSelect"})(vI);var bI=mI,wI=V.createElement(zC,null),EI=V.createElement(qC,null),SI=V.forwardRef((function e(t,r){var n=t.autoWidth,i=void 0!==n&&n,o=t.children,s=t.classes,a=t.displayEmpty,c=void 0!==a&&a,l=t.IconComponent,u=void 0===l?pI:l,h=t.id,d=t.input,f=t.inputProps,p=t.label,g=t.labelId,m=t.labelWidth,y=void 0===m?0:m,v=t.MenuProps,b=t.multiple,w=void 0!==b&&b,E=t.native,S=void 0!==E&&E,_=t.onClose,A=t.onOpen,k=t.open,C=t.renderValue,x=t.SelectDisplayProps,I=t.variant,R=void 0===I?"standard":I,P=(0,Nk.Z)(t,["autoWidth","children","classes","displayEmpty","IconComponent","id","input","inputProps","label","labelId","labelWidth","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"]),T=S?gI:fI,N=xC({props:t,muiFormControl:QC(),states:["variant"]}).variant||R,D=d||{standard:wI,outlined:V.createElement(YC,{label:p,labelWidth:y}),filled:EI}[N];return V.cloneElement(D,(0,Tk.Z)({inputComponent:T,inputProps:(0,Tk.Z)({children:o,IconComponent:u,variant:N,type:void 0,multiple:w},S?{id:h}:{autoWidth:i,displayEmpty:c,labelId:g,MenuProps:v,onClose:_,onOpen:A,open:k,renderValue:C,SelectDisplayProps:(0,Tk.Z)({id:h},x)},f,{classes:f?(0,sx.Z)({baseClasses:s,newClasses:f.classes,Component:e}):s},d?d.props.inputProps:{}),ref:r},P))}));SI.muiName="Select";const _I=(0,Ok.Z)(bI,{name:"MuiSelect"})(SI);var AI={standard:zC,filled:qC,outlined:YC},kI=V.forwardRef((function(e,t){var r=e.autoComplete,n=e.autoFocus,i=void 0!==n&&n,o=e.children,s=e.classes,a=e.className,c=e.color,l=void 0===c?"primary":c,u=e.defaultValue,h=e.disabled,d=void 0!==h&&h,f=e.error,p=void 0!==f&&f,g=e.FormHelperTextProps,m=e.fullWidth,y=void 0!==m&&m,v=e.helperText,b=e.hiddenLabel,w=e.id,E=e.InputLabelProps,S=e.inputProps,_=e.InputProps,A=e.inputRef,k=e.label,C=e.multiline,x=void 0!==C&&C,I=e.name,R=e.onBlur,P=e.onChange,T=e.onFocus,N=e.placeholder,D=e.required,O=void 0!==D&&D,M=e.rows,B=e.rowsMax,L=e.maxRows,U=e.minRows,F=e.select,j=void 0!==F&&F,z=e.SelectProps,K=e.type,q=e.value,Z=e.variant,H=void 0===Z?"standard":Z,W=(0,Nk.Z)(e,["autoComplete","autoFocus","children","classes","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","hiddenLabel","id","InputLabelProps","inputProps","InputProps","inputRef","label","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","rowsMax","maxRows","minRows","select","SelectProps","type","value","variant"]);var G={};if("outlined"===H&&(E&&"undefined"!==typeof E.shrink&&(G.notched=E.shrink),k)){var Y,Q=null!==(Y=null===E||void 0===E?void 0:E.required)&&void 0!==Y?Y:O;G.label=V.createElement(V.Fragment,null,k,Q&&"\xa0*")}j&&(z&&z.native||(G.id=void 0),G["aria-describedby"]=void 0);var J=v&&w?"".concat(w,"-helper-text"):void 0,X=k&&w?"".concat(w,"-label"):void 0,$=AI[H],ee=V.createElement($,(0,Tk.Z)({"aria-describedby":J,autoComplete:r,autoFocus:i,defaultValue:u,fullWidth:y,multiline:x,name:I,rows:M,rowsMax:B,maxRows:L,minRows:U,type:K,value:q,id:w,inputRef:A,onBlur:R,onChange:P,onFocus:T,placeholder:N,inputProps:S},G,_));return V.createElement(nx,(0,Tk.Z)({className:(0,Dk.Z)(s.root,a),disabled:d,error:p,fullWidth:y,hiddenLabel:b,ref:t,required:O,color:l,variant:H},W),k&&V.createElement(ex,(0,Tk.Z)({htmlFor:w,id:X},E),k),j?V.createElement(_I,(0,Tk.Z)({"aria-describedby":J,id:w,labelId:X,value:q,input:ee},z),o):ee,v&&V.createElement(ox,(0,Tk.Z)({id:J},g),v))}));const CI=(0,Ok.Z)({root:{}},{name:"MuiTextField"})(kI);function xI(e){let{password:t,setPassword:r}=e;return(0,wC.jsx)(CI,{id:"password-input",label:"Password",variant:"filled",type:"password",onChange:e=>{r(e.target.value)},value:t})}const II=kC({root:{textAlign:"center",display:"flex",alignItems:"center",flexDirection:"column",margin:"5px"},generate:{margin:"5px"},storage:{margin:"5px"},loadSave:{display:"flex",flexDirection:"row",margin:"5px"},loadSaveButton:{margin:"5px"}});function RI(e){let{encryptionKeyPair:t,setEncryptionKeyPair:r}=e;const n=II(),[i,o]=(0,V.useState)();return(0,wC.jsxs)("div",{className:n.root,children:[(0,wC.jsx)(gC,{className:n.generate,variant:"contained",color:"primary",onClick:()=>{t||Ik().then((e=>{r(e)})).catch((e=>{console.error("Failed to generate Key Pair",e)}))},disabled:!!t,children:"Generate Encryption Key Pair"}),(0,wC.jsxs)("div",{className:n.storage,children:[(0,wC.jsx)(xI,{password:i,setPassword:e=>o(e)}),(0,wC.jsxs)("div",{className:n.loadSave,children:[(0,wC.jsx)("div",{className:n.loadSaveButton,children:(0,wC.jsx)(EC,{setEncryptionKeyPair:e=>r(e),disabled:!!t,password:i})}),(0,wC.jsx)("div",{className:n.loadSaveButton,children:(0,wC.jsx)(SC,{EncryptionKeyPair:t,password:i})})]})]})]})}var PI=__webpack_require__(1423),TI=__webpack_require__(3203),NI=__webpack_require__(1994);const DI=function(e){var t=e.children,r=e.theme,n=(0,ZC.Z)(),i=V.useMemo((function(){var e=null===n?r:function(e,t){return"function"===typeof t?t(e):(0,Tk.Z)({},e,t)}(n,r);return null!=e&&(e[NI.Z]=null!==n),e}),[r,n]);return V.createElement(TI.Z.Provider,{value:i},t)};const OI={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"};const MI={50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",A100:"#a7ffeb",A200:"#64ffda",A400:"#1de9b6",A700:"#00bfa5"};var BI=__webpack_require__(9687),LI=__webpack_require__(2908);function UI(e){let{encryptionKeyPair:t,waku:r,address:n,signer:i}=e;const[o,s]=(0,V.useState)();return(0,wC.jsx)(gC,{variant:"contained",color:"primary",onClick:async()=>{if(!t)return;if(!n)return;if(!r)return;if(!i)return;const e=(await(async()=>{if(!o){const e=await Rk(n,t.publicKey,i);return s(e),e}return o})()).encode(),a=function(e){let{contentTopic:t,symKey:r,sigPrivKey:n,ephemeral:i=!1,metaSetter:o}=e;return new ai(t,r,n,i,o)}({contentTopic:Sk,symKey:xk,ephemeral:!0});await r.relay.send(a,{payload:e})},disabled:!t||!r||!n||!i,children:"Broadcast Encryption Public Key"})}var FI="undefined"===typeof window?V.useEffect:V.useLayoutEffect,jI=V.forwardRef((function(e,t){var r=e.alignItems,n=void 0===r?"center":r,i=e.autoFocus,o=void 0!==i&&i,s=e.button,a=void 0!==s&&s,c=e.children,l=e.classes,u=e.className,h=e.component,d=e.ContainerComponent,f=void 0===d?"li":d,p=e.ContainerProps,g=(p=void 0===p?{}:p).className,m=(0,Nk.Z)(p,["className"]),y=e.dense,v=void 0!==y&&y,b=e.disabled,w=void 0!==b&&b,E=e.disableGutters,S=void 0!==E&&E,_=e.divider,A=void 0!==_&&_,k=e.focusVisibleClassName,C=e.selected,x=void 0!==C&&C,I=(0,Nk.Z)(e,["alignItems","autoFocus","button","children","classes","className","component","ContainerComponent","ContainerProps","dense","disabled","disableGutters","divider","focusVisibleClassName","selected"]),R=V.useContext(Jx),P={dense:v||R.dense||!1,alignItems:n},T=V.useRef(null);FI((function(){o&&T.current&&T.current.focus()}),[o]);var N=V.Children.toArray(c),D=N.length&&(0,tx.Z)(N[N.length-1],["ListItemSecondaryAction"]),O=V.useCallback((function(e){T.current=H.findDOMNode(e)}),[]),M=(0,qk.Z)(O,t),B=(0,Tk.Z)({className:(0,Dk.Z)(l.root,u,P.dense&&l.dense,!S&&l.gutters,A&&l.divider,w&&l.disabled,a&&l.button,"center"!==n&&l.alignItemsFlexStart,D&&l.secondaryAction,x&&l.selected),disabled:w},I),L=h||"li";return a&&(B.component=h||"div",B.focusVisibleClassName=(0,Dk.Z)(l.focusVisible,k),L=cC),D?(L=B.component||h?L:"div","li"===f&&("li"===L?L="div":"li"===B.component&&(B.component="div")),V.createElement(Jx.Provider,{value:P},V.createElement(f,(0,Tk.Z)({className:(0,Dk.Z)(l.container,g),ref:M},m),V.createElement(L,B,N),N.pop()))):V.createElement(Jx.Provider,{value:P},V.createElement(L,(0,Tk.Z)({ref:M},B),N))}));const zI=(0,Ok.Z)((function(e){return{root:{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,"&$focusVisible":{backgroundColor:e.palette.action.selected},"&$selected, &$selected:hover":{backgroundColor:e.palette.action.selected},"&$disabled":{opacity:.5}},container:{position:"relative"},focusVisible:{},dense:{paddingTop:4,paddingBottom:4},alignItemsFlexStart:{alignItems:"flex-start"},disabled:{},divider:{borderBottom:"1px solid ".concat(e.palette.divider),backgroundClip:"padding-box"},gutters:{paddingLeft:16,paddingRight:16},button:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:e.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}},secondaryAction:{paddingRight:48},selected:{}}}),{name:"MuiListItem"})(jI);var KI=V.forwardRef((function(e,t){var r=e.children,n=e.classes,i=e.className,o=e.disableTypography,s=void 0!==o&&o,a=e.inset,c=void 0!==a&&a,l=e.primary,u=e.primaryTypographyProps,h=e.secondary,d=e.secondaryTypographyProps,f=(0,Nk.Z)(e,["children","classes","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"]),p=V.useContext(Jx).dense,g=null!=l?l:r;null==g||g.type===fC||s||(g=V.createElement(fC,(0,Tk.Z)({variant:p?"body2":"body1",className:n.primary,component:"span",display:"block"},u),g));var m=h;return null==m||m.type===fC||s||(m=V.createElement(fC,(0,Tk.Z)({variant:"body2",className:n.secondary,color:"textSecondary",display:"block"},d),m)),V.createElement("div",(0,Tk.Z)({className:(0,Dk.Z)(n.root,i,p&&n.dense,c&&n.inset,g&&m&&n.multiline),ref:t},f),g,m)}));const qI=(0,Ok.Z)({root:{flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},multiline:{marginTop:6,marginBottom:6},dense:{},inset:{paddingLeft:56},primary:{},secondary:{}},{name:"MuiListItemText"})(KI);function ZI(e){let{messages:t}=e;return(0,wC.jsx)($x,{dense:!0,children:VI(t)})}function VI(e){return e.map((e=>{const t="<".concat(HI(e.timestamp),"> ").concat(e.text);return(0,wC.jsx)(zI,{children:(0,wC.jsx)(qI,{primary:t},HI(e.timestamp))})}))}function HI(e){return e.toLocaleString([],{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hour12:!1})}var WI=V.forwardRef((function(e,t){var r,n=e.classes,i=e.className,o=e.component,s=void 0===o?"li":o,a=e.disableGutters,c=void 0!==a&&a,l=e.ListItemClasses,u=e.role,h=void 0===u?"menuitem":u,d=e.selected,f=e.tabIndex,p=(0,Nk.Z)(e,["classes","className","component","disableGutters","ListItemClasses","role","selected","tabIndex"]);return e.disabled||(r=void 0!==f?f:-1),V.createElement(zI,(0,Tk.Z)({button:!0,role:h,tabIndex:r,component:s,selected:d,disableGutters:c,classes:(0,Tk.Z)({dense:n.dense},l),className:(0,Dk.Z)(n.root,i,d&&n.selected,!c&&n.gutters),ref:t},p))}));const GI=(0,Ok.Z)((function(e){return{root:(0,Tk.Z)({},e.typography.body1,(0,W.Z)({minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",width:"auto",overflow:"hidden",whiteSpace:"nowrap"},e.breakpoints.up("sm"),{minHeight:"auto"})),gutters:{},selected:{},dense:(0,Tk.Z)({},e.typography.body2,{minHeight:"auto"})}}),{name:"MuiMenuItem"})(WI),YI=kC((e=>({formControl:{margin:e.spacing(1),minWidth:120},selectEmpty:{marginTop:e.spacing(2)}})));function QI(e){let{waku:t,recipients:r}=e;const n=YI(),[i,o]=(0,V.useState)(""),[s,a]=(0,V.useState)(),c=Array.from(r.keys()).map((e=>(0,wC.jsx)(GI,{value:e,children:e},e)));return(0,wC.jsxs)("div",{style:{display:"flex",alignItems:"center",flexWrap:"wrap"},children:[(0,wC.jsxs)(nx,{className:n.formControl,children:[(0,wC.jsx)(ex,{id:"select-recipient-label",children:"Recipient"}),(0,wC.jsx)(_I,{labelId:"select-recipient",id:"select-recipient",value:i,onChange:e=>{o(e.target.value)},children:c})]}),(0,wC.jsx)(CI,{id:"message-input",label:"Message",variant:"filled",onChange:e=>{a(e.target.value)},onKeyDown:async e=>{if("Enter"===e.key&&!e.altKey&&!e.ctrlKey&&!e.shiftKey){if(!t)return;if(!i)return;if(!s)return;const e=r.get(i);if(!e)return;!async function(e,t,r,n,i){const o=new pi({toAddress:Rn(t),message:n}),s=o.encode(),a=function(e){let{contentTopic:t,publicKey:r,sigPrivKey:n,ephemeral:i=!1,metaSetter:o}=e;return new ri(t,r,n,i,o)}({contentTopic:_k,publicKey:r,ephemeral:!0});console.log("pushing");const c=await e.relay.send(a,{payload:s});console.log("Message sent",c),i(Boolean(c.recipients.length))}(t,i,e,s,(e=>{e&&(console.log("callback called with",e),a(""))}))}},value:s})]})}const JI=kC({root:{display:"flex",alignItems:"left",flexDirection:"column",margin:"5px"}});function XI(e){let{waku:t,recipients:r,messages:n}=e;const i=JI();return(0,wC.jsxs)("div",{className:i.root,children:[(0,wC.jsx)(QI,{recipients:r,waku:t}),(0,wC.jsx)(ZI,{messages:n})]})}var $I=__webpack_require__(4812),eR=__webpack_require__(2735);const tR="providers/5.7.1";var rR=__webpack_require__(5340),nR=__webpack_require__(9560),iR=__webpack_require__(2009),oR=__webpack_require__(6454),sR=__webpack_require__(1953),aR=__webpack_require__(5958),cR=__webpack_require__(8786),lR=__webpack_require__(5157),uR=__webpack_require__(8853),hR=__webpack_require__(4247),dR=__webpack_require__(4160),fR=__webpack_require__(8565);const pR=new eR.Logger("networks/5.7.1");function gR(e){const t=function(t,r){null==r&&(r={});const n=[];if(t.InfuraProvider&&"-"!==r.infura)try{n.push(new t.InfuraProvider(e,r.infura))}catch(i){}if(t.EtherscanProvider&&"-"!==r.etherscan)try{n.push(new t.EtherscanProvider(e,r.etherscan))}catch(i){}if(t.AlchemyProvider&&"-"!==r.alchemy)try{n.push(new t.AlchemyProvider(e,r.alchemy))}catch(i){}if(t.PocketProvider&&"-"!==r.pocket){const o=["goerli","ropsten","rinkeby","sepolia"];try{const i=new t.PocketProvider(e,r.pocket);i.network&&-1===o.indexOf(i.network.name)&&n.push(i)}catch(i){}}if(t.CloudflareProvider&&"-"!==r.cloudflare)try{n.push(new t.CloudflareProvider(e))}catch(i){}if(t.AnkrProvider&&"-"!==r.ankr)try{const i=["ropsten"],o=new t.AnkrProvider(e,r.ankr);o.network&&-1===i.indexOf(o.network.name)&&n.push(o)}catch(i){}if(0===n.length)return null;if(t.FallbackProvider){let i=1;return null!=r.quorum?i=r.quorum:"homestead"===e&&(i=2),new t.FallbackProvider(n,i)}return n[0]};return t.renetwork=function(e){return gR(e)},t}function mR(e,t){const r=function(r,n){return r.JsonRpcProvider?new r.JsonRpcProvider(e,t):null};return r.renetwork=function(t){return mR(e,t)},r}const yR={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:gR("homestead")},vR={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:gR("ropsten")},bR={chainId:63,name:"classicMordor",_defaultProvider:mR("https://www.ethercluster.com/mordor","classicMordor")},wR={unspecified:{chainId:0,name:"unspecified"},homestead:yR,mainnet:yR,morden:{chainId:2,name:"morden"},ropsten:vR,testnet:vR,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:gR("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:gR("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:gR("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:gR("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:mR("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:bR,classicTestnet:bR,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:mR("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:gR("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:gR("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};var ER=__webpack_require__(3984),SR=__webpack_require__(5109),_R=__webpack_require__.n(SR),AR=__webpack_require__(8552);const kR=new eR.Logger(tR);class CR{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){const e={},t=this.address.bind(this),r=this.bigNumber.bind(this),n=this.blockTag.bind(this),i=this.data.bind(this),o=this.hash.bind(this),s=this.hex.bind(this),a=this.number.bind(this),c=this.type.bind(this);return e.transaction={hash:o,type:c,accessList:CR.allowNull(this.accessList.bind(this),null),blockHash:CR.allowNull(o,null),blockNumber:CR.allowNull(a,null),transactionIndex:CR.allowNull(a,null),confirmations:CR.allowNull(a,null),from:t,gasPrice:CR.allowNull(r),maxPriorityFeePerGas:CR.allowNull(r),maxFeePerGas:CR.allowNull(r),gasLimit:r,to:CR.allowNull(t,null),value:r,nonce:a,data:i,r:CR.allowNull(this.uint256),s:CR.allowNull(this.uint256),v:CR.allowNull(a),creates:CR.allowNull(t,null),raw:CR.allowNull(i)},e.transactionRequest={from:CR.allowNull(t),nonce:CR.allowNull(a),gasLimit:CR.allowNull(r),gasPrice:CR.allowNull(r),maxPriorityFeePerGas:CR.allowNull(r),maxFeePerGas:CR.allowNull(r),to:CR.allowNull(t),value:CR.allowNull(r),data:CR.allowNull((e=>this.data(e,!0))),type:CR.allowNull(a),accessList:CR.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:a,blockNumber:a,transactionHash:o,address:t,topics:CR.arrayOf(o),data:i,logIndex:a,blockHash:o},e.receipt={to:CR.allowNull(this.address,null),from:CR.allowNull(this.address,null),contractAddress:CR.allowNull(t,null),transactionIndex:a,root:CR.allowNull(s),gasUsed:r,logsBloom:CR.allowNull(i),blockHash:o,transactionHash:o,logs:CR.arrayOf(this.receiptLog.bind(this)),blockNumber:a,confirmations:CR.allowNull(a,null),cumulativeGasUsed:r,effectiveGasPrice:CR.allowNull(r),status:CR.allowNull(a),type:c},e.block={hash:CR.allowNull(o),parentHash:o,number:a,timestamp:a,nonce:CR.allowNull(s),difficulty:this.difficulty.bind(this),gasLimit:r,gasUsed:r,miner:CR.allowNull(t),extraData:i,transactions:CR.allowNull(CR.arrayOf(o)),baseFeePerGas:CR.allowNull(r)},e.blockWithTransactions=(0,$I.shallowCopy)(e.block),e.blockWithTransactions.transactions=CR.allowNull(CR.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:CR.allowNull(n,void 0),toBlock:CR.allowNull(n,void 0),blockHash:CR.allowNull(o,void 0),address:CR.allowNull(t,void 0),topics:CR.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:CR.allowNull(a),blockHash:CR.allowNull(o),transactionIndex:a,removed:CR.allowNull(this.boolean.bind(this)),address:t,data:CR.allowFalsish(i,"0x"),topics:CR.arrayOf(o),transactionHash:o,logIndex:a},e}accessList(e){return(0,aR.accessListify)(e||[])}number(e){return"0x"===e?0:nR.O$.from(e).toNumber()}type(e){return"0x"===e||null==e?0:nR.O$.from(e).toNumber()}bigNumber(e){return nR.O$.from(e)}boolean(e){if("boolean"===typeof e)return e;if("string"===typeof e){if("true"===(e=e.toLowerCase()))return!0;if("false"===e)return!1}throw new Error("invalid boolean - "+e)}hex(e,t){return"string"===typeof e&&(t||"0x"===e.substring(0,2)||(e="0x"+e),(0,iR.isHexString)(e))?e.toLowerCase():kR.throwArgumentError("invalid hash","value",e)}data(e,t){const r=this.hex(e,t);if(r.length%2!==0)throw new Error("invalid data; odd-length - "+e);return r}address(e){return(0,AR.getAddress)(e)}callAddress(e){if(!(0,iR.isHexString)(e,32))return null;const t=(0,AR.getAddress)((0,iR.hexDataSlice)(e,12));return"0x0000000000000000000000000000000000000000"===t?null:t}contractAddress(e){return(0,AR.getContractAddress)(e)}blockTag(e){if(null==e)return"latest";if("earliest"===e)return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if("number"===typeof e||(0,iR.isHexString)(e))return(0,iR.hexValue)(e);throw new Error("invalid blockTag")}hash(e,t){const r=this.hex(e,t);return 32!==(0,iR.hexDataLength)(r)?kR.throwArgumentError("invalid hash","value",e):r}difficulty(e){if(null==e)return null;const t=nR.O$.from(e);try{return t.toNumber()}catch(r){}return null}uint256(e){if(!(0,iR.isHexString)(e))throw new Error("invalid uint256");return(0,iR.hexZeroPad)(e,32)}_block(e,t){null!=e.author&&null==e.miner&&(e.miner=e.author);const r=null!=e._difficulty?e._difficulty:e.difficulty,n=CR.check(t,e);return n._difficulty=null==r?null:nR.O$.from(r),n}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return CR.check(this.formats.transactionRequest,e)}transactionResponse(e){null!=e.gas&&null==e.gasLimit&&(e.gasLimit=e.gas),e.to&&nR.O$.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),null!=e.input&&null==e.data&&(e.data=e.input),null==e.to&&null==e.creates&&(e.creates=this.contractAddress(e)),1!==e.type&&2!==e.type||null!=e.accessList||(e.accessList=[]);const t=CR.check(this.formats.transaction,e);if(null!=e.chainId){let r=e.chainId;(0,iR.isHexString)(r)&&(r=nR.O$.from(r).toNumber()),t.chainId=r}else{let r=e.networkId;null==r&&null==t.v&&(r=e.chainId),(0,iR.isHexString)(r)&&(r=nR.O$.from(r).toNumber()),"number"!==typeof r&&null!=t.v&&(r=(t.v-35)/2,r<0&&(r=0),r=parseInt(r)),"number"!==typeof r&&(r=0),t.chainId=r}return t.blockHash&&"x"===t.blockHash.replace(/0/g,"")&&(t.blockHash=null),t}transaction(e){return(0,aR.parse)(e)}receiptLog(e){return CR.check(this.formats.receiptLog,e)}receipt(e){const t=CR.check(this.formats.receipt,e);if(null!=t.root)if(t.root.length<=4){const e=nR.O$.from(t.root).toNumber();0===e||1===e?(null!=t.status&&t.status!==e&&kR.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=e,delete t.root):kR.throwArgumentError("invalid alt-root-status","value.root",t.root)}else 66!==t.root.length&&kR.throwArgumentError("invalid root hash","value.root",t.root);return null!=t.status&&(t.byzantium=!0),t}topics(e){return Array.isArray(e)?e.map((e=>this.topics(e))):null!=e?this.hash(e,!0):null}filter(e){return CR.check(this.formats.filter,e)}filterLog(e){return CR.check(this.formats.filterLog,e)}static check(e,t){const r={};for(const i in e)try{const n=e[i](t[i]);void 0!==n&&(r[i]=n)}catch(n){throw n.checkKey=i,n.checkValue=t[i],n}return r}static allowNull(e,t){return function(r){return null==r?t:e(r)}}static allowFalsish(e,t){return function(r){return r?e(r):t}}static arrayOf(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");const r=[];return t.forEach((function(t){r.push(e(t))})),r}}}var xR=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(t){o(t)}}function a(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};const IR=new eR.Logger(tR);function RR(e){return null==e?"null":(32!==(0,iR.hexDataLength)(e)&&IR.throwArgumentError("invalid topic","topic",e),e.toLowerCase())}function PR(e){for(e=e.slice();e.length>0&&null==e[e.length-1];)e.pop();return e.map((e=>{if(Array.isArray(e)){const t={};e.forEach((e=>{t[RR(e)]=!0}));const r=Object.keys(t);return r.sort(),r.join("|")}return RR(e)})).join("&")}function TR(e){if("string"===typeof e){if(e=e.toLowerCase(),32===(0,iR.hexDataLength)(e))return"tx:"+e;if(-1===e.indexOf(":"))return e}else{if(Array.isArray(e))return"filter:*:"+PR(e);if(lR.Sg.isForkEvent(e))throw IR.warn("not implemented"),new Error("not implemented");if(e&&"object"===typeof e)return"filter:"+(e.address||"*")+":"+PR(e.topics||[])}throw new Error("invalid event - "+e)}function NR(){return(new Date).getTime()}function DR(e){return new Promise((t=>{setTimeout(t,e)}))}const OR=["block","network","pending","poll"];class MR{constructor(e,t,r){(0,$I.defineReadOnly)(this,"tag",e),(0,$I.defineReadOnly)(this,"listener",t),(0,$I.defineReadOnly)(this,"once",r),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){const e=this.tag.split(":");return"tx"!==e[0]?null:e[1]}get filter(){const e=this.tag.split(":");if("filter"!==e[0])return null;const t=e[1],r=""===(n=e[2])?[]:n.split(/&/g).map((e=>{if(""===e)return[];const t=e.split("|").map((e=>"null"===e?null:e));return 1===t.length?t[0]:t}));var n;const i={};return r.length>0&&(i.topics=r),t&&"*"!==t&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||OR.indexOf(this.tag)>=0}}const BR={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function LR(e){return(0,iR.hexZeroPad)(nR.O$.from(e).toHexString(),32)}function UR(e){return hR.Base58.encode((0,iR.concat)([e,(0,iR.hexDataSlice)((0,ER.JQ)((0,ER.JQ)(e)),0,4)]))}const FR=new RegExp("^(ipfs)://(.*)$","i"),jR=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),FR,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function zR(e,t){try{return(0,sR.ZN)(KR(e,t))}catch(r){}return null}function KR(e,t){if("0x"===e)return null;const r=nR.O$.from((0,iR.hexDataSlice)(e,t,t+32)).toNumber(),n=nR.O$.from((0,iR.hexDataSlice)(e,r,r+32)).toNumber();return(0,iR.hexDataSlice)(e,r+32,r+32+n)}function qR(e){return e.match(/^ipfs:\/\/ipfs\//i)?e=e.substring(12):e.match(/^ipfs:\/\//i)?e=e.substring(7):IR.throwArgumentError("unsupported IPFS format","link",e),"https://gateway.ipfs.io/ipfs/".concat(e)}function ZR(e){const t=(0,iR.arrayify)(e);if(t.length>32)throw new Error("internal; should not happen");const r=new Uint8Array(32);return r.set(t,32-t.length),r}function VR(e){if(e.length%32===0)return e;const t=new Uint8Array(32*Math.ceil(e.length/32));return t.set(e),t}function HR(e){const t=[];let r=0;for(let n=0;n<e.length;n++)t.push(null),r+=32;for(let n=0;n<e.length;n++){const i=(0,iR.arrayify)(e[n]);t[n]=ZR(r),t.push(ZR(i.length)),t.push(VR(i)),r+=32+32*Math.ceil(i.length/32)}return(0,iR.hexConcat)(t)}class WR{constructor(e,t,r,n){(0,$I.defineReadOnly)(this,"provider",e),(0,$I.defineReadOnly)(this,"name",r),(0,$I.defineReadOnly)(this,"address",e.formatter.address(t)),(0,$I.defineReadOnly)(this,"_resolvedAddress",n)}supportsWildcard(){return this._supportsEip2544||(this._supportsEip2544=this.provider.call({to:this.address,data:"0x01ffc9a79061b92300000000000000000000000000000000000000000000000000000000"}).then((e=>nR.O$.from(e).eq(1))).catch((e=>{if(e.code===eR.Logger.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e}))),this._supportsEip2544}_fetch(e,t){return xR(this,void 0,void 0,(function*(){const r={to:this.address,ccipReadEnabled:!0,data:(0,iR.hexConcat)([e,(0,fR.VM)(this.name),t||"0x"])};let n=!1;(yield this.supportsWildcard())&&(n=!0,r.data=(0,iR.hexConcat)(["0x9061b923",HR([(0,fR.Kn)(this.name),r.data])]));try{let e=yield this.provider.call(r);return(0,iR.arrayify)(e).length%32===4&&IR.throwError("resolver threw error",eR.Logger.errors.CALL_EXCEPTION,{transaction:r,data:e}),n&&(e=KR(e,0)),e}catch(i){if(i.code===eR.Logger.errors.CALL_EXCEPTION)return null;throw i}}))}_fetchBytes(e,t){return xR(this,void 0,void 0,(function*(){const r=yield this._fetch(e,t);return null!=r?KR(r,0):null}))}_getAddress(e,t){const r=BR[String(e)];if(null==r&&IR.throwError("unsupported coin type: ".concat(e),eR.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getAddress(".concat(e,")")}),"eth"===r.ilk)return this.provider.formatter.address(t);const n=(0,iR.arrayify)(t);if(null!=r.p2pkh){const e=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(e){const t=parseInt(e[1],16);if(e[2].length===2*t&&t>=1&&t<=75)return UR((0,iR.concat)([[r.p2pkh],"0x"+e[2]]))}}if(null!=r.p2sh){const e=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(e){const t=parseInt(e[1],16);if(e[2].length===2*t&&t>=1&&t<=75)return UR((0,iR.concat)([[r.p2sh],"0x"+e[2]]))}}if(null!=r.prefix){const e=n[1];let t=n[0];if(0===t?20!==e&&32!==e&&(t=-1):t=-1,t>=0&&n.length===2+e&&e>=1&&e<=75){const e=_R().toWords(n.slice(2));return e.unshift(t),_R().encode(r.prefix,e)}}return null}getAddress(e){return xR(this,void 0,void 0,(function*(){if(null==e&&(e=60),60===e)try{const e=yield this._fetch("0x3b3b57de");return"0x"===e||e===dR.R?null:this.provider.formatter.callAddress(e)}catch(n){if(n.code===eR.Logger.errors.CALL_EXCEPTION)return null;throw n}const t=yield this._fetchBytes("0xf1cb7e06",LR(e));if(null==t||"0x"===t)return null;const r=this._getAddress(e,t);return null==r&&IR.throwError("invalid or unsupported coin data",eR.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getAddress(".concat(e,")"),coinType:e,data:t}),r}))}getAvatar(){return xR(this,void 0,void 0,(function*(){const e=[{type:"name",content:this.name}];try{const t=yield this.getText("avatar");if(null==t)return null;for(let r=0;r<jR.length;r++){const n=t.match(jR[r]);if(null==n)continue;const i=n[1].toLowerCase();switch(i){case"https":return e.push({type:"url",content:t}),{linkage:e,url:t};case"data":return e.push({type:"data",content:t}),{linkage:e,url:t};case"ipfs":return e.push({type:"ipfs",content:t}),{linkage:e,url:qR(t)};case"erc721":case"erc1155":{const r="erc721"===i?"0xc87b56dd":"0x0e89341c";e.push({type:i,content:t});const o=this._resolvedAddress||(yield this.getAddress()),s=(n[2]||"").split("/");if(2!==s.length)return null;const a=yield this.provider.formatter.address(s[0]),c=(0,iR.hexZeroPad)(nR.O$.from(s[1]).toHexString(),32);if("erc721"===i){const t=this.provider.formatter.callAddress(yield this.provider.call({to:a,data:(0,iR.hexConcat)(["0x6352211e",c])}));if(o!==t)return null;e.push({type:"owner",content:t})}else if("erc1155"===i){const t=nR.O$.from(yield this.provider.call({to:a,data:(0,iR.hexConcat)(["0x00fdd58e",(0,iR.hexZeroPad)(o,32),c])}));if(t.isZero())return null;e.push({type:"balance",content:t.toString()})}const l={to:this.provider.formatter.address(s[0]),data:(0,iR.hexConcat)([r,c])};let u=zR(yield this.provider.call(l),0);if(null==u)return null;e.push({type:"metadata-url-base",content:u}),"erc1155"===i&&(u=u.replace("{id}",c.substring(2)),e.push({type:"metadata-url-expanded",content:u})),u.match(/^ipfs:/i)&&(u=qR(u)),e.push({type:"metadata-url",content:u});const h=yield(0,cR.fetchJson)(u);if(!h)return null;e.push({type:"metadata",content:JSON.stringify(h)});let d=h.image;if("string"!==typeof d)return null;if(d.match(/^(https:\/\/|data:)/i));else{if(null==d.match(FR))return null;e.push({type:"url-ipfs",content:d}),d=qR(d)}return e.push({type:"url",content:d}),{linkage:e,url:d}}}}}catch(t){}return null}))}getContentHash(){return xR(this,void 0,void 0,(function*(){const e=yield this._fetchBytes("0xbc1c58d1");if(null==e||"0x"===e)return null;const t=e.match(/^0xe3010170(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(t){const e=parseInt(t[3],16);if(t[4].length===2*e)return"ipfs://"+hR.Base58.encode("0x"+t[1])}const r=e.match(/^0xe5010172(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(r){const e=parseInt(r[3],16);if(r[4].length===2*e)return"ipns://"+hR.Base58.encode("0x"+r[1])}const n=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(n&&64===n[1].length)return"bzz://"+n[1];const i=e.match(/^0x90b2c605([0-9a-f]*)$/);if(i&&68===i[1].length){const e={"=":"","+":"-","/":"_"};return"sia://"+(0,uR.c)("0x"+i[1]).replace(/[=+\/]/g,(t=>e[t]))}return IR.throwError("invalid or unsupported content hash data",eR.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})}))}getText(e){return xR(this,void 0,void 0,(function*(){let t=(0,sR.Y0)(e);t=(0,iR.concat)([LR(64),LR(t.length),t]),t.length%32!==0&&(t=(0,iR.concat)([t,(0,iR.hexZeroPad)("0x",32-e.length%32)]));const r=yield this._fetchBytes("0x59d1d43c",(0,iR.hexlify)(t));return null==r||"0x"===r?null:(0,sR.ZN)(r)}))}}let GR=null,YR=1;class QR extends lR.zt{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),(0,$I.defineReadOnly)(this,"anyNetwork","any"===e),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch((e=>{})),this._ready().catch((e=>{}));else{const t=(0,$I.getStatic)(new.target,"getNetwork")(e);t?((0,$I.defineReadOnly)(this,"_network",t),this.emit("network",t,null)):IR.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return xR(this,void 0,void 0,(function*(){if(null==this._network){let t=null;if(this._networkPromise)try{t=yield this._networkPromise}catch(e){}null==t&&(t=yield this.detectNetwork()),t||IR.throwError("no network detected",eR.Logger.errors.UNKNOWN_ERROR,{}),null==this._network&&(this.anyNetwork?this._network=t:(0,$I.defineReadOnly)(this,"_network",t),this.emit("network",t,null))}return this._network}))}get ready(){return(0,cR.poll)((()=>this._ready().then((e=>e),(e=>{if(e.code!==eR.Logger.errors.NETWORK_ERROR||"noNetwork"!==e.event)throw e}))))}static getFormatter(){return null==GR&&(GR=new CR),GR}static getNetwork(e){return function(e){if(null==e)return null;if("number"===typeof e){for(const t in wR){const r=wR[t];if(r.chainId===e)return{name:r.name,chainId:r.chainId,ensAddress:r.ensAddress||null,_defaultProvider:r._defaultProvider||null}}return{chainId:e,name:"unknown"}}if("string"===typeof e){const t=wR[e];return null==t?null:{name:t.name,chainId:t.chainId,ensAddress:t.ensAddress,_defaultProvider:t._defaultProvider||null}}const t=wR[e.name];if(!t)return"number"!==typeof e.chainId&&pR.throwArgumentError("invalid network chainId","network",e),e;0!==e.chainId&&e.chainId!==t.chainId&&pR.throwArgumentError("network chainId mismatch","network",e);let r=e._defaultProvider||null;var n;return null==r&&t._defaultProvider&&(r=(n=t._defaultProvider)&&"function"===typeof n.renetwork?t._defaultProvider.renetwork(e):t._defaultProvider),{name:e.name,chainId:t.chainId,ensAddress:e.ensAddress||t.ensAddress||null,_defaultProvider:r}}(null==e?"homestead":e)}ccipReadFetch(e,t,r){return xR(this,void 0,void 0,(function*(){if(this.disableCcipRead||0===r.length)return null;const n=e.to.toLowerCase(),i=t.toLowerCase(),o=[];for(let e=0;e<r.length;e++){const t=r[e],s=t.replace("{sender}",n).replace("{data}",i),a=t.indexOf("{data}")>=0?null:JSON.stringify({data:i,sender:n}),c=yield(0,cR.fetchJson)({url:s,errorPassThrough:!0},a,((e,t)=>(e.status=t.statusCode,e)));if(c.data)return c.data;const l=c.message||"unknown error";if(c.status>=400&&c.status<500)return IR.throwError("response not found during CCIP fetch: ".concat(l),eR.Logger.errors.SERVER_ERROR,{url:t,errorMessage:l});o.push(l)}return IR.throwError("error encountered during CCIP fetch: ".concat(o.map((e=>JSON.stringify(e))).join(", ")),eR.Logger.errors.SERVER_ERROR,{urls:r,errorMessages:o})}))}_getInternalBlockNumber(e){return xR(this,void 0,void 0,(function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const t=this._internalBlockNumber;try{const r=yield t;if(NR()-r.respTime<=e)return r.blockNumber;break}catch(n){if(this._internalBlockNumber===t)break}}const t=NR(),r=(0,$I.resolveProperties)({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then((e=>null),(e=>e))}).then((e=>{let{blockNumber:n,networkError:i}=e;if(i)throw this._internalBlockNumber===r&&(this._internalBlockNumber=null),i;const o=NR();return n=nR.O$.from(n).toNumber(),n<this._maxInternalBlockNumber&&(n=this._maxInternalBlockNumber),this._maxInternalBlockNumber=n,this._setFastBlockNumber(n),{blockNumber:n,reqTime:t,respTime:o}}));return this._internalBlockNumber=r,r.catch((e=>{this._internalBlockNumber===r&&(this._internalBlockNumber=null)})),(yield r).blockNumber}))}poll(){return xR(this,void 0,void 0,(function*(){const e=YR++,t=[];let r=null;try{r=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(n){return void this.emit("error",n)}if(this._setFastBlockNumber(r),this.emit("poll",e,r),r!==this._lastBlockNumber){if(-2===this._emitted.block&&(this._emitted.block=r-1),Math.abs(this._emitted.block-r)>1e3)IR.warn("network block skew detected; skipping block events (emitted=".concat(this._emitted.block," blockNumber").concat(r,")")),this.emit("error",IR.makeError("network block skew detected",eR.Logger.errors.NETWORK_ERROR,{blockNumber:r,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",r);else for(let e=this._emitted.block+1;e<=r;e++)this.emit("block",e);this._emitted.block!==r&&(this._emitted.block=r,Object.keys(this._emitted).forEach((e=>{if("block"===e)return;const t=this._emitted[e];"pending"!==t&&r-t>12&&delete this._emitted[e]}))),-2===this._lastBlockNumber&&(this._lastBlockNumber=r-1),this._events.forEach((e=>{switch(e.type){case"tx":{const r=e.hash;let n=this.getTransactionReceipt(r).then((e=>e&&null!=e.blockNumber?(this._emitted["t:"+r]=e.blockNumber,this.emit(r,e),null):null)).catch((e=>{this.emit("error",e)}));t.push(n);break}case"filter":if(!e._inflight){e._inflight=!0,-2===e._lastBlockNumber&&(e._lastBlockNumber=r-1);const n=e.filter;n.fromBlock=e._lastBlockNumber+1,n.toBlock=r;const i=n.toBlock-this._maxFilterBlockRange;i>n.fromBlock&&(n.fromBlock=i),n.fromBlock<0&&(n.fromBlock=0);const o=this.getLogs(n).then((t=>{e._inflight=!1,0!==t.length&&t.forEach((t=>{t.blockNumber>e._lastBlockNumber&&(e._lastBlockNumber=t.blockNumber),this._emitted["b:"+t.blockHash]=t.blockNumber,this._emitted["t:"+t.transactionHash]=t.blockNumber,this.emit(n,t)}))})).catch((t=>{this.emit("error",t),e._inflight=!1}));t.push(o)}}})),this._lastBlockNumber=r,Promise.all(t).then((()=>{this.emit("didPoll",e)})).catch((e=>{this.emit("error",e)}))}else this.emit("didPoll",e)}))}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return xR(this,void 0,void 0,(function*(){return IR.throwError("provider does not support network detection",eR.Logger.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})}))}getNetwork(){return xR(this,void 0,void 0,(function*(){const e=yield this._ready(),t=yield this.detectNetwork();if(e.chainId!==t.chainId){if(this.anyNetwork)return this._network=t,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",t,e),yield DR(0),this._network;const r=IR.makeError("underlying network changed",eR.Logger.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:t});throw this.emit("error",r),r}return e}))}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then((e=>{this._setFastBlockNumber(e)}),(e=>{})),null!=this._fastBlockNumber?this._fastBlockNumber:-1}get polling(){return null!=this._poller}set polling(e){e&&!this._poller?(this._poller=setInterval((()=>{this.poll()}),this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout((()=>{this.poll(),this._bootstrapPoll=setTimeout((()=>{this._poller||this.poll(),this._bootstrapPoll=null}),this.pollingInterval)}),0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if("number"!==typeof e||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval((()=>{this.poll()}),this._pollingInterval))}_getFastBlockNumber(){const e=NR();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then((e=>((null==this._fastBlockNumber||e>this._fastBlockNumber)&&(this._fastBlockNumber=e),this._fastBlockNumber)))),this._fastBlockNumberPromise}_setFastBlockNumber(e){null!=this._fastBlockNumber&&e<this._fastBlockNumber||(this._fastQueryDate=NR(),(null==this._fastBlockNumber||e>this._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,t,r){return xR(this,void 0,void 0,(function*(){return this._waitForTransaction(e,null==t?1:t,r||0,null)}))}_waitForTransaction(e,t,r,n){return xR(this,void 0,void 0,(function*(){const i=yield this.getTransactionReceipt(e);return(i?i.confirmations:0)>=t?i:new Promise(((i,o)=>{const s=[];let a=!1;const c=function(){return!!a||(a=!0,s.forEach((e=>{e()})),!1)},l=e=>{e.confirmations<t||c()||i(e)};if(this.on(e,l),s.push((()=>{this.removeListener(e,l)})),n){let r=n.startBlock,i=null;const l=s=>xR(this,void 0,void 0,(function*(){a||(yield DR(1e3),this.getTransactionCount(n.from).then((u=>xR(this,void 0,void 0,(function*(){if(!a){if(u<=n.nonce)r=s;else{{const t=yield this.getTransaction(e);if(t&&null!=t.blockNumber)return}for(null==i&&(i=r-3,i<n.startBlock&&(i=n.startBlock));i<=s;){if(a)return;const r=yield this.getBlockWithTransactions(i);for(let i=0;i<r.transactions.length;i++){const s=r.transactions[i];if(s.hash===e)return;if(s.from===n.from&&s.nonce===n.nonce){if(a)return;const r=yield this.waitForTransaction(s.hash,t);if(c())return;let i="replaced";return s.data===n.data&&s.to===n.to&&s.value.eq(n.value)?i="repriced":"0x"===s.data&&s.from===s.to&&s.value.isZero()&&(i="cancelled"),void o(IR.makeError("transaction was replaced",eR.Logger.errors.TRANSACTION_REPLACED,{cancelled:"replaced"===i||"cancelled"===i,reason:i,replacement:this._wrapTransaction(s),hash:e,receipt:r}))}}i++}}a||this.once("block",l)}}))),(e=>{a||this.once("block",l)})))}));if(a)return;this.once("block",l),s.push((()=>{this.removeListener("block",l)}))}if("number"===typeof r&&r>0){const e=setTimeout((()=>{c()||o(IR.makeError("timeout exceeded",eR.Logger.errors.TIMEOUT,{timeout:r}))}),r);e.unref&&e.unref(),s.push((()=>{clearTimeout(e)}))}}))}))}getBlockNumber(){return xR(this,void 0,void 0,(function*(){return this._getInternalBlockNumber(0)}))}getGasPrice(){return xR(this,void 0,void 0,(function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return nR.O$.from(e)}catch(t){return IR.throwError("bad result from backend",eR.Logger.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}}))}getBalance(e,t){return xR(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield(0,$I.resolveProperties)({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getBalance",r);try{return nR.O$.from(n)}catch(i){return IR.throwError("bad result from backend",eR.Logger.errors.SERVER_ERROR,{method:"getBalance",params:r,result:n,error:i})}}))}getTransactionCount(e,t){return xR(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield(0,$I.resolveProperties)({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getTransactionCount",r);try{return nR.O$.from(n).toNumber()}catch(i){return IR.throwError("bad result from backend",eR.Logger.errors.SERVER_ERROR,{method:"getTransactionCount",params:r,result:n,error:i})}}))}getCode(e,t){return xR(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield(0,$I.resolveProperties)({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getCode",r);try{return(0,iR.hexlify)(n)}catch(i){return IR.throwError("bad result from backend",eR.Logger.errors.SERVER_ERROR,{method:"getCode",params:r,result:n,error:i})}}))}getStorageAt(e,t,r){return xR(this,void 0,void 0,(function*(){yield this.getNetwork();const n=yield(0,$I.resolveProperties)({address:this._getAddress(e),blockTag:this._getBlockTag(r),position:Promise.resolve(t).then((e=>(0,iR.hexValue)(e)))}),i=yield this.perform("getStorageAt",n);try{return(0,iR.hexlify)(i)}catch(o){return IR.throwError("bad result from backend",eR.Logger.errors.SERVER_ERROR,{method:"getStorageAt",params:n,result:i,error:o})}}))}_wrapTransaction(e,t,r){if(null!=t&&32!==(0,iR.hexDataLength)(t))throw new Error("invalid response - sendTransaction");const n=e;return null!=t&&e.hash!==t&&IR.throwError("Transaction hash mismatch from Provider.sendTransaction.",eR.Logger.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),n.wait=(t,n)=>xR(this,void 0,void 0,(function*(){let i;null==t&&(t=1),null==n&&(n=0),0!==t&&null!=r&&(i={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:r});const o=yield this._waitForTransaction(e.hash,t,n,i);return null==o&&0===t?null:(this._emitted["t:"+e.hash]=o.blockNumber,0===o.status&&IR.throwError("transaction failed",eR.Logger.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:o}),o)})),n}sendTransaction(e){return xR(this,void 0,void 0,(function*(){yield this.getNetwork();const t=yield Promise.resolve(e).then((e=>(0,iR.hexlify)(e))),r=this.formatter.transaction(e);null==r.confirmations&&(r.confirmations=0);const n=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const e=yield this.perform("sendTransaction",{signedTransaction:t});return this._wrapTransaction(r,e,n)}catch(i){throw i.transaction=r,i.transactionHash=r.hash,i}}))}_getTransactionRequest(e){return xR(this,void 0,void 0,(function*(){const t=yield e,r={};return["from","to"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>e?this._getAddress(e):null)))})),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>e?nR.O$.from(e):null)))})),["type"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>null!=e?e:null)))})),t.accessList&&(r.accessList=this.formatter.accessList(t.accessList)),["data"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>e?(0,iR.hexlify)(e):null)))})),this.formatter.transactionRequest(yield(0,$I.resolveProperties)(r))}))}_getFilter(e){return xR(this,void 0,void 0,(function*(){e=yield e;const t={};return null!=e.address&&(t.address=this._getAddress(e.address)),["blockHash","topics"].forEach((r=>{null!=e[r]&&(t[r]=e[r])})),["fromBlock","toBlock"].forEach((r=>{null!=e[r]&&(t[r]=this._getBlockTag(e[r]))})),this.formatter.filter(yield(0,$I.resolveProperties)(t))}))}_call(e,t,r){return xR(this,void 0,void 0,(function*(){r>=10&&IR.throwError("CCIP read exceeded maximum redirections",eR.Logger.errors.SERVER_ERROR,{redirects:r,transaction:e});const n=e.to,i=yield this.perform("call",{transaction:e,blockTag:t});if(r>=0&&"latest"===t&&null!=n&&"0x556f1830"===i.substring(0,10)&&(0,iR.hexDataLength)(i)%32===4)try{const o=(0,iR.hexDataSlice)(i,4),s=(0,iR.hexDataSlice)(o,0,32);nR.O$.from(s).eq(n)||IR.throwError("CCIP Read sender did not match",eR.Logger.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:i});const a=[],c=nR.O$.from((0,iR.hexDataSlice)(o,32,64)).toNumber(),l=nR.O$.from((0,iR.hexDataSlice)(o,c,c+32)).toNumber(),u=(0,iR.hexDataSlice)(o,c+32);for(let t=0;t<l;t++){const r=zR(u,32*t);null==r&&IR.throwError("CCIP Read contained corrupt URL string",eR.Logger.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:i}),a.push(r)}const h=KR(o,64);nR.O$.from((0,iR.hexDataSlice)(o,100,128)).isZero()||IR.throwError("CCIP Read callback selector included junk",eR.Logger.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:i});const d=(0,iR.hexDataSlice)(o,96,100),f=KR(o,128),p=yield this.ccipReadFetch(e,h,a);null==p&&IR.throwError("CCIP Read disabled or provided no URLs",eR.Logger.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:i});const g={to:n,data:(0,iR.hexConcat)([d,HR([p,f])])};return this._call(g,t,r+1)}catch(o){if(o.code===eR.Logger.errors.SERVER_ERROR)throw o}try{return(0,iR.hexlify)(i)}catch(o){return IR.throwError("bad result from backend",eR.Logger.errors.SERVER_ERROR,{method:"call",params:{transaction:e,blockTag:t},result:i,error:o})}}))}call(e,t){return xR(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield(0,$I.resolveProperties)({transaction:this._getTransactionRequest(e),blockTag:this._getBlockTag(t),ccipReadEnabled:Promise.resolve(e.ccipReadEnabled)});return this._call(r.transaction,r.blockTag,r.ccipReadEnabled?0:-1)}))}estimateGas(e){return xR(this,void 0,void 0,(function*(){yield this.getNetwork();const t=yield(0,$I.resolveProperties)({transaction:this._getTransactionRequest(e)}),r=yield this.perform("estimateGas",t);try{return nR.O$.from(r)}catch(n){return IR.throwError("bad result from backend",eR.Logger.errors.SERVER_ERROR,{method:"estimateGas",params:t,result:r,error:n})}}))}_getAddress(e){return xR(this,void 0,void 0,(function*(){"string"!==typeof(e=yield e)&&IR.throwArgumentError("invalid address or ENS name","name",e);const t=yield this.resolveName(e);return null==t&&IR.throwError("ENS name not configured",eR.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resolveName(".concat(JSON.stringify(e),")")}),t}))}_getBlock(e,t){return xR(this,void 0,void 0,(function*(){yield this.getNetwork(),e=yield e;let r=-128;const n={includeTransactions:!!t};if((0,iR.isHexString)(e,32))n.blockHash=e;else try{n.blockTag=yield this._getBlockTag(e),(0,iR.isHexString)(n.blockTag)&&(r=parseInt(n.blockTag.substring(2),16))}catch(i){IR.throwArgumentError("invalid block hash or block tag","blockHashOrBlockTag",e)}return(0,cR.poll)((()=>xR(this,void 0,void 0,(function*(){const e=yield this.perform("getBlock",n);if(null==e)return null!=n.blockHash&&null==this._emitted["b:"+n.blockHash]||null!=n.blockTag&&r>this._emitted.block?null:void 0;if(t){let t=null;for(let n=0;n<e.transactions.length;n++){const r=e.transactions[n];if(null==r.blockNumber)r.confirmations=0;else if(null==r.confirmations){null==t&&(t=yield this._getInternalBlockNumber(100+2*this.pollingInterval));let e=t-r.blockNumber+1;e<=0&&(e=1),r.confirmations=e}}const r=this.formatter.blockWithTransactions(e);return r.transactions=r.transactions.map((e=>this._wrapTransaction(e))),r}return this.formatter.block(e)}))),{oncePoll:this})}))}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return xR(this,void 0,void 0,(function*(){yield this.getNetwork(),e=yield e;const t={transactionHash:this.formatter.hash(e,!0)};return(0,cR.poll)((()=>xR(this,void 0,void 0,(function*(){const r=yield this.perform("getTransaction",t);if(null==r)return null==this._emitted["t:"+e]?null:void 0;const n=this.formatter.transactionResponse(r);if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations){let e=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-n.blockNumber+1;e<=0&&(e=1),n.confirmations=e}return this._wrapTransaction(n)}))),{oncePoll:this})}))}getTransactionReceipt(e){return xR(this,void 0,void 0,(function*(){yield this.getNetwork(),e=yield e;const t={transactionHash:this.formatter.hash(e,!0)};return(0,cR.poll)((()=>xR(this,void 0,void 0,(function*(){const r=yield this.perform("getTransactionReceipt",t);if(null==r)return null==this._emitted["t:"+e]?null:void 0;if(null==r.blockHash)return;const n=this.formatter.receipt(r);if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations){let e=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-n.blockNumber+1;e<=0&&(e=1),n.confirmations=e}return n}))),{oncePoll:this})}))}getLogs(e){return xR(this,void 0,void 0,(function*(){yield this.getNetwork();const t=yield(0,$I.resolveProperties)({filter:this._getFilter(e)}),r=yield this.perform("getLogs",t);return r.forEach((e=>{null==e.removed&&(e.removed=!1)})),CR.arrayOf(this.formatter.filterLog.bind(this.formatter))(r)}))}getEtherPrice(){return xR(this,void 0,void 0,(function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})}))}_getBlockTag(e){return xR(this,void 0,void 0,(function*(){if("number"===typeof(e=yield e)&&e<0){e%1&&IR.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return t+=e,t<0&&(t=0),this.formatter.blockTag(t)}return this.formatter.blockTag(e)}))}getResolver(e){return xR(this,void 0,void 0,(function*(){let t=e;for(;;){if(""===t||"."===t)return null;if("eth"!==e&&"eth"===t)return null;const r=yield this._getResolver(t,"getResolver");if(null!=r){const n=new WR(this,r,e);return t===e||(yield n.supportsWildcard())?n:null}t=t.split(".").slice(1).join(".")}}))}_getResolver(e,t){return xR(this,void 0,void 0,(function*(){null==t&&(t="ENS");const r=yield this.getNetwork();r.ensAddress||IR.throwError("network does not support ENS",eR.Logger.errors.UNSUPPORTED_OPERATION,{operation:t,network:r.name});try{const t=yield this.call({to:r.ensAddress,data:"0x0178b8bf"+(0,fR.VM)(e).substring(2)});return this.formatter.callAddress(t)}catch(n){}return null}))}resolveName(e){return xR(this,void 0,void 0,(function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(r){if((0,iR.isHexString)(e))throw r}"string"!==typeof e&&IR.throwArgumentError("invalid ENS name","name",e);const t=yield this.getResolver(e);return t?yield t.getAddress():null}))}lookupAddress(e){return xR(this,void 0,void 0,(function*(){e=yield e;const t=(e=this.formatter.address(e)).substring(2).toLowerCase()+".addr.reverse",r=yield this._getResolver(t,"lookupAddress");if(null==r)return null;const n=zR(yield this.call({to:r,data:"0x691f3431"+(0,fR.VM)(t).substring(2)}),0);return(yield this.resolveName(n))!=e?null:n}))}getAvatar(e){return xR(this,void 0,void 0,(function*(){let t=null;if((0,iR.isHexString)(e)){const r=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",i=yield this._getResolver(r,"getAvatar");if(!i)return null;t=new WR(this,i,r);try{const e=yield t.getAvatar();if(e)return e.url}catch(n){if(n.code!==eR.Logger.errors.CALL_EXCEPTION)throw n}try{const e=zR(yield this.call({to:i,data:"0x691f3431"+(0,fR.VM)(r).substring(2)}),0);t=yield this.getResolver(e)}catch(n){if(n.code!==eR.Logger.errors.CALL_EXCEPTION)throw n;return null}}else if(t=yield this.getResolver(e),!t)return null;const r=yield t.getAvatar();return null==r?null:r.url}))}perform(e,t){return IR.throwError(e+" not implemented",eR.Logger.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter((e=>e.pollable())).length>0}_stopEvent(e){this.polling=this._events.filter((e=>e.pollable())).length>0}_addEventListener(e,t,r){const n=new MR(TR(e),t,r);return this._events.push(n),this._startEvent(n),this}on(e,t){return this._addEventListener(e,t,!1)}once(e,t){return this._addEventListener(e,t,!0)}emit(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];let i=!1,o=[],s=TR(e);return this._events=this._events.filter((e=>e.tag!==s||(setTimeout((()=>{e.listener.apply(this,r)}),0),i=!0,!e.once||(o.push(e),!1)))),o.forEach((e=>{this._stopEvent(e)})),i}listenerCount(e){if(!e)return this._events.length;let t=TR(e);return this._events.filter((e=>e.tag===t)).length}listeners(e){if(null==e)return this._events.map((e=>e.listener));let t=TR(e);return this._events.filter((e=>e.tag===t)).map((e=>e.listener))}off(e,t){if(null==t)return this.removeAllListeners(e);const r=[];let n=!1,i=TR(e);return this._events=this._events.filter((e=>e.tag!==i||e.listener!=t||(!!n||(n=!0,r.push(e),!1)))),r.forEach((e=>{this._stopEvent(e)})),this}removeAllListeners(e){let t=[];if(null==e)t=this._events,this._events=[];else{const r=TR(e);this._events=this._events.filter((e=>e.tag!==r||(t.push(e),!1)))}return t.forEach((e=>{this._stopEvent(e)})),this}}var JR=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(t){o(t)}}function a(e){try{c(n.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};const XR=new eR.Logger(tR),$R=["call","estimateGas"];function eP(e,t){if(null==e)return null;if("string"===typeof e.message&&e.message.match("reverted")){const r=(0,iR.isHexString)(e.data)?e.data:null;if(!t||r)return{message:e.message,data:r}}if("object"===typeof e){for(const r in e){const n=eP(e[r],t);if(n)return n}return null}if("string"===typeof e)try{return eP(JSON.parse(e),t)}catch(r){}return null}function tP(e,t,r){const n=r.transaction||r.signedTransaction;if("call"===e){const e=eP(t,!0);if(e)return e.data;XR.throwError("missing revert data in call exception; Transaction reverted without a reason string",eR.Logger.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:t})}if("estimateGas"===e){let r=eP(t.body,!1);null==r&&(r=eP(t,!1)),r&&XR.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",eR.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{reason:r.message,method:e,transaction:n,error:t})}let i=t.message;throw t.code===eR.Logger.errors.SERVER_ERROR&&t.error&&"string"===typeof t.error.message?i=t.error.message:"string"===typeof t.body?i=t.body:"string"===typeof t.responseText&&(i=t.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit/i)&&XR.throwError("insufficient funds for intrinsic transaction cost",eR.Logger.errors.INSUFFICIENT_FUNDS,{error:t,method:e,transaction:n}),i.match(/nonce (is )?too low/i)&&XR.throwError("nonce has already been used",eR.Logger.errors.NONCE_EXPIRED,{error:t,method:e,transaction:n}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&XR.throwError("replacement fee too low",eR.Logger.errors.REPLACEMENT_UNDERPRICED,{error:t,method:e,transaction:n}),i.match(/only replay-protected/i)&&XR.throwError("legacy pre-eip-155 transactions not supported",eR.Logger.errors.UNSUPPORTED_OPERATION,{error:t,method:e,transaction:n}),$R.indexOf(e)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted/)&&XR.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",eR.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:n}),t}function rP(e){return new Promise((function(t){setTimeout(t,e)}))}function nP(e){if(e.error){const t=new Error(e.error.message);throw t.code=e.error.code,t.data=e.error.data,t}return e.result}function iP(e){return e?e.toLowerCase():e}const oP={};class sP extends rR.E{constructor(e,t,r){if(super(),e!==oP)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");(0,$I.defineReadOnly)(this,"provider",t),null==r&&(r=0),"string"===typeof r?((0,$I.defineReadOnly)(this,"_address",this.provider.formatter.address(r)),(0,$I.defineReadOnly)(this,"_index",null)):"number"===typeof r?((0,$I.defineReadOnly)(this,"_index",r),(0,$I.defineReadOnly)(this,"_address",null)):XR.throwArgumentError("invalid address or index","addressOrIndex",r)}connect(e){return XR.throwError("cannot alter JSON-RPC Signer connection",eR.Logger.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new aP(oP,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then((e=>(e.length<=this._index&&XR.throwError("unknown account #"+this._index,eR.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index]))))}sendUncheckedTransaction(e){e=(0,$I.shallowCopy)(e);const t=this.getAddress().then((e=>(e&&(e=e.toLowerCase()),e)));if(null==e.gasLimit){const r=(0,$I.shallowCopy)(e);r.from=t,e.gasLimit=this.provider.estimateGas(r)}return null!=e.to&&(e.to=Promise.resolve(e.to).then((e=>JR(this,void 0,void 0,(function*(){if(null==e)return null;const t=yield this.provider.resolveName(e);return null==t&&XR.throwArgumentError("provided ENS name resolves to null","tx.to",e),t}))))),(0,$I.resolveProperties)({tx:(0,$I.resolveProperties)(e),sender:t}).then((t=>{let{tx:r,sender:n}=t;null!=r.from?r.from.toLowerCase()!==n&&XR.throwArgumentError("from address mismatch","transaction",e):r.from=n;const i=this.provider.constructor.hexlifyTransaction(r,{from:!0});return this.provider.send("eth_sendTransaction",[i]).then((e=>e),(e=>("string"===typeof e.message&&e.message.match(/user denied/i)&&XR.throwError("user rejected transaction",eR.Logger.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:r}),tP("sendTransaction",e,i))))}))}signTransaction(e){return XR.throwError("signing transactions is unsupported",eR.Logger.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return JR(this,void 0,void 0,(function*(){const t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),r=yield this.sendUncheckedTransaction(e);try{return yield(0,cR.poll)((()=>JR(this,void 0,void 0,(function*(){const e=yield this.provider.getTransaction(r);if(null!==e)return this.provider._wrapTransaction(e,r,t)}))),{oncePoll:this.provider})}catch(n){throw n.transactionHash=r,n}}))}signMessage(e){return JR(this,void 0,void 0,(function*(){const t="string"===typeof e?(0,sR.Y0)(e):e,r=yield this.getAddress();try{return yield this.provider.send("personal_sign",[(0,iR.hexlify)(t),r.toLowerCase()])}catch(n){throw"string"===typeof n.message&&n.message.match(/user denied/i)&&XR.throwError("user rejected signing",eR.Logger.errors.ACTION_REJECTED,{action:"signMessage",from:r,messageData:e}),n}}))}_legacySignMessage(e){return JR(this,void 0,void 0,(function*(){const t="string"===typeof e?(0,sR.Y0)(e):e,r=yield this.getAddress();try{return yield this.provider.send("eth_sign",[r.toLowerCase(),(0,iR.hexlify)(t)])}catch(n){throw"string"===typeof n.message&&n.message.match(/user denied/i)&&XR.throwError("user rejected signing",eR.Logger.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:r,messageData:e}),n}}))}_signTypedData(e,t,r){return JR(this,void 0,void 0,(function*(){const n=yield oR.E.resolveNames(e,t,r,(e=>this.provider.resolveName(e))),i=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[i.toLowerCase(),JSON.stringify(oR.E.getPayload(n.domain,t,n.value))])}catch(o){throw"string"===typeof o.message&&o.message.match(/user denied/i)&&XR.throwError("user rejected signing",eR.Logger.errors.ACTION_REJECTED,{action:"_signTypedData",from:i,messageData:{domain:n.domain,types:t,value:n.value}}),o}}))}unlock(e){return JR(this,void 0,void 0,(function*(){const t=this.provider,r=yield this.getAddress();return t.send("personal_unlockAccount",[r.toLowerCase(),e,null])}))}}class aP extends sP{sendTransaction(e){return this.sendUncheckedTransaction(e).then((e=>({hash:e,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:t=>this.provider.waitForTransaction(e,t)})))}}const cP={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};class lP extends QR{constructor(e,t){let r=t;null==r&&(r=new Promise(((e,t)=>{setTimeout((()=>{this.detectNetwork().then((t=>{e(t)}),(e=>{t(e)}))}),0)}))),super(r),e||(e=(0,$I.getStatic)(this.constructor,"defaultUrl")()),"string"===typeof e?(0,$I.defineReadOnly)(this,"connection",Object.freeze({url:e})):(0,$I.defineReadOnly)(this,"connection",Object.freeze((0,$I.shallowCopy)(e))),this._nextId=42}get _cache(){return null==this._eventLoopCache&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout((()=>{this._cache.detectNetwork=null}),0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return JR(this,void 0,void 0,(function*(){yield rP(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch(t){try{e=yield this.send("net_version",[])}catch(t){}}if(null!=e){const r=(0,$I.getStatic)(this.constructor,"getNetwork");try{return r(nR.O$.from(e).toNumber())}catch(t){return XR.throwError("could not detect network",eR.Logger.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:t})}}return XR.throwError("could not detect network",eR.Logger.errors.NETWORK_ERROR,{event:"noNetwork"})}))}getSigner(e){return new sP(oP,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then((e=>e.map((e=>this.formatter.address(e)))))}send(e,t){const r={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:(0,$I.deepCopy)(r),provider:this});const n=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(n&&this._cache[e])return this._cache[e];const i=(0,cR.fetchJson)(this.connection,JSON.stringify(r),nP).then((e=>(this.emit("debug",{action:"response",request:r,response:e,provider:this}),e)),(e=>{throw this.emit("debug",{action:"response",error:e,request:r,provider:this}),e}));return n&&(this._cache[e]=i,setTimeout((()=>{this._cache[e]=null}),0)),i}prepareRequest(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[iP(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[iP(t.address),t.blockTag]];case"getCode":return["eth_getCode",[iP(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[iP(t.address),(0,iR.hexZeroPad)(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":return["eth_call",[(0,$I.getStatic)(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0}),t.blockTag]];case"estimateGas":return["eth_estimateGas",[(0,$I.getStatic)(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0})]];case"getLogs":return t.filter&&null!=t.filter.address&&(t.filter.address=iP(t.filter.address)),["eth_getLogs",[t.filter]]}return null}perform(e,t){return JR(this,void 0,void 0,(function*(){if("call"===e||"estimateGas"===e){const e=t.transaction;if(e&&null!=e.type&&nR.O$.from(e.type).isZero()&&null==e.maxFeePerGas&&null==e.maxPriorityFeePerGas){const r=yield this.getFeeData();null==r.maxFeePerGas&&null==r.maxPriorityFeePerGas&&((t=(0,$I.shallowCopy)(t)).transaction=(0,$I.shallowCopy)(e),delete t.transaction.type)}}const r=this.prepareRequest(e,t);null==r&&XR.throwError(e+" not implemented",eR.Logger.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(r[0],r[1])}catch(n){return tP(e,n,t)}}))}_startEvent(e){"pending"===e.tag&&this._startPending(),super._startEvent(e)}_startPending(){if(null!=this._pendingFilter)return;const e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then((function(r){return function n(){e.send("eth_getFilterChanges",[r]).then((function(r){if(e._pendingFilter!=t)return null;let n=Promise.resolve();return r.forEach((function(t){e._emitted["t:"+t.toLowerCase()]="pending",n=n.then((function(){return e.getTransaction(t).then((function(t){return e.emit("pending",t),null}))}))})),n.then((function(){return rP(1e3)}))})).then((function(){if(e._pendingFilter==t)return setTimeout((function(){n()}),0),null;e.send("eth_uninstallFilter",[r])})).catch((e=>{}))}(),r})).catch((e=>{}))}_stopEvent(e){"pending"===e.tag&&0===this.listenerCount("pending")&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,t){const r=(0,$I.shallowCopy)(cP);if(t)for(const i in t)t[i]&&(r[i]=!0);(0,$I.checkProperties)(e,r);const n={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach((function(t){if(null==e[t])return;const r=(0,iR.hexValue)(nR.O$.from(e[t]));"gasLimit"===t&&(t="gas"),n[t]=r})),["from","to","data"].forEach((function(t){null!=e[t]&&(n[t]=(0,iR.hexlify)(e[t]))})),e.accessList&&(n.accessList=(0,aR.accessListify)(e.accessList)),n}}const uP=new eR.Logger(tR);let hP=1;function dP(e,t){const r="Web3LegacyFetcher";return function(e,n){const i={method:e,params:n,id:hP++,jsonrpc:"2.0"};return new Promise(((e,n)=>{this.emit("debug",{action:"request",fetcher:r,request:(0,$I.deepCopy)(i),provider:this}),t(i,((t,o)=>{if(t)return this.emit("debug",{action:"response",fetcher:r,error:t,request:i,provider:this}),n(t);if(this.emit("debug",{action:"response",fetcher:r,request:i,response:o,provider:this}),o.error){const e=new Error(o.error.message);return e.code=o.error.code,e.data=o.error.data,n(e)}e(o.result)}))}))}}class fP extends lP{constructor(e,t){null==e&&uP.throwArgumentError("missing provider","provider",e);let r=null,n=null,i=null;"function"===typeof e?(r="unknown:",n=e):(r=e.host||e.path||"",!r&&e.isMetaMask&&(r="metamask"),i=e,e.request?(""===r&&(r="eip-1193:"),n=function(e){return function(t,r){null==r&&(r=[]);const n={method:t,params:r};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:(0,$I.deepCopy)(n),provider:this}),e.request(n).then((e=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:e,provider:this}),e)),(e=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:e,provider:this}),e}))}}(e)):e.sendAsync?n=dP(0,e.sendAsync.bind(e)):e.send?n=dP(0,e.send.bind(e)):uP.throwArgumentError("unsupported provider","provider",e),r||(r="unknown:")),super(r,t),(0,$I.defineReadOnly)(this,"jsonRpcFetchFunc",n),(0,$I.defineReadOnly)(this,"provider",i)}send(e,t){return this.jsonRpcFetchFunc(e,t)}}function pP(e){let{setAddress:t,setProvider:r}=e;return(0,wC.jsx)(gC,{variant:"contained",color:"primary",onClick:async()=>{try{const e=new fP(window.ethereum),n=await e.send("eth_requestAccounts",[]);t(n[0]),r(e)}catch(e){console.error("No web3 provider available",e)}},children:"Connect Wallet"})}const gP=(0,PI.A)({palette:{primary:{main:OI[500]},secondary:{main:MI[600]}}}),mP=kC({root:{textAlign:"center",display:"flex",flexDirection:"column",minHeight:"100vh"},appBar:{},container:{display:"flex",flex:1},main:{flex:1,margin:"10px"},wakuStatus:{marginRight:gP.spacing(2)},title:{flexGrow:1},peers:{}});const yP=function(){const[e,t]=(0,V.useState)(),[r,n]=(0,V.useState)(),[i,o]=(0,V.useState)(),[s,a]=(0,V.useState)(),[c,l]=(0,V.useState)(new Map),[u,h]=(0,V.useState)([]),[d,f]=(0,V.useState)(),[p,g]=(0,V.useState)({relayPeers:0}),m=mP();(0,V.useEffect)((()=>{(async()=>{if(e)return;const r=await async function(){const e=await bk({defaultBootstrap:!0});return await e.start(),await _c(e,[gi.Relay]),e}();console.log("waku: ready"),t(r)})().catch((e=>{console.error("Failed to initiate Waku",e)}))}),[e]),(0,V.useEffect)((()=>{if(!e)return;const t=Ak.bind({},d,l),r=new ci(Sk,xk);return e.relay.subscribe(r,t),function(){}}),[e,d]),(0,V.useEffect)((()=>{var e,t;i&&a((e=_k,t=i.privateKey,new ni(e,t)))}),[i]),(0,V.useEffect)((()=>{if(!e)return;if(!s)return;if(!d)return;const t=kk.bind({},h,d);return e.relay.subscribe(s,t),function(){}}),[e,d,s]),(0,V.useEffect)((()=>{if(!e)return;const t=setInterval((async()=>{const t=e.relay.gossipSub.getPeers();g({relayPeers:t.length})}),1e3);return()=>clearInterval(t)}),[e]);let y="";return d&&(y=d.substr(0,6)+"..."+d.substr(d.length-4,4)),(0,wC.jsx)(DI,{theme:gP,children:(0,wC.jsxs)("div",{className:m.root,children:[(0,wC.jsx)(Fk,{className:m.appBar,position:"static",children:(0,wC.jsxs)(zk,{children:[(0,wC.jsx)(uC,{edge:"start",className:m.wakuStatus,"aria-label":"waku-status",children:(0,wC.jsx)(LI.Z,{color:e?void 0:"disabled",style:e?{color:BI.Z[500]}:{}})}),(0,wC.jsxs)(fC,{className:m.peers,"aria-label":"connected-peers",children:["(Relay) Peers: ",p.relayPeers]}),(0,wC.jsx)(fC,{variant:"h6",className:m.title,children:"Ethereum Private Message"}),(0,wC.jsx)(fC,{children:y})]})}),(0,wC.jsx)("div",{className:m.container,children:(0,wC.jsxs)("main",{className:m.main,children:[(0,wC.jsxs)("fieldset",{children:[(0,wC.jsx)("legend",{children:"Wallet"}),(0,wC.jsx)(pP,{setAddress:f,setProvider:n})]}),(0,wC.jsxs)("fieldset",{children:[(0,wC.jsx)("legend",{children:"Encryption Key Pair"}),(0,wC.jsx)(RI,{encryptionKeyPair:i,setEncryptionKeyPair:o}),(0,wC.jsx)(UI,{address:d,encryptionKeyPair:i,waku:e,signer:null===r||void 0===r?void 0:r.getSigner()})]}),(0,wC.jsxs)("fieldset",{children:[(0,wC.jsx)("legend",{children:"Messaging"}),(0,wC.jsx)(XI,{recipients:c,waku:e,messages:u})]})]})})]})})};H.render((0,wC.jsx)(V.StrictMode,{children:(0,wC.jsx)(yP,{})}),document.getElementById("root"))})()})(); |