@dcl/explore-site 0.0.1-24347323452.commit-66ae178 → 0.0.1-24353156203.commit-157a41c
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/HomePage-gvYCE7Us.js +5 -0
- package/assets/{QueryClientProvider-DAQLID1-.js → QueryClientProvider-DIya0AJE.js} +1 -1
- package/assets/SensorsRounded-CofDOJXy.js +15 -0
- package/assets/{__federation_expose_App-BMMv9eit.js → __federation_expose_App-C1e3Md3H.js} +1 -1
- package/assets/{__federation_fn_import-Cw4EhxlG.js → __federation_fn_import-Ht3m1qpn.js} +1 -1
- package/assets/__federation_shared_@dcl/{hooks-BZe_CFS-.js → hooks-CxuIIRDv.js} +3 -3
- package/assets/__federation_shared_@emotion/react-u6J4D45G.js +1 -0
- package/assets/__federation_shared_@emotion/{styled-4pT2Mrcu.js → styled-BS5dedBi.js} +1 -1
- package/assets/{__federation_shared_decentraland-ui2-DZBO-y4w.js → __federation_shared_decentraland-ui2-DpbLoOhx.js} +30 -30
- package/assets/{__federation_shared_react-redux-D6ZOWu-c.js → __federation_shared_react-redux-W6mfh1Yq.js} +1 -1
- package/assets/{__federation_shared_react-router-dom-aY8-4Jtr.js → __federation_shared_react-router-dom-BJBxUtHV.js} +1 -1
- package/assets/{__federation_shared_viem-4okQOkEY.js → __federation_shared_viem-D92oJAhA.js} +1 -1
- package/assets/{__federation_shared_wagmi-6QeUZhKR.js → __federation_shared_wagmi-Mn9i9XHL.js} +1 -1
- package/assets/{add-BiWewVTL.js → add-Pf2mtDVd.js} +1 -1
- package/assets/{all-wallets-CCypuRdk.js → all-wallets-yTWm-7l0.js} +1 -1
- package/assets/{app-store-DVZ78NdP.js → app-store-CHNvFr8x.js} +1 -1
- package/assets/{apple-DI8wHuXR.js → apple-Cl30qHkG.js} +1 -1
- package/assets/{arrow-bottom-Cdn25yfn.js → arrow-bottom-DTZt60fy.js} +1 -1
- package/assets/{arrow-bottom-circle-Dr4-FhSy.js → arrow-bottom-circle-zZ7DVvhp.js} +1 -1
- package/assets/{arrow-left-Bz1AdNPy.js → arrow-left-D5G-F2Mr.js} +1 -1
- package/assets/{arrow-right-Bay3z0do.js → arrow-right-CQp0OKbr.js} +1 -1
- package/assets/{arrow-top-DI5j-zJ9.js → arrow-top-Dov1vQPn.js} +1 -1
- package/assets/{auto-track-D2Yg_-7n.js → auto-track-CJ-hNq0s.js} +1 -1
- package/assets/{bank-RZrU0r--.js → bank-CzpOQOqg.js} +1 -1
- package/assets/{basic-Cyg6UEiZ.js → basic-BaHwLXYW.js} +1 -1
- package/assets/{browser-BEYHOERe.js → browser-DmlzKjDH.js} +1 -1
- package/assets/{card-1RwXo47D.js → card-DjnQpz1T.js} +1 -1
- package/assets/{ccip-CmnwE6kO.js → ccip-fLeNA6wc.js} +1 -1
- package/assets/{checkmark-BKhQv4dC.js → checkmark-Cv7bJNZW.js} +1 -1
- package/assets/{checkmark-bold-BlUrDQih.js → checkmark-bold-Crr_qeUj.js} +1 -1
- package/assets/{chevron-bottom-C8rXKOMx.js → chevron-bottom-DjPxwSAz.js} +1 -1
- package/assets/{chevron-left-RIhvnx0R.js → chevron-left-DRFM7Kjo.js} +1 -1
- package/assets/{chevron-right-CFH1HkPm.js → chevron-right-C3dXKRLK.js} +1 -1
- package/assets/{chevron-top-CeZ0kvWe.js → chevron-top-DkPXzMT9.js} +1 -1
- package/assets/{chrome-store-9FDmlz3B.js → chrome-store-C1j87a0E.js} +1 -1
- package/assets/{clock--qIdT6jS.js → clock-Ii2gOHOm.js} +1 -1
- package/assets/{close-CYQdeqtg.js → close-mveIoSo7.js} +1 -1
- package/assets/{coinPlaceholder-B72RV-UC.js → coinPlaceholder-BgCUmbQq.js} +1 -1
- package/assets/{compass-BfGfjqHm.js → compass-CFoHHJhs.js} +1 -1
- package/assets/{copy-CKx8R_ND.js → copy-CECL7vci.js} +1 -1
- package/assets/{core-Czc2aVX-.js → core-rob3DE1K.js} +3 -3
- package/assets/{createClient-DI-yyeB8.js → createClient-DIPdlHW_.js} +1 -1
- package/assets/{cursor-CE5vm2kp.js → cursor-CVJFIzVK.js} +1 -1
- package/assets/{cursor-transparent-CeJ_IeYW.js → cursor-transparent-OkqQkD5X.js} +1 -1
- package/assets/{desktop-BTKUbKLu.js → desktop-SqravDGB.js} +1 -1
- package/assets/{disconnect-bD3IIhi7.js → disconnect-C438cKH2.js} +1 -1
- package/assets/{discord-CiXirQpM.js → discord-C342vjF7.js} +1 -1
- package/assets/{emotion-react.browser.esm-DthAtJ_b.js → emotion-react.browser.esm-BZuSnvT8.js} +1 -1
- package/assets/{emotion-use-insertion-effect-with-fallbacks.browser.esm-T2Tuze4y.js → emotion-use-insertion-effect-with-fallbacks.browser.esm-CLJKjSo3.js} +1 -1
- package/assets/{etherscan-Cu9ire2O.js → etherscan-Bnt1d9db.js} +1 -1
- package/assets/{exclamation-triangle-B4byBjRl.js → exclamation-triangle-tMBULVvu.js} +1 -1
- package/assets/{extension-D5lNpd1U.js → extension-BSzqi0r5.js} +1 -1
- package/assets/{external-link-DZBoiaCZ.js → external-link-j8SaBF13.js} +1 -1
- package/assets/{facebook-D_iyzARm.js → facebook-CDHF3Kvl.js} +1 -1
- package/assets/{farcaster-Bdc2pI3F.js → farcaster-BOEIT-PC.js} +1 -1
- package/assets/{filters-DQns37Iv.js → filters-DV0FUhQ0.js} +1 -1
- package/assets/{github-Dk6Jn9QC.js → github-C4Va2GNy.js} +1 -1
- package/assets/{google-Dc6EkFhG.js → google-Cje22T1c.js} +1 -1
- package/assets/{help-circle-Ce3TG0Cf.js → help-circle-Bff4zjju.js} +1 -1
- package/assets/{id-C6KbbJ--.js → id-Dd0qqSfM.js} +1 -1
- package/assets/{image-DrQbraG8.js → image-Cn6H6ai6.js} +1 -1
- package/assets/{index-Dw1wySAn.js → index-BOVA3Ef2.js} +1 -1
- package/assets/{index-DzD7KT9k.js → index-CVDO0kXc.js} +1 -1
- package/assets/{index-B3NvZPz9.js → index-CmM7TlDV.js} +1 -1
- package/assets/{index-B1Qw9Ysc.js → index-DK6XZ4Dz.js} +1 -1
- package/assets/index-Dy0yjznp.js +1 -1
- package/assets/{index-B8dCIvh9.js → index-IsljfPdd.js} +1 -1
- package/assets/{index-BXHM3pMM.js → index-MKDM4ZR3.js} +3 -3
- package/assets/index-TGKJ-nWH.js +1 -0
- package/assets/index-VfkM29PH.js +1 -1
- package/assets/{index-DKBIymEi.js → index-l-nOLSLJ.js} +2 -2
- package/assets/{index.es-B0jK_QO-.js → index.es-BHi5bjgi.js} +3 -3
- package/assets/{info-C0D8pffU.js → info-CNp7Y95X.js} +1 -1
- package/assets/{info-circle-BiCleDE8.js → info-circle-7DQwkSlJ.js} +1 -1
- package/assets/jsx-runtime-B1l0k91v.js +1 -1
- package/assets/{lightbulb-Fj_H2VCW.js → lightbulb-B0gzSEGz.js} +1 -1
- package/assets/{localBatchGatewayRequest-B7t5Tpma.js → localBatchGatewayRequest-xkDsPGG7.js} +1 -1
- package/assets/{mail-DD4cyKde.js → mail-dRKM5FXT.js} +1 -1
- package/assets/{mobile-BLAaxpjp.js → mobile-LB_FN_RV.js} +1 -1
- package/assets/{more-BIo3nlRi.js → more-CYum3xAb.js} +1 -1
- package/assets/{network-placeholder-f5BpXzBo.js → network-placeholder-BtyRBLps.js} +1 -1
- package/assets/{nftPlaceholder-OrEKKEpX.js → nftPlaceholder-BEMgcchY.js} +1 -1
- package/assets/{off-qcY6xMeJ.js → off-C5JcUbXr.js} +1 -1
- package/assets/{play-store-B63b8J_i.js → play-store-CN5oe3Vf.js} +1 -1
- package/assets/{plus-CPOBBoal.js → plus-CKUKfnQj.js} +1 -1
- package/assets/{preload-helper-Bf6P0chZ.js → preload-helper-ByFjl-a5.js} +1 -1
- package/assets/{qr-code-B2BeuRzC.js → qr-code-BzLqVM5j.js} +1 -1
- package/assets/{recycle-horizontal-BmSnrXT-.js → recycle-horizontal-dPdqs2_u.js} +1 -1
- package/assets/{refresh-DTspwpm1.js → refresh-DSde0C6e.js} +1 -1
- package/assets/remoteEntry.js +1 -1
- package/assets/{reown-logo-CULSug9i.js → reown-logo-BR03HbJl.js} +1 -1
- package/assets/{search-BjfNIyFi.js → search-CedcKcSQ.js} +1 -1
- package/assets/{secp256k1-Cr4JWMkb.js → secp256k1-B4W1DvAE.js} +1 -1
- package/assets/{send-CwN36rlO.js → send-GPwvH8UU.js} +1 -1
- package/assets/{swapHorizontal-CmMvC6wr.js → swapHorizontal-BR-8g9B3.js} +1 -1
- package/assets/{swapHorizontalBold-BxKoODHm.js → swapHorizontalBold-B7LIXZ0L.js} +1 -1
- package/assets/{swapHorizontalMedium-CzUUBt8i.js → swapHorizontalMedium-fAXgriAI.js} +1 -1
- package/assets/{swapHorizontalRoundedBold-K88FxsS9.js → swapHorizontalRoundedBold-DcpI4Y0u.js} +1 -1
- package/assets/{swapVertical-CSlbGxlU.js → swapVertical-yx4f2BAH.js} +1 -1
- package/assets/{telegram-C-Z6gZhD.js → telegram-DBD185Ye.js} +1 -1
- package/assets/{three-dots-CXLRBoKQ.js → three-dots-DeQeOnEw.js} +1 -1
- package/assets/{twitch-FmYPRPZ3.js → twitch-0WtoG5d0.js} +1 -1
- package/assets/{twitterIcon-tjiQL1DM.js → twitterIcon-atCsdkp8.js} +1 -1
- package/assets/{uid-CtW3Zgnp.js → uid-EJg3CBmY.js} +3 -3
- package/assets/{verify-CM9wD1IM.js → verify-KQXFAoty.js} +1 -1
- package/assets/{verify-filled-B6CzCgX0.js → verify-filled-CM5tIwPd.js} +1 -1
- package/assets/{w3m-modal-Ck8jEkw7.js → w3m-modal-NP2Fg3Od.js} +1 -1
- package/assets/{wallet-CKX59GDv.js → wallet-D_D97dGa.js} +1 -1
- package/assets/{wallet-placeholder-ZskzQR-l.js → wallet-placeholder-CqVcvVD2.js} +1 -1
- package/assets/{walletconnect-DdcJm4E2.js → walletconnect-CumO8EDV.js} +1 -1
- package/assets/{warning-circle-BE3Stp0y.js → warning-circle-PdDzpbOz.js} +1 -1
- package/assets/{webSocket-b_H0rYq3.js → webSocket-CrIirM3J.js} +1 -1
- package/assets/{x-CPGaXvQ5.js → x-CA1Ri3bW.js} +1 -1
- package/index.html +14 -14
- package/package.json +3 -3
- package/assets/HomePage-D6V-mveb.js +0 -5
- package/assets/SensorsRounded-CtG4QA9Z.js +0 -15
- package/assets/__federation_shared_@emotion/react-B8rXWKtg.js +0 -1
- package/assets/index-DqrsvfXo.js +0 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
const __vite__fileDeps=["assets/index-CVdhIPEJ.js","assets/index-CNMKbeE1.js","assets/index-CGCGB-at.js","assets/index-CVDO0kXc.js","assets/__federation_fn_import-Ht3m1qpn.js","assets/hooks.module-Dz_XB4AG.js","assets/index-CdrMQoR6.js","assets/_commonjsHelpers-C4iS2aBk.js","assets/createClient-DIPdlHW_.js","assets/uid-EJg3CBmY.js","assets/preload-helper-ByFjl-a5.js","assets/index-nibyPLVP.js","assets/index-D6O4pjzC.js","assets/___vite-browser-external_commonjs-proxy-BqV5D26a.js","assets/inherits_browser-BlmhoU4v.js","assets/index-JFBsW0Hp.js","assets/tslib.es6-DbvBTznf.js","assets/index.es-BHi5bjgi.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
|
|
2
|
+
import{importShared as M}from"./__federation_fn_import-Ht3m1qpn.js";import{j as d}from"./jsx-runtime-B1l0k91v.js";import{w as tr,e as go,g as nr,b as mo,h as ci,i as yo,o as vo,d as bo}from"./reselect-BfUrOuXx.js";import{c as wo,E as Rt,r as fe,i as he,d as li,a as Co,b as _o}from"./SensorsRounded-CofDOJXy.js";import{d as vt}from"./defineChain-7I0Ce1VT.js";import{_ as Qe}from"./preload-helper-ByFjl-a5.js";import{c as hn,C as pn,P as rr,i as So,S as ui,M as xo,n as Z,m as ir,a as ce,h as di,Q as Ao,b as or,f as Eo,o as ar,r as sr,d as Io,e as cr,g as lr,p as ur,s as ko,j as To}from"./QueryClientProvider-DIya0AJE.js";import{c as Ke}from"./_commonjsHelpers-C4iS2aBk.js";const Ro=vt({id:1,name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:12e3,rpcUrls:{default:{http:["https://eth.merkle.io"]}},blockExplorers:{default:{name:"Etherscan",url:"https://etherscan.io",apiUrl:"https://api.etherscan.io/api"}},contracts:{ensUniversalResolver:{address:"0xeeeeeeee14d718c2b47d9923deab1335e144eeee",blockCreated:23085558},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),Po=vt({id:137,name:"Polygon",blockTime:2e3,nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:{default:{http:["https://polygon-rpc.com"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://polygonscan.com",apiUrl:"https://api.etherscan.io/v2/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}}}),Mo=vt({id:80002,name:"Polygon Amoy",nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:{default:{http:["https://rpc-amoy.polygon.technology"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://amoy.polygonscan.com",apiUrl:"https://api.etherscan.io/v2/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:3127388}},testnet:!0}),jo=vt({id:11155111,name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://11155111.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia.etherscan.io",apiUrl:"https://api-sepolia.etherscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:751532},ensUniversalResolver:{address:"0xeeeeeeee14d718c2b47d9923deab1335e144eeee",blockCreated:8928790}},testnet:!0});await M("@dcl/schemas");const Do=[Ro,Po],Oo=[jo,Mo],gn=[...Do,...Oo];function Lo(e){return gn.some(t=>t.id===e)}const{createConnector:No}=await M("wagmi"),{ChainId:qe}=await M("@dcl/schemas"),dr={[qe.ETHEREUM_MAINNET]:"https://rpc.decentraland.org/mainnet?project=magic",[qe.ETHEREUM_SEPOLIA]:"https://rpc.decentraland.org/sepolia?project=magic",[qe.MATIC_MAINNET]:"https://rpc.decentraland.org/polygon?project=magic",[qe.MATIC_AMOY]:"https://rpc.decentraland.org/amoy?project=magic"};function Rf(e){const{apiKey:t}=e;let n=null,r=null;async function o(i){const{Magic:a}=await Qe(async()=>{const{Magic:s}=await import("./index-CVdhIPEJ.js");return{Magic:s}},__vite__mapDeps([0,1])),{OAuthExtension:l}=await Qe(async()=>{const{OAuthExtension:s}=await import("./index-CGCGB-at.js");return{OAuthExtension:s}},__vite__mapDeps([2,1])),c=dr[i]||dr[qe.ETHEREUM_MAINNET];return new a(t,{extensions:[new l],network:{rpcUrl:c,chainId:i}})}return No(i=>{async function a(){return r?await r.request({method:"eth_accounts"}):[]}async function l(c){r=await n.wallet.getProvider();const s=await a();return s.length===0?null:(await i.storage?.setItem("magicChainId",c),{accounts:s,chainId:c})}return{id:"magic",name:"Magic",type:"magic",async setup(){let c=!1;try{c=!!localStorage.getItem("dcl_magic_user_email")}catch{}const s=await i.storage?.getItem("magicChainId"),m=s??i.chains[0]?.id;if(!(!m||!s&&!c))try{if(n=await o(m),await n.user.isLoggedIn()){const p=await l(m);p&&i.emitter.emit("connect",p)}}catch{}},async connect({chainId:c}={}){const s=c??i.chains[0].id;if(n||(n=await o(s)),!await n.user.isLoggedIn())throw new Error("Magic: User is not logged in. Please authenticate via the auth dapp first.");const y=await l(s);if(!y)throw new Error("Magic: No accounts found");return y},async disconnect(){n&&await n.user.logout(),n=null,r=null,await i.storage?.removeItem("magicChainId")},async getAccounts(){return a()},async getChainId(){return await i.storage?.getItem("magicChainId")??i.chains[0].id},async getProvider(){return!r&&n&&(r=await n.wallet.getProvider()),r},async isAuthorized(){try{if(!n){const c=await i.storage?.getItem("magicChainId");if(!c)return!1;n=await o(c)}return await n.user.isLoggedIn()}catch{return!1}},async switchChain({chainId:c}){const s=i.chains.find(y=>y.id===c);if(!s)throw new Error(`Chain ${c} not configured`);if(n=await o(c),!await n.user.isLoggedIn())throw new Error("Magic: User is not logged in");return r=await n.wallet.getProvider(),await i.storage?.setItem("magicChainId",c),i.emitter.emit("change",{chainId:c}),s},onAccountsChanged(c){c.length===0?this.onDisconnect():i.emitter.emit("change",{accounts:c})},onChainChanged(c){const s=c.startsWith("0x")?parseInt(c,16):Number(c);i.emitter.emit("change",{chainId:s})},onDisconnect(){i.emitter.emit("disconnect"),n=null,r=null}}})}await M("wagmi");await M("@dcl/schemas");function $o(e){const{chain:t}=e,n=t.rpcUrls.default.http[0];if(!e.transports)return[n];const r=e.transports?.[t.id]?.({chain:t});return(r?.value?.transports||[r]).map(({value:i})=>i?.url||n)}const{getAddress:ke,numberToHex:ot,SwitchChainError:at,UserRejectedRequestError:Te}=await M("viem");bt.type="coinbaseWallet";function bt(e={}){return e.version==="3"||e.headlessMode?qo(e):Uo(e)}function Uo(e){let t,n,r,o;return hn(i=>({id:"coinbaseWalletSDK",name:"Coinbase Wallet",rdns:"com.coinbase.wallet",type:bt.type,async connect({chainId:a,withCapabilities:l,...c}={}){try{const s=await this.getProvider(),m=(await s.request({method:"eth_requestAccounts",params:"instantOnboarding"in c&&c.instantOnboarding?[{onboarding:"instant"}]:[]})).map(p=>ke(p));n||(n=this.onAccountsChanged.bind(this),s.on("accountsChanged",n)),r||(r=this.onChainChanged.bind(this),s.on("chainChanged",r)),o||(o=this.onDisconnect.bind(this),s.on("disconnect",o));let y=await this.getChainId();return a&&y!==a&&(y=(await this.switchChain({chainId:a}).catch(b=>{if(b.code===Te.code)throw b;return{id:y}}))?.id??y),{accounts:l?m.map(p=>({address:p,capabilities:{}})):m,chainId:y}}catch(s){throw/(user closed modal|accounts received is empty|user denied account|request rejected)/i.test(s.message)?new Te(s):s}},async disconnect(){const a=await this.getProvider();n&&(a.removeListener("accountsChanged",n),n=void 0),r&&(a.removeListener("chainChanged",r),r=void 0),o&&(a.removeListener("disconnect",o),o=void 0),a.disconnect(),a.close?.()},async getAccounts(){return(await(await this.getProvider()).request({method:"eth_accounts"})).map(l=>ke(l))},async getChainId(){const l=await(await this.getProvider()).request({method:"eth_chainId"});return Number(l)},async getProvider(){if(!t){const a=typeof e.preference=="string"?{options:e.preference}:{...e.preference,options:e.preference?.options??"all"},{createCoinbaseWalletSDK:l}=await Qe(async()=>{const{createCoinbaseWalletSDK:s}=await import("./index-CVDO0kXc.js");return{createCoinbaseWalletSDK:s}},__vite__mapDeps([3,4,5,6,7,8,9,10,11]));t=l({...e,appChainIds:i.chains.map(s=>s.id),preference:a}).getProvider()}return t},async isAuthorized(){try{return!!(await this.getAccounts()).length}catch{return!1}},async switchChain({addEthereumChainParameter:a,chainId:l}){const c=i.chains.find(m=>m.id===l);if(!c)throw new at(new pn);const s=await this.getProvider();try{return await s.request({method:"wallet_switchEthereumChain",params:[{chainId:ot(c.id)}]}),c}catch(m){if(m.code===4902)try{let y;a?.blockExplorerUrls?y=a.blockExplorerUrls:y=c.blockExplorers?.default.url?[c.blockExplorers?.default.url]:[];let p;a?.rpcUrls?.length?p=a.rpcUrls:p=[c.rpcUrls.default?.http[0]??""];const b={blockExplorerUrls:y,chainId:ot(l),chainName:a?.chainName??c.name,iconUrls:a?.iconUrls,nativeCurrency:a?.nativeCurrency??c.nativeCurrency,rpcUrls:p};return await s.request({method:"wallet_addEthereumChain",params:[b]}),c}catch(y){throw new Te(y)}throw new at(m)}},onAccountsChanged(a){a.length===0?this.onDisconnect():i.emitter.emit("change",{accounts:a.map(l=>ke(l))})},onChainChanged(a){const l=Number(a);i.emitter.emit("change",{chainId:l})},async onDisconnect(a){i.emitter.emit("disconnect");const l=await this.getProvider();n&&(l.removeListener("accountsChanged",n),n=void 0),r&&(l.removeListener("chainChanged",r),r=void 0),o&&(l.removeListener("disconnect",o),o=void 0)}}))}function qo(e){let n,r,o,i,a;return hn(l=>({id:"coinbaseWalletSDK",name:"Coinbase Wallet",rdns:"com.coinbase.wallet",type:bt.type,async connect({chainId:c,withCapabilities:s}={}){try{const m=await this.getProvider(),y=(await m.request({method:"eth_requestAccounts"})).map(b=>ke(b));o||(o=this.onAccountsChanged.bind(this),m.on("accountsChanged",o)),i||(i=this.onChainChanged.bind(this),m.on("chainChanged",i)),a||(a=this.onDisconnect.bind(this),m.on("disconnect",a));let p=await this.getChainId();return c&&p!==c&&(p=(await this.switchChain({chainId:c}).catch(I=>{if(I.code===Te.code)throw I;return{id:p}}))?.id??p),{accounts:s?y.map(b=>({address:b,capabilities:{}})):y,chainId:p}}catch(m){throw/(user closed modal|accounts received is empty|user denied account)/i.test(m.message)?new Te(m):m}},async disconnect(){const c=await this.getProvider();o&&(c.removeListener("accountsChanged",o),o=void 0),i&&(c.removeListener("chainChanged",i),i=void 0),a&&(c.removeListener("disconnect",a),a=void 0),c.disconnect(),c.close()},async getAccounts(){return(await(await this.getProvider()).request({method:"eth_accounts"})).map(s=>ke(s))},async getChainId(){const s=await(await this.getProvider()).request({method:"eth_chainId"});return Number(s)},async getProvider(){if(!r){const c=await(async()=>{const{default:b}=await Qe(async()=>{const{default:I}=await import("./index-D6O4pjzC.js").then(S=>S.i);return{default:I}},__vite__mapDeps([12,7,13,6,14,15,5,16]));return typeof b!="function"&&typeof b.default=="function"?b.default:b})();n=new c({...e,reloadOnDisconnect:!1});const s=n.walletExtension?.getChainId(),m=l.chains.find(b=>e.chainId?b.id===e.chainId:b.id===s)||l.chains[0],y=e.chainId||m?.id,p=e.jsonRpcUrl||m?.rpcUrls.default.http[0];r=n.makeWeb3Provider(p,y)}return r},async isAuthorized(){try{return!!(await this.getAccounts()).length}catch{return!1}},async switchChain({addEthereumChainParameter:c,chainId:s}){const m=l.chains.find(p=>p.id===s);if(!m)throw new at(new pn);const y=await this.getProvider();try{return await y.request({method:"wallet_switchEthereumChain",params:[{chainId:ot(m.id)}]}),m}catch(p){if(p.code===4902)try{let b;c?.blockExplorerUrls?b=c.blockExplorerUrls:b=m.blockExplorers?.default.url?[m.blockExplorers?.default.url]:[];let I;c?.rpcUrls?.length?I=c.rpcUrls:I=[m.rpcUrls.default?.http[0]??""];const S={blockExplorerUrls:b,chainId:ot(s),chainName:c?.chainName??m.name,iconUrls:c?.iconUrls,nativeCurrency:c?.nativeCurrency??m.nativeCurrency,rpcUrls:I};return await y.request({method:"wallet_addEthereumChain",params:[S]}),m}catch(b){throw new Te(b)}throw new at(p)}},onAccountsChanged(c){c.length===0?this.onDisconnect():l.emitter.emit("change",{accounts:c.map(s=>ke(s))})},onChainChanged(c){const s=Number(c);l.emitter.emit("change",{chainId:s})},async onDisconnect(c){l.emitter.emit("disconnect");const s=await this.getProvider();o&&(s.removeListener("accountsChanged",o),o=void 0),i&&(s.removeListener("chainChanged",i),i=void 0),a&&(s.removeListener("disconnect",a),a=void 0)}}))}const{getAddress:Pt,numberToHex:fr,SwitchChainError:Fo,UserRejectedRequestError:Ye}=await M("viem");mn.type="walletConnect";function mn(e){const t=e.isNewChainsStale??!0;let n,r;const o="eip155";let i,a,l,c,s,m;return hn(y=>({id:"walletConnect",name:"WalletConnect",type:mn.type,async setup(){const p=await this.getProvider().catch(()=>null);p&&(l||(l=this.onConnect.bind(this),p.on("connect",l)),s||(s=this.onSessionDelete.bind(this),p.on("session_delete",s)))},async connect({chainId:p,withCapabilities:b,...I}={}){try{const S=await this.getProvider();if(!S)throw new rr;c||(c=this.onDisplayUri,S.on("display_uri",c));let x=p;if(!x){const u=await y.storage?.getItem("state")??{};y.chains.some(R=>R.id===u.chainId)?x=u.chainId:x=y.chains[0]?.id}if(!x)throw new Error("No chains found on connector.");const E=await this.isChainsStale();if(S.session&&E&&await S.disconnect(),!S.session||E){const u=y.chains.filter(w=>w.id!==x).map(w=>w.id);await S.connect({optionalChains:[x,...u],..."pairingTopic"in I?{pairingTopic:I.pairingTopic}:{}}),this.setRequestedChainsIds(y.chains.map(w=>w.id))}const _=(await S.enable()).map(u=>Pt(u));let g=await this.getChainId();return p&&g!==p&&(g=(await this.switchChain({chainId:p}).catch(w=>{if(w.code===Ye.code&&w.cause?.message!=="Missing or invalid. request() method: wallet_addEthereumChain")throw w;return{id:g}}))?.id??g),c&&(S.removeListener("display_uri",c),c=void 0),l&&(S.removeListener("connect",l),l=void 0),i||(i=this.onAccountsChanged.bind(this),S.on("accountsChanged",i)),a||(a=this.onChainChanged.bind(this),S.on("chainChanged",a)),m||(m=this.onDisconnect.bind(this),S.on("disconnect",m)),s||(s=this.onSessionDelete.bind(this),S.on("session_delete",s)),{accounts:b?_.map(u=>({address:u,capabilities:{}})):_,chainId:g}}catch(S){throw/(user rejected|connection request reset)/i.test(S?.message)?new Ye(S):S}},async disconnect(){const p=await this.getProvider();try{await p?.disconnect()}catch(b){if(!/No matching key/i.test(b.message))throw b}finally{a&&(p?.removeListener("chainChanged",a),a=void 0),m&&(p?.removeListener("disconnect",m),m=void 0),l||(l=this.onConnect.bind(this),p?.on("connect",l)),i&&(p?.removeListener("accountsChanged",i),i=void 0),s&&(p?.removeListener("session_delete",s),s=void 0),this.setRequestedChainsIds([])}},async getAccounts(){return(await this.getProvider()).accounts.map(b=>Pt(b))},async getProvider({chainId:p}={}){async function b(){const I=y.chains.map(x=>x.id);if(!I.length)return;const{EthereumProvider:S}=await Qe(async()=>{const{EthereumProvider:x}=await import("./index.es-BHi5bjgi.js").then(E=>E.G);return{EthereumProvider:x}},__vite__mapDeps([17,10,7,4,11]));return await S.init({...e,disableProviderPing:!0,optionalChains:I,projectId:e.projectId,rpcMap:Object.fromEntries(y.chains.map(x=>{const[E]=$o({chain:x,transports:y.transports});return[x.id,E]})),showQrModal:e.showQrModal??!0})}return n||(r||(r=b()),n=await r,n?.events.setMaxListeners(Number.POSITIVE_INFINITY)),p&&await this.switchChain?.({chainId:p}),n},async getChainId(){return(await this.getProvider()).chainId},async isAuthorized(){try{const[p,b]=await Promise.all([this.getAccounts(),this.getProvider()]);return p.length?await this.isChainsStale()&&b.session?(await b.disconnect().catch(()=>{}),!1):!0:!1}catch{return!1}},async switchChain({addEthereumChainParameter:p,chainId:b}){const I=await this.getProvider();if(!I)throw new rr;const S=y.chains.find(x=>x.id===b);if(!S)throw new Fo(new pn);try{await Promise.all([new Promise(E=>{const _=({chainId:g})=>{g===b&&(y.emitter.off("change",_),E())};y.emitter.on("change",_)}),I.request({method:"wallet_switchEthereumChain",params:[{chainId:fr(b)}]})]);const x=await this.getRequestedChainsIds();return this.setRequestedChainsIds([...x,b]),S}catch(x){const E=x;if(/(user rejected)/i.test(E.message))throw new Ye(E);try{let _;p?.blockExplorerUrls?_=p.blockExplorerUrls:_=S.blockExplorers?.default.url?[S.blockExplorers?.default.url]:[];let g;p?.rpcUrls?.length?g=p.rpcUrls:g=[...S.rpcUrls.default.http];const u={blockExplorerUrls:_,chainId:fr(b),chainName:p?.chainName??S.name,iconUrls:p?.iconUrls,nativeCurrency:p?.nativeCurrency??S.nativeCurrency,rpcUrls:g};await I.request({method:"wallet_addEthereumChain",params:[u]});const w=await this.getRequestedChainsIds();return this.setRequestedChainsIds([...w,b]),S}catch(_){throw new Ye(_)}}},onAccountsChanged(p){p.length===0?this.onDisconnect():y.emitter.emit("change",{accounts:p.map(b=>Pt(b))})},onChainChanged(p){const b=Number(p);y.emitter.emit("change",{chainId:b})},async onConnect(p){const b=Number(p.chainId),I=await this.getAccounts();y.emitter.emit("connect",{accounts:I,chainId:b})},async onDisconnect(p){this.setRequestedChainsIds([]),y.emitter.emit("disconnect");const b=await this.getProvider();i&&(b.removeListener("accountsChanged",i),i=void 0),a&&(b.removeListener("chainChanged",a),a=void 0),m&&(b.removeListener("disconnect",m),m=void 0),s&&(b.removeListener("session_delete",s),s=void 0),l||(l=this.onConnect.bind(this),b.on("connect",l))},onDisplayUri(p){y.emitter.emit("message",{type:"display_uri",data:p})},onSessionDelete(){this.onDisconnect()},getNamespaceChainsIds(){return n?n.session?.namespaces[o]?.accounts?.map(b=>Number.parseInt(b.split(":")[1]||"",10))??[]:[]},async getRequestedChainsIds(){return await y.storage?.getItem(this.requestedChainsStorageKey)??[]},async isChainsStale(){if(!t)return!1;const p=y.chains.map(S=>S.id),b=this.getNamespaceChainsIds();if(b.length&&!b.some(S=>p.includes(S)))return!1;const I=await this.getRequestedChainsIds();return!p.every(S=>I.includes(S))},async setRequestedChainsIds(p){await y.storage?.setItem(this.requestedChainsStorageKey,p)},get requestedChainsStorageKey(){return`${this.id}.requestedChains`}}))}const{createConfig:Qo,http:Xt}=await M("wagmi"),{ChainId:Je}=await M("@dcl/schemas"),Se={name:"Decentraland",description:"Decentraland dApp",url:"https://decentraland.org",icons:["https://cdn.decentraland.org/@dcl/marketplace-site/6.41.1/favicon.ico"]},Bo={[Je.ETHEREUM_MAINNET]:"https://rpc.decentraland.org/mainnet",[Je.ETHEREUM_SEPOLIA]:"https://rpc.decentraland.org/sepolia",[Je.MATIC_MAINNET]:"https://rpc.decentraland.org/polygon",[Je.MATIC_AMOY]:"https://rpc.decentraland.org/amoy"},Wo=gn.reduce((e,t)=>{const n=Bo[t.id];return e[t.id]=n?Xt(n):Xt(),e},{});function Ho(e,t){const n=t.trim();if(!n)return e;const r=e.replace(/\/+$/,""),o=n.startsWith("/")?n:`/${n}`;return`${r}${o}`}function zo(e){if(!e)return Se;const t=e.url??(e.urlPath?Ho(Se.url,e.urlPath):Se.url);return{name:e.name??Se.name,description:e.description??Se.description,url:t,icons:e.icons??Se.icons}}function Pf(e={}){const{walletConnectProjectId:t,appMetadata:n,chains:r=gn,transports:o,connectors:i={},additionalConnectors:a=[]}=e,l=zo(n),{injected:c=!0,walletConnect:s=!0,coinbaseWallet:m=!0}=i,y=r.reduce((b,I)=>(b[I.id]=o?.[I.id]??Wo[I.id]??Xt(),b),{}),p=[];return c&&p.push(So()),s&&t&&p.push(mn({projectId:t,metadata:{name:l.name,description:l.description??"",url:l.url??"",icons:l.icons??[]}})),m&&p.push(bt({appName:l.name})),p.push(...a),Qo({chains:r,transports:y,connectors:p})}function Go(){if(typeof window>"u"||!window.localStorage)return;const e=[],{localStorage:t}=window;for(let n=0;n<t.length;n++){const r=t.key(n);r?.startsWith("wagmi.")&&e.push(r)}e.forEach(n=>t.removeItem(n))}function Vo(){typeof window>"u"||!window.localStorage||window.localStorage.removeItem("decentraland-connect-storage-key")}var fi={},ie={},Zt={exports:{}},en={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(r){if(r==null)throw new TypeError("Expected a string but received a ".concat(r));if(r.constructor.name!=="String")throw new TypeError("Expected a string but received a ".concat(r.constructor.name))}e.exports=t.default,e.exports.default=t.default})(en,en.exports);var yn=en.exports,tn={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;function n(o){return Object.prototype.toString.call(o)==="[object RegExp]"}function r(o,i){for(var a=0;a<i.length;a++){var l=i[a];if(o===l||n(l)&&l.test(o))return!0}return!1}e.exports=t.default,e.exports.default=t.default})(tn,tn.exports);var Ko=tn.exports,nn={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(o,i){return o.indexOf(i)!==-1};t.default=n,e.exports=t.default,e.exports.default=t.default})(nn,nn.exports);var Yo=nn.exports,rn={exports:{}},on={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;for(var i in o)typeof r[i]>"u"&&(r[i]=o[i]);return r}e.exports=t.default,e.exports.default=t.default})(on,on.exports);var hi=on.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var n=o(yn),r=o(hi);function o(l){return l&&l.__esModule?l:{default:l}}var i={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};function a(l,c){(0,n.default)(l),c=(0,r.default)(c,i),c.allow_trailing_dot&&l[l.length-1]==="."&&(l=l.substring(0,l.length-1)),c.allow_wildcard===!0&&l.indexOf("*.")===0&&(l=l.substring(2));var s=l.split("."),m=s[s.length-1];return c.require_tld&&(s.length<2||!c.allow_numeric_tld&&!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(m)||/\s/.test(m))||!c.allow_numeric_tld&&/^\d+$/.test(m)?!1:s.every(function(y){return!(y.length>63&&!c.ignore_max_length||!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(y)||/[\uff01-\uff5e]/.test(y)||/^-|-$/.test(y)||!c.allow_underscores&&/_/.test(y))})}e.exports=t.default,e.exports.default=t.default})(rn,rn.exports);var Jo=rn.exports,an={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=m;var n=r(yn);function r(y){return y&&y.__esModule?y:{default:y}}function o(y){"@babel/helpers - typeof";return o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},o(y)}var i="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",a="(".concat(i,"[.]){3}").concat(i),l=new RegExp("^".concat(a,"$")),c="(?:[0-9a-fA-F]{1,4})",s=new RegExp("^("+"(?:".concat(c,":){7}(?:").concat(c,"|:)|")+"(?:".concat(c,":){6}(?:").concat(a,"|:").concat(c,"|:)|")+"(?:".concat(c,":){5}(?::").concat(a,"|(:").concat(c,"){1,2}|:)|")+"(?:".concat(c,":){4}(?:(:").concat(c,"){0,1}:").concat(a,"|(:").concat(c,"){1,3}|:)|")+"(?:".concat(c,":){3}(?:(:").concat(c,"){0,2}:").concat(a,"|(:").concat(c,"){1,4}|:)|")+"(?:".concat(c,":){2}(?:(:").concat(c,"){0,3}:").concat(a,"|(:").concat(c,"){1,5}|:)|")+"(?:".concat(c,":){1}(?:(:").concat(c,"){0,4}:").concat(a,"|(:").concat(c,"){1,6}|:)|")+"(?::((?::".concat(c,"){0,5}:").concat(a,"|(?::").concat(c,"){1,7}|:))")+")(%[0-9a-zA-Z.]{1,})?$");function m(y){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(0,n.default)(y);var b=(o(p)==="object"?p.version:arguments[1])||"";return b?b.toString()==="4"?l.test(y):b.toString()==="6"?s.test(y):!1:m(y,{version:4})||m(y,{version:6})}e.exports=t.default,e.exports.default=t.default})(an,an.exports);var Xo=an.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=E;var n=c(yn),r=c(Ko),o=c(Yo),i=c(Jo),a=c(Xo),l=c(hi);function c(_){return _&&_.__esModule?_:{default:_}}function s(_,g){return I(_)||b(_,g)||y(_,g)||m()}function m(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function y(_,g){if(_){if(typeof _=="string")return p(_,g);var u={}.toString.call(_).slice(8,-1);return u==="Object"&&_.constructor&&(u=_.constructor.name),u==="Map"||u==="Set"?Array.from(_):u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u)?p(_,g):void 0}}function p(_,g){(g==null||g>_.length)&&(g=_.length);for(var u=0,w=Array(g);u<g;u++)w[u]=_[u];return w}function b(_,g){var u=_==null?null:typeof Symbol<"u"&&_[Symbol.iterator]||_["@@iterator"];if(u!=null){var w,R,T,P,A=[],h=!0,f=!1;try{if(T=(u=u.call(_)).next,g!==0)for(;!(h=(w=T.call(u)).done)&&(A.push(w.value),A.length!==g);h=!0);}catch(v){f=!0,R=v}finally{try{if(!h&&u.return!=null&&(P=u.return(),Object(P)!==P))return}finally{if(f)throw R}}return A}}function I(_){if(Array.isArray(_))return _}var S={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0,max_allowed_length:2084},x=/^\[([^\]]+)\](?::([0-9]+))?$/;function E(_,g){if((0,n.default)(_),!_||/[\s<>]/.test(_)||_.indexOf("mailto:")===0||(g=(0,l.default)(g,S),g.validate_length&&_.length>g.max_allowed_length)||!g.allow_fragments&&(0,o.default)(_,"#")||!g.allow_query_components&&((0,o.default)(_,"?")||(0,o.default)(_,"&")))return!1;var u,w,R,T,P,A,h,f;h=_.split("#"),_=h.shift(),h=_.split("?"),_=h.shift();var v=_.match(/^([a-z][a-z0-9+\-.]*):/i),C=!1,k=function(ne){return C=!0,u=ne.toLowerCase(),g.require_valid_protocol&&g.protocols.indexOf(u)===-1?!1:_.substring(v[0].length)};if(v){var j=v[1],D=_.substring(v[0].length),N=D.slice(0,2)==="//";if(N){if(_=k(j),_===!1)return!1}else{var L=D.indexOf("/"),O=L===-1?D:D.substring(0,L),$=O.indexOf("@");if($!==-1){var Q=O.substring(0,$),G=/^[a-zA-Z0-9\-_.%:]*$/,W=G.test(Q),B=/%[0-9a-fA-F]{2}/.test(Q);if(W&&!B){if(g.require_protocol)return!1}else if(_=k(j),_===!1)return!1}else{var q=/^[0-9]/.test(D);if(q){if(g.require_protocol)return!1}else if(_=k(j),_===!1)return!1}}}else if(g.require_protocol)return!1;if(_.slice(0,2)==="//"){if(!C&&!g.allow_protocol_relative_urls)return!1;_=_.slice(2)}if(_==="")return!1;if(h=_.split("/"),_=h.shift(),_===""&&!g.require_host)return!0;if(h=_.split("@"),h.length>1){if(g.disallow_auth||h[0]===""||(w=h.shift(),w.indexOf(":")>=0&&w.split(":").length>2))return!1;var K=w.split(":"),U=s(K,2),F=U[0],H=U[1];if(F===""&&H==="")return!1}T=h.join("@"),A=null,f=null;var V=T.match(x);if(V?(R="",f=V[1],A=V[2]||null):(h=T.split(":"),R=h.shift(),h.length&&(A=h.join(":"))),A!==null&&A.length>0){if(P=parseInt(A,10),!/^[0-9]+$/.test(A)||P<=0||P>65535)return!1}else if(g.require_port)return!1;return g.host_whitelist?(0,r.default)(R,g.host_whitelist):R===""&&!g.require_host?!0:!(!(0,a.default)(R)&&!(0,i.default)(R,g)&&(!f||!(0,a.default)(f,6))||(R=R||f,g.host_blacklist&&(0,r.default)(R,g.host_blacklist)))}e.exports=t.default,e.exports.default=t.default})(Zt,Zt.exports);var Zo=Zt.exports,vn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.localStorageClearIdentity=e.localStorageStoreIdentity=e.localStorageGetIdentity=e.createMessage=e.SINGLE_SIGN_ON_TARGET=e.Action=void 0;var t;(function(l){l.GET="get",l.STORE="store",l.CLEAR="clear",l.PING="ping"})(t||(e.Action=t={})),e.SINGLE_SIGN_ON_TARGET="single-sign-on";function n(l){return{target:e.SINGLE_SIGN_ON_TARGET,...l}}e.createMessage=n;function r(l){const c=localStorage.getItem(a(l));if(!c)return null;let s;try{s=JSON.parse(c)}catch{return i(l),null}return s.expiration=new Date(s.expiration),s.expiration.getTime()<=Date.now()?(i(l),null):s}e.localStorageGetIdentity=r;function o(l,c){new Date(c.expiration).getTime()>Date.now()&&localStorage.setItem(a(l),JSON.stringify(c))}e.localStorageStoreIdentity=o;function i(l){localStorage.removeItem(a(l))}e.localStorageClearIdentity=i;function a(l){if(!/^0x[a-fA-F0-9]{40}$/.test(l))throw new Error("User must be a valid ethereum address");return`single-sign-on-${l.toLowerCase()}`}})(vn);Object.defineProperty(ie,"__esModule",{value:!0});ie.clearIdentity=ie.storeIdentity=ie.getIdentity=ie.init=void 0;const ea=Zo,oe=vn,pi=oe.SINGLE_SIGN_ON_TARGET,hr=500,ta=5;let pr=0,st="";const na={protocols:["https"],require_protocol:!0};function ra(e,t={}){if(!(0,ea.default)(e,{...na,...t}))throw new Error(`Invalid url: ${e}`);if(st)throw new Error("Already initialized");const n=document.createElement("iframe");n.id=pi,n.src=e,n.style.width="0",n.style.height="0",n.style.border="none",n.style.position="absolute",document.body.appendChild(n),st=e}ie.init=ra;async function ia(e){let t;try{t=(await wt(await bn(),oe.Action.GET,{user:e})).identity??null}catch(n){wn(n),t=(0,oe.localStorageGetIdentity)(e)}return t}ie.getIdentity=ia;async function oa(e,t){try{await wt(await bn(),oe.Action.STORE,{user:e,identity:t})}catch(n){wn(n),(0,oe.localStorageStoreIdentity)(e,t)}}ie.storeIdentity=oa;async function aa(e){try{await wt(await bn(),oe.Action.CLEAR,{user:e})}catch(t){wn(t),(0,oe.localStorageClearIdentity)(e)}}ie.clearIdentity=aa;async function bn(){if(!st)throw new Error("Not initialized");for(let e=0;e<ta;e++){const n=document.getElementById(pi)?.contentWindow;if(!n){await sa(hr);continue}try{await wt(n,oe.Action.PING,{},hr)}catch{continue}return n}throw new Error("Could not get iframe because it is not ready or cannot be communicated with")}async function wt(e,t,n,r=0){pr++;const o=pr;let i=null;const a=new Promise((l,c)=>{i=({data:s})=>{!s||s.target!==oe.SINGLE_SIGN_ON_TARGET||s.id!==o||(s.error?c(new Error(s.error)):l(s))},window.addEventListener("message",i)});e.postMessage((0,oe.createMessage)({id:o,action:t,...n}),st);try{return await(r?Promise.race([a,new Promise((l,c)=>setTimeout(()=>c(new Error("Did not receive a response in time")),r))]):a)}catch(l){throw l}finally{i&&window.removeEventListener("message",i)}}function sa(e){return new Promise(t=>setTimeout(t,e))}function wn(e){console.warn("Could not get identity from iframe, falling back to localStorage. Error:",e.message)}(function(e){var t=Ke&&Ke.__createBinding||(Object.create?function(r,o,i,a){a===void 0&&(a=i);var l=Object.getOwnPropertyDescriptor(o,i);(!l||("get"in l?!o.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return o[i]}}),Object.defineProperty(r,a,l)}:function(r,o,i,a){a===void 0&&(a=i),r[a]=o[i]}),n=Ke&&Ke.__exportStar||function(r,o){for(var i in r)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,r,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(ie,e),n(vn,e)})(fi);const ze=e=>e.wallet,ca=e=>ze(e).address,la=e=>ze(e).isConnected,ua=e=>ze(e).isConnecting,da=e=>ze(e).isDisconnecting,fa=e=>ze(e).error,{useCallback:gr}=await M("react"),{useSelector:De}=await M("react-redux"),{useConnect:ha,useDisconnect:pa}=await M("wagmi");function gi(){const e=De(ca),t=De(la),n=De(ua),r=De(da),o=De(fa),{connect:i,connectors:a,isPending:l}=ha(),{disconnect:c,isPending:s}=pa(),m=gr(p=>{i({connector:p})},[i]),y=gr(()=>{c(),Vo()},[c]);return{address:e,isConnected:t,isConnecting:n||l,isDisconnecting:r||s,error:o,connectors:a,connect:m,disconnect:y}}await M("react");await M("react");await M("react-redux");await M("wagmi");await M("react-redux");await M("wagmi");var ga=class extends ui{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const r=new xo({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);const t=Xe(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=Xe(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const r=n.indexOf(e);r!==-1&&n.splice(r,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Xe(e);if(typeof t=="string"){const r=this.#t.get(t)?.find(o=>o.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=Xe(e);return typeof t=="string"?this.#t.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Z.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>ir(t,n))}findAll(e={}){return this.getAll().filter(t=>ir(e,t))}notify(e){Z.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Z.batch(()=>Promise.all(e.map(t=>t.continue().catch(ce))))}};function Xe(e){return e.options.scope?.id}var ma=class extends ui{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,o=t.queryHash??di(r,t);let i=this.get(o);return i||(i=new Ao({client:e,queryKey:r,queryHash:o,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(i)),i}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Z.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>or(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>or(e,n)):t}notify(e){Z.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Z.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Z.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},ya=class{#e;#t;#n;#i;#o;#r;#a;#s;constructor(e={}){this.#e=e.queryCache||new ma,this.#t=e.mutationCache||new ga,this.#n=e.defaultOptions||{},this.#i=new Map,this.#o=new Map,this.#r=0}mount(){this.#r++,this.#r===1&&(this.#a=Eo.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=ar.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#r--,this.#r===0&&(this.#a?.(),this.#a=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(sr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=Io(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Z.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Z.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return Z.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Z.batch(()=>this.#e.findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(ce).catch(ce)}invalidateQueries(e,t={}){return Z.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Z.batch(()=>this.#e.findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let i=o.fetch(void 0,n);return n.throwOnError||(i=i.catch(ce)),o.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(ce)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(sr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ce).catch(ce)}fetchInfiniteQuery(e){return e.behavior=cr(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ce).catch(ce)}ensureInfiniteQueryData(e){return e.behavior=cr(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return ar.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#i.set(lr(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#i.values()],n={};return t.forEach(r=>{ur(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#o.set(lr(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#o.values()],n={};return t.forEach(r=>{ur(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=di(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===ko&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}};const{useMemo:va}=await M("react"),{WagmiProvider:ba}=await M("wagmi");function wa(){return new ya({defaultOptions:{queries:{staleTime:1e3*60,retry:1}}})}function Mf({config:e,queryClient:t,children:n}){const r=va(()=>t??wa(),[t]);return d.jsx(ba,{config:e,children:d.jsx(To,{client:r,children:n})})}const{createSlice:Ca}=await M("@reduxjs/toolkit"),mr={chainId:null,isSupportedNetwork:!1,isNetworkSwitching:!1,error:null},_a=Ca({name:"network",initialState:mr,reducers:{setChain(e,t){e.chainId=t.payload,e.isSupportedNetwork=t.payload!==null&&Lo(t.payload),e.isNetworkSwitching=!1,e.error=null},setSwitching(e,t){e.isNetworkSwitching=t.payload,t.payload&&(e.error=null)},setError(e,t){e.error=t.payload,e.isNetworkSwitching=!1},reset(){return mr}}}),{actions:yr,reducer:Sa}=_a,{createSlice:xa}=await M("@reduxjs/toolkit"),vr={address:null,isConnected:!1,isConnecting:!1,isDisconnecting:!1,error:null},Aa=xa({name:"wallet",initialState:vr,reducers:{setAccount(e,t){e.address=t.payload,e.isConnected=t.payload!==null,e.isConnecting=!1,e.error=null},setConnecting(e,t){e.isConnecting=t.payload,t.payload&&(e.error=null)},setDisconnecting(e,t){e.isDisconnecting=t.payload},setError(e,t){e.error=t.payload,e.isConnecting=!1,e.isDisconnecting=!1},reset(){return vr}}}),{actions:Mt,reducer:Ea}=Aa,{useEffect:br}=await M("react"),{useDispatch:Ia}=await M("react-redux"),{useAccount:ka,useChainId:Ta}=await M("wagmi");function jf({children:e}){const t=Ia(),{address:n,isConnecting:r,isConnected:o,isReconnecting:i}=ka(),a=Ta();return br(()=>{o&&n?(t(Mt.setAccount(n)),t(yr.setChain(a))):!o&&!r&&!i&&(t(Mt.reset()),t(yr.setChain(null)))},[t,n,o,r,i,a]),br(()=>{t(Mt.setConnecting(r||i))},[t,r,i]),d.jsx(d.Fragment,{children:e})}const{createSlice:Ra}=await M("@reduxjs/toolkit"),wr={transactions:{},pending:[]},Pa=Ra({name:"transactions",initialState:wr,reducers:{addTransaction(e,t){const n=t.payload;e.transactions[n.hash]=n,n.status==="pending"&&!e.pending.includes(n.hash)&&e.pending.push(n.hash)},updateTransaction(e,t){const{hash:n,status:r,error:o}=t.payload,i=e.transactions[n];i&&(i.status=r,i.error=o,r!=="pending"&&(e.pending=e.pending.filter(a=>a!==n)))},removeTransaction(e,t){const n=t.payload;delete e.transactions[n],e.pending=e.pending.filter(r=>r!==n)},reset(){return wr}}}),{actions:Df,reducer:Ma}=Pa;var ja=class extends Error{issues;constructor(e){super(e[0].message),this.name="SchemaError",this.issues=e}},mi=(e=>(e.uninitialized="uninitialized",e.pending="pending",e.fulfilled="fulfilled",e.rejected="rejected",e))(mi||{});function Cr(e){return{status:e,isUninitialized:e==="uninitialized",isLoading:e==="pending",isSuccess:e==="fulfilled",isError:e==="rejected"}}const{createAction:Re,createSlice:xe,createSelector:Da,createAsyncThunk:_r,combineReducers:Oa,createNextState:Cn,isAnyOf:ct,isAllOf:jt,isAction:La,isPending:yi,isRejected:_n,isFulfilled:ve,isRejectedWithValue:Sn,isAsyncThunkAction:Sr,prepareAutoBatched:Oe,SHOULD_AUTOBATCH:vi,isPlainObject:Be,nanoid:bi}=await M("@reduxjs/toolkit");var xr=Be;function xn(e,t){if(e===t||!(xr(e)&&xr(t)||Array.isArray(e)&&Array.isArray(t)))return t;const n=Object.keys(t),r=Object.keys(e);let o=n.length===r.length;const i=Array.isArray(t)?[]:{};for(const a of n)i[a]=xn(e[a],t[a]),o&&(o=e[a]===i[a]);return o?e:i}var Ar=e=>[].concat(...e);function Na(e){return new RegExp("(^|:)//").test(e)}function $a(){return typeof document>"u"?!0:document.visibilityState!=="hidden"}function An(e){return e!=null}function Er(e){return[...e?.values()??[]].filter(An)}function Ua(){return typeof navigator>"u"||navigator.onLine===void 0?!0:navigator.onLine}var qa=e=>e.replace(/\/$/,""),Fa=e=>e.replace(/^\//,"");function Qa(e,t){if(!e)return t;if(!t)return e;if(Na(t))return t;const n=e.endsWith("/")||!t.startsWith("?")?"/":"";return e=qa(e),t=Fa(t),`${e}${n}${t}`}function lt(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}var sn=()=>new Map,Ir=(...e)=>fetch(...e),Ba=e=>e.status>=200&&e.status<=299,Wa=e=>/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"");function kr(e){if(!Be(e))return e;const t={...e};for(const[n,r]of Object.entries(t))r===void 0&&delete t[n];return t}var Ha=e=>typeof e=="object"&&(Be(e)||Array.isArray(e)||typeof e.toJSON=="function");function za({baseUrl:e,prepareHeaders:t=y=>y,fetchFn:n=Ir,paramsSerializer:r,isJsonContentType:o=Wa,jsonContentType:i="application/json",jsonReplacer:a,timeout:l,responseHandler:c,validateStatus:s,...m}={}){return typeof fetch>"u"&&n===Ir&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),async(p,b,I)=>{const{getState:S,extra:x,endpoint:E,forced:_,type:g}=b;let u,{url:w,headers:R=new Headers(m.headers),params:T=void 0,responseHandler:P=c??"json",validateStatus:A=s??Ba,timeout:h=l,...f}=typeof p=="string"?{url:p}:p,v,C=b.signal;h&&(v=new AbortController,b.signal.addEventListener("abort",v.abort),C=v.signal);let k={...m,signal:C,...f};R=new Headers(kr(R)),k.headers=await t(R,{getState:S,arg:p,extra:x,endpoint:E,forced:_,type:g,extraOptions:I})||R;const j=Ha(k.body);if(k.body!=null&&!j&&typeof k.body!="string"&&k.headers.delete("content-type"),!k.headers.has("content-type")&&j&&k.headers.set("content-type",i),j&&o(k.headers)&&(k.body=JSON.stringify(k.body,a)),k.headers.has("accept")||(P==="json"?k.headers.set("accept","application/json"):P==="text"&&k.headers.set("accept","text/plain, text/html, */*")),T){const B=~w.indexOf("?")?"&":"?",q=r?r(T):new URLSearchParams(kr(T));w+=B+q}w=Qa(e,w);const D=new Request(w,k);u={request:new Request(w,k)};let L,O=!1,$=v&&setTimeout(()=>{O=!0,v.abort()},h);try{L=await n(D)}catch(B){return{error:{status:O?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(B)},meta:u}}finally{$&&clearTimeout($),v?.signal.removeEventListener("abort",v.abort)}const Q=L.clone();u.response=Q;let G,W="";try{let B;if(await Promise.all([y(L,P).then(q=>G=q,q=>B=q),Q.text().then(q=>W=q,()=>{})]),B)throw B}catch(B){return{error:{status:"PARSING_ERROR",originalStatus:L.status,data:W,error:String(B)},meta:u}}return A(L,G)?{data:G,meta:u}:{error:{status:L.status,data:G},meta:u}};async function y(p,b){if(typeof b=="function")return b(p);if(b==="content-type"&&(b=o(p.headers)?"json":"text"),b==="json"){const I=await p.text();return I.length?JSON.parse(I):null}return p.text()}}var Tr=class{constructor(e,t=void 0){this.value=e,this.meta=t}},Ct=Re("__rtkq/focused"),En=Re("__rtkq/unfocused"),_t=Re("__rtkq/online"),In=Re("__rtkq/offline"),Dt=!1;function Ga(e,t){function n(){const r=()=>e(Ct()),o=()=>e(En()),i=()=>e(_t()),a=()=>e(In()),l=()=>{window.document.visibilityState==="visible"?r():o()};return Dt||typeof window<"u"&&window.addEventListener&&(window.addEventListener("visibilitychange",l,!1),window.addEventListener("focus",r,!1),window.addEventListener("online",i,!1),window.addEventListener("offline",a,!1),Dt=!0),()=>{window.removeEventListener("focus",r),window.removeEventListener("visibilitychange",l),window.removeEventListener("online",i),window.removeEventListener("offline",a),Dt=!1}}return n()}function St(e){return e.type==="query"}function Va(e){return e.type==="mutation"}function xt(e){return e.type==="infinitequery"}function ut(e){return St(e)||xt(e)}function kn(e,t,n,r,o,i){return Ka(e)?e(t,n,r,o).filter(An).map(cn).map(i):Array.isArray(e)?e.map(cn).map(i):[]}function Ka(e){return typeof e=="function"}function cn(e){return typeof e=="string"?{type:e}:e}await M("@reduxjs/toolkit");function Ya(e,t){return e.catch(t)}var We=Symbol("forceQueryFn"),ln=e=>typeof e[We]=="function";function Ja({serializeQueryArgs:e,queryThunk:t,infiniteQueryThunk:n,mutationThunk:r,api:o,context:i,getInternalState:a}){const l=u=>a(u)?.runningQueries,c=u=>a(u)?.runningMutations,{unsubscribeQueryResult:s,removeMutationResult:m,updateSubscriptionOptions:y}=o.internalActions;return{buildInitiateQuery:E,buildInitiateInfiniteQuery:_,buildInitiateMutation:g,getRunningQueryThunk:p,getRunningMutationThunk:b,getRunningQueriesThunk:I,getRunningMutationsThunk:S};function p(u,w){return R=>{const T=i.endpointDefinitions[u],P=e({queryArgs:w,endpointDefinition:T,endpointName:u});return l(R)?.get(P)}}function b(u,w){return R=>c(R)?.get(w)}function I(){return u=>Er(l(u))}function S(){return u=>Er(c(u))}function x(u,w){const R=(T,{subscribe:P=!0,forceRefetch:A,subscriptionOptions:h,[We]:f,...v}={})=>(C,k)=>{const j=e({queryArgs:T,endpointDefinition:w,endpointName:u});let D;const N={...v,type:"query",subscribe:P,forceRefetch:A,subscriptionOptions:h,endpointName:u,originalArgs:T,queryCacheKey:j,[We]:f};if(St(w))D=t(N);else{const{direction:U,initialPageParam:F}=v;D=n({...N,direction:U,initialPageParam:F})}const L=o.endpoints[u].select(T),O=C(D),$=L(k()),{requestId:Q,abort:G}=O,W=$.requestId!==Q,B=l(C)?.get(j),q=()=>L(k()),K=Object.assign(f?O.then(q):W&&!B?Promise.resolve($):Promise.all([B,O]).then(q),{arg:T,requestId:Q,subscriptionOptions:h,queryCacheKey:j,abort:G,async unwrap(){const U=await K;if(U.isError)throw U.error;return U.data},refetch:()=>C(R(T,{subscribe:!1,forceRefetch:!0})),unsubscribe(){P&&C(s({queryCacheKey:j,requestId:Q}))},updateSubscriptionOptions(U){K.subscriptionOptions=U,C(y({endpointName:u,requestId:Q,queryCacheKey:j,options:U}))}});if(!B&&!W&&!f){const U=l(C);U.set(j,K),K.then(()=>{U.delete(j)})}return K};return R}function E(u,w){return x(u,w)}function _(u,w){return x(u,w)}function g(u){return(w,{track:R=!0,fixedCacheKey:T}={})=>(P,A)=>{const h=r({type:"mutation",endpointName:u,originalArgs:w,track:R,fixedCacheKey:T}),f=P(h),{requestId:v,abort:C,unwrap:k}=f,j=Ya(f.unwrap().then(O=>({data:O})),O=>({error:O})),D=()=>{P(m({requestId:v,fixedCacheKey:T}))},N=Object.assign(j,{arg:f.arg,requestId:v,abort:C,unwrap:k,reset:D}),L=c(P);return L.set(v,N),N.then(()=>{L.delete(v)}),T&&(L.set(T,N),N.then(()=>{L.get(T)===N&&L.delete(T)})),N}}}var wi=class extends ja{constructor(e,t,n,r){super(e),this.value=t,this.schemaName=n,this._bqMeta=r}},ge=(e,t)=>Array.isArray(e)?e.includes(t):!!e;async function me(e,t,n,r){const o=await e["~standard"].validate(t);if(o.issues)throw new wi(o.issues,t,n,r);return o.value}function Rr(e){return e}var Le=(e={})=>({...e,[vi]:!0});function Xa({reducerPath:e,baseQuery:t,context:{endpointDefinitions:n},serializeQueryArgs:r,api:o,assertTagType:i,selectors:a,onSchemaFailure:l,catchSchemaFailure:c,skipSchemaValidation:s}){const m=(f,v,C,k)=>(j,D)=>{const N=n[f],L=r({queryArgs:v,endpointDefinition:N,endpointName:f});if(j(o.internalActions.queryResultPatched({queryCacheKey:L,patches:C})),!k)return;const O=o.endpoints[f].select(v)(D()),$=kn(N.providesTags,O.data,void 0,v,{},i);j(o.internalActions.updateProvidedBy([{queryCacheKey:L,providedTags:$}]))};function y(f,v,C=0){const k=[v,...f];return C&&k.length>C?k.slice(0,-1):k}function p(f,v,C=0){const k=[...f,v];return C&&k.length>C?k.slice(1):k}const b=(f,v,C,k=!0)=>(j,D)=>{const L=o.endpoints[f].select(v)(D()),O={patches:[],inversePatches:[],undo:()=>j(o.util.patchQueryData(f,v,O.inversePatches,k))};if(L.status==="uninitialized")return O;let $;if("data"in L)if(mo(L.data)){const[Q,G,W]=ci(L.data,C);O.patches.push(...G),O.inversePatches.push(...W),$=Q}else $=C(L.data),O.patches.push({op:"replace",path:[],value:$}),O.inversePatches.push({op:"replace",path:[],value:L.data});return O.patches.length===0||j(o.util.patchQueryData(f,v,O.patches,k)),O},I=(f,v,C)=>k=>k(o.endpoints[f].initiate(v,{subscribe:!1,forceRefetch:!0,[We]:()=>({data:C})})),S=(f,v)=>f.query&&f[v]?f[v]:Rr,x=async(f,{signal:v,abort:C,rejectWithValue:k,fulfillWithValue:j,dispatch:D,getState:N,extra:L})=>{const O=n[f.endpointName],{metaSchema:$,skipSchemaValidation:Q=s}=O;try{let G=Rr;const W={signal:v,abort:C,dispatch:D,getState:N,extra:L,endpoint:f.endpointName,type:f.type,forced:f.type==="query"?E(f,N()):void 0,queryCacheKey:f.type==="query"?f.queryCacheKey:void 0},B=f.type==="query"?f[We]:void 0;let q;const K=async(F,H,V,pe)=>{if(H==null&&F.pages.length)return Promise.resolve({data:F});const ne={queryArg:f.originalArgs,pageParam:H},Ce=await U(ne),re=pe?y:p;return{data:{pages:re(F.pages,Ce.data,V),pageParams:re(F.pageParams,H,V)},meta:Ce.meta}};async function U(F){let H;const{extraOptions:V,argSchema:pe,rawResponseSchema:ne,responseSchema:Ce}=O;if(pe&&!ge(Q,"arg")&&(F=await me(pe,F,"argSchema",{})),B?H=B():O.query?(G=S(O,"transformResponse"),H=await t(O.query(F),W,V)):H=await O.queryFn(F,W,V,_e=>t(_e,W,V)),typeof process<"u",H.error)throw new Tr(H.error,H.meta);let{data:re}=H;ne&&!ge(Q,"rawResponse")&&(re=await me(ne,H.data,"rawResponseSchema",H.meta));let de=await G(re,H.meta,F);return Ce&&!ge(Q,"response")&&(de=await me(Ce,de,"responseSchema",H.meta)),{...H,data:de}}if(f.type==="query"&&"infiniteQueryOptions"in O){const{infiniteQueryOptions:F}=O,{maxPages:H=1/0}=F;let V;const pe={pages:[],pageParams:[]},ne=a.selectQueryEntry(N(),f.queryCacheKey)?.data,re=E(f,N())&&!f.direction||!ne?pe:ne;if("direction"in f&&f.direction&&re.pages.length){const de=f.direction==="backward",Ve=(de?Ci:un)(F,re,f.originalArgs);V=await K(re,Ve,H,de)}else{const{initialPageParam:de=F.initialPageParam}=f,_e=ne?.pageParams??[],Ve=_e[0]??de,Zn=_e.length;V=await K(re,Ve,H),B&&(V={data:V.data.pages[0]});for(let er=1;er<Zn;er++){const po=un(F,V.data,f.originalArgs);V=await K(V.data,po,H)}}q=V}else q=await U(f.originalArgs);return $&&!ge(Q,"meta")&&q.meta&&(q.meta=await me($,q.meta,"metaSchema",q.meta)),j(q.data,Le({fulfilledTimeStamp:Date.now(),baseQueryMeta:q.meta}))}catch(G){let W=G;if(W instanceof Tr){let B=S(O,"transformErrorResponse");const{rawErrorResponseSchema:q,errorResponseSchema:K}=O;let{value:U,meta:F}=W;try{q&&!ge(Q,"rawErrorResponse")&&(U=await me(q,U,"rawErrorResponseSchema",F)),$&&!ge(Q,"meta")&&(F=await me($,F,"metaSchema",F));let H=await B(U,F,f.originalArgs);return K&&!ge(Q,"errorResponse")&&(H=await me(K,H,"errorResponseSchema",F)),k(H,Le({baseQueryMeta:F}))}catch(H){W=H}}try{if(W instanceof wi){const B={endpoint:f.endpointName,arg:f.originalArgs,type:f.type,queryCacheKey:f.type==="query"?f.queryCacheKey:void 0};O.onSchemaFailure?.(W,B),l?.(W,B);const{catchSchemaFailure:q=c}=O;if(q)return k(q(W,B),Le({baseQueryMeta:W._bqMeta}))}}catch(B){W=B}throw typeof process<"u",console.error(W),W}};function E(f,v){const C=a.selectQueryEntry(v,f.queryCacheKey),k=a.selectConfig(v).refetchOnMountOrArgChange,j=C?.fulfilledTimeStamp,D=f.forceRefetch??(f.subscribe&&k);return D?D===!0||(Number(new Date)-Number(j))/1e3>=D:!1}const _=()=>_r(`${e}/executeQuery`,x,{getPendingMeta({arg:v}){const C=n[v.endpointName];return Le({startedTimeStamp:Date.now(),...xt(C)?{direction:v.direction}:{}})},condition(v,{getState:C}){const k=C(),j=a.selectQueryEntry(k,v.queryCacheKey),D=j?.fulfilledTimeStamp,N=v.originalArgs,L=j?.originalArgs,O=n[v.endpointName],$=v.direction;return ln(v)?!0:j?.status==="pending"?!1:E(v,k)||St(O)&&O?.forceRefetch?.({currentArg:N,previousArg:L,endpointState:j,state:k})?!0:!(D&&!$)},dispatchConditionRejection:!0}),g=_(),u=_(),w=_r(`${e}/executeMutation`,x,{getPendingMeta(){return Le({startedTimeStamp:Date.now()})}}),R=f=>"force"in f,T=f=>"ifOlderThan"in f,P=(f,v,C={})=>(k,j)=>{const D=R(C)&&C.force,N=T(C)&&C.ifOlderThan,L=($=!0)=>{const Q={forceRefetch:$,subscribe:!1};return o.endpoints[f].initiate(v,Q)},O=o.endpoints[f].select(v)(j());if(D)k(L());else if(N){const $=O?.fulfilledTimeStamp;if(!$){k(L());return}(Number(new Date)-Number(new Date($)))/1e3>=N&&k(L())}else k(L(!1))};function A(f){return v=>v?.meta?.arg?.endpointName===f}function h(f,v){return{matchPending:jt(yi(f),A(v)),matchFulfilled:jt(ve(f),A(v)),matchRejected:jt(_n(f),A(v))}}return{queryThunk:g,mutationThunk:w,infiniteQueryThunk:u,prefetch:P,updateQueryData:b,upsertQueryData:I,patchQueryData:m,buildMatchThunkActions:h}}function un(e,{pages:t,pageParams:n},r){const o=t.length-1;return e.getNextPageParam(t[o],t,n[o],n,r)}function Ci(e,{pages:t,pageParams:n},r){return e.getPreviousPageParam?.(t[0],t,n[0],n,r)}function _i(e,t,n,r){return kn(n[e.meta.arg.endpointName][t],ve(e)?e.payload:void 0,Sn(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,r)}function Ze(e,t,n){const r=e[t];r&&n(r)}function He(e){return("arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)??e.requestId}function Pr(e,t,n){const r=e[He(t)];r&&n(r)}var et={};function Za({reducerPath:e,queryThunk:t,mutationThunk:n,serializeQueryArgs:r,context:{endpointDefinitions:o,apiUid:i,extractRehydrationInfo:a,hasRehydrationInfo:l},assertTagType:c,config:s}){const m=Re(`${e}/resetApiState`);function y(A,h,f,v){A[h.queryCacheKey]??={status:"uninitialized",endpointName:h.endpointName},Ze(A,h.queryCacheKey,C=>{C.status="pending",C.requestId=f&&C.requestId?C.requestId:v.requestId,h.originalArgs!==void 0&&(C.originalArgs=h.originalArgs),C.startedTimeStamp=v.startedTimeStamp;const k=o[v.arg.endpointName];xt(k)&&"direction"in h&&(C.direction=h.direction)})}function p(A,h,f,v){Ze(A,h.arg.queryCacheKey,C=>{if(C.requestId!==h.requestId&&!v)return;const{merge:k}=o[h.arg.endpointName];if(C.status="fulfilled",k)if(C.data!==void 0){const{fulfilledTimeStamp:j,arg:D,baseQueryMeta:N,requestId:L}=h;let O=Cn(C.data,$=>k($,f,{arg:D.originalArgs,baseQueryMeta:N,fulfilledTimeStamp:j,requestId:L}));C.data=O}else C.data=f;else C.data=o[h.arg.endpointName].structuralSharing??!0?xn(yo(C.data)?vo(C.data):C.data,f):f;delete C.error,C.fulfilledTimeStamp=h.fulfilledTimeStamp})}const b=xe({name:`${e}/queries`,initialState:et,reducers:{removeQueryResult:{reducer(A,{payload:{queryCacheKey:h}}){delete A[h]},prepare:Oe()},cacheEntriesUpserted:{reducer(A,h){for(const f of h.payload){const{queryDescription:v,value:C}=f;y(A,v,!0,{arg:v,requestId:h.meta.requestId,startedTimeStamp:h.meta.timestamp}),p(A,{arg:v,requestId:h.meta.requestId,fulfilledTimeStamp:h.meta.timestamp,baseQueryMeta:{}},C,!0)}},prepare:A=>({payload:A.map(v=>{const{endpointName:C,arg:k,value:j}=v,D=o[C];return{queryDescription:{type:"query",endpointName:C,originalArgs:v.arg,queryCacheKey:r({queryArgs:k,endpointDefinition:D,endpointName:C})},value:j}}),meta:{[vi]:!0,requestId:bi(),timestamp:Date.now()}})},queryResultPatched:{reducer(A,{payload:{queryCacheKey:h,patches:f}}){Ze(A,h,v=>{v.data=nr(v.data,f.concat())})},prepare:Oe()}},extraReducers(A){A.addCase(t.pending,(h,{meta:f,meta:{arg:v}})=>{const C=ln(v);y(h,v,C,f)}).addCase(t.fulfilled,(h,{meta:f,payload:v})=>{const C=ln(f.arg);p(h,f,v,C)}).addCase(t.rejected,(h,{meta:{condition:f,arg:v,requestId:C},error:k,payload:j})=>{Ze(h,v.queryCacheKey,D=>{if(!f){if(D.requestId!==C)return;D.status="rejected",D.error=j??k}})}).addMatcher(l,(h,f)=>{const{queries:v}=a(f);for(const[C,k]of Object.entries(v))(k?.status==="fulfilled"||k?.status==="rejected")&&(h[C]=k)})}}),I=xe({name:`${e}/mutations`,initialState:et,reducers:{removeMutationResult:{reducer(A,{payload:h}){const f=He(h);f in A&&delete A[f]},prepare:Oe()}},extraReducers(A){A.addCase(n.pending,(h,{meta:f,meta:{requestId:v,arg:C,startedTimeStamp:k}})=>{C.track&&(h[He(f)]={requestId:v,status:"pending",endpointName:C.endpointName,startedTimeStamp:k})}).addCase(n.fulfilled,(h,{payload:f,meta:v})=>{v.arg.track&&Pr(h,v,C=>{C.requestId===v.requestId&&(C.status="fulfilled",C.data=f,C.fulfilledTimeStamp=v.fulfilledTimeStamp)})}).addCase(n.rejected,(h,{payload:f,error:v,meta:C})=>{C.arg.track&&Pr(h,C,k=>{k.requestId===C.requestId&&(k.status="rejected",k.error=f??v)})}).addMatcher(l,(h,f)=>{const{mutations:v}=a(f);for(const[C,k]of Object.entries(v))(k?.status==="fulfilled"||k?.status==="rejected")&&C!==k?.requestId&&(h[C]=k)})}}),S={tags:{},keys:{}},x=xe({name:`${e}/invalidation`,initialState:S,reducers:{updateProvidedBy:{reducer(A,h){for(const{queryCacheKey:f,providedTags:v}of h.payload){E(A,f);for(const{type:C,id:k}of v){const j=(A.tags[C]??={})[k||"__internal_without_id"]??=[];j.includes(f)||j.push(f)}A.keys[f]=v}},prepare:Oe()}},extraReducers(A){A.addCase(b.actions.removeQueryResult,(h,{payload:{queryCacheKey:f}})=>{E(h,f)}).addMatcher(l,(h,f)=>{const{provided:v}=a(f);for(const[C,k]of Object.entries(v.tags??{}))for(const[j,D]of Object.entries(k)){const N=(h.tags[C]??={})[j||"__internal_without_id"]??=[];for(const L of D)N.includes(L)||N.push(L),h.keys[L]=v.keys[L]}}).addMatcher(ct(ve(t),Sn(t)),(h,f)=>{_(h,[f])}).addMatcher(b.actions.cacheEntriesUpserted.match,(h,f)=>{const v=f.payload.map(({queryDescription:C,value:k})=>({type:"UNKNOWN",payload:k,meta:{requestStatus:"fulfilled",requestId:"UNKNOWN",arg:C}}));_(h,v)})}});function E(A,h){const f=A.keys[h]??[];for(const v of f){const C=v.type,k=v.id??"__internal_without_id",j=A.tags[C]?.[k];j&&(A.tags[C][k]=j.filter(D=>D!==h))}delete A.keys[h]}function _(A,h){const f=h.map(v=>{const C=_i(v,"providesTags",o,c),{queryCacheKey:k}=v.meta.arg;return{queryCacheKey:k,providedTags:C}});x.caseReducers.updateProvidedBy(A,x.actions.updateProvidedBy(f))}const g=xe({name:`${e}/subscriptions`,initialState:et,reducers:{updateSubscriptionOptions(A,h){},unsubscribeQueryResult(A,h){},internal_getRTKQSubscriptions(){}}}),u=xe({name:`${e}/internalSubscriptions`,initialState:et,reducers:{subscriptionsUpdated:{reducer(A,h){return nr(A,h.payload)},prepare:Oe()}}}),w=xe({name:`${e}/config`,initialState:{online:Ua(),focused:$a(),middlewareRegistered:!1,...s},reducers:{middlewareRegistered(A,{payload:h}){A.middlewareRegistered=A.middlewareRegistered==="conflict"||i!==h?"conflict":!0}},extraReducers:A=>{A.addCase(_t,h=>{h.online=!0}).addCase(In,h=>{h.online=!1}).addCase(Ct,h=>{h.focused=!0}).addCase(En,h=>{h.focused=!1}).addMatcher(l,h=>({...h}))}}),R=Oa({queries:b.reducer,mutations:I.reducer,provided:x.reducer,subscriptions:u.reducer,config:w.reducer}),T=(A,h)=>R(m.match(h)?void 0:A,h),P={...w.actions,...b.actions,...g.actions,...u.actions,...I.actions,...x.actions,resetApiState:m};return{reducer:T,actions:P}}var te=Symbol.for("RTKQ/skipToken"),Si={status:"uninitialized"},Mr=Cn(Si,()=>{}),jr=Cn(Si,()=>{});function es({serializeQueryArgs:e,reducerPath:t,createSelector:n}){const r=g=>Mr,o=g=>jr;return{buildQuerySelector:p,buildInfiniteQuerySelector:b,buildMutationSelector:I,selectInvalidatedBy:S,selectCachedArgsForQuery:x,selectApiState:a,selectQueries:l,selectMutations:s,selectQueryEntry:c,selectConfig:m};function i(g){return{...g,...Cr(g.status)}}function a(g){return g[t]}function l(g){return a(g)?.queries}function c(g,u){return l(g)?.[u]}function s(g){return a(g)?.mutations}function m(g){return a(g)?.config}function y(g,u,w){return R=>{if(R===te)return n(r,w);const T=e({queryArgs:R,endpointDefinition:u,endpointName:g});return n(A=>c(A,T)??Mr,w)}}function p(g,u){return y(g,u,i)}function b(g,u){const{infiniteQueryOptions:w}=u;function R(T){const P={...T,...Cr(T.status)},{isLoading:A,isError:h,direction:f}=P,v=f==="forward",C=f==="backward";return{...P,hasNextPage:E(w,P.data,P.originalArgs),hasPreviousPage:_(w,P.data,P.originalArgs),isFetchingNextPage:A&&v,isFetchingPreviousPage:A&&C,isFetchNextPageError:h&&v,isFetchPreviousPageError:h&&C}}return y(g,u,R)}function I(){return g=>{let u;return typeof g=="object"?u=He(g)??te:u=g,n(u===te?o:T=>a(T)?.mutations?.[u]??jr,i)}}function S(g,u){const w=g[t],R=new Set;for(const T of u.filter(An).map(cn)){const P=w.provided.tags[T.type];if(!P)continue;let A=(T.id!==void 0?P[T.id]:Ar(Object.values(P)))??[];for(const h of A)R.add(h)}return Ar(Array.from(R.values()).map(T=>{const P=w.queries[T];return P?[{queryCacheKey:T,endpointName:P.endpointName,originalArgs:P.originalArgs}]:[]}))}function x(g,u){return Object.values(l(g)).filter(w=>w?.endpointName===u&&w.status!=="uninitialized").map(w=>w.originalArgs)}function E(g,u,w){return u?un(g,u,w)!=null:!1}function _(g,u,w){return!u||!g.getPreviousPageParam?!1:Ci(g,u,w)!=null}}const{formatProdErrorMessage:ts,formatProdErrorMessage:Of,formatProdErrorMessage:Lf}=await M("@reduxjs/toolkit");var Dr=WeakMap?new WeakMap:void 0,Or=({endpointName:e,queryArgs:t})=>{let n="";const r=Dr?.get(t);if(typeof r=="string")n=r;else{const o=JSON.stringify(t,(i,a)=>(a=typeof a=="bigint"?{$bigint:a.toString()}:a,a=Be(a)?Object.keys(a).sort().reduce((l,c)=>(l[c]=a[c],l),{}):a,a));Be(t)&&Dr?.set(t,o),n=o}return`${e}(${n})`};function ns(...e){return function(n){const r=tr(s=>n.extractRehydrationInfo?.(s,{reducerPath:n.reducerPath??"api"})),o={reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1,invalidationBehavior:"delayed",...n,extractRehydrationInfo:r,serializeQueryArgs(s){let m=Or;if("serializeQueryArgs"in s.endpointDefinition){const y=s.endpointDefinition.serializeQueryArgs;m=p=>{const b=y(p);return typeof b=="string"?b:Or({...p,queryArgs:b})}}else n.serializeQueryArgs&&(m=n.serializeQueryArgs);return m(s)},tagTypes:[...n.tagTypes||[]]},i={endpointDefinitions:{},batch(s){s()},apiUid:bi(),extractRehydrationInfo:r,hasRehydrationInfo:tr(s=>r(s)!=null)},a={injectEndpoints:c,enhanceEndpoints({addTagTypes:s,endpoints:m}){if(s)for(const y of s)o.tagTypes.includes(y)||o.tagTypes.push(y);if(m)for(const[y,p]of Object.entries(m))typeof p=="function"?p(i.endpointDefinitions[y]):Object.assign(i.endpointDefinitions[y]||{},p);return a}},l=e.map(s=>s.init(a,o,i));function c(s){const m=s.endpoints({query:y=>({...y,type:"query"}),mutation:y=>({...y,type:"mutation"}),infiniteQuery:y=>({...y,type:"infinitequery"})});for(const[y,p]of Object.entries(m)){if(s.overrideExisting!==!0&&y in i.endpointDefinitions){if(s.overrideExisting==="throw")throw new Error(ts(39));typeof process<"u";continue}typeof process<"u",i.endpointDefinitions[y]=p;for(const b of l)b.injectEndpoint(y,p)}return a}return a.injectEndpoints({endpoints:n.endpoints})}}const{formatProdErrorMessage:rs}=await M("@reduxjs/toolkit");function is(){return function(){throw new Error(rs(33))}}function ae(e,...t){return Object.assign(e,...t)}var os=({api:e,queryThunk:t,internalState:n,mwApi:r})=>{const o=`${e.reducerPath}/subscriptions`;let i=null,a=null;const{updateSubscriptionOptions:l,unsubscribeQueryResult:c}=e.internalActions,s=(S,x)=>{if(l.match(x)){const{queryCacheKey:_,requestId:g,options:u}=x.payload,w=S.get(_);return w?.has(g)&&w.set(g,u),!0}if(c.match(x)){const{queryCacheKey:_,requestId:g}=x.payload,u=S.get(_);return u&&u.delete(g),!0}if(e.internalActions.removeQueryResult.match(x))return S.delete(x.payload.queryCacheKey),!0;if(t.pending.match(x)){const{meta:{arg:_,requestId:g}}=x,u=lt(S,_.queryCacheKey,sn);return _.subscribe&&u.set(g,_.subscriptionOptions??u.get(g)??{}),!0}let E=!1;if(t.rejected.match(x)){const{meta:{condition:_,arg:g,requestId:u}}=x;if(_&&g.subscribe){const w=lt(S,g.queryCacheKey,sn);w.set(u,g.subscriptionOptions??w.get(u)??{}),E=!0}}return E},m=()=>n.currentSubscriptions,b={getSubscriptions:m,getSubscriptionCount:S=>m().get(S)?.size??0,isRequestSubscribed:(S,x)=>!!m()?.get(S)?.get(x)};function I(S){return JSON.parse(JSON.stringify(Object.fromEntries([...S].map(([x,E])=>[x,Object.fromEntries(E)]))))}return(S,x)=>{if(i||(i=I(n.currentSubscriptions)),e.util.resetApiState.match(S))return i={},n.currentSubscriptions.clear(),a=null,[!0,!1];if(e.internalActions.internal_getRTKQSubscriptions.match(S))return[!1,b];const E=s(n.currentSubscriptions,S);let _=!0;if(E){a||(a=setTimeout(()=>{const w=I(n.currentSubscriptions),[,R]=ci(i,()=>w);x.next(e.internalActions.subscriptionsUpdated(R)),i=w,a=null},500));const g=typeof S.type=="string"&&!!S.type.startsWith(o),u=t.rejected.match(S)&&S.meta.condition&&!!S.meta.arg.subscribe;_=!g&&!u}return[_,!1]}},as=2147483647/1e3-1,ss=({reducerPath:e,api:t,queryThunk:n,context:r,internalState:o,selectors:{selectQueryEntry:i,selectConfig:a},getRunningQueryThunk:l,mwApi:c})=>{const{removeQueryResult:s,unsubscribeQueryResult:m,cacheEntriesUpserted:y}=t.internalActions,p=ct(m.match,n.fulfilled,n.rejected,y.match);function b(g){const u=o.currentSubscriptions.get(g);return u?u.size>0:!1}const I={};function S(g){for(const u of g.values())u?.abort?.()}const x=(g,u)=>{const w=u.getState(),R=a(w);if(p(g)){let T;if(y.match(g))T=g.payload.map(P=>P.queryDescription.queryCacheKey);else{const{queryCacheKey:P}=m.match(g)?g.payload:g.meta.arg;T=[P]}E(T,u,R)}if(t.util.resetApiState.match(g)){for(const[T,P]of Object.entries(I))P&&clearTimeout(P),delete I[T];S(o.runningQueries),S(o.runningMutations)}if(r.hasRehydrationInfo(g)){const{queries:T}=r.extractRehydrationInfo(g);E(Object.keys(T),u,R)}};function E(g,u,w){const R=u.getState();for(const T of g){const P=i(R,T);P?.endpointName&&_(T,P.endpointName,u,w)}}function _(g,u,w,R){const P=r.endpointDefinitions[u]?.keepUnusedDataFor??R.keepUnusedDataFor;if(P===1/0)return;const A=Math.max(0,Math.min(P,as));if(!b(g)){const h=I[g];h&&clearTimeout(h),I[g]=setTimeout(()=>{if(!b(g)){const f=i(w.getState(),g);f?.endpointName&&w.dispatch(l(f.endpointName,f.originalArgs))?.abort(),w.dispatch(s({queryCacheKey:g}))}delete I[g]},A*1e3)}}return x},Lr=new Error("Promise never resolved before cacheEntryRemoved."),cs=({api:e,reducerPath:t,context:n,queryThunk:r,mutationThunk:o,internalState:i,selectors:{selectQueryEntry:a,selectApiState:l}})=>{const c=Sr(r),s=Sr(o),m=ve(r,o),y={};function p(E,_,g){const u=y[E];u?.valueResolved&&(u.valueResolved({data:_,meta:g}),delete u.valueResolved)}function b(E){const _=y[E];_&&(delete y[E],_.cacheEntryRemoved())}const I=(E,_,g)=>{const u=S(E);function w(R,T,P,A){const h=a(g,T),f=a(_.getState(),T);!h&&f&&x(R,A,T,_,P)}if(r.pending.match(E))w(E.meta.arg.endpointName,u,E.meta.requestId,E.meta.arg.originalArgs);else if(e.internalActions.cacheEntriesUpserted.match(E))for(const{queryDescription:R,value:T}of E.payload){const{endpointName:P,originalArgs:A,queryCacheKey:h}=R;w(P,h,E.meta.requestId,A),p(h,T,{})}else if(o.pending.match(E))_.getState()[t].mutations[u]&&x(E.meta.arg.endpointName,E.meta.arg.originalArgs,u,_,E.meta.requestId);else if(m(E))p(u,E.payload,E.meta.baseQueryMeta);else if(e.internalActions.removeQueryResult.match(E)||e.internalActions.removeMutationResult.match(E))b(u);else if(e.util.resetApiState.match(E))for(const R of Object.keys(y))b(R)};function S(E){return c(E)?E.meta.arg.queryCacheKey:s(E)?E.meta.arg.fixedCacheKey??E.meta.requestId:e.internalActions.removeQueryResult.match(E)?E.payload.queryCacheKey:e.internalActions.removeMutationResult.match(E)?He(E.payload):""}function x(E,_,g,u,w){const R=n.endpointDefinitions[E],T=R?.onCacheEntryAdded;if(!T)return;const P={},A=new Promise(j=>{P.cacheEntryRemoved=j}),h=Promise.race([new Promise(j=>{P.valueResolved=j}),A.then(()=>{throw Lr})]);h.catch(()=>{}),y[g]=P;const f=e.endpoints[E].select(ut(R)?_:g),v=u.dispatch((j,D,N)=>N),C={...u,getCacheEntry:()=>f(u.getState()),requestId:w,extra:v,updateCachedData:ut(R)?j=>u.dispatch(e.util.updateQueryData(E,_,j)):void 0,cacheDataLoaded:h,cacheEntryRemoved:A},k=T(_,C);Promise.resolve(k).catch(j=>{if(j!==Lr)throw j})}return I},ls=({api:e,context:{apiUid:t},reducerPath:n})=>(r,o)=>{e.util.resetApiState.match(r)&&o.dispatch(e.internalActions.middlewareRegistered(t)),typeof process<"u"},us=({reducerPath:e,context:t,context:{endpointDefinitions:n},mutationThunk:r,queryThunk:o,api:i,assertTagType:a,refetchQuery:l,internalState:c})=>{const{removeQueryResult:s}=i.internalActions,m=ct(ve(r),Sn(r)),y=ct(ve(r,o),_n(r,o));let p=[];const b=(x,E)=>{m(x)?S(_i(x,"invalidatesTags",n,a),E):y(x)?S([],E):i.util.invalidateTags.match(x)&&S(kn(x.payload,void 0,void 0,void 0,void 0,a),E)};function I(x){const{queries:E,mutations:_}=x;for(const g of[E,_])for(const u in g)if(g[u]?.status==="pending")return!0;return!1}function S(x,E){const _=E.getState(),g=_[e];if(p.push(...x),g.config.invalidationBehavior==="delayed"&&I(g))return;const u=p;if(p=[],u.length===0)return;const w=i.util.selectInvalidatedBy(_,u);t.batch(()=>{const R=Array.from(w.values());for(const{queryCacheKey:T}of R){const P=g.queries[T],A=lt(c.currentSubscriptions,T,sn);P&&(A.size===0?E.dispatch(s({queryCacheKey:T})):P.status!=="uninitialized"&&E.dispatch(l(P)))}})}return b},ds=({reducerPath:e,queryThunk:t,api:n,refetchQuery:r,internalState:o})=>{const{currentPolls:i,currentSubscriptions:a}=o,l=new Set;let c=null;const s=(x,E)=>{(n.internalActions.updateSubscriptionOptions.match(x)||n.internalActions.unsubscribeQueryResult.match(x))&&m(x.payload.queryCacheKey,E),(t.pending.match(x)||t.rejected.match(x)&&x.meta.condition)&&m(x.meta.arg.queryCacheKey,E),(t.fulfilled.match(x)||t.rejected.match(x)&&!x.meta.condition)&&y(x.meta.arg,E),n.util.resetApiState.match(x)&&(I(),c&&(clearTimeout(c),c=null),l.clear())};function m(x,E){l.add(x),c||(c=setTimeout(()=>{for(const _ of l)p({queryCacheKey:_},E);l.clear(),c=null},0))}function y({queryCacheKey:x},E){const _=E.getState()[e],g=_.queries[x],u=a.get(x);if(!g||g.status==="uninitialized")return;const{lowestPollingInterval:w,skipPollingIfUnfocused:R}=S(u);if(!Number.isFinite(w))return;const T=i.get(x);T?.timeout&&(clearTimeout(T.timeout),T.timeout=void 0);const P=Date.now()+w;i.set(x,{nextPollTimestamp:P,pollingInterval:w,timeout:setTimeout(()=>{(_.config.focused||!R)&&E.dispatch(r(g)),y({queryCacheKey:x},E)},w)})}function p({queryCacheKey:x},E){const g=E.getState()[e].queries[x],u=a.get(x);if(!g||g.status==="uninitialized")return;const{lowestPollingInterval:w}=S(u);if(!Number.isFinite(w)){b(x);return}const R=i.get(x),T=Date.now()+w;(!R||T<R.nextPollTimestamp)&&y({queryCacheKey:x},E)}function b(x){const E=i.get(x);E?.timeout&&clearTimeout(E.timeout),i.delete(x)}function I(){for(const x of i.keys())b(x)}function S(x=new Map){let E=!1,_=Number.POSITIVE_INFINITY;for(const g of x.values())g.pollingInterval&&(_=Math.min(g.pollingInterval,_),E=g.skipPollingIfUnfocused||E);return{lowestPollingInterval:_,skipPollingIfUnfocused:E}}return s},fs=({api:e,context:t,queryThunk:n,mutationThunk:r})=>{const o=yi(n,r),i=_n(n,r),a=ve(n,r),l={};return(s,m)=>{if(o(s)){const{requestId:y,arg:{endpointName:p,originalArgs:b}}=s.meta,I=t.endpointDefinitions[p],S=I?.onQueryStarted;if(S){const x={},E=new Promise((w,R)=>{x.resolve=w,x.reject=R});E.catch(()=>{}),l[y]=x;const _=e.endpoints[p].select(ut(I)?b:y),g=m.dispatch((w,R,T)=>T),u={...m,getCacheEntry:()=>_(m.getState()),requestId:y,extra:g,updateCachedData:ut(I)?w=>m.dispatch(e.util.updateQueryData(p,b,w)):void 0,queryFulfilled:E};S(b,u)}}else if(a(s)){const{requestId:y,baseQueryMeta:p}=s.meta;l[y]?.resolve({data:s.payload,meta:p}),delete l[y]}else if(i(s)){const{requestId:y,rejectedWithValue:p,baseQueryMeta:b}=s.meta;l[y]?.reject({error:s.payload??s.error,isUnhandledError:!p,meta:b}),delete l[y]}}},hs=({reducerPath:e,context:t,api:n,refetchQuery:r,internalState:o})=>{const{removeQueryResult:i}=n.internalActions,a=(c,s)=>{Ct.match(c)&&l(s,"refetchOnFocus"),_t.match(c)&&l(s,"refetchOnReconnect")};function l(c,s){const m=c.getState()[e],y=m.queries,p=o.currentSubscriptions;t.batch(()=>{for(const b of p.keys()){const I=y[b],S=p.get(b);if(!S||!I)continue;const x=[...S.values()];(x.some(_=>_[s]===!0)||x.every(_=>_[s]===void 0)&&m.config[s])&&(S.size===0?c.dispatch(i({queryCacheKey:b})):I.status!=="uninitialized"&&c.dispatch(r(I)))}})}return a};function ps(e){const{reducerPath:t,queryThunk:n,api:r,context:o,getInternalState:i}=e,{apiUid:a}=o,l={invalidateTags:Re(`${t}/invalidateTags`)},c=p=>p.type.startsWith(`${t}/`),s=[ls,ss,us,ds,cs,fs];return{middleware:p=>{let b=!1;const I=i(p.dispatch),S={...e,internalState:I,refetchQuery:y,isThisApiSliceAction:c,mwApi:p},x=s.map(g=>g(S)),E=os(S),_=hs(S);return g=>u=>{if(!La(u))return g(u);b||(b=!0,p.dispatch(r.internalActions.middlewareRegistered(a)));const w={...p,next:g},R=p.getState(),[T,P]=E(u,w,R);let A;if(T?A=g(u):A=P,p.getState()[t]&&(_(u,w,R),c(u)||o.hasRehydrationInfo(u)))for(const h of x)h(u,w,R);return A}},actions:l};function y(p){return e.api.endpoints[p.endpointName].initiate(p.originalArgs,{subscribe:!1,forceRefetch:!0})}}var Nr=Symbol(),gs=({createSelector:e=Da}={})=>({name:Nr,init(t,{baseQuery:n,tagTypes:r,reducerPath:o,serializeQueryArgs:i,keepUnusedDataFor:a,refetchOnMountOrArgChange:l,refetchOnFocus:c,refetchOnReconnect:s,invalidationBehavior:m,onSchemaFailure:y,catchSchemaFailure:p,skipSchemaValidation:b},I){go();const S=U=>(typeof process<"u",U);Object.assign(t,{reducerPath:o,endpoints:{},internalActions:{onOnline:_t,onOffline:In,onFocus:Ct,onFocusLost:En},util:{}});const x=es({serializeQueryArgs:i,reducerPath:o,createSelector:e}),{selectInvalidatedBy:E,selectCachedArgsForQuery:_,buildQuerySelector:g,buildInfiniteQuerySelector:u,buildMutationSelector:w}=x;ae(t.util,{selectInvalidatedBy:E,selectCachedArgsForQuery:_});const{queryThunk:R,infiniteQueryThunk:T,mutationThunk:P,patchQueryData:A,updateQueryData:h,upsertQueryData:f,prefetch:v,buildMatchThunkActions:C}=Xa({baseQuery:n,reducerPath:o,context:I,api:t,serializeQueryArgs:i,assertTagType:S,selectors:x,onSchemaFailure:y,catchSchemaFailure:p,skipSchemaValidation:b}),{reducer:k,actions:j}=Za({context:I,queryThunk:R,infiniteQueryThunk:T,mutationThunk:P,serializeQueryArgs:i,reducerPath:o,assertTagType:S,config:{refetchOnFocus:c,refetchOnReconnect:s,refetchOnMountOrArgChange:l,keepUnusedDataFor:a,reducerPath:o,invalidationBehavior:m}});ae(t.util,{patchQueryData:A,updateQueryData:h,upsertQueryData:f,prefetch:v,resetApiState:j.resetApiState,upsertQueryEntries:j.cacheEntriesUpserted}),ae(t.internalActions,j);const D=new WeakMap,N=U=>lt(D,U,()=>({currentSubscriptions:new Map,currentPolls:new Map,runningQueries:new Map,runningMutations:new Map})),{buildInitiateQuery:L,buildInitiateInfiniteQuery:O,buildInitiateMutation:$,getRunningMutationThunk:Q,getRunningMutationsThunk:G,getRunningQueriesThunk:W,getRunningQueryThunk:B}=Ja({queryThunk:R,mutationThunk:P,infiniteQueryThunk:T,api:t,serializeQueryArgs:i,context:I,getInternalState:N});ae(t.util,{getRunningMutationThunk:Q,getRunningMutationsThunk:G,getRunningQueryThunk:B,getRunningQueriesThunk:W});const{middleware:q,actions:K}=ps({reducerPath:o,context:I,queryThunk:R,mutationThunk:P,infiniteQueryThunk:T,api:t,assertTagType:S,selectors:x,getRunningQueryThunk:B,getInternalState:N});return ae(t.util,K),ae(t,{reducer:k,middleware:q}),{name:Nr,injectEndpoint(U,F){const H=t,V=H.endpoints[U]??={};St(F)&&ae(V,{name:U,select:g(U,F),initiate:L(U,F)},C(R,U)),Va(F)&&ae(V,{name:U,select:w(),initiate:$(U)},C(P,U)),xt(F)&&ae(V,{name:U,select:u(U,F),initiate:O(U,F)},C(R,U))}}}});await M("@reduxjs/toolkit");const{batch:ms,useDispatch:ys,useSelector:vs,useStore:bs}=await M("react-redux");function tt(e){return e.replace(e[0],e[0].toUpperCase())}function ws(e){return e.type==="query"}function Cs(e){return e.type==="mutation"}function xi(e){return e.type==="infinitequery"}function Ne(e,...t){return Object.assign(e,...t)}const{formatProdErrorMessage:Nf,formatProdErrorMessage:_s}=await M("@reduxjs/toolkit"),{useCallback:ye,useDebugValue:Ot,useEffect:Ie,useLayoutEffect:Ss,useMemo:X,useRef:Ae,useState:$r}=await M("react"),{shallowEqual:Lt}=await M("react-redux");var Nt=Symbol();const{useEffect:xs,useRef:As,useMemo:Es}=await M("react");function $t(e){const t=As(e),n=Es(()=>xn(t.current,e),[e]);return xs(()=>{t.current!==n&&(t.current=n)},[n]),n}const{useEffect:Is,useRef:ks}=await M("react"),{shallowEqual:Ur}=await M("react-redux");function nt(e){const t=ks(e);return Is(()=>{Ur(t.current,e)||(t.current=e)},[e]),Ur(t.current,e)?t.current:e}var Ts=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Rs=Ts(),Ps=()=>typeof navigator<"u"&&navigator.product==="ReactNative",Ms=Ps(),js=()=>Rs||Ms?Ss:Ie,Ds=js(),qr=e=>e.isUninitialized?{...e,isUninitialized:!1,isFetching:!0,isLoading:e.data===void 0,status:mi.pending}:e;function Ut(e,...t){const n={};return t.forEach(r=>{n[r]=e[r]}),n}var qt=["data","status","isLoading","isSuccess","isError","error"];function Os({api:e,moduleOptions:{batch:t,hooks:{useDispatch:n,useSelector:r,useStore:o},unstable__sideEffectsInRender:i,createSelector:a},serializeQueryArgs:l,context:c}){const s=i?u=>u():Ie;return{buildQueryHooks:E,buildInfiniteQueryHooks:_,buildMutationHook:g,usePrefetch:p};function m(u,w,R){if(w?.endpointName&&u.isUninitialized){const{endpointName:v}=w,C=c.endpointDefinitions[v];R!==te&&l({queryArgs:w.originalArgs,endpointDefinition:C,endpointName:v})===l({queryArgs:R,endpointDefinition:C,endpointName:v})&&(w=void 0)}let T=u.isSuccess?u.data:w?.data;T===void 0&&(T=u.data);const P=T!==void 0,A=u.isLoading,h=(!w||w.isLoading||w.isUninitialized)&&!P&&A,f=u.isSuccess||P&&(A&&!w?.isError||u.isUninitialized);return{...u,data:T,currentData:u.data,isFetching:A,isLoading:h,isSuccess:f}}function y(u,w,R){if(w?.endpointName&&u.isUninitialized){const{endpointName:v}=w,C=c.endpointDefinitions[v];R!==te&&l({queryArgs:w.originalArgs,endpointDefinition:C,endpointName:v})===l({queryArgs:R,endpointDefinition:C,endpointName:v})&&(w=void 0)}let T=u.isSuccess?u.data:w?.data;T===void 0&&(T=u.data);const P=T!==void 0,A=u.isLoading,h=(!w||w.isLoading||w.isUninitialized)&&!P&&A,f=u.isSuccess||A&&P;return{...u,data:T,currentData:u.data,isFetching:A,isLoading:h,isSuccess:f}}function p(u,w){const R=n(),T=nt(w);return ye((P,A)=>R(e.util.prefetch(u,P,{...T,...A})),[u,R,T])}function b(u,w,{refetchOnReconnect:R,refetchOnFocus:T,refetchOnMountOrArgChange:P,skip:A=!1,pollingInterval:h=0,skipPollingIfUnfocused:f=!1,...v}={}){const{initiate:C}=e.endpoints[u],k=n(),j=Ae(void 0);if(!j.current){const q=k(e.internalActions.internal_getRTKQSubscriptions());j.current=q}const D=$t(A?te:w),N=nt({refetchOnReconnect:R,refetchOnFocus:T,pollingInterval:h,skipPollingIfUnfocused:f}),L=v.initialPageParam,O=nt(L),$=Ae(void 0);let{queryCacheKey:Q,requestId:G}=$.current||{},W=!1;Q&&G&&(W=j.current.isRequestSubscribed(Q,G));const B=!W&&$.current!==void 0;return s(()=>{B&&($.current=void 0)},[B]),s(()=>{const q=$.current;if(typeof process<"u",D===te){q?.unsubscribe(),$.current=void 0;return}const K=$.current?.subscriptionOptions;if(!q||q.arg!==D){q?.unsubscribe();const U=k(C(D,{subscriptionOptions:N,forceRefetch:P,...xi(c.endpointDefinitions[u])?{initialPageParam:O}:{}}));$.current=U}else N!==K&&q.updateSubscriptionOptions(N)},[k,C,P,D,N,B,O,u]),[$,k,C,N]}function I(u,w){return(T,{skip:P=!1,selectFromResult:A}={})=>{const{select:h}=e.endpoints[u],f=$t(P?te:T),v=Ae(void 0),C=X(()=>a([h(f),(L,O)=>O,L=>f],w,{memoizeOptions:{resultEqualityCheck:Lt}}),[h,f]),k=X(()=>A?a([C],A,{devModeChecks:{identityFunctionCheck:"never"}}):C,[C,A]),j=r(L=>k(L,v.current),Lt),D=o(),N=C(D.getState(),v.current);return Ds(()=>{v.current=N},[N]),j}}function S(u){Ie(()=>()=>{u.current?.unsubscribe?.(),u.current=void 0},[u])}function x(u){if(!u.current)throw new Error(_s(38));return u.current.refetch()}function E(u){const w=(P,A={})=>{const[h]=b(u,P,A);return S(h),X(()=>({refetch:()=>x(h)}),[h])},R=({refetchOnReconnect:P,refetchOnFocus:A,pollingInterval:h=0,skipPollingIfUnfocused:f=!1}={})=>{const{initiate:v}=e.endpoints[u],C=n(),[k,j]=$r(Nt),D=Ae(void 0),N=nt({refetchOnReconnect:P,refetchOnFocus:A,pollingInterval:h,skipPollingIfUnfocused:f});s(()=>{const Q=D.current?.subscriptionOptions;N!==Q&&D.current?.updateSubscriptionOptions(N)},[N]);const L=Ae(N);s(()=>{L.current=N},[N]);const O=ye(function(Q,G=!1){let W;return t(()=>{D.current?.unsubscribe(),D.current=W=C(v(Q,{subscriptionOptions:L.current,forceRefetch:!G})),j(Q)}),W},[C,v]),$=ye(()=>{D.current?.queryCacheKey&&C(e.internalActions.removeQueryResult({queryCacheKey:D.current?.queryCacheKey}))},[C]);return Ie(()=>()=>{D?.current?.unsubscribe()},[]),Ie(()=>{k!==Nt&&!D.current&&O(k,!0)},[k,O]),X(()=>[O,k,{reset:$}],[O,k,$])},T=I(u,m);return{useQueryState:T,useQuerySubscription:w,useLazyQuerySubscription:R,useLazyQuery(P){const[A,h,{reset:f}]=R(P),v=T(h,{...P,skip:h===Nt}),C=X(()=>({lastArg:h}),[h]);return X(()=>[A,{...v,reset:f},C],[A,v,f,C])},useQuery(P,A){const h=w(P,A),f=T(P,{selectFromResult:P===te||A?.skip?void 0:qr,...A}),v=Ut(f,...qt);return Ot(v),X(()=>({...f,...h}),[f,h])}}}function _(u){const w=(T,P={})=>{const[A,h,f,v]=b(u,T,P),C=Ae(v);s(()=>{C.current=v},[v]);const k=ye(function(N,L){let O;return t(()=>{A.current?.unsubscribe(),A.current=O=h(f(N,{subscriptionOptions:C.current,direction:L}))}),O},[A,h,f]);S(A);const j=$t(P.skip?te:T),D=ye(()=>x(A),[A]);return X(()=>({trigger:k,refetch:D,fetchNextPage:()=>k(j,"forward"),fetchPreviousPage:()=>k(j,"backward")}),[D,k,j])},R=I(u,y);return{useInfiniteQueryState:R,useInfiniteQuerySubscription:w,useInfiniteQuery(T,P){const{refetch:A,fetchNextPage:h,fetchPreviousPage:f}=w(T,P),v=R(T,{selectFromResult:T===te||P?.skip?void 0:qr,...P}),C=Ut(v,...qt,"hasNextPage","hasPreviousPage");return Ot(C),X(()=>({...v,fetchNextPage:h,fetchPreviousPage:f,refetch:A}),[v,h,f,A])}}}function g(u){return({selectFromResult:w,fixedCacheKey:R}={})=>{const{select:T,initiate:P}=e.endpoints[u],A=n(),[h,f]=$r();Ie(()=>()=>{h?.arg.fixedCacheKey||h?.reset()},[h]);const v=ye(function(Q){const G=A(P(Q,{fixedCacheKey:R}));return f(G),G},[A,P,R]),{requestId:C}=h||{},k=X(()=>T({fixedCacheKey:R,requestId:h?.requestId}),[R,h,T]),j=X(()=>w?a([k],w):k,[w,k]),D=r(j,Lt),N=R==null?h?.arg.originalArgs:void 0,L=ye(()=>{t(()=>{h&&f(void 0),R&&A(e.internalActions.removeMutationResult({requestId:C,fixedCacheKey:R}))})},[A,R,h,C]),O=Ut(D,...qt,"endpointName");Ot(O);const $=X(()=>({...D,originalArgs:N,reset:L}),[D,N,L]);return X(()=>[v,$],[v,$])}}}var Ls=Symbol(),Ns=({batch:e=ms,hooks:t={useDispatch:ys,useSelector:vs,useStore:bs},createSelector:n=bo,unstable__sideEffectsInRender:r=!1,...o}={})=>({name:Ls,init(i,{serializeQueryArgs:a},l){const c=i,{buildQueryHooks:s,buildInfiniteQueryHooks:m,buildMutationHook:y,usePrefetch:p}=Os({api:i,moduleOptions:{batch:e,hooks:t,unstable__sideEffectsInRender:r,createSelector:n},serializeQueryArgs:a,context:l});return Ne(c,{usePrefetch:p}),Ne(l,{batch:e}),{injectEndpoint(b,I){if(ws(I)){const{useQuery:S,useLazyQuery:x,useLazyQuerySubscription:E,useQueryState:_,useQuerySubscription:g}=s(b);Ne(c.endpoints[b],{useQuery:S,useLazyQuery:x,useLazyQuerySubscription:E,useQueryState:_,useQuerySubscription:g}),i[`use${tt(b)}Query`]=S,i[`useLazy${tt(b)}Query`]=x}if(Cs(I)){const S=y(b);Ne(c.endpoints[b],{useMutation:S}),i[`use${tt(b)}Mutation`]=S}else if(xi(I)){const{useInfiniteQuery:S,useInfiniteQuerySubscription:x,useInfiniteQueryState:E}=m(b);Ne(c.endpoints[b],{useInfiniteQuery:S,useInfiniteQuerySubscription:x,useInfiniteQueryState:E}),i[`use${tt(b)}InfiniteQuery`]=S}}}}});await M("@reduxjs/toolkit");await M("react");await M("react");await M("react");await M("react-redux");var Ai=ns(gs(),Ns());const $s="/auth",Us="pk_live_CE856A4938B36648",qs="https://notifications.decentraland.zone",Fs="https://peer.decentraland.zone",Qs="f0S2L1sWumT8BPjBmIBDTN5gIWjhrRHG",Bs="https://events.decentraland.zone/api",Ws="https://realm-provider-ea.decentraland.org/hot-scenes",Hs="61570c542c2d66c659492e5b24a41522",zs="https://places.decentraland.zone/api",Gs={AUTH_URL:$s,MAGIC_API_KEY:Us,NOTIFICATIONS_API_URL:qs,PEER_URL:Fs,SEGMENT_API_KEY:Qs,EVENTS_API_URL:Bs,HOT_SCENES_URL:Ws,WALLET_CONNECT_PROJECT_ID:Hs,PLACES_API_URL:zs},Vs="/auth",Ks="pk_live_212568025B158355",Ys="https://notifications.decentraland.org",Js="https://peer.decentraland.org",Xs="f0S2L1sWumT8BPjBmIBDTN5gIWjhrRHG",Zs="https://events.decentraland.org/api",ec="https://realm-provider-ea.decentraland.org/hot-scenes",tc="61570c542c2d66c659492e5b24a41522",nc="https://places.decentraland.org/api",rc={AUTH_URL:Vs,MAGIC_API_KEY:Ks,NOTIFICATIONS_API_URL:Ys,PEER_URL:Js,SEGMENT_API_KEY:Xs,EVENTS_API_URL:Zs,HOT_SCENES_URL:ec,WALLET_CONNECT_PROJECT_ID:tc,PLACES_API_URL:nc},ic="/auth",oc="pk_live_CE856A4938B36648",ac="https://notifications.decentraland.org",sc="https://peer.decentraland.org",cc="f0S2L1sWumT8BPjBmIBDTN5gIWjhrRHG",lc="https://events.decentraland.org/api",uc="https://realm-provider-ea.decentraland.org/hot-scenes",dc="61570c542c2d66c659492e5b24a41522",fc="https://places.decentraland.org/api",hc={AUTH_URL:ic,MAGIC_API_KEY:oc,NOTIFICATIONS_API_URL:ac,PEER_URL:sc,SEGMENT_API_KEY:cc,EVENTS_API_URL:lc,HOT_SCENES_URL:uc,WALLET_CONNECT_PROJECT_ID:dc,PLACES_API_URL:fc};var pc={VITE_REACT_APP_WEBSITE_VERSION:"0.0.1-24353156203.commit-157a41c",VITE_BASE_URL:"https://cdn.decentraland.org/@dcl/explore-site/0.0.1-24353156203.commit-157a41c",BASE_URL:"https://cdn.decentraland.org/@dcl/explore-site/0.0.1-24353156203.commit-157a41c",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const gc=wo({[Rt.DEVELOPMENT]:Gs,[Rt.STAGING]:hc,[Rt.PRODUCTION]:rc},{systemEnvVariables:{REACT_APP_DCL_DEFAULT_ENV:pc.VITE_REACT_APP_DCL_DEFAULT_ENV??"dev"}}),le=e=>gc.get(e),mc=5;function Fe(e,t){return`${e},${t}`}function yc(e,t){for(const[n,r]of t){const o=e.get(Fe(n,r));if(o)return o}}function Ei(e){return e.toLowerCase().includes("genesis plaza")}function vc(e){const t=e.find(r=>Ei(r.name)),n=t?Fe(t.baseCoords[0],t.baseCoords[1]):"0,0";return{id:t?.id??"genesis-plaza",type:"place",title:t?.name??"Genesis Plaza",image:t?.thumbnail??"",users:t?.usersTotalCount??0,coordinates:n,creatorName:"Decentraland Foundation",isGenesisPlaza:!0}}function bc(e,t,n=mc){const r=t.filter(s=>s.usersTotalCount>=n),o=new Map(e.map(s=>[Fe(s.x,s.y),s])),i=[],a=new Set,l=new Set;for(const s of r){const m=yc(o,s.parcels);m&&!l.has(m.id)&&(i.push({id:m.id,type:"event",title:m.name,image:m.image||"",users:s.usersTotalCount,coordinates:Fe(m.x,m.y),creatorAddress:m.user,creatorName:m.user_name||void 0,isGenesisPlaza:!1}),a.add(s.id),l.add(m.id))}i.sort((s,m)=>m.users-s.users);const c=r.filter(s=>!a.has(s.id)).sort((s,m)=>m.usersTotalCount-s.usersTotalCount);for(const s of c){const m=Ei(s.name);i.push({id:s.id,type:"place",title:s.name,image:s.thumbnail,users:s.usersTotalCount,coordinates:Fe(s.baseCoords[0],s.baseCoords[1]),...m&&{creatorName:"Decentraland Foundation"},isGenesisPlaza:m})}return i.length===0&&i.push(vc(t)),i}async function wc(e,t){const{placesUrl:n,peerUrl:r}=t,o=e.filter(a=>a.type==="place");if(o.length===0)return e;const i=new Map;return await Promise.all(o.map(async a=>{const l={};if(n)try{const c=await fetch(`${n}/places?positions=${a.coordinates}`);if(c.ok){const m=(await c.json()).data?.[0];m&&(l.description=m.description||null,l.categories=m.categories||[])}}catch(c){console.warn("[LiveNow] places lookup failed for",a.coordinates,c)}if(r&&!a.creatorAddress)try{const c=await fetch(`${r}/content/entities/active`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({pointers:[a.coordinates]})});if(c.ok){const m=(await c.json())[0]?.id;if(m){const y=await fetch(`${r}/content/deployments/?entityId=${encodeURIComponent(m)}`);if(y.ok){const b=(await y.json()).deployments?.[0]?.deployedBy;b&&(l.creatorAddress=b)}}}}catch(c){console.warn("[LiveNow] deployer lookup failed for",a.coordinates,c)}Object.keys(l).length>0&&i.set(a.id,l)})),i.size===0?e:e.map(a=>{const l=i.get(a.id);return l?{...a,...l}:a})}function Fr(e){const t=new URLSearchParams;for(const[n,r]of Object.entries(e))r!==void 0&&t.set(n,String(r));return t.toString()}const dt=Ai({reducerPath:"eventsClient",baseQuery:za({baseUrl:"/"}),tagTypes:["Events","LiveNow"],keepUnusedDataFor:60,endpoints:e=>({getEvents:e.query({queryFn:async t=>{try{const n=le("EVENTS_API_URL"),r=Fr(t),o=await fetch(`${n}/events?${r}`);if(!o.ok)throw new Error(`Events API error: ${o.status}`);return{data:(await o.json()).data??[]}}catch(n){return{error:{status:"FETCH_ERROR",error:n instanceof Error?n.message:"Unknown error"}}}},providesTags:["Events"]}),getLiveNowCards:e.query({queryFn:async t=>{try{const n=le("EVENTS_API_URL"),r=le("HOT_SCENES_URL"),[o,i]=await Promise.all([fetch(`${n}/events?list=live&limit=20&order=asc&world=false`),fetch(r)]);if(!o.ok||!i.ok)throw new Error("Failed to fetch live events or hot scenes");const[a,l]=await Promise.all([o.json(),i.json()]),c=t&&"minUsers"in t?t.minUsers:void 0,s=bc(a.data??[],l,c);return{data:await wc(s,{placesUrl:le("PLACES_API_URL"),peerUrl:le("PEER_URL")})}}catch(n){return{error:{status:"FETCH_ERROR",error:n instanceof Error?n.message:"Unknown error"}}}},providesTags:["LiveNow"]}),getUpcomingEvents:e.query({queryFn:async()=>{try{const t=le("EVENTS_API_URL"),n=new Date,r=new Date(n.getTime()+24*60*60*1e3),o=Fr({list:"upcoming",limit:10,order:"asc",world:!1,from:n.toISOString(),to:r.toISOString()}),i=await fetch(`${t}/events?${o}`);if(!i.ok)throw new Error(`Events API error: ${i.status}`);return{data:(await i.json()).data??[]}}catch(t){return{error:{status:"FETCH_ERROR",error:t instanceof Error?t.message:"Unknown error"}}}},providesTags:["Events"]})})}),{useGetEventsQuery:Cc,useGetLiveNowCardsQuery:Ii,useGetUpcomingEventsQuery:_c}=dt;async function Sc(e){try{const t=le("PEER_URL"),n=await fetch(`${t}/lambdas/profiles/${e.toLowerCase()}`);return n.ok?await n.json()??null:null}catch{return null}}const ft=Ai({reducerPath:"profileClient",baseQuery:is(),tagTypes:["Profile"],keepUnusedDataFor:300,refetchOnFocus:!1,refetchOnReconnect:!1,endpoints:e=>({getProfile:e.query({queryFn:async t=>{if(!t)return{data:null};try{return{data:await Sc(t)}}catch{return{data:null}}},providesTags:(t,n,r)=>r?[{type:"Profile",id:r}]:[]})})}),{useGetProfileQuery:Pe}=ft,{combineReducers:xc,configureStore:Ac}=await M("@reduxjs/toolkit"),Ec=xc({network:Sa,transactions:Ma,wallet:Ea,[ft.reducerPath]:ft.reducer,[dt.reducerPath]:dt.reducer}),Ic=Ac({reducer:Ec,middleware:e=>e().concat(ft.middleware,dt.middleware),devTools:!1});Ga(Ic.dispatch);const kc={title:"Live Now"},Tc={title:"Upcoming",starts_in_mins:"Starts in {count} mins",starts_in_hours:"Starts in {count} {count, plural, one {hour} other {hours}}",by_prefix:"By ",unknown_creator:"Unknown",remind_me:"Remind me",add_to_calendar:"Add to calendar",copy_link:"Copy link",copied:"Copied!"},Rc={go_to_page:"Go to page {page}"},Pc={close:"Close",jump_in:"Jump In",what_to_expect:"What to expect",schedule:"Schedule",remind_me:"Remind me",add_to_calendar:"Add to calendar",coming_soon:"Coming soon",copy_link:"Copy link",copied:"Copied!",by_prefix:"By ",unknown_creator:"Unknown",live_now:"Live Now",recurrent_weekly:"Repeats weekly",recurrent_daily:"Repeats daily",recurrent_monthly:"Repeats monthly"},Mc={title:"All Experiences",today:"Today",tomorrow:"Tomorrow",navigate_previous:"Navigate to previous dates",navigate_next:"Navigate to next dates",events_for_day:"Events for {day}",jump_in:"Jump In",add_to_calendar:"Add to calendar",remind_me:"Remind me",copy_link:"Copy link",copied:"Copied!",coming_soon:"Coming soon"},jc={title:"Submit an Event",back:"Go back",sign_in_message:"To create an event you will need to sign in or create an account",sign_in:"Sign In",create_account:"Create Account",image_upload_label:"Upload event cover image",image_preview_alt:"Event cover preview",select_cover:"Select an Event Cover",choose_picture:"Choose a Picture",drop_hint:"from your gallery or drop it here",recommended_size:"(recommended size: 1340 × 670)",image_helper:"Upload a PNG, JPG, or GIF (1340×670px, max 500kb). Center visuals and text to fit all screen resolutions.",change_image:"Change Image",event_name:"Event Name",name_placeholder:"Be as descriptive as you can",event_description:"Event Description",description_placeholder:"Be as descriptive as you can",event_details:"Event Details",starts:"Starts",ends:"Ends",start_date:"Start date",start_time:"Start time",end_date:"End date",end_time:"End time",repeat_event:"Repeat Event",frequency:"Frequency",every_day:"Every Day",every_week:"Every Week",every_month:"Every Month",location:"Location",land:"Land",world:"World",coordinates:"Coordinates",coord_x:"X coordinate",coord_y:"Y coordinate",community:"Community",select_community:"Select community",community_tech:"Tech",community_art:"Art",community_music:"Music",community_gaming:"Gaming",email_label:"Email (Optional)",email_placeholder:"hello@example.com",additional_notes:"Additional Notes",notes_placeholder:"Be as descriptive as you can",cancel:"Cancel",submit:"Submit Event",submitting:"Submitting...",error_invalid_image_type:"Please upload a PNG, JPG, or GIF file.",error_image_too_large:"Image must be under 500kb."},Dc={title:"Want to Host Something?",subtitle:"Bring people together in minutes.",check_1:"Start something people can drop into.",check_2:"Shape the space to match your vibe.",check_3:"Go live and see who shows up.",create_event:"Create an Event",learn_more:"Learn More"},$f={live_now:kc,upcoming:Tc,pagination:Rc,event_detail:Pc,all_experiences:Mc,create_event:jc,host_banner:Dc};function Oc(){const e=le("AUTH_URL")??"/auth";return e.startsWith("http")||window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"?e:`${window.location.origin}${e.startsWith("/")?"":"/"}${e}`}function Lc(e){return e.startsWith("/")&&!e.startsWith("//")}function Nc(){const e=window.location.pathname,t=window.location.search,r=new URLSearchParams(t).get("redirectTo");return r&&Lc(r)?r:`${e}${t}`}function $c(e){const t=e??Nc(),n=Oc();Go(),window.location.replace(`${n}/login?redirectTo=${encodeURIComponent(t)}`)}const{useCallback:Ft,useEffect:Uc,useMemo:qc,useState:Fc}=await M("react"),{useNotifications:Qc}=await M("@dcl/hooks"),{NotificationActiveTab:Bc}=await M("decentraland-ui2");function Wc(e){const{identity:t,isConnected:n,locale:r="en"}=e,o=!!(t&&n),[i,a]=Fc(!0),l=le("NOTIFICATIONS_API_URL")??"https://notifications.decentraland.org";Uc(()=>{o||a(!0)},[o]);const c=Ft(()=>{o&&a(u=>u&&!1)},[o]),{notifications:s,isLoading:m,isModalOpen:y,isNotificationsOnboarding:p,modalActiveTab:b,handleNotificationsOpen:I,handleOnBegin:S,handleOnChangeModalTab:x}=Qc({identity:t??void 0,isNotificationsEnabled:o&&i,initialActiveTab:Bc.NEWEST,notificationsUrl:l,onError:c}),E=Ft(()=>{i||a(!0),I()},[I,i]),_=Ft((u,w)=>{x(w)},[x]);return{notificationProps:qc(()=>{if(o)return{locale:r,isLoading:m,isOnboarding:p,isOpen:y,items:s,activeTab:b,onClick:E,onClose:E,onBegin:S,onChangeTab:_}},[o,r,m,p,y,s,b,E,S,_])}}const{useEffect:Hc,useState:zc}=await M("react");function Tn(){const{address:e}=gi(),t=e||void 0,[n,r]=zc(void 0);return Hc(()=>{if(!t){r(void 0);return}try{const o=fi.localStorageGetIdentity(t.toLowerCase());r(o??void 0)}catch(o){console.error("[useAuthIdentity] Failed to get identity:",o),r(void 0)}},[t]),{identity:n,hasValidIdentity:!!n,address:t}}const{Box:ki,styled:Ti}=await M("decentraland-ui2"),Gc=Ti(ki)(()=>({minHeight:"100vh",display:"flex",flexDirection:"column",background:"linear-gradient(180deg, #1A0A2E 0%, #0D0116 100%)"})),Vc=Ti(ki)({flex:1,width:"100%"}),{useCallback:Qr,useMemo:Kc}=await M("react"),{useLocation:Yc}=await M("react-router-dom"),{usePageTracking:Jc}=await M("@dcl/hooks"),{Footer:Xc,FooterLanding:Zc,Navbar:el,NavbarPages:tl,SupportedLanguage:nl}=await M("decentraland-ui2");function rl(e){const{children:t}=e,n=Yc(),{address:r,isConnected:o,isConnecting:i,isDisconnecting:a,disconnect:l}=gi();Jc(n.pathname);const{identity:c}=Tn(),{notificationProps:s}=Wc({identity:c,isConnected:o,locale:"en"}),{data:m}=Pe(r??void 0,{skip:!r}),y=m?.avatars?.[0],p=Qr(()=>{$c()},[]),b=Qr(()=>{l()},[l]),I=Kc(()=>({activePage:tl.EXPLORE,isSignedIn:o,isSigningIn:i,isDisconnecting:a,isActivity:!1,address:r||void 0,avatar:y,notifications:s,onClickSignIn:p,onClickSignOut:b,onClickNavbarItem:S=>{const x=S.currentTarget;x?.href&&(window.location.href=x.href)}}),[o,i,a,r,y,s,p,b]);return d.jsxs(Gc,{children:[d.jsx(el,{...I}),d.jsx(Vc,{children:t}),d.jsx(Zc,{}),d.jsx(Xc,{languages:[{code:nl.EN,name:"English",flag:"🇺🇸"}],hideSocialNetworks:!0})]})}const{useEffect:il,useState:ol}=await M("react"),al=5,Ri=[{query:"(min-width: 1536px)",columns:al},{query:"(min-width: 1200px)",columns:4},{query:"(min-width: 900px)",columns:3},{query:"(min-width: 600px)",columns:2}];function Br(){for(const{query:e,columns:t}of Ri)if(window.matchMedia(e).matches)return t;return 1}function sl(){const[e,t]=ol(Br);return il(()=>{const n=Ri.map(({query:o})=>window.matchMedia(o)),r=()=>{t(Br())};for(const o of n)o.addEventListener("change",r);return()=>{for(const o of n)o.removeEventListener("change",r)}},[]),e}function Rn(e,t){const n=new Date(e);return n.setDate(n.getDate()+t),n}function cl(e){const t=new Date(e);return t.setHours(0,0,0,0),t}function ll(e){const t=new Date(e);return t.setHours(23,59,59,999),t}function Wr(e){return{from:cl(e).toISOString(),to:ll(e).toISOString()}}function dn(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function ul(e,t,n=new Date){if(dn(e,n))return t("all_experiences.today");const r=Rn(n,1);if(dn(e,r))return t("all_experiences.tomorrow");const o=e.toLocaleDateString(void 0,{weekday:"short"}),i=e.toLocaleDateString(void 0,{month:"short"}),a=e.getDate();return`${o}, ${i} ${a}`}function Pi(e){return e.toLocaleDateString(void 0,{weekday:"long",month:"long",day:"numeric",year:"numeric"})}var Pn={},dl=he;Object.defineProperty(Pn,"__esModule",{value:!0});var Mi=Pn.default=void 0,fl=dl(fe()),hl=d;Mi=Pn.default=(0,fl.default)((0,hl.jsx)("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 18H4V8h16z"}),"CalendarToday");function pl(e,t){return`https://decentraland.org/jump?position=${e},${t}`}function Mn(e,t){return`https://decentraland.org/jump/event?position=${e},${t}`}function gl(e){const[t,n]=e.split(",").map(Number);return Number.isNaN(t)||Number.isNaN(n)?[0,0]:[t,n]}function jn(e){if(!e.startAt)return null;const t=i=>new Date(i).toISOString().replace(/[-:]/g,"").replace(/\.\d{3}/,""),n=t(e.startAt),r=e.finishAt?t(e.finishAt):n;return`https://calendar.google.com/calendar/render?${new URLSearchParams({action:"TEMPLATE",text:e.name,dates:`${n}/${r}`,details:`${e.description||""}
|
|
4
|
+
|
|
5
|
+
${e.url}`,location:`Decentraland ${e.x},${e.y}`}).toString()}`}var Dn={},ml=he;Object.defineProperty(Dn,"__esModule",{value:!0});var ji=Dn.default=void 0,yl=ml(fe()),vl=d;ji=Dn.default=(0,yl.default)((0,vl.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");const{Box:ue,Dialog:bl,Typography:be,styled:z}=await M("decentraland-ui2"),wl=z(bl)(({theme:e})=>({"& .MuiBackdrop-root":{backgroundColor:"rgba(0, 0, 0, 0.8)"},"& .MuiDialog-paper":{borderRadius:e.spacing(2),maxWidth:880,width:"100%",maxHeight:"80vh",margin:0,overflow:"hidden",backgroundColor:"transparent",boxShadow:"0px 4px 25px 0px #FFFFFF40",display:"flex",flexDirection:"column"},[e.breakpoints.down("sm")]:{"& .MuiDialog-paper":{borderRadius:0,maxWidth:"100%",maxHeight:"100%",height:"100%",margin:0}}})),Cl=z(ue)({position:"relative",width:880,height:450,maxWidth:"100%",overflow:"hidden",flexShrink:0}),_l=z("img")({position:"absolute",top:0,left:0,width:"100%",height:"100%",objectFit:"cover"}),Sl=z(ue)({position:"absolute",top:0,left:0,width:"100%",height:"100%",background:"linear-gradient(0deg, #000000 0%, rgba(0, 0, 0, 0.8) 30.02%, rgba(0, 0, 0, 0) 106.22%)"}),xl=z("button")(({theme:e})=>({position:"absolute",top:e.spacing(1.5),right:e.spacing(1.5),width:40,height:40,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.4)",border:"none",borderRadius:"50%",cursor:"pointer",zIndex:2,padding:0,"&:hover":{backgroundColor:"rgba(0, 0, 0, 0.6)"},"&:focus-visible":{outline:"2px solid #FCFCFC",outlineOffset:2}})),Al=z(ji)({fontSize:20,color:"#FCFCFC"}),El=z(ue)(({theme:e})=>({position:"absolute",bottom:0,left:0,right:0,padding:e.spacing(0,3.75,6.25,3.75),zIndex:1,display:"flex",flexDirection:"column",gap:e.spacing(1)})),Il=z(be)({fontSize:14,fontWeight:600,color:"#FCFCFC",textTransform:"uppercase",letterSpacing:"0.04em"}),kl=z(be)({fontSize:32,fontWeight:600,lineHeight:1.24,color:"#FCFCFC",overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical"}),Tl=z(ue)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(1)})),Rl=z("img")(({theme:e})=>({width:e.spacing(3),height:e.spacing(3),borderRadius:"50%",border:"1.5px solid rgba(255, 255, 255, 0.5)",flexShrink:0,objectFit:"cover"})),Pl=z(ue)(({theme:e})=>({width:e.spacing(3),height:e.spacing(3),borderRadius:"50%",backgroundColor:"#00B453",border:"1.5px solid rgba(255, 255, 255, 0.5)",flexShrink:0})),Ml=z(be)({fontSize:14,lineHeight:1,color:"#FCFCFC",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}),jl=z("span")({color:"#FF2D55"}),Dl=z(ue)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(1)})),Ol=z("button")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",gap:e.spacing(1),backgroundColor:"#FCFCFC",color:"#161518",border:"none",borderRadius:e.spacing(1),padding:e.spacing(1,2.5),fontSize:14,fontWeight:600,cursor:"pointer",whiteSpace:"nowrap",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),"&:hover":{backgroundColor:"#E0E0E0"},"&:focus-visible":{outline:"2px solid #FCFCFC",outlineOffset:2}})),Hr=z("button")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",gap:e.spacing(1),backgroundColor:"transparent",color:"#FCFCFC",border:"1px solid #FCFCFC",borderRadius:e.spacing(1),padding:e.spacing(1,2),fontSize:14,fontWeight:600,cursor:"pointer",whiteSpace:"nowrap",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),"&:disabled":{opacity:.5,cursor:"default"},"&:hover:not(:disabled)":{backgroundColor:"rgba(255, 255, 255, 0.2)"},"&:focus-visible":{outline:"2px solid #FCFCFC",outlineOffset:2}})),Ll=z("button")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"transparent",border:"1px solid #FCFCFC",borderRadius:e.spacing(1),padding:e.spacing(1),flexShrink:0,cursor:"pointer",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),"&:hover":{backgroundColor:"rgba(255, 255, 255, 0.2)"},"&:focus-visible":{outline:"2px solid #FCFCFC",outlineOffset:2}})),Nl=z(li)({fontSize:18,color:"#FCFCFC"}),$l=z(ue)(({theme:e})=>({background:"radial-gradient(47.37% 84.21% at 42.4% 26.48%, #6E31A7 0%, #32134C 100%)",padding:e.spacing(3.75,6.25),overflowY:"auto",flex:1})),zr=z(be)(({theme:e})=>({fontSize:14,fontWeight:600,lineHeight:1.75,textTransform:"uppercase",color:"#A09BA8",marginBottom:e.spacing(1)})),Ul=z(be)({fontSize:14,lineHeight:1.6,color:"#FCFCFC"}),ql=z(ue)(({theme:e})=>({height:1,backgroundColor:"rgba(255, 255, 255, 0.15)",margin:e.spacing(2,0)})),Fl=z(ue)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",gap:e.spacing(1.5)})),Ql=z("button")({display:"flex",alignItems:"center",justifyContent:"center",background:"none",border:"none",padding:0,cursor:"pointer",color:"#A09BA8",flexShrink:0,"&:hover":{color:"#FCFCFC"},"&:focus-visible":{outline:"2px solid #FCFCFC",outlineOffset:2},"& .MuiSvgIcon-root":{fontSize:20}}),Bl=z(be)({fontSize:14,lineHeight:1.5,color:"#FCFCFC"}),Wl=z(be)(({theme:e})=>({fontSize:12,color:"#A09BA8",marginTop:e.spacing(.5)})),{useCallback:Hl}=await M("react"),{useTranslation:zl}=await M("@dcl/hooks");function Gl(e){return new Date(e).toLocaleDateString(void 0,{weekday:"short",month:"short",day:"numeric"})}function Gr(e){return new Date(e).toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit",hour12:!0})}function Vl(e,t){switch(e){case"DAILY":return t("event_detail.recurrent_daily");case"WEEKLY":return t("event_detail.recurrent_weekly");case"MONTHLY":return t("event_detail.recurrent_monthly");default:return null}}function Kl({data:e}){const{t}=zl(),n=!!e.description,r=!!e.startAt,o=Hl(()=>{const a=jn(e);a&&window.open(a,"_blank","noopener,noreferrer")},[e]);if(!n&&!r)return null;const i=e.recurrent?Vl(e.recurrentFrequency,t):null;return d.jsxs($l,{children:[n&&d.jsxs(d.Fragment,{children:[d.jsx(zr,{children:t("event_detail.what_to_expect")}),d.jsx(Ul,{children:e.description})]}),n&&r&&d.jsx(ql,{}),r&&e.startAt&&d.jsxs(d.Fragment,{children:[d.jsx(zr,{children:t("event_detail.schedule")}),d.jsxs(Fl,{children:[d.jsxs("div",{children:[d.jsxs(Bl,{children:[Gl(e.startAt)," · ",Gr(e.startAt),e.finishAt&&` – ${Gr(e.finishAt)}`]}),i&&d.jsx(Wl,{children:i})]}),d.jsx(Ql,{onClick:o,"aria-label":t("event_detail.add_to_calendar"),children:d.jsx(Mi,{})})]})]})]})}var On={},Yl=he;Object.defineProperty(On,"__esModule",{value:!0});var Ln=On.default=void 0,Jl=Yl(fe()),Xl=d;Ln=On.default=(0,Jl.default)((0,Xl.jsx)("path",{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 16H5V10h14zM9 14H7v-2h2zm4 0h-2v-2h2zm4 0h-2v-2h2zm-8 4H7v-2h2zm4 0h-2v-2h2zm4 0h-2v-2h2z"}),"CalendarMonth");var Nn={},Zl=he;Object.defineProperty(Nn,"__esModule",{value:!0});var $n=Nn.default=void 0,eu=Zl(fe()),tu=d;$n=Nn.default=(0,eu.default)((0,tu.jsx)("path",{d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2m6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1zm-2 1H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5z"}),"NotificationsNone");const{useCallback:Qt,useState:nu}=await M("react"),{useTranslation:ru}=await M("@dcl/hooks"),{Tooltip:Bt}=await M("decentraland-ui2"),iu=`${window.location.origin}/dcl-logo.svg`.replace(/^http:\/\//,"https://");function ou({data:e,onClose:t}){const{t:n}=ru(),[r,o]=nu(!1),i=e.creatorName?.toLowerCase()==="decentraland foundation",{data:a}=Pe(e.creatorAddress,{skip:!e.creatorAddress||i}),l=a?.avatars?.[0],c=i?iu:l?.avatar?.snapshots?.face256,s=i?"Decentraland Foundation":l?.name||e.creatorName,m=!!(c||s),y=Qt(()=>{window.open(e.url,"_blank","noopener,noreferrer")},[e.url]),p=Qt(()=>{navigator.clipboard?.writeText(e.url)?.then(()=>{o(!0),setTimeout(()=>o(!1),2e3)}).catch(S=>console.warn("[EventDetailModal] Failed to copy:",S))},[e.url]),b=Qt(()=>{const S=jn(e);S&&window.open(S,"_blank","noopener,noreferrer")},[e]),I=e.live?n("event_detail.live_now"):e.categories[0]||null;return d.jsx(d.Fragment,{children:d.jsxs(Cl,{children:[e.image&&d.jsx(_l,{src:e.image,alt:e.name}),d.jsx(Sl,{}),d.jsx(xl,{onClick:t,"aria-label":n("event_detail.close"),children:d.jsx(Al,{})}),d.jsxs(El,{children:[I&&d.jsx(Il,{children:I}),d.jsx(kl,{id:"event-detail-title",children:e.name}),m&&d.jsxs(Tl,{children:[c?d.jsx(Rl,{src:c,alt:s??""}):d.jsx(Pl,{}),d.jsxs(Ml,{children:[n("event_detail.by_prefix"),d.jsx(jl,{children:s})]})]}),d.jsxs(Dl,{children:[d.jsx(Ol,{onClick:y,children:n("event_detail.jump_in")}),d.jsx(Bt,{title:n("event_detail.coming_soon"),placement:"top",arrow:!0,children:d.jsx("span",{children:d.jsx(Hr,{disabled:!0,"aria-label":n("event_detail.remind_me"),children:d.jsx($n,{fontSize:"small"})})})}),e.startAt&&d.jsx(Bt,{title:n("event_detail.add_to_calendar"),placement:"top",arrow:!0,children:d.jsx(Hr,{onClick:b,"aria-label":n("event_detail.add_to_calendar"),children:d.jsx(Ln,{fontSize:"small"})})}),d.jsx(Bt,{title:n(r?"event_detail.copied":"event_detail.copy_link"),placement:"top",arrow:!0,children:d.jsx(Ll,{onClick:p,"aria-label":n("event_detail.copy_link"),children:d.jsx(Nl,{})})})]})]})]})})}function Un({open:e,onClose:t,data:n}){return d.jsx(wl,{open:e&&!!n,onClose:t,"aria-labelledby":"event-detail-title",fullWidth:!0,children:n&&d.jsxs(d.Fragment,{children:[d.jsx(ou,{data:n,onClose:t}),d.jsx(Kl,{data:n})]})})}function Di(e){return{id:e.id,name:e.name,description:e.description,image:e.image,x:e.x,y:e.y,creatorAddress:e.user||void 0,creatorName:e.user_name||void 0,startAt:e.start_at,finishAt:e.finish_at,recurrent:e.recurrent,recurrentFrequency:e.recurrent_frequency,recurrentDates:e.recurrent_dates,totalAttendees:e.total_attendees,live:e.live,categories:e.categories,url:Mn(e.x,e.y)}}function au(e){const[t,n]=gl(e.coordinates),r=e.type==="event"?Mn(t,n):pl(t,n);return{id:e.id,name:e.title,description:e.description||null,image:e.image||null,x:t,y:n,creatorAddress:e.creatorAddress,creatorName:e.creatorName,startAt:null,finishAt:null,recurrent:!1,recurrentFrequency:null,recurrentDates:[],totalAttendees:e.users,live:!0,categories:e.categories||[],url:r}}const su="data:image/webp;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQq0AAAAAElFTkSuQmCC",cu="data:image/webp;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQq0AAAAAElFTkSuQmCC";var qn={},lu=he;Object.defineProperty(qn,"__esModule",{value:!0});var Oi=qn.default=void 0,uu=lu(fe()),du=d;Oi=qn.default=(0,uu.default)((0,du.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2m-9 14-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckBox");const{Box:Fn,Typography:Qn,styled:ee}=await M("decentraland-ui2"),fu=ee("section")(({theme:e})=>({position:"relative",zIndex:8,overflow:"hidden",borderRadius:e.spacing(2),background:"radial-gradient(63.39% 112.69% at 49.33% 50.11%, #6B2A8A 0%, #1E0A2E 100%)",display:"flex",alignItems:"center",minHeight:240,[e.breakpoints.down("md")]:{flexDirection:"column",minHeight:"auto"}})),hu=ee("img")(({theme:e})=>({width:200,height:"100%",objectFit:"contain",objectPosition:"bottom left",flexShrink:0,alignSelf:"flex-end",[e.breakpoints.down("lg")]:{width:160},[e.breakpoints.down("md")]:{display:"none"}})),pu=ee(Fn)(({theme:e})=>({flex:1,display:"flex",flexDirection:"column",gap:e.spacing(2),padding:e.spacing(4,3),zIndex:1,[e.breakpoints.down("sm")]:{padding:e.spacing(3,2)}})),gu=ee(Qn)(({theme:e})=>({fontSize:"1.5rem",fontWeight:600,lineHeight:1.334,color:e.palette.text.primary})),mu=ee(Qn)(({theme:e})=>({fontSize:16,fontWeight:400,lineHeight:1.5,color:e.palette.text.secondary})),Wt=ee(Fn)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(1)})),Ht=ee(Oi)(({theme:e})=>({fontSize:20,color:e.palette.primary.main})),zt=ee(Qn)(({theme:e})=>({fontSize:14,fontWeight:400,color:e.palette.text.primary})),yu=ee(Fn)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(2),marginTop:e.spacing(1),[e.breakpoints.down("sm")]:{flexDirection:"column",alignItems:"stretch"}})),vu=ee("button")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",gap:e.spacing(.5),background:e.palette.primary.main,border:"none",borderRadius:6,color:e.palette.common.white,fontFamily:"Inter, Helvetica, Arial, sans-serif",fontSize:"0.875rem",fontWeight:600,textTransform:"uppercase",letterSpacing:"0.4px",padding:"6px 16px",cursor:"pointer",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),"&:hover":{background:e.palette.primary.dark},"&:focus-visible":{outline:`2px solid ${e.palette.text.primary}`,outlineOffset:2}})),bu=ee("button")(({theme:e})=>({background:"transparent",border:"1px solid rgba(255, 255, 255, 0.23)",borderRadius:6,color:e.palette.text.primary,fontFamily:"Inter, Helvetica, Arial, sans-serif",fontSize:"0.875rem",fontWeight:600,textTransform:"uppercase",letterSpacing:"0.4px",padding:"6px 16px",cursor:"pointer",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),"&:hover":{background:e.palette.action.hover},"&:focus-visible":{outline:`2px solid ${e.palette.text.primary}`,outlineOffset:2}})),wu=ee("img")(({theme:e})=>({width:420,height:"100%",objectFit:"cover",objectPosition:"center",flexShrink:0,borderRadius:`0 ${e.spacing(2)} ${e.spacing(2)} 0`,[e.breakpoints.down("lg")]:{width:320},[e.breakpoints.down("md")]:{width:"100%",height:200,borderRadius:`0 0 ${e.spacing(2)} ${e.spacing(2)}`}})),{useCallback:Vr}=await M("react"),{useNavigate:Cu}=await M("react-router-dom"),{useTranslation:_u}=await M("@dcl/hooks"),Su="https://docs.decentraland.org/creator/events/";function xu(){const{t:e}=_u(),t=Cu(),n=Vr(()=>{t("/create")},[t]),r=Vr(()=>{window.open(Su,"_blank","noopener")},[]);return d.jsxs(fu,{"aria-label":e("host_banner.title"),children:[d.jsx(hu,{src:su,alt:"","aria-hidden":"true"}),d.jsxs(pu,{children:[d.jsx(gu,{children:e("host_banner.title")}),d.jsx(mu,{children:e("host_banner.subtitle")}),d.jsxs("div",{children:[d.jsxs(Wt,{children:[d.jsx(Ht,{}),d.jsx(zt,{children:e("host_banner.check_1")})]}),d.jsxs(Wt,{children:[d.jsx(Ht,{}),d.jsx(zt,{children:e("host_banner.check_2")})]}),d.jsxs(Wt,{children:[d.jsx(Ht,{}),d.jsx(zt,{children:e("host_banner.check_3")})]})]}),d.jsxs(yu,{children:[d.jsxs(vu,{onClick:n,children:[d.jsx(Co,{sx:{fontSize:18}}),e("host_banner.create_event")]}),d.jsx(bu,{onClick:r,children:e("host_banner.learn_more")})]})]}),d.jsx(wu,{src:cu,alt:"","aria-hidden":"true"})]})}const{useCallback:Kr,useState:Au}=await M("react");function Li(e){const t=Mn(e.x,e.y),[n,r]=Au(!1),o=Kr(a=>{a.stopPropagation(),navigator.clipboard?.writeText(t)?.then(()=>{r(!0),setTimeout(()=>r(!1),2e3)}).catch(l=>console.warn("[useCardActions] Failed to copy:",l))},[t]),i=Kr(a=>{a.stopPropagation();const l=jn({name:e.name,description:e.description,startAt:e.startAt,finishAt:e.finishAt,x:e.x,y:e.y,url:t});l&&window.open(l,"_blank","noopener,noreferrer")},[e.name,e.description,e.startAt,e.finishAt,e.x,e.y,t]);return{eventUrl:t,copied:n,handleCopy:o,handleAddToCalendar:i}}function Ni(e,t){const n=Date.now(),o=new Date(e).getTime()-n;if(o<=0)return Yr(e);const i=Math.round(o/6e4);if(i<60)return t("upcoming.starts_in_mins",{count:i});const a=Math.round(i/60);return a<24?t("upcoming.starts_in_hours",{count:a}):Yr(e)}function Yr(e){return new Date(e).toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit",hour12:!0})}var Bn={},Eu=he;Object.defineProperty(Bn,"__esModule",{value:!0});var $i=Bn.default=void 0,Iu=Eu(fe()),Jr=d;$i=Bn.default=(0,Iu.default)([(0,Jr.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"},"0"),(0,Jr.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"AccessTime");const{Box:At,Typography:Ui,dclColors:Y,styled:J}=await M("decentraland-ui2"),qi="#D9D8DB",ku="#00B453",ht=J("button")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:Y.neutral.gray5,border:"none",borderRadius:8,padding:6,flexShrink:0,color:Y.neutral.softBlack1,cursor:"pointer",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),"&:hover":{backgroundColor:qi},"&:disabled":{opacity:.5,cursor:"default"},"&:focus-visible":{outline:`2px solid ${Y.neutral.softWhite}`,outlineOffset:2}})),pt=J("button")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",gap:4,backgroundColor:Y.neutral.gray5,border:"none",borderRadius:8,padding:6,minWidth:30,flexShrink:1,color:Y.neutral.softBlack1,cursor:"pointer",overflow:"hidden",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),"&:hover":{backgroundColor:qi},"&:focus-visible":{outline:`2px solid ${Y.neutral.softWhite}`,outlineOffset:2}})),gt=J("span")({fontSize:12,fontWeight:600,textTransform:"uppercase",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",minWidth:0}),Fi=J($n)({fontSize:18,color:Y.neutral.softBlack1}),mt=J(Ln)({fontSize:18,color:Y.neutral.softBlack1}),Qi=J(li)({fontSize:18,color:Y.neutral.softBlack1}),Bi=J("img")({width:19,height:19,borderRadius:"50%",border:`1.4px solid ${Y.whiteTransparent.blurry}`,flexShrink:0,objectFit:"cover"}),Wi=J(At)({width:19,height:19,borderRadius:"50%",backgroundColor:ku,border:`1.4px solid ${Y.whiteTransparent.blurry}`,flexShrink:0}),Hi=J(Ui)({fontSize:12,lineHeight:1,color:Y.neutral.softWhite,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}),zi=J("span")({color:Y.base.primary}),Gi=J(At)({display:"flex",alignItems:"center",gap:8}),Vi=J(At)({display:"flex",alignItems:"center",gap:8,backgroundColor:Y.whiteTransparent.subtle,borderRadius:6,padding:"2px 8px 2px 4px",height:24,width:"fit-content",maxWidth:"100%",transition:"opacity 0.2s ease"}),Ki=J($i)({fontSize:20,color:Y.neutral.softWhite}),Yi=J(Ui)({fontSize:16,fontWeight:600,lineHeight:1.5,color:Y.neutral.softWhite,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}),Ji=J(At)({position:"absolute",bottom:0,left:0,right:0,padding:12,display:"flex",alignItems:"center",justifyContent:"flex-start",gap:4,opacity:0,transform:"translateY(8px)",transition:"opacity 0.2s ease, transform 0.2s ease",flexWrap:"nowrap"}),Xi="0px 2px 12px 12px rgba(255, 255, 255, 0.3)",{Box:Et,Typography:Tu,dclColors:Wn,styled:Me}=await M("decentraland-ui2"),Ru=Me(Et)({borderRadius:12,overflow:"hidden",cursor:"pointer",position:"relative",width:"100%",minWidth:0,"&:hover":{boxShadow:Xi},'&:hover [data-role="hover-actions"]':{opacity:1,transform:"translateY(0)"},'&:hover [data-role="time-pill"], &:hover [data-role="creator-row"]':{opacity:0},'&:focus-within [data-role="hover-actions"]':{opacity:1,transform:"translateY(0)"},'&:focus-within [data-role="time-pill"], &:focus-within [data-role="creator-row"]':{opacity:0}}),Pu=Me(Et)({width:"100%",aspectRatio:"16 / 9",overflow:"hidden",flexShrink:0}),Mu=Me("img")({width:"100%",height:"100%",objectFit:"cover",display:"block",pointerEvents:"none",userSelect:"none"}),ju=Me(Et)({display:"flex",flexDirection:"column",gap:4,padding:12,position:"relative",backgroundColor:Wn.blackTransparent.blurry}),Du=Me(Tu)({fontWeight:600,fontSize:16,lineHeight:1.5,color:Wn.neutral.softWhite,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}),Ou=Me(Et)({width:"100%",minWidth:0,overflow:"hidden","& .MuiCard-root":{maxWidth:"100%",minWidth:0,width:"100%",maxHeight:"none",containerType:"inline-size",overflow:"hidden",animation:"none"},"& .MuiCardContent-root":{backgroundColor:Wn.blackTransparent.backdrop},"& .MuiCardMedia-root":{height:"min(62.5cqw, 200px)",pointerEvents:"none",userSelect:"none"},"& .MuiCardActionArea-root":{transition:"none",transform:"none"},"&& .MuiCardActionArea-root:hover":{transform:"none",boxShadow:"none"},"&& .MuiCard-root:hover":{boxShadow:"none"},"&& .MuiCardActionArea-root:hover .MuiCardMedia-root":{height:"min(62.5cqw, 200px)",transform:"none"},"& .MuiCardContent-root .MuiBox-root .MuiBox-root:has(.MuiAvatar-root)":{display:"none"},"& .MuiCardContent-root .MuiTypography-h6":{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",WebkitLineClamp:"unset",WebkitBoxOrient:"unset"}}),{memo:Lu,useCallback:Nu}=await M("react"),{useTranslation:$u}=await M("@dcl/hooks"),{Tooltip:Gt}=await M("decentraland-ui2"),Zi=Lu(({event:e,onClick:t})=>{const{t:n}=$u(),{hasValidIdentity:r}=Tn(),{data:o}=Pe(e.user,{skip:!e.user}),i=o?.avatars?.[0],a=i?.avatar?.snapshots?.face256,l=i?.name||e.user_name||n("all_experiences.coming_soon"),{copied:c,handleCopy:s,handleAddToCalendar:m}=Li({name:e.name,description:e.description,startAt:e.start_at,finishAt:e.finish_at,x:e.x,y:e.y}),y=Nu(()=>{t(e)},[t,e]);return d.jsxs(Ru,{onClick:y,children:[e.image&&d.jsx(Pu,{children:d.jsx(Mu,{src:e.image,alt:e.name,loading:"lazy"})}),d.jsxs(ju,{children:[d.jsx(Du,{children:e.name}),d.jsxs(Gi,{"data-role":"creator-row",children:[a?d.jsx(Bi,{src:a,alt:l}):d.jsx(Wi,{}),d.jsxs(Hi,{children:[n("upcoming.by_prefix"),d.jsx(zi,{children:l})]})]}),d.jsxs(Vi,{"data-role":"time-pill",children:[d.jsx(Ki,{}),d.jsx(Yi,{children:Ni(e.start_at,n)})]}),d.jsxs(Ji,{"data-role":"hover-actions",children:[r?d.jsx(Gt,{title:n("all_experiences.coming_soon"),placement:"top",arrow:!0,children:d.jsx("span",{children:d.jsxs(pt,{disabled:!0,onClick:p=>p.stopPropagation(),children:[d.jsx(Fi,{}),d.jsx(gt,{children:n("all_experiences.remind_me")})]})})}):d.jsxs(pt,{onClick:m,children:[d.jsx(mt,{}),d.jsx(gt,{children:n("all_experiences.add_to_calendar")})]}),r&&d.jsx(Gt,{title:n("all_experiences.add_to_calendar"),placement:"top",arrow:!0,children:d.jsx(ht,{onClick:m,children:d.jsx(mt,{})})}),d.jsx(Gt,{title:n(c?"all_experiences.copied":"all_experiences.copy_link"),placement:"top",arrow:!0,children:d.jsx(ht,{onClick:s,children:d.jsx(Qi,{})})})]})]})]})});Zi.displayName="FutureCard";const{memo:Uu,useCallback:qu}=await M("react"),{BadgeGroup:Fu,EventCard:Qu,LiveBadge:Bu,UserCountBadge:Wu}=await M("decentraland-ui2"),eo=Uu(({event:e,onClick:t})=>{const{data:n}=Pe(e.user,{skip:!e.user}),r=n?.avatars?.[0],o=qu(()=>{t(e)},[t,e]),i=r?.avatar?r:void 0;return d.jsx(Ou,{children:d.jsx(Qu,{image:e.image??"",sceneName:e.name,coordinates:`${e.x},${e.y}`,avatar:i,onClick:o,leftBadge:d.jsxs(Fu,{children:[d.jsx(Bu,{}),d.jsx(Wu,{count:e.total_attendees})]}),leftBadgeTransparent:!0,hideLocation:!0})})});eo.displayName="LiveCard";const{memo:Hu}=await M("react"),to=Hu(({event:e,onClick:t})=>e.live?d.jsx(eo,{event:e,onClick:t}):d.jsx(Zi,{event:e,onClick:t}));to.displayName="AllExperiencesCard";var Hn={},zu=he;Object.defineProperty(Hn,"__esModule",{value:!0});var zn=Hn.default=void 0,Gu=zu(fe()),Vu=d;zn=Hn.default=(0,Gu.default)((0,Vu.jsx)("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft");var Gn={},Ku=he;Object.defineProperty(Gn,"__esModule",{value:!0});var Vn=Gn.default=void 0,Yu=Ku(fe()),Ju=d;Vn=Gn.default=(0,Yu.default)((0,Ju.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight");const{Box:Xu,Typography:Zu,dclColors:yt,styled:Kn}=await M("decentraland-ui2"),ed=50,td=12,Xr=20,nd=32,rd=Kn(Xu)({display:"flex",alignItems:"center",height:ed,marginBottom:td,position:"relative",backgroundColor:yt.blackTransparent.backdrop,borderRadius:12,padding:`0 ${nd}px`}),id=Kn(Zu,{shouldForwardProp:e=>e!=="isToday"})(({isToday:e})=>({flex:1,textAlign:"center",fontWeight:600,fontSize:16,lineHeight:"100%",letterSpacing:0,color:e?yt.neutral.softWhite:"rgba(255, 255, 255, 0.7)"})),Zr=Kn("button")(({disabled:e,side:t})=>({display:"flex",alignItems:"center",justifyContent:"center",background:"none",border:"none",padding:0,cursor:e?"default":"pointer",color:e?"rgba(255, 255, 255, 0.3)":yt.neutral.softWhite,height:Xr,width:Xr,position:"absolute",top:"50%",transform:"translateY(-50%)",[t]:8,zIndex:1,"&:focus-visible":{outline:`2px solid ${yt.neutral.softWhite}`,outlineOffset:2}})),{memo:od,useMemo:ad}=await M("react"),{useTranslation:sd}=await M("@dcl/hooks"),no=od(({startOffset:e,columnCount:t,today:n,onNavigateLeft:r,onNavigateRight:o})=>{const{t:i}=sd(),a=e>0,l=ad(()=>Array.from({length:t},(c,s)=>Rn(n,e+s)),[n,e,t]);return d.jsxs(rd,{role:"navigation","aria-label":i("all_experiences.title"),children:[d.jsx(Zr,{side:"left",onClick:r,disabled:!a,"aria-label":i("all_experiences.navigate_previous"),"aria-disabled":!a,tabIndex:a?0:-1,children:d.jsx(zn,{sx:{fontSize:20}})}),l.map((c,s)=>d.jsx(id,{variant:"h6",isToday:e+s===0,"aria-label":Pi(c),"aria-current":e+s===0?"date":void 0,children:ul(c,i,n)},c.toISOString())),d.jsx(Zr,{side:"right",onClick:o,"aria-label":i("all_experiences.navigate_next"),children:d.jsx(Vn,{sx:{fontSize:20}})})]})});no.displayName="DateNavigation";const{Box:It,dclColors:ro,styled:kt}=await M("decentraland-ui2"),cd=24,ld="calc(100vh - 280px)",ud=8,dd=8,fd=80,io=12,hd=200,pd=kt(It)(({theme:e})=>({borderRadius:cd,backgroundColor:"rgba(179, 32, 255, 0.25)",border:`2px solid ${ro.whiteTransparent.subtle}`,display:"flex",flexDirection:"column",height:ld,overflow:"hidden",[e.breakpoints.down("sm")]:{height:"auto"}})),gd=kt(It)({flex:1,overflowY:"auto",display:"flex",flexDirection:"column",gap:ud,padding:dd,scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),md=kt(It)({flex:1,minHeight:fd,backgroundColor:ro.whiteTransparent.subtle,borderRadius:io}),Vt=kt(It)({height:hd,borderRadius:io,backgroundColor:"rgba(255, 255, 255, 0.08)",animation:"pulse 1.5s ease-in-out infinite","@keyframes pulse":{"0%, 100%":{opacity:.4},"50%":{opacity:.15}}}),{memo:yd,useCallback:Kt,useRef:ei}=await M("react"),oo=yd(({events:e,isLoading:t,dateLabel:n,renderCard:r})=>{const o=ei(null),i=ei({isDown:!1,startY:0,scrollTop:0}),a=Kt(s=>{const m=o.current;m&&(i.current={isDown:!0,startY:s.clientY,scrollTop:m.scrollTop})},[]),l=Kt(s=>{if(!i.current.isDown)return;const m=o.current;if(!m)return;s.preventDefault();const y=s.clientY-i.current.startY;m.scrollTop=i.current.scrollTop-y},[]),c=Kt(()=>{i.current.isDown=!1},[]);return d.jsx(pd,{role:"list","aria-label":n,children:d.jsxs(gd,{ref:o,onMouseDown:a,onMouseMove:l,onMouseUp:c,onMouseLeave:c,children:[t&&d.jsxs(d.Fragment,{children:[d.jsx(Vt,{role:"listitem","aria-hidden":"true"}),d.jsx(Vt,{role:"listitem","aria-hidden":"true"}),d.jsx(Vt,{role:"listitem","aria-hidden":"true"})]}),!t&&e.map(s=>d.jsx("div",{role:"listitem",children:r(s)},s.id)),d.jsx(md,{"aria-hidden":"true"})]})})});oo.displayName="DayColumn";const{Box:vd,Typography:bd,styled:Yn}=await M("decentraland-ui2"),wd=28,Cd=16,_d="0.4s",Sd="0.15s",xd=Yn("section")(({theme:e})=>({position:"relative",zIndex:8,marginTop:e.spacing(4),animation:`slideUp ${_d} ease-out ${Sd}`,"@keyframes slideUp":{from:{transform:"translateY(20px)"},to:{transform:"translateY(0)"}},marginLeft:e.spacing(-8),marginRight:e.spacing(-8),padding:e.spacing(8,8),background:"radial-gradient(63.39% 112.69% at 49.33% 50.11%, #6B2A8A 0%, #1E0A2E 100%)",[e.breakpoints.down("lg")]:{marginLeft:e.spacing(-4),marginRight:e.spacing(-4),padding:e.spacing(8,4)},[e.breakpoints.down("md")]:{marginLeft:e.spacing(-3),marginRight:e.spacing(-3),padding:e.spacing(6,3)},[e.breakpoints.down("sm")]:{marginLeft:e.spacing(-2),marginRight:e.spacing(-2),padding:e.spacing(4,2)}})),Ad=Yn(bd)({fontWeight:500,fontSize:32,lineHeight:1.235,marginBottom:wd}),Ed=Yn(vd)({display:"grid",gap:Cd}),{useCallback:$e,useEffect:Id,useMemo:rt,useState:Yt}=await M("react"),{useTranslation:kd}=await M("@dcl/hooks");function Td(e,t,n){const r=rt(()=>Array.from({length:n},(s,m)=>Rn(e,t+m)),[e,t,n]),o=rt(()=>Wr(r[0]),[r]),i=rt(()=>Wr(r[r.length-1]),[r]),{data:a=[],isLoading:l,isError:c}=Cc({list:"active",from:o.from,to:i.to,order:"asc",world:!1,limit:200});return rt(()=>r.map(s=>({date:s,events:a.filter(m=>dn(new Date(m.start_at),s)),isLoading:l,isError:c})),[r,a,l,c])}function Rd(){const{t:e}=kd(),t=sl(),[n,r]=Yt(0),[o,i]=Yt(null),[a,l]=Yt(()=>{const I=new Date;return I.setHours(0,0,0,0),I});Id(()=>{const I=()=>{const S=new Date;S.setHours(0,0,0,0),S.getTime()!==a.getTime()&&(l(S),r(0))};return document.addEventListener("visibilitychange",I),()=>document.removeEventListener("visibilitychange",I)},[a]);const c=Td(a,n,t),s=$e(()=>{r(I=>Math.max(0,I-t))},[t]),m=$e(()=>{r(I=>I+t)},[t]),y=$e(I=>{i(Di(I))},[]),p=$e(()=>{i(null)},[]),b=$e(I=>d.jsx(to,{event:I,onClick:y}),[y]);return d.jsxs(xd,{"aria-label":e("all_experiences.title"),children:[d.jsx(Ad,{variant:"h4",children:e("all_experiences.title")}),d.jsx(no,{startOffset:n,columnCount:t,today:a,onNavigateLeft:s,onNavigateRight:m}),d.jsx(Ed,{sx:{gridTemplateColumns:`repeat(${t}, 1fr)`},children:c.map(({date:I,events:S,isLoading:x})=>d.jsx(oo,{events:S,isLoading:x,dateLabel:Pi(I),renderCard:b},I.toISOString()))}),d.jsx(xu,{}),d.jsx(Un,{open:!!o,onClose:p,data:o})]})}const{Box:Pd,styled:ao}=await M("decentraland-ui2"),so=ao(Pd)(({theme:e})=>({display:"flex",justifyContent:"center",gap:e.spacing(.75),marginTop:e.spacing(2)})),co=ao("button")(({theme:e,active:t})=>({width:8,height:8,borderRadius:"50%",border:"none",padding:0,cursor:"pointer",backgroundColor:t?e.palette.common.white:"rgba(255, 255, 255, 0.3)",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short})})),{memo:Md,useCallback:jd}=await M("react"),{BadgeGroup:Dd,EventCard:Od,LiveBadge:Ld,UserCountBadge:Nd}=await M("decentraland-ui2"),$d=`${window.location.origin}/dcl-logo.svg`.replace(/^http:\/\//,"https://"),lo=Md(({card:e,onClick:t})=>{const n=e.title.toLowerCase().includes("genesis plaza"),{data:r}=Pe(e.creatorAddress,{skip:!e.creatorAddress}),o=r?.avatars?.[0],i=jd(()=>{t(e)},[t,e]);let a;return n?a={name:e.creatorName??"Decentraland Foundation",ethAddress:"",avatar:{snapshots:{face256:$d,body:""}}}:o?a={name:o.name??"",ethAddress:o.ethAddress??"",avatar:o.avatar}:e.creatorName&&(a={name:e.creatorName,ethAddress:""}),d.jsx(Od,{image:e.image,sceneName:e.title,coordinates:e.coordinates,avatar:a,onClick:i,leftBadge:d.jsxs(Dd,{children:[e.type==="event"&&d.jsx(Ld,{}),d.jsx(Nd,{count:e.users})]}),leftBadgeTransparent:!0,hideLocation:!0})});lo.displayName="LiveNowCardItem";const{Box:Jn,IconButton:Ud,Typography:qd,styled:we}=await M("decentraland-ui2"),Fd=we("section")(({theme:e})=>({position:"relative",zIndex:10,marginTop:e.spacing(4),padding:e.spacing(4,3),background:"radial-gradient(63.39% 112.69% at 49.33% 50.11%, #A042CD 0%, #32134C 100%)",borderRadius:e.spacing(2),boxShadow:"0px 4px 25px 0px rgba(255, 255, 255, 0.25)",[e.breakpoints.down("sm")]:{padding:e.spacing(3,2)}})),Qd=we(Jn)({display:"flex",alignItems:"center",gap:8,marginBottom:24}),Bd=we(qd)({fontWeight:600}),ti=62,ni=60,Wd=we(Jn)({position:"relative"}),ri=we(Ud)(({theme:e,side:t})=>({position:"absolute",top:"50%",transform:"translateY(-50%)",[t]:e.spacing(1),zIndex:2,backgroundColor:"rgba(0, 0, 0, 0.5)",color:e.palette.common.white,"&:hover":{backgroundColor:"rgba(0, 0, 0, 0.7)"},[e.breakpoints.down("sm")]:{display:"none"}})),Hd=we(Jn)(({theme:e,fadeLeft:t,fadeRight:n})=>{const r=[];return t&&r.push(`linear-gradient(to right, transparent, black ${ni}px)`),n&&r.push(`linear-gradient(to left, transparent, black ${ni}px)`),{display:"flex",gap:e.spacing(2),justifyContent:"safe center",alignItems:"stretch",overflowX:"auto",scrollSnapType:"x mandatory",scrollBehavior:"smooth",scrollbarWidth:"none",...r.length>0&&{maskImage:r.join(", "),WebkitMaskImage:r.join(", ")},...r.length>1&&{maskComposite:"intersect",WebkitMaskComposite:"source-in"},"&::-webkit-scrollbar":{display:"none"},"& .MuiCard-root":{minWidth:280,maxWidth:850,flex:"1 1 0",containerType:"inline-size",scrollSnapAlign:"start",overflow:"hidden"},"& .MuiCardActionArea-root":{height:"100%"},"&& .MuiCardMedia-root":{height:"min(62.5cqw, 297px)"},"&& .MuiCardActionArea-root:hover .MuiCardMedia-root":{height:"min(62.5cqw, 297px)"},"&& .MuiCardActionArea-root:hover .MuiCardContent-root > div:first-of-type > div:last-child":{marginBottom:0},"& .MuiCardContent-root .MuiTypography-h6":{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",WebkitLineClamp:"unset",WebkitBoxOrient:"unset"},"& .MuiCardContent-root .MuiBox-root .MuiBox-root:has(.MuiAvatar-root)":{maxWidth:"100%"},[e.breakpoints.down("sm")]:{maskImage:"none",WebkitMaskImage:"none","& .MuiCard-root":{minWidth:"unset",maxWidth:"unset",maxHeight:"none",flex:"0 0 100%"},"&& .MuiCardMedia-root":{height:`calc(62.5cqw - ${ti}px)`},"&& .MuiCardActionArea-root:hover .MuiCardMedia-root":{height:`calc(62.5cqw - ${ti}px)`},"&& .MuiCardActionArea-root:hover .MuiCardContent-root > div:first-of-type > div:last-child":{marginBottom:0},"&& .MuiCardContent-root > .MuiBox-root:last-child":{display:"flex",opacity:1,transform:"translateY(0)"}}}}),zd=we(_o)({color:"#E00000"}),{useCallback:se,useEffect:Gd,useMemo:Vd,useRef:ii,useState:Ee}=await M("react"),{useTranslation:Kd}=await M("@dcl/hooks"),oi=300;function Yd(){const{t:e}=Kd(),t=Vd(()=>{const f=new URLSearchParams(window.location.search).get("minUsers");if(f!==null&&!Number.isNaN(Number(f)))return{minUsers:Number(f)}},[]),{data:n=[]}=Ii(t,{pollingInterval:6e4}),[r,o]=Ee(0),[i,a]=Ee(!1),[l,c]=Ee(!1),[s,m]=Ee(1),[y,p]=Ee(!1),[b,I]=Ee(null),S=ii(null),x=ii({isDown:!1,startX:0,scrollLeft:0}),E=se(()=>{const h=S.current;if(!h)return;const f=h.scrollWidth>h.clientWidth,v=f?Math.ceil(h.scrollWidth/h.clientWidth):1;a(h.scrollLeft>0),c(f&&h.scrollLeft+h.clientWidth<h.scrollWidth-1),m(v);const C=h.scrollWidth-h.clientWidth;if(C<=0)o(0);else{const k=h.scrollLeft/C;o(Math.round(k*(v-1)))}},[]);Gd(()=>{const h=S.current;if(!h)return;E();const f=new ResizeObserver(E);return f.observe(h),()=>f.disconnect()},[n.length,E]);const _=se(h=>{const f=S.current;if(!f)return;const v=h==="left"?-oi:oi;f.scrollBy({left:v,behavior:"smooth"})},[]),g=se(h=>{const f=S.current;f&&(x.current={isDown:!0,startX:h.pageX-f.offsetLeft,scrollLeft:f.scrollLeft},p(!1))},[]),u=se(h=>{if(!x.current.isDown)return;const f=S.current;if(!f)return;h.preventDefault();const C=h.pageX-f.offsetLeft-x.current.startX;Math.abs(C)>5&&p(!0),f.scrollLeft=x.current.scrollLeft-C},[]),w=se(()=>{x.current.isDown=!1},[]),R=se(h=>{y&&h.stopPropagation()},[y]),T=se(h=>{const f=S.current;if(!f)return;const v=f.scrollWidth-f.clientWidth,C=s<=1?0:v*h/(s-1);f.scrollTo({left:C,behavior:"smooth"})},[s]),P=se(h=>{I(au(h))},[]),A=se(()=>{I(null)},[]);return n.length===0?null:d.jsxs(Fd,{children:[d.jsxs(Qd,{children:[d.jsx(zd,{}),d.jsx(Bd,{variant:"h5",children:e("live_now.title")})]}),d.jsxs(Wd,{children:[i&&d.jsx(ri,{side:"left",onClick:()=>_("left"),children:d.jsx(zn,{})}),l&&d.jsx(ri,{side:"right",onClick:()=>_("right"),children:d.jsx(Vn,{})}),d.jsx(Hd,{ref:S,onScroll:E,fadeLeft:i,fadeRight:l,onMouseDown:g,onMouseMove:u,onMouseUp:w,onMouseLeave:w,onClickCapture:R,sx:{cursor:y?"grabbing":"grab"},children:n.map(h=>d.jsx(lo,{card:h,onClick:P},h.id))})]}),s>1&&d.jsx(so,{children:Array.from({length:s},(h,f)=>d.jsx(co,{active:f===r,onClick:()=>T(f),"aria-label":e("pagination.go_to_page",{page:f+1})},f))}),d.jsx(Un,{open:!!b,onClose:A,data:b})]})}const{Box:Tt,Typography:Jd,dclColors:uo,styled:je}=await M("decentraland-ui2"),Xd=je(Tt)(({theme:e})=>({display:"flex",flexDirection:"row",borderRadius:16,overflow:"hidden",cursor:"pointer",height:140,minWidth:300,backgroundColor:uo.blackTransparent.blurry,transition:"transform 0.2s ease, box-shadow 0.2s ease","&:hover":{transform:"translateY(-4px)",boxShadow:Xi},'&:hover [data-role="hover-actions"]':{opacity:1,transform:"translateY(0)"},'&:hover [data-role="time-pill"]':{opacity:0},[e.breakpoints.down("md")]:{'& [data-role="hover-actions"]':{display:"none"}}})),Zd=je(Tt)({width:180,height:140,flexShrink:0,overflow:"hidden"}),ef=je("img")({width:"100%",height:"100%",objectFit:"cover",display:"block"}),tf=je(Tt)({display:"flex",flexDirection:"column",justifyContent:"space-between",flex:1,minWidth:0,padding:12,position:"relative"}),nf=je(Tt)({display:"flex",flexDirection:"column",gap:4,overflow:"hidden"}),rf=je(Jd)({fontWeight:600,fontSize:16,lineHeight:1.5,color:uo.neutral.softWhite,overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical"}),{useCallback:of}=await M("react"),{useTranslation:af}=await M("@dcl/hooks"),{Tooltip:Jt}=await M("decentraland-ui2");function fn({event:e,onClick:t}){const{t:n}=af(),{hasValidIdentity:r}=Tn(),{data:o}=Pe(e.user,{skip:!e.user}),i=o?.avatars?.[0],a=i?.avatar?.snapshots?.face256,l=i?.name||e.user_name||n("upcoming.unknown_creator"),{copied:c,handleCopy:s,handleAddToCalendar:m}=Li({name:e.name,description:e.description,startAt:e.start_at,finishAt:e.finish_at,x:e.x,y:e.y}),y=of(()=>{t(e)},[t,e]);return d.jsxs(Xd,{onClick:y,children:[e.image&&d.jsx(Zd,{children:d.jsx(ef,{src:e.image,alt:e.name,loading:"lazy"})}),d.jsxs(tf,{children:[d.jsxs(nf,{children:[d.jsx(rf,{children:e.name}),d.jsxs(Gi,{children:[a?d.jsx(Bi,{src:a,alt:l}):d.jsx(Wi,{}),d.jsxs(Hi,{children:[n("upcoming.by_prefix"),d.jsx(zi,{children:l})]})]})]}),d.jsxs(Vi,{"data-role":"time-pill",children:[d.jsx(Ki,{}),d.jsx(Yi,{children:Ni(e.start_at,n)})]}),d.jsxs(Ji,{"data-role":"hover-actions",children:[r?d.jsx(Jt,{title:n("event_detail.coming_soon"),placement:"top",arrow:!0,children:d.jsx("span",{children:d.jsxs(pt,{disabled:!0,onClick:p=>p.stopPropagation(),children:[d.jsx(Fi,{}),d.jsx(gt,{children:n("event_detail.remind_me")})]})})}):d.jsxs(pt,{onClick:m,children:[d.jsx(mt,{}),d.jsx(gt,{children:n("upcoming.add_to_calendar")})]}),r&&d.jsx(Jt,{title:n("upcoming.add_to_calendar"),placement:"top",arrow:!0,children:d.jsx(ht,{onClick:m,children:d.jsx(mt,{})})}),d.jsx(Jt,{title:n(c?"upcoming.copied":"upcoming.copy_link"),placement:"top",arrow:!0,children:d.jsx(ht,{onClick:s,children:d.jsx(Qi,{})})})]})]})]})}fn.displayName="UpcomingCard";const{Box:Xn,Typography:sf,styled:Ge}=await M("decentraland-ui2"),cf="0.4s",lf=Ge("section")(({theme:e})=>({position:"relative",zIndex:9,marginTop:e.spacing(4),animation:`slideUp ${cf} ease-out`,"@keyframes slideUp":{from:{transform:"translateY(20px)"},to:{transform:"translateY(0)"}},marginLeft:e.spacing(-8),marginRight:e.spacing(-8),padding:e.spacing(4,8),[e.breakpoints.down("lg")]:{marginLeft:e.spacing(-4),marginRight:e.spacing(-4),padding:e.spacing(4,4)},[e.breakpoints.down("md")]:{marginLeft:e.spacing(-3),marginRight:e.spacing(-3),padding:e.spacing(4,3)},[e.breakpoints.down("sm")]:{marginLeft:e.spacing(-2),marginRight:e.spacing(-2),padding:e.spacing(3,2)}})),uf=Ge(sf)(({theme:e})=>({fontWeight:500,fontSize:32,lineHeight:1.235,marginBottom:32,[e.breakpoints.down("md")]:{textAlign:"center"}})),df=Ge(Xn)(({theme:e})=>({display:"none",[e.breakpoints.down("md")]:{display:"flex",flexDirection:"column",gap:16}})),ff=Ge(Xn)({display:"flex",flexDirection:"column",gap:16,touchAction:"pan-y"}),hf=Ge(Xn)(({theme:e})=>({display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(300px, 1fr))",gap:24,[e.breakpoints.down("md")]:{display:"none"}})),{useCallback:Ue,useEffect:pf,useMemo:ai,useRef:gf,useState:si}=await M("react"),{useTranslation:mf}=await M("@dcl/hooks"),it=2,yf=50;function vf(){const{t:e}=mf(),{data:t=[]}=_c(),[n,r]=si(0),[o,i]=si(null),a=gf(0),l=ai(()=>Math.ceil(t.length/it),[t.length]);pf(()=>{n>=l&&r(Math.max(0,l-1))},[n,l]);const c=ai(()=>t.slice(n*it,n*it+it),[t,n]),s=Ue(I=>{r(I)},[]),m=Ue(I=>{a.current=I.touches[0].clientX},[]),y=Ue(I=>{const S=a.current-I.changedTouches[0].clientX;Math.abs(S)<yf||(S>0&&n<l-1?r(x=>x+1):S<0&&n>0&&r(x=>x-1))},[n,l]),p=Ue(I=>{i(Di(I))},[]),b=Ue(()=>{i(null)},[]);return t.length===0?null:d.jsxs(lf,{children:[d.jsx(uf,{variant:"h5",children:e("upcoming.title")}),d.jsx(hf,{children:t.map(I=>d.jsx(fn,{event:I,onClick:p},I.id))}),d.jsxs(df,{children:[d.jsx(ff,{onTouchStart:m,onTouchEnd:y,children:c.map(I=>d.jsx(fn,{event:I,onClick:p},I.id))}),l>1&&d.jsx(so,{children:Array.from({length:l},(I,S)=>d.jsx(co,{active:S===n,onClick:()=>s(S),"aria-label":e("pagination.go_to_page",{page:S+1})},S))})]}),d.jsx(Un,{open:!!o,onClose:b,data:o})]})}const bf="https://cdn.decentraland.org/@dcl/explore-site/0.0.1-24353156203.commit-157a41c/assets/top_background-Bnd2vX_F.webp",{Box:fo,styled:ho}=await M("decentraland-ui2"),wf=ho(fo)(({standalone:e,theme:t})=>({position:"relative",background:`url(${bf}) no-repeat top center, radial-gradient(61.64% 109.58% at 50% 54.49%, #A042CD 0%, #270537 100%)`,backgroundSize:"100% 700px, 100% auto","&::before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,background:"linear-gradient(to bottom, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%)",pointerEvents:"none"},overflow:"hidden",minHeight:"100vh",padding:t.spacing(5,8,0,8),[t.breakpoints.down("lg")]:{padding:t.spacing(5,4,0,4)},[t.breakpoints.down("md")]:{padding:t.spacing(5,3,0,3)},[t.breakpoints.down("sm")]:{padding:t.spacing(3,2,0,2)},...!e&&{paddingTop:0}})),Cf=ho(fo)(({standalone:e,theme:t})=>({position:"relative",zIndex:1,display:"flex",flexDirection:"column",gap:t.spacing(4),paddingTop:e?"66px":"96px"}));function Uf({standalone:e=!0}){const{isLoading:t}=Ii(),n=d.jsxs(wf,{component:"main",standalone:e,children:[d.jsx(Cf,{standalone:e,children:d.jsx(Yd,{})}),!t&&d.jsx(vf,{}),!t&&d.jsx(Rd,{})]});return e?d.jsx(rl,{children:n}):n}export{Uf as H,rl as P,Mf as W,jf as a,Pf as c,$f as e,le as g,Rf as m,$c as r,Ic as s,gi as u};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{importShared as Q}from"./__federation_fn_import-
|
|
1
|
+
import{importShared as Q}from"./__federation_fn_import-Ht3m1qpn.js";import{j as oe}from"./jsx-runtime-B1l0k91v.js";const ce="2.22.1",ue=()=>`@wagmi/core@${ce}`;var B=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},O,z;let C=class x extends Error{get docsBaseUrl(){return"https://wagmi.sh/core"}get version(){return ue()}constructor(t,r={}){super(),O.add(this),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiCoreError"});const n=r.cause instanceof x?r.cause.details:r.cause?.message?r.cause.message:r.details,a=r.cause instanceof x&&r.cause.docsPath||r.docsPath;this.message=[t||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...a?[`Docs: ${this.docsBaseUrl}${a}.html${r.docsSlug?`#${r.docsSlug}`:""}`]:[],...n?[`Details: ${n}`]:[],`Version: ${this.version}`].join(`
|
|
2
2
|
`),r.cause&&(this.cause=r.cause),this.details=n,this.docsPath=a,this.metaMessages=r.metaMessages,this.shortMessage=t}walk(t){return B(this,O,"m",z).call(this,this,t)}};O=new WeakSet,z=function e(t,r){return r?.(t)?t:t.cause?B(this,O,"m",e).call(this,t.cause,r):t};class he extends C{constructor(){super("Chain not configured."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotConfiguredError"})}}class $e extends C{constructor(){super("Connector already connected."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorAlreadyConnectedError"})}}class Ke extends C{constructor(){super("Connector not connected."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorNotConnectedError"})}}class _e extends C{constructor(){super("Connector not found."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorNotFoundError"})}}class We extends C{constructor({address:t,connector:r}){super(`Account "${t}" not found for connector "${r.name}".`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorAccountNotFoundError"})}}class Ge extends C{constructor({connectionChainId:t,connectorChainId:r}){super(`The current chain of the connector (id: ${r}) does not match the connection's chain (id: ${t}).`,{metaMessages:[`Current Chain ID: ${r}`,`Expected Chain ID: ${t}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorChainMismatchError"})}}class Qe extends C{constructor({connector:t}){super(`Connector "${t.name}" unavailable while reconnecting.`,{details:["During the reconnection step, the only connector methods guaranteed to be available are: `id`, `name`, `type`, `uid`.","All other methods are not guaranteed to be available until reconnection completes and connectors are fully restored.","This error commonly occurs for connectors that asynchronously inject after reconnection has already started."].join(" ")}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorUnavailableReconnectingError"})}}class F extends C{constructor(){super("Provider not found."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderNotFoundError"})}}class Be extends C{constructor({connector:t}){super(`"${t.name}" does not support programmatic chain switching.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainNotSupportedError"})}}function ze(e){return e}const{getAddress:E,numberToHex:L,ResourceUnavailableRpcError:A,SwitchChainError:N,UserRejectedRequestError:b,withRetry:le,withTimeout:de}=await Q("viem");H.type="injected";function H(e={}){const{shimDisconnect:t=!0,unstable_shimAsyncInject:r}=e;function n(){const c=e.target;if(typeof c=="function"){const i=c();if(i)return i}return typeof c=="object"?c:typeof c=="string"?{...fe[c]??{id:c,name:`${c[0].toUpperCase()}${c.slice(1)}`,provider:`is${c[0].toUpperCase()}${c.slice(1)}`}}:{id:"injected",name:"Injected",provider(i){return i?.ethereum}}}let a,o,l,s;return c=>({get icon(){return n().icon},get id(){return n().id},get name(){return n().name},get supportsSimulation(){return!0},type:H.type,async setup(){const i=await this.getProvider();i?.on&&e.target&&(l||(l=this.onConnect.bind(this),i.on("connect",l)),a||(a=this.onAccountsChanged.bind(this),i.on("accountsChanged",a)))},async connect({chainId:i,isReconnecting:h,withCapabilities:y}={}){const d=await this.getProvider();if(!d)throw new F;let m=[];if(h)m=await this.getAccounts().catch(()=>[]);else if(t)try{m=(await d.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]}))[0]?.caveats?.[0]?.value?.map(u=>E(u)),m.length>0&&(m=await this.getAccounts())}catch(f){const u=f;if(u.code===b.code)throw new b(u);if(u.code===A.code)throw u}try{!m?.length&&!h&&(m=(await d.request({method:"eth_requestAccounts"})).map(p=>E(p))),l&&(d.removeListener("connect",l),l=void 0),a||(a=this.onAccountsChanged.bind(this),d.on("accountsChanged",a)),o||(o=this.onChainChanged.bind(this),d.on("chainChanged",o)),s||(s=this.onDisconnect.bind(this),d.on("disconnect",s));let f=await this.getChainId();return i&&f!==i&&(f=(await this.switchChain({chainId:i}).catch(p=>{if(p.code===b.code)throw p;return{id:f}}))?.id??f),t&&await c.storage?.removeItem(`${this.id}.disconnected`),e.target||await c.storage?.setItem("injected.connected",!0),{accounts:y?m.map(u=>({address:u,capabilities:{}})):m,chainId:f}}catch(f){const u=f;throw u.code===b.code?new b(u):u.code===A.code?new A(u):u}},async disconnect(){const i=await this.getProvider();if(!i)throw new F;o&&(i.removeListener("chainChanged",o),o=void 0),s&&(i.removeListener("disconnect",s),s=void 0),l||(l=this.onConnect.bind(this),i.on("connect",l));try{await de(()=>i.request({method:"wallet_revokePermissions",params:[{eth_accounts:{}}]}),{timeout:100})}catch{}t&&await c.storage?.setItem(`${this.id}.disconnected`,!0),e.target||await c.storage?.removeItem("injected.connected")},async getAccounts(){const i=await this.getProvider();if(!i)throw new F;return(await i.request({method:"eth_accounts"})).map(y=>E(y))},async getChainId(){const i=await this.getProvider();if(!i)throw new F;const h=await i.request({method:"eth_chainId"});return Number(h)},async getProvider(){if(typeof window>"u")return;let i;const h=n();return typeof h.provider=="function"?i=h.provider(window):typeof h.provider=="string"?i=j(window,h.provider):i=h.provider,i&&!i.removeListener&&("off"in i&&typeof i.off=="function"?i.removeListener=i.off:i.removeListener=()=>{}),i},async isAuthorized(){try{if(t&&await c.storage?.getItem(`${this.id}.disconnected`)||!e.target&&!await c.storage?.getItem("injected.connected"))return!1;if(!await this.getProvider()){if(r!==void 0&&r!==!1){const d=async()=>(typeof window<"u"&&window.removeEventListener("ethereum#initialized",d),!!await this.getProvider()),m=typeof r=="number"?r:1e3;if(await Promise.race([...typeof window<"u"?[new Promise(u=>window.addEventListener("ethereum#initialized",()=>u(d()),{once:!0}))]:[],new Promise(u=>setTimeout(()=>u(d()),m))]))return!0}throw new F}return!!(await le(()=>this.getAccounts())).length}catch{return!1}},async switchChain({addEthereumChainParameter:i,chainId:h}){const y=await this.getProvider();if(!y)throw new F;const d=c.chains.find(f=>f.id===h);if(!d)throw new N(new he);const m=new Promise(f=>{const u=p=>{"chainId"in p&&p.chainId===h&&(c.emitter.off("change",u),f())};c.emitter.on("change",u)});try{return await Promise.all([y.request({method:"wallet_switchEthereumChain",params:[{chainId:L(h)}]}).then(async()=>{await this.getChainId()===h&&c.emitter.emit("change",{chainId:h})}),m]),d}catch(f){const u=f;if(u.code===4902||u?.data?.originalError?.code===4902)try{const{default:p,...v}=d.blockExplorers??{};let g;i?.blockExplorerUrls?g=i.blockExplorerUrls:p&&(g=[p.url,...Object.values(v).map(P=>P.url)]);let w;i?.rpcUrls?.length?w=i.rpcUrls:w=[d.rpcUrls.default?.http[0]??""];const S={blockExplorerUrls:g,chainId:L(h),chainName:i?.chainName??d.name,iconUrls:i?.iconUrls,nativeCurrency:i?.nativeCurrency??d.nativeCurrency,rpcUrls:w};return await Promise.all([y.request({method:"wallet_addEthereumChain",params:[S]}).then(async()=>{if(await this.getChainId()===h)c.emitter.emit("change",{chainId:h});else throw new b(new Error("User rejected switch after adding network."))}),m]),d}catch(p){throw new b(p)}throw u.code===b.code?new b(u):new N(u)}},async onAccountsChanged(i){if(i.length===0)this.onDisconnect();else if(c.emitter.listenerCount("connect")){const h=(await this.getChainId()).toString();this.onConnect({chainId:h}),t&&await c.storage?.removeItem(`${this.id}.disconnected`)}else c.emitter.emit("change",{accounts:i.map(h=>E(h))})},onChainChanged(i){const h=Number(i);c.emitter.emit("change",{chainId:h})},async onConnect(i){const h=await this.getAccounts();if(h.length===0)return;const y=Number(i.chainId);c.emitter.emit("connect",{accounts:h,chainId:y});const d=await this.getProvider();d&&(l&&(d.removeListener("connect",l),l=void 0),a||(a=this.onAccountsChanged.bind(this),d.on("accountsChanged",a)),o||(o=this.onChainChanged.bind(this),d.on("chainChanged",o)),s||(s=this.onDisconnect.bind(this),d.on("disconnect",s)))},async onDisconnect(i){const h=await this.getProvider();i&&i.code===1013&&h&&(await this.getAccounts()).length||(c.emitter.emit("disconnect"),h&&(o&&(h.removeListener("chainChanged",o),o=void 0),s&&(h.removeListener("disconnect",s),s=void 0),l||(l=this.onConnect.bind(this),h.on("connect",l))))}})}const fe={coinbaseWallet:{id:"coinbaseWallet",name:"Coinbase Wallet",provider(e){return e?.coinbaseWalletExtension?e.coinbaseWalletExtension:j(e,"isCoinbaseWallet")}},metaMask:{id:"metaMask",name:"MetaMask",provider(e){return j(e,t=>{if(!t.isMetaMask||t.isBraveWallet&&!t._events&&!t._state)return!1;const r=["isApexWallet","isAvalanche","isBitKeep","isBlockWallet","isKuCoinWallet","isMathWallet","isOkxWallet","isOKExWallet","isOneInchIOSWallet","isOneInchAndroidWallet","isOpera","isPhantom","isPortal","isRabby","isTokenPocket","isTokenary","isUniswapWallet","isZerion"];for(const n of r)if(t[n])return!1;return!0})}},phantom:{id:"phantom",name:"Phantom",provider(e){return e?.phantom?.ethereum?e.phantom?.ethereum:j(e,"isPhantom")}}};function j(e,t){function r(a){return typeof t=="function"?t(a):typeof t=="string"?a[t]:!0}const n=e.ethereum;if(n?.providers)return n.providers.find(a=>r(a));if(n&&r(n))return n}var V=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},me=class extends V{#t;#r;#e;constructor(){super(),this.#e=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#r||this.setEventListener(this.#e)}onUnsubscribe(){this.hasListeners()||(this.#r?.(),this.#r=void 0)}setEventListener(e){this.#e=e,this.#r?.(),this.#r=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#t!==e&&(this.#t=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#t=="boolean"?this.#t:globalThis.document?.visibilityState!=="hidden"}},pe=new me,ye={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},ve=class{#t=ye;#r=!1;setTimeoutProvider(e){this.#t=e}setTimeout(e,t){return this.#t.setTimeout(e,t)}clearTimeout(e){this.#t.clearTimeout(e)}setInterval(e,t){return this.#t.setInterval(e,t)}clearInterval(e){this.#t.clearInterval(e)}},I=new ve;function ge(e){setTimeout(e,0)}var we=typeof window>"u"||"Deno"in globalThis;function $(){}function He(e,t){return typeof e=="function"?e(t):e}function be(e){return typeof e=="number"&&e>=0&&e!==1/0}function Ce(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Pe(e,t){return typeof e=="function"?e(t):e}function Se(e,t){return typeof e=="function"?e(t):e}function Ve(e,t){const{type:r="all",exact:n,fetchStatus:a,predicate:o,queryKey:l,stale:s}=e;if(l){if(n){if(t.queryHash!==Fe(l,t.options))return!1}else if(!R(t.queryKey,l))return!1}if(r!=="all"){const c=t.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||a&&a!==t.state.fetchStatus||o&&!o(t))}function Je(e,t){const{exact:r,status:n,predicate:a,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(T(t.options.mutationKey)!==T(o))return!1}else if(!R(t.options.mutationKey,o))return!1}return!(n&&t.state.status!==n||a&&!a(t))}function Fe(e,t){return(t?.queryKeyHashFn||T)(e)}function T(e){return JSON.stringify(e,(t,r)=>M(r)?Object.keys(r).sort().reduce((n,a)=>(n[a]=r[a],n),{}):r)}function R(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>R(e[r],t[r])):!1}var Ee=Object.prototype.hasOwnProperty;function J(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=K(e)&&K(t);if(!n&&!(M(e)&&M(t)))return t;const o=(n?e:Object.keys(e)).length,l=n?t:Object.keys(t),s=l.length,c=n?new Array(s):{};let i=0;for(let h=0;h<s;h++){const y=n?h:l[h],d=e[y],m=t[y];if(d===m){c[y]=d,(n?h<o:Ee.call(e,y))&&i++;continue}if(d===null||m===null||typeof d!="object"||typeof m!="object"){c[y]=m;continue}const f=J(d,m,r+1);c[y]=f,f===d&&i++}return o===s&&i===o?e:c}function Ze(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function K(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function M(e){if(!_(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!_(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function _(e){return Object.prototype.toString.call(e)==="[object Object]"}function je(e){return new Promise(t=>{I.setTimeout(t,e)})}function Oe(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?J(e,t):t}function Ae(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function xe(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Z=Symbol();function X(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Z?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Xe(e,t){return typeof e=="function"?e(...t):!!e}function Ie(e,t,r){let n=!1,a;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(a??=t(),n||(n=!0,a.aborted?r():a.addEventListener("abort",r,{once:!0})),a)}),e}var Y=(()=>{let e=()=>we;return{isServer(){return e()},setIsServer(t){e=t}}})();function Te(){let e,t;const r=new Promise((a,o)=>{e=a,t=o});r.status="pending",r.catch(()=>{});function n(a){Object.assign(r,a),delete r.resolve,delete r.reject}return r.resolve=a=>{n({status:"fulfilled",value:a}),e(a)},r.reject=a=>{n({status:"rejected",reason:a}),t(a)},r}var Me=ge;function qe(){let e=[],t=0,r=s=>{s()},n=s=>{s()},a=Me;const o=s=>{t?e.push(s):a(()=>{r(s)})},l=()=>{const s=e;e=[],s.length&&a(()=>{n(()=>{s.forEach(c=>{r(c)})})})};return{batch:s=>{let c;t++;try{c=s()}finally{t--,t||l()}return c},batchCalls:s=>(...c)=>{o(()=>{s(...c)})},schedule:o,setNotifyFunction:s=>{r=s},setBatchNotifyFunction:s=>{n=s},setScheduler:s=>{a=s}}}var ee=qe(),Ue=class extends V{#t=!0;#r;#e;constructor(){super(),this.#e=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#r||this.setEventListener(this.#e)}onUnsubscribe(){this.hasListeners()||(this.#r?.(),this.#r=void 0)}setEventListener(e){this.#e=e,this.#r?.(),this.#r=e(this.setOnline.bind(this))}setOnline(e){this.#t!==e&&(this.#t=e,this.listeners.forEach(r=>{r(e)}))}isOnline(){return this.#t}},te=new Ue;function Re(e){return Math.min(1e3*2**e,3e4)}function re(e){return(e??"online")==="online"?te.isOnline():!0}var q=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function ne(e){let t=!1,r=0,n;const a=Te(),o=()=>a.status!=="pending",l=u=>{if(!o()){const p=new q(u);d(p),e.onCancel?.(p)}},s=()=>{t=!0},c=()=>{t=!1},i=()=>pe.isFocused()&&(e.networkMode==="always"||te.isOnline())&&e.canRun(),h=()=>re(e.networkMode)&&e.canRun(),y=u=>{o()||(n?.(),a.resolve(u))},d=u=>{o()||(n?.(),a.reject(u))},m=()=>new Promise(u=>{n=p=>{(o()||i())&&u(p)},e.onPause?.()}).then(()=>{n=void 0,o()||e.onContinue?.()}),f=()=>{if(o())return;let u;const p=r===0?e.initialPromise:void 0;try{u=p??e.fn()}catch(v){u=Promise.reject(v)}Promise.resolve(u).then(y).catch(v=>{if(o())return;const g=e.retry??(Y.isServer()?0:3),w=e.retryDelay??Re,S=typeof w=="function"?w(r,v):w,P=g===!0||typeof g=="number"&&r<g||typeof g=="function"&&g(r,v);if(t||!P){d(v);return}r++,e.onFail?.(r,v),je(S).then(()=>i()?void 0:m()).then(()=>{t?d(v):f()})})};return{promise:a,status:()=>a.status,cancel:l,continue:()=>(n?.(),a),cancelRetry:s,continueRetry:c,canStart:h,start:()=>(h()?f():m().then(f),a)}}var se=class{#t;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),be(this.gcTime)&&(this.#t=I.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Y.isServer()?1/0:5*60*1e3))}clearGcTimeout(){this.#t&&(I.clearTimeout(this.#t),this.#t=void 0)}},Ye=class extends se{#t;#r;#e;#s;#n;#o;#a;constructor(e){super(),this.#a=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#s=e.client,this.#e=this.#s.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=G(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#n?.promise}setOptions(e){if(this.options={...this.#o,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=G(this.options);t.data!==void 0&&(this.setState(W(t.data,t.dataUpdatedAt)),this.#t=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#e.remove(this)}setData(e,t){const r=Oe(this.state.data,e,this.options);return this.#i({data:r,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),r}setState(e,t){this.#i({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#n?.promise;return this.#n?.cancel(e),t?t.then($).catch($):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Se(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Z||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Pe(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!Ce(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#n?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#n?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#e.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#n&&(this.#a||this.#c()?this.#n.cancel({revert:!0}):this.#n.cancelRetry()),this.scheduleGc()),this.#e.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#i({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#n?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#n)return this.#n.continueRetry(),this.#n.promise}if(e&&this.setOptions(e),!this.options.queryFn){const s=this.observers.find(c=>c.options.queryFn);s&&this.setOptions(s.options)}const r=new AbortController,n=s=>{Object.defineProperty(s,"signal",{enumerable:!0,get:()=>(this.#a=!0,r.signal)})},a=()=>{const s=X(this.options,t),i=(()=>{const h={client:this.#s,queryKey:this.queryKey,meta:this.meta};return n(h),h})();return this.#a=!1,this.options.persister?this.options.persister(s,i,this):s(i)},l=(()=>{const s={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:a};return n(s),s})();this.options.behavior?.onFetch(l,this),this.#r=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==l.fetchOptions?.meta)&&this.#i({type:"fetch",meta:l.fetchOptions?.meta}),this.#n=ne({initialPromise:t?.initialPromise,fn:l.fetchFn,onCancel:s=>{s instanceof q&&s.revert&&this.setState({...this.#r,fetchStatus:"idle"}),r.abort()},onFail:(s,c)=>{this.#i({type:"failed",failureCount:s,error:c})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0});try{const s=await this.#n.start();if(s===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(s),this.#e.config.onSuccess?.(s,this),this.#e.config.onSettled?.(s,this.state.error,this),s}catch(s){if(s instanceof q){if(s.silent)return this.#n.promise;if(s.revert){if(this.state.data===void 0)throw s;return this.state.data}}throw this.#i({type:"error",error:s}),this.#e.config.onError?.(s,this),this.#e.config.onSettled?.(this.state.data,s,this),s}finally{this.scheduleGc()}}#i(e){const t=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...De(r.data,this.options),fetchMeta:e.meta??null};case"success":const n={...r,...W(e.data,e.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#r=e.manual?n:void 0,n;case"error":const a=e.error;return{...r,error:a,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=t(this.state),ee.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#e.notify({query:this,type:"updated",action:e})})}};function De(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:re(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function W(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function G(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}function et(e){return{onFetch:(t,r)=>{const n=t.options,a=t.fetchOptions?.meta?.fetchMore?.direction,o=t.state.data?.pages||[],l=t.state.data?.pageParams||[];let s={pages:[],pageParams:[]},c=0;const i=async()=>{let h=!1;const y=f=>{Ie(f,()=>t.signal,()=>h=!0)},d=X(t.options,t.fetchOptions),m=async(f,u,p)=>{if(h)return Promise.reject();if(u==null&&f.pages.length)return Promise.resolve(f);const g=(()=>{const k={client:t.client,queryKey:t.queryKey,pageParam:u,direction:p?"backward":"forward",meta:t.options.meta};return y(k),k})(),w=await d(g),{maxPages:S}=t.options,P=p?xe:Ae;return{pages:P(f.pages,w,S),pageParams:P(f.pageParams,u,S)}};if(a&&o.length){const f=a==="backward",u=f?ie:U,p={pages:o,pageParams:l},v=u(n,p);s=await m(p,v,f)}else{const f=e??o.length;do{const u=c===0?l[0]??n.initialPageParam:U(n,s);if(c>0&&u==null)break;s=await m(s,u),c++}while(c<f)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(i,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=i}}}function U(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function ie(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}function tt(e,t){return t?U(e,t)!=null:!1}function rt(e,t){return!t||!e.getPreviousPageParam?!1:ie(e,t)!=null}var nt=class extends se{#t;#r;#e;#s;constructor(e){super(),this.#t=e.client,this.mutationId=e.mutationId,this.#e=e.mutationCache,this.#r=[],this.state=e.state||ke(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#r.includes(e)||(this.#r.push(e),this.clearGcTimeout(),this.#e.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#r=this.#r.filter(t=>t!==e),this.scheduleGc(),this.#e.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#r.length||(this.state.status==="pending"?this.scheduleGc():this.#e.remove(this))}continue(){return this.#s?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#n({type:"continue"})},r={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=ne({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(new Error("No mutationFn found")),onFail:(o,l)=>{this.#n({type:"failed",failureCount:o,error:l})},onPause:()=>{this.#n({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#e.canRun(this)});const n=this.state.status==="pending",a=!this.#s.canStart();try{if(n)t();else{this.#n({type:"pending",variables:e,isPaused:a}),this.#e.config.onMutate&&await this.#e.config.onMutate(e,this,r);const l=await this.options.onMutate?.(e,r);l!==this.state.context&&this.#n({type:"pending",context:l,variables:e,isPaused:a})}const o=await this.#s.start();return await this.#e.config.onSuccess?.(o,e,this.state.context,this,r),await this.options.onSuccess?.(o,e,this.state.context,r),await this.#e.config.onSettled?.(o,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(o,null,e,this.state.context,r),this.#n({type:"success",data:o}),o}catch(o){try{await this.#e.config.onError?.(o,e,this.state.context,this,r)}catch(l){Promise.reject(l)}try{await this.options.onError?.(o,e,this.state.context,r)}catch(l){Promise.reject(l)}try{await this.#e.config.onSettled?.(void 0,o,this.state.variables,this.state.context,this,r)}catch(l){Promise.reject(l)}try{await this.options.onSettled?.(void 0,o,e,this.state.context,r)}catch(l){Promise.reject(l)}throw this.#n({type:"error",error:o}),o}finally{this.#e.runNext(this)}}#n(e){const t=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),ee.batch(()=>{this.#r.forEach(r=>{r.onMutationUpdate(e)}),this.#e.notify({mutation:this,type:"updated",action:e})})}};function ke(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}const D=await Q("react");var ae=D.createContext(void 0),st=e=>{const t=D.useContext(ae);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},it=({client:e,children:t})=>(D.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),oe.jsx(ae.Provider,{value:e,children:t}));export{Y as A,be as B,he as C,Ce as D,I as E,De as F,Oe as G,tt as H,rt as I,ke as J,Xe as K,st as L,nt as M,C as N,J as O,F as P,Ye as Q,_e as R,V as S,$ as a,Ve as b,ze as c,He as d,et as e,pe as f,T as g,Fe as h,H as i,it as j,$e as k,Qe as l,Je as m,ee as n,te as o,R as p,Ke as q,Pe as r,Z as s,Ge as t,We as u,Be as v,ce as w,Te as x,Se as y,Ze as z};
|