PageSourceSearch

https://xota.ai/_next/static/chunks/8575.47167216b26fe023.js

js xota.ai collected 2026-10-05 16:00:09 UTC 91,359 bytes, 1 lines download raw bytes

vendor: 1,773 bytes, line 1
1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8575],{69028: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(82957);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 a(t,e){return e.property?t+"["+e.property+"]":t}class h extends s{isCount(){throw Error("ExternalLayout is abstract")}}class c extends h{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 f||this.layout instanceof u}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 f 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 u 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 l(t){let e=Math.floor(t/4294967296);return{hi32:e,lo32:t-4294967296*e}}
1function d(t,e){return 4294967296*t+e}class p extends s{constructor(t){super(8,t)}decode(t,e=0){let r=o(t),n=r.readUInt32LE(e);return d(r.readUInt32LE(e+4),n)}encode(t,e,r=0){let n=l(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 d(r.readInt32LE(e+4),n)}encode(t,e,r=0){let n=l(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 h&&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 h||!(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 h&&(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 h&&(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 h&&this.count.encode(t.length,e,r),i}}class w 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 m{constructor(t){this.property=t}decode(t,e){throw Error("UnionDiscriminator is abstract")}encode(t,e,r){throw Error("UnionDiscriminator is abstract")}}class v extends m{constructor(t,e){if(!(t instanceof h&&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 b extends s{constructor(t,e,r){let n;if(t instanceof f||t instanceof u)n=new v(new c(t));else if(t instanceof h&&t.isCount())n=new v(t);else if(t instanceof m)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 f||t instanceof u)&&(i+=n.layout.span),super(i,r),this.discriminator=n,this.usesPrefixDiscriminator=t instanceof f||t instanceof u,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 x(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 x extends s{constructor(t,e,r,n){if(!(t instanceof b))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 E(t){return 0>t&&(t+=4294967296),t}class A extends s{constructor(t,e,r){if(!(t instanceof f||t instanceof u))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=E(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 _(this,t,e);return this.fields.push(r),r}addBoolean(t){let e=new P(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 _{constructor(t,e,r){if(!(t instanceof A))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=E(this.valueMask<<this.start),this.property=r}decode(t,e){return E(this.container._packedGetValue()&this.wordMask)>>>this.start}encode(t){if("number"!=typeof t||!Number.isInteger(t)||t!==E(t&this.valueMask))throw TypeError(a("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask);let e=this.container._packedGetValue(),r=E(t<<this.start);this.container._packedSetValue(E(e&~this.wordMask)|r)}}class P extends _{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 U extends s{constructor(t,e){if(!(t instanceof h&&t.isCount()||Number.isInteger(t)&&0<=t))throw TypeError("length must be positive integer or an unsigned integer ExternalLayout");let r=-1;t instanceof h||(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 h&&(n=t.length),!(t instanceof Uint8Array&&n===t.length))throw TypeError(a("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 h&&this.length.encode(n,e,r),n}}e.cv=(t,e,r)=>new c(t,e,r),e.u8=t=>new f(1,t),e.KB=t=>new f(2,t),e.Jq=t=>new f(4,t),e._O=t=>new p(t),e.gM=t=>new y(t),e.n_=(t,e,r)=>new w(t,e,r),e.A9=(t,e,r)=>new g(t,e,r),e.Ik=(t,e)=>new U(t,e)},99420:function(t,e,r){!function(t){"use strict";var e,n=function(t){var e,r=new Float64Array(16);if(t)for(e=0;e<t.length;e++)r[e]=t[e];return r},i=function(){throw Error("no PRNG")},o=new Uint8Array(16),s=new Uint8Array(32);s[0]=9;var a=n(),h=n([1]),c=n([56129,1]),f=n([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),u=n([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),l=n([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),d=n([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),p=n([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function y(t,e,r,n){t[e]=r>>24&255,t[e+1]=r>>16&255,t[e+2]=r>>8&255,t[e+3]=255&r,t[e+4]=n>>24&255,t[e+5]=n>>16&255,t[e+6]=n>>8&255,t[e+7]=255&n}function g(t,e,r,n,i){var o,s=0;for(o=0;o<i;o++)s|=t[e+o]^r[n+o];return(1&s-1>>>8)-1}function w(t,e,r,n){return g(t,e,r,n,16)}function m(t,e,r,n){return g(t,e,r,n,32)}function v(t,e,r,n){!function(t,e,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,h=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,c=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,f=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,u=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,l=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,d=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,p=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,y=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,g=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,w=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,m=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,v=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,b=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,x=o,E=s,A=a,_=h,P=c,U=f,S=u,B=l,k=d,I=p,T=y,L=g,C=w,M=m,O=v,R=b,N=0;N<20;
vendor: 7,148 bytes, line 1
1N+=2)P^=(i=x+C|0)<<7|i>>>25,k^=(i=P+x|0)<<9|i>>>23,C^=(i=k+P|0)<<13|i>>>19,x^=(i=C+k|0)<<18|i>>>14,I^=(i=U+E|0)<<7|i>>>25,M^=(i=I+U|0)<<9|i>>>23,E^=(i=M+I|0)<<13|i>>>19,U^=(i=E+M|0)<<18|i>>>14,O^=(i=T+S|0)<<7|i>>>25,A^=(i=O+T|0)<<9|i>>>23,S^=(i=A+O|0)<<13|i>>>19,T^=(i=S+A|0)<<18|i>>>14,_^=(i=R+L|0)<<7|i>>>25,B^=(i=_+R|0)<<9|i>>>23,L^=(i=B+_|0)<<13|i>>>19,R^=(i=L+B|0)<<18|i>>>14,E^=(i=x+_|0)<<7|i>>>25,A^=(i=E+x|0)<<9|i>>>23,_^=(i=A+E|0)<<13|i>>>19,x^=(i=_+A|0)<<18|i>>>14,S^=(i=U+P|0)<<7|i>>>25,B^=(i=S+U|0)<<9|i>>>23,P^=(i=B+S|0)<<13|i>>>19,U^=(i=P+B|0)<<18|i>>>14,L^=(i=T+I|0)<<7|i>>>25,k^=(i=L+T|0)<<9|i>>>23,I^=(i=k+L|0)<<13|i>>>19,T^=(i=I+k|0)<<18|i>>>14,C^=(i=R+O|0)<<7|i>>>25,M^=(i=C+R|0)<<9|i>>>23,O^=(i=M+C|0)<<13|i>>>19,R^=(i=O+M|0)<<18|i>>>14;x=x+o|0,E=E+s|0,A=A+a|0,_=_+h|0,P=P+c|0,U=U+f|0,S=S+u|0,B=B+l|0,k=k+d|0,I=I+p|0,T=T+y|0,L=L+g|0,C=C+w|0,M=M+m|0,O=O+v|0,R=R+b|0,t[0]=x>>>0&255,t[1]=x>>>8&255,t[2]=x>>>16&255,t[3]=x>>>24&255,t[4]=E>>>0&255,t[5]=E>>>8&255,t[6]=E>>>16&255,t[7]=E>>>24&255,t[8]=A>>>0&255,t[9]=A>>>8&255,t[10]=A>>>16&255,t[11]=A>>>24&255,t[12]=_>>>0&255,t[13]=_>>>8&255,t[14]=_>>>16&255,t[15]=_>>>24&255,t[16]=P>>>0&255,t[17]=P>>>8&255,t[18]=P>>>16&255,t[19]=P>>>24&255,t[20]=U>>>0&255,t[21]=U>>>8&255,t[22]=U>>>16&255,t[23]=U>>>24&255,t[24]=S>>>0&255,t[25]=S>>>8&255,t[26]=S>>>16&255,t[27]=S>>>24&255,t[28]=B>>>0&255,t[29]=B>>>8&255,t[30]=B>>>16&255,t[31]=B>>>24&255,t[32]=k>>>0&255,t[33]=k>>>8&255,t[34]=k>>>16&255,t[35]=k>>>24&255,t[36]=I>>>0&255,t[37]=I>>>8&255,t[38]=I>>>16&255,t[39]=I>>>24&255,t[40]=T>>>0&255,t[41]=T>>>8&255,t[42]=T>>>16&255,t[43]=T>>>24&255,t[44]=L>>>0&255,t[45]=L>>>8&255,t[46]=L>>>16&255,t[47]=L>>>24&255,t[48]=C>>>0&255,t[49]=C>>>8&255,t[50]=C>>>16&255,t[51]=C>>>24&255,t[52]=M>>>0&255,t[53]=M>>>8&255,t[54]=M>>>16&255,t[55]=M>>>24&255,t[56]=O>>>0&255,t[57]=O>>>8&255,t[58]=O>>>16&255,t[59]=O>>>24&255,t[60]=R>>>0&255,t[61]=R>>>8&255,t[62]=R>>>16&255,t[63]=R>>>24&255}(t,e,r,n)}function b(t,e,r,n){!function(t,e,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,h=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,c=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,f=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,u=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,l=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,d=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,p=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,y=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,g=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,w=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,m=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,v=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,b=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,x=o,E=s,A=a,_=h,P=c,U=f,S=u,B=l,k=d,I=p,T=y,L=g,C=w,M=m,O=v,R=b,N=0;N<20;N+=2)P^=(i=x+C|0)<<7|i>>>25,k^=(i=P+x|0)<<9|i>>>23,C^=(i=k+P|0)<<13|i>>>19,x^=(i=C+k|0)<<18|i>>>14,I^=(i=U+E|0)<<7|i>>>25,M^=(i=I+U|0)<<9|i>>>23,E^=(i=M+I|0)<<13|i>>>19,U^=(i=E+M|0)<<18|i>>>14,O^=(i=T+S|0)<<7|i>>>25,A^=(i=O+T|0)<<9|i>>>23,S^=(i=A+O|0)<<13|i>>>19,T^=(i=S+A|0)<<18|i>>>14,_^=(i=R+L|0)<<7|i>>>25,B^=(i=_+R|0)<<9|i>>>23,L^=(i=B+_|0)<<13|i>>>19,R^=(i=L+B|0)<<18|i>>>14,E^=(i=x+_|0)<<7|i>>>25,A^=(i=E+x|0)<<9|i>>>23,_^=(i=A+E|0)<<13|i>>>19,x^=(i=_+A|0)<<18|i>>>14,S^=(i=U+P|0)<<7|i>>>25,B^=(i=S+U|0)<<9|i>>>23,P^=(i=B+S|0)<<13|i>>>19,U^=(i=P+B|0)<<18|i>>>14,L^=(i=T+I|0)<<7|i>>>25,k^=(i=L+T|0)<<9|i>>>23,I^=(i=k+L|0)<<13|i>>>19,T^=(i=I+k|0)<<18|i>>>14,C^=(i=R+O|0)<<7|i>>>25,M^=(i=C+R|0)<<9|i>>>23,O^=(i=M+C|0)<<13|i>>>19,R^=(i=O+M|0)<<18|i>>>14;t[0]=x>>>0&255,t[1]=x>>>8&255,t[2]=x>>>16&255,t[3]=x>>>24&255,t[4]=U>>>0&255,t[5]=U>>>8&255,t[6]=U>>>16&255,t[7]=U>>>24&255,t[8]=T>>>0&255,t[9]=T>>>8&255,t[10]=T>>>16&255,t[11]=T>>>24&255,t[12]=R>>>0&255,t[13]=R>>>8&255,t[14]=R>>>16&255,t[15]=R>>>24&255,t[16]=S>>>0&255,t[17]=S>>>8&255,t[18]=S>>>16&255,t[19]=S>>>24&255,t[20]=B>>>0&255,t[21]=B>>>8&255,t[22]=B>>>16&255,t[23]=B>>>24&255,t[24]=k>>>0&255,t[25]=k>>>8&255,t[26]=k>>>16&255,t[27]=k>>>24&255,t[28]=I>>>0&255,t[29]=I>>>8&255,t[30]=I>>>16&255,t[31]=I>>>24&255}(t,e,r,n)}var x=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function E(t,e,r,n,i,o,s){var a,h,c=new Uint8Array(16),f=new Uint8Array(64);for(h=0;h<16;h++)c[h]=0;for(h=0;h<8;h++)c[h]=o[h];for(;i>=64;){for(v(f,c,s,x),h=0;h<64;h++)t[e+h]=r[n+h]^f[h];for(h=8,a=1;h<16;h++)a=a+(255&c[h])|0,c[h]=255&a,a>>>=8;i-=64,e+=64,n+=64}if(i>0)for(v(f,c,s,x),h=0;h<i;h++)t[e+h]=r[n+h]^f[h];return 0}function A(t,e,r,n,i){var o,s,a=new Uint8Array(16),h=new Uint8Array(64);for(s=0;s<16;s++)a[s]=0;for(s=0;s<8;s++)a[s]=n[s];for(;r>=64;){for(v(h,a,i,x),s=0;s<64;s++)t[e+s]=h[s];for(s=8,o=1;s<16;s++)o=o+(255&a[s])|0,a[s]=255&o,o>>>=8;r-=64,e+=64}if(r>0)for(v(h,a,i,x),s=0;s<r;s++)t[e+s]=h[s];return 0}function _(t,e,r,n,i){var o=new Uint8Array(32);b(o,n,i,x);for(var s=new Uint8Array(8),a=0;a<8;a++)s[a]=n[a+16];return A(t,e,r,s,o)}function P(t,e,r,n,i,o,s){var a=new Uint8Array(32);b(a,o,s,x);for(var h=new Uint8Array(8),c=0;c<8;c++)h[c]=o[c+16];return E(t,e,r,n,i,h,a)}var U=function(t){var e,r,n,i,o,s,a,h;this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0,e=255&t[0]|(255&t[1])<<8,this.r[0]=8191&e,r=255&t[2]|(255&t[3])<<8,this.r[1]=(e>>>13|r<<3)&8191,n=255&t[4]|(255&t[5])<<8,this.r[2]=(r>>>10|n<<6)&7939,i=255&t[6]|(255&t[7])<<8,this.r[3]=(n>>>7|i<<9)&8191,o=255&t[8]|(255&t[9])<<8,this.r[4]=(i>>>4|o<<12)&255,this.r[5]=o>>>1&8190,s=255&t[10]|(255&t[11])<<8,this.r[6]=(o>>>14|s<<2)&8191,a=255&t[12]|(255&t[13])<<8,this.r[7]=(s>>>11|a<<5)&8065,h=255&t[14]|(255&t[15])<<8,this.r[8]=(a>>>8|h<<8)&8191,this.r[9]=h>>>5&127,this.pad[0]=255&t[16]|(255&t[17])<<8,this.pad[1]=255&t[18]|(255&t[19])<<8,this.pad[2]=255&t[20]|(255&t[21])<<8,this.pad[3]=255&t[22]|(255&t[23])<<8,this.pad[4]=255&t[24]|(255&t[25])<<8,this.pad[5]=255&t[26]|(255&t[27])<<8,this.pad[6]=255&t[28]|(255&t[29])<<8,this.pad[7]=255&t[30]|(255&t[31])<<8};function S(t,e,r,n,i,o){var s=new U(o);return s.update(r,n,i),s.finish(t,e),0}function B(t,e,r,n,i,o){var s=new Uint8Array(16);return S(s,0,r,n,i,o),w(t,e,s,0)}function k(t,e,r,n,i){var o;if(r<32)return -1;for(P(t,0,e,0,r,n,i),S(t,16,t,32,r-32,t),o=0;o<16;o++)t[o]=0;return 0}function I(t,e,r,n,i){var o,s=new Uint8Array(32);if(r<32||(_(s,0,32,n,i),0!==B(e,16,e,32,r-32,s)))return -1;for(P(t,0,e,0,r,n,i),o=0;o<32;o++)t[o]=0;return 0}function T(t,e){var r;for(r=0;r<16;r++)t[r]=0|e[r]}function L(t){var e,r,n=1;for(e=0;e<16;e++)n=Math.floor((r=t[e]+n+65535)/65536),t[e]=r-65536*n;t[0]+=n-1+37*(n-1)}function C(t,e,r){for(var n,i=~(r-1),o=0;o<16;o++)n=i&(t[o]^e[o]),t[o]^=n,e[o]^=n}function M(t,e){var r,i,o,s=n(),a=n();for(r=0;r<16;r++)a[r]=e[r];for(L(a),L(a),L(a),i=0;i<2;i++){for(r=1,s[0]=a[0]-65517;r<15;r++)s[r]=a[r]-65535-(s[r-1]>>16&1),s[r-1]&=65535;s[15]=a[15]-32767-(s[14]>>16&1),o=s[15]>>16&1,s[14]&=65535,C(a,s,1-o)}for(r=0;r<16;r++)t[2*r]=255&a[r],t[2*r+1]=a[r]>>8}
1function O(t,e){var r=new Uint8Array(32),n=new Uint8Array(32);return M(r,t),M(n,e),m(r,0,n,0)}function R(t){var e=new Uint8Array(32);return M(e,t),1&e[0]}function N(t,e){var r;for(r=0;r<16;r++)t[r]=e[2*r]+(e[2*r+1]<<8);t[15]&=32767}function Z(t,e,r){for(var n=0;n<16;n++)t[n]=e[n]+r[n]}function z(t,e,r){for(var n=0;n<16;n++)t[n]=e[n]-r[n]}function q(t,e,r){var n,i,o=0,s=0,a=0,h=0,c=0,f=0,u=0,l=0,d=0,p=0,y=0,g=0,w=0,m=0,v=0,b=0,x=0,E=0,A=0,_=0,P=0,U=0,S=0,B=0,k=0,I=0,T=0,L=0,C=0,M=0,O=0,R=r[0],N=r[1],Z=r[2],z=r[3],q=r[4],K=r[5],j=r[6],F=r[7],Y=r[8],D=r[9],V=r[10],H=r[11],G=r[12],$=r[13],W=r[14],Q=r[15];o+=(n=e[0])*R,s+=n*N,a+=n*Z,h+=n*z,c+=n*q,f+=n*K,u+=n*j,l+=n*F,d+=n*Y,p+=n*D,y+=n*V,g+=n*H,w+=n*G,m+=n*$,v+=n*W,b+=n*Q,s+=(n=e[1])*R,a+=n*N,h+=n*Z,c+=n*z,f+=n*q,u+=n*K,l+=n*j,d+=n*F,p+=n*Y,y+=n*D,g+=n*V,w+=n*H,m+=n*G,v+=n*$,b+=n*W,x+=n*Q,a+=(n=e[2])*R,h+=n*N,c+=n*Z,f+=n*z,u+=n*q,l+=n*K,d+=n*j,p+=n*F,y+=n*Y,g+=n*D,w+=n*V,m+=n*H,v+=n*G,b+=n*$,x+=n*W,E+=n*Q,h+=(n=e[3])*R,c+=n*N,f+=n*Z,u+=n*z,l+=n*q,d+=n*K,p+=n*j,y+=n*F,g+=n*Y,w+=n*D,m+=n*V,v+=n*H,b+=n*G,x+=n*$,E+=n*W,A+=n*Q,c+=(n=e[4])*R,f+=n*N,u+=n*Z,l+=n*z,d+=n*q,p+=n*K,y+=n*j,g+=n*F,w+=n*Y,m+=n*D,v+=n*V,b+=n*H,x+=n*G,E+=n*$,A+=n*W,_+=n*Q,f+=(n=e[5])*R,u+=n*N,l+=n*Z,d+=n*z,p+=n*q,y+=n*K,g+=n*j,w+=n*F,m+=n*Y,v+=n*D,b+=n*V,x+=n*H,E+=n*G,A+=n*$,_+=n*W,P+=n*Q,u+=(n=e[6])*R,l+=n*N,d+=n*Z,p+=n*z,y+=n*q,g+=n*K,w+=n*j,m+=n*F,v+=n*Y,b+=n*D,x+=n*V,E+=n*H,A+=n*G,_+=n*$,P+=n*W,U+=n*Q,l+=(n=e[7])*R,d+=n*N,p+=n*Z,y+=n*z,g+=n*q,w+=n*K,m+=n*j,v+=n*F,b+=n*Y,x+=n*D,E+=n*V,A+=n*H,_+=n*G,P+=n*$,U+=n*W,S+=n*Q,d+=(n=e[8])*R,p+=n*N,y+=n*Z,g+=n*z,w+=n*q,m+=n*K,v+=n*j,b+=n*F,x+=n*Y,E+=n*D,A+=n*V,_+=n*H,P+=n*G,U+=n*$,S+=n*W,B+=n*Q,p+=(n=e[9])*R,y+=n*N,g+=n*Z,w+=n*z,m+=n*q,v+=n*K,b+=n*j,x+=n*F,E+=n*Y,A+=n*D,_+=n*V,P+=n*H,U+=n*G,S+=n*$,B+=n*W,k+=n*Q,y+=(n=e[10])*R,g+=n*N,w+=n*Z,m+=n*z,v+=n*q,b+=n*K,x+=n*j,E+=n*F,A+=n*Y,_+=n*D,P+=n*V,U+=n*H,S+=n*G,B+=n*$,k+=n*W,I+=n*Q,g+=(n=e[11])*R,w+=n*N,m+=n*Z,v+=n*z,b+=n*q,x+=n*K,E+=n*j,A+=n*F,_+=n*Y,P+=n*D,U+=n*V,S+=n*H,B+=n*G,k+=n*$,I+=n*W,T+=n*Q,w+=(n=e[12])*R,m+=n*N,v+=n*Z,b+=n*z,x+=n*q,E+=n*K,A+=n*j,_+=n*F,P+=n*Y,U+=n*D,S+=n*V,B+=n*H,k+=n*G,I+=n*$,T+=n*W,L+=n*Q,m+=(n=e[13])*R,v+=n*N,b+=n*Z,x+=n*z,E+=n*q,A+=n*K,_+=n*j,P+=n*F,U+=n*Y,S+=n*D,B+=n*V,k+=n*H,I+=n*G,T+=n*$,L+=n*W,C+=n*Q,v+=(n=e[14])*R,b+=n*N,x+=n*Z,E+=n*z,A+=n*q,_+=n*K,P+=n*j,U+=n*F,S+=n*Y,B+=n*D,k+=n*V,I+=n*H,T+=n*G,L+=n*$,C+=n*W,M+=n*Q,b+=(n=e[15])*R,x+=n*N,E+=n*Z,A+=n*z,_+=n*q,P+=n*K,U+=n*j,S+=n*F,B+=n*Y,k+=n*D,I+=n*V,T+=n*H,L+=n*G,C+=n*$,M+=n*W,O+=n*Q,o+=38*x,s+=38*E,a+=38*A,h+=38*_,c+=38*P,f+=38*U,u+=38*S,l+=38*B,d+=38*k,p+=38*I,y+=38*T,g+=38*L,w+=38*C,m+=38*M,v+=38*O,i=Math.floor((n=o+(i=1)+65535)/65536),o=n-65536*i,i=Math.floor((n=s+i+65535)/65536),s=n-65536*i,i=Math.floor((n=a+i+65535)/65536),a=n-65536*i,i=Math.floor((n=h+i+65535)/65536),h=n-65536*i,i=Math.floor((n=c+i+65535)/65536),c=n-65536*i,i=Math.floor((n=f+i+65535)/65536),f=n-65536*i,i=Math.floor((n=u+i+65535)/65536),u=n-65536*i,i=Math.floor((n=l+i+65535)/65536),l=n-65536*i,i=Math.floor((n=d+i+65535)/65536),d=n-65536*i,i=Math.floor((n=p+i+65535)/65536),p=n-65536*i,i=Math.floor((n=y+i+65535)/65536),y=n-65536*i,i=Math.floor((n=g+i+65535)/65536),g=n-65536*i,i=Math.floor((n=w+i+65535)/65536),w=n-65536*i,i=Math.floor((n=m+i+65535)/65536),m=n-65536*i,i=Math.floor((n=v+i+65535)/65536),v=n-65536*i,i=Math.floor((n=b+i+65535)/65536),b=n-65536*i,o+=i-1+37*(i-1),i=Math.floor((n=o+(i=1)+65535)/65536),o=n-65536*i,i=Math.floor((n=s+i+65535)/65536),s=n-65536*i,i=Math.floor((n=a+i+65535)/65536),a=n-65536*i,i=Math.floor((n=h+i+65535)/65536),h=n-65536*i,i=Math.floor((n=c+i+65535)/65536),c=n-65536*i,i=Math.floor((n=f+i+65535)/65536),f=n-65536*i,i=Math.floor((n=u+i+65535)/65536),u=n-65536*i,i=Math.floor((n=l+i+65535)/65536),l=n-65536*i,i=Math.floor((n=d+i+65535)/65536),d=n-65536*i,i=Math.floor((n=p+i+65535)/65536),p=n-65536*i,i=Math.floor((n=y+i+65535)/65536),y=n-65536*i,i=Math.floor((n=g+i+65535)/65536),g=n-65536*i,i=Math.floor((n=w+i+65535)/65536),w=n-65536*i,i=Math.floor((n=m+i+65535)/65536),m=n-65536*i,i=Math.floor((n=v+i+65535)/65536),v=n-65536*i,i=Math.floor((n=b+i+65535)/65536),b=n-65536*i,o+=i-1+37*(i-1),t[0]=o,t[1]=s,t[2]=a,t[3]=h,t[4]=c,t[5]=f,t[6]=u,t[7]=l,t[8]=d,t[9]=p,t[10]=y,t[11]=g,t[12]=w,t[13]=m,t[14]=v,t[15]=b}function K(t,e){q(t,e,e)}function j(t,e){var r,i=n();for(r=0;r<16;r++)i[r]=e[r];for(r=253;r>=0;r--)K(i,i),2!==r&&4!==r&&q(i,i,e);for(r=0;r<16;r++)t[r]=i[r]}function F(t,e){var r,i=n();for(r=0;r<16;r++)i[r]=e[r];for(r=250;r>=0;r--)K(i,i),1!==r&&q(i,i,e);for(r=0;r<16;r++)t[r]=i[r]}function Y(t,e,r){var i,o,s=new Uint8Array(32),a=new Float64Array(80),h=n(),f=n(),u=n(),l=n(),d=n(),p=n();for(o=0;o<31;o++)s[o]=e[o];for(s[31]=127&e[31]|64,s[0]&=248,N(a,r),o=0;o<16;o++)f[o]=a[o],l[o]=h[o]=u[o]=0;for(o=254,h[0]=l[0]=1;o>=0;--o)C(h,f,i=s[o>>>3]>>>(7&o)&1),C(u,l,i),Z(d,h,u),z(h,h,u),Z(u,f,l),z(f,f,l),K(l,d),K(p,h),q(h,u,h),q(u,f,d),Z(d,h,u),z(h,h,u),K(f,h),z(u,l,p),q(h,u,c),Z(h,h,l),q(u,u,h),q(h,l,p),q(l,f,a),K(f,d),C(h,f,i),C(u,l,i);for(o=0;o<16;o++)a[o+16]=h[o],a[o+32]=u[o],a[o+48]=f[o],a[o+64]=l[o];var y=a.subarray(32),g=a.subarray(16);return j(y,y),q(g,g,y),M(t,g),0}function D(t,e){return Y(t,e,s)}function V(t,e){return i(e,32),D(t,e)}function H(t,e,r){var n=new Uint8Array(32);return Y(n,r,e),b(t,o,n,x)}U.prototype.blocks=function(t,e,r){for(var n,i,o,s,a,h,c,f,u,l,d,p,y,g,w,m,v,b,x,E=this.fin?0:2048,A=this.h[0],_=this.h[1],P=this.h[2],U=this.h[3],S=this.h[4],B=this.h[5],k=this.h[6],I=this.h[7],T=this.h[8],L=this.h[9],C=this.r[0],M=this.r[1],O=this.r[2],R=this.r[3],N=this.r[4],Z=this.r[5],z=this.r[6],q=this.r[7],K=this.r[8],j=this.r[9];r>=16;)A+=8191&(n=255&t[e+0]|(255&t[e+1])<<8),_+=(n>>>13|(i=255&t[e+2]|(255&t[e+3])<<8)<<3)&8191,P+=(i>>>10|(o=255&t[e+4]|(255&t[e+5])<<8)<<6)&8191,U+=(o>>>7|(s=255&t[e+6]|(255&t[e+7])<<8)<<9)&8191,S+=(s>>>4|(a=255&t[e+8]|(255&t[e+9])<<8)<<12)&8191,B+=a>>>1&8191,k+=(a>>>14|(h=255&t[e+10]|(255&t[e+11])<<8)<<2)&8191,I+=(h>>>11|(c=255&t[e+12]|(255&t[e+13])<<8)<<5)&8191,T+=(c>>>8|(f=255&t[e+14]|(255&t[e+15])<<8)<<8)&8191,L+=f>>>5|E,u=(l=(u=0)+A*C+5*j*_+5*K*P+5*q*U+5*z*S)>>>13,l&=8191,l+=5*Z*B+5*N*k+5*R*I+5*O*T+5*M*L,u+=l>>>13,l&=8191,u=(d=u+A*M+_*C+5*j*P+5*K*U+5*q*S)>>>13,d&=8191,d+=5*z*B+5*Z*k+5*N*I+5*R*T+5*O*L,u+=d>>>
113,d&=8191,u=(p=u+A*O+_*M+P*C+5*j*U+5*K*S)>>>13,p&=8191,p+=5*q*B+5*z*k+5*Z*I+5*N*T+5*R*L,u+=p>>>13,p&=8191,u=(y=u+A*R+_*O+P*M+U*C+5*j*S)>>>13,y&=8191,y+=5*K*B+5*q*k+5*z*I+5*Z*T+5*N*L,u+=y>>>13,y&=8191,u=(g=u+A*N+_*R+P*O+U*M+S*C)>>>13,g&=8191,g+=5*j*B+5*K*k+5*q*I+5*z*T+5*Z*L,u+=g>>>13,g&=8191,u=(w=u+A*Z+_*N+P*R+U*O+S*M)>>>13,w&=8191,w+=B*C+5*j*k+5*K*I+5*q*T+5*z*L,u+=w>>>13,w&=8191,u=(m=u+A*z+_*Z+P*N+U*R+S*O)>>>13,m&=8191,m+=B*M+k*C+5*j*I+5*K*T+5*q*L,u+=m>>>13,m&=8191,u=(v=u+A*q+_*z+P*Z+U*N+S*R)>>>13,v&=8191,v+=B*O+k*M+I*C+5*j*T+5*K*L,u+=v>>>13,v&=8191,u=(b=u+A*K+_*q+P*z+U*Z+S*N)>>>13,b&=8191,b+=B*R+k*O+I*M+T*C+5*j*L,u+=b>>>13,b&=8191,u=(x=u+A*j+_*K+P*q+U*z+S*Z)>>>13,x&=8191,x+=B*N+k*R+I*O+T*M+L*C,u+=x>>>13,x&=8191,l=8191&(u=(u=(u<<2)+u|0)+l|0),u>>>=13,d+=u,A=l,_=d,P=p,U=y,S=g,B=w,k=m,I=v,T=b,L=x,e+=16,r-=16;this.h[0]=A,this.h[1]=_,this.h[2]=P,this.h[3]=U,this.h[4]=S,this.h[5]=B,this.h[6]=k,this.h[7]=I,this.h[8]=T,this.h[9]=L},U.prototype.finish=function(t,e){var r,n,i,o,s=new Uint16Array(10);if(this.leftover){for(o=this.leftover,this.buffer[o++]=1;o<16;o++)this.buffer[o]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,o=2;o<10;o++)this.h[o]+=r,r=this.h[o]>>>13,this.h[o]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,s[0]=this.h[0]+5,r=s[0]>>>13,s[0]&=8191,o=1;o<10;o++)s[o]=this.h[o]+r,r=s[o]>>>13,s[o]&=8191;for(s[9]-=8192,n=(1^r)-1,o=0;o<10;o++)s[o]&=n;for(o=0,n=~n;o<10;o++)this.h[o]=this.h[o]&n|s[o];for(o=1,this.h[0]=(this.h[0]|this.h[1]<<13)&65535,this.h[1]=(this.h[1]>>>3|this.h[2]<<10)&65535,this.h[2]=(this.h[2]>>>6|this.h[3]<<7)&65535,this.h[3]=(this.h[3]>>>9|this.h[4]<<4)&65535,this.h[4]=(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14)&65535,this.h[5]=(this.h[6]>>>2|this.h[7]<<11)&65535,this.h[6]=(this.h[7]>>>5|this.h[8]<<8)&65535,this.h[7]=(this.h[8]>
1>>8|this.h[9]<<5)&65535,i=this.h[0]+this.pad[0],this.h[0]=65535&i;o<8;o++)i=(this.h[o]+this.pad[o]|0)+(i>>>16)|0,this.h[o]=65535&i;t[e+0]=this.h[0]>>>0&255,t[e+1]=this.h[0]>>>8&255,t[e+2]=this.h[1]>>>0&255,t[e+3]=this.h[1]>>>8&255,t[e+4]=this.h[2]>>>0&255,t[e+5]=this.h[2]>>>8&255,t[e+6]=this.h[3]>>>0&255,t[e+7]=this.h[3]>>>8&255,t[e+8]=this.h[4]>>>0&255,t[e+9]=this.h[4]>>>8&255,t[e+10]=this.h[5]>>>0&255,t[e+11]=this.h[5]>>>8&255,t[e+12]=this.h[6]>>>0&255,t[e+13]=this.h[6]>>>8&255,t[e+14]=this.h[7]>>>0&255,t[e+15]=this.h[7]>>>8&255},U.prototype.update=function(t,e,r){var n,i;if(this.leftover){for((i=16-this.leftover)>r&&(i=r),n=0;n<i;n++)this.buffer[this.leftover+n]=t[e+n];if(r-=i,e+=i,this.leftover+=i,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(r>=16&&(i=r-r%16,this.blocks(t,e,i),e+=i,r-=i),r){for(n=0;n<r;n++)this.buffer[this.leftover+n]=t[e+n];this.leftover+=r}};var G=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,
11126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function $(t,e,r,n){for(var i,o,s,a,h,c,f,u,l,d,p,y,g,w,m,v,b,x,E,A,_,P,U,S,B,k,I=new Int32Array(16),T=new Int32Array(16),L=t[0],C=t[1],M=t[2],O=t[3],R=t[4],N=t[5],Z=t[6],z=t[7],q=e[0],K=e[1],j=e[2],F=e[3],Y=e[4],D=e[5],V=e[6],H=e[7],$=0;n>=128;){for(E=0;E<16;E++)A=8*E+$,I[E]=r[A+0]<<24|r[A+1]<<16|r[A+2]<<8|r[A+3],T[E]=r[A+4]<<24|r[A+5]<<16|r[A+6]<<8|r[A+7];for(E=0;E<80;E++)if(i=L,o=C,s=M,a=O,h=R,c=N,f=Z,u=z,l=q,d=K,p=j,y=F,g=Y,w=D,m=V,v=H,_=z,U=65535&(P=H),S=P>>>16,B=65535&_,k=_>>>16,_=(R>>>14|Y<<18)^(R>>>18|Y<<14)^(Y>>>9|R<<23),U+=65535&(P=(Y>>>14|R<<18)^(Y>>>18|R<<14)^(R>>>9|Y<<23)),S+=P>>>16,B+=65535&_,k+=_>>>16,_=R&N^~R&Z,U+=65535&(P=Y&D^~Y&V),S+=P>>>16,B+=65535&_,k+=_>>>16,_=G[2*E],U+=65535&(P=G[2*E+1]),S+=P>>>16,B+=65535&_,k+=_>>>16,_=I[E%16],U+=65535&(P=T[E%16]),S+=P>>>16,B+=65535&_,k+=_>>>16,S+=U>>>16,B+=S>>>16,k+=B>>>16,b=65535&B|k<<16,x=65535&U|S<<16,_=b,U=65535&(P=x),S=P>>>16,B=65535&_,k=_>>>16,_=(L>>>28|q<<4)^(q>>>2|L<<30)^(q>>>7|L<<25),U+=65535&(P=(q>>>28|L<<4)^(L>>>2|q<<30)^(L>>>7|q<<25)),S+=P>>>16,B+=65535&_,k+=_>>>16,_=L&C^L&M^C&M,U+=65535&(P=q&K^q&j^K&j),S+=P>>>16,B+=65535&_,k+=_>>>16,S+=U>>>16,B+=S>>>16,k+=B>>>16,u=65535&B|k<<16,v=65535&U|S<<16,_=a,U=65535&(P=y),S=P>>>16,B=65535&_,k=_>>>16,_=b,U+=65535&(P=x),S+=P>>>16,B+=65535&_,k+=_>>>16,S+=U>>>16,B+=S>>>16,k+=B>>>16,a=65535&B|k<<16,y=65535&U|S<<16,C=i,M=o,O=s,R=a,N=h,Z=c,z=f,L=u,K=l,j=d,F=p,Y=y,D=g,V=w,H=m,q=v,E%16==15)for(A=0;A<16;A++)_=I[A],U=65535&(P=T[A]),S=P>>>16,B=65535&_,k=_>>>16,_=I[(A+9)%16],U+=65535&(P=T[(A+9)%16]),S+=P>>>16,B+=65535&_,k+=_>>>16,_=((b=I[(A+1)%16])>>>1|(x=T[(A+1)%16])<<31)^(b>>>8|x<<24)^b>>>7,U+=65535&(P=(x>>>1|b<<31)^(x>>>8|b<<24)^(x>>>7|b<<25)),S+=P>>>16,B+=65535&_,k+=_>>>16,_=((b=I[(A+14)%16])>>>19|(x=T[(A+14)%16])<<13)^(x>>>29|b<<3)^b>>>6,U+=65535&(P=(x>>>19|b<<13)^(b>>>29|x<<3)^(x>>>6|b<<26)),S+=P>>>16,B+=65535&_,k+=_>>>16,S+=U>>>16,B+=S>>>16,k+=B>>>16,I[A]=65535&B|k<<16,T[A]=65535&U|S<<16;_=L,U=65535&(P=q),S=P>>>16,B=65535&_,k=_>>>16,_=t[0],U+=65535&(P=e[0]),S+=P>>>16,B+=65535&_,k+=_>>>16,S+=U>>>16,B+=S>>>16,k+=B>>>16,t[0]=L=65535&B|k<<16,e[0]=q=65535&U|S<<16,_=C,U=65535&(P=K),S=P>>>16,B=65535&_,k=_>>>16,_=t[1],U+=65535&(P=e[1]),S+=P>>>16,B+=65535&_,k+=_>>>16,S+=U>>>16,B+=S>>>16,k+=B>>>16,t[1]=C=65535&B|k<<16,e[1]=K=65535&U|S<<16,_=M,U=65535&(P=j),S=P>>>16,B=65535&_,k=_>>>16,_=t[2],U+=65535&(P=e[2]),S+=P>>>16,B+=65535&_,k+=_>>>16,S+=U>>>16,B+=S>>>16,k+=B>>>16,t[2]=M=65535&B|k<<16,e[2]=j=65535&U|S<<16,_=O,U=65535&(P=F),S=P>>>16,B=65535&_,k=_>>>16,_=t[3],U+=65535&(P=e[3]),S+=P>>>16,B+=65535&_,k+=_>>>16,S+=U>>>16,B+=S>>>16,k+=B>>>16,t[3]=O=65535&B|k<<16,e[3]=F=65535&U|S<<16,_=R,U=65535&(P=Y),S=P>>>16,B=65535&_,k=_>>>16,_=t[4],U+=65535&(P=e[4]),S+=P>>>16,B+=65535&_,k+=_>>>16,S+=U>>>16,B+=S>>>16,k+=B>>>16,t[4]=R=65535&B|k<<16,e[4]=Y=65535&U|S<<16,_=N,U=65535&(P=D),S=P>>>16,B=65535&_,k=_>>>16,_=t[5],U+=65535&(P=e[5]),S+=P>>>16,B+=65535&_,k+=_>>>16,S+=U>>>16,B+=S>>>16,k+=B>>>16,t[5]=N=65535&B|k<<16,e[5]=D=65535&U|S<<16,_=Z,U=65535&(P=V),S=P>>>16,B=65535&_,k=_>>>16,_=t[6],U+=65535&(P=e[6]),S+=P>>>16,B+=65535&_,k+=_>>>16,S+=U>>>16,B+=S>>>16,k+=B>>>16,t[6]=Z=65535&B|k<<16,e[6]=V=65535&U|S<<16,_=z,U=65535&(P=H),S=P>>>16,B=65535&_,k=_>>>16,_=t[7],U+=65535&(P=e[7]),S+=P>>>16,B+=65535&_,k+=_>>>16,S+=U>>>16,B+=S>>>16,k+=B>>>16,t[7]=z=65535&B|k<<16,e[7]=H=65535&U|S<<16,$+=128,n-=128}return n}function W(t,e,r){var n,i=new Int32Array(8),o=new Int32Array(8),s=new Uint8Array(256),a=r;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,o[0]=4089235720,o[1]=2227873595,o[2]=4271175723,o[3]=1595750129,o[4]=2917565137,o[5]=725511199,o[6]=4215389547,o[7]=327033209,$(i,o,e,r),r%=128,n=0;n<r;n++)s[n]=e[a-r+n];for(s[r]=128,s[(r=256-128*(r<112?1:0))-9]=0,y(s,r-8,a/536870912|0,a<<3),$(i,o,s,r),n=0;n<8;n++)y(t,8*n,i[n],o[n]);return 0}function Q(t,e){var r=n(),i=n(),o=n(),s=n(),a=n(),h=n(),c=n(),f=n(),l=n();z(r,t[1],t[0]),z(l,e[1],e[0]),q(r,r,l),Z(i,t[0],t[1]),Z(l,e[0],e[1]),q(i,i,l),q(o,t[3],e[3]),q(o,o,u),q(s,t[2],e[2]),Z(s,s,s),z(a,i,r),z(h,s,o),Z(c,s,o),Z(f,i,r),q(t[0],a,h),q(t[1],f,c),q(t[2],c,h),q(t[3],a,f)}function J(t,e,r){var n;for(n=0;n<4;n++)C(t[n],e[n],r)}function X(t,e){var r=n(),i=n(),o=n();j(o,e[2]),q(r,e[0],o),q(i,e[1],o),M(t,i),t[31]^=R(r)<<7}function tt(t,e,r){var n,i;for(T(t[0],a),T(t[1],h),T(t[2],h),T(t[3],a),i=255;i>=0;--i)J(t,e,n=r[i/8|0]>>(7&i)&1),Q(e,t),Q(t,t),J(t,e,n)}function te(t,e){var r=[n(),n(),n(),n()];T(r[0],l),T(r[1],d),T(r[2],h),q(r[3],l,d),tt(t,r,e)}function tr(t,e,r){var o,s=new Uint8Array(64),a=[n(),n(),n(),n()];for(r||i(e,32),W(s,e,32),s[0]&=248,s[31]&=127,s[31]|=64,te(a,s),X(t,a),o=0;o<32;o++)e[o+32]=t[o];return 0}var tn=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function ti(t,e){var r,n,i,o;for(n=63;n>=32;--n){for(r=0,i=n-32,o=n-12;i<o;++i)e[i]+=r-16*e[n]*tn[i-(n-32)],r=Math.floor((e[i]+128)/256),e[i]-=256*r;e[i]+=r,e[n]=0}for(i=0,r=0;i<32;i++)e[i]+=r-(e[31]>>4)*tn[i],r=e[i]>>8,e[i]&=255;for(i=0;i<32;i++)e[i]-=r*tn[i];for(n=0;n<32;n++)e[n+1]+=e[n]>>8,t[n]=255&e[n]}function to(t){var e,r=new Float64Array(64);for(e=0;e<64;e++)r[e]=t[e];for(e=0;e<64;e++)t[e]=0;ti(t,r)}function ts(t,e,r,i){var o,s,a=new Uint8Array(64),h=new Uint8Array(64),c=new Uint8Array(64),f=new Float64Array(64),u=[n(),n(),n(),n()];for(W(a,i,32),a[0]&=248,a[31]&=127,a[31]|=64,o=0;o<r;o++)t[64+o]=e[o];for(o=0;o<32;o++)t[32+o]=a[32+o];for(W(c,t.subarray(32),r+32),to(c),te(u,c),X(t,u),o=32;o<64;o++)t[o]=i[o];for(W(h,t,r+64),to(h),o=0;o<64;o++)f[o]=0;for(o=0;o<32;o++)f[o]=c[o];for(o=0;o<32;o++)for(s=0;s<32;s++)f[o+s]+=h[o]*a[s];return ti(t.subarray(32),f),r+64}function ta(t,e,r,i){var o,s,c,u,l,d,y,g,w=new Uint8Array(32),v=new Uint8Array(64),b=[n(),n(),n(),n()],x=[n(),n(),n(),n()];if(r<64||(o=n(),s=n(),c=n(),u=n(),l=n(),d=n(),y=n(),(T(x[2],h),N(x[1],i),K(c,x[1]),q(u,c,f),z(c,c,x[2]),Z(u,x[2],u),K(l,u),K(d,l),q(y,d,l),q(o,y,c),q(o,o,u),F(o,o),q(o,o,c),q(o,o,u),q(o,o,u),q(x[0],o,u),K(s,x[0]),q(s,s,u),O(s,c)&&q(x[0],x[0],p),K(s,x[0]),q(s,s,u),O(s,c))?-1:(R(x[0])===i[31]>>7&&z(x[0],a,x[0]),q(x[3],x[0],x[1]),0)))return -1;for(g=0;g<r;g++)t[g]=e[g];for(g=0;g<32;g++)t[g+32]=i[g];if(W(v,t,r),to(v),tt(b,x,v),te(x,e.subarray(32)),Q(b,x),X(w,b),r-=64,m(e,0,w,0)){for(g=0;g<r;g++)t[g]=0;return -1}for(g=0;g<r;g++)t[g]=e[g+64];return r}function th(t,e){if(32!==t.length)throw Error("bad key size");if(24!==e.length)throw Error("bad nonce size")}function tc(){for(var t=0;t<arguments.length;t++)if(!(arguments[t]instanceof Uint8Array))throw TypeError("unexpected type, use Uint8Array")}function tf(t){for(var e=0;e<t.length;e++)t[e]=0}t.lowlevel={crypto_core_hsalsa20:b,crypto_stream_xor:P,crypto_stream
1:_,crypto_stream_salsa20_xor:E,crypto_stream_salsa20:A,crypto_onetimeauth:S,crypto_onetimeauth_verify:B,crypto_verify_16:w,crypto_verify_32:m,crypto_secretbox:k,crypto_secretbox_open:I,crypto_scalarmult:Y,crypto_scalarmult_base:D,crypto_box_beforenm:H,crypto_box_afternm:k,crypto_box:function(t,e,r,n,i,o){var s=new Uint8Array(32);return H(s,i,o),k(t,e,r,n,s)},crypto_box_open:function(t,e,r,n,i,o){var s=new Uint8Array(32);return H(s,i,o),I(t,e,r,n,s)},crypto_box_keypair:V,crypto_hash:W,crypto_sign:ts,crypto_sign_keypair:tr,crypto_sign_open:ta,crypto_secretbox_KEYBYTES:32,crypto_secretbox_NONCEBYTES:24,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:16,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:32,crypto_box_SECRETKEYBYTES:32,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:24,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:64,crypto_sign_PUBLICKEYBYTES:32,crypto_sign_SECRETKEYBYTES:64,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64,gf:n,D:f,L:tn,pack:X,pack25519:M,unpack25519:N,M:q,A:Z,S:K,Z:z,pow2523:F,add:Q,set25519:T,modL:ti,scalarmult:tt,scalarbase:te},t.randomBytes=function(t){var e=new Uint8Array(t);return i(e,t),e},t.secretbox=function(t,e,r){tc(t,e,r),th(r,e);for(var n=new Uint8Array(32+t.length),i=new Uint8Array(n.length),o=0;o<t.length;o++)n[o+32]=t[o];return k(i,n,n.length,e,r),i.subarray(16)},t.secretbox.open=function(t,e,r){tc(t,e,r),th(r,e);for(var n=new Uint8Array(16+t.length),i=new Uint8Array(n.length),o=0;o<t.length;o++)n[o+16]=t[o];return n.length<32||0!==I(i,n,n.length,e,r)?null:i.subarray(32)},t.secretbox.keyLength=32,t.secretbox.nonceLength=24,t.secretbox.overheadLength=16,t.scalarMult=function(t,e){if(tc(t,e),32!==t.length)throw Error("bad n size");if(32!==e.length)throw Error("bad p size");var r=new Uint8Array(32);return Y(r,t,e),r},t.scalarMult.base=function(t){if(tc(t),32!==t.length)throw Error("bad n size");var e=new Uint8Array(32);return D(e,t),e},t.scalarMult.scalarLength=32,t.scalarMult.groupElementLength=32,t.box=function(e,r,n,i){var o=t.box.before(n,i);return t.secretbox(e,r,o)},t.box.before=function(t,e){tc(t,e),function(t,e){if(32!==t.length)throw Error("bad public key size");if(32!==e.length)throw Error("bad secret key size")}(t,e);var r=new Uint8Array(32);return H(r,t,e),r},t.box.after=t.secretbox,t.box.open=function(e,r,n,i){var o=t.box.before(n,i);return t.secretbox.open(e,r,o)},t.box.open.after=t.secretbox.open,t.box.keyPair=function(){var t=new Uint8Array(32),e=new Uint8Array(32);return V(t,e),{publicKey:t,secretKey:e}},t.box.keyPair.fromSecretKey=function(t){if(tc(t),32!==t.length)throw Error("bad secret key size");var e=new Uint8Array(32);return D(e,t),{publicKey:e,secretKey:new Uint8Array(t)}},t.box.publicKeyLength=32,t.box.secretKeyLength=32,t.box.sharedKeyLength=32,t.box.nonceLength=24,t.box.overheadLength=t.secretbox.overheadLength,t.sign=function(t,e){if(tc(t,e),64!==e.length)throw Error("bad secret key size");var r=new Uint8Array(64+t.length);return ts(r,t,t.length,e),r},t.sign.open=function(t,e){if(tc(t,e),32!==e.length)throw Error("bad public key size");var r=new Uint8Array(t.length),n=ta(r,t,t.length,e);if(n<0)return null;for(var i=new Uint8Array(n),o=0;o<i.length;o++)i[o]=r[o];return i},t.sign.detached=function(e,r){for(var n=t.sign(e,r),i=new Uint8Array(64),o=0;o<i.length;o++)i[o]=n[o];return i},t.sign.detached.verify=function(t,e,r){if(tc(t,e,r),64!==e.length)throw Error("bad signature size");if(32!==r.length)throw Error("bad public key size");var n,i=new Uint8Array(64+t.length),o=new Uint8Array(64+t.length);for(n=0;n<64;n++)i[n]=e[n];for(n=0;n<t.length;n++)i[n+64]=t[n];return ta(o,i,i.length,r)>=0},t.sign.keyPair=function(){var t=new Uint8Array(32),e=new Uint8Array(64);return tr(t,e),{publicKey:t,secretKey:e}},t.sign.keyPair.fromSecretKey=function(t){if(tc(t),64!==t.length)throw Error("bad secret key size");for(var e=new Uint8Array(32),r=0;r<e.length;r++)e[r]=t[32+r];return{publicKey:e,secretKey:new Uint8Array(t)}},t.sign.keyPair.fromSeed=function(t){if(tc(t),32!==t.length)throw Error("bad seed size");for(var e=new Uint8Array(32),r=new Uint8Array(64),n=0;n<32;n++)r[n]=t[n];return tr(e,r,!0),{publicKey:e,secretKey:r}},t.sign.publicKeyLength=32,t.sign.secretKeyLength=64,t.sign.seedLength=32,t.sign.signatureLength=64,t.hash=function(t){tc(t);var e=new Uint8Array(64);return W(e,t,t.length),e}
1,t.hash.hashLength=64,t.verify=function(t,e){return tc(t,e),0!==t.length&&0!==e.length&&t.length===e.length&&0===g(t,0,e,0,t.length)},t.setPRNG=function(t){i=t},(e="undefined"!=typeof self?self.crypto||self.msCrypto:null)&&e.getRandomValues?t.setPRNG(function(t,r){var n,i=new Uint8Array(r);for(n=0;n<r;n+=65536)e.getRandomValues(i.subarray(n,n+Math.min(r-n,65536)));for(n=0;n<r;n++)t[n]=i[n];tf(i)}):(e=r(78848))&&e.randomBytes&&t.setPRNG(function(t,r){var n,i=e.randomBytes(r);for(n=0;n<r;n++)t[n]=i[n];tf(i)})}(t.exports?t.exports:self.nacl=self.nacl||{})},56171:function(t,e,r){"use strict";r.d(e,{kL:function(){return _},SolanaPrivateKeyProvider:function(){return B},Os:function(){return U}});var n=r(31686),i=r(91785),o=r(53248),s=r(78687),a=r(55037),h=r(5845),c=r(66315),f=r.n(c),u=r(64024),l=r(56127),d=r(99420),p=r.n(d),y=r(82957).Buffer;let g=p().lowlevel;var w=r(82957).Buffer;function m(t){let{chainId:e}=t;return(0,i.UZ)([(t,r,n,i)=>"solana_chainId"===t.method?(r.result=e,i()):n(),(e,r,n,i)=>"solana_provider_config"===e.method?(r.result=t,i()):n()])}function v(t,e){return(0,i.Pk)(async(r,n,i)=>{let{method:o}=r;if(o!==t)return i();if(!e)throw Error(`WalletMiddleware - ${t} not provided`);let s=await e(r);n.result=s})}function b(t){let{getAccounts:e,requestAccounts:r,signTransaction:n,signAndSendTransaction:o,signAllTransactions:s,signMessage:a,getPrivateKey:h,getSecretKey:c}=t;return(0,i.UZ)([function(t){let{requestAccounts:e}=t;return(0,i.Pk)(async(t,r,n)=>{let{method:i}=t;if("requestAccounts"!==i)return n();if(!e)throw Error("WalletMiddleware - opts.requestAccounts not provided");let o=await e(t);r.result=o})}({requestAccounts:r}),function(t){let{getAccounts:e}=t;return(0,i.Pk)(async(t,r,n)=>{let{method:i}=t;if("getAccounts"!==i)return n();if(!e)throw Error("WalletMiddleware - opts.getAccounts not provided");let o=await e(t);r.result=o})}({getAccounts:e}),v("signTransaction",n),v("signAndSendTransaction",o),v("signAllTransactions",s),v("signMessage",a),v("solanaPrivateKey",h),v("private_key",h),v("solanaSecretKey",c)])}class x extends s.Zk{constructor(t){let{config:e,state:r}=t;super({config:{chainConfig:(0,n.Z)((0,n.Z)({},e.chainConfig),{},{chainNamespace:o.EN.SOLANA})},state:r})}async switchChain(t){throw o.RM.unsupportedOperation("Chain switching is not supported by this adapter")}async setupProvider(t){let e=new i.eI,r=b(this.getProviderHandlers(t));e.push(r);let n=m(this.config.chainConfig);e.push(n);let o=this.getInjectedProviderProxy(t);o&&e.push(o);let s=(0,i.Xj)(e);this.updateProviderEngineProxy(s),await this.lookupNetwork()}async lookupNetwork(){let{chainConfig:t}=this.config;return this.update({chainId:t.chainId}),t.chainId||""}getInjectedProviderProxy(t){}}let E=t=>({requestAccounts:async()=>t.publicKey?[f().encode(t.publicKey.toBytes())]:[],getAccounts:async()=>t.publicKey?[f().encode(t.publicKey.toBytes())]:[],getPrivateKey:async()=>{throw h.PY.methodNotSupported()},getSecretKey:async()=>{throw h.PY.methodNotSupported()},signTransaction:async e=>await t.signTransaction(e.params.message),signMessage:async e=>(await t.signMessage(e.params.message,e.params.display)).signature,signAllTransactions:async e=>{var r,n;if(!(null!==(r=e.params)&&void 0!==r&&r.message)||!(null!==(n=e.params)&&void 0!==n&&n.message.length))throw h.PY.invalidParams("message");return await t.signAllTransactions(e.params.message)},signAndSendTransaction:async e=>({signature:(await t.signAndSendTransaction(e.params.message)).signature})});function A(t){return(0,i.Pk)(async(e,r,n)=>{let i=await t.request(e);r.result=i})}class _ extends x{getProviderHandlers(t){return E(t)}getInjectedProviderProxy(t){return A(t)}}let P=t=>({requestAccounts:async()=>await t.request({method:"solana_requestAccounts",params:{}}),getAccounts:async()=>await t.request({method:"solana_requestAccounts",params:{}}),getPrivateKey:async()=>{throw h.PY.methodNotSupported()},getSecretKey:async()=>{throw h.PY.methodNotSupported()},signMessage:async e=>{var r;if(!(null!==(r=e.params)&&void 0!==r&&r.message))throw h.PY.invalidParams("message");return await t.signMessage(e.params.message)},signTransaction:async e=>{var r;if(!(null!==(r=e.params)&&void 0!==r&&r.message))throw h.PY.invali
1dParams("message");let n=e.params.message;return await t.signTransaction(n)},signAndSendTransaction:async e=>{var r;if(!(null!==(r=e.params)&&void 0!==r&&r.message))throw h.PY.invalidParams("message");let n=e.params.message;return{signature:await t.sendTransaction(n)}},signAllTransactions:async e=>{var r,n;if(!(null!==(r=e.params)&&void 0!==r&&r.message)||!(null!==(n=e.params)&&void 0!==n&&n.message.length))throw h.PY.invalidParams("message");let i=e.params.message;return await t.signAllTransactions(i)}});class U extends s.Zk{constructor(t){let{config:e,state:r}=t;super({config:{chainConfig:(0,n.Z)((0,n.Z)({},e.chainConfig),{},{chainNamespace:o.EN.SOLANA})},state:r})}async switchChain(t){await this.provider.request({method:"switchSolanaChain",params:[{chainId:t.chainId}]})}async addChain(t){super.addChain(t),await this.provider.request({method:"addNewChainConfig",params:[{chainId:t.chainId,chainName:t.displayName,rpcUrls:[t.rpcTarget],blockExplorerUrls:[t.blockExplorer],nativeCurrency:{name:t.tickerName,symbol:t.ticker,decimals:t.decimals||18}}]})}async setupProvider(t){this.handleInjectedProviderUpdate(t),await this.setupEngine(t)}async lookupNetwork(){if(!this.provider)throw h.gK.custom({message:"Torus solana provider is not initialized",code:4902});let{chainId:t}=this.config.chainConfig,e=await this.provider.request({method:"solana_chainId"}),r=(0,o.H2)(e.toString())?e:`0x${parseInt(e,10).toString(16)}`;if(t!==r)throw o.Ty.rpcConnectionError(`Invalid network, net_version is: ${r}, expected: ${t}`);return this.update({chainId:r}),this.emit("connect",{chainId:this.state.chainId}),this.emit("chainChanged",this.state.chainId),this.state.chainId}async setupEngine(t){let e=b(P(t)),r=A(t),n=new i.eI;n.push(e),n.push(r);let o=(0,i.Xj)(n);this.updateProviderEngineProxy(o),await this.lookupNetwork()}async handleInjectedProviderUpdate(t){t.on("accountsChanged",async t=>{this.emit("accountsChanged",t)}),t.on("chainChanged",async e=>{let r=(0,o.H2)(e)?e:`0x${parseInt(e,10).toString(16)}`;this.configure({chainConfig:(0,n.Z)((0,n.Z)({},this.config.chainConfig),{},{chainId:r})}),await this.setupProvider(t)})}}async function S(t){let{privKey:e,getProviderEngineProxy:r}=t;if("string"!=typeof e)throw o.Ty.invalidParams("privKey must be a string");let n=u.RG.fromSecretKey(w.from(e,"hex"));return{requestAccounts:async()=>[n.publicKey.toBase58()],getAccounts:async()=>[n.publicKey.toBase58()],getPrivateKey:async()=>e,getSecretKey:async()=>f().encode(n.secretKey),signTransaction:async t=>{var e;if(!(null!==(e=t.params)&&void 0!==e&&e.message))throw h.PY.invalidParams("message");let r=t.params.message;return void 0!==r.version||r instanceof u.GS?r.sign([n]):r.partialSign(n),r},signMessage:async t=>{var e;if(!(null!==(e=t.params)&&void 0!==e&&e.message))throw h.PY.invalidParams("message");return p().sign.detached(t.params.message,n.secretKey)},signAndSendTransaction:async t=>{var e;if(!(null!==(e=t.params)&&void 0!==e&&e.message))throw h.PY.invalidParams("message");let i=r();if(!i)throw h.gK.custom({message:"Provider is not initialized",code:4902});let o=t.params.message;return void 0!==o.version||o instanceof u.GS?o.sign([n]):o.partialSign(n),{signature:await i.request({method:"sendTransaction",params:[w.from(o.serialize()).toString("base64"),{encoding:"base64",preflightCommitment:"confirmed"}]})}},signAllTransactions:async t=>{var e,r,i;if(!(null!==(e=t.params)&&void 0!==e&&e.message)||!(null!==(r=t.params)&&void 0!==r&&r.message.length))throw h.PY.invalidParams("message");let o=null===(i=t.params)||void 0===i?void 0:i.message;for(let t of o||[])void 0!==t.version||t instanceof u.GS?t.sign([n]):t.partialSign(n);return o}}}class B extends s.Zk{constructor(t){let{config:e,state:r}=t;super({config:{chainConfig:(0,n.Z)((0,n.Z)({},e.chainConfig),{},{chainNamespace:o.EN.SOLANA})},state:r})}async enable(){if(!this.state.privateKey)throw h.gK.custom({message:"Private key is not found in state, plz pass it in constructor state param",code:4902});return await this.setupProvider(this.state.privateKey),this._providerEngineProxy.request({method:"eth_accounts"})}getEd25519Key(t){return(function(t){let e;e="string"==typeof t?y.from(t,"hex"):t;let r=new Uint8Array(64),n=[g.gf(),g.gf(),g.gf(),g.gf()],i=new Uint8Array([...new Uint8Array(e),...new Uint8Array(32)]),o=new Uint8Array(32);g.crypto_hash(r,i,32),r[0]&=248,r[31]&=127,r[31]|=64,g.scalarbase(n,r),g.pack(o,n);for(let t=0;t<32;t+=1)i[t+32]=o[t];return{sk:y.from(i),pk:y.from(o)}})(t).sk.toString("hex").padStart(128,"0")}async setupProvider(t){let e=b(await S({privKey:t,getProviderEngineProxy:this.getProviderEngineProxy.bind(this)})),r=new i.eI,{networkMiddleware:n}=function(t){let{rpcTarget:e}=t,r=(0,a.v$)({rpcTarget:e});return{networkMiddleware:(0,i.UZ)([m(t),r]),fetchMiddleware:r}}(this.config.chainConfig);r.push(this.getChainSwitchMiddleware()),r.push(this.getAccountMiddleware()),r.push(e),r.push(n);let o=(0,i.Xj)(r);this.updateProviderEngineProxy(o),await this.lookupNetwork()}async updateAccount(t){if(!this._providerEngineProxy)throw h.gK.custom({message:"Provider is not initialized",code:4902});await this._providerEngineProxy.request({method:"solanaPrivateKey"})!==t.privateKey&&(await this.setupProvider(t.privateKey),this.emit
1("accountsChanged",{accounts:await this._providerEngineProxy.request({method:"requestAccounts"})}))}async switchChain(t){if(!this._providerEngineProxy)throw h.gK.custom({message:"Provider is not initialized",code:4902});let e=this.getChainConfig(t.chainId);this.update({chainId:"loading"}),this.configure({chainConfig:e});let r=await this._providerEngineProxy.request({method:"solanaPrivateKey"});await this.setupProvider(r)}async lookupNetwork(){if(!this._providerEngineProxy)throw h.gK.custom({message:"Provider is not initialized",code:4902});let t=await this._providerEngineProxy.request({method:"getHealth",params:[]}),{chainConfig:e}=this.config;if("ok"!==t)throw o.Ty.rpcConnectionError(`Failed to lookup network for following rpc target: ${e.rpcTarget}`);return this.update({chainId:e.chainId}),this.state.chainId!==e.chainId&&(this.emit("chainChanged",this.state.chainId),this.emit("connect",{chainId:this.state.chainId})),this.state.chainId}getChainSwitchMiddleware(){return function(t){let{addNewChainConfig:e,switchSolanaChain:r}=t;return(0,i.UZ)([v("addSolanaChain",e),v("switchSolanaChain",r)])}({addNewChainConfig:async t=>{if(!t.params)throw h.PY.invalidParams("Missing request params");let{chainId:e,chainName:r,rpcUrls:n,blockExplorerUrls:i,nativeCurrency:s}=t.params;if(!e)throw h.PY.invalidParams("Missing chainId in chainParams");if(!n||0===n.length)throw h.PY.invalidParams("Missing rpcUrls in chainParams");if(!s)throw h.PY.invalidParams("Missing nativeCurrency in chainParams");this.addChain({chainNamespace:o.EN.SOLANA,chainId:e,ticker:(null==s?void 0:s.symbol)||"SOL",tickerName:(null==s?void 0:s.name)||"Solana",displayName:r,rpcTarget:n[0],blockExplorer:(null==i?void 0:i[0])||"",decimals:(null==s?void 0:s.decimals)||9})},switchSolanaChain:async t=>{if(!t.params)throw h.PY.invalidParams("Missing request params");if(!t.params.chainId)throw h.PY.invalidParams("Missing chainId");await this.switchChain(t.params)}})}getAccountMiddleware(){return function(t){let{updatePrivatekey:e}=t;return(0,i.UZ)([v("updateAccount",e)])}({updatePrivatekey:async t=>{if(!t.params)throw h.PY.invalidParams("Missing request params");if(!t.params.privateKey)throw h.PY.invalidParams("Missing privateKey");let{privateKey:e}=t.params;await this.updateAccount({privateKey:e})}})}}(0,l.Z)(B,"getProviderInstance",async t=>{let e=new B({config:{chainConfig:t.chainConfig}});return await e.setupProvider(t.privKey),e})},76239:function(t){"use strict";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 n=0;n<t.length;n++){var i=t.charAt(n),o=i.charCodeAt(0);if(255!==e[o])throw TypeError(i+" is ambiguous");e[o]=n}var s=t.length,a=t.charAt(0),h=Math.log(s)/Math.log(256),c=Math.log(256)/Math.log(s);function f(t){if("string"!=typeof t)throw TypeError("Expected String");if(0===t.length)return new Uint8Array;for(var r=0,n=0,i=0;t[r]===a;)n++,r++;for(var o=(t.length-r)*h+1>>>0,c=new Uint8Array(o);t[r];){var f=e[t.charCodeAt(r)];if(255===f)return;for(var u=0,l=o-1;(0!==f||u<i)&&-1!==l;l--,u++)f+=s*c[l]>>>0,c[l]=f%256>>>0,f=f/256>>>0;if(0!==f)throw Error("Non-zero carry");i=u,r++}for(var d=o-i;d!==o&&0===c[d];)d++;for(var p=new Uint8Array(n+(o-d)),y=n;d!==o;)p[y++]=c[d++];return p}return{encode:function(e){if(e instanceof Uint8Array||(ArrayBuffer.isView(e)?e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):Array.isArray(e)&&(e=Uint8Array.from(e))),!(e instanceof Uint8Array))throw TypeError("Expected Uint8Array");if(0===e.length)return"";for(var r=0,n=0,i=0,o=e.length;i!==o&&0===e[i];)i++,r++;for(var h=(o-i)*c+1>>>0,f=new Uint8Array(h);i!==o;){for(var u=e[i],l=0,d=h-1;(0!==u||l<n)&&-1!==d;d--,l++)u+=256*f[d]>>>0,f[d]=u%s>>>0,u=u/s>>>0;if(0!==u)throw Error("Non-zero carry");n=l,i++}for(var p=h-n;p!==h&&0===f[p];)p++;for(var y=a.repeat(r);p<h;++p)y+=t.charAt(f[p]);return y},decodeUnsafe:f,decode:function(t){var e=f(t);if(e)return e;throw Error("Non-base"+s+" character")}}}},66315:function(t,e,r){let n=r(76239);t.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},18282:function(t,e,r){"use strict";var n=r(73306).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;
1i++){var o=t.charAt(i),s=o.charCodeAt(0);if(255!==e[s])throw TypeError(o+" is ambiguous");e[s]=i}var a=t.length,h=t.charAt(0),c=Math.log(a)/Math.log(256),f=Math.log(256)/Math.log(a);function u(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]===h;)i++,r++;for(var s=(t.length-r)*c+1>>>0,f=new Uint8Array(s);t[r];){var u=e[t.charCodeAt(r)];if(255===u)return;for(var l=0,d=s-1;(0!==u||l<o)&&-1!==d;d--,l++)u+=a*f[d]>>>0,f[d]=u%256>>>0,u=u/256>>>0;if(0!==u)throw Error("Non-zero carry");o=l,r++}for(var p=s-o;p!==s&&0===f[p];)p++;var y=n.allocUnsafe(i+(s-p));y.fill(0,0,i);for(var g=i;p!==s;)y[g++]=f[p++];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 c=(s-o)*f+1>>>0,u=new Uint8Array(c);o!==s;){for(var l=e[o],d=0,p=c-1;(0!==l||d<i)&&-1!==p;p--,d++)l+=256*u[p]>>>0,u[p]=l%a>>>0,l=l/a>>>0;if(0!==l)throw Error("Non-zero carry");i=d,o++}for(var y=c-i;y!==c&&0===u[y];)y++;for(var g=h.repeat(r);y<c;++y)g+=t.charAt(u[y]);return g},decodeUnsafe:u,decode:function(t){var e=u(t);if(e)return e;throw Error("Non-base"+a+" character")}}}},21089:function(t,e,r){"use strict";var n=r(82957).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.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}}},88806:function(t,e,r){"use strict";var n=r(82957).Buffer,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 a=t.length-1;a>=0;a--)(i=t[a])&&(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},a=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},h=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 c=h(r(44373)),f=h(r(59147)),u=a(r(65768)),l=new("function"!=typeof TextDecoder?u.TextDecoder:TextDecoder)("utf-8",{fatal:!0});e.baseEncode=function(t){return"string"==typeof t&&(t=n.from(t,"utf8")),f.default.encode(n.from(t))},e.baseDecode=function(t){return n.from(f.default.decode(t))};class d 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=d;class p{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 c.default(t).toArray("le",8)))}writeU128(t){this.maybeResize(),this.writeBuffer(n.from(new c.default(t).toArray("le",16)))}writeU256(t){this.maybeResize(),this.writeBuffer(n.from(new c.default(t).toArray("le",32)))}writeU512(t){this.maybeResize(),this.writeBuffer(n.from(new c.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 d("Reached the end of buffer when deserializing");throw t}}}e.BinaryWriter=p;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 c.default(t,"le")}readU128(){let t=this.readBuffer(16);return new c.default(t,"le")}readU256(){let t=this.readBuffer(32);return new c.default(t,"le")}readU512(){let t=this.readBuffer(64);return new c.default(t,"le")}readBuffer(t){if(this.offset+t>
1this.buf.length)throw new d(`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 l.decode(e)}catch(t){throw new d(`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 w(t){return t.charAt(0).toUpperCase()+t.slice(1)}function m(t,e,r,n,i){try{if("string"==typeof n)i[`write${w(n)}`](r);else if(n instanceof Array){if("number"==typeof n[0]){if(r.length!==n[0])throw new d(`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 d(`Expecting byte array of length ${n[1]}, but got ${r.length} bytes`);for(let e=0;e<n[1];e++)m(t,null,r[e],n[0],i)}else i.writeArray(r,r=>{m(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),m(t,e,r,n.type,i));break;case"map":i.writeU32(r.size),r.forEach((r,o)=>{m(t,e,o,n.key,i),m(t,e,r,n.value,i)});break;default:throw new d(`FieldType ${n} unrecognized`)}else v(t,r,i)}catch(t){throw t instanceof d&&t.addToFieldPath(e),t}}function v(t,e,r){if("function"==typeof e.borshSerialize){e.borshSerialize(r);return}let n=t.get(e.constructor);if(!n)throw new d(`Class ${e.constructor.name} is missing in schema`);if("struct"===n.kind)n.fields.map(([n,i])=>{m(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,a]=n.values[o];if(s===i){r.writeU8(o),m(t,s,e[s],a,r);break}}}else throw new d(`Unexpected schema kind: ${n.kind} for ${e.constructor.name}`)}function b(t,e,r,n){try{if("string"==typeof r)return n[`read${w(r)}`]();if(r instanceof Array){if("number"==typeof r[0])return n.readFixedArray(r[0]);if("number"!=typeof r[1])return n.readArray(()=>b(t,e,r[0],n));{let e=[];for(let i=0;i<r[1];i++)e.push(b(t,null,r[0],n));return e}}if("option"===r.kind){if(n.readU8())return b(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=b(t,e,r.key,n),s=b(t,e,r.value,n);i.set(o,s)}return i}return x(t,r,n)}catch(t){throw t instanceof d&&t.addToFieldPath(e),t}}function x(t,e,r){if("function"==typeof e.borshDeserialize)return e.borshDeserialize(r);let n=t.get(e);if(!n)throw new d(`Class ${e.name} is missing in schema`);if("struct"===n.kind){let n={};for(let[i,o]of t.get(e).fields)n[i]=b(t,i,o,r);return new e(n)}if("enum"===n.kind){let i=r.readU8();if(i>=n.values.length)throw new d(`Enum index: ${i} is out of range`);let[o,s]=n.values[i],a=b(t,o,s,r);return new e({[o]:a})}throw new d(`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=p){let n=new r;return v(t,e,n),n.toArray()},e.deserialize=function(t,e,r,n=g){let i=new n(r),o=x(t,e,i);if(i.offset<r.length)throw new d(`Unexpected ${r.length-i.offset} bytes after deserialized data`);return o},e.deserializeUnchecked=function(t,e,r,n=g){return x(t,e,new n(r))}},59147:function(t,e,r){var n=r(18282);t.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},69983:function(t,e,r){"use strict";let n=r(37213).v4,i=r(40789),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,a=null,h=Array.isArray(t)&&"function"==typeof e;if(1===this.options.version&&h)throw TypeError("JSON-RPC 1.0 does not support batching");let c=!h&&t&&"object"==typeof t&&"function"==typeof e;if(h||c)n=e,a=t;else{"function"==typeof r&&(n=r,r=void 0);let o="function"==typeof n;try{a=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 a}try{o=JSON.stringify(a,this.options.replacer)}catch(t){return n(t)}return this.callServer(o,function(t,e){s._parseResponse(t,e,n)}),a},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)}},40789:function(t,e,r){"use strict";let n=r(37213).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}},37213:function(t,e,r){"use strict";r.d(e,{v4:function(){return c}});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=[],a=0;a<256;++a)s.push((a+256).toString(16).substr(1));var h=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},c=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 h(o)}},65768: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}i.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 a(t,e){if(!(this instanceof a))return new a(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 h(t,e){if(!(this instanceof h))return new h(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 c(t){var e=t.fatal,n=0,i=0,s=0,a=128,h=191;this.handler=function(t,c){if(-1===c&&0!==s)return s=0,o(e);if(-1===c)return -1;if(0===s){if(r(c,0,127))return c;if(r(c,194,223))s=1,n=c-192;else if(r(c,224,239))224===c&&(a=160),237===c&&(h=159),s=2,n=c-224;else{if(!r(c,240,244))return o(e);240===c&&(a=144),244===c&&(h=143),s=3,n=c-240}return n<<=6*s,null}if(!r(c,a,h))return n=s=i=0,a=128,h=191,t.prepend(c),o(e);if(a=128,h=191,i+=1,n+=c-128<<6*(s-i),i!==s)return null;var f=n;return n=s=i=0,f}}function f(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}}a.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 c({fatal:this._fatal}),this._BOMseen=!1),this._streaming=!!e.stream;for(var r,o,s=new i(r),a=[];!s.endOfStream()&&-1!==(o=this._decoder.handler(s,s.read()));)null!==o&&(Array.isArray(o)?a.push.apply(a,o):a.push(o));if(!this._streaming){do{if(-1===(o=this._decoder.handler(s,s.read())))break;if(null===o)continue;Array.isArray(o)?a.push.apply(a,o):a.push(o)}while(!s.endOfStream());this._decoder=null}return!a.length||-1===["utf-8"].indexOf(this.encoding)||this._ignoreBOM||this._BOMseen||(65279===a[0]?(this._BOMseen=!0,a.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}(a)}},h.prototype={encode:function(t,e){t=t?String(t):"",e=n(e),this._streaming||(this._encoder=new f(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 a=1023&o,h=1023&s;i.push(65536+(a<<10)+h),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=h,e.TextDecoder=a},61857:function(t,e,r){"use strict";r.d(e,{UN:function(){return C}});var n=r(88577),i=r(16177),o=r(25884);let[s,a]=i.ZP.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b89
16f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(t=>BigInt(t))),h=new Uint32Array(80),c=new Uint32Array(80);class f 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:a,Eh:h,El:c,Fh:f,Fl:u,Gh:l,Gl:d,Hh:p,Hl:y}=this;return[t,e,r,n,i,o,s,a,h,c,f,u,l,d,p,y]}set(t,e,r,n,i,o,s,a,h,c,f,u,l,d,p,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|a,this.Eh=0|h,this.El=0|c,this.Fh=0|f,this.Fl=0|u,this.Gh=0|l,this.Gl=0|d,this.Hh=0|p,this.Hl=0|y}process(t,e){for(let r=0;r<16;r++,e+=4)h[r]=t.getUint32(e),c[r]=t.getUint32(e+=4);for(let t=16;t<80;t++){let e=0|h[t-15],r=0|c[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|h[t-2],a=0|c[t-2],f=i.ZP.rotrSH(s,a,19)^i.ZP.rotrBH(s,a,61)^i.ZP.shrSH(s,a,6),u=i.ZP.rotrSL(s,a,19)^i.ZP.rotrBL(s,a,61)^i.ZP.shrSL(s,a,6),l=i.ZP.add4L(o,u,c[t-7],c[t-16]),d=i.ZP.add4H(l,n,f,h[t-7],h[t-16]);h[t]=0|d,c[t]=0|l}let{Ah:r,Al:n,Bh:o,Bl:f,Ch:u,Cl:l,Dh:d,Dl:p,Eh:y,El:g,Fh:w,Fl:m,Gh:v,Gl:b,Hh:x,Hl:E}=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),A=i.ZP.rotrSL(y,g,14)^i.ZP.rotrSL(y,g,18)^i.ZP.rotrBL(y,g,41),_=y&w^~y&v,P=g&m^~g&b,U=i.ZP.add5L(E,A,P,a[t],c[t]),S=i.ZP.add5H(U,x,e,_,s[t],h[t]),B=0|U,k=i.ZP.rotrSH(r,n,28)^i.ZP.rotrBH(r,n,34)^i.ZP.rotrBH(r,n,39),I=i.ZP.rotrSL(r,n,28)^i.ZP.rotrBL(r,n,34)^i.ZP.rotrBL(r,n,39),T=r&o^r&u^o&u,L=n&f^n&l^f&l;x=0|v,E=0|b,v=0|w,b=0|m,w=0|y,m=0|g,({h:y,l:g}=i.ZP.add(0|d,0|p,0|S,0|B)),d=0|u,p=0|l,u=0|o,l=0|f,o=0|r,f=0|n;let C=i.ZP.add3L(B,I,L);r=i.ZP.add3H(C,S,k,T),n=0|C}({h:r,l:n}=i.ZP.add(0|this.Ah,0|this.Al,0|r,0|n)),({h:o,l:f}=i.ZP.add(0|this.Bh,0|this.Bl,0|o,0|f)),({h:u,l:l}=i.ZP.add(0|this.Ch,0|this.Cl,0|u,0|l)),({h:d,l:p}=i.ZP.add(0|this.Dh,0|this.Dl,0|d,0|p)),({h:y,l:g}=i.ZP.add(0|this.Eh,0|this.El,0|y,0|g)),({h:w,l:m}=i.ZP.add(0|this.Fh,0|this.Fl,0|w,0|m)),({h:v,l:b}=i.ZP.add(0|this.Gh,0|this.Gl,0|v,0|b)),({h:x,l:E}=i.ZP.add(0|this.Hh,0|this.Hl,0|x,0|E)),this.set(r,n,o,f,u,l,d,p,y,g,w,m,v,b,x,E)}roundClean(){h.fill(0),c.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 u=(0,o.hE)(()=>new f);var l=r(27665),d=r(81025),p=r(33024);let y=BigInt(0),g=BigInt(1),w=BigInt(2),m=BigInt(8),v={zip215:!0},b=BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),x=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752"),E=BigInt(0),A=BigInt(1),_=BigInt(2),P=BigInt(5),U=BigInt(10),S=BigInt(20),B=BigInt(40),k=BigInt(80);
1function I(t,e){let r=(0,l.wQ)(e*e*e,b),n=function(t){let e=t*t%b*t%b,r=(0,l.oA)(e,_,b)*e%b,n=(0,l.oA)(r,A,b)*t%b,i=(0,l.oA)(n,P,b)*n%b,o=(0,l.oA)(i,U,b)*i%b,s=(0,l.oA)(o,S,b)*o%b,a=(0,l.oA)(s,B,b)*s%b,h=(0,l.oA)(a,k,b)*a%b,c=(0,l.oA)(h,k,b)*a%b,f=(0,l.oA)(c,U,b)*i%b;return{pow_p_5_8:(0,l.oA)(f,_,b)*t%b,b2:e}}(t*(0,l.wQ)(r*r*e,b)).pow_p_5_8,i=(0,l.wQ)(t*r*n,b),o=(0,l.wQ)(e*i*i,b),s=i,a=(0,l.wQ)(i*x,b),h=o===t,c=o===(0,l.wQ)(-t,b),f=o===(0,l.wQ)(-t*x,b);return h&&(i=s),(c||f)&&(i=a),(0,l.Tu)(i,b)&&(i=(0,l.wQ)(-i,b)),{isValid:h||c,value:i}}let T=(0,l.gN)(b,void 0,!0),L={a:BigInt(-1),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),Fp:T,n:BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),h:BigInt(8),Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960"),hash:u,randomBytes:o.O6,adjustScalarBytes:function(t){return t[0]&=248,t[31]&=127,t[31]|=64,t},uvRatio:I},C=function(t){let e=function(t){let e=(0,p.K)(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:a,h:h}=e,c=w<<BigInt(8*a)-g,f=r.create,u=e.uvRatio||((t,e)=>{try{return{isValid:!0,value:r.sqrt(t*r.inv(e))}}catch(t){return{isValid:!1,value:y}}}),b=e.adjustScalarBytes||(t=>t),x=e.domain||((t,e,r)=>{if(e.length||r)throw Error("Contexts/pre-hash are not supported");return t}),E=t=>"bigint"==typeof t&&y<t,A=(t,e)=>E(t)&&E(e)&&t<e,_=t=>t===y||A(t,c);function P(t,e){if(A(t,e))return t;throw Error(`Expected valid scalar < ${e}, got ${typeof t} ${t}`)}function U(t){return t===y?t:P(t,n)}let S=new Map;function B(t){if(!(t instanceof k))throw Error("ExtendedPoint expected")}class k{constructor(t,e,r,n){if(this.ex=t,this.ey=e,this.ez=r,this.et=n,!_(t))throw Error("x required");if(!_(e))throw Error("y required");if(!_(r))throw Error("z required");if(!_(n))throw Error("t required")}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static fromAffine(t){if(t instanceof k)throw Error("extended point not allowed");let{x:e,y:r}=t||{};if(!_(e)||!_(r))throw Error("invalid affine point");return new k(e,r,g,f(e*r))}static normalizeZ(t){let e=r.invertBatch(t.map(t=>t.ez));return t.map((t,r)=>t.toAffine(e[r])).map(k.fromAffine)}_setWindowSize(t){this._WINDOW_SIZE=t,S.delete(this)}assertValidity(){let{a:t,d:r}=e;if(this.is0())throw Error("bad point: ZERO");let{ex:n,ey:i,ez:o,et:s}=this,a=f(n*n),h=f(i*i),c=f(o*o),u=f(c*c),l=f(a*t);if(f(c*f(l+h))!==f(u+f(r*f(a*h))))throw Error("bad point: equation left != right (1)");if(f(n*i)!==f(o*s))throw Error("bad point: equation left != right (2)")}equals(t){B(t);let{ex:e,ey:r,ez:n}=this,{ex:i,ey:o,ez:s}=t,a=f(e*s),h=f(i*n),c=f(r*s),u=f(o*n);return a===h&&c===u}is0(){return this.equals(k.ZERO)}negate(){return new k(f(-this.ex),this.ey,this.ez,f(-this.et))}double(){let{a:t}=e,{ex:r,ey:n,ez:i}=this,o=f(r*r),s=f(n*n),a=f(w*f(i*i)),h=f(t*o),c=r+n,u=f(f(c*c)-o-s),l=h+s,d=l-a,p=h-s,y=f(u*d),g=f(l*p),m=f(u*p);return new k(y,g,f(d*l),m)}add(t){B(t);let{a:r,d:n}=e,{ex:i,ey:o,ez:s,et:a}=this,{ex:h,ey:c,ez:u,et:l}=t;if(r===BigInt(-1)){let t=f((o-i)*(c+h)),e=f((o+i)*(c-h)),r=f(e-t);if(r===y)return this.double();let n=f(s*w*l),d=f(a*w*u),p=d+n,g=e+t,m=d-n,v=f(p*r),b=f(g*m),x=f(p*m);return new k(v,b,f(r*g),x)}let d=f(i*h),p=f(o*c),g=f(a*n*l),m=f(s*u),v=f((i+o)*(h+c)-d-p),b=m-g,x=m+g,E=f(p-r*d),A=f(v*b),_=f(x*E),P=f(v*E);return new k(A,_,f(b*x),P)}subtract(t){return this.add(t.negate())}wNAF(t){return L.wNAFCached(this,S,t,k.normalizeZ)}multiply(t){let{p:e,f:r}=this.wNAF(P(t,n));return k.normalizeZ([e,r])[0]}multiplyUnsafe(t){let e=U(t);return e===y?T:this.equals(T)||e===g?this:this.equals(I)?this.wNAF(e).p:L.unsafeLadder(this,e)}isSmallOrder(){return this.multiplyUnsafe(h).is0()}isTorsionFree(){return L.unsafeLadder(this,n).is0()}toAffine(t){let{ex:e,ey:n,ez:i}=this,o=this.is0();null==t&&(t=o?m:r.inv(i));let s=f(e*t),a=f(n*t),h=f(i*t);if(o)return{x:y,y:g};
1if(h!==g)throw Error("invZ was invalid");return{x:s,y:a}}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,a=(t=(0,d.ql)("pointHex",t,s)).slice(),h=t[s-1];a[s-1]=-129&h;let l=d.ty(a);l===y||(n?P(l,c):P(l,r.ORDER));let p=f(l*l),{isValid:w,value:m}=u(f(p-g),f(i*p-o));if(!w)throw Error("Point.fromHex: invalid y coordinate");let v=(m&g)===g,b=(128&h)!=0;if(!n&&m===y&&b)throw Error("Point.fromHex: x=0 and x_0=1");return b!==v&&(m=f(-m)),k.fromAffine({x:m,y:l})}static fromPrivateKey(t){return M(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())}}k.BASE=new k(e.Gx,e.Gy,g,f(e.Gx*e.Gy)),k.ZERO=new k(y,g,g,y);let{BASE:I,ZERO:T}=k,L=(0,p.M)(k,8*a);function C(t){var e;return e=d.ty(t),(0,l.wQ)(e,n)}function M(t){t=(0,d.ql)("private key",t,a);let e=(0,d.ql)("hashed private key",o(t),2*a),r=b(e.slice(0,a)),n=e.slice(a,2*a),i=C(r),s=I.multiply(i),h=s.toRawBytes();return{head:r,prefix:n,scalar:i,point:s,pointBytes:h}}function O(t=new Uint8Array,...e){return C(o(x(d.eV(...e),(0,d.ql)("context",t),!!i)))}return I._setWindowSize(8),{CURVE:e,getPublicKey:function(t){return M(t).pointBytes},sign:function(t,e,o={}){var s;t=(0,d.ql)("message",t),i&&(t=i(t));let{prefix:h,scalar:c,pointBytes:f}=M(e),u=O(o.context,h,t),p=I.multiply(u).toRawBytes(),y=(s=u+O(o.context,p,f,t)*c,(0,l.wQ)(s,n));U(y);let g=d.eV(p,d.S5(y,r.BYTES));return(0,d.ql)("result",g,2*a)},verify:function(t,e,n,o=v){let s,a,h;let{context:c,zip215:f}=o,u=r.BYTES;t=(0,d.ql)("signature",t,2*u),e=(0,d.ql)("message",e),i&&(e=i(e));let l=d.ty(t.slice(u,2*u));try{s=k.fromHex(n,f),a=k.fromHex(t.slice(0,u),f),h=I.multiplyUnsafe(l)}catch(t){return!1}if(!f&&s.isSmallOrder())return!1;let p=O(c,a.toRawBytes(),s.toRawBytes(),e);return a.add(s.multiplyUnsafe(p)).subtract(h).clearCofactor().equals(k.ZERO)},ExtendedPoint:k,utils:{getExtendedPublicKey:M,randomPrivateKey:()=>s(r.BYTES),precompute:(t=8,e=k.BASE)=>(e._setWindowSize(t),e.multiply(BigInt(3)),e)}}}(L);({...L});let M=(T.ORDER+BigInt(3))/BigInt(8);function O(t){if(!(t instanceof Y))throw Error("RistrettoPoint expected")}T.pow(_,M),T.sqrt(T.neg(T.ONE)),T.ORDER,BigInt(5),BigInt(8),BigInt(486662),(0,l.DV)(T,T.neg(BigInt(486664)));let R=BigInt("25063068953384623474111414158702152701244531502492656460079210482610430750235"),N=BigInt("54469307008909316920995813868745141605393597292927456921205312896311721017578"),Z=BigInt("1159843021668779879193775521855586647937357759715417654439879720876111806838"),z=BigInt("40440834346308536858101042469323190826248399146238708352240133220865137265952"),q=t=>I(A,t),K=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),j=t=>C.CURVE.Fp.create(bytesToNumberLE(t)&K);function F(t){let{d:e}=C.CURVE,r=C.CURVE.Fp.ORDER,n=C.CURVE.Fp.create,i=n(null*t*t),o=n((i+A)*Z),s=BigInt(-1),a=n((s-e*i)*n(i+e)),{isValid:h,value:c}=I(o,a),f=n(c*t);isNegativeLE(f,r)||(f=n(-f)),h||(c=f),h||(s=i);let u=n(s*(i-A)*z-a),l=c*c,d=n((c+c)*a),p=n(u*R),y=n(A-l),g=n(A+l);return new C.ExtendedPoint(n(d*g),n(y*p),n(p*g),n(d*y))}class Y{constructor(t){this.ep=t}static fromAffine(t){return new Y(C.ExtendedPoint.fromAffine(t))}static hashToCurve(t){let e=F(j((t=ensureBytes("ristrettoHash",t,64)).slice(0,32))),r=F(j(t.slice(32,64)));return new Y(e.add(r))}static fromHex(t){t=ensureBytes("ristrettoHex",t,32);let{a:e,d:r}=C.CURVE,n=C.CURVE.Fp.ORDER,i=C.CURVE.Fp.create,o="RistrettoPoint.fromHex: the hex is not valid encoding of RistrettoPoint",s=j(t);if(!equalBytes(numberToBytesLE(s,32),t)||isNegativeLE(s,n))throw Error(o);let a=i(s*s),h=i(A+e*a),c=i(A-e*a),f=i(h*h),u=i(c*c),l=i(e*r*f-u),{isValid:d,value:p}=q(i(l*u)),y=i(p*c),g=i(p*y*l),w=i((s+s)*y);isNegativeLE(w,n)&&(w=i(-w));let m=i(h*g),v=i(w*m);if(!d||isNegativeLE(v,n)||m===E)throw Error(o);return new Y(new C.ExtendedPoint(w,m,A,v))}toRawBytes(){let t,{ex:e,ey:r,ez:n,et:i}=this.ep,o=C.CURVE.Fp.ORDER,s=C.CURVE.Fp.create,a=s(s(n+r)*s(n-r)),h=s(e*r),c=s(h*h),{value:f}=q(s(a*c)),u=s(f*a),l=s(f*h),d=s(u*l*i);if(isNegativeLE(i*d,o)){let n=s(null*r),i=s(null*e);e=n,r=i,t=s(u*N)}else t=l;isNegativeLE(e*d,o)&&(r=s(-r));let p=s((n-r)*t);return isNegativeLE(p,o)&&(p=s(-p)),numberToBytesLE(p,32)}toHex(){return bytesToHex(this.toRawBytes())}toString(){return this.toHex()}equals(t){O(t);let{ex:e,ey:r}=this.ep,{ex:n,ey:i}=t.ep,o=C.CURVE.Fp.create,s=o(e*i)===o(r*n),a=o(r*i)===o(e*n);return s||a}add(t){return O(t),new Y(this.ep.add(t.ep))}subtract(t){return O(t),new Y(this.ep.subtract(t.ep))}multiply(t){return new Y(this.ep.multiply(t))}multiplyUnsafe(t){return new Y(this.ep.multiplyUnsafe(t))}double(){return new Y(this.ep.double())}negate(){return new Y(this.ep.negate())}}},44633:function(t,e,r){"use strict";r.d(e,{Ey:function(){return h},XY:function(){return s}});var n=r(82957),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 a=class{encode(t){return JSON.stringify(t)}decode(t){return JSON.parse(t)}},h=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}={},h,c){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=h||(()=>++this.rpc_id),c?this.dataPack=c:this.dataPack=new a,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,474 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.Buffer.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.