/*! For license information please see bundle.3dd62315c227159d2dd7.js.LICENSE.txt */ "use strict";(self.webpackChunkfrog=self.webpackChunkfrog||[]).push([[9877],{81836:(t,e,r)=>{r.d(e,{bI:()=>ht});var n={};r.r(n),r.d(n,{OG:()=>b,My:()=>h,Ph:()=>d,lX:()=>l,Id:()=>y,fg:()=>x,qj:()=>g,aT:()=>u,lq:()=>w,z:()=>p,Q5:()=>A});var i=r(3439);BigInt(0);const o=BigInt(1),s=BigInt(2),f=t=>t instanceof Uint8Array,a=Array.from({length:256},((t,e)=>e.toString(16).padStart(2,"0")));function h(t){if(!f(t))throw new Error("Uint8Array expected");let e="";for(let r=0;rt+e.length),0));let r=0;return t.forEach((t=>{if(!f(t))throw new Error("Uint8Array expected");e.set(t,r),r+=t.length})),e}const b=t=>(s<new Uint8Array(t),E=t=>Uint8Array.from(t);function x(t,e,r){if("number"!=typeof t||t<2)throw new Error("hashLen must be a number");if("number"!=typeof e||e<2)throw new Error("qByteLen must be a number");if("function"!=typeof r)throw new Error("hmacFn must be a function");let n=m(t),i=m(t),o=0;const s=()=>{n.fill(1),i.fill(0),o=0},f=(...t)=>r(i,n,...t),a=(t=m())=>{i=f(E([0]),t),n=f(),0!==t.length&&(i=f(E([1]),t),n=f())},h=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let t=0;const r=[];for(;t{let r;for(s(),a(t);!(r=e(h()));)a();return s(),r}}const B={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||t instanceof Uint8Array,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 A(t,e,r={}){const n=(e,r,n)=>{const i=B[r];if("function"!=typeof i)throw new Error(`Invalid validator "${r}", expected function`);const o=t[e];if(!(n&&void 0===o||i(o,t)))throw new Error(`Invalid param ${String(e)}=${o} (${typeof o}), expected ${r}`)};for(const[t,r]of Object.entries(e))n(t,r,!1);for(const[t,e]of Object.entries(r))n(t,e,!0);return t}const I=BigInt(0),S=BigInt(1),v=BigInt(2),O=BigInt(3),L=BigInt(4),H=BigInt(5),U=BigInt(8);BigInt(9),BigInt(16);function R(t,e){const r=t%e;return r>=I?r:e+r}function k(t,e,r){if(r<=I||e 0");if(r===S)return I;let n=S;for(;e>I;)e&S&&(n=n*t%r),t=t*t%r,e>>=S;return n}function q(t,e,r){let n=t;for(;e-- >I;)n*=n,n%=r;return n}function N(t,e){if(t===I||e<=I)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let r=R(t,e),n=e,i=I,o=S,s=S,f=I;for(;r!==I;){const t=n/r,e=n%r,a=i-s*t,h=o-f*t;n=r,r=e,i=s,o=f,s=a,f=h}if(n!==S)throw new Error("invert: does not exist");return R(i,e)}function F(t){if(t%L===O){const e=(t+S)/L;return function(t,r){const n=t.pow(r,e);if(!t.eql(t.sqr(n),r))throw new Error("Cannot find square root");return n}}if(t%U===H){const e=(t-H)/U;return function(t,r){const n=t.mul(r,v),i=t.pow(n,e),o=t.mul(r,i),s=t.mul(t.mul(o,v),i),f=t.mul(o,t.sub(s,t.ONE));if(!t.eql(t.sqr(f),r))throw new Error("Cannot find square root");return f}}return function(t){const e=(t-S)/v;let r,n,i;for(r=t-S,n=0;r%v===I;r/=v,n++);for(i=v;in?t.create().update(r).digest():r);for(let t=0;tnew T(t,e).update(r).digest();V.create=(t,e)=>new T(t,e);const G=BigInt(0),j=BigInt(1);function _(t){return A(t.Fp,C.reduce(((t,e)=>(t[e]="function",t)),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"})),A(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...D(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}const{Ph:K,aT:M}=n,W={Err:class extends Error{constructor(t=""){super(t)}},_parseInt(t){const{Err:e}=W;if(t.length<2||2!==t[0])throw new e("Invalid signature integer tag");const r=t[1],n=t.subarray(2,r+2);if(!r||n.length!==r)throw new e("Invalid signature integer: wrong length");if(128&n[0])throw new e("Invalid signature integer: negative");if(0===n[0]&&!(128&n[1]))throw new e("Invalid signature integer: unnecessary leading zero");return{d:K(n),l:t.subarray(r+2)}},toSig(t){const{Err:e}=W,r="string"==typeof t?M(t):t;if(!(r instanceof Uint8Array))throw new Error("ui8a expected");let n=r.length;if(n<2||48!=r[0])throw new e("Invalid signature tag");if(r[1]!==n-2)throw new e("Invalid signature: incorrect length");const{d:i,l:o}=W._parseInt(r.subarray(2)),{d:s,l:f}=W._parseInt(o);if(f.length)throw new e("Invalid signature: left bytes after parsing");return{r:i,s}},hexFromSig(t){const e=t=>8&Number.parseInt(t[0],16)?"00"+t:t,r=t=>{const e=t.toString(16);return 1&e.length?`0${e}`:e},n=e(r(t.s)),i=e(r(t.r)),o=n.length/2,s=i.length/2,f=r(o),a=r(s);return`30${r(s+o+4)}02${a}${i}02${f}${n}`}},Y=BigInt(0),X=BigInt(1),J=(BigInt(2),BigInt(3));BigInt(4);function Q(t){const e=function(t){const e=_(t);A(e,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:r,Fp:n,a:i}=e;if(r){if(!n.eql(i,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!=typeof r||"bigint"!=typeof r.beta||"function"!=typeof r.splitScalar)throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...e})}(t),{Fp:r}=e,n=e.toBytes||((t,e,n)=>{const i=e.toAffine();return y(Uint8Array.from([4]),r.toBytes(i.x),r.toBytes(i.y))}),i=e.fromBytes||(t=>{const e=t.subarray(1);return{x:r.fromBytes(e.subarray(0,r.BYTES)),y:r.fromBytes(e.subarray(r.BYTES,2*r.BYTES))}});function o(t){const{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),o(e.Gx)))throw new Error("bad generator point: equation left != right");function s(t){return"bigint"==typeof t&&Yr.eql(t,r.ZERO);return i(e)&&i(n)?l.ZERO:new l(e,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(t){const e=r.invertBatch(t.map((t=>t.pz)));return t.map(((t,r)=>t.toAffine(e[r]))).map(l.fromAffine)}static fromHex(t){const e=l.fromAffine(i(g("pointHex",t)));return e.assertValidity(),e}static fromPrivateKey(t){return l.BASE.multiply(a(t))}_setWindowSize(t){this._WINDOW_SIZE=t,c.delete(this)}assertValidity(){if(this.is0()){if(e.allowInfinityPoint&&!r.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:t,y:n}=this.toAffine();if(!r.isValid(t)||!r.isValid(n))throw new Error("bad point: x or y not FE");const i=r.sqr(n),s=o(t);if(!r.eql(i,s))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:t}=this.toAffine();if(r.isOdd)return!r.isOdd(t);throw new Error("Field doesn't support isOdd")}equals(t){u(t);const{px:e,py:n,pz:i}=this,{px:o,py:s,pz:f}=t,a=r.eql(r.mul(e,f),r.mul(o,i)),h=r.eql(r.mul(n,f),r.mul(s,i));return a&&h}negate(){return new l(this.px,r.neg(this.py),this.pz)}double(){const{a:t,b:n}=e,i=r.mul(n,J),{px:o,py:s,pz:f}=this;let a=r.ZERO,h=r.ZERO,c=r.ZERO,u=r.mul(o,o),d=r.mul(s,s),w=r.mul(f,f),p=r.mul(o,s);return p=r.add(p,p),c=r.mul(o,f),c=r.add(c,c),a=r.mul(t,c),h=r.mul(i,w),h=r.add(a,h),a=r.sub(d,h),h=r.add(d,h),h=r.mul(a,h),a=r.mul(p,a),c=r.mul(i,c),w=r.mul(t,w),p=r.sub(u,w),p=r.mul(t,p),p=r.add(p,c),c=r.add(u,u),u=r.add(c,u),u=r.add(u,w),u=r.mul(u,p),h=r.add(h,u),w=r.mul(s,f),w=r.add(w,w),u=r.mul(w,p),a=r.sub(a,u),c=r.mul(w,d),c=r.add(c,c),c=r.add(c,c),new l(a,h,c)}add(t){u(t);const{px:n,py:i,pz:o}=this,{px:s,py:f,pz:a}=t;let h=r.ZERO,c=r.ZERO,d=r.ZERO;const w=e.a,p=r.mul(e.b,J);let g=r.mul(n,s),y=r.mul(i,f),b=r.mul(o,a),m=r.add(n,i),E=r.add(s,f);m=r.mul(m,E),E=r.add(g,y),m=r.sub(m,E),E=r.add(n,o);let x=r.add(s,a);return E=r.mul(E,x),x=r.add(g,b),E=r.sub(E,x),x=r.add(i,o),h=r.add(f,a),x=r.mul(x,h),h=r.add(y,b),x=r.sub(x,h),d=r.mul(w,E),h=r.mul(p,b),d=r.add(h,d),h=r.sub(y,d),d=r.add(y,d),c=r.mul(h,d),y=r.add(g,g),y=r.add(y,g),b=r.mul(w,b),E=r.mul(p,E),y=r.add(y,b),b=r.sub(g,b),b=r.mul(w,b),E=r.add(E,b),g=r.mul(y,E),c=r.add(c,g),g=r.mul(x,E),h=r.mul(m,h),h=r.sub(h,g),g=r.mul(m,y),d=r.mul(x,d),d=r.add(d,g),new l(h,c,d)}subtract(t){return this.add(t.negate())}is0(){return this.equals(l.ZERO)}wNAF(t){return p.wNAFCached(this,c,t,(t=>{const e=r.invertBatch(t.map((t=>t.pz)));return t.map(((t,r)=>t.toAffine(e[r]))).map(l.fromAffine)}))}multiplyUnsafe(t){const n=l.ZERO;if(t===Y)return n;if(f(t),t===X)return this;const{endo:i}=e;if(!i)return p.unsafeLadder(this,t);let{k1neg:o,k1:s,k2neg:a,k2:h}=i.splitScalar(t),c=n,u=n,d=this;for(;s>Y||h>Y;)s&X&&(c=c.add(d)),h&X&&(u=u.add(d)),d=d.double(),s>>=X,h>>=X;return o&&(c=c.negate()),a&&(u=u.negate()),u=new l(r.mul(u.px,i.beta),u.py,u.pz),c.add(u)}multiply(t){f(t);let n,i,o=t;const{endo:s}=e;if(s){const{k1neg:t,k1:e,k2neg:f,k2:a}=s.splitScalar(o);let{p:h,f:c}=this.wNAF(e),{p:u,f:d}=this.wNAF(a);h=p.constTimeNegate(t,h),u=p.constTimeNegate(f,u),u=new l(r.mul(u.px,s.beta),u.py,u.pz),n=h.add(u),i=c.add(d)}else{const{p:t,f:e}=this.wNAF(o);n=t,i=e}return l.normalizeZ([n,i])[0]}multiplyAndAddUnsafe(t,e,r){const n=l.BASE,i=(t,e)=>e!==Y&&e!==X&&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){const{px:e,py:n,pz:i}=this,o=this.is0();null==t&&(t=o?r.ONE:r.inv(i));const s=r.mul(e,t),f=r.mul(n,t),a=r.mul(i,t);if(o)return{x:r.ZERO,y:r.ZERO};if(!r.eql(a,r.ONE))throw new Error("invZ was invalid");return{x:s,y:f}}isTorsionFree(){const{h:t,isTorsionFree:r}=e;if(t===X)return!0;if(r)return r(l,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:t,clearCofactor:r}=e;return t===X?this:r?r(l,this):this.multiplyUnsafe(e.h)}toRawBytes(t=!0){return this.assertValidity(),n(l,this,t)}toHex(t=!0){return h(this.toRawBytes(t))}}l.BASE=new l(e.Gx,e.Gy,r.ONE),l.ZERO=new l(r.ZERO,r.ONE,r.ZERO);const w=e.nBitLength,p=function(t,e){const r=(t,e)=>{const r=e.negate();return t?r:e},n=t=>({windows:Math.ceil(e/t)+1,windowSize:2**(t-1)});return{constTimeNegate:r,unsafeLadder(e,r){let n=t.ZERO,i=e;for(;r>G;)r&j&&(n=n.add(i)),i=i.double(),r>>=j;return n},precomputeWindow(t,e){const{windows:r,windowSize:i}=n(e),o=[];let s=t,f=s;for(let t=0;t>=d,n>f&&(n-=u,o+=j);const s=e,l=e+Math.abs(n)-1,w=t%2!=0,p=n<0;0===n?h=h.add(r(w,i[s])):a=a.add(r(p,i[l]))}return{p:a,f:h}},wNAFCached(t,e,r,n){const i=t._WINDOW_SIZE||1;let o=e.get(t);return o||(o=this.precomputeWindow(t,i),1!==i&&e.set(t,n(o))),this.wNAF(i,o,r)}}}(l,e.endo?Math.ceil(w/2):w);return{CURVE:e,ProjectivePoint:l,normPrivateKeyToScalar:a,weierstrassEquation:o,isWithinCurveOrder:s}}function tt(t){const e=function(t){const e=_(t);return A(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}(t),{Fp:r,n}=e,i=r.BYTES+1,o=2*r.BYTES+1;function s(t){return R(t,n)}function f(t){return N(t,n)}const{ProjectivePoint:a,normPrivateKeyToScalar:c,weierstrassEquation:m,isWithinCurveOrder:E}=Q({...e,toBytes(t,e,n){const i=e.toAffine(),o=r.toBytes(i.x),s=y;return n?s(Uint8Array.from([e.hasEvenY()?2:3]),o):s(Uint8Array.from([4]),o,r.toBytes(i.y))},fromBytes(t){const e=t.length,n=t[0],s=t.subarray(1);if(e!==i||2!==n&&3!==n){if(e===o&&4===n){return{x:r.fromBytes(s.subarray(0,r.BYTES)),y:r.fromBytes(s.subarray(r.BYTES,2*r.BYTES))}}throw new Error(`Point of length ${e} was invalid. Expected ${i} compressed bytes or ${o} uncompressed bytes`)}{const t=d(s);if(!(Y<(f=t)&&fh(w(t,e.nByteLength));function I(t){return t>n>>X}const v=(t,e,r)=>d(t.slice(e,r));class O{constructor(t,e,r){this.r=t,this.s=e,this.recovery=r,this.assertValidity()}static fromCompact(t){const r=e.nByteLength;return t=g("compactSignature",t,2*r),new O(v(t,0,r),v(t,r,2*r))}static fromDER(t){const{r:e,s:r}=W.toSig(g("DER",t));return new O(e,r)}assertValidity(){if(!E(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!E(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(t){return new O(this.r,this.s,t)}recoverPublicKey(t){const{r:n,s:i,recovery:o}=this,h=k(g("msgHash",t));if(null==o||![0,1,2,3].includes(o))throw new Error("recovery id invalid");const c=2===o||3===o?n+e.n:n;if(c>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");const u=1&o?"03":"02",d=a.fromHex(u+B(c)),l=f(c),w=s(-h*l),p=s(i*l),y=a.BASE.multiplyAndAddUnsafe(d,w,p);if(!y)throw new Error("point at infinify");return y.assertValidity(),y}hasHighS(){return I(this.s)}normalizeS(){return this.hasHighS()?new O(this.r,s(-this.s),this.recovery):this}toDERRawBytes(){return u(this.toDERHex())}toDERHex(){return W.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return u(this.toCompactHex())}toCompactHex(){return B(this.r)+B(this.s)}}const L={isValidPrivateKey(t){try{return c(t),!0}catch(t){return!1}},normPrivateKeyToScalar:c,randomPrivateKey:()=>{const t=P(e.n);return function(t,e,r=!1){const n=t.length,i=$(e),o=P(e);if(n<16||n1024)throw new Error(`expected ${o}-1024 bytes of input, got ${n}`);const s=R(r?d(t):l(t),e-S)+S;return r?p(s,i):w(s,i)}(e.randomBytes(t),e.n)},precompute:(t=8,e=a.BASE)=>(e._setWindowSize(t),e.multiply(BigInt(3)),e)};function H(t){const e=t instanceof Uint8Array,r="string"==typeof t,n=(e||r)&&t.length;return e?n===i||n===o:r?n===2*i||n===2*o:t instanceof a}const U=e.bits2int||function(t){const r=d(t),n=8*t.length-e.nBitLength;return n>0?r>>BigInt(n):r},k=e.bits2int_modN||function(t){return s(U(t))},q=b(e.nBitLength);function F(t){if("bigint"!=typeof t)throw new Error("bigint expected");if(!(Y<=t&&tt in i)))throw new Error("sign() legacy options not supported");const{hash:o,randomBytes:h}=e;let{lowS:u,prehash:d,extraEntropy:l}=i;null==u&&(u=!0),t=g("msgHash",t),d&&(t=g("prehashed msgHash",o(t)));const w=k(t),p=c(n),b=[F(p),F(w)];if(null!=l){const t=!0===l?h(r.BYTES):l;b.push(g("extraEntropy",t))}const m=y(...b),x=w;return{seed:m,k2sig:function(t){const e=U(t);if(!E(e))return;const r=f(e),n=a.BASE.multiply(e).toAffine(),i=s(n.x);if(i===Y)return;const o=s(r*s(x+i*p));if(o===Y)return;let h=(n.x===i?0:2)|Number(n.y&X),c=o;return u&&I(o)&&(c=function(t){return I(t)?s(-t):t}(o),h^=1),new O(i,c,h)}}}const D={lowS:e.lowS,prehash:!1},Z={lowS:e.lowS,prehash:!1};return a.BASE._setWindowSize(8),{CURVE:e,getPublicKey:function(t,e=!0){return a.fromPrivateKey(t).toRawBytes(e)},getSharedSecret:function(t,e,r=!0){if(H(t))throw new Error("first arg must be private key");if(!H(e))throw new Error("second arg must be public key");return a.fromHex(e).multiply(c(t)).toRawBytes(r)},sign:function(t,r,n=D){const{seed:i,k2sig:o}=C(t,r,n),s=e;return x(s.hash.outputLen,s.nByteLength,s.hmac)(i,o)},verify:function(t,r,n,i=Z){const o=t;if(r=g("msgHash",r),n=g("publicKey",n),"strict"in i)throw new Error("options.strict was renamed to lowS");const{lowS:h,prehash:c}=i;let u,d;try{if("string"==typeof o||o instanceof Uint8Array)try{u=O.fromDER(o)}catch(t){if(!(t instanceof W.Err))throw t;u=O.fromCompact(o)}else{if("object"!=typeof o||"bigint"!=typeof o.r||"bigint"!=typeof o.s)throw new Error("PARSE");{const{r:t,s:e}=o;u=new O(t,e)}}d=a.fromHex(n)}catch(t){if("PARSE"===t.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(h&&u.hasHighS())return!1;c&&(r=e.hash(r));const{r:l,s:w}=u,p=k(r),y=f(w),b=s(p*y),m=s(l*y),E=a.BASE.multiplyAndAddUnsafe(d,b,m)?.toAffine();return!!E&&s(E.x)===l},ProjectivePoint:a,Signature:O,utils:L}}function et(t){return{hash:t,hmac:(e,...r)=>V(t,e,(0,z.Id)(...r)),randomBytes:z.po}}const rt=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),nt=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),it=BigInt(1),ot=BigInt(2),st=(t,e)=>(t+e/ot)/e;function ft(t){const e=rt,r=BigInt(3),n=BigInt(6),i=BigInt(11),o=BigInt(22),s=BigInt(23),f=BigInt(44),a=BigInt(88),h=t*t*t%e,c=h*h*t%e,u=q(c,r,e)*c%e,d=q(u,r,e)*c%e,l=q(d,ot,e)*h%e,w=q(l,i,e)*l%e,p=q(w,o,e)*w%e,g=q(p,f,e)*p%e,y=q(g,a,e)*g%e,b=q(y,f,e)*p%e,m=q(b,r,e)*c%e,E=q(m,s,e)*w%e,x=q(E,n,e)*h%e,B=q(x,ot,e);if(!at.eql(at.sqr(B),t))throw new Error("Cannot find square root");return B}const at=function(t,e,r=!1,n={}){if(t<=I)throw new Error(`Expected Field ORDER > 0, got ${t}`);const{nBitLength:i,nByteLength:o}=D(t,e);if(o>2048)throw new Error("Field lengths over 2048 bytes are not supported");const s=F(t),f=Object.freeze({ORDER:t,BITS:i,BYTES:o,MASK:b(i),ZERO:I,ONE:S,create:e=>R(e,t),isValid:e=>{if("bigint"!=typeof e)throw new Error("Invalid field element: expected bigint, got "+typeof e);return I<=e&&et===I,isOdd:t=>(t&S)===S,neg:e=>R(-e,t),eql:(t,e)=>t===e,sqr:e=>R(e*e,t),add:(e,r)=>R(e+r,t),sub:(e,r)=>R(e-r,t),mul:(e,r)=>R(e*r,t),pow:(t,e)=>function(t,e,r){if(r 0");if(r===I)return t.ONE;if(r===S)return e;let n=t.ONE,i=e;for(;r>I;)r&S&&(n=t.mul(n,i)),i=t.sqr(i),r>>=S;return n}(f,t,e),div:(e,r)=>R(e*N(r,t),t),sqrN:t=>t*t,addN:(t,e)=>t+e,subN:(t,e)=>t-e,mulN:(t,e)=>t*e,inv:e=>N(e,t),sqrt:n.sqrt||(t=>s(f,t)),invertBatch:t=>function(t,e){const r=new 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}(f,t),cmov:(t,e,r)=>r?e:t,toBytes:t=>r?p(t,o):w(t,o),fromBytes:t=>{if(t.length!==o)throw new Error(`Fp.fromBytes: expected ${o}, got ${t.length}`);return r?l(t):d(t)}});return Object.freeze(f)}(rt,void 0,void 0,{sqrt:ft}),ht=function(t,e){const r=e=>tt({...t,...et(e)});return Object.freeze({...r(e),create:r})}({a:BigInt(0),b:BigInt(7),Fp:at,n:nt,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const e=nt,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-it*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=r,s=BigInt("0x100000000000000000000000000000000"),f=st(o*t,e),a=st(-n*t,e);let h=R(t-f*r-a*i,e),c=R(-f*n-a*o,e);const u=h>s,d=c>s;if(u&&(h=e-h),d&&(c=e-c),h>s||c>s)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:u,k1:h,k2neg:d,k2:c}}}},i.s);BigInt(0);ht.ProjectivePoint},27125:(t,e,r)=>{function n(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}function i(t,...e){if(!(t instanceof Uint8Array))throw new Error("Expected Uint8Array");if(e.length>0&&!e.includes(t.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}function o(t){if("function"!=typeof t||"function"!=typeof t.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");n(t.outputLen),n(t.blockLen)}function s(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function f(t,e){i(t);const r=e.outputLen;if(t.lengthf,ai:()=>n,ee:()=>i,t2:()=>s,tW:()=>o})},37171:(t,e,r)=>{r.d(e,{D:()=>o});var n=r(27125),i=r(10750);class o extends i.Vw{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.O8)(this.buffer)}update(t){(0,n.t2)(this);const{view:e,buffer:r,blockLen:o}=this,s=(t=(0,i.ZJ)(t)).length;for(let n=0;no-f&&(this.process(r,0),f=0);for(let t=f;t>i&o),f=Number(r&o),a=n?4:0,h=n?0:4;t.setUint32(e+a,s,n),t.setUint32(e+h,f,n)}(r,o-8,BigInt(8*this.length),s),this.process(r,0);const a=(0,i.O8)(t),h=this.outputLen;if(h%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const c=h/4,u=this.get();if(c>u.length)throw new Error("_sha2: outputLen bigger than state");for(let t=0;t{r.d(e,{Ay:()=>u,B4:()=>a,P5:()=>f,WM:()=>h,im:()=>c,lD:()=>s});const n=BigInt(2**32-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;it<>>32-r,a=(t,e,r)=>e<>>32-r,h=(t,e,r)=>e<>>64-r,c=(t,e,r)=>t<>>64-r;const u={fromBig:o,split:s,toBig:(t,e)=>BigInt(t>>>0)<>>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:f,rotlSL:a,rotlBH:h,rotlBL:c,add:function(t,e,r,n){const i=(e>>>0)+(n>>>0);return{h:t+r+(i/2**32|0)|0,l:0|i}},add3L:(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0),add3H:(t,e,r,n)=>e+r+n+(t/2**32|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/2**32|0)|0,add5H:(t,e,r,n,i,o)=>e+r+n+i+o+(t/2**32|0)|0,add5L:(t,e,r,n,i)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(i>>>0)}},3439:(t,e,r)=>{r.d(e,{s:()=>c});var n=r(37171),i=r(10750);const o=(t,e,r)=>t&e^t&r^e&r,s=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),f=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),a=new Uint32Array(64);class h extends n.D{constructor(){super(64,32,8,!1),this.A=0|f[0],this.B=0|f[1],this.C=0|f[2],this.D=0|f[3],this.E=0|f[4],this.F=0|f[5],this.G=0|f[6],this.H=0|f[7]}get(){const{A:t,B:e,C:r,D:n,E:i,F:o,G:s,H:f}=this;return[t,e,r,n,i,o,s,f]}set(t,e,r,n,i,o,s,f){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|f}process(t,e){for(let r=0;r<16;r++,e+=4)a[r]=t.getUint32(e,!1);for(let t=16;t<64;t++){const e=a[t-15],r=a[t-2],n=(0,i.Ow)(e,7)^(0,i.Ow)(e,18)^e>>>3,o=(0,i.Ow)(r,17)^(0,i.Ow)(r,19)^r>>>10;a[t]=o+a[t-7]+n+a[t-16]|0}let{A:r,B:n,C:f,D:h,E:c,F:u,G:d,H:l}=this;for(let t=0;t<64;t++){const e=l+((0,i.Ow)(c,6)^(0,i.Ow)(c,11)^(0,i.Ow)(c,25))+((w=c)&u^~w&d)+s[t]+a[t]|0,p=((0,i.Ow)(r,2)^(0,i.Ow)(r,13)^(0,i.Ow)(r,22))+o(r,n,f)|0;l=d,d=u,u=c,c=h+e|0,h=f,f=n,n=r,r=e+p|0}var w;r=r+this.A|0,n=n+this.B|0,f=f+this.C|0,h=h+this.D|0,c=c+this.E|0,u=u+this.F|0,d=d+this.G|0,l=l+this.H|0,this.set(r,n,f,h,c,u,d,l)}roundClean(){a.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const c=(0,i.ld)((()=>new h))},43403:(t,e,r)=>{r.d(e,{lY:()=>x});var n=r(27125),i=r(86558),o=r(10750);const[s,f,a]=[[],[],[]],h=BigInt(0),c=BigInt(1),u=BigInt(2),d=BigInt(7),l=BigInt(256),w=BigInt(113);for(let t=0,e=c,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],s.push(2*(5*n+r)),f.push((t+1)*(t+2)/2%64);let i=h;for(let t=0;t<7;t++)e=(e<>d)*w)%l,e&u&&(i^=c<<(c<r>32?(0,i.WM)(t,e,r):(0,i.P5)(t,e,r),b=(t,e,r)=>r>32?(0,i.im)(t,e,r):(0,i.B4)(t,e,r);class m extends o.Vw{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.ai)(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,o.DH)(this.state)}keccak(){!function(t,e=24){const 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){const n=(e+8)%10,i=(e+2)%10,o=r[i],s=r[i+1],f=y(o,s,1)^r[n],a=b(o,s,1)^r[n+1];for(let r=0;r<50;r+=10)t[e+r]^=f,t[e+r+1]^=a}let e=t[2],i=t[3];for(let r=0;r<24;r++){const n=f[r],o=y(e,i,n),a=b(e,i,n),h=s[r];e=t[h],i=t[h+1],t[h]=o,t[h+1]=a}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]^=p[n],t[1]^=g[n]}r.fill(0)}(this.state32,this.rounds),this.posOut=0,this.pos=0}update(t){(0,n.t2)(this);const{blockLen:e,state:r}=this,i=(t=(0,o.ZJ)(t)).length;for(let n=0;n=r&&this.keccak();const 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 new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return(0,n.ai)(t),this.xofInto(new Uint8Array(t))}digestInto(t){if((0,n.CG)(t,this),this.finished)throw new 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){const{blockLen:e,suffix:r,outputLen:n,rounds:i,enableXOF:o}=this;return t||(t=new m(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}}const E=(t,e,r)=>(0,o.ld)((()=>new m(e,t,r))),x=E(1,136,32)},82214:(t,e,r)=>{r.d(e,{Zf:()=>u});var n=r(37171),i=r(86558),o=r(10750);const[s,f]=(()=>i.Ay.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map((t=>BigInt(t)))))(),a=new Uint32Array(80),h=new Uint32Array(80);class c extends n.D{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:t,Al:e,Bh:r,Bl:n,Ch:i,Cl:o,Dh:s,Dl:f,Eh:a,El:h,Fh:c,Fl:u,Gh:d,Gl:l,Hh:w,Hl:p}=this;return[t,e,r,n,i,o,s,f,a,h,c,u,d,l,w,p]}set(t,e,r,n,i,o,s,f,a,h,c,u,d,l,w,p){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|f,this.Eh=0|a,this.El=0|h,this.Fh=0|c,this.Fl=0|u,this.Gh=0|d,this.Gl=0|l,this.Hh=0|w,this.Hl=0|p}process(t,e){for(let r=0;r<16;r++,e+=4)a[r]=t.getUint32(e),h[r]=t.getUint32(e+=4);for(let t=16;t<80;t++){const e=0|a[t-15],r=0|h[t-15],n=i.Ay.rotrSH(e,r,1)^i.Ay.rotrSH(e,r,8)^i.Ay.shrSH(e,r,7),o=i.Ay.rotrSL(e,r,1)^i.Ay.rotrSL(e,r,8)^i.Ay.shrSL(e,r,7),s=0|a[t-2],f=0|h[t-2],c=i.Ay.rotrSH(s,f,19)^i.Ay.rotrBH(s,f,61)^i.Ay.shrSH(s,f,6),u=i.Ay.rotrSL(s,f,19)^i.Ay.rotrBL(s,f,61)^i.Ay.shrSL(s,f,6),d=i.Ay.add4L(o,u,h[t-7],h[t-16]),l=i.Ay.add4H(d,n,c,a[t-7],a[t-16]);a[t]=0|l,h[t]=0|d}let{Ah:r,Al:n,Bh:o,Bl:c,Ch:u,Cl:d,Dh:l,Dl:w,Eh:p,El:g,Fh:y,Fl:b,Gh:m,Gl:E,Hh:x,Hl:B}=this;for(let t=0;t<80;t++){const e=i.Ay.rotrSH(p,g,14)^i.Ay.rotrSH(p,g,18)^i.Ay.rotrBH(p,g,41),A=i.Ay.rotrSL(p,g,14)^i.Ay.rotrSL(p,g,18)^i.Ay.rotrBL(p,g,41),I=p&y^~p&m,S=g&b^~g&E,v=i.Ay.add5L(B,A,S,f[t],h[t]),O=i.Ay.add5H(v,x,e,I,s[t],a[t]),L=0|v,H=i.Ay.rotrSH(r,n,28)^i.Ay.rotrBH(r,n,34)^i.Ay.rotrBH(r,n,39),U=i.Ay.rotrSL(r,n,28)^i.Ay.rotrBL(r,n,34)^i.Ay.rotrBL(r,n,39),R=r&o^r&u^o&u,k=n&c^n&d^c&d;x=0|m,B=0|E,m=0|y,E=0|b,y=0|p,b=0|g,({h:p,l:g}=i.Ay.add(0|l,0|w,0|O,0|L)),l=0|u,w=0|d,u=0|o,d=0|c,o=0|r,c=0|n;const q=i.Ay.add3L(L,U,k);r=i.Ay.add3H(q,O,H,R),n=0|q}({h:r,l:n}=i.Ay.add(0|this.Ah,0|this.Al,0|r,0|n)),({h:o,l:c}=i.Ay.add(0|this.Bh,0|this.Bl,0|o,0|c)),({h:u,l:d}=i.Ay.add(0|this.Ch,0|this.Cl,0|u,0|d)),({h:l,l:w}=i.Ay.add(0|this.Dh,0|this.Dl,0|l,0|w)),({h:p,l:g}=i.Ay.add(0|this.Eh,0|this.El,0|p,0|g)),({h:y,l:b}=i.Ay.add(0|this.Fh,0|this.Fl,0|y,0|b)),({h:m,l:E}=i.Ay.add(0|this.Gh,0|this.Gl,0|m,0|E)),({h:x,l:B}=i.Ay.add(0|this.Hh,0|this.Hl,0|x,0|B)),this.set(r,n,o,c,u,d,l,w,p,g,y,b,m,E,x,B)}roundClean(){a.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)}}const u=(0,o.ld)((()=>new c))},10750:(t,e,r)=>{r.d(e,{Vw:()=>c,Id:()=>h,O8:()=>s,po:()=>d,Ow:()=>f,ZJ:()=>a,DH:()=>o,ld:()=>u});const n="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,i=t=>t instanceof Uint8Array,o=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),s=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),f=(t,e)=>t<<32-e|t>>>e;if(!(68===new Uint8Array(new Uint32Array([287454020]).buffer)[0]))throw new Error("Non little-endian hardware is not supported");function a(t){if("string"==typeof t&&(t=function(t){if("string"!=typeof t)throw new Error("utf8ToBytes expected string, got "+typeof t);return new Uint8Array((new TextEncoder).encode(t))}(t)),!i(t))throw new Error("expected Uint8Array, got "+typeof t);return t}function h(...t){const e=new Uint8Array(t.reduce(((t,e)=>t+e.length),0));let r=0;return t.forEach((t=>{if(!i(t))throw new Error("Uint8Array expected");e.set(t,r),r+=t.length})),e}class c{clone(){return this._cloneInto()}}function u(t){const e=e=>t().update(a(e)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function d(t=32){if(n&&"function"==typeof n.getRandomValues)return n.getRandomValues(new Uint8Array(t));throw new Error("crypto.getRandomValues must be defined")}}}]);