@clerk/clerk-js 6.0.0-snapshot.v20251203203405 → 6.0.0-snapshot.v20251204175016
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/clerk.browser.js +5 -5
- package/dist/clerk.chips.browser.js +4 -4
- package/dist/clerk.headless.browser.js +4 -4
- package/dist/clerk.headless.js +6 -6
- package/dist/clerk.js +4 -4
- package/dist/clerk.legacy.browser.js +1 -1
- package/dist/clerk.mjs +4 -4
- package/dist/clerk.no-rhc.js +7 -7
- package/dist/clerk.no-rhc.mjs +8 -8
- package/dist/types/core/clerk.d.ts +7 -7
- package/dist/types/core/resources/DisplayConfig.d.ts +0 -1
- package/dist/types/core/resources/SignIn.d.ts +0 -1
- package/dist/types/core/resources/SignUp.d.ts +0 -1
- package/dist/types/core/resources/internal.d.ts +1 -1
- package/dist/types/utils/errorThrower.d.ts +1 -1
- package/dist/types/utils/web3.d.ts +2 -2
- package/package.json +3 -4
- package/dist/507_clerk.headless_fea342_6.0.0-snapshot.v20251203203405.js +0 -1
- package/dist/527_clerk.legacy.browser_d5034a_6.0.0-snapshot.v20251203203405.js +0 -1
- package/dist/base-account-sdk_clerk.headless.browser_6dfe05_6.0.0-snapshot.v20251203203405.js +0 -42
- package/dist/clerk.channel.browser.js +0 -18
- package/dist/coinbase-wallet-sdk_clerk.headless.browser_6dfe05_6.0.0-snapshot.v20251203203405.js +0 -3
- package/dist/cookieSuffix_clerk.legacy.browser_d5034a_6.0.0-snapshot.v20251203203405.js +0 -1
- package/dist/query-core-vendors_clerk.headless.browser_6dfe05_6.0.0-snapshot.v20251203203405.js +0 -1
- package/dist/stripe-vendors_clerk.headless.browser_6dfe05_6.0.0-snapshot.v20251203203405.js +0 -1
- package/dist/vendors_clerk.headless.browser_6dfe05_6.0.0-snapshot.v20251203203405.js +0 -1
- package/dist/zxcvbn-common_clerk.headless.browser_6dfe05_6.0.0-snapshot.v20251203203405.js +0 -1
- package/dist/zxcvbn-ts-core_clerk.headless.browser_6dfe05_6.0.0-snapshot.v20251203203405.js +0 -2
- /package/dist/{308_clerk.headless_fea342_6.0.0-snapshot.v20251203203405.js → 308_clerk.headless_b148c0_6.0.0-snapshot.v20251204175016.js} +0 -0
- /package/dist/{415_clerk.headless_fea342_6.0.0-snapshot.v20251203203405.js → 415_clerk.headless_b148c0_6.0.0-snapshot.v20251204175016.js} +0 -0
- /package/dist/{507_clerk.browser_747d7c_6.0.0-snapshot.v20251203203405.js → 507_clerk.browser_819de7_6.0.0-snapshot.v20251204175016.js} +0 -0
- /package/dist/{507_clerk.channel.browser_07dda1_6.0.0-snapshot.v20251203203405.js → 507_clerk.chips.browser_61e2f0_6.0.0-snapshot.v20251204175016.js} +0 -0
- /package/dist/{507_clerk.chips.browser_b105ae_6.0.0-snapshot.v20251203203405.js → 507_clerk.headless.browser_6d4088_6.0.0-snapshot.v20251204175016.js} +0 -0
- /package/dist/{507_clerk.headless.browser_6dfe05_6.0.0-snapshot.v20251203203405.js → 507_clerk.headless_b148c0_6.0.0-snapshot.v20251204175016.js} +0 -0
- /package/dist/{507_clerk.legacy.browser_d5034a_6.0.0-snapshot.v20251203203405.js → 507_clerk.legacy.browser_a5213a_6.0.0-snapshot.v20251204175016.js} +0 -0
- /package/dist/{521_clerk.headless_fea342_6.0.0-snapshot.v20251203203405.js → 521_clerk.headless_b148c0_6.0.0-snapshot.v20251204175016.js} +0 -0
- /package/dist/{527_clerk.browser_747d7c_6.0.0-snapshot.v20251203203405.js → 527_clerk.browser_819de7_6.0.0-snapshot.v20251204175016.js} +0 -0
- /package/dist/{527_clerk.channel.browser_07dda1_6.0.0-snapshot.v20251203203405.js → 527_clerk.chips.browser_61e2f0_6.0.0-snapshot.v20251204175016.js} +0 -0
- /package/dist/{527_clerk.chips.browser_b105ae_6.0.0-snapshot.v20251203203405.js → 527_clerk.headless.browser_6d4088_6.0.0-snapshot.v20251204175016.js} +0 -0
- /package/dist/{527_clerk.headless.browser_6dfe05_6.0.0-snapshot.v20251203203405.js → 527_clerk.legacy.browser_a5213a_6.0.0-snapshot.v20251204175016.js} +0 -0
- /package/dist/{604_clerk.headless_fea342_6.0.0-snapshot.v20251203203405.js → 604_clerk.headless_b148c0_6.0.0-snapshot.v20251204175016.js} +0 -0
- /package/dist/{694_clerk.headless_fea342_6.0.0-snapshot.v20251203203405.js → 694_clerk.headless_b148c0_6.0.0-snapshot.v20251204175016.js} +0 -0
- /package/dist/{783_clerk.headless_fea342_6.0.0-snapshot.v20251203203405.js → 783_clerk.headless_b148c0_6.0.0-snapshot.v20251204175016.js} +0 -0
- /package/dist/{973_clerk.headless_fea342_6.0.0-snapshot.v20251203203405.js → 973_clerk.headless_b148c0_6.0.0-snapshot.v20251204175016.js} +0 -0
- /package/dist/{base-account-sdk_clerk.browser_747d7c_6.0.0-snapshot.v20251203203405.js → base-account-sdk_clerk.browser_819de7_6.0.0-snapshot.v20251204175016.js} +0 -0
- /package/dist/{base-account-sdk_clerk.channel.browser_07dda1_6.0.0-snapshot.v20251203203405.js → base-account-sdk_clerk.chips.browser_61e2f0_6.0.0-snapshot.v20251204175016.js} +0 -0
- /package/dist/{base-account-sdk_clerk.chips.browser_b105ae_6.0.0-snapshot.v20251203203405.js → base-account-sdk_clerk.headless.browser_6d4088_6.0.0-snapshot.v20251204175016.js} +0 -0
- /package/dist/{base-account-sdk_clerk.legacy.browser_d5034a_6.0.0-snapshot.v20251203203405.js → base-account-sdk_clerk.legacy.browser_a5213a_6.0.0-snapshot.v20251204175016.js} +0 -0
- /package/dist/{coinbase-wallet-sdk_clerk.browser_747d7c_6.0.0-snapshot.v20251203203405.js → coinbase-wallet-sdk_clerk.browser_819de7_6.0.0-snapshot.v20251204175016.js} +0 -0
- /package/dist/{coinbase-wallet-sdk_clerk.channel.browser_07dda1_6.0.0-snapshot.v20251203203405.js → coinbase-wallet-sdk_clerk.chips.browser_61e2f0_6.0.0-snapshot.v20251204175016.js} +0 -0
- /package/dist/{coinbase-wallet-sdk_clerk.chips.browser_b105ae_6.0.0-snapshot.v20251203203405.js → coinbase-wallet-sdk_clerk.headless.browser_6d4088_6.0.0-snapshot.v20251204175016.js} +0 -0
- /package/dist/{coinbase-wallet-sdk_clerk.legacy.browser_d5034a_6.0.0-snapshot.v20251203203405.js → coinbase-wallet-sdk_clerk.legacy.browser_a5213a_6.0.0-snapshot.v20251204175016.js} +0 -0
- /package/dist/{cookieSuffix_clerk.browser_747d7c_6.0.0-snapshot.v20251203203405.js → cookieSuffix_clerk.browser_819de7_6.0.0-snapshot.v20251204175016.js} +0 -0
- /package/dist/{cookieSuffix_clerk.channel.browser_07dda1_6.0.0-snapshot.v20251203203405.js → cookieSuffix_clerk.chips.browser_61e2f0_6.0.0-snapshot.v20251204175016.js} +0 -0
- /package/dist/{cookieSuffix_clerk.chips.browser_b105ae_6.0.0-snapshot.v20251203203405.js → cookieSuffix_clerk.headless.browser_6d4088_6.0.0-snapshot.v20251204175016.js} +0 -0
- /package/dist/{cookieSuffix_clerk.headless_fea342_6.0.0-snapshot.v20251203203405.js → cookieSuffix_clerk.headless_b148c0_6.0.0-snapshot.v20251204175016.js} +0 -0
- /package/dist/{cookieSuffix_clerk.headless.browser_6dfe05_6.0.0-snapshot.v20251203203405.js → cookieSuffix_clerk.legacy.browser_a5213a_6.0.0-snapshot.v20251204175016.js} +0 -0
- /package/dist/{query-core-vendors_clerk.browser_747d7c_6.0.0-snapshot.v20251203203405.js → query-core-vendors_clerk.browser_819de7_6.0.0-snapshot.v20251204175016.js} +0 -0
- /package/dist/{query-core-vendors_clerk.channel.browser_07dda1_6.0.0-snapshot.v20251203203405.js → query-core-vendors_clerk.chips.browser_61e2f0_6.0.0-snapshot.v20251204175016.js} +0 -0
- /package/dist/{query-core-vendors_clerk.chips.browser_b105ae_6.0.0-snapshot.v20251203203405.js → query-core-vendors_clerk.headless.browser_6d4088_6.0.0-snapshot.v20251204175016.js} +0 -0
- /package/dist/{query-core-vendors_clerk.legacy.browser_d5034a_6.0.0-snapshot.v20251203203405.js → query-core-vendors_clerk.legacy.browser_a5213a_6.0.0-snapshot.v20251204175016.js} +0 -0
- /package/dist/{stripe-vendors_clerk.browser_747d7c_6.0.0-snapshot.v20251203203405.js → stripe-vendors_clerk.browser_819de7_6.0.0-snapshot.v20251204175016.js} +0 -0
- /package/dist/{stripe-vendors_clerk.channel.browser_07dda1_6.0.0-snapshot.v20251203203405.js → stripe-vendors_clerk.chips.browser_61e2f0_6.0.0-snapshot.v20251204175016.js} +0 -0
- /package/dist/{stripe-vendors_clerk.chips.browser_b105ae_6.0.0-snapshot.v20251203203405.js → stripe-vendors_clerk.headless.browser_6d4088_6.0.0-snapshot.v20251204175016.js} +0 -0
- /package/dist/{stripe-vendors_clerk.legacy.browser_d5034a_6.0.0-snapshot.v20251203203405.js → stripe-vendors_clerk.legacy.browser_a5213a_6.0.0-snapshot.v20251204175016.js} +0 -0
- /package/dist/{vendors_clerk.browser_747d7c_6.0.0-snapshot.v20251203203405.js → vendors_clerk.browser_819de7_6.0.0-snapshot.v20251204175016.js} +0 -0
- /package/dist/{vendors_clerk.channel.browser_07dda1_6.0.0-snapshot.v20251203203405.js → vendors_clerk.chips.browser_61e2f0_6.0.0-snapshot.v20251204175016.js} +0 -0
- /package/dist/{vendors_clerk.chips.browser_b105ae_6.0.0-snapshot.v20251203203405.js → vendors_clerk.headless.browser_6d4088_6.0.0-snapshot.v20251204175016.js} +0 -0
- /package/dist/{vendors_clerk.legacy.browser_d5034a_6.0.0-snapshot.v20251203203405.js → vendors_clerk.legacy.browser_a5213a_6.0.0-snapshot.v20251204175016.js} +0 -0
- /package/dist/{zxcvbn-common_clerk.browser_747d7c_6.0.0-snapshot.v20251203203405.js → zxcvbn-common_clerk.browser_819de7_6.0.0-snapshot.v20251204175016.js} +0 -0
- /package/dist/{zxcvbn-common_clerk.channel.browser_07dda1_6.0.0-snapshot.v20251203203405.js → zxcvbn-common_clerk.chips.browser_61e2f0_6.0.0-snapshot.v20251204175016.js} +0 -0
- /package/dist/{zxcvbn-common_clerk.chips.browser_b105ae_6.0.0-snapshot.v20251203203405.js → zxcvbn-common_clerk.headless.browser_6d4088_6.0.0-snapshot.v20251204175016.js} +0 -0
- /package/dist/{zxcvbn-common_clerk.legacy.browser_d5034a_6.0.0-snapshot.v20251203203405.js → zxcvbn-common_clerk.legacy.browser_a5213a_6.0.0-snapshot.v20251204175016.js} +0 -0
- /package/dist/{zxcvbn-ts-core_clerk.browser_747d7c_6.0.0-snapshot.v20251203203405.js → zxcvbn-ts-core_clerk.browser_819de7_6.0.0-snapshot.v20251204175016.js} +0 -0
- /package/dist/{zxcvbn-ts-core_clerk.channel.browser_07dda1_6.0.0-snapshot.v20251203203405.js → zxcvbn-ts-core_clerk.chips.browser_61e2f0_6.0.0-snapshot.v20251204175016.js} +0 -0
- /package/dist/{zxcvbn-ts-core_clerk.chips.browser_b105ae_6.0.0-snapshot.v20251203203405.js → zxcvbn-ts-core_clerk.headless.browser_6d4088_6.0.0-snapshot.v20251204175016.js} +0 -0
- /package/dist/{zxcvbn-ts-core_clerk.legacy.browser_d5034a_6.0.0-snapshot.v20251203203405.js → zxcvbn-ts-core_clerk.legacy.browser_a5213a_6.0.0-snapshot.v20251204175016.js} +0 -0
package/dist/coinbase-wallet-sdk_clerk.headless.browser_6dfe05_6.0.0-snapshot.v20251203203405.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
(globalThis.webpackChunk_clerk_clerk_js=globalThis.webpackChunk_clerk_clerk_js||[]).push([["929"],{3630:function(e,t){"use strict";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=w,t.fromBig=n,t.split=r;let s=BigInt(0x100000000-1),i=BigInt(32);function n(e,t=!1){return t?{h:Number(e&s),l:Number(e>>i&s)}:{h:0|Number(e>>i&s),l:0|Number(e&s)}}function r(e,t=!1){let s=e.length,i=new Uint32Array(s),a=new Uint32Array(s);for(let r=0;r<s;r++){let{h:s,l:o}=n(e[r],t);[i[r],a[r]]=[s,o]}return[i,a]}let a=(e,t)=>BigInt(e>>>0)<<i|BigInt(t>>>0);t.toBig=a;let o=(e,t,s)=>e>>>s;t.shrSH=o;let c=(e,t,s)=>e<<32-s|t>>>s;t.shrSL=c;let l=(e,t,s)=>e>>>s|t<<32-s;t.rotrSH=l;let h=(e,t,s)=>e<<32-s|t>>>s;t.rotrSL=h;let d=(e,t,s)=>e<<64-s|t>>>s-32;t.rotrBH=d;let u=(e,t,s)=>e>>>s-32|t<<64-s;t.rotrBL=u;let f=(e,t)=>t;t.rotr32H=f;let p=(e,t)=>e;t.rotr32L=p;let g=(e,t,s)=>e<<s|t>>>32-s;t.rotlSH=g;let b=(e,t,s)=>t<<s|e>>>32-s;t.rotlSL=b;let m=(e,t,s)=>t<<s-32|e>>>64-s;t.rotlBH=m;let y=(e,t,s)=>e<<s-32|t>>>64-s;function w(e,t,s,i){let n=(t>>>0)+(i>>>0);return{h:e+s+(n/0x100000000|0)|0,l:0|n}}t.rotlBL=y;let x=(e,t,s)=>(e>>>0)+(t>>>0)+(s>>>0);t.add3L=x;let k=(e,t,s,i)=>t+s+i+(e/0x100000000|0)|0;t.add3H=k;let v=(e,t,s,i)=>(e>>>0)+(t>>>0)+(s>>>0)+(i>>>0);t.add4L=v;let E=(e,t,s,i,n)=>t+s+i+n+(e/0x100000000|0)|0;t.add4H=E;let C=(e,t,s,i,n)=>(e>>>0)+(t>>>0)+(s>>>0)+(i>>>0)+(n>>>0);t.add5L=C;let I=(e,t,s,i,n,r)=>t+s+i+n+r+(e/0x100000000|0)|0;t.add5H=I,t.default={fromBig:n,split:r,toBig:a,shrSH:o,shrSL:c,rotrSH:l,rotrSL:h,rotrBH:d,rotrBL:u,rotr32H:f,rotr32L:p,rotlSH:g,rotlSL:b,rotlBH:m,rotlBL:y,add:w,add3L:x,add3H:k,add4L:v,add4H:E,add5H:I,add5L:C}},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";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 i=s(3630),n=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,i=0;e<24;e++){[s,i]=[i,(2*s+3*i)%5],d.push(2*(5*i+s)),u.push((e+1)*(e+2)/2%64);let n=r;for(let e=0;e<7;e++)(t=(t<<a^(t>>c)*h)%l)&o&&(n^=a<<(a<<BigInt(e))-a);f.push(n)}let p=(0,i.split)(f,!0),g=p[0],b=p[1],m=(e,t,s)=>s>32?(0,i.rotlBH)(e,t,s):(0,i.rotlSH)(e,t,s),y=(e,t,s)=>s>32?(0,i.rotlBL)(e,t,s):(0,i.rotlSL)(e,t,s);function w(e,t=24){let s=new Uint32Array(10);for(let i=24-t;i<24;i++){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 i=(t+8)%10,n=(t+2)%10,r=s[n],a=s[n+1],o=m(r,a,1)^s[i],c=y(r,a,1)^s[i+1];for(let s=0;s<50;s+=10)e[t+s]^=o,e[t+s+1]^=c}let t=e[2],n=e[3];for(let s=0;s<24;s++){let i=u[s],r=m(t,n,i),a=y(t,n,i),o=d[s];t=e[o],n=e[o+1],e[o]=r,e[o+1]=a}for(let t=0;t<50;t+=10){for(let i=0;i<10;i++)s[i]=e[t+i];for(let i=0;i<10;i++)e[t+i]^=~s[(i+2)%10]&s[(i+4)%10]}e[0]^=g[i],e[1]^=b[i]}(0,n.clean)(s)}class x extends n.Hash{constructor(e,t,s,i=!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=i,this.rounds=r,(0,n.anumber)(s),!(0<e&&e<200))throw Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=(0,n.u32)(this.state)}clone(){return this._cloneInto()}keccak(){(0,n.swap32IfBE)(this.state32),w(this.state32,this.rounds),(0,n.swap32IfBE)(this.state32),this.posOut=0,this.pos=0}update(e){(0,n.aexists)(this),e=(0,n.toBytes)(e),(0,n.abytes)(e);let{blockLen:t,state:s}=this,i=e.length;for(let n=0;n<i;){let r=Math.min(t-this.pos,i-n);for(let t=0;t<r;t++)s[this.pos++]^=e[n++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:e,suffix:t,pos:s,blockLen:i}=this;e[s]^=t,(128&t)!=0&&s===i-1&&this.keccak(),e[i-1]^=128,this.keccak()}writeInto(e){(0,n.aexists)(this,!1),(0,n.abytes)(e),this.finish();let t=this.state,{blockLen:s}=this;for(let i=0,n=e.length;i<n;){this.posOut>=s&&this.keccak();let r=Math.min(s-this.posOut,n-i);e.set(t.subarray(this.posOut,this.posOut+r),i),this.posOut+=r,i+=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,n.anumber)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,n.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,n.clean)(this.state)}_cloneInto(e){let{blockLen:t,suffix:s,outputLen:i,rounds:n,enableXOF:r}=this;return e||(e=new x(t,s,i,r,n)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=n,e.suffix=s,e.outputLen=i,e.enableXOF=r,e.destroyed=this.destroyed,e}}t.Keccak=x;let k=(e,t,s)=>(0,n.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,n.createXOFer)((i={})=>new x(t,e,void 0===i.dkLen?s:i.dkLen,!0));t.shake128=v(31,168,16),t.shake256=v(31,136,32)},5047:function(e,t,s){"use strict";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=n,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,t=!0){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(...e){for(let t=0;t<e.length;t++)e[t].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 i=new Uint8Array(s);for(let t=0,n=0;t<s;t++,n+=2){let s=d(e.charCodeAt(n)),r=d(e.charCodeAt(n+1));if(void 0===s||void 0===r)throw Error('hex string expected, got non-hex character "'+(e[n]+e[n+1])+'" at index '+n);i[t]=16*s+r}return i},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(...e){let t=0;for(let s=0;s<e.length;s++){let i=e[s];a(i),t+=i.length}let s=new Uint8Array(t);for(let t=0,i=0;t<e.length;t++){let n=e[t];s.set(n,i),i+=n.length}return s},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=m,t.randomBytes=function(e=32){if(i.crypto&&"function"==typeof i.crypto.getRandomValues)return i.crypto.getRandomValues(new Uint8Array(e));if(i.crypto&&"function"==typeof i.crypto.randomBytes)return Uint8Array.from(i.crypto.randomBytes(e));throw Error("crypto.getRandomValues must be defined")};let i=s(5977);function n(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,...t){if(!n(e))throw Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw Error("Uint8Array expected of length "+t+", 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,i){let n=Date.now();for(let r=0;r<e;r++){i(r);let e=Date.now()-n;e>=0&&e<s||(await (0,t.nextTick)(),n+=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 m(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=m},3453:function(e,t,s){let i=s(7957);function n(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,n,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,i.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 i.setLengthRight(t,32)}else if(e.startsWith("uint")){if((s=r(e))%8||s<8||s>256)throw Error("Invalid uint<N> width: "+s);n=c(t);let a=i.bitLengthFromBigInt(n);if(a>s)throw Error("Supplied uint exceeds width: "+s+" vs "+a);if(n<0)throw Error("Supplied uint is negative");return i.bufferBEFromBigInt(n,32)}else if(e.startsWith("int")){if((s=r(e))%8||s<8||s>256)throw Error("Invalid int<N> width: "+s);n=c(t);let a=i.bitLengthFromBigInt(n);if(a>s)throw Error("Supplied int exceeds width: "+s+" vs "+a);let o=i.twosFromBigInt(n,256);return i.bufferBEFromBigInt(o,32)}else if(e.startsWith("ufixed")){if(s=a(e),(n=c(t))<0)throw Error("Supplied ufixed is negative");return l("uint256",n*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=n(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(i.setLength(d,20));else if(h.startsWith("bytes")){if((s=r(h))<1||s>32)throw Error("Invalid bytes<N> width: "+s);o.push(i.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=i.bitLengthFromBigInt(a);if(e>s)throw Error("Supplied uint exceeds width: "+s+" vs "+e);o.push(i.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=i.bitLengthFromBigInt(a);if(e>s)throw Error("Supplied int exceeds width: "+s+" vs "+e);let t=i.twosFromBigInt(a,s);o.push(i.bufferBEFromBigInt(t,s/8))}else throw Error("Unsupported or invalid type: "+h)}return Buffer.concat(o)}e.exports={rawEncode:function(e,t){var s=[],i=[],r=32*e.length;for(var a in e){var c=n(e[a]),h=l(c,t[a]);"string"===c||"bytes"===c||"dynamic"===o(c)?(s.push(l("uint256",r)),i.push(h),r+=h.length):s.push(h)}return Buffer.concat(s.concat(i))},solidityPack:h,soliditySHA3:function(e,t){return i.keccak(h(e,t))}}},619:function(e,t,s){let i=s(7957),n=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":i.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",i.keccak(a)];if("string"===t)return"string"==typeof a&&(a=Buffer.from(a,"utf8")),["bytes32",i.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",i.keccak(n.rawEncode(r.map(([e])=>e),r.map(([,e])=>e)))]}return[t,a]};for(let i of s[e]){let[e,s]=c(i.name,i.type,t[i.name]);a.push(e),o.push(s)}}else for(let n of s[e]){let e=t[n.name];if(void 0!==e)if("bytes"===n.type)a.push("bytes32"),e=i.keccak(e),o.push(e);else if("string"===n.type)a.push("bytes32"),"string"==typeof e&&(e=Buffer.from(e,"utf8")),e=i.keccak(e),o.push(e);else if(void 0!==s[n.type])a.push("bytes32"),e=i.keccak(this.encodeData(n.type,e,s,r)),o.push(e);else if(n.type.lastIndexOf("]")===n.type.length-1)throw Error("Arrays currently unimplemented in encodeData");else a.push(n.type),o.push(e)}return n.rawEncode(a,o)},encodeType(e,t){let s="",i=this.findTypeDependencies(e,t).filter(t=>t!==e);for(let n of i=[e].concat(i.sort())){if(!t[n])throw Error("No type definition specified: "+n);s+=n+"("+t[n].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 i of(s.push(e),t[e]))for(let e of this.findTypeDependencies(i.type,t,s))s.includes(e)||s.push(e);return s},hashStruct(e,t,s,n=!0){return i.keccak(this.encodeData(e,t,s,n))},hashType(e,t){return i.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),n=[Buffer.from("1901","hex")];return n.push(this.hashStruct("EIP712Domain",s.domain,s.types,t)),"EIP712Domain"!==s.primaryType&&n.push(this.hashStruct(s.primaryType,s.message,s.types,t)),i.keccak(Buffer.concat(n))}};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?i.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 n.soliditySHA3(["bytes32","bytes32"],[n.soliditySHA3(Array(e.length).fill("string"),a),n.soliditySHA3(r,s)])}(e.data)},hashForSignTypedData_v3:function(e){return a.hash(e.data,!1)},hashForSignTypedData_v4:function(e){return a.hash(e.data)}}},7957:function(e,t,s){let{keccak_256:i}=s(4907);function n(e){return Buffer.allocUnsafe(e).fill(0)}function r(e,t){let s=e.toString(16);s.length%2!=0&&(s="0"+s);let i=s.match(/.{1,2}/g).map(e=>parseInt(e,16));for(;i.length<t;)i.unshift(0);return Buffer.from(i)}function a(e,t,s){let i=n(t);return(e=o(e),s)?e.length<t?(e.copy(i),i):e.slice(0,t):e.length<t?(e.copy(i,t-e.length),i):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:n,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(i(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 i;s.r(t),s.d(t,{createCoinbaseWalletSDK:()=>te,default:()=>tt,CoinbaseWalletSDK:()=>e7});class n{constructor(e,t){this.scope=e,this.module=t}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 i=localStorage.key(s);"string"==typeof i&&i.startsWith(e)&&t.push(i)}t.forEach(e=>localStorage.removeItem(e))}scopedKey(e){return`-${this.scope}${this.module?`:${this.module}`:""}:${e}`}static clearAll(){new n("CBWSDK").clear(),new n("walletlink").clear()}}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,t=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 m=e=>C(r,e),y=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:i}=e;if(!s||"string"!=typeof s)throw Error('"message" must be a nonempty string');return new M(t,s,i)};function C(e,t){let[s,i]=L(t);return new A(e,s||f(e),i)}function I(e,t){let[s,i]=L(t);return new M(e,s||f(e),i)}function L(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 A 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 A{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,t=!1){let s=e.toString("hex");return t?`0x${s}`:s}function j(e){return N(F(e),!0)}function R(e){return e.toString(10)}function P(e){return`0x${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${e.slice(2)}`:`0x${e}`}function q(e){if("string"!=typeof e)return!1;let t=B(e).toLowerCase();return D.test(t)}function V(e,t=!1){let s=function(e,t=!1){if("string"==typeof e){let s=B(e).toLowerCase();if(D.test(s))return t?`0x${s}`:s}throw m(`"${String(e)}" is not a hexadecimal string`)}(e,!1);return s.length%2==1&&(s=`0${s}`),t?`0x${s}`:s}function Z(e){if("string"==typeof e){let t=B(e).toLowerCase();if(q(t)&&40===t.length)return W(t)}throw m(`Invalid Ethereum address: ${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 m(`Not binary data: ${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 m(`Not an integer: ${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 m(`Not an integer: ${String(e)}`)}async function $(){return crypto.subtle.generateKey({name:"ECDH",namedCurve:"P-256"},!0,["deriveKey"])}async function G(e,t){return crypto.subtle.deriveKey({name:"ECDH",public:t},e,{name:"AES-GCM",length:256},!1,["encrypt","decrypt"])}async function Q(e,t){let s=crypto.getRandomValues(new Uint8Array(12)),i=await crypto.subtle.encrypt({name:"AES-GCM",iv:s},e,new TextEncoder().encode(t));return{iv:s,cipherText:i}}async function J(e,{iv:t,cipherText:s}){let i=await crypto.subtle.decrypt({name:"AES-GCM",iv:t},e,s);return new TextDecoder().decode(i)}function Y(e){switch(e){case"public":return"spki";case"private":return"pkcs8"}}async function X(e,t){let s=Y(e);return T(new Uint8Array(await crypto.subtle.exportKey(s,t)))}async function ee(e,t){let s=Y(e),i=U(t).buffer;return await crypto.subtle.importKey(s,new Uint8Array(i),{name:"ECDH",namedCurve:"P-256"},!0,"private"===e?["deriveKey"]:[])}async function et(e,t){return Q(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 J(t,e))}let ei={storageKey:"ownPrivateKey",keyType:"private"},en={storageKey:"ownPublicKey",keyType:"public"},er={storageKey:"peerPublicKey",keyType:"public"};class ea{constructor(){this.storage=new n("CBWSDK","SCWKeyManager"),this.ownPrivateKey=null,this.ownPublicKey=null,this.peerPublicKey=null,this.sharedSecret=null}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(en.storageKey),this.storage.removeItem(ei.storageKey),this.storage.removeItem(er.storageKey)}async generateKeyPair(){let e=await $();this.ownPrivateKey=e.privateKey,this.ownPublicKey=e.publicKey,await this.storeKey(ei,e.privateKey),await this.storeKey(en,e.publicKey)}async loadKeysIfNeeded(){null===this.ownPrivateKey&&(this.ownPrivateKey=await this.loadKey(ei)),null===this.ownPublicKey&&(this.ownPublicKey=await this.loadKey(en)),(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 G(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 X(e.keyType,t);this.storage.setItem(e.storageKey,s)}}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()}),i=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:n,error:r}=await i.json();if(r)throw r;return n}function eh({metadata:e,preference:t}){var s,i;let{appName:n,appLogoUrl:r,appChainIds:a}=e;if("smartWalletOnly"!==t.options){let e=globalThis.coinbaseWalletExtension;if(e)return null==(s=e.setAppInfo)||s.call(e,n,r,a,t),e}let o=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==o?void 0:o.isCoinbaseBrowser)return null==(i=o.setAppInfo)||i.call(o,n,r,a,t),o}let ed="accounts",eu="activeChain",ef="availableChains",ep="walletCapabilities";class eg{constructor(e){var t,s,i;this.metadata=e.metadata,this.communicator=e.communicator,this.callback=e.callback,this.keyManager=new ea,this.storage=new n("CBWSDK","SCWStateManager"),this.accounts=null!=(t=this.storage.loadObject(ed))?t:[],this.chain=this.storage.loadObject(eu)||{id:null!=(i=null==(s=e.metadata.appChainIds)?void 0:s[0])?i: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)}async handshake(e){var t,s,i,n;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!=(i=e.params)?i:{})}}),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==(n=this.callback)||n.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 y("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 i=await this.sendEncryptedRequest(e),n=(await this.decryptResponseMessage(i)).result;if("error"in n)throw n.error;return n.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 m();let i=K(s[0].chainId);if(this.updateChain(i))return null;let n=await this.sendRequestToPopup(e);return null===n&&this.updateChain(i),n}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),i=await this.createRequestMessage({encrypted:s});return this.communicator.postRequestAndWaitForResponse(i)}async createRequestMessage(e){let t=await X("public",await this.keyManager.getOwnPublicKey());return{id:crypto.randomUUID(),sender:t,content:e,timestamp:new Date}}async decryptResponseMessage(e){var t,s;let i=e.content;if("failure"in i)throw i.failure;let n=await this.keyManager.getSharedSecret();if(!n)throw x("Invalid session");let r=await es(i.encrypted,n),a=null==(t=r.data)?void 0:t.chains;if(a){let e=Object.entries(a).map(([e,t])=>({id:Number(e),rpcUrl:t}));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 i=null!=t?t:this.storage.loadObject(ef),n=null==i?void 0:i.find(t=>t.id===e);return!!n&&(n!==this.chain&&(this.chain=n,this.storage.storeObject(eu,n),null==(s=this.callback)||s.call(this,"chainChanged",P(n.id))),!0)}}var eb,em,ey=s(619);let ew="Addresses";function ex(e){return void 0!==e.errorMessage}class ek{constructor(e){this.secret=e}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)),i=await crypto.subtle.importKey("raw",U(t),{name:"aes-gcm"},!1,["encrypt","decrypt"]),n=new TextEncoder,r=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:s},i,n.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,i)=>{!async function(){let n=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,n,c),t=new TextDecoder;s(t.decode(e))}catch(e){i(e)}}()})}}class ev{constructor(e,t,s){this.linkAPIUrl=e,this.sessionId=t;const i=`${t}:${s}`;this.auth=`Basic ${btoa(i)}`}async markUnseenEventsAsSeen(e){return Promise.all(e.map(e=>fetch(`${this.linkAPIUrl}/events/${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(`${this.linkAPIUrl}/events?unseen=true`,{headers:{Authorization:this.auth}});if(t.ok){let{events:s,error:i}=await t.json();if(i)throw Error(`Check unseen events failed: ${i}`);let n=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(n),n}throw Error(`Check unseen events failed: ${t.status}`)}}(eb=em||(em={}))[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}constructor(e,t=WebSocket){this.WebSocketClass=t,this.webSocket=null,this.pendingData=[],this.url=e.replace(/^http/,"ws")}async connect(){if(this.webSocket)throw Error("webSocket object is not null");return new Promise((e,t)=>{var s;let i;try{this.webSocket=i=new this.WebSocketClass(this.url)}catch(e){t(e);return}null==(s=this.connectionStateListener)||s.call(this,em.CONNECTING),i.onclose=e=>{var s;this.clearWebSocket(),t(Error(`websocket error ${e.code}: ${e.reason}`)),null==(s=this.connectionStateListener)||s.call(this,em.DISCONNECTED)},i.onopen=t=>{var s;e(),null==(s=this.connectionStateListener)||s.call(this,em.CONNECTED),this.pendingData.length>0&&([...this.pendingData].forEach(e=>this.sendData(e)),this.pendingData=[])},i.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,em.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)}}class eC{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 i=e[s];void 0!==i&&t(i)})},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 i=await this.cipher.decrypt(t);null==(s=this.listener)||s.metadataUpdated(e,i)},this.handleWalletUsernameUpdated=async e=>{this.handleMetadataUpdated("walletUsername",e)},this.handleAppVersionUpdated=async e=>{this.handleMetadataUpdated("AppVersion",e)},this.handleChainUpdated=async(e,t)=>{var s;let i=await this.cipher.decrypt(e),n=await this.cipher.decrypt(t);null==(s=this.listener)||s.chainUpdated(i,n)},this.session=e,this.cipher=new ek(e.secret),this.listener=s;const i=new eE(`${t}/rpc`,WebSocket);i.setConnectionStateListener(async e=>{let t=!1;switch(e){case em.DISCONNECTED:if(!this.destroyed){let e=async()=>{await new Promise(e=>setTimeout(e,5e3)),this.destroyed||i.connect().catch(()=>{e()})};e()}break;case em.CONNECTED:t=await this.handleConnected(),this.updateLastHeartbeat(),setInterval(()=>{this.heartbeat()},1e4),this.shouldFetchUnseenEventsOnConnect&&this.fetchUnseenEventsAPI();case em.CONNECTING:}this.connected!==t&&(this.connected=t)}),i.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=i,this.http=new ev(t,e.id,e.key)}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:i,response:n}=s;null==(t=this.listener)||t.handleWeb3ResponseMessage(i,n)}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,s=!1){let i=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"}))),n={type:"PublishEvent",id:S(this.nextReqId++),sessionId:this.session.id,event:e,data:i,callWebhook:s};return this.setOnceLinked(async()=>{let e=await this.makeRequest(n);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,t={timeout:6e4}){let s,i=e.id;return this.sendData(e),Promise.race([new Promise((e,n)=>{s=window.setTimeout(()=>{n(Error(`request ${i} timed out`))},t.timeout)}),new Promise(e=>{this.requestResolutions.set(i,t=>{clearTimeout(s),e(t),this.requestResolutions.delete(i)})})])}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)}}class eI{constructor(){this._nextRequestId=0,this.callbacks=new Map}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}}var eL=s(6340),eA=s(515);let eM="session:id",eS="session:secret",eO="session:linked";class eD{constructor(e,t,s,i=!1){this.storage=e,this.id=t,this.secret=s,this.key=(0,eA.My)((0,eL.sc)(`${t}, ${s} WalletLink`)),this._linked=!!i}static create(e){return new eD(e,_(16),_(32)).save()}static load(e){let t=e.getItem(eM),s=e.getItem(eO),i=e.getItem(eS);return t&&i?new eD(e,t,i,"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")}}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}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{constructor(){this.items=new Map,this.nextItemKey=0,this.root=null,this.darkMode=e_()}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,t])=>(0,eN.h)(eH,Object.assign({},t,{key:e}))))),this.root)}}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=({autoExpand:e,message:t,menuItems:s})=>{let[i,n]=(0,ej.J0)(!0),[r,a]=(0,ej.J0)(null!=e&&e);return(0,ej.vJ)(()=>{let e=[window.setTimeout(()=>{n(!1)},1),window.setTimeout(()=>{a(!0)},1e4)];return()=>{e.forEach(window.clearTimeout)}}),(0,eN.h)("div",{class:(0,eU.$)("-cbwsdk-snackbar-instance",i&&"-cbwsdk-snackbar-instance-hidden",r&&"-cbwsdk-snackbar-instance-expanded")},(0,eN.h)("div",{class:"-cbwsdk-snackbar-instance-header",onClick:()=>{a(!r)}},(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"},t),(0,eN.h)("div",{class:"-gear-container"},!r&&(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"}))),s&&s.length>0&&(0,eN.h)("div",{class:"-cbwsdk-snackbar-instance-menu"},s.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{constructor(){this.attached=!1,this.snackbar=new eR}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)}}class eW{constructor(){this.root=null,this.darkMode=e_()}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))}}let eq=({title:e,buttonText:t,darkMode:s,onButtonClick:i,onDismiss:n})=>(0,eN.h)(eP,{darkMode:s},(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:n}),(0,eN.h)("div",{class:(0,eU.$)("-cbwsdk-redirect-dialog-box",s?"dark":"light")},(0,eN.h)("p",null,e),(0,eN.h)("button",{onClick:i},t)))),eV="https://www.walletlink.org";class eZ{constructor(){this.attached=!1,this.redirectDialog=new eW}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()}}}class eF{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(" "),i="true"===this.storage.getItem("IsStandaloneSigning");""===s[0]||e||!this._session.linked||i||(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:i}=this.subscribe();this._session=t,this.connection=i,this.relayEventManager=new eI,this.ui=s,this.ui.attach()}subscribe(){let e=eD.load(this.storage)||eD.create(this.storage),{linkAPIUrl:t}=this,s=new eC({session:e,linkAPIUrl:t,listener:this}),i=this.isMobileWeb?new eZ:new eB;return s.connect(),{session:e,ui:i,connection:s}}resetAndReload(){this.connection.destroy().then(()=>{let e=eD.load(this.storage);(null==e?void 0:e.id)===this._session.id&&n.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),i=i=>{this.publishWeb3RequestCanceledEvent(s),this.handleErrorResponse(s,e.method,i),null==t||t()};return new Promise((n,r)=>{t=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:i,onResetConnection:this.resetAndReload}),this.relayEventManager.callbacks.set(s,e=>{if(null==t||t(),ex(e))return r(Error(e.errorMessage));n(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 i;let n=null!=(i=null==s?void 0:s.message)?i:"Unspecified error message.";this.handleWeb3ResponseMessage(e,{method:t,errorMessage:n})}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}},i=_(8);return new Promise((e,t)=>{this.relayEventManager.callbacks.set(i,s=>{if(ex(s))return t(Error(s.errorMessage));e(s)}),eF.accountRequestCallbackIds.add(i),this.publishWeb3RequestEvent(i,s)})}watchAsset(e,t,s,i,n,r){let a={method:"watchAsset",params:{type:e,options:{address:t,symbol:s,decimals:i,image:n},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,i,n,r){let a={method:"addEthereumChain",params:{chainId:e,rpcUrls:t,blockExplorerUrls:i,chainName:n,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})},i=null,n=_(8),r=e=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,s.method,e),null==i||i()};return i=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:r,onResetConnection:this.resetAndReload}),new Promise((e,t)=>{this.relayEventManager.callbacks.set(n,s=>(null==i||i(),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(n,s)})}}eF.accountRequestCallbackIds=new Set;let eK="DefaultChainId",ez="DefaultJsonRpcUrl";class e${constructor(e){this._relay=null,this._addresses=[],this.metadata=e.metadata,this._storage=new n("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()}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 i=this.getChainId();this._storage.setItem(eK,t.toString(10)),K(t)!==i&&(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 m("Type is required");if((null==t?void 0:t.type)!=="ERC20")throw m(`Asset of type '${t.type}' is not supported`);if(!(null==t?void 0:t.options))throw m("Options are required");if(!(null==t?void 0:t.options.address))throw m("Address is required");let s=this.getChainId(),{address:i,symbol:n,image:r,decimals:a}=t.options,o=this.initializeRelay(),c=await o.watchAsset(t.type,i,n,a,r,null==s?void 0:s.toString());return!ex(c)&&!!c.result}async addEthereumChain(e){var t,s;let i=e[0];if((null==(t=i.rpcUrls)?void 0:t.length)===0)throw m("please pass in at least 1 rpcUrl");if(!i.chainName||""===i.chainName.trim())throw m("chainName is a required field");if(!i.nativeCurrency)throw m("nativeCurrency is a required field");let n=Number.parseInt(i.chainId,16);if(n===this.getChainId())return!1;let r=this.initializeRelay(),{rpcUrls:a=[],blockExplorerUrls:o=[],chainName:c,iconUrls:l=[],nativeCurrency:h}=i,d=await r.addEthereumChain(n.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],n),null;throw y("unable to add ethereum chain")}async switchEthereumChain(e){let t=Number.parseInt(e[0].chainId,16),s=this.initializeRelay(),i=await s.switchEthereumChain(t.toString(10),this.selectedAddress||void 0);if(ex(i))throw i;let n=i.result;return n.isApproved&&n.rpcUrl.length>0&&this.updateProviderInfo(n.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 i=e.map(e=>Z(e));JSON.stringify(i)!==JSON.stringify(this._addresses)&&(this._addresses=i,null==(s=this.callback)||s.call(this,"accountsChanged",i),this._storage.setItem(ew,i.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 y("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,i=null!=e.value?z(e.value):BigInt(0),n=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:i,data:n,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 m();let i=this.initializeRelay(),n=await i.sendRequest({method:"ethereumAddressFromSignedMessage",params:{message:j(s[0]),signature:j(s[1]),addPrefix:"personal_ecRecover"===t}});if(ex(n))throw n;return n.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(),i=await s.requestEthereumAccounts();if(ex(i))throw i;if(!i.result)throw Error("accounts received is empty");return this._setAddresses(i.result),null==(t=this.callback)||t.call(this,"connect",{chainId:P(this.getChainId())}),this._addresses}async personalSign({params:e}){if(!Array.isArray(e))throw m();let t=e[1],s=e[0];this._ensureKnownAddress(t);let i=this.initializeRelay(),n=await i.sendRequest({method:"signEthereumMessage",params:{address:Z(t),message:j(s),addPrefix:!0,typedDataJson:null}});if(ex(n))throw n;return n.result}async _eth_signTransaction(e){let t=this._prepareTransactionParams(e[0]||{}),s=this.initializeRelay(),i=await s.signEthereumTransaction(t);if(ex(i))throw i;return i.result}async _eth_sendRawTransaction(e){let t=F(e[0]),s=this.initializeRelay(),i=await s.submitEthereumTransaction(t,this.getChainId());if(ex(i))throw i;return i.result}async _eth_sendTransaction(e){let t=this._prepareTransactionParams(e[0]||{}),s=this.initializeRelay(),i=await s.signAndSubmitEthereumTransaction(t);if(ex(i))throw i;return i.result}async signTypedData(e){let{method:t,params:s}=e;if(!Array.isArray(s))throw m();let i=s[+("eth_signTypedData_v1"===t)],n=s[+("eth_signTypedData_v1"!==t)];this._ensureKnownAddress(i);let r=this.initializeRelay(),a=await r.sendRequest({method:"signEthereumMessage",params:{address:Z(i),message:N(({eth_signTypedData_v1:ey.hashForSignTypedDataLegacy,eth_signTypedData_v3:ey.hashForSignTypedData_v3,eth_signTypedData_v4:ey.hashForSignTypedData_v4,eth_signTypedData:ey.hashForSignTypedData_v4})[t]({data:function(e){if("string"==typeof e)return JSON.parse(e);if("object"==typeof e)return e;throw m(`Not a JSON string or an object: ${String(e)}`)}(n)}),!0),typedDataJson:JSON.stringify(n,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}}let eG="SignerType",eQ=new n("CBWSDK","SignerConfigurator");async function eJ(e){let{communicator:t,metadata:s,handshakeRequest:i,callback:n}=e;eY(t,s,n).catch(()=>{});let r={id:crypto.randomUUID(),event:"selectSignerType",data:Object.assign(Object.assign({},e.preference),{handshakeRequest:i})},{data:a}=await t.postRequestAndWaitForResponse(r);return a}async function eY(e,t,s){await e.onMessage(({event:e})=>"WalletLinkSessionRequest"===e);let i=new e$({metadata:t,callback:s});e.postMessage({event:"WalletLinkUpdate",data:{session:i.getSession()}}),await i.handshake(),e.postMessage({event:"WalletLinkUpdate",data:{connected:!0}})}let eX=`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.
|
|
2
|
-
|
|
3
|
-
Please see https://www.smartwallet.dev/guides/tips/popup-tips#cross-origin-opener-policy for more information.`,{checkCrossOriginOpenerPolicy:e0,getCrossOriginOpenerPolicy:e1}={getCrossOriginOpenerPolicy:()=>void 0===i?"undefined":i,checkCrossOriginOpenerPolicy:async()=>{if("undefined"==typeof window){i="non-browser-env";return}try{let e=`${window.location.origin}${window.location.pathname}`,t=await fetch(e,{method:"HEAD"});if(!t.ok)throw Error(`HTTP error! status: ${t.status}`);let s=t.headers.get("Cross-Origin-Opener-Policy");i=null!=s?s:"null","same-origin"===i&&console.error(eX)}catch(e){console.error("Error checking Cross-Origin-Opener-Policy:",e.message),i="error"}}};class e2{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(({requestId:t})=>t===e.id);return this.postMessage(e),await t},this.onMessage=async e=>new Promise((t,s)=>{let i=s=>{if(s.origin!==this.url.origin)return;let n=s.data;e(n)&&(t(n),window.removeEventListener("message",i),this.listeners.delete(i))};window.addEventListener("message",i),this.listeners.set(i,{reject:s})}),this.disconnect=()=>{var e;(e=this.popup)&&!e.closed&&e.close(),this.popup=null,this.listeners.forEach(({reject:e},t)=>{e(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 i=e;for(let[e,t]of Object.entries({sdkName:ec,sdkVersion:eo,origin:window.location.origin,coop:e1()}))i.searchParams.append(e,t.toString());let n=`wallet_${crypto.randomUUID()}`,r=window.open(e,n,`width=420, height=540, left=${t}, top=${s}`);if(null==r||r.focus(),!r)throw y("Pop up window failed to open");return r}(this.url),this.onMessage(({event:e})=>"PopupUnload"===e).then(this.disconnect).catch(()=>{}),this.onMessage(({event:e})=>"PopupLoaded"===e).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 y();return this.popup})),this.url=new URL(e),this.metadata=t,this.preference=s}}var e3=s(9977);class e5 extends e3.b{}var e4=function(e,t){var s={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(s[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,i=Object.getOwnPropertySymbols(e);n<i.length;n++)0>t.indexOf(i[n])&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(s[i[n]]=e[i[n]]);return s};class e8 extends e5{constructor(e){var{metadata:t}=e,s=e.preference,{keysUrl:i}=s,n=e4(s,["keysUrl"]);super(),this.signer=null,this.isCoinbaseWallet=!0,this.metadata=t,this.preference=n,this.communicator=new e2({url:i,metadata:t,preference:n});const r=eQ.getItem(eG);r&&(this.signer=this.initSigner(r))}async request(e){try{if(!function(e){if(!e||"object"!=typeof e||Array.isArray(e))throw m({message:"Expected a single, non-array, object argument.",data:e});let{method:t,params:s}=e;if("string"!=typeof t||0===t.length)throw m({message:"'args.method' must be a non-empty string.",data:e});if(void 0!==s&&!Array.isArray(s)&&("object"!=typeof s||null===s))throw m({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,eQ.setItem(eG,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(i){let e,t,{code:s}=i;return s===c&&this.disconnect(),Promise.reject((e=function(e,{shouldIncludeStack:t=!1}={}){var s,i;let n={};if(e&&"object"==typeof e&&!Array.isArray(e)&&g(e,"code")&&Number.isInteger(s=e.code)&&(d[s.toString()]||(i=s)>=-32099&&i<=-32e3))n.code=e.code,e.message&&"string"==typeof e.message?(n.message=e.message,g(e,"data")&&(n.data=e.data)):(n.message=f(n.code),n.data={originalError:p(e)});else n.code=a,n.message=b(e,"message")?e.message:u,n.data={originalError:p(e)};return t&&(n.stack=b(e,"stack")?e.stack:void 0),n}(function(e){var t;if("string"==typeof e)return{message:e,code:a};if(ex(e)){let s=e.errorMessage,i=null!=(t=e.errorCode)?t:s.match(/(denied|rejected)/i)?o:void 0;return Object.assign(Object.assign({},e),{message:s,code:i,data:{method:e.method}})}return e}(i),{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,n.clearAll(),this.emit("disconnect",v("User initiated disconnection"))}requestSignerSelection(e){return eJ({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:i,callback:n}=e;switch(t){case"scw":return new eg({metadata:s,callback:n,communicator:i});case"walletlink":return new e$({metadata:s,callback:n})}}({signerType:e,metadata:this.metadata,communicator:this.communicator,callback:this.emit.bind(this)})}}function e6(e){if(e){if(!["all","smartWalletOnly","eoaOnly"].includes(e.options))throw Error(`Invalid options: ${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 e7{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,i=e?e.getAttribute("href"):null;return!i||i.startsWith("javascript:")||i.startsWith("vbscript:")?`${t}//${s}/favicon.ico`:i.startsWith("http://")||i.startsWith("https://")||i.startsWith("data:")?i:i.startsWith("//")?t+i:`${t}//${s}${i}`}(),appChainIds:e.appChainIds||[]},this.storeLatestVersion(),e0()}makeWeb3Provider(e={options:"all"}){var t;e6(e);let s={metadata:this.metadata,preference:e};return null!=(t=eh(s))?t:new e8(s)}getCoinbaseWalletLogo(e,t=240){let s;switch(e){case"standard":default:return s=t,`data:image/svg+xml,%3Csvg width='${t}' height='${s}' 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 s=t,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${t}' height='${s}' 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 s=(.1*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${s}' 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 s=(.25*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${s}' 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 s=(.1*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${s}' 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 s=(.25*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${s}' 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 n("CBWSDK").setItem("VERSION",eo)}}let e9={options:"all"};function te(e){var t;new n("CBWSDK").setItem("VERSION",eo),e0();let s={metadata:{appName:e.appName||"Dapp",appLogoUrl:e.appLogoUrl||"",appChainIds:e.appChainIds||[]},preference:Object.assign(e9,null!=(t=e.preference)?t:{})};e6(s.preference);let i=null;return{getProvider:()=>{var e;let t;return i||(i=null!=(e=eh(t={metadata:s.metadata,preference:s.preference}))?e:new e8(t)),i}}}let tt=e7},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:()=>m,Vr:()=>y,WM:()=>p,WQ:()=>b,im:()=>g,jm:()=>o,lD:()=>r,qh:()=>h,rE:()=>c,ry:()=>l,xn:()=>a});let i=BigInt(0x100000000-1),n=BigInt(32);function r(e,t=!1){let s=e.length,a=new Uint32Array(s),o=new Uint32Array(s);for(let r=0;r<s;r++){let{h:s,l:c}=function(e,t=!1){return t?{h:Number(e&i),l:Number(e>>n&i)}:{h:0|Number(e>>n&i),l:0|Number(e&i)}}(e[r],t);[a[r],o[r]]=[s,c]}return[a,o]}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,i){let n=(t>>>0)+(i>>>0);return{h:e+s+(n/0x100000000|0)|0,l:0|n}}let m=(e,t,s)=>(e>>>0)+(t>>>0)+(s>>>0),y=(e,t,s,i)=>t+s+i+(e/0x100000000|0)|0,w=(e,t,s,i)=>(e>>>0)+(t>>>0)+(s>>>0)+(i>>>0),x=(e,t,s,i,n)=>t+s+i+n+(e/0x100000000|0)|0,k=(e,t,s,i,n)=>(e>>>0)+(t>>>0)+(s>>>0)+(i>>>0)+(n>>>0),v=(e,t,s,i,n,r)=>t+s+i+n+r+(e/0x100000000|0)|0},696:function(e,t,s){"use strict";s.d(t,{w:()=>r});var i=s(515);class n extends i.Vw{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,(0,i.sd)(e);const s=(0,i.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 n=this.blockLen,r=new Uint8Array(n);r.set(s.length>n?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,i.uH)(r)}update(e){return(0,i.CC)(this),this.iHash.update(e),this}digestInto(e){(0,i.CC)(this),(0,i.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:i,destroyed:n,blockLen:r,outputLen:a}=this;return e.finished=i,e.destroyed=n,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()}}let r=(e,t,s)=>new n(e,t).update(s).digest();r.create=(e,t)=>new n(e,t)},5355:function(e,t,s){"use strict";s.d(t,{sc:()=>w,qt:()=>k,Zf:()=>x});var i=s(515);class n extends i.Vw{constructor(e,t,s,n){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=s,this.isLE=n,this.buffer=new Uint8Array(e),this.view=(0,i.O8)(this.buffer)}update(e){(0,i.CC)(this),e=(0,i.ZJ)(e),(0,i.DO)(e);let{view:t,buffer:s,blockLen:n}=this,r=e.length;for(let a=0;a<r;){let o=Math.min(n-this.pos,r-a);if(o===n){let t=(0,i.O8)(e);for(;n<=r-a;a+=n)this.process(t,a);continue}s.set(e.subarray(a,a+o),this.pos),this.pos+=o,a+=o,this.pos===n&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,i.CC)(this),(0,i.Ht)(e,this),this.finished=!0;let{buffer:t,view:s,blockLen:n,isLE:r}=this,{pos:a}=this;t[a++]=128,(0,i.uH)(this.buffer.subarray(a)),this.padOffset>n-a&&(this.process(s,0),a=0);for(let e=a;e<n;e++)t[e]=0;!function(e,t,s,i){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,s,i);let n=BigInt(32),r=BigInt(0xffffffff),a=Number(s>>n&r),o=Number(s&r),c=4*!!i,l=4*!i;e.setUint32(t+c,a,i),e.setUint32(t+l,o,i)}(s,n-8,BigInt(8*this.length),r),this.process(s,0);let o=(0,i.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:i,finished:n,destroyed:r,pos:a}=this;return e.destroyed=r,e.finished=n,e.length=i,e.pos=a,i%t&&e.buffer.set(s),e}clone(){return this._cloneInto()}}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 n{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"]}get(){let{A:e,B:t,C:s,D:i,E:n,F:r,G:a,H:o}=this;return[e,t,s,i,n,r,a,o]}set(e,t,s,i,n,r,a,o){this.A=0|e,this.B=0|t,this.C=0|s,this.D=0|i,this.E=0|n,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],n=(0,i.Ow)(t,7)^(0,i.Ow)(t,18)^t>>>3,r=(0,i.Ow)(s,17)^(0,i.Ow)(s,19)^s>>>10;h[e]=r+h[e-7]+n+h[e-16]|0}let{A:s,B:n,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,i.Ow)(o,6)^(0,i.Ow)(o,11)^(0,i.Ow)(o,25))+((f=o)&c^~f&d)+l[e]+h[e]|0,m=((0,i.Ow)(s,2)^(0,i.Ow)(s,13)^(0,i.Ow)(s,22))+((p=s)&(g=n)^p&(b=r)^g&b)|0;u=d,d=c,c=o,o=a+t|0,a=r,r=n,n=s,s=t+m|0}s=s+this.A|0,n=n+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,n,r,a,o,c,d,u)}roundClean(){(0,i.uH)(h)}destroy(){this.set(0,0,0,0,0,0,0,0),(0,i.uH)(this.buffer)}}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 m extends n{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"]}get(){let{Ah:e,Al:t,Bh:s,Bl:i,Ch:n,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,i,n,r,a,o,c,l,h,d,u,f,p,g]}set(e,t,s,i,n,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|i,this.Ch=0|n,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],i=c.rE(t,s,1)^c.rE(t,s,8)^c.xn(t,s,7),n=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(n,l,b[e-7],b[e-16]),d=c.CQ(h,i,o,g[e-7],g[e-16]);g[e]=0|d,b[e]=0|h}let{Ah:s,Al:i,Bh:n,Bl:r,Ch:a,Cl:o,Dh:l,Dl:h,Eh:d,El:u,Fh:m,Fl:y,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&m^~d&w,I=u&y^~u&x,L=c.F8(v,E,I,p[e],b[e]),A=c.TH(L,k,t,C,f[e],g[e]),M=0|L,S=c.rE(s,i,28)^c.qh(s,i,34)^c.qh(s,i,39),O=c.ry(s,i,28)^c.Ei(s,i,34)^c.Ei(s,i,39),D=s&n^s&a^n&a,_=i&r^i&o^r&o;k=0|w,v=0|x,w=0|m,x=0|y,m=0|d,y=0|u,({h:d,l:u}=c.WQ(0|l,0|h,0|A,0|M)),l=0|a,h=0|o,a=0|n,o=0|r,n=0|s,r=0|i;let T=c.Vl(M,O,_);s=c.Vr(T,A,S,D),i=0|T}({h:s,l:i}=c.WQ(0|this.Ah,0|this.Al,0|s,0|i)),({h:n,l:r}=c.WQ(0|this.Bh,0|this.Bl,0|n,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:m,l:y}=c.WQ(0|this.Fh,0|this.Fl,0|m,0|y)),({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,i,n,r,a,o,l,h,d,u,m,y,w,x,k,v)}roundClean(){(0,i.uH)(g,b)}destroy(){(0,i.uH)(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class y extends m{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,i.qj)(()=>new d),x=(0,i.qj)(()=>new m),k=(0,i.qj)(()=>new y)},6340:function(e,t,s){"use strict";s.d(t,{sc:()=>i});let i=s(5355).sc},4588:function(e,t,s){"use strict";s.d(t,{lY:()=>x});var i=s(2045),n=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,i=0;e<24;e++){[s,i]=[i,(2*s+3*i)%5],d.push(2*(5*i+s)),u.push((e+1)*(e+2)/2%64);let n=r;for(let e=0;e<7;e++)(t=(t<<a^(t>>c)*h)%l)&o&&(n^=a<<(a<<BigInt(e))-a);f.push(n)}let p=(0,i.lD)(f,!0),g=p[0],b=p[1],m=(e,t,s)=>s>32?(0,i.WM)(e,t,s):(0,i.P5)(e,t,s),y=(e,t,s)=>s>32?(0,i.im)(e,t,s):(0,i.B4)(e,t,s);class w extends n.Vw{constructor(e,t,s,i=!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=i,this.rounds=r,(0,n.Fe)(s),!(0<e&&e<200))throw Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=(0,n.DH)(this.state)}clone(){return this._cloneInto()}keccak(){(0,n.fd)(this.state32),function(e,t=24){let s=new Uint32Array(10);for(let i=24-t;i<24;i++){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 i=(t+8)%10,n=(t+2)%10,r=s[n],a=s[n+1],o=m(r,a,1)^s[i],c=y(r,a,1)^s[i+1];for(let s=0;s<50;s+=10)e[t+s]^=o,e[t+s+1]^=c}let t=e[2],n=e[3];for(let s=0;s<24;s++){let i=u[s],r=m(t,n,i),a=y(t,n,i),o=d[s];t=e[o],n=e[o+1],e[o]=r,e[o+1]=a}for(let t=0;t<50;t+=10){for(let i=0;i<10;i++)s[i]=e[t+i];for(let i=0;i<10;i++)e[t+i]^=~s[(i+2)%10]&s[(i+4)%10]}e[0]^=g[i],e[1]^=b[i]}(0,n.uH)(s)}(this.state32,this.rounds),(0,n.fd)(this.state32),this.posOut=0,this.pos=0}update(e){(0,n.CC)(this),e=(0,n.ZJ)(e),(0,n.DO)(e);let{blockLen:t,state:s}=this,i=e.length;for(let n=0;n<i;){let r=Math.min(t-this.pos,i-n);for(let t=0;t<r;t++)s[this.pos++]^=e[n++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:e,suffix:t,pos:s,blockLen:i}=this;e[s]^=t,(128&t)!=0&&s===i-1&&this.keccak(),e[i-1]^=128,this.keccak()}writeInto(e){(0,n.CC)(this,!1),(0,n.DO)(e),this.finish();let t=this.state,{blockLen:s}=this;for(let i=0,n=e.length;i<n;){this.posOut>=s&&this.keccak();let r=Math.min(s-this.posOut,n-i);e.set(t.subarray(this.posOut,this.posOut+r),i),this.posOut+=r,i+=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,n.Fe)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,n.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,n.uH)(this.state)}_cloneInto(e){let{blockLen:t,suffix:s,outputLen:i,rounds:n,enableXOF:r}=this;return e||(e=new w(t,s,i,r,n)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=n,e.suffix=s,e.outputLen=i,e.enableXOF=r,e.destroyed=this.destroyed,e}}let x=(0,n.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:()=>n,Ow:()=>f,DO:()=>a,My:()=>m,fd:()=>p,ZJ:()=>x,Fe:()=>r,CC:()=>c,Id:()=>k});let i="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0;function n(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,...t){if(!n(e))throw Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw Error("Uint8Array expected of length "+t+", 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,t=!0){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(...e){for(let t=0;t<e.length;t++)e[t].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 m(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 y(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 i=new Uint8Array(s);for(let t=0,n=0;t<s;t++,n+=2){let s=y(e.charCodeAt(n)),r=y(e.charCodeAt(n+1));if(void 0===s||void 0===r)throw Error('hex string expected, got non-hex character "'+(e[n]+e[n+1])+'" at index '+n);i[t]=16*s+r}return i}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(...e){let t=0;for(let s=0;s<e.length;s++){let i=e[s];a(i),t+=i.length}let s=new Uint8Array(t);for(let t=0,i=0;t<e.length;t++){let n=e[t];s.set(n,i),i+=n.length}return s}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(e=32){if(i&&"function"==typeof i.getRandomValues)return i.getRandomValues(new Uint8Array(e));if(i&&"function"==typeof i.randomBytes)return Uint8Array.from(i.randomBytes(e));throw Error("crypto.getRandomValues must be defined")}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_clerk_clerk_js=globalThis.webpackChunk_clerk_clerk_js||[]).push([["811"],{7602:function(){}}]);
|
package/dist/query-core-vendors_clerk.headless.browser_6dfe05_6.0.0-snapshot.v20251203203405.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_clerk_clerk_js=globalThis.webpackChunk_clerk_clerk_js||[]).push([["662"],{3084:function(t,e,s){let i,r,n,a,o,u;s.d(e,{E:()=>N});var h={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},c=new class{#t=h;#e=!1;setTimeoutProvider(t){this.#t=t}setTimeout(t,e){return this.#t.setTimeout(t,e)}clearTimeout(t){this.#t.clearTimeout(t)}setInterval(t,e){return this.#t.setInterval(t,e)}clearInterval(t){this.#t.clearInterval(t)}},l="undefined"==typeof window||"Deno"in globalThis;function d(){}function f(t,e){return"function"==typeof t?t(e):t}function p(t,e){let{type:s="all",exact:i,fetchStatus:r,predicate:n,queryKey:a,stale:o}=t;if(a){if(i){if(e.queryHash!==m(a,e.options))return!1}else if(!b(e.queryKey,a))return!1}if("all"!==s){let t=e.isActive();if("active"===s&&!t||"inactive"===s&&t)return!1}return("boolean"!=typeof o||e.isStale()===o)&&(!r||r===e.state.fetchStatus)&&(!n||!!n(e))}function y(t,e){let{exact:s,status:i,predicate:r,mutationKey:n}=t;if(n){if(!e.options.mutationKey)return!1;if(s){if(v(e.options.mutationKey)!==v(n))return!1}else if(!b(e.options.mutationKey,n))return!1}return(!i||e.state.status===i)&&(!r||!!r(e))}function m(t,e){return(e?.queryKeyHashFn||v)(t)}function v(t){return JSON.stringify(t,(t,e)=>w(e)?Object.keys(e).sort().reduce((t,s)=>(t[s]=e[s],t),{}):e)}function b(t,e){return t===e||typeof t==typeof e&&!!t&&!!e&&"object"==typeof t&&"object"==typeof e&&Object.keys(e).every(s=>b(t[s],e[s]))}var g=Object.prototype.hasOwnProperty;function C(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function w(t){if(!O(t))return!1;let e=t.constructor;if(void 0===e)return!0;let s=e.prototype;return!!O(s)&&!!s.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(t)===Object.prototype}function O(t){return"[object Object]"===Object.prototype.toString.call(t)}function q(t,e,s=0){let i=[...t,e];return s&&i.length>s?i.slice(1):i}function S(t,e,s=0){let i=[e,...t];return s&&i.length>s?i.slice(0,-1):i}var P=Symbol();function F(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:t.queryFn&&t.queryFn!==P?t.queryFn:()=>Promise.reject(Error(`Missing queryFn: '${t.queryHash}'`))}var D=(i=[],r=0,n=t=>{t()},a=t=>{t()},o=function(t){setTimeout(t,0)},{batch:t=>{let e;r++;try{e=t()}finally{let t;--r||(t=i,i=[],t.length&&o(()=>{a(()=>{t.forEach(t=>{n(t)})})}))}return e},batchCalls:t=>(...e)=>{u(()=>{t(...e)})},schedule:u=t=>{r?i.push(t):o(()=>{n(t)})},setNotifyFunction:t=>{n=t},setBatchNotifyFunction:t=>{a=t},setScheduler:t=>{o=t}}),A=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},T=new class extends A{#s;#i;#r;constructor(){super(),this.#r=t=>{if(!l&&window.addEventListener){let e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#i||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#i?.(),this.#i=void 0)}setEventListener(t){this.#r=t,this.#i?.(),this.#i=t(t=>{"boolean"==typeof t?this.setFocused(t):this.onFocus()})}setFocused(t){this.#s!==t&&(this.#s=t,this.onFocus())}onFocus(){let t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return"boolean"==typeof this.#s?this.#s:globalThis.document?.visibilityState!=="hidden"}},E=new class extends A{#n=!0;#i;#r;constructor(){super(),this.#r=t=>{if(!l&&window.addEventListener){let e=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#i||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#i?.(),this.#i=void 0)}setEventListener(t){this.#r=t,this.#i?.(),this.#i=t(this.setOnline.bind(this))}setOnline(t){this.#n!==t&&(this.#n=t,this.listeners.forEach(e=>{e(t)}))}isOnline(){return this.#n}};function Q(t){return Math.min(1e3*2**t,3e4)}function M(t){return(t??"online")!=="online"||E.isOnline()}var R=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function j(t){let e,s=!1,i=0,r=function(){let t,e,s=new Promise((s,i)=>{t=s,e=i});function i(t){Object.assign(s,t),delete s.resolve,delete s.reject}return s.status="pending",s.catch(()=>{}),s.resolve=e=>{i({status:"fulfilled",value:e}),t(e)},s.reject=t=>{i({status:"rejected",reason:t}),e(t)},s}(),n=()=>T.isFocused()&&("always"===t.networkMode||E.isOnline())&&t.canRun(),a=()=>M(t.networkMode)&&t.canRun(),o=t=>{"pending"===r.status&&(e?.(),r.resolve(t))},u=t=>{"pending"===r.status&&(e?.(),r.reject(t))},h=()=>new Promise(s=>{e=t=>{("pending"!==r.status||n())&&s(t)},t.onPause?.()}).then(()=>{e=void 0,"pending"===r.status&&t.onContinue?.()}),d=()=>{let e;if("pending"!==r.status)return;let a=0===i?t.initialPromise:void 0;try{e=a??t.fn()}catch(t){e=Promise.reject(t)}Promise.resolve(e).then(o).catch(e=>{if("pending"!==r.status)return;let a=t.retry??3*!l,o=t.retryDelay??Q,f="function"==typeof o?o(i,e):o,p=!0===a||"number"==typeof a&&i<a||"function"==typeof a&&a(i,e);s||!p?u(e):(i++,t.onFail?.(i,e),new Promise(t=>{c.setTimeout(t,f)}).then(()=>n()?void 0:h()).then(()=>{s?u(e):d()}))})};return{promise:r,status:()=>r.status,cancel:e=>{if("pending"===r.status){let s=new R(e);u(s),t.onCancel?.(s)}},continue:()=>(e?.(),r),cancelRetry:()=>{s=!0},continueRetry:()=>{s=!1},canStart:a,start:()=>(a()?d():h().then(d),r)}}var x=class{#a;destroy(){this.clearGcTimeout()}scheduleGc(){var t;this.clearGcTimeout(),"number"==typeof(t=this.gcTime)&&t>=0&&t!==1/0&&(this.#a=c.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(l?1/0:3e5))}clearGcTimeout(){this.#a&&(c.clearTimeout(this.#a),this.#a=void 0)}},k=class extends x{#o;#u;#h;#c;#l;#d;#f;constructor(t){super(),this.#f=!1,this.#d=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#c=t.client,this.#h=this.#c.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#o=I(this.options),this.state=t.state??this.#o,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#l?.promise}setOptions(t){if(this.options={...this.#d,...t},this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){let t=I(this.options);void 0!==t.data&&(this.setData(t.data,{updatedAt:t.dataUpdatedAt,manual:!0}),this.#o=t)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#h.remove(this)}setData(t,e){var s,i;let r=(s=this.state.data,"function"==typeof(i=this.options).structuralSharing?i.structuralSharing(s,t):!1!==i.structuralSharing?function t(e,s){if(e===s)return e;let i=C(e)&&C(s);if(!i&&!(w(e)&&w(s)))return s;let r=(i?e:Object.keys(e)).length,n=i?s:Object.keys(s),a=n.length,o=i?Array(a):{},u=0;for(let h=0;h<a;h++){let a=i?h:n[h],c=e[a],l=s[a];if(c===l){o[a]=c,(i?h<r:g.call(e,a))&&u++;continue}if(null===c||null===l||"object"!=typeof c||"object"!=typeof l){o[a]=l;continue}let d=t(c,l);o[a]=d,d===c&&u++}return r===a&&u===r?e:o}(s,t):t);return this.#p({data:r,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),r}setState(t,e){this.#p({type:"setState",state:t,setStateOptions:e})}cancel(t){let e=this.#l?.promise;return this.#l?.cancel(t),e?e.then(d).catch(d):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#o)}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===P||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0&&this.observers.some(t=>"static"===f(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(t=0){return void 0===this.state.data||"static"!==t&&(!!this.state.isInvalidated||!Math.max(this.state.dataUpdatedAt+(t||0)-Date.now(),0))}onFocus(){let t=this.observers.find(t=>t.shouldFetchOnWindowFocus());t?.refetch({cancelRefetch:!1}),this.#l?.continue()}onOnline(){let t=this.observers.find(t=>t.shouldFetchOnReconnect());t?.refetch({cancelRefetch:!1}),this.#l?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#h.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),this.observers.length||(this.#l&&(this.#f?this.#l.cancel({revert:!0}):this.#l.cancelRetry()),this.scheduleGc()),this.#h.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#p({type:"invalidate"})}async fetch(t,e){let s;if("idle"!==this.state.fetchStatus&&this.#l?.status()!=="rejected"){if(void 0!==this.state.data&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#l)return this.#l.continueRetry(),this.#l.promise}if(t&&this.setOptions(t),!this.options.queryFn){let t=this.observers.find(t=>t.options.queryFn);t&&this.setOptions(t.options)}let i=new AbortController,r=t=>{Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(this.#f=!0,i.signal)})},n=()=>{let t,s=F(this.options,e),i=(r(t={client:this.#c,queryKey:this.queryKey,meta:this.meta}),t);return(this.#f=!1,this.options.persister)?this.options.persister(s,i,this):s(i)},a=(r(s={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#c,state:this.state,fetchFn:n}),s);this.options.behavior?.onFetch(a,this),this.#u=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#p({type:"fetch",meta:a.fetchOptions?.meta}),this.#l=j({initialPromise:e?.initialPromise,fn:a.fetchFn,onCancel:t=>{t instanceof R&&t.revert&&this.setState({...this.#u,fetchStatus:"idle"}),i.abort()},onFail:(t,e)=>{this.#p({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#p({type:"pause"})},onContinue:()=>{this.#p({type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let t=await this.#l.start();if(void 0===t)throw Error(`${this.queryHash} data is undefined`);return this.setData(t),this.#h.config.onSuccess?.(t,this),this.#h.config.onSettled?.(t,this.state.error,this),t}catch(t){if(t instanceof R){if(t.silent)return this.#l.promise;else if(t.revert){if(void 0===this.state.data)throw t;return this.state.data}}throw this.#p({type:"error",error:t}),this.#h.config.onError?.(t,this),this.#h.config.onSettled?.(this.state.data,t,this),t}finally{this.scheduleGc()}}#p(t){let e=e=>{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":var s;return{...e,...(s=e.data,{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:M(this.options.networkMode)?"fetching":"paused",...void 0===s&&{error:null,status:"pending"}}),fetchMeta:t.meta??null};case"success":let i={...e,data:t.data,dataUpdateCount:e.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#u=t.manual?i:void 0,i;case"error":let r=t.error;return{...e,error:r,errorUpdateCount:e.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:e.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...e,isInvalidated:!0};case"setState":return{...e,...t.state}}};this.state=e(this.state),D.batch(()=>{this.observers.forEach(t=>{t.onQueryUpdate()}),this.#h.notify({query:this,type:"updated",action:t})})}};function I(t){let e="function"==typeof t.initialData?t.initialData():t.initialData,s=void 0!==e,i=s?"function"==typeof t.initialDataUpdatedAt?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:s?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var U=class extends A{constructor(t={}){super(),this.config=t,this.#y=new Map}#y;build(t,e,s){let i=e.queryKey,r=e.queryHash??m(i,e),n=this.get(r);return n||(n=new k({client:t,queryKey:i,queryHash:r,options:t.defaultQueryOptions(e),state:s,defaultOptions:t.getQueryDefaults(i)}),this.add(n)),n}add(t){this.#y.has(t.queryHash)||(this.#y.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){let e=this.#y.get(t.queryHash);e&&(t.destroy(),e===t&&this.#y.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){D.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#y.get(t)}getAll(){return[...this.#y.values()]}find(t){let e={exact:!0,...t};return this.getAll().find(t=>p(e,t))}findAll(t={}){let e=this.getAll();return Object.keys(t).length>0?e.filter(e=>p(t,e)):e}notify(t){D.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){D.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){D.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},K=class extends x{#m;#v;#l;constructor(t){super(),this.mutationId=t.mutationId,this.#v=t.mutationCache,this.#m=[],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()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#m.includes(t)||(this.#m.push(t),this.clearGcTimeout(),this.#v.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#m=this.#m.filter(e=>e!==t),this.scheduleGc(),this.#v.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#m.length||("pending"===this.state.status?this.scheduleGc():this.#v.remove(this))}continue(){return this.#l?.continue()??this.execute(this.state.variables)}async execute(t){let e=()=>{this.#p({type:"continue"})};this.#l=j({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(Error("No mutationFn found")),onFail:(t,e)=>{this.#p({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#p({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#v.canRun(this)});let s="pending"===this.state.status,i=!this.#l.canStart();try{if(s)e();else{this.#p({type:"pending",variables:t,isPaused:i}),await this.#v.config.onMutate?.(t,this);let e=await this.options.onMutate?.(t);e!==this.state.context&&this.#p({type:"pending",context:e,variables:t,isPaused:i})}let r=await this.#l.start();return await this.#v.config.onSuccess?.(r,t,this.state.context,this),await this.options.onSuccess?.(r,t,this.state.context),await this.#v.config.onSettled?.(r,null,this.state.variables,this.state.context,this),await this.options.onSettled?.(r,null,t,this.state.context),this.#p({type:"success",data:r}),r}catch(e){try{throw await this.#v.config.onError?.(e,t,this.state.context,this),await this.options.onError?.(e,t,this.state.context),await this.#v.config.onSettled?.(void 0,e,this.state.variables,this.state.context,this),await this.options.onSettled?.(void 0,e,t,this.state.context),e}finally{this.#p({type:"error",error:e})}}finally{this.#v.runNext(this)}}#p(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),D.batch(()=>{this.#m.forEach(e=>{e.onMutationUpdate(t)}),this.#v.notify({mutation:this,type:"updated",action:t})})}},H=class extends A{constructor(t={}){super(),this.config=t,this.#b=new Set,this.#g=new Map,this.#C=0}#b;#g;#C;build(t,e,s){let i=new K({mutationCache:this,mutationId:++this.#C,options:t.defaultMutationOptions(e),state:s});return this.add(i),i}add(t){this.#b.add(t);let e=L(t);if("string"==typeof e){let s=this.#g.get(e);s?s.push(t):this.#g.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#b.delete(t)){let e=L(t);if("string"==typeof e){let s=this.#g.get(e);if(s)if(s.length>1){let e=s.indexOf(t);-1!==e&&s.splice(e,1)}else s[0]===t&&this.#g.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){let e=L(t);if("string"!=typeof e)return!0;{let s=this.#g.get(e),i=s?.find(t=>"pending"===t.state.status);return!i||i===t}}runNext(t){let e=L(t);if("string"!=typeof e)return Promise.resolve();{let s=this.#g.get(e)?.find(e=>e!==t&&e.state.isPaused);return s?.continue()??Promise.resolve()}}clear(){D.batch(()=>{this.#b.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#b.clear(),this.#g.clear()})}getAll(){return Array.from(this.#b)}find(t){let e={exact:!0,...t};return this.getAll().find(t=>y(e,t))}findAll(t={}){return this.getAll().filter(e=>y(t,e))}notify(t){D.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){let t=this.getAll().filter(t=>t.state.isPaused);return D.batch(()=>Promise.all(t.map(t=>t.continue().catch(d))))}};function L(t){return t.options.scope?.id}function G(t){return{onFetch:(e,s)=>{let i=e.options,r=e.fetchOptions?.meta?.fetchMore?.direction,n=e.state.data?.pages||[],a=e.state.data?.pageParams||[],o={pages:[],pageParams:[]},u=0,h=async()=>{let s=!1,h=F(e.options,e.fetchOptions),c=async(t,i,r)=>{let n;if(s)return Promise.reject();if(null==i&&t.pages.length)return Promise.resolve(t);let a=(Object.defineProperty(n={client:e.client,queryKey:e.queryKey,pageParam:i,direction:r?"backward":"forward",meta:e.options.meta},"signal",{enumerable:!0,get:()=>(e.signal.aborted?s=!0:e.signal.addEventListener("abort",()=>{s=!0}),e.signal)}),n),o=await h(a),{maxPages:u}=e.options,c=r?S:q;return{pages:c(t.pages,o,u),pageParams:c(t.pageParams,i,u)}};if(r&&n.length){let t="backward"===r,e={pages:n,pageParams:a},s=(t?function(t,{pages:e,pageParams:s}){return e.length>0?t.getPreviousPageParam?.(e[0],e,s[0],s):void 0}:_)(i,e);o=await c(e,s,t)}else{let e=t??n.length;do{let t=0===u?a[0]??i.initialPageParam:_(i,o);if(u>0&&null==t)break;o=await c(o,t),u++}while(u<e)}return o};e.options.persister?e.fetchFn=()=>e.options.persister?.(h,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},s):e.fetchFn=h}}}function _(t,{pages:e,pageParams:s}){let i=e.length-1;return e.length>0?t.getNextPageParam(e[i],e,s[i],s):void 0}var N=class{#w;#v;#d;#O;#q;#S;#P;#F;constructor(t={}){this.#w=t.queryCache||new U,this.#v=t.mutationCache||new H,this.#d=t.defaultOptions||{},this.#O=new Map,this.#q=new Map,this.#S=0}mount(){this.#S++,1===this.#S&&(this.#P=T.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#w.onFocus())}),this.#F=E.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#w.onOnline())}))}unmount(){this.#S--,0===this.#S&&(this.#P?.(),this.#P=void 0,this.#F?.(),this.#F=void 0)}isFetching(t){return this.#w.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#v.findAll({...t,status:"pending"}).length}getQueryData(t){let e=this.defaultQueryOptions({queryKey:t});return this.#w.get(e.queryHash)?.state.data}ensureQueryData(t){let e=this.defaultQueryOptions(t),s=this.#w.build(this,e),i=s.state.data;return void 0===i?this.fetchQuery(t):(t.revalidateIfStale&&s.isStaleByTime(f(e.staleTime,s))&&this.prefetchQuery(e),Promise.resolve(i))}getQueriesData(t){return this.#w.findAll(t).map(({queryKey:t,state:e})=>[t,e.data])}setQueryData(t,e,s){let i=this.defaultQueryOptions({queryKey:t}),r=this.#w.get(i.queryHash),n=r?.state.data,a="function"==typeof e?e(n):e;if(void 0!==a)return this.#w.build(this,i).setData(a,{...s,manual:!0})}setQueriesData(t,e,s){return D.batch(()=>this.#w.findAll(t).map(({queryKey:t})=>[t,this.setQueryData(t,e,s)]))}getQueryState(t){let e=this.defaultQueryOptions({queryKey:t});return this.#w.get(e.queryHash)?.state}removeQueries(t){let e=this.#w;D.batch(()=>{e.findAll(t).forEach(t=>{e.remove(t)})})}resetQueries(t,e){let s=this.#w;return D.batch(()=>(s.findAll(t).forEach(t=>{t.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){let s={revert:!0,...e};return Promise.all(D.batch(()=>this.#w.findAll(t).map(t=>t.cancel(s)))).then(d).catch(d)}invalidateQueries(t,e={}){return D.batch(()=>(this.#w.findAll(t).forEach(t=>{t.invalidate()}),t?.refetchType==="none")?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e))}refetchQueries(t,e={}){let s={...e,cancelRefetch:e.cancelRefetch??!0};return Promise.all(D.batch(()=>this.#w.findAll(t).filter(t=>!t.isDisabled()&&!t.isStatic()).map(t=>{let e=t.fetch(void 0,s);return s.throwOnError||(e=e.catch(d)),"paused"===t.state.fetchStatus?Promise.resolve():e}))).then(d)}fetchQuery(t){let e=this.defaultQueryOptions(t);void 0===e.retry&&(e.retry=!1);let s=this.#w.build(this,e);return s.isStaleByTime(f(e.staleTime,s))?s.fetch(e):Promise.resolve(s.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(d).catch(d)}fetchInfiniteQuery(t){return t.behavior=G(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(d).catch(d)}ensureInfiniteQueryData(t){return t.behavior=G(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return E.isOnline()?this.#v.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#w}getMutationCache(){return this.#v}getDefaultOptions(){return this.#d}setDefaultOptions(t){this.#d=t}setQueryDefaults(t,e){this.#O.set(v(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){let e=[...this.#O.values()],s={};return e.forEach(e=>{b(t,e.queryKey)&&Object.assign(s,e.defaultOptions)}),s}setMutationDefaults(t,e){this.#q.set(v(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){let e=[...this.#q.values()],s={};return e.forEach(e=>{b(t,e.mutationKey)&&Object.assign(s,e.defaultOptions)}),s}defaultQueryOptions(t){if(t._defaulted)return t;let e={...this.#d.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=m(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===P&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#d.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#w.clear(),this.#v.clear()}}}}]);
|
|
@@ -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});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,e,r){"use strict";function n(){for(var t,e,r=0,n="";r<arguments.length;)(t=arguments[r++])&&(e=function t(e){var r,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e))for(r=0;r<e.length;r++)e[r]&&(n=t(e[r]))&&(i&&(i+=" "),i+=n);else for(r in e)e[r]&&(i&&(i+=" "),i+=r);return i}(t))&&(n&&(n+=" "),n+=e);return n}r.d(e,{$:()=>n})},9858:function(t,e,r){var n;t.exports=n||function(t,e){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!==r.g&&r.g.crypto&&(n=r.g.crypto),!n)try{n=r(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(e){var r;return t.prototype=e,r=new t,t.prototype=null,r}}(),s={},a=s.lib={},c=a.Base={extend:function(t){var e=o(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},f=a.WordArray=c.extend({init:function(t,r){t=this.words=t||[],e!=r?this.sigBytes=r:this.sigBytes=4*t.length},toString:function(t){return(t||h).stringify(this)},concat:function(t){var e=this.words,r=t.words,n=this.sigBytes,i=t.sigBytes;if(this.clamp(),n%4)for(var o=0;o<i;o++){var s=r[o>>>2]>>>24-o%4*8&255;e[n+o>>>2]|=s<<24-(n+o)%4*8}else for(var a=0;a<i;a+=4)e[n+a>>>2]=r[a>>>2];return this.sigBytes+=i,this},clamp:function(){var e=this.words,r=this.sigBytes;e[r>>>2]&=0xffffffff<<32-r%4*8,e.length=t.ceil(r/4)},clone:function(){var t=c.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],r=0;r<t;r+=4)e.push(i());return new f.init(e,t)}}),u=s.enc={},h=u.Hex={stringify:function(t){for(var e=t.words,r=t.sigBytes,n=[],i=0;i<r;i++){var o=e[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 e=t.length,r=[],n=0;n<e;n+=2)r[n>>>3]|=parseInt(t.substr(n,2),16)<<24-n%8*4;return new f.init(r,e/2)}},l=u.Latin1={stringify:function(t){for(var e=t.words,r=t.sigBytes,n=[],i=0;i<r;i++){var o=e[i>>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(o))}return n.join("")},parse:function(t){for(var e=t.length,r=[],n=0;n<e;n++)r[n>>>2]|=(255&t.charCodeAt(n))<<24-n%4*8;return new f.init(r,e)}},d=u.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 f.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=d.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var r,n=this._data,i=n.words,o=n.sigBytes,s=this.blockSize,a=o/(4*s),c=(a=e?t.ceil(a):t.max((0|a)-this._minBufferSize,0))*s,u=t.min(4*c,o);if(c){for(var h=0;h<c;h+=s)this._doProcessBlock(i,h);r=i.splice(0,c),n.sigBytes-=u}return new f.init(r,u)},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(e,r){return new t.init(r).finalize(e)}},_createHmacHelper:function(t){return function(e,r){return new y.HMAC.init(t,r).finalize(e)}}});var y=s.algo={};return s}(Math)},3413:function(t,e,r){var n,i;i=(n=r(9858)).lib.WordArray,n.enc.Base64={stringify:function(t){var e=t.words,r=t.sigBytes,n=this._map;t.clamp();for(var i=[],o=0;o<r;o+=3)for(var s=(e[o>>>2]>>>24-o%4*8&255)<<16|(e[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|e[o+2>>>2]>>>24-(o+2)%4*8&255,a=0;a<4&&o+.75*a<r;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 e=t.length,r=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var o=0;o<r.length;o++)n[r.charCodeAt(o)]=o}var s=r.charAt(64);if(s){var a=t.indexOf(s);-1!==a&&(e=a)}for(var c=t,f=e,u=n,h=[],l=0,d=0;d<f;d++)if(d%4){var p=u[c.charCodeAt(d-1)]<<d%4*2|u[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,e,r){var n,i,o,s,a,c,f;o=(i=(n=r(9858)).lib).WordArray,s=i.Hasher,a=n.algo,c=[],f=a.SHA1=s.extend({_doReset:function(){this._hash=new o.init([0x67452301,0xefcdab89,0x98badcfe,0x10325476,0xc3d2e1f0])},_doProcessBlock:function(t,e){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],s=r[3],a=r[4],f=0;f<80;f++){if(f<16)c[f]=0|t[e+f];else{var u=c[f-3]^c[f-8]^c[f-14]^c[f-16];c[f]=u<<1|u>>>31}var h=(n<<5|n>>>27)+a+c[f];f<20?h+=(i&o|~i&s)+0x5a827999:f<40?h+=(i^o^s)+0x6ed9eba1:f<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}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+s|0,r[4]=r[4]+a|0},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,n=8*t.sigBytes;return e[n>>>5]|=128<<24-n%32,e[(n+64>>>9<<4)+14]=Math.floor(r/0x100000000),e[(n+64>>>9<<4)+15]=r,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=s.clone.call(this);return t._hash=this._hash.clone(),t}}),n.SHA1=s._createHelper(f),n.HmacSHA1=s._createHmacHelper(f),t.exports=n.SHA1},8604:function(t,e,r){"use strict";let n;function i(t){return new Promise((e,r)=>{t.oncomplete=t.onsuccess=()=>e(t.result),t.onabort=t.onerror=()=>r(t.error)})}function o(t,e){let r=indexedDB.open(t);r.onupgradeneeded=()=>r.result.createObjectStore(e);let n=i(r);return(t,r)=>n.then(n=>r(n.transaction(e,t).objectStore(e)))}function s(){return n||(n=o("keyval-store","keyval")),n}function a(t,e=s()){return e("readonly",e=>i(e.get(t)))}function c(t,e,r=s()){return r("readwrite",r=>(r.put(e,t),i(r.transaction)))}function f(t,e=s()){return e("readwrite",e=>(e.delete(t),i(e.transaction)))}r.d(e,{Jt:()=>a,hZ:()=>c,y$:()=>o,yH:()=>f})}}]);
|