shogun-button-react 5.0.0 → 6.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ /*! OpenPGP.js v6.2.2 - 2025-09-02 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
2
+
3
+ /*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */
4
+
5
+ /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
6
+
7
+ /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 619.index.js.LICENSE.txt */
2
+ "use strict";(this.webpackChunkShogunButtonReact=this.webpackChunkShogunButtonReact||[]).push([[619],{38619:(e,t,r)=>{r.d(t,{AL:()=>ge,Zc:()=>_e,wo:()=>ke,C2:()=>B,mh:()=>F});class n extends Error{constructor(e){let t;t=e instanceof Error?e.message:"string"==typeof e?e:"",super(t),this.name=this.constructor.name}}const i=256,s=3329,o=[2285,2571,2970,1812,1493,1422,287,202,3158,622,1577,182,962,2127,1855,1468,573,2004,264,383,2500,1458,1727,3199,2648,1017,732,608,1787,411,3124,1758,1223,652,2777,1015,2036,1491,3047,1785,516,3321,3009,2663,1711,2167,126,1469,2476,3239,3058,830,107,1908,3082,2378,2931,961,1821,2604,448,2264,677,2054,2226,430,555,843,2078,871,1550,105,422,587,177,3094,3038,2869,1574,1653,3083,778,1159,3182,2552,1483,2727,1119,1739,644,2457,349,418,329,3173,3254,817,1097,603,610,1322,2044,1864,384,2114,3193,1218,1994,2455,220,2142,1670,2144,1799,2051,794,1819,2475,2459,478,3221,3021,996,991,958,1869,1522,1628],a=[1701,1807,1460,2371,2338,2333,308,108,2851,870,854,1510,2535,1278,1530,1185,1659,1187,3109,874,1335,2111,136,1215,2945,1465,1285,2007,2719,2726,2232,2512,75,156,3e3,2911,2980,872,2685,1590,2210,602,1846,777,147,2170,2551,246,1676,1755,460,291,235,3152,2742,2907,3224,1779,2458,1251,2486,2774,2899,1103,1275,2652,1065,2881,725,1508,2368,398,951,247,1421,3222,2499,271,90,853,1860,3203,1162,1618,666,320,8,2813,1544,282,1838,1293,2314,552,2677,2106,1571,205,2918,1542,2721,2597,2312,681,130,1602,1871,829,2946,3065,1325,2756,1861,1474,1202,2367,3147,1752,2707,171,3127,3042,1907,1836,1517,359,758,1441],u=BigInt(2**32-1),l=BigInt(32);function c(e,t=!1){return t?{h:Number(e&u),l:Number(e>>l&u)}:{h:0|Number(e>>l&u),l:0|Number(e&u)}}function h(e,t=""){if(!Number.isSafeInteger(e)||e<0)throw new Error(`${t&&`"${t}" `}expected integer >0, got ${e}`)}function f(e,t,r=""){const n=(i=e)instanceof Uint8Array||ArrayBuffer.isView(i)&&"Uint8Array"===i.constructor.name;var i;const s=e?.length,o=void 0!==t;if(!n||o&&s!==t)throw new Error((r&&`"${r}" `)+"expected Uint8Array"+(o?` of length ${t}`:"")+", got "+(n?`length=${s}`:"type="+typeof e));return e}function b(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function d(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function p(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}const y=(()=>68===new Uint8Array(new Uint32Array([287454020]).buffer)[0])()?e=>e:function(e){for(let t=0;t<e.length;t++)e[t]=p(e[t]);return e};function _(e,t={}){const r=(t,r)=>e(r).update(t).digest(),n=e(void 0);return r.outputLen=n.outputLen,r.blockLen=n.blockLen,r.create=t=>e(t),Object.assign(r,t),Object.freeze(r)}const w=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])}),k=BigInt(0),g=BigInt(1),m=BigInt(2),v=BigInt(7),A=BigInt(256),O=BigInt(113),S=[],z=[],P=[];for(let e=0,t=g,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],S.push(2*(5*n+r)),z.push((e+1)*(e+2)/2%64);let i=k;for(let e=0;e<7;e++)t=(t<<g^(t>>v)*O)%A,t&m&&(i^=g<<(g<<BigInt(e))-g);P.push(i)}const U=function(e,t=!1){const r=e.length,n=new Uint32Array(r),i=new Uint32Array(r);for(let s=0;s<r;s++){const{h:r,l:o}=c(e[s],t);[n[s],i[s]]=[r,o]}return[n,i]}(P,!0),j=U[0],L=U[1],I=(e,t,r)=>r>32?((e,t,r)=>t<<r-32|e>>>64-r)(e,t,r):((e,t,r)=>e<<r|t>>>32-r)(e,t,r),x=(e,t,r)=>r>32?((e,t,r)=>e<<r-32|t>>>64-r)(e,t,r):((e,t,r)=>t<<r|e>>>32-r)(e,t,r);class E{constructor(e,t,r,n=!1,i=24){if(Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"pos",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"posOut",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"finished",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"state32",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"destroyed",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"blockLen",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"suffix",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"outputLen",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"enableXOF",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"rounds",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=n,this.rounds=i,h(r,"outputLen"),!(0<e&&e<200))throw new Error("only keccak-f1600 function is supported");var s;this.state=new Uint8Array(200),this.state32=(s=this.state,new Uint32Array(s.buffer,s.byteOffset,Math.floor(s.byteLength/4)))}clone(){return this._cloneInto()}keccak(){y(this.state32),function(e,t=24){const r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){const n=(t+8)%10,i=(t+2)%10,s=r[i],o=r[i+1],a=I(s,o,1)^r[n],u=x(s,o,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=a,e[t+r+1]^=u}let t=e[2],i=e[3];for(let r=0;r<24;r++){const n=z[r],s=I(t,i,n),o=x(t,i,n),a=S[r];t=e[a],i=e[a+1],e[a]=s,e[a+1]=o}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=j[n],e[1]^=L[n]}d(r)}(this.state32,this.rounds),y(this.state32),this.posOut=0,this.pos=0}update(e){b(this),f(e);const{blockLen:t,state:r}=this,n=e.length;for(let i=0;i<n;){const s=Math.min(t-this.pos,n-i);for(let t=0;t<s;t++)r[this.pos++]^=e[i++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:r,blockLen:n}=this;e[r]^=t,128&t&&r===n-1&&this.keccak(),e[n-1]^=128,this.keccak()}writeInto(e){b(this,!1),f(e),this.finish();const t=this.state,{blockLen:r}=this;for(let n=0,i=e.length;n<i;){this.posOut>=r&&this.keccak();const s=Math.min(r-this.posOut,i-n);e.set(t.subarray(this.posOut,this.posOut+s),n),this.posOut+=s,n+=s}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return h(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(function(e,t){f(e,void 0,"digestInto() output");const r=t.outputLen;if(e.length<r)throw new Error('"digestInto() output" expected to be of length >='+r)}(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,d(this.state)}_cloneInto(e){const{blockLen:t,suffix:r,outputLen:n,rounds:i,enableXOF:s}=this;return e||=new E(t,r,n,s,i),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=r,e.outputLen=n,e.enableXOF=s,e.destroyed=this.destroyed,e}}const V=(e,t,r,n={})=>_(()=>new E(t,e,r),n),B=V(6,136,32,w(8)),N=V(6,72,64,w(10)),K=(e,t,r,n={})=>_((n={})=>new E(t,e,void 0===n.dkLen?r:n.dkLen,!0),n),R=K(31,168,16,w(11)),F=K(31,136,32,w(12)),C=(M=globalThis,X={},new Proxy(M,{get:(e,t,r)=>t in X?X[t]:M[t],set:(e,t,r)=>(t in X&&delete X[t],M[t]=r,!0),deleteProperty(e,t){let r=!1;return t in X&&(delete X[t],r=!0),t in M&&(delete M[t],r=!0),r},ownKeys(e){const t=Reflect.ownKeys(M),r=Reflect.ownKeys(X),n=new Set(r);return[...t.filter(e=>!n.has(e)),...r]},defineProperty:(e,t,r)=>(t in X&&delete X[t],Reflect.defineProperty(M,t,r),!0),getOwnPropertyDescriptor:(e,t)=>t in X?Reflect.getOwnPropertyDescriptor(X,t):Reflect.getOwnPropertyDescriptor(M,t),has:(e,t)=>t in X||t in M}));var M,X;function $(e){return e%256}function D(e){const t=-32768;return e>=t&&e<=32767?e:e<t?(e+=32769,32767+(e%=65536)):(e-=32768,t+(e%=65536))}function T(e){return e%65536}function H(e){const t=-2147483648,r=2147483647;return e>=t&&e<=r?e:e<t?(e+=2147483649,r+(e%=4294967296)):(e-=2147483648,t+(e%=4294967296))}function Z(e){return e%4294967296}function q(e,t,r){return F.create({dkLen:e}).update(t).update(new Uint8Array([r])).digest()}function G(e){let t=Z(e[0]);return t|=Z(e[1])<<8,t|=Z(e[2])<<16,t}function J(e){let t=Z(e[0]);return t|=Z(e[1])<<8,t|=Z(e[2])<<16,t|=Z(e[3])<<24,Z(t)}class Q{constructor(){Object.defineProperty(this,"_api",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_k",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_du",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_dv",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_eta1",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_eta2",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_skSize",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_pkSize",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_compressedUSize",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_compressedVSize",{enumerable:!0,configurable:!0,writable:!0,value:0})}async generateKeyPair(){await this._setup();try{const e=new Uint8Array(64);return this._api.getRandomValues(e),this._deriveKeyPair(e)}catch(e){throw new n(e)}}async deriveKeyPair(e){await this._setup();try{if(64!==e.byteLength)throw new Error("seed must be 64 bytes in length");return this._deriveKeyPair(e)}catch(e){throw new n(e)}}async encap(e,t){await this._setup();try{if(e.length!==384*this._k+32)throw new Error("invalid encapsulation key");const r=this._getSeed(t),[n,i]=W(r,Y(e));return[this._encap(e,r,i),n]}catch(e){throw new n(e)}}async decap(e,t){await this._setup();try{if(e.byteLength!==this._compressedUSize+this._compressedVSize)throw new Error("Invalid ct size");if(t.length!==768*this._k+96)throw new Error("Invalid decapsulation key");const r=t.subarray(0,this._skSize),n=t.subarray(this._skSize,this._skSize+this._pkSize),i=t.subarray(this._skSize+this._pkSize,this._skSize+this._pkSize+32),s=t.subarray(this._skSize+this._pkSize+32,this._skSize+this._pkSize+64),o=this._decap(e,r),[a,u]=W(o,i),l=function(e,t){const r=F.create({dkLen:32}).update(e);return void 0!==t&&r.update(t),r.digest()}(s,e);return 1===function(e,t){if(e.length!=t.length)return 0;const r=new Uint8Array([0]);for(let n=0;n<e.length;n++)r[0]|=e[n]^t[n];const n=new Uint8Array([0]);return n[0]=r[0]^~n[0],n[0]&=n[0]>>4,n[0]&=n[0]>>2,n[0]&=n[0]>>1,n[0]}(e,this._encap(n,o,u))?a:l}catch(e){throw new n(e)}}async _setup(){void 0===this._api&&(this._api=await async function(){if(void 0!==C&&void 0!==globalThis.crypto)return globalThis.crypto;try{const{webcrypto:e}=await Promise.resolve().then(r.t.bind(r,91565,19));return e}catch(e){throw new Error("failed to load Crypto")}}())}_getSeed(e){if(null==e){const e=new Uint8Array(32);return this._api.getRandomValues(e),e}if(32!==e.byteLength)throw new Error("seed must be 32 bytes in length");return e}_deriveKeyPair(e){const t=e.subarray(0,32),r=e.subarray(32,64),[n,i]=this._deriveCpaKeyPair(t),s=Y(n),o=new Uint8Array(this._skSize+this._pkSize+64);return o.set(i,0),o.set(n,this._skSize),o.set(s,this._skSize+this._pkSize),o.set(r,this._skSize+this._pkSize+32),[n,o]}_deriveCpaKeyPair(e){const[t,r]=W(e,new Uint8Array([this._k])),n=this._sampleMatrix(t,!1),i=this._sampleNoise1(r,0,this._k),s=this._sampleNoise1(r,this._k,this._k);for(let e=0;e<this._k;e++)i[e]=se(i[e]),i[e]=ae(i[e]),s[e]=se(s[e]);const o=new Array(this._k);for(let e=0;e<this._k;e++)o[e]=ce(he(n[e],i)),o[e]=de(o[e],s[e]),o[e]=ae(o[e]);const a=new Uint8Array(this._pkSize);for(let e=0;e<this._k;e++)a.set(te(o[e]),384*e);a.set(t,this._skSize);const u=new Uint8Array(this._skSize);for(let e=0;e<this._k;e++)u.set(te(i[e]),384*e);return[a,u]}_encap(e,t,r){const n=new Array(this._k),i=new Uint8Array(384*this._k);for(let t=0;t<this._k;t++)n[t]=re(e.subarray(384*t,384*(t+1))),i.set(te(n[t]),384*t);if(!function(e,t){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}(e.subarray(0,i.length),i))throw new Error("invalid encapsulation key");const s=e.subarray(this._skSize),o=this._sampleMatrix(s,!0),a=this._sampleNoise1(r,0,this._k),u=this._sampleNoise2(r,this._k,this._k),l=this._sampleNoise2(r,2*this._k,1)[0];for(let e=0;e<this._k;e++)a[e]=se(a[e]),a[e]=ae(a[e]);const c=new Array(this._k);for(let e=0;e<this._k;e++)c[e]=he(o[e],a),c[e]=pe(c[e]),c[e]=de(c[e],u[e]),c[e]=ae(c[e]);const h=function(e){const t=new Array(384).fill(0);let r;for(let n=0;n<32;n++)for(let i=0;i<8;i++)r=-1*D(e[n]>>i&1),t[8*n+i]=r&D(1665);return t}(t);let f=he(n,a);f=pe(f),f=de(f,l),f=de(f,h),f=ae(f);const b=new Uint8Array(this._compressedUSize+this._compressedVSize);return this._compressU(b.subarray(0,this._compressedUSize),c),this._compressV(b.subarray(this._compressedUSize),f),b}_decap(e,t){const r=this._decompressU(e.subarray(0,this._compressedUSize)),n=this._decompressV(e.subarray(this._compressedUSize)),o=this._polyvecFromBytes(t);for(let e=0;e<this._k;e++)r[e]=se(r[e]);let a=he(o,r);return a=pe(a),a=function(e,t){for(let r=0;r<i;r++)e[r]-=t[r];return e}(n,a),a=ae(a),function(e){const t=new Uint8Array(32);let r;const n=ye(e);for(let e=0;e<32;e++){t[e]=0;for(let i=0;i<8;i++)r=((T(n[8*e+i])<<1)+T(s/2))/T(s)&1,t[e]|=$(r<<i)}return t}(a)}_sampleMatrix(e,t){const r=new Array(this._k),n=new Uint8Array(2);for(let s=0,o=0;o<this._k;o++){r[o]=new Array(this._k);for(let a=0;a<this._k;a++){t?(n[0]=o,n[1]=a):(n[0]=a,n[1]=o);const u=ee(e,n),l=ne(u.subarray(0,504),504,i);for(r[o][a]=l[0],s=l[1];s<i;){const e=ne(u.subarray(504,672),168,i-s),t=e[0],n=e[1];for(let e=s;e<i;e++)r[o][a][e]=t[e-s];s+=n}}}return r}_sampleNoise1(e,t,r){const n=new Array(r);for(let s=0;s<r;s++)n[s]=ie(q(this._eta1*i/4,e,t),this._eta1),t++;return n}_sampleNoise2(e,t,r){const n=new Array(r);for(let s=0;s<r;s++)n[s]=ie(q(this._eta2*i/4,e,t),this._eta2),t++;return n}_polyvecFromBytes(e){const t=new Array(this._k);for(let r=0;r<this._k;r++)t[r]=re(e.subarray(384*r,384*(r+1)));return t}_compressU(e,t){const r=new Array(4);for(let n=0,i=0;i<this._k;i++)for(let o=0;o<64;o++){for(let e=0;e<4;e++)r[e]=((t[i][4*o+e]<<10)+s/2)/s&1023;e[n++]=$(0|r[0]),e[n++]=$(r[0]>>8|r[1]<<2),e[n++]=$(r[1]>>6|r[2]<<4),e[n++]=$(r[2]>>4|r[3]<<6),e[n++]=$(r[3]>>2)}return e}_compressV(e,t){const r=new Uint8Array(8);for(let n=0,i=0;i<32;i++){for(let e=0;e<8;e++)r[e]=15&$(((t[8*i+e]<<4)+s/2)/s);e[n++]=r[0]|r[1]<<4,e[n++]=r[2]|r[3]<<4,e[n++]=r[4]|r[5]<<4,e[n++]=r[6]|r[7]<<4}return e}_decompressU(e){const t=new Array(this._k);for(let e=0;e<this._k;e++)t[e]=new Array(384);const r=new Array(4);for(let n=0,i=0;i<this._k;i++)for(let o=0;o<64;o++){r[0]=T(e[n+0])|T(e[n+1])<<8,r[1]=T(e[n+1])>>2|T(e[n+2])<<6,r[2]=T(e[n+2])>>4|T(e[n+3])<<4,r[3]=T(e[n+3])>>6|T(e[n+4])<<2,n+=5;for(let e=0;e<4;e++)t[i][4*o+e]=D(Z(1023&r[e])*Z(s)+512>>10)}return t}_decompressV(e){const t=new Array(384);for(let r=0,n=0;n<128;n++,r++)t[2*n+0]=D(T(15&e[r])*T(s)+8>>4),t[2*n+1]=D(T(e[r]>>4)*T(s)+8>>4);return t}}function W(e,t){const r=N.create().update(e);void 0!==t&&r.update(t);const n=r.digest();return[n.subarray(0,32),n.subarray(32,64)]}function Y(e){return B.create().update(e).digest()}function ee(e,t){return R.create({dkLen:672}).update(e).update(t).digest()}function te(e){let t=0,r=0;const n=new Uint8Array(384),i=ye(e);for(let e=0;e<128;e++)t=T(i[2*e]),r=T(i[2*e+1]),n[3*e+0]=$(0|t),n[3*e+1]=$(t>>8)|$(r<<4),n[3*e+2]=$(r>>4);return n}function re(e){const t=new Array(384).fill(0);for(let r=0;r<128;r++)t[2*r]=D(4095&(T(e[3*r+0])|T(e[3*r+1])<<8)),t[2*r+1]=D(4095&(T(e[3*r+1])>>4|T(e[3*r+2])<<4));return t}function ne(e,t,r){const n=new Array(384).fill(0);let i,o,a=0;for(let u=0;a<r&&u+3<=t;)i=4095&(T(0|e[u])|T(e[u+1])<<8),o=4095&(T(e[u+1]>>4)|T(e[u+2])<<4),u+=3,i<s&&(n[a]=i,a+=1),a<r&&o<s&&(n[a]=o,a+=1);return[n,a]}function ie(e,t){let r,n,i,s;const o=new Array(384).fill(0);for(let a=0;a<32;a++){r=J(e.subarray(4*a,e.length)),n=1431655765&r,n+=r>>1&1431655765;for(let e=0;e<8;e++)i=D(n>>4*e+0&3),s=D(n>>4*e+t&3),o[8*a+e]=i-s}return o}function se(e){for(let t=0,r=1,n=128;n>=2;n>>=1)for(let i=0;i<256;i=t+n){const s=o[r];for(r+=1,t=i;t<i+n;t++){const r=oe(s,e[t+n]);e[t+n]=e[t]-r,e[t]=e[t]+r}}return e}function oe(e,t){return le(e*t)}function ae(e){for(let t=0;t<i;t++)e[t]=ue(e[t]);return e}function ue(e){let t=16778880.5/s*e>>24;return t*=s,e-t}function le(e){let t=D(62209*H(e))*s;return t=e-t,t>>=16,D(t)}function ce(e){for(let t=0;t<i;t++)e[t]=le(H(e[t])*H(1353));return e}function he(e,t){let r,n=fe(e[0],t[0]);for(let i=1;i<e.length;i++)r=fe(e[i],t[i]),n=de(n,r);return ae(n)}function fe(e,t){let r,n;for(let i=0;i<64;i++)r=be(e[4*i+0],e[4*i+1],t[4*i+0],t[4*i+1],o[64+i]),n=be(e[4*i+2],e[4*i+3],t[4*i+2],t[4*i+3],-o[64+i]),e[4*i+0]=r[0],e[4*i+1]=r[1],e[4*i+2]=n[0],e[4*i+3]=n[1];return e}function be(e,t,r,n,i){const s=new Array(2);return s[0]=oe(t,n),s[0]=oe(s[0],i),s[0]+=oe(e,r),s[1]=oe(e,n),s[1]+=oe(t,r),s}function de(e,t){const r=new Array(384);for(let n=0;n<i;n++)r[n]=e[n]+t[n];return r}function pe(e){let t=0;for(let r=0,n=2;n<=128;n<<=1)for(let i=0;i<256;i=t+n){const s=a[r];for(r+=1,t=i;t<i+n;t++){const r=e[t];e[t]=ue(r+e[t+n]),e[t+n]=r-e[t+n],e[t+n]=oe(s,e[t+n])}}for(t=0;t<256;t++)e[t]=oe(e[t],a[127]);return e}function ye(e){for(let t=0;t<i;t++)e[t]-=s,e[t]+=e[t]>>31&s;return e}class _e extends Q{constructor(){super(),Object.defineProperty(this,"_k",{enumerable:!0,configurable:!0,writable:!0,value:2}),Object.defineProperty(this,"_du",{enumerable:!0,configurable:!0,writable:!0,value:10}),Object.defineProperty(this,"_dv",{enumerable:!0,configurable:!0,writable:!0,value:4}),Object.defineProperty(this,"_eta1",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"_eta2",{enumerable:!0,configurable:!0,writable:!0,value:2}),this._skSize=12*this._k*i/8,this._pkSize=this._skSize+32,this._compressedUSize=this._k*this._du*i/8,this._compressedVSize=this._dv*i/8}_sampleNoise1(e,t,r){const n=new Array(r);for(let s=0;s<r;s++)n[s]=we(q(this._eta1*i/4,e,t),this._eta1),t++;return n}}function we(e,t){let r,n,i,s;const o=new Array(384).fill(0);for(let a=0;a<64;a++){r=G(e.subarray(3*a,e.length)),n=2396745&r,n+=r>>1&2396745,n+=r>>2&2396745;for(let e=0;e<4;e++)i=D(n>>6*e+0&7),s=D(n>>6*e+t&7),o[4*a+e]=i-s}return o}class ke extends Q{constructor(){super(),Object.defineProperty(this,"_k",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"_du",{enumerable:!0,configurable:!0,writable:!0,value:10}),Object.defineProperty(this,"_dv",{enumerable:!0,configurable:!0,writable:!0,value:4}),Object.defineProperty(this,"_eta1",{enumerable:!0,configurable:!0,writable:!0,value:2}),Object.defineProperty(this,"_eta2",{enumerable:!0,configurable:!0,writable:!0,value:2}),this._skSize=12*this._k*i/8,this._pkSize=this._skSize+32,this._compressedUSize=this._k*this._du*i/8,this._compressedVSize=this._dv*i/8}}class ge extends Q{constructor(){super(),Object.defineProperty(this,"_k",{enumerable:!0,configurable:!0,writable:!0,value:4}),Object.defineProperty(this,"_du",{enumerable:!0,configurable:!0,writable:!0,value:11}),Object.defineProperty(this,"_dv",{enumerable:!0,configurable:!0,writable:!0,value:5}),Object.defineProperty(this,"_eta1",{enumerable:!0,configurable:!0,writable:!0,value:2}),Object.defineProperty(this,"_eta2",{enumerable:!0,configurable:!0,writable:!0,value:2}),this._skSize=12*this._k*i/8,this._pkSize=this._skSize+32,this._compressedUSize=this._k*this._du*i/8,this._compressedVSize=this._dv*i/8}_compressU(e,t){const r=new Array(8);for(let n=0,i=0;i<this._k;i++)for(let o=0;o<32;o++){for(let e=0;e<8;e++)r[e]=T(((Z(t[i][8*o+e])<<11)+Z(s/2))/Z(s)&2047);e[n++]=$(0|r[0]),e[n++]=$(r[0]>>8|r[1]<<3),e[n++]=$(r[1]>>5|r[2]<<6),e[n++]=$(r[2]>>2),e[n++]=$(r[2]>>10|r[3]<<1),e[n++]=$(r[3]>>7|r[4]<<4),e[n++]=$(r[4]>>4|r[5]<<7),e[n++]=$(r[5]>>1),e[n++]=$(r[5]>>9|r[6]<<2),e[n++]=$(r[6]>>6|r[7]<<5),e[n++]=$(r[7]>>3)}return e}_compressV(e,t){const r=new Uint8Array(8);for(let n=0,i=0;i<32;i++){for(let e=0;e<8;e++)r[e]=31&$(((Z(t[8*i+e])<<5)+Z(s/2))/Z(s));e[n++]=$(r[0]|r[1]<<5),e[n++]=$(r[1]>>3|r[2]<<2|r[3]<<7),e[n++]=$(r[3]>>1|r[4]<<4),e[n++]=$(r[4]>>4|r[5]<<1|r[6]<<6),e[n++]=$(r[6]>>2|r[7]<<3)}return e}_decompressU(e){const t=new Array(this._k);for(let e=0;e<this._k;e++)t[e]=new Array(384);const r=new Array(8);for(let n=0,i=0;i<this._k;i++)for(let o=0;o<32;o++){r[0]=T(e[n+0])|T(e[n+1])<<8,r[1]=T(e[n+1])>>3|T(e[n+2])<<5,r[2]=T(e[n+2])>>6|T(e[n+3])<<2|T(e[n+4])<<10,r[3]=T(e[n+4])>>1|T(e[n+5])<<7,r[4]=T(e[n+5])>>4|T(e[n+6])<<4,r[5]=T(e[n+6])>>7|T(e[n+7])<<1|T(e[n+8])<<9,r[6]=T(e[n+8])>>2|T(e[n+9])<<6,r[7]=T(e[n+9])>>5|T(e[n+10])<<3,n+=11;for(let e=0;e<8;e++)t[i][8*o+e]=Z(2047&r[e])*s+1024>>11}return t}_decompressV(e){const t=new Array(384),r=new Array(8);for(let n=0,i=0;i<32;i++){r[0]=0|e[n+0],r[1]=e[n+0]>>5|e[n+1]<<3,r[2]=e[n+1]>>2,r[3]=e[n+1]>>7|e[n+2]<<1,r[4]=e[n+2]>>4|e[n+3]<<4,r[5]=e[n+3]>>1,r[6]=e[n+3]>>6|e[n+4]<<2,r[7]=e[n+4]>>3,n+=5;for(let e=0;e<8;e++)t[8*i+e]=D(Z(31&r[e])*Z(s)+16>>5)}return t}}}}]);
@@ -0,0 +1 @@
1
+ /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 649.index.js.LICENSE.txt */
2
+ "use strict";(this.webpackChunkShogunButtonReact=this.webpackChunkShogunButtonReact||[]).push([[649],{15916:(t,e,r)=>{r.d(e,{D0:()=>A,LH:()=>x,Tp:()=>S,dQ:()=>B,jr:()=>q,pS:()=>R,qy:()=>F,zH:()=>p,zi:()=>g});var n=r(78906),o=r(32531);const i=BigInt(0),s=BigInt(1),f=BigInt(2),u=BigInt(3),c=BigInt(4),l=BigInt(5),a=BigInt(7),d=BigInt(8),h=BigInt(9),w=BigInt(16);function g(t,e){const r=t%e;return r>=i?r:e+r}function p(t,e,r){let n=t;for(;e-- >i;)n*=n,n%=r;return n}function E(t,e){if(t===i)throw new Error("invert: expected non-zero number");if(e<=i)throw new Error("invert: expected positive modulus, got "+e);let r=g(t,e),n=e,o=i,f=s,u=s,c=i;for(;r!==i;){const t=n/r,e=n%r,i=o-u*t,s=f-c*t;n=r,r=e,o=u,f=c,u=i,c=s}if(n!==s)throw new Error("invert: does not exist");return g(o,e)}function m(t,e,r){if(!t.eql(t.sqr(e),r))throw new Error("Cannot find square root")}function b(t,e){const r=(t.ORDER+s)/c,n=t.pow(e,r);return m(t,n,e),n}function y(t,e){const r=(t.ORDER-l)/d,n=t.mul(e,f),o=t.pow(n,r),i=t.mul(e,o),s=t.mul(t.mul(i,f),o),u=t.mul(i,t.sub(s,t.ONE));return m(t,u,e),u}function v(t){if(t<u)throw new Error("sqrt is not defined for small field");let e=t-s,r=0;for(;e%f===i;)e/=f,r++;let n=f;const o=A(t);for(;1===N(o,n);)if(n++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(1===r)return b;let c=o.pow(n,e);const l=(e+s)/f;return function(t,n){if(t.is0(n))return n;if(1!==N(t,n))throw new Error("Cannot find square root");let o=r,i=t.mul(t.ONE,c),f=t.pow(n,e),u=t.pow(n,l);for(;!t.eql(f,t.ONE);){if(t.is0(f))return t.ZERO;let e=1,r=t.sqr(f);for(;!t.eql(r,t.ONE);)if(e++,r=t.sqr(r),e===o)throw new Error("Cannot find square root");const n=s<<BigInt(o-e-1),c=t.pow(i,n);o=e,i=t.sqr(c),f=t.mul(f,i),u=t.mul(u,c)}return u}}const B=(t,e)=>(g(t,e)&s)===s,O=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function q(t){const e=O.reduce((t,e)=>(t[e]="function",t),{ORDER:"bigint",MASK:"bigint",BYTES:"number",BITS:"number"});return(0,n.DS)(t,e),t}function R(t,e,r=!1){const n=new Array(e.length).fill(r?t.ZERO:void 0),o=e.reduce((e,r,o)=>t.is0(r)?e:(n[o]=e,t.mul(e,r)),t.ONE),i=t.inv(o);return e.reduceRight((e,r,o)=>t.is0(r)?e:(n[o]=t.mul(e,n[o]),t.mul(e,r)),i),n}function N(t,e){const r=(t.ORDER-s)/f,n=t.pow(e,r),o=t.eql(n,t.ONE),i=t.eql(n,t.ZERO),u=t.eql(n,t.neg(t.ONE));if(!o&&!i&&!u)throw new Error("invalid Legendre symbol result");return o?1:i?0:-1}function x(t,e){void 0!==e&&(0,o.Fe)(e);const r=void 0!==e?e:t.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function A(t,e,r=!1,o={}){if(t<=i)throw new Error("invalid field: expected ORDER > 0, got "+t);let f,p,B,O=!1;if("object"==typeof e&&null!=e){if(o.sqrt||r)throw new Error("cannot specify opts in two arguments");const t=e;t.BITS&&(f=t.BITS),t.sqrt&&(p=t.sqrt),"boolean"==typeof t.isLE&&(r=t.isLE),"boolean"==typeof t.modFromBytes&&(O=t.modFromBytes),B=t.allowedLengths}else"number"==typeof e&&(f=e),o.sqrt&&(p=o.sqrt);const{nBitLength:q,nByteLength:N}=x(t,f);if(N>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let I;const S=Object.freeze({ORDER:t,isLE:r,BITS:q,BYTES:N,MASK:(0,n.OG)(q),ZERO:i,ONE:s,allowedLengths:B,create:e=>g(e,t),isValid:e=>{if("bigint"!=typeof e)throw new Error("invalid field element: expected bigint, got "+typeof e);return i<=e&&e<t},is0:t=>t===i,isValidNot0:t=>!S.is0(t)&&S.isValid(t),isOdd:t=>(t&s)===s,neg:e=>g(-e,t),eql:(t,e)=>t===e,sqr:e=>g(e*e,t),add:(e,r)=>g(e+r,t),sub:(e,r)=>g(e-r,t),mul:(e,r)=>g(e*r,t),pow:(t,e)=>function(t,e,r){if(r<i)throw new Error("invalid exponent, negatives unsupported");if(r===i)return t.ONE;if(r===s)return e;let n=t.ONE,o=e;for(;r>i;)r&s&&(n=t.mul(n,o)),o=t.sqr(o),r>>=s;return n}(S,t,e),div:(e,r)=>g(e*E(r,t),t),sqrN:t=>t*t,addN:(t,e)=>t+e,subN:(t,e)=>t-e,mulN:(t,e)=>t*e,inv:e=>E(e,t),sqrt:p||(e=>{return I||(I=(r=t)%c===u?b:r%d===l?y:r%w===h?function(t){const e=A(t),r=v(t),n=r(e,e.neg(e.ONE)),o=r(e,n),i=r(e,e.neg(n)),s=(t+a)/w;return(t,e)=>{let r=t.pow(e,s),f=t.mul(r,n);const u=t.mul(r,o),c=t.mul(r,i),l=t.eql(t.sqr(f),e),a=t.eql(t.sqr(u),e);r=t.cmov(r,f,l),f=t.cmov(c,u,a);const d=t.eql(t.sqr(f),e),h=t.cmov(r,f,d);return m(t,h,e),h}}(r):v(r)),I(S,e);var r}),toBytes:t=>r?(0,n.z)(t,N):(0,n.lq)(t,N),fromBytes:(e,o=!0)=>{if(B){if(!B.includes(e.length)||e.length>N)throw new Error("Field.fromBytes: expected "+B+" bytes, got "+e.length);const t=new Uint8Array(N);t.set(e,r?0:t.length-e.length),e=t}if(e.length!==N)throw new Error("Field.fromBytes: expected "+N+" bytes, got "+e.length);let i=r?(0,n.lX)(e):(0,n.Ph)(e);if(O&&(i=g(i,t)),!o&&!S.isValid(i))throw new Error("invalid field element: outside of range 0..ORDER");return i},invertBatch:t=>R(S,t),cmov:(t,e,r)=>r?e:t});return Object.freeze(S)}function I(t){if("bigint"!=typeof t)throw new Error("field order must be bigint");const e=t.toString(2).length;return Math.ceil(e/8)}function S(t){const e=I(t);return e+Math.ceil(e/2)}function F(t,e,r=!1){const o=t.length,i=I(e),f=S(e);if(o<16||o<f||o>1024)throw new Error("expected "+f+"-1024 bytes of input, got "+o);const u=g(r?(0,n.lX)(t):(0,n.Ph)(t),e-s)+s;return r?(0,n.z)(u,i):(0,n.lq)(u,i)}},50649:(t,e,r)=>{r.d(e,{Ak:()=>u,UT:()=>y,Xf:()=>m,fH:()=>E,hT:()=>p,u0:()=>f});var n=r(78906),o=r(15916);const i=BigInt(0),s=BigInt(1);function f(t,e){const r=e.negate();return t?r:e}function u(t,e){const r=(0,o.pS)(t.Fp,e.map(t=>t.Z));return e.map((e,n)=>t.fromAffine(e.toAffine(r[n])))}function c(t,e){if(!Number.isSafeInteger(t)||t<=0||t>e)throw new Error("invalid window size, expected [1.."+e+"], got W="+t)}function l(t,e){c(t,e);const r=2**t;return{windows:Math.ceil(e/t)+1,windowSize:2**(t-1),mask:(0,n.OG)(t),maxNumber:r,shiftBy:BigInt(t)}}function a(t,e,r){const{windowSize:n,mask:o,maxNumber:i,shiftBy:f}=r;let u=Number(t&o),c=t>>f;u>n&&(u-=i,c+=s);const l=e*n;return{nextN:c,offset:l+Math.abs(u)-1,isZero:0===u,isNeg:u<0,isNegF:e%2!=0,offsetF:l}}const d=new WeakMap,h=new WeakMap;function w(t){return h.get(t)||1}function g(t){if(t!==i)throw new Error("invalid wNAF")}class p{constructor(t,e){this.BASE=t.BASE,this.ZERO=t.ZERO,this.Fn=t.Fn,this.bits=e}_unsafeLadder(t,e,r=this.ZERO){let n=t;for(;e>i;)e&s&&(r=r.add(n)),n=n.double(),e>>=s;return r}precomputeWindow(t,e){const{windows:r,windowSize:n}=l(e,this.bits),o=[];let i=t,s=i;for(let t=0;t<r;t++){s=i,o.push(s);for(let t=1;t<n;t++)s=s.add(i),o.push(s);i=s.double()}return o}wNAF(t,e,r){if(!this.Fn.isValid(r))throw new Error("invalid scalar");let n=this.ZERO,o=this.BASE;const i=l(t,this.bits);for(let t=0;t<i.windows;t++){const{nextN:s,offset:u,isZero:c,isNeg:l,isNegF:d,offsetF:h}=a(r,t,i);r=s,c?o=o.add(f(d,e[h])):n=n.add(f(l,e[u]))}return g(r),{p:n,f:o}}wNAFUnsafe(t,e,r,n=this.ZERO){const o=l(t,this.bits);for(let t=0;t<o.windows&&r!==i;t++){const{nextN:i,offset:s,isZero:f,isNeg:u}=a(r,t,o);if(r=i,!f){const t=e[s];n=n.add(u?t.negate():t)}}return g(r),n}getPrecomputes(t,e,r){let n=d.get(e);return n||(n=this.precomputeWindow(e,t),1!==t&&("function"==typeof r&&(n=r(n)),d.set(e,n))),n}cached(t,e,r){const n=w(t);return this.wNAF(n,this.getPrecomputes(n,t,r),e)}unsafe(t,e,r,n){const o=w(t);return 1===o?this._unsafeLadder(t,e,n):this.wNAFUnsafe(o,this.getPrecomputes(o,t,r),e,n)}createCache(t,e){c(e,this.bits),h.set(t,e),d.delete(t)}hasCache(t){return 1!==w(t)}}function E(t,e,r,n){let o=e,f=t.ZERO,u=t.ZERO;for(;r>i||n>i;)r&s&&(f=f.add(o)),n&s&&(u=u.add(o)),o=o.double(),r>>=s,n>>=s;return{p1:f,p2:u}}function m(t,e,r,o){(function(t,e){if(!Array.isArray(t))throw new Error("array expected");t.forEach((t,r)=>{if(!(t instanceof e))throw new Error("invalid point at index "+r)})})(r,t),function(t,e){if(!Array.isArray(t))throw new Error("array of scalars expected");t.forEach((t,r)=>{if(!e.isValid(t))throw new Error("invalid scalar at index "+r)})}(o,e);const i=r.length,s=o.length;if(i!==s)throw new Error("arrays of points and scalars must have equal length");const f=t.ZERO,u=(0,n.dJ)(BigInt(i));let c=1;u>12?c=u-3:u>4?c=u-2:u>0&&(c=2);const l=(0,n.OG)(c),a=new Array(Number(l)+1).fill(f);let d=f;for(let t=Math.floor((e.BITS-1)/c)*c;t>=0;t-=c){a.fill(f);for(let e=0;e<s;e++){const n=o[e],i=Number(n>>BigInt(t)&l);a[i]=a[i].add(r[e])}let e=f;for(let t=a.length-1,r=f;t>0;t--)r=r.add(a[t]),e=e.add(r);if(d=d.add(e),0!==t)for(let t=0;t<c;t++)d=d.double()}return d}function b(t,e,r){if(e){if(e.ORDER!==t)throw new Error("Field.ORDER must match order: Fp == p, Fn == n");return(0,o.jr)(e),e}return(0,o.D0)(t,{isLE:r})}function y(t,e,r={},n){if(void 0===n&&(n="edwards"===t),!e||"object"!=typeof e)throw new Error(`expected valid ${t} CURVE object`);for(const t of["p","n","h"]){const r=e[t];if(!("bigint"==typeof r&&r>i))throw new Error(`CURVE.${t} must be positive bigint`)}const o=b(e.p,r.Fp,n),s=b(e.n,r.Fn,n),f=["Gx","Gy","a","weierstrass"===t?"b":"d"];for(const t of f)if(!o.isValid(e[t]))throw new Error(`CURVE.${t} must be valid field element of CURVE.Fp`);return{CURVE:e=Object.freeze(Object.assign({},e)),Fp:o,Fn:s}}},78906:(t,e,r)=>{r.d(e,{DS:()=>O,Mh:()=>E,OG:()=>v,Ph:()=>l,SJ:()=>q,aK:()=>b,d6:()=>s,dJ:()=>y,eV:()=>f,ex:()=>g,fg:()=>B,lX:()=>a,lq:()=>d,nC:()=>p,qj:()=>w,x:()=>R,z:()=>h,zW:()=>u});var n=r(32531);const o=BigInt(0),i=BigInt(1);function s(t,e=""){if("boolean"!=typeof t)throw new Error((e&&`"${e}"`)+"expected boolean, got type="+typeof t);return t}function f(t,e,r=""){const o=(0,n.aY)(t),i=t?.length,s=void 0!==e;if(!o||s&&i!==e)throw new Error((r&&`"${r}" `)+"expected Uint8Array"+(s?` of length ${e}`:"")+", got "+(o?`length=${i}`:"type="+typeof t));return t}function u(t){const e=t.toString(16);return 1&e.length?"0"+e:e}function c(t){if("string"!=typeof t)throw new Error("hex string expected, got "+typeof t);return""===t?o:BigInt("0x"+t)}function l(t){return c((0,n.My)(t))}function a(t){return(0,n.DO)(t),c((0,n.My)(Uint8Array.from(t).reverse()))}function d(t,e){return(0,n.aT)(t.toString(16).padStart(2*e,"0"))}function h(t,e){return d(t,e).reverse()}function w(t,e,r){let o;if("string"==typeof e)try{o=(0,n.aT)(e)}catch(e){throw new Error(t+" must be hex string or Uint8Array, cause: "+e)}else{if(!(0,n.aY)(e))throw new Error(t+" must be hex string or Uint8Array");o=Uint8Array.from(e)}const i=o.length;if("number"==typeof r&&i!==r)throw new Error(t+" of length "+r+" expected, got "+i);return o}function g(t,e){if(t.length!==e.length)return!1;let r=0;for(let n=0;n<t.length;n++)r|=t[n]^e[n];return 0===r}function p(t){return Uint8Array.from(t)}function E(t){return Uint8Array.from(t,(e,r)=>{const n=e.charCodeAt(0);if(1!==e.length||n>127)throw new Error(`string contains non-ASCII character "${t[r]}" with code ${n} at position ${r}`);return n})}const m=t=>"bigint"==typeof t&&o<=t;function b(t,e,r,n){if(!function(t,e,r){return m(t)&&m(e)&&m(r)&&e<=t&&t<r}(e,r,n))throw new Error("expected valid "+t+": "+r+" <= n < "+n+", got "+e)}function y(t){let e;for(e=0;t>o;t>>=i,e+=1);return e}const v=t=>(i<<BigInt(t))-i;function B(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");const o=t=>new Uint8Array(t),i=t=>Uint8Array.of(t);let s=o(t),f=o(t),u=0;const c=()=>{s.fill(1),f.fill(0),u=0},l=(...t)=>r(f,s,...t),a=(t=o(0))=>{f=l(i(0),t),s=l(),0!==t.length&&(f=l(i(1),t),s=l())},d=()=>{if(u++>=1e3)throw new Error("drbg: tried 1000 values");let t=0;const r=[];for(;t<e;){s=l();const e=s.slice();r.push(e),t+=s.length}return(0,n.Id)(...r)};return(t,e)=>{let r;for(c(),a(t);!(r=e(d()));)a();return c(),r}}function O(t,e,r={}){if(!t||"object"!=typeof t)throw new Error("expected valid options object");function n(e,r,n){const o=t[e];if(n&&void 0===o)return;const i=typeof o;if(i!==r||null===o)throw new Error(`param "${e}" is invalid: expected ${r}, got ${i}`)}Object.entries(e).forEach(([t,e])=>n(t,e,!1)),Object.entries(r).forEach(([t,e])=>n(t,e,!0))}const q=()=>{throw new Error("not implemented")};function R(t){const e=new WeakMap;return(r,...n)=>{const o=e.get(r);if(void 0!==o)return o;const i=t(r,...n);return e.set(r,i),i}}}}]);
@@ -0,0 +1 @@
1
+ /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
@@ -0,0 +1 @@
1
+ "use strict";(this.webpackChunkShogunButtonReact=this.webpackChunkShogunButtonReact||[]).push([[695],{18695:(e,t,r)=>{function n(e){if("boolean"!=typeof e)throw new Error(`boolean expected, not ${e}`)}function o(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function i(e,t,r=""){const n=(o=e)instanceof Uint8Array||ArrayBuffer.isView(o)&&"Uint8Array"===o.constructor.name;var o;const i=e?.length,s=void 0!==t;if(!n||s&&i!==t)throw new Error((r&&`"${r}" `)+"expected Uint8Array"+(s?` of length ${t}`:"")+", got "+(n?`length=${i}`:"type="+typeof e));return e}function s(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function a(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function u(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}r.d(t,{Chacha20Poly1305:()=>I});const c=(()=>68===new Uint8Array(new Uint32Array([287454020]).buffer)[0])(),h=(e,t)=>{function r(r,...n){if(i(r,void 0,"key"),!c)throw new Error("Non little-endian hardware is not yet supported");void 0!==e.nonceLength&&i(n[0],e.varSizeNonce?void 0:e.nonceLength,"nonce");const o=e.tagLength;o&&void 0!==n[1]&&i(n[1],void 0,"AAD");const s=t(r,...n),a=(e,t)=>{if(void 0!==t){if(2!==e)throw new Error("cipher output not supported");i(t,void 0,"output")}};let u=!1;return{encrypt(e,t){if(u)throw new Error("cannot encrypt() twice with same key + nonce");return u=!0,i(e),a(s.encrypt.length,t),s.encrypt(e,t)},decrypt(e,t){if(i(e),o&&e.length<o)throw new Error('"ciphertext" expected length bigger than tagLength='+o);return a(s.decrypt.length,t),s.decrypt(e,t)}}}return Object.assign(r,e),r};function l(e,t,r=!0){if(void 0===t)return new Uint8Array(e);if(t.length!==e)throw new Error('"output" expected Uint8Array of length '+e+", got: "+t.length);if(r&&t.byteOffset%4!=0)throw new Error("invalid output, must be aligned");return t}function f(e){return Uint8Array.from(e)}const y=e=>Uint8Array.from(e.split("").map(e=>e.charCodeAt(0))),b=y("expand 16-byte k"),w=y("expand 32-byte k"),p=a(b),d=a(w);function g(e,t){return e<<t|e>>>32-t}function v(e){return e.byteOffset%4==0}const A=2**32-1,U=Uint32Array.of();function m(e,t){const{allowShortKeys:r,extendNonceFn:s,counterLength:c,counterRight:h,rounds:l}=function(e,t){if(null==t||"object"!=typeof t)throw new Error("options must be defined");return Object.assign({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},t)}(0,t);if("function"!=typeof e)throw new Error("core must be a function");return o(c),o(l),n(h),n(r),(t,n,y,b,w=0)=>{i(t,void 0,"key"),i(n,void 0,"nonce"),i(y,void 0,"data");const g=y.length;if(void 0===b&&(b=new Uint8Array(g)),i(b,void 0,"output"),o(w),w<0||w>=A)throw new Error("arx: counter overflow");if(b.length<g)throw new Error(`arx: output (${b.length}) is shorter than data (${g})`);const m=[],k=t.length;let E,L;if(32===k)m.push(E=f(t)),L=d;else{if(16!==k||!r)throw i(t,32,"arx key"),new Error("invalid key size");E=new Uint8Array(32),E.set(t),E.set(t,16),L=p,m.push(E)}v(n)||m.push(n=f(n));const x=a(E);if(s){if(24!==n.length)throw new Error("arx: extended nonce must be 24 bytes");s(L,x,a(n.subarray(0,16)),x),n=n.subarray(16)}const O=16-c;if(O!==n.length)throw new Error(`arx: nonce must be ${O} or 16 bytes`);if(12!==O){const e=new Uint8Array(12);e.set(n,h?0:12-n.length),n=e,m.push(n)}const P=a(n);return function(e,t,r,n,o,i,s,u){const c=o.length,h=new Uint8Array(64),l=a(h),f=v(o)&&v(i),y=f?a(o):U,b=f?a(i):U;for(let a=0;a<c;s++){if(e(t,r,n,l,s,u),s>=A)throw new Error("arx: counter overflow");const w=Math.min(64,c-a);if(f&&64===w){const e=a/4;if(a%4!=0)throw new Error("arx: invalid block position");for(let t,r=0;r<16;r++)t=e+r,b[t]=y[t]^l[r];a+=64;continue}for(let e,t=0;t<w;t++)e=a+t,i[e]=o[e]^h[t];a+=w}}(e,L,x,P,y,b,w,l),u(...m),b}}function k(e,t){return 255&e[t++]|(255&e[t++])<<8}class E{constructor(e){Object.defineProperty(this,"blockLen",{enumerable:!0,configurable:!0,writable:!0,value:16}),Object.defineProperty(this,"outputLen",{enumerable:!0,configurable:!0,writable:!0,value:16}),Object.defineProperty(this,"buffer",{enumerable:!0,configurable:!0,writable:!0,value:new Uint8Array(16)}),Object.defineProperty(this,"r",{enumerable:!0,configurable:!0,writable:!0,value:new Uint16Array(10)}),Object.defineProperty(this,"h",{enumerable:!0,configurable:!0,writable:!0,value:new Uint16Array(10)}),Object.defineProperty(this,"pad",{enumerable:!0,configurable:!0,writable:!0,value:new Uint16Array(8)}),Object.defineProperty(this,"pos",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"finished",{enumerable:!0,configurable:!0,writable:!0,value:!1});const t=k(e=f(i(e,32,"key")),0),r=k(e,2),n=k(e,4),o=k(e,6),s=k(e,8),a=k(e,10),u=k(e,12),c=k(e,14);this.r[0]=8191&t,this.r[1]=8191&(t>>>13|r<<3),this.r[2]=7939&(r>>>10|n<<6),this.r[3]=8191&(n>>>7|o<<9),this.r[4]=255&(o>>>4|s<<12),this.r[5]=s>>>1&8190,this.r[6]=8191&(s>>>14|a<<2),this.r[7]=8065&(a>>>11|u<<5),this.r[8]=8191&(u>>>8|c<<8),this.r[9]=c>>>5&127;for(let t=0;t<8;t++)this.pad[t]=k(e,16+2*t)}process(e,t,r=!1){const n=r?0:2048,{h:o,r:i}=this,s=i[0],a=i[1],u=i[2],c=i[3],h=i[4],l=i[5],f=i[6],y=i[7],b=i[8],w=i[9],p=k(e,t+0),d=k(e,t+2),g=k(e,t+4),v=k(e,t+6),A=k(e,t+8),U=k(e,t+10),m=k(e,t+12),E=k(e,t+14),L=o[0]+(8191&p),x=o[1]+(8191&(p>>>13|d<<3)),O=o[2]+(8191&(d>>>10|g<<6)),P=o[3]+(8191&(g>>>7|v<<9)),j=o[4]+(8191&(v>>>4|A<<12)),S=o[5]+(A>>>1&8191),z=o[6]+(8191&(A>>>14|U<<2)),_=o[7]+(8191&(U>>>11|m<<5)),B=o[8]+(8191&(m>>>8|E<<8)),$=o[9]+(E>>>5|n);let C=0,I=C+L*s+x*(5*w)+O*(5*b)+P*(5*y)+j*(5*f);C=I>>>13,I&=8191,I+=S*(5*l)+z*(5*h)+_*(5*c)+B*(5*u)+$*(5*a),C+=I>>>13,I&=8191;let R=C+L*a+x*s+O*(5*w)+P*(5*b)+j*(5*y);C=R>>>13,R&=8191,R+=S*(5*f)+z*(5*l)+_*(5*h)+B*(5*c)+$*(5*u),C+=R>>>13,R&=8191;let N=C+L*u+x*a+O*s+P*(5*w)+j*(5*b);C=N>>>13,N&=8191,N+=S*(5*y)+z*(5*f)+_*(5*l)+B*(5*h)+$*(5*c),C+=N>>>13,N&=8191;let D=C+L*c+x*u+O*a+P*s+j*(5*w);C=D>>>13,D&=8191,D+=S*(5*b)+z*(5*y)+_*(5*f)+B*(5*l)+$*(5*h),C+=D>>>13,D&=8191;let K=C+L*h+x*c+O*u+P*a+j*s;C=K>>>13,K&=8191,K+=S*(5*w)+z*(5*b)+_*(5*y)+B*(5*f)+$*(5*l),C+=K>>>13,K&=8191;let M=C+L*l+x*h+O*c+P*u+j*a;C=M>>>13,M&=8191,M+=S*s+z*(5*w)+_*(5*b)+B*(5*y)+$*(5*f),C+=M>>>13,M&=8191;let H=C+L*f+x*l+O*h+P*c+j*u;C=H>>>13,H&=8191,H+=S*a+z*s+_*(5*w)+B*(5*b)+$*(5*y),C+=H>>>13,H&=8191;let V=C+L*y+x*f+O*l+P*h+j*c;C=V>>>13,V&=8191,V+=S*u+z*a+_*s+B*(5*w)+$*(5*b),C+=V>>>13,V&=8191;let F=C+L*b+x*y+O*f+P*l+j*h;C=F>>>13,F&=8191,F+=S*c+z*u+_*a+B*s+$*(5*w),C+=F>>>13,F&=8191;let q=C+L*w+x*b+O*y+P*f+j*l;C=q>>>13,q&=8191,q+=S*h+z*c+_*u+B*a+$*s,C+=q>>>13,q&=8191,C=(C<<2)+C|0,C=C+I|0,I=8191&C,C>>>=13,R+=C,o[0]=I,o[1]=R,o[2]=N,o[3]=D,o[4]=K,o[5]=M,o[6]=H,o[7]=V,o[8]=F,o[9]=q}finalize(){const{h:e,pad:t}=this,r=new Uint16Array(10);let n=e[1]>>>13;e[1]&=8191;for(let t=2;t<10;t++)e[t]+=n,n=e[t]>>>13,e[t]&=8191;e[0]+=5*n,n=e[0]>>>13,e[0]&=8191,e[1]+=n,n=e[1]>>>13,e[1]&=8191,e[2]+=n,r[0]=e[0]+5,n=r[0]>>>13,r[0]&=8191;for(let t=1;t<10;t++)r[t]=e[t]+n,n=r[t]>>>13,r[t]&=8191;r[9]-=8192;let o=(1^n)-1;for(let e=0;e<10;e++)r[e]&=o;o=~o;for(let t=0;t<10;t++)e[t]=e[t]&o|r[t];e[0]=65535&(e[0]|e[1]<<13),e[1]=65535&(e[1]>>>3|e[2]<<10),e[2]=65535&(e[2]>>>6|e[3]<<7),e[3]=65535&(e[3]>>>9|e[4]<<4),e[4]=65535&(e[4]>>>12|e[5]<<1|e[6]<<14),e[5]=65535&(e[6]>>>2|e[7]<<11),e[6]=65535&(e[7]>>>5|e[8]<<8),e[7]=65535&(e[8]>>>8|e[9]<<5);let i=e[0]+t[0];e[0]=65535&i;for(let r=1;r<8;r++)i=(e[r]+t[r]|0)+(i>>>16)|0,e[r]=65535&i;u(r)}update(e){s(this),i(e),e=f(e);const{buffer:t,blockLen:r}=this,n=e.length;for(let o=0;o<n;){const i=Math.min(r-this.pos,n-o);if(i!==r)t.set(e.subarray(o,o+i),this.pos),this.pos+=i,o+=i,this.pos===r&&(this.process(t,0,!1),this.pos=0);else for(;r<=n-o;o+=r)this.process(e,o)}return this}destroy(){u(this.h,this.r,this.buffer,this.pad)}digestInto(e){s(this),function(e,t){i(e,void 0,"output");const r=t.outputLen;if(e.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}(e,this),this.finished=!0;const{buffer:t,h:r}=this;let{pos:n}=this;if(n){for(t[n++]=1;n<16;n++)t[n]=0;this.process(t,0,!0)}this.finalize();let o=0;for(let t=0;t<8;t++)e[o++]=r[t]>>>0,e[o++]=r[t]>>>8;return e}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const r=e.slice(0,t);return this.destroy(),r}}const L=(()=>function(e){const t=(t,r)=>e(r).update(t).digest(),r=e(new Uint8Array(32));return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t}(e=>new E(e)))();function x(e,t,r,n,o,i=20){const s=e[0],a=e[1],u=e[2],c=e[3],h=t[0],l=t[1],f=t[2],y=t[3],b=t[4],w=t[5],p=t[6],d=t[7],v=o,A=r[0],U=r[1],m=r[2];let k=s,E=a,L=u,x=c,O=h,P=l,j=f,S=y,z=b,_=w,B=p,$=d,C=v,I=A,R=U,N=m;for(let e=0;e<i;e+=2)k=k+O|0,C=g(C^k,16),z=z+C|0,O=g(O^z,12),k=k+O|0,C=g(C^k,8),z=z+C|0,O=g(O^z,7),E=E+P|0,I=g(I^E,16),_=_+I|0,P=g(P^_,12),E=E+P|0,I=g(I^E,8),_=_+I|0,P=g(P^_,7),L=L+j|0,R=g(R^L,16),B=B+R|0,j=g(j^B,12),L=L+j|0,R=g(R^L,8),B=B+R|0,j=g(j^B,7),x=x+S|0,N=g(N^x,16),$=$+N|0,S=g(S^$,12),x=x+S|0,N=g(N^x,8),$=$+N|0,S=g(S^$,7),k=k+P|0,N=g(N^k,16),B=B+N|0,P=g(P^B,12),k=k+P|0,N=g(N^k,8),B=B+N|0,P=g(P^B,7),E=E+j|0,C=g(C^E,16),$=$+C|0,j=g(j^$,12),E=E+j|0,C=g(C^E,8),$=$+C|0,j=g(j^$,7),L=L+S|0,I=g(I^L,16),z=z+I|0,S=g(S^z,12),L=L+S|0,I=g(I^L,8),z=z+I|0,S=g(S^z,7),x=x+O|0,R=g(R^x,16),_=_+R|0,O=g(O^_,12),x=x+O|0,R=g(R^x,8),_=_+R|0,O=g(O^_,7);let D=0;n[D++]=s+k|0,n[D++]=a+E|0,n[D++]=u+L|0,n[D++]=c+x|0,n[D++]=h+O|0,n[D++]=l+P|0,n[D++]=f+j|0,n[D++]=y+S|0,n[D++]=b+z|0,n[D++]=w+_|0,n[D++]=p+B|0,n[D++]=d+$|0,n[D++]=v+C|0,n[D++]=A+I|0,n[D++]=U+R|0,n[D++]=m+N|0}const O=m(x,{counterRight:!1,counterLength:4,allowShortKeys:!1}),P=new Uint8Array(16),j=(e,t)=>{e.update(t);const r=t.length%16;r&&e.update(P.subarray(r))},S=new Uint8Array(32);function z(e,t,r,o,s){void 0!==s&&i(s,void 0,"AAD");const a=e(t,r,S),c=function(e,t,r){n(r);const o=new Uint8Array(16),i=(s=o,new DataView(s.buffer,s.byteOffset,s.byteLength));var s;return i.setBigUint64(0,BigInt(t),r),i.setBigUint64(8,BigInt(e),r),o}(o.length,s?s.length:0,!0),h=L.create(a);s&&j(h,s),j(h,o),h.update(c);const l=h.digest();return u(a,c),l}const _=h({blockSize:64,nonceLength:12,tagLength:16},(B=O,(e,t,r)=>({encrypt(n,o){const i=n.length;(o=l(i+16,o,!1)).set(n);const s=o.subarray(0,-16);B(e,t,s,s,1);const a=z(B,e,t,s,r);return o.set(a,i),u(a),o},decrypt(n,o){o=l(n.length-16,o,!1);const i=n.subarray(0,-16),s=n.subarray(-16),a=z(B,e,t,i,r);if(!function(e,t){if(e.length!==t.length)return!1;let r=0;for(let n=0;n<e.length;n++)r|=e[n]^t[n];return 0===r}(s,a))throw new Error("invalid tag");return o.set(n.subarray(0,-16)),B(e,t,o,o,1),u(a),o}})));var B,$=r(24220);class C{constructor(e){Object.defineProperty(this,"_key",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._key=new Uint8Array(e)}async seal(e,t,r){return await this._seal(e,t,r)}async open(e,t,r){return await this._open(e,t,r)}_seal(e,t,r){return new Promise(n=>{n(_(this._key,new Uint8Array(e),new Uint8Array(r)).encrypt(new Uint8Array(t)).buffer)})}_open(e,t,r){return new Promise(n=>{n(_(this._key,new Uint8Array(e),new Uint8Array(r)).decrypt(new Uint8Array(t)).buffer)})}}class I{constructor(){Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:$.vw.Chacha20Poly1305}),Object.defineProperty(this,"keySize",{enumerable:!0,configurable:!0,writable:!0,value:32}),Object.defineProperty(this,"nonceSize",{enumerable:!0,configurable:!0,writable:!0,value:12}),Object.defineProperty(this,"tagSize",{enumerable:!0,configurable:!0,writable:!0,value:16})}createEncryptionContext(e){return new C(e)}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(this.webpackChunkShogunButtonReact=this.webpackChunkShogunButtonReact||[]).push([[732],{27732:(t,e,n)=>{n.d(e,{chacha20poly1305:()=>v});var r=n(28246);const o=t=>Uint8Array.from(t.split(""),t=>t.charCodeAt(0)),s=o("expand 16-byte k"),i=o("expand 32-byte k"),h=(0,r.DH)(s),u=(0,r.DH)(i);function c(t,e){return t<<e|t>>>32-e}function a(t){return t.byteOffset%4==0}const l=2**32-1,f=Uint32Array.of();function d(t,e){const{allowShortKeys:n,extendNonceFn:o,counterLength:s,counterRight:i,rounds:c}=(0,r.tY)({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},e);if("function"!=typeof t)throw new Error("core must be a function");return(0,r.Fe)(s),(0,r.Fe)(c),(0,r.e8)(i),(0,r.e8)(n),(e,d,p,y,w=0)=>{(0,r.DO)(e,void 0,"key"),(0,r.DO)(d,void 0,"nonce"),(0,r.DO)(p,void 0,"data");const g=p.length;if(void 0===y&&(y=new Uint8Array(g)),(0,r.DO)(y,void 0,"output"),(0,r.Fe)(w),w<0||w>=l)throw new Error("arx: counter overflow");if(y.length<g)throw new Error(`arx: output (${y.length}) is shorter than data (${g})`);const b=[];let A,D,k=e.length;if(32===k)b.push(A=(0,r.nC)(e)),D=u;else{if(16!==k||!n)throw(0,r.DO)(e,32,"arx key"),new Error("invalid key size");A=new Uint8Array(32),A.set(e),A.set(e,16),D=h,b.push(A)}a(d)||b.push(d=(0,r.nC)(d));const H=(0,r.DH)(A);if(o){if(24!==d.length)throw new Error("arx: extended nonce must be 24 bytes");o(D,H,(0,r.DH)(d.subarray(0,16)),H),d=d.subarray(16)}const L=16-s;if(L!==d.length)throw new Error(`arx: nonce must be ${L} or 16 bytes`);if(12!==L){const t=new Uint8Array(12);t.set(d,i?0:12-d.length),d=t,b.push(d)}const U=(0,r.DH)(d);return function(t,e,n,o,s,i,h,u){const c=s.length,d=new Uint8Array(64),p=(0,r.DH)(d),y=a(s)&&a(i),w=y?(0,r.DH)(s):f,g=y?(0,r.DH)(i):f;for(let r=0;r<c;h++){if(t(e,n,o,p,h,u),h>=l)throw new Error("arx: counter overflow");const a=Math.min(64,c-r);if(y&&64===a){const t=r/4;if(r%4!=0)throw new Error("arx: invalid block position");for(let e,n=0;n<16;n++)e=t+n,g[e]=w[e]^p[n];r+=64;continue}for(let t,e=0;e<a;e++)t=r+e,i[t]=s[t]^d[e];r+=a}}(t,D,H,U,p,y,w,c),(0,r.uH)(...b),y}}function p(t,e){return 255&t[e++]|(255&t[e++])<<8}class y{blockLen=16;outputLen=16;buffer=new Uint8Array(16);r=new Uint16Array(10);h=new Uint16Array(10);pad=new Uint16Array(8);pos=0;finished=!1;constructor(t){const e=p(t=(0,r.nC)((0,r.DO)(t,32,"key")),0),n=p(t,2),o=p(t,4),s=p(t,6),i=p(t,8),h=p(t,10),u=p(t,12),c=p(t,14);this.r[0]=8191&e,this.r[1]=8191&(e>>>13|n<<3),this.r[2]=7939&(n>>>10|o<<6),this.r[3]=8191&(o>>>7|s<<9),this.r[4]=255&(s>>>4|i<<12),this.r[5]=i>>>1&8190,this.r[6]=8191&(i>>>14|h<<2),this.r[7]=8065&(h>>>11|u<<5),this.r[8]=8191&(u>>>8|c<<8),this.r[9]=c>>>5&127;for(let e=0;e<8;e++)this.pad[e]=p(t,16+2*e)}process(t,e,n=!1){const r=n?0:2048,{h:o,r:s}=this,i=s[0],h=s[1],u=s[2],c=s[3],a=s[4],l=s[5],f=s[6],d=s[7],y=s[8],w=s[9],g=p(t,e+0),b=p(t,e+2),A=p(t,e+4),D=p(t,e+6),k=p(t,e+8),H=p(t,e+10),L=p(t,e+12),U=p(t,e+14);let v=o[0]+(8191&g),x=o[1]+(8191&(g>>>13|b<<3)),C=o[2]+(8191&(b>>>10|A<<6)),E=o[3]+(8191&(A>>>7|D<<9)),O=o[4]+(8191&(D>>>4|k<<12)),S=o[5]+(k>>>1&8191),m=o[6]+(8191&(k>>>14|H<<2)),R=o[7]+(8191&(H>>>11|L<<5)),F=o[8]+(8191&(L>>>8|U<<8)),$=o[9]+(U>>>5|r),z=0,K=z+v*i+x*(5*w)+C*(5*y)+E*(5*d)+O*(5*f);z=K>>>13,K&=8191,K+=S*(5*l)+m*(5*a)+R*(5*c)+F*(5*u)+$*(5*h),z+=K>>>13,K&=8191;let N=z+v*h+x*i+C*(5*w)+E*(5*y)+O*(5*d);z=N>>>13,N&=8191,N+=S*(5*f)+m*(5*l)+R*(5*a)+F*(5*c)+$*(5*u),z+=N>>>13,N&=8191;let B=z+v*u+x*h+C*i+E*(5*w)+O*(5*y);z=B>>>13,B&=8191,B+=S*(5*d)+m*(5*f)+R*(5*l)+F*(5*a)+$*(5*c),z+=B>>>13,B&=8191;let I=z+v*c+x*u+C*h+E*i+O*(5*w);z=I>>>13,I&=8191,I+=S*(5*y)+m*(5*d)+R*(5*f)+F*(5*l)+$*(5*a),z+=I>>>13,I&=8191;let M=z+v*a+x*c+C*u+E*h+O*i;z=M>>>13,M&=8191,M+=S*(5*w)+m*(5*y)+R*(5*d)+F*(5*f)+$*(5*l),z+=M>>>13,M&=8191;let q=z+v*l+x*a+C*c+E*u+O*h;z=q>>>13,q&=8191,q+=S*i+m*(5*w)+R*(5*y)+F*(5*d)+$*(5*f),z+=q>>>13,q&=8191;let P=z+v*f+x*l+C*a+E*c+O*u;z=P>>>13,P&=8191,P+=S*h+m*i+R*(5*w)+F*(5*y)+$*(5*d),z+=P>>>13,P&=8191;let Y=z+v*d+x*f+C*l+E*a+O*c;z=Y>>>13,Y&=8191,Y+=S*u+m*h+R*i+F*(5*w)+$*(5*y),z+=Y>>>13,Y&=8191;let j=z+v*y+x*d+C*f+E*l+O*a;z=j>>>13,j&=8191,j+=S*c+m*u+R*h+F*i+$*(5*w),z+=j>>>13,j&=8191;let G=z+v*w+x*y+C*d+E*f+O*l;z=G>>>13,G&=8191,G+=S*a+m*c+R*u+F*h+$*i,z+=G>>>13,G&=8191,z=(z<<2)+z|0,z=z+K|0,K=8191&z,z>>>=13,N+=z,o[0]=K,o[1]=N,o[2]=B,o[3]=I,o[4]=M,o[5]=q,o[6]=P,o[7]=Y,o[8]=j,o[9]=G}finalize(){const{h:t,pad:e}=this,n=new Uint16Array(10);let o=t[1]>>>13;t[1]&=8191;for(let e=2;e<10;e++)t[e]+=o,o=t[e]>>>13,t[e]&=8191;t[0]+=5*o,o=t[0]>>>13,t[0]&=8191,t[1]+=o,o=t[1]>>>13,t[1]&=8191,t[2]+=o,n[0]=t[0]+5,o=n[0]>>>13,n[0]&=8191;for(let e=1;e<10;e++)n[e]=t[e]+o,o=n[e]>>>13,n[e]&=8191;n[9]-=8192;let s=(1^o)-1;for(let t=0;t<10;t++)n[t]&=s;s=~s;for(let e=0;e<10;e++)t[e]=t[e]&s|n[e];t[0]=65535&(t[0]|t[1]<<13),t[1]=65535&(t[1]>>>3|t[2]<<10),t[2]=65535&(t[2]>>>6|t[3]<<7),t[3]=65535&(t[3]>>>9|t[4]<<4),t[4]=65535&(t[4]>>>12|t[5]<<1|t[6]<<14),t[5]=65535&(t[6]>>>2|t[7]<<11),t[6]=65535&(t[7]>>>5|t[8]<<8),t[7]=65535&(t[8]>>>8|t[9]<<5);let i=t[0]+e[0];t[0]=65535&i;for(let n=1;n<8;n++)i=(t[n]+e[n]|0)+(i>>>16)|0,t[n]=65535&i;(0,r.uH)(n)}update(t){(0,r.CC)(this),(0,r.DO)(t),t=(0,r.nC)(t);const{buffer:e,blockLen:n}=this,o=t.length;for(let r=0;r<o;){const s=Math.min(n-this.pos,o-r);if(s!==n)e.set(t.subarray(r,r+s),this.pos),this.pos+=s,r+=s,this.pos===n&&(this.process(e,0,!1),this.pos=0);else for(;n<=o-r;r+=n)this.process(t,r)}return this}destroy(){(0,r.uH)(this.h,this.r,this.buffer,this.pad)}digestInto(t){(0,r.CC)(this),(0,r.Ht)(t,this),this.finished=!0;const{buffer:e,h:n}=this;let{pos:o}=this;if(o){for(e[o++]=1;o<16;o++)e[o]=0;this.process(e,0,!0)}this.finalize();let s=0;for(let e=0;e<8;e++)t[s++]=n[e]>>>0,t[s++]=n[e]>>>8;return t}digest(){const{buffer:t,outputLen:e}=this;this.digestInto(t);const n=t.slice(0,e);return this.destroy(),n}}const w=(()=>function(t){const e=(e,n)=>t(n).update(e).digest(),n=t(new Uint8Array(32));return e.outputLen=n.outputLen,e.blockLen=n.blockLen,e.create=e=>t(e),e}(t=>new y(t)))();function g(t,e,n,r,o,s=20){let i=t[0],h=t[1],u=t[2],a=t[3],l=e[0],f=e[1],d=e[2],p=e[3],y=e[4],w=e[5],g=e[6],b=e[7],A=o,D=n[0],k=n[1],H=n[2],L=i,U=h,v=u,x=a,C=l,E=f,O=d,S=p,m=y,R=w,F=g,$=b,z=A,K=D,N=k,B=H;for(let t=0;t<s;t+=2)L=L+C|0,z=c(z^L,16),m=m+z|0,C=c(C^m,12),L=L+C|0,z=c(z^L,8),m=m+z|0,C=c(C^m,7),U=U+E|0,K=c(K^U,16),R=R+K|0,E=c(E^R,12),U=U+E|0,K=c(K^U,8),R=R+K|0,E=c(E^R,7),v=v+O|0,N=c(N^v,16),F=F+N|0,O=c(O^F,12),v=v+O|0,N=c(N^v,8),F=F+N|0,O=c(O^F,7),x=x+S|0,B=c(B^x,16),$=$+B|0,S=c(S^$,12),x=x+S|0,B=c(B^x,8),$=$+B|0,S=c(S^$,7),L=L+E|0,B=c(B^L,16),F=F+B|0,E=c(E^F,12),L=L+E|0,B=c(B^L,8),F=F+B|0,E=c(E^F,7),U=U+O|0,z=c(z^U,16),$=$+z|0,O=c(O^$,12),U=U+O|0,z=c(z^U,8),$=$+z|0,O=c(O^$,7),v=v+S|0,K=c(K^v,16),m=m+K|0,S=c(S^m,12),v=v+S|0,K=c(K^v,8),m=m+K|0,S=c(S^m,7),x=x+C|0,N=c(N^x,16),R=R+N|0,C=c(C^R,12),x=x+C|0,N=c(N^x,8),R=R+N|0,C=c(C^R,7);let I=0;r[I++]=i+L|0,r[I++]=h+U|0,r[I++]=u+v|0,r[I++]=a+x|0,r[I++]=l+C|0,r[I++]=f+E|0,r[I++]=d+O|0,r[I++]=p+S|0,r[I++]=y+m|0,r[I++]=w+R|0,r[I++]=g+F|0,r[I++]=b+$|0,r[I++]=A+z|0,r[I++]=D+K|0,r[I++]=k+N|0,r[I++]=H+B|0}const b=d(g,{counterRight:!1,counterLength:4,allowShortKeys:!1}),A=d(g,{counterRight:!1,counterLength:8,extendNonceFn:function(t,e,n,r){let o=t[0],s=t[1],i=t[2],h=t[3],u=e[0],a=e[1],l=e[2],f=e[3],d=e[4],p=e[5],y=e[6],w=e[7],g=n[0],b=n[1],A=n[2],D=n[3];for(let t=0;t<20;t+=2)o=o+u|0,g=c(g^o,16),d=d+g|0,u=c(u^d,12),o=o+u|0,g=c(g^o,8),d=d+g|0,u=c(u^d,7),s=s+a|0,b=c(b^s,16),p=p+b|0,a=c(a^p,12),s=s+a|0,b=c(b^s,8),p=p+b|0,a=c(a^p,7),i=i+l|0,A=c(A^i,16),y=y+A|0,l=c(l^y,12),i=i+l|0,A=c(A^i,8),y=y+A|0,l=c(l^y,7),h=h+f|0,D=c(D^h,16),w=w+D|0,f=c(f^w,12),h=h+f|0,D=c(D^h,8),w=w+D|0,f=c(f^w,7),o=o+a|0,D=c(D^o,16),y=y+D|0,a=c(a^y,12),o=o+a|0,D=c(D^o,8),y=y+D|0,a=c(a^y,7),s=s+l|0,g=c(g^s,16),w=w+g|0,l=c(l^w,12),s=s+l|0,g=c(g^s,8),w=w+g|0,l=c(l^w,7),i=i+f|0,b=c(b^i,16),d=d+b|0,f=c(f^d,12),i=i+f|0,b=c(b^i,8),d=d+b|0,f=c(f^d,7),h=h+u|0,A=c(A^h,16),p=p+A|0,u=c(u^p,12),h=h+u|0,A=c(A^h,8),p=p+A|0,u=c(u^p,7);let k=0;r[k++]=o,r[k++]=s,r[k++]=i,r[k++]=h,r[k++]=g,r[k++]=b,r[k++]=A,r[k++]=D},allowShortKeys:!1}),D=new Uint8Array(16),k=(t,e)=>{t.update(e);const n=e.length%16;n&&t.update(D.subarray(n))},H=new Uint8Array(32);function L(t,e,n,o,s){void 0!==s&&(0,r.DO)(s,void 0,"AAD");const i=t(e,n,H),h=(0,r.Pg)(o.length,s?s.length:0,!0),u=w.create(i);s&&k(u,s),k(u,o),u.update(h);const c=u.digest();return(0,r.uH)(i,h),c}const U=t=>(e,n,o)=>({encrypt(s,i){const h=s.length;(i=(0,r.N$)(h+16,i,!1)).set(s);const u=i.subarray(0,-16);t(e,n,u,u,1);const c=L(t,e,n,u,o);return i.set(c,h),(0,r.uH)(c),i},decrypt(s,i){i=(0,r.N$)(s.length-16,i,!1);const h=s.subarray(0,-16),u=s.subarray(-16),c=L(t,e,n,h,o);if(!(0,r.ex)(u,c))throw new Error("invalid tag");return i.set(s.subarray(0,-16)),t(e,n,i,i,1),(0,r.uH)(c),i}}),v=(0,r.qn)({blockSize:64,nonceLength:12,tagLength:16},U(b));U(A)}}]);
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 794.index.js.LICENSE.txt */
2
+ "use strict";(this.webpackChunkShogunButtonReact=this.webpackChunkShogunButtonReact||[]).push([[794],{26794:(f,t,e)=>{e.d(t,{ed448:()=>M});var n=e(79271),s=e(32531);const i=BigInt(0),r=BigInt(1),o=BigInt(2),c=BigInt(7),a=BigInt(256),h=BigInt(113),d=[],u=[],l=[];for(let f=0,t=r,e=1,n=0;f<24;f++){[e,n]=[n,(2*e+3*n)%5],d.push(2*(5*n+e)),u.push((f+1)*(f+2)/2%64);let s=i;for(let f=0;f<7;f++)t=(t<<r^(t>>c)*h)%a,t&o&&(s^=r<<(r<<BigInt(f))-r);l.push(s)}const B=(0,n.lD)(l,!0),g=B[0],p=B[1],I=(f,t,e)=>e>32?(0,n.WM)(f,t,e):(0,n.P5)(f,t,e),b=(f,t,e)=>e>32?(0,n.im)(f,t,e):(0,n.B4)(f,t,e);class w extends s.Vw{constructor(f,t,e,n=!1,i=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=f,this.suffix=t,this.outputLen=e,this.enableXOF=n,this.rounds=i,(0,s.Fe)(e),!(0<f&&f<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=(0,s.DH)(this.state)}clone(){return this._cloneInto()}keccak(){(0,s.fd)(this.state32),function(f,t=24){const e=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)e[t]=f[t]^f[t+10]^f[t+20]^f[t+30]^f[t+40];for(let t=0;t<10;t+=2){const n=(t+8)%10,s=(t+2)%10,i=e[s],r=e[s+1],o=I(i,r,1)^e[n],c=b(i,r,1)^e[n+1];for(let e=0;e<50;e+=10)f[t+e]^=o,f[t+e+1]^=c}let t=f[2],s=f[3];for(let e=0;e<24;e++){const n=u[e],i=I(t,s,n),r=b(t,s,n),o=d[e];t=f[o],s=f[o+1],f[o]=i,f[o+1]=r}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)e[n]=f[t+n];for(let n=0;n<10;n++)f[t+n]^=~e[(n+2)%10]&e[(n+4)%10]}f[0]^=g[n],f[1]^=p[n]}(0,s.uH)(e)}(this.state32,this.rounds),(0,s.fd)(this.state32),this.posOut=0,this.pos=0}update(f){(0,s.CC)(this),f=(0,s.ZJ)(f),(0,s.DO)(f);const{blockLen:t,state:e}=this,n=f.length;for(let s=0;s<n;){const i=Math.min(t-this.pos,n-s);for(let t=0;t<i;t++)e[this.pos++]^=f[s++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:f,suffix:t,pos:e,blockLen:n}=this;f[e]^=t,128&t&&e===n-1&&this.keccak(),f[n-1]^=128,this.keccak()}writeInto(f){(0,s.CC)(this,!1),(0,s.DO)(f),this.finish();const t=this.state,{blockLen:e}=this;for(let n=0,s=f.length;n<s;){this.posOut>=e&&this.keccak();const i=Math.min(e-this.posOut,s-n);f.set(t.subarray(this.posOut,this.posOut+i),n),this.posOut+=i,n+=i}return f}xofInto(f){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(f)}xof(f){return(0,s.Fe)(f),this.xofInto(new Uint8Array(f))}digestInto(f){if((0,s.Ht)(f,this),this.finished)throw new Error("digest() was already called");return this.writeInto(f),this.destroy(),f}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,(0,s.uH)(this.state)}_cloneInto(f){const{blockLen:t,suffix:e,outputLen:n,rounds:s,enableXOF:i}=this;return f||(f=new w(t,e,n,i,s)),f.state32.set(this.state32),f.pos=this.pos,f.posOut=this.posOut,f.finished=this.finished,f.rounds=s,f.suffix=e,f.outputLen=n,f.enableXOF=i,f.destroyed=this.destroyed,f}}const y=(()=>{return f=31,t=136,e=32,(0,s.xS)((n={})=>new w(t,f,void 0===n.dkLen?e:n.dkLen,!0));var f,t,e})();var O=e(50649),x=e(26618),k=(e(7766),e(15916)),E=e(78906);const m={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),n:BigInt("0x3fffffffffffffffffffffffffffffffffffffffffffffffffffffff7cca23e9c44edb49aed63690216cc2728dc58f552378c292ab5844f3"),h:BigInt(4),a:BigInt(1),d:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffffffffffffffffffffffffffffffffffffffffffffffff6756"),Gx:BigInt("0x4f1970c66bed0ded221d15a622bf36da9e146570470f1767ea6de324a3d3a46412ae1af72ab66511433b80e18b00938e2626a82bc70cc05e"),Gy:BigInt("0x693f46716eb6bc248876203756c9c7624bea73736ca3984087789c1e05a0c2d73ad3ff1ce67c39c4fdbd132c4ed7c8ad9808795bf230fa14")},H=Object.assign({},m,{d:BigInt("0xd78b4bdc7f0daf19f24f38c29373a2ccad46157242a50f37809b1da3412a12e79ccc9c81264cfe9ad080997058fb61c4243cc32dbaa156b9"),Gx:BigInt("0x79a70b2b70400553ae7c9df416c792c61128751ac92969240c25a07d728bdc93e21f7787ed6972249de732f38496cd11698713093e9c04fc"),Gy:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffff80000000000000000000000000000000000000000000000000000001")}),z=(0,s.qj)(()=>y.create({dkLen:114})),L=BigInt(1),D=BigInt(2),S=BigInt(3),v=BigInt(4),F=BigInt(11),R=BigInt(22),X=BigInt(44),A=BigInt(88),T=BigInt(223);function C(f){return f[0]&=252,f[55]|=128,f[56]=0,f}function P(f,t){const e=m.p,n=(0,k.zi)(f*f*t,e),s=(0,k.zi)(n*f,e),i=function(f){const t=m.p,e=f*f*f%t,n=e*e*f%t,s=(0,k.zH)(n,S,t)*n%t,i=(0,k.zH)(s,S,t)*n%t,r=(0,k.zH)(i,D,t)*e%t,o=(0,k.zH)(r,F,t)*r%t,c=(0,k.zH)(o,R,t)*o%t,a=(0,k.zH)(c,X,t)*c%t,h=(0,k.zH)(a,A,t)*a%t,d=(0,k.zH)(h,X,t)*c%t,u=(0,k.zH)(d,D,t)*e%t,l=(0,k.zH)(u,L,t)*f%t;return(0,k.zH)(l,T,t)*u%t}((0,k.zi)(s*n*t,e)),r=(0,k.zi)(s*i,e),o=(0,k.zi)(r*r,e);return{isValid:(0,k.zi)(o*t,e)===f,value:r}}const U=(()=>(0,k.D0)(m.p,{BITS:456,isLE:!0}))(),j=(()=>(0,k.D0)(m.n,{BITS:456,isLE:!0}))(),q=(()=>(0,k.D0)(m.p,{BITS:448,isLE:!0}))(),Q=(()=>(0,k.D0)(m.n,{BITS:448,isLE:!0}))();function Z(f,t,e){if(t.length>255)throw new Error("context must be smaller than 255, got: "+t.length);return(0,s.Id)((0,E.Mh)("SigEd448"),new Uint8Array([e?1:0,t.length]),t,f)}const G=(()=>({...m,Fp:U,Fn:j,nBitLength:j.BITS,hash:z,adjustScalarBytes:C,domain:Z,uvRatio:P}))(),M=(0,x.n6)(G);(0,x.TO)(H);const V=BigInt("39082"),Y=BigInt("78163"),_=BigInt("98944233647732219769177004876929019128417576295529901074099889598043702116001257856802131563896515373927712232092845883226922417596214"),J=BigInt("315019913931389607337177038330951043522456072897266928557328499619017160722351061360252776265186336876723201881398623946864393857820716"),W=f=>P(L,f);function K(f){const{d:t}=m,e=U.ORDER,n=f=>U.create(f),s=n(-f*f),i=n(t*(s-L)),r=n((i+L)*(i-s)),{isValid:o,value:c}=P(Y,n((s+L)*r));let a=c;o||(a=n(f*c));let h=L;o||(h=n(-L));const d=n(a*(s+L));let u=d;(0,k.dQ)(d,e)&&(u=n(-d));const l=d*d,B=n(u*D),g=n(l+L),p=n(l-L),I=n(a*d*(s-L)*Y+h);return new M.Point(n(B*I),n(p*g),n(g*I),n(B*p))}class N extends x.i5{constructor(f){super(f)}static fromAffine(f){return new N(M.Point.fromAffine(f))}assertSame(f){if(!(f instanceof N))throw new Error("DecafPoint expected")}init(f){return new N(f)}static hashToCurve(f){return function(f){(0,s.DO)(f,112);const t=!0,e=K(q.create(q.fromBytes(f.subarray(0,56),t))),n=K(q.create(q.fromBytes(f.subarray(56,112),t)));return new N(e.add(n))}((0,E.qj)("decafHash",f,112))}static fromBytes(f){(0,s.DO)(f,56);const{d:t}=m,e=U.ORDER,n=f=>q.create(f),i=q.fromBytes(f);if(!(0,E.ex)(Q.toBytes(i),f)||(0,k.dQ)(i,e))throw new Error("invalid decaf448 encoding 1");const r=n(i*i),o=n(L+r),c=n(o*o),a=n(c-v*t*r),{isValid:h,value:d}=W(n(a*c));let u=n((i+i)*d*o*_);(0,k.dQ)(u,e)&&(u=n(-u));const l=n(u*d*a*J),B=n((L-r)*d*o),g=n(l*B);if(!h)throw new Error("invalid decaf448 encoding 2");return new N(new M.Point(l,B,L,g))}static fromHex(f){return N.fromBytes((0,E.qj)("decafHex",f,56))}static msm(f,t){return(0,O.Xf)(N,j,f,t)}toBytes(){const{X:f,Z:t,T:e}=this.ep,n=U.ORDER,s=f=>U.create(f),i=s(s(f+e)*s(f-e)),r=s(f*f),{value:o}=W(s(i*V*r));let c=s(o*i*_);(0,k.dQ)(c,n)&&(c=s(-c));const a=s(J*c*t-e);let h=s(V*o*f*a);return(0,k.dQ)(h,n)&&(h=s(-h)),Q.toBytes(h)}equals(f){this.assertSame(f);const{X:t,Y:e}=this.ep,{X:n,Y:s}=f.ep;return U.create(t*s)===U.create(e*n)}is0(){return this.equals(N.ZERO)}}N.BASE=(()=>new N(M.Point.BASE).multiplyUnsafe(D))(),N.ZERO=(()=>new N(M.Point.ZERO))(),N.Fp=(()=>q)(),N.Fn=(()=>Q)()}}]);
@@ -0,0 +1 @@
1
+ /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
@@ -1,9 +1,9 @@
1
1
  import React from "react";
2
- import { ShogunCore } from "shogun-core";
2
+ import { ShogunCore, QuickStart } from "shogun-core";
3
3
  import { Observable } from "rxjs";
4
4
  import "../styles/index.css";
5
5
  type ShogunContextType = {
6
- core: ShogunCore | null;
6
+ core: ShogunCore | QuickStart | null;
7
7
  options: any;
8
8
  isLoggedIn: boolean;
9
9
  userPub: string | null;
@@ -25,7 +25,7 @@ type ShogunContextType = {
25
25
  export declare const useShogun: () => ShogunContextType;
26
26
  type ShogunButtonProviderProps = {
27
27
  children: React.ReactNode;
28
- core: ShogunCore;
28
+ core: ShogunCore | QuickStart;
29
29
  options: any;
30
30
  onLoginSuccess?: (data: {
31
31
  userPub: string;