@clerk/clerk-js 6.0.0-snapshot.v20251218183643 → 6.0.0-snapshot.v20260105214115
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.
- package/dist/197_clerk.legacy.browser_5b91cb_6.0.0-snapshot.v20260105214115.js +1 -0
- package/dist/507_clerk.legacy.browser_5b91cb_6.0.0-snapshot.v20260105214115.js +1 -0
- package/dist/base-account-sdk_clerk.legacy.browser_5b91cb_6.0.0-snapshot.v20260105214115.js +1 -0
- package/dist/clerk.browser.js +6 -6
- package/dist/clerk.chips.browser.js +6 -6
- package/dist/clerk.headless.browser.js +6 -6
- package/dist/clerk.headless.js +6 -6
- package/dist/clerk.js +6 -6
- package/dist/clerk.legacy.browser.js +1 -1
- package/dist/clerk.mjs +6 -6
- package/dist/clerk.no-rhc.js +6 -6
- package/dist/clerk.no-rhc.mjs +6 -6
- package/dist/coinbase-wallet-sdk_clerk.legacy.browser_5b91cb_6.0.0-snapshot.v20260105214115.js +1 -0
- package/dist/query-core-vendors_clerk.legacy.browser_5b91cb_6.0.0-snapshot.v20260105214115.js +1 -0
- package/dist/stripe-vendors_clerk.legacy.browser_5b91cb_6.0.0-snapshot.v20260105214115.js +1 -0
- package/dist/types/core/resources/Token.d.ts +1 -1
- package/dist/types/utils/errorThrower.d.ts +1 -1
- package/dist/types/utils/web3.d.ts +2 -2
- package/dist/vendors_clerk.legacy.browser_5b91cb_6.0.0-snapshot.v20260105214115.js +1 -0
- package/dist/{zxcvbn-common_clerk.legacy.browser_6e74bb_6.0.0-snapshot.v20251218183643.js → zxcvbn-common_clerk.legacy.browser_5b91cb_6.0.0-snapshot.v20260105214115.js} +1 -1
- package/dist/zxcvbn-ts-core_clerk.legacy.browser_5b91cb_6.0.0-snapshot.v20260105214115.js +1 -0
- package/package.json +5 -5
- package/dist/197_clerk.legacy.browser_6e74bb_6.0.0-snapshot.v20251218183643.js +0 -1
- package/dist/507_clerk.legacy.browser_6e74bb_6.0.0-snapshot.v20251218183643.js +0 -1
- package/dist/base-account-sdk_clerk.legacy.browser_6e74bb_6.0.0-snapshot.v20251218183643.js +0 -1
- package/dist/coinbase-wallet-sdk_clerk.legacy.browser_6e74bb_6.0.0-snapshot.v20251218183643.js +0 -1
- package/dist/query-core-vendors_clerk.legacy.browser_6e74bb_6.0.0-snapshot.v20251218183643.js +0 -1
- package/dist/stripe-vendors_clerk.legacy.browser_6e74bb_6.0.0-snapshot.v20251218183643.js +0 -1
- package/dist/vendors_clerk.legacy.browser_6e74bb_6.0.0-snapshot.v20251218183643.js +0 -1
- package/dist/zxcvbn-ts-core_clerk.legacy.browser_6e74bb_6.0.0-snapshot.v20251218183643.js +0 -1
- /package/dist/{197_clerk.browser_834334_6.0.0-snapshot.v20251218183643.js → 197_clerk.browser_8059c1_6.0.0-snapshot.v20260105214115.js} +0 -0
- /package/dist/{197_clerk.chips.browser_5e7a74_6.0.0-snapshot.v20251218183643.js → 197_clerk.chips.browser_c2692d_6.0.0-snapshot.v20260105214115.js} +0 -0
- /package/dist/{197_clerk.headless.browser_45a74c_6.0.0-snapshot.v20251218183643.js → 197_clerk.headless.browser_3d6b94_6.0.0-snapshot.v20260105214115.js} +0 -0
- /package/dist/{197_clerk.headless_38bd55_6.0.0-snapshot.v20251218183643.js → 197_clerk.headless_63d9cc_6.0.0-snapshot.v20260105214115.js} +0 -0
- /package/dist/{308_clerk.headless_38bd55_6.0.0-snapshot.v20251218183643.js → 308_clerk.headless_63d9cc_6.0.0-snapshot.v20260105214115.js} +0 -0
- /package/dist/{507_clerk.browser_834334_6.0.0-snapshot.v20251218183643.js → 507_clerk.browser_8059c1_6.0.0-snapshot.v20260105214115.js} +0 -0
- /package/dist/{507_clerk.chips.browser_5e7a74_6.0.0-snapshot.v20251218183643.js → 507_clerk.chips.browser_c2692d_6.0.0-snapshot.v20260105214115.js} +0 -0
- /package/dist/{507_clerk.headless.browser_45a74c_6.0.0-snapshot.v20251218183643.js → 507_clerk.headless.browser_3d6b94_6.0.0-snapshot.v20260105214115.js} +0 -0
- /package/dist/{507_clerk.headless_38bd55_6.0.0-snapshot.v20251218183643.js → 507_clerk.headless_63d9cc_6.0.0-snapshot.v20260105214115.js} +0 -0
- /package/dist/{521_clerk.headless_38bd55_6.0.0-snapshot.v20251218183643.js → 521_clerk.headless_63d9cc_6.0.0-snapshot.v20260105214115.js} +0 -0
- /package/dist/{527_clerk.browser_834334_6.0.0-snapshot.v20251218183643.js → 527_clerk.browser_8059c1_6.0.0-snapshot.v20260105214115.js} +0 -0
- /package/dist/{527_clerk.chips.browser_5e7a74_6.0.0-snapshot.v20251218183643.js → 527_clerk.chips.browser_c2692d_6.0.0-snapshot.v20260105214115.js} +0 -0
- /package/dist/{527_clerk.headless.browser_45a74c_6.0.0-snapshot.v20251218183643.js → 527_clerk.headless.browser_3d6b94_6.0.0-snapshot.v20260105214115.js} +0 -0
- /package/dist/{527_clerk.legacy.browser_6e74bb_6.0.0-snapshot.v20251218183643.js → 527_clerk.legacy.browser_5b91cb_6.0.0-snapshot.v20260105214115.js} +0 -0
- /package/dist/{537_clerk.headless_38bd55_6.0.0-snapshot.v20251218183643.js → 537_clerk.headless_63d9cc_6.0.0-snapshot.v20260105214115.js} +0 -0
- /package/dist/{604_clerk.headless_38bd55_6.0.0-snapshot.v20251218183643.js → 604_clerk.headless_63d9cc_6.0.0-snapshot.v20260105214115.js} +0 -0
- /package/dist/{783_clerk.headless_38bd55_6.0.0-snapshot.v20251218183643.js → 783_clerk.headless_63d9cc_6.0.0-snapshot.v20260105214115.js} +0 -0
- /package/dist/{896_clerk.headless_38bd55_6.0.0-snapshot.v20251218183643.js → 896_clerk.headless_63d9cc_6.0.0-snapshot.v20260105214115.js} +0 -0
- /package/dist/{973_clerk.headless_38bd55_6.0.0-snapshot.v20251218183643.js → 973_clerk.headless_63d9cc_6.0.0-snapshot.v20260105214115.js} +0 -0
- /package/dist/{base-account-sdk_clerk.browser_834334_6.0.0-snapshot.v20251218183643.js → base-account-sdk_clerk.browser_8059c1_6.0.0-snapshot.v20260105214115.js} +0 -0
- /package/dist/{base-account-sdk_clerk.chips.browser_5e7a74_6.0.0-snapshot.v20251218183643.js → base-account-sdk_clerk.chips.browser_c2692d_6.0.0-snapshot.v20260105214115.js} +0 -0
- /package/dist/{base-account-sdk_clerk.headless.browser_45a74c_6.0.0-snapshot.v20251218183643.js → base-account-sdk_clerk.headless.browser_3d6b94_6.0.0-snapshot.v20260105214115.js} +0 -0
- /package/dist/{coinbase-wallet-sdk_clerk.browser_834334_6.0.0-snapshot.v20251218183643.js → coinbase-wallet-sdk_clerk.browser_8059c1_6.0.0-snapshot.v20260105214115.js} +0 -0
- /package/dist/{coinbase-wallet-sdk_clerk.chips.browser_5e7a74_6.0.0-snapshot.v20251218183643.js → coinbase-wallet-sdk_clerk.chips.browser_c2692d_6.0.0-snapshot.v20260105214115.js} +0 -0
- /package/dist/{coinbase-wallet-sdk_clerk.headless.browser_45a74c_6.0.0-snapshot.v20251218183643.js → coinbase-wallet-sdk_clerk.headless.browser_3d6b94_6.0.0-snapshot.v20260105214115.js} +0 -0
- /package/dist/{cookieSuffix_clerk.browser_834334_6.0.0-snapshot.v20251218183643.js → cookieSuffix_clerk.browser_8059c1_6.0.0-snapshot.v20260105214115.js} +0 -0
- /package/dist/{cookieSuffix_clerk.chips.browser_5e7a74_6.0.0-snapshot.v20251218183643.js → cookieSuffix_clerk.chips.browser_c2692d_6.0.0-snapshot.v20260105214115.js} +0 -0
- /package/dist/{cookieSuffix_clerk.headless.browser_45a74c_6.0.0-snapshot.v20251218183643.js → cookieSuffix_clerk.headless.browser_3d6b94_6.0.0-snapshot.v20260105214115.js} +0 -0
- /package/dist/{cookieSuffix_clerk.headless_38bd55_6.0.0-snapshot.v20251218183643.js → cookieSuffix_clerk.headless_63d9cc_6.0.0-snapshot.v20260105214115.js} +0 -0
- /package/dist/{cookieSuffix_clerk.legacy.browser_6e74bb_6.0.0-snapshot.v20251218183643.js → cookieSuffix_clerk.legacy.browser_5b91cb_6.0.0-snapshot.v20260105214115.js} +0 -0
- /package/dist/{query-core-vendors_clerk.browser_834334_6.0.0-snapshot.v20251218183643.js → query-core-vendors_clerk.browser_8059c1_6.0.0-snapshot.v20260105214115.js} +0 -0
- /package/dist/{query-core-vendors_clerk.chips.browser_5e7a74_6.0.0-snapshot.v20251218183643.js → query-core-vendors_clerk.chips.browser_c2692d_6.0.0-snapshot.v20260105214115.js} +0 -0
- /package/dist/{query-core-vendors_clerk.headless.browser_45a74c_6.0.0-snapshot.v20251218183643.js → query-core-vendors_clerk.headless.browser_3d6b94_6.0.0-snapshot.v20260105214115.js} +0 -0
- /package/dist/{stripe-vendors_clerk.browser_834334_6.0.0-snapshot.v20251218183643.js → stripe-vendors_clerk.browser_8059c1_6.0.0-snapshot.v20260105214115.js} +0 -0
- /package/dist/{stripe-vendors_clerk.chips.browser_5e7a74_6.0.0-snapshot.v20251218183643.js → stripe-vendors_clerk.chips.browser_c2692d_6.0.0-snapshot.v20260105214115.js} +0 -0
- /package/dist/{stripe-vendors_clerk.headless.browser_45a74c_6.0.0-snapshot.v20251218183643.js → stripe-vendors_clerk.headless.browser_3d6b94_6.0.0-snapshot.v20260105214115.js} +0 -0
- /package/dist/{vendors_clerk.browser_834334_6.0.0-snapshot.v20251218183643.js → vendors_clerk.browser_8059c1_6.0.0-snapshot.v20260105214115.js} +0 -0
- /package/dist/{vendors_clerk.chips.browser_5e7a74_6.0.0-snapshot.v20251218183643.js → vendors_clerk.chips.browser_c2692d_6.0.0-snapshot.v20260105214115.js} +0 -0
- /package/dist/{vendors_clerk.headless.browser_45a74c_6.0.0-snapshot.v20251218183643.js → vendors_clerk.headless.browser_3d6b94_6.0.0-snapshot.v20260105214115.js} +0 -0
- /package/dist/{zxcvbn-common_clerk.browser_834334_6.0.0-snapshot.v20251218183643.js → zxcvbn-common_clerk.browser_8059c1_6.0.0-snapshot.v20260105214115.js} +0 -0
- /package/dist/{zxcvbn-common_clerk.chips.browser_5e7a74_6.0.0-snapshot.v20251218183643.js → zxcvbn-common_clerk.chips.browser_c2692d_6.0.0-snapshot.v20260105214115.js} +0 -0
- /package/dist/{zxcvbn-common_clerk.headless.browser_45a74c_6.0.0-snapshot.v20251218183643.js → zxcvbn-common_clerk.headless.browser_3d6b94_6.0.0-snapshot.v20260105214115.js} +0 -0
- /package/dist/{zxcvbn-ts-core_clerk.browser_834334_6.0.0-snapshot.v20251218183643.js → zxcvbn-ts-core_clerk.browser_8059c1_6.0.0-snapshot.v20260105214115.js} +0 -0
- /package/dist/{zxcvbn-ts-core_clerk.chips.browser_5e7a74_6.0.0-snapshot.v20251218183643.js → zxcvbn-ts-core_clerk.chips.browser_c2692d_6.0.0-snapshot.v20260105214115.js} +0 -0
- /package/dist/{zxcvbn-ts-core_clerk.headless.browser_45a74c_6.0.0-snapshot.v20251218183643.js → zxcvbn-ts-core_clerk.headless.browser_3d6b94_6.0.0-snapshot.v20260105214115.js} +0 -0
package/dist/coinbase-wallet-sdk_clerk.legacy.browser_6e74bb_6.0.0-snapshot.v20251218183643.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.webpackChunk_clerk_clerk_js=globalThis.webpackChunk_clerk_clerk_js||[]).push([["929"],{3630:function(e,t,s){"use strict";s(4891),s(4953),s(2536),s(8732),s(6752),s(9016),s(1408),s(7515),s(6698),s(4169),s(8809),s(7095),s(6176),s(4189),s(4261),Object.defineProperty(t,"__esModule",{value:!0}),t.toBig=t.shrSL=t.shrSH=t.rotrSL=t.rotrSH=t.rotrBL=t.rotrBH=t.rotr32L=t.rotr32H=t.rotlSL=t.rotlSH=t.rotlBL=t.rotlBH=t.add5L=t.add5H=t.add4L=t.add4H=t.add3L=t.add3H=void 0,t.add=x,t.fromBig=r,t.split=a;let n=BigInt(0x100000000-1),i=BigInt(32);function r(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t?{h:Number(e&n),l:Number(e>>i&n)}:{h:0|Number(e>>i&n),l:0|Number(e&n)}}function a(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],s=e.length,n=new Uint32Array(s),i=new Uint32Array(s);for(let a=0;a<s;a++){let{h:s,l:o}=r(e[a],t);[n[a],i[a]]=[s,o]}return[n,i]}let o=(e,t)=>BigInt(e>>>0)<<i|BigInt(t>>>0);t.toBig=o;let c=(e,t,s)=>e>>>s;t.shrSH=c;let l=(e,t,s)=>e<<32-s|t>>>s;t.shrSL=l;let h=(e,t,s)=>e>>>s|t<<32-s;t.rotrSH=h;let d=(e,t,s)=>e<<32-s|t>>>s;t.rotrSL=d;let u=(e,t,s)=>e<<64-s|t>>>s-32;t.rotrBH=u;let f=(e,t,s)=>e>>>s-32|t<<64-s;t.rotrBL=f;let p=(e,t)=>t;t.rotr32H=p;let g=(e,t)=>e;t.rotr32L=g;let b=(e,t,s)=>e<<s|t>>>32-s;t.rotlSH=b;let y=(e,t,s)=>t<<s|e>>>32-s;t.rotlSL=y;let m=(e,t,s)=>t<<s-32|e>>>64-s;t.rotlBH=m;let w=(e,t,s)=>e<<s-32|t>>>64-s;function x(e,t,s,n){let i=(t>>>0)+(n>>>0);return{h:e+s+(i/0x100000000|0)|0,l:0|i}}t.rotlBL=w;let k=(e,t,s)=>(e>>>0)+(t>>>0)+(s>>>0);t.add3L=k;let v=(e,t,s,n)=>t+s+n+(e/0x100000000|0)|0;t.add3H=v;let E=(e,t,s,n)=>(e>>>0)+(t>>>0)+(s>>>0)+(n>>>0);t.add4L=E;let C=(e,t,s,n,i)=>t+s+n+i+(e/0x100000000|0)|0;t.add4H=C;let I=(e,t,s,n,i)=>(e>>>0)+(t>>>0)+(s>>>0)+(n>>>0)+(i>>>0);t.add5L=I;let A=(e,t,s,n,i,r)=>t+s+n+i+r+(e/0x100000000|0)|0;t.add5H=A,t.default={fromBig:r,split:a,toBig:o,shrSH:c,shrSL:l,rotrSH:h,rotrSL:d,rotrBH:u,rotrBL:f,rotr32H:p,rotr32L:g,rotlSH:b,rotlSL:y,rotlBH:m,rotlBL:w,add:x,add3L:k,add3H:v,add4L:E,add4H:C,add5H:A,add5L:I}},5977:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},4907:function(e,t,s){"use strict";s(4261),s(7918),s(4891),s(4953),s(2536),s(8732),s(6752),s(9016),s(1408),s(7515),s(6698),s(4169),s(8809),s(7095),s(6176),s(4189),s(1300),s(3405),Object.defineProperty(t,"__esModule",{value:!0}),t.shake256=t.shake128=t.keccak_512=t.keccak_384=t.keccak_256=t.keccak_224=t.sha3_512=t.sha3_384=t.sha3_256=t.sha3_224=t.Keccak=void 0,t.keccakP=w;let n=s(3630),i=s(5047),r=BigInt(0),a=BigInt(1),o=BigInt(2),c=BigInt(7),l=BigInt(256),h=BigInt(113),d=[],u=[],f=[];for(let e=0,t=a,s=1,n=0;e<24;e++){[s,n]=[n,(2*s+3*n)%5],d.push(2*(5*n+s)),u.push((e+1)*(e+2)/2%64);let i=r;for(let e=0;e<7;e++)(t=(t<<a^(t>>c)*h)%l)&o&&(i^=a<<(a<<BigInt(e))-a);f.push(i)}let p=(0,n.split)(f,!0),g=p[0],b=p[1],y=(e,t,s)=>s>32?(0,n.rotlBH)(e,t,s):(0,n.rotlSH)(e,t,s),m=(e,t,s)=>s>32?(0,n.rotlBL)(e,t,s):(0,n.rotlSL)(e,t,s);function w(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24,s=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)s[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){let n=(t+8)%10,i=(t+2)%10,r=s[i],a=s[i+1],o=y(r,a,1)^s[n],c=m(r,a,1)^s[n+1];for(let s=0;s<50;s+=10)e[t+s]^=o,e[t+s+1]^=c}let t=e[2],i=e[3];for(let s=0;s<24;s++){let n=u[s],r=y(t,i,n),a=m(t,i,n),o=d[s];t=e[o],i=e[o+1],e[o]=r,e[o+1]=a}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)s[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~s[(n+2)%10]&s[(n+4)%10]}e[0]^=g[n],e[1]^=b[n]}(0,i.clean)(s)}class x extends i.Hash{clone(){return this._cloneInto()}keccak(){(0,i.swap32IfBE)(this.state32),w(this.state32,this.rounds),(0,i.swap32IfBE)(this.state32),this.posOut=0,this.pos=0}update(e){(0,i.aexists)(this),e=(0,i.toBytes)(e),(0,i.abytes)(e);let{blockLen:t,state:s}=this,n=e.length;for(let i=0;i<n;){let r=Math.min(t-this.pos,n-i);for(let t=0;t<r;t++)s[this.pos++]^=e[i++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:e,suffix:t,pos:s,blockLen:n}=this;e[s]^=t,(128&t)!=0&&s===n-1&&this.keccak(),e[n-1]^=128,this.keccak()}writeInto(e){(0,i.aexists)(this,!1),(0,i.abytes)(e),this.finish();let t=this.state,{blockLen:s}=this;for(let n=0,i=e.length;n<i;){this.posOut>=s&&this.keccak();let r=Math.min(s-this.posOut,i-n);e.set(t.subarray(this.posOut,this.posOut+r),n),this.posOut+=r,n+=r}return e}xofInto(e){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,i.anumber)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,i.aoutput)(e,this),this.finished)throw Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,(0,i.clean)(this.state)}_cloneInto(e){let{blockLen:t,suffix:s,outputLen:n,rounds:i,enableXOF:r}=this;return e||(e=new x(t,s,n,r,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=s,e.outputLen=n,e.enableXOF=r,e.destroyed=this.destroyed,e}constructor(e,t,s,n=!1,r=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=t,this.outputLen=s,this.enableXOF=n,this.rounds=r,(0,i.anumber)(s),!(0<e&&e<200))throw Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=(0,i.u32)(this.state)}}t.Keccak=x;let k=(e,t,s)=>(0,i.createHasher)(()=>new x(t,e,s));t.sha3_224=k(6,144,28),t.sha3_256=k(6,136,32),t.sha3_384=k(6,104,48),t.sha3_512=k(6,72,64),t.keccak_224=k(1,144,28),t.keccak_256=k(1,136,32),t.keccak_384=k(1,104,48),t.keccak_512=k(1,72,64);let v=(e,t,s)=>(0,i.createXOFer)(function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new x(t,e,void 0===n.dkLen?s:n.dkLen,!0)});t.shake128=v(31,168,16),t.shake256=v(31,136,32)},5047:function(e,t,s){"use strict";s(4953),s(2536),s(8732),s(3405),s(9016),s(1408),s(7515),s(6698),s(4169),s(8809),s(7095),s(6176),s(4189),s(1300),s(1747),s(6752),s(5237),s(9166),Object.defineProperty(t,"__esModule",{value:!0}),t.wrapXOFConstructorWithOpts=t.wrapConstructorWithOpts=t.wrapConstructor=t.Hash=t.nextTick=t.swap32IfBE=t.byteSwapIfBE=t.swap8IfBE=t.isLE=void 0,t.isBytes=i,t.anumber=r,t.abytes=a,t.ahash=function(e){if("function"!=typeof e||"function"!=typeof e.create)throw Error("Hash should be wrapped by utils.createHasher");r(e.outputLen),r(e.blockLen)},t.aexists=function(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")},t.aoutput=function(e,t){a(e);let s=t.outputLen;if(e.length<s)throw Error("digestInto() expects output buffer of length at least "+s)},t.u8=function(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)},t.u32=function(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))},t.clean=function(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];for(let e=0;e<t.length;e++)t[e].fill(0)},t.createView=function(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)},t.rotr=function(e,t){return e<<32-t|e>>>t},t.rotl=function(e,t){return e<<t|e>>>32-t>>>0},t.byteSwap=o,t.byteSwap32=c,t.bytesToHex=function(e){if(a(e),l)return e.toHex();let t="";for(let s=0;s<e.length;s++)t+=h[e[s]];return t},t.hexToBytes=function(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);if(l)return Uint8Array.fromHex(e);let t=e.length,s=t/2;if(t%2)throw Error("hex string expected, got unpadded hex of length "+t);let n=new Uint8Array(s);for(let t=0,i=0;t<s;t++,i+=2){let s=d(e.charCodeAt(i)),r=d(e.charCodeAt(i+1));if(void 0===s||void 0===r)throw Error('hex string expected, got non-hex character "'+(e[i]+e[i+1])+'" at index '+i);n[t]=16*s+r}return n},t.asyncLoop=u,t.utf8ToBytes=f,t.bytesToUtf8=function(e){return new TextDecoder().decode(e)},t.toBytes=p,t.kdfInputToBytes=function(e){return"string"==typeof e&&(e=f(e)),a(e),e},t.concatBytes=function(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];let n=0;for(let e=0;e<t.length;e++){let s=t[e];a(s),n+=s.length}let i=new Uint8Array(n);for(let e=0,s=0;e<t.length;e++){let n=t[e];i.set(n,s),s+=n.length}return i},t.checkOpts=function(e,t){if(void 0!==t&&"[object Object]"!==({}).toString.call(t))throw Error("options should be object or undefined");return Object.assign(e,t)},t.createHasher=g,t.createOptHasher=b,t.createXOFer=y,t.randomBytes=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:32;if(n.crypto&&"function"==typeof n.crypto.getRandomValues)return n.crypto.getRandomValues(new Uint8Array(e));if(n.crypto&&"function"==typeof n.crypto.randomBytes)return Uint8Array.from(n.crypto.randomBytes(e));throw Error("crypto.getRandomValues must be defined")};let n=s(5977);function i(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function r(e){if(!Number.isSafeInteger(e)||e<0)throw Error("positive integer expected, got "+e)}function a(e){for(var t=arguments.length,s=Array(t>1?t-1:0),n=1;n<t;n++)s[n-1]=arguments[n];if(!i(e))throw Error("Uint8Array expected");if(s.length>0&&!s.includes(e.length))throw Error("Uint8Array expected of length "+s+", got length="+e.length)}function o(e){return e<<24&0xff000000|e<<8&0xff0000|e>>>8&65280|e>>>24&255}function c(e){for(let t=0;t<e.length;t++)e[t]=o(e[t]);return e}t.isLE=68===new Uint8Array(new Uint32Array([0x11223344]).buffer)[0],t.swap8IfBE=t.isLE?e=>e:e=>o(e),t.byteSwapIfBE=t.swap8IfBE,t.swap32IfBE=t.isLE?e=>e:c;let l="function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex,h=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function d(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:void 0}async function u(e,s,n){let i=Date.now();for(let r=0;r<e;r++){n(r);let e=Date.now()-i;e>=0&&e<s||(await (0,t.nextTick)(),i+=e)}}function f(e){if("string"!=typeof e)throw Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function p(e){return"string"==typeof e&&(e=f(e)),a(e),e}function g(e){let t=t=>e().update(p(t)).digest(),s=e();return t.outputLen=s.outputLen,t.blockLen=s.blockLen,t.create=()=>e(),t}function b(e){let t=(t,s)=>e(s).update(p(t)).digest(),s=e({});return t.outputLen=s.outputLen,t.blockLen=s.blockLen,t.create=t=>e(t),t}function y(e){let t=(t,s)=>e(s).update(p(t)).digest(),s=e({});return t.outputLen=s.outputLen,t.blockLen=s.blockLen,t.create=t=>e(t),t}t.nextTick=async()=>{},t.Hash=class{},t.wrapConstructor=g,t.wrapConstructorWithOpts=b,t.wrapXOFConstructorWithOpts=y},3453:function(e,t,s){let n=s(338);function i(e){if(e.startsWith("int["))return"int256"+e.slice(3);if("int"===e)return"int256";if(e.startsWith("uint["))return"uint256"+e.slice(4);if("uint"===e)return"uint256";if(e.startsWith("fixed["))return"fixed128x128"+e.slice(5);else if("fixed"===e)return"fixed128x128";else if(e.startsWith("ufixed["))return"ufixed128x128"+e.slice(6);else if("ufixed"===e)return"ufixed128x128";return e}function r(e){return Number.parseInt(/^\D+(\d+)$/.exec(e)[1],10)}function a(e){var t=/^\D+(\d+)x(\d+)$/.exec(e);return[Number.parseInt(t[1],10),Number.parseInt(t[2],10)]}function o(e){var t=e.match(/(.*)\[(.*?)\]$/);return t?""===t[2]?"dynamic":Number.parseInt(t[2],10):null}function c(e){var t=typeof e;if("string"===t||"number"===t)return BigInt(e);if("bigint"===t)return e;throw Error("Argument is not a number")}function l(e,t){if("address"===e)return l("uint160",c(t));if("bool"===e)return l("uint8",+!!t);if("string"===e)return l("bytes",new Buffer(t,"utf8"));if((u=e).lastIndexOf("]")===u.length-1){if(void 0===t.length)throw Error("Not an array?");if("dynamic"!==(s=o(e))&&0!==s&&t.length>s)throw Error("Elements exceed array size: "+s);for(d in h=[],e=e.slice(0,e.lastIndexOf("[")),"string"==typeof t&&(t=JSON.parse(t)),t)h.push(l(e,t[d]));if("dynamic"===s){var s,i,h,d,u,f=l("uint256",t.length);h.unshift(f)}return Buffer.concat(h)}else if("bytes"===e)return t=new Buffer(t),h=Buffer.concat([l("uint256",t.length),t]),t.length%32!=0&&(h=Buffer.concat([h,n.zeros(32-t.length%32)])),h;else if(e.startsWith("bytes")){if((s=r(e))<1||s>32)throw Error("Invalid bytes<N> width: "+s);return n.setLengthRight(t,32)}else if(e.startsWith("uint")){if((s=r(e))%8||s<8||s>256)throw Error("Invalid uint<N> width: "+s);i=c(t);let a=n.bitLengthFromBigInt(i);if(a>s)throw Error("Supplied uint exceeds width: "+s+" vs "+a);if(i<0)throw Error("Supplied uint is negative");return n.bufferBEFromBigInt(i,32)}else if(e.startsWith("int")){if((s=r(e))%8||s<8||s>256)throw Error("Invalid int<N> width: "+s);i=c(t);let a=n.bitLengthFromBigInt(i);if(a>s)throw Error("Supplied int exceeds width: "+s+" vs "+a);let o=n.twosFromBigInt(i,256);return n.bufferBEFromBigInt(o,32)}else if(e.startsWith("ufixed")){if(s=a(e),(i=c(t))<0)throw Error("Supplied ufixed is negative");return l("uint256",i*BigInt(2)**BigInt(s[1]))}else if(e.startsWith("fixed"))return s=a(e),l("int256",c(t)*BigInt(2)**BigInt(s[1]));throw Error("Unsupported or invalid type: "+e)}function h(e,t){if(e.length!==t.length)throw Error("Number of types are not matching the values");for(var s,a,o=[],l=0;l<e.length;l++){var h=i(e[l]),d=t[l];if("bytes"===h)o.push(d);else if("string"===h)o.push(new Buffer(d,"utf8"));else if("bool"===h)o.push(new Buffer(d?"01":"00","hex"));else if("address"===h)o.push(n.setLength(d,20));else if(h.startsWith("bytes")){if((s=r(h))<1||s>32)throw Error("Invalid bytes<N> width: "+s);o.push(n.setLengthRight(d,s))}else if(h.startsWith("uint")){if((s=r(h))%8||s<8||s>256)throw Error("Invalid uint<N> width: "+s);a=c(d);let e=n.bitLengthFromBigInt(a);if(e>s)throw Error("Supplied uint exceeds width: "+s+" vs "+e);o.push(n.bufferBEFromBigInt(a,s/8))}else if(h.startsWith("int")){if((s=r(h))%8||s<8||s>256)throw Error("Invalid int<N> width: "+s);a=c(d);let e=n.bitLengthFromBigInt(a);if(e>s)throw Error("Supplied int exceeds width: "+s+" vs "+e);let t=n.twosFromBigInt(a,s);o.push(n.bufferBEFromBigInt(t,s/8))}else throw Error("Unsupported or invalid type: "+h)}return Buffer.concat(o)}e.exports={rawEncode:function(e,t){var s=[],n=[],r=32*e.length;for(var a in e){var c=i(e[a]),h=l(c,t[a]);"string"===c||"bytes"===c||"dynamic"===o(c)?(s.push(l("uint256",r)),n.push(h),r+=h.length):s.push(h)}return Buffer.concat(s.concat(n))},solidityPack:h,soliditySHA3:function(e,t){return n.keccak(h(e,t))}}},619:function(e,t,s){let n=s(338),i=s(3453),r={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]},a={encodeData(e,t,s,r=!0){let a=["bytes32"],o=[this.hashType(e,s)];if(r){let c=(e,t,a)=>{if(void 0!==s[t])return["bytes32",null==a?"0x0000000000000000000000000000000000000000000000000000000000000000":n.keccak(this.encodeData(t,a,s,r))];if(void 0===a)throw Error(`missing value for field ${e} of type ${t}`);if("bytes"===t)return["bytes32",n.keccak(a)];if("string"===t)return"string"==typeof a&&(a=Buffer.from(a,"utf8")),["bytes32",n.keccak(a)];if(t.lastIndexOf("]")===t.length-1){let s=t.slice(0,t.lastIndexOf("[")),r=a.map(t=>c(e,s,t));return["bytes32",n.keccak(i.rawEncode(r.map(([e])=>e),r.map(([,e])=>e)))]}return[t,a]};for(let n of s[e]){let[e,s]=c(n.name,n.type,t[n.name]);a.push(e),o.push(s)}}else for(let i of s[e]){let e=t[i.name];if(void 0!==e)if("bytes"===i.type)a.push("bytes32"),e=n.keccak(e),o.push(e);else if("string"===i.type)a.push("bytes32"),"string"==typeof e&&(e=Buffer.from(e,"utf8")),e=n.keccak(e),o.push(e);else if(void 0!==s[i.type])a.push("bytes32"),e=n.keccak(this.encodeData(i.type,e,s,r)),o.push(e);else if(i.type.lastIndexOf("]")===i.type.length-1)throw Error("Arrays currently unimplemented in encodeData");else a.push(i.type),o.push(e)}return i.rawEncode(a,o)},encodeType(e,t){let s="",n=this.findTypeDependencies(e,t).filter(t=>t!==e);for(let i of n=[e].concat(n.sort())){if(!t[i])throw Error("No type definition specified: "+i);s+=i+"("+t[i].map(({name:e,type:t})=>t+" "+e).join(",")+")"}return s},findTypeDependencies(e,t,s=[]){if(e=e.match(/^\w*/)[0],s.includes(e)||void 0===t[e])return s;for(let n of(s.push(e),t[e]))for(let e of this.findTypeDependencies(n.type,t,s))s.includes(e)||s.push(e);return s},hashStruct(e,t,s,i=!0){return n.keccak(this.encodeData(e,t,s,i))},hashType(e,t){return n.keccak(this.encodeType(e,t))},sanitizeData(e){let t={};for(let s in r.properties)e[s]&&(t[s]=e[s]);return t.types&&(t.types=Object.assign({EIP712Domain:[]},t.types)),t},hash(e,t=!0){let s=this.sanitizeData(e),i=[Buffer.from("1901","hex")];return i.push(this.hashStruct("EIP712Domain",s.domain,s.types,t)),"EIP712Domain"!==s.primaryType&&i.push(this.hashStruct(s.primaryType,s.message,s.types,t)),n.keccak(Buffer.concat(i))}};e.exports={TYPED_MESSAGE_SCHEMA:r,TypedDataUtils:a,hashForSignTypedDataLegacy:function(e){return function(e){let t=Error("Expect argument to be non-empty array");if("object"!=typeof e||!e.length)throw t;let s=e.map(function(e){return"bytes"===e.type?n.toBuffer(e.value):e.value}),r=e.map(function(e){return e.type}),a=e.map(function(e){if(!e.name)throw t;return e.type+" "+e.name});return i.soliditySHA3(["bytes32","bytes32"],[i.soliditySHA3(Array(e.length).fill("string"),a),i.soliditySHA3(r,s)])}(e.data)},hashForSignTypedData_v3:function(e){return a.hash(e.data,!1)},hashForSignTypedData_v4:function(e){return a.hash(e.data)}}},338:function(e,t,s){let{keccak_256:n}=s(4907);function i(e){return Buffer.allocUnsafe(e).fill(0)}function r(e,t){let s=e.toString(16);s.length%2!=0&&(s="0"+s);let n=s.match(/.{1,2}/g).map(e=>parseInt(e,16));for(;n.length<t;)n.unshift(0);return Buffer.from(n)}function a(e,t,s){let n=i(t);return(e=o(e),s)?e.length<t?(e.copy(n),n):e.slice(0,t):e.length<t?(e.copy(n,t-e.length),n):e.slice(-t)}function o(e){if(!Buffer.isBuffer(e))if(Array.isArray(e))e=Buffer.from(e);else if("string"==typeof e){var t;e=c(e)?Buffer.from((t=l(e)).length%2?"0"+t:t,"hex"):Buffer.from(e)}else if("number"==typeof e)e=intToBuffer(e);else if(null==e)e=Buffer.allocUnsafe(0);else if("bigint"==typeof e)e=r(e);else if(e.toArray)e=Buffer.from(e.toArray());else throw Error("invalid type");return e}function c(e){return"string"==typeof e&&e.match(/^0x[0-9A-Fa-f]*$/)}function l(e){return"string"==typeof e&&e.startsWith("0x")?e.slice(2):e}e.exports={zeros:i,setLength:a,setLengthRight:function(e,t){return a(e,t,!0)},isHexString:c,stripHexPrefix:l,toBuffer:o,bufferToHex:function(e){return"0x"+(e=o(e)).toString("hex")},keccak:function(e,t){if(e=o(e),t||(t=256),256!==t)throw Error("unsupported");return Buffer.from(n(new Uint8Array(e)))},bitLengthFromBigInt:function(e){return e.toString(2).length},bufferBEFromBigInt:r,twosFromBigInt:function(e,t){return(e<0n?(~e&(1n<<BigInt(t))-1n)+1n:e)&(1n<<BigInt(t))-1n}}},5537:function(e,t,s){"use strict";let n;s.r(t),s.d(t,{createCoinbaseWalletSDK:()=>e9,default:()=>te,CoinbaseWalletSDK:()=>e6}),s(9166),s(9091),s(8593),s(4261),s(200),s(7918),s(4784);class i{storeObject(e,t){this.setItem(e,JSON.stringify(t))}loadObject(e){let t=this.getItem(e);return t?JSON.parse(t):void 0}setItem(e,t){localStorage.setItem(this.scopedKey(e),t)}getItem(e){return localStorage.getItem(this.scopedKey(e))}removeItem(e){localStorage.removeItem(this.scopedKey(e))}clear(){let e=this.scopedKey(""),t=[];for(let s=0;s<localStorage.length;s++){let n=localStorage.key(s);"string"==typeof n&&n.startsWith(e)&&t.push(n)}t.forEach(e=>localStorage.removeItem(e))}scopedKey(e){return"-".concat(this.scope).concat(this.module?":".concat(this.module):"",":").concat(e)}static clearAll(){new i("CBWSDK").clear(),new i("walletlink").clear()}constructor(e,t){this.scope=e,this.module=t}}s(4953),s(2536),s(8732),s(3405),s(9016),s(1408),s(7515),s(6698),s(4169),s(8809),s(7095),s(6176),s(4189),s(1300),s(4891),s(6764),s(4853),s(3272);let r=-32602,a=-32603,o=4001,c=4100,l=4200,h=4900,d={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."},4902:{standard:"EIP-3085",message:"Unrecognized chain ID."}},u="Unspecified error message.";function f(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u;if(e&&Number.isInteger(e)){var s;let t=e.toString();if(g(d,t))return d[t].message;if((s=e)>=-32099&&s<=-32e3)return"Unspecified server error."}return t}function p(e){return e&&"object"==typeof e&&!Array.isArray(e)?Object.assign({},e):e}function g(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function b(e,t){return"object"==typeof e&&null!==e&&t in e&&"string"==typeof e[t]}let y=e=>C(r,e),m=e=>C(a,e),w=e=>I(o,e),x=e=>I(c,e),k=e=>I(l,e),v=e=>I(h,e),E=e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw Error("Ethereum Provider custom errors must provide single object argument.");let{code:t,message:s,data:n}=e;if(!s||"string"!=typeof s)throw Error('"message" must be a nonempty string');return new M(t,s,n)};function C(e,t){let[s,n]=A(t);return new L(e,s||f(e),n)}function I(e,t){let[s,n]=A(t);return new M(e,s||f(e),n)}function A(e){if(e){if("string"==typeof e)return[e];else if("object"==typeof e&&!Array.isArray(e)){let{message:t,data:s}=e;if(t&&"string"!=typeof t)throw Error("Must specify string message.");return[t||void 0,s]}}return[]}class L extends Error{constructor(e,t,s){if(!Number.isInteger(e))throw Error('"code" must be an integer.');if(!t||"string"!=typeof t)throw Error('"message" must be a nonempty string.');super(t),this.code=e,void 0!==s&&(this.data=s)}}class M extends L{constructor(e,t,s){if(!function(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}(e))throw Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,s)}}function S(e){return Math.floor(e)}let O=/^[0-9]*$/,D=/^[a-f0-9]*$/;function _(e){return T(crypto.getRandomValues(new Uint8Array(e)))}function T(e){return[...e].map(e=>e.toString(16).padStart(2,"0")).join("")}function U(e){return new Uint8Array(e.match(/.{1,2}/g).map(e=>Number.parseInt(e,16)))}function N(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],s=e.toString("hex");return t?"0x".concat(s):s}function j(e){return N(F(e),!0)}function R(e){return e.toString(10)}function P(e){return"0x".concat(BigInt(e).toString(16))}function H(e){return e.startsWith("0x")||e.startsWith("0X")}function B(e){return H(e)?e.slice(2):e}function W(e){return H(e)?"0x".concat(e.slice(2)):"0x".concat(e)}function q(e){if("string"!=typeof e)return!1;let t=B(e).toLowerCase();return D.test(t)}function V(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],s=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("string"==typeof e){let s=B(e).toLowerCase();if(D.test(s))return t?"0x".concat(s):s}throw y('"'.concat(String(e),'" is not a hexadecimal string'))}(e,!1);return s.length%2==1&&(s="0".concat(s)),t?"0x".concat(s):s}function Z(e){if("string"==typeof e){let t=B(e).toLowerCase();if(q(t)&&40===t.length)return W(t)}throw y("Invalid Ethereum address: ".concat(String(e)))}function F(e){if(Buffer.isBuffer(e))return e;if("string"==typeof e){if(q(e)){let t=V(e,!1);return Buffer.from(t,"hex")}return Buffer.from(e,"utf8")}throw y("Not binary data: ".concat(String(e)))}function K(e){if("number"==typeof e&&Number.isInteger(e))return S(e);if("string"==typeof e){if(O.test(e))return S(Number(e));if(q(e))return S(Number(BigInt(V(e,!0))))}throw y("Not an integer: ".concat(String(e)))}function z(e){if(null!==e&&("bigint"==typeof e||function(e){if(null==e||"function"!=typeof e.constructor)return!1;let{constructor:t}=e;return"function"==typeof t.config&&"number"==typeof t.EUCLID}(e)))return BigInt(e.toString(10));if("number"==typeof e)return BigInt(K(e));if("string"==typeof e){if(O.test(e))return BigInt(e);if(q(e))return BigInt(V(e,!0))}throw y("Not an integer: ".concat(String(e)))}async function G(){return crypto.subtle.generateKey({name:"ECDH",namedCurve:"P-256"},!0,["deriveKey"])}async function Q(e,t){return crypto.subtle.deriveKey({name:"ECDH",public:t},e,{name:"AES-GCM",length:256},!1,["encrypt","decrypt"])}async function J(e,t){let s=crypto.getRandomValues(new Uint8Array(12)),n=await crypto.subtle.encrypt({name:"AES-GCM",iv:s},e,new TextEncoder().encode(t));return{iv:s,cipherText:n}}async function Y(e,t){let{iv:s,cipherText:n}=t,i=await crypto.subtle.decrypt({name:"AES-GCM",iv:s},e,n);return new TextDecoder().decode(i)}function X(e){switch(e){case"public":return"spki";case"private":return"pkcs8"}}async function $(e,t){let s=X(e);return T(new Uint8Array(await crypto.subtle.exportKey(s,t)))}async function ee(e,t){let s=X(e),n=U(t).buffer;return await crypto.subtle.importKey(s,new Uint8Array(n),{name:"ECDH",namedCurve:"P-256"},!0,"private"===e?["deriveKey"]:[])}async function et(e,t){return J(t,JSON.stringify(e,(e,t)=>t instanceof Error?Object.assign(Object.assign({},t.code?{code:t.code}:{}),{message:t.message}):t))}async function es(e,t){return JSON.parse(await Y(t,e))}let en={storageKey:"ownPrivateKey",keyType:"private"},ei={storageKey:"ownPublicKey",keyType:"public"},er={storageKey:"peerPublicKey",keyType:"public"};class ea{async getOwnPublicKey(){return await this.loadKeysIfNeeded(),this.ownPublicKey}async getSharedSecret(){return await this.loadKeysIfNeeded(),this.sharedSecret}async setPeerPublicKey(e){this.sharedSecret=null,this.peerPublicKey=e,await this.storeKey(er,e),await this.loadKeysIfNeeded()}async clear(){this.ownPrivateKey=null,this.ownPublicKey=null,this.peerPublicKey=null,this.sharedSecret=null,this.storage.removeItem(ei.storageKey),this.storage.removeItem(en.storageKey),this.storage.removeItem(er.storageKey)}async generateKeyPair(){let e=await G();this.ownPrivateKey=e.privateKey,this.ownPublicKey=e.publicKey,await this.storeKey(en,e.privateKey),await this.storeKey(ei,e.publicKey)}async loadKeysIfNeeded(){null===this.ownPrivateKey&&(this.ownPrivateKey=await this.loadKey(en)),null===this.ownPublicKey&&(this.ownPublicKey=await this.loadKey(ei)),(null===this.ownPrivateKey||null===this.ownPublicKey)&&await this.generateKeyPair(),null===this.peerPublicKey&&(this.peerPublicKey=await this.loadKey(er)),null===this.sharedSecret&&null!==this.ownPrivateKey&&null!==this.peerPublicKey&&(this.sharedSecret=await Q(this.ownPrivateKey,this.peerPublicKey))}async loadKey(e){let t=this.storage.getItem(e.storageKey);return t?ee(e.keyType,t):null}async storeKey(e,t){let s=await $(e.keyType,t);this.storage.setItem(e.storageKey,s)}constructor(){this.storage=new i("CBWSDK","SCWKeyManager"),this.ownPrivateKey=null,this.ownPublicKey=null,this.peerPublicKey=null,this.sharedSecret=null}}let eo="4.3.0",ec="@coinbase/wallet-sdk";async function el(e,t){let s=Object.assign(Object.assign({},e),{jsonrpc:"2.0",id:crypto.randomUUID()}),n=await window.fetch(t,{method:"POST",body:JSON.stringify(s),mode:"cors",headers:{"Content-Type":"application/json","X-Cbw-Sdk-Version":eo,"X-Cbw-Sdk-Platform":ec}}),{result:i,error:r}=await n.json();if(r)throw r;return i}function eh(e){var t,s;let{metadata:n,preference:i}=e,{appName:r,appLogoUrl:a,appChainIds:o}=n;if("smartWalletOnly"!==i.options){let e=globalThis.coinbaseWalletExtension;if(e)return null==(t=e.setAppInfo)||t.call(e,r,a,o,i),e}let c=function(){var e,t;try{let s=globalThis;return null!=(e=s.ethereum)?e:null==(t=s.top)?void 0:t.ethereum}catch(e){return}}();if(null==c?void 0:c.isCoinbaseBrowser)return null==(s=c.setAppInfo)||s.call(c,r,a,o,i),c}let ed="accounts",eu="activeChain",ef="availableChains",ep="walletCapabilities";class eg{async handshake(e){var t,s,n,i;await (null==(s=(t=this.communicator).waitForPopupLoaded)?void 0:s.call(t));let r=await this.createRequestMessage({handshake:{method:e.method,params:Object.assign({},this.metadata,null!=(n=e.params)?n:{})}}),a=await this.communicator.postRequestAndWaitForResponse(r);if("failure"in a.content)throw a.content.failure;let o=await ee("public",a.sender);await this.keyManager.setPeerPublicKey(o);let c=(await this.decryptResponseMessage(a)).result;if("error"in c)throw c.error;if("eth_requestAccounts"===e.method){let e=c.value;this.accounts=e,this.storage.storeObject(ed,e),null==(i=this.callback)||i.call(this,"accountsChanged",e)}}async request(e){var t;if(0===this.accounts.length)if("wallet_sendCalls"===e.method)return this.sendRequestToPopup(e);else throw x();switch(e.method){case"eth_requestAccounts":return null==(t=this.callback)||t.call(this,"connect",{chainId:P(this.chain.id)}),this.accounts;case"eth_accounts":return this.accounts;case"eth_coinbase":return this.accounts[0];case"net_version":return this.chain.id;case"eth_chainId":return P(this.chain.id);case"wallet_getCapabilities":return this.storage.loadObject(ep);case"wallet_switchEthereumChain":return this.handleSwitchChainRequest(e);case"eth_ecRecover":case"personal_sign":case"wallet_sign":case"personal_ecRecover":case"eth_signTransaction":case"eth_sendTransaction":case"eth_signTypedData_v1":case"eth_signTypedData_v3":case"eth_signTypedData_v4":case"eth_signTypedData":case"wallet_addEthereumChain":case"wallet_watchAsset":case"wallet_sendCalls":case"wallet_showCallsStatus":case"wallet_grantPermissions":return this.sendRequestToPopup(e);default:if(!this.chain.rpcUrl)throw m("No RPC URL set for chain");return el(e,this.chain.rpcUrl)}}async sendRequestToPopup(e){var t,s;await (null==(s=(t=this.communicator).waitForPopupLoaded)?void 0:s.call(t));let n=await this.sendEncryptedRequest(e),i=(await this.decryptResponseMessage(n)).result;if("error"in i)throw i.error;return i.value}async cleanup(){var e,t;this.storage.clear(),await this.keyManager.clear(),this.accounts=[],this.chain={id:null!=(t=null==(e=this.metadata.appChainIds)?void 0:e[0])?t:1}}async handleSwitchChainRequest(e){var t;let s=e.params;if(!s||!(null==(t=s[0])?void 0:t.chainId))throw y();let n=K(s[0].chainId);if(this.updateChain(n))return null;let i=await this.sendRequestToPopup(e);return null===i&&this.updateChain(n),i}async sendEncryptedRequest(e){let t=await this.keyManager.getSharedSecret();if(!t)throw x("No valid session found, try requestAccounts before other methods");let s=await et({action:e,chainId:this.chain.id},t),n=await this.createRequestMessage({encrypted:s});return this.communicator.postRequestAndWaitForResponse(n)}async createRequestMessage(e){let t=await $("public",await this.keyManager.getOwnPublicKey());return{id:crypto.randomUUID(),sender:t,content:e,timestamp:new Date}}async decryptResponseMessage(e){var t,s;let n=e.content;if("failure"in n)throw n.failure;let i=await this.keyManager.getSharedSecret();if(!i)throw x("Invalid session");let r=await es(n.encrypted,i),a=null==(t=r.data)?void 0:t.chains;if(a){let e=Object.entries(a).map(e=>{let[t,s]=e;return{id:Number(t),rpcUrl:s}});this.storage.storeObject(ef,e),this.updateChain(this.chain.id,e)}let o=null==(s=r.data)?void 0:s.capabilities;return o&&this.storage.storeObject(ep,o),r}updateChain(e,t){var s;let n=null!=t?t:this.storage.loadObject(ef),i=null==n?void 0:n.find(t=>t.id===e);return!!i&&(i!==this.chain&&(this.chain=i,this.storage.storeObject(eu,i),null==(s=this.callback)||s.call(this,"chainChanged",P(i.id))),!0)}constructor(e){var t,s,n;this.metadata=e.metadata,this.communicator=e.communicator,this.callback=e.callback,this.keyManager=new ea,this.storage=new i("CBWSDK","SCWStateManager"),this.accounts=null!=(t=this.storage.loadObject(ed))?t:[],this.chain=this.storage.loadObject(eu)||{id:null!=(n=null==(s=e.metadata.appChainIds)?void 0:s[0])?n:1},this.handshake=this.handshake.bind(this),this.request=this.request.bind(this),this.createRequestMessage=this.createRequestMessage.bind(this),this.decryptResponseMessage=this.decryptResponseMessage.bind(this)}}s(1747);var eb,ey,em=s(619);let ew="Addresses";function ex(e){return void 0!==e.errorMessage}s(574),s(5992),s(8385),s(5208),s(2935),s(9356),s(5702);class ek{async encrypt(e){let t=this.secret;if(64!==t.length)throw Error("secret must be 256 bits");let s=crypto.getRandomValues(new Uint8Array(12)),n=await crypto.subtle.importKey("raw",U(t),{name:"aes-gcm"},!1,["encrypt","decrypt"]),i=new TextEncoder,r=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:s},n,i.encode(e)),a=r.slice(r.byteLength-16),o=r.slice(0,r.byteLength-16),c=new Uint8Array(a),l=new Uint8Array(o);return T(new Uint8Array([...s,...c,...l]))}async decrypt(e){let t=this.secret;if(64!==t.length)throw Error("secret must be 256 bits");return new Promise((s,n)=>{!async function(){let i=await crypto.subtle.importKey("raw",U(t),{name:"aes-gcm"},!1,["encrypt","decrypt"]),r=U(e),a=r.slice(0,12),o=r.slice(12,28),c=new Uint8Array([...r.slice(28),...o]),l={name:"AES-GCM",iv:new Uint8Array(a)};try{let e=await window.crypto.subtle.decrypt(l,i,c),t=new TextDecoder;s(t.decode(e))}catch(e){n(e)}}()})}constructor(e){this.secret=e}}s(6178),s(7775);class ev{async markUnseenEventsAsSeen(e){return Promise.all(e.map(e=>fetch("".concat(this.linkAPIUrl,"/events/").concat(e.eventId,"/seen"),{method:"POST",headers:{Authorization:this.auth}}))).catch(e=>console.error("Unabled to mark event as failed:",e))}async fetchUnseenEvents(){var e;let t=await fetch("".concat(this.linkAPIUrl,"/events?unseen=true"),{headers:{Authorization:this.auth}});if(t.ok){let{events:s,error:n}=await t.json();if(n)throw Error("Check unseen events failed: ".concat(n));let i=null!=(e=null==s?void 0:s.filter(e=>"Web3Response"===e.event).map(e=>({type:"Event",sessionId:this.sessionId,eventId:e.id,event:e.event,data:e.data})))?e:[];return this.markUnseenEventsAsSeen(i),i}throw Error("Check unseen events failed: ".concat(t.status))}constructor(e,t,s){this.linkAPIUrl=e,this.sessionId=t;const n="".concat(t,":").concat(s);this.auth="Basic ".concat(btoa(n))}}s(2724),(eb=ey||(ey={}))[eb.DISCONNECTED=0]="DISCONNECTED",eb[eb.CONNECTING=1]="CONNECTING",eb[eb.CONNECTED=2]="CONNECTED";class eE{setConnectionStateListener(e){this.connectionStateListener=e}setIncomingDataListener(e){this.incomingDataListener=e}async connect(){if(this.webSocket)throw Error("webSocket object is not null");return new Promise((e,t)=>{var s;let n;try{this.webSocket=n=new this.WebSocketClass(this.url)}catch(e){t(e);return}null==(s=this.connectionStateListener)||s.call(this,ey.CONNECTING),n.onclose=e=>{var s;this.clearWebSocket(),t(Error("websocket error ".concat(e.code,": ").concat(e.reason))),null==(s=this.connectionStateListener)||s.call(this,ey.DISCONNECTED)},n.onopen=t=>{var s;e(),null==(s=this.connectionStateListener)||s.call(this,ey.CONNECTED),this.pendingData.length>0&&([...this.pendingData].forEach(e=>this.sendData(e)),this.pendingData=[])},n.onmessage=e=>{var t,s;if("h"===e.data)null==(t=this.incomingDataListener)||t.call(this,{type:"Heartbeat"});else try{let t=JSON.parse(e.data);null==(s=this.incomingDataListener)||s.call(this,t)}catch(e){}}})}disconnect(){var e;let{webSocket:t}=this;if(t){this.clearWebSocket(),null==(e=this.connectionStateListener)||e.call(this,ey.DISCONNECTED),this.connectionStateListener=void 0,this.incomingDataListener=void 0;try{t.close()}catch(e){}}}sendData(e){let{webSocket:t}=this;if(!t){this.pendingData.push(e),this.connect();return}t.send(e)}clearWebSocket(){let{webSocket:e}=this;e&&(this.webSocket=null,e.onclose=null,e.onerror=null,e.onmessage=null,e.onopen=null)}constructor(e,t=WebSocket){this.WebSocketClass=t,this.webSocket=null,this.pendingData=[],this.url=e.replace(/^http/,"ws")}}class eC{connect(){if(this.destroyed)throw Error("instance is destroyed");this.ws.connect()}async destroy(){this.destroyed||(await this.makeRequest({type:"SetSessionConfig",id:S(this.nextReqId++),sessionId:this.session.id,metadata:{__destroyed:"1"}},{timeout:1e3}),this.destroyed=!0,this.ws.disconnect(),this.listener=void 0)}get connected(){return this._connected}set connected(e){this._connected=e}get linked(){return this._linked}set linked(e){var t,s;this._linked=e,e&&(null==(t=this.onceLinked)||t.call(this)),null==(s=this.listener)||s.linkedUpdated(e)}setOnceLinked(e){return new Promise(t=>{this.linked?e().then(t):this.onceLinked=()=>{e().then(t),this.onceLinked=void 0}})}async handleIncomingEvent(e){var t;if("Event"!==e.type||"Web3Response"!==e.event)return;let s=JSON.parse(await this.cipher.decrypt(e.data));if("WEB3_RESPONSE"!==s.type)return;let{id:n,response:i}=s;null==(t=this.listener)||t.handleWeb3ResponseMessage(n,i)}async checkUnseenEvents(){if(!this.connected){this.shouldFetchUnseenEventsOnConnect=!0;return}await new Promise(e=>setTimeout(e,250));try{await this.fetchUnseenEventsAPI()}catch(e){console.error("Unable to check for unseen events",e)}}async fetchUnseenEventsAPI(){this.shouldFetchUnseenEventsOnConnect=!1,(await this.http.fetchUnseenEvents()).forEach(e=>this.handleIncomingEvent(e))}async publishEvent(e,t){let s=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=await this.cipher.encrypt(JSON.stringify(Object.assign(Object.assign({},t),{origin:location.origin,location:location.href,relaySource:"coinbaseWalletExtension"in window&&window.coinbaseWalletExtension?"injected_sdk":"sdk"}))),i={type:"PublishEvent",id:S(this.nextReqId++),sessionId:this.session.id,event:e,data:n,callWebhook:s};return this.setOnceLinked(async()=>{let e=await this.makeRequest(i);if("Fail"===e.type)throw Error(e.error||"failed to publish event");return e.eventId})}sendData(e){this.ws.sendData(JSON.stringify(e))}updateLastHeartbeat(){this.lastHeartbeatResponse=Date.now()}heartbeat(){if(Date.now()-this.lastHeartbeatResponse>2e4)return void this.ws.disconnect();try{this.ws.sendData("h")}catch(e){}}async makeRequest(e){let t,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{timeout:6e4},n=e.id;return this.sendData(e),Promise.race([new Promise((e,i)=>{t=window.setTimeout(()=>{i(Error("request ".concat(n," timed out")))},s.timeout)}),new Promise(e=>{this.requestResolutions.set(n,s=>{clearTimeout(t),e(s),this.requestResolutions.delete(n)})})])}async handleConnected(){return"Fail"!==(await this.makeRequest({type:"HostSession",id:S(this.nextReqId++),sessionId:this.session.id,sessionKey:this.session.key})).type&&(this.sendData({type:"IsLinked",id:S(this.nextReqId++),sessionId:this.session.id}),this.sendData({type:"GetSessionConfig",id:S(this.nextReqId++),sessionId:this.session.id}),!0)}constructor({session:e,linkAPIUrl:t,listener:s}){this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=S(1),this._connected=!1,this._linked=!1,this.shouldFetchUnseenEventsOnConnect=!1,this.requestResolutions=new Map,this.handleSessionMetadataUpdated=e=>{e&&new Map([["__destroyed",this.handleDestroyed],["EthereumAddress",this.handleAccountUpdated],["WalletUsername",this.handleWalletUsernameUpdated],["AppVersion",this.handleAppVersionUpdated],["ChainId",t=>e.JsonRpcUrl&&this.handleChainUpdated(t,e.JsonRpcUrl)]]).forEach((t,s)=>{let n=e[s];void 0!==n&&t(n)})},this.handleDestroyed=e=>{var t;"1"===e&&(null==(t=this.listener)||t.resetAndReload())},this.handleAccountUpdated=async e=>{var t;let s=await this.cipher.decrypt(e);null==(t=this.listener)||t.accountUpdated(s)},this.handleMetadataUpdated=async(e,t)=>{var s;let n=await this.cipher.decrypt(t);null==(s=this.listener)||s.metadataUpdated(e,n)},this.handleWalletUsernameUpdated=async e=>{this.handleMetadataUpdated("walletUsername",e)},this.handleAppVersionUpdated=async e=>{this.handleMetadataUpdated("AppVersion",e)},this.handleChainUpdated=async(e,t)=>{var s;let n=await this.cipher.decrypt(e),i=await this.cipher.decrypt(t);null==(s=this.listener)||s.chainUpdated(n,i)},this.session=e,this.cipher=new ek(e.secret),this.listener=s;const n=new eE("".concat(t,"/rpc"),WebSocket);n.setConnectionStateListener(async e=>{let t=!1;switch(e){case ey.DISCONNECTED:if(!this.destroyed){let e=async()=>{await new Promise(e=>setTimeout(e,5e3)),this.destroyed||n.connect().catch(()=>{e()})};e()}break;case ey.CONNECTED:t=await this.handleConnected(),this.updateLastHeartbeat(),setInterval(()=>{this.heartbeat()},1e4),this.shouldFetchUnseenEventsOnConnect&&this.fetchUnseenEventsAPI();case ey.CONNECTING:}this.connected!==t&&(this.connected=t)}),n.setIncomingDataListener(e=>{var t;switch(e.type){case"Heartbeat":this.updateLastHeartbeat();return;case"IsLinkedOK":case"Linked":{let t="IsLinkedOK"===e.type?e.linked:void 0;this.linked=t||e.onlineGuests>0;break}case"GetSessionConfigOK":case"SessionConfigUpdated":this.handleSessionMetadataUpdated(e.metadata);break;case"Event":this.handleIncomingEvent(e)}void 0!==e.id&&(null==(t=this.requestResolutions.get(e.id))||t(e))}),this.ws=n,this.http=new ev(t,e.id,e.key)}}class eI{makeRequestId(){this._nextRequestId=(this._nextRequestId+1)%0x7fffffff;let e=this._nextRequestId,t=W(e.toString(16));return this.callbacks.get(t)&&this.callbacks.delete(t),e}constructor(){this._nextRequestId=0,this.callbacks=new Map}}var eA=s(6340),eL=s(515);let eM="session:id",eS="session:secret",eO="session:linked";class eD{static create(e){return new eD(e,_(16),_(32)).save()}static load(e){let t=e.getItem(eM),s=e.getItem(eO),n=e.getItem(eS);return t&&n?new eD(e,t,n,"1"===s):null}get linked(){return this._linked}set linked(e){this._linked=e,this.persistLinked()}save(){return this.storage.setItem(eM,this.id),this.storage.setItem(eS,this.secret),this.persistLinked(),this}persistLinked(){this.storage.setItem(eO,this._linked?"1":"0")}constructor(e,t,s,n=!1){this.storage=e,this.id=t,this.secret=s,this.key=(0,eL.My)((0,eA.sc)("".concat(t,", ").concat(s," WalletLink"))),this._linked=!!n}}function e_(){var e,t;return null!=(t=null==(e=null==window?void 0:window.matchMedia)?void 0:e.call(window,"(prefers-color-scheme: dark)").matches)&&t}s(1244),s(5711),s(4346),s(8253);function eT(){let e=document.createElement("style");e.type="text/css",e.appendChild(document.createTextNode('@namespace svg "http://www.w3.org/2000/svg";.-cbwsdk-css-reset,.-cbwsdk-css-reset *{animation:none;animation-delay:0;animation-direction:normal;animation-duration:0;animation-fill-mode:none;animation-iteration-count:1;animation-name:none;animation-play-state:running;animation-timing-function:ease;backface-visibility:visible;background:0;background-attachment:scroll;background-clip:border-box;background-color:rgba(0,0,0,0);background-image:none;background-origin:padding-box;background-position:0 0;background-position-x:0;background-position-y:0;background-repeat:repeat;background-size:auto auto;border:0;border-style:none;border-width:medium;border-color:inherit;border-bottom:0;border-bottom-color:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-style:none;border-bottom-width:medium;border-collapse:separate;border-image:none;border-left:0;border-left-color:inherit;border-left-style:none;border-left-width:medium;border-radius:0;border-right:0;border-right-color:inherit;border-right-style:none;border-right-width:medium;border-spacing:0;border-top:0;border-top-color:inherit;border-top-left-radius:0;border-top-right-radius:0;border-top-style:none;border-top-width:medium;box-shadow:none;box-sizing:border-box;caption-side:top;clear:none;clip:auto;color:inherit;columns:auto;column-count:auto;column-fill:balance;column-gap:normal;column-rule:medium none currentColor;column-rule-color:currentColor;column-rule-style:none;column-rule-width:none;column-span:1;column-width:auto;counter-increment:none;counter-reset:none;direction:ltr;empty-cells:show;float:none;font:normal;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;height:auto;hyphens:none;letter-spacing:normal;line-height:normal;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;margin:0;margin-bottom:0;margin-left:0;margin-right:0;margin-top:0;opacity:1;orphans:0;outline:0;outline-color:invert;outline-style:none;outline-width:medium;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;pointer-events:auto;position:static;quotes:"\\201C" "\\201D" "\\2018" "\\2019";tab-size:8;table-layout:auto;text-align:inherit;text-align-last:auto;text-decoration:none;text-decoration-color:inherit;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-shadow:none;text-transform:none;transform:none;transform-style:flat;transition:none;transition-delay:0s;transition-duration:0s;transition-property:none;transition-timing-function:ease;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:0;word-spacing:normal;z-index:auto}.-cbwsdk-css-reset strong{font-weight:bold}.-cbwsdk-css-reset *{box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;line-height:1}.-cbwsdk-css-reset [class*=container]{margin:0;padding:0}.-cbwsdk-css-reset style{display:none}')),document.documentElement.appendChild(e)}var eU=s(4463),eN=s(2319),ej=s(9931);class eR{attach(e){this.root=document.createElement("div"),this.root.className="-cbwsdk-snackbar-root",e.appendChild(this.root),this.render()}presentItem(e){let t=this.nextItemKey++;return this.items.set(t,e),this.render(),()=>{this.items.delete(t),this.render()}}clear(){this.items.clear(),this.render()}render(){this.root&&(0,eN.XX)((0,eN.h)("div",null,(0,eN.h)(eP,{darkMode:this.darkMode},Array.from(this.items.entries()).map(e=>{let[t,s]=e;return(0,eN.h)(eH,Object.assign({},s,{key:t}))}))),this.root)}constructor(){this.items=new Map,this.nextItemKey=0,this.root=null,this.darkMode=e_()}}let eP=e=>(0,eN.h)("div",{class:(0,eU.$)("-cbwsdk-snackbar-container")},(0,eN.h)("style",null,".-cbwsdk-css-reset .-gear-container{margin-left:16px !important;margin-right:9px !important;display:flex;align-items:center;justify-content:center;width:24px;height:24px;transition:opacity .25s}.-cbwsdk-css-reset .-gear-container *{user-select:none}.-cbwsdk-css-reset .-gear-container svg{opacity:0;position:absolute}.-cbwsdk-css-reset .-gear-icon{height:12px;width:12px;z-index:10000}.-cbwsdk-css-reset .-cbwsdk-snackbar{align-items:flex-end;display:flex;flex-direction:column;position:fixed;right:0;top:0;z-index:2147483647}.-cbwsdk-css-reset .-cbwsdk-snackbar *{user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance{display:flex;flex-direction:column;margin:8px 16px 0 16px;overflow:visible;text-align:left;transform:translateX(0);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header:hover .-gear-container svg{opacity:1}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header{display:flex;align-items:center;background:#fff;overflow:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-cblogo{margin:8px 8px 8px 8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-message{color:#000;font-size:13px;line-height:1.5;user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu{background:#fff;transition:opacity .25s ease-in-out,transform .25s linear,visibility 0s;visibility:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;opacity:0;flex-direction:column;padding-left:8px;padding-right:8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:last-child{margin-bottom:8px !important}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover{background:#f5f7f8;border-radius:6px;transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover span{color:#050f19;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover svg path{fill:#000;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item{visibility:inherit;height:35px;margin-top:8px;margin-bottom:0;display:flex;flex-direction:row;align-items:center;padding:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item *{visibility:inherit;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover{background:rgba(223,95,103,.2);transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover svg path{fill:#df5f67;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover span{color:#df5f67;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-info{color:#aaa;font-size:13px;margin:0 8px 0 32px;position:absolute}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-hidden{opacity:0;text-align:left;transform:translateX(25%);transition:opacity .5s linear}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-expanded .-cbwsdk-snackbar-instance-menu{opacity:1;display:flex;transform:translateY(8px);visibility:visible}"),(0,eN.h)("div",{class:"-cbwsdk-snackbar"},e.children)),eH=e=>{let{autoExpand:t,message:s,menuItems:n}=e,[i,r]=(0,ej.J0)(!0),[a,o]=(0,ej.J0)(null!=t&&t);return(0,ej.vJ)(()=>{let e=[window.setTimeout(()=>{r(!1)},1),window.setTimeout(()=>{o(!0)},1e4)];return()=>{e.forEach(window.clearTimeout)}}),(0,eN.h)("div",{class:(0,eU.$)("-cbwsdk-snackbar-instance",i&&"-cbwsdk-snackbar-instance-hidden",a&&"-cbwsdk-snackbar-instance-expanded")},(0,eN.h)("div",{class:"-cbwsdk-snackbar-instance-header",onClick:()=>{o(!a)}},(0,eN.h)("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04LjkzLTguOTNIMTAuNDJ6IiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS45OTggMjYuMDQ5Yy01LjU0OSAwLTEwLjA0Ny00LjQ5OC0xMC4wNDctMTAuMDQ3IDAtNS41NDggNC40OTgtMTAuMDQ2IDEwLjA0Ny0xMC4wNDYgNS41NDggMCAxMC4wNDYgNC40OTggMTAuMDQ2IDEwLjA0NiAwIDUuNTQ5LTQuNDk4IDEwLjA0Ny0xMC4wNDYgMTAuMDQ3eiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xMi43NjIgMTQuMjU0YzAtLjgyMi42NjctMS40ODkgMS40ODktMS40ODloMy40OTdjLjgyMiAwIDEuNDg4LjY2NiAxLjQ4OCAxLjQ4OXYzLjQ5N2MwIC44MjItLjY2NiAxLjQ4OC0xLjQ4OCAxLjQ4OGgtMy40OTdhMS40ODggMS40ODggMCAwMS0xLjQ4OS0xLjQ4OHYtMy40OTh6IiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+",class:"-cbwsdk-snackbar-instance-header-cblogo"})," ",(0,eN.h)("div",{class:"-cbwsdk-snackbar-instance-header-message"},s),(0,eN.h)("div",{class:"-gear-container"},!a&&(0,eN.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,eN.h)("circle",{cx:"12",cy:"12",r:"12",fill:"#F5F7F8"})),(0,eN.h)("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDYuNzV2LTEuNWwtMS43Mi0uNTdjLS4wOC0uMjctLjE5LS41Mi0uMzItLjc3bC44MS0xLjYyLTEuMDYtMS4wNi0xLjYyLjgxYy0uMjQtLjEzLS41LS4yNC0uNzctLjMyTDYuNzUgMGgtMS41bC0uNTcgMS43MmMtLjI3LjA4LS41My4xOS0uNzcuMzJsLTEuNjItLjgxLTEuMDYgMS4wNi44MSAxLjYyYy0uMTMuMjQtLjI0LjUtLjMyLjc3TDAgNS4yNXYxLjVsMS43Mi41N2MuMDguMjcuMTkuNTMuMzIuNzdsLS44MSAxLjYyIDEuMDYgMS4wNiAxLjYyLS44MWMuMjQuMTMuNS4yMy43Ny4zMkw1LjI1IDEyaDEuNWwuNTctMS43MmMuMjctLjA4LjUyLS4xOS43Ny0uMzJsMS42Mi44MSAxLjA2LTEuMDYtLjgxLTEuNjJjLjEzLS4yNC4yMy0uNS4zMi0uNzdMMTIgNi43NXpNNiA4LjVhMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=",class:"-gear-icon",title:"Expand"}))),n&&n.length>0&&(0,eN.h)("div",{class:"-cbwsdk-snackbar-instance-menu"},n.map((e,t)=>(0,eN.h)("div",{class:(0,eU.$)("-cbwsdk-snackbar-instance-menu-item",e.isRed&&"-cbwsdk-snackbar-instance-menu-item-is-red"),onClick:e.onClick,key:t},(0,eN.h)("svg",{width:e.svgWidth,height:e.svgHeight,viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,eN.h)("path",{"fill-rule":e.defaultFillRule,"clip-rule":e.defaultClipRule,d:e.path,fill:"#AAAAAA"})),(0,eN.h)("span",{class:(0,eU.$)("-cbwsdk-snackbar-instance-menu-item-info",e.isRed&&"-cbwsdk-snackbar-instance-menu-item-info-is-red")},e.info)))))};class eB{attach(){if(this.attached)throw Error("Coinbase Wallet SDK UI is already attached");let e=document.documentElement,t=document.createElement("div");t.className="-cbwsdk-css-reset",e.appendChild(t),this.snackbar.attach(t),this.attached=!0,eT()}showConnecting(e){let t;return t=e.isUnlinkedErrorState?{autoExpand:!0,message:"Connection lost",menuItems:[{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:e.onResetConnection}]}:{message:"Confirm on phone",menuItems:[{isRed:!0,info:"Cancel transaction",svgWidth:"11",svgHeight:"11",path:"M10.3711 1.52346L9.21775 0.370117L5.37109 4.21022L1.52444 0.370117L0.371094 1.52346L4.2112 5.37012L0.371094 9.21677L1.52444 10.3701L5.37109 6.53001L9.21775 10.3701L10.3711 9.21677L6.53099 5.37012L10.3711 1.52346Z",defaultFillRule:"inherit",defaultClipRule:"inherit",onClick:e.onCancel},{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:e.onResetConnection}]},this.snackbar.presentItem(t)}constructor(){this.attached=!1,this.snackbar=new eR}}s(9460),s(3580);class eW{attach(){let e=document.documentElement;this.root=document.createElement("div"),this.root.className="-cbwsdk-css-reset",e.appendChild(this.root),eT()}present(e){this.render(e)}clear(){this.render(null)}render(e){!this.root||((0,eN.XX)(null,this.root),e&&(0,eN.XX)((0,eN.h)(eq,Object.assign({},e,{onDismiss:()=>{this.clear()},darkMode:this.darkMode})),this.root))}constructor(){this.root=null,this.darkMode=e_()}}let eq=e=>{let{title:t,buttonText:s,darkMode:n,onButtonClick:i,onDismiss:r}=e;return(0,eN.h)(eP,{darkMode:n},(0,eN.h)("div",{class:"-cbwsdk-redirect-dialog"},(0,eN.h)("style",null,".-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s;background-color:rgba(10,11,13,.5)}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box{display:block;position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);padding:20px;border-radius:8px;background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box p{display:block;font-weight:400;font-size:14px;line-height:20px;padding-bottom:12px;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box button{appearance:none;border:none;background:none;color:#0052ff;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark{background-color:#0a0b0d;color:#fff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark button{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light{background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light button{color:#0052ff}"),(0,eN.h)("div",{class:"-cbwsdk-redirect-dialog-backdrop",onClick:r}),(0,eN.h)("div",{class:(0,eU.$)("-cbwsdk-redirect-dialog-box",n?"dark":"light")},(0,eN.h)("p",null,t),(0,eN.h)("button",{onClick:i},s))))},eV="https://www.walletlink.org";class eZ{attach(){if(this.attached)throw Error("Coinbase Wallet SDK UI is already attached");this.redirectDialog.attach(),this.attached=!0}redirectToCoinbaseWallet(e){let t=new URL("https://go.cb-w.com/walletlink");t.searchParams.append("redirect_url",function(){try{if(function(){try{return null!==window.frameElement}catch(e){return!1}}()&&window.top)return window.top.location;return window.location}catch(e){return window.location}}().href),e&&t.searchParams.append("wl_url",e);let s=document.createElement("a");s.target="cbw-opener",s.href=t.href,s.rel="noreferrer noopener",s.click()}openCoinbaseWalletDeeplink(e){this.redirectDialog.present({title:"Redirecting to Coinbase Wallet...",buttonText:"Open",onButtonClick:()=>{this.redirectToCoinbaseWallet(e)}}),setTimeout(()=>{this.redirectToCoinbaseWallet(e)},99)}showConnecting(e){return()=>{this.redirectDialog.clear()}}constructor(){this.attached=!1,this.redirectDialog=new eW}}class eF{subscribe(){let e=eD.load(this.storage)||eD.create(this.storage),{linkAPIUrl:t}=this,s=new eC({session:e,linkAPIUrl:t,listener:this}),n=this.isMobileWeb?new eZ:new eB;return s.connect(),{session:e,ui:n,connection:s}}resetAndReload(){this.connection.destroy().then(()=>{let e=eD.load(this.storage);(null==e?void 0:e.id)===this._session.id&&i.clearAll(),document.location.reload()}).catch(e=>{})}signEthereumTransaction(e){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:R(e.weiValue),data:N(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?R(e.gasPriceInWei):null,maxFeePerGas:e.gasPriceInWei?R(e.gasPriceInWei):null,maxPriorityFeePerGas:e.gasPriceInWei?R(e.gasPriceInWei):null,gasLimit:e.gasLimit?R(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!1}})}signAndSubmitEthereumTransaction(e){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:R(e.weiValue),data:N(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?R(e.gasPriceInWei):null,maxFeePerGas:e.maxFeePerGas?R(e.maxFeePerGas):null,maxPriorityFeePerGas:e.maxPriorityFeePerGas?R(e.maxPriorityFeePerGas):null,gasLimit:e.gasLimit?R(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!0}})}submitEthereumTransaction(e,t){return this.sendRequest({method:"submitEthereumTransaction",params:{signedTransaction:N(e,!0),chainId:t}})}getWalletLinkSession(){return this._session}sendRequest(e){let t=null,s=_(8),n=n=>{this.publishWeb3RequestCanceledEvent(s),this.handleErrorResponse(s,e.method,n),null==t||t()};return new Promise((i,r)=>{t=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:n,onResetConnection:this.resetAndReload}),this.relayEventManager.callbacks.set(s,e=>{if(null==t||t(),ex(e))return r(Error(e.errorMessage));i(e)}),this.publishWeb3RequestEvent(s,e)})}publishWeb3RequestEvent(e,t){let s={type:"WEB3_REQUEST",id:e,request:t};this.publishEvent("Web3Request",s,!0).then(e=>{}).catch(e=>{this.handleWeb3ResponseMessage(s.id,{method:t.method,errorMessage:e.message})}),this.isMobileWeb&&this.openCoinbaseWalletDeeplink(t.method)}openCoinbaseWalletDeeplink(e){if(this.ui instanceof eZ)switch(e){case"requestEthereumAccounts":case"switchEthereumChain":return;default:window.addEventListener("blur",()=>{window.addEventListener("focus",()=>{this.connection.checkUnseenEvents()},{once:!0})},{once:!0}),this.ui.openCoinbaseWalletDeeplink()}}publishWeb3RequestCanceledEvent(e){this.publishEvent("Web3RequestCanceled",{type:"WEB3_REQUEST_CANCELED",id:e},!1).then()}publishEvent(e,t,s){return this.connection.publishEvent(e,t,s)}handleWeb3ResponseMessage(e,t){if("requestEthereumAccounts"===t.method){eF.accountRequestCallbackIds.forEach(e=>this.invokeCallback(e,t)),eF.accountRequestCallbackIds.clear();return}this.invokeCallback(e,t)}handleErrorResponse(e,t,s){var n;let i=null!=(n=null==s?void 0:s.message)?n:"Unspecified error message.";this.handleWeb3ResponseMessage(e,{method:t,errorMessage:i})}invokeCallback(e,t){let s=this.relayEventManager.callbacks.get(e);s&&(s(t),this.relayEventManager.callbacks.delete(e))}requestEthereumAccounts(){let{appName:e,appLogoUrl:t}=this.metadata,s={method:"requestEthereumAccounts",params:{appName:e,appLogoUrl:t}},n=_(8);return new Promise((e,t)=>{this.relayEventManager.callbacks.set(n,s=>{if(ex(s))return t(Error(s.errorMessage));e(s)}),eF.accountRequestCallbackIds.add(n),this.publishWeb3RequestEvent(n,s)})}watchAsset(e,t,s,n,i,r){let a={method:"watchAsset",params:{type:e,options:{address:t,symbol:s,decimals:n,image:i},chainId:r}},o=null,c=_(8),l=e=>{this.publishWeb3RequestCanceledEvent(c),this.handleErrorResponse(c,a.method,e),null==o||o()};return o=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:l,onResetConnection:this.resetAndReload}),new Promise((e,t)=>{this.relayEventManager.callbacks.set(c,s=>{if(null==o||o(),ex(s))return t(Error(s.errorMessage));e(s)}),this.publishWeb3RequestEvent(c,a)})}addEthereumChain(e,t,s,n,i,r){let a={method:"addEthereumChain",params:{chainId:e,rpcUrls:t,blockExplorerUrls:n,chainName:i,iconUrls:s,nativeCurrency:r}},o=null,c=_(8),l=e=>{this.publishWeb3RequestCanceledEvent(c),this.handleErrorResponse(c,a.method,e),null==o||o()};return o=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:l,onResetConnection:this.resetAndReload}),new Promise((e,t)=>{this.relayEventManager.callbacks.set(c,s=>{if(null==o||o(),ex(s))return t(Error(s.errorMessage));e(s)}),this.publishWeb3RequestEvent(c,a)})}switchEthereumChain(e,t){let s={method:"switchEthereumChain",params:Object.assign({chainId:e},{address:t})},n=null,i=_(8),r=e=>{this.publishWeb3RequestCanceledEvent(i),this.handleErrorResponse(i,s.method,e),null==n||n()};return n=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:r,onResetConnection:this.resetAndReload}),new Promise((e,t)=>{this.relayEventManager.callbacks.set(i,s=>(null==n||n(),ex(s)&&s.errorCode)?t(E({code:s.errorCode,message:"Unrecognized chain ID. Try adding the chain using addEthereumChain first."})):ex(s)?t(Error(s.errorMessage)):void e(s)),this.publishWeb3RequestEvent(i,s)})}constructor(e){this.chainCallbackParams={chainId:"",jsonRpcUrl:""},this.isMobileWeb=function(){var e;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(null==(e=null==window?void 0:window.navigator)?void 0:e.userAgent)}(),this.linkedUpdated=e=>{this.isLinked=e;let t=this.storage.getItem(ew);if(e&&(this._session.linked=e),this.isUnlinkedErrorState=!1,t){let s=t.split(" "),n="true"===this.storage.getItem("IsStandaloneSigning");""===s[0]||e||!this._session.linked||n||(this.isUnlinkedErrorState=!0)}},this.metadataUpdated=(e,t)=>{this.storage.setItem(e,t)},this.chainUpdated=(e,t)=>{(this.chainCallbackParams.chainId!==e||this.chainCallbackParams.jsonRpcUrl!==t)&&(this.chainCallbackParams={chainId:e,jsonRpcUrl:t},this.chainCallback&&this.chainCallback(t,Number.parseInt(e,10)))},this.accountUpdated=e=>{this.accountsCallback&&this.accountsCallback([e]),eF.accountRequestCallbackIds.size>0&&(Array.from(eF.accountRequestCallbackIds.values()).forEach(t=>{this.invokeCallback(t,{method:"requestEthereumAccounts",result:[e]})}),eF.accountRequestCallbackIds.clear())},this.resetAndReload=this.resetAndReload.bind(this),this.linkAPIUrl=e.linkAPIUrl,this.storage=e.storage,this.metadata=e.metadata,this.accountsCallback=e.accountsCallback,this.chainCallback=e.chainCallback;const{session:t,ui:s,connection:n}=this.subscribe();this._session=t,this.connection=n,this.relayEventManager=new eI,this.ui=s,this.ui.attach()}}eF.accountRequestCallbackIds=new Set;let eK="DefaultChainId",ez="DefaultJsonRpcUrl";class eG{getSession(){let{id:e,secret:t}=this.initializeRelay().getWalletLinkSession();return{id:e,secret:t}}async handshake(){await this._eth_requestAccounts()}get selectedAddress(){return this._addresses[0]||void 0}get jsonRpcUrl(){var e;return null!=(e=this._storage.getItem(ez))?e:void 0}set jsonRpcUrl(e){this._storage.setItem(ez,e)}updateProviderInfo(e,t){var s;this.jsonRpcUrl=e;let n=this.getChainId();this._storage.setItem(eK,t.toString(10)),K(t)!==n&&(null==(s=this.callback)||s.call(this,"chainChanged",P(t)))}async watchAsset(e){let t=Array.isArray(e)?e[0]:e;if(!t.type)throw y("Type is required");if((null==t?void 0:t.type)!=="ERC20")throw y("Asset of type '".concat(t.type,"' is not supported"));if(!(null==t?void 0:t.options))throw y("Options are required");if(!(null==t?void 0:t.options.address))throw y("Address is required");let s=this.getChainId(),{address:n,symbol:i,image:r,decimals:a}=t.options,o=this.initializeRelay(),c=await o.watchAsset(t.type,n,i,a,r,null==s?void 0:s.toString());return!ex(c)&&!!c.result}async addEthereumChain(e){var t,s;let n=e[0];if((null==(t=n.rpcUrls)?void 0:t.length)===0)throw y("please pass in at least 1 rpcUrl");if(!n.chainName||""===n.chainName.trim())throw y("chainName is a required field");if(!n.nativeCurrency)throw y("nativeCurrency is a required field");let i=Number.parseInt(n.chainId,16);if(i===this.getChainId())return!1;let r=this.initializeRelay(),{rpcUrls:a=[],blockExplorerUrls:o=[],chainName:c,iconUrls:l=[],nativeCurrency:h}=n,d=await r.addEthereumChain(i.toString(),a,l,o,c,h);if(ex(d))return!1;if((null==(s=d.result)?void 0:s.isApproved)===!0)return this.updateProviderInfo(a[0],i),null;throw m("unable to add ethereum chain")}async switchEthereumChain(e){let t=Number.parseInt(e[0].chainId,16),s=this.initializeRelay(),n=await s.switchEthereumChain(t.toString(10),this.selectedAddress||void 0);if(ex(n))throw n;let i=n.result;return i.isApproved&&i.rpcUrl.length>0&&this.updateProviderInfo(i.rpcUrl,t),null}async cleanup(){this.callback=null,this._relay&&this._relay.resetAndReload(),this._storage.clear()}_setAddresses(e,t){var s;if(!Array.isArray(e))throw Error("addresses is not an array");let n=e.map(e=>Z(e));JSON.stringify(n)!==JSON.stringify(this._addresses)&&(this._addresses=n,null==(s=this.callback)||s.call(this,"accountsChanged",n),this._storage.setItem(ew,n.join(" ")))}async request(e){let t=e.params||[];switch(e.method){case"eth_accounts":return[...this._addresses];case"eth_coinbase":return this.selectedAddress||null;case"net_version":return this.getChainId().toString(10);case"eth_chainId":return P(this.getChainId());case"eth_requestAccounts":return this._eth_requestAccounts();case"eth_ecRecover":case"personal_ecRecover":return this.ecRecover(e);case"personal_sign":return this.personalSign(e);case"eth_signTransaction":return this._eth_signTransaction(t);case"eth_sendRawTransaction":return this._eth_sendRawTransaction(t);case"eth_sendTransaction":return this._eth_sendTransaction(t);case"eth_signTypedData_v1":case"eth_signTypedData_v3":case"eth_signTypedData_v4":case"eth_signTypedData":return this.signTypedData(e);case"wallet_addEthereumChain":return this.addEthereumChain(t);case"wallet_switchEthereumChain":return this.switchEthereumChain(t);case"wallet_watchAsset":return this.watchAsset(t);default:if(!this.jsonRpcUrl)throw m("No RPC URL set for chain");return el(e,this.jsonRpcUrl)}}_ensureKnownAddress(e){let t=Z(e);if(!this._addresses.map(e=>Z(e)).includes(t))throw Error("Unknown Ethereum address")}_prepareTransactionParams(e){let t=e.from?Z(e.from):this.selectedAddress;if(!t)throw Error("Ethereum address is unavailable");this._ensureKnownAddress(t);let s=e.to?Z(e.to):null,n=null!=e.value?z(e.value):BigInt(0),i=e.data?F(e.data):Buffer.alloc(0),r=null!=e.nonce?K(e.nonce):null,a=null!=e.gasPrice?z(e.gasPrice):null,o=null!=e.maxFeePerGas?z(e.maxFeePerGas):null,c=null!=e.maxPriorityFeePerGas?z(e.maxPriorityFeePerGas):null;return{fromAddress:t,toAddress:s,weiValue:n,data:i,nonce:r,gasPriceInWei:a,maxFeePerGas:o,maxPriorityFeePerGas:c,gasLimit:null!=e.gas?z(e.gas):null,chainId:e.chainId?K(e.chainId):this.getChainId()}}async ecRecover(e){let{method:t,params:s}=e;if(!Array.isArray(s))throw y();let n=this.initializeRelay(),i=await n.sendRequest({method:"ethereumAddressFromSignedMessage",params:{message:j(s[0]),signature:j(s[1]),addPrefix:"personal_ecRecover"===t}});if(ex(i))throw i;return i.result}getChainId(){var e;return Number.parseInt(null!=(e=this._storage.getItem(eK))?e:"1",10)}async _eth_requestAccounts(){var e,t;if(this._addresses.length>0)return null==(e=this.callback)||e.call(this,"connect",{chainId:P(this.getChainId())}),this._addresses;let s=this.initializeRelay(),n=await s.requestEthereumAccounts();if(ex(n))throw n;if(!n.result)throw Error("accounts received is empty");return this._setAddresses(n.result),null==(t=this.callback)||t.call(this,"connect",{chainId:P(this.getChainId())}),this._addresses}async personalSign(e){let{params:t}=e;if(!Array.isArray(t))throw y();let s=t[1],n=t[0];this._ensureKnownAddress(s);let i=this.initializeRelay(),r=await i.sendRequest({method:"signEthereumMessage",params:{address:Z(s),message:j(n),addPrefix:!0,typedDataJson:null}});if(ex(r))throw r;return r.result}async _eth_signTransaction(e){let t=this._prepareTransactionParams(e[0]||{}),s=this.initializeRelay(),n=await s.signEthereumTransaction(t);if(ex(n))throw n;return n.result}async _eth_sendRawTransaction(e){let t=F(e[0]),s=this.initializeRelay(),n=await s.submitEthereumTransaction(t,this.getChainId());if(ex(n))throw n;return n.result}async _eth_sendTransaction(e){let t=this._prepareTransactionParams(e[0]||{}),s=this.initializeRelay(),n=await s.signAndSubmitEthereumTransaction(t);if(ex(n))throw n;return n.result}async signTypedData(e){let{method:t,params:s}=e;if(!Array.isArray(s))throw y();let n=s[+("eth_signTypedData_v1"===t)],i=s[+("eth_signTypedData_v1"!==t)];this._ensureKnownAddress(n);let r=this.initializeRelay(),a=await r.sendRequest({method:"signEthereumMessage",params:{address:Z(n),message:N(({eth_signTypedData_v1:em.hashForSignTypedDataLegacy,eth_signTypedData_v3:em.hashForSignTypedData_v3,eth_signTypedData_v4:em.hashForSignTypedData_v4,eth_signTypedData:em.hashForSignTypedData_v4})[t]({data:function(e){if("string"==typeof e)return JSON.parse(e);if("object"==typeof e)return e;throw y("Not a JSON string or an object: ".concat(String(e)))}(i)}),!0),typedDataJson:JSON.stringify(i,null,2),addPrefix:!1}});if(ex(a))throw a;return a.result}initializeRelay(){return this._relay||(this._relay=new eF({linkAPIUrl:eV,storage:this._storage,metadata:this.metadata,accountsCallback:this._setAddresses.bind(this),chainCallback:this.updateProviderInfo.bind(this)})),this._relay}constructor(e){this._relay=null,this._addresses=[],this.metadata=e.metadata,this._storage=new i("walletlink",eV),this.callback=e.callback||null;const t=this._storage.getItem(ew);if(t){const e=t.split(" ");""!==e[0]&&(this._addresses=e.map(e=>Z(e)))}this.initializeRelay()}}let eQ="SignerType",eJ=new i("CBWSDK","SignerConfigurator");async function eY(e){let{communicator:t,metadata:s,handshakeRequest:n,callback:i}=e;eX(t,s,i).catch(()=>{});let r={id:crypto.randomUUID(),event:"selectSignerType",data:Object.assign(Object.assign({},e.preference),{handshakeRequest:n})},{data:a}=await t.postRequestAndWaitForResponse(r);return a}async function eX(e,t,s){await e.onMessage(e=>{let{event:t}=e;return"WalletLinkSessionRequest"===t});let n=new eG({metadata:t,callback:s});e.postMessage({event:"WalletLinkUpdate",data:{session:n.getSession()}}),await n.handshake(),e.postMessage({event:"WalletLinkUpdate",data:{connected:!0}})}let{checkCrossOriginOpenerPolicy:e$,getCrossOriginOpenerPolicy:e0}={getCrossOriginOpenerPolicy:()=>void 0===n?"undefined":n,checkCrossOriginOpenerPolicy:async()=>{if("undefined"==typeof window){n="non-browser-env";return}try{let e="".concat(window.location.origin).concat(window.location.pathname),t=await fetch(e,{method:"HEAD"});if(!t.ok)throw Error("HTTP error! status: ".concat(t.status));let s=t.headers.get("Cross-Origin-Opener-Policy");n=null!=s?s:"null","same-origin"===n&&console.error("Coinbase Wallet SDK requires the Cross-Origin-Opener-Policy header to not be set to 'same-origin'. This is to ensure that the SDK can communicate with the Coinbase Smart Wallet app.\n\nPlease see https://www.smartwallet.dev/guides/tips/popup-tips#cross-origin-opener-policy for more information.")}catch(e){console.error("Error checking Cross-Origin-Opener-Policy:",e.message),n="error"}}};class e1{constructor({url:e="https://keys.coinbase.com/connect",metadata:t,preference:s}){this.popup=null,this.listeners=new Map,this.postMessage=async e=>{(await this.waitForPopupLoaded()).postMessage(e,this.url.origin)},this.postRequestAndWaitForResponse=async e=>{let t=this.onMessage(t=>{let{requestId:s}=t;return s===e.id});return this.postMessage(e),await t},this.onMessage=async e=>new Promise((t,s)=>{let n=s=>{if(s.origin!==this.url.origin)return;let i=s.data;e(i)&&(t(i),window.removeEventListener("message",n),this.listeners.delete(n))};window.addEventListener("message",n),this.listeners.set(n,{reject:s})}),this.disconnect=()=>{var e;(e=this.popup)&&!e.closed&&e.close(),this.popup=null,this.listeners.forEach((e,t)=>{let{reject:s}=e;s(w("Request rejected")),window.removeEventListener("message",t)}),this.listeners.clear()},this.waitForPopupLoaded=async()=>this.popup&&!this.popup.closed?(this.popup.focus(),this.popup):(this.popup=function(e){let t=(window.innerWidth-420)/2+window.screenX,s=(window.innerHeight-540)/2+window.screenY;var n=e;for(let[e,t]of Object.entries({sdkName:ec,sdkVersion:eo,origin:window.location.origin,coop:e0()}))n.searchParams.append(e,t.toString());let i="wallet_".concat(crypto.randomUUID()),r=window.open(e,i,"width=".concat(420,", height=").concat(540,", left=").concat(t,", top=").concat(s));if(null==r||r.focus(),!r)throw m("Pop up window failed to open");return r}(this.url),this.onMessage(e=>{let{event:t}=e;return"PopupUnload"===t}).then(this.disconnect).catch(()=>{}),this.onMessage(e=>{let{event:t}=e;return"PopupLoaded"===t}).then(e=>{this.postMessage({requestId:e.id,data:{version:eo,metadata:this.metadata,preference:this.preference,location:window.location.toString()}})}).then(()=>{if(!this.popup)throw m();return this.popup})),this.url=new URL(e),this.metadata=t,this.preference=s}}var e2=s(9977);class e3 extends e2.b{}var e5=function(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(s[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(s[n[i]]=e[n[i]]);return s};class e4 extends e3{async request(e){try{if(!function(e){if(!e||"object"!=typeof e||Array.isArray(e))throw y({message:"Expected a single, non-array, object argument.",data:e});let{method:t,params:s}=e;if("string"!=typeof t||0===t.length)throw y({message:"'args.method' must be a non-empty string.",data:e});if(void 0!==s&&!Array.isArray(s)&&("object"!=typeof s||null===s))throw y({message:"'args.params' must be an object or array if provided.",data:e});switch(t){case"eth_sign":case"eth_signTypedData_v2":case"eth_subscribe":case"eth_unsubscribe":throw k()}}(e),!this.signer)switch(e.method){case"eth_requestAccounts":{let t=await this.requestSignerSelection(e),s=this.initSigner(t);await s.handshake(e),this.signer=s,eJ.setItem(eQ,t);break}case"wallet_sendCalls":{let t=this.initSigner("scw");await t.handshake({method:"handshake"});let s=await t.request(e);return await t.cleanup(),s}case"wallet_getCallsStatus":return el(e,"http://rpc.wallet.coinbase.com");case"net_version":return 1;case"eth_chainId":return P(1);default:throw x("Must call 'eth_requestAccounts' before other methods")}return await this.signer.request(e)}catch(n){let e,t,{code:s}=n;return s===c&&this.disconnect(),Promise.reject((e=function(e){var t,s;let{shouldIncludeStack:n=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i={};if(e&&"object"==typeof e&&!Array.isArray(e)&&g(e,"code")&&Number.isInteger(t=e.code)&&(d[t.toString()]||(s=t)>=-32099&&s<=-32e3))i.code=e.code,e.message&&"string"==typeof e.message?(i.message=e.message,g(e,"data")&&(i.data=e.data)):(i.message=f(i.code),i.data={originalError:p(e)});else i.code=a,i.message=b(e,"message")?e.message:u,i.data={originalError:p(e)};return n&&(i.stack=b(e,"stack")?e.stack:void 0),i}(function(e){var t;if("string"==typeof e)return{message:e,code:a};if(ex(e)){let s=e.errorMessage,n=null!=(t=e.errorCode)?t:s.match(/(denied|rejected)/i)?o:void 0;return Object.assign(Object.assign({},e),{message:s,code:n,data:{method:e.method}})}return e}(n),{shouldIncludeStack:!0}),(t=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors")).searchParams.set("version",eo),t.searchParams.set("code",e.code.toString()),t.searchParams.set("message",e.message),Object.assign(Object.assign({},e),{docUrl:t.href})))}}async enable(){return console.warn('.enable() has been deprecated. Please use .request({ method: "eth_requestAccounts" }) instead.'),await this.request({method:"eth_requestAccounts"})}async disconnect(){var e;await (null==(e=this.signer)?void 0:e.cleanup()),this.signer=null,i.clearAll(),this.emit("disconnect",v("User initiated disconnection"))}requestSignerSelection(e){return eY({communicator:this.communicator,preference:this.preference,metadata:this.metadata,handshakeRequest:e,callback:this.emit.bind(this)})}initSigner(e){return function(e){let{signerType:t,metadata:s,communicator:n,callback:i}=e;switch(t){case"scw":return new eg({metadata:s,callback:i,communicator:n});case"walletlink":return new eG({metadata:s,callback:i})}}({signerType:e,metadata:this.metadata,communicator:this.communicator,callback:this.emit.bind(this)})}constructor(e){var{metadata:t}=e,s=e.preference,{keysUrl:n}=s,i=e5(s,["keysUrl"]);super(),this.signer=null,this.isCoinbaseWallet=!0,this.metadata=t,this.preference=i,this.communicator=new e1({url:n,metadata:t,preference:i});const r=eJ.getItem(eQ);r&&(this.signer=this.initSigner(r))}}function e8(e){if(e){if(!["all","smartWalletOnly","eoaOnly"].includes(e.options))throw Error("Invalid options: ".concat(e.options));if(e.attribution&&void 0!==e.attribution.auto&&void 0!==e.attribution.dataSuffix)throw Error("Attribution cannot contain both auto and dataSuffix properties")}}class e6{makeWeb3Provider(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{options:"all"};e8(t);let s={metadata:this.metadata,preference:t};return null!=(e=eh(s))?e:new e4(s)}getCoinbaseWalletLogo(e){let t,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:240;switch(e){case"standard":default:return t=s,"data:image/svg+xml,%3Csvg width='".concat(s,"' height='").concat(t,"' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E ");case"circle":return t=s,"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='".concat(s,"' height='").concat(t,"' viewBox='0 0 999.81 999.81'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052fe;%7D.cls-2%7Bfill:%23fefefe;%7D.cls-3%7Bfill:%230152fe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M655-115.9h56c.83,1.59,2.36.88,3.56,1a478,478,0,0,1,75.06,10.42C891.4-81.76,978.33-32.58,1049.19,44q116.7,126,131.94,297.61c.38,4.14-.34,8.53,1.78,12.45v59c-1.58.84-.91,2.35-1,3.56a482.05,482.05,0,0,1-10.38,74.05c-24,106.72-76.64,196.76-158.83,268.93s-178.18,112.82-287.2,122.6c-4.83.43-9.86-.25-14.51,1.77H654c-1-1.68-2.69-.91-4.06-1a496.89,496.89,0,0,1-105.9-18.59c-93.54-27.42-172.78-77.59-236.91-150.94Q199.34,590.1,184.87,426.58c-.47-5.19.25-10.56-1.77-15.59V355c1.68-1,.91-2.7,1-4.06a498.12,498.12,0,0,1,18.58-105.9c26-88.75,72.64-164.9,140.6-227.57q126-116.27,297.21-131.61C645.32-114.57,650.35-113.88,655-115.9Zm377.92,500c0-192.44-156.31-349.49-347.56-350.15-194.13-.68-350.94,155.13-352.29,347.42-1.37,194.55,155.51,352.1,348.56,352.47C876.15,734.23,1032.93,577.84,1032.93,384.11Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-2' d='M1032.93,384.11c0,193.73-156.78,350.12-351.29,349.74-193-.37-349.93-157.92-348.56-352.47C334.43,189.09,491.24,33.28,685.37,34,876.62,34.62,1032.94,191.67,1032.93,384.11ZM683,496.81q43.74,0,87.48,0c15.55,0,25.32-9.72,25.33-25.21q0-87.48,0-175c0-15.83-9.68-25.46-25.59-25.46H595.77c-15.88,0-25.57,9.64-25.58,25.46q0,87.23,0,174.45c0,16.18,9.59,25.7,25.84,25.71Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-3' d='M683,496.81H596c-16.25,0-25.84-9.53-25.84-25.71q0-87.23,0-174.45c0-15.82,9.7-25.46,25.58-25.46H770.22c15.91,0,25.59,9.63,25.59,25.46q0,87.47,0,175c0,15.49-9.78,25.2-25.33,25.21Q726.74,496.84,683,496.81Z' transform='translate(-183.1 115.9)'/%3E%3C/svg%3E");case"text":return t=(.1*s).toFixed(2),"data:image/svg+xml,%3Csvg width='".concat(s,"' height='").concat(t,"' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E");case"textWithLogo":return t=(.25*s).toFixed(2),"data:image/svg+xml,%3Csvg width='".concat(s,"' height='").concat(t,"' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E");case"textLight":return t=(.1*s).toFixed(2),"data:image/svg+xml,%3Csvg width='".concat(s,"' height='").concat(t,"' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E");case"textWithLogoLight":return t=(.25*s).toFixed(2),"data:image/svg+xml,%3Csvg width='".concat(s,"' height='").concat(t,"' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E")}}storeLatestVersion(){new i("CBWSDK").setItem("VERSION",eo)}constructor(e){this.metadata={appName:e.appName||"Dapp",appLogoUrl:e.appLogoUrl||function(){let e=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:t,host:s}=document.location,n=e?e.getAttribute("href"):null;return!n||n.startsWith("javascript:")||n.startsWith("vbscript:")?"".concat(t,"//").concat(s,"/favicon.ico"):n.startsWith("http://")||n.startsWith("https://")||n.startsWith("data:")?n:n.startsWith("//")?t+n:"".concat(t,"//").concat(s).concat(n)}(),appChainIds:e.appChainIds||[]},this.storeLatestVersion(),e$()}}let e7={options:"all"};function e9(e){var t;new i("CBWSDK").setItem("VERSION",eo),e$();let s={metadata:{appName:e.appName||"Dapp",appLogoUrl:e.appLogoUrl||"",appChainIds:e.appChainIds||[]},preference:Object.assign(e7,null!=(t=e.preference)?t:{})};e8(s.preference);let n=null;return{getProvider:()=>{var e;let t;return n||(n=null!=(e=eh(t={metadata:s.metadata,preference:s.preference}))?e:new e4(t)),n}}}let te=e6},2045:function(e,t,s){"use strict";s.d(t,{B4:()=>f,CQ:()=>x,CW:()=>w,Ei:()=>d,F8:()=>k,P5:()=>u,TH:()=>v,Vl:()=>y,Vr:()=>m,WM:()=>p,WQ:()=>b,im:()=>g,jm:()=>o,lD:()=>r,qh:()=>h,rE:()=>c,ry:()=>l,xn:()=>a}),s(4953),s(2536),s(8732),s(6752),s(9016),s(1408),s(7515),s(6698),s(4169),s(8809),s(7095),s(6176),s(4189),s(4261);let n=BigInt(0x100000000-1),i=BigInt(32);function r(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],s=e.length,r=new Uint32Array(s),a=new Uint32Array(s);for(let o=0;o<s;o++){let{h:s,l:c}=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t?{h:Number(e&n),l:Number(e>>i&n)}:{h:0|Number(e>>i&n),l:0|Number(e&n)}}(e[o],t);[r[o],a[o]]=[s,c]}return[r,a]}let a=(e,t,s)=>e>>>s,o=(e,t,s)=>e<<32-s|t>>>s,c=(e,t,s)=>e>>>s|t<<32-s,l=(e,t,s)=>e<<32-s|t>>>s,h=(e,t,s)=>e<<64-s|t>>>s-32,d=(e,t,s)=>e>>>s-32|t<<64-s,u=(e,t,s)=>e<<s|t>>>32-s,f=(e,t,s)=>t<<s|e>>>32-s,p=(e,t,s)=>t<<s-32|e>>>64-s,g=(e,t,s)=>e<<s-32|t>>>64-s;function b(e,t,s,n){let i=(t>>>0)+(n>>>0);return{h:e+s+(i/0x100000000|0)|0,l:0|i}}let y=(e,t,s)=>(e>>>0)+(t>>>0)+(s>>>0),m=(e,t,s,n)=>t+s+n+(e/0x100000000|0)|0,w=(e,t,s,n)=>(e>>>0)+(t>>>0)+(s>>>0)+(n>>>0),x=(e,t,s,n,i)=>t+s+n+i+(e/0x100000000|0)|0,k=(e,t,s,n,i)=>(e>>>0)+(t>>>0)+(s>>>0)+(n>>>0)+(i>>>0),v=(e,t,s,n,i,r)=>t+s+n+i+r+(e/0x100000000|0)|0},696:function(e,t,s){"use strict";s.d(t,{w:()=>r}),s(4953),s(2536),s(8732),s(3405),s(9016),s(1408),s(7515),s(6698),s(4169),s(8809),s(7095),s(6176),s(4189),s(1300);var n=s(515);class i extends n.Vw{update(e){return(0,n.CC)(this),this.iHash.update(e),this}digestInto(e){(0,n.CC)(this),(0,n.DO)(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){let e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));let{oHash:t,iHash:s,finished:n,destroyed:i,blockLen:r,outputLen:a}=this;return e.finished=n,e.destroyed=i,e.blockLen=r,e.outputLen=a,e.oHash=t._cloneInto(e.oHash),e.iHash=s._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}constructor(e,t){super(),this.finished=!1,this.destroyed=!1,(0,n.sd)(e);const s=(0,n.ZJ)(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,r=new Uint8Array(i);r.set(s.length>i?e.create().update(s).digest():s);for(let e=0;e<r.length;e++)r[e]^=54;this.iHash.update(r),this.oHash=e.create();for(let e=0;e<r.length;e++)r[e]^=106;this.oHash.update(r),(0,n.uH)(r)}}let r=(e,t,s)=>new i(e,t).update(s).digest();r.create=(e,t)=>new i(e,t)},5355:function(e,t,s){"use strict";s.d(t,{sc:()=>w,qt:()=>k,Zf:()=>x}),s(4953),s(2536),s(8732),s(6752),s(9016),s(1408),s(7515),s(6698),s(4169),s(8809),s(7095),s(6176),s(4189),s(5237),s(4891),s(9091),s(8593),s(1300),s(4261),s(3405);var n=s(515);class i extends n.Vw{update(e){(0,n.CC)(this),e=(0,n.ZJ)(e),(0,n.DO)(e);let{view:t,buffer:s,blockLen:i}=this,r=e.length;for(let a=0;a<r;){let o=Math.min(i-this.pos,r-a);if(o===i){let t=(0,n.O8)(e);for(;i<=r-a;a+=i)this.process(t,a);continue}s.set(e.subarray(a,a+o),this.pos),this.pos+=o,a+=o,this.pos===i&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,n.CC)(this),(0,n.Ht)(e,this),this.finished=!0;let{buffer:t,view:s,blockLen:i,isLE:r}=this,{pos:a}=this;t[a++]=128,(0,n.uH)(this.buffer.subarray(a)),this.padOffset>i-a&&(this.process(s,0),a=0);for(let e=a;e<i;e++)t[e]=0;!function(e,t,s,n){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,s,n);let i=BigInt(32),r=BigInt(0xffffffff),a=Number(s>>i&r),o=Number(s&r),c=4*!!n,l=4*!n;e.setUint32(t+c,a,n),e.setUint32(t+l,o,n)}(s,i-8,BigInt(8*this.length),r),this.process(s,0);let o=(0,n.O8)(e),c=this.outputLen;if(c%4)throw Error("_sha2: outputLen should be aligned to 32bit");let l=c/4,h=this.get();if(l>h.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;e<l;e++)o.setUint32(4*e,h[e],r)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let s=e.slice(0,t);return this.destroy(),s}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:t,buffer:s,length:n,finished:i,destroyed:r,pos:a}=this;return e.destroyed=r,e.finished=i,e.length=n,e.pos=a,n%t&&e.buffer.set(s),e}clone(){return this._cloneInto()}constructor(e,t,s,i){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=s,this.isLE=i,this.buffer=new Uint8Array(e),this.view=(0,n.O8)(this.buffer)}}let r=Uint32Array.from([0x6a09e667,0xbb67ae85,0x3c6ef372,0xa54ff53a,0x510e527f,0x9b05688c,0x1f83d9ab,0x5be0cd19]),a=Uint32Array.from([0xcbbb9d5d,0xc1059ed8,0x629a292a,0x367cd507,0x9159015a,0x3070dd17,0x152fecd8,0xf70e5939,0x67332667,0xffc00b31,0x8eb44a87,0x68581511,0xdb0c2e0d,0x64f98fa7,0x47b5481d,0xbefa4fa4]),o=Uint32Array.from([0x6a09e667,0xf3bcc908,0xbb67ae85,0x84caa73b,0x3c6ef372,0xfe94f82b,0xa54ff53a,0x5f1d36f1,0x510e527f,0xade682d1,0x9b05688c,0x2b3e6c1f,0x1f83d9ab,0xfb41bd6b,0x5be0cd19,0x137e2179]);var c=s(2045);let l=Uint32Array.from([0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2]),h=new Uint32Array(64);class d extends i{get(){let{A:e,B:t,C:s,D:n,E:i,F:r,G:a,H:o}=this;return[e,t,s,n,i,r,a,o]}set(e,t,s,n,i,r,a,o){this.A=0|e,this.B=0|t,this.C=0|s,this.D=0|n,this.E=0|i,this.F=0|r,this.G=0|a,this.H=0|o}process(e,t){for(let s=0;s<16;s++,t+=4)h[s]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=h[e-15],s=h[e-2],i=(0,n.Ow)(t,7)^(0,n.Ow)(t,18)^t>>>3,r=(0,n.Ow)(s,17)^(0,n.Ow)(s,19)^s>>>10;h[e]=r+h[e-7]+i+h[e-16]|0}let{A:s,B:i,C:r,D:a,E:o,F:c,G:d,H:u}=this;for(let e=0;e<64;e++){var f,p,g,b;let t=u+((0,n.Ow)(o,6)^(0,n.Ow)(o,11)^(0,n.Ow)(o,25))+((f=o)&c^~f&d)+l[e]+h[e]|0,y=((0,n.Ow)(s,2)^(0,n.Ow)(s,13)^(0,n.Ow)(s,22))+((p=s)&(g=i)^p&(b=r)^g&b)|0;u=d,d=c,c=o,o=a+t|0,a=r,r=i,i=s,s=t+y|0}s=s+this.A|0,i=i+this.B|0,r=r+this.C|0,a=a+this.D|0,o=o+this.E|0,c=c+this.F|0,d=d+this.G|0,u=u+this.H|0,this.set(s,i,r,a,o,c,d,u)}roundClean(){(0,n.uH)(h)}destroy(){this.set(0,0,0,0,0,0,0,0),(0,n.uH)(this.buffer)}constructor(e=32){super(64,e,8,!1),this.A=0|r["0"],this.B=0|r["1"],this.C=0|r["2"],this.D=0|r["3"],this.E=0|r["4"],this.F=0|r["5"],this.G=0|r["6"],this.H=0|r["7"]}}let u=c.lD(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),f=u[0],p=u[1],g=new Uint32Array(80),b=new Uint32Array(80);class y extends i{get(){let{Ah:e,Al:t,Bh:s,Bl:n,Ch:i,Cl:r,Dh:a,Dl:o,Eh:c,El:l,Fh:h,Fl:d,Gh:u,Gl:f,Hh:p,Hl:g}=this;return[e,t,s,n,i,r,a,o,c,l,h,d,u,f,p,g]}set(e,t,s,n,i,r,a,o,c,l,h,d,u,f,p,g){this.Ah=0|e,this.Al=0|t,this.Bh=0|s,this.Bl=0|n,this.Ch=0|i,this.Cl=0|r,this.Dh=0|a,this.Dl=0|o,this.Eh=0|c,this.El=0|l,this.Fh=0|h,this.Fl=0|d,this.Gh=0|u,this.Gl=0|f,this.Hh=0|p,this.Hl=0|g}process(e,t){for(let s=0;s<16;s++,t+=4)g[s]=e.getUint32(t),b[s]=e.getUint32(t+=4);for(let e=16;e<80;e++){let t=0|g[e-15],s=0|b[e-15],n=c.rE(t,s,1)^c.rE(t,s,8)^c.xn(t,s,7),i=c.ry(t,s,1)^c.ry(t,s,8)^c.jm(t,s,7),r=0|g[e-2],a=0|b[e-2],o=c.rE(r,a,19)^c.qh(r,a,61)^c.xn(r,a,6),l=c.ry(r,a,19)^c.Ei(r,a,61)^c.jm(r,a,6),h=c.CW(i,l,b[e-7],b[e-16]),d=c.CQ(h,n,o,g[e-7],g[e-16]);g[e]=0|d,b[e]=0|h}let{Ah:s,Al:n,Bh:i,Bl:r,Ch:a,Cl:o,Dh:l,Dl:h,Eh:d,El:u,Fh:y,Fl:m,Gh:w,Gl:x,Hh:k,Hl:v}=this;for(let e=0;e<80;e++){let t=c.rE(d,u,14)^c.rE(d,u,18)^c.qh(d,u,41),E=c.ry(d,u,14)^c.ry(d,u,18)^c.Ei(d,u,41),C=d&y^~d&w,I=u&m^~u&x,A=c.F8(v,E,I,p[e],b[e]),L=c.TH(A,k,t,C,f[e],g[e]),M=0|A,S=c.rE(s,n,28)^c.qh(s,n,34)^c.qh(s,n,39),O=c.ry(s,n,28)^c.Ei(s,n,34)^c.Ei(s,n,39),D=s&i^s&a^i&a,_=n&r^n&o^r&o;k=0|w,v=0|x,w=0|y,x=0|m,y=0|d,m=0|u,({h:d,l:u}=c.WQ(0|l,0|h,0|L,0|M)),l=0|a,h=0|o,a=0|i,o=0|r,i=0|s,r=0|n;let T=c.Vl(M,O,_);s=c.Vr(T,L,S,D),n=0|T}({h:s,l:n}=c.WQ(0|this.Ah,0|this.Al,0|s,0|n)),({h:i,l:r}=c.WQ(0|this.Bh,0|this.Bl,0|i,0|r)),({h:a,l:o}=c.WQ(0|this.Ch,0|this.Cl,0|a,0|o)),({h:l,l:h}=c.WQ(0|this.Dh,0|this.Dl,0|l,0|h)),({h:d,l:u}=c.WQ(0|this.Eh,0|this.El,0|d,0|u)),({h:y,l:m}=c.WQ(0|this.Fh,0|this.Fl,0|y,0|m)),({h:w,l:x}=c.WQ(0|this.Gh,0|this.Gl,0|w,0|x)),({h:k,l:v}=c.WQ(0|this.Hh,0|this.Hl,0|k,0|v)),this.set(s,n,i,r,a,o,l,h,d,u,y,m,w,x,k,v)}roundClean(){(0,n.uH)(g,b)}destroy(){(0,n.uH)(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}constructor(e=64){super(128,e,16,!1),this.Ah=0|o["0"],this.Al=0|o["1"],this.Bh=0|o["2"],this.Bl=0|o["3"],this.Ch=0|o["4"],this.Cl=0|o["5"],this.Dh=0|o["6"],this.Dl=0|o["7"],this.Eh=0|o["8"],this.El=0|o["9"],this.Fh=0|o["10"],this.Fl=0|o["11"],this.Gh=0|o["12"],this.Gl=0|o["13"],this.Hh=0|o["14"],this.Hl=0|o["15"]}}class m extends y{constructor(){super(48),this.Ah=0|a["0"],this.Al=0|a["1"],this.Bh=0|a["2"],this.Bl=0|a["3"],this.Ch=0|a["4"],this.Cl=0|a["5"],this.Dh=0|a["6"],this.Dl=0|a["7"],this.Eh=0|a["8"],this.El=0|a["9"],this.Fh=0|a["10"],this.Fl=0|a["11"],this.Gh=0|a["12"],this.Gl=0|a["13"],this.Hh=0|a["14"],this.Hl=0|a["15"]}}let w=(0,n.qj)(()=>new d),x=(0,n.qj)(()=>new y),k=(0,n.qj)(()=>new m)},6340:function(e,t,s){"use strict";s.d(t,{sc:()=>n});let n=s(5355).sc},4588:function(e,t,s){"use strict";s.d(t,{lY:()=>x}),s(4261),s(7918),s(4953),s(2536),s(8732),s(6752),s(9016),s(1408),s(7515),s(6698),s(4169),s(8809),s(7095),s(6176),s(4189),s(1300),s(3405);var n=s(2045),i=s(515);let r=BigInt(0),a=BigInt(1),o=BigInt(2),c=BigInt(7),l=BigInt(256),h=BigInt(113),d=[],u=[],f=[];for(let e=0,t=a,s=1,n=0;e<24;e++){[s,n]=[n,(2*s+3*n)%5],d.push(2*(5*n+s)),u.push((e+1)*(e+2)/2%64);let i=r;for(let e=0;e<7;e++)(t=(t<<a^(t>>c)*h)%l)&o&&(i^=a<<(a<<BigInt(e))-a);f.push(i)}let p=(0,n.lD)(f,!0),g=p[0],b=p[1],y=(e,t,s)=>s>32?(0,n.WM)(e,t,s):(0,n.P5)(e,t,s),m=(e,t,s)=>s>32?(0,n.im)(e,t,s):(0,n.B4)(e,t,s);class w extends i.Vw{clone(){return this._cloneInto()}keccak(){(0,i.fd)(this.state32),function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24,s=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)s[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){let n=(t+8)%10,i=(t+2)%10,r=s[i],a=s[i+1],o=y(r,a,1)^s[n],c=m(r,a,1)^s[n+1];for(let s=0;s<50;s+=10)e[t+s]^=o,e[t+s+1]^=c}let t=e[2],i=e[3];for(let s=0;s<24;s++){let n=u[s],r=y(t,i,n),a=m(t,i,n),o=d[s];t=e[o],i=e[o+1],e[o]=r,e[o+1]=a}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)s[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~s[(n+2)%10]&s[(n+4)%10]}e[0]^=g[n],e[1]^=b[n]}(0,i.uH)(s)}(this.state32,this.rounds),(0,i.fd)(this.state32),this.posOut=0,this.pos=0}update(e){(0,i.CC)(this),e=(0,i.ZJ)(e),(0,i.DO)(e);let{blockLen:t,state:s}=this,n=e.length;for(let i=0;i<n;){let r=Math.min(t-this.pos,n-i);for(let t=0;t<r;t++)s[this.pos++]^=e[i++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:e,suffix:t,pos:s,blockLen:n}=this;e[s]^=t,(128&t)!=0&&s===n-1&&this.keccak(),e[n-1]^=128,this.keccak()}writeInto(e){(0,i.CC)(this,!1),(0,i.DO)(e),this.finish();let t=this.state,{blockLen:s}=this;for(let n=0,i=e.length;n<i;){this.posOut>=s&&this.keccak();let r=Math.min(s-this.posOut,i-n);e.set(t.subarray(this.posOut,this.posOut+r),n),this.posOut+=r,n+=r}return e}xofInto(e){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,i.Fe)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,i.Ht)(e,this),this.finished)throw Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,(0,i.uH)(this.state)}_cloneInto(e){let{blockLen:t,suffix:s,outputLen:n,rounds:i,enableXOF:r}=this;return e||(e=new w(t,s,n,r,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=s,e.outputLen=n,e.enableXOF=r,e.destroyed=this.destroyed,e}constructor(e,t,s,n=!1,r=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=t,this.outputLen=s,this.enableXOF=n,this.rounds=r,(0,i.Fe)(s),!(0<e&&e<200))throw Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=(0,i.DH)(this.state)}}let x=(0,i.qj)(()=>new w(136,1,32))},515:function(e,t,s){"use strict";s.d(t,{DH:()=>h,po:()=>C,sd:()=>o,Ht:()=>l,O8:()=>u,uH:()=>d,Vw:()=>v,qj:()=>E,aT:()=>w,aY:()=>i,Ow:()=>f,DO:()=>a,My:()=>y,fd:()=>p,ZJ:()=>x,Fe:()=>r,CC:()=>c,Id:()=>k}),s(4953),s(2536),s(8732),s(3405),s(9016),s(1408),s(7515),s(6698),s(4169),s(8809),s(7095),s(6176),s(4189),s(1300),s(1747),s(6752),s(5237),s(9166);let n="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0;function i(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function r(e){if(!Number.isSafeInteger(e)||e<0)throw Error("positive integer expected, got "+e)}function a(e){for(var t=arguments.length,s=Array(t>1?t-1:0),n=1;n<t;n++)s[n-1]=arguments[n];if(!i(e))throw Error("Uint8Array expected");if(s.length>0&&!s.includes(e.length))throw Error("Uint8Array expected of length "+s+", got length="+e.length)}function o(e){if("function"!=typeof e||"function"!=typeof e.create)throw Error("Hash should be wrapped by utils.createHasher");r(e.outputLen),r(e.blockLen)}function c(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}function l(e,t){a(e);let s=t.outputLen;if(e.length<s)throw Error("digestInto() expects output buffer of length at least "+s)}function h(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function d(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];for(let e=0;e<t.length;e++)t[e].fill(0)}function u(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function f(e,t){return e<<32-t|e>>>t}let p=68===new Uint8Array(new Uint32Array([0x11223344]).buffer)[0]?e=>e:function(e){for(let s=0;s<e.length;s++){var t;e[s]=(t=e[s])<<24&0xff000000|t<<8&0xff0000|t>>>8&65280|t>>>24&255}return e},g="function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex,b=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function y(e){if(a(e),g)return e.toHex();let t="";for(let s=0;s<e.length;s++)t+=b[e[s]];return t}function m(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:void 0}function w(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);if(g)return Uint8Array.fromHex(e);let t=e.length,s=t/2;if(t%2)throw Error("hex string expected, got unpadded hex of length "+t);let n=new Uint8Array(s);for(let t=0,i=0;t<s;t++,i+=2){let s=m(e.charCodeAt(i)),r=m(e.charCodeAt(i+1));if(void 0===s||void 0===r)throw Error('hex string expected, got non-hex character "'+(e[i]+e[i+1])+'" at index '+i);n[t]=16*s+r}return n}function x(e){return"string"==typeof e&&(e=function(e){if("string"!=typeof e)throw Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}(e)),a(e),e}function k(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];let n=0;for(let e=0;e<t.length;e++){let s=t[e];a(s),n+=s.length}let i=new Uint8Array(n);for(let e=0,s=0;e<t.length;e++){let n=t[e];i.set(n,s),s+=n.length}return i}class v{}function E(e){let t=t=>e().update(x(t)).digest(),s=e();return t.outputLen=s.outputLen,t.blockLen=s.blockLen,t.create=()=>e(),t}function C(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:32;if(n&&"function"==typeof n.getRandomValues)return n.getRandomValues(new Uint8Array(e));if(n&&"function"==typeof n.randomBytes)return Uint8Array.from(n.randomBytes(e));throw Error("crypto.getRandomValues must be defined")}}}]);
|
package/dist/query-core-vendors_clerk.legacy.browser_6e74bb_6.0.0-snapshot.v20251218183643.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_clerk_clerk_js=globalThis.webpackChunk_clerk_clerk_js||[]).push([["662"],{3084:function(t,e,i){let s,n,r,a,l,o;function u(t,e,i){if(!e.has(t))throw TypeError("attempted to "+i+" private field on non-instance");return e.get(t)}function h(t,e){var i=u(t,e,"get");return i.get?i.get.call(t):i.value}function c(t,e,i){if(e.has(t))throw TypeError("Cannot initialize the same private elements twice on an object");e.set(t,i)}i.d(e,{E:()=>t4}),i(4261),i(9166),i(9091),i(8593),i(4784),i(6178),i(9116),i(6969),i(3272),i(1300);var d,f,p,y,w,g,m,b,O,E,T,M,P,k,S,C,F,A,q,j,D,W,Q,R,x,U,I,K,_,H,L,G,z,N={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},B=new(d=new WeakMap,f=new WeakMap,class{setTimeoutProvider(t){var e=this,i=d,s=t,n=u(e,i,"set");if(n.set)n.set.call(e,s);else{if(!n.writable)throw TypeError("attempted to set read only private field");n.value=s}}setTimeout(t,e){return h(this,d).setTimeout(t,e)}clearTimeout(t){h(this,d).clearTimeout(t)}setInterval(t,e){return h(this,d).setInterval(t,e)}clearInterval(t){h(this,d).clearInterval(t)}constructor(){c(this,d,{writable:!0,value:N}),c(this,f,{writable:!0,value:!1})}}),J="undefined"==typeof window||"Deno"in globalThis;function V(){}function X(t,e){return"function"==typeof t?t(e):t}function Y(t,e){let{type:i="all",exact:s,fetchStatus:n,predicate:r,queryKey:a,stale:l}=t;if(a){if(s){if(e.queryHash!==$(a,e.options))return!1}else if(!te(e.queryKey,a))return!1}if("all"!==i){let t=e.isActive();if("active"===i&&!t||"inactive"===i&&t)return!1}return("boolean"!=typeof l||e.isStale()===l)&&(!n||n===e.state.fetchStatus)&&(!r||!!r(e))}function Z(t,e){let{exact:i,status:s,predicate:n,mutationKey:r}=t;if(r){if(!e.options.mutationKey)return!1;if(i){if(tt(e.options.mutationKey)!==tt(r))return!1}else if(!te(e.options.mutationKey,r))return!1}return(!s||e.state.status===s)&&(!n||!!n(e))}function $(t,e){return((null==e?void 0:e.queryKeyHashFn)||tt)(t)}function tt(t){return JSON.stringify(t,(t,e)=>tn(e)?Object.keys(e).sort().reduce((t,i)=>(t[i]=e[i],t),{}):e)}function te(t,e){return t===e||typeof t==typeof e&&!!t&&!!e&&"object"==typeof t&&"object"==typeof e&&Object.keys(e).every(i=>te(t[i],e[i]))}var ti=Object.prototype.hasOwnProperty;function ts(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function tn(t){if(!tr(t))return!1;let e=t.constructor;if(void 0===e)return!0;let i=e.prototype;return!!tr(i)&&!!i.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(t)===Object.prototype}function tr(t){return"[object Object]"===Object.prototype.toString.call(t)}function ta(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=[...t,e];return i&&s.length>i?s.slice(1):s}function tl(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=[e,...t];return i&&s.length>i?s.slice(0,-1):s}var to=Symbol();function tu(t,e){return!t.queryFn&&(null==e?void 0:e.initialPromise)?()=>e.initialPromise:t.queryFn&&t.queryFn!==to?t.queryFn:()=>Promise.reject(Error("Missing queryFn: '".concat(t.queryHash,"'")))}i(200),i(3775),i(1747),i(7918);var th=(s=[],n=0,r=t=>{t()},a=t=>{t()},l=function(t){setTimeout(t,0)},{batch:t=>{let e;n++;try{e=t()}finally{let t;--n||(t=s,s=[],t.length&&l(()=>{a(()=>{t.forEach(t=>{r(t)})})}))}return e},batchCalls:t=>function(){for(var e=arguments.length,i=Array(e),s=0;s<e;s++)i[s]=arguments[s];o(()=>{t(...i)})},schedule:o=t=>{n?s.push(t):l(()=>{r(t)})},setNotifyFunction:t=>{r=t},setBatchNotifyFunction:t=>{a=t},setScheduler:t=>{l=t}});i(574),i(5992),i(8385),i(5208),i(2935),i(9356),i(5702);var tc=class{subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}};function td(t,e,i){if(!e.has(t))throw TypeError("attempted to "+i+" private field on non-instance");return e.get(t)}function tf(t,e){var i=td(t,e,"get");return i.get?i.get.call(t):i.value}function tp(t,e,i){if(e.has(t))throw TypeError("Cannot initialize the same private elements twice on an object");e.set(t,i)}function tv(t,e,i){var s=td(t,e,"set");if(s.set)s.set.call(t,i);else{if(!s.writable)throw TypeError("attempted to set read only private field");s.value=i}return i}var ty=new(p=new WeakMap,y=new WeakMap,w=new WeakMap,class extends tc{onSubscribe(){tf(this,y)||this.setEventListener(tf(this,w))}onUnsubscribe(){var t;this.hasListeners()||(null==(t=tf(this,y))||t.call(this),tv(this,y,void 0))}setEventListener(t){var e;tv(this,w,t),null==(e=tf(this,y))||e.call(this),tv(this,y,t(t=>{"boolean"==typeof t?this.setFocused(t):this.onFocus()}))}setFocused(t){tf(this,p)!==t&&(tv(this,p,t),this.onFocus())}onFocus(){let t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){var t;return"boolean"==typeof tf(this,p)?tf(this,p):(null==(t=globalThis.document)?void 0:t.visibilityState)!=="hidden"}constructor(){super(),tp(this,p,{writable:!0,value:void 0}),tp(this,y,{writable:!0,value:void 0}),tp(this,w,{writable:!0,value:void 0}),tv(this,w,t=>{if(!J&&window.addEventListener){let e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}})}});function tw(t,e,i){if(!e.has(t))throw TypeError("attempted to "+i+" private field on non-instance");return e.get(t)}function tg(t,e){var i=tw(t,e,"get");return i.get?i.get.call(t):i.value}function tm(t,e,i){if(e.has(t))throw TypeError("Cannot initialize the same private elements twice on an object");e.set(t,i)}function tb(t,e,i){var s=tw(t,e,"set");if(s.set)s.set.call(t,i);else{if(!s.writable)throw TypeError("attempted to set read only private field");s.value=i}return i}var tO=new(g=new WeakMap,m=new WeakMap,b=new WeakMap,class extends tc{onSubscribe(){tg(this,m)||this.setEventListener(tg(this,b))}onUnsubscribe(){var t;this.hasListeners()||(null==(t=tg(this,m))||t.call(this),tb(this,m,void 0))}setEventListener(t){var e;tb(this,b,t),null==(e=tg(this,m))||e.call(this),tb(this,m,t(this.setOnline.bind(this)))}setOnline(t){tg(this,g)!==t&&(tb(this,g,t),this.listeners.forEach(e=>{e(t)}))}isOnline(){return tg(this,g)}constructor(){super(),tm(this,g,{writable:!0,value:!0}),tm(this,m,{writable:!0,value:void 0}),tm(this,b,{writable:!0,value:void 0}),tb(this,b,t=>{if(!J&&window.addEventListener){let e=()=>t(!0),i=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",i)}}})}});function tE(t){return Math.min(1e3*2**t,3e4)}function tT(t){return(null!=t?t:"online")!=="online"||tO.isOnline()}var tM=class extends Error{constructor(t){super("CancelledError"),this.revert=null==t?void 0:t.revert,this.silent=null==t?void 0:t.silent}};function tP(t){let e,i=!1,s=0,n=function(){let t,e,i=new Promise((i,s)=>{t=i,e=s});function s(t){Object.assign(i,t),delete i.resolve,delete i.reject}return i.status="pending",i.catch(()=>{}),i.resolve=e=>{s({status:"fulfilled",value:e}),t(e)},i.reject=t=>{s({status:"rejected",reason:t}),e(t)},i}(),r=()=>ty.isFocused()&&("always"===t.networkMode||tO.isOnline())&&t.canRun(),a=()=>tT(t.networkMode)&&t.canRun(),l=t=>{"pending"===n.status&&(null==e||e(),n.resolve(t))},o=t=>{"pending"===n.status&&(null==e||e(),n.reject(t))},u=()=>new Promise(i=>{var s;e=t=>{("pending"!==n.status||r())&&i(t)},null==(s=t.onPause)||s.call(t)}).then(()=>{if(e=void 0,"pending"===n.status){var i;null==(i=t.onContinue)||i.call(t)}}),h=()=>{let e;if("pending"!==n.status)return;let a=0===s?t.initialPromise:void 0;try{e=null!=a?a:t.fn()}catch(t){e=Promise.reject(t)}Promise.resolve(e).then(l).catch(e=>{var a,l,c;if("pending"!==n.status)return;let d=null!=(l=t.retry)?l:3*!J,f=null!=(c=t.retryDelay)?c:tE,p="function"==typeof f?f(s,e):f,y=!0===d||"number"==typeof d&&s<d||"function"==typeof d&&d(s,e);i||!y?o(e):(s++,null==(a=t.onFail)||a.call(t,s,e),new Promise(t=>{B.setTimeout(t,p)}).then(()=>r()?void 0:u()).then(()=>{i?o(e):h()}))})};return{promise:n,status:()=>n.status,cancel:e=>{if("pending"===n.status){var i;let s=new tM(e);o(s),null==(i=t.onCancel)||i.call(t,s)}},continue:()=>(null==e||e(),n),cancelRetry:()=>{i=!0},continueRetry:()=>{i=!1},canStart:a,start:()=>(a()?h():u().then(h),n)}}function tk(t,e,i){if(!e.has(t))throw TypeError("attempted to "+i+" private field on non-instance");return e.get(t)}function tS(t,e){var i=tk(t,e,"get");return i.get?i.get.call(t):i.value}function tC(t,e,i){var s=tk(t,e,"set");if(s.set)s.set.call(t,i);else{if(!s.writable)throw TypeError("attempted to set read only private field");s.value=i}return i}var tF=(O=new WeakMap,class{destroy(){this.clearGcTimeout()}scheduleGc(){var t;this.clearGcTimeout(),"number"==typeof(t=this.gcTime)&&t>=0&&t!==1/0&&tC(this,O,B.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,null!=t?t:J?1/0:3e5)}clearGcTimeout(){tS(this,O)&&(B.clearTimeout(tS(this,O)),tC(this,O,void 0))}constructor(){!function(t,e,i){if(e.has(t))throw TypeError("Cannot initialize the same private elements twice on an object");e.set(t,i)}(this,O,{writable:!0,value:void 0})}});function tA(t,e){if(e.has(t))throw TypeError("Cannot initialize the same private elements twice on an object")}function tq(t,e,i){if(!e.has(t))throw TypeError("attempted to "+i+" private field on non-instance");return e.get(t)}function tj(t,e){var i=tq(t,e,"get");return i.get?i.get.call(t):i.value}function tD(t,e,i){tA(t,e),e.set(t,i)}function tW(t,e,i){var s=tq(t,e,"set");if(s.set)s.set.call(t,i);else{if(!s.writable)throw TypeError("attempted to set read only private field");s.value=i}return i}function tQ(t,e,i){if(!e.has(t))throw TypeError("attempted to get private field on non-instance");return i}var tR=(E=new WeakMap,T=new WeakMap,M=new WeakMap,P=new WeakMap,k=new WeakMap,S=new WeakMap,C=new WeakMap,F=new WeakSet,class extends tF{get meta(){return this.options.meta}get promise(){var t;return null==(t=tj(this,k))?void 0:t.promise}setOptions(t){if(this.options={...tj(this,S),...t},this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){let t=tx(this.options);void 0!==t.data&&(this.setData(t.data,{updatedAt:t.dataUpdatedAt,manual:!0}),tW(this,E,t))}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||tj(this,M).remove(this)}setData(t,e){var i,s;let n=(i=this.state.data,"function"==typeof(s=this.options).structuralSharing?s.structuralSharing(i,t):!1!==s.structuralSharing?function t(e,i){if(e===i)return e;let s=ts(e)&&ts(i);if(!s&&!(tn(e)&&tn(i)))return i;let n=(s?e:Object.keys(e)).length,r=s?i:Object.keys(i),a=r.length,l=s?Array(a):{},o=0;for(let u=0;u<a;u++){let a=s?u:r[u],h=e[a],c=i[a];if(h===c){l[a]=h,(s?u<n:ti.call(e,a))&&o++;continue}if(null===h||null===c||"object"!=typeof h||"object"!=typeof c){l[a]=c;continue}let d=t(h,c);l[a]=d,d===h&&o++}return n===a&&o===n?e:l}(i,t):t);return tQ(this,F,tU).call(this,{data:n,type:"success",dataUpdatedAt:null==e?void 0:e.updatedAt,manual:null==e?void 0:e.manual}),n}setState(t,e){tQ(this,F,tU).call(this,{type:"setState",state:t,setStateOptions:e})}cancel(t){var e,i;let s=null==(e=tj(this,k))?void 0:e.promise;return null==(i=tj(this,k))||i.cancel(t),s?s.then(V).catch(V):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(tj(this,E))}isActive(){return this.observers.some(t=>{var e;return!1!==(e=t.options.enabled,"function"==typeof e?e(this):e)})}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===to||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0&&this.observers.some(t=>"static"===X(t.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return void 0===this.state.data||"static"!==t&&(!!this.state.isInvalidated||!Math.max(this.state.dataUpdatedAt+(t||0)-Date.now(),0))}onFocus(){var t;let e=this.observers.find(t=>t.shouldFetchOnWindowFocus());null==e||e.refetch({cancelRefetch:!1}),null==(t=tj(this,k))||t.continue()}onOnline(){var t;let e=this.observers.find(t=>t.shouldFetchOnReconnect());null==e||e.refetch({cancelRefetch:!1}),null==(t=tj(this,k))||t.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),tj(this,M).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),this.observers.length||(tj(this,k)&&(tj(this,C)?tj(this,k).cancel({revert:!0}):tj(this,k).cancelRetry()),this.scheduleGc()),tj(this,M).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||tQ(this,F,tU).call(this,{type:"invalidate"})}async fetch(t,e){var i,s,n,r,a,l,o,u,h,c,d,f;let p;if("idle"!==this.state.fetchStatus&&(null==(i=tj(this,k))?void 0:i.status())!=="rejected"){if(void 0!==this.state.data&&(null==e?void 0:e.cancelRefetch))this.cancel({silent:!0});else if(tj(this,k))return tj(this,k).continueRetry(),tj(this,k).promise}if(t&&this.setOptions(t),!this.options.queryFn){let t=this.observers.find(t=>t.options.queryFn);t&&this.setOptions(t.options)}let y=new AbortController,w=t=>{Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(tW(this,C,!0),y.signal)})},g=()=>{let t,i=tu(this.options,e),s=(w(t={client:tj(this,P),queryKey:this.queryKey,meta:this.meta}),t);return(tW(this,C,!1),this.options.persister)?this.options.persister(i,s,this):i(s)},m=(w(p={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:tj(this,P),state:this.state,fetchFn:g}),p);null==(s=this.options.behavior)||s.onFetch(m,this),tW(this,T,this.state),("idle"===this.state.fetchStatus||this.state.fetchMeta!==(null==(n=m.fetchOptions)?void 0:n.meta))&&tQ(this,F,tU).call(this,{type:"fetch",meta:null==(r=m.fetchOptions)?void 0:r.meta}),tW(this,k,tP({initialPromise:null==e?void 0:e.initialPromise,fn:m.fetchFn,onCancel:t=>{t instanceof tM&&t.revert&&this.setState({...tj(this,T),fetchStatus:"idle"}),y.abort()},onFail:(t,e)=>{tQ(this,F,tU).call(this,{type:"failed",failureCount:t,error:e})},onPause:()=>{tQ(this,F,tU).call(this,{type:"pause"})},onContinue:()=>{tQ(this,F,tU).call(this,{type:"continue"})},retry:m.options.retry,retryDelay:m.options.retryDelay,networkMode:m.options.networkMode,canRun:()=>!0}));try{let t=await tj(this,k).start();if(void 0===t)throw Error("".concat(this.queryHash," data is undefined"));return this.setData(t),null==(a=(l=tj(this,M).config).onSuccess)||a.call(l,t,this),null==(o=(u=tj(this,M).config).onSettled)||o.call(u,t,this.state.error,this),t}catch(t){if(t instanceof tM){if(t.silent)return tj(this,k).promise;else if(t.revert){if(void 0===this.state.data)throw t;return this.state.data}}throw tQ(this,F,tU).call(this,{type:"error",error:t}),null==(h=(c=tj(this,M).config).onError)||h.call(c,t,this),null==(d=(f=tj(this,M).config).onSettled)||d.call(f,this.state.data,t,this),t}finally{this.scheduleGc()}}constructor(t){var e;super(),function(t,e){tA(t,e),e.add(t)}(this,F),tD(this,E,{writable:!0,value:void 0}),tD(this,T,{writable:!0,value:void 0}),tD(this,M,{writable:!0,value:void 0}),tD(this,P,{writable:!0,value:void 0}),tD(this,k,{writable:!0,value:void 0}),tD(this,S,{writable:!0,value:void 0}),tD(this,C,{writable:!0,value:void 0}),tW(this,C,!1),tW(this,S,t.defaultOptions),this.setOptions(t.options),this.observers=[],tW(this,P,t.client),tW(this,M,tj(this,P).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,tW(this,E,tx(this.options)),this.state=null!=(e=t.state)?e:tj(this,E),this.scheduleGc()}});function tx(t){let e="function"==typeof t.initialData?t.initialData():t.initialData,i=void 0!==e,s=i?"function"==typeof t.initialDataUpdatedAt?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:i?null!=s?s:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}function tU(t){let e=e=>{var i,s,n;switch(t.type){case"failed":return{...e,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...e,fetchStatus:"paused"};case"continue":return{...e,fetchStatus:"fetching"};case"fetch":return{...e,...(n=e.data,{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:tT(this.options.networkMode)?"fetching":"paused",...void 0===n&&{error:null,status:"pending"}}),fetchMeta:null!=(i=t.meta)?i:null};case"success":let r={...e,data:t.data,dataUpdateCount:e.dataUpdateCount+1,dataUpdatedAt:null!=(s=t.dataUpdatedAt)?s:Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return tW(this,T,t.manual?r:void 0),r;case"error":let a=t.error;return{...e,error:a,errorUpdateCount:e.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:e.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...e,isInvalidated:!0};case"setState":return{...e,...t.state}}};this.state=e(this.state),th.batch(()=>{this.observers.forEach(t=>{t.onQueryUpdate()}),tj(this,M).notify({query:this,type:"updated",action:t})})}function tI(t,e,i){if(!e.has(t))throw TypeError("attempted to "+i+" private field on non-instance");return e.get(t)}function tK(t,e){var i=tI(t,e,"get");return i.get?i.get.call(t):i.value}var t_=(A=new WeakMap,class extends tc{build(t,e,i){var s;let n=e.queryKey,r=null!=(s=e.queryHash)?s:$(n,e),a=this.get(r);return a||(a=new tR({client:t,queryKey:n,queryHash:r,options:t.defaultQueryOptions(e),state:i,defaultOptions:t.getQueryDefaults(n)}),this.add(a)),a}add(t){tK(this,A).has(t.queryHash)||(tK(this,A).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){let e=tK(this,A).get(t.queryHash);e&&(t.destroy(),e===t&&tK(this,A).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){th.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return tK(this,A).get(t)}getAll(){return[...tK(this,A).values()]}find(t){let e={exact:!0,...t};return this.getAll().find(t=>Y(e,t))}findAll(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.getAll();return Object.keys(t).length>0?e.filter(e=>Y(t,e)):e}notify(t){th.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){th.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){th.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}constructor(t={}){super(),function(t,e,i){if(e.has(t))throw TypeError("Cannot initialize the same private elements twice on an object");e.set(t,i)}(this,A,{writable:!0,value:void 0}),this.config=t,function(t,e,i){var s=tI(t,e,"set");if(s.set)s.set.call(t,i);else{if(!s.writable)throw TypeError("attempted to set read only private field");s.value=i}}(this,A,new Map)}});function tH(t,e){if(e.has(t))throw TypeError("Cannot initialize the same private elements twice on an object")}function tL(t,e,i){if(!e.has(t))throw TypeError("attempted to "+i+" private field on non-instance");return e.get(t)}function tG(t,e){var i=tL(t,e,"get");return i.get?i.get.call(t):i.value}function tz(t,e,i){tH(t,e),e.set(t,i)}function tN(t,e,i){var s=tL(t,e,"set");if(s.set)s.set.call(t,i);else{if(!s.writable)throw TypeError("attempted to set read only private field");s.value=i}return i}function tB(t,e,i){if(!e.has(t))throw TypeError("attempted to get private field on non-instance");return i}var tJ=(q=new WeakMap,j=new WeakMap,D=new WeakMap,W=new WeakSet,class extends tF{setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){tG(this,q).includes(t)||(tG(this,q).push(t),this.clearGcTimeout(),tG(this,j).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){tN(this,q,tG(this,q).filter(e=>e!==t)),this.scheduleGc(),tG(this,j).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){tG(this,q).length||("pending"===this.state.status?this.scheduleGc():tG(this,j).remove(this))}continue(){var t,e;return null!=(e=null==(t=tG(this,D))?void 0:t.continue())?e:this.execute(this.state.variables)}async execute(t){var e,i,s,n,r,a,l,o,u,h,c,d,f,p,y,w,g,m,b,O,E;let T=()=>{tB(this,W,tV).call(this,{type:"continue"})};tN(this,D,tP({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(Error("No mutationFn found")),onFail:(t,e)=>{tB(this,W,tV).call(this,{type:"failed",failureCount:t,error:e})},onPause:()=>{tB(this,W,tV).call(this,{type:"pause"})},onContinue:T,retry:null!=(e=this.options.retry)?e:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>tG(this,j).canRun(this)}));let M="pending"===this.state.status,P=!tG(this,D).canStart();try{if(M)T();else{tB(this,W,tV).call(this,{type:"pending",variables:t,isPaused:P}),await (null==(h=(c=tG(this,j).config).onMutate)?void 0:h.call(c,t,this));let e=await (null==(d=(f=this.options).onMutate)?void 0:d.call(f,t));e!==this.state.context&&tB(this,W,tV).call(this,{type:"pending",context:e,variables:t,isPaused:P})}let e=await tG(this,D).start();return await (null==(i=(s=tG(this,j).config).onSuccess)?void 0:i.call(s,e,t,this.state.context,this)),await (null==(n=(r=this.options).onSuccess)?void 0:n.call(r,e,t,this.state.context)),await (null==(a=(l=tG(this,j).config).onSettled)?void 0:a.call(l,e,null,this.state.variables,this.state.context,this)),await (null==(o=(u=this.options).onSettled)?void 0:o.call(u,e,null,t,this.state.context)),tB(this,W,tV).call(this,{type:"success",data:e}),e}catch(e){try{throw await (null==(p=(y=tG(this,j).config).onError)?void 0:p.call(y,e,t,this.state.context,this)),await (null==(w=(g=this.options).onError)?void 0:w.call(g,e,t,this.state.context)),await (null==(m=(b=tG(this,j).config).onSettled)?void 0:m.call(b,void 0,e,this.state.variables,this.state.context,this)),await (null==(O=(E=this.options).onSettled)?void 0:O.call(E,void 0,e,t,this.state.context)),e}finally{tB(this,W,tV).call(this,{type:"error",error:e})}}finally{tG(this,j).runNext(this)}}constructor(t){super(),function(t,e){tH(t,e),e.add(t)}(this,W),tz(this,q,{writable:!0,value:void 0}),tz(this,j,{writable:!0,value:void 0}),tz(this,D,{writable:!0,value:void 0}),this.mutationId=t.mutationId,tN(this,j,t.mutationCache),tN(this,q,[]),this.state=t.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(t.options),this.scheduleGc()}});function tV(t){this.state=(e=>{switch(t.type){case"failed":return{...e,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...e,isPaused:!0};case"continue":return{...e,isPaused:!1};case"pending":return{...e,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...e,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...e,data:void 0,error:t.error,failureCount:e.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}})(this.state),th.batch(()=>{tG(this,q).forEach(e=>{e.onMutationUpdate(t)}),tG(this,j).notify({mutation:this,type:"updated",action:t})})}function tX(t,e,i){if(!e.has(t))throw TypeError("attempted to "+i+" private field on non-instance");return e.get(t)}function tY(t,e){var i=tX(t,e,"get");return i.get?i.get.call(t):i.value}function tZ(t,e,i){if(e.has(t))throw TypeError("Cannot initialize the same private elements twice on an object");e.set(t,i)}function t$(t,e,i){var s=tX(t,e,"set");if(s.set)s.set.call(t,i);else{if(!s.writable)throw TypeError("attempted to set read only private field");s.value=i}return i}var t0=(Q=new WeakMap,R=new WeakMap,x=new WeakMap,class extends tc{build(t,e,i){let s=new tJ({mutationCache:this,mutationId:++function(t,e){var i=tX(t,e,"update");if(i.set){if(!i.get)throw TypeError("attempted to read set only private field");return"__destrWrapper"in i||(i.__destrWrapper={set value(v){i.set.call(t,v)},get value(){return i.get.call(t)}}),i.__destrWrapper}if(!i.writable)throw TypeError("attempted to set read only private field");return i}(this,x).value,options:t.defaultMutationOptions(e),state:i});return this.add(s),s}add(t){tY(this,Q).add(t);let e=t1(t);if("string"==typeof e){let i=tY(this,R).get(e);i?i.push(t):tY(this,R).set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(tY(this,Q).delete(t)){let e=t1(t);if("string"==typeof e){let i=tY(this,R).get(e);if(i)if(i.length>1){let e=i.indexOf(t);-1!==e&&i.splice(e,1)}else i[0]===t&&tY(this,R).delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){let e=t1(t);if("string"!=typeof e)return!0;{let i=tY(this,R).get(e),s=null==i?void 0:i.find(t=>"pending"===t.state.status);return!s||s===t}}runNext(t){let e=t1(t);if("string"!=typeof e)return Promise.resolve();{var i,s;let n=null==(i=tY(this,R).get(e))?void 0:i.find(e=>e!==t&&e.state.isPaused);return null!=(s=null==n?void 0:n.continue())?s:Promise.resolve()}}clear(){th.batch(()=>{tY(this,Q).forEach(t=>{this.notify({type:"removed",mutation:t})}),tY(this,Q).clear(),tY(this,R).clear()})}getAll(){return Array.from(tY(this,Q))}find(t){let e={exact:!0,...t};return this.getAll().find(t=>Z(e,t))}findAll(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.getAll().filter(e=>Z(t,e))}notify(t){th.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){let t=this.getAll().filter(t=>t.state.isPaused);return th.batch(()=>Promise.all(t.map(t=>t.continue().catch(V))))}constructor(t={}){super(),tZ(this,Q,{writable:!0,value:void 0}),tZ(this,R,{writable:!0,value:void 0}),tZ(this,x,{writable:!0,value:void 0}),this.config=t,t$(this,Q,new Set),t$(this,R,new Map),t$(this,x,0)}});function t1(t){var e;return null==(e=t.options.scope)?void 0:e.id}function t2(t){return{onFetch:(e,i)=>{var s,n,r,a,l;let o=e.options,u=null==(r=e.fetchOptions)||null==(n=r.meta)||null==(s=n.fetchMore)?void 0:s.direction,h=(null==(a=e.state.data)?void 0:a.pages)||[],c=(null==(l=e.state.data)?void 0:l.pageParams)||[],d={pages:[],pageParams:[]},f=0,p=async()=>{let i=!1,s=tu(e.options,e.fetchOptions),n=async(t,n,r)=>{let a;if(i)return Promise.reject();if(null==n&&t.pages.length)return Promise.resolve(t);let l=(Object.defineProperty(a={client:e.client,queryKey:e.queryKey,pageParam:n,direction:r?"backward":"forward",meta:e.options.meta},"signal",{enumerable:!0,get:()=>(e.signal.aborted?i=!0:e.signal.addEventListener("abort",()=>{i=!0}),e.signal)}),a),o=await s(l),{maxPages:u}=e.options,h=r?tl:ta;return{pages:h(t.pages,o,u),pageParams:h(t.pageParams,n,u)}};if(u&&h.length){let t="backward"===u,e={pages:h,pageParams:c},i=(t?function(t,e){var i;let{pages:s,pageParams:n}=e;return s.length>0?null==(i=t.getPreviousPageParam)?void 0:i.call(t,s[0],s,n[0],n):void 0}:t3)(o,e);d=await n(e,i,t)}else{let e=null!=t?t:h.length;do{var r;let t=0===f?null!=(r=c[0])?r:o.initialPageParam:t3(o,d);if(f>0&&null==t)break;d=await n(d,t),f++}while(f<e)}return d};e.options.persister?e.fetchFn=()=>{var t,s;return null==(t=(s=e.options).persister)?void 0:t.call(s,p,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},i)}:e.fetchFn=p}}}function t3(t,e){let{pages:i,pageParams:s}=e,n=i.length-1;return i.length>0?t.getNextPageParam(i[n],i,s[n],s):void 0}function t9(t,e,i){if(!e.has(t))throw TypeError("attempted to "+i+" private field on non-instance");return e.get(t)}function t5(t,e){var i=t9(t,e,"get");return i.get?i.get.call(t):i.value}function t6(t,e,i){if(e.has(t))throw TypeError("Cannot initialize the same private elements twice on an object");e.set(t,i)}function t7(t,e,i){var s=t9(t,e,"set");if(s.set)s.set.call(t,i);else{if(!s.writable)throw TypeError("attempted to set read only private field");s.value=i}return i}function t8(t,e){var i=t9(t,e,"update");if(i.set){if(!i.get)throw TypeError("attempted to read set only private field");return"__destrWrapper"in i||(i.__destrWrapper={set value(v){i.set.call(t,v)},get value(){return i.get.call(t)}}),i.__destrWrapper}if(!i.writable)throw TypeError("attempted to set read only private field");return i}var t4=(U=new WeakMap,I=new WeakMap,K=new WeakMap,_=new WeakMap,H=new WeakMap,L=new WeakMap,G=new WeakMap,z=new WeakMap,class{mount(){t8(this,L).value++,1===t5(this,L)&&(t7(this,G,ty.subscribe(async t=>{t&&(await this.resumePausedMutations(),t5(this,U).onFocus())})),t7(this,z,tO.subscribe(async t=>{t&&(await this.resumePausedMutations(),t5(this,U).onOnline())})))}unmount(){var t,e;t8(this,L).value--,0===t5(this,L)&&(null==(t=t5(this,G))||t.call(this),t7(this,G,void 0),null==(e=t5(this,z))||e.call(this),t7(this,z,void 0))}isFetching(t){return t5(this,U).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return t5(this,I).findAll({...t,status:"pending"}).length}getQueryData(t){var e;let i=this.defaultQueryOptions({queryKey:t});return null==(e=t5(this,U).get(i.queryHash))?void 0:e.state.data}ensureQueryData(t){let e=this.defaultQueryOptions(t),i=t5(this,U).build(this,e),s=i.state.data;return void 0===s?this.fetchQuery(t):(t.revalidateIfStale&&i.isStaleByTime(X(e.staleTime,i))&&this.prefetchQuery(e),Promise.resolve(s))}getQueriesData(t){return t5(this,U).findAll(t).map(t=>{let{queryKey:e,state:i}=t;return[e,i.data]})}setQueryData(t,e,i){let s=this.defaultQueryOptions({queryKey:t}),n=t5(this,U).get(s.queryHash),r=null==n?void 0:n.state.data,a="function"==typeof e?e(r):e;if(void 0!==a)return t5(this,U).build(this,s).setData(a,{...i,manual:!0})}setQueriesData(t,e,i){return th.batch(()=>t5(this,U).findAll(t).map(t=>{let{queryKey:s}=t;return[s,this.setQueryData(s,e,i)]}))}getQueryState(t){var e;let i=this.defaultQueryOptions({queryKey:t});return null==(e=t5(this,U).get(i.queryHash))?void 0:e.state}removeQueries(t){let e=t5(this,U);th.batch(()=>{e.findAll(t).forEach(t=>{e.remove(t)})})}resetQueries(t,e){let i=t5(this,U);return th.batch(()=>(i.findAll(t).forEach(t=>{t.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i={revert:!0,...e};return Promise.all(th.batch(()=>t5(this,U).findAll(t).map(t=>t.cancel(i)))).then(V).catch(V)}invalidateQueries(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return th.batch(()=>{var i,s;return(t5(this,U).findAll(t).forEach(t=>{t.invalidate()}),(null==t?void 0:t.refetchType)==="none")?Promise.resolve():this.refetchQueries({...t,type:null!=(s=null!=(i=null==t?void 0:t.refetchType)?i:null==t?void 0:t.type)?s:"active"},e)})}refetchQueries(t){var e;let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s={...i,cancelRefetch:null==(e=i.cancelRefetch)||e};return Promise.all(th.batch(()=>t5(this,U).findAll(t).filter(t=>!t.isDisabled()&&!t.isStatic()).map(t=>{let e=t.fetch(void 0,s);return s.throwOnError||(e=e.catch(V)),"paused"===t.state.fetchStatus?Promise.resolve():e}))).then(V)}fetchQuery(t){let e=this.defaultQueryOptions(t);void 0===e.retry&&(e.retry=!1);let i=t5(this,U).build(this,e);return i.isStaleByTime(X(e.staleTime,i))?i.fetch(e):Promise.resolve(i.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(V).catch(V)}fetchInfiniteQuery(t){return t.behavior=t2(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(V).catch(V)}ensureInfiniteQueryData(t){return t.behavior=t2(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return tO.isOnline()?t5(this,I).resumePausedMutations():Promise.resolve()}getQueryCache(){return t5(this,U)}getMutationCache(){return t5(this,I)}getDefaultOptions(){return t5(this,K)}setDefaultOptions(t){t7(this,K,t)}setQueryDefaults(t,e){t5(this,_).set(tt(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){let e=[...t5(this,_).values()],i={};return e.forEach(e=>{te(t,e.queryKey)&&Object.assign(i,e.defaultOptions)}),i}setMutationDefaults(t,e){t5(this,H).set(tt(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){let e=[...t5(this,H).values()],i={};return e.forEach(e=>{te(t,e.mutationKey)&&Object.assign(i,e.defaultOptions)}),i}defaultQueryOptions(t){if(t._defaulted)return t;let e={...t5(this,K).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=$(e.queryKey,e)),void 0===e.refetchOnReconnect&&(e.refetchOnReconnect="always"!==e.networkMode),void 0===e.throwOnError&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===to&&(e.enabled=!1),e}defaultMutationOptions(t){return(null==t?void 0:t._defaulted)?t:{...t5(this,K).mutations,...(null==t?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){t5(this,U).clear(),t5(this,I).clear()}constructor(t={}){t6(this,U,{writable:!0,value:void 0}),t6(this,I,{writable:!0,value:void 0}),t6(this,K,{writable:!0,value:void 0}),t6(this,_,{writable:!0,value:void 0}),t6(this,H,{writable:!0,value:void 0}),t6(this,L,{writable:!0,value:void 0}),t6(this,G,{writable:!0,value:void 0}),t6(this,z,{writable:!0,value:void 0}),t7(this,U,t.queryCache||new t_),t7(this,I,t.mutationCache||new t0),t7(this,K,t.defaultOptions||{}),t7(this,_,new Map),t7(this,H,new Map),t7(this,L,0)}})}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_clerk_clerk_js=globalThis.webpackChunk_clerk_clerk_js||[]).push([["279"],{5608:function(r,e,n){n.r(e),n.d(e,{loadStripe:()=>h}),n(4891),n(1300),n(9166);var t,o="https://js.stripe.com/v3",i=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,l=function(){for(var r=document.querySelectorAll('script[src^="'.concat(o,'"]')),e=0;e<r.length;e++){var n=r[e];if(i.test(n.src))return n}return null},u=function(r){var e=r&&!r.advancedFraudSignals?"?advancedFraudSignals=false":"",n=document.createElement("script");n.src="".concat(o).concat(e);var t=document.head||document.body;if(!t)throw Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return t.appendChild(n),n},c=function(r,e){r&&r._registerWrapper&&r._registerWrapper({name:"stripe-js",version:"5.6.0",startTime:e})},a=null,d=null,s=null,p=function(r,e,n){if(null===r)return null;var t=r.apply(void 0,e);return c(t,n),t},f=!1,v=function(){return t?t:t=(null!==a?a:(a=new Promise(function(r,e){if("undefined"==typeof window||"undefined"==typeof document)return void r(null);if(window.Stripe,window.Stripe)return void r(window.Stripe);try{var n,t=l();t?t&&null!==s&&null!==d&&(t.removeEventListener("load",s),t.removeEventListener("error",d),null==(n=t.parentNode)||n.removeChild(t),t=u(null)):t=u(null),s=function(){window.Stripe?r(window.Stripe):e(Error("Stripe.js not available"))},d=function(){e(Error("Failed to load Stripe.js"))},t.addEventListener("load",s),t.addEventListener("error",d)}catch(r){e(r);return}})).catch(function(r){return a=null,Promise.reject(r)})).catch(function(r){return t=null,Promise.reject(r)})};Promise.resolve().then(function(){return v()}).catch(function(r){f||console.warn(r)});var h=function(){for(var r=arguments.length,e=Array(r),n=0;n<r;n++)e[n]=arguments[n];f=!0;var t=Date.now();return v().then(function(r){return p(r,e,t)})}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.webpackChunk_clerk_clerk_js=globalThis.webpackChunk_clerk_clerk_js||[]).push([["545"],{4463:function(t,r,e){"use strict";function n(){for(var t,r,e=0,n="";e<arguments.length;)(t=arguments[e++])&&(r=function t(r){var e,n,i="";if("string"==typeof r||"number"==typeof r)i+=r;else if("object"==typeof r)if(Array.isArray(r))for(e=0;e<r.length;e++)r[e]&&(n=t(r[e]))&&(i&&(i+=" "),i+=n);else for(e in r)r[e]&&(i&&(i+=" "),i+=e);return i}(t))&&(n&&(n+=" "),n+=r);return n}e.d(r,{$:()=>n})},7477:function(t,r,e){var n;e(8303),e(4953),e(2536),e(8732),e(6752),e(9016),e(1408),e(7515),e(6698),e(4169),e(8809),e(7095),e(6176),e(4189),e(1300),e(7918),t.exports=n=n||function(t,r){if("undefined"!=typeof window&&window.crypto&&(n=window.crypto),"undefined"!=typeof self&&self.crypto&&(n=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(n=globalThis.crypto),!n&&"undefined"!=typeof window&&window.msCrypto&&(n=window.msCrypto),!n&&void 0!==e.g&&e.g.crypto&&(n=e.g.crypto),!n)try{n=e(7602)}catch(t){}var n,i=function(){if(n){if("function"==typeof n.getRandomValues)try{return n.getRandomValues(new Uint32Array(1))[0]}catch(t){}if("function"==typeof n.randomBytes)try{return n.randomBytes(4).readInt32LE()}catch(t){}}throw Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function t(){}return function(r){var e;return t.prototype=r,e=new t,t.prototype=null,e}}(),s={},a=s.lib={},c=a.Base={extend:function(t){var r=o(this);return t&&r.mixIn(t),r.hasOwnProperty("init")&&this.init!==r.init||(r.init=function(){r.$super.init.apply(this,arguments)}),r.init.prototype=r,r.$super=this,r},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var r in t)t.hasOwnProperty(r)&&(this[r]=t[r]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},u=a.WordArray=c.extend({init:function(t,e){t=this.words=t||[],r!=e?this.sigBytes=e:this.sigBytes=4*t.length},toString:function(t){return(t||h).stringify(this)},concat:function(t){var r=this.words,e=t.words,n=this.sigBytes,i=t.sigBytes;if(this.clamp(),n%4)for(var o=0;o<i;o++){var s=e[o>>>2]>>>24-o%4*8&255;r[n+o>>>2]|=s<<24-(n+o)%4*8}else for(var a=0;a<i;a+=4)r[n+a>>>2]=e[a>>>2];return this.sigBytes+=i,this},clamp:function(){var r=this.words,e=this.sigBytes;r[e>>>2]&=0xffffffff<<32-e%4*8,r.length=t.ceil(e/4)},clone:function(){var t=c.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var r=[],e=0;e<t;e+=4)r.push(i());return new u.init(r,t)}}),f=s.enc={},h=f.Hex={stringify:function(t){for(var r=t.words,e=t.sigBytes,n=[],i=0;i<e;i++){var o=r[i>>>2]>>>24-i%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function(t){for(var r=t.length,e=[],n=0;n<r;n+=2)e[n>>>3]|=parseInt(t.substr(n,2),16)<<24-n%8*4;return new u.init(e,r/2)}},l=f.Latin1={stringify:function(t){for(var r=t.words,e=t.sigBytes,n=[],i=0;i<e;i++){var o=r[i>>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(o))}return n.join("")},parse:function(t){for(var r=t.length,e=[],n=0;n<r;n++)e[n>>>2]|=(255&t.charCodeAt(n))<<24-n%4*8;return new u.init(e,r)}},d=f.Utf8={stringify:function(t){try{return decodeURIComponent(escape(l.stringify(t)))}catch(t){throw Error("Malformed UTF-8 data")}},parse:function(t){return l.parse(unescape(encodeURIComponent(t)))}},p=a.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=d.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(r){var e,n=this._data,i=n.words,o=n.sigBytes,s=this.blockSize,a=o/(4*s),c=(a=r?t.ceil(a):t.max((0|a)-this._minBufferSize,0))*s,f=t.min(4*c,o);if(c){for(var h=0;h<c;h+=s)this._doProcessBlock(i,h);e=i.splice(0,c),n.sigBytes-=f}return new u.init(e,f)},clone:function(){var t=c.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0});a.Hasher=p.extend({cfg:c.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(t){return function(r,e){return new t.init(e).finalize(r)}},_createHmacHelper:function(t){return function(r,e){return new g.HMAC.init(t,e).finalize(r)}}});var g=s.algo={};return s}(Math)},3413:function(t,r,e){var n,i;e(7918),i=(n=e(7477)).lib.WordArray,n.enc.Base64={stringify:function(t){var r=t.words,e=t.sigBytes,n=this._map;t.clamp();for(var i=[],o=0;o<e;o+=3)for(var s=(r[o>>>2]>>>24-o%4*8&255)<<16|(r[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|r[o+2>>>2]>>>24-(o+2)%4*8&255,a=0;a<4&&o+.75*a<e;a++)i.push(n.charAt(s>>>6*(3-a)&63));var c=n.charAt(64);if(c)for(;i.length%4;)i.push(c);return i.join("")},parse:function(t){var r=t.length,e=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var o=0;o<e.length;o++)n[e.charCodeAt(o)]=o}var s=e.charAt(64);if(s){var a=t.indexOf(s);-1!==a&&(r=a)}for(var c=t,u=r,f=n,h=[],l=0,d=0;d<u;d++)if(d%4){var p=f[c.charCodeAt(d-1)]<<d%4*2|f[c.charCodeAt(d)]>>>6-d%4*2;h[l>>>2]|=p<<24-l%4*8,l++}return i.create(h,l)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},t.exports=n.enc.Base64},180:function(t,r,e){var n,i,o,s,a,c,u;o=(i=(n=e(7477)).lib).WordArray,s=i.Hasher,a=n.algo,c=[],u=a.SHA1=s.extend({_doReset:function(){this._hash=new o.init([0x67452301,0xefcdab89,0x98badcfe,0x10325476,0xc3d2e1f0])},_doProcessBlock:function(t,r){for(var e=this._hash.words,n=e[0],i=e[1],o=e[2],s=e[3],a=e[4],u=0;u<80;u++){if(u<16)c[u]=0|t[r+u];else{var f=c[u-3]^c[u-8]^c[u-14]^c[u-16];c[u]=f<<1|f>>>31}var h=(n<<5|n>>>27)+a+c[u];u<20?h+=(i&o|~i&s)+0x5a827999:u<40?h+=(i^o^s)+0x6ed9eba1:u<60?h+=(i&o|i&s|o&s)-0x70e44324:h+=(i^o^s)-0x359d3e2a,a=s,s=o,o=i<<30|i>>>2,i=n,n=h}e[0]=e[0]+n|0,e[1]=e[1]+i|0,e[2]=e[2]+o|0,e[3]=e[3]+s|0,e[4]=e[4]+a|0},_doFinalize:function(){var t=this._data,r=t.words,e=8*this._nDataBytes,n=8*t.sigBytes;return r[n>>>5]|=128<<24-n%32,r[(n+64>>>9<<4)+14]=Math.floor(e/0x100000000),r[(n+64>>>9<<4)+15]=e,t.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var t=s.clone.call(this);return t._hash=this._hash.clone(),t}}),n.SHA1=s._createHelper(u),n.HmacSHA1=s._createHmacHelper(u),t.exports=n.SHA1},4538:function(t,r,e){"use strict";var n=e(7625),i=e(3),o=e(1147),s=e(7623);t.exports=function(t,r){r&&"string"==typeof t||i(t);var e=s(t);return o(i(void 0!==e?n(e,t):t))}},6049:function(t){"use strict";var r=RangeError;t.exports=function(t){if(t==t)return t;throw new r("NaN is not allowed")}},3111:function(t,r,e){"use strict";var n=e(5258),i=e(3561),o=e(4370),s=e(3231),a=e(7161);n({target:"Array",proto:!0},{at:function(t){var r=i(this),e=o(r),n=s(t),a=n>=0?n:e+n;return a<0||a>=e?void 0:r[a]}}),a("at")},8683:function(t,r,e){"use strict";var n=e(5258),i=e(8466).right,o=e(5122),s=e(6315);n({target:"Array",proto:!0,forced:!e(1037)&&s>79&&s<83||!o("reduceRight")},{reduceRight:function(t){return i(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}})},5593:function(t,r,e){"use strict";e(7161)("flatMap")},1415:function(t,r,e){"use strict";var n=e(5258),i=e(7625),o=e(6382),s=e(3),a=e(1147),c=e(4538),u=e(9866),f=e(4831),h=e(4727),l=u(function(){for(var t,r,e=this.iterator,n=this.mapper;;){if(r=this.inner)try{if(!(t=s(i(r.next,r.iterator))).done)return t.value;this.inner=null}catch(t){f(e,"throw",t)}if(t=s(i(this.next,e)),this.done=!!t.done)return;try{this.inner=c(n(t.value,this.counter++),!1)}catch(t){f(e,"throw",t)}}});n({target:"Iterator",proto:!0,real:!0,forced:h},{flatMap:function(t){return s(this),o(t),new l(a(this),{mapper:t,inner:null})}})},3672:function(t,r,e){"use strict";var n=e(5258),i=e(7625),o=e(3),s=e(1147),a=e(6049),c=e(4114),u=e(9866),f=e(4831),h=e(4727),l=u(function(){var t=this.iterator;if(!this.remaining--)return this.done=!0,f(t,"normal",void 0);var r=o(i(this.next,t));if(!(this.done=!!r.done))return r.value});n({target:"Iterator",proto:!0,real:!0,forced:h},{take:function(t){o(this);var r=c(a(+t));return new l(s(this),{remaining:r})}})},4919:function(t,r,e){"use strict";e(5258)({target:"Object",stat:!0},{hasOwn:e(4461)})},195:function(t,r,e){"use strict";var n=e(5258),i=e(7625),o=e(6382),s=e(7895),a=e(8099),c=e(1552);n({target:"Promise",stat:!0,forced:e(3797)},{allSettled:function(t){var r=this,e=s.f(r),n=e.resolve,u=e.reject,f=a(function(){var e=o(r.resolve),s=[],a=0,u=1;c(t,function(t){var o=a++,c=!1;u++,i(e,r,t).then(function(t){!c&&(c=!0,s[o]={status:"fulfilled",value:t},--u||n(s))},function(t){!c&&(c=!0,s[o]={status:"rejected",reason:t},--u||n(s))})}),--u||n(s)});return f.error&&u(f.value),e.promise}})},3945:function(t,r,e){"use strict";var n=e(5258),i=e(2196),o=e(1826),s=e(3231),a=e(5011),c=e(7683),u=i("".charAt);n({target:"String",proto:!0,forced:c(function(){return"\uD842"!=="\uD842\uDFB7".at(-2)})},{at:function(t){var r=a(o(this)),e=r.length,n=s(t),i=n>=0?n:e+n;return i<0||i>=e?void 0:u(r,i)}})},9401:function(t,r,e){"use strict";var n=e(5258),i=e(7625),o=e(2196),s=e(1826),a=e(8801),c=e(4449),u=e(4840),f=e(5011),h=e(5378),l=e(1678),d=e(4242),p=e(4735),g=e(4727),v=p("replace"),y=TypeError,w=o("".indexOf),m=o("".replace),_=o("".slice),x=Math.max;n({target:"String",proto:!0},{replaceAll:function(t,r){var e,n,o,p,B,A,b,S,k,H=s(this),C=0,j="";if(!c(t)){if((e=u(t))&&!~w(f(s(l(t))),"g"))throw new y("`.replaceAll` does not allow non-global regexes");if(n=h(t,v))return i(n,t,H,r);if(g&&e)return m(f(H),t,r)}for(o=f(H),p=f(t),(B=a(r))||(r=f(r)),b=x(1,A=p.length),S=w(o,p);-1!==S;)k=B?f(r(p,S,o)):d(p,o,S,[],void 0,r),j+=_(o,C,S)+k,C=S+A,S=S+b>o.length?-1:w(o,p,S+b);return C<o.length&&(j+=_(o,C)),j}})},5237:function(t,r,e){"use strict";var n=e(4665);(0,e(5200).exportTypedArrayStaticMethod)("from",e(9055),n)},2684:function(t,r,e){"use strict";var n=e(5200),i=e(4665),o=n.aTypedArrayConstructor;(0,n.exportTypedArrayStaticMethod)("of",function(){for(var t=0,r=arguments.length,e=new(o(this))(r);r>t;)e[t]=arguments[t++];return e},i)},6752:function(t,r,e){"use strict";e(6619)("Uint32",function(t){return function(r,e,n){return t(this,r,e,n)}})},8604:function(t,r,e){"use strict";let n;function i(t){return new Promise((r,e)=>{t.oncomplete=t.onsuccess=()=>r(t.result),t.onabort=t.onerror=()=>e(t.error)})}function o(t,r){let e=indexedDB.open(t);e.onupgradeneeded=()=>e.result.createObjectStore(r);let n=i(e);return(t,e)=>n.then(n=>e(n.transaction(r,t).objectStore(r)))}function s(){return n||(n=o("keyval-store","keyval")),n}function a(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s();return r("readonly",r=>i(r.get(t)))}function c(t,r){let e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s();return e("readwrite",e=>(e.put(r,t),i(e.transaction)))}function u(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s();return r("readwrite",r=>(r.delete(t),i(r.transaction)))}e.d(r,{Jt:()=>a,hZ:()=>c,y$:()=>o,yH:()=>u}),e(9166),e(9091),e(4784),e(4261),e(8593),e(7918)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_clerk_clerk_js=globalThis.webpackChunk_clerk_clerk_js||[]).push([["729"],{7010:function(e,t,s){s.r(t),s.d(t,{zxcvbnAsync:()=>eh,zxcvbnOptions:()=>C,Options:()=>I,zxcvbn:()=>eo,debounce:()=>en}),s(4891),s(9166),s(1300),s(4261),s(9091),s(4784),s(7918);let r=(e,t)=>e.push.apply(e,t),n=e=>e.sort((e,t)=>e.i-t.i||e.j-t.j),a=e=>{let t={},s=1;return e.forEach(e=>{t[e]=s,s+=1}),t};s(6178);let i={4:[[1,2],[2,3]],5:[[1,3],[2,3],[2,4]],6:[[1,2],[2,4],[4,5]],7:[[1,3],[2,3],[4,5],[4,6]],8:[[2,4],[4,6]]},l=/^[A-Z\xbf-\xdf][^A-Z\xbf-\xdf]+$/,o=/^[^A-Z\xbf-\xdf]+[A-Z\xbf-\xdf]$/,h=/^[A-Z\xbf-\xdf]+$/,u=/^[^a-z\xdf-\xff]+$/,c=/^[a-z\xdf-\xff]+$/,d=/^[^A-Z\xbf-\xdf]+$/,g=/[a-z\xdf-\xff]/,f=/[A-Z\xbf-\xdf]/,p=/[^A-Za-z\xbf-\xdf]/gi,m=/^\d+$/,b=new Date().getFullYear(),y={recentYear:/19\d\d|200\d|201\d|202\d/g},x=[" ",",",";",":","|","/","\\","_",".","-"],k=x.length;class M{match(e){let{password:t}=e,s=[...this.getMatchesWithoutSeparator(t),...this.getMatchesWithSeparator(t)];return n(this.filterNoise(s))}getMatchesWithSeparator(e){let t=[],s=/^(\d{1,4})([\s/\\_.-])(\d{1,2})\2(\d{1,4})$/;for(let r=0;r<=Math.abs(e.length-6);r+=1)for(let n=r+5;n<=r+9&&!(n>=e.length);n+=1){let a=e.slice(r,+n+1||9e9),i=s.exec(a);if(null!=i){let e=this.mapIntegersToDayMonthYear([parseInt(i[1],10),parseInt(i[3],10),parseInt(i[4],10)]);null!=e&&t.push({pattern:"date",token:a,i:r,j:n,separator:i[2],year:e.year,month:e.month,day:e.day})}}return t}getMatchesWithoutSeparator(e){let t=[],s=/^\d{4,8}$/,r=e=>Math.abs(e.year-b);for(let n=0;n<=Math.abs(e.length-4);n+=1)for(let a=n+3;a<=n+7&&!(a>=e.length);a+=1){let l=e.slice(n,+a+1||9e9);if(s.exec(l)){let e=[];if(i[l.length].forEach(t=>{let[s,r]=t,n=this.mapIntegersToDayMonthYear([parseInt(l.slice(0,s),10),parseInt(l.slice(s,r),10),parseInt(l.slice(r),10)]);null!=n&&e.push(n)}),e.length>0){let s=e[0],i=r(e[0]);e.slice(1).forEach(e=>{let t=r(e);t<i&&(s=e,i=t)}),t.push({pattern:"date",token:l,i:n,j:a,separator:"",year:s.year,month:s.month,day:s.day})}}}return t}filterNoise(e){return e.filter(t=>{let s=!1,r=e.length;for(let n=0;n<r;n+=1){let r=e[n];if(t!==r&&r.i<=t.i&&r.j>=t.j){s=!0;break}}return!s})}mapIntegersToDayMonthYear(e){if(e[1]>31||e[1]<=0)return null;let t=0,s=0,r=0;for(let n=0,a=e.length;n<a;n+=1){let a=e[n];if(a>99&&a<1e3||a>2050)return null;a>31&&(s+=1),a>12&&(t+=1),a<=0&&(r+=1)}return s>=2||3===t||r>=2?null:this.getDayMonth(e)}getDayMonth(e){let t=[[e[2],e.slice(0,2)],[e[0],e.slice(1,3)]],s=t.length;for(let e=0;e<s;e+=1){let[s,r]=t[e];if(1e3<=s&&s<=2050){let e=this.mapIntegersToDayMonth(r);if(null!=e)return{year:s,month:e.month,day:e.day};return null}}for(let e=0;e<s;e+=1){let[s,r]=t[e],n=this.mapIntegersToDayMonth(r);if(null!=n)return{year:this.twoToFourDigitYear(s),month:n.month,day:n.day}}return null}mapIntegersToDayMonth(e){let t=[e,e.slice().reverse()];for(let e=0;e<t.length;e+=1){let s=t[e],r=s[0],n=s[1];if(r>=1&&r<=31&&n>=1&&n<=12)return{day:r,month:n}}return null}twoToFourDigitYear(e){return e>99?e:e>50?e+1900:e+2e3}}s(200),s(4953),s(2536),s(8732),s(6752),s(9016),s(1408),s(7515),s(6698),s(4169),s(8809),s(7095),s(6176),s(4189);let w=new Uint32Array(65536),v=(e,t,s)=>{let r=0,n=Object.keys(t).find(t=>{let n,a,i=(n=e.length<=t.length,a=e.length<=s,n||a?Math.ceil(e.length/4):s);if(Math.abs(e.length-t.length)>i)return!1;let l=((e,t)=>{if(e.length<t.length){let s=t;t=e,e=s}return 0===t.length?e.length:e.length<=32?((e,t)=>{let s=e.length,r=t.length,n=1<<s-1,a=-1,i=0,l=s,o=s;for(;o--;)w[e.charCodeAt(o)]|=1<<o;for(o=0;o<r;o++){let e=w[t.charCodeAt(o)],s=e|i;e|=(e&a)+a^a,i|=~(e|a),a&=e,i&n&&l++,a&n&&l--,a=a<<1|~(s|(i=i<<1|1)),i&=s}for(o=s;o--;)w[e.charCodeAt(o)]=0;return l})(e,t):((e,t)=>{let s=t.length,r=e.length,n=[],a=[],i=Math.ceil(s/32),l=Math.ceil(r/32);for(let e=0;e<i;e++)a[e]=-1,n[e]=0;let o=0;for(;o<l-1;o++){let i=0,l=-1,h=32*o,u=Math.min(32,r)+h;for(let t=h;t<u;t++)w[e.charCodeAt(t)]|=1<<t;for(let e=0;e<s;e++){let s=w[t.charCodeAt(e)],r=a[e/32|0]>>>e&1,o=n[e/32|0]>>>e&1,h=s|i,u=((s|o)&l)+l^l|s|o,c=i|~(u|l),d=l&u;c>>>31^r&&(a[e/32|0]^=1<<e),d>>>31^o&&(n[e/32|0]^=1<<e),c=c<<1|r,l=(d=d<<1|o)|~(h|c),i=c&h}for(let t=h;t<u;t++)w[e.charCodeAt(t)]=0}let h=0,u=-1,c=32*o,d=Math.min(32,r-c)+c;for(let t=c;t<d;t++)w[e.charCodeAt(t)]|=1<<t;let g=r;for(let e=0;e<s;e++){let s=w[t.charCodeAt(e)],i=a[e/32|0]>>>e&1,l=n[e/32|0]>>>e&1,o=s|h,c=((s|l)&u)+u^u|s|l,d=h|~(c|u),f=u&c;g+=d>>>r-1&1,g-=f>>>r-1&1,d>>>31^i&&(a[e/32|0]^=1<<e),f>>>31^l&&(n[e/32|0]^=1<<e),d=d<<1|i,u=(f=f<<1|l)|~(o|d),h=d&o}for(let t=c;t<d;t++)w[e.charCodeAt(t)]=0;return g})(e,t)})(e,t),o=l<=i;return o&&(r=l),o});return n?{levenshteinDistance:r,levenshteinDistanceEntry:n}:{}};s(8593),s(9116),s(6969);var S={a:["4","@"],b:["8"],c:["(","{","[","<"],d:["6","|)"],e:["3"],f:["#"],g:["6","9","&"],h:["#","|-|"],i:["1","!","|"],k:["<","|<"],l:["!","1","|","7"],m:["^^","nn","2n","/\\\\/\\\\"],n:["//"],o:["0","()"],q:["9"],u:["|_|"],s:["$","5"],t:["+","7"],v:["<",">","/"],w:["^/","uu","vv","2u","2v","\\\\/\\\\/"],x:["%","><"],z:["2"]},A={warnings:{straightRow:"straightRow",keyPattern:"keyPattern",simpleRepeat:"simpleRepeat",extendedRepeat:"extendedRepeat",sequences:"sequences",recentYears:"recentYears",dates:"dates",topTen:"topTen",topHundred:"topHundred",common:"common",similarToCommon:"similarToCommon",wordByItself:"wordByItself",namesByThemselves:"namesByThemselves",commonNames:"commonNames",userInputs:"userInputs",pwned:"pwned"},suggestions:{l33t:"l33t",reverseWords:"reverseWords",allUppercase:"allUppercase",capitalization:"capitalization",dates:"dates",recentYears:"recentYears",associatedYears:"associatedYears",sequences:"sequences",repeated:"repeated",longerKeyboardPattern:"longerKeyboardPattern",anotherWord:"anotherWord",useWords:"useWords",noNeed:"noNeed",pwned:"pwned"},timeEstimation:{ltSecond:"ltSecond",second:"second",seconds:"seconds",minute:"minute",minutes:"minutes",hour:"hour",hours:"hours",day:"day",days:"days",month:"month",months:"months",year:"year",years:"years",centuries:"centuries"}};class T{addSub(e){for(var t=arguments.length,s=Array(t>1?t-1:0),r=1;r<t;r++)s[r-1]=arguments[r];let n=e.charAt(0);this.children.has(n)||this.children.set(n,new T([...this.parents,n]));let a=this.children.get(n);for(let t=1;t<e.length;t+=1){let s=e.charAt(t);a.hasChild(s)||a.addChild(s),a=a.getChild(s)}return a.subs=(a.subs||[]).concat(s),this}getChild(e){return this.children.get(e)}isTerminal(){return!!this.subs}addChild(e){this.hasChild(e)||this.children.set(e,new T([...this.parents,e]))}hasChild(e){return this.children.has(e)}constructor(e=[]){this.parents=e,this.children=new Map}}var j=(e,t)=>(Object.entries(e).forEach(e=>{let[s,r]=e;r.forEach(e=>{t.addSub(e,s)})}),t);class I{setOptions(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.l33tTable&&(this.l33tTable=e.l33tTable,this.trieNodeRoot=j(e.l33tTable,new T)),e.dictionary&&(this.dictionary=e.dictionary,this.setRankedDictionaries()),e.translations&&this.setTranslations(e.translations),e.graphs&&(this.graphs=e.graphs),void 0!==e.useLevenshteinDistance&&(this.useLevenshteinDistance=e.useLevenshteinDistance),void 0!==e.levenshteinThreshold&&(this.levenshteinThreshold=e.levenshteinThreshold),void 0!==e.l33tMaxSubstitutions&&(this.l33tMaxSubstitutions=e.l33tMaxSubstitutions),void 0!==e.maxLength&&(this.maxLength=e.maxLength)}setTranslations(e){if(this.checkCustomTranslations(e))this.translations=e;else throw Error("Invalid translations object fallback to keys")}checkCustomTranslations(e){let t=!0;return Object.keys(A).forEach(s=>{s in e?Object.keys(A[s]).forEach(r=>{r in e[s]||(t=!1)}):t=!1}),t}setRankedDictionaries(){let e={},t={};Object.keys(this.dictionary).forEach(s=>{e[s]=a(this.dictionary[s]),t[s]=this.getRankedDictionariesMaxWordSize(this.dictionary[s])}),this.rankedDictionaries=e,this.rankedDictionariesMaxWordSize=t}getRankedDictionariesMaxWordSize(e){let t=e.map(e=>"string"!=typeof e?e.toString().length:e.length);return 0===t.length?0:t.reduce((e,t)=>Math.max(e,t),-1/0)}buildSanitizedRankedDictionary(e){let t=[];return e.forEach(e=>{let s=typeof e;("string"===s||"number"===s||"boolean"===s)&&t.push(e.toString().toLowerCase())}),a(t)}extendUserInputsDictionary(e){this.dictionary.userInputs||(this.dictionary.userInputs=[]);let t=[...this.dictionary.userInputs,...e];this.rankedDictionaries.userInputs=this.buildSanitizedRankedDictionary(t),this.rankedDictionariesMaxWordSize.userInputs=this.getRankedDictionariesMaxWordSize(t)}addMatcher(e,t){this.matchers[e]?console.info("Matcher ".concat(e," already exists")):this.matchers[e]=t}constructor(){this.matchers={},this.l33tTable=S,this.trieNodeRoot=j(S,new T),this.dictionary={userInputs:[]},this.rankedDictionaries={},this.rankedDictionariesMaxWordSize={},this.translations=A,this.graphs={},this.useLevenshteinDistance=!1,this.levenshteinThreshold=2,this.l33tMaxSubstitutions=100,this.maxLength=256,this.setRankedDictionaries()}}let C=new I;class D{match(e){let{password:t}=e,s=t.split("").reverse().join("");return this.defaultMatch({password:s}).map(e=>({...e,token:e.token.split("").reverse().join(""),reversed:!0,i:t.length-1-e.j,j:t.length-1-e.i}))}constructor(e){this.defaultMatch=e}}s(3775),s(3272);class E{getAllPossibleSubsAtIndex(e){let t=[],s=this.trieRoot;for(let r=e;r<this.substr.length;r+=1){let e=this.substr.charAt(r);if(!(s=s.getChild(e)))break;t.push(s)}return t}helper(e){let{onlyFullSub:t,isFullSub:s,index:r,subIndex:n,changes:a,lastSubLetter:i,consecutiveSubCount:l}=e;if(this.finalPasswords.length>=this.limit)return;if(r===this.substr.length){t===s&&this.finalPasswords.push({password:this.buffer.join(""),changes:a});return}let o=[...this.getAllPossibleSubsAtIndex(r)],h=!1;for(let e=r+o.length-1;e>=r;e-=1){let u=o[e-r];if(u.isTerminal()){if(i===u.parents.join("")&&l>=3)continue;for(let r of(h=!0,u.subs)){this.buffer.push(r);let o=a.concat({i:n,letter:r,substitution:u.parents.join("")});if(this.helper({onlyFullSub:t,isFullSub:s,index:e+1,subIndex:n+r.length,changes:o,lastSubLetter:u.parents.join(""),consecutiveSubCount:i===u.parents.join("")?l+1:1}),this.buffer.pop(),this.finalPasswords.length>=this.limit)return}}}if(!t||!h){let e=this.substr.charAt(r);this.buffer.push(e),this.helper({onlyFullSub:t,isFullSub:s&&!h,index:r+1,subIndex:n+1,changes:a,lastSubLetter:i,consecutiveSubCount:l}),this.buffer.pop()}}getAll(){return this.helper({onlyFullSub:!0,isFullSub:!0,index:0,subIndex:0,changes:[],lastSubLetter:void 0,consecutiveSubCount:0}),this.helper({onlyFullSub:!1,isFullSub:!0,index:0,subIndex:0,changes:[],lastSubLetter:void 0,consecutiveSubCount:0}),this.finalPasswords}constructor({substr:e,limit:t,trieRoot:s}){this.buffer=[],this.finalPasswords=[],this.substr=e,this.limit=t,this.trieRoot=s}}class L{isAlreadyIncluded(e,t){return e.some(e=>Object.entries(e).every(e=>{let[s,r]=e;return"subs"===s||r===t[s]}))}match(e){let{password:t}=e,s=[],r=new E({substr:t,limit:C.l33tMaxSubstitutions,trieRoot:C.trieNodeRoot}).getAll(),n=!1,a=!0;return r.forEach(e=>{if(n)return;let r=this.defaultMatch({password:e.password,useLevenshtein:a});a=!1,r.forEach(r=>{var a,i;let l,o,h,u,c;n||(n=0===r.i&&r.j===t.length-1);let d=(a=r.i,i=r.j,l=e.changes.filter(e=>e.i<a).reduce((e,t)=>e-t.letter.length+t.substitution.length,a),h=(o=e.changes.filter(e=>e.i>=a&&e.i<=i)).reduce((e,t)=>e-t.letter.length+t.substitution.length,i-a+l),u=[],c=[],o.forEach(e=>{0>u.findIndex(t=>t.letter===e.letter&&t.substitution===e.substitution)&&(u.push({letter:e.letter,substitution:e.substitution}),c.push("".concat(e.substitution," -> ").concat(e.letter)))}),{i:l,j:h,subs:u,subDisplay:c.join(", ")}),g=t.slice(d.i,+d.j+1||9e9),f={...r,l33t:!0,token:g,...d},p=this.isAlreadyIncluded(s,f);g.toLowerCase()===r.matchedWord||p||s.push(f)})}),s.filter(e=>e.token.length>1)}constructor(e){this.defaultMatch=e}}class P{match(e){let{password:t}=e;return n([...this.defaultMatch({password:t}),...this.reverse.match({password:t}),...this.l33t.match({password:t})])}defaultMatch(e){let{password:t,useLevenshtein:s=!0}=e,r=[],n=t.length,a=t.toLowerCase();return Object.keys(C.rankedDictionaries).forEach(e=>{let i=C.rankedDictionaries[e],l=Math.min(C.rankedDictionariesMaxWordSize[e],n);for(let o=0;o<n;o+=1){let h=Math.min(o+l,n);for(let l=o;l<h;l+=1){let h=a.slice(o,+l+1||9e9),u=h in i,c={},d=0===o&&l===n-1;C.useLevenshteinDistance&&d&&!u&&s&&(c=v(h,i,C.levenshteinThreshold));let g=0!==Object.keys(c).length;if(u||g){let s=i[g?c.levenshteinDistanceEntry:h];r.push({pattern:"dictionary",i:o,j:l,token:t.slice(o,+l+1||9e9),matchedWord:h,rank:s,dictionaryName:e,reversed:!1,l33t:!1,...c})}}}}),r}constructor(){this.l33t=new L(this.defaultMatch),this.reverse=new D(this.defaultMatch)}}class R{match(e){let{password:t,regexes:s=y}=e,r=[];return Object.keys(s).forEach(e=>{let n,a=s[e];for(a.lastIndex=0;n=a.exec(t);)if(n){let t=n[0];r.push({pattern:"regex",token:t,i:n.index,j:n.index+n[0].length-1,regexName:e,regexMatch:n})}}),n(r)}}s(4085);var O={nCk(e,t){let s=e;if(t>s)return 0;if(0===t)return 1;let r=1;for(let e=1;e<=t;e+=1)r*=s,r/=e,s-=1;return r},log10:e=>0===e?0:Math.log(e)/Math.log(10),log2:e=>Math.log(e)/Math.log(2),factorial(e){let t=1;for(let s=2;s<=e;s+=1)t*=s;return t}};s(2724);let z=(e,t)=>{let s=0,r=e.indexOf(t);for(;r>=0;)s+=1,r=e.indexOf(t,r+t.length);return s};s(1747);let W={bruteforce:e=>{let{token:t}=e,s=10**t.length;return s===1/0&&(s=Number.MAX_VALUE),Math.max(s,1===t.length?11:51)},date:e=>{let{year:t,separator:s}=e,r=365*Math.max(Math.abs(t-b),20);return s&&(r*=4),r},dictionary:e=>{let t,{rank:s,reversed:r,l33t:n,subs:a,token:i,dictionaryName:h}=e,c=(e=>{let t=e.replace(p,"");if(t.match(d)||t.toLowerCase()===t)return 1;let s=[l,o,u],r=s.length;for(let e=0;e<r;e+=1){let r=s[e];if(t.match(r))return 2}return(e=>{let t=e.split(""),s=t.filter(e=>e.match(f)).length,r=t.filter(e=>e.match(g)).length,n=0,a=Math.min(s,r);for(let e=1;e<=a;e+=1)n+=O.nCk(s+r,e);return n})(t)})(i),m=(e=>{let{l33t:t,subs:s,token:r}=e;if(!t)return 1;let n=1;return s.forEach(e=>{let{subbedCount:t,unsubbedCount:s}=(e=>{let{sub:t,token:s}=e,r=s.toLowerCase();return{subbedCount:z(r,t.substitution),unsubbedCount:z(r,t.letter)}})({sub:e,token:r});if(0===t||0===s)n*=2;else{let e=Math.min(s,t),r=0;for(let n=1;n<=e;n+=1)r+=O.nCk(s+t,n);n*=r}}),n})({l33t:n,subs:a,token:i});return t="diceware"===h?3888:s*c*m*(r&&2||1),{baseGuesses:s,uppercaseVariations:c,l33tVariations:m,calculation:t}},regex:e=>{let{regexName:t,regexMatch:s,token:r}=e,n={alphaLower:26,alphaUpper:26,alpha:52,alphanumeric:62,digits:10,symbols:33};return t in n?n[t]**r.length:"recentYear"===t?Math.max(Math.abs(parseInt(s[0],10)-b),20):0},repeat:e=>{let{baseGuesses:t,repeatCount:s}=e;return t*s},sequence:e=>{let{token:t,ascending:s}=e,r=t.charAt(0),n=0;return n=["a","A","z","Z","0","1","9"].includes(r)?4:r.match(/\d/)?10:26,s||(n*=2),n*t.length},spatial:e=>{let{graph:t,token:s,shiftedCount:r,turns:n}=e,a=(e=>{var t;let s,{token:r,graph:n,turns:a}=e,i=Object.keys(C.graphs[n]).length,l=(t=C.graphs[n],s=0,Object.keys(t).forEach(e=>{let r=t[e];s+=r.filter(e=>!!e).length}),s/=Object.entries(t).length),o=0,h=r.length;for(let e=2;e<=h;e+=1){let t=Math.min(a,e-1);for(let s=1;s<=t;s+=1)o+=O.nCk(e-1,s-1)*i*l**s}return o})({token:s,graph:t,turns:n});if(r){let e=s.length-r;if(0===r||0===e)a*=2;else{let t=0;for(let s=1;s<=Math.min(r,e);s+=1)t+=O.nCk(r+e,s);a*=t}}return Math.round(a)},separator:()=>k},F={password:"",optimal:{},excludeAdditive:!1,separatorRegex:void 0,fillArray(e,t){let s=[];for(let r=0;r<e;r+=1){let e=[];"object"===t&&(e={}),s.push(e)}return s},makeBruteforceMatch(e,t){return{pattern:"bruteforce",token:this.password.slice(e,+t+1||9e9),i:e,j:t}},update(e,t){let s=e.j,r=((e,t)=>{var s;let r,n={};if("guesses"in e&&null!=e.guesses)return e;let a=(r=1,e.token.length<t.length&&(r=1===e.token.length?10:50),r),i=(s=e.pattern,W[s]?W[s](e):C.matchers[s]&&"scoring"in C.matchers[s]?C.matchers[s].scoring(e):0),l=0;"number"==typeof i?l=i:"dictionary"===e.pattern&&(l=i.calculation,n.baseGuesses=i.baseGuesses,n.uppercaseVariations=i.uppercaseVariations,n.l33tVariations=i.l33tVariations);let o=Math.max(l,a);return{...e,...n,guesses:o,guessesLog10:O.log10(o)}})(e,this.password),n=r.guesses;t>1&&(n*=this.optimal.pi[r.i-1][t-1]);let a=O.factorial(t)*n;this.excludeAdditive||(a+=1e4**(t-1));let i=!1;Object.keys(this.optimal.g[s]).forEach(e=>{let r=this.optimal.g[s][e];parseInt(e,10)<=t&&r<=a&&(i=!0)}),i||(this.optimal.g[s][t]=a,this.optimal.m[s][t]=r,this.optimal.pi[s][t]=n)},bruteforceUpdate(e){let t=this.makeBruteforceMatch(0,e);this.update(t,1);for(let s=1;s<=e;s+=1){t=this.makeBruteforceMatch(s,e);let r=this.optimal.m[s-1];Object.keys(r).forEach(e=>{"bruteforce"!==r[e].pattern&&this.update(t,parseInt(e,10)+1)})}},unwind(e){let t=[],s=e-1,r=0,n=2e308,a=this.optimal.g[s];for(a&&Object.keys(a).forEach(e=>{let t=a[e];t<n&&(r=parseInt(e,10),n=t)});s>=0;){let e=this.optimal.m[s][r];t.unshift(e),s=e.i-1,r-=1}return t}};var Y={mostGuessableMatchSequence(e,t){let s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];F.password=e,F.excludeAdditive=s;let r=e.length,n=F.fillArray(r,"array");t.forEach(e=>{n[e.j].push(e)}),n=n.map(e=>e.sort((e,t)=>e.i-t.i)),F.optimal={m:F.fillArray(r,"object"),pi:F.fillArray(r,"object"),g:F.fillArray(r,"object")};for(let e=0;e<r;e+=1)n[e].forEach(e=>{e.i>0?Object.keys(F.optimal.m[e.i-1]).forEach(t=>{F.update(e,parseInt(t,10)+1)}):F.update(e,1)}),F.bruteforceUpdate(e);let a=F.unwind(r),i=a.length,l=this.getGuesses(e,i);return{password:e,guesses:l,guessesLog10:O.log10(l),sequence:a}},getGuesses(e,t){let s=e.length;return 0===e.length?1:F.optimal.g[s-1][t]}};class q{match(e){let{password:t,omniMatch:s}=e,r=[],n=0;for(;n<t.length;){let e=this.getGreedyMatch(t,n),a=this.getLazyMatch(t,n);if(null==e)break;let{match:i,baseToken:l}=this.setMatchToken(e,a);if(i){let e=i.index+i[0].length-1,t=this.getBaseGuesses(l,s);r.push(this.normalizeMatch(l,e,i,t)),n=e+1}}return r.some(e=>e instanceof Promise)?Promise.all(r):r}normalizeMatch(e,t,s,r){let n={pattern:"repeat",i:s.index,j:t,token:s[0],baseToken:e,baseGuesses:0,repeatCount:s[0].length/e.length};return r instanceof Promise?r.then(e=>({...n,baseGuesses:e})):{...n,baseGuesses:r}}getGreedyMatch(e,t){let s=/(.+)\1+/g;return s.lastIndex=t,s.exec(e)}getLazyMatch(e,t){let s=/(.+?)\1+/g;return s.lastIndex=t,s.exec(e)}setMatchToken(e,t){let s,r="";if(t&&e[0].length>t[0].length){s=e;let t=/^(.+?)\1+$/.exec(s[0]);t&&(r=t[1])}else(s=t)&&(r=s[1]);return{match:s,baseToken:r}}getBaseGuesses(e,t){let s=t.match(e);return s instanceof Promise?s.then(t=>Y.mostGuessableMatchSequence(e,t).guesses):Y.mostGuessableMatchSequence(e,s).guesses}}class N{match(e){let{password:t}=e,s=[];if(1===t.length)return[];let r=0,n=null,a=t.length;for(let e=1;e<a;e+=1){let a=t.charCodeAt(e)-t.charCodeAt(e-1);if(null==n&&(n=a),a!==n){let i=e-1;this.update({i:r,j:i,delta:n,password:t,result:s}),r=i,n=a}}return this.update({i:r,j:a-1,delta:n,password:t,result:s}),s}update(e){let{i:t,j:s,delta:r,password:n,result:a}=e;if(s-t>1||1===Math.abs(r)){let e=Math.abs(r);if(e>0&&e<=this.MAX_DELTA){let e=n.slice(t,+s+1||9e9),{sequenceName:i,sequenceSpace:l}=this.getSequence(e);return a.push({pattern:"sequence",i:t,j:s,token:n.slice(t,+s+1||9e9),sequenceName:i,sequenceSpace:l,ascending:r>0})}}return null}getSequence(e){let t="unicode",s=26;return c.test(e)?(t="lower",s=26):h.test(e)?(t="upper",s=26):m.test(e)&&(t="digits",s=10),{sequenceName:t,sequenceSpace:s}}constructor(){this.MAX_DELTA=5}}class G{match(e){let{password:t}=e,s=[];return Object.keys(C.graphs).forEach(e=>{let n=C.graphs[e];r(s,this.helper(t,n,e))}),n(s)}checkIfShifted(e,t,s){return!e.includes("keypad")&&this.SHIFTED_RX.test(t.charAt(s))?1:0}helper(e,t,s){let r,n=[],a=0,i=e.length;for(;a<i-1;){let l=a+1,o=null,h=0;for(r=this.checkIfShifted(s,e,a);;){let u=t[e.charAt(l-1)]||[],c=!1,d=-1,g=-1;if(l<i){let t=e.charAt(l),s=u.length;for(let e=0;e<s;e+=1){let s=u[e];if(g+=1,s){let e=s.indexOf(t);if(-1!==e){c=!0,1===e&&(r+=1),o!==(d=g)&&(h+=1,o=d);break}}}}if(c)l+=1;else{l-a>2&&n.push({pattern:"spatial",i:a,j:l-1,token:e.slice(a,l),graph:s,turns:h,shiftedCount:r}),a=l;break}}}return n}constructor(){this.SHIFTED_RX=/[~!@#$%^&*()_+QWERTYUIOP{}|ASDFGHJKL:"ZXCVBNM<>?]/}}s(6764),s(4853),s(3459);let _=new RegExp("[".concat(x.join(""),"]"));class U{static getMostUsedSeparatorChar(e){let t=[...e.split("").filter(e=>_.test(e)).reduce((e,t)=>{let s=e.get(t);return s?e.set(t,s+1):e.set(t,1),e},new Map).entries()].sort((e,t)=>{let[s,r]=e,[n,a]=t;return a-r});if(!t.length)return;let s=t[0];if(!(s[1]<2))return s[0]}static getSeparatorRegex(e){return RegExp("([^".concat(e,"\n])(").concat(e,")(?!").concat(e,")"),"g")}match(e){let{password:t}=e,s=[];if(0===t.length)return s;let r=U.getMostUsedSeparatorChar(t);if(void 0===r)return s;let n=U.getSeparatorRegex(r);for(let e of t.matchAll(n)){if(void 0===e.index)continue;let t=e.index+1;s.push({pattern:"separator",token:r,i:t,j:t})}return s}}class B{match(e){let t=[],s=[];return([...Object.keys(this.matchers),...Object.keys(C.matchers)].forEach(n=>{if(!this.matchers[n]&&!C.matchers[n])return;let a=new(this.matchers[n]?this.matchers[n]:C.matchers[n].Matching)().match({password:e,omniMatch:this});a instanceof Promise?(a.then(e=>{r(t,e)}),s.push(a)):r(t,a)}),s.length>0)?new Promise((e,r)=>{Promise.all(s).then(()=>{e(n(t))}).catch(e=>{r(e)})}):n(t)}constructor(){this.matchers={date:M,dictionary:P,regex:R,repeat:q,sequence:N,spatial:G,separator:U}}}let H={second:1,minute:60,hour:3600,day:86400,month:2678400,year:0x1ea6e00,century:321408e4};class ${translate(e,t){let s=e;void 0!==t&&1!==t&&(s+="s");let{timeEstimation:r}=C.translations;return r[s].replace("{base}","".concat(t))}estimateAttackTimes(e){let t={onlineThrottling100PerHour:e/(100/3600),onlineNoThrottling10PerSecond:e/10,offlineSlowHashing1e4PerSecond:e/1e4,offlineFastHashing1e10PerSecond:e/1e10},s={onlineThrottling100PerHour:"",onlineNoThrottling10PerSecond:"",offlineSlowHashing1e4PerSecond:"",offlineFastHashing1e10PerSecond:""};return Object.keys(t).forEach(e=>{let r=t[e];s[e]=this.displayTime(r)}),{crackTimesSeconds:t,crackTimesDisplay:s,score:this.guessesToScore(e)}}guessesToScore(e){return e<1005?0:e<1000005?1:e<0x5f5e105?2:e<0x2540be405?3:4}displayTime(e){let t,s="centuries",r=Object.keys(H),n=r.findIndex(t=>e<H[t]);return n>-1&&(s=r[n-1],0!==n?t=Math.round(e/H[s]):s="ltSecond"),this.translate(s,t)}}var Z=()=>null,V=()=>({warning:C.translations.warnings.dates,suggestions:[C.translations.suggestions.dates]}),X=(e,t)=>{let s=((e,t)=>{let s=null,r=e.dictionaryName,n="lastnames"===r||r.toLowerCase().includes("firstnames");if("passwords"===r){let r;r=null,!t||e.l33t||e.reversed?e.guessesLog10<=4&&(r=C.translations.warnings.similarToCommon):r=e.rank<=10?C.translations.warnings.topTen:e.rank<=100?C.translations.warnings.topHundred:C.translations.warnings.common,s=r}else if(r.includes("wikipedia")){let e;e=null,t&&(e=C.translations.warnings.wordByItself),s=e}else n?s=t?C.translations.warnings.namesByThemselves:C.translations.warnings.commonNames:"userInputs"===r&&(s=C.translations.warnings.userInputs);return s})(e,t),r=[],n=e.token;return n.match(l)?r.push(C.translations.suggestions.capitalization):n.match(u)&&n.toLowerCase()!==n&&r.push(C.translations.suggestions.allUppercase),e.reversed&&e.token.length>=4&&r.push(C.translations.suggestions.reverseWords),e.l33t&&r.push(C.translations.suggestions.l33t),{warning:s,suggestions:r}},K=e=>"recentYear"===e.regexName?{warning:C.translations.warnings.recentYears,suggestions:[C.translations.suggestions.recentYears,C.translations.suggestions.associatedYears]}:{warning:null,suggestions:[]},J=e=>{let t=C.translations.warnings.extendedRepeat;return 1===e.baseToken.length&&(t=C.translations.warnings.simpleRepeat),{warning:t,suggestions:[C.translations.suggestions.repeated]}},Q=()=>({warning:C.translations.warnings.sequences,suggestions:[C.translations.suggestions.sequences]}),ee=e=>{let t=C.translations.warnings.keyPattern;return 1===e.turns&&(t=C.translations.warnings.straightRow),{warning:t,suggestions:[C.translations.suggestions.longerKeyboardPattern]}},et=()=>null;let es={warning:null,suggestions:[]};class er{setDefaultSuggestions(){this.defaultFeedback.suggestions.push(C.translations.suggestions.useWords,C.translations.suggestions.noNeed)}getFeedback(e,t){if(0===t.length)return this.defaultFeedback;if(e>2)return es;let s=C.translations.suggestions.anotherWord,r=this.getLongestMatch(t),n=this.getMatchFeedback(r,1===t.length);return null!=n?n.suggestions.unshift(s):n={warning:null,suggestions:[s]},n}getLongestMatch(e){let t=e[0];return e.slice(1).forEach(e=>{e.token.length>t.token.length&&(t=e)}),t}getMatchFeedback(e,t){return this.matchers[e.pattern]?this.matchers[e.pattern](e,t):C.matchers[e.pattern]&&"feedback"in C.matchers[e.pattern]?C.matchers[e.pattern].feedback(e,t):es}constructor(){this.matchers={bruteforce:Z,date:V,dictionary:X,regex:K,repeat:J,sequence:Q,spatial:ee,separator:et},this.defaultFeedback={warning:null,suggestions:[]},this.setDefaultSuggestions()}}var en=(e,t,s)=>{let r;return function(){for(var n=arguments.length,a=Array(n),i=0;i<n;i++)a[i]=arguments[i];let l=this,o=s&&!r;if(void 0!==r&&clearTimeout(r),r=setTimeout(()=>{r=void 0,s||e.apply(l,a)},t),o)return e.apply(l,a)}};let ea=()=>new Date().getTime(),ei=(e,t,s)=>{let r=new er,n=new $,a=Y.mostGuessableMatchSequence(t,e),i=ea()-s,l=n.estimateAttackTimes(a.guesses);return{calcTime:i,...a,...l,feedback:r.getFeedback(l.score,a.sequence)}},el=(e,t)=>(t&&C.extendUserInputsDictionary(t),new B().match(e)),eo=(e,t)=>{let s=ea(),r=el(e,t);if(r instanceof Promise)throw Error("You are using a Promised matcher, please use `zxcvbnAsync` for it.");return ei(r,e,s)},eh=async(e,t)=>{let s=e.substring(0,C.maxLength),r=ea();return ei(await el(s,t),s,r)}}}]);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|