1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5811],{93327:function(e,t,n){"use strict";var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var s=0;for(r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]])}return n},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CoinbaseWalletProvider=void 0;const i=s(n(26729)),o=n(37185),a=n(70011),c=n(53513),d=n(29695),u=n(23868),l=n(74996),h=n(58634),p=n(33838),g=n(77145);class f extends i.default{constructor(e){var t,n,{metadata:s}=e,i=e.preference,{keysUrl:a}=i,p=r(i,["keysUrl"]);super(),this.accounts=[],this.handlers={handshake:async e=>{try{if(this.connected)return this.emit("connect",{chainId:(0,d.hexStringFromIntNumber)((0,c.IntNumber)(this.chain.id))}),this.accounts;const e=await this.requestSignerSelection(),t=this.initSigner(e),n=await t.handshake();return this.signer=t,(0,u.storeSignerType)(e),this.emit("connect",{chainId:(0,d.hexStringFromIntNumber)((0,c.IntNumber)(this.chain.id))}),n}catch(t){throw this.handleUnauthorizedError(t),t}},sign:async e=>{if(!this.connected||!this.signer)throw o.standardErrors.provider.unauthorized("Must call 'eth_requestAccounts' before other methods");try{return await this.signer.request(e)}catch(t){throw this.handleUnauthorizedError(t),t}},fetch:e=>(0,l.fetchRPCRequest)(e,this.chain),state:e=>{const t=()=>{if(this.connected)return this.accounts;throw o.standardErrors.provider.unauthorized("Must call 'eth_requestAccounts' before other methods")};switch(e.method){case"eth_chainId":return(0,d.hexStringFromIntNumber)((0,c.IntNumber)(this.chain.id));case"net_version":return this.chain.id;case"eth_accounts":return t();case"eth_coinbase":return t()[0];default:return this.handlers.unsupported(e)}},deprecated:({method:e})=>{throw o.standardErrors.rpc.methodNotSupported(`Method ${e} is deprecated.`)},unsupported:({method:e})=>{throw o.standardErrors.rpc.methodNotSupported(`Method ${e} is not supported.`)}},this.isCoinbaseWallet=!0,this.updateListener={onAccountsUpdate:({accounts:e,source:t})=>{(0,d.areAddressArraysEqual)(this.accounts,e)||(this.accounts=e,"storage"!==t&&this.emit("accountsChanged",this.accounts))},onChainUpdate:({chain:e,source:t})=>{e.id===this.chain.id&&e.rpcUrl===this.chain.rpcUrl||(this.chain=e,"storage"!==t&&this.emit("chainChanged",(0,d.hexStringFromIntNumber)((0,c.IntNumber)(e.id))))}},this.metadata=s,this.preference=p,this.communicator=new h.Communicator(a),this.chain={id:null!==(n=null===(t=s.appChainIds)||void 0===t?void 0:t[0])&&void 0!==n?n:1};const g=(0,u.loadSignerType)();this.signer=g?this.initSigner(g):null}get connected(){return this.accounts.length>0}async request(e){var t;try{const n=(0,l.checkErrorForInvalidRequestArgs)(e);if(n)throw n;const r=null!==(t=(0,p.determineMethodCategory)(e.method))&&void 0!==t?t:"fetch";return this.handlers[r](e)}catch(n){return Promise.reject((0,a.serializeError)(n,e.method))}}handleUnauthorizedError(e){e.code===o.standardErrorCodes.provider.unauthorized&&this.disconnect()}async enable(){return console.warn('.enable() has been deprecated. Please use .request({ method: "eth_requestAccounts" }) instead.'),await this.request({method:"eth_requestAccounts"})}async disconnect(){this.accounts=[],this.chain={id:1},g.ScopedLocalStorage.clearAll(),this.emit("disconnect",o.standardErrors.provider.disconnected("User initiated disconnection"))}requestSignerSelection(){return(0,u.fetchSignerType)({communicator:this.communicator,preference:this.preference,metadata:this.metadata})}initSigner(e){return(0,u.createSigner)({signerType:e,metadata:this.metadata,communicator:this.communicator,updateListener:this.updateListener})}}t.CoinbaseWalletProvider=f},39016:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CoinbaseWalletSDK=void 0;const r=n(52719),s=n(93327),i=n(77145),o=n(43604),a=n(29695),c=n(74996);t.CoinbaseWalletSDK=class{constructor(e){this.metadata={appName:e.appName||"Dapp",appLogoUrl:e.appLogoUrl||(0,a.getFavicon)(),appChainIds:e.appChainIds||[]},this.storeLatestVersion()}makeWeb3Provider(e={options:"all"}){var t;const n={metadata:this.metadata,preference:e};return null!==(t=(0,c.getCoinbaseInjectedProvider)(n))&&void 0!==t?t:new s.CoinbaseWalletProvider(n)}
1getCoinbaseWalletLogo(e,t=240){return(0,r.walletLogo)(e,t)}storeLatestVersion(){new i.ScopedLocalStorage("CBWSDK").setItem("VERSION",o.LIB_VERSION)}}},52719:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.walletLogo=void 0;t.walletLogo=(e,t)=>
vendor: 9,478 bytes, line 1
1{let n;switch(e){case"standard":default:return n=t,`data:image/svg+xml,%3Csvg width='${t}' height='${n}' 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 n=t,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${t}' height='${n}' 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 n=(.1*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${n}' 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 n=(.25*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${n}' 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 n=(.1*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${n}' 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 n=(.25*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${n}' 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`}}
1},58634:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Communicator=void 0;const r=n(43604),s=n(83475),i=n(96415),o=n(37185);t.Communicator=class{constructor(e=i.CB_KEYS_URL){this.popup=null,this.listeners=new Map,this.postMessage=async e=>{(await this.waitForPopupLoaded()).postMessage(e,this.url.origin)},this.postRequestAndWaitForResponse=async e=>{const t=this.onMessage((({requestId:t})=>t===e.id));return this.postMessage(e),await t},this.onMessage=async e=>new Promise(((t,n)=>{const r=n=>{if(n.origin!==this.url.origin)return;const s=n.data;e(s)&&(t(s),window.removeEventListener("message",r),this.listeners.delete(r))};window.addEventListener("message",r),this.listeners.set(r,{reject:n})})),this.disconnect=()=>{(0,s.closePopup)(this.popup),this.popup=null,this.listeners.forEach((({reject:e},t)=>{e(o.standardErrors.provider.userRejectedRequest("Request rejected")),window.removeEventListener("message",t)})),this.listeners.clear()},this.waitForPopupLoaded=async()=>this.popup&&!this.popup.closed?this.popup:(this.popup=(0,s.openPopup)(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:r.LIB_VERSION}})})).then((()=>
1{if(!this.popup)throw o.standardErrors.rpc.internal();return this.popup}))),this.url=new URL(e)}}},83475:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.closePopup=t.openPopup=void 0;const r=n(37185);t.openPopup=function(e){const t=(window.innerWidth-420)/2+window.screenX,n=(window.innerHeight-540)/2+window.screenY,s=window.open(e,"Smart Wallet",`width=420, height=540, left=${t}, top=${n}`);if(null===s||void 0===s||s.focus(),!s)throw r.standardErrors.rpc.internal("Pop up window failed to open");return s},t.closePopup=function(e){e&&!e.closed&&e.close()}},96415:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CBW_MOBILE_DEEPLINK_URL=t.WALLETLINK_URL=t.CB_KEYS_URL=void 0,t.CB_KEYS_URL="https://keys.coinbase.com/connect",t.WALLETLINK_URL="https://www.walletlink.org",t.CBW_MOBILE_DEEPLINK_URL="https://go.cb-w.com/walletlink"},76079:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.errorValues=t.standardErrorCodes=void 0,t.standardErrorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901,unsupportedChain:4902}},t.errorValues={"-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."}}},99322:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.standardErrors=void 0;const r=n(76079),s=n(10761);function i(e,t){const[n,r]=a(t);return new c(e,n||(0,s.getMessageFromCode)(e),r)}function o(e,t){const[n,r]=a(t);return new d(e,n||(0,s.getMessageFromCode)(e),r)}function a(e){if(e){if("string"===typeof e)return[e];if("object"===typeof e&&!Array.isArray(e)){const{message:t,data:n}=e;
1if(t&&"string"!==typeof t)throw new Error("Must specify string message.");return[t||void 0,n]}}return[]}t.standardErrors={rpc:{parse:e=>i(r.standardErrorCodes.rpc.parse,e),invalidRequest:e=>i(r.standardErrorCodes.rpc.invalidRequest,e),invalidParams:e=>i(r.standardErrorCodes.rpc.invalidParams,e),methodNotFound:e=>i(r.standardErrorCodes.rpc.methodNotFound,e),internal:e=>i(r.standardErrorCodes.rpc.internal,e),server:e=>{if(!e||"object"!==typeof e||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return i(t,e)},invalidInput:e=>i(r.standardErrorCodes.rpc.invalidInput,e),resourceNotFound:e=>i(r.standardErrorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>i(r.standardErrorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>i(r.standardErrorCodes.rpc.transactionRejected,e),methodNotSupported:e=>i(r.standardErrorCodes.rpc.methodNotSupported,e),limitExceeded:e=>i(r.standardErrorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>o(r.standardErrorCodes.provider.userRejectedRequest,e),unauthorized:e=>o(r.standardErrorCodes.provider.unauthorized,e),unsupportedMethod:e=>o(r.standardErrorCodes.provider.unsupportedMethod,e),disconnected:e=>o(r.standardErrorCodes.provider.disconnected,e),chainDisconnected:e=>o(r.standardErrorCodes.provider.chainDisconnected,e),unsupportedChain:e=>o(r.standardErrorCodes.provider.unsupportedChain,e),custom:e=>{if(!e||"object"!==typeof e||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:n,data:r}=e;if(!n||"string"!==typeof n)throw new Error('"message" must be a nonempty string');return new d(t,n,r)}}};class c extends Error{constructor(e,t,n){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!t||"string"!==typeof t)throw new Error('"message" must be a nonempty string.');super(t),this.code=e,void 0!==n&&(this.data=n)}}class d extends c{constructor(e,t,n){if(!function(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,n)}}},37185:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.standardErrors=t.standardErrorCodes=void 0;var r=n(76079);Object.defineProperty(t,"standardErrorCodes",{enumerable:!0,get:function(){return r.standardErrorCodes}});var s=n(99322);Object.defineProperty(t,"standardErrors",{enumerable:!0,get:function(){return s.standardErrors}})},70011:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeError=void 0;const r=n(49055),s=n(43604),i=n(76079),o=n(10761);t.serializeError=function(e,t){const n=(0,o.serialize)(function(e){if("string"===typeof e)return{message:e,code:i.standardErrorCodes.rpc.internal};if((0,r.isErrorResponse)(e))return Object.assign(Object.assign({},e),{message:e.errorMessage,code:e.errorCode,data:{method:e.method}});return e}(e),{shouldIncludeStack:!0}),a=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");a.searchParams.set("version",s.LIB_VERSION),a.searchParams.set("code",n.code.toString());const c=function(e,t){const n=null===e||void 0===e?void 0:e.method;if(n)return n;if(void 0===t)return;if("string"===typeof t)return t;if(!Array.isArray(t))return t.method;if(t.length>0)return t[0].method;return}(n.data,t);return c&&a.searchParams.set("method",c),a.searchParams.set("message",n.message),Object.assign(Object.assign({},n),{docUrl:a.href})}},10761:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serialize=t.getErrorCode=t.isValidCode=t.getMessageFromCode=t.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const r=n(76079),s="Unspecified error message.";function i(e,n=s){if(e&&Number.isInteger(e)){const n=e.toString();if(d(r.errorValues,n))return r.errorValues[n].message;if(a(e))return t.JSON_RPC_SERVER_ERROR_MESSAGE}return n}function o(e){if(!Number.isInteger(e))return!1;const t=e.toString();return!!r.errorValues[t]||!!a(e)}function a(e){return e>=-32099&&e<=-32e3}function c(e){return e&&"object"===typeof e&&!Array.isArray(e)?Object.assign({},e):e}function d(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function u(e,t){return"object"===typeof e&&null!==e&&t in e&&"string"===typeof e[t]}t.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",t.getMessageFromCode=i,t.isValidCode=o,t.getErrorCode=function(e){var t;return"number"===typeof e?e:function(e){return"object"===typeof e&&null!==e&&("number"===typeof e.code||"number"===typeof e.errorCode)}(e)?null!==(t=e.code)&&void 0!==t?t:e.errorCode:void 0},t.serialize=function(e,{shouldIncludeStack:t=!1}={}){const n={};if(e&&"object"===typeof e&&!Array.isArray(e)&&d(e,"code")&&o(e.code)){const t=e;
1n.code=t.code,t.message&&"string"===typeof t.message?(n.message=t.message,d(t,"data")&&(n.data=t.data)):(n.message=i(n.code),n.data={originalError:c(e)})}else n.code=r.standardErrorCodes.rpc.internal,n.message=u(e,"message")?e.message:s,n.data={originalError:c(e)};return t&&(n.stack=u(e,"stack")?e.stack:void 0),n}},33838:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.determineMethodCategory=void 0;const n={handshake:["eth_requestAccounts"],sign:["eth_ecRecover","personal_sign","personal_ecRecover","eth_signTransaction","eth_sendTransaction","eth_signTypedData_v1","eth_signTypedData_v3","eth_signTypedData_v4","eth_signTypedData","wallet_addEthereumChain","wallet_switchEthereumChain","wallet_watchAsset","wallet_getCapabilities","wallet_sendCalls","wallet_showCallsStatus"],state:["eth_chainId","eth_accounts","eth_coinbase","net_version"],deprecated:["eth_sign","eth_signTypedData_v2"],unsupported:["eth_subscribe","eth_unsubscribe"],fetch:[]};t.determineMethodCategory=function(e){for(const t in n){const r=t;if(n[r].includes(e))return r}}},53513:function(e,t){"use strict";function n(){return e=>e}Object.defineProperty(t,"__esModule",{value:!0}),t.RegExpString=t.IntNumber=t.BigIntString=t.AddressString=t.HexString=t.OpaqueType=void 0,t.OpaqueType=n,t.HexString=e=>e,t.AddressString=e=>e,t.BigIntString=e=>e,t.IntNumber=function(e){return Math.floor(e)},t.RegExpString=e=>e},29695:function(e,t,n){"use strict";var r=n(48764).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.areAddressArraysEqual=t.getFavicon=t.range=t.isBigNumber=t.ensureParsedJSONObject=t.ensureBigInt=t.ensureRegExpString=t.ensureIntNumber=t.ensureBuffer=t.ensureAddressString=t.ensureEvenLengthHexString=t.ensureHexString=t.isHexString=t.prepend0x=t.strip0x=t.has0xPrefix=t.hexStringFromIntNumber=t.intNumberFromHexString=t.bigIntStringFromBigInt=t.hexStringFromBuffer=t.hexStringToUint8Array=t.uint8ArrayToHex=t.randomBytesHex=void 0;const s=n(37185),i=n(53513),o=/^[0-9]*$/,a=/^[a-f0-9]*$/;function c(e){return[...e].map((e=>e.toString(16).padStart(2,"0"))).join("")}function d(e){return e.startsWith("0x")||e.startsWith("0X")}function u(e){return d(e)?e.slice(2):e}function l(e){return d(e)?`0x${e.slice(2)}`:`0x${e}`}function h(e){if("string"!==typeof e)return!1;const t=u(e).toLowerCase();return a.test(t)}function p(e,t=!1){if("string"===typeof e){const n=u(e).toLowerCase();if(a.test(n))return(0,i.HexString)(t?`0x${n}`:n)}throw s.standardErrors.rpc.invalidParams(`"${String(e)}" is not a hexadecimal string`)}function g(e,t=!1){let n=p(e,!1);return n.length%2===1&&(n=(0,i.HexString)(`0${n}`)),t?(0,i.HexString)(`0x${n}`):n}function f(e){if("number"===typeof e&&Number.isInteger(e))return(0,i.IntNumber)(e);if("string"===typeof e){if(o.test(e))return(0,i.IntNumber)(Number(e));if(h(e))return(0,i.IntNumber)(Number(BigInt(g(e,!0))))}throw s.standardErrors.rpc.invalidParams(`Not an integer: ${String(e)}`)}function _(e){if(null==e||"function"!==typeof e.constructor)return!1;const{constructor:t}=e;return"function"===typeof t.config&&"number"===typeof t.EUCLID}t.randomBytesHex=function(e){return c(crypto.getRandomValues(new Uint8Array(e)))},t.uint8ArrayToHex=c,t.hexStringToUint8Array=function(e){return new Uint8Array(e.match(/.{1,2}/g).map((e=>parseInt(e,16))))},t.hexStringFromBuffer=function(e,t=!1){const n=e.toString("hex");return(0,i.HexString)(t?`0x${n}`:n)},t.bigIntStringFromBigInt=function(e){return(0,i.BigIntString)(e.toString(10))},t.intNumberFromHexString=function(e){return(0,i.IntNumber)(Number(BigInt(g(e,!0))))},t.hexStringFromIntNumber=function(e){return(0,i.HexString)(`0x${BigInt(e).toString(16)}`)},t.has0xPrefix=d,t.strip0x=u,t.prepend0x=l,t.isHexString=h,t.ensureHexString=p,t.ensureEvenLengthHexString=g,t.ensureAddressString=function(e){if("string"===typeof e){const t=u(e).toLowerCase();if(h(t)&&40===t.length)return(0,i.AddressString)(l(t))}throw s.standardErrors.rpc.invalidParams(`Invalid Ethereum address: ${String(e)}`)},t.ensureBuffer=function(e){if(r.isBuffer(e))return e;if("string"===typeof e){if(h(e)){const t=g(e,!1);return r.from(t,"hex")}return r.from(e,"utf8")}throw s.standardErrors.rpc.invalidParams(`Not binary data: ${String(e)}`)},t.ensureIntNumber=f,t.ensureRegExpString=function(e){if(e instanceof RegExp)return(0,i.RegExpString)(e.toString());throw s.standardErrors.rpc.invalidParams(`Not a RegExp: ${String(e)}`)},t.ensureBigInt=function(e){if(null!==e&&("bigint"===typeof e||_(e)))return BigInt(e.toString(10));if("number"===typeof e)return BigInt(f(e));if("string"===typeof e){if(o.test(e))return BigInt(e);if(h(e))return BigInt(g(e,!0))}throw s.standardErrors.rpc.invalidParams(`Not an integer: ${String(e)}`)},t.ensureParsedJSONObject=function(e){if("string"===typeof e)return JSON.parse(e);if("object"===typeof e)return e;throw s.standardErrors.rpc.invalidParams(`Not a JSON string or an object: ${String(e)}`)},t.isBigNumber=_,t.range=function(e,t){return Array.from({length:t-e},((t,n)=>e+n))},t.getFavicon=function(){const 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:n}=document.location,r=e?e.getAttribute("href"):null;return!r||r.startsWith("javascript:")||r.startsWith("vbscript:")?null:r.startsWith("http://")||r.startsWith("https://")||r.startsWith("data:")?r:r.startsWith("//")?t+r:`${t}//${n}${r}`},t.areAddressArraysEqual=function(e,t){return e.length===t.length&&e.every(((e,n)=>e===t[n]))}},45811:function(e,t,n){"use strict";const r=n(39016);t.default=r.CoinbaseWalletSDK;var s=n(39016)},25722:function(e,t,n){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.SCWKeyManager=void 0;const r=n(5672),s=n(77145),i={storageKey:"ownPrivateKey",keyType:"private"},o={storageKey:"ownPublicKey",keyType:"public"},a={storageKey:"peerPublicKey",keyType:"public"};t.SCWKeyManager=class{constructor(){this.storage=new s.ScopedLocalStorage("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(a,e),await this.loadKeysIfNeeded()}async clear(){this.ownPrivateKey=null,this.ownPublicKey=null,this.peerPublicKey=null,this.sharedSecret=null,this.storage.removeItem(o.storageKey),this.storage.removeItem(i.storageKey),this.storage.removeItem(a.storageKey)}async generateKeyPair(){const e=await(0,r.generateKeyPair)();this.ownPrivateKey=e.privateKey,this.ownPublicKey=e.publicKey,await this.storeKey(i,e.privateKey),await this.storeKey(o,e.publicKey)}async loadKeysIfNeeded(){if(null===this.ownPrivateKey&&(this.ownPrivateKey=await this.loadKey(i)),null===this.ownPublicKey&&(this.ownPublicKey=await this.loadKey(o)),null!==this.ownPrivateKey&&null!==this.ownPublicKey||await this.generateKeyPair(),null===this.peerPublicKey&&(this.peerPublicKey=await this.loadKey(a)),null===this.sharedSecret){if(null===this.ownPrivateKey||null===this.peerPublicKey)return;this.sharedSecret=await(0,r.deriveSharedSecret)(this.ownPrivateKey,this.peerPublicKey)}}async loadKey(e){const t=this.storage.getItem(e.storageKey);return t?(0,r.importKeyFromHexString)(e.keyType,t):null}async storeKey(e,t){const n=await(0,r.exportKeyToHexString)(e.keyType,t);this.storage.setItem(e.storageKey,n)}}},98687:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SCWSigner=void 0;const r=n(25722),s=n(72236),i=n(37185),o=n(29695),a=n(5672);t.SCWSigner=class{constructor(e){this.metadata=e.metadata,this.communicator=e.communicator,this.keyManager=new r.SCWKeyManager,this.stateManager=new s.SCWStateManager({appChainIds:this.metadata.appChainIds,updateListener:e.updateListener}),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(){const e=await this.createRequestMessage({handshake:{method:"eth_requestAccounts",params:this.metadata}}),t=await this.communicator.postRequestAndWaitForResponse(e);if("failure"in t.content)throw t.content.failure;const n=await(0,a.importKeyFromHexString)("public",t.sender);await this.keyManager.setPeerPublicKey(n);const r=await this.decryptResponseMessage(t);this.updateInternalState({method:"eth_requestAccounts"},r);const s=r.result;if("error"in s)throw s.error;return this.stateManager.accounts}async request(e){const t=this.tryLocalHandling(e);if(void 0!==t){if(t instanceof Error)throw t;return t}await this.communicator.waitForPopupLoaded();const n=await this.sendEncryptedRequest(e),r=await this.decryptResponseMessage(n);this.updateInternalState(e,r);const s=r.result;if("error"in s)throw s.error;return s.value}async disconnect(){this.stateManager.clear(),await this.keyManager.clear()}tryLocalHandling(e){var t;switch(e.method){case"wallet_switchEthereumChain":{const n=e.params;if(!n||!(null===(t=n[0])||void 0===t?void 0:t.chainId))throw i.standardErrors.rpc.invalidParams();const r=(0,o.ensureIntNumber)(n[0].chainId);return this.stateManager.switchChain(r)?null:void 0}case"wallet_getCapabilities":{const e=this.stateManager.walletCapabilities;if(!e)throw i.standardErrors.provider.unauthorized("No wallet capabilities found, please disconnect and reconnect");return e}default:return}}async sendEncryptedRequest(e){const t=await this.keyManager.getSharedSecret();if(!t)throw i.standardErrors.provider.unauthorized("No valid session found, try requestAccounts before other methods");const n=await(0,a.encryptContent)({action:e,chainId:this.stateManager.activeChain.id},t),r=await this.createRequestMessage({encrypted:n});return this.communicator.postRequestAndWaitForResponse(r)}async createRequestMessage(e){const t=await(0,a.exportKeyToHexString)("public",await this.keyManager.getOwnPublicKey());return{id:crypto.randomUUID(),sender:t,content:e,timestamp:new Date}}async decryptResponseMessage(e){const t=e.content;if("failure"in t)throw t.failure;
1const n=await this.keyManager.getSharedSecret();if(!n)throw i.standardErrors.provider.unauthorized("Invalid session");return(0,a.decryptContent)(t.encrypted,n)}updateInternalState(e,t){var n,r;const s=null===(n=t.data)||void 0===n?void 0:n.chains;s&&this.stateManager.updateAvailableChains(s);const i=null===(r=t.data)||void 0===r?void 0:r.capabilities;i&&this.stateManager.updateWalletCapabilities(i);const a=t.result;if(!("error"in a))switch(e.method){case"eth_requestAccounts":{const e=a.value;this.stateManager.updateAccounts(e);break}case"wallet_switchEthereumChain":{if(null!==a.value)return;const t=e.params,n=(0,o.ensureIntNumber)(t[0].chainId);this.stateManager.switchChain(n);break}}}}},72236:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SCWStateManager=void 0;const r=n(77145),s="accounts",i="activeChain",o="availableChains",a="walletCapabilities";t.SCWStateManager=class{get accounts(){return this._accounts}get activeChain(){return this._activeChain}get walletCapabilities(){return this._walletCapabilities}constructor(e){var t,n;this.storage=new r.ScopedLocalStorage("CBWSDK","SCWStateManager"),this.updateListener=e.updateListener,this.availableChains=this.loadItemFromStorage(o),this._walletCapabilities=this.loadItemFromStorage(a);const c=this.loadItemFromStorage(s),d=this.loadItemFromStorage(i);c&&this.updateListener.onAccountsUpdate({accounts:c,source:"storage"}),d&&this.updateListener.onChainUpdate({chain:d,source:"storage"}),this._accounts=c||[],this._activeChain=d||{id:null!==(n=null===(t=e.appChainIds)||void 0===t?void 0:t[0])&&void 0!==n?n:1}}updateAccounts(e){this._accounts=e,this.storeItemToStorage(s,e),this.updateListener.onAccountsUpdate({accounts:e,source:"wallet"})}switchChain(e){var t;const n=null===(t=this.availableChains)||void 0===t?void 0:t.find((t=>t.id===e));return!!n&&(n===this._activeChain||(this._activeChain=n,this.storeItemToStorage(i,n),this.updateListener.onChainUpdate({chain:n,source:"wallet"})),!0)}updateAvailableChains(e){if(!e||0===Object.keys(e).length)return;const t=Object.entries(e).map((([e,t])=>({id:Number(e),rpcUrl:t})));this.availableChains=t,this.storeItemToStorage(o,t),this.switchChain(this._activeChain.id)}updateWalletCapabilities(e){this._walletCapabilities=e,this.storeItemToStorage(a,e)}storeItemToStorage(e,t){this.storage.setItem(e,JSON.stringify(t))}loadItemFromStorage(e){const t=this.storage.getItem(e);return t?JSON.parse(t):void 0}clear(){this.storage.clear()}}},23868:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createSigner=t.fetchSignerType=t.storeSignerType=t.loadSignerType=void 0;const r=n(98687),s=n(57460),i=n(37185),o=n(74996),a=n(77145),c="SignerType",d=new a.ScopedLocalStorage("CBWSDK","SignerConfigurator");t.loadSignerType=function(){return d.getItem(c)},t.storeSignerType=function(e){d.setItem(c,e)},t.fetchSignerType=async function(e){const{communicator:t,metadata:n}=e;(async function(e,t){await e.onMessage((({event:e})=>"WalletLinkSessionRequest"===e));const n=new s.WalletLinkSigner({metadata:t});e.postMessage({event:"WalletLinkUpdate",data:{session:n.getSession()}}),await n.handshake(),e.postMessage({event:"WalletLinkUpdate",data:{connected:!0}})})(t,n).catch((()=>{}));const r={id:crypto.randomUUID(),event:"selectSignerType",data:e.preference},{data:i}=await t.postRequestAndWaitForResponse(r);return i},t.createSigner=function(e){const{signerType:t,metadata:n,communicator:a,updateListener:c}=e;switch(t){case"scw":return new r.SCWSigner({metadata:n,updateListener:c,communicator:a});case"walletlink":return new s.WalletLinkSigner({metadata:n,updateListener:c});case"extension":{const e=(0,o.getCoinbaseInjectedSigner)();if(!e)throw i.standardErrors.rpc.internal("injected signer not found");return e}}}},57460:function(e,t,n){"use strict";var r=n(48764).Buffer,s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLinkSigner=void 0;const i=s(n(15139)),o=n(86349),a=n(79909),c=n(49055),d=n(42988),u=n(96415),l=n(37185),h=n(29695),p=n(77145),g="DefaultChainId",f="DefaultJsonRpcUrl";t.WalletLinkSigner=class{constructor(e){var t,n;this._relay=null,this._addresses=[],this.hasMadeFirstChainChangedEmission=!1;const{appName:r,appLogoUrl:s}=e.metadata;this._appName=r,this._appLogoUrl=s,this._storage=new p.ScopedLocalStorage("walletlink",u.WALLETLINK_URL),this.updateListener=e.updateListener,this._relayEventManager=new a.RelayEventManager,this._jsonRpcUrlFromOpts="";const i=this._storage.getItem(o.LOCAL_STORAGE_ADDRESSES_KEY);if(i){const e=i.split(" ");""!==e[0]&&(this._addresses=e.map((e=>(0,h.ensureAddressString)(e))),null===(t=this.updateListener)||void 0===t||t.onAccountsUpdate({accounts:this._addresses,source:"storage"}))}this._storage.getItem(g)&&(null===(n=this.updateListener)||void 0===n||n.onChainUpdate({chain:{id:this.getChainId(),rpcUrl:this.jsonRpcUrl},source:"storage"}),this.hasMadeFirstChainChangedEmission=!0),this.initializeRelay()}getSession(){const e=this.initializeRelay(),{id:t,secret:n}=e.getWalletLinkSession();return{id:t,secret:n}}async handshake(){return await this.request({method:"eth_requestAccounts"})}get selectedAddress(){return this._addresses[0]||void 0}get jsonRpcUrl(){var e;return null!==(e=this._storage.getItem(f))&&void 0!==e?e:this._jsonRpcUrlFromOpts}set jsonRpcUrl(e){this._storage.setItem(f,e)}updateProviderInfo(e,t){var n;this.jsonRpcUrl=e;const r=this.getChainId();this._storage.setItem(g,t.toString(10));!((0,h.ensureIntNumber)(t)!==r)&&this.hasMadeFirstChainChangedEmission||(null===(n=this.updateListener)||void 0===n||n.onChainUpdate({chain:{id:t,rpcUrl:e},source:"wallet"}),this.hasMadeFirstChainChangedEmission=!0)}async watchAsset(e,t,n,r,s,i){const o=this.initializeRelay(),a=await o.watchAsset(e,t,n,r,s,null===i||void 0===i?void 0:i.toString());return!(0,c.isErrorResponse)(a)&&!!a.result}async addEthereumChain(e,t,n,r,s,i){var o,a;if((0,h.ensureIntNumber)(e)===this.getChainId())return!1;const d=this.initializeRelay();this._isAuthorized()||await d.requestEthereumAccounts();const u=await d.addEthereumChain(e.toString(),t,s,n,r,i);return!(0,c.isErrorResponse)(u)&&(!0===(null===(o=u.result)||void 0===o?void 0:o.isApproved)&&this.updateProviderInfo(t[0],e),!0===(null===(a=u.result)||void 0===a?void 0:a.isApproved))}async switchEthereumChain(e){const t=this.initializeRelay(),n=await t.switchEthereumChain(e.toString(10),this.selectedAddress||void 0);if((0,c.isErrorResponse)(n)){if(!n.errorCode)return;throw n.errorCode===l.standardErrorCodes.provider.unsupportedChain?l.standardErrors.provider.unsupportedChain():l.standardErrors.provider.custom({message:n.errorMessage,code:n.errorCode})}const r=n.result;r.isApproved&&r.rpcUrl.length>0&&this.updateProviderInfo(r.rpcUrl,e)}async disconnect(){this._relay&&this._relay.resetAndReload(),this._storage.clear()}async request(e){try{return this._request(e).catch((e=>{throw e}))}catch(t){return Promise.reject(t)}}async _request(e){if(!e||"object"!==typeof e||Array.isArray(e))throw l.standardErrors.rpc.invalidRequest({message:"Expected a single, non-array, object argument.",data:e});const{method:t,params:n}=e;if("string"!==typeof t||0===t.length)throw l.standardErrors.rpc.invalidRequest({message:"'args.method' must be a non-empty string.",data:e});if(void 0!==n&&!Array.isArray(n)&&("object"!==typeof n||null===n))throw l.standardErrors.rpc.invalidRequest({message:"'args.params' must be an object or array if provided.",data:e});const r=void 0===n?[]:n,s=this._relayEventManager.makeRequestId();return(await this._sendRequestAsync({method:t,params:r,jsonrpc:"2.0",id:s})).result}_setAddresses(e,t){var n;if(!Array.isArray(e))throw new Error("addresses is not an array");const r=e.map((e=>(0,h.ensureAddressString)(e)));JSON.stringify(r)!==JSON.stringify(this._addresses)&&(this._addresses=r,null===(n=this.updateListener)||void 0===n||n.onAccountsUpdate({accounts:r,source:"wallet"}),this._storage.setItem(o.LOCAL_STORAGE_ADDRESSES_KEY,r.join(" ")))}_sendRequestAsync(e){return new Promise(((t,n)=>{try{const n=this._handleSynchronousMethods(e);if(void 0!==n)return t({jsonrpc:"2.0",id:e.id,result:n})}catch(r){return n(r)}this._handleAsynchronousMethods(e).then((n=>n&&t(Object.assign(Object.assign({},n),{id:e.id}
1)))).catch((e=>n(e)))}))}_handleSynchronousMethods(e){const{method:t}=e;switch(t){case"eth_accounts":return this._eth_accounts();case"eth_coinbase":return this._eth_coinbase();case"net_version":return this._net_version();case"eth_chainId":return this._eth_chainId();default:return}}async _handleAsynchronousMethods(e){const{method:t}=e,n=e.params||[];switch(t){case"eth_requestAccounts":return this._eth_requestAccounts();case"eth_sign":return this._eth_sign(n);case"eth_ecRecover":return this._eth_ecRecover(n);case"personal_sign":return this._personal_sign(n);case"personal_ecRecover":return this._personal_ecRecover(n);case"eth_signTransaction":return this._eth_signTransaction(n);case"eth_sendRawTransaction":return this._eth_sendRawTransaction(n);case"eth_sendTransaction":return this._eth_sendTransaction(n);case"eth_signTypedData_v1":return this._eth_signTypedData_v1(n);case"eth_signTypedData_v2":default:return this._throwUnsupportedMethodError();case"eth_signTypedData_v3":return this._eth_signTypedData_v3(n);case"eth_signTypedData_v4":case"eth_signTypedData":return this._eth_signTypedData_v4(n);case"wallet_addEthereumChain":return this._wallet_addEthereumChain(n);case"wallet_switchEthereumChain":return this._wallet_switchEthereumChain(n);case"wallet_watchAsset":return this._wallet_watchAsset(n)}}_isKnownAddress(e){try{const t=(0,h.ensureAddressString)(e);return this._addresses.map((e=>(0,h.ensureAddressString)(e))).includes(t)}catch(t){}return!1}_ensureKnownAddress(e){if(!this._isKnownAddress(e))throw new Error("Unknown Ethereum address")}_prepareTransactionParams(e){const t=e.from?(0,h.ensureAddressString)(e.from):this.selectedAddress;if(!t)throw new Error("Ethereum address is unavailable");this._ensureKnownAddress(t);return{fromAddress:t,toAddress:e.to?(0,h.ensureAddressString)(e.to):null,weiValue:null!=e.value?(0,h.ensureBigInt)(e.value):BigInt(0),data:e.data?(0,h.ensureBuffer)(e.data):r.alloc(0),nonce:null!=e.nonce?(0,h.ensureIntNumber)(e.nonce):null,gasPriceInWei:null!=e.gasPrice?(0,h.ensureBigInt)(e.gasPrice):null,maxFeePerGas:null!=e.maxFeePerGas?(0,h.ensureBigInt)(e.maxFeePerGas):null,maxPriorityFeePerGas:null!=e.maxPriorityFeePerGas?(0,h.ensureBigInt)(e.maxPriorityFeePerGas):null,gasLimit:null!=e.gas?(0,h.ensureBigInt)(e.gas):null,chainId:e.chainId?(0,h.ensureIntNumber)(e.chainId):this.getChainId()}}_isAuthorized(){return this._addresses.length>0}_requireAuthorization(){if(!this._isAuthorized())throw l.standardErrors.provider.unauthorized({})}_throwUnsupportedMethodError(){throw l.standardErrors.provider.unsupportedMethod({})}async _signEthereumMessage(e,t,n,r){this._ensureKnownAddress(t);try{const s=this.initializeRelay(),i=await s.signEthereumMessage(e,t,n,r);if((0,c.isErrorResponse)(i))throw new Error(i.errorMessage);return{jsonrpc:"2.0",id:0,result:i.result}}catch(s){if("string"===typeof s.message&&s.message.match(/(denied|rejected)/i))throw l.standardErrors.provider.userRejectedRequest("User denied message signature");throw s}}async _ethereumAddressFromSignedMessage(e,t,n){const r=this.initializeRelay(),s=await r.ethereumAddressFromSignedMessage(e,t,n);if((0,c.isErrorResponse)(s))throw new Error(s.errorMessage);return{jsonrpc:"2.0",id:0,result:s.result}}_eth_accounts(){return[...this._addresses]}_eth_coinbase(){return this.selectedAddress||null}_net_version(){return this.getChainId().toString(10)}_eth_chainId(){return(0,h.hexStringFromIntNumber)(this.getChainId())}getChainId(){const e=this._storage.getItem(g);if(!e)return(0,h.ensureIntNumber)(1);const t=parseInt(e,10);return(0,h.ensureIntNumber)(t)}async _eth_requestAccounts(){if(this._isAuthorized())return Promise.resolve({jsonrpc:"2.0",id:0,result:this._addresses});let e;try{const t=this.initializeRelay();if(e=await t.requestEthereumAccounts(),(0,c.isErrorResponse)(e))throw new Error(e.errorMessage)}catch(t){if("string"===typeof t.message&&t.message.match(/(denied|rejected)/i))throw l.standardErrors.provider.userRejectedRequest("User denied account authorization");throw t}if(!e.result)throw new Error("accounts received is empty");return this._setAddresses(e.result),{jsonrpc:"2.0",id:0,result:this._addresses}}_eth_sign(e){this._requireAuthorization();const t=(0,h.ensureAddressString)(e[0]),n=(0,h.ensureBuffer)(e[1]);return this._signEthereumMessage(n,t,!1)}_eth_ecRecover(e){const t=(0,h.ensureBuffer)(e[0]),n=(0,h.ensureBuffer)(e[1]);return this._ethereumAddressFromSignedMessage(t,n,!1)}_personal_sign(e){this._requireAuthorization();const t=(0,h.ensureBuffer)(e[0]),n=(0,h.ensureAddressString)(e[1]);return this._signEthereumMessage(t,n,!0)}_personal_ecRecover(e){const t=(0,h.ensureBuffer)(e[0]),n=(0,h.ensureBuffer)(e[1]);return this._ethereumAddressFromSignedMessage(t,n,!0)}async _eth_signTransaction(e){this._requireAuthorization();const t=this._prepareTransactionParams(e[0]||{});try{const e=this.initializeRelay(),n=await e.signEthereumTransaction(t);
1if((0,c.isErrorResponse)(n))throw new Error(n.errorMessage);return{jsonrpc:"2.0",id:0,result:n.result}}catch(n){if("string"===typeof n.message&&n.message.match(/(denied|rejected)/i))throw l.standardErrors.provider.userRejectedRequest("User denied transaction signature");throw n}}async _eth_sendRawTransaction(e){const t=(0,h.ensureBuffer)(e[0]),n=this.initializeRelay(),r=await n.submitEthereumTransaction(t,this.getChainId());if((0,c.isErrorResponse)(r))throw new Error(r.errorMessage);return{jsonrpc:"2.0",id:0,result:r.result}}async _eth_sendTransaction(e){this._requireAuthorization();const t=this._prepareTransactionParams(e[0]||{});try{const e=this.initializeRelay(),n=await e.signAndSubmitEthereumTransaction(t);if((0,c.isErrorResponse)(n))throw new Error(n.errorMessage);return{jsonrpc:"2.0",id:0,result:n.result}}catch(n){if("string"===typeof n.message&&n.message.match(/(denied|rejected)/i))throw l.standardErrors.provider.userRejectedRequest("User denied transaction signature");throw n}}async _eth_signTypedData_v1(e){this._requireAuthorization();const t=(0,h.ensureParsedJSONObject)(e[0]),n=(0,h.ensureAddressString)(e[1]);this._ensureKnownAddress(n);const r=i.default.hashForSignTypedDataLegacy({data:t}),s=JSON.stringify(t,null,2);return this._signEthereumMessage(r,n,!1,s)}async _eth_signTypedData_v3(e){this._requireAuthorization();const t=(0,h.ensureAddressString)(e[0]),n=(0,h.ensureParsedJSONObject)(e[1]);this._ensureKnownAddress(t);const r=i.default.hashForSignTypedData_v3({data:n}),s=JSON.stringify(n,null,2);return this._signEthereumMessage(r,t,!1,s)}async _eth_signTypedData_v4(e){this._requireAuthorization();const t=(0,h.ensureAddressString)(e[0]),n=(0,h.ensureParsedJSONObject)(e[1]);this._ensureKnownAddress(t);const r=i.default.hashForSignTypedData_v4({data:n}),s=JSON.stringify(n,null,2);return this._signEthereumMessage(r,t,!1,s)}async _wallet_addEthereumChain(e){var t,n,r,s;const i=e[0];if(0===(null===(t=i.rpcUrls)||void 0===t?void 0:t.length))return{jsonrpc:"2.0",id:0,error:{code:2,message:"please pass in at least 1 rpcUrl"}};if(!i.chainName||""===i.chainName.trim())throw l.standardErrors.rpc.invalidParams("chainName is a required field");if(!i.nativeCurrency)throw l.standardErrors.rpc.invalidParams("nativeCurrency is a required field");const o=parseInt(i.chainId,16);return await this.addEthereumChain(o,null!==(n=i.rpcUrls)&&void 0!==n?n:[],null!==(r=i.blockExplorerUrls)&&void 0!==r?r:[],i.chainName,null!==(s=i.iconUrls)&&void 0!==s?s:[],i.nativeCurrency)?{jsonrpc:"2.0",id:0,result:null}:{jsonrpc:"2.0",id:0,error:{code:2,message:"unable to add ethereum chain"}}}async _wallet_switchEthereumChain(e){const t=e[0];return await this.switchEthereumChain(parseInt(t.chainId,16)),{jsonrpc:"2.0",id:0,result:null}}async _wallet_watchAsset(e){const t=Array.isArray(e)?e[0]:e;if(!t.type)throw l.standardErrors.rpc.invalidParams("Type is required");if("ERC20"!==(null===t||void 0===t?void 0:t.type))throw l.standardErrors.rpc.invalidParams(`Asset of type '${t.type}' is not supported`);if(!(null===t||void 0===t?void 0:t.options))throw l.standardErrors.rpc.invalidParams("Options are required");if(!(null===t||void 0===t?void 0:t.options.address))throw l.standardErrors.rpc.invalidParams("Address is required");const n=this.getChainId(),{address:r,symbol:s,image:i,decimals:o}=t.options;return{jsonrpc:"2.0",id:0,result:await this.watchAsset(t.type,r,s,o,i,n)}}initializeRelay(){if(!this._relay){const e=new d.WalletLinkRelay({linkAPIUrl:u.WALLETLINK_URL,storage:this._storage});e.setAppInfo(this._appName,this._appLogoUrl),e.attachUI(),e.setAccountsCallback(((e,t)=>this._setAddresses(e,t))),e.setChainCallback(((e,t)=>{this.updateProviderInfo(t,parseInt(e,10))})),this._relay=e}return this._relay}}},79909:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RelayEventManager=void 0;const r=n(29695);t.RelayEventManager=class{constructor(){this._nextRequestId=0,this.callbacks=new Map}makeRequestId(){this._nextRequestId=(this._nextRequestId+1)%2147483647;const e=this._nextRequestId,t=(0,r.prepend0x)(e.toString(16));return this.callbacks.get(t)&&this.callbacks.delete(t),e}}},42988:function(e,t,n){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLinkRelay=void 0;const r=n(15150),s=n(86349),i=n(79909),o=n(47923),a=n(49055),c=n(6464),d=n(49674),u=n(18194),l=n(37185),h=n(29695),p=n(77145);class g{constructor(e){this.accountsCallback=null,this.chainCallbackParams={chainId:"",jsonRpcUrl:""},this.chainCallback=null,this.dappDefaultChain=1,this.isMobileWeb=(0,c.isMobileWeb)(),this.appName="",this.appLogoUrl=null,this.linkedUpdated=e=>{this.isLinked=e;const t=this.storage.getItem(s.LOCAL_STORAGE_ADDRESSES_KEY);if(e&&(this._session.linked=e),this.isUnlinkedErrorState=!1,t){const n=t.split(" "),r="true"===this.storage.getItem("IsStandaloneSigning");""===n[0]||e||!this._session.linked||r||(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(e,t))},this.accountUpdated=e=>{this.accountsCallback&&this.accountsCallback([e]),g.accountRequestCallbackIds.size>0&&(Array.from(g.accountRequestCallbackIds.values()).forEach((t=>{const n={type:"WEB3_RESPONSE",id:t,response:{method:"requestEthereumAccounts",result:[e]}};this.invokeCallback(Object.assign(Object.assign({},n),{id:t}))})),g.accountRequestCallbackIds.clear())},this.resetAndReload=this.resetAndReload.bind(this),this.linkAPIUrl=e.linkAPIUrl,this.storage=e.storage;const{session:t,ui:n,connection:r}=this.subscribe();this._session=t,this.connection=r,this.relayEventManager=new i.RelayEventManager,this.ui=n}subscribe(){const e=o.WalletLinkSession.load(this.storage)||new o.WalletLinkSession(this.storage).save(),{linkAPIUrl:t}=this,n=new r.WalletLinkConnection({session:e,linkAPIUrl:t,listener:this}),s=this.isMobileWeb?new u.WLMobileRelayUI:new d.WalletLinkRelayUI;return n.connect(),{session:e,ui:s,connection:n}}attachUI(){this.ui.attach()}resetAndReload(){Promise.race([this.connection.setSessionMetadata("__destroyed","1"),new Promise((e=>setTimeout((()=>e(null)),1e3)))]).then((()=>{this.connection.destroy();const e=o.WalletLinkSession.load(this.storage);(null===e||void 0===e?void 0:e.id)===this._session.id&&p.ScopedLocalStorage.clearAll(),document.location.reload()})).catch((e=>{}))}setAppInfo(e,t){this.appName=e,this.appLogoUrl=t}getStorageItem(e){return this.storage.getItem(e)}setStorageItem(e,t){this.storage.setItem(e,t)}signEthereumMessage(e,t,n,r){return this.sendRequest({method:"signEthereumMessage",params:{message:(0,h.hexStringFromBuffer)(e,!0),address:t,addPrefix:n,typedDataJson:r||null}})}ethereumAddressFromSignedMessage(e,t,n){return this.sendRequest({method:"ethereumAddressFromSignedMessage",params:{message:(0,h.hexStringFromBuffer)(e,!0),signature:(0,h.hexStringFromBuffer)(t,!0),addPrefix:n}})}signEthereumTransaction(e){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:(0,h.bigIntStringFromBigInt)(e.weiValue),data:(0,h.hexStringFromBuffer)(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?(0,h.bigIntStringFromBigInt)(e.gasPriceInWei):null,maxFeePerGas:e.gasPriceInWei?(0,h.bigIntStringFromBigInt)(e.gasPriceInWei):null,maxPriorityFeePerGas:e.gasPriceInWei?(0,h.bigIntStringFromBigInt)(e.gasPriceInWei):null,gasLimit:e.gasLimit?(0,h.bigIntStringFromBigInt)(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!1}})}signAndSubmitEthereumTransaction(e){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:(0,h.bigIntStringFromBigInt)(e.weiValue),data:(0,h.hexStringFromBuffer)(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?(0,h.bigIntStringFromBigInt)(e.gasPriceInWei):null,maxFeePerGas:e.maxFeePerGas?(0,h.bigIntStringFromBigInt)(e.maxFeePerGas):null,maxPriorityFeePerGas:e.maxPriorityFeePerGas?(0,h.bigIntStringFromBigInt)(e.maxPriorityFeePerGas):null,gasLimit:e.gasLimit?(0,h.bigIntStringFromBigInt)(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!0}})}submitEthereumTransaction(e,t){return this.sendRequest({method:"submitEthereumTransaction",params:{signedTransaction:(0,h.hexStringFromBuffer)(e,!0),chainId:t}})}scanQRCode(e){return this.sendRequest({method:"scanQRCode",params:{regExp:e}})}getWalletLinkSession(){return this._session}genericRequest(e,t){return this.sendRequest({method:"generic",params:{action:t,data:e}})}sendGenericMessage(e){return this.sendRequest(e)}sendRequest(e){let t=null;const n=(0,h.randomBytesHex)(8),r=r=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,e.method,r),null===t||void 0===t||t()};return new Promise(((s,i)=>{t=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:r,onResetConnection:this.resetAndReload}),this.relayEventManager.callbacks.set(n,(e=>{if(null===t||void 0===t||t(),(0,a.isErrorResponse)(e))return i(new Error(e.errorMessage));s(e)})),this.publishWeb3RequestEvent(n,e)}))}setAccountsCallback(e){this.accountsCallback=e}setChainCallback(e){this.chainCallback=e}setDappDefaultChainCallback(e){this.dappDefaultChain=e}publishWeb3RequestEvent(e,t){const n={type:"WEB3_REQUEST",id:e,request:t};this.publishEvent("Web3Request",n,!0).then((e=>{})).catch((e=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:n.id,response:{method:t.method,errorMessage:e.message}})})),this.isMobileWeb&&this.openCoinbaseWalletDeeplink(t.method)}openCoinbaseWalletDeeplink(e){if(this.ui instanceof u.WLMobileRelayUI)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){const t={type:"WEB3_REQUEST_CANCELED",id:e};this.publishEvent("Web3RequestCanceled",t,!1).then()}publishEvent(e,t,n){return this.connection.publishEvent(e,t,n)}handleWeb3ResponseMessage(e){const{response:t}=e;if("requestEthereumAccounts"===t.method)return g.accountRequestCallbackIds.forEach((t=>this.invokeCallback(Object.assign(Object.assign({},e),{id:t})))),void g.accountRequestCallbackIds.clear();this.invokeCallback(e)}handleErrorResponse(e,t,n){var r;const s=null!==(r=null===n||void 0===n?void 0:n.message)&&void 0!==r?r:"Unspecified error message.";this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:e,response:{method:t,errorMessage:s}})}invokeCallback(e){const t=this.relayEventManager.callbacks.get(e.id);t&&(t(e.response),this.relayEventManager.callbacks.delete(e.id))}requestEthereumAccounts(){const e={method:"requestEthereumAccounts",params:{appName:this.appName,a
1ppLogoUrl:this.appLogoUrl||null}},t=(0,h.randomBytesHex)(8);return new Promise(((n,r)=>{this.relayEventManager.callbacks.set(t,(e=>{if((0,a.isErrorResponse)(e))return r(new Error(e.errorMessage));n(e)})),g.accountRequestCallbackIds.add(t),this.publishWeb3RequestEvent(t,e)}))}watchAsset(e,t,n,r,s,i){const o={method:"watchAsset",params:{type:e,options:{address:t,symbol:n,decimals:r,image:s},chainId:i}};let c=null;const d=(0,h.randomBytesHex)(8),u=e=>{this.publishWeb3RequestCanceledEvent(d),this.handleErrorResponse(d,o.method,e),null===c||void 0===c||c()};return c=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:u,onResetConnection:this.resetAndReload}),new Promise(((e,t)=>{this.relayEventManager.callbacks.set(d,(n=>{if(null===c||void 0===c||c(),(0,a.isErrorResponse)(n))return t(new Error(n.errorMessage));e(n)})),this.publishWeb3RequestEvent(d,o)}))}addEthereumChain(e,t,n,r,s,i){const o={method:"addEthereumChain",params:{chainId:e,rpcUrls:t,blockExplorerUrls:r,chainName:s,iconUrls:n,nativeCurrency:i}};let c=null;const d=(0,h.randomBytesHex)(8),u=e=>{this.publishWeb3RequestCanceledEvent(d),this.handleErrorResponse(d,o.method,e),null===c||void 0===c||c()};return c=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:u,onResetConnection:this.resetAndReload}),new Promise(((e,t)=>{this.relayEventManager.callbacks.set(d,(n=>{if(null===c||void 0===c||c(),(0,a.isErrorResponse)(n))return t(new Error(n.errorMessage));e(n)})),this.publishWeb3RequestEvent(d,o)}))}switchEthereumChain(e,t){const n={method:"switchEthereumChain",params:Object.assign({chainId:e},{address:t})},r=(0,h.randomBytesHex)(8);return new Promise(((e,t)=>{this.relayEventManager.callbacks.set(r,(n=>(0,a.isErrorResponse)(n)&&n.errorCode?t(l.standardErrors.provider.custom({code:n.errorCode,message:"Unrecognized chain ID. Try adding the chain using addEthereumChain first."})):(0,a.isErrorResponse)(n)?t(new Error(n.errorMessage)):void e(n))),this.publishWeb3RequestEvent(r,n)}))}}t.WalletLinkRelay=g,g.accountRequestCallbackIds=new Set},58469:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLinkCipher=void 0;const r=n(29695);t.WalletLinkCipher=class{constructor(e){this.secret=e}async encrypt(e){const t=this.secret;if(64!==t.length)throw Error("secret must be 256 bits");const n=crypto.getRandomValues(new Uint8Array(12)),s=await crypto.subtle.importKey("raw",(0,r.hexStringToUint8Array)(t),{name:"aes-gcm"},!1,["encrypt","decrypt"]),i=new TextEncoder,o=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:n},s,i.encode(e)),a=o.slice(o.byteLength-16),c=o.slice(0,o.byteLength-16),d=new Uint8Array(a),u=new Uint8Array(c),l=new Uint8Array([...n,...d,...u]);return(0,r.uint8ArrayToHex)(l)}async decrypt(e){const t=this.secret;if(64!==t.length)throw Error("secret must be 256 bits");return new Promise(((n,s)=>{!async function(){const i=await crypto.subtle.importKey("raw",(0,r.hexStringToUint8Array)(t),{name:"aes-gcm"},!1,["encrypt","decrypt"]),o=(0,r.hexStringToUint8Array)(e),a=o.slice(0,12),c=o.slice(12,28),d=o.slice(28),u=new Uint8Array([...d,...c]),l={name:"AES-GCM",iv:new Uint8Array(a)};try{const e=await window.crypto.subtle.decrypt(l,i,u),t=new TextDecoder;n(t.decode(e))}catch(h){s(h)}}()}))}}},15150:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLinkConnection=void 0;const r=n(86349),s=n(58469),i=n(9166),o=n(59766),a=n(53513);t.WalletLinkConnection=class{constructor({session:e,linkAPIUrl:t,listener:n,WebSocketClass:c=WebSocket}){this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,a.IntNumber)(1),this._connected=!1,this._linked=!1,this.shouldFetchUnseenEventsOnConnect=!1,this.requestResolutions=new Map,this.handleSessionMetadataUpdated=e=>{if(!e)return;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,n)=>{const r=e[n];void 0!==r&&t(r)}))},this.handleDestroyed=e=>{var t;"1"===e&&(null===(t=this.listener)||void 0===t||t.resetAndReload())},this.handleAccountUpdated=async e=>{var t;{const n=await this.cipher.decrypt(e);null===(t=this.listener)||void 0===t||t.accountUpdated(n)}},this.handleMetadataUpdated=async(e,t)=>{var n;{const r=await this.cipher.decrypt(t);null===(n=this.listener)||void 0===n||n.metadataUpdated(e,r)}},this.handleWalletUsernameUpdated=async e=>{this.handleMetadataUpdated(r.WALLET_USER_NAME_KEY,e)},this.handleAppVersionUpdated=async e=>{this.handleMetadataUpdated(r.APP_VERSION_KEY,e)},this.handleChainUpdated=async(e,t)=>{var n;{const r=await this.cipher.decrypt(e),s=await this.cipher.decrypt(t);null===(n=this.listener)||void 0===n||n.chainUpdated(r,s)}},this.session=e,this.cipher=new s.WalletLinkCipher(e.secret),this.listener=n;const d=new o.WalletLinkWebSocket(`${t}/rpc`,c);d.setConnectionStateListener((async e=>{let t=!1;switch(e){case o.ConnectionState.DISCONNECTED:if(!this.destroyed){const e=async()=>{await new Promise((e=>setTimeout(e,5e3))),this.destroyed||d.connect().catch((()=>{e()}))};e()}break;case o.ConnectionState.CONNECTED:try{await this.authenticate(),this.sendIsLinked(),this.sendGetSessionConfig(),t=!0}catch(n){}this.updateLastHeartbeat(),setInterval((()=>{this.heartbeat()}),1e4),this.shouldFetchUnseenEventsOnConnect&&this.fetchUnseenEventsAPI();case o.ConnectionState.CONNECTING:}this.connected!==t&&(this.connected=t)})),d.setIncomingDataListener((e=>{var t;switch(e.type){case"Heartbeat":return void this.updateLastHeartbeat();case"IsLinkedOK":case"Linked":{const 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))||void 0===t||t(e))})),this.ws=d,this.http=new i.WalletLinkHTTP(t,e.id,e.key)}connect(){if(this.destroyed)throw new Error("instance is destroyed");this.ws.connect()}destroy(){this.destroyed=!0,this.ws.disconnect(),this.listener=void 0}get isDestroyed(){return this.destroyed}get connected(){return this._connected}set connected(e){var t;this._connected=e,e&&(null===(t=this.onceConnected)||void 0===t||t.call(this))}setOnceConnected(e){return new Promise((t=>{this.connected?e().then(t):this.onceConnected=()=>{e().then(t),this.onceConnected=void 0}}))}get linked(){return this._linked}set linked(e){var t,n;this._linked=e,e&&(null===(t=this.onceLinked)||void 0===t||t.call(this)),null===(n=this.listener)||void 0===n||n.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){const n=await this.cipher.decrypt(e.data),r=JSON.parse(n);if("WEB3_RESPONSE"!==r.type)return;null===(t=this.listener)||void 0===t||t.handleWeb3ResponseMessage(r)}}async checkUnseenEvents(){if(this.connected){await new Promise((e=>setTimeout(e,250)));try{await this.fetchUnseenEventsAPI()}catch(e){console.error("Unable to check for unseen events",e)}}else this.shouldFetchUnseenEventsOnConnect=!0}async fetchUnseenEventsAPI(){this.shouldFetchUnseenEventsOnConnect=!1;
1(await this.http.fetchUnseenEvents()).forEach((e=>this.handleIncomingEvent(e)))}async setSessionMetadata(e,t){const n={type:"SetSessionConfig",id:(0,a.IntNumber)(this.nextReqId++),sessionId:this.session.id,metadata:{[e]:t}};return this.setOnceConnected((async()=>{const e=await this.makeRequest(n);if("Fail"===e.type)throw new Error(e.error||"failed to set session metadata")}))}async publishEvent(e,t,n=!1){const r=await this.cipher.encrypt(JSON.stringify(Object.assign(Object.assign({},t),{origin:location.origin,relaySource:"coinbaseWalletExtension"in window&&window.coinbaseWalletExtension?"injected_sdk":"sdk"}))),s={type:"PublishEvent",id:(0,a.IntNumber)(this.nextReqId++),sessionId:this.session.id,event:e,data:r,callWebhook:n};return this.setOnceLinked((async()=>{const e=await this.makeRequest(s);if("Fail"===e.type)throw new 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)this.ws.disconnect();else try{this.ws.sendData("h")}catch(e){}}async makeRequest(e,t=6e4){const n=e.id;let r;return this.sendData(e),Promise.race([new Promise(((e,s)=>{r=window.setTimeout((()=>{s(new Error(`request ${n} timed out`))}),t)})),new Promise((e=>{this.requestResolutions.set(n,(t=>{clearTimeout(r),e(t),this.requestResolutions.delete(n)}))}))])}async authenticate(){const e={type:"HostSession",id:(0,a.IntNumber)(this.nextReqId++),sessionId:this.session.id,sessionKey:this.session.key},t=await this.makeRequest(e);if("Fail"===t.type)throw new Error(t.error||"failed to authenticate")}sendIsLinked(){const e={type:"IsLinked",id:(0,a.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(e)}sendGetSessionConfig(){const e={type:"GetSessionConfig",id:(0,a.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(e)}}},9166:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLinkHTTP=void 0;t.WalletLinkHTTP=class{constructor(e,t,n){this.linkAPIUrl=e,this.sessionId=t;const r=`${t}:${n}`;this.auth=`Basic ${btoa(r)}`}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;const t=await fetch(`${this.linkAPIUrl}/events?unseen=true`,{headers:{Authorization:this.auth}});if(t.ok){const{events:n,error:r}=await t.json();if(r)throw new Error(`Check unseen events failed: ${r}`);const s=null!==(e=null===n||void 0===n?void 0:n.filter((e=>"Web3Response"===e.event)).map((e=>({type:"Event",sessionId:this.sessionId,eventId:e.id,event:e.event,data:e.data}))))&&void 0!==e?e:[];return this.markUnseenEventsAsSeen(s),s}throw new Error(`Check unseen events failed: ${t.status}`)}}},59766:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLinkWebSocket=t.ConnectionState=void 0,function(e){e[e.DISCONNECTED=0]="DISCONNECTED",e[e.CONNECTING=1]="CONNECTING",e[e.CONNECTED=2]="CONNECTED"}(n||(t.ConnectionState=n={}));t.WalletLinkWebSocket=class{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 new Error("webSocket object is not null");return new Promise(((e,t)=>{var r;let s;try{this.webSocket=s=new this.WebSocketClass(this.url)}catch(i){return void t(i)}null===(r=this.connectionStateListener)||void 0===r||r.call(this,n.CONNECTING),s.onclose
1=e=>{var r;this.clearWebSocket(),t(new Error(`websocket error ${e.code}: ${e.reason}`)),null===(r=this.connectionStateListener)||void 0===r||r.call(this,n.DISCONNECTED)},s.onopen=t=>{var r;if(e(),null===(r=this.connectionStateListener)||void 0===r||r.call(this,n.CONNECTED),this.pendingData.length>0){[...this.pendingData].forEach((e=>this.sendData(e))),this.pendingData=[]}},s.onmessage=e=>{var t,n;if("h"===e.data)null===(t=this.incomingDataListener)||void 0===t||t.call(this,{type:"Heartbeat"});else try{const t=JSON.parse(e.data);null===(n=this.incomingDataListener)||void 0===n||n.call(this,t)}catch(r){}}}))}disconnect(){var e;const{webSocket:t}=this;if(t){this.clearWebSocket(),null===(e=this.connectionStateListener)||void 0===e||e.call(this,n.DISCONNECTED),this.connectionStateListener=void 0,this.incomingDataListener=void 0;try{t.close()}catch(r){}}}sendData(e){const{webSocket:t}=this;if(!t)return this.pendingData.push(e),void this.connect();t.send(e)}clearWebSocket(){const{webSocket:e}=this;e&&(this.webSocket=null,e.onclose=null,e.onerror=null,e.onmessage=null,e.onopen=null)}}},86349:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.APP_VERSION_KEY=t.LOCAL_STORAGE_ADDRESSES_KEY=t.WALLET_USER_NAME_KEY=void 0,t.WALLET_USER_NAME_KEY="walletUsername",t.LOCAL_STORAGE_ADDRESSES_KEY="Addresses",t.APP_VERSION_KEY="AppVersion"},47923:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLinkSession=void 0;const r=n(89072),s=n(29695),i="session:id",o="session:secret",a="session:linked";class c{constructor(e,t,n,i){this._storage=e,this._id=t||(0,s.randomBytesHex)(16),this._secret=n||(0,s.randomBytesHex)(32),this._key=(new r.sha256).update(`${this._id}, ${this._secret} WalletLink`).digest("hex"),this._linked=!!i}static load(e){const t=e.getItem(i),n=e.getItem(a),r=e.getItem(o);return t&&r?new c(e,t,r,"1"===n):null}get id(){return this._id}get secret(){return this._secret}get key(){return this._key}get linked(){return this._linked}set linked(e){this._linked=e,this.persistLinked()}save(){return this._storage.setItem(i,this._id),this._storage.setItem(o,this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem(a,this._linked?"1":"0")}}t.WalletLinkSession=c},49055:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isErrorResponse=void 0,t.isErrorResponse=function(e){return void 0!==e.errorMessage}},18194:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WLMobileRelayUI=void 0;const r=n(48726),s=n(6464),i=n(96415);t.WLMobileRelayUI=class{constructor(){this.attached=!1,this.redirectDialog=new r.RedirectDialog}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");this.redirectDialog.attach(),this.attached=!0}redirectToCoinbaseWallet(e){const t=new URL(i.CBW_MOBILE_DEEPLINK_URL);t.searchParams.append("redirect_url",(0,s.getLocation)().href),e&&t.searchParams.append("wl_url",e);const n=document.createElement("a");n.target="cbw-opener",n.href=t.href,n.rel="noreferrer noopener",n.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()}}}},49674:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletLinkRelayUI=void 0;const r=n(49612),s=n(15209);t.WalletLinkRelayUI=class{constructor(){this.attached=!1,this.snackbar=new s.Snackbar}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");const e=document.documentElement,t=document.createElement("div");t.className="-cbwsdk-css-reset",e.appendChild(t),this.snackbar.attach(t),this.attached=!0,(0,r.injectCssReset)()}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.9687
15 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)}}},68970:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=".-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}
1.-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}"},48726:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RedirectDialog=void 0;const s=r(n(86010)),i=n(74052),o=n(49612),a=n(15209),c=n(6464),d=r(n(68970));t.RedirectDialog=class{constructor(){this.root=null,this.darkMode=(0,c.isDarkMode)()}attach(){const e=document.documentElement;this.root=document.createElement("div"),this.root.className="-cbwsdk-css-reset",e.appendChild(this.root),(0,o.injectCssReset)()}present(e){this.render(e)}clear(){this.render(null)}render(e){this.root&&((0,i.render)(null,this.root),e&&(0,i.render)((0,i.h)(u,Object.assign({},e,{onDismiss:()=>{this.clear()},darkMode:this.darkMode})),this.root))}};const u=({title:e,buttonText:t,darkMode:n,onButtonClick:r,onDismiss:o})=>{const c=n?"dark":"light";return(0,i.h)(a.SnackbarContainer,{darkMode:n},(0,i.h)("div",{class:"-cbwsdk-redirect-dialog"},(0,i.h)("style",null,d.default),(0,i.h)("div",{class:"-cbwsdk-redirect-dialog-backdrop",onClick:o}),(0,i.h)("div",{class:(0,s.default)("-cbwsdk-redirect-dialog-box",c)},(0,i.h)("p",null,e),(0,i.h)("button",{onClick:r},t))))}},9335:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=".-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}
1.-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}"},15209:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SnackbarInstance=t.SnackbarContainer=t.Snackbar=void 0;const s=r(n(86010)),i=n(74052),o=n(54971),a=n(6464),c=r(n(9335));t.Snackbar=class{constructor(){this.items=new Map,this.nextItemKey=0,this.root=null,this.darkMode=(0,a.isDarkMode)()}attach(e){this.root=document.createElement("div"),this.root.className="-cbwsdk-snackbar-root",e.appendChild(this.root),this.render()}presentItem(e){const 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,i.render)((0,i.h)("div",null,(0,i.h)(t.SnackbarContainer,{darkMode:this.darkMode},Array.from(this.items.entries()).map((([e,n])=>(0,i.h)(t.SnackbarInstance,Object.assign({},n,{key:e})))))),this.root)}};t.SnackbarContainer=e=>(0,i.h)("div",{class:(0,s.default)("-cbwsdk-snackbar-container")},(0,i.h)("style",null,c.default),(0,i.h)("div",{class:"-cbwsdk-snackbar"},e.children));t.SnackbarInstance=({autoExpand:e,message:t,menuItems:n})=>{const[r,a]=(0,o.useState)(!0),[c,d]=(0,o.useState)(null!==e&&void 0!==e&&e);(0,o.useEffect)((()=>{const e=[window.setTimeout((()=>{a(!1)}),1),window.setTimeout((()=>{d(!0)}),1e4)];return()=>{e.forEach(window.clearTimeout)}}));return(0,i.h)("div",{class:(0,s.default)("-cbwsdk-snackbar-instance",r&&"-cbwsdk-snackbar-instance-hidden",c&&"-cbwsdk-snackbar-instance-expanded")},(0,i.h)("div",{class:"-cbwsdk-snackbar-instance-header",onClick:()=>{d(!c)}},(0,i.h)("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04LjkzLTguOTNIMTAuNDJ6IiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS45OTggMjYuMDQ5Yy01LjU0OSAwLTEwLjA0Ny00LjQ5OC0xMC4wNDctMTAuMDQ3IDAtNS41NDggNC40OTgtMTAuMDQ2IDEwLjA0Ny0xMC4wNDYgNS41NDggMCAxMC4wNDYgNC40OTggMTAuMDQ2IDEwLjA0NiAwIDUuNTQ5LTQuNDk4IDEwLjA0Ny0xMC4wNDYgMTAuMDQ3eiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xMi43NjIgMTQuMjU0YzAtLjgyMi42NjctMS40ODkgMS40ODktMS40ODloMy40OTdjLjgyMiAwIDEuNDg4LjY2NiAxLjQ4OCAxLjQ4OXYzLjQ5N2MwIC44MjItLjY2NiAxLjQ4OC0xLjQ4OCAxLjQ4OGgtMy40OTdhMS40ODggMS40ODggMCAwMS0xLjQ4OS0xLjQ4OHYtMy40OTh6IiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+",class:"-cbwsdk-snackbar-instance-header-cblogo"})," ",(0,i.h)("div",{class:"-cbwsdk-snackbar-instance-header-message"},t),(0,i.h)("div",{class:"-gear-container"},!c&&(0,i.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,i.h)("circle",{cx:"12",cy:"12",r:"12",fill:"#F5F7F8"})),(0,i.h)("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDYuNzV2LTEuNWwtMS43Mi0uNTdjLS4wOC0uMjctLjE5LS41Mi0uMzItLjc3bC44MS0xLjYyLTEuMDYtMS4wNi0xLjYyLjgxYy0uMjQtLjEzLS41LS4yNC0uNzctLjMyTDYuNzUgMGgtMS41bC0uNTcgMS43MmMtLjI3LjA4LS41My4xOS0uNzcuMzJsLTEuNjItLjgxLTEuMDYgMS4wNi44MSAxLjYyYy0uMTMuMjQtLjI0LjUtLjMyLjc3TDAgNS4yNXYxLjVsMS43Mi41N2MuMDguMjcuMTkuNTMuMzIuNzdsLS44MSAxLjYyIDEuMDYgMS4wNiAxLjYyLS44MWMuMjQuMTMuNS4yMy43Ny4zMkw1LjI1IDEyaDEuNWwu
1NTctMS43MmMuMjctLjA4LjUyLS4xOS43Ny0uMzJsMS42Mi44MSAxLjA2LTEuMDYtLjgxLTEuNjJjLjEzLS4yNC4yMy0uNS4zMi0uNzdMMTIgNi43NXpNNiA4LjVhMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=",class:"-gear-icon",title:"Expand"}))),n&&n.length>0&&(0,i.h)("div",{class:"-cbwsdk-snackbar-instance-menu"},n.map(((e,t)=>(0,i.h)("div",{class:(0,s.default)("-cbwsdk-snackbar-instance-menu-item",e.isRed&&"-cbwsdk-snackbar-instance-menu-item-is-red"),onClick:e.onClick,key:t},(0,i.h)("svg",{width:e.svgWidth,height:e.svgHeight,viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,i.h)("path",{"fill-rule":e.defaultFillRule,"clip-rule":e.defaultClipRule,d:e.path,fill:"#AAAAAA"})),(0,i.h)("span",{class:(0,s.default)("-cbwsdk-snackbar-instance-menu-item-info",e.isRed&&"-cbwsdk-snackbar-instance-menu-item-info-is-red")},e.info))))))}},52233:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default='@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}'},49612:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esMo
1dule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.injectCssReset=void 0;const s=r(n(52233));t.injectCssReset=function(){const e=document.createElement("style");e.type="text/css",e.appendChild(document.createTextNode(s.default)),document.documentElement.appendChild(e)}},6464:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDarkMode=t.isMobileWeb=t.getLocation=t.createQrUrl=void 0,t.createQrUrl=function(e,t,n,r,s,i){return`${n}/#/link?${new URLSearchParams({[r?"parent-id":"id"]:e,secret:t,server:n,v:s,chainId:i.toString()}).toString()}`},t.getLocation=function(){try{return function(){try{return null!==window.frameElement}catch(e){return!1}}()&&window.top?window.top.location:window.location}catch(e){return window.location}},t.isMobileWeb=function(){var e;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(null===(e=null===window||void 0===window?void 0:window.navigator)||void 0===e?void 0:e.userAgent)},t.isDarkMode=function(){var e,t;return null!==(t=null===(e=null===window||void 0===window?void 0:window.matchMedia)||void 0===e?void 0:e.call(window,"(prefers-color-scheme: dark)").matches)&&void 0!==t&&t}},77145:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ScopedLocalStorage=void 0;class n{constructor(e,t){this.scope=e,this.module=t}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(){const e=this.scopedKey(""),t=[];for(let n=0;n<localStorage.length;n++){const r=localStorage.key(n);"string"===typeof r&&r.startsWith(e)&&t.push(r)}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()}}t.ScopedLocalStorage=n},5672:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decryptContent=t.encryptContent=t.importKeyFromHexString=t.exportKeyToHexString=t.decrypt=t.encrypt=t.deriveSharedSecret=t.generateKeyPair=void 0;const r=n(29695);async function s(e,t){const n=crypto.getRandomValues(new Uint8Array(12));return{iv:n,cipherText:await crypto.subtle.encrypt({name:"AES-GCM",iv:n},e,(new TextEncoder).encode(t))}}async function i(e,{iv:t,cipherText:n}){const r=await crypto.subtle.decrypt({name:"AES-GCM",iv:t},e,n);return(new TextDecoder).decode(r)}function o(e){switch(e){case"public":return"spki";case"private":return"pkcs8"}}t.generateKeyPair=async function(){return crypto.subtle.generateKey({name:"ECDH",namedCurve:"P-256"},!0,["deriveKey"])},t.deriveSharedSecret=async function(e,t){return crypto.subtle.deriveKey({name:"ECDH",public:t},e,{name:"AES-GCM",length:256},!1,["encrypt","decrypt"])},t.encrypt=s,t.decrypt=i,t.exportKeyToHexString=async function(e,t){const n=o(e),s=await crypto.subtle.exportKey(n,t);return(0,r.uint8ArrayToHex)(new Uint8Array(s))},t.importKeyFromHexString=async function(e,t){const n=o(e),s=(0,r.hexStringToUint8Array)(t).buffer;return await crypto.subtle.importKey(n,s,{name:"ECDH",namedCurve:"P-256"},!0,"private"===e?["deriveKey"]:[])},t.encryptContent=async function(e,t){return s(t,JSON.stringify(e,((e,t)=>{if(!(t instanceof Error))return t;const n=t;return Object.assign(Object.assign({},n.code?{code:n.code}:{}),{message:n.message})})))},t.decryptContent=async function(e,t){return JSON.parse(await i(t,e))}},74996:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkErrorForInvalidRequestArgs=t.getCoinbaseInjectedProvider=t.getCoinbaseInjectedSigner=t.fetchRPCRequest=void 0;const r=n(43604),s=n(37185);function i(){return globalThis.coinbaseWalletSigner}t.fetchRPCRequest=async function(e,t){if(!t.rpcUrl)throw s.standardErrors.rpc.internal("No RPC URL set for chain");const n=Object.assign(Object.assign({},e),{jsonrpc:"2.0",id:crypto.randomUUID()}),i=await window.fetch(t.rpcUrl,{method:"POST",body:JSON.stringify(n),mode:"cors",headers:{"Content-Type":"application/json","X-Cbw-Sdk-Version":r.LIB_VERSION}});return(await i.json()).result},t.getCoinbaseInjectedSigner=i,t.getCoinbaseInjectedProvider=function({metadata:e,preference:t}){var n,r,s;const o=globalThis;if("smartWalletOnly"!==t.options){if(i())return;const t=o.coinbaseWalletExtension;if(t){const{appName:r,appLogoUrl:s,appChainIds:i}=e;return null===(n=t.setAppInfo)||void 0===n||n.call(t,r,s,i),t}}const a=null!==(r=o.ethereum)&&void 0!==r?r:null===(s=o.top)||void 0===s?void 0:s.ethereum;if(null===a||void 0===a?void 0:a.isCoinbaseBrowser)return a},t.checkErrorForInvalidRequestArgs=function(e){if(!e||"object"!==typeof e||Array.isArray(e))return s.standardErrors.rpc.invalidParams({message:"Expected a single, non-array, object argument.",data:e});const{method:t,params:n}=e;return"string"!==typeof t||0===t.length?s.standardErrors.rpc.invalidParams({message:"'args.method' must be a non-empty string.",data:e}):void 0===n||Array.isArray(n)||"object"===typeof n&&null!==n?void 0:s.standardErrors.rpc.invalidParams({message:"'args.params' must be an object or array if provided.",data:e})}},36089:function(e,t,n){var r=n(48764).Buffer;const s=n(32518);function i(e){return e.startsWith("int[")?"int256"+e.slice(3):"int"===e?"int256":e.startsWith("uint[")?"uint256"+e.slice(4):"uint"===e?"uint256":e.startsWith("fixed[")?"fixed128x128"+e.slice(5):"fixed"===e?"fixed128x128":e.startsWith("ufixed[")?"ufixed128x128"+e.slice(6):"ufixed"===e?"ufixed128x128":e}function o(e){return parseInt(/^\D+(\d+)$/.exec(e)[1],10)}function a(e){var t=/^\D+(\d+)x(\d+)$/.exec(e);return[parseInt(t[1],10),parseInt(t[2],10)]}function c(e){var t=e.match(/(.*)\[(.*?)\]$/);return t?""===t[2]?"dynamic":parseInt(t[2],10):null}function d(e){var t=typeof e;if("string"===t||"number"===t)return BigInt(e);if("bigint"===t)return e;throw new Error("Argument is not a number")}function u(e,t){var n,i,l,h;if("address"===e)return u("uint160",d(t));if("bool"===e)return u("uint8",t?1:0);if("string"===e)return u("bytes",new r(t,"utf8"));if(function(e){return e.lastIndexOf("]")===e.length-1}(e)){if("undefined"===typeof t.length)throw new Error("Not an array?");if("dynamic"!==(n=c(e))&&0!==n&&t.length>n)throw new Error("Elements exceed array size: "+n);for(h in l=[],e=e.slice(0,e.lastIndexOf("[")),"string"===typeof t&&(t=JSON.parse(t)),t)l.push(u(e,t[h]));if("dynamic"===n){var p=u("uint256",t.length);l.unshift(p)}return r.concat(l)}if("bytes"===e)return t=new r(t),l=r.concat([u("uint256",t.length),t]),t.length%32!==0&&(l=r.concat([l,s.zeros(32-t.length%32)])),l;if(e.startsWith("bytes")){if((n=o(e))<1||n>32)throw new Error("Invalid bytes<N> width: "+n);return s.setLengthRight(t,32)}if(e.startsWith("uint")){if((n=o(e))%8||n<8||n>256)throw new Error("Invalid uint<N> width: "+n);i=d(t);const r=s.bitLengthFromBigInt(i);if(r>n)throw new Error("Supplied uint exceeds width: "+n+" vs "+r);if(i<0)throw new Error("Supplied uint is negative");return s.bufferBEFromBigInt(i,32)}if(e.startsWith("int")){if((n=o(e))%8||n<8||n>256)throw new Error("Invalid int<N> width: "+n);i=d(t);const r=s.bitLengthFromBigInt(i);if(r>n)throw new Error("Supplied int exceeds width: "+n+" vs "+r);const a=s.twosFromBigInt(i,256);return s.bufferBEFromBigInt(a,32)}if(e.startsWith("ufixed")){if(n=a(e),(i=d(t))<0)throw new Error("Supplied ufixed is negative");return u("uint256",i*BigInt(2)**BigInt(n[1]))}
1if(e.startsWith("fixed"))return n=a(e),u("int256",d(t)*BigInt(2)**BigInt(n[1]));throw new Error("Unsupported or invalid type: "+e)}function l(e){return"string"===e||"bytes"===e||"dynamic"===c(e)}function h(e,t){if(e.length!==t.length)throw new Error("Number of types are not matching the values");for(var n,a,c=[],u=0;u<e.length;u++){var l=i(e[u]),h=t[u];if("bytes"===l)c.push(h);else if("string"===l)c.push(new r(h,"utf8"));else if("bool"===l)c.push(new r(h?"01":"00","hex"));else if("address"===l)c.push(s.setLength(h,20));else if(l.startsWith("bytes")){if((n=o(l))<1||n>32)throw new Error("Invalid bytes<N> width: "+n);c.push(s.setLengthRight(h,n))}else if(l.startsWith("uint")){if((n=o(l))%8||n<8||n>256)throw new Error("Invalid uint<N> width: "+n);a=d(h);const e=s.bitLengthFromBigInt(a);if(e>n)throw new Error("Supplied uint exceeds width: "+n+" vs "+e);c.push(s.bufferBEFromBigInt(a,n/8))}else{if(!l.startsWith("int"))throw new Error("Unsupported or invalid type: "+l);{if((n=o(l))%8||n<8||n>256)throw new Error("Invalid int<N> width: "+n);a=d(h);const e=s.bitLengthFromBigInt(a);if(e>n)throw new Error("Supplied int exceeds width: "+n+" vs "+e);const t=s.twosFromBigInt(a,n);c.push(s.bufferBEFromBigInt(t,n/8))}}}return r.concat(c)}e.exports={rawEncode:function(e,t){var n=[],s=[],o=32*e.length;for(var a in e){var c=i(e[a]),d=u(c,t[a]);l(c)?(n.push(u("uint256",o)),s.push(d),o+=d.length):n.push(d)}return r.concat(n.concat(s))},solidityPack:h,soliditySHA3:function(e,t){return s.keccak(h(e,t))}}},15139:function(e,t,n){var r=n(48764).Buffer;const s=n(32518),i=n(36089),o={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,n,o=!0){const a=["bytes32"],c=[this.hashType(e,n)];if(o){const d=(e,t,a)=>{if(void 0!==n[t])return["bytes32",null==a?"0x0000000000000000000000000000000000000000000000000000000000000000":s.keccak(this.encodeData(t,a,n,o))];if(void 0===a)throw new Error(`missing value for field ${e} of type ${t}`);if("bytes"===t)return["bytes32",s.keccak(a)];if("string"===t)return"string"===typeof a&&(a=r.from(a,"utf8")),["bytes32",s.keccak(a)];if(t.lastIndexOf("]")===t.length-1){const n=t.slice(0,t.lastIndexOf("[")),r=a.map((t=>d(e,n,t)));return["bytes32",s.keccak(i.rawEncode(r.map((([e])=>e)),r.map((([,e])=>e))))]}return[t,a]};for(const r of n[e]){const[e,n]=d(r.name,r.type,t[r.name]);a.push(e),c.push(n)}}else for(const i of n[e]){let e=t[i.name];if(void 0!==e)if("bytes"===i.type)a.push("bytes32"),e=s.keccak(e),c.push(e);else if("string"===i.type)a.push("bytes32"),"string"===typeof e&&(e=r.from(e,"utf8")),e=s.keccak(e),c.push(e);else if(void 0!==n[i.type])a.push("bytes32"),e=s.keccak(this.encodeData(i.type,e,n,o)),c.push(e);else{if(i.type.lastIndexOf("]")===i.type.length-1)throw new Error("Arrays currently unimplemented in encodeData");a.push(i.type),c.push(e)}}return i.rawEncode(a,c)},encodeType(e,t){let n="",r=this.findTypeDependencies(e,t).filter((t=>t!==e));r=[e].concat(r.sort());for(const s of r){if(!t[s])throw new Error("No type definition specified: "+s);n+=s+"("+t[s].map((({name:e,type:t})=>t+" "+e)).join(",")+")"}return n},findTypeDependencies(e,t,n=[]){if(e=e.match(/^\w*/)[0],n.includes(e)||void 0===t[e])return n;n.push(e);for(const r of t[e])for(const e of this.findTypeDependencies(r.type,t,n))!n.includes(e)&&n.push(e);return n},hashStruct(e,t,n,r=!0){return s.keccak(this.encodeData(e,t,n,r))},hashType(e,t){return s.keccak(this.encodeType(e,t))},sanitizeData(e){const t={};for(const n in o.properties)e[n]&&(t[n]=e[n]);return t.types&&(t.types=Object.assign({EIP712Domain:[]},t.types)),t},hash(e,t=!0){const n=this.sanitizeData(e),i=[r.from("1901","hex")];return i.push(this.hashStruct("EIP712Domain",n.domain,n.types,t)),"EIP712Domain"!==n.primaryType&&i.push(this.hashStruct(n.primaryType,n.message,n.types,t)),s.keccak(r.concat(i))}};e.exports={TYPED_MESSAGE_SCHEMA:o,TypedDataUtils:a,hashForSignTypedDataLegacy:function(e){return function(e){const t=new Error("Expect argument to be non-empty array");if("object"!==typeof e||!e.length)throw t;const n=e.map((function(e){return"bytes"===e.type?s.toBuffer(e.value):e.value})),r=e.map((function(e){return e.type})),o=e.map((function(e){if(!e.name)throw t;return e.type+" "+e.name}));return i.soliditySHA3(["bytes32","bytes32"],[i.soliditySHA3(new Array(e.length).fill("string"),o),i.soliditySHA3(r,n)])}(e.data)},hashForSignTypedData_v3:function(e){return a.hash(e.data,!1)},hashForSignTypedData_v4:function(e){return a.hash(e.data)}}},32518:function(e,t,n){var r=n(48764).Buffer;const s=n(18598);function i(e){return r.allocUnsafe(e).fill(0)}function o(e,t){let n=e.toString(16);n.length%2!==0&&(n="0"+n);const s=n.match(/.{1,2}/g).map((e=>parseInt(e,16)));for(;s.length<t;)s.unshift(0);return r.from(s)}function a(e,t,n){const r=i(t);return e=c(e),n?e.length<t?(e.copy(r),r):e.slice(0,t):e.length<t?(e.copy(r,t-e.length),r):e.slice(-t)}function c(e){if(!r.isBuffer(e))if(Array.isArray(e))e=r.from(e);else if("string"===typeof e)e=d(e)?r.from((t=u(e)).length%2?"0"+t:t,"hex"):r.from(e);else if("number"===typeof e)e=intToBuffer(e);else if(null===e||void 0===e)e=r.allocUnsafe(0);else if("bigint"===typeof e)e=o(e);else{if(!e.toArray)throw new Error("invalid type");e=r.from(e.toArray())}var t;return e}function d(e){return"string"===typeof e&&e.match(/^0x[0-9A-Fa-f]*$/)}function u(e){return"string"===typeof e&&e.startsWith("0x")?e.slice(2):e}e.exports={zeros:i,setLength:a,setLengthRight:function(e,t){return a(e,t,!0)},isHexString:d,stripHexPrefix:u,toBuffer:c,bufferToHex:function(e){return"0x"+(e=c(e)).toString("hex")},keccak:function(e,t){return e=c(e),t||(t=256),s("keccak"+t).update(e).digest()},bitLengthFromBigInt:function(e){return e.toString(2).length},bufferBEFromBigInt:o,twosFromBigInt:function(e,t){let n;if(e<0n){n=(~e&(1n<<BigInt(t))-1n)+1n}else n=e;return n&=(1n<<BigInt(t))-1n,n}}}
vendor: 10,099 bytes, line 1
1,43604:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LIB_VERSION=void 0,t.LIB_VERSION="4.0.3"},74052:function(e,t,n){"use strict";n.r(t),n.d(t,{Component:function(){return E},Fragment:function(){return w},cloneElement:function(){return K},createContext:function(){return z},createElement:function(){return y},createRef:function(){return v},h:function(){return y},hydrate:function(){return V},isValidElement:function(){return o},options:function(){return s},render:function(){return F},toChildArray:function(){return R}});var r,s,i,o,a,c,d,u,l,h={},p=[],g=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,f=Array.isArray;function _(e,t){for(var n in t)e[n]=t[n];return e}function m(e){var t=e.parentNode;t&&t.removeChild(e)}function y(e,t,n){var s,i,o,a={};for(o in t)"key"==o?s=t[o]:"ref"==o?i=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?r.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===a[o]&&(a[o]=e.defaultProps[o]);return b(e,a,s,i,null)}function b(e,t,n,r,o){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==o?++i:o,__i:-1,__u:0};return null==o&&null!=s.vnode&&s.vnode(a),a}function v(){return{current:null}}function w(e){return e.children}function E(e,t){this.props=e,this.context=t}function S(e,t){if(null==t)return e.__?S(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?S(e):null}function k(e,t,n){var r,i=e.__v,o=i.__e,a=e.__P;if(a)return(r=_({},i)).__v=i.__v+1,s.vnode&&s.vnode(r),O(a,r,i,e.__n,void 0!==a.ownerSVGElement,32&i.__u?[o]:null,t,null==o?S(i):o,!!(32&i.__u),n),r.__v=i.__v,r.__.__k[r.__i]=r,r.__d=void 0,r.__e!=o&&C(r),r}function C(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return C(e)}}function I(e){(!e.__d&&(e.__d=!0)&&a.push(e)&&!M.__r++||c!==s.debounceRendering)&&((c=s.debounceRendering)||d)(M)}function M(){var e,t,n,r=[],i=[];for(a.sort(u);e=a.shift();)e.__d&&(n=a.length,t=k(e,r,i)||t,0===n||a.length>n?(U(r,t,i),i.length=r.length=0,t=void 0,a.sort(u)):t&&s.__c&&s.__c(t,p));t&&U(r,t,i),M.__r=0}function x(e,t,n,r,s,i,o,a,c,d,u){var l,g,f,_,m,y=r&&r.__k||p,b=t.length;for(n.__d=c,L(n,t,y),c=n.__d,l=0;l<b;l++)null!=(f=n.__k[l])&&"boolean"!=typeof f&&"function"!=typeof f&&(g=-1===f.__i?h:y[f.__i]||h,f.__i=l,O(e,f,g,s,i,o,a,c,d,u),_=f.__e,f.ref&&g.ref!=f.ref&&(g.ref&&H(g.ref,null,f),u.push(f.ref,f.__c||_,f)),null==m&&null!=_&&(m=_),65536&f.__u||g.__k===f.__k?c=A(f,c,e):"function"==typeof f.type&&void 0!==f.__d?c=f.__d:_&&(c=_.nextSibling),f.__d=void 0,f.__u&=-196609);n.__d=c,n.__e=m}function L(e,t,n){var r,s,i,o,a,c=t.length,d=n.length,u=d,l=0;for(e.__k=[],r=0;r<c;r++)o=r+l,null!=(s=e.__k[r]=null==(s=t[r])||"boolean"==typeof s||"function"==typeof s?null:"string"==typeof s||"number"==typeof s||"bigint"==typeof s||s.constructor==String?b(null,s,null,null,null):f(s)?b(w,{children:s},null,null,null):void 0===s.constructor&&s.__b>0?b(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s)?(s.__=e,s.__b=e.__b+1,a=P(s,n,o,u),s.__i=a,i=null,-1!==a&&(u--,(i=n[a])&&(i.__u|=131072)),null==i||null===i.__v?(-1==a&&l--,"function"!=typeof s.type&&(s.__u|=65536)):a!==o&&(a===o+1?l++:a>o?u>c-o?l+=a-o:l--:a<o?a==o-1&&(l=a-o):l=0,a!==r+l&&(s.__u|=65536))):(i=n[o])&&null==i.key&&i.__e&&0==(131072&i.__u)&&(i.__e==e.__d&&(e.__d=S(i)),q(i,i,!1),n[o]=null,u--);if(u)for(r=0;r<d;r++)null!=(i=n[r])&&0==(131072&i.__u)&&(i.__e==e.__d&&(e.__d=S(i)),q(i,i))}function A(e,t,n){var r,s;if("function"==typeof e.type){for(r=e.__k,s=0;r&&s<r.length;s++)r[s]&&(r[s].__=e,t=A(r[s],t,n));return t}e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8===t.nodeType);return t}function R(e,t){return t=t||[],null==e||"boolean"==typeof e||(f(e)?e.some((function(e){R(e,t)})):t.push(e)),t}function P(e,t,n,r){var s=e.key,i=e.type,o=n-1,a=n+1,c=t[n];if(null===c||c&&s==c.key&&i===c.type&&0==(131072&c.__u))return n;if(r>(null!=c&&0==(131072&c.__u)?1:0))for(;o>=0||a<t.length;){if(o>=0){if((c=t[o])&&0==(131072&c.__u)&&s==c.key&&i===c.type)return o;o--}if(a<t.length){if((c=t[a])&&0==(131072&c.__u)&&s==c.key&&i===c.type)return a;a++}}return-1}function N(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||g.test(t)?n:n+"px"}function j(e,t,n,r,s){var i;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||N(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||N(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])i=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=Date.now(),e.addEventListener(t,i?T:D,i)):e.removeEventListener(t,i?T:D,i);else{if(s)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&"rowSpan"!==t&&"colSpan"!==t&&"role"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,n))}}function D(e){if(this.l){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(s.event?s.event(e):e)}}function T(e){if(this.l)return this.l[e.type+!0](s.event?s.event(e):e)}function O(e,t,n,r,i,o,a,c,d,u){var l,h,p,g,m,y,b,v,S,k,C,I,M,L,A,R=t.type;if(void 0!==t.constructor)return null;128&n.__u&&(d=!!(32&n.__u),o=[c=t.__e=n.__e]),(l=s.__b)&&l(t);e:if("function"==typeof R)try{if(v=t.props,S=(l=R.contextType)&&r[l.__c],k=l?S?S.props.value:l.__:r,n.__c?b=(h=t.__c=n.__c).__=h.__E:("prototype"in R&&R.prototype.render?t.__c=h=new R(v,k):(t.__c=h=new E(v,k),h.constructor=R,h.render=B),S&&S.sub(h),h.props=v,h.state||(h.state={}),h.context=k,h.__n=r,p=h.__d=!0,h.__h=[],h._sb=[]),null==h.__s&&(h.__s=h.state),null!=R.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=_({},h.__s)),_(h.__s,R.getDerivedStateFromProps(v,h.__s))),g=h.props,m=h.state,h.__v=t,p)null==R.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(null==R.getDerivedStateFromProps&&v!==g&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(v,k),!h.__e&&(null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(v,h.__s,k)||t.__v===n.__v)){for(t.__v!==n.__v&&(h.props=v,h.state=h.__s,h.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),C=0;C<h._sb.length;C++)h.__h.push(h._sb[C]);h._sb=[],h.__h.length&&a.push(h);break e}null!=h.componentWillUpdate&&h.componentWillUpdate(v,h.__s,k),null!=h.componentDidUpdate&&h.__h.push((function(){h.componentDidUpdate(g,m,y)}))}if(h.context=k,h.props=v,h.__P=e,h.__e=!1,I=s.__r,M=0,"prototype"in R&&R.prototype.render){for(h.state=h.__s,h.__d=!1,I&&I(t),l=h.render(h.props,h.state,h.context),L=0;L<h._sb.length;L++)h.__h.push(h._sb[L]);h._sb=[]}else do{h.__d=!1,I&&I(t),l=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++M<25);h.state=h.__s,null!=h.getChildContext&&(r=_(_({},r),h.getChildContext())),p||null==h.getSnapshotBeforeUpdate||(y=h.getSnapshotBeforeUpdate(g,m)),x(e,f(A=null!=l&&l.type===w&&null==l.key?l.props.children:l)?A:[A],t,n,r,i,o,a,c,d,u),h.base=t.__e,t.__u&=-161,h.__h.length&&a.push(h),b&&(h.__E=h.__=null)}catch(e){t.__v=null,d||null!=o?(t.__e=c,t.__u|=d?160:32,o[o.indexOf(c)]=null):(t.__e=n.__e,t.__k=n.__k),s.__e(e,t,n)}else null==o&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=W(n.__e,t,n,r,i,o,a,d,u);(l=s.diffed)&&l(t)}function U(e,t,n){for(var r=0;r<n.length;r++)H(n[r],n[++r],n[++r]);s.__c&&s.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){s.__e(e,t.__v)}}))}function W(e,t,n,s,i,o,a,c,d){var u,l,p,g,_,y,b,v=n.props,w=t.props,E=t.type;if("svg"===E&&(i=!0),null!=o)for(u=0;u<o.length;u++)if((_=o[u])&&"setAttribute"in _==!!E&&(E?_.localName===E:3===_.nodeType)){e=_,o[u]=null;break}if(null==e){if(null===E)return document.createTextNode(w);e=i?document.createElementNS("http://www.w3.org/2000/svg",E):document.createElement(E,w.is&&w),o=null,c=!1}if(null===E)v===w||c&&e.data===w||(e.data=w);else{if(o=o&&r.call(e.childNodes),v=n.props||h,!c&&null!=o)for(v={},u=0;u<e.attributes.length;u++)v[(_=e.attributes[u]).name]=_.value;for(u in v)_=v[u],"children"==u||("dangerouslySetInnerHTML"==u?p=_:"key"===u||u in w||j(e,u,null,_,i));for(u in w)_=w[u],"children"==u?g=_:"dangerouslySetInnerHTML"==u?l=_:"value"==u?y=_:"checked"==u?b=_:"key"===u||c&&"function"!=typeof _||v[u]===_||j(e,u,_,v[u],i);if(l)c||p&&(l.__html===p.__html||l.__html===e.innerHTML)||(e.innerHTML=l.__html),t.__k=[];else if(p&&(e.innerHTML=""),x(e,f(g)?g:[g],t,n,s,i&&"foreignObject"!==E,o,a,o?o[0]:n.__k&&S(n,0),c,d),null!=o)for(u=o.length;u--;)null!=o[u]&&m(o[u]);c||(u="value",void 0!==y&&(y!==e[u]||"progress"===E&&!y||"option"===E&&y!==v[u])&&j(e,u,y,v[u],!1),u="checked",void 0!==b&&b!==e[u]&&j(e,u,b,v[u],!1))}return e}function H(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){s.__e(e,n)}}function q(e,t,n){var r,i;if(s.unmount&&s.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||H(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){s.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&q(r[i],t,n||"function"!=typeof e.type);n||null==e.__e||m(e.__e),e.__=e.__e=e.__d=void 0}function B(e,t,n){return this.constructor(e,n)}function F(e,t,n){var i,o,a,c;s.__&&s.__(e,t),o=(i="function"==typeof n)?null:n&&n.__k||t.__k,a=[],c=[],O(t,e=(!i&&n||t).__k=y(w,null,[e]),o||h,h,void 0!==t.ownerSVGElement,!i&&n?[n]:o?null:t.firstChild?r.call(t.childNodes):null,a,!i&&n?n:o?o.__e:t.firstChild,i,c),e.__d=void 0,U(a,e,c)}function V(e,t){F(e,t,V)}function K(e,t,n){var s,i,o,a,c=_({},e.props);for(o in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)"key"==o?s=t[o]:"ref"==o?i=t[o
vendor: 5,495 bytes, line 1
1]:c[o]=void 0===t[o]&&void 0!==a?a[o]:t[o];return arguments.length>2&&(c.children=arguments.length>3?r.call(arguments,2):n),b(e.type,c,s||e.key,i||e.ref,null)}function z(e,t){var n={__c:t="__cC"+l++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,I(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}r=p.slice,s={__e:function(e,t,n,r){for(var s,i,o;t=t.__;)if((s=t.__c)&&!s.__)try{if((i=s.constructor)&&null!=i.getDerivedStateFromError&&(s.setState(i.getDerivedStateFromError(e)),o=s.__d),null!=s.componentDidCatch&&(s.componentDidCatch(e,r||{}),o=s.__d),o)return s.__E=s}catch(t){e=t}throw e}},i=0,o=function(e){return null!=e&&null==e.constructor},E.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=_({},this.state),"function"==typeof e&&(e=e(_({},n),this.props)),e&&_(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),I(this))},E.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),I(this))},E.prototype.render=w,a=[],d="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,u=function(e,t){return e.__v.__b-t.__v.__b},M.__r=0,l=0},54971:function(e,t,n){"use strict";n.r(t),n.d(t,{useCallback:function(){return I},useContext:function(){return M},useDebugValue:function(){return x},useEffect:function(){return w},useErrorBoundary:function(){return L},useId:function(){return A},useImperativeHandle:function(){return k},useLayoutEffect:function(){return E},useMemo:function(){return C},useReducer:function(){return v},useRef:function(){return S},useState:function(){return b}});var r,s,i,o,a=n(74052),c=0,d=[],u=[],l=a.options,h=l.__b,p=l.__r,g=l.diffed,f=l.__c,_=l.unmount,m=l.__;function y(e,t){l.__h&&l.__h(s,e,c||t),c=0;var n=s.__H||(s.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:u}),n.__[e]}function b(e){return c=1,v(O,e)}function v(e,t,n){var i=y(r++,2);if(i.t=e,!i.__c&&(i.__=[n?n(t):O(void 0,t),function(e){var t=i.__N?i.__N[0]:i.__[0],n=i.t(t,e);t!==n&&(i.__N=[n,i.__[1]],i.__c.setState({}))}],i.__c=s,!s.u)){var o=function(e,t,n){if(!i.__c.__H)return!0;var r=i.__c.__H.__.filter((function(e){return!!e.__c}));if(r.every((function(e){return!e.__N})))return!a||a.call(this,e,t,n);var s=!1;return r.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(s=!0)}})),!(!s&&i.__c.props===e)&&(!a||a.call(this,e,t,n))};s.u=!0;var a=s.shouldComponentUpdate,c=s.componentWillUpdate;s.componentWillUpdate=function(e,t,n){if(this.__e){var r=a;a=void 0,o(e,t,n),a=r}c&&c.call(this,e,t,n)},s.shouldComponentUpdate=o}return i.__N||i.__}function w(e,t){var n=y(r++,3);!l.__s&&T(n.__H,t)&&(n.__=e,n.i=t,s.__H.__h.push(n))}function E(e,t){var n=y(r++,4);!l.__s&&T(n.__H,t)&&(n.__=e,n.i=t,s.__h.push(n))}function S(e){return c=5,C((function(){return{current:e}}),[])}function k(e,t,n){c=6,E((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==n?n:n.concat(e))}function C(e,t){var n=y(r++,7);return T(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function I(e,t){return c=8,C((function(){return e}),t)}function M(e){var t=s.context[e.__c],n=y(r++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(s)),t.props.value):e.__}function x(e,t){l.useDebugValue&&l.useDebugValue(t?t(e):e)}function L(e){var t=y(r++,10),n=b();return t.__=e,s.componentDidCatch||(s.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]}function A(){var e=y(r++,11);if(!e.__){for(var t=s.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function R(){for(var e;e=d.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(j),e.__H.__h.forEach(D),e.__H.__h=[]}catch(r){e.__H.__h=[],l.__e(r,e.__v)}}l.__b=function(e){s=null,h&&h(e)},l.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),m&&m(e,t)},l.__r=function(e){p&&p(e),r=0;var t=(s=e.__c).__H;t&&(i===s?(t.__h=[],s.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=u,e.__N=e.i=void 0}))):(t.__h.forEach(j),t.__h.forEach(D),t.__h=[],r=0)),i=s},l.diffed=function(e){g&&g(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==d.push(t)&&o===l.requestAnimationFrame||((o=l.requestAnimationFrame)||N)(R)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==u&&(e.__=e.__V),e.i=void 0,e.__V=u}))),i=s=null},l.__c=function(e,t){t.some((function(e){try{e.__h.forEach(j),e.__h=e.__h.filter((function(e){return!e.__||D(e)}))}catch(s){t.some((function(e){e.__h&&(e.__h=[])})),t=[],l.__e(s,e.__v)}})),f&&f(e,t)},l.unmount=function(e){_&&_(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{j(e)}catch(e){t=e}})),n.__H=void 0,t&&l.__e(t,n.__v))};var P="function"==typeof requestAnimationFrame;function N(e){var t,n=function(){clearTimeout(r),P&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);P&&(t=requestAnimationFrame(n))}function j(e){var t=s,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),s=t}function D(e){var t=s;e.__c=e.__(),s=t}function T(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function O(e,t){return"function"==typeof t?t(e):t}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.