1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[30540],{411580:function(t){"use strict";var e=Object.prototype.hasOwnProperty,r="~";function n(){}function i(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function o(t,e,n,o,s){if("function"!=typeof n)throw TypeError("The listener must be a function");var u=new i(n,o||t,s),f=r?r+e:e;return t._events[f]?t._events[f].fn?t._events[f]=[t._events[f],u]:t._events[f].push(u):(t._events[f]=u,t._eventsCount++),t}function s(t,e){0==--t._eventsCount?t._events=new n:delete t._events[e]}function u(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1)),u.prototype.eventNames=function(){var t,n,i=[];if(0===this._eventsCount)return i;for(n in t=this._events)e.call(t,n)&&i.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},u.prototype.listeners=function(t){var e=r?r+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,s=Array(o);i<o;i++)s[i]=n[i].fn;return s},u.prototype.listenerCount=function(t){var e=r?r+t:t,n=this._events[e];return n?n.fn?1:n.length:0},u.prototype.emit=function(t,e,n,i,o,s){var u=r?r+t:t;if(!this._events[u])return!1;var f,h,a=this._events[u],l=arguments.length;if(a.fn){switch(a.once&&this.removeListener(t,a.fn,void 0,!0),l){case 1:return a.fn.call(a.context),!0;case 2:return a.fn.call(a.context,e),!0;case 3:return a.fn.call(a.context,e,n),!0;case 4:return a.fn.call(a.context,e,n,i),!0;case 5:return a.fn.call(a.context,e,n,i,o),!0;case 6:return a.fn.call(a.context,e,n,i,o,s),!0}for(h=1,f=Array(l-1);h<l;h++)f[h-1]=arguments[h];a.fn.apply(a.context,f)}else{var c,p=a.length;for(h=0;h<p;h++)switch(a[h].once&&this.removeListener(t,a[h].fn,void 0,!0),l){case 1:a[h].fn.call(a[h].context);break;case 2:a[h].fn.call(a[h].context,e);break;case 3:a[h].fn.call(a[h].context,e,n);break;case 4:a[h].fn.call(a[h].context,e,n,i);break;default:if(!f)for(c=1,f=Array(l-1);c<l;c++)f[c-1]=arguments[c];a[h].fn.apply(a[h].context,f)}}return!0},u.prototype.on=function(t,e,r){return o(this,t,e,r,!1)},u.prototype.once=function(t,e,r){return o(this,t,e,r,!0)},u.prototype.removeListener=function(t,e,n,i){var o=r?r+t:t;if(!this._events[o])return this;if(!e)return s(this,o),this;var u=this._events[o];if(u.fn)u.fn!==e||i&&!u.once||n&&u.context!==n||s(this,o);else{for(var f=0,h=[],a=u.length;f<a;f++)(u[f].fn!==e||i&&!u[f].once||n&&u[f].context!==n)&&h.push(u[f]);h.length?this._events[o]=1===h.length?h[0]:h:s(this,o)}return this},u.prototype.removeAllListeners=function(t){var e;return t?(e=r?r+t:t,this._events[e]&&s(this,e)):(this._events=new n,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=r,u.EventEmitter=u,t.exports=u},60677:function(t,e,r){"use strict";var n=r(982957).Buffer,i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.map=e.array=e.rustEnum=e.str=e.vecU8=e.tagged=e.vec=e.bool=e.option=e.publicKey=e.i256=e.u256=e.i128=e.u128=e.i64=e.u64=e.struct=e.f64=e.f32=e.i32=e.u32=e.i16=e.u16=e.i8=e.u8=void 0;let o=r(596861),s=r(164024),u=i(r(344373));var f=r(596861);Object.defineProperty(e,"u8",{enumerable:!0,get:function(){return f.u8}}),Object.defineProperty(e,"i8",{enumerable:!0,get:function(){return f.s8}}),Object.defineProperty(e,"u16",{enumerable:!0,get:function(){return f.u16}}),Object.defineProperty(e,"i16",{enumerable:!0,get:function(){return f.s16}}),Object.defineProperty(e,"u32",{enumerable:!0,get:function(){return f.u32}}),Object.defineProperty(e,"i32",{enumerable:!0,get:function(){return f.s32}}),Object.defineProperty(e,"f32",{enumerable:!0,get:function(){return f.f32}}),Object.defineProperty(e,"f64",{enumerable:!0,get:function(){return f.f64}}),Object.defineProperty(e,"struct",{enumerable:!0,get:function(){return f.struct}});class h extends o.Layout{constructor(t,e,r){super(t,r),this.blob=(0,o.blob)(t),this.signed=e}decode(t,e=0){let r=new u.default(this.blob.decode(t,e),10,"le");return this.signed?r.fromTwos(8*this.span).clone():r}
1encode(t,e,r=0){return this.signed&&(t=t.toTwos(8*this.span)),this.blob.encode(t.toArrayLike(n,"le",this.span),e,r)}}function a(t){return new h(8,!1,t)}e.u64=a,e.i64=function(t){return new h(8,!0,t)},e.u128=function(t){return new h(16,!1,t)},e.i128=function(t){return new h(16,!0,t)},e.u256=function(t){return new h(32,!1,t)},e.i256=function(t){return new h(32,!0,t)};class l extends o.Layout{constructor(t,e,r,n){super(t.span,n),this.layout=t,this.decoder=e,this.encoder=r}decode(t,e){return this.decoder(this.layout.decode(t,e))}encode(t,e,r){return this.layout.encode(this.encoder(t),e,r)}getSpan(t,e){return this.layout.getSpan(t,e)}}e.publicKey=function(t){return new l((0,o.blob)(32),t=>new s.PublicKey(t),t=>t.toBuffer(),t)};class c extends o.Layout{constructor(t,e){super(-1,e),this.layout=t,this.discriminator=(0,o.u8)()}encode(t,e,r=0){return null==t?this.discriminator.encode(0,e,r):(this.discriminator.encode(1,e,r),this.layout.encode(t,e,r+1)+1)}decode(t,e=0){let r=this.discriminator.decode(t,e);if(0===r)return null;if(1===r)return this.layout.decode(t,e+1);throw Error("Invalid option "+this.property)}getSpan(t,e=0){let r=this.discriminator.decode(t,e);if(0===r)return 1;if(1===r)return this.layout.getSpan(t,e+1)+1;throw Error("Invalid option "+this.property)}}function p(t){if(0===t)return!1;if(1===t)return!0;throw Error("Invalid bool: "+t)}function d(t){return t?1:0}function y(t){let e=(0,o.u32)("length");return new l((0,o.struct)([e,(0,o.blob)((0,o.offset)(e,-e.span),"data")]),({data:t})=>t,t=>({data:t}),t)}e.option=function(t,e){return new c(t,e)},e.bool=function(t){return new l((0,o.u8)(),p,d,t)},e.vec=function(t,e){let r=(0,o.u32)("length");return new l((0,o.struct)([r,(0,o.seq)(t,(0,o.offset)(r,-r.span),"values")]),({values:t})=>t,t=>({values:t}),e)},e.tagged=function(t,e,r){return new l((0,o.struct)([a("tag"),e.replicate("data")]),function({tag:e,data:r}){if(!e.eq(t))throw Error("Invalid tag, expected: "+t.toString("hex")+", got: "+e.toString("hex"));return r},e=>({tag:t,data:e}),r)},e.vecU8=y,e.str=function(t){return new l(y(),t=>t.toString("utf-8"),t=>n.from(t,"utf-8"),t)},e.rustEnum=function(t,e,r){let n=(0,o.union)(null!=r?r:(0,o.u8)(),e);return t.forEach((t,e)=>n.addVariant(e,t,t.property)),n},e.array=function(t,e,r){return new l((0,o.struct)([(0,o.seq)(t,e,"values")]),({values:t})=>t,t=>({values:t}),r)};class g extends o.Layout{constructor(t,e,r){super(t.span+e.span,r),this.keyLayout=t,this.valueLayout=e}decode(t,e){return e=e||0,[this.keyLayout.decode(t,e),this.valueLayout.decode(t,e+this.keyLayout.getSpan(t,e))]}encode(t,e,r){r=r||0;let n=this.keyLayout.encode(t[0],e,r),i=this.valueLayout.encode(t[1],e,r+n);return n+i}getSpan(t,e){return this.keyLayout.getSpan(t,e)+this.valueLayout.getSpan(t,e)}}e.map=function(t,e,r){let n=(0,o.u32)("length");return new l((0,o.struct)([n,(0,o.seq)(new g(t,e),(0,o.offset)(n,-n.span),"values")]),({values:t})=>new Map(t),t=>({values:Array.from(t.entries())}),r)}},569028:function(t,e,r){"use strict";e._O=e.Jq=e.KB=e.u8=e.cv=void 0,e.Ik=e.A9=e.n_=e.gM=void 0;let n=r(125356);function i(t){if(!(t instanceof Uint8Array))throw TypeError("b must be a Uint8Array")}function o(t){return i(t),n.Buffer.from(t.buffer,t.byteOffset,t.length)}class s{constructor(t,e){if(!Number.isInteger(t))throw TypeError("span must be an integer");this.span=t,this.property=e}makeDestinationObject(){return{}}getSpan(t,e){if(0>this.span)throw RangeError("indeterminate span");return this.span}replicate(t){let e=Object.create(this.constructor.prototype);return Object.assign(e,this),e.property=t,e}fromArray(t){}}function u(t,e){return e.property?t+"["+e.property+"]":t}class f extends s{isCount(){throw Error("ExternalLayout is abstract")}}class h extends f{constructor(t,e=0,r){if(!(t instanceof s))throw TypeError("layout must be a Layout");if(!Number.isInteger(e))throw TypeError("offset must be integer or undefined");super(t.span,r||t.property),this.layout=t,this.offset=e}isCount(){return this.layout instanceof a||this.layout instanceof l}decode(t,e=0){return this.layout.decode(t,e+this.offset)}encode(t,e,r=0){return this.layout.encode(t,e,r+this.offset)}}class a extends s{constructor(t,e){if(super(t,e),6<this.span)throw RangeError("span must not exceed 6 bytes")}decode(t,e=0){return o(t).readUIntLE(e,this.span)}encode(t,e,r=0){return o(e).writeUIntLE(t,r,this.span),this.span}}class l extends s{constructor(t,e){if(super(t,e),6<this.span)throw RangeError("span must not exceed 6 bytes")}decode(t,e=0){return o(t).readUIntBE(e,this.span)}encode(t,e,r=0){return o(e).writeUIntBE(t,r,this.span),this.span}}function c(t){let e=Math.floor(t/4294967296);return{hi32:e,lo32:t-4294967296*e}}
1function p(t,e){return 4294967296*t+e}class d extends s{constructor(t){super(8,t)}decode(t,e=0){let r=o(t),n=r.readUInt32LE(e);return p(r.readUInt32LE(e+4),n)}encode(t,e,r=0){let n=c(t),i=o(e);return i.writeUInt32LE(n.lo32,r),i.writeUInt32LE(n.hi32,r+4),8}}class y extends s{constructor(t){super(8,t)}decode(t,e=0){let r=o(t),n=r.readUInt32LE(e);return p(r.readInt32LE(e+4),n)}encode(t,e,r=0){let n=c(t),i=o(e);return i.writeUInt32LE(n.lo32,r),i.writeInt32LE(n.hi32,r+4),8}}class g extends s{constructor(t,e,r){if(!(t instanceof s))throw TypeError("elementLayout must be a Layout");if(!(e instanceof f&&e.isCount()||Number.isInteger(e)&&0<=e))throw TypeError("count must be non-negative integer or an unsigned integer ExternalLayout");let n=-1;e instanceof f||!(0<t.span)||(n=e*t.span),super(n,r),this.elementLayout=t,this.count=e}getSpan(t,e=0){if(0<=this.span)return this.span;let r=0,n=this.count;if(n instanceof f&&(n=n.decode(t,e)),0<this.elementLayout.span)r=n*this.elementLayout.span;else{let i=0;for(;i<n;)r+=this.elementLayout.getSpan(t,e+r),++i}return r}decode(t,e=0){let r=[],n=0,i=this.count;for(i instanceof f&&(i=i.decode(t,e));n<i;)r.push(this.elementLayout.decode(t,e)),e+=this.elementLayout.getSpan(t,e),n+=1;return r}encode(t,e,r=0){let n=this.elementLayout,i=t.reduce((t,i)=>t+n.encode(i,e,r+t),0);return this.count instanceof f&&this.count.encode(t.length,e,r),i}}class m extends s{constructor(t,e,r){if(!(Array.isArray(t)&&t.reduce((t,e)=>t&&e instanceof s,!0)))throw TypeError("fields must be array of Layout instances");for(let n of("boolean"==typeof e&&void 0===r&&(r=e,e=void 0),t))if(0>n.span&&void 0===n.property)throw Error("fields cannot contain unnamed variable-length layout");let n=-1;try{n=t.reduce((t,e)=>t+e.getSpan(),0)}catch(t){}super(n,e),this.fields=t,this.decodePrefixes=!!r}getSpan(t,e=0){if(0<=this.span)return this.span;let r=0;try{r=this.fields.reduce((r,n)=>{let i=n.getSpan(t,e);return e+=i,r+i},0)}catch(t){throw RangeError("indeterminate span")}return r}decode(t,e=0){i(t);let r=this.makeDestinationObject();for(let n of this.fields)if(void 0!==n.property&&(r[n.property]=n.decode(t,e)),e+=n.getSpan(t,e),this.decodePrefixes&&t.length===e)break;return r}encode(t,e,r=0){let n=r,i=0,o=0;for(let n of this.fields){let s=n.span;if(o=0<s?s:0,void 0!==n.property){let i=t[n.property];void 0!==i&&(o=n.encode(i,e,r),0>s&&(s=n.getSpan(e,r)))}i=r,r+=s}return i+o-n}fromArray(t){let e=this.makeDestinationObject();for(let r of this.fields)void 0!==r.property&&0<t.length&&(e[r.property]=t.shift());return e}layoutFor(t){if("string"!=typeof t)throw TypeError("property must be string");for(let e of this.fields)if(e.property===t)return e}offsetOf(t){if("string"!=typeof t)throw TypeError("property must be string");let e=0;for(let r of this.fields){if(r.property===t)return e;0>r.span?e=-1:0<=e&&(e+=r.span)}}}class w{constructor(t){this.property=t}decode(t,e){throw Error("UnionDiscriminator is abstract")}encode(t,e,r){throw Error("UnionDiscriminator is abstract")}}class b extends w{constructor(t,e){if(!(t instanceof f&&t.isCount()))throw TypeError("layout must be an unsigned integer ExternalLayout");super(e||t.property||"variant"),this.layout=t}decode(t,e){return this.layout.decode(t,e)}encode(t,e,r){return this.layout.encode(t,e,r)}}class v extends s{constructor(t,e,r){let n;if(t instanceof a||t instanceof l)n=new b(new h(t));else if(t instanceof f&&t.isCount())n=new b(t);else if(t instanceof w)n=t;else throw TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");if(void 0===e&&(e=null),!(null===e||e instanceof s))throw TypeError("defaultLayout must be null or a Layout");if(null!==e){if(0>e.span)throw Error("defaultLayout must have constant span");void 0===e.property&&(e=e.replicate("content"))}let i=-1;e&&0<=(i=e.span)&&(t instanceof a||t instanceof l)&&(i+=n.layout.span),super(i,r),this.discriminator=n,this.usesPrefixDiscriminator=t instanceof a||t instanceof l,this.defaultLayout=e,this.registry={};let o=this.defaultGetSourceVariant.bind(this);this.getSourceVariant=function(t){return o(t)},this.configGetSourceVariant=function(t){o=t.bind(this)}}getSpan(t,e=0){if(0<=this.span)return this.span;let r=this.getVariant(t,e);if(!r)throw Error("unable to determine span for unrecognized variant");return r.getSpan(t,e)}defaultGetSourceVariant(t){if(Object.prototype.hasOwnProperty.call(t,this.discriminator.property)){if(this.defaultLayout&&this.defaultLayout.property&&Object.prototype.hasOwnProperty.call(t,this.defaultLayout.property))return;let e=this.registry[t[this.discriminator.property]];if(e&&(!e.layout||e.property&&Object.prototype.hasOwnProperty.call(t,e.property)))return e}else for(let e in this.registry){let r=this.registry[e];if(r.property&&Object.prototype.hasOwnProperty.call(t,r.property))return r}throw Error("unable to infer src variant")}decode(t,e=0){let r;let n=this.discriminator,i=n.decode(t,e),o=this.registry[i];if(void 0===o){let o=this.defaultLayout,s=0;this.usesPrefixDiscriminator&&(s=n.layout.span),(r=this.makeDestinationObject())[n.property]=i,r[o.property]=o.decode(t,e+s)}else r=o.decode(t,e);return r}encode(t,e,r=0){let n=this.getSourceVariant(t);if(void 0===n){let n=this.discriminator,i=this.defaultLayout,o=0;return this.usesPrefixDiscriminator&&(o=n.layout.span),n.encode(t[n.property],e,r),o+i.encode(t[i.property],e,r+o)}return n.encode(t,e,r)}addVariant(t,e,r){let n=new E(this,t,e,r);return this.registry[t]=n,n}getVariant(t,e=0){let r;return t instanceof Uint8Array?r=this.discriminator.decode(t,e):r=t,this.registry[r]}}class E extends s{constructor(t,e,r,n){if(!(t instanceof v))throw TypeError("union must be a Union");if(!Number.isInteger(e)||0>e)throw TypeError("variant must be a (non-negative) integer");if("string"==typeof r&&void 0===n&&(n=r,r=null),r){if(!(r instanceof s))throw TypeError("layout must be a Layout");
1if(null!==t.defaultLayout&&0<=r.span&&r.span>t.defaultLayout.span)throw Error("variant span exceeds span of containing union");if("string"!=typeof n)throw TypeError("variant must have a String property")}let i=t.span;0>t.span&&0<=(i=r?r.span:0)&&t.usesPrefixDiscriminator&&(i+=t.discriminator.layout.span),super(i,n),this.union=t,this.variant=e,this.layout=r||null}getSpan(t,e=0){if(0<=this.span)return this.span;let r=0;this.union.usesPrefixDiscriminator&&(r=this.union.discriminator.layout.span);let n=0;return this.layout&&(n=this.layout.getSpan(t,e+r)),r+n}decode(t,e=0){let r=this.makeDestinationObject();if(this!==this.union.getVariant(t,e))throw Error("variant mismatch");let n=0;return this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span),this.layout?r[this.property]=this.layout.decode(t,e+n):this.property?r[this.property]=!0:this.union.usesPrefixDiscriminator&&(r[this.union.discriminator.property]=this.variant),r}encode(t,e,r=0){let n=0;if(this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span),this.layout&&!Object.prototype.hasOwnProperty.call(t,this.property))throw TypeError("variant lacks property "+this.property);this.union.discriminator.encode(this.variant,e,r);let i=n;if(this.layout&&(this.layout.encode(t[this.property],e,r+n),i+=this.layout.getSpan(e,r+n),0<=this.union.span&&i>this.union.span))throw Error("encoded variant overruns containing union");return i}fromArray(t){if(this.layout)return this.layout.fromArray(t)}}function B(t){return 0>t&&(t+=4294967296),t}class x extends s{constructor(t,e,r){if(!(t instanceof a||t instanceof l))throw TypeError("word must be a UInt or UIntBE layout");if("string"==typeof e&&void 0===r&&(r=e,e=!1),4<t.span)throw RangeError("word cannot exceed 32 bits");super(t.span,r),this.word=t,this.msb=!!e,this.fields=[];let n=0;this._packedSetValue=function(t){return n=B(t),this},this._packedGetValue=function(){return n}}decode(t,e=0){let r=this.makeDestinationObject(),n=this.word.decode(t,e);for(let e of(this._packedSetValue(n),this.fields))void 0!==e.property&&(r[e.property]=e.decode(t));return r}encode(t,e,r=0){let n=this.word.decode(e,r);for(let e of(this._packedSetValue(n),this.fields))if(void 0!==e.property){let r=t[e.property];void 0!==r&&e.encode(r)}return this.word.encode(this._packedGetValue(),e,r)}addField(t,e){let r=new M(this,t,e);return this.fields.push(r),r}addBoolean(t){let e=new A(this,t);return this.fields.push(e),e}fieldFor(t){if("string"!=typeof t)throw TypeError("property must be string");for(let e of this.fields)if(e.property===t)return e}}class M{constructor(t,e,r){if(!(t instanceof x))throw TypeError("container must be a BitStructure");if(!Number.isInteger(e)||0>=e)throw TypeError("bits must be positive integer");let n=8*t.span,i=t.fields.reduce((t,e)=>t+e.bits,0);if(e+i>n)throw Error("bits too long for span remainder ("+(n-i)+" of "+n+" remain)");this.container=t,this.bits=e,this.valueMask=(1<<e)-1,32===e&&(this.valueMask=4294967295),this.start=i,this.container.msb&&(this.start=n-i-e),this.wordMask=B(this.valueMask<<this.start),this.property=r}decode(t,e){return B(this.container._packedGetValue()&this.wordMask)>>>this.start}encode(t){if("number"!=typeof t||!Number.isInteger(t)||t!==B(t&this.valueMask))throw TypeError(u("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask);let e=this.container._packedGetValue(),r=B(t<<this.start);this.container._packedSetValue(B(e&~this.wordMask)|r)}}class A extends M{constructor(t,e){super(t,1,e)}decode(t,e){return!!super.decode(t,e)}encode(t){"boolean"==typeof t&&(t=+t),super.encode(t)}}class I extends s{constructor(t,e){if(!(t instanceof f&&t.isCount()||Number.isInteger(t)&&0<=t))throw TypeError("length must be positive integer or an unsigned integer ExternalLayout");let r=-1;t instanceof f||(r=t),super(r,e),this.length=t}getSpan(t,e){let r=this.span;return 0>r&&(r=this.length.decode(t,e)),r}decode(t,e=0){let r=this.span;return 0>r&&(r=this.length.decode(t,e)),o(t).slice(e,e+r)}encode(t,e,r){let n=this.length;if(this.length instanceof f&&(n=t.length),!(t instanceof Uint8Array&&n===t.length))throw TypeError(u("Blob.encode",this)+" requires (length "+n+") Uint8Array as src");if(r+n>e.length)throw RangeError("encoding overruns Uint8Array");let i=o(t);return o(e).write(i.toString("hex"),r,n,"hex"),this.length instanceof f&&this.length.encode(n,e,r),n}}e.cv=(t,e,r)=>new h(t,e,r),e.u8=t=>new a(1,t),e.KB=t=>new a(2,t),e.Jq=t=>new a(4,t),e._O=t=>new d(t),e.gM=t=>new y(t),e.n_=(t,e,r)=>new m(t,e,r),e.A9=(t,e,r)=>new g(t,e,r),e.Ik=(t,e)=>new I(t,e)},125356:function(t,e,r){"use strict";let n=r(959196),i=r(968848),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function s(t){if(t>
12147483647)throw RangeError('The value "'+t+'" is invalid for option "size"');let e=new Uint8Array(t);return Object.setPrototypeOf(e,u.prototype),e}function u(t,e,r){if("number"==typeof t){if("string"==typeof e)throw TypeError('The "string" argument must be of type string. Received type number');return a(t)}return f(t,e,r)}function f(t,e,r){if("string"==typeof t)return function(t,e){if(("string"!=typeof e||""===e)&&(e="utf8"),!u.isEncoding(e))throw TypeError("Unknown encoding: "+e);let r=0|d(t,e),n=s(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(C(t,Uint8Array)){let e=new Uint8Array(t);return c(e.buffer,e.byteOffset,e.byteLength)}return l(t)}(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(C(t,ArrayBuffer)||t&&C(t.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(C(t,SharedArrayBuffer)||t&&C(t.buffer,SharedArrayBuffer)))return c(t,e,r);if("number"==typeof t)throw TypeError('The "value" argument must not be of type number. Received type number');let n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return u.from(n,e,r);let i=function(t){var e;if(u.isBuffer(t)){let e=0|p(t.length),r=s(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||(e=t.length)!=e?s(0):l(t):"Buffer"===t.type&&Array.isArray(t.data)?l(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return u.from(t[Symbol.toPrimitive]("string"),e,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function h(t){if("number"!=typeof t)throw TypeError('"size" argument must be of type number');if(t<0)throw RangeError('The value "'+t+'" is invalid for option "size"')}function a(t){return h(t),s(t<0?0:0|p(t))}function l(t){let e=t.length<0?0:0|p(t.length),r=s(e);for(let n=0;n<e;n+=1)r[n]=255&t[n];return r}function c(t,e,r){let n;if(e<0||t.byteLength<e)throw RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),u.prototype),n}function p(t){if(t>=2147483647)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|t}function d(t,e){if(u.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||C(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);let r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return k(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return P(t).length;default:if(i)return n?-1:k(t).length;e=(""+e).toLowerCase(),i=!0}}function y(t,e,r){let i=!1;if((void 0===e||e<0)&&(e=0),e>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(e>>>=0)))return"";for(t||(t="utf8");;)switch(t){case"hex":return function(t,e,r){let n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=e;n<r;++n)i+=F[t[n]];return i}(this,e,r);case"utf8":case"utf-8":return b(this,e,r);case"ascii":return function(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}(this,e,r);case"latin1":case"binary":return function(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}(this,e,r);case"base64":var o,s;return o=e,s=r,0===o&&s===this.length?n.fromByteArray(this):n.fromByteArray(this.slice(o,s));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(t,e,r){let n=t.slice(e,r),i="";for(let t=0;t<n.length-1;t+=2)i+=String.fromCharCode(n[t]+256*n[t+1]);return i}(this,e,r);default:if(i)throw TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}function g(t,e,r){let n=t[e];t[e]=t[r],t[r]=n}function m(t,e,r,n,i){var o;if(0===t.length)return -1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),(o=r=+r)!=o&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return -1;r=t.length-1}
vendor: 48,286 bytes, line 1
1else if(r<0){if(!i)return -1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:w(t,e,r,n,i);if("number"==typeof e)return(e&=255,"function"==typeof Uint8Array.prototype.indexOf)?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):w(t,[e],r,n,i);throw TypeError("val must be string, number or Buffer")}function w(t,e,r,n,i){let o,s=1,u=t.length,f=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return -1;s=2,u/=2,f/=2,r/=2}function h(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){let n=-1;for(o=r;o<u;o++)if(h(t,o)===h(e,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===f)return n*s}else -1!==n&&(o-=o-n),n=-1}else for(r+f>u&&(r=u-f),o=r;o>=0;o--){let r=!0;for(let n=0;n<f;n++)if(h(t,o+n)!==h(e,n)){r=!1;break}if(r)return o}return -1}function b(t,e,r){r=Math.min(t.length,r);let n=[],i=e;for(;i<r;){let e=t[i],o=null,s=e>239?4:e>223?3:e>191?2:1;if(i+s<=r){let r,n,u,f;switch(s){case 1:e<128&&(o=e);break;case 2:(192&(r=t[i+1]))==128&&(f=(31&e)<<6|63&r)>127&&(o=f);break;case 3:r=t[i+1],n=t[i+2],(192&r)==128&&(192&n)==128&&(f=(15&e)<<12|(63&r)<<6|63&n)>2047&&(f<55296||f>57343)&&(o=f);break;case 4:r=t[i+1],n=t[i+2],u=t[i+3],(192&r)==128&&(192&n)==128&&(192&u)==128&&(f=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&u)>65535&&f<1114112&&(o=f)}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(t){let e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);let r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=4096));return r}(n)}function v(t,e,r){if(t%1!=0||t<0)throw RangeError("offset is not uint");if(t+e>r)throw RangeError("Trying to access beyond buffer length")}function E(t,e,r,n,i,o){if(!u.isBuffer(t))throw TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw RangeError('"value" argument is out of bounds');if(r+n>t.length)throw RangeError("Index out of range")}function B(t,e,r,n,i){L(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,r}function x(t,e,r,n,i){L(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=s,s>>=8,t[r+2]=s,s>>=8,t[r+1]=s,s>>=8,t[r]=s,r+8}function M(t,e,r,n,i,o){if(r+n>t.length||r<0)throw RangeError("Index out of range")}function A(t,e,r,n,o){return e=+e,r>>>=0,o||M(t,e,r,4,34028234663852886e22,-34028234663852886e22),i.write(t,e,r,n,23,4),r+4}function I(t,e,r,n,o){return e=+e,r>>>=0,o||M(t,e,r,8,17976931348623157e292,-17976931348623157e292),i.write(t,e,r,n,52,8),r+8}e.Buffer=u,e.SlowBuffer=function(t){return+t!=t&&(t=0),u.alloc(+t)},e.INSPECT_MAX_BYTES=50,e.kMaxLength=2147483647,u.TYPED_ARRAY_SUPPORT=function(){try{let t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(t,e,r){return f(t,e,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(t,e,r){return(h(t),t<=0)?s(t):void 0!==e?"string"==typeof r?s(t).fill(e,r):s(t).fill(e):s(t)},u.allocUnsafe=function(t){return a(t)},u.allocUnsafeSlow=function(t){return a(t)},u.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==u.prototype},u.compare=function(t,e){if(C(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),C(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(t)||!u.isBuffer(e))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let r=t.length,n=e.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){let r;if(!Array.isArray(t))throw TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);if(void 0===e)for(r=0,e=0;r<t.length;++r)e+=t[r].length;let n=u.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){let e=t[r];if(C(e,Uint8Array))i+e.length>n.length?(u.isBuffer(e)||(e=u.from(e)),e.copy(n,i)):Uint8Array.prototype.set.call(n,e,i);else if(u.isBuffer(e))e.copy(n,i);else throw TypeError('"list" argument must be an Array of Buffers');i+=e.length}return n},u.byteLength=d,u.prototype._isBuffer=!0,u.prototype.swap16=function(){let t=this.length;if(t%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)g(this,e,e+1);return this},u.prototype.swap32=function(){let t=this.length;if(t%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)g(this,e,e+3),g(this,e+1,e+2);return this},u.prototype.swap64=function(){let t=this.length;if(t%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)g(this,e,e+7),g(this,e+1,e+6),g(this,e+2,e+5),g(this,e+3,e+4);return this},u.prototype.toString=function(){let t=this.length;return 0===t?"":0==arguments.length?b(this,0,t):y.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(t){if(!u.isBuffer(t))throw TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){let t="",r=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(t,e,r,n,i){if(C(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(t))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return -1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,i>>>=0,this===t)return 0;let o=i-n,s=r-e,f=Math.min(o,s),h=this.slice(n,i),a=t.slice(e,r);for(let t=0;t<f;++t)if(h[t]!==a[t]){o=h[t],s=a[t];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(t,e,r){return -1!==this.indexOf(t,e,r)},u.prototype.indexOf=function(t,e,r){return m(this,t,e,r,!0)},u.prototype.lastIndexOf=function(t,e,r){return m(this,t,e,r,!1)},u.prototype.write=function(t,e,r,n){var i,o,s,u,f,h,a,l;if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else if(isFinite(e))e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let c=this.length-e;if((void 0===r||r>c)&&(r=c),t.length>0&&(r<0||e<0)||e>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let p=!1;for(;;)switch(n){case"hex":return function(t,e,r,n){let i;r=Number(r)||0;let o=t.length-r;n?(n=Number(n))>o&&(n=o):n=o;let s=e.length;for(n>s/2&&(n=s/2),i=0;i<n;++i){let n=parseInt(e.substr(2*i,2),16);if(n!=n)break;t[r+i]=n}return i}(this,t,e,r);case"utf8":case"utf-8":return i=e,o=r,N(k(t,this.length-i),this,i,o);case"ascii":case"latin1":case"binary":return s=e,u=r,N(function(t){let e=[];for(let r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(t),this,s,u);case"base64":return f=e,h=r,N(P(t),this,f,h);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return a=e,l=r,N(function(t,e){let r,n;let i=[];for(let o=0;o<t.length&&!((e-=2)<0);++o)n=(r=t.charCodeAt(o))>>8,i.push(r%256),i.push(n);return i}(t,this.length-a),this,a,l);default:if(p)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),p=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},u.prototype.slice=function(t,e){let r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);let n=this.subarray(t,e);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUintLE=u.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||v(t,e,this.length);let n=this[t],i=1,o=0;for(;++o<e&&(i*=256);)n+=this[t+o]*i;return n},u.prototype.readUintBE=u.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||v(t,e,this.length);let n=this[t+--e],i=1;for(;e>0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(t,e){return t>>>=0,e||v(t,1,this.length),this[t]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(t,e){return t>>>=0,e||v(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(t,e){return t>>>=0,e||v(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(t,e){return t>>>=0,e||v(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(t,e){return t>>>=0,e||v(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readBigUInt64LE=j(function(t){O(t>>>=0,"offset");let e=this[t],r=this[t+7];(void 0===e||void 0===r)&&R(t,this.length-8);let n=e+256*this[++t]+65536*this[++t]+16777216*this[++t],i=this[++t]+256*this[++t]+65536*this[++t]+16777216*r;return BigInt(n)+(BigInt(i)<<BigInt(32))}),u.prototype.readBigUInt64BE=j(function(t){O(t>>>=0,"offset");let e=this[t],r=this[t+7];(void 0===e||void 0===r)&&R(t,this.length-8);let n=16777216*e+65536*this[++t]+256*this[++t]+this[++t],i=16777216*this[++t]+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)}),u.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||v(t,e,this.length);let n=this[t],i=1,o=0;for(;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||v(t,e,this.length);let n=e,i=1,o=this[t+--n];for(;n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return(t>>>=0,e||v(t,1,this.length),128&this[t])?-((255-this[t]+1)*1):this[t]},u.prototype.readInt16LE=function(t,e){t>>>=0,e||v(t,2,this.length);let r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){t>>>=0,e||v(t,2,this.length);let r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return t>>>=0,e||v(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return t>>>=0,e||v(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readBigInt64LE=j(function(t){O(t>>>=0,"offset");let e=this[t],r=this[t+7];return(void 0===e||void 0===r)&&R(t,this.length-8),(BigInt(this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24))<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+16777216*this[++t])}),u.prototype.readBigInt64BE=j(function(t){O(t>>>=0,"offset");let e=this[t],r=this[t+7];return(void 0===e||void 0===r)&&R(t,this.length-8),(BigInt((e<<24)+65536*this[++t]+256*this[++t]+this[++t])<<BigInt(32))+BigInt(16777216*this[++t]+65536*this[++t]+256*this[++t]+r)}),u.prototype.readFloatLE=function(t,e){return t>>>=0,e||v(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return t>>>=0,e||v(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return t>>>=0,e||v(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return t>>>=0,e||v(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){let n=Math.pow(2,8*r)-1;E(this,t,e,r,n,0)}let i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){let n=Math.pow(2,8*r)-1;E(this,t,e,r,n,0)}let i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||E(this,t,e,1,255,0),this[e]=255&t,e+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||E(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||E(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||E(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||E(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigUInt64LE=j(function(t,e=0){return B(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=j(function(t,e=0){return x(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){let n=Math.pow(2,8*r-1);E(this,t,e,r,n-1,-n)}let i=0,o=1,s=0;for(this[e]=255&t;++i<r&&(o*=256);)t<0&&0===s&&0!==this[e+i-1]&&(s=1),this[e+i]=(t/o>>0)-s&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){let n=Math.pow(2,8*r-1);E(this,t,e,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/o>>0)-s&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||E(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||E(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||E(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||E(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||E(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigInt64LE=j(function(t,e=0){return B(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=j(function(t,e=0){return x(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeFloatLE=function(t,e,r){return A(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return A(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return I(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return I(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(!u.isBuffer(t))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r||0===t.length||0===this.length)return 0;if(e<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);let i=n-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),i},u.prototype.fill=function(t,e,r,n){let i;if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===t.length){let e=t.charCodeAt(0);("utf8"===n&&e<128||"latin1"===n)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw RangeError("Out of range index");if(r<=e)return this;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{let o=u.isBuffer(t)?t:u.from(t,n),s=o.length;if(0===s)throw TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<r-e;++i)this[i+e]=o[i%s]}return this};let _={};function U(t,e,r){_[t]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function S(t){let e="",r=t.length,n="-"===t[0]?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function L(t,e,r,n,i,o){if(t>r||t<e){let n;let i="bigint"==typeof e?"n":"";throw n=o>3?0===e||e===BigInt(0)?`>= 0${i} and < 2${i} ** ${(o+1)*8}${i}`:`>= -(2${i} ** ${(o+1)*8-1}${i}) and < 2 ** ${(o+1)*8-1}${i}`:`>= ${e}${i} and <= ${r}${i}`,new _.ERR_OUT_OF_RANGE("value",n,t)}O(i,"offset"),(void 0===n[i]||void 0===n[i+o])&&R(i,n.length-(o+1))}function O(t,e){if("number"!=typeof t)throw new _.ERR_INVALID_ARG_TYPE(e,"number",t)}function R(t,e,r){if(Math.floor(t)!==t)throw O(t,r),new _.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new _.ERR_BUFFER_OUT_OF_BOUNDS;throw new _.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}U("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),U("ERR_INVALID_ARG_TYPE",function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`},TypeError),U("ERR_OUT_OF_RANGE",function(t,e,r){let n=`The value of "${t}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>4294967296?i=S(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=S(i)),i+="n"),n+=` It must be ${e}. Received ${i}`},RangeError);let T=/[^+/0-9A-Za-z-_]/g;function k(t,e){let r;e=e||1/0;let n=t.length,i=null,o=[];for(let s=0;s<n;++s){if((r=t.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319||s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return o}function P(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(T,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function N(t,e,r,n){let i;for(i=0;i<n&&!(i+r>=e.length)&&!(i>=t.length);++i)e[i+r]=t[i];return i}function C(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}let F=function(){let t="0123456789abcdef",e=Array(256);for(let r=0;r<16;++r){let n=16*r;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i]}return e}();function j(t){return"undefined"==typeof BigInt?q:t}function q(){throw Error("BigInt not supported")}},652780:function(t,e,r){"use strict";var n=r(789766).lW,i=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),s=this&&this.__decorate||function(t,e,r,n){var i,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,r,n);else for(var u=t.length-1;u>=0;u--)(i=t[u])&&(s=(o<3?i(s):o>3?i(e,r,s):i(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s},u=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.hasOwnProperty.call(t,r)&&i(e,t,r);return o(e,t),e},f=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.deserializeUnchecked=e.deserialize=e.serialize=e.BinaryReader=e.BinaryWriter=e.BorshError=e.baseDecode=e.baseEncode=void 0;let h=f(r(344373)),a=f(r(959147)),l=u(r(765768)),c=new("function"!=typeof TextDecoder?l.TextDecoder:TextDecoder)("utf-8",{fatal:!0});e.baseEncode=function(t){return"string"==typeof t&&(t=n.from(t,"utf8")),a.default.encode(n.from(t))},e.baseDecode=function(t){return n.from(a.default.decode(t))};class p extends Error{constructor(t){super(t),this.fieldPath=[],this.originalMessage=t}addToFieldPath(t){this.fieldPath.splice(0,0,t),this.message=this.originalMessage+": "+this.fieldPath.join(".")}}e.BorshError=p;class d{constructor(){this.buf=n.alloc(1024),this.length=0}maybeResize(){this.buf.length<16+this.length&&(this.buf=n.concat([this.buf,n.alloc(1024)]))}writeU8(t){this.maybeResize(),this.buf.writeUInt8(t,this.length),this.length+=1}writeU16(t){this.maybeResize(),this.buf.writeUInt16LE(t,this.length),this.length+=2}writeU32(t){this.maybeResize(),this.buf.writeUInt32LE(t,this.length),this.length+=4}writeU64(t){this.maybeResize(),this.writeBuffer(n.from(new h.default(t).toArray("le",8)))}writeU128(t){this.maybeResize(),this.writeBuffer(n.from(new h.default(t).toArray("le",16)))}writeU256(t){this.maybeResize(),this.writeBuffer(n.from(new h.default(t).toArray("le",32)))}writeU512(t){this.maybeResize(),this.writeBuffer(n.from(new h.default(t).toArray("le",64)))}writeBuffer(t){this.buf=n.concat([n.from(this.buf.subarray(0,this.length)),t,n.alloc(1024)]),this.length+=t.length}writeString(t){this.maybeResize();let e=n.from(t,"utf8");this.writeU32(e.length),this.writeBuffer(e)}writeFixedArray(t){this.writeBuffer(n.from(t))}writeArray(t,e){for(let r of(this.maybeResize(),this.writeU32(t.length),t))this.maybeResize(),e(r)}toArray(){return this.buf.subarray(0,this.length)}}function y(t,e,r){let n=r.value;r.value=function(...t){try{return n.apply(this,t)}catch(t){if(t instanceof RangeError&&["ERR_BUFFER_OUT_OF_BOUNDS","ERR_OUT_OF_RANGE"].indexOf(t.code)>=0)throw new p("Reached the end of buffer when deserializing");throw t}}}e.BinaryWriter=d;class g{constructor(t){this.buf=t,this.offset=0}readU8(){let t=this.buf.readUInt8(this.offset);return this.offset+=1,t}readU16(){let t=this.buf.readUInt16LE(this.offset);return this.offset+=2,t}readU32(){let t=this.buf.readUInt32LE(this.offset);return this.offset+=4,t}readU64(){let t=this.readBuffer(8);return new h.default(t,"le")}readU128(){let t=this.readBuffer(16);return new h.default(t,"le")}readU256(){let t=this.readBuffer(32);return new h.default(t,"le")}readU512(){let t=this.readBuffer(64);return new h.default(t,"le")}readBuffer(t){if(this.offset+t>this.buf.length)throw new p(`Expected buffer length ${t} isn't within bounds`);let e=this.buf.slice(this.offset,this.offset+t);return this.offset+=t,e}readString(){let t=this.readU32(),e=this.readBuffer(t);try{return c.decode(e)}catch(t){throw new p(`Error decoding UTF-8 string: ${t}`)}}readFixedArray(t){return new Uint8Array(this.readBuffer(t))}readArray(t){let e=this.readU32(),r=[];for(let n=0;n<e;++n)r.push(t());return r}}function m(t){return t.charAt(0).toUpperCase()+t.slice(1)}function w(t,e,r,n,i){try{if("string"==typeof n)i[`write${m(n)}`](r);else if(n instanceof Array){if("number"==typeof n[0]){if(r.length!==n[0])throw new p(`Expecting byte array of length ${n[0]}, but got ${r.length} bytes`);i.writeFixedArray(r)}else if(2===n.length&&"number"==typeof n[1]){if(r.length!==n[1])throw new p(`Expecting byte array of length ${n[1]}, but got ${r.length} bytes`);for(let e=0;e<n[1];e++)w(t,null,r[e],n[0],i)}else i.writeArray(r,r=>{w(t,e,r,n[0],i)})}else if(void 0!==n.kind)switch(n.kind){case"option":null==r?i.writeU8(0):(i.writeU8(1),w(t,e,r,n.type,i));break;case"map":i.writeU32(r.size),r.forEach((r,o)=>{w(t,e,o,n.key,i),w(t,e,r,n.value,i)});break;default:throw new p(`FieldType ${n} unrecognized`)}else b(t,r,i)}catch(t){throw t instanceof p&&t.addToFieldPath(e),t}}function b(t,e,r){if("function"==typeof e.borshSerialize){e.borshSerialize(r);return}let n=t.get(e.constructor);if(!n)throw new p(`Class ${e.constructor.name} is missing in schema`);if("struct"===n.kind)n.fields.map(([n,i])=>{w(t,n,e[n],i,r)});else if("enum"===n.kind){let i=e[n.field];for(let o=0;o<n.values.length;++o){let[s,u]=n.values[o];if(s===i){r.writeU8(o),w(t,s,e[s],u,r);break}}}else throw new p(`Unexpected schema kind: ${n.kind} for ${e.constructor.name}`)}function v(t,e,r,n){try{if("string"==typeof r)return n[`read${m(r)}`]();if(r instanceof Array){if("number"==typeof r[0])return n.readFixedArray(r[0]);if("number"!=typeof r[1])return n.readArray(()=>v(t,e,r[0],n));{let e=[];for(let i=0;i<r[1];i++)e.push(v(t,null,r[0],n));return e}}if("option"===r.kind){if(n.readU8())return v(t,e,r.type,n);return}if("map"===r.kind){let i=new Map,o=n.readU32();for(let s=0;s<o;s++){let o=v(t,e,r.key,n),s=v(t,e,r.value,n);i.set(o,s)}return i}return E(t,r,n)}catch(t){throw t instanceof p&&t.addToFieldPath(e),t}}function E(t,e,r){if("function"==typeof e.borshDeserialize)return e.borshDeserialize(r);let n=t.get(e);if(!n)throw new p(`Class ${e.name} is missing in schema`);if("struct"===n.kind){let n={};for(let[i,o]of t.get(e).fields)n[i]=v(t,i,o,r);return new e(n)}if("enum"===n.kind){let i=r.readU8();if(i>=n.values.length)throw new p(`Enum index: ${i} is out of range`);let[o,s]=n.values[i],u=v(t,o,s,r);return new e({[o]:u})}throw new p(`Unexpected schema kind: ${n.kind} for ${e.constructor.name}`)}s([y],g.prototype,"readU8",null),s([y],g.prototype,"readU16",null),s([y],g.prototype,"readU32",null),s([y],g.prototype,"readU64",null),s([y],g.prototype,"readU128",null),s([y],g.prototype,"readU256",null),s([y],g.prototype,"readU512",null),s([y],g.prototype,"readString",null),s([y],g.prototype,"readFixedArray",null),s([y],g.prototype,"readArray",null),e.BinaryReader=g,e.serialize=function(t,e,r=d){let n=new r;return b(t,e,n),n.toArray()},e.deserialize=function(t,e,r,n=g){let i=new n(r),o=E(t,e,i);if(i.offset<r.length)throw new p(`Unexpected ${r.length-i.offset} bytes after deserialized data`);return o},e.deserializeUnchecked=function(t,e,r,n=g){return E(t,e,new n(r))}},789766:function(t,e,r){"use strict";let n=r(959196),i=r(968848),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function s(t){if(t>2147483647)throw RangeError('The value "'+t+'" is invalid for option "size"');let e=new Uint8Array(t);return Object.setPrototypeOf(e,u.prototype),e}function u(t,e,r){if("number"==typeof t){if("string"==typeof e)throw TypeError('The "string" argument must be of type string. Received type number');return a(t)}return f(t,e,r)}function f(t,e,r){if("string"==typeof t)return function(t,e){if(("string"!=typeof e||""===e)&&(e="utf8"),!u.isEncoding(e))throw TypeError("Unknown encoding: "+e);let r=0|d(t,e),n=s(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(C(t,Uint8Array)){let e=new Uint8Array(t);return c(e.buffer,e.byteOffset,e.byteLength)}return l(t)}(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(C(t,ArrayBuffer)||t&&C(t.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(C(t,SharedArrayBuffer)||t&&C(t.buffer,SharedArrayBuffer)))return c(t,e,r);if("number"==typeof t)throw TypeError('The "value" argument must not be of type number. Received type number');let n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return u.from(n,e,r);let i=function(t){var e;if(u.isBuffer(t)){let e=0|p(t.length),r=s(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||(e=t.length)!=e?s(0):l(t):"Buffer"===t.type&&Array.isArray(t.data)?l(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return u.from(t[Symbol.toPrimitive]("string"),e,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function h(t){if("number"!=typeof t)throw TypeError('"size" argument must be of type number');if(t<0)throw RangeError('The value "'+t+'" is invalid for option "size"')}function a(t){return h(t),s(t<0?0:0|p(t))}function l(t){let e=t.length<0?0:0|p(t.length),r=s(e);for(let n=0;n<e;n+=1)r[n]=255&t[n];return r}function c(t,e,r){let n;if(e<0||t.byteLength<e)throw RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),u.prototype),n}function p(t){if(t>=2147483647)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|t}function d(t,e){if(u.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||C(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);let r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return k(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return P(t).length;default:if(i)return n?-1:k(t).length;e=(""+e).toLowerCase(),i=!0}}function y(t,e,r){let i=!1;if((void 0===e||e<0)&&(e=0),e>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(e>>>=0)))return"";for(t||(t="utf8");;)switch(t){case"hex":return function(t,e,r){let n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=e;n<r;++n)i+=F[t[n]];return i}(this,e,r);case"utf8":case"utf-8":return b(this,e,r);case"ascii":return function(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}(this,e,r);case"latin1":case"binary":return function(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}(this,e,r);case"base64":var o,s;return o=e,s=r,0===o&&s===this.length?n.fromByteArray(this):n.fromByteArray(this.slice(o,s));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(t,e,r){let n=t.slice(e,r),i="";for(let t=0;t<n.length-1;t+=2)i+=String.fromCharCode(n[t]+256*n[t+1]);return i}(this,e,r);default:if(i)throw TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}function g(t,e,r){let n=t[e];t[e]=t[r],t[r]=n}function m(t,e,r,n,i){var o;if(0===t.length)return -1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),(o=r=+r)!=o&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return -1;r=t.length-1}else if(r<0){if(!i)return -1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:w(t,e,r,n,i);if("number"==typeof e)return(e&=255,"function"==typeof Uint8Array.prototype.indexOf)?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):w(t,[e],r,n,i);throw TypeError("val must be string, number or Buffer")}function w(t,e,r,n,i){let o,s=1,u=t.length,f=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return -1;s=2,u/=2,f/=2,r/=2}function h(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){let n=-1;for(o=r;o<u;o++)if(h(t,o)===h(e,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===f)return n*s}else -1!==n&&(o-=o-n),n=-1}else for(r+f>u&&(r=u-f),o=r;o>=0;o--){let r=!0;for(let n=0;n<f;n++)if(h(t,o+n)!==h(e,n)){r=!1;break}if(r)return o}return -1}function b(t,e,r){r=Math.min(t.length,r);let n=[],i=e;for(;i<r;){let e=t[i],o=null,s=e>239?4:e>223?3:e>191?2:1;if(i+s<=r){let r,n,u,f;switch(s){case 1:e<128&&(o=e);break;case 2:(192&(r=t[i+1]))==128&&(f=(31&e)<<6|63&r)>127&&(o=f);break;case 3:r=t[i+1],n=t[i+2],(192&r)==128&&(192&n)==128&&(f=(15&e)<<12|(63&r)<<6|63&n)>2047&&(f<55296||f>57343)&&(o=f);break;case 4:r=t[i+1],n=t[i+2],u=t[i+3],(192&r)==128&&(192&n)==128&&(192&u)==128&&(f=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&u)>65535&&f<1114112&&(o=f)}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(t){let e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);let r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=4096));return r}(n)}function v(t,e,r){if(t%1!=0||t<0)throw RangeError("offset is not uint");if(t+e>r)throw RangeError("Trying to access beyond buffer length")}function E(t,e,r,n,i,o){if(!u.isBuffer(t))throw TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw RangeError('"value" argument is out of bounds');if(r+n>t.length)throw RangeError("Index out of range")}function B(t,e,r,n,i){L(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,r}function x(t,e,r,n,i){L(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=s,s>>=8,t[r+2]=s,s>>=8,t[r+1]=s,s>>=8,t[r]=s,r+8}function M(t,e,r,n,i,o){if(r+n>t.length||r<0)throw RangeError("Index out of range")}function A(t,e,r,n,o){return e=+e,r>>>=0,o||M(t,e,r,4,34028234663852886e22,-34028234663852886e22),i.write(t,e,r,n,23,4),r+4}function I(t,e,r,n,o){return e=+e,r>>>=0,o||M(t,e,r,8,17976931348623157e292,-17976931348623157e292),i.write(t,e,r,n,52,8),r+8}e.lW=u,e.h2=50,u.TYPED_ARRAY_SUPPORT=function(){try{let t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(t,e,r){return f(t,e,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(t,e,r){return(h(t),t<=0)?s(t):void 0!==e?"string"==typeof r?s(t).fill(e,r):s(t).fill(e):s(t)},u.allocUnsafe=function(t){return a(t)},u.allocUnsafeSlow=function(t){return a(t)},u.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==u.prototype},u.compare=function(t,e){if(C(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),C(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(t)||!u.isBuffer(e))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let r=t.length,n=e.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){let r;if(!Array.isArray(t))throw TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);if(void 0===e)for(r=0,e=0;r<t.length;++r)e+=t[r].length;let n=u.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){let e=t[r];if(C(e,Uint8Array))i+e.length>n.length?(u.isBuffer(e)||(e=u.from(e)),e.copy(n,i)):Uint8Array.prototype.set.call(n,e,i);else if(u.isBuffer(e))e.copy(n,i);else throw TypeError('"list" argument must be an Array of Buffers');i+=e.length}return n},u.byteLength=d,u.prototype._isBuffer=!0,u.prototype.swap16=function(){let t=this.length;if(t%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)g(this,e,e+1);return this},u.prototype.swap32=function(){let t=this.length;if(t%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)g(this,e,e+3),g(this,e+1,e+2);return this},u.prototype.swap64=function(){let t=this.length;if(t%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)g(this,e,e+7),g(this,e+1,e+6),g(this,e+2,e+5),g(this,e+3,e+4);return this},u.prototype.toString=function(){let t=this.length;return 0===t?"":0==arguments.length?b(this,0,t):y.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(t){if(!u.isBuffer(t))throw TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){let t="",r=e.h2;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(t,e,r,n,i){if(C(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(t))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return -1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,i>>>=0,this===t)return 0;let o=i-n,s=r-e,f=Math.min(o,s),h=this.slice(n,i),a=t.slice(e,r);for(let t=0;t<f;++t)if(h[t]!==a[t]){o=h[t],s=a[t];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(t,e,r){return -1!==this.indexOf(t,e,r)},u.prototype.indexOf=function(t,e,r){return m(this,t,e,r,!0)},u.prototype.lastIndexOf=function(t,e,r){return m(this,t,e,r,!1)},u.prototype.write=function(t,e,r,n){var i,o,s,u,f,h,a,l;if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else if(isFinite(e))e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let c=this.length-e;if((void 0===r||r>c)&&(r=c),t.length>0&&(r<0||e<0)||e>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let p=!1;for(;;)switch(n){case"hex":return function(t,e,r,n){let i;r=Number(r)||0;let o=t.length-r;n?(n=Number(n))>o&&(n=o):n=o;let s=e.length;for(n>s/2&&(n=s/2),i=0;i<n;++i){let n=parseInt(e.substr(2*i,2),16);if(n!=n)break;t[r+i]=n}return i}(this,t,e,r);case"utf8":case"utf-8":return i=e,o=r,N(k(t,this.length-i),this,i,o);case"ascii":case"latin1":case"binary":return s=e,u=r,N(function(t){let e=[];for(let r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(t),this,s,u);case"base64":return f=e,h=r,N(P(t),this,f,h);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return a=e,l=r,N(function(t,e){let r,n;let i=[];for(let o=0;o<t.length&&!((e-=2)<0);++o)n=(r=t.charCodeAt(o))>>8,i.push(r%256),i.push(n);return i}(t,this.length-a),this,a,l);default:if(p)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),p=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},u.prototype.slice=function(t,e){let r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);let n=this.subarray(t,e);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUintLE=u.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||v(t,e,this.length);let n=this[t],i=1,o=0;for(;++o<e&&(i*=256);)n+=this[t+o]*i;return n},u.prototype.readUintBE=u.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||v(t,e,this.length);let n=this[t+--e],i=1;for(;e>0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(t,e){return t>>>=0,e||v(t,1,this.length),this[t]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(t,e){return t>>>=0,e||v(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(t,e){return t>>>=0,e||v(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(t,e){return t>>>=0,e||v(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(t,e){return t>>>=0,e||v(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readBigUInt64LE=j(function(t){O(t>>>=0,"offset");let e=this[t],r=this[t+7];(void 0===e||void 0===r)&&R(t,this.length-8);let n=e+256*this[++t]+65536*this[++t]+16777216*this[++t],i=this[++t]+256*this[++t]+65536*this[++t]+16777216*r;return BigInt(n)+(BigInt(i)<<BigInt(32))}),u.prototype.readBigUInt64BE=j(function(t){O(t>>>=0,"offset");let e=this[t],r=this[t+7];(void 0===e||void 0===r)&&R(t,this.length-8);let n=16777216*e+65536*this[++t]+256*this[++t]+this[++t],i=16777216*this[++t]+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)}),u.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||v(t,e,this.length);let n=this[t],i=1,o=0;for(;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||v(t,e,this.length);let n=e,i=1,o=this[t+--n];for(;n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return(t>>>=0,e||v(t,1,this.length),128&this[t])?-((255-this[t]+1)*1):this[t]},u.prototype.readInt16LE=function(t,e){t>>>=0,e||v(t,2,this.length);let r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){t>>>=0,e||v(t,2,this.length);let r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return t>>>=0,e||v(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return t>>>=0,e||v(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readBigInt64LE=j(function(t){O(t>>>=0,"offset");let e=this[t],r=this[t+7];return(void 0===e||void 0===r)&&R(t,this.length-8),(BigInt(this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24))<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+16777216*this[++t])}),u.prototype.readBigInt64BE=j(function(t){O(t>>>=0,"offset");let e=this[t],r=this[t+7];return(void 0===e||void 0===r)&&R(t,this.length-8),(BigInt((e<<24)+65536*this[++t]+256*this[++t]+this[++t])<<BigInt(32))+BigInt(16777216*this[++t]+65536*this[++t]+256*this[++t]+r)}),u.prototype.readFloatLE=function(t,e){return t>>>=0,e||v(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return t>>>=0,e||v(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return t>>>=0,e||v(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return t>>>=0,e||v(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){let n=Math.pow(2,8*r)-1;E(this,t,e,r,n,0)}let i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){let n=Math.pow(2,8*r)-1;E(this,t,e,r,n,0)}let i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||E(this,t,e,1,255,0),this[e]=255&t,e+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||E(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||E(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||E(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||E(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigUInt64LE=j(function(t,e=0){return B(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=j(function(t,e=0){return x(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){let n=Math.pow(2,8*r-1);E(this,t,e,r,n-1,-n)}let i=0,o=1,s=0;for(this[e]=255&t;++i<r&&(o*=256);)t<0&&0===s&&0!==this[e+i-1]&&(s=1),this[e+i]=(t/o>>0)-s&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){let n=Math.pow(2,8*r-1);E(this,t,e,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/o>>0)-s&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||E(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||E(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||E(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||E(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||E(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigInt64LE=j(function(t,e=0){return B(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=j(function(t,e=0){return x(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeFloatLE=function(t,e,r){return A(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return A(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return I(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return I(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(!u.isBuffer(t))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r||0===t.length||0===this.length)return 0;if(e<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);let i=n-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),i},u.prototype.fill=function(t,e,r,n){let i;if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===t.length){let e=t.charCodeAt(0);("utf8"===n&&e<128||"latin1"===n)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw RangeError("Out of range index");if(r<=e)return this;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{let o=u.isBuffer(t)?t:u.from(t,n),s=o.length;
1if(0===s)throw TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<r-e;++i)this[i+e]=o[i%s]}return this};let _={};function U(t,e,r){_[t]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function S(t){let e="",r=t.length,n="-"===t[0]?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function L(t,e,r,n,i,o){if(t>r||t<e){let n;let i="bigint"==typeof e?"n":"";throw n=o>3?0===e||e===BigInt(0)?`>= 0${i} and < 2${i} ** ${(o+1)*8}${i}`:`>= -(2${i} ** ${(o+1)*8-1}${i}) and < 2 ** ${(o+1)*8-1}${i}`:`>= ${e}${i} and <= ${r}${i}`,new _.ERR_OUT_OF_RANGE("value",n,t)}O(i,"offset"),(void 0===n[i]||void 0===n[i+o])&&R(i,n.length-(o+1))}function O(t,e){if("number"!=typeof t)throw new _.ERR_INVALID_ARG_TYPE(e,"number",t)}function R(t,e,r){if(Math.floor(t)!==t)throw O(t,r),new _.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new _.ERR_BUFFER_OUT_OF_BOUNDS;throw new _.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}U("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),U("ERR_INVALID_ARG_TYPE",function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`},TypeError),U("ERR_OUT_OF_RANGE",function(t,e,r){let n=`The value of "${t}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>4294967296?i=S(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=S(i)),i+="n"),n+=` It must be ${e}. Received ${i}`},RangeError);let T=/[^+/0-9A-Za-z-_]/g;function k(t,e){let r;e=e||1/0;let n=t.length,i=null,o=[];for(let s=0;s<n;++s){if((r=t.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319||s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return o}function P(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(T,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function N(t,e,r,n){let i;for(i=0;i<n&&!(i+r>=e.length)&&!(i>=t.length);++i)e[i+r]=t[i];return i}function C(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}let F=function(){let t="0123456789abcdef",e=Array(256);for(let r=0;r<16;++r){let n=16*r;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i]}return e}();function j(t){return"undefined"==typeof BigInt?q:t}function q(){throw Error("BigInt not supported")}},118282:function(t,e,r){"use strict";var n=r(373306).Buffer;t.exports=function(t){if(t.length>=255)throw TypeError("Alphabet too long");for(var e=new Uint8Array(256),r=0;r<e.length;r++)e[r]=255;for(var i=0;i<t.length;i++){var o=t.charAt(i),s=o.charCodeAt(0);if(255!==e[s])throw TypeError(o+" is ambiguous");e[s]=i}var u=t.length,f=t.charAt(0),h=Math.log(u)/Math.log(256),a=Math.log(256)/Math.log(u);function l(t){if("string"!=typeof t)throw TypeError("Expected String");if(0===t.length)return n.alloc(0);for(var r=0,i=0,o=0;t[r]===f;)i++,r++;for(var s=(t.length-r)*h+1>>>0,a=new Uint8Array(s);r<t.length;){var l=e[t.charCodeAt(r)];if(255===l)return;for(var c=0,p=s-1;(0!==l||c<o)&&-1!==p;p--,c++)l+=u*a[p]>>>0,a[p]=l%256>>>0,l=l/256>>>0;if(0!==l)throw Error("Non-zero carry");o=c,r++}for(var d=s-o;d!==s&&0===a[d];)d++;var y=n.allocUnsafe(i+(s-d));y.fill(0,0,i);for(var g=i;d!==s;)y[g++]=a[d++];return y}return{encode:function(e){if((Array.isArray(e)||e instanceof Uint8Array)&&(e=n.from(e)),!n.isBuffer(e))throw TypeError("Expected Buffer");if(0===e.length)return"";for(var r=0,i=0,o=0,s=e.length;o!==s&&0===e[o];)o++,r++;for(var h=(s-o)*a+1>>>0,l=new Uint8Array(h);o!==s;){for(var c=e[o],p=0,d=h-1;(0!==c||p<i)&&-1!==d;d--,p++)c+=256*l[d]>>>0,l[d]=c%u>>>0,c=c/u>>>0;
1if(0!==c)throw Error("Non-zero carry");i=p,o++}for(var y=h-i;y!==h&&0===l[y];)y++;for(var g=f.repeat(r);y<h;++y)g+=t.charAt(l[y]);return g},decodeUnsafe:l,decode:function(t){var e=l(t);if(e)return e;throw Error("Non-base"+u+" character")}}}},21089:function(t,e,r){"use strict";var n=r(982957).Buffer;e.oU=function(t){{let e=n.from(t);e.reverse();let r=e.toString("hex");return 0===r.length?BigInt(0):BigInt(`0x${r}`)}},e.Q5=function(t){{let e=t.toString("hex");return 0===e.length?BigInt(0):BigInt(`0x${e}`)}},e.k$=function(t,e){{let r=t.toString(16),i=n.from(r.padStart(2*e,"0").slice(0,2*e),"hex");return i.reverse(),i}},e.zP=function(t,e){{let r=t.toString(16);return n.from(r.padStart(2*e,"0").slice(0,2*e),"hex")}}},344373:function(t,e,r){!function(t,e){"use strict";function n(t,e){if(!t)throw Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&(("le"===e||"be"===e)&&(r=e,e=10),this._init(t||0,e||10,r||"be"))}"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{l="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(446601).Buffer}catch(t){}function s(t,e){var r=t.charCodeAt(e);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 "+t)}function u(t,e,r){var n=s(t,r);return r-1>=e&&(n|=s(t,r-1)<<4),n}function f(t,e,r,i){for(var o=0,s=0,u=Math.min(t.length,r),f=e;f<u;f++){var h=t.charCodeAt(f)-48;o*=i,s=h>=49?h-49+10:h>=17?h-17+10:h,n(h>=0&&s<i,"Invalid character"),o+=s}return o}function h(t,e){t.words=e.words,t.length=e.length,t.negative=e.negative,t.red=e.red}if(o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return 0>t.cmp(e)?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<t.length&&(16===e?this._parseHex(t,i,r):(this._parseBase(t,e,i),"le"===r&&this._initArray(this.toArray(),e,r)))},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=Array(this.length);for(var i,o,s=0;s<this.length;s++)this.words[s]=0;var u=0;if("be"===r)for(s=t.length-1,i=0;s>=0;s-=3)o=t[s]|t[s-1]<<8|t[s-2]<<16,this.words[i]|=o<<u&67108863,this.words[i+1]=o>>>26-u&67108863,(u+=24)>=26&&(u-=26,i++);else if("le"===r)for(s=0,i=0;s<t.length;s+=3)o=t[s]|t[s+1]<<8|t[s+2]<<16,this.words[i]|=o<<u&67108863,this.words[i+1]=o>>>26-u&67108863,(u+=24)>=26&&(u-=26,i++);return this._strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=Array(this.length);for(var n,i=0;i<this.length;i++)this.words[i]=0;var o=0,s=0;if("be"===r)for(i=t.length-1;i>=e;i-=2)n=u(t,e,i)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(i=(t.length-e)%2==0?e+1:e;i<t.length;i+=2)n=u(t,e,i)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this._strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,u=Math.min(o,o-s)+r,h=0,a=r;a<u;a+=n)h=f(t,a,a+n,e),this.imuln(i),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h);if(0!==s){var l=1;for(h=f(t,a,t.length,e),a=0;a<s;a++)l*=e;this.imuln(l),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h)}this._strip()},o.prototype.copy=function(t){t.words=Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype._move=function(t){h(t,this)},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)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")]=a}catch(t){o.prototype.inspect=a}else o.prototype.inspect=a;function a(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var l,c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],p=[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],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16
vendor: 4,981 bytes, line 1
1777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function y(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,u=67108863&s,f=s/67108864|0;r.words[0]=u;for(var h=1;h<n;h++){for(var a=f>>>26,l=67108863&f,c=Math.min(h,e.length-1),p=Math.max(0,h-t.length+1);p<=c;p++){var d=h-p|0;a+=(s=(i=0|t.words[d])*(o=0|e.words[p])+l)/67108864|0,l=67108863&s}r.words[h]=0|l,f=0|a}return 0!==f?r.words[h]=0|f:r.length--,r._strip()}o.prototype.toString=function(t,e){if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var r,i=0,o=0,s=0;s<this.length;s++){var u=this.words[s],f=((u<<i|o)&16777215).toString(16);o=u>>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==o||s!==this.length-1?c[6-f.length]+f+r:f+r}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var h=p[t],a=d[t];r="";var l=this.clone();for(l.negative=0;!l.isZero();){var y=l.modrn(a).toString(t);r=(l=l.idivn(a)).isZero()?y+r:c[h-y.length]+y+r}for(this.isZero()&&(r="0"+r);r.length%e!=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 t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},l&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(l,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,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=t.allocUnsafe?t.allocUnsafe(o):new t(o);return this["_toArrayLike"+("le"===e?"LE":"BE")](s,i),s},o.prototype._toArrayLikeLE=function(t,e){for(var r=0,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;t[r++]=255&s,r<t.length&&(t[r++]=s>>8&255),r<t.length&&(t[r++]=s>>16&255),6===o?(r<t.length&&(t[r++]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r<t.length)for(t[r++]=n;r<t.length;)t[r++]=0},o.prototype._toArrayLikeBE=function(t,e){for(var r=t.length-1,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;t[r--]=255&s,r>=0&&(t[r--]=s>>8&255),r>=0&&(t[r--]=s>>16&255),6===o?(r>=0&&(t[r--]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r>=0)for(t[r--]=n;r>=0;)t[r--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return(8191&e)==0&&(r+=13,e>>>=13),(127&e)==0&&(r+=7,e>>>=7),(15&e)==0&&(r+=4,e>>>=4),(3&e)==0&&(r+=2,e>>>=2),(1&e)==0&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return(this.length-1)*26+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).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(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this._strip()},o.prototype.ior=function(t){return n((this.negative|t.negative)==0),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this._strip()},o.prototype.iand=function(t){return n((this.negative|t.negative)==0),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){this.length>t.length?(e=this,r=t):(e=t,r=this);for(var e,r,n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this._strip()},o.prototype.ixor=function(t){return n((this.negative|t.negative)==0),this.iuxor(t)}
vendor: 7,856 bytes, line 1
1,o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i<e;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(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),e?this.words[r]=this.words[r]|1<<i:this.words[r]=this.words[r]&~(1<<i),this._strip()},o.prototype.iadd=function(t){if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var e,r,n,i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>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(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e,r,n=this.iadd(t);return t.negative=1,n._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(e=this,r=t):(e=t,r=this);for(var o=0,s=0;s<r.length;s++)o=(n=(0|e.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&n;for(;0!==o&&s<e.length;s++)o=(n=(0|e.words[s])+o)>>26,this.words[s]=67108863&n;if(0===o&&s<e.length&&e!==this)for(;s<e.length;s++)this.words[s]=e.words[s];return this.length=Math.max(this.length,s),e!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var g=function(t,e,r){var n,i,o,s=t.words,u=e.words,f=r.words,h=0,a=0|s[0],l=8191&a,c=a>>>13,p=0|s[1],d=8191&p,y=p>>>13,g=0|s[2],m=8191&g,w=g>>>13,b=0|s[3],v=8191&b,E=b>>>13,B=0|s[4],x=8191&B,M=B>>>13,A=0|s[5],I=8191&A,_=A>>>13,U=0|s[6],S=8191&U,L=U>>>13,O=0|s[7],R=8191&O,T=O>>>13,k=0|s[8],P=8191&k,N=k>>>13,C=0|s[9],F=8191&C,j=C>>>13,q=0|u[0],$=8191&q,z=q>>>13,D=0|u[1],Z=8191&D,V=D>>>13,H=0|u[2],G=8191&H,Y=H>>>13,K=0|u[3],W=8191&K,Q=K>>>13,J=0|u[4],X=8191&J,tt=J>>>13,te=0|u[5],tr=8191&te,tn=te>>>13,ti=0|u[6],to=8191&ti,ts=ti>>>13,tu=0|u[7],tf=8191&tu,th=tu>>>13,ta=0|u[8],tl=8191&ta,tc=ta>>>13,tp=0|u[9],td=8191&tp,ty=tp>>>13;r.negative=t.negative^e.negative,r.length=19;var tg=(h+(n=Math.imul(l,$))|0)+((8191&(i=(i=Math.imul(l,z))+Math.imul(c,$)|0))<<13)|0;h=((o=Math.imul(c,z))+(i>>>13)|0)+(tg>>>26)|0,tg&=67108863,n=Math.imul(d,$),i=(i=Math.imul(d,z))+Math.imul(y,$)|0,o=Math.imul(y,z);var tm=(h+(n=n+Math.imul(l,Z)|0)|0)+((8191&(i=(i=i+Math.imul(l,V)|0)+Math.imul(c,Z)|0))<<13)|0;h=((o=o+Math.imul(c,V)|0)+(i>>>13)|0)+(tm>>>26)|0,tm&=67108863,n=Math.imul(m,$),i=(i=Math.imul(m,z))+Math.imul(w,$)|0,o=Math.imul(w,z),n=n+Math.imul(d,Z)|0,i=(i=i+Math.imul(d,V)|0)+Math.imul(y,Z)|0,o=o+Math.imul(y,V)|0;var tw=(h+(n=n+Math.imul(l,G)|0)|0)+((8191&(i=(i=i+Math.imul(l,Y)|0)+Math.imul(c,G)|0))<<13)|0;h=((o=o+Math.imul(c,Y)|0)+(i>>>13)|0)+(tw>>>26)|0,tw&=67108863,n=Math.imul(v,$),i=(i=Math.imul(v,z))+Math.imul(E,$)|0,o=Math.imul(E,z),n=n+Math.imul(m,Z)|0,i=(i=i+Math.imul(m,V)|0)+Math.imul(w,Z)|0,o=o+Math.imul(w,V)|0,n=n+Math.imul(d,G)|0,i=(i=i+Math.imul(d,Y)|0)+Math.imul(y,G)|0,o=o+Math.imul(y,Y)|0;var tb=(h+(n=n+Math.imul(l,W)|0)|0)+((8191&(i=(i=i+Math.imul(l,Q)|0)+Math.imul(c,W)|0))<<13)|0;h=((o=o+Math.imul(c,Q)|0)+(i>>>13)|0)+(tb>>>26)|0,tb&=67108863,n=Math.imul(x,$),i=(i=Math.imul(x,z))+Math.imul(M,$)|0,o=Math.imul(M,z),n=n+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,V)|0)+Math.imul(E,Z)|0,o=o+Math.imul(E,V)|0,n=n+Math.imul(m,G)|0,i=(i=i+Math.imul(m,Y)|0)+Math.imul(w,G)|0,o=o+Math.imul(w,Y)|0,n=n+Math.imul(d,W)|0,i=(i=i+Math.imul(d,Q)|0)+Math.imul(y,W)|0,o=o+Math.imul(y,Q)|0;var tv=(h+(n=n+Math.imul(l,X)|0)|0)+((8191&(i=(i=i+Math.imul(l,tt)|0)+Math.imul(c,X)|0))<<13)|0;h=((o=o+Math.imul(c,tt)|0)+(i>>>13)|0)+(tv>>>26)|0,tv&=67108863,n=Math.imul(I,$),i=(i=Math.imul(I,z))+Math.imul(_,$)|0,o=Math.imul(_,z),n=n+Math.imul(x,Z)|0,i=(i=i+Math.imul(x,V)|0)+Math.imul(M,Z)|0,o=o+Math.imul(M,V)|0,n=n+Math.imul(v,G)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(E,G)|0,o=o+Math.imul(E,Y)|0,n=n+Math.imul(m,W)|0,i=(i=i+Math.imul(m,Q)|0)+Math.imul(w,W)|0,o=o+Math.imul(w,Q)|0,n=n+Math.imul(d,X)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(y,X)|0,o=o+Math.imul(y,tt)|0;var tE=(h+(n=n+Math.imul(l,tr)|0)|0)+((8191&(i=(i=i+Math.imul(l,tn)|0)+Math.imul(c,tr)|0))<<13)|0;h=((o=o+Math.imul(c,tn)|0)+(i>>>13)|0)+(tE>>>26)|0,tE&=67108863,n=Math.imul(S,$),i=(i=Math.imul(S,z))+Math.imul(L,$)|0,o=Math.imul(L,z),n=n+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,V)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,V)|0,n=n+Math.imul(x,G)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(M,G)|0,o=o+Math.imul(M,Y)|0,n=n+Math.imul(v,W)|0,i=(i=i+Math.imul(v,Q)|0)+Math.imul(E,W)|0,o=o+Math.imul(E,Q)|0,n=n+Math.imul(m,X)|0,i=(i=i+Math.imul(m,tt)|0)+Math.imul(w,X)|0,o=o+Math.imul(w,tt)|0,n=n+Math.imul(d,tr)|0,i=(i=i+Math.imul(d,tn)|0)+Math.imul(y,tr)|0,o=o+Math.imul(y,tn)|0;var tB=(h+(n=n+Math.imul(l,to)|0)|0)+((8191&(i=(i=i+Math.imul(l,ts)|0)+Math.imul(c,to)|0))<<13)|0;h=((o=o+Math.imul(c,ts)|0)+(i>>>13)|0)+(tB>>>26)|0,tB&=67108863,n=Math.imul(R,$),i=(i=Math.imul(R,z))+Math.imul(T,$)|0,o=Math.imul(T,z),n=n+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,V)|0)+Math.imul(L,Z)|0,o=o+Math.imul(L,V)|0,n=n+Math.imul(I,G)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,Y)|0,n=n+Math.imul(x,W)|0,i=(i=i+Math.imul(x,Q)|0)+Math.imul(M,W)|0,o=o+Math.imul(M,Q)|0,n=n+Math.imul(v,X)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,tt)|0,n=n+Math.imul(m,tr)|0,i=(i=i+Math.imul(m,tn)|0)+Math.imul(w,tr)|0,o=o+Math.imul(w,tn)|0,n=n+Math.imul(d,to)|0,i=(i=i+Math.imul(d,ts)|0)+Math.imul(y,to)|0,o=o+Math.imul(y,ts)|0;var tx=(h+(n=n+Math.imul(l,tf)|0)|0)+((8191&(i=(i=i+Math.imul(l,th)|0)+Math.imul(c,tf)|0))<<13)|0;h=((o=o+Math.imul(c,th)|0)+(i>>>13)|0)+(tx>>>26)|0,tx&=67108863,n=Math.imul(P,$),i=(i=Math.imul(P,z))+Math.imul(N,$)|0,o=Math.imul(N,z),n=n+Math.imul(R,Z)|0,i=(i=i+Math.imul(R,V)|0)+Math.imul(T,Z)|0,o=o+Math.imul(T,V)|0,n=n+Math.imul(S,G)|0,i=(i=i+Math.imul(S,Y)|0)+Math.imul(L,G)|0,o=o+Math.imul(L,Y)|0,n=n+Math.imul(I,W)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,Q)|0,n=n+Math.imul(x,X)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(M,X)|0,o=o+Math.imul(M,tt)|0,n=n+Math.imul(v,tr)|0,i=(i=i+Math.imul(v,tn)|0)+Math.imul(E,tr)|0,o=o+Math.imul(E,tn)|0,n=n+Math.imul(m,to)|0,i=(i=i+Math.imul(m,ts)|0)+Math.imul(w,to)|0,o=o+Math.imul(w,ts)|0,n=n+Math.imul(d,tf)|0,i=(i=i+Math.imul(d,th)|0)+Math.imul(y,tf)|0,o=o+Math.imul(y,th)|0;var tM=(h+(n=n+Math.imul(l,tl)|0)|0)+((8191&(i=(i=i+Math.imul(l,tc)|0)+Math.imul(c,tl)|0))<<13)|0;h=((o=o+Math.imul(c,tc)|0)+(i>>>13)|0)+(tM>>>26)|0,tM&=67108863,n=Math.imul(F,$),i=(i=Math.imul(F,z))+Math.imul(j,$)|0,o=Math.imul(j,z),n=n+Math.imul(P,Z)|0,i=(i=i+Math.imul(P,V)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,V)|0,n=n+Math.imul(R,G)|0,i=(i=i+Math.imul(R,Y)|0)+Math.imul(T,G)|0,o=o+Math.imul(T,Y)|0,n=n+Math.imul(S,W)|0,i=(i=i+Math.imul(S,Q)|0)+Math.imul(L,W)|0,o=o+Math.imul(L,Q)|0,n=n+Math.imul(I,X)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(x,tr)|0,i=(i=i+Math.imul(x,tn)|0)+Math.imul(M,tr)|0,o=o+Math.imul(M,tn
vendor: 2,679 bytes, line 1
1)|0,n=n+Math.imul(v,to)|0,i=(i=i+Math.imul(v,ts)|0)+Math.imul(E,to)|0,o=o+Math.imul(E,ts)|0,n=n+Math.imul(m,tf)|0,i=(i=i+Math.imul(m,th)|0)+Math.imul(w,tf)|0,o=o+Math.imul(w,th)|0,n=n+Math.imul(d,tl)|0,i=(i=i+Math.imul(d,tc)|0)+Math.imul(y,tl)|0,o=o+Math.imul(y,tc)|0;var tA=(h+(n=n+Math.imul(l,td)|0)|0)+((8191&(i=(i=i+Math.imul(l,ty)|0)+Math.imul(c,td)|0))<<13)|0;h=((o=o+Math.imul(c,ty)|0)+(i>>>13)|0)+(tA>>>26)|0,tA&=67108863,n=Math.imul(F,Z),i=(i=Math.imul(F,V))+Math.imul(j,Z)|0,o=Math.imul(j,V),n=n+Math.imul(P,G)|0,i=(i=i+Math.imul(P,Y)|0)+Math.imul(N,G)|0,o=o+Math.imul(N,Y)|0,n=n+Math.imul(R,W)|0,i=(i=i+Math.imul(R,Q)|0)+Math.imul(T,W)|0,o=o+Math.imul(T,Q)|0,n=n+Math.imul(S,X)|0,i=(i=i+Math.imul(S,tt)|0)+Math.imul(L,X)|0,o=o+Math.imul(L,tt)|0,n=n+Math.imul(I,tr)|0,i=(i=i+Math.imul(I,tn)|0)+Math.imul(_,tr)|0,o=o+Math.imul(_,tn)|0,n=n+Math.imul(x,to)|0,i=(i=i+Math.imul(x,ts)|0)+Math.imul(M,to)|0,o=o+Math.imul(M,ts)|0,n=n+Math.imul(v,tf)|0,i=(i=i+Math.imul(v,th)|0)+Math.imul(E,tf)|0,o=o+Math.imul(E,th)|0,n=n+Math.imul(m,tl)|0,i=(i=i+Math.imul(m,tc)|0)+Math.imul(w,tl)|0,o=o+Math.imul(w,tc)|0;var tI=(h+(n=n+Math.imul(d,td)|0)|0)+((8191&(i=(i=i+Math.imul(d,ty)|0)+Math.imul(y,td)|0))<<13)|0;h=((o=o+Math.imul(y,ty)|0)+(i>>>13)|0)+(tI>>>26)|0,tI&=67108863,n=Math.imul(F,G),i=(i=Math.imul(F,Y))+Math.imul(j,G)|0,o=Math.imul(j,Y),n=n+Math.imul(P,W)|0,i=(i=i+Math.imul(P,Q)|0)+Math.imul(N,W)|0,o=o+Math.imul(N,Q)|0,n=n+Math.imul(R,X)|0,i=(i=i+Math.imul(R,tt)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,tt)|0,n=n+Math.imul(S,tr)|0,i=(i=i+Math.imul(S,tn)|0)+Math.imul(L,tr)|0,o=o+Math.imul(L,tn)|0,n=n+Math.imul(I,to)|0,i=(i=i+Math.imul(I,ts)|0)+Math.imul(_,to)|0,o=o+Math.imul(_,ts)|0,n=n+Math.imul(x,tf)|0,i=(i=i+Math.imul(x,th)|0)+Math.imul(M,tf)|0,o=o+Math.imul(M,th)|0,n=n+Math.imul(v,tl)|0,i=(i=i+Math.imul(v,tc)|0)+Math.imul(E,tl)|0,o=o+Math.imul(E,tc)|0;var t_=(h+(n=n+Math.imul(m,td)|0)|0)+((8191&(i=(i=i+Math.imul(m,ty)|0)+Math.imul(w,td)|0))<<13)|0;h=((o=o+Math.imul(w,ty)|0)+(i>>>13)|0)+(t_>>>26)|0,t_&=67108863,n=Math.imul(F,W),i=(i=Math.imul(F,Q))+Math.imul(j,W)|0,o=Math.imul(j,Q),n=n+Math.imul(P,X)|0,i=(i=i+Math.imul(P,tt)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,tt)|0,n=n+Math.imul(R,tr)|0,i=(i=i+Math.imul(R,tn)|0)+Math.imul(T,tr)|0,o=o+Math.imul(T,tn)|0,n=n+Math.imul(S,to)|0,i=(i=i+Math.imul(S,ts)|0)+Math.imul(L,to)|0,o=o+Math.imul(L,ts)|0,n=n+Math.imul(I,tf)|0,i=(i=i+Math.imul(I,th)|0)+Math.imul(_,tf)|0,o=o+Math.imul(_,th)|0,n=n+Math.imul(x,tl)|0,i=(i=i+Math.imul(x,tc)|0)+Math.imul(M,tl)|0,o=o+Math.imul(M,tc)|0;var tU=(h+(n=n+Math.imul(v,td)|0)|0)+((8191&(i=(i=i+Math.imul(v,ty)|0)+Math.imul(E,td)|0))<<13)|0;h=((o=o+Math.imul(E,ty)|0)+(i>>>13)|0)+(tU>>>
vendor: 23,448 bytes, line 1
126)|0,tU&=67108863,n=Math.imul(F,X),i=(i=Math.imul(F,tt))+Math.imul(j,X)|0,o=Math.imul(j,tt),n=n+Math.imul(P,tr)|0,i=(i=i+Math.imul(P,tn)|0)+Math.imul(N,tr)|0,o=o+Math.imul(N,tn)|0,n=n+Math.imul(R,to)|0,i=(i=i+Math.imul(R,ts)|0)+Math.imul(T,to)|0,o=o+Math.imul(T,ts)|0,n=n+Math.imul(S,tf)|0,i=(i=i+Math.imul(S,th)|0)+Math.imul(L,tf)|0,o=o+Math.imul(L,th)|0,n=n+Math.imul(I,tl)|0,i=(i=i+Math.imul(I,tc)|0)+Math.imul(_,tl)|0,o=o+Math.imul(_,tc)|0;var tS=(h+(n=n+Math.imul(x,td)|0)|0)+((8191&(i=(i=i+Math.imul(x,ty)|0)+Math.imul(M,td)|0))<<13)|0;h=((o=o+Math.imul(M,ty)|0)+(i>>>13)|0)+(tS>>>26)|0,tS&=67108863,n=Math.imul(F,tr),i=(i=Math.imul(F,tn))+Math.imul(j,tr)|0,o=Math.imul(j,tn),n=n+Math.imul(P,to)|0,i=(i=i+Math.imul(P,ts)|0)+Math.imul(N,to)|0,o=o+Math.imul(N,ts)|0,n=n+Math.imul(R,tf)|0,i=(i=i+Math.imul(R,th)|0)+Math.imul(T,tf)|0,o=o+Math.imul(T,th)|0,n=n+Math.imul(S,tl)|0,i=(i=i+Math.imul(S,tc)|0)+Math.imul(L,tl)|0,o=o+Math.imul(L,tc)|0;var tL=(h+(n=n+Math.imul(I,td)|0)|0)+((8191&(i=(i=i+Math.imul(I,ty)|0)+Math.imul(_,td)|0))<<13)|0;h=((o=o+Math.imul(_,ty)|0)+(i>>>13)|0)+(tL>>>26)|0,tL&=67108863,n=Math.imul(F,to),i=(i=Math.imul(F,ts))+Math.imul(j,to)|0,o=Math.imul(j,ts),n=n+Math.imul(P,tf)|0,i=(i=i+Math.imul(P,th)|0)+Math.imul(N,tf)|0,o=o+Math.imul(N,th)|0,n=n+Math.imul(R,tl)|0,i=(i=i+Math.imul(R,tc)|0)+Math.imul(T,tl)|0,o=o+Math.imul(T,tc)|0;var tO=(h+(n=n+Math.imul(S,td)|0)|0)+((8191&(i=(i=i+Math.imul(S,ty)|0)+Math.imul(L,td)|0))<<13)|0;h=((o=o+Math.imul(L,ty)|0)+(i>>>13)|0)+(tO>>>26)|0,tO&=67108863,n=Math.imul(F,tf),i=(i=Math.imul(F,th))+Math.imul(j,tf)|0,o=Math.imul(j,th),n=n+Math.imul(P,tl)|0,i=(i=i+Math.imul(P,tc)|0)+Math.imul(N,tl)|0,o=o+Math.imul(N,tc)|0;var tR=(h+(n=n+Math.imul(R,td)|0)|0)+((8191&(i=(i=i+Math.imul(R,ty)|0)+Math.imul(T,td)|0))<<13)|0;h=((o=o+Math.imul(T,ty)|0)+(i>>>13)|0)+(tR>>>26)|0,tR&=67108863,n=Math.imul(F,tl),i=(i=Math.imul(F,tc))+Math.imul(j,tl)|0,o=Math.imul(j,tc);var tT=(h+(n=n+Math.imul(P,td)|0)|0)+((8191&(i=(i=i+Math.imul(P,ty)|0)+Math.imul(N,td)|0))<<13)|0;h=((o=o+Math.imul(N,ty)|0)+(i>>>13)|0)+(tT>>>26)|0,tT&=67108863;var tk=(h+(n=Math.imul(F,td))|0)+((8191&(i=(i=Math.imul(F,ty))+Math.imul(j,td)|0))<<13)|0;return h=((o=Math.imul(j,ty))+(i>>>13)|0)+(tk>>>26)|0,tk&=67108863,f[0]=tg,f[1]=tm,f[2]=tw,f[3]=tb,f[4]=tv,f[5]=tE,f[6]=tB,f[7]=tx,f[8]=tM,f[9]=tA,f[10]=tI,f[11]=t_,f[12]=tU,f[13]=tS,f[14]=tL,f[15]=tO,f[16]=tR,f[17]=tT,f[18]=tk,0!==h&&(f[19]=h,r.length++),r};function m(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var u=67108863&n,f=Math.min(o,e.length-1),h=Math.max(0,o-t.length+1);h<=f;h++){var a=o-h,l=(0|t.words[a])*(0|e.words[h]),c=67108863&l;s=s+(l/67108864|0)|0,u=67108863&(c=c+u|0),i+=(s=s+(c>>>26)|0)>>>26,s&=67108863}r.words[o]=u,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function w(t,e){this.x=t,this.y=e}Math.imul||(g=y),o.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return 10===this.length&&10===t.length?g(this,t,e):n<63?y(this,t,e):m(this,t,e)},w.prototype.makeRBT=function(t){for(var e=Array(t),r=o.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},w.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},w.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s<o;s++)n[s]=e[t[s]],i[s]=r[t[s]]},w.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var s=1;s<i;s<<=1)for(var u=s<<1,f=Math.cos(2*Math.PI/u),h=Math.sin(2*Math.PI/u),a=0;a<i;a+=u)for(var l=f,c=h,p=0;p<s;p++){var d=r[a+p],y=n[a+p],g=r[a+p+s],m=n[a+p+s],w=l*g-c*m;m=l*m+c*g,g=w,r[a+p]=d+g,n[a+p]=y+m,r[a+p+s]=d-g,n[a+p+s]=y-m,p!==u&&(w=f*l-h*c,c=f*c+h*l,l=w)}},w.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},w.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},w.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},w.prototype.convert13b=function(t,e,r,i){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<i;++s)r[s]=0;n(0===o),n((-8192&o)==0)},w.prototype.stub=function(t){for(var e=Array(t),r=0;r<t;r++)e[r]=0;return e},w.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),s=Array(n),u=Array(n),f=Array(n),h=Array(n),a=Array(n),l=Array(n),c=r.words;c.length=n,this.convert13b(t.words,t.length,s,n),this.convert13b(e.words,e.length,h,n),this.transform(s,o,u,f,n,i),this.transform(h,o,a,l,n,i);for(var p=0;p<n;p++){var d=u[p]*a[p]-f[p]*l[p];f[p]=u[p]*l[p]+f[p]*a[p],u[p]=d}return this.conjugate(u,f,n),this.transform(u,f,c,o,n,i),this.conjugate(c,o,n),this.normalize13b(c,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r._strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=Array(this.length+t.length),m(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){var e=t<0;e&&(t=-t),n("number"==typeof t),n(t<67108864);for(var r=0,i=0;i<this.length;i++){var o=(0|this.words[i])*t,s=(67108863&o)+(67108863&r);r>>=26,r+=(o/67108864|0)+(s>>>26),this.words[i]=67108863&s}return 0!==r&&(this.words[i]=r,this.length++),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=t.words[n]>>>i&1}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n("number"==typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var u=this.words[e]&o,f=(0|this.words[e])-u<<r;this.words[e]=f|s,s=u>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this._strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){n("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var i,o=t%26,s=Math.min((t-o)/26,this.length),u=67108863^67108863>>>o<<o;if(i-=s,i=Math.max(0,i),r){for(var f=0;f<s;f++)r.words[f]=this.words[f];r.length=s}if(0===s);else if(this.length>s)for(this.length-=s,f=0;f<this.length;f++)this.words[f]=this.words[f+s];else this.words[0]=0,this.length=1;var h=0;for(f=this.length-1;f>=0&&(0!==h||f>=i);f--){var a=0|this.words[f];this.words[f]=h<<26-o|a>>>o,h=a&u}return r&&0!==h&&(r.words[r.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;return!(this.length<=r)&&!!(this.words[r]&1<<e)},o.prototype.imaskn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;return(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)?this:(0!==e&&r++,this.length=Math.min(r,this.length),0!==e&&(this.words[this.length-1]&=67108863^67108863>>>e<<e),this._strip())},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return(n("number"==typeof t),n(t<67108864),t<0)?this.isubn(-t):0!==this.negative?(1===this.length&&(0|this.words[0])<=t?(this.words[0]=t-(0|this.words[0]),this.negative=0):(this.negative=0,this.isubn(t),this.negative=1),this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this._strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i,o,s=t.length+r;this._expand(s);var u=0;for(i=0;i<t.length;i++){o=(0|this.words[i+r])+u;var f=(0|t.words[i])*e;o-=67108863&f,u=(o>>26)-(f/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)u=(o=(0|this.words[i+r])+u)>>26,this.words[i+r]=67108863&o;if(0===u)return this._strip();for(n(-1===u),u=0,i=0;i<this.length;i++)u=(o=-(0|this.words[i])+u)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var r,n=this.length-t.length,i=this.clone(),s=t,u=0|s.words[s.length-1];0!=(n=26-this._countBits(u))&&(s=s.ushln(n),i.iushln(n),u=0|s.words[s.length-1]);var f=i.length-s.length;if("mod"!==e){(r=new o(null)).length=f+1,r.words=Array(r.length);for(var h=0;h<r.length;h++)r.words[h]=0}var a=i.clone()._ishlnsubmul(s,1,f);0===a.negative&&(i=a,r&&(r.words[f]=1));for(var l=f-1;l>=0;l--){var c=(0|i.words[s.length+l])*67108864+(0|i.words[s.length+l-1]);for(c=Math.min(c/u|0,67108863),i._ishlnsubmul(s,c,l);0!==i.negative;)c--,i.negative=0,i._ishlnsubmul(s,1,l),i.isZero()||(i.negative^=1);r&&(r.words[l]=c)}return r&&r._strip(),i._strip(),"div"!==e&&0!==n&&i.iushrn(n),{div:r||null,mod:i}},o.prototype.divmod=function(t,e,r){var i,s,u;return(n(!t.isZero()),this.isZero())?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(u=this.neg().divmod(t,e),"mod"!==e&&(i=u.div.neg()),"div"!==e&&(s=u.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(u=this.divmod(t.neg(),e),"mod"!==e&&(i=u.div.neg()),{div:i,mod:u.mod}):(this.negative&t.negative)!=0?(u=this.neg().divmod(t.neg(),e),"div"!==e&&(s=u.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:u.div,mod:s}):t.length>this.length||0>this.cmp(t)?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e)},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=67108864%t,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%t;return e?-i:i},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),u=new o(0),f=new o(1),h=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++h;for(var a=r.clone(),l=e.clone();!e.isZero();){for(var c=0,p=1;(e.words[0]&p)==0&&c<26;++c,p<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(a),s.isub(l)),i.iushrn(1),s.iushrn(1);for(var d=0,y=1;(r.words[0]&y)==0&&d<26;++d,y<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(u.isOdd()||f.isOdd())&&(u.iadd(a),f.isub(l)),u.iushrn(1),f.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(u),s.isub(f)):(r.isub(e),u.isub(i),f.isub(s))}return{a:u,b:f,gcd:r.iushln(h)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e,r=this,i=t.clone();r=0!==r.negative?r.umod(t):r.clone();for(var s=new o(1),u=new o(0),f=i.clone();r.cmpn(1)>0&&i.cmpn(1)>0;){for(var h=0,a=1;(r.words[0]&a)==0&&h<26;++h,a<<=1);if(h>0)for(r.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(f),s.iushrn(1);for(var l=0,c=1;(i.words[0]&c)==0&&l<26;++l,c<<=1);if(l>0)for(i.iushrn(l);l-- >0;)u.isOdd()&&u.iadd(f),u.iushrn(1);r.cmp(i)>=0?(r.isub(i),s.isub(u)):(i.isub(r),u.isub(s))}return 0>(e=0===r.cmpn(1)?s:u).cmpn(0)&&e.iadd(t),e},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return(1&this.words[0])==0},o.prototype.isOdd=function(){return(1&this.words[0])==1},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<<e;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 u=0|this.words[s];u+=o,o=u>>>26,u&=67108863,this.words[s]=u}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(t){var e,r=t<0;if(0!==this.negative&&!r)return -1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return -1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return -1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return -1===this.cmpn(t)},o.prototype.lt=function(t){return -1===this.cmp(t)},o.prototype.lten=function(t){return 0>=this.cmpn(t)},o.prototype.lte=function(t){return 0>=this.cmp(t)},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new A(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},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(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var b={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function E(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function B(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function x(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function I(t){A.call(this,t),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)}v.prototype._tmp=function(){var t=new o(null);return t.words=Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,r=t;do this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength();while(e>this.n);var n=e<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},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},i(E,v),E.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9){t.words[0]=0,t.length=1;return}var i=t.words[9];for(n=10,e.words[e.length++]=4194303&i;n<t.length;n++){var o=0|t.words[n];t.words[n-10]=(4194303&o)<<4|i>>>22,i=o}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},E.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(B,v),i(x,v),i(M,v),M.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=(0|t.words[r])*19+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){var e;if(b[t])return b[t];if("k256"===t)e=new E;else if("p224"===t)e=new B;else if("p192"===t)e=new x;else if("p25519"===t)e=new M;else throw Error("Unknown prime "+t);return b[t]=e,e},A.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},A.prototype._verify2=function(t,e){n((t.negative|e.negative)==0,"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},A.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(h(t,t.umod(this.m)._forceRed(this)),t)},A.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},A.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},A.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},A.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return 0>r.cmpn(0)&&r.iadd(this.m),r._forceRed(this)},A.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return 0>r.cmpn(0)&&r.iadd(this.m),r},A.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},A.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},A.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},A.prototype.isqr=function(t){return this.imul(t,t.clone())},A.prototype.sqr=function(t){return this.mul(t,t)},A.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var u=new o(1).toRed(this),f=u.redNeg(),h=this.m.subn(1).iushrn(1),a=this.m.bitLength();for(a=new o(2*a*a).toRed(this);0!==this.pow(a,h).cmp(f);)a.redIAdd(f);for(var l=this.pow(a,i),c=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),d=s;0!==p.cmp(u);){for(var y=p,g=0;0!==y.cmp(u);g++)y=y.redSqr();n(g<d);var m=this.pow(l,new o(1).iushln(d-g-1));c=c.redMul(m),l=m.redSqr(),p=p.redMul(l),d=g}return c},A.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},A.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],s=0,u=0,f=e.bitLength()%26;for(0===f&&(f=26),n=e.length-1;n>=0;n--){for(var h=e.words[n],a=f-1;a>=0;a--){var l=h>>a&1;if(i!==r[0]&&(i=this.sqr(i)),0===l&&0===s){u=0;continue}s<<=1,s|=l,(4==++u||0===n&&0===a)&&(i=this.mul(i,r[s]),u=0,s=0)}f=26}return i},A.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},A.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new I(t)},i(I,A),I.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},I.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},I.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),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):0>i.cmpn(0)&&(o=i.iadd(this.m)),o._forceRed(this)},I.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),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):0>
1i.cmpn(0)&&(s=i.iadd(this.m)),s._forceRed(this)},I.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},959147:function(t,e,r){var n=r(118282);t.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},596861:function(t,e,r){"use strict";var n=r(982957).Buffer;class i{constructor(t,e){if(!Number.isInteger(t))throw TypeError("span must be an integer");this.span=t,this.property=e}makeDestinationObject(){return{}}decode(t,e){throw Error("Layout is abstract")}encode(t,e,r){throw Error("Layout is abstract")}getSpan(t,e){if(0>this.span)throw RangeError("indeterminate span");return this.span}replicate(t){let e=Object.create(this.constructor.prototype);return Object.assign(e,this),e.property=t,e}fromArray(t){}}function o(t,e){return e.property?t+"["+e.property+"]":t}e.Layout=i,e.nameWithProperty=o,e.bindConstructorLayout=function(t,e){if("function"!=typeof t)throw TypeError("Class must be constructor");if(t.hasOwnProperty("layout_"))throw Error("Class is already bound to a layout");if(!(e&&e instanceof i))throw TypeError("layout must be a Layout");if(e.hasOwnProperty("boundConstructor_"))throw Error("layout is already bound to a constructor");t.layout_=e,e.boundConstructor_=t,e.makeDestinationObject=()=>new t,Object.defineProperty(t.prototype,"encode",{value:function(t,r){return e.encode(this,t,r)},writable:!0}),Object.defineProperty(t,"decode",{value:function(t,r){return e.decode(t,r)},writable:!0})};class s extends i{isCount(){throw Error("ExternalLayout is abstract")}}class u extends s{constructor(t,e){if(void 0===t&&(t=1),!Number.isInteger(t)||0>=t)throw TypeError("elementSpan must be a (positive) integer");super(-1,e),this.elementSpan=t}isCount(){return!0}decode(t,e){return void 0===e&&(e=0),Math.floor((t.length-e)/this.elementSpan)}encode(t,e,r){return 0}}class f extends s{constructor(t,e,r){if(!(t instanceof i))throw TypeError("layout must be a Layout");if(void 0===e)e=0;else if(!Number.isInteger(e))throw TypeError("offset must be integer or undefined");super(t.span,r||t.property),this.layout=t,this.offset=e}isCount(){return this.layout instanceof h||this.layout instanceof a}decode(t,e){return void 0===e&&(e=0),this.layout.decode(t,e+this.offset)}encode(t,e,r){return void 0===r&&(r=0),this.layout.encode(t,e,r+this.offset)}}class h extends i{constructor(t,e){if(super(t,e),6<this.span)throw RangeError("span must not exceed 6 bytes")}decode(t,e){return void 0===e&&(e=0),t.readUIntLE(e,this.span)}encode(t,e,r){return void 0===r&&(r=0),e.writeUIntLE(t,r,this.span),this.span}}class a extends i{constructor(t,e){if(super(t,e),6<this.span)throw RangeError("span must not exceed 6 bytes")}decode(t,e){return void 0===e&&(e=0),t.readUIntBE(e,this.span)}encode(t,e,r){return void 0===r&&(r=0),e.writeUIntBE(t,r,this.span),this.span}}class l extends i{constructor(t,e){if(super(t,e),6<this.span)throw RangeError("span must not exceed 6 bytes")}decode(t,e){return void 0===e&&(e=0),t.readIntLE(e,this.span)}encode(t,e,r){return void 0===r&&(r=0),e.writeIntLE(t,r,this.span),this.span}}class c extends i{constructor(t,e){if(super(t,e),6<this.span)throw RangeError("span must not exceed 6 bytes")}decode(t,e){return void 0===e&&(e=0),t.readIntBE(e,this.span)}encode(t,e,r){return void 0===r&&(r=0),e.writeIntBE(t,r,this.span),this.span}}function p(t){let e=Math.floor(t/4294967296);return{hi32:e,lo32:t-4294967296*e}}
1function d(t,e){return 4294967296*t+e}class y extends i{constructor(t){super(8,t)}decode(t,e){void 0===e&&(e=0);let r=t.readUInt32LE(e);return d(t.readUInt32LE(e+4),r)}encode(t,e,r){void 0===r&&(r=0);let n=p(t);return e.writeUInt32LE(n.lo32,r),e.writeUInt32LE(n.hi32,r+4),8}}class g extends i{constructor(t){super(8,t)}decode(t,e){return void 0===e&&(e=0),d(t.readUInt32BE(e),t.readUInt32BE(e+4))}encode(t,e,r){void 0===r&&(r=0);let n=p(t);return e.writeUInt32BE(n.hi32,r),e.writeUInt32BE(n.lo32,r+4),8}}class m extends i{constructor(t){super(8,t)}decode(t,e){void 0===e&&(e=0);let r=t.readUInt32LE(e);return d(t.readInt32LE(e+4),r)}encode(t,e,r){void 0===r&&(r=0);let n=p(t);return e.writeUInt32LE(n.lo32,r),e.writeInt32LE(n.hi32,r+4),8}}class w extends i{constructor(t){super(8,t)}decode(t,e){return void 0===e&&(e=0),d(t.readInt32BE(e),t.readUInt32BE(e+4))}encode(t,e,r){void 0===r&&(r=0);let n=p(t);return e.writeInt32BE(n.hi32,r),e.writeUInt32BE(n.lo32,r+4),8}}class b extends i{constructor(t){super(4,t)}decode(t,e){return void 0===e&&(e=0),t.readFloatLE(e)}encode(t,e,r){return void 0===r&&(r=0),e.writeFloatLE(t,r),4}}class v extends i{constructor(t){super(4,t)}decode(t,e){return void 0===e&&(e=0),t.readFloatBE(e)}encode(t,e,r){return void 0===r&&(r=0),e.writeFloatBE(t,r),4}}class E extends i{constructor(t){super(8,t)}decode(t,e){return void 0===e&&(e=0),t.readDoubleLE(e)}encode(t,e,r){return void 0===r&&(r=0),e.writeDoubleLE(t,r),8}}class B extends i{constructor(t){super(8,t)}decode(t,e){return void 0===e&&(e=0),t.readDoubleBE(e)}encode(t,e,r){return void 0===r&&(r=0),e.writeDoubleBE(t,r),8}}class x extends i{constructor(t,e,r){if(!(t instanceof i))throw TypeError("elementLayout must be a Layout");if(!(e instanceof s&&e.isCount()||Number.isInteger(e)&&0<=e))throw TypeError("count must be non-negative integer or an unsigned integer ExternalLayout");let n=-1;e instanceof s||!(0<t.span)||(n=e*t.span),super(n,r),this.elementLayout=t,this.count=e}getSpan(t,e){if(0<=this.span)return this.span;void 0===e&&(e=0);let r=0,n=this.count;if(n instanceof s&&(n=n.decode(t,e)),0<this.elementLayout.span)r=n*this.elementLayout.span;else{let i=0;for(;i<n;)r+=this.elementLayout.getSpan(t,e+r),++i}return r}decode(t,e){void 0===e&&(e=0);let r=[],n=0,i=this.count;for(i instanceof s&&(i=i.decode(t,e));n<i;)r.push(this.elementLayout.decode(t,e)),e+=this.elementLayout.getSpan(t,e),n+=1;return r}encode(t,e,r){void 0===r&&(r=0);let n=this.elementLayout,i=t.reduce((t,i)=>t+n.encode(i,e,r+t),0);return this.count instanceof s&&this.count.encode(t.length,e,r),i}}class M extends i{constructor(t,e,r){if(!(Array.isArray(t)&&t.reduce((t,e)=>t&&e instanceof i,!0)))throw TypeError("fields must be array of Layout instances");for(let n of("boolean"==typeof e&&void 0===r&&(r=e,e=void 0),t))if(0>n.span&&void 0===n.property)throw Error("fields cannot contain unnamed variable-length layout");let n=-1;try{n=t.reduce((t,e)=>t+e.getSpan(),0)}catch(t){}super(n,e),this.fields=t,this.decodePrefixes=!!r}getSpan(t,e){if(0<=this.span)return this.span;void 0===e&&(e=0);let r=0;try{r=this.fields.reduce((r,n)=>{let i=n.getSpan(t,e);return e+=i,r+i},0)}catch(t){throw RangeError("indeterminate span")}return r}decode(t,e){void 0===e&&(e=0);let r=this.makeDestinationObject();for(let n of this.fields)if(void 0!==n.property&&(r[n.property]=n.decode(t,e)),e+=n.getSpan(t,e),this.decodePrefixes&&t.length===e)break;return r}encode(t,e,r){void 0===r&&(r=0);let n=r,i=0,o=0;for(let n of this.fields){let s=n.span;if(o=0<s?s:0,void 0!==n.property){let i=t[n.property];void 0!==i&&(o=n.encode(i,e,r),0>s&&(s=n.getSpan(e,r)))}i=r,r+=s}return i+o-n}fromArray(t){let e=this.makeDestinationObject();for(let r of this.fields)void 0!==r.property&&0<t.length&&(e[r.property]=t.shift());return e}layoutFor(t){if("string"!=typeof t)throw TypeError("property must be string");for(let e of this.fields)if(e.property===t)return e}offsetOf(t){if("string"!=typeof t)throw TypeError("property must be string");let e=0;for(let r of this.fields){if(r.property===t)return e;0>r.span?e=-1:0<=e&&(e+=r.span)}}}class A{constructor(t){this.property=t}decode(){throw Error("UnionDiscriminator is abstract")}encode(){throw Error("UnionDiscriminator is abstract")}}class I extends A{constructor(t,e){if(!(t instanceof s&&t.isCount()))throw TypeError("layout must be an unsigned integer ExternalLayout");
1super(e||t.property||"variant"),this.layout=t}decode(t,e){return this.layout.decode(t,e)}encode(t,e,r){return this.layout.encode(t,e,r)}}class _ extends i{constructor(t,e,r){let n=t instanceof h||t instanceof a;if(n)t=new I(new f(t));else if(t instanceof s&&t.isCount())t=new I(t);else if(!(t instanceof A))throw TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");if(void 0===e&&(e=null),!(null===e||e instanceof i))throw TypeError("defaultLayout must be null or a Layout");if(null!==e){if(0>e.span)throw Error("defaultLayout must have constant span");void 0===e.property&&(e=e.replicate("content"))}let o=-1;e&&0<=(o=e.span)&&n&&(o+=t.layout.span),super(o,r),this.discriminator=t,this.usesPrefixDiscriminator=n,this.defaultLayout=e,this.registry={};let u=this.defaultGetSourceVariant.bind(this);this.getSourceVariant=function(t){return u(t)},this.configGetSourceVariant=function(t){u=t.bind(this)}}getSpan(t,e){if(0<=this.span)return this.span;void 0===e&&(e=0);let r=this.getVariant(t,e);if(!r)throw Error("unable to determine span for unrecognized variant");return r.getSpan(t,e)}defaultGetSourceVariant(t){if(t.hasOwnProperty(this.discriminator.property)){if(this.defaultLayout&&t.hasOwnProperty(this.defaultLayout.property))return;let e=this.registry[t[this.discriminator.property]];if(e&&(!e.layout||t.hasOwnProperty(e.property)))return e}else for(let e in this.registry){let r=this.registry[e];if(t.hasOwnProperty(r.property))return r}throw Error("unable to infer src variant")}decode(t,e){let r;void 0===e&&(e=0);let n=this.discriminator,i=n.decode(t,e),o=this.registry[i];if(void 0===o){let s=0;o=this.defaultLayout,this.usesPrefixDiscriminator&&(s=n.layout.span),(r=this.makeDestinationObject())[n.property]=i,r[o.property]=this.defaultLayout.decode(t,e+s)}else r=o.decode(t,e);return r}encode(t,e,r){void 0===r&&(r=0);let n=this.getSourceVariant(t);if(void 0===n){let n=this.discriminator,i=this.defaultLayout,o=0;return this.usesPrefixDiscriminator&&(o=n.layout.span),n.encode(t[n.property],e,r),o+i.encode(t[i.property],e,r+o)}return n.encode(t,e,r)}addVariant(t,e,r){let n=new U(this,t,e,r);return this.registry[t]=n,n}getVariant(t,e){let r=t;return n.isBuffer(t)&&(void 0===e&&(e=0),r=this.discriminator.decode(t,e)),this.registry[r]}}class U extends i{constructor(t,e,r,n){if(!(t instanceof _))throw TypeError("union must be a Union");if(!Number.isInteger(e)||0>e)throw TypeError("variant must be a (non-negative) integer");if("string"==typeof r&&void 0===n&&(n=r,r=null),r){if(!(r instanceof i))throw TypeError("layout must be a Layout");if(null!==t.defaultLayout&&0<=r.span&&r.span>t.defaultLayout.span)throw Error("variant span exceeds span of containing union");if("string"!=typeof n)throw TypeError("variant must have a String property")}let o=t.span;0>t.span&&0<=(o=r?r.span:0)&&t.usesPrefixDiscriminator&&(o+=t.discriminator.layout.span),super(o,n),this.union=t,this.variant=e,this.layout=r||null}getSpan(t,e){if(0<=this.span)return this.span;void 0===e&&(e=0);let r=0;return this.union.usesPrefixDiscriminator&&(r=this.union.discriminator.layout.span),r+this.layout.getSpan(t,e+r)}decode(t,e){let r=this.makeDestinationObject();if(void 0===e&&(e=0),this!==this.union.getVariant(t,e))throw Error("variant mismatch");let n=0;return this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span),this.layout?r[this.property]=this.layout.decode(t,e+n):this.property?r[this.property]=!0:this.union.usesPrefixDiscriminator&&(r[this.union.discriminator.property]=this.variant),r}encode(t,e,r){void 0===r&&(r=0);let n=0;if(this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span),this.layout&&!t.hasOwnProperty(this.property))throw TypeError("variant lacks property "+this.property);this.union.discriminator.encode(this.variant,e,r);let i=n;if(this.layout&&(this.layout.encode(t[this.property],e,r+n),i+=this.layout.getSpan(e,r+n),0<=this.union.span&&i>this.union.span))throw Error("encoded variant overruns containing union");return i}fromArray(t){if(this.layout)return this.layout.fromArray(t)}}function S(t){return 0>t&&(t+=4294967296),t}class L extends i{constructor(t,e,r){if(!(t instanceof h||t instanceof a))throw TypeError("word must be a UInt or UIntBE layout");if("string"==typeof e&&void 0===r&&(r=e,e=void 0),4<t.span)throw RangeError("word cannot exceed 32 bits");super(t.span,r),this.word=t,this.msb=!!e,this.fields=[];let n=0;this._packedSetValue=function(t){return n=S(t),this},this._packedGetValue=function(){return n}}decode(t,e){let r=this.makeDestinationObject();void 0===e&&(e=0);let n=this.word.decode(t,e);for(let t of(this._packedSetValue(n),this.fields))void 0!==t.property&&(r[t.property]=t.decode(n));return r}encode(t,e,r){void 0===r&&(r=0);let n=this.word.decode(e,r);for(let e of(this._packedSetValue(n),this.fields))if(void 0!==e.property){let r=t[e.property];void 0!==r&&e.encode(r)}return this.word.encode(this._packedGetValue(),e,r)}addField(t,e){let r=new O(this,t,e);return this.fields.push(r),r}addBoolean(t){let e=new R(this,t);return this.fields.push(e),e}fieldFor(t){if("string"!=typeof t)throw TypeError("property must be string");for(let e of this.fields)if(e.property===t)return e}}class O{constructor(t,e,r){if(!(t instanceof L))throw TypeError("container must be a BitStructure");
1if(!Number.isInteger(e)||0>=e)throw TypeError("bits must be positive integer");let n=8*t.span,i=t.fields.reduce((t,e)=>t+e.bits,0);if(e+i>n)throw Error("bits too long for span remainder ("+(n-i)+" of "+n+" remain)");this.container=t,this.bits=e,this.valueMask=(1<<e)-1,32===e&&(this.valueMask=4294967295),this.start=i,this.container.msb&&(this.start=n-i-e),this.wordMask=S(this.valueMask<<this.start),this.property=r}decode(){return S(this.container._packedGetValue()&this.wordMask)>>>this.start}encode(t){if(!Number.isInteger(t)||t!==S(t&this.valueMask))throw TypeError(o("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask);let e=this.container._packedGetValue(),r=S(t<<this.start);this.container._packedSetValue(S(e&~this.wordMask)|r)}}class R extends O{constructor(t,e){super(t,1,e)}decode(t,e){return!!O.prototype.decode.call(this,t,e)}encode(t){return"boolean"==typeof t&&(t=+t),O.prototype.encode.call(this,t)}}class T extends i{constructor(t,e){if(!(t instanceof s&&t.isCount()||Number.isInteger(t)&&0<=t))throw TypeError("length must be positive integer or an unsigned integer ExternalLayout");let r=-1;t instanceof s||(r=t),super(r,e),this.length=t}getSpan(t,e){let r=this.span;return 0>r&&(r=this.length.decode(t,e)),r}decode(t,e){void 0===e&&(e=0);let r=this.span;return 0>r&&(r=this.length.decode(t,e)),t.slice(e,e+r)}encode(t,e,r){let i=this.length;if(this.length instanceof s&&(i=t.length),!(n.isBuffer(t)&&i===t.length))throw TypeError(o("Blob.encode",this)+" requires (length "+i+") Buffer as src");if(r+i>e.length)throw RangeError("encoding overruns Buffer");return e.write(t.toString("hex"),r,i,"hex"),this.length instanceof s&&this.length.encode(i,e,r),i}}class k extends i{constructor(t){super(-1,t)}getSpan(t,e){if(!n.isBuffer(t))throw TypeError("b must be a Buffer");void 0===e&&(e=0);let r=e;for(;r<t.length&&0!==t[r];)r+=1;return 1+r-e}decode(t,e,r){void 0===e&&(e=0);let n=this.getSpan(t,e);return t.slice(e,e+n-1).toString("utf-8")}encode(t,e,r){void 0===r&&(r=0),"string"!=typeof t&&(t=t.toString());let i=new n(t,"utf8"),o=i.length;if(r+o>e.length)throw RangeError("encoding overruns Buffer");return i.copy(e,r),e[r+o]=0,o+1}}class P extends i{constructor(t,e){if("string"==typeof t&&void 0===e&&(e=t,t=void 0),void 0===t)t=-1;else if(!Number.isInteger(t))throw TypeError("maxSpan must be an integer");super(-1,e),this.maxSpan=t}getSpan(t,e){if(!n.isBuffer(t))throw TypeError("b must be a Buffer");return void 0===e&&(e=0),t.length-e}decode(t,e,r){void 0===e&&(e=0);let n=this.getSpan(t,e);if(0<=this.maxSpan&&this.maxSpan<n)throw RangeError("text length exceeds maxSpan");return t.slice(e,e+n).toString("utf-8")}encode(t,e,r){void 0===r&&(r=0),"string"!=typeof t&&(t=t.toString());let i=new n(t,"utf8"),o=i.length;if(0<=this.maxSpan&&this.maxSpan<o)throw RangeError("text length exceeds maxSpan");if(r+o>e.length)throw RangeError("encoding overruns Buffer");return i.copy(e,r),o}}class N extends i{constructor(t,e){super(0,e),this.value=t}decode(t,e,r){return this.value}encode(t,e,r){return 0}}e.ExternalLayout=s,e.GreedyCount=u,e.OffsetLayout=f,e.UInt=h,e.UIntBE=a,e.Int=l,e.IntBE=c,e.Float=b,e.FloatBE=v,e.Double=E,e.DoubleBE=B,e.Sequence=x,e.Structure=M,e.UnionDiscriminator=A,e.UnionLayoutDiscriminator=I,e.Union=_,e.VariantLayout=U,e.BitStructure=L,e.BitField=O,e.Boolean=R,e.Blob=T,e.CString=k,e.UTF8=P,e.Constant=N,e.greedy=(t,e)=>new u(t,e),e.offset=(t,e,r)=>new f(t,e,r),e.u8=t=>new h(1,t),e.u16=t=>new h(2,t),e.u24=t=>new h(3,t),e.u32=t=>new h(4,t),e.u40=t=>new h(5,t),e.u48=t=>new h(6,t),e.nu64=t=>new y(t),e.u16be=t=>new a(2,t),e.u24be=t=>new a(3,t),e.u32be=t=>new a(4,t),e.u40be=t=>new a(5,t),e.u48be=t=>new a(6,t),e.nu64be=t=>new g(t),e.s8=t=>new l(1,t),e.s16=t=>new l(2,t),e.s24=t=>new l(3,t),e.s32=t=>new l(4,t),e.s40=t=>new l(5,t),e.s48=t=>new l(6,t),e.ns64=t=>new m(t),e.s16be=t=>new c(2,t),e.s24be=t=>new c(3,t),e.s32be=t=>new c(4,t),e.s40be=t=>new c(5,t),e.s48be=t=>new c(6,t),e.ns64be=t=>new w(t),e.f32=t=>new b(t),e.f32be=t=>new v(t),e.f64=t=>new E(t),e.f64be=t=>new B(t),e.struct=(t,e,r)=>new M(t,e,r),e.bits=(t,e,r)=>new L(t,e,r),e.seq=(t,e,r)=>new x(t,e,r),e.union=(t,e,r)=>new _(t,e,r),e.unionLayoutDiscriminator=(t,e)=>new I(t,e),e.blob=(t,e)=>new T(t,e),e.cstr=t=>new k(t),e.utf8=(t,e)=>new P(t,e),e.const=(t,e)=>new N(t,e)},224561:function(t){"use strict";let e=/[\p{Lu}]/u,r=/[\p{Ll}]/u,n=/^[\p{Lu}](?![\p{Lu}])/gu,i=/([\p{Alpha}\p{N}_]|$)/u,o=/[_.\- ]+/,s=RegExp("^"+o.source),u=RegExp(o.source+i.source,"gu"),f=RegExp("\\d+"+i.source,"gu"),h=(t,n,i)=>{let o=!1,s=!1,u=!1;for(let f=0;f<t.length;f++){let h=t[f];o&&e.test(h)?(t=t.slice(0,f)+"-"+t.slice(f),o=!1,u=s,s=!0,f++):s&&u&&r.test(h)?(t=t.slice(0,f-1)+"-"+t.slice(f-1),u=s,s=!1,o=!0):(o=n(h)===h&&i(h)!==h,u=s,s=i(h)===h&&n(h)!==h)}return t},a=(t,e)=>(n.lastIndex=0,t.replace(n,t=>e(t))),l=(t,e)=>(u.lastIndex=0,f.lastIndex=0,t.replace(u,(t,r)=>e(r)).replace(f,t=>e(t))),c=(t,e)=>{if(!("string"==typeof t||Array.isArray(t)))throw TypeError("Expected the input to be `string | string[]`");if(e={pascalCase:!1,preserveConsecutiveUppercase:!1,...e},0===(t=Array.isArray(t)?t.map(t=>t.trim()).filter(t=>t.length).join("-"):t.trim()).length)return"";let r=!1===e.locale?t=>t.toLowerCase():t=>t.toLocaleLowerCase(e.locale),n=!1===e.locale?t=>t.toUpperCase():t=>t.toLocaleUpperCase(e.locale);return 1===t.length?e.pascalCase?n(t):r(t):(t!==r(t)&&(t=h(t,r,n)),t=t.replace(s,""),t=e.preserveConsecutiveUppercase?a(t,r):r(t),e.pascalCase&&(t=n(t.charAt(0))+t.slice(1)),l(t,n))};
1t.exports=c,t.exports.default=c},877625:function(t){"use strict";var e=Object.prototype.hasOwnProperty,r="~";function n(){}function i(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function o(t,e,n,o,s){if("function"!=typeof n)throw TypeError("The listener must be a function");var u=new i(n,o||t,s),f=r?r+e:e;return t._events[f]?t._events[f].fn?t._events[f]=[t._events[f],u]:t._events[f].push(u):(t._events[f]=u,t._eventsCount++),t}function s(t,e){0==--t._eventsCount?t._events=new n:delete t._events[e]}function u(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1)),u.prototype.eventNames=function(){var t,n,i=[];if(0===this._eventsCount)return i;for(n in t=this._events)e.call(t,n)&&i.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},u.prototype.listeners=function(t){var e=r?r+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,s=Array(o);i<o;i++)s[i]=n[i].fn;return s},u.prototype.listenerCount=function(t){var e=r?r+t:t,n=this._events[e];return n?n.fn?1:n.length:0},u.prototype.emit=function(t,e,n,i,o,s){var u=r?r+t:t;if(!this._events[u])return!1;var f,h,a=this._events[u],l=arguments.length;if(a.fn){switch(a.once&&this.removeListener(t,a.fn,void 0,!0),l){case 1:return a.fn.call(a.context),!0;case 2:return a.fn.call(a.context,e),!0;case 3:return a.fn.call(a.context,e,n),!0;case 4:return a.fn.call(a.context,e,n,i),!0;case 5:return a.fn.call(a.context,e,n,i,o),!0;case 6:return a.fn.call(a.context,e,n,i,o,s),!0}for(h=1,f=Array(l-1);h<l;h++)f[h-1]=arguments[h];a.fn.apply(a.context,f)}else{var c,p=a.length;for(h=0;h<p;h++)switch(a[h].once&&this.removeListener(t,a[h].fn,void 0,!0),l){case 1:a[h].fn.call(a[h].context);break;case 2:a[h].fn.call(a[h].context,e);break;case 3:a[h].fn.call(a[h].context,e,n);break;case 4:a[h].fn.call(a[h].context,e,n,i);break;default:if(!f)for(c=1,f=Array(l-1);c<l;c++)f[c-1]=arguments[c];a[h].fn.apply(a[h].context,f)}}return!0},u.prototype.on=function(t,e,r){return o(this,t,e,r,!1)},u.prototype.once=function(t,e,r){return o(this,t,e,r,!0)},u.prototype.removeListener=function(t,e,n,i){var o=r?r+t:t;if(!this._events[o])return this;if(!e)return s(this,o),this;var u=this._events[o];if(u.fn)u.fn!==e||i&&!u.once||n&&u.context!==n||s(this,o);else{for(var f=0,h=[],a=u.length;f<a;f++)(u[f].fn!==e||i&&!u[f].once||n&&u[f].context!==n)&&h.push(u[f]);h.length?this._events[o]=1===h.length?h[0]:h:s(this,o)}return this},u.prototype.removeAllListeners=function(t){var e;return t?(e=r?r+t:t,this._events[e]&&s(this,e)):(this._events=new n,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=r,u.EventEmitter=u,t.exports=u},369983:function(t,e,r){"use strict";let n=r(737213).v4,i=r(740789),o=function(t,e){if(!(this instanceof o))return new o(t,e);e||(e={}),this.options={reviver:void 0!==e.reviver?e.reviver:null,replacer:void 0!==e.replacer?e.replacer:null,generator:void 0!==e.generator?e.generator:function(){return n()},version:void 0!==e.version?e.version:2,notificationIdNull:"boolean"==typeof e.notificationIdNull&&e.notificationIdNull},this.callServer=t};t.exports=o,o.prototype.request=function(t,e,r,n){let o;let s=this,u=null,f=Array.isArray(t)&&"function"==typeof e;if(1===this.options.version&&f)throw TypeError("JSON-RPC 1.0 does not support batching");let h=!f&&t&&"object"==typeof t&&"function"==typeof e;if(f||h)n=e,u=t;else{"function"==typeof r&&(n=r,r=void 0);let o="function"==typeof n;try{u=i(t,e,r,{generator:this.options.generator,version:this.options.version,notificationIdNull:this.options.notificationIdNull})}catch(t){if(o)return n(t);throw t}if(!o)return u}try{o=JSON.stringify(u,this.options.replacer)}catch(t){return n(t)}return this.callServer(o,function(t,e){s._parseResponse(t,e,n)}),u},o.prototype._parseResponse=function(t,e,r){let n;if(t){r(t);return}if(!e)return r();try{n=JSON.parse(e,this.options.reviver)}catch(t){return r(t)}if(3===r.length){if(!Array.isArray(n))return r(null,n.error,n.result);{let t=function(t){return void 0!==t.error};return r(null,n.filter(t),n.filter(function(e){return!t(e)}))}}r(null,n)}},740789:function(t,e,r){"use strict";let n=r(737213).v4;t.exports=function(t,e,r,i){if("string"!=typeof t)throw TypeError(t+" must be a string");let o="number"==typeof(i=i||{}).version?i.version:2;if(1!==o&&2!==o)throw TypeError(o+" must be 1 or 2");let s={method:t};if(2===o&&(s.jsonrpc="2.0"),e){if("object"!=typeof e&&!Array.isArray(e))throw TypeError(e+" must be an object, array or omitted");s.params=e}if(void 0===r){let t="function"==typeof i.generator?i.generator:function(){return n()};s.id=t(s,i)}else 2===o&&null===r?i.notificationIdNull&&(s.id=null):s.id=r;return s}},737213:function(t,e,r){"use strict";r.d(e,{v4:function(){return h}});for(var n,i=new Uint8Array(16),o=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,s=[],u=0;u<256;++u)s.push((u+256).toString(16).substr(1));var f=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(s[t[e+0]]+s[t[e+1]]+s[t[e+2]]+s[t[e+3]]+"-"+s[t[e+4]]+s[t[e+5]]+"-"+s[t[e+6]]+s[t[e+7]]+"-"+s[t[e+8]]+s[t[e+9]]+"-"+s[t[e+10]]+s[t[e+11]]+s[t[e+12]]+s[t[e+13]]+s[t[e+14]]+s[t[e+15]]).toLowerCase();if(!("string"==typeof r&&o.test(r)))throw TypeError("Stringified UUID is invali
1d");return r},h=function(t,e,r){var o=(t=t||{}).random||(t.rng||function(){if(!n&&!(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(i)})();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e){r=r||0;for(var s=0;s<16;++s)e[r+s]=o[s];return e}return f(o)}},908413:function(t,e,r){"use strict";let n=r(959196),i=r(968848),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function s(t){if(t>2147483647)throw RangeError('The value "'+t+'" is invalid for option "size"');let e=new Uint8Array(t);return Object.setPrototypeOf(e,u.prototype),e}function u(t,e,r){if("number"==typeof t){if("string"==typeof e)throw TypeError('The "string" argument must be of type string. Received type number');return a(t)}return f(t,e,r)}function f(t,e,r){if("string"==typeof t)return function(t,e){if(("string"!=typeof e||""===e)&&(e="utf8"),!u.isEncoding(e))throw TypeError("Unknown encoding: "+e);let r=0|d(t,e),n=s(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(C(t,Uint8Array)){let e=new Uint8Array(t);return c(e.buffer,e.byteOffset,e.byteLength)}return l(t)}(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(C(t,ArrayBuffer)||t&&C(t.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(C(t,SharedArrayBuffer)||t&&C(t.buffer,SharedArrayBuffer)))return c(t,e,r);if("number"==typeof t)throw TypeError('The "value" argument must not be of type number. Received type number');let n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return u.from(n,e,r);let i=function(t){var e;if(u.isBuffer(t)){let e=0|p(t.length),r=s(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||(e=t.length)!=e?s(0):l(t):"Buffer"===t.type&&Array.isArray(t.data)?l(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return u.from(t[Symbol.toPrimitive]("string"),e,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function h(t){if("number"!=typeof t)throw TypeError('"size" argument must be of type number');if(t<0)throw RangeError('The value "'+t+'" is invalid for option "size"')}function a(t){return h(t),s(t<0?0:0|p(t))}function l(t){let e=t.length<0?0:0|p(t.length),r=s(e);for(let n=0;n<e;n+=1)r[n]=255&t[n];return r}function c(t,e,r){let n;if(e<0||t.byteLength<e)throw RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),u.prototype),n}function p(t){if(t>=2147483647)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|t}function d(t,e){if(u.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||C(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);let r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return k(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return P(t).length;default:if(i)return n?-1:k(t).length;e=(""+e).toLowerCase(),i=!0}}function y(t,e,r){let i=!1;if((void 0===e||e<0)&&(e=0),e>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(e>>>=0)))return"";for(t||(t="utf8");;)switch(t){case"hex":return function(t,e,r){let n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=e;n<r;++n)i+=F[t[n]];return i}(this,e,r);case"utf8":case"utf-8":return b(this,e,r);case"ascii":return function(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}(this,e,r);case"latin1":case"binary":return function(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}(this,e,r);case"base64":var o,s;return o=e,s=r,0===o&&s===this.length?n.fromByteArray(this):n.fromByteArray(this.slice(o,s));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(t,e,r){let n=t.slice(e,r),i="";for(let t=0;t<n.length-1;t+=2)i+=String.fromCharCode(n[t]+256*n[t+1]);return i}(this,e,r);default:if(i)throw TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}function g(t,e,r){let n=t[e];t[e]=t[r],t[r]=n}function m(t,e,r,n,i){var o;if(0===t.length)return -1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),(o=r=+r)!=o&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return -1;r=t.length-1}
vendor: 16,583 bytes, line 1
1else if(r<0){if(!i)return -1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:w(t,e,r,n,i);if("number"==typeof e)return(e&=255,"function"==typeof Uint8Array.prototype.indexOf)?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):w(t,[e],r,n,i);throw TypeError("val must be string, number or Buffer")}function w(t,e,r,n,i){let o,s=1,u=t.length,f=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return -1;s=2,u/=2,f/=2,r/=2}function h(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){let n=-1;for(o=r;o<u;o++)if(h(t,o)===h(e,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===f)return n*s}else -1!==n&&(o-=o-n),n=-1}else for(r+f>u&&(r=u-f),o=r;o>=0;o--){let r=!0;for(let n=0;n<f;n++)if(h(t,o+n)!==h(e,n)){r=!1;break}if(r)return o}return -1}function b(t,e,r){r=Math.min(t.length,r);let n=[],i=e;for(;i<r;){let e=t[i],o=null,s=e>239?4:e>223?3:e>191?2:1;if(i+s<=r){let r,n,u,f;switch(s){case 1:e<128&&(o=e);break;case 2:(192&(r=t[i+1]))==128&&(f=(31&e)<<6|63&r)>127&&(o=f);break;case 3:r=t[i+1],n=t[i+2],(192&r)==128&&(192&n)==128&&(f=(15&e)<<12|(63&r)<<6|63&n)>2047&&(f<55296||f>57343)&&(o=f);break;case 4:r=t[i+1],n=t[i+2],u=t[i+3],(192&r)==128&&(192&n)==128&&(192&u)==128&&(f=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&u)>65535&&f<1114112&&(o=f)}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(t){let e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);let r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=4096));return r}(n)}function v(t,e,r){if(t%1!=0||t<0)throw RangeError("offset is not uint");if(t+e>r)throw RangeError("Trying to access beyond buffer length")}function E(t,e,r,n,i,o){if(!u.isBuffer(t))throw TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw RangeError('"value" argument is out of bounds');if(r+n>t.length)throw RangeError("Index out of range")}function B(t,e,r,n,i){L(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,r}function x(t,e,r,n,i){L(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=s,s>>=8,t[r+2]=s,s>>=8,t[r+1]=s,s>>=8,t[r]=s,r+8}function M(t,e,r,n,i,o){if(r+n>t.length||r<0)throw RangeError("Index out of range")}function A(t,e,r,n,o){return e=+e,r>>>=0,o||M(t,e,r,4,34028234663852886e22,-34028234663852886e22),i.write(t,e,r,n,23,4),r+4}function I(t,e,r,n,o){return e=+e,r>>>=0,o||M(t,e,r,8,17976931348623157e292,-17976931348623157e292),i.write(t,e,r,n,52,8),r+8}e.lW=u,e.h2=50,u.TYPED_ARRAY_SUPPORT=function(){try{let t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(t,e,r){return f(t,e,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(t,e,r){return(h(t),t<=0)?s(t):void 0!==e?"string"==typeof r?s(t).fill(e,r):s(t).fill(e):s(t)},u.allocUnsafe=function(t){return a(t)},u.allocUnsafeSlow=function(t){return a(t)},u.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==u.prototype},u.compare=function(t,e){if(C(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),C(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(t)||!u.isBuffer(e))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let r=t.length,n=e.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){let r;if(!Array.isArray(t))throw TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);if(void 0===e)for(r=0,e=0;r<t.length;++r)e+=t[r].length;let n=u.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){let e=t[r];if(C(e,Uint8Array))i+e.length>n.length?(u.isBuffer(e)||(e=u.from(e)),e.copy(n,i)):Uint8Array.prototype.set.call(n,e,i);else if(u.isBuffer(e))e.copy(n,i);else throw TypeError('"list" argument must be an Array of Buffers');i+=e.length}return n},u.byteLength=d,u.prototype._isBuffer=!0,u.prototype.swap16=function(){let t=this.length;if(t%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)g(this,e,e+1);return this},u.prototype.swap32=function(){let t=this.length;if(t%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)g(this,e,e+3),g(this,e+1,e+2);return this},u.prototype.swap64=function(){let t=this.length;if(t%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)g(this,e,e+7),g(this,e+1,e+6),g(this,e+2,e+5),g(this,e+3,e+4);return this},u.prototype.toString=function(){let t=this.length;return 0===t?"":0==arguments.length?b(this,0,t):y.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(t){if(!u.isBuffer(t))throw TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){let t="",r=e.h2;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(t,e,r,n,i){if(C(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(t))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return -1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,i>>>=0,this===t)return 0;let o=i-n,s=r-e,f=Math.min(o,s),h=this.slice(n,i),a=t.slice(e,r);for(let t=0;t<f;++t)if(h[t]!==a[t]){o=h[t],s=a[t];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(t,e,r){return -1!==this.indexOf(t,e,r)},u.prototype.indexOf=function(t,e,r){return m(this,t,e,r,!0)},u.prototype.lastIndexOf=function(t,e,r){return m(this,t,e,r,!1)},u.prototype.write=function(t,e,r,n){var i,o,s,u,f,h,a,l;if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else if(isFinite(e))e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let c=this.length-e;if((void 0===r||r>c)&&(r=c),t.length>0&&(r<0||e<0)||e>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let p=!1;for(;;)switch(n){case"hex":return function(t,e,r,n){let i;r=Number(r)||0;let o=t.length-r;n?(n=Number(n))>o&&(n=o):n=o;let s=e.length;for(n>s/2&&(n=s/2),i=0;i<n;++i){let n=parseInt(e.substr(2*i,2),16);if(n!=n)break;t[r+i]=n}return i}(this,t,e,r);case"utf8":case"utf-8":return i=e,o=r,N(k(t,this.length-i),this,i,o);case"ascii":case"latin1":case"binary":return s=e,u=r,N(function(t){let e=[];for(let r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(t),this,s,u);case"base64":return f=e,h=r,N(P(t),this,f,h);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return a=e,l=r,N(function(t,e){let r,n;let i=[];for(let o=0;o<t.length&&!((e-=2)<0);++o)n=(r=t.charCodeAt(o))>>8,i.push(r%256),i.push(n);return i}(t,this.length-a),this,a,l);default:if(p)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),p=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},u.prototype.slice=function(t,e){let r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);let n=this.subarray(t,e);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUintLE=u.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||v(t,e,this.length);let n=this[t],i=1,o=0;for(;++o<e&&(i*=256);)n+=this[t+o]*i;return n},u.prototype.readUintBE=u.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||v(t,e,this.length);let n=this[t+--e],i=1;for(;e>0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(t,e){return t>>>=0,e||v(t,1,this.length),this[t]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(t,e){return t>>>=0,e||v(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(t,e){return t>>>=0,e||v(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(t,e){return t>>>=0,e||v(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(t,e){return t>>>=0,e||v(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readBigUInt64LE=j(function(t){O(t>>>=0,"offset");let e=this[t],r=this[t+7];(void 0===e||void 0===r)&&R(t,this.length-8);let n=e+256*this[++t]+65536*this[++t]+16777216*this[++t],i=this[++t]+256*this[++t]+65536*this[++t]+16777216*r;return BigInt(n)+(BigInt(i)<<BigInt(32))}),u.prototype.readBigUInt64BE=j(function(t){O(t>>>=0,"offset");let e=this[t],r=this[t+7];(void 0===e||void 0===r)&&R(t,this.length-8);let n=16777216*e+65536*this[++t]+256*this[++t]+this[++t],i=16777216*this[++t]+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)}),u.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||v(t,e,this.length);let n=this[t],i=1,o=0;for(;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||v(t,e,this.length);let n=e,i=1,o=this[t+--n];for(;n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return(t>>>=0,e||v(t,1,this.length),128&this[t])?-((255-this[t]+1)*1):this[t]},u.prototype.readInt16LE=function(t,e){t>>>=0,e||v(t,2,this.length);let r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){t>>>=0,e||v(t,2,this.length);let r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return t>>>=0,e||v(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return t>>>=0,e||v(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readBigInt64LE=j(function(t){O(t>>>=0,"offset");let e=this[t],r=this[t+7];return(void 0===e||void 0===r)&&R(t,this.length-8),(BigInt(this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24))<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+16777216*this[++t])}),u.prototype.readBigInt64BE=j(function(t){O(t>>>=0,"offset");let e=this[t],r=this[t+7];return(void 0===e||void 0===r)&&R(t,this.length-8),(BigInt((e<<24)+65536*this[++t]+256*this[++t]+this[++t])<<BigInt(32))+BigInt(16777216*this[++t]+65536*this[++t]+256*this[++t]+r)}),u.prototype.readFloatLE=function(t,e){return t>>>=0,e||v(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return t>>>=0,e||v(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return t>>>=0,e||v(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return t>>>=0,e||v(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){let n=Math.pow(2,8*r)-1;E(this,t,e,r,n,0)}let i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){let n=Math.pow(2,8*r)-1;E(this,t,e,r,n,0)}let i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||E(this,t,e,1,255,0),this[e]=255&t,e+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||E(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||E(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||E(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||E(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigUInt64LE=j(function(t,e=0){return B(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=j(function(t,e=0){return x(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){let n=Math.pow(2,8*r-1);E(this,t,e,r,n-1,-n)}let i=0,o=1,s=0;for(this[e]=255&t;++i<r&&(o*=256);)t<0&&0===s&&0!==this[e+i-1]&&(s=1),this[e+i]=(t/o>>0)-s&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){let n=Math.pow(2,8*r-1);E(this,t,e,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/o>>0)-s&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||E(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||E(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||E(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||E(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||E(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigInt64LE=j(function(t,e=0){return B(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=j(function(t,e=0){return x(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeFloatLE=function(t,e,r){return A(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return A(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return I(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return I(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(!u.isBuffer(t))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r||0===t.length||0===this.length)return 0;if(e<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);let i=n-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),i},u.prototype.fill=function(t,e,r,n){let i;if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===t.length){let e=t.charCodeAt(0);("utf8"===n&&e<128||"latin1"===n)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw RangeError("Out of range index");if(r<=e)return this;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{let o=u.isBuffer(t)?t:u.from(t,n),s=o.length;
1if(0===s)throw TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<r-e;++i)this[i+e]=o[i%s]}return this};let _={};function U(t,e,r){_[t]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function S(t){let e="",r=t.length,n="-"===t[0]?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function L(t,e,r,n,i,o){if(t>r||t<e){let n;let i="bigint"==typeof e?"n":"";throw n=o>3?0===e||e===BigInt(0)?`>= 0${i} and < 2${i} ** ${(o+1)*8}${i}`:`>= -(2${i} ** ${(o+1)*8-1}${i}) and < 2 ** ${(o+1)*8-1}${i}`:`>= ${e}${i} and <= ${r}${i}`,new _.ERR_OUT_OF_RANGE("value",n,t)}O(i,"offset"),(void 0===n[i]||void 0===n[i+o])&&R(i,n.length-(o+1))}function O(t,e){if("number"!=typeof t)throw new _.ERR_INVALID_ARG_TYPE(e,"number",t)}function R(t,e,r){if(Math.floor(t)!==t)throw O(t,r),new _.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new _.ERR_BUFFER_OUT_OF_BOUNDS;throw new _.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}U("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),U("ERR_INVALID_ARG_TYPE",function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`},TypeError),U("ERR_OUT_OF_RANGE",function(t,e,r){let n=`The value of "${t}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>4294967296?i=S(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=S(i)),i+="n"),n+=` It must be ${e}. Received ${i}`},RangeError);let T=/[^+/0-9A-Za-z-_]/g;function k(t,e){let r;e=e||1/0;let n=t.length,i=null,o=[];for(let s=0;s<n;++s){if((r=t.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319||s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return o}function P(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(T,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function N(t,e,r,n){let i;for(i=0;i<n&&!(i+r>=e.length)&&!(i>=t.length);++i)e[i+r]=t[i];return i}function C(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}let F=function(){let t="0123456789abcdef",e=Array(256);for(let r=0;r<16;++r){let n=16*r;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i]}return e}();function j(t){return"undefined"==typeof BigInt?q:t}function q(){throw Error("BigInt not supported")}},373306:function(t,e,r){var n=r(982957),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(t,e,r){if("number"==typeof t)throw TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw TypeError("Argument must be a number");return n.SlowBuffer(t)}},765768:function(t,e){"use strict";function r(t,e,r){return e<=t&&t<=r}function n(t){if(void 0===t)return{};if(t===Object(t))return t;throw TypeError("Could not convert argument to dictionary")}function i(t){this.tokens=[].slice.call(t)}function o(t,e){if(t)throw TypeError("Decoder error");return e||65533}
1i.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():-1},prepend:function(t){if(Array.isArray(t))for(;t.length;)this.tokens.unshift(t.pop());else this.tokens.unshift(t)},push:function(t){if(Array.isArray(t))for(;t.length;)this.tokens.push(t.shift());else this.tokens.push(t)}};var s="utf-8";function u(t,e){if(!(this instanceof u))return new u(t,e);if((t=void 0!==t?String(t).toLowerCase():s)!==s)throw Error("Encoding not supported. Only utf-8 is supported");e=n(e),this._streaming=!1,this._BOMseen=!1,this._decoder=null,this._fatal=!!e.fatal,this._ignoreBOM=!!e.ignoreBOM,Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this._fatal}),Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM})}function f(t,e){if(!(this instanceof f))return new f(t,e);if((t=void 0!==t?String(t).toLowerCase():s)!==s)throw Error("Encoding not supported. Only utf-8 is supported");e=n(e),this._streaming=!1,this._encoder=null,this._options={fatal:!!e.fatal},Object.defineProperty(this,"encoding",{value:"utf-8"})}function h(t){var e=t.fatal,n=0,i=0,s=0,u=128,f=191;this.handler=function(t,h){if(-1===h&&0!==s)return s=0,o(e);if(-1===h)return -1;if(0===s){if(r(h,0,127))return h;if(r(h,194,223))s=1,n=h-192;else if(r(h,224,239))224===h&&(u=160),237===h&&(f=159),s=2,n=h-224;else{if(!r(h,240,244))return o(e);240===h&&(u=144),244===h&&(f=143),s=3,n=h-240}return n<<=6*s,null}if(!r(h,u,f))return n=s=i=0,u=128,f=191,t.prepend(h),o(e);if(u=128,f=191,i+=1,n+=h-128<<6*(s-i),i!==s)return null;var a=n;return n=s=i=0,a}}function a(t){t.fatal,this.handler=function(t,e){if(-1===e)return -1;if(r(e,0,127))return e;r(e,128,2047)?(n=1,i=192):r(e,2048,65535)?(n=2,i=224):r(e,65536,1114111)&&(n=3,i=240);for(var n,i,o=[(e>>6*n)+i];n>0;){var s=e>>6*(n-1);o.push(128|63&s),n-=1}return o}}u.prototype={decode:function(t,e){r="object"==typeof t&&t instanceof ArrayBuffer?new Uint8Array(t):"object"==typeof t&&"buffer"in t&&t.buffer instanceof ArrayBuffer?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):new Uint8Array(0),e=n(e),this._streaming||(this._decoder=new h({fatal:this._fatal}),this._BOMseen=!1),this._streaming=!!e.stream;for(var r,o,s=new i(r),u=[];!s.endOfStream()&&-1!==(o=this._decoder.handler(s,s.read()));)null!==o&&(Array.isArray(o)?u.push.apply(u,o):u.push(o));if(!this._streaming){do{if(-1===(o=this._decoder.handler(s,s.read())))break;if(null===o)continue;Array.isArray(o)?u.push.apply(u,o):u.push(o)}while(!s.endOfStream());this._decoder=null}return!u.length||-1===["utf-8"].indexOf(this.encoding)||this._ignoreBOM||this._BOMseen||(65279===u[0]?(this._BOMseen=!0,u.shift()):this._BOMseen=!0),function(t){for(var e="",r=0;r<t.length;++r){var n=t[r];n<=65535?e+=String.fromCharCode(n):(n-=65536,e+=String.fromCharCode((n>>10)+55296,(1023&n)+56320))}return e}(u)}},f.prototype={encode:function(t,e){t=t?String(t):"",e=n(e),this._streaming||(this._encoder=new a(this._options)),this._streaming=!!e.stream;for(var r,o=[],s=new i(function(t){for(var e=String(t),r=e.length,n=0,i=[];n<r;){var o=e.charCodeAt(n);if(o<55296||o>57343)i.push(o);else if(56320<=o&&o<=57343)i.push(65533);else if(55296<=o&&o<=56319){if(n===r-1)i.push(65533);else{var s=t.charCodeAt(n+1);if(56320<=s&&s<=57343){var u=1023&o,f=1023&s;i.push(65536+(u<<10)+f),n+=1}else i.push(65533)}}n+=1}return i}(t));!s.endOfStream()&&-1!==(r=this._encoder.handler(s,s.read()));)Array.isArray(r)?o.push.apply(o,r):o.push(r);if(!this._streaming){for(;-1!==(r=this._encoder.handler(s,s.read()));)Array.isArray(r)?o.push.apply(o,r):o.push(r);this._encoder=null}return new Uint8Array(o)}},e.TextEncoder=f,e.TextDecoder=u},733024:function(t,e,r){"use strict";r.d(e,{D1:function(){return d},Kd:function(){return y},Mx:function(){return p}});var n=r(827665),i=r(81025);let o=BigInt(0),s=BigInt(1);function u(t,e){let r=e.negate();return t?r:e}function f(t,e){if(!Number.isSafeInteger(t)||t<=0||t>e)throw Error("invalid window size, expected [1.."+e+"], got W="+t)}function h(t,e){return f(t,e),{windows:Math.ceil(e/t)+1,windowSize:2**(t-1)}}let a=new WeakMap,l=new WeakMap;function c(t){return l.get(t)||1}function p(t,e){return{constTimeNegate:u,hasPrecomputes:t=>1!==c(t),unsafeLadder(e,r,n=t.ZERO){let i=e;for(;r>o;)r&s&&(n=n.add(i)),i=i.double(),r>>=s;return n},precomputeWindow(t,r){let{windows:n,windowSize:i}=h(r,e),o=[],s=t,u=s;for(let t=0;t<n;t++){u=s,o.push(u);for(let t=1;t<i;t++)u=u.add(s),o.push(u);s=u.double()}return o},wNAF(r,n,i){let{windows:o,windowSize:f}=h(r,e),a=t.ZERO,l=t.BASE,c=BigInt(2**r-1),p=2**r,d=BigInt(r);for(let t=0;t<o;t++){let e=t*f,r=Number(i&c);i>>=d,r>f&&(r-=p,i+=s);let o=e+Math.abs(r)-1,h=t%2!=0,y=r<0;0===r?l=l.add(u(h,n[e])):a=a.add(u(y,n[o]))}return{p:a,f:l}},wNAFUnsafe(r,n,i,u=t.ZERO){let{windows:f,windowSize:a}=h(r,e),l=BigInt(2**r-1),c=2**r,p=BigInt(r);for(let t=0;t<f;t++){let e=t*a;if(i===o)break;let r=Number(i&l);if(i>>=p,r>a&&(r-=c,i+=s),0===r)continue;let f=n[e+Math.abs(r)-1];r<0&&(f=f.negate()),u=u.add(f)}return u}
1,getPrecomputes(t,e,r){let n=a.get(e);return n||(n=this.precomputeWindow(e,t),1!==t&&a.set(e,r(n))),n},wNAFCached(t,e,r){let n=c(t);return this.wNAF(n,this.getPrecomputes(n,t,r),e)},wNAFCachedUnsafe(t,e,r,n){let i=c(t);return 1===i?this.unsafeLadder(t,e,n):this.wNAFUnsafe(i,this.getPrecomputes(i,t,r),e,n)},setWindowSize(t,r){f(r,e),l.set(t,r),a.delete(t)}}}function d(t,e,r,n){if(!function(t,e){if(!Array.isArray(t))throw Error("array expected");t.forEach((t,r)=>{if(!(t instanceof e))throw Error("invalid point at index "+r)})}(r,t),!function(t,e){if(!Array.isArray(t))throw Error("array of scalars expected");t.forEach((t,r)=>{if(!e.isValid(t))throw Error("invalid scalar at index "+r)})}(n,e),r.length!==n.length)throw Error("arrays of points and scalars must have equal length");let o=t.ZERO,s=(0,i.Dd)(BigInt(r.length)),u=s>12?s-3:s>4?s-2:s?2:1,f=(1<<u)-1,h=Array(f+1).fill(o),a=Math.floor((e.BITS-1)/u)*u,l=o;for(let t=a;t>=0;t-=u){h.fill(o);for(let e=0;e<n.length;e++){let i=Number(n[e]>>BigInt(t)&BigInt(f));h[i]=h[i].add(r[e])}let e=o;for(let t=h.length-1,r=o;t>0;t--)r=r.add(h[t]),e=e.add(r);if(l=l.add(e),0!==t)for(let t=0;t<u;t++)l=l.double()}return l}function y(t){return(0,n.OP)(t.Fp),(0,i.FF)(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,n.kK)(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}},827665:function(t,e,r){"use strict";r.d(e,{Eg:function(){return w},IN:function(){return b},OP:function(){return g},PS:function(){return x},Q:function(){return m},Tu:function(){return d},U_:function(){return p},Us:function(){return M},gN:function(){return E}
1,kK:function(){return v},oA:function(){return c},wQ:function(){return l}});var n=r(81025);let i=BigInt(0),o=BigInt(1),s=BigInt(2),u=BigInt(3),f=BigInt(4),h=BigInt(5),a=BigInt(8);function l(t,e){let r=t%e;return r>=i?r:e+r}function c(t,e,r){let n=t;for(;e-- >i;)n*=n,n%=r;return n}function p(t,e){if(t===i)throw Error("invert: expected non-zero number");if(e<=i)throw Error("invert: expected positive modulus, got "+e);let r=l(t,e),n=e,s=i,u=o,f=o,h=i;for(;r!==i;){let t=n/r,e=n%r,i=s-f*t,o=u-h*t;n=r,r=e,s=f,u=h,f=i,h=o}if(n!==o)throw Error("invert: does not exist");return l(s,e)}let d=(t,e)=>(l(t,e)&o)===o,y=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function g(t){let e=y.reduce((t,e)=>(t[e]="function",t),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});return(0,n.FF)(t,e)}function m(t,e,r){if(r<i)throw Error("invalid exponent, negatives unsupported");if(r===i)return t.ONE;if(r===o)return e;let n=t.ONE,s=e;for(;r>i;)r&o&&(n=t.mul(n,s)),s=t.sqr(s),r>>=o;return n}function w(t,e){let r=Array(e.length),n=e.reduce((e,n,i)=>t.is0(n)?e:(r[i]=e,t.mul(e,n)),t.ONE),i=t.inv(n);return e.reduceRight((e,n,i)=>t.is0(n)?e:(r[i]=t.mul(e,r[i]),t.mul(e,n)),i),r}function b(t){let e=(t-o)/s;return(t,r)=>t.pow(r,e)}function v(t,e){let r=void 0!==e?e:t.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function E(t,e,r=!1,c={}){let d;if(t<=i)throw Error("invalid field: expected ORDER > 0, got "+t);let{nBitLength:y,nByteLength:g}=v(t,e);if(g>2048)throw Error("invalid field: expected ORDER of <= 2048 bytes");let b=Object.freeze({ORDER:t,isLE:r,BITS:y,BYTES:g,MASK:(0,n.dQ)(y),ZERO:i,ONE:o,create:e=>l(e,t),isValid:e=>{if("bigint"!=typeof e)throw Error("invalid field element: expected bigint, got "+typeof e);return i<=e&&e<t},is0:t=>t===i,isOdd:t=>(t&o)===o,neg:e=>l(-e,t),eql:(t,e)=>t===e,sqr:e=>l(e*e,t),add:(e,r)=>l(e+r,t),sub:(e,r)=>l(e-r,t),mul:(e,r)=>l(e*r,t),pow:(t,e)=>m(b,t,e),div:(e,r)=>l(e*p(r,t),t),sqrN:t=>t*t,addN:(t,e)=>t+e,subN:(t,e)=>t-e,mulN:(t,e)=>t*e,inv:e=>p(e,t),sqrt:c.sqrt||(e=>(d||(d=function(t){if(t%f===u){let e=(t+o)/f;return function(t,r){let n=t.pow(r,e);if(!t.eql(t.sqr(n),r))throw Error("Cannot find square root");return n}}if(t%a===h){let e=(t-h)/a;return function(t,r){let n=t.mul(r,s),i=t.pow(n,e),o=t.mul(r,i),u=t.mul(t.mul(o,s),i),f=t.mul(o,t.sub(u,t.ONE));if(!t.eql(t.sqr(f),r))throw Error("Cannot find square root");return f}}return function(t){let e,r,n;let u=(t-o)/s;for(e=t-o,r=0;e%s===i;e/=s,r++);for(n=s;n<t&&function(t,e,r){if(e<i)throw Error("invalid exponent, negatives unsupported");if(r<=i)throw Error("invalid modulus");if(r===o)return i;let n=o;for(;e>i;)e&o&&(n=n*t%r),t=t*t%r,e>>=o;return n}(n,u,t)!==t-o;n++)if(n>1e3)throw Error("Cannot find square root: likely non-prime P");if(1===r){let e=(t+o)/f;return function(t,r){let n=t.pow(r,e);if(!t.eql(t.sqr(n),r))throw Error("Cannot find square root");return n}}let h=(e+o)/s;return function(t,i){if(t.pow(i,u)===t.neg(t.ONE))throw Error("Cannot find square root");let s=r,f=t.pow(t.mul(t.ONE,n),e),a=t.pow(i,h),l=t.pow(i,e);for(;!t.eql(l,t.ONE);){if(t.eql(l,t.ZERO))return t.ZERO;let e=1;for(let r=t.sqr(l);e<s&&!t.eql(r,t.ONE);e++)r=t.sqr(r);let r=t.pow(f,o<<BigInt(s-e-1));f=t.sqr(r),a=t.mul(a,r),l=t.mul(l,f),s=e}return a}}(t)}(t)),d(b,e))),invertBatch:t=>w(b,t),cmov:(t,e,r)=>r?e:t,toBytes:t=>r?(0,n.S5)(t,g):(0,n.tL)(t,g),fromBytes:t=>{if(t.length!==g)throw Error("Field.fromBytes: expected "+g+" bytes, got "+t.length);return r?(0,n.ty)(t):(0,n.bytesToNumberBE)(t)}});return Object.freeze(b)}function B(t){if("bigint"!=typeof t)throw Error("field order must be bigint");return Math.ceil(t.toString(2).length/8)}function x(t){let e=B(t);return e+Math.ceil(e/2)}function M(t,e,r=!1){let i=t.length,s=B(e),u=x(e);if(i<16||i<u||i>1024)throw Error("expected "+u+"-1024 bytes of input, got "+i);let f=l(r?(0,n.ty)(t):(0,n.bytesToNumberBE)(t),e-o)+o;return r?(0,n.S5)(f,s):(0,n.tL)(f,s)}},81025:function(t,e,r){"use strict";r.d(e,{Dd:function(){return I},EQ:function(){return k},FF:function(){return T},Fy:function(){return A},H9:function(){return P},H_:function(){return _},S5:function(){return b},Z2:function(){return M},_t:function(){return s},bytesToNumberBE:function(){return g},ci:function(){return a},dQ:function(){return U},eV:function(){return E},gk:function(){return u},hexToBytes:function(){return y},iY:function(){return B},n$:function(){return O},ql:function(){return v},tL:function(){return w},ty:function(){return m},uw:function(){return f},uz:function(){return l}});let n=BigInt(0),i=BigInt(1),o=BigInt(2);function s(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&"Uint8Array"===t.constructor.name}function u(t){if(!s(t))throw Error("Uint8Array expected")}function f(t,e){if("boolean"!=typeof e)throw Error(t+" boolean expected, got "+e)}let h=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function a(t){u(t);let e="";for(let r=0;r<t.length;r++)e+=h[t[r]];return e}function l(t){let e=t.toString(16);return 1&e.length?"0"+e:e}function c(t){if("string"!=typeof t)throw Error("hex string expected, got "+typeof t);return""===t?n:BigInt("0x"+t)}let p={_0:48,_9:57,A:65,F:70,a:97,f:102};function d(t){return t>=p._0&&t<=p._9?t-p._0:t>=p.A&&t<=p.F?t-(p.A-10):t>=p.a&&t<=p.f?t-(p.a-10):void 0}function y(t){if("string"!=typeof t)throw Error("hex string expected, got "+typeof t);let e=t.length,r=e/2;if(e%2)throw Error("hex string expected, got unpadded hex of length "+e);let n=new Uint8Array(r);for(let e=0,i=0;e<r;e++,i+=2){let r=d(t.charCodeAt(i)),o=d(t.charCodeAt(i+1));if(void 0===r||void 0===o)throw Error('hex string expected, got non-hex character "'+(t[i]+t[i+1])+'" at index '+i);n[e]=16*r+o}return n}function g(t){return c(a(t))}function m(t){return u(t),c(a(Uint8Array.from(t).reverse()))}function w(t,e){return y(t.toString(16).padStart(2*e,"0"))}function b(t,e){return w(t,e).reverse()}function v(t,e,r){let n;if("string"==typeof e)try{n=y(e)}catch(e){throw Error(t+" must be hex string or Uint8Array, cause: "+e)}else if(s(e))n=Uint8Array.from(e);else throw Error(t+" must be hex string or Uint8Array");let i=n.length;if("number"==typeof r&&i!==r)throw Error(t+" of length "+r+" expected, got "+i);return n}function E(...t){let e=0;for(let r=0;r<t.length;r++){let n=t[r];u(n),e+=n.length}let r=new Uint8Array(e);for(let e=0,n=0;e<t.length;e++){let i=t[e];r.set(i,n),n+=i.length}return r}function B(t){if("string"!=typeof t)throw Error("string expected");return new Uint8Array(new TextEncoder().encode(t))}let x=t=>"bigint"==typeof t&&n<=t;function M(t,e,r){return x(t)&&x(e)&&x(r)&&e<=t&&t<r}function A(t,e,r,n){if(!M(e,r,n))throw Error("expected valid "+t+": "+r+" <= n < "+n+", got "+e)}function I(t){let e;for(e=0;t>n;t>>=i,e+=1);return e}function _(t,e){return t>>BigInt(e)&i}let U=t=>(o<<BigInt(t-1))-i,S=t=>new Uint8Array(t),L=t=>Uint8Array.from(t);function O(t,e,r){if("number"!=typeof t||t<2)throw Error("hashLen must be a number");if("number"!=typeof e||e<2)throw Error("qByteLen must be a number");if("function"!=typeof r)throw Error("hmacFn must be a function");let n=S(t),i=S(t),o=0,s=()=>{n.fill(1),i.fill(0),o=0},u=(...t)=>r(i,n,...t),f=(t=S())=>{i=u(L([0]),t),n=u(),0!==t.length&&(i=u(L([1]),t),n=u())},h=()=>
1{if(o++>=1e3)throw Error("drbg: tried 1000 values");let t=0,r=[];for(;t<e;){let e=(n=u()).slice();r.push(e),t+=n.length}return E(...r)};return(t,e)=>{let r;for(s(),f(t);!(r=e(h()));)f();return s(),r}}let R={bigint:t=>"bigint"==typeof t,function:t=>"function"==typeof t,boolean:t=>"boolean"==typeof t,string:t=>"string"==typeof t,stringOrUint8Array:t=>"string"==typeof t||s(t),isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>"function"==typeof t&&Number.isSafeInteger(t.outputLen)};function T(t,e,r={}){let n=(e,r,n)=>{let i=R[r];if("function"!=typeof i)throw Error("invalid validator function");let o=t[e];if((!n||void 0!==o)&&!i(o,t))throw Error("param "+String(e)+" is invalid. Expected "+r+", got "+o)};for(let[t,r]of Object.entries(e))n(t,r,!1);for(let[t,e]of Object.entries(r))n(t,e,!0);return t}let k=()=>{throw Error("not implemented")};function P(t){let e=new WeakMap;return(r,...n)=>{let i=e.get(r);if(void 0!==i)return i;let o=t(r,...n);return e.set(r,o),o}}},232027:function(t,e,r){"use strict";r.d(e,{L4:function(){return w},e4:function(){return m},su:function(){return g}});var n=r(733024),i=r(827665),o=r(81025);function s(t){void 0!==t.lowS&&(0,o.uw)("lowS",t.lowS),void 0!==t.prehash&&(0,o.uw)("prehash",t.prehash)}let{bytesToNumberBE:u,hexToBytes:f}=o;
1class h extends Error{constructor(t=""){super(t)}}let a={Err:h,_tlv:{encode:(t,e)=>{let{Err:r}=a;if(t<0||t>256)throw new r("tlv.encode: wrong tag");if(1&e.length)throw new r("tlv.encode: unpadded data");let n=e.length/2,i=o.uz(n);if(i.length/2&128)throw new r("tlv.encode: long form length too big");let s=n>127?o.uz(i.length/2|128):"";return o.uz(t)+s+i+e},decode(t,e){let{Err:r}=a,n=0;if(t<0||t>256)throw new r("tlv.encode: wrong tag");if(e.length<2||e[n++]!==t)throw new r("tlv.decode: wrong tlv");let i=e[n++],o=0;if(128&i){let t=127&i;if(!t)throw new r("tlv.decode(long): indefinite length not supported");if(t>4)throw new r("tlv.decode(long): byte length is too big");let s=e.subarray(n,n+t);if(s.length!==t)throw new r("tlv.decode: length bytes not complete");if(0===s[0])throw new r("tlv.decode(long): zero leftmost byte");for(let t of s)o=o<<8|t;if(n+=t,o<128)throw new r("tlv.decode(long): not minimal encoding")}else o=i;let s=e.subarray(n,n+o);if(s.length!==o)throw new r("tlv.decode: wrong value length");return{v:s,l:e.subarray(n+o)}}},_int:{encode(t){let{Err:e}=a;if(t<l)throw new e("integer: negative integers are not allowed");let r=o.uz(t);if(8&Number.parseInt(r[0],16)&&(r="00"+r),1&r.length)throw new e("unexpected DER parsing assertion: unpadded hex");return r},decode(t){let{Err:e}=a;if(128&t[0])throw new e("invalid signature integer: negative");if(0===t[0]&&!(128&t[1]))throw new e("invalid signature integer: unnecessary leading zero");return u(t)}},toSig(t){let{Err:e,_int:r,_tlv:n}=a,i="string"==typeof t?f(t):t;o.gk(i);let{v:s,l:u}=n.decode(48,i);if(u.length)throw new e("invalid signature: left bytes after parsing");let{v:h,l:l}=n.decode(2,s),{v:c,l:p}=n.decode(2,l);if(p.length)throw new e("invalid signature: left bytes after parsing");return{r:r.decode(h),s:r.decode(c)}},hexFromSig(t){let{_tlv:e,_int:r}=a,n=e.encode(2,r.encode(t.r)),i=e.encode(2,r.encode(t.s));return e.encode(48,n+i)}},l=BigInt(0),c=BigInt(1),p=BigInt(2),d=BigInt(3),y=BigInt(4);function g(t){let e=function(t){let e=(0,n.Kd)(t);o.FF(e,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});let{endo:r,Fp:i,a:s}=e;if(r){if(!i.eql(s,i.ZERO))throw Error("invalid endomorphism, can only be defined for Koblitz curves that have a=0");if("object"!=typeof r||"bigint"!=typeof r.beta||"function"!=typeof r.splitScalar)throw Error("invalid endomorphism, expected beta: bigint and splitScalar: function")}return Object.freeze({...e})}(t),{Fp:r}=e,s=(0,i.gN)(e.n,e.nBitLength),u=e.toBytes||((t,e,n)=>{let i=e.toAffine();return o.eV(Uint8Array.from([4]),r.toBytes(i.x),r.toBytes(i.y))}),f=e.fromBytes||(t=>{let e=t.subarray(1);return{x:r.fromBytes(e.subarray(0,r.BYTES)),y:r.fromBytes(e.subarray(r.BYTES,2*r.BYTES))}});function h(t){let{a:n,b:i}=e,o=r.sqr(t),s=r.mul(o,t);return r.add(r.add(s,r.mul(t,n)),i)}if(!r.eql(r.sqr(e.Gy),h(e.Gx)))throw Error("bad generator point: equation left != right");function a(t){let r;let{allowedPrivateKeyLengths:n,nByteLength:s,wrapPrivateKey:u,n:f}=e;if(n&&"bigint"!=typeof t){if(o._t(t)&&(t=o.ci(t)),"string"!=typeof t||!n.includes(t.length))throw Error("invalid private key");t=t.padStart(2*s,"0")}try{r="bigint"==typeof t?t:o.bytesToNumberBE((0,o.ql)("private key",t,s))}catch(e){throw Error("invalid private key, expected hex or "+s+" bytes, got "+typeof t)}return u&&(r=(0,i.wQ)(r,f)),o.Fy("private key",r,c,f),r}function p(t){if(!(t instanceof m))throw Error("ProjectivePoint expected")}let y=(0,o.H9)((t,e)=>{let{px:n,py:i,pz:o}=t;if(r.eql(o,r.ONE))return{x:n,y:i};let s=t.is0();null==e&&(e=s?r.ONE:r.inv(o));let u=r.mul(n,e),f=r.mul(i,e),h=r.mul(o,e);if(s)return{x:r.ZERO,y:r.ZERO};if(!r.eql(h,r.ONE))throw Error("invZ was invalid");return{x:u,y:f}}),g=(0,o.H9)(t=>{if(t.is0()){if(e.allowInfinityPoint&&!r.is0(t.py))return;throw Error("bad point: ZERO")}let{x:n,y:i}=t.toAffine();if(!r.isValid(n)||!r.isValid(i))throw Error("bad point: x or y not FE");let o=r.sqr(i),s=h(n);if(!r.eql(o,s))throw Error("bad point: equation left != right");
1if(!t.isTorsionFree())throw Error("bad point: not in prime-order subgroup");return!0});class m{constructor(t,e,n){if(this.px=t,this.py=e,this.pz=n,null==t||!r.isValid(t))throw Error("x required");if(null==e||!r.isValid(e))throw Error("y required");if(null==n||!r.isValid(n))throw Error("z required");Object.freeze(this)}static fromAffine(t){let{x:e,y:n}=t||{};if(!t||!r.isValid(e)||!r.isValid(n))throw Error("invalid affine point");if(t instanceof m)throw Error("projective point not allowed");let i=t=>r.eql(t,r.ZERO);return i(e)&&i(n)?m.ZERO:new m(e,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(t){let e=r.invertBatch(t.map(t=>t.pz));return t.map((t,r)=>t.toAffine(e[r])).map(m.fromAffine)}static fromHex(t){let e=m.fromAffine(f((0,o.ql)("pointHex",t)));return e.assertValidity(),e}static fromPrivateKey(t){return m.BASE.multiply(a(t))}static msm(t,e){return(0,n.D1)(m,s,t,e)}_setWindowSize(t){b.setWindowSize(this,t)}assertValidity(){g(this)}hasEvenY(){let{y:t}=this.toAffine();if(r.isOdd)return!r.isOdd(t);throw Error("Field doesn't support isOdd")}equals(t){p(t);let{px:e,py:n,pz:i}=this,{px:o,py:s,pz:u}=t,f=r.eql(r.mul(e,u),r.mul(o,i)),h=r.eql(r.mul(n,u),r.mul(s,i));return f&&h}negate(){return new m(this.px,r.neg(this.py),this.pz)}double(){let{a:t,b:n}=e,i=r.mul(n,d),{px:o,py:s,pz:u}=this,f=r.ZERO,h=r.ZERO,a=r.ZERO,l=r.mul(o,o),c=r.mul(s,s),p=r.mul(u,u),y=r.mul(o,s);return y=r.add(y,y),a=r.mul(o,u),a=r.add(a,a),f=r.mul(t,a),h=r.mul(i,p),h=r.add(f,h),f=r.sub(c,h),h=r.add(c,h),h=r.mul(f,h),f=r.mul(y,f),a=r.mul(i,a),p=r.mul(t,p),y=r.sub(l,p),y=r.mul(t,y),y=r.add(y,a),a=r.add(l,l),l=r.add(a,l),l=r.add(l,p),l=r.mul(l,y),h=r.add(h,l),p=r.mul(s,u),p=r.add(p,p),l=r.mul(p,y),f=r.sub(f,l),a=r.mul(p,c),a=r.add(a,a),new m(f,h,a=r.add(a,a))}add(t){p(t);let{px:n,py:i,pz:o}=this,{px:s,py:u,pz:f}=t,h=r.ZERO,a=r.ZERO,l=r.ZERO,c=e.a,y=r.mul(e.b,d),g=r.mul(n,s),w=r.mul(i,u),b=r.mul(o,f),v=r.add(n,i),E=r.add(s,u);v=r.mul(v,E),E=r.add(g,w),v=r.sub(v,E),E=r.add(n,o);let B=r.add(s,f);return E=r.mul(E,B),B=r.add(g,b),E=r.sub(E,B),B=r.add(i,o),h=r.add(u,f),B=r.mul(B,h),h=r.add(w,b),B=r.sub(B,h),l=r.mul(c,E),h=r.mul(y,b),l=r.add(h,l),h=r.sub(w,l),l=r.add(w,l),a=r.mul(h,l),w=r.add(g,g),w=r.add(w,g),b=r.mul(c,b),E=r.mul(y,E),w=r.add(w,b),b=r.sub(g,b),b=r.mul(c,b),E=r.add(E,b),g=r.mul(w,E),a=r.add(a,g),g=r.mul(B,E),h=r.mul(v,h),h=r.sub(h,g),g=r.mul(v,w),l=r.mul(B,l),new m(h,a,l=r.add(l,g))}subtract(t){return this.add(t.negate())}is0(){return this.equals(m.ZERO)}wNAF(t){return b.wNAFCached(this,t,m.normalizeZ)}multiplyUnsafe(t){let{endo:n,n:i}=e;o.Fy("scalar",t,l,i);let s=m.ZERO;if(t===l)return s;if(this.is0()||t===c)return this;if(!n||b.hasPrecomputes(this))return b.wNAFCachedUnsafe(this,t,m.normalizeZ);let{k1neg:u,k1:f,k2neg:h,k2:a}=n.splitScalar(t),p=s,d=s,y=this;for(;f>l||a>l;)f&c&&(p=p.add(y)),a&c&&(d=d.add(y)),y=y.double(),f>>=c,a>>=c;return u&&(p=p.negate()),h&&(d=d.negate()),d=new m(r.mul(d.px,n.beta),d.py,d.pz),p.add(d)}multiply(t){let n,i;let{endo:s,n:u}=e;if(o.Fy("scalar",t,c,u),s){let{k1neg:e,k1:o,k2neg:u,k2:f}=s.splitScalar(t),{p:h,f:a}=this.wNAF(o),{p:l,f:c}=this.wNAF(f);h=b.constTimeNegate(e,h),l=b.constTimeNegate(u,l),l=new m(r.mul(l.px,s.beta),l.py,l.pz),n=h.add(l),i=a.add(c)}else{let{p:e,f:r}=this.wNAF(t);n=e,i=r}return m.normalizeZ([n,i])[0]}multiplyAndAddUnsafe(t,e,r){let n=m.BASE,i=(t,e)=>e!==l&&e!==c&&t.equals(n)?t.multiply(e):t.multiplyUnsafe(e),o=i(this,e).add(i(t,r));return o.is0()?void 0:o}toAffine(t){return y(this,t)}isTorsionFree(){let{h:t,isTorsionFree:r}=e;if(t===c)return!0;if(r)return r(m,this);throw Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h:t,clearCofactor:r}=e;return t===c?this:r?r(m,this):this.multiplyUnsafe(e.h)}toRawBytes(t=!0){return(0,o.uw)("isCompressed",t),this.assertValidity(),u(m,this,t)}toHex(t=!0){return(0,o.uw)("isCompressed",t),o.ci(this.toRawBytes(t))}}m.BASE=new m(e.Gx,e.Gy,r.ONE),m.ZERO=new m(r.ZERO,r.ONE,r.ZERO);let w=e.nBitLength,b=(0,n.Mx)(m,e.endo?Math.ceil(w/2):w);return{CURVE:e,ProjectivePoint:m,normPrivateKeyToScalar:a,weierstrassEquation:h,isWithinCurveOrder:function(t){return o.Z2(t,c,e.n)}}}function m(t){let e=function(t){let e=(0,n.Kd)(t);return o.FF(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}(t),{Fp:r,n:u}=e,f=r.BYTES+1,h=2*r.BYTES+1;function p(t){return(0,i.wQ)(t,u)}function d(t){return(0,i.U_)(t,u)}let{ProjectivePoint:y,normPrivateKeyToScalar:m,weierstrassEquation:w,isWithinCurveOrder:b}=g({...e,toBytes(t,e,n){let i=e.toAffine(),s=r.toBytes(i.x),u=o.eV;return((0,o.uw)("isCompressed",n),n)?u(Uint8Array.from([e.hasEvenY()?2:3]),s):u(Uint8Array.from([4]),s,r.toBytes(i.y))},fromBytes(t){let e=t.length,n=t[0],i=t.subarray(1);if(e===f&&(2===n||3===n)){let t;let e=o.bytesToNumberBE(i);if(!o.Z2(e,c,r.ORDER))throw Error("Point is not on curve");let s=w(e);try{t=r.sqrt(s)}catch(t){throw Error("Point is not on curve"+(t instanceof Error?": "+t.message:""))}return(1&n)==1!=((t&c)===c)&&(t=r.neg(t)),{x:e,y:t}}if(e===h&&4===n)return{x:r.fromBytes(i.subarray(0,r.BYTES)),y:r.fromBytes(i.subarray(r.BYTES,2*r.BYTES))};throw Error("invalid Point, expected length of "+f+", or uncompressed "+h+", got "+e)}}),v=t=>o.ci(o.tL(t,e.nByteLength)),E=(t,e,r)=>o.bytesToNumberBE(t.slice(e,r));class B{constructor(t,e,r){this.r=t,this.s=e,this.recovery=r,this.assertValidity()}static fromCompact(t){let r=e.nByteLength;return new B(E(t=(0,o.ql)("compactSignature",t,2*r),0,r),E(t,r,2*r))}
1static fromDER(t){let{r:e,s:r}=a.toSig((0,o.ql)("DER",t));return new B(e,r)}assertValidity(){o.Fy("r",this.r,c,u),o.Fy("s",this.s,c,u)}addRecoveryBit(t){return new B(this.r,this.s,t)}recoverPublicKey(t){let{r:n,s:i,recovery:s}=this,u=A((0,o.ql)("msgHash",t));if(null==s||![0,1,2,3].includes(s))throw Error("recovery id invalid");let f=2===s||3===s?n+e.n:n;if(f>=r.ORDER)throw Error("recovery id 2 or 3 invalid");let h=(1&s)==0?"02":"03",a=y.fromHex(h+v(f)),l=d(f),c=p(-u*l),g=p(i*l),m=y.BASE.multiplyAndAddUnsafe(a,c,g);if(!m)throw Error("point at infinify");return m.assertValidity(),m}hasHighS(){return this.s>u>>c}normalizeS(){return this.hasHighS()?new B(this.r,p(-this.s),this.recovery):this}toDERRawBytes(){return o.hexToBytes(this.toDERHex())}toDERHex(){return a.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return o.hexToBytes(this.toCompactHex())}toCompactHex(){return v(this.r)+v(this.s)}}function x(t){let e=o._t(t),r="string"==typeof t,n=(e||r)&&t.length;return e?n===f||n===h:r?n===2*f||n===2*h:t instanceof y}let M=e.bits2int||function(t){if(t.length>8192)throw Error("input is too large");let r=o.bytesToNumberBE(t),n=8*t.length-e.nBitLength;return n>0?r>>BigInt(n):r},A=e.bits2int_modN||function(t){return p(M(t))},I=o.dQ(e.nBitLength);function _(t){return o.Fy("num < 2^"+e.nBitLength,t,l,I),o.tL(t,e.nByteLength)}let U={lowS:e.lowS,prehash:!1},S={lowS:e.lowS,prehash:!1};return y.BASE._setWindowSize(8),{CURVE:e,getPublicKey:function(t,e=!0){return y.fromPrivateKey(t).toRawBytes(e)},getSharedSecret:function(t,e,r=!0){if(x(t))throw Error("first arg must be private key");if(!x(e))throw Error("second arg must be public key");return y.fromHex(e).multiply(m(t)).toRawBytes(r)},sign:function(t,n,i=U){let{seed:f,k2sig:h}=function(t,n,i=U){if(["recovered","canonical"].some(t=>t in i))throw Error("sign() legacy options not supported");let{hash:f,randomBytes:h}=e,{lowS:a,prehash:g,extraEntropy:w}=i;null==a&&(a=!0),t=(0,o.ql)("msgHash",t),s(i),g&&(t=(0,o.ql)("prehashed msgHash",f(t)));let v=A(t),E=m(n),x=[_(E),_(v)];if(null!=w&&!1!==w){let t=!0===w?h(r.BYTES):w;x.push((0,o.ql)("extraEntropy",t))}return{seed:o.eV(...x),k2sig:function(t){let e=M(t);if(!b(e))return;let r=d(e),n=y.BASE.multiply(e).toAffine(),i=p(n.x);if(i===l)return;let o=p(r*p(v+i*E));if(o===l)return;let s=(n.x===i?0:2)|Number(n.y&c),f=o;if(a&&o>u>>c)f=o>u>>c?p(-o):o,s^=1;return new B(i,f,s)}}}(t,n,i);return o.n$(e.hash.outputLen,e.nByteLength,e.hmac)(f,h)},verify:function(t,r,n,i=S){let u,f;r=(0,o.ql)("msgHash",r),n=(0,o.ql)("publicKey",n);let{lowS:h,prehash:l,format:c}=i;
1if(s(i),"strict"in i)throw Error("options.strict was renamed to lowS");if(void 0!==c&&"compact"!==c&&"der"!==c)throw Error("format must be compact or der");let g="string"==typeof t||o._t(t),m=!g&&!c&&"object"==typeof t&&null!==t&&"bigint"==typeof t.r&&"bigint"==typeof t.s;if(!g&&!m)throw Error("invalid signature, expected Uint8Array, hex string or Signature instance");try{if(m&&(f=new B(t.r,t.s)),g){try{"compact"!==c&&(f=B.fromDER(t))}catch(t){if(!(t instanceof a.Err))throw t}f||"der"===c||(f=B.fromCompact(t))}u=y.fromHex(n)}catch(t){return!1}if(!f||h&&f.hasHighS())return!1;l&&(r=e.hash(r));let{r:w,s:b}=f,v=A(r),E=d(b),x=p(v*E),M=p(w*E),I=y.BASE.multiplyAndAddUnsafe(u,x,M)?.toAffine();return!!I&&p(I.x)===w},ProjectivePoint:y,Signature:B,utils:{isValidPrivateKey(t){try{return m(t),!0}catch(t){return!1}},normPrivateKeyToScalar:m,randomPrivateKey:()=>{let t=(0,i.PS)(e.n);return(0,i.Us)(e.randomBytes(t),e.n)},precompute:(t=8,e=y.BASE)=>(e._setWindowSize(t),e.multiply(BigInt(3)),e)}}}function w(t,e){if((0,i.OP)(t),!t.isValid(e.A)||!t.isValid(e.B)||!t.isValid(e.Z))throw Error("mapToCurveSimpleSWU: invalid opts");let r=function(t,e){let r=t.ORDER,n=l;for(let t=r-c;t%p===l;t/=p)n+=c;let i=n,o=p<<i-c-c,s=o*p,u=(r-c)/s,f=(u-c)/p,h=s-c,a=t.pow(e,u),g=t.pow(e,(u+c)/p),m=(e,r)=>{let n=a,s=t.pow(r,h),u=t.sqr(s);u=t.mul(u,r);let l=t.mul(e,u);l=t.pow(l,f),l=t.mul(l,s),s=t.mul(l,r),u=t.mul(l,e);let d=t.mul(u,s);l=t.pow(d,o);let y=t.eql(l,t.ONE);s=t.mul(u,g),l=t.mul(d,n),u=t.cmov(s,u,y),d=t.cmov(l,d,y);for(let e=i;e>c;e--){let r=e-p;r=p<<r-c;let i=t.pow(d,r),o=t.eql(i,t.ONE);s=t.mul(u,n),n=t.mul(n,n),i=t.mul(d,n),u=t.cmov(s,u,o),d=t.cmov(i,d,o)}return{isValid:y,value:u}};if(t.ORDER%y===d){let r=(t.ORDER-d)/y,n=t.sqrt(t.neg(e));m=(e,i)=>{let o=t.sqr(i),s=t.mul(e,i);o=t.mul(o,s);let u=t.pow(o,r);u=t.mul(u,s);let f=t.mul(u,n),h=t.mul(t.sqr(u),i),a=t.eql(h,e),l=t.cmov(f,u,a);return{isValid:a,value:l}}}return m}(t,e.Z);if(!t.isOdd)throw Error("Fp.isOdd is not implemented!");return n=>{let i,o,s,u,f,h,a,l;i=t.sqr(n),i=t.mul(i,e.Z),o=t.sqr(i),o=t.add(o,i),s=t.add(o,t.ONE),s=t.mul(s,e.B),u=t.cmov(e.Z,t.neg(o),!t.eql(o,t.ZERO)),u=t.mul(u,e.A),o=t.sqr(s),h=t.sqr(u),f=t.mul(h,e.A),o=t.add(o,f),o=t.mul(o,s),h=t.mul(h,u),f=t.mul(h,e.B),o=t.add(o,f),a=t.mul(i,s);let{isValid:c,value:p}=r(o,h);l=t.mul(i,n),l=t.mul(l,p),a=t.cmov(a,s,c),l=t.cmov(l,p,c);let d=t.isOdd(n)===t.isOdd(l);return l=t.cmov(t.neg(l),l,d),{x:a=t.div(a,u),y:l}}}},61857:function(t,e,r){"use strict";r.d(e,{UN:function(){return S}});var n=r(288577),i=r(116177),o=r(225884);let[s,u]=i.ZP.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","0xf40e3585
15771202a","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(t=>BigInt(t))),f=new Uint32Array(80),h=new Uint32Array(80);class a extends n.VR{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(){let{Ah:t,Al:e,Bh:r,Bl:n,Ch:i,Cl:o,Dh:s,Dl:u,Eh:f,El:h,Fh:a,Fl:l,Gh:c,Gl:p,Hh:d,Hl:y}=this;return[t,e,r,n,i,o,s,u,f,h,a,l,c,p,d,y]}set(t,e,r,n,i,o,s,u,f,h,a,l,c,p,d,y){this.Ah=0|t,this.Al=0|e,this.Bh=0|r,this.Bl=0|n,this.Ch=0|i,this.Cl=0|o,this.Dh=0|s,this.Dl=0|u,this.Eh=0|f,this.El=0|h,this.Fh=0|a,this.Fl=0|l,this.Gh=0|c,this.Gl=0|p,this.Hh=0|d,this.Hl=0|y}process(t,e){for(let r=0;r<16;r++,e+=4)f[r]=t.getUint32(e),h[r]=t.getUint32(e+=4);for(let t=16;t<80;t++){let e=0|f[t-15],r=0|h[t-15],n=i.ZP.rotrSH(e,r,1)^i.ZP.rotrSH(e,r,8)^i.ZP.shrSH(e,r,7),o=i.ZP.rotrSL(e,r,1)^i.ZP.rotrSL(e,r,8)^i.ZP.shrSL(e,r,7),s=0|f[t-2],u=0|h[t-2],a=i.ZP.rotrSH(s,u,19)^i.ZP.rotrBH(s,u,61)^i.ZP.shrSH(s,u,6),l=i.ZP.rotrSL(s,u,19)^i.ZP.rotrBL(s,u,61)^i.ZP.shrSL(s,u,6),c=i.ZP.add4L(o,l,h[t-7],h[t-16]),p=i.ZP.add4H(c,n,a,f[t-7],f[t-16]);f[t]=0|p,h[t]=0|c}let{Ah:r,Al:n,Bh:o,Bl:a,Ch:l,Cl:c,Dh:p,Dl:d,Eh:y,El:g,Fh:m,Fl:w,Gh:b,Gl:v,Hh:E,Hl:B}=this;for(let t=0;t<80;t++){let e=i.ZP.rotrSH(y,g,14)^i.ZP.rotrSH(y,g,18)^i.ZP.rotrBH(y,g,41),x=i.ZP.rotrSL(y,g,14)^i.ZP.rotrSL(y,g,18)^i.ZP.rotrBL(y,g,41),M=y&m^~y&b,A=g&w^~g&v,I=i.ZP.add5L(B,x,A,u[t],h[t]),_=i.ZP.add5H(I,E,e,M,s[t],f[t]),U=0|I,S=i.ZP.rotrSH(r,n,28)^i.ZP.rotrBH(r,n,34)^i.ZP.rotrBH(r,n,39),L=i.ZP.rotrSL(r,n,28)^i.ZP.rotrBL(r,n,34)^i.ZP.rotrBL(r,n,39),O=r&o^r&l^o&l,R=n&a^n&c^a&c;E=0|b,B=0|v,b=0|m,v=0|w,m=0|y,w=0|g,({h:y,l:g}=i.ZP.add(0|p,0|d,0|_,0|U)),p=0|l,d=0|c,l=0|o,c=0|a,o=0|r,a=0|n;let T=i.ZP.add3L(U,L,R);r=i.ZP.add3H(T,_,S,O),n=0|T}({h:r,l:n}=i.ZP.add(0|this.Ah,0|this.Al,0|r,0|n)),({h:o,l:a}=i.ZP.add(0|this.Bh,0|this.Bl,0|o,0|a)),({h:l,l:c}=i.ZP.add(0|this.Ch,0|this.Cl,0|l,0|c)),({h:p,l:d}=i.ZP.add(0|this.Dh,0|this.Dl,0|p,0|d)),({h:y,l:g}=i.ZP.add(0|this.Eh,0|this.El,0|y,0|g)),({h:m,l:w}=i.ZP.add(0|this.Fh,0|this.Fl,0|m,0|w)),({h:b,l:v}=i.ZP.add(0|this.Gh,0|this.Gl,0|b,0|v)),({h:E,l:B}=i.ZP.add(0|this.Hh,0|this.Hl,0|E,0|B)),this.set(r,n,o,a,l,c,p,d,y,g,m,w,b,v,E,B)}roundClean(){f.fill(0),h.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)}}let l=(0,o.hE)(()=>new a);var c=r(733024),p=r(827665),d=r(81025);let y=BigInt(0),g=BigInt(1),m=BigInt(2),w=BigInt(8),b={zip215:!0},v=BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),E=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752"),B=BigInt(0),x=BigInt(1),M=BigInt(2);BigInt(3);let A=BigInt(5),I=BigInt(8);function _(t,e){let r=(0,p.wQ)(e*e*e,v),n=function(t){let e=BigInt(10),r=BigInt(20),n=BigInt(40),i=BigInt(80),o=t*t%v*t%v,s=(0,p.oA)(o,M,v)*o%v,u=(0,p.oA)(s,x,v)*t%v,f=(0,p.oA)(u,A,v)*u%v,h=(0,p.oA)(f,e,v)*f%v,a=(0,p.oA)(h,r,v)*h%v,l=(0,p.oA)(a,n,v)*a%v,c=(0,p.oA)(l,i,v)*l%v,d=(0,p.oA)(c,i,v)*l%v,y=(0,p.oA)(d,e,v)*f%v;return{pow_p_5_8:(0,p.oA)(y,M,v)*t%v,b2:o}}(t*(0,p.wQ)(r*r*e,v)).pow_p_5_8,i=(0,p.wQ)(t*r*n,v),o=(0,p.wQ)(e*i*i,v),s=i,u=(0,p.wQ)(i*E,v),f=o===t,h=o===(0,p.wQ)(-t,v),a=o===(0,p.wQ)(-t*E,v);return f&&(i=s),(h||a)&&(i=u),(0,p.Tu)(i,v)&&(i=(0,p.wQ)(-i,v)),{isValid:f||h,value:i}}let U=(0,p.gN)(v,void 0,!0),S=function(t){let e=function(t){let e=(0,c.Kd)(t);return d.FF(t,{hash:"function",a:"bigint",d:"bigint",randomBytes:"function"},{adjustScalarBytes:"function",domain:"function",uvRatio:"function",mapToCurve:"function"}),Object.freeze({...e})}(t),{Fp:r,n:n,prehash:i,hash:o,randomBytes:s,nByteLength:u,h:f}=e,h=m<<BigInt(8*u)-g,a=r.create,l=(0,p.gN)(e.n,e.nBitLength),v=e.uvRatio||((t,e)=>{try{return{isValid:!0,value:r.sqrt(t*r.inv(e))}}catch(t){return{isValid:!1,value:y}}}),E=e.adjustScalarBytes||(t=>t),B=e.domain||((t,e,r)=>{if((0,d.uw)("phflag",r),e.length||r)throw Error("Contexts/pre-hash are not supported");return t});function x(t,e){d.Fy("coordinate "+t,e,y,h)}function M(t){if(!(t instanceof _))throw Error("ExtendedPoint expected")}let A=(0,d.H9)((t,e)=>{let{ex:n,ey:i,ez:o}
1=t,s=t.is0();null==e&&(e=s?w:r.inv(o));let u=a(n*e),f=a(i*e),h=a(o*e);if(s)return{x:y,y:g};if(h!==g)throw Error("invZ was invalid");return{x:u,y:f}}),I=(0,d.H9)(t=>{let{a:r,d:n}=e;if(t.is0())throw Error("bad point: ZERO");let{ex:i,ey:o,ez:s,et:u}=t,f=a(i*i),h=a(o*o),l=a(s*s),c=a(l*l),p=a(f*r);if(a(l*a(p+h))!==a(c+a(n*a(f*h))))throw Error("bad point: equation left != right (1)");if(a(i*o)!==a(s*u))throw Error("bad point: equation left != right (2)");return!0});class _{constructor(t,e,r,n){this.ex=t,this.ey=e,this.ez=r,this.et=n,x("x",t),x("y",e),x("z",r),x("t",n),Object.freeze(this)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static fromAffine(t){if(t instanceof _)throw Error("extended point not allowed");let{x:e,y:r}=t||{};return x("x",e),x("y",r),new _(e,r,g,a(e*r))}static normalizeZ(t){let e=r.invertBatch(t.map(t=>t.ez));return t.map((t,r)=>t.toAffine(e[r])).map(_.fromAffine)}static msm(t,e){return(0,c.D1)(_,l,t,e)}_setWindowSize(t){L.setWindowSize(this,t)}assertValidity(){I(this)}equals(t){M(t);let{ex:e,ey:r,ez:n}=this,{ex:i,ey:o,ez:s}=t,u=a(e*s),f=a(i*n),h=a(r*s),l=a(o*n);return u===f&&h===l}is0(){return this.equals(_.ZERO)}negate(){return new _(a(-this.ex),this.ey,this.ez,a(-this.et))}double(){let{a:t}=e,{ex:r,ey:n,ez:i}=this,o=a(r*r),s=a(n*n),u=a(m*a(i*i)),f=a(t*o),h=r+n,l=a(a(h*h)-o-s),c=f+s,p=c-u,d=f-s,y=a(l*p),g=a(c*d),w=a(l*d);return new _(y,g,a(p*c),w)}add(t){M(t);let{a:r,d:n}=e,{ex:i,ey:o,ez:s,et:u}=this,{ex:f,ey:h,ez:l,et:c}=t;if(r===BigInt(-1)){let t=a((o-i)*(h+f)),e=a((o+i)*(h-f)),r=a(e-t);if(r===y)return this.double();let n=a(s*m*c),p=a(u*m*l),d=p+n,g=e+t,w=p-n,b=a(d*r),v=a(g*w),E=a(d*w);return new _(b,v,a(r*g),E)}let p=a(i*f),d=a(o*h),g=a(u*n*c),w=a(s*l),b=a((i+o)*(f+h)-p-d),v=w-g,E=w+g,B=a(d-r*p),x=a(b*v),A=a(E*B),I=a(b*B);return new _(x,A,a(v*E),I)}subtract(t){return this.add(t.negate())}wNAF(t){return L.wNAFCached(this,t,_.normalizeZ)}multiply(t){d.Fy("scalar",t,g,n);let{p:e,f:r}=this.wNAF(t);return _.normalizeZ([e,r])[0]}multiplyUnsafe(t,e=_.ZERO){return(d.Fy("scalar",t,y,n),t===y)?S:this.is0()||t===g?this:L.wNAFCachedUnsafe(this,t,_.normalizeZ,e)}isSmallOrder(){return this.multiplyUnsafe(f).is0()}isTorsionFree(){return L.unsafeLadder(this,n).is0()}toAffine(t){return A(this,t)}clearCofactor(){let{h:t}=e;return t===g?this:this.multiplyUnsafe(t)}static fromHex(t,n=!1){let{d:i,a:o}=e,s=r.BYTES;t=(0,d.ql)("pointHex",t,s),(0,d.uw)("zip215",n);let u=t.slice(),f=t[s-1];u[s-1]=-129&f;let l=d.ty(u),c=n?h:r.ORDER;d.Fy("pointHex.y",l,y,c);let p=a(l*l),{isValid:m,value:w}=v(a(p-g),a(i*p-o));if(!m)throw Error("Point.fromHex: invalid y coordinate");let b=(w&g)===g,E=(128&f)!=0;if(!n&&w===y&&E)throw Error("Point.fromHex: x=0 and x_0=1");return E!==b&&(w=a(-w)),_.fromAffine({x:w,y:l})}static fromPrivateKey(t){return R(t).point}toRawBytes(){let{x:t,y:e}=this.toAffine(),n=d.S5(e,r.BYTES);return n[n.length-1]|=t&g?128:0,n}toHex(){return d.ci(this.toRawBytes())}}_.BASE=new _(e.Gx,e.Gy,g,a(e.Gx*e.Gy)),_.ZERO=new _(y,g,g,y);let{BASE:U,ZERO:S}=_,L=(0,c.Mx)(_,8*u);function O(t){var e;return e=d.ty(t),(0,p.wQ)(e,n)}function R(t){let e=r.BYTES;t=(0,d.ql)("private key",t,e);let n=(0,d.ql)("hashed private key",o(t),2*e),i=E(n.slice(0,e)),s=n.slice(e,2*e),u=O(i),f=U.multiply(u),h=f.toRawBytes();return{head:i,prefix:s,scalar:u,point:f,pointBytes:h}}function T(t=new Uint8Array,...e){return O(o(B(d.eV(...e),(0,d.ql)("context",t),!!i)))}return U._setWindowSize(8),{CURVE:e,getPublicKey:function(t){return R(t).pointBytes},sign:function(t,e,o={}){var s;t=(0,d.ql)("message",t),i&&(t=i(t));let{prefix:u,scalar:f,pointBytes:h}=R(e),a=T(o.context,u,t),l=U.multiply(a).toRawBytes(),c=(s=a+T(o.context,l,h,t)*f,(0,p.wQ)(s,n));d.Fy("signature.s",c,y,n);let g=d.eV(l,d.S5(c,r.BYTES));return(0,d.ql)("result",g,2*r.BYTES)},verify:function(t,e,n,o=b){let s,u,f;let{context:h,zip215:a}=o,l=r.BYTES;t=(0,d.ql)("signature",t,2*l),e=(0,d.ql)("message",e),n=(0,d.ql)("publicKey",n,l),void 0!==a&&(0,d.uw)("zip215",a),i&&(e=i(e));let c=d.ty(t.slice(l,2*l));try{s=_.fromHex(n,a),u=_.fromHex(t.slice(0,l),a),f=U.multiplyUnsafe(c)}catch(t){return!1}if(!a&&s.isSmallOrder())return!1;let p=T(h,u.toRawBytes(),s.toRawBytes(),e);return u.add(s.multiplyUnsafe(p)).subtract(f).clearCofactor().equals(_.ZERO)},ExtendedPoint:_,utils:{getExtendedPublicKey:R,randomPrivateKey:()=>s(r.BYTES),precompute:(t=8,e=_.BASE)=>(e._setWindowSize(t),e.multiply(BigInt(3)),e)}}}({a:BigInt(-1),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),Fp:U,n:BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),h:I,Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960"),hash:l,randomBytes:o.O6,adjustScalarBytes:function(t){return t[0]&=248,t[31]&=127,t[31]|=64,t},uvRatio:_});function L(t){if(!(t instanceof k))throw Error("RistrettoPoint expected")}let O=t=>_(x,t),R=t=>S.CURVE.Fp.create(null&bytesToNumberLE(t));function T(t){let{d:e}=S.CURVE,r=S.CURVE.Fp.ORDER,n=S.CURVE.Fp.create,i=n(null*t*t),o=n((i+x)*null),s=BigInt(-1),u=n((s-e*i)*n(i+e)),{isValid:f,value:h}=_(o,u),a=n(h*t);isNegativeLE(a,r)||(a=n(-a)),f||(h=a),f||(s=i);let l=n(s*(i-x)*null-u),c=h*h,p=n((h+h)*u),d=n(null*l),y=n(x-c),g=n(x+c);
1return new S.ExtendedPoint(n(p*g),n(y*d),n(d*g),n(p*y))}class k{constructor(t){this.ep=t}static fromAffine(t){return new k(S.ExtendedPoint.fromAffine(t))}static hashToCurve(t){let e=T(R((t=ensureBytes("ristrettoHash",t,64)).slice(0,32))),r=T(R(t.slice(32,64)));return new k(e.add(r))}static fromHex(t){t=ensureBytes("ristrettoHex",t,32);let{a:e,d:r}=S.CURVE,n=S.CURVE.Fp.ORDER,i=S.CURVE.Fp.create,o="RistrettoPoint.fromHex: the hex is not valid encoding of RistrettoPoint",s=R(t);if(!equalBytes(numberToBytesLE(s,32),t)||isNegativeLE(s,n))throw Error(o);let u=i(s*s),f=i(x+e*u),h=i(x-e*u),a=i(f*f),l=i(h*h),c=i(e*r*a-l),{isValid:p,value:d}=O(i(c*l)),y=i(d*h),g=i(d*y*c),m=i((s+s)*y);isNegativeLE(m,n)&&(m=i(-m));let w=i(f*g),b=i(m*w);if(!p||isNegativeLE(b,n)||w===B)throw Error(o);return new k(new S.ExtendedPoint(m,w,x,b))}static msm(t,e){return pippenger(k,Field(S.CURVE.n,S.CURVE.nBitLength),t,e)}toRawBytes(){let t,{ex:e,ey:r,ez:n,et:i}=this.ep,o=S.CURVE.Fp.ORDER,s=S.CURVE.Fp.create,u=s(s(n+r)*s(n-r)),f=s(e*r),h=s(f*f),{value:a}=O(s(u*h)),l=s(a*u),c=s(a*f),p=s(l*c*i);if(isNegativeLE(i*p,o)){let n=s(null*r),i=s(null*e);e=n,r=i,t=s(null*l)}else t=c;isNegativeLE(e*p,o)&&(r=s(-r));let d=s((n-r)*t);return isNegativeLE(d,o)&&(d=s(-d)),numberToBytesLE(d,32)}toHex(){return bytesToHex(this.toRawBytes())}toString(){return this.toHex()}equals(t){L(t);let{ex:e,ey:r}=this.ep,{ex:n,ey:i}=t.ep,o=S.CURVE.Fp.create,s=o(e*i)===o(r*n),u=o(r*i)===o(e*n);return s||u}add(t){return L(t),new k(this.ep.add(t.ep))}subtract(t){return L(t),new k(this.ep.subtract(t.ep))}multiply(t){return new k(this.ep.multiply(t))}multiplyUnsafe(t){return new k(this.ep.multiplyUnsafe(t))}double(){return new k(this.ep.double())}negate(){return new k(this.ep.negate())}}},538621:function(t,e,r){"use strict";r.d(e,{secp256k1:function(){return g}});var n=r(129272),i=r(774043),o=r(225884);class s extends o.kb{constructor(t,e){super(),this.finished=!1,this.destroyed=!1,(0,i.z3)(t);let r=(0,o.O0)(e);if(this.iHash=t.create(),"function"!=typeof this.iHash.update)throw Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let n=this.blockLen,s=new Uint8Array(n);s.set(r.length>n?t.create().update(r).digest():r);for(let t=0;t<s.length;t++)s[t]^=54;this.iHash.update(s),this.oHash=t.create();for(let t=0;t<s.length;t++)s[t]^=106;this.oHash.update(s),s.fill(0)}update(t){return(0,i.$h)(this),this.iHash.update(t),this}digestInto(t){(0,i.$h)(this),(0,i.gk)(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){let t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));let{oHash:e,iHash:r,finished:n,destroyed:i,blockLen:o,outputLen:s}=this;return t.finished=n,t.destroyed=i,t.blockLen=o,t.outputLen=s,t.oHash=e._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}let u=(t,e,r)=>new s(t,e).update(r).digest();u.create=(t,e)=>new s(t,e);var f=r(232027),h=r(827665);let a=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),l=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),c=BigInt(1),p=BigInt(2),d=(t,e)=>(t+e/p)/e,y=(0,h.gN)(a,void 0,void 0,{sqrt:function(t){let e=BigInt(3),r=BigInt(6),n=BigInt(11),i=BigInt(22),o=BigInt(23),s=BigInt(44),u=BigInt(88),f=t*t*t%a,l=f*f*t%a,c=(0,h.oA)(l,e,a)*l%a,d=(0,h.oA)(c,e,a)*l%a,g=(0,h.oA)(d,p,a)*f%a,m=(0,h.oA)(g,n,a)*g%a,w=(0,h.oA)(m,i,a)*m%a,b=(0,h.oA)(w,s,a)*w%a,v=(0,h.oA)(b,u,a)*b%a,E=(0,h.oA)(v,s,a)*w%a,B=(0,h.oA)(E,e,a)*l%a,x=(0,h.oA)(B,o,a)*m%a,M=(0,h.oA)(x,r,a)*f%a,A=(0,h.oA)(M,p,a);if(!y.eql(y.sqr(A),t))throw Error("Cannot find square root");return A}}),g=function(t,e){let r=e=>(0,f.e4)({...t,hash:e,hmac:(t,...r)=>u(e,t,(0,o.eV)(...r)),randomBytes:o.O6});return{...r(e),create:r}}({a:BigInt(0),b:BigInt(7),Fp:y,n:l,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{let e=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-c*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),n=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=BigInt("0x100000000000000000000000000000000"),o=d(e*t,l),s=d(-r*t,l),u=(0,h.wQ)(t-o*e-s*n,l),f=(0,h.wQ)(-o*r-s*e,l),a=u>i,p=f>i;
1if(a&&(u=l-u),p&&(f=l-f),u>i||f>i)throw Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:a,k1:u,k2neg:p,k2:f}}}},n.JQ);BigInt(0),g.ProjectivePoint},774043:function(t,e,r){"use strict";function n(t){if(!Number.isSafeInteger(t)||t<0)throw Error("positive integer expected, got "+t)}function i(t,...e){if(!(t instanceof Uint8Array||ArrayBuffer.isView(t)&&"Uint8Array"===t.constructor.name))throw Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw Error("Uint8Array expected of length "+e+", got length="+t.length)}function o(t){if("function"!=typeof t||"function"!=typeof t.create)throw Error("Hash should be wrapped by utils.wrapConstructor");n(t.outputLen),n(t.blockLen)}function s(t,e=!0){if(t.destroyed)throw Error("Hash instance has been destroyed");if(e&&t.finished)throw Error("Hash#digest() has already been called")}function u(t,e){i(t);let r=e.outputLen;if(t.length<r)throw Error("digestInto() expects output buffer of length at least "+r)}r.d(e,{$h:function(){return s},eB:function(){return u},gk:function(){return i},k8:function(){return n},z3:function(){return o}})},288577:function(t,e,r){"use strict";r.d(e,{VR:function(){return u},bc:function(){return o},l3:function(){return s}});var n=r(774043),i=r(225884);function o(t,e,r){return t&e^~t&r}function s(t,e,r){return t&e^t&r^e&r}class u extends i.kb{constructor(t,e,r,n){super(),this.blockLen=t,this.outputLen=e,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=(0,i.GL)(this.buffer)}update(t){(0,n.$h)(this);let{view:e,buffer:r,blockLen:o}=this,s=(t=(0,i.O0)(t)).length;for(let n=0;n<s;){let u=Math.min(o-this.pos,s-n);if(u===o){let e=(0,i.GL)(t);for(;o<=s-n;n+=o)this.process(e,n);continue}r.set(t.subarray(n,n+u),this.pos),this.pos+=u,n+=u,this.pos===o&&(this.process(e,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){(0,n.$h)(this),(0,n.eB)(t,this),this.finished=!0;let{buffer:e,view:r,blockLen:o,isLE:s}=this,{pos:u}=this;e[u++]=128,this.buffer.subarray(u).fill(0),this.padOffset>o-u&&(this.process(r,0),u=0);for(let t=u;t<o;t++)e[t]=0;!function(t,e,r,n){if("function"==typeof t.setBigUint64)return t.setBigUint64(e,r,n);let i=BigInt(32),o=BigInt(4294967295),s=Number(r>>i&o),u=Number(r&o),f=n?4:0,h=n?0:4;t.setUint32(e+f,s,n),t.setUint32(e+h,u,n)}(r,o-8,BigInt(8*this.length),s),this.process(r,0);let f=(0,i.GL)(t),h=this.outputLen;if(h%4)throw Error("_sha2: outputLen should be aligned to 32bit");let a=h/4,l=this.get();if(a>l.length)throw Error("_sha2: outputLen bigger than state");for(let t=0;t<a;t++)f.setUint32(4*t,l[t],s)}digest(){let{buffer:t,outputLen:e}=this;this.digestInto(t);let r=t.slice(0,e);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());let{blockLen:e,buffer:r,length:n,finished:i,destroyed:o,pos:s}=this;return t.length=n,t.pos=s,t.finished=i,t.destroyed=o,n%e&&t.buffer.set(r),t}}},116177:function(t,e,r){"use strict";r.d(e,{EP:function(){return u},SD:function(){return h},Vl:function(){return s},gm:function(){return f},mk:function(){return a}});let n=BigInt(4294967296-1),i=BigInt(32);function o(t,e=!1){return e?{h:Number(t&n),l:Number(t>>i&n)}:{h:0|Number(t>>i&n),l:0|Number(t&n)}}function s(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let i=0;i<t.length;i++){let{h:s,l:u}=o(t[i],e);[r[i],n[i]]=[s,u]}return[r,n]}let u=(t,e,r)=>t<<r|e>>>32-r,f=(t,e,r)=>e<<r|t>>>32-r,h=(t,e,r)=>e<<r-32|t>>>64-r,a=(t,e,r)=>t<<r-32|e>>>64-r;e.ZP={fromBig:o,split:s,toBig:(t,e)=>BigInt(t>>>0)<<i|BigInt(e>>>0),shrSH:(t,e,r)=>t>>>r,shrSL:(t,e,r)=>t<<32-r|e>>>r,rotrSH:(t,e,r)=>t>>>r|e<<32-r,rotrSL:(t,e,r)=>t<<32-r|e>>>r,rotrBH:(t,e,r)=>t<<64-r|e>>>r-32,rotrBL:(t,e,r)=>t>>>r-32|e<<64-r,rotr32H:(t,e)=>e,rotr32L:(t,e)=>t,rotlSH:u,rotlSL:f,rotlBH:h,rotlBL:a,add:function(t,e,r,n){let i=(e>>>0)+(n>>>0);return{h:t+r+(i/4294967296|0)|0,l:0|i}},add3L:(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0),add3H:(t,e,r,n)=>e+r+n+(t/4294967296|0)|0,add4L:(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0),add4H:(t,e,r,n,i)=>e+r+n+i+(t/4294967296|0)|0,add5H:(t,e,r,n,i,o)=>e+r+n+i+o+(t/4294967296|0)|0,add5L:(t,e,r,n,i)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(i>>>0)}},129272:function(t,e,r){"use strict";r.d(e,{JQ:function(){return a},gX:function(){return l}});var n=r(288577),i=r(225884);let o=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,2756
1734187,3204031479,3329325298]),s=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),u=new Uint32Array(64);class f extends n.VR{constructor(){super(64,32,8,!1),this.A=0|s[0],this.B=0|s[1],this.C=0|s[2],this.D=0|s[3],this.E=0|s[4],this.F=0|s[5],this.G=0|s[6],this.H=0|s[7]}get(){let{A:t,B:e,C:r,D:n,E:i,F:o,G:s,H:u}=this;return[t,e,r,n,i,o,s,u]}set(t,e,r,n,i,o,s,u){this.A=0|t,this.B=0|e,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|s,this.H=0|u}process(t,e){for(let r=0;r<16;r++,e+=4)u[r]=t.getUint32(e,!1);for(let t=16;t<64;t++){let e=u[t-15],r=u[t-2],n=(0,i.np)(e,7)^(0,i.np)(e,18)^e>>>3,o=(0,i.np)(r,17)^(0,i.np)(r,19)^r>>>10;u[t]=o+u[t-7]+n+u[t-16]|0}let{A:r,B:s,C:f,D:h,E:a,F:l,G:c,H:p}=this;for(let t=0;t<64;t++){let e=p+((0,i.np)(a,6)^(0,i.np)(a,11)^(0,i.np)(a,25))+(0,n.bc)(a,l,c)+o[t]+u[t]|0,d=((0,i.np)(r,2)^(0,i.np)(r,13)^(0,i.np)(r,22))+(0,n.l3)(r,s,f)|0;p=c,c=l,l=a,a=h+e|0,h=f,f=s,s=r,r=e+d|0}r=r+this.A|0,s=s+this.B|0,f=f+this.C|0,h=h+this.D|0,a=a+this.E|0,l=l+this.F|0,c=c+this.G|0,p=p+this.H|0,this.set(r,s,f,h,a,l,c,p)}roundClean(){u.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class h extends f{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}}let a=(0,i.hE)(()=>new f),l=(0,i.hE)(()=>new h)},692530:function(t,e,r){"use strict";r.d(e,{fr:function(){return v}});var n=r(774043),i=r(116177),o=r(225884);let s=[],u=[],f=[],h=BigInt(0),a=BigInt(1),l=BigInt(2),c=BigInt(7),p=BigInt(256),d=BigInt(113);for(let t=0,e=a,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],s.push(2*(5*n+r)),u.push((t+1)*(t+2)/2%64);let i=h;for(let t=0;t<7;t++)(e=(e<<a^(e>>c)*d)%p)&l&&(i^=a<<(a<<BigInt(t))-a);f.push(i)}let[y,g]=(0,i.Vl)(f,!0),m=(t,e,r)=>r>32?(0,i.SD)(t,e,r):(0,i.EP)(t,e,r),w=(t,e,r)=>r>32?(0,i.mk)(t,e,r):(0,i.gm)(t,e,r);class b extends o.kb{constructor(t,e,r,i=!1,s=24){if(super(),this.blockLen=t,this.suffix=e,this.outputLen=r,this.enableXOF=i,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,n.k8)(r),0>=this.blockLen||this.blockLen>=200)throw Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,o.Jq)(this.state)}keccak(){o.iA||(0,o.l1)(this.state32),function(t,e=24){let r=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let e=0;e<10;e++)r[e]=t[e]^t[e+10]^t[e+20]^t[e+30]^t[e+40];for(let e=0;e<10;e+=2){let n=(e+8)%10,i=(e+2)%10,o=r[i],s=r[i+1],u=m(o,s,1)^r[n],f=w(o,s,1)^r[n+1];for(let r=0;r<50;r+=10)t[e+r]^=u,t[e+r+1]^=f}let e=t[2],i=t[3];for(let r=0;r<24;r++){let n=u[r],o=m(e,i,n),f=w(e,i,n),h=s[r];e=t[h],i=t[h+1],t[h]=o,t[h+1]=f}for(let e=0;e<50;e+=10){for(let n=0;n<10;n++)r[n]=t[e+n];for(let n=0;n<10;n++)t[e+n]^=~r[(n+2)%10]&r[(n+4)%10]}t[0]^=y[n],t[1]^=g[n]}r.fill(0)}(this.state32,this.rounds),o.iA||(0,o.l1)(this.state32),this.posOut=0,this.pos=0}update(t){(0,n.$h)(this);let{blockLen:e,state:r}=this,i=(t=(0,o.O0)(t)).length;for(let n=0;n<i;){let o=Math.min(e-this.pos,i-n);for(let e=0;e<o;e++)r[this.pos++]^=t[n++];this.pos===e&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:t,suffix:e,pos:r,blockLen:n}=this;t[r]^=e,(128&e)!=0&&r===n-1&&this.keccak(),t[n-1]^=128,this.keccak()}writeInto(t){(0,n.$h)(this,!1),(0,n.gk)(t),this.finish();let e=this.state,{blockLen:r}=this;for(let n=0,i=t.length;n<i;){this.posOut>=r&&this.keccak();let o=Math.min(r-this.posOut,i-n);t.set(e.subarray(this.posOut,this.posOut+o),n),this.posOut+=o,n+=o}return t}xofInto(t){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return(0,n.k8)(t),this.xofInto(new Uint8Array(t))}digestInto(t){if((0,n.eB)(t,this),this.finished)throw Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){let{blockLen:e,suffix:r,outputLen:n,rounds:i,enableXOF:o}=this;return t||(t=new b(e,r,n,o,i)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=i,t.suffix=r,t.outputLen=n,t.enableXOF=o,t.destroyed=this.destroyed,t}}let v=(0,o.hE)(()=>new b(136,1,32))},225884:function(t,e,r){"use strict";r.d(e,{kb:function(){return d},l1:function(){return h},ci:function(){return l},eV:function(){return p},GL:function(){return s},iA:function(){return f},O6:function(){return g},np:function(){return u},O0:function(){return c},Jq:function(){return o},hE:function(){return y}});let n="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0;var i=r(774043);function o(t){return new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4))}function s(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function u(t,e){return t<<32-e|t>>>e}let f=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0];function h(t){for(let r=0;r<t.length;r++){var e;t[r]=(e=t[r])<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}}let a=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function l(t){(0,i.gk)(t);let e="";for(let r=0;r<t.length;r++)e+=a[t[r]];return e}function c(t){return"string"==typeof t&&(t=function(t){if("string"!=typeof t)throw Error("utf8ToBytes expected string, got "+typeof t);return new Uint8Array(new TextEncoder().encode(t))}(t)),(0,i.gk)(t),t}function p(...t){let e=0;for(let r=0;r<t.length;r++){let n=t[r];(0,i.gk)(n),e+=n.length}let r=new Uint8Array(e);for(let e=0,n=0;e<t.length;e++){let i=t[e];r.set(i,n),n+=i.length}return r}class d{clone(){return this._cloneInto()}}function y(t){let e=e=>t().update(c(e)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function g(t=32){if(n&&"function"==typeof n.getRandomValues)return n.getRandomValues(new Uint8Array(t));if(n&&"function"==typeof n.randomBytes)return n.randomBytes(t);throw Error("crypto.getRandomValues must be defined")}},48021:function(t,e,r){"use strict";r.d(e,{AG:function(){return b},G0:function(){return I},IM:function(){return B},IX:function(){return y},O7:function(){return g},Rx:function(){return v},Ue:function(){return l},Yj:function(){return d},Z_:function(){return x},_4:function(){return _},bc:function(){return M},dt:function(){return A},eE:function(){return m},hu:function(){return a},i0:function(){return w},jt:function(){return E},oQ:function(){return U}});
vendor: 5,239 bytes, line 1
1class n extends TypeError{constructor(t,e){let r;let{message:n,explanation:i,...o}=t,{path:s}=t,u=0===s.length?n:`At path: ${s.join(".")} -- ${n}`;super(i??u),null!=i&&(this.cause=u),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>r??(r=[t,...e()])}}function i(t){return"object"==typeof t&&null!=t}function o(t){return i(t)&&!Array.isArray(t)}function s(t){return"symbol"==typeof t?t.toString():"string"==typeof t?JSON.stringify(t):`${t}`}function*u(t,e,r,n){var o;for(let u of(i(o=t)&&"function"==typeof o[Symbol.iterator]||(t=[t]),t)){let t=function(t,e,r,n){if(!0===t)return;!1===t?t={}:"string"==typeof t&&(t={message:t});let{path:i,branch:o}=e,{type:u}=r,{refinement:f,message:h=`Expected a value of type \`${u}\`${f?` with refinement \`${f}\``:""}, but received: \`${s(n)}\``}=t;return{value:n,type:u,refinement:f,key:i[i.length-1],path:i,branch:o,...t,message:h}}(u,e,r,n);t&&(yield t)}}function*f(t,e,r={}){let{path:n=[],branch:o=[t],coerce:s=!1,mask:u=!1}=r,h={path:n,branch:o,mask:u};s&&(t=e.coercer(t,h));let a="valid";for(let n of e.validator(t,h))n.explanation=r.message,a="not_valid",yield[n,void 0];for(let[l,c,p]of e.entries(t,h))for(let e of f(c,p,{path:void 0===l?n:[...n,l],branch:void 0===l?o:[...o,c],coerce:s,mask:u,message:r.message}))e[0]?(a=null!=e[0].refinement?"not_refined":"not_valid",yield[e[0],void 0]):s&&(c=e[1],void 0===l?t=c:t instanceof Map?t.set(l,c):t instanceof Set?t.add(c):i(t)&&(void 0!==c||l in t)&&(t[l]=c));if("not_valid"!==a)for(let n of e.refiner(t,h))n.explanation=r.message,a="not_refined",yield[n,void 0];"valid"===a&&(yield[void 0,t])}class h{constructor(t){let{type:e,schema:r,validator:n,refiner:i,coercer:o=t=>t,entries:s=function*(){}}=t;this.type=e,this.schema=r,this.entries=s,this.coercer=o,n?this.validator=(t,e)=>u(n(t,e),e,this,t):this.validator=()=>[],i?this.refiner=(t,e)=>u(i(t,e),e,this,t):this.refiner=()=>[]}assert(t,e){return a(t,this,e)}create(t,e){return l(t,this,e)}is(t){return!c(t,this)[0]}mask(t,e){return function(t,e,r){let n=c(t,e,{coerce:!0,mask:!0,message:r});if(!n[0])return n[1];throw n[0]}(t,this,e)}validate(t,e={}){return c(t,this,e)}}function a(t,e,r){let n=c(t,e,{message:r});if(n[0])throw n[0]}function l(t,e,r){let n=c(t,e,{coerce:!0,message:r});if(!n[0])return n[1];throw n[0]}function c(t,e,r={}){let i=f(t,e,r),o=function(t){let{done:e,value:r}=t.next();return e?void 0:r}(i);return o[0]?[new n(o[0],function*(){for(let t of i)t[0]&&(yield t[0])}),void 0]:[void 0,o[1]]}function p(t,e){return new h({type:t,schema:null,validator:e})}function d(){return p("any",()=>!0)}function y(t){return new h({type:"array",schema:t,*entries(e){if(t&&Array.isArray(e))for(let[r,n]of e.entries())yield[r,n,t]},coercer:t=>Array.isArray(t)?t.slice():t,validator:t=>Array.isArray(t)||`Expected an array value, but received: ${s(t)}`})}function g(){return p("boolean",t=>"boolean"==typeof t)}function m(t){return p("instance",e=>e instanceof t||`Expected a \`${t.name}\` instance, but received: ${s(e)}`)}function w(t){let e=s(t),r=typeof t;return new h({type:"literal",schema:"string"===r||"number"===r||"boolean"===r?t:null,validator:r=>r===t||`Expected the literal \`${e}\`, but received: ${s(r)}`})}function b(t){return new h({...t,validator:(e,r)=>null===e||t.validator(e,r),refiner:(e,r)=>null===e||t.refiner(e,r)})}function v(){return p("number",t=>"number"==typeof t&&!isNaN(t)||`Expected a number, but received: ${s(t)}`)}function E(t){return new h({...t,validator:(e,r)=>void 0===e||t.validator(e,r),refiner:(e,r)=>void 0===e||t.refiner(e,r)})}function B(t,e){return new h({type:"record",schema:null,*entries(r){if(i(r))for(let n in r){let i=r[n];yield[n,n,t],yield[n,i,e]}},validator:t=>o(t)||`Expected an object, but received: ${s(t)}`,coercer:t=>o(t)?{...t}:t})}function x(){return p("string",t=>"string"==typeof t||`Expected a string, but received: ${s(t)}`)}function M(t){let e=p("never",()=>!1);return new h({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){let n=Math.max(t.length,r.length);for(let i=0;i<n;i++)yield[i,r[i],t[i]||e]}},validator:t=>Array.isArray(t)||`Expected an array, but received: ${s(t)}`,coercer:t=>Array.isArray(t)?t.slice():t})}function A(t){let e=Object.keys(t);return new h({type:"type",schema:t,*entries(r){if(i(r))for(let n of e)yield[n,r[n],t[n]]},validator:t=>o(t)||`Expected an object, but received: ${s(t)}`,coercer:t=>o(t)?{...t}:t})}function I(t){let e=t.map(t=>t.type).join(" | ");return new h({type:"union",schema:null,coercer(e,r){for(let n of t){let[t,i]=n.validate(e,{coerce:!0,mask:r.mask});if(!t)return i}return e},validator(r,n){let i=[];for(let e of t){let[...t]=f(r,e,n),[o]=t;if(!o[0])return[];for(let[e]of t)e&&i.push(e)}return[`Expected the value to satisfy a union of \`${e}\`, but received: ${s(r)}`,...i]}})}function _(){return p("unknown",()=>!0)}function U(t,e,r){return new h({...t,coercer:(n,i)=>c(n,e)[0]?t.coercer(n,i):t.coercer(r(n,i),i)})}},87336:function(t,e,r){"use strict";r.d(e,{v:function(){return n}});var n=r(877625)},544633:function(t,e,r){"use strict";r.d(e,{Ey:function(){return f},XY:function(){return s}});var n=r(908413),i=r(87336),o=class extends i.v{socket;constructor(t,e,r){super(),this.socket=new window.WebSocket(t,r),this.socket.onopen=()=>
1this.emit("open"),this.socket.onmessage=t=>this.emit("message",t.data),this.socket.onerror=t=>this.emit("error",t),this.socket.onclose=t=>{this.emit("close",t.code,t.reason)}}send(t,e,r){let n=r||e;try{this.socket.send(t),n()}catch(t){n(t)}}close(t,e){this.socket.close(t,e)}addEventListener(t,e,r){this.socket.addEventListener(t,e,r)}};function s(t,e){return new o(t,e)}var u=class{encode(t){return JSON.stringify(t)}decode(t){return JSON.parse(t)}},f=class extends i.v{address;rpc_id;queue;options;autoconnect;ready;reconnect;reconnect_timer_id;reconnect_interval;max_reconnects;rest_options;current_reconnects;generate_request_id;socket;webSocketFactory;dataPack;constructor(t,e="ws://localhost:8080",{autoconnect:r=!0,reconnect:n=!0,reconnect_interval:i=1e3,max_reconnects:o=5,...s}={},f,h){super(),this.webSocketFactory=t,this.queue={},this.rpc_id=0,this.address=e,this.autoconnect=r,this.ready=!1,this.reconnect=n,this.reconnect_timer_id=void 0,this.reconnect_interval=i,this.max_reconnects=o,this.rest_options=s,this.current_reconnects=0,this.generate_request_id=f||(()=>++this.rpc_id),h?this.dataPack=h:this.dataPack=new u,this.autoconnect&&this._connect(this.address,{autoconnect:this.autoconnect,reconnect:this.reconnect,reconnect_interval:this.reconnect_interval,max_reconnects:this.max_reconnects,...this.rest_options})}connect(){this.socket||this._connect(this.address,{autoconnect:this.autoconnect,reconnect:this.reconnect,reconnect_interval:this.reconnect_interval,max_reconnects:this.max_reconnects,...this.rest_options})}call(t,e,r,n){return n||"object"!=typeof r||(n=r,r=null),new Promise((i,o)=>
vendor: 2,470 bytes, line 1
1{if(!this.ready)return o(Error("socket not ready"));let s=this.generate_request_id(t,e);this.socket.send(this.dataPack.encode({jsonrpc:"2.0",method:t,params:e||void 0,id:s}),n,t=>{if(t)return o(t);this.queue[s]={promise:[i,o]},r&&(this.queue[s].timeout=setTimeout(()=>{delete this.queue[s],o(Error("reply timeout"))},r))})})}async login(t){let e=await this.call("rpc.login",t);if(!e)throw Error("authentication failed");return e}async listMethods(){return await this.call("__listMethods")}notify(t,e){return new Promise((r,n)=>{if(!this.ready)return n(Error("socket not ready"));this.socket.send(this.dataPack.encode({jsonrpc:"2.0",method:t,params:e}),t=>{if(t)return n(t);r()})})}async subscribe(t){"string"==typeof t&&(t=[t]);let e=await this.call("rpc.on",t);if("string"==typeof t&&"ok"!==e[t])throw Error("Failed subscribing to an event '"+t+"' with: "+e[t]);return e}async unsubscribe(t){"string"==typeof t&&(t=[t]);let e=await this.call("rpc.off",t);if("string"==typeof t&&"ok"!==e[t])throw Error("Failed unsubscribing from an event with: "+e);return e}close(t,e){this.socket.close(t||1e3,e)}setAutoReconnect(t){this.reconnect=t}setReconnectInterval(t){this.reconnect_interval=t}setMaxReconnects(t){this.max_reconnects=t}_connect(t,e){clearTimeout(this.reconnect_timer_id),this.socket=this.webSocketFactory(t,e),this.socket.addEventListener("open",()=>{this.ready=!0,this.emit("open"),this.current_reconnects=0}),this.socket.addEventListener("message",({data:t})=>{t instanceof ArrayBuffer&&(t=n.lW.from(t).toString());try{t=this.dataPack.decode(t)}catch(t){return}if(t.notification&&this.listeners(t.notification).length){if(!Object.keys(t.params).length)return this.emit(t.notification);let e=[t.notification];if(t.params.constructor===Object)e.push(t.params);else for(let r=0;r<t.params.length;r++)e.push(t.params[r]);return Promise.resolve().then(()=>{this.emit.apply(this,e)})}if(!this.queue[t.id])return t.method?Promise.resolve().then(()=>{this.emit(t.method,t?.params)}):void 0;"error"in t=="result"in t&&this.queue[t.id].promise[1](Error('Server response malformed. Response must include either "result" or "error", but not both.')),this.queue[t.id].timeout&&clearTimeout(this.queue[t.id].timeout),t.error?this.queue[t.id].promise[1](t.error):this.queue[t.id].promise[0](t.result),delete this.queue[t.id]}),this.socket.addEventListener("error",t=>this.emit("error",t)),this.socket.addEventListener("close",({code:r,reason:n})=>{this.ready&&setTimeout(()=>
1this.emit("close",r,n),0),this.ready=!1,this.socket=void 0,1e3!==r&&(this.current_reconnects++,this.reconnect&&(this.max_reconnects>this.current_reconnects||0===this.max_reconnects)&&(this.reconnect_timer_id=setTimeout(()=>this._connect(t,e),this.reconnect_interval)))})}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.