@dcl/explore-site 0.0.1-24353156203.commit-157a41c → 0.0.1-24478945478.commit-fbe29bc

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.
Files changed (131) hide show
  1. package/assets/HomePage-4HQ75L-m.js +5 -0
  2. package/assets/{QueryClientProvider-DIya0AJE.js → QueryClientProvider--leuT0BF.js} +1 -1
  3. package/assets/SensorsRounded-H2-cTBMr.js +15 -0
  4. package/assets/{__federation_expose_App-C1e3Md3H.js → __federation_expose_App-BV1W9Nsg.js} +1 -1
  5. package/assets/{__federation_fn_import-Ht3m1qpn.js → __federation_fn_import-DiM-2p0X.js} +1 -1
  6. package/assets/__federation_shared_@dcl/hooks-BPbDbik5.js +520 -0
  7. package/assets/__federation_shared_@dcl/schemas-NoE3FR6c.js +1 -0
  8. package/assets/__federation_shared_@emotion/react-BxgzYDzF.js +1 -0
  9. package/assets/__federation_shared_@emotion/{styled-BS5dedBi.js → styled-J4z9BTTi.js} +1 -1
  10. package/assets/__federation_shared_decentraland-ui2-CKEsU5_w.js +357 -0
  11. package/assets/{__federation_shared_react-redux-W6mfh1Yq.js → __federation_shared_react-redux-Da7H9TvO.js} +1 -1
  12. package/assets/{__federation_shared_react-router-dom-BJBxUtHV.js → __federation_shared_react-router-dom-C19SKiqW.js} +1 -1
  13. package/assets/{__federation_shared_viem-D92oJAhA.js → __federation_shared_viem-CjVgxkdA.js} +1 -1
  14. package/assets/{__federation_shared_wagmi-Mn9i9XHL.js → __federation_shared_wagmi-Do7OgkKc.js} +1 -1
  15. package/assets/{add-Pf2mtDVd.js → add-Daid8Noh.js} +1 -1
  16. package/assets/{all-wallets-yTWm-7l0.js → all-wallets-DiZQK82j.js} +1 -1
  17. package/assets/{app-store-CHNvFr8x.js → app-store-CV27MXOj.js} +1 -1
  18. package/assets/{apple-Cl30qHkG.js → apple-WY66pyZC.js} +1 -1
  19. package/assets/{arrow-bottom-DTZt60fy.js → arrow-bottom-CGAu2sUq.js} +1 -1
  20. package/assets/{arrow-bottom-circle-zZ7DVvhp.js → arrow-bottom-circle-Bg41XMJ4.js} +1 -1
  21. package/assets/{arrow-left-D5G-F2Mr.js → arrow-left-BC8WX0E0.js} +1 -1
  22. package/assets/{arrow-right-CQp0OKbr.js → arrow-right-BKbdbJmP.js} +1 -1
  23. package/assets/{arrow-top-Dov1vQPn.js → arrow-top-DBBJA8uy.js} +1 -1
  24. package/assets/{auto-track-CJ-hNq0s.js → auto-track-DqNnSbTw.js} +1 -1
  25. package/assets/{bank-CzpOQOqg.js → bank-BqhRWSQZ.js} +1 -1
  26. package/assets/{basic-BaHwLXYW.js → basic-DkiFeXIZ.js} +1 -1
  27. package/assets/{browser-DmlzKjDH.js → browser-_VNJ0ZVD.js} +1 -1
  28. package/assets/{card-DjnQpz1T.js → card-Do28FZIN.js} +1 -1
  29. package/assets/{ccip-fLeNA6wc.js → ccip-DM-gN1AQ.js} +1 -1
  30. package/assets/{checkmark-Cv7bJNZW.js → checkmark-DkZh9Zlf.js} +1 -1
  31. package/assets/{checkmark-bold-Crr_qeUj.js → checkmark-bold-BpmrZTfW.js} +1 -1
  32. package/assets/{chevron-bottom-DjPxwSAz.js → chevron-bottom-BR7imf61.js} +1 -1
  33. package/assets/{chevron-left-DRFM7Kjo.js → chevron-left-BgSUIV8s.js} +1 -1
  34. package/assets/{chevron-right-C3dXKRLK.js → chevron-right-DWD5TLbn.js} +1 -1
  35. package/assets/{chevron-top-DkPXzMT9.js → chevron-top-D7S-CScU.js} +1 -1
  36. package/assets/{chrome-store-C1j87a0E.js → chrome-store-B8uTCWo4.js} +1 -1
  37. package/assets/{clock-Ii2gOHOm.js → clock-BD6s_KdG.js} +1 -1
  38. package/assets/{close-mveIoSo7.js → close-CnBVyDqH.js} +1 -1
  39. package/assets/{coinPlaceholder-BgCUmbQq.js → coinPlaceholder-81U7X6av.js} +1 -1
  40. package/assets/{compass-CFoHHJhs.js → compass-Ts-lPb2L.js} +1 -1
  41. package/assets/{copy-CECL7vci.js → copy-DCH8C6zc.js} +1 -1
  42. package/assets/{core-rob3DE1K.js → core-Dhd6Iy8d.js} +3 -3
  43. package/assets/{createClient-DIPdlHW_.js → createClient-BcYkZyGj.js} +1 -1
  44. package/assets/{cursor-CVJFIzVK.js → cursor-BLKnhkE9.js} +1 -1
  45. package/assets/{cursor-transparent-OkqQkD5X.js → cursor-transparent-C0zsz7H9.js} +1 -1
  46. package/assets/{desktop-SqravDGB.js → desktop-Bh7_tRbW.js} +1 -1
  47. package/assets/{disconnect-C438cKH2.js → disconnect-4_am9qYp.js} +1 -1
  48. package/assets/{discord-C342vjF7.js → discord-Dt-NMkqj.js} +1 -1
  49. package/assets/{emotion-react.browser.esm-BZuSnvT8.js → emotion-react.browser.esm-BDrOZpgV.js} +1 -1
  50. package/assets/{emotion-use-insertion-effect-with-fallbacks.browser.esm-CLJKjSo3.js → emotion-use-insertion-effect-with-fallbacks.browser.esm-l2IiBxl6.js} +1 -1
  51. package/assets/{etherscan-Bnt1d9db.js → etherscan-B4BDfsL8.js} +1 -1
  52. package/assets/{exclamation-triangle-tMBULVvu.js → exclamation-triangle-D3NIlu-T.js} +1 -1
  53. package/assets/{extension-BSzqi0r5.js → extension-tsRob_2k.js} +1 -1
  54. package/assets/{external-link-j8SaBF13.js → external-link-ugbgKjeM.js} +1 -1
  55. package/assets/{facebook-CDHF3Kvl.js → facebook-D_V0Apmn.js} +1 -1
  56. package/assets/{farcaster-BOEIT-PC.js → farcaster-CbYsxa-c.js} +1 -1
  57. package/assets/{filters-DV0FUhQ0.js → filters-CXoaKLPf.js} +1 -1
  58. package/assets/{github-C4Va2GNy.js → github-BQ6AFC-x.js} +1 -1
  59. package/assets/{google-Cje22T1c.js → google-CgCrWyXU.js} +1 -1
  60. package/assets/{help-circle-Bff4zjju.js → help-circle-CeKyhCzL.js} +1 -1
  61. package/assets/{id-Dd0qqSfM.js → id-Be2iQFlL.js} +1 -1
  62. package/assets/{image-Cn6H6ai6.js → image-BKga-nIx.js} +1 -1
  63. package/assets/index-BoL1wX4e.js +1 -0
  64. package/assets/{index-l-nOLSLJ.js → index-Cp1PC8Pr.js} +2 -2
  65. package/assets/{index-CmM7TlDV.js → index-D6uTuLeA.js} +1 -1
  66. package/assets/index-DRqFUSF2.js +1 -0
  67. package/assets/index-DVftV2UM.js +16 -0
  68. package/assets/{index-CVDO0kXc.js → index-DX4cgVhx.js} +1 -1
  69. package/assets/{index-BOVA3Ef2.js → index-DYHBL5dz.js} +1 -1
  70. package/assets/{index-IsljfPdd.js → index-DoYKMzm-.js} +1 -1
  71. package/assets/index-Dy0yjznp.js +1 -1
  72. package/assets/{index-DK6XZ4Dz.js → index-T-kj4HwN.js} +1 -1
  73. package/assets/index-VfkM29PH.js +1 -1
  74. package/assets/{index-MKDM4ZR3.js → index-jJtvvIhT.js} +3 -3
  75. package/assets/{index.es-BHi5bjgi.js → index.es-PqkS6yPf.js} +3 -3
  76. package/assets/{info-CNp7Y95X.js → info-HGWeWzHM.js} +1 -1
  77. package/assets/{info-circle-7DQwkSlJ.js → info-circle-41LCT2sF.js} +1 -1
  78. package/assets/jsx-runtime-B1l0k91v.js +1 -1
  79. package/assets/{lightbulb-B0gzSEGz.js → lightbulb-NDbKHlTB.js} +1 -1
  80. package/assets/{localBatchGatewayRequest-xkDsPGG7.js → localBatchGatewayRequest-BYwDa5vQ.js} +1 -1
  81. package/assets/{mail-dRKM5FXT.js → mail-Bu8ml1Ak.js} +1 -1
  82. package/assets/{mobile-LB_FN_RV.js → mobile-DbRhum7U.js} +1 -1
  83. package/assets/{more-CYum3xAb.js → more-CEIXJ-1N.js} +1 -1
  84. package/assets/{network-placeholder-BtyRBLps.js → network-placeholder-Bw3MHqfg.js} +1 -1
  85. package/assets/{nftPlaceholder-BEMgcchY.js → nftPlaceholder-DFUxL8_Z.js} +1 -1
  86. package/assets/{off-C5JcUbXr.js → off-CpTo0-ZF.js} +1 -1
  87. package/assets/{play-store-CN5oe3Vf.js → play-store-4qrK4s4s.js} +1 -1
  88. package/assets/{plus-CKUKfnQj.js → plus-Co84Q6A5.js} +1 -1
  89. package/assets/{preload-helper-ByFjl-a5.js → preload-helper-DiN7JEdv.js} +1 -1
  90. package/assets/{qr-code-BzLqVM5j.js → qr-code-l130WBRh.js} +1 -1
  91. package/assets/{recycle-horizontal-dPdqs2_u.js → recycle-horizontal-BwIgvOD_.js} +1 -1
  92. package/assets/{refresh-DSde0C6e.js → refresh-hIpJOVfw.js} +1 -1
  93. package/assets/remoteEntry.js +1 -1
  94. package/assets/{reown-logo-BR03HbJl.js → reown-logo-BJLVCKGg.js} +1 -1
  95. package/assets/{search-CedcKcSQ.js → search-D_oIgFxh.js} +1 -1
  96. package/assets/{secp256k1-B4W1DvAE.js → secp256k1-DbMaKmYo.js} +1 -1
  97. package/assets/{send-GPwvH8UU.js → send-BQV4iaQs.js} +1 -1
  98. package/assets/{swapHorizontal-BR-8g9B3.js → swapHorizontal-Daw-5sVy.js} +1 -1
  99. package/assets/{swapHorizontalBold-B7LIXZ0L.js → swapHorizontalBold-B1g2xssk.js} +1 -1
  100. package/assets/{swapHorizontalMedium-fAXgriAI.js → swapHorizontalMedium-CPL2Mejm.js} +1 -1
  101. package/assets/{swapHorizontalRoundedBold-DcpI4Y0u.js → swapHorizontalRoundedBold-C1XtN2m3.js} +1 -1
  102. package/assets/{swapVertical-yx4f2BAH.js → swapVertical-BpuAciPK.js} +1 -1
  103. package/assets/{telegram-DBD185Ye.js → telegram-Csbx1gWz.js} +1 -1
  104. package/assets/{three-dots-DeQeOnEw.js → three-dots-DiK_h83n.js} +1 -1
  105. package/assets/{twitch-0WtoG5d0.js → twitch-CIjcFlBZ.js} +1 -1
  106. package/assets/{twitterIcon-atCsdkp8.js → twitterIcon-CUp0tT8q.js} +1 -1
  107. package/assets/{uid-EJg3CBmY.js → uid-CYtpXYTM.js} +3 -3
  108. package/assets/{verify-KQXFAoty.js → verify-Cu6b7W7W.js} +1 -1
  109. package/assets/{verify-filled-CM5tIwPd.js → verify-filled-wGbCMaxP.js} +1 -1
  110. package/assets/{w3m-modal-NP2Fg3Od.js → w3m-modal-eGJ9MIKg.js} +1 -1
  111. package/assets/{wallet-D_D97dGa.js → wallet-D9jO_EWu.js} +1 -1
  112. package/assets/{wallet-placeholder-CqVcvVD2.js → wallet-placeholder-Crncam5C.js} +1 -1
  113. package/assets/{walletconnect-CumO8EDV.js → walletconnect-DqK21liB.js} +1 -1
  114. package/assets/{warning-circle-PdDzpbOz.js → warning-circle-CKSKNtxx.js} +1 -1
  115. package/assets/{webSocket-CrIirM3J.js → webSocket-Cg90KmKh.js} +1 -1
  116. package/assets/{x-CA1Ri3bW.js → x-B_nPooQD.js} +1 -1
  117. package/index.html +17 -14
  118. package/package.json +3 -3
  119. package/assets/HomePage-gvYCE7Us.js +0 -5
  120. package/assets/SensorsRounded-CofDOJXy.js +0 -15
  121. package/assets/__federation_shared_@dcl/hooks-CxuIIRDv.js +0 -535
  122. package/assets/__federation_shared_@dcl/schemas-FcJQcJ28.js +0 -1
  123. package/assets/__federation_shared_@emotion/react-u6J4D45G.js +0 -1
  124. package/assets/__federation_shared_decentraland-ui2-DpbLoOhx.js +0 -357
  125. package/assets/create-submenu-Bu20F8-Z.webp +0 -0
  126. package/assets/explore-submenu-BFVuYMi9.webp +0 -0
  127. package/assets/governance-submenu-VTIKvCIL.webp +0 -0
  128. package/assets/index-Biwg5bHN.js +0 -1
  129. package/assets/index-TGKJ-nWH.js +0 -1
  130. package/assets/learn-submenu-sfxVP5Db.webp +0 -0
  131. package/assets/marketplace-submenu-CixWTv8_.webp +0 -0
@@ -0,0 +1,5 @@
1
+ const __vite__fileDeps=["assets/index-CVdhIPEJ.js","assets/index-CNMKbeE1.js","assets/index-CGCGB-at.js","assets/index-DX4cgVhx.js","assets/__federation_fn_import-DiM-2p0X.js","assets/hooks.module-Dz_XB4AG.js","assets/index-CdrMQoR6.js","assets/_commonjsHelpers-C4iS2aBk.js","assets/createClient-BcYkZyGj.js","assets/uid-CYtpXYTM.js","assets/preload-helper-DiN7JEdv.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-PqkS6yPf.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
2
+ import{importShared as M}from"./__federation_fn_import-DiM-2p0X.js";import{j as d}from"./jsx-runtime-B1l0k91v.js";import{w as nr,e as ho,g as rr,b as go,h as yi,i as mo,o as yo,d as vo}from"./reselect-BfUrOuXx.js";import{c as bo,E as Mt,r as ve,i as be,d as vi,u as wo,a as Co,b as _o,e as So}from"./SensorsRounded-H2-cTBMr.js";import{l as xo}from"./index-DVftV2UM.js";import{d as bt}from"./defineChain-7I0Ce1VT.js";import{_ as Be}from"./preload-helper-DiN7JEdv.js";import{c as gn,C as mn,P as ir,i as Ao,S as bi,M as Eo,n as Z,m as or,a as le,h as wi,Q as Io,b as ar,f as ko,o as sr,r as cr,d as To,e as lr,g as ur,p as dr,s as Ro,j as Po}from"./QueryClientProvider--leuT0BF.js";import{c as Ye}from"./_commonjsHelpers-C4iS2aBk.js";const Mo=bt({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}}}),jo=bt({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}}}),Lo=bt({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}),Do=bt({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 Oo=[Mo,jo],No=[Do,Lo],yn=[...Oo,...No];function $o(e){return yn.some(t=>t.id===e)}const{createConnector:Uo}=await M("wagmi"),{ChainId:Fe}=await M("@dcl/schemas"),fr={[Fe.ETHEREUM_MAINNET]:"https://rpc.decentraland.org/mainnet?project=magic",[Fe.ETHEREUM_SEPOLIA]:"https://rpc.decentraland.org/sepolia?project=magic",[Fe.MATIC_MAINNET]:"https://rpc.decentraland.org/polygon?project=magic",[Fe.MATIC_AMOY]:"https://rpc.decentraland.org/amoy?project=magic"};function Fo(e){const{apiKey:t}=e;let n=null,r=null;async function i(o){const{Magic:a}=await Be(async()=>{const{Magic:c}=await import("./index-CVdhIPEJ.js");return{Magic:c}},__vite__mapDeps([0,1])),{OAuthExtension:l}=await Be(async()=>{const{OAuthExtension:c}=await import("./index-CGCGB-at.js");return{OAuthExtension:c}},__vite__mapDeps([2,1])),s=fr[o]||fr[Fe.ETHEREUM_MAINNET];return new a(t,{extensions:[new l],network:{rpcUrl:s,chainId:o}})}return Uo(o=>{async function a(){return r?await r.request({method:"eth_accounts"}):[]}async function l(s){r=await n.wallet.getProvider();const c=await a();return c.length===0?null:(await o.storage?.setItem("magicChainId",s),{accounts:c,chainId:s})}return{id:"magic",name:"Magic",type:"magic",async setup(){let s=!1;try{s=!!localStorage.getItem("dcl_magic_user_email")}catch{}const c=await o.storage?.getItem("magicChainId"),v=c??o.chains[0]?.id;if(!(!v||!c&&!s))try{if(n=await i(v),await n.user.isLoggedIn()){const h=await l(v);h&&o.emitter.emit("connect",h)}}catch{}},async connect({chainId:s}={}){const c=s??o.chains[0].id;if(n||(n=await i(c)),!await n.user.isLoggedIn())throw new Error("Magic: User is not logged in. Please authenticate via the auth dapp first.");const g=await l(c);if(!g)throw new Error("Magic: No accounts found");return g},async disconnect(){n&&await n.user.logout(),n=null,r=null,await o.storage?.removeItem("magicChainId")},async getAccounts(){return a()},async getChainId(){return await o.storage?.getItem("magicChainId")??o.chains[0].id},async getProvider(){return!r&&n&&(r=await n.wallet.getProvider()),r},async isAuthorized(){try{if(!n){const s=await o.storage?.getItem("magicChainId");if(!s)return!1;n=await i(s)}return await n.user.isLoggedIn()}catch{return!1}},async switchChain({chainId:s}){const c=o.chains.find(g=>g.id===s);if(!c)throw new Error(`Chain ${s} not configured`);if(n=await i(s),!await n.user.isLoggedIn())throw new Error("Magic: User is not logged in");return r=await n.wallet.getProvider(),await o.storage?.setItem("magicChainId",s),o.emitter.emit("change",{chainId:s}),c},onAccountsChanged(s){s.length===0?this.onDisconnect():o.emitter.emit("change",{accounts:s})},onChainChanged(s){const c=s.startsWith("0x")?parseInt(s,16):Number(s);o.emitter.emit("change",{chainId:c})},onDisconnect(){o.emitter.emit("disconnect"),n=null,r=null}}})}await M("wagmi");await M("@dcl/schemas");function qo(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:o})=>o?.url||n)}const{getAddress:ke,numberToHex:ot,SwitchChainError:at,UserRejectedRequestError:Te}=await M("viem");wt.type="coinbaseWallet";function wt(e={}){return e.version==="3"||e.headlessMode?Bo(e):Qo(e)}function Qo(e){let t,n,r,i;return gn(o=>({id:"coinbaseWalletSDK",name:"Coinbase Wallet",rdns:"com.coinbase.wallet",type:wt.type,async connect({chainId:a,withCapabilities:l,...s}={}){try{const c=await this.getProvider(),v=(await c.request({method:"eth_requestAccounts",params:"instantOnboarding"in s&&s.instantOnboarding?[{onboarding:"instant"}]:[]})).map(h=>ke(h));n||(n=this.onAccountsChanged.bind(this),c.on("accountsChanged",n)),r||(r=this.onChainChanged.bind(this),c.on("chainChanged",r)),i||(i=this.onDisconnect.bind(this),c.on("disconnect",i));let g=await this.getChainId();return a&&g!==a&&(g=(await this.switchChain({chainId:a}).catch(m=>{if(m.code===Te.code)throw m;return{id:g}}))?.id??g),{accounts:l?v.map(h=>({address:h,capabilities:{}})):v,chainId:g}}catch(c){throw/(user closed modal|accounts received is empty|user denied account|request rejected)/i.test(c.message)?new Te(c):c}},async disconnect(){const a=await this.getProvider();n&&(a.removeListener("accountsChanged",n),n=void 0),r&&(a.removeListener("chainChanged",r),r=void 0),i&&(a.removeListener("disconnect",i),i=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 Be(async()=>{const{createCoinbaseWalletSDK:c}=await import("./index-DX4cgVhx.js");return{createCoinbaseWalletSDK:c}},__vite__mapDeps([3,4,5,6,7,8,9,10,11]));t=l({...e,appChainIds:o.chains.map(c=>c.id),preference:a}).getProvider()}return t},async isAuthorized(){try{return!!(await this.getAccounts()).length}catch{return!1}},async switchChain({addEthereumChainParameter:a,chainId:l}){const s=o.chains.find(v=>v.id===l);if(!s)throw new at(new mn);const c=await this.getProvider();try{return await c.request({method:"wallet_switchEthereumChain",params:[{chainId:ot(s.id)}]}),s}catch(v){if(v.code===4902)try{let g;a?.blockExplorerUrls?g=a.blockExplorerUrls:g=s.blockExplorers?.default.url?[s.blockExplorers?.default.url]:[];let h;a?.rpcUrls?.length?h=a.rpcUrls:h=[s.rpcUrls.default?.http[0]??""];const m={blockExplorerUrls:g,chainId:ot(l),chainName:a?.chainName??s.name,iconUrls:a?.iconUrls,nativeCurrency:a?.nativeCurrency??s.nativeCurrency,rpcUrls:h};return await c.request({method:"wallet_addEthereumChain",params:[m]}),s}catch(g){throw new Te(g)}throw new at(v)}},onAccountsChanged(a){a.length===0?this.onDisconnect():o.emitter.emit("change",{accounts:a.map(l=>ke(l))})},onChainChanged(a){const l=Number(a);o.emitter.emit("change",{chainId:l})},async onDisconnect(a){o.emitter.emit("disconnect");const l=await this.getProvider();n&&(l.removeListener("accountsChanged",n),n=void 0),r&&(l.removeListener("chainChanged",r),r=void 0),i&&(l.removeListener("disconnect",i),i=void 0)}}))}function Bo(e){let n,r,i,o,a;return gn(l=>({id:"coinbaseWalletSDK",name:"Coinbase Wallet",rdns:"com.coinbase.wallet",type:wt.type,async connect({chainId:s,withCapabilities:c}={}){try{const v=await this.getProvider(),g=(await v.request({method:"eth_requestAccounts"})).map(m=>ke(m));i||(i=this.onAccountsChanged.bind(this),v.on("accountsChanged",i)),o||(o=this.onChainChanged.bind(this),v.on("chainChanged",o)),a||(a=this.onDisconnect.bind(this),v.on("disconnect",a));let h=await this.getChainId();return s&&h!==s&&(h=(await this.switchChain({chainId:s}).catch(I=>{if(I.code===Te.code)throw I;return{id:h}}))?.id??h),{accounts:c?g.map(m=>({address:m,capabilities:{}})):g,chainId:h}}catch(v){throw/(user closed modal|accounts received is empty|user denied account)/i.test(v.message)?new Te(v):v}},async disconnect(){const s=await this.getProvider();i&&(s.removeListener("accountsChanged",i),i=void 0),o&&(s.removeListener("chainChanged",o),o=void 0),a&&(s.removeListener("disconnect",a),a=void 0),s.disconnect(),s.close()},async getAccounts(){return(await(await this.getProvider()).request({method:"eth_accounts"})).map(c=>ke(c))},async getChainId(){const c=await(await this.getProvider()).request({method:"eth_chainId"});return Number(c)},async getProvider(){if(!r){const s=await(async()=>{const{default:m}=await Be(async()=>{const{default:I}=await import("./index-D6O4pjzC.js").then(x=>x.i);return{default:I}},__vite__mapDeps([12,7,13,6,14,15,5,16]));return typeof m!="function"&&typeof m.default=="function"?m.default:m})();n=new s({...e,reloadOnDisconnect:!1});const c=n.walletExtension?.getChainId(),v=l.chains.find(m=>e.chainId?m.id===e.chainId:m.id===c)||l.chains[0],g=e.chainId||v?.id,h=e.jsonRpcUrl||v?.rpcUrls.default.http[0];r=n.makeWeb3Provider(h,g)}return r},async isAuthorized(){try{return!!(await this.getAccounts()).length}catch{return!1}},async switchChain({addEthereumChainParameter:s,chainId:c}){const v=l.chains.find(h=>h.id===c);if(!v)throw new at(new mn);const g=await this.getProvider();try{return await g.request({method:"wallet_switchEthereumChain",params:[{chainId:ot(v.id)}]}),v}catch(h){if(h.code===4902)try{let m;s?.blockExplorerUrls?m=s.blockExplorerUrls:m=v.blockExplorers?.default.url?[v.blockExplorers?.default.url]:[];let I;s?.rpcUrls?.length?I=s.rpcUrls:I=[v.rpcUrls.default?.http[0]??""];const x={blockExplorerUrls:m,chainId:ot(c),chainName:s?.chainName??v.name,iconUrls:s?.iconUrls,nativeCurrency:s?.nativeCurrency??v.nativeCurrency,rpcUrls:I};return await g.request({method:"wallet_addEthereumChain",params:[x]}),v}catch(m){throw new Te(m)}throw new at(h)}},onAccountsChanged(s){s.length===0?this.onDisconnect():l.emitter.emit("change",{accounts:s.map(c=>ke(c))})},onChainChanged(s){const c=Number(s);l.emitter.emit("change",{chainId:c})},async onDisconnect(s){l.emitter.emit("disconnect");const c=await this.getProvider();i&&(c.removeListener("accountsChanged",i),i=void 0),o&&(c.removeListener("chainChanged",o),o=void 0),a&&(c.removeListener("disconnect",a),a=void 0)}}))}const{getAddress:jt,numberToHex:pr,SwitchChainError:Wo,UserRejectedRequestError:Je}=await M("viem");vn.type="walletConnect";function vn(e){const t=e.isNewChainsStale??!0;let n,r;const i="eip155";let o,a,l,s,c,v;return gn(g=>({id:"walletConnect",name:"WalletConnect",type:vn.type,async setup(){const h=await this.getProvider().catch(()=>null);h&&(l||(l=this.onConnect.bind(this),h.on("connect",l)),c||(c=this.onSessionDelete.bind(this),h.on("session_delete",c)))},async connect({chainId:h,withCapabilities:m,...I}={}){try{const x=await this.getProvider();if(!x)throw new ir;s||(s=this.onDisplayUri,x.on("display_uri",s));let b=h;if(!b){const u=await g.storage?.getItem("state")??{};g.chains.some(R=>R.id===u.chainId)?b=u.chainId:b=g.chains[0]?.id}if(!b)throw new Error("No chains found on connector.");const A=await this.isChainsStale();if(x.session&&A&&await x.disconnect(),!x.session||A){const u=g.chains.filter(_=>_.id!==b).map(_=>_.id);await x.connect({optionalChains:[b,...u],..."pairingTopic"in I?{pairingTopic:I.pairingTopic}:{}}),this.setRequestedChainsIds(g.chains.map(_=>_.id))}const C=(await x.enable()).map(u=>jt(u));let y=await this.getChainId();return h&&y!==h&&(y=(await this.switchChain({chainId:h}).catch(_=>{if(_.code===Je.code&&_.cause?.message!=="Missing or invalid. request() method: wallet_addEthereumChain")throw _;return{id:y}}))?.id??y),s&&(x.removeListener("display_uri",s),s=void 0),l&&(x.removeListener("connect",l),l=void 0),o||(o=this.onAccountsChanged.bind(this),x.on("accountsChanged",o)),a||(a=this.onChainChanged.bind(this),x.on("chainChanged",a)),v||(v=this.onDisconnect.bind(this),x.on("disconnect",v)),c||(c=this.onSessionDelete.bind(this),x.on("session_delete",c)),{accounts:m?C.map(u=>({address:u,capabilities:{}})):C,chainId:y}}catch(x){throw/(user rejected|connection request reset)/i.test(x?.message)?new Je(x):x}},async disconnect(){const h=await this.getProvider();try{await h?.disconnect()}catch(m){if(!/No matching key/i.test(m.message))throw m}finally{a&&(h?.removeListener("chainChanged",a),a=void 0),v&&(h?.removeListener("disconnect",v),v=void 0),l||(l=this.onConnect.bind(this),h?.on("connect",l)),o&&(h?.removeListener("accountsChanged",o),o=void 0),c&&(h?.removeListener("session_delete",c),c=void 0),this.setRequestedChainsIds([])}},async getAccounts(){return(await this.getProvider()).accounts.map(m=>jt(m))},async getProvider({chainId:h}={}){async function m(){const I=g.chains.map(b=>b.id);if(!I.length)return;const{EthereumProvider:x}=await Be(async()=>{const{EthereumProvider:b}=await import("./index.es-PqkS6yPf.js").then(A=>A.G);return{EthereumProvider:b}},__vite__mapDeps([17,10,7,4,11]));return await x.init({...e,disableProviderPing:!0,optionalChains:I,projectId:e.projectId,rpcMap:Object.fromEntries(g.chains.map(b=>{const[A]=qo({chain:b,transports:g.transports});return[b.id,A]})),showQrModal:e.showQrModal??!0})}return n||(r||(r=m()),n=await r,n?.events.setMaxListeners(Number.POSITIVE_INFINITY)),h&&await this.switchChain?.({chainId:h}),n},async getChainId(){return(await this.getProvider()).chainId},async isAuthorized(){try{const[h,m]=await Promise.all([this.getAccounts(),this.getProvider()]);return h.length?await this.isChainsStale()&&m.session?(await m.disconnect().catch(()=>{}),!1):!0:!1}catch{return!1}},async switchChain({addEthereumChainParameter:h,chainId:m}){const I=await this.getProvider();if(!I)throw new ir;const x=g.chains.find(b=>b.id===m);if(!x)throw new Wo(new mn);try{await Promise.all([new Promise(A=>{const C=({chainId:y})=>{y===m&&(g.emitter.off("change",C),A())};g.emitter.on("change",C)}),I.request({method:"wallet_switchEthereumChain",params:[{chainId:pr(m)}]})]);const b=await this.getRequestedChainsIds();return this.setRequestedChainsIds([...b,m]),x}catch(b){const A=b;if(/(user rejected)/i.test(A.message))throw new Je(A);try{let C;h?.blockExplorerUrls?C=h.blockExplorerUrls:C=x.blockExplorers?.default.url?[x.blockExplorers?.default.url]:[];let y;h?.rpcUrls?.length?y=h.rpcUrls:y=[...x.rpcUrls.default.http];const u={blockExplorerUrls:C,chainId:pr(m),chainName:h?.chainName??x.name,iconUrls:h?.iconUrls,nativeCurrency:h?.nativeCurrency??x.nativeCurrency,rpcUrls:y};await I.request({method:"wallet_addEthereumChain",params:[u]});const _=await this.getRequestedChainsIds();return this.setRequestedChainsIds([..._,m]),x}catch(C){throw new Je(C)}}},onAccountsChanged(h){h.length===0?this.onDisconnect():g.emitter.emit("change",{accounts:h.map(m=>jt(m))})},onChainChanged(h){const m=Number(h);g.emitter.emit("change",{chainId:m})},async onConnect(h){const m=Number(h.chainId),I=await this.getAccounts();g.emitter.emit("connect",{accounts:I,chainId:m})},async onDisconnect(h){this.setRequestedChainsIds([]),g.emitter.emit("disconnect");const m=await this.getProvider();o&&(m.removeListener("accountsChanged",o),o=void 0),a&&(m.removeListener("chainChanged",a),a=void 0),v&&(m.removeListener("disconnect",v),v=void 0),c&&(m.removeListener("session_delete",c),c=void 0),l||(l=this.onConnect.bind(this),m.on("connect",l))},onDisplayUri(h){g.emitter.emit("message",{type:"display_uri",data:h})},onSessionDelete(){this.onDisconnect()},getNamespaceChainsIds(){return n?n.session?.namespaces[i]?.accounts?.map(m=>Number.parseInt(m.split(":")[1]||"",10))??[]:[]},async getRequestedChainsIds(){return await g.storage?.getItem(this.requestedChainsStorageKey)??[]},async isChainsStale(){if(!t)return!1;const h=g.chains.map(x=>x.id),m=this.getNamespaceChainsIds();if(m.length&&!m.some(x=>h.includes(x)))return!1;const I=await this.getRequestedChainsIds();return!h.every(x=>I.includes(x))},async setRequestedChainsIds(h){await g.storage?.setItem(this.requestedChainsStorageKey,h)},get requestedChainsStorageKey(){return`${this.id}.requestedChains`}}))}const{createConfig:Ho,http:en}=await M("wagmi"),{ChainId:Xe}=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"]},zo="61570c542c2d66c659492e5b24a41522",Go="pk_live_CE856A4938B36648",hr="pk_live_212568025B158355",Lt={dev:Go,stg:hr,prd:hr},Vo={[Xe.ETHEREUM_MAINNET]:"https://rpc.decentraland.org/mainnet",[Xe.ETHEREUM_SEPOLIA]:"https://rpc.decentraland.org/sepolia",[Xe.MATIC_MAINNET]:"https://rpc.decentraland.org/polygon",[Xe.MATIC_AMOY]:"https://rpc.decentraland.org/amoy"},Ko=yn.reduce((e,t)=>{const n=Vo[t.id];return e[t.id]=n?en(n):en(),e},{});function Yo(e,t){const n=t.trim();if(!n)return e;const r=e.replace(/\/+$/,""),i=n.startsWith("/")?n:`/${n}`;return`${r}${i}`}function Jo(e){if(!e)return Se;const t=e.url??(e.urlPath?Yo(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 Zf(e={}){const{walletConnectProjectId:t=zo,environment:n="prd",appMetadata:r,chains:i=yn,transports:o,connectors:a={},additionalConnectors:l=[]}=e;if(!Object.prototype.hasOwnProperty.call(Lt,n))throw new Error(`Invalid environment "${n}". Expected one of: ${Object.keys(Lt).join(", ")}`);const s=Jo(r),{injected:c=!0,walletConnect:v=!0,coinbaseWallet:g=!0,magic:h=!0}=a,m=i.reduce((x,b)=>(x[b.id]=o?.[b.id]??Ko[b.id]??en(),x),{}),I=[];if(c&&I.push(Ao()),v&&I.push(vn({projectId:t,metadata:{name:s.name,description:s.description??"",url:s.url,icons:s.icons??[]}})),g&&I.push(wt({appName:s.name})),h!==!1){const x=typeof h=="object"?h.apiKey:Lt[n];I.push(Fo({apiKey:x}))}return I.push(...l),Ho({chains:i,transports:m,connectors:I})}function Xo(){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 Zo(){typeof window>"u"||!window.localStorage||window.localStorage.removeItem("decentraland-connect-storage-key")}var Ci={},oe={},tn={exports:{}},nn={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})(nn,nn.exports);var bn=nn.exports,rn={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;function n(i){return Object.prototype.toString.call(i)==="[object RegExp]"}function r(i,o){for(var a=0;a<o.length;a++){var l=o[a];if(i===l||n(l)&&l.test(i))return!0}return!1}e.exports=t.default,e.exports.default=t.default})(rn,rn.exports);var ea=rn.exports,on={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(i,o){return i.indexOf(o)!==-1};t.default=n,e.exports=t.default,e.exports.default=t.default})(on,on.exports);var ta=on.exports,an={exports:{}},sn={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]:{},i=arguments.length>1?arguments[1]:void 0;for(var o in i)typeof r[o]>"u"&&(r[o]=i[o]);return r}e.exports=t.default,e.exports.default=t.default})(sn,sn.exports);var _i=sn.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var n=i(bn),r=i(_i);function i(l){return l&&l.__esModule?l:{default:l}}var o={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};function a(l,s){(0,n.default)(l),s=(0,r.default)(s,o),s.allow_trailing_dot&&l[l.length-1]==="."&&(l=l.substring(0,l.length-1)),s.allow_wildcard===!0&&l.indexOf("*.")===0&&(l=l.substring(2));var c=l.split("."),v=c[c.length-1];return s.require_tld&&(c.length<2||!s.allow_numeric_tld&&!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(v)||/\s/.test(v))||!s.allow_numeric_tld&&/^\d+$/.test(v)?!1:c.every(function(g){return!(g.length>63&&!s.ignore_max_length||!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(g)||/[\uff01-\uff5e]/.test(g)||/^-|-$/.test(g)||!s.allow_underscores&&/_/.test(g))})}e.exports=t.default,e.exports.default=t.default})(an,an.exports);var na=an.exports,cn={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=v;var n=r(bn);function r(g){return g&&g.__esModule?g:{default:g}}function i(g){"@babel/helpers - typeof";return i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h},i(g)}var o="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",a="(".concat(o,"[.]){3}").concat(o),l=new RegExp("^".concat(a,"$")),s="(?:[0-9a-fA-F]{1,4})",c=new RegExp("^("+"(?:".concat(s,":){7}(?:").concat(s,"|:)|")+"(?:".concat(s,":){6}(?:").concat(a,"|:").concat(s,"|:)|")+"(?:".concat(s,":){5}(?::").concat(a,"|(:").concat(s,"){1,2}|:)|")+"(?:".concat(s,":){4}(?:(:").concat(s,"){0,1}:").concat(a,"|(:").concat(s,"){1,3}|:)|")+"(?:".concat(s,":){3}(?:(:").concat(s,"){0,2}:").concat(a,"|(:").concat(s,"){1,4}|:)|")+"(?:".concat(s,":){2}(?:(:").concat(s,"){0,3}:").concat(a,"|(:").concat(s,"){1,5}|:)|")+"(?:".concat(s,":){1}(?:(:").concat(s,"){0,4}:").concat(a,"|(:").concat(s,"){1,6}|:)|")+"(?::((?::".concat(s,"){0,5}:").concat(a,"|(?::").concat(s,"){1,7}|:))")+")(%[0-9a-zA-Z.]{1,})?$");function v(g){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(0,n.default)(g);var m=(i(h)==="object"?h.version:arguments[1])||"";return m?m.toString()==="4"?l.test(g):m.toString()==="6"?c.test(g):!1:v(g,{version:4})||v(g,{version:6})}e.exports=t.default,e.exports.default=t.default})(cn,cn.exports);var ra=cn.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=A;var n=s(bn),r=s(ea),i=s(ta),o=s(na),a=s(ra),l=s(_i);function s(C){return C&&C.__esModule?C:{default:C}}function c(C,y){return I(C)||m(C,y)||g(C,y)||v()}function v(){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 g(C,y){if(C){if(typeof C=="string")return h(C,y);var u={}.toString.call(C).slice(8,-1);return u==="Object"&&C.constructor&&(u=C.constructor.name),u==="Map"||u==="Set"?Array.from(C):u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u)?h(C,y):void 0}}function h(C,y){(y==null||y>C.length)&&(y=C.length);for(var u=0,_=Array(y);u<y;u++)_[u]=C[u];return _}function m(C,y){var u=C==null?null:typeof Symbol<"u"&&C[Symbol.iterator]||C["@@iterator"];if(u!=null){var _,R,T,P,E=[],f=!0,p=!1;try{if(T=(u=u.call(C)).next,y!==0)for(;!(f=(_=T.call(u)).done)&&(E.push(_.value),E.length!==y);f=!0);}catch(w){p=!0,R=w}finally{try{if(!f&&u.return!=null&&(P=u.return(),Object(P)!==P))return}finally{if(p)throw R}}return E}}function I(C){if(Array.isArray(C))return C}var x={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},b=/^\[([^\]]+)\](?::([0-9]+))?$/;function A(C,y){if((0,n.default)(C),!C||/[\s<>]/.test(C)||C.indexOf("mailto:")===0||(y=(0,l.default)(y,x),y.validate_length&&C.length>y.max_allowed_length)||!y.allow_fragments&&(0,i.default)(C,"#")||!y.allow_query_components&&((0,i.default)(C,"?")||(0,i.default)(C,"&")))return!1;var u,_,R,T,P,E,f,p;f=C.split("#"),C=f.shift(),f=C.split("?"),C=f.shift();var w=C.match(/^([a-z][a-z0-9+\-.]*):/i),S=!1,k=function(ne){return S=!0,u=ne.toLowerCase(),y.require_valid_protocol&&y.protocols.indexOf(u)===-1?!1:C.substring(w[0].length)};if(w){var j=w[1],L=C.substring(w[0].length),N=L.slice(0,2)==="//";if(N){if(C=k(j),C===!1)return!1}else{var O=L.indexOf("/"),D=O===-1?L:L.substring(0,O),$=D.indexOf("@");if($!==-1){var Q=D.substring(0,$),G=/^[a-zA-Z0-9\-_.%:]*$/,W=G.test(Q),B=/%[0-9a-fA-F]{2}/.test(Q);if(W&&!B){if(y.require_protocol)return!1}else if(C=k(j),C===!1)return!1}else{var F=/^[0-9]/.test(L);if(F){if(y.require_protocol)return!1}else if(C=k(j),C===!1)return!1}}}else if(y.require_protocol)return!1;if(C.slice(0,2)==="//"){if(!S&&!y.allow_protocol_relative_urls)return!1;C=C.slice(2)}if(C==="")return!1;if(f=C.split("/"),C=f.shift(),C===""&&!y.require_host)return!0;if(f=C.split("@"),f.length>1){if(y.disallow_auth||f[0]===""||(_=f.shift(),_.indexOf(":")>=0&&_.split(":").length>2))return!1;var K=_.split(":"),U=c(K,2),q=U[0],H=U[1];if(q===""&&H==="")return!1}T=f.join("@"),E=null,p=null;var V=T.match(b);if(V?(R="",p=V[1],E=V[2]||null):(f=T.split(":"),R=f.shift(),f.length&&(E=f.join(":"))),E!==null&&E.length>0){if(P=parseInt(E,10),!/^[0-9]+$/.test(E)||P<=0||P>65535)return!1}else if(y.require_port)return!1;return y.host_whitelist?(0,r.default)(R,y.host_whitelist):R===""&&!y.require_host?!0:!(!(0,a.default)(R)&&!(0,o.default)(R,y)&&(!p||!(0,a.default)(p,6))||(R=R||p,y.host_blacklist&&(0,r.default)(R,y.host_blacklist)))}e.exports=t.default,e.exports.default=t.default})(tn,tn.exports);var ia=tn.exports,wn={};(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 s=localStorage.getItem(a(l));if(!s)return null;let c;try{c=JSON.parse(s)}catch{return o(l),null}return c.expiration=new Date(c.expiration),c.expiration.getTime()<=Date.now()?(o(l),null):c}e.localStorageGetIdentity=r;function i(l,s){new Date(s.expiration).getTime()>Date.now()&&localStorage.setItem(a(l),JSON.stringify(s))}e.localStorageStoreIdentity=i;function o(l){localStorage.removeItem(a(l))}e.localStorageClearIdentity=o;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()}`}})(wn);Object.defineProperty(oe,"__esModule",{value:!0});oe.clearIdentity=oe.storeIdentity=oe.getIdentity=oe.init=void 0;const oa=ia,ae=wn,Si=ae.SINGLE_SIGN_ON_TARGET,gr=500,aa=5;let mr=0,st="";const sa={protocols:["https"],require_protocol:!0};function ca(e,t={}){if(!(0,oa.default)(e,{...sa,...t}))throw new Error(`Invalid url: ${e}`);if(st)throw new Error("Already initialized");const n=document.createElement("iframe");n.id=Si,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}oe.init=ca;async function la(e){let t;try{t=(await Ct(await Cn(),ae.Action.GET,{user:e})).identity??null}catch(n){_n(n),t=(0,ae.localStorageGetIdentity)(e)}return t}oe.getIdentity=la;async function ua(e,t){try{await Ct(await Cn(),ae.Action.STORE,{user:e,identity:t})}catch(n){_n(n),(0,ae.localStorageStoreIdentity)(e,t)}}oe.storeIdentity=ua;async function da(e){try{await Ct(await Cn(),ae.Action.CLEAR,{user:e})}catch(t){_n(t),(0,ae.localStorageClearIdentity)(e)}}oe.clearIdentity=da;async function Cn(){if(!st)throw new Error("Not initialized");for(let e=0;e<aa;e++){const n=document.getElementById(Si)?.contentWindow;if(!n){await fa(gr);continue}try{await Ct(n,ae.Action.PING,{},gr)}catch{continue}return n}throw new Error("Could not get iframe because it is not ready or cannot be communicated with")}async function Ct(e,t,n,r=0){mr++;const i=mr;let o=null;const a=new Promise((l,s)=>{o=({data:c})=>{!c||c.target!==ae.SINGLE_SIGN_ON_TARGET||c.id!==i||(c.error?s(new Error(c.error)):l(c))},window.addEventListener("message",o)});e.postMessage((0,ae.createMessage)({id:i,action:t,...n}),st);try{return await(r?Promise.race([a,new Promise((l,s)=>setTimeout(()=>s(new Error("Did not receive a response in time")),r))]):a)}catch(l){throw l}finally{o&&window.removeEventListener("message",o)}}function fa(e){return new Promise(t=>setTimeout(t,e))}function _n(e){console.warn("Could not get identity from iframe, falling back to localStorage. Error:",e.message)}(function(e){var t=Ye&&Ye.__createBinding||(Object.create?function(r,i,o,a){a===void 0&&(a=o);var l=Object.getOwnPropertyDescriptor(i,o);(!l||("get"in l?!i.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(r,a,l)}:function(r,i,o,a){a===void 0&&(a=o),r[a]=i[o]}),n=Ye&&Ye.__exportStar||function(r,i){for(var o in r)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,r,o)};Object.defineProperty(e,"__esModule",{value:!0}),n(oe,e),n(wn,e)})(Ci);const Ge=e=>e.wallet,pa=e=>Ge(e).address,ha=e=>Ge(e).isConnected,ga=e=>Ge(e).isConnecting,ma=e=>Ge(e).isDisconnecting,ya=e=>Ge(e).error,{useCallback:yr}=await M("react"),{useSelector:De}=await M("react-redux"),{useConnect:va,useDisconnect:ba}=await M("wagmi");function xi(){const e=De(pa),t=De(ha),n=De(ga),r=De(ma),i=De(ya),{connect:o,connectors:a,isPending:l}=va(),{disconnect:s,isPending:c}=ba(),v=yr(h=>{o({connector:h})},[o]),g=yr(()=>{s(),Zo()},[s]);return{address:e,isConnected:t,isConnecting:n||l,isDisconnecting:r||c,error:i,connectors:a,connect:v,disconnect:g}}await M("react");await M("react");await M("react-redux");await M("wagmi");await M("react-redux");await M("wagmi");var wa=class extends bi{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 Eo({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=Ze(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=Ze(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=Ze(e);if(typeof t=="string"){const r=this.#t.get(t)?.find(i=>i.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=Ze(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=>or(t,n))}findAll(e={}){return this.getAll().filter(t=>or(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(le))))}};function Ze(e){return e.options.scope?.id}var Ca=class extends bi{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,i=t.queryHash??wi(r,t);let o=this.get(i);return o||(o=new Io({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(o)),o}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=>ar(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>ar(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()})})}},_a=class{#e;#t;#n;#i;#o;#r;#a;#s;constructor(e={}){this.#e=e.queryCache||new Ca,this.#t=e.mutationCache||new wa,this.#n=e.defaultOptions||{},this.#i=new Map,this.#o=new Map,this.#r=0}mount(){this.#r++,this.#r===1&&(this.#a=ko.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=sr.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(cr(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}),o=this.#e.get(r.queryHash)?.state.data,a=To(t,o);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(i=>i.cancel(n)));return Promise.all(r).then(le).catch(le)}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(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let o=i.fetch(void 0,n);return n.throwOnError||(o=o.catch(le)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(le)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(cr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(le).catch(le)}fetchInfiniteQuery(e){return e.behavior=lr(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(le).catch(le)}ensureInfiniteQueryData(e){return e.behavior=lr(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return sr.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(ur(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#i.values()],n={};return t.forEach(r=>{dr(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#o.set(ur(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#o.values()],n={};return t.forEach(r=>{dr(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=wi(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===Ro&&(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:Sa}=await M("react"),{WagmiProvider:xa}=await M("wagmi");function Aa(){return new _a({defaultOptions:{queries:{staleTime:1e3*60,retry:1}}})}function ep({config:e,queryClient:t,children:n}){const r=Sa(()=>t??Aa(),[t]);return d.jsx(xa,{config:e,children:d.jsx(Po,{client:r,children:n})})}const{createSlice:Ea}=await M("@reduxjs/toolkit"),vr={chainId:null,isSupportedNetwork:!1,isNetworkSwitching:!1,error:null},Ia=Ea({name:"network",initialState:vr,reducers:{setChain(e,t){e.chainId=t.payload,e.isSupportedNetwork=t.payload!==null&&$o(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 vr}}}),{actions:br,reducer:ka}=Ia,{createSlice:Ta}=await M("@reduxjs/toolkit"),wr={address:null,isConnected:!1,isConnecting:!1,isDisconnecting:!1,error:null},Ra=Ta({name:"wallet",initialState:wr,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 wr}}}),{actions:Dt,reducer:Pa}=Ra,{useEffect:Cr}=await M("react"),{useDispatch:Ma}=await M("react-redux"),{useAccount:ja,useChainId:La}=await M("wagmi");function tp({children:e}){const t=Ma(),{address:n,isConnecting:r,isConnected:i,isReconnecting:o}=ja(),a=La();return Cr(()=>{i&&n?(t(Dt.setAccount(n)),t(br.setChain(a))):!i&&!r&&!o&&(t(Dt.reset()),t(br.setChain(null)))},[t,n,i,r,o,a]),Cr(()=>{t(Dt.setConnecting(r||o))},[t,r,o]),d.jsx(d.Fragment,{children:e})}const{createSlice:Da}=await M("@reduxjs/toolkit"),_r={transactions:{},pending:[]},Oa=Da({name:"transactions",initialState:_r,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:i}=t.payload,o=e.transactions[n];o&&(o.status=r,o.error=i,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 _r}}}),{actions:np,reducer:Na}=Oa;var $a=class extends Error{issues;constructor(e){super(e[0].message),this.name="SchemaError",this.issues=e}},Ai=(e=>(e.uninitialized="uninitialized",e.pending="pending",e.fulfilled="fulfilled",e.rejected="rejected",e))(Ai||{});function Sr(e){return{status:e,isUninitialized:e==="uninitialized",isLoading:e==="pending",isSuccess:e==="fulfilled",isError:e==="rejected"}}const{createAction:Re,createSlice:xe,createSelector:Ua,createAsyncThunk:xr,combineReducers:Fa,createNextState:Sn,isAnyOf:ct,isAllOf:Ot,isAction:qa,isPending:Ei,isRejected:xn,isFulfilled:ye,isRejectedWithValue:An,isAsyncThunkAction:Ar,prepareAutoBatched:Oe,SHOULD_AUTOBATCH:Ii,isPlainObject:We,nanoid:ki}=await M("@reduxjs/toolkit");var Er=We;function En(e,t){if(e===t||!(Er(e)&&Er(t)||Array.isArray(e)&&Array.isArray(t)))return t;const n=Object.keys(t),r=Object.keys(e);let i=n.length===r.length;const o=Array.isArray(t)?[]:{};for(const a of n)o[a]=En(e[a],t[a]),i&&(i=e[a]===o[a]);return i?e:o}var Ir=e=>[].concat(...e);function Qa(e){return new RegExp("(^|:)//").test(e)}function Ba(){return typeof document>"u"?!0:document.visibilityState!=="hidden"}function In(e){return e!=null}function kr(e){return[...e?.values()??[]].filter(In)}function Wa(){return typeof navigator>"u"||navigator.onLine===void 0?!0:navigator.onLine}var Ha=e=>e.replace(/\/$/,""),za=e=>e.replace(/^\//,"");function Ga(e,t){if(!e)return t;if(!t)return e;if(Qa(t))return t;const n=e.endsWith("/")||!t.startsWith("?")?"/":"";return e=Ha(e),t=za(t),`${e}${n}${t}`}function lt(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}var ln=()=>new Map,Tr=(...e)=>fetch(...e),Va=e=>e.status>=200&&e.status<=299,Ka=e=>/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"");function Rr(e){if(!We(e))return e;const t={...e};for(const[n,r]of Object.entries(t))r===void 0&&delete t[n];return t}var Ya=e=>typeof e=="object"&&(We(e)||Array.isArray(e)||typeof e.toJSON=="function");function Ja({baseUrl:e,prepareHeaders:t=g=>g,fetchFn:n=Tr,paramsSerializer:r,isJsonContentType:i=Ka,jsonContentType:o="application/json",jsonReplacer:a,timeout:l,responseHandler:s,validateStatus:c,...v}={}){return typeof fetch>"u"&&n===Tr&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),async(h,m,I)=>{const{getState:x,extra:b,endpoint:A,forced:C,type:y}=m;let u,{url:_,headers:R=new Headers(v.headers),params:T=void 0,responseHandler:P=s??"json",validateStatus:E=c??Va,timeout:f=l,...p}=typeof h=="string"?{url:h}:h,w,S=m.signal;f&&(w=new AbortController,m.signal.addEventListener("abort",w.abort),S=w.signal);let k={...v,signal:S,...p};R=new Headers(Rr(R)),k.headers=await t(R,{getState:x,arg:h,extra:b,endpoint:A,forced:C,type:y,extraOptions:I})||R;const j=Ya(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",o),j&&i(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=~_.indexOf("?")?"&":"?",F=r?r(T):new URLSearchParams(Rr(T));_+=B+F}_=Ga(e,_);const L=new Request(_,k);u={request:new Request(_,k)};let O,D=!1,$=w&&setTimeout(()=>{D=!0,w.abort()},f);try{O=await n(L)}catch(B){return{error:{status:D?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(B)},meta:u}}finally{$&&clearTimeout($),w?.signal.removeEventListener("abort",w.abort)}const Q=O.clone();u.response=Q;let G,W="";try{let B;if(await Promise.all([g(O,P).then(F=>G=F,F=>B=F),Q.text().then(F=>W=F,()=>{})]),B)throw B}catch(B){return{error:{status:"PARSING_ERROR",originalStatus:O.status,data:W,error:String(B)},meta:u}}return E(O,G)?{data:G,meta:u}:{error:{status:O.status,data:G},meta:u}};async function g(h,m){if(typeof m=="function")return m(h);if(m==="content-type"&&(m=i(h.headers)?"json":"text"),m==="json"){const I=await h.text();return I.length?JSON.parse(I):null}return h.text()}}var Pr=class{constructor(e,t=void 0){this.value=e,this.meta=t}},_t=Re("__rtkq/focused"),kn=Re("__rtkq/unfocused"),St=Re("__rtkq/online"),Tn=Re("__rtkq/offline"),Nt=!1;function Xa(e,t){function n(){const r=()=>e(_t()),i=()=>e(kn()),o=()=>e(St()),a=()=>e(Tn()),l=()=>{window.document.visibilityState==="visible"?r():i()};return Nt||typeof window<"u"&&window.addEventListener&&(window.addEventListener("visibilitychange",l,!1),window.addEventListener("focus",r,!1),window.addEventListener("online",o,!1),window.addEventListener("offline",a,!1),Nt=!0),()=>{window.removeEventListener("focus",r),window.removeEventListener("visibilitychange",l),window.removeEventListener("online",o),window.removeEventListener("offline",a),Nt=!1}}return n()}function xt(e){return e.type==="query"}function Za(e){return e.type==="mutation"}function At(e){return e.type==="infinitequery"}function ut(e){return xt(e)||At(e)}function Rn(e,t,n,r,i,o){return es(e)?e(t,n,r,i).filter(In).map(un).map(o):Array.isArray(e)?e.map(un).map(o):[]}function es(e){return typeof e=="function"}function un(e){return typeof e=="string"?{type:e}:e}await M("@reduxjs/toolkit");function ts(e,t){return e.catch(t)}var He=Symbol("forceQueryFn"),dn=e=>typeof e[He]=="function";function ns({serializeQueryArgs:e,queryThunk:t,infiniteQueryThunk:n,mutationThunk:r,api:i,context:o,getInternalState:a}){const l=u=>a(u)?.runningQueries,s=u=>a(u)?.runningMutations,{unsubscribeQueryResult:c,removeMutationResult:v,updateSubscriptionOptions:g}=i.internalActions;return{buildInitiateQuery:A,buildInitiateInfiniteQuery:C,buildInitiateMutation:y,getRunningQueryThunk:h,getRunningMutationThunk:m,getRunningQueriesThunk:I,getRunningMutationsThunk:x};function h(u,_){return R=>{const T=o.endpointDefinitions[u],P=e({queryArgs:_,endpointDefinition:T,endpointName:u});return l(R)?.get(P)}}function m(u,_){return R=>s(R)?.get(_)}function I(){return u=>kr(l(u))}function x(){return u=>kr(s(u))}function b(u,_){const R=(T,{subscribe:P=!0,forceRefetch:E,subscriptionOptions:f,[He]:p,...w}={})=>(S,k)=>{const j=e({queryArgs:T,endpointDefinition:_,endpointName:u});let L;const N={...w,type:"query",subscribe:P,forceRefetch:E,subscriptionOptions:f,endpointName:u,originalArgs:T,queryCacheKey:j,[He]:p};if(xt(_))L=t(N);else{const{direction:U,initialPageParam:q}=w;L=n({...N,direction:U,initialPageParam:q})}const O=i.endpoints[u].select(T),D=S(L),$=O(k()),{requestId:Q,abort:G}=D,W=$.requestId!==Q,B=l(S)?.get(j),F=()=>O(k()),K=Object.assign(p?D.then(F):W&&!B?Promise.resolve($):Promise.all([B,D]).then(F),{arg:T,requestId:Q,subscriptionOptions:f,queryCacheKey:j,abort:G,async unwrap(){const U=await K;if(U.isError)throw U.error;return U.data},refetch:()=>S(R(T,{subscribe:!1,forceRefetch:!0})),unsubscribe(){P&&S(c({queryCacheKey:j,requestId:Q}))},updateSubscriptionOptions(U){K.subscriptionOptions=U,S(g({endpointName:u,requestId:Q,queryCacheKey:j,options:U}))}});if(!B&&!W&&!p){const U=l(S);U.set(j,K),K.then(()=>{U.delete(j)})}return K};return R}function A(u,_){return b(u,_)}function C(u,_){return b(u,_)}function y(u){return(_,{track:R=!0,fixedCacheKey:T}={})=>(P,E)=>{const f=r({type:"mutation",endpointName:u,originalArgs:_,track:R,fixedCacheKey:T}),p=P(f),{requestId:w,abort:S,unwrap:k}=p,j=ts(p.unwrap().then(D=>({data:D})),D=>({error:D})),L=()=>{P(v({requestId:w,fixedCacheKey:T}))},N=Object.assign(j,{arg:p.arg,requestId:w,abort:S,unwrap:k,reset:L}),O=s(P);return O.set(w,N),N.then(()=>{O.delete(w)}),T&&(O.set(T,N),N.then(()=>{O.get(T)===N&&O.delete(T)})),N}}}var Ti=class extends $a{constructor(e,t,n,r){super(e),this.value=t,this.schemaName=n,this._bqMeta=r}},he=(e,t)=>Array.isArray(e)?e.includes(t):!!e;async function ge(e,t,n,r){const i=await e["~standard"].validate(t);if(i.issues)throw new Ti(i.issues,t,n,r);return i.value}function Mr(e){return e}var Ne=(e={})=>({...e,[Ii]:!0});function rs({reducerPath:e,baseQuery:t,context:{endpointDefinitions:n},serializeQueryArgs:r,api:i,assertTagType:o,selectors:a,onSchemaFailure:l,catchSchemaFailure:s,skipSchemaValidation:c}){const v=(p,w,S,k)=>(j,L)=>{const N=n[p],O=r({queryArgs:w,endpointDefinition:N,endpointName:p});if(j(i.internalActions.queryResultPatched({queryCacheKey:O,patches:S})),!k)return;const D=i.endpoints[p].select(w)(L()),$=Rn(N.providesTags,D.data,void 0,w,{},o);j(i.internalActions.updateProvidedBy([{queryCacheKey:O,providedTags:$}]))};function g(p,w,S=0){const k=[w,...p];return S&&k.length>S?k.slice(0,-1):k}function h(p,w,S=0){const k=[...p,w];return S&&k.length>S?k.slice(1):k}const m=(p,w,S,k=!0)=>(j,L)=>{const O=i.endpoints[p].select(w)(L()),D={patches:[],inversePatches:[],undo:()=>j(i.util.patchQueryData(p,w,D.inversePatches,k))};if(O.status==="uninitialized")return D;let $;if("data"in O)if(go(O.data)){const[Q,G,W]=yi(O.data,S);D.patches.push(...G),D.inversePatches.push(...W),$=Q}else $=S(O.data),D.patches.push({op:"replace",path:[],value:$}),D.inversePatches.push({op:"replace",path:[],value:O.data});return D.patches.length===0||j(i.util.patchQueryData(p,w,D.patches,k)),D},I=(p,w,S)=>k=>k(i.endpoints[p].initiate(w,{subscribe:!1,forceRefetch:!0,[He]:()=>({data:S})})),x=(p,w)=>p.query&&p[w]?p[w]:Mr,b=async(p,{signal:w,abort:S,rejectWithValue:k,fulfillWithValue:j,dispatch:L,getState:N,extra:O})=>{const D=n[p.endpointName],{metaSchema:$,skipSchemaValidation:Q=c}=D;try{let G=Mr;const W={signal:w,abort:S,dispatch:L,getState:N,extra:O,endpoint:p.endpointName,type:p.type,forced:p.type==="query"?A(p,N()):void 0,queryCacheKey:p.type==="query"?p.queryCacheKey:void 0},B=p.type==="query"?p[He]:void 0;let F;const K=async(q,H,V,pe)=>{if(H==null&&q.pages.length)return Promise.resolve({data:q});const ne={queryArg:p.originalArgs,pageParam:H},Ce=await U(ne),re=pe?g:h;return{data:{pages:re(q.pages,Ce.data,V),pageParams:re(q.pageParams,H,V)},meta:Ce.meta}};async function U(q){let H;const{extraOptions:V,argSchema:pe,rawResponseSchema:ne,responseSchema:Ce}=D;if(pe&&!he(Q,"arg")&&(q=await ge(pe,q,"argSchema",{})),B?H=B():D.query?(G=x(D,"transformResponse"),H=await t(D.query(q),W,V)):H=await D.queryFn(q,W,V,_e=>t(_e,W,V)),typeof process<"u",H.error)throw new Pr(H.error,H.meta);let{data:re}=H;ne&&!he(Q,"rawResponse")&&(re=await ge(ne,H.data,"rawResponseSchema",H.meta));let de=await G(re,H.meta,q);return Ce&&!he(Q,"response")&&(de=await ge(Ce,de,"responseSchema",H.meta)),{...H,data:de}}if(p.type==="query"&&"infiniteQueryOptions"in D){const{infiniteQueryOptions:q}=D,{maxPages:H=1/0}=q;let V;const pe={pages:[],pageParams:[]},ne=a.selectQueryEntry(N(),p.queryCacheKey)?.data,re=A(p,N())&&!p.direction||!ne?pe:ne;if("direction"in p&&p.direction&&re.pages.length){const de=p.direction==="backward",Ke=(de?Ri:fn)(q,re,p.originalArgs);V=await K(re,Ke,H,de)}else{const{initialPageParam:de=q.initialPageParam}=p,_e=ne?.pageParams??[],Ke=_e[0]??de,er=_e.length;V=await K(re,Ke,H),B&&(V={data:V.data.pages[0]});for(let tr=1;tr<er;tr++){const po=fn(q,V.data,p.originalArgs);V=await K(V.data,po,H)}}F=V}else F=await U(p.originalArgs);return $&&!he(Q,"meta")&&F.meta&&(F.meta=await ge($,F.meta,"metaSchema",F.meta)),j(F.data,Ne({fulfilledTimeStamp:Date.now(),baseQueryMeta:F.meta}))}catch(G){let W=G;if(W instanceof Pr){let B=x(D,"transformErrorResponse");const{rawErrorResponseSchema:F,errorResponseSchema:K}=D;let{value:U,meta:q}=W;try{F&&!he(Q,"rawErrorResponse")&&(U=await ge(F,U,"rawErrorResponseSchema",q)),$&&!he(Q,"meta")&&(q=await ge($,q,"metaSchema",q));let H=await B(U,q,p.originalArgs);return K&&!he(Q,"errorResponse")&&(H=await ge(K,H,"errorResponseSchema",q)),k(H,Ne({baseQueryMeta:q}))}catch(H){W=H}}try{if(W instanceof Ti){const B={endpoint:p.endpointName,arg:p.originalArgs,type:p.type,queryCacheKey:p.type==="query"?p.queryCacheKey:void 0};D.onSchemaFailure?.(W,B),l?.(W,B);const{catchSchemaFailure:F=s}=D;if(F)return k(F(W,B),Ne({baseQueryMeta:W._bqMeta}))}}catch(B){W=B}throw typeof process<"u",console.error(W),W}};function A(p,w){const S=a.selectQueryEntry(w,p.queryCacheKey),k=a.selectConfig(w).refetchOnMountOrArgChange,j=S?.fulfilledTimeStamp,L=p.forceRefetch??(p.subscribe&&k);return L?L===!0||(Number(new Date)-Number(j))/1e3>=L:!1}const C=()=>xr(`${e}/executeQuery`,b,{getPendingMeta({arg:w}){const S=n[w.endpointName];return Ne({startedTimeStamp:Date.now(),...At(S)?{direction:w.direction}:{}})},condition(w,{getState:S}){const k=S(),j=a.selectQueryEntry(k,w.queryCacheKey),L=j?.fulfilledTimeStamp,N=w.originalArgs,O=j?.originalArgs,D=n[w.endpointName],$=w.direction;return dn(w)?!0:j?.status==="pending"?!1:A(w,k)||xt(D)&&D?.forceRefetch?.({currentArg:N,previousArg:O,endpointState:j,state:k})?!0:!(L&&!$)},dispatchConditionRejection:!0}),y=C(),u=C(),_=xr(`${e}/executeMutation`,b,{getPendingMeta(){return Ne({startedTimeStamp:Date.now()})}}),R=p=>"force"in p,T=p=>"ifOlderThan"in p,P=(p,w,S={})=>(k,j)=>{const L=R(S)&&S.force,N=T(S)&&S.ifOlderThan,O=($=!0)=>{const Q={forceRefetch:$,subscribe:!1};return i.endpoints[p].initiate(w,Q)},D=i.endpoints[p].select(w)(j());if(L)k(O());else if(N){const $=D?.fulfilledTimeStamp;if(!$){k(O());return}(Number(new Date)-Number(new Date($)))/1e3>=N&&k(O())}else k(O(!1))};function E(p){return w=>w?.meta?.arg?.endpointName===p}function f(p,w){return{matchPending:Ot(Ei(p),E(w)),matchFulfilled:Ot(ye(p),E(w)),matchRejected:Ot(xn(p),E(w))}}return{queryThunk:y,mutationThunk:_,infiniteQueryThunk:u,prefetch:P,updateQueryData:m,upsertQueryData:I,patchQueryData:v,buildMatchThunkActions:f}}function fn(e,{pages:t,pageParams:n},r){const i=t.length-1;return e.getNextPageParam(t[i],t,n[i],n,r)}function Ri(e,{pages:t,pageParams:n},r){return e.getPreviousPageParam?.(t[0],t,n[0],n,r)}function Pi(e,t,n,r){return Rn(n[e.meta.arg.endpointName][t],ye(e)?e.payload:void 0,An(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,r)}function et(e,t,n){const r=e[t];r&&n(r)}function ze(e){return("arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)??e.requestId}function jr(e,t,n){const r=e[ze(t)];r&&n(r)}var tt={};function is({reducerPath:e,queryThunk:t,mutationThunk:n,serializeQueryArgs:r,context:{endpointDefinitions:i,apiUid:o,extractRehydrationInfo:a,hasRehydrationInfo:l},assertTagType:s,config:c}){const v=Re(`${e}/resetApiState`);function g(E,f,p,w){E[f.queryCacheKey]??={status:"uninitialized",endpointName:f.endpointName},et(E,f.queryCacheKey,S=>{S.status="pending",S.requestId=p&&S.requestId?S.requestId:w.requestId,f.originalArgs!==void 0&&(S.originalArgs=f.originalArgs),S.startedTimeStamp=w.startedTimeStamp;const k=i[w.arg.endpointName];At(k)&&"direction"in f&&(S.direction=f.direction)})}function h(E,f,p,w){et(E,f.arg.queryCacheKey,S=>{if(S.requestId!==f.requestId&&!w)return;const{merge:k}=i[f.arg.endpointName];if(S.status="fulfilled",k)if(S.data!==void 0){const{fulfilledTimeStamp:j,arg:L,baseQueryMeta:N,requestId:O}=f;let D=Sn(S.data,$=>k($,p,{arg:L.originalArgs,baseQueryMeta:N,fulfilledTimeStamp:j,requestId:O}));S.data=D}else S.data=p;else S.data=i[f.arg.endpointName].structuralSharing??!0?En(mo(S.data)?yo(S.data):S.data,p):p;delete S.error,S.fulfilledTimeStamp=f.fulfilledTimeStamp})}const m=xe({name:`${e}/queries`,initialState:tt,reducers:{removeQueryResult:{reducer(E,{payload:{queryCacheKey:f}}){delete E[f]},prepare:Oe()},cacheEntriesUpserted:{reducer(E,f){for(const p of f.payload){const{queryDescription:w,value:S}=p;g(E,w,!0,{arg:w,requestId:f.meta.requestId,startedTimeStamp:f.meta.timestamp}),h(E,{arg:w,requestId:f.meta.requestId,fulfilledTimeStamp:f.meta.timestamp,baseQueryMeta:{}},S,!0)}},prepare:E=>({payload:E.map(w=>{const{endpointName:S,arg:k,value:j}=w,L=i[S];return{queryDescription:{type:"query",endpointName:S,originalArgs:w.arg,queryCacheKey:r({queryArgs:k,endpointDefinition:L,endpointName:S})},value:j}}),meta:{[Ii]:!0,requestId:ki(),timestamp:Date.now()}})},queryResultPatched:{reducer(E,{payload:{queryCacheKey:f,patches:p}}){et(E,f,w=>{w.data=rr(w.data,p.concat())})},prepare:Oe()}},extraReducers(E){E.addCase(t.pending,(f,{meta:p,meta:{arg:w}})=>{const S=dn(w);g(f,w,S,p)}).addCase(t.fulfilled,(f,{meta:p,payload:w})=>{const S=dn(p.arg);h(f,p,w,S)}).addCase(t.rejected,(f,{meta:{condition:p,arg:w,requestId:S},error:k,payload:j})=>{et(f,w.queryCacheKey,L=>{if(!p){if(L.requestId!==S)return;L.status="rejected",L.error=j??k}})}).addMatcher(l,(f,p)=>{const{queries:w}=a(p);for(const[S,k]of Object.entries(w))(k?.status==="fulfilled"||k?.status==="rejected")&&(f[S]=k)})}}),I=xe({name:`${e}/mutations`,initialState:tt,reducers:{removeMutationResult:{reducer(E,{payload:f}){const p=ze(f);p in E&&delete E[p]},prepare:Oe()}},extraReducers(E){E.addCase(n.pending,(f,{meta:p,meta:{requestId:w,arg:S,startedTimeStamp:k}})=>{S.track&&(f[ze(p)]={requestId:w,status:"pending",endpointName:S.endpointName,startedTimeStamp:k})}).addCase(n.fulfilled,(f,{payload:p,meta:w})=>{w.arg.track&&jr(f,w,S=>{S.requestId===w.requestId&&(S.status="fulfilled",S.data=p,S.fulfilledTimeStamp=w.fulfilledTimeStamp)})}).addCase(n.rejected,(f,{payload:p,error:w,meta:S})=>{S.arg.track&&jr(f,S,k=>{k.requestId===S.requestId&&(k.status="rejected",k.error=p??w)})}).addMatcher(l,(f,p)=>{const{mutations:w}=a(p);for(const[S,k]of Object.entries(w))(k?.status==="fulfilled"||k?.status==="rejected")&&S!==k?.requestId&&(f[S]=k)})}}),x={tags:{},keys:{}},b=xe({name:`${e}/invalidation`,initialState:x,reducers:{updateProvidedBy:{reducer(E,f){for(const{queryCacheKey:p,providedTags:w}of f.payload){A(E,p);for(const{type:S,id:k}of w){const j=(E.tags[S]??={})[k||"__internal_without_id"]??=[];j.includes(p)||j.push(p)}E.keys[p]=w}},prepare:Oe()}},extraReducers(E){E.addCase(m.actions.removeQueryResult,(f,{payload:{queryCacheKey:p}})=>{A(f,p)}).addMatcher(l,(f,p)=>{const{provided:w}=a(p);for(const[S,k]of Object.entries(w.tags??{}))for(const[j,L]of Object.entries(k)){const N=(f.tags[S]??={})[j||"__internal_without_id"]??=[];for(const O of L)N.includes(O)||N.push(O),f.keys[O]=w.keys[O]}}).addMatcher(ct(ye(t),An(t)),(f,p)=>{C(f,[p])}).addMatcher(m.actions.cacheEntriesUpserted.match,(f,p)=>{const w=p.payload.map(({queryDescription:S,value:k})=>({type:"UNKNOWN",payload:k,meta:{requestStatus:"fulfilled",requestId:"UNKNOWN",arg:S}}));C(f,w)})}});function A(E,f){const p=E.keys[f]??[];for(const w of p){const S=w.type,k=w.id??"__internal_without_id",j=E.tags[S]?.[k];j&&(E.tags[S][k]=j.filter(L=>L!==f))}delete E.keys[f]}function C(E,f){const p=f.map(w=>{const S=Pi(w,"providesTags",i,s),{queryCacheKey:k}=w.meta.arg;return{queryCacheKey:k,providedTags:S}});b.caseReducers.updateProvidedBy(E,b.actions.updateProvidedBy(p))}const y=xe({name:`${e}/subscriptions`,initialState:tt,reducers:{updateSubscriptionOptions(E,f){},unsubscribeQueryResult(E,f){},internal_getRTKQSubscriptions(){}}}),u=xe({name:`${e}/internalSubscriptions`,initialState:tt,reducers:{subscriptionsUpdated:{reducer(E,f){return rr(E,f.payload)},prepare:Oe()}}}),_=xe({name:`${e}/config`,initialState:{online:Wa(),focused:Ba(),middlewareRegistered:!1,...c},reducers:{middlewareRegistered(E,{payload:f}){E.middlewareRegistered=E.middlewareRegistered==="conflict"||o!==f?"conflict":!0}},extraReducers:E=>{E.addCase(St,f=>{f.online=!0}).addCase(Tn,f=>{f.online=!1}).addCase(_t,f=>{f.focused=!0}).addCase(kn,f=>{f.focused=!1}).addMatcher(l,f=>({...f}))}}),R=Fa({queries:m.reducer,mutations:I.reducer,provided:b.reducer,subscriptions:u.reducer,config:_.reducer}),T=(E,f)=>R(v.match(f)?void 0:E,f),P={..._.actions,...m.actions,...y.actions,...u.actions,...I.actions,...b.actions,resetApiState:v};return{reducer:T,actions:P}}var te=Symbol.for("RTKQ/skipToken"),Mi={status:"uninitialized"},Lr=Sn(Mi,()=>{}),Dr=Sn(Mi,()=>{});function os({serializeQueryArgs:e,reducerPath:t,createSelector:n}){const r=y=>Lr,i=y=>Dr;return{buildQuerySelector:h,buildInfiniteQuerySelector:m,buildMutationSelector:I,selectInvalidatedBy:x,selectCachedArgsForQuery:b,selectApiState:a,selectQueries:l,selectMutations:c,selectQueryEntry:s,selectConfig:v};function o(y){return{...y,...Sr(y.status)}}function a(y){return y[t]}function l(y){return a(y)?.queries}function s(y,u){return l(y)?.[u]}function c(y){return a(y)?.mutations}function v(y){return a(y)?.config}function g(y,u,_){return R=>{if(R===te)return n(r,_);const T=e({queryArgs:R,endpointDefinition:u,endpointName:y});return n(E=>s(E,T)??Lr,_)}}function h(y,u){return g(y,u,o)}function m(y,u){const{infiniteQueryOptions:_}=u;function R(T){const P={...T,...Sr(T.status)},{isLoading:E,isError:f,direction:p}=P,w=p==="forward",S=p==="backward";return{...P,hasNextPage:A(_,P.data,P.originalArgs),hasPreviousPage:C(_,P.data,P.originalArgs),isFetchingNextPage:E&&w,isFetchingPreviousPage:E&&S,isFetchNextPageError:f&&w,isFetchPreviousPageError:f&&S}}return g(y,u,R)}function I(){return y=>{let u;return typeof y=="object"?u=ze(y)??te:u=y,n(u===te?i:T=>a(T)?.mutations?.[u]??Dr,o)}}function x(y,u){const _=y[t],R=new Set;for(const T of u.filter(In).map(un)){const P=_.provided.tags[T.type];if(!P)continue;let E=(T.id!==void 0?P[T.id]:Ir(Object.values(P)))??[];for(const f of E)R.add(f)}return Ir(Array.from(R.values()).map(T=>{const P=_.queries[T];return P?[{queryCacheKey:T,endpointName:P.endpointName,originalArgs:P.originalArgs}]:[]}))}function b(y,u){return Object.values(l(y)).filter(_=>_?.endpointName===u&&_.status!=="uninitialized").map(_=>_.originalArgs)}function A(y,u,_){return u?fn(y,u,_)!=null:!1}function C(y,u,_){return!u||!y.getPreviousPageParam?!1:Ri(y,u,_)!=null}}const{formatProdErrorMessage:as,formatProdErrorMessage:rp,formatProdErrorMessage:ip}=await M("@reduxjs/toolkit");var Or=WeakMap?new WeakMap:void 0,Nr=({endpointName:e,queryArgs:t})=>{let n="";const r=Or?.get(t);if(typeof r=="string")n=r;else{const i=JSON.stringify(t,(o,a)=>(a=typeof a=="bigint"?{$bigint:a.toString()}:a,a=We(a)?Object.keys(a).sort().reduce((l,s)=>(l[s]=a[s],l),{}):a,a));We(t)&&Or?.set(t,i),n=i}return`${e}(${n})`};function ss(...e){return function(n){const r=nr(c=>n.extractRehydrationInfo?.(c,{reducerPath:n.reducerPath??"api"})),i={reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1,invalidationBehavior:"delayed",...n,extractRehydrationInfo:r,serializeQueryArgs(c){let v=Nr;if("serializeQueryArgs"in c.endpointDefinition){const g=c.endpointDefinition.serializeQueryArgs;v=h=>{const m=g(h);return typeof m=="string"?m:Nr({...h,queryArgs:m})}}else n.serializeQueryArgs&&(v=n.serializeQueryArgs);return v(c)},tagTypes:[...n.tagTypes||[]]},o={endpointDefinitions:{},batch(c){c()},apiUid:ki(),extractRehydrationInfo:r,hasRehydrationInfo:nr(c=>r(c)!=null)},a={injectEndpoints:s,enhanceEndpoints({addTagTypes:c,endpoints:v}){if(c)for(const g of c)i.tagTypes.includes(g)||i.tagTypes.push(g);if(v)for(const[g,h]of Object.entries(v))typeof h=="function"?h(o.endpointDefinitions[g]):Object.assign(o.endpointDefinitions[g]||{},h);return a}},l=e.map(c=>c.init(a,i,o));function s(c){const v=c.endpoints({query:g=>({...g,type:"query"}),mutation:g=>({...g,type:"mutation"}),infiniteQuery:g=>({...g,type:"infinitequery"})});for(const[g,h]of Object.entries(v)){if(c.overrideExisting!==!0&&g in o.endpointDefinitions){if(c.overrideExisting==="throw")throw new Error(as(39));typeof process<"u";continue}typeof process<"u",o.endpointDefinitions[g]=h;for(const m of l)m.injectEndpoint(g,h)}return a}return a.injectEndpoints({endpoints:n.endpoints})}}const{formatProdErrorMessage:cs}=await M("@reduxjs/toolkit");function ls(){return function(){throw new Error(cs(33))}}function se(e,...t){return Object.assign(e,...t)}var us=({api:e,queryThunk:t,internalState:n,mwApi:r})=>{const i=`${e.reducerPath}/subscriptions`;let o=null,a=null;const{updateSubscriptionOptions:l,unsubscribeQueryResult:s}=e.internalActions,c=(x,b)=>{if(l.match(b)){const{queryCacheKey:C,requestId:y,options:u}=b.payload,_=x.get(C);return _?.has(y)&&_.set(y,u),!0}if(s.match(b)){const{queryCacheKey:C,requestId:y}=b.payload,u=x.get(C);return u&&u.delete(y),!0}if(e.internalActions.removeQueryResult.match(b))return x.delete(b.payload.queryCacheKey),!0;if(t.pending.match(b)){const{meta:{arg:C,requestId:y}}=b,u=lt(x,C.queryCacheKey,ln);return C.subscribe&&u.set(y,C.subscriptionOptions??u.get(y)??{}),!0}let A=!1;if(t.rejected.match(b)){const{meta:{condition:C,arg:y,requestId:u}}=b;if(C&&y.subscribe){const _=lt(x,y.queryCacheKey,ln);_.set(u,y.subscriptionOptions??_.get(u)??{}),A=!0}}return A},v=()=>n.currentSubscriptions,m={getSubscriptions:v,getSubscriptionCount:x=>v().get(x)?.size??0,isRequestSubscribed:(x,b)=>!!v()?.get(x)?.get(b)};function I(x){return JSON.parse(JSON.stringify(Object.fromEntries([...x].map(([b,A])=>[b,Object.fromEntries(A)]))))}return(x,b)=>{if(o||(o=I(n.currentSubscriptions)),e.util.resetApiState.match(x))return o={},n.currentSubscriptions.clear(),a=null,[!0,!1];if(e.internalActions.internal_getRTKQSubscriptions.match(x))return[!1,m];const A=c(n.currentSubscriptions,x);let C=!0;if(A){a||(a=setTimeout(()=>{const _=I(n.currentSubscriptions),[,R]=yi(o,()=>_);b.next(e.internalActions.subscriptionsUpdated(R)),o=_,a=null},500));const y=typeof x.type=="string"&&!!x.type.startsWith(i),u=t.rejected.match(x)&&x.meta.condition&&!!x.meta.arg.subscribe;C=!y&&!u}return[C,!1]}},ds=2147483647/1e3-1,fs=({reducerPath:e,api:t,queryThunk:n,context:r,internalState:i,selectors:{selectQueryEntry:o,selectConfig:a},getRunningQueryThunk:l,mwApi:s})=>{const{removeQueryResult:c,unsubscribeQueryResult:v,cacheEntriesUpserted:g}=t.internalActions,h=ct(v.match,n.fulfilled,n.rejected,g.match);function m(y){const u=i.currentSubscriptions.get(y);return u?u.size>0:!1}const I={};function x(y){for(const u of y.values())u?.abort?.()}const b=(y,u)=>{const _=u.getState(),R=a(_);if(h(y)){let T;if(g.match(y))T=y.payload.map(P=>P.queryDescription.queryCacheKey);else{const{queryCacheKey:P}=v.match(y)?y.payload:y.meta.arg;T=[P]}A(T,u,R)}if(t.util.resetApiState.match(y)){for(const[T,P]of Object.entries(I))P&&clearTimeout(P),delete I[T];x(i.runningQueries),x(i.runningMutations)}if(r.hasRehydrationInfo(y)){const{queries:T}=r.extractRehydrationInfo(y);A(Object.keys(T),u,R)}};function A(y,u,_){const R=u.getState();for(const T of y){const P=o(R,T);P?.endpointName&&C(T,P.endpointName,u,_)}}function C(y,u,_,R){const P=r.endpointDefinitions[u]?.keepUnusedDataFor??R.keepUnusedDataFor;if(P===1/0)return;const E=Math.max(0,Math.min(P,ds));if(!m(y)){const f=I[y];f&&clearTimeout(f),I[y]=setTimeout(()=>{if(!m(y)){const p=o(_.getState(),y);p?.endpointName&&_.dispatch(l(p.endpointName,p.originalArgs))?.abort(),_.dispatch(c({queryCacheKey:y}))}delete I[y]},E*1e3)}}return b},$r=new Error("Promise never resolved before cacheEntryRemoved."),ps=({api:e,reducerPath:t,context:n,queryThunk:r,mutationThunk:i,internalState:o,selectors:{selectQueryEntry:a,selectApiState:l}})=>{const s=Ar(r),c=Ar(i),v=ye(r,i),g={};function h(A,C,y){const u=g[A];u?.valueResolved&&(u.valueResolved({data:C,meta:y}),delete u.valueResolved)}function m(A){const C=g[A];C&&(delete g[A],C.cacheEntryRemoved())}const I=(A,C,y)=>{const u=x(A);function _(R,T,P,E){const f=a(y,T),p=a(C.getState(),T);!f&&p&&b(R,E,T,C,P)}if(r.pending.match(A))_(A.meta.arg.endpointName,u,A.meta.requestId,A.meta.arg.originalArgs);else if(e.internalActions.cacheEntriesUpserted.match(A))for(const{queryDescription:R,value:T}of A.payload){const{endpointName:P,originalArgs:E,queryCacheKey:f}=R;_(P,f,A.meta.requestId,E),h(f,T,{})}else if(i.pending.match(A))C.getState()[t].mutations[u]&&b(A.meta.arg.endpointName,A.meta.arg.originalArgs,u,C,A.meta.requestId);else if(v(A))h(u,A.payload,A.meta.baseQueryMeta);else if(e.internalActions.removeQueryResult.match(A)||e.internalActions.removeMutationResult.match(A))m(u);else if(e.util.resetApiState.match(A))for(const R of Object.keys(g))m(R)};function x(A){return s(A)?A.meta.arg.queryCacheKey:c(A)?A.meta.arg.fixedCacheKey??A.meta.requestId:e.internalActions.removeQueryResult.match(A)?A.payload.queryCacheKey:e.internalActions.removeMutationResult.match(A)?ze(A.payload):""}function b(A,C,y,u,_){const R=n.endpointDefinitions[A],T=R?.onCacheEntryAdded;if(!T)return;const P={},E=new Promise(j=>{P.cacheEntryRemoved=j}),f=Promise.race([new Promise(j=>{P.valueResolved=j}),E.then(()=>{throw $r})]);f.catch(()=>{}),g[y]=P;const p=e.endpoints[A].select(ut(R)?C:y),w=u.dispatch((j,L,N)=>N),S={...u,getCacheEntry:()=>p(u.getState()),requestId:_,extra:w,updateCachedData:ut(R)?j=>u.dispatch(e.util.updateQueryData(A,C,j)):void 0,cacheDataLoaded:f,cacheEntryRemoved:E},k=T(C,S);Promise.resolve(k).catch(j=>{if(j!==$r)throw j})}return I},hs=({api:e,context:{apiUid:t},reducerPath:n})=>(r,i)=>{e.util.resetApiState.match(r)&&i.dispatch(e.internalActions.middlewareRegistered(t)),typeof process<"u"},gs=({reducerPath:e,context:t,context:{endpointDefinitions:n},mutationThunk:r,queryThunk:i,api:o,assertTagType:a,refetchQuery:l,internalState:s})=>{const{removeQueryResult:c}=o.internalActions,v=ct(ye(r),An(r)),g=ct(ye(r,i),xn(r,i));let h=[];const m=(b,A)=>{v(b)?x(Pi(b,"invalidatesTags",n,a),A):g(b)?x([],A):o.util.invalidateTags.match(b)&&x(Rn(b.payload,void 0,void 0,void 0,void 0,a),A)};function I(b){const{queries:A,mutations:C}=b;for(const y of[A,C])for(const u in y)if(y[u]?.status==="pending")return!0;return!1}function x(b,A){const C=A.getState(),y=C[e];if(h.push(...b),y.config.invalidationBehavior==="delayed"&&I(y))return;const u=h;if(h=[],u.length===0)return;const _=o.util.selectInvalidatedBy(C,u);t.batch(()=>{const R=Array.from(_.values());for(const{queryCacheKey:T}of R){const P=y.queries[T],E=lt(s.currentSubscriptions,T,ln);P&&(E.size===0?A.dispatch(c({queryCacheKey:T})):P.status!=="uninitialized"&&A.dispatch(l(P)))}})}return m},ms=({reducerPath:e,queryThunk:t,api:n,refetchQuery:r,internalState:i})=>{const{currentPolls:o,currentSubscriptions:a}=i,l=new Set;let s=null;const c=(b,A)=>{(n.internalActions.updateSubscriptionOptions.match(b)||n.internalActions.unsubscribeQueryResult.match(b))&&v(b.payload.queryCacheKey,A),(t.pending.match(b)||t.rejected.match(b)&&b.meta.condition)&&v(b.meta.arg.queryCacheKey,A),(t.fulfilled.match(b)||t.rejected.match(b)&&!b.meta.condition)&&g(b.meta.arg,A),n.util.resetApiState.match(b)&&(I(),s&&(clearTimeout(s),s=null),l.clear())};function v(b,A){l.add(b),s||(s=setTimeout(()=>{for(const C of l)h({queryCacheKey:C},A);l.clear(),s=null},0))}function g({queryCacheKey:b},A){const C=A.getState()[e],y=C.queries[b],u=a.get(b);if(!y||y.status==="uninitialized")return;const{lowestPollingInterval:_,skipPollingIfUnfocused:R}=x(u);if(!Number.isFinite(_))return;const T=o.get(b);T?.timeout&&(clearTimeout(T.timeout),T.timeout=void 0);const P=Date.now()+_;o.set(b,{nextPollTimestamp:P,pollingInterval:_,timeout:setTimeout(()=>{(C.config.focused||!R)&&A.dispatch(r(y)),g({queryCacheKey:b},A)},_)})}function h({queryCacheKey:b},A){const y=A.getState()[e].queries[b],u=a.get(b);if(!y||y.status==="uninitialized")return;const{lowestPollingInterval:_}=x(u);if(!Number.isFinite(_)){m(b);return}const R=o.get(b),T=Date.now()+_;(!R||T<R.nextPollTimestamp)&&g({queryCacheKey:b},A)}function m(b){const A=o.get(b);A?.timeout&&clearTimeout(A.timeout),o.delete(b)}function I(){for(const b of o.keys())m(b)}function x(b=new Map){let A=!1,C=Number.POSITIVE_INFINITY;for(const y of b.values())y.pollingInterval&&(C=Math.min(y.pollingInterval,C),A=y.skipPollingIfUnfocused||A);return{lowestPollingInterval:C,skipPollingIfUnfocused:A}}return c},ys=({api:e,context:t,queryThunk:n,mutationThunk:r})=>{const i=Ei(n,r),o=xn(n,r),a=ye(n,r),l={};return(c,v)=>{if(i(c)){const{requestId:g,arg:{endpointName:h,originalArgs:m}}=c.meta,I=t.endpointDefinitions[h],x=I?.onQueryStarted;if(x){const b={},A=new Promise((_,R)=>{b.resolve=_,b.reject=R});A.catch(()=>{}),l[g]=b;const C=e.endpoints[h].select(ut(I)?m:g),y=v.dispatch((_,R,T)=>T),u={...v,getCacheEntry:()=>C(v.getState()),requestId:g,extra:y,updateCachedData:ut(I)?_=>v.dispatch(e.util.updateQueryData(h,m,_)):void 0,queryFulfilled:A};x(m,u)}}else if(a(c)){const{requestId:g,baseQueryMeta:h}=c.meta;l[g]?.resolve({data:c.payload,meta:h}),delete l[g]}else if(o(c)){const{requestId:g,rejectedWithValue:h,baseQueryMeta:m}=c.meta;l[g]?.reject({error:c.payload??c.error,isUnhandledError:!h,meta:m}),delete l[g]}}},vs=({reducerPath:e,context:t,api:n,refetchQuery:r,internalState:i})=>{const{removeQueryResult:o}=n.internalActions,a=(s,c)=>{_t.match(s)&&l(c,"refetchOnFocus"),St.match(s)&&l(c,"refetchOnReconnect")};function l(s,c){const v=s.getState()[e],g=v.queries,h=i.currentSubscriptions;t.batch(()=>{for(const m of h.keys()){const I=g[m],x=h.get(m);if(!x||!I)continue;const b=[...x.values()];(b.some(C=>C[c]===!0)||b.every(C=>C[c]===void 0)&&v.config[c])&&(x.size===0?s.dispatch(o({queryCacheKey:m})):I.status!=="uninitialized"&&s.dispatch(r(I)))}})}return a};function bs(e){const{reducerPath:t,queryThunk:n,api:r,context:i,getInternalState:o}=e,{apiUid:a}=i,l={invalidateTags:Re(`${t}/invalidateTags`)},s=h=>h.type.startsWith(`${t}/`),c=[hs,fs,gs,ms,ps,ys];return{middleware:h=>{let m=!1;const I=o(h.dispatch),x={...e,internalState:I,refetchQuery:g,isThisApiSliceAction:s,mwApi:h},b=c.map(y=>y(x)),A=us(x),C=vs(x);return y=>u=>{if(!qa(u))return y(u);m||(m=!0,h.dispatch(r.internalActions.middlewareRegistered(a)));const _={...h,next:y},R=h.getState(),[T,P]=A(u,_,R);let E;if(T?E=y(u):E=P,h.getState()[t]&&(C(u,_,R),s(u)||i.hasRehydrationInfo(u)))for(const f of b)f(u,_,R);return E}},actions:l};function g(h){return e.api.endpoints[h.endpointName].initiate(h.originalArgs,{subscribe:!1,forceRefetch:!0})}}var Ur=Symbol(),ws=({createSelector:e=Ua}={})=>({name:Ur,init(t,{baseQuery:n,tagTypes:r,reducerPath:i,serializeQueryArgs:o,keepUnusedDataFor:a,refetchOnMountOrArgChange:l,refetchOnFocus:s,refetchOnReconnect:c,invalidationBehavior:v,onSchemaFailure:g,catchSchemaFailure:h,skipSchemaValidation:m},I){ho();const x=U=>(typeof process<"u",U);Object.assign(t,{reducerPath:i,endpoints:{},internalActions:{onOnline:St,onOffline:Tn,onFocus:_t,onFocusLost:kn},util:{}});const b=os({serializeQueryArgs:o,reducerPath:i,createSelector:e}),{selectInvalidatedBy:A,selectCachedArgsForQuery:C,buildQuerySelector:y,buildInfiniteQuerySelector:u,buildMutationSelector:_}=b;se(t.util,{selectInvalidatedBy:A,selectCachedArgsForQuery:C});const{queryThunk:R,infiniteQueryThunk:T,mutationThunk:P,patchQueryData:E,updateQueryData:f,upsertQueryData:p,prefetch:w,buildMatchThunkActions:S}=rs({baseQuery:n,reducerPath:i,context:I,api:t,serializeQueryArgs:o,assertTagType:x,selectors:b,onSchemaFailure:g,catchSchemaFailure:h,skipSchemaValidation:m}),{reducer:k,actions:j}=is({context:I,queryThunk:R,infiniteQueryThunk:T,mutationThunk:P,serializeQueryArgs:o,reducerPath:i,assertTagType:x,config:{refetchOnFocus:s,refetchOnReconnect:c,refetchOnMountOrArgChange:l,keepUnusedDataFor:a,reducerPath:i,invalidationBehavior:v}});se(t.util,{patchQueryData:E,updateQueryData:f,upsertQueryData:p,prefetch:w,resetApiState:j.resetApiState,upsertQueryEntries:j.cacheEntriesUpserted}),se(t.internalActions,j);const L=new WeakMap,N=U=>lt(L,U,()=>({currentSubscriptions:new Map,currentPolls:new Map,runningQueries:new Map,runningMutations:new Map})),{buildInitiateQuery:O,buildInitiateInfiniteQuery:D,buildInitiateMutation:$,getRunningMutationThunk:Q,getRunningMutationsThunk:G,getRunningQueriesThunk:W,getRunningQueryThunk:B}=ns({queryThunk:R,mutationThunk:P,infiniteQueryThunk:T,api:t,serializeQueryArgs:o,context:I,getInternalState:N});se(t.util,{getRunningMutationThunk:Q,getRunningMutationsThunk:G,getRunningQueryThunk:B,getRunningQueriesThunk:W});const{middleware:F,actions:K}=bs({reducerPath:i,context:I,queryThunk:R,mutationThunk:P,infiniteQueryThunk:T,api:t,assertTagType:x,selectors:b,getRunningQueryThunk:B,getInternalState:N});return se(t.util,K),se(t,{reducer:k,middleware:F}),{name:Ur,injectEndpoint(U,q){const H=t,V=H.endpoints[U]??={};xt(q)&&se(V,{name:U,select:y(U,q),initiate:O(U,q)},S(R,U)),Za(q)&&se(V,{name:U,select:_(),initiate:$(U)},S(P,U)),At(q)&&se(V,{name:U,select:u(U,q),initiate:D(U,q)},S(R,U))}}}});await M("@reduxjs/toolkit");const{batch:Cs,useDispatch:_s,useSelector:Ss,useStore:xs}=await M("react-redux");function nt(e){return e.replace(e[0],e[0].toUpperCase())}function As(e){return e.type==="query"}function Es(e){return e.type==="mutation"}function ji(e){return e.type==="infinitequery"}function $e(e,...t){return Object.assign(e,...t)}const{formatProdErrorMessage:op,formatProdErrorMessage:Is}=await M("@reduxjs/toolkit"),{useCallback:me,useDebugValue:$t,useEffect:Ie,useLayoutEffect:ks,useMemo:X,useRef:Ae,useState:Fr}=await M("react"),{shallowEqual:Ut}=await M("react-redux");var Ft=Symbol();const{useEffect:Ts,useRef:Rs,useMemo:Ps}=await M("react");function qt(e){const t=Rs(e),n=Ps(()=>En(t.current,e),[e]);return Ts(()=>{t.current!==n&&(t.current=n)},[n]),n}const{useEffect:Ms,useRef:js}=await M("react"),{shallowEqual:qr}=await M("react-redux");function rt(e){const t=js(e);return Ms(()=>{qr(t.current,e)||(t.current=e)},[e]),qr(t.current,e)?t.current:e}var Ls=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Ds=Ls(),Os=()=>typeof navigator<"u"&&navigator.product==="ReactNative",Ns=Os(),$s=()=>Ds||Ns?ks:Ie,Us=$s(),Qr=e=>e.isUninitialized?{...e,isUninitialized:!1,isFetching:!0,isLoading:e.data===void 0,status:Ai.pending}:e;function Qt(e,...t){const n={};return t.forEach(r=>{n[r]=e[r]}),n}var Bt=["data","status","isLoading","isSuccess","isError","error"];function Fs({api:e,moduleOptions:{batch:t,hooks:{useDispatch:n,useSelector:r,useStore:i},unstable__sideEffectsInRender:o,createSelector:a},serializeQueryArgs:l,context:s}){const c=o?u=>u():Ie;return{buildQueryHooks:A,buildInfiniteQueryHooks:C,buildMutationHook:y,usePrefetch:h};function v(u,_,R){if(_?.endpointName&&u.isUninitialized){const{endpointName:w}=_,S=s.endpointDefinitions[w];R!==te&&l({queryArgs:_.originalArgs,endpointDefinition:S,endpointName:w})===l({queryArgs:R,endpointDefinition:S,endpointName:w})&&(_=void 0)}let T=u.isSuccess?u.data:_?.data;T===void 0&&(T=u.data);const P=T!==void 0,E=u.isLoading,f=(!_||_.isLoading||_.isUninitialized)&&!P&&E,p=u.isSuccess||P&&(E&&!_?.isError||u.isUninitialized);return{...u,data:T,currentData:u.data,isFetching:E,isLoading:f,isSuccess:p}}function g(u,_,R){if(_?.endpointName&&u.isUninitialized){const{endpointName:w}=_,S=s.endpointDefinitions[w];R!==te&&l({queryArgs:_.originalArgs,endpointDefinition:S,endpointName:w})===l({queryArgs:R,endpointDefinition:S,endpointName:w})&&(_=void 0)}let T=u.isSuccess?u.data:_?.data;T===void 0&&(T=u.data);const P=T!==void 0,E=u.isLoading,f=(!_||_.isLoading||_.isUninitialized)&&!P&&E,p=u.isSuccess||E&&P;return{...u,data:T,currentData:u.data,isFetching:E,isLoading:f,isSuccess:p}}function h(u,_){const R=n(),T=rt(_);return me((P,E)=>R(e.util.prefetch(u,P,{...T,...E})),[u,R,T])}function m(u,_,{refetchOnReconnect:R,refetchOnFocus:T,refetchOnMountOrArgChange:P,skip:E=!1,pollingInterval:f=0,skipPollingIfUnfocused:p=!1,...w}={}){const{initiate:S}=e.endpoints[u],k=n(),j=Ae(void 0);if(!j.current){const F=k(e.internalActions.internal_getRTKQSubscriptions());j.current=F}const L=qt(E?te:_),N=rt({refetchOnReconnect:R,refetchOnFocus:T,pollingInterval:f,skipPollingIfUnfocused:p}),O=w.initialPageParam,D=rt(O),$=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 c(()=>{B&&($.current=void 0)},[B]),c(()=>{const F=$.current;if(typeof process<"u",L===te){F?.unsubscribe(),$.current=void 0;return}const K=$.current?.subscriptionOptions;if(!F||F.arg!==L){F?.unsubscribe();const U=k(S(L,{subscriptionOptions:N,forceRefetch:P,...ji(s.endpointDefinitions[u])?{initialPageParam:D}:{}}));$.current=U}else N!==K&&F.updateSubscriptionOptions(N)},[k,S,P,L,N,B,D,u]),[$,k,S,N]}function I(u,_){return(T,{skip:P=!1,selectFromResult:E}={})=>{const{select:f}=e.endpoints[u],p=qt(P?te:T),w=Ae(void 0),S=X(()=>a([f(p),(O,D)=>D,O=>p],_,{memoizeOptions:{resultEqualityCheck:Ut}}),[f,p]),k=X(()=>E?a([S],E,{devModeChecks:{identityFunctionCheck:"never"}}):S,[S,E]),j=r(O=>k(O,w.current),Ut),L=i(),N=S(L.getState(),w.current);return Us(()=>{w.current=N},[N]),j}}function x(u){Ie(()=>()=>{u.current?.unsubscribe?.(),u.current=void 0},[u])}function b(u){if(!u.current)throw new Error(Is(38));return u.current.refetch()}function A(u){const _=(P,E={})=>{const[f]=m(u,P,E);return x(f),X(()=>({refetch:()=>b(f)}),[f])},R=({refetchOnReconnect:P,refetchOnFocus:E,pollingInterval:f=0,skipPollingIfUnfocused:p=!1}={})=>{const{initiate:w}=e.endpoints[u],S=n(),[k,j]=Fr(Ft),L=Ae(void 0),N=rt({refetchOnReconnect:P,refetchOnFocus:E,pollingInterval:f,skipPollingIfUnfocused:p});c(()=>{const Q=L.current?.subscriptionOptions;N!==Q&&L.current?.updateSubscriptionOptions(N)},[N]);const O=Ae(N);c(()=>{O.current=N},[N]);const D=me(function(Q,G=!1){let W;return t(()=>{L.current?.unsubscribe(),L.current=W=S(w(Q,{subscriptionOptions:O.current,forceRefetch:!G})),j(Q)}),W},[S,w]),$=me(()=>{L.current?.queryCacheKey&&S(e.internalActions.removeQueryResult({queryCacheKey:L.current?.queryCacheKey}))},[S]);return Ie(()=>()=>{L?.current?.unsubscribe()},[]),Ie(()=>{k!==Ft&&!L.current&&D(k,!0)},[k,D]),X(()=>[D,k,{reset:$}],[D,k,$])},T=I(u,v);return{useQueryState:T,useQuerySubscription:_,useLazyQuerySubscription:R,useLazyQuery(P){const[E,f,{reset:p}]=R(P),w=T(f,{...P,skip:f===Ft}),S=X(()=>({lastArg:f}),[f]);return X(()=>[E,{...w,reset:p},S],[E,w,p,S])},useQuery(P,E){const f=_(P,E),p=T(P,{selectFromResult:P===te||E?.skip?void 0:Qr,...E}),w=Qt(p,...Bt);return $t(w),X(()=>({...p,...f}),[p,f])}}}function C(u){const _=(T,P={})=>{const[E,f,p,w]=m(u,T,P),S=Ae(w);c(()=>{S.current=w},[w]);const k=me(function(N,O){let D;return t(()=>{E.current?.unsubscribe(),E.current=D=f(p(N,{subscriptionOptions:S.current,direction:O}))}),D},[E,f,p]);x(E);const j=qt(P.skip?te:T),L=me(()=>b(E),[E]);return X(()=>({trigger:k,refetch:L,fetchNextPage:()=>k(j,"forward"),fetchPreviousPage:()=>k(j,"backward")}),[L,k,j])},R=I(u,g);return{useInfiniteQueryState:R,useInfiniteQuerySubscription:_,useInfiniteQuery(T,P){const{refetch:E,fetchNextPage:f,fetchPreviousPage:p}=_(T,P),w=R(T,{selectFromResult:T===te||P?.skip?void 0:Qr,...P}),S=Qt(w,...Bt,"hasNextPage","hasPreviousPage");return $t(S),X(()=>({...w,fetchNextPage:f,fetchPreviousPage:p,refetch:E}),[w,f,p,E])}}}function y(u){return({selectFromResult:_,fixedCacheKey:R}={})=>{const{select:T,initiate:P}=e.endpoints[u],E=n(),[f,p]=Fr();Ie(()=>()=>{f?.arg.fixedCacheKey||f?.reset()},[f]);const w=me(function(Q){const G=E(P(Q,{fixedCacheKey:R}));return p(G),G},[E,P,R]),{requestId:S}=f||{},k=X(()=>T({fixedCacheKey:R,requestId:f?.requestId}),[R,f,T]),j=X(()=>_?a([k],_):k,[_,k]),L=r(j,Ut),N=R==null?f?.arg.originalArgs:void 0,O=me(()=>{t(()=>{f&&p(void 0),R&&E(e.internalActions.removeMutationResult({requestId:S,fixedCacheKey:R}))})},[E,R,f,S]),D=Qt(L,...Bt,"endpointName");$t(D);const $=X(()=>({...L,originalArgs:N,reset:O}),[L,N,O]);return X(()=>[w,$],[w,$])}}}var qs=Symbol(),Qs=({batch:e=Cs,hooks:t={useDispatch:_s,useSelector:Ss,useStore:xs},createSelector:n=vo,unstable__sideEffectsInRender:r=!1,...i}={})=>({name:qs,init(o,{serializeQueryArgs:a},l){const s=o,{buildQueryHooks:c,buildInfiniteQueryHooks:v,buildMutationHook:g,usePrefetch:h}=Fs({api:o,moduleOptions:{batch:e,hooks:t,unstable__sideEffectsInRender:r,createSelector:n},serializeQueryArgs:a,context:l});return $e(s,{usePrefetch:h}),$e(l,{batch:e}),{injectEndpoint(m,I){if(As(I)){const{useQuery:x,useLazyQuery:b,useLazyQuerySubscription:A,useQueryState:C,useQuerySubscription:y}=c(m);$e(s.endpoints[m],{useQuery:x,useLazyQuery:b,useLazyQuerySubscription:A,useQueryState:C,useQuerySubscription:y}),o[`use${nt(m)}Query`]=x,o[`useLazy${nt(m)}Query`]=b}if(Es(I)){const x=g(m);$e(s.endpoints[m],{useMutation:x}),o[`use${nt(m)}Mutation`]=x}else if(ji(I)){const{useInfiniteQuery:x,useInfiniteQuerySubscription:b,useInfiniteQueryState:A}=v(m);$e(s.endpoints[m],{useInfiniteQuery:x,useInfiniteQuerySubscription:b,useInfiniteQueryState:A}),o[`use${nt(m)}InfiniteQuery`]=x}}}}});await M("@reduxjs/toolkit");await M("react");await M("react");await M("react");await M("react-redux");var Li=ss(ws(),Qs());const Bs="/auth",Ws="pk_live_CE856A4938B36648",Hs="https://notifications.decentraland.zone",zs="https://peer.decentraland.zone",Gs="f0S2L1sWumT8BPjBmIBDTN5gIWjhrRHG",Vs="https://events.decentraland.zone/api",Ks="https://realm-provider-ea.decentraland.org/hot-scenes",Ys="61570c542c2d66c659492e5b24a41522",Js="https://places.decentraland.zone/api",Xs={AUTH_URL:Bs,MAGIC_API_KEY:Ws,NOTIFICATIONS_API_URL:Hs,PEER_URL:zs,SEGMENT_API_KEY:Gs,EVENTS_API_URL:Vs,HOT_SCENES_URL:Ks,WALLET_CONNECT_PROJECT_ID:Ys,PLACES_API_URL:Js},Zs="/auth",ec="pk_live_212568025B158355",tc="https://notifications.decentraland.org",nc="https://peer.decentraland.org",rc="f0S2L1sWumT8BPjBmIBDTN5gIWjhrRHG",ic="https://events.decentraland.org/api",oc="https://realm-provider-ea.decentraland.org/hot-scenes",ac="61570c542c2d66c659492e5b24a41522",sc="https://places.decentraland.org/api",cc={AUTH_URL:Zs,MAGIC_API_KEY:ec,NOTIFICATIONS_API_URL:tc,PEER_URL:nc,SEGMENT_API_KEY:rc,EVENTS_API_URL:ic,HOT_SCENES_URL:oc,WALLET_CONNECT_PROJECT_ID:ac,PLACES_API_URL:sc},lc="/auth",uc="pk_live_CE856A4938B36648",dc="https://notifications.decentraland.org",fc="https://peer.decentraland.org",pc="f0S2L1sWumT8BPjBmIBDTN5gIWjhrRHG",hc="https://events.decentraland.org/api",gc="https://realm-provider-ea.decentraland.org/hot-scenes",mc="61570c542c2d66c659492e5b24a41522",yc="https://places.decentraland.org/api",vc={AUTH_URL:lc,MAGIC_API_KEY:uc,NOTIFICATIONS_API_URL:dc,PEER_URL:fc,SEGMENT_API_KEY:pc,EVENTS_API_URL:hc,HOT_SCENES_URL:gc,WALLET_CONNECT_PROJECT_ID:mc,PLACES_API_URL:yc};var bc={VITE_REACT_APP_WEBSITE_VERSION:"0.0.1-24478945478.commit-fbe29bc",VITE_BASE_URL:"https://cdn.decentraland.org/@dcl/explore-site/0.0.1-24478945478.commit-fbe29bc",BASE_URL:"https://cdn.decentraland.org/@dcl/explore-site/0.0.1-24478945478.commit-fbe29bc",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const wc=bo({[Mt.DEVELOPMENT]:Xs,[Mt.STAGING]:vc,[Mt.PRODUCTION]:cc},{systemEnvVariables:{REACT_APP_DCL_DEFAULT_ENV:bc.VITE_REACT_APP_DCL_DEFAULT_ENV??"dev"}}),ie=e=>wc.get(e),Di=xo.signedFetchFactory();function Cc(e,t,n){return Di(e,{method:n,identity:t})}function Br(e,t){return t?Di(e,{method:"GET",identity:t}):fetch(e)}const _c=5;function Qe(e,t){return`${e},${t}`}function Sc(e,t){for(const[n,r]of t){const i=e.get(Qe(n,r));if(i)return i}}function Oi(e){return e.toLowerCase().includes("genesis plaza")}function xc(e){const t=e.find(r=>Oi(r.name)),n=t?Qe(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 Ac(e,t,n=_c){const r=t.filter(c=>c.usersTotalCount>=n),i=new Map(e.map(c=>[Qe(c.x,c.y),c])),o=[],a=new Set,l=new Set;for(const c of r){const v=Sc(i,c.parcels);v&&!l.has(v.id)&&(o.push({id:v.id,type:"event",title:v.name,image:v.image||"",users:c.usersTotalCount,coordinates:Qe(v.x,v.y),creatorAddress:v.user,creatorName:v.user_name||void 0,isGenesisPlaza:!1}),a.add(c.id),l.add(v.id))}o.sort((c,v)=>v.users-c.users);const s=r.filter(c=>!a.has(c.id)).sort((c,v)=>v.usersTotalCount-c.usersTotalCount);for(const c of s){const v=Oi(c.name);o.push({id:c.id,type:"place",title:c.name,image:c.thumbnail,users:c.usersTotalCount,coordinates:Qe(c.baseCoords[0],c.baseCoords[1]),...v&&{creatorName:"Decentraland Foundation"},isGenesisPlaza:v})}return o.length===0&&o.push(xc(t)),o}async function Ec(e,t){const{placesUrl:n,peerUrl:r}=t,i=e.filter(a=>a.type==="place");if(i.length===0)return e;const o=new Map;return await Promise.all(i.map(async a=>{const l={};if(n)try{const s=await fetch(`${n}/places?positions=${a.coordinates}`);if(s.ok){const v=(await s.json()).data?.[0];v&&(l.description=v.description||null,l.categories=v.categories||[])}}catch(s){console.warn("[LiveNow] places lookup failed for",a.coordinates,s)}if(r&&!a.creatorAddress)try{const s=await fetch(`${r}/content/entities/active`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({pointers:[a.coordinates]})});if(s.ok){const v=(await s.json())[0]?.id;if(v){const g=await fetch(`${r}/content/deployments/?entityId=${encodeURIComponent(v)}`);if(g.ok){const m=(await g.json()).deployments?.[0]?.deployedBy;m&&(l.creatorAddress=m)}}}}catch(s){console.warn("[LiveNow] deployer lookup failed for",a.coordinates,s)}Object.keys(l).length>0&&o.set(a.id,l)})),o.size===0?e:e.map(a=>{const l=o.get(a.id);return l?{...a,...l}:a})}function Wr(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=Li({reducerPath:"eventsClient",baseQuery:Ja({baseUrl:"/"}),tagTypes:["Events","LiveNow"],keepUnusedDataFor:60,endpoints:e=>({getEvents:e.query({serializeQueryArgs:({queryArgs:{identity:t,...n}})=>({...n,authenticated:!!t}),queryFn:async t=>{try{const{identity:n,...r}=t,i=ie("EVENTS_API_URL"),o=Wr(r),a=await Br(`${i}/events?${o}`,n);if(!a.ok)throw new Error(`Events API error: ${a.status}`);return{data:(await a.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=ie("EVENTS_API_URL"),r=ie("HOT_SCENES_URL"),[i,o]=await Promise.all([fetch(`${n}/events?list=live&limit=20&order=asc&world=false`),fetch(r)]);if(!i.ok||!o.ok)throw new Error("Failed to fetch live events or hot scenes");const[a,l]=await Promise.all([i.json(),o.json()]),s=t&&"minUsers"in t?t.minUsers:void 0,c=Ac(a.data??[],l,s);return{data:await Ec(c,{placesUrl:ie("PLACES_API_URL"),peerUrl:ie("PEER_URL")})}}catch(n){return{error:{status:"FETCH_ERROR",error:n instanceof Error?n.message:"Unknown error"}}}},providesTags:["LiveNow"]}),getUpcomingEvents:e.query({serializeQueryArgs:({queryArgs:t})=>{if(t&&"identity"in t){const{identity:n,...r}=t;return{...r,authenticated:!!n}}return{authenticated:!1}},queryFn:async t=>{try{const n=t&&"identity"in t?t.identity:void 0,r=ie("EVENTS_API_URL"),i=new Date,o=new Date(i.getTime()+24*60*60*1e3),a=Wr({list:"upcoming",limit:10,order:"asc",world:!1,from:i.toISOString(),to:o.toISOString()}),l=await Br(`${r}/events?${a}`,n);if(!l.ok)throw new Error(`Events API error: ${l.status}`);return{data:(await l.json()).data??[]}}catch(n){return{error:{status:"FETCH_ERROR",error:n instanceof Error?n.message:"Unknown error"}}}},providesTags:["Events"]}),toggleAttendee:e.mutation({queryFn:async({eventId:t,attending:n,identity:r})=>{try{const i=ie("EVENTS_API_URL"),o=n?"POST":"DELETE",a=encodeURIComponent(t),l=await Cc(`${i}/events/${a}/attendees`,r,o);if(!l.ok)throw new Error(`Attendees API error: ${l.status}`);return{data:await l.json()}}catch(i){return{error:{status:"FETCH_ERROR",error:i instanceof Error?i.message:"Unknown error"}}}},invalidatesTags:["Events"]})})}),{useGetEventsQuery:Ic,useGetLiveNowCardsQuery:Ni,useGetUpcomingEventsQuery:kc,useToggleAttendeeMutation:Tc}=dt;async function Rc(e){try{const t=ie("PEER_URL"),n=await fetch(`${t}/lambdas/profiles/${e.toLowerCase()}`);return n.ok?await n.json()??null:null}catch{return null}}const ft=Li({reducerPath:"profileClient",baseQuery:ls(),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 Rc(t)}}catch{return{data:null}}},providesTags:(t,n,r)=>r?[{type:"Profile",id:r}]:[]})})}),{useGetProfileQuery:Pe}=ft,{combineReducers:Pc,configureStore:Mc}=await M("@reduxjs/toolkit"),jc=Pc({network:ka,transactions:Na,wallet:Pa,[ft.reducerPath]:ft.reducer,[dt.reducerPath]:dt.reducer}),Lc=Mc({reducer:jc,middleware:e=>e().concat(ft.middleware,dt.middleware),devTools:!1});Xa(Lc.dispatch);const Dc={title:"Live Now"},Oc={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!"},Nc={go_to_page:"Go to page {page}"},$c={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"},Uc={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"},Fc={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."},qc={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"},ap={live_now:Dc,upcoming:Oc,pagination:Nc,event_detail:$c,all_experiences:Uc,create_event:Fc,host_banner:qc};function Qc(){const e=ie("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 Bc(e){return e.startsWith("/")&&!e.startsWith("//")}function Wc(){const e=window.location.pathname,t=window.location.search,r=new URLSearchParams(t).get("redirectTo");return r&&Bc(r)?r:`${e}${t}`}function $i(e){const t=e??Wc(),n=Qc();Xo(),window.location.replace(`${n}/login?redirectTo=${encodeURIComponent(t)}`)}const{useCallback:Wt,useEffect:Hc,useMemo:zc,useState:Gc}=await M("react"),{useNotifications:Vc}=await M("@dcl/hooks"),{NotificationActiveTab:Kc}=await M("decentraland-ui2");function Yc(e){const{identity:t,isConnected:n,locale:r="en"}=e,i=!!(t&&n),[o,a]=Gc(!0),l=ie("NOTIFICATIONS_API_URL")??"https://notifications.decentraland.org";Hc(()=>{i||a(!0)},[i]);const s=Wt(()=>{i&&a(u=>u&&!1)},[i]),{notifications:c,isLoading:v,isModalOpen:g,isNotificationsOnboarding:h,modalActiveTab:m,handleNotificationsOpen:I,handleOnBegin:x,handleOnChangeModalTab:b}=Vc({identity:t??void 0,isNotificationsEnabled:i&&o,initialActiveTab:Kc.NEWEST,notificationsUrl:l,onError:s}),A=Wt(()=>{o||a(!0),I()},[I,o]),C=Wt((u,_)=>{b(_)},[b]);return{notificationProps:zc(()=>{if(i)return{locale:r,isLoading:v,isOnboarding:h,isOpen:g,items:c,activeTab:m,onClick:A,onClose:A,onBegin:x,onChangeTab:C}},[i,r,v,h,g,c,m,A,x,C])}}const{useEffect:Jc,useState:Xc}=await M("react");function Me(){const{address:e}=xi(),t=e||void 0,[n,r]=Xc(void 0);return Jc(()=>{if(!t){r(void 0);return}try{const i=Ci.localStorageGetIdentity(t.toLowerCase());r(i??void 0)}catch(i){console.error("[useAuthIdentity] Failed to get identity:",i),r(void 0)}},[t]),{identity:n,hasValidIdentity:!!n,address:t}}const{Box:Ui,styled:Fi}=await M("decentraland-ui2"),Zc=Fi(Ui)(()=>({minHeight:"100vh",display:"flex",flexDirection:"column",background:"linear-gradient(180deg, #1A0A2E 0%, #0D0116 100%)"})),el=Fi(Ui)({flex:1,width:"100%"}),{useCallback:Hr,useMemo:tl}=await M("react"),{useLocation:nl}=await M("react-router-dom"),{usePageTracking:rl}=await M("@dcl/hooks"),{Footer:il,FooterLanding:ol,Navbar:al,SupportedLanguage:sl}=await M("decentraland-ui2");function cl(e){const{children:t}=e,n=nl(),{address:r,isConnected:i,isConnecting:o,isDisconnecting:a,disconnect:l}=xi();rl(n.pathname);const{identity:s}=Me(),{notificationProps:c}=Yc({identity:s,isConnected:i,locale:"en"}),{data:v}=Pe(r??void 0,{skip:!r}),g=v?.avatars?.[0],h=Hr(()=>{$i()},[]),m=Hr(()=>{l()},[l]),I=tl(()=>({isSignedIn:i,isSigningIn:o,isDisconnecting:a,isActivity:!1,address:r||void 0,avatar:g,notifications:c,onClickSignIn:h,onClickSignOut:m,onClickNavbarItem:x=>{const b=x.currentTarget;b?.href&&(window.location.href=b.href)}}),[i,o,a,r,g,c,h,m]);return d.jsxs(Zc,{children:[d.jsx(al,{...I}),d.jsx(el,{children:t}),d.jsx(ol,{}),d.jsx(il,{languages:[{code:sl.EN,name:"English",flag:"🇺🇸"}],hideSocialNetworks:!0})]})}var Pn={},ll=be;Object.defineProperty(Pn,"__esModule",{value:!0});var qi=Pn.default=void 0,ul=ll(ve()),dl=d;qi=Pn.default=(0,ul.default)((0,dl.jsx)("path",{d:"M17.77 3.77 16 2 6 12l10 10 1.77-1.77L9.54 12z"}),"ArrowBackIosNew");const{useEffect:fl,useState:pl}=await M("react"),hl=5,Qi=[{query:"(min-width: 1536px)",columns:hl},{query:"(min-width: 1200px)",columns:4},{query:"(min-width: 900px)",columns:3},{query:"(min-width: 600px)",columns:2}];function zr(){for(const{query:e,columns:t}of Qi)if(window.matchMedia(e).matches)return t;return 1}function gl(){const[e,t]=pl(zr);return fl(()=>{const n=Qi.map(({query:i})=>window.matchMedia(i)),r=()=>{t(zr())};for(const i of n)i.addEventListener("change",r);return()=>{for(const i of n)i.removeEventListener("change",r)}},[]),e}function Bi(e,t){if(t<1)return[];const n=[];for(let r=0;r<e.length;r+=t)n.push(e.slice(r,r+t));return n}function Mn(e,t){const n=new Date(e);return n.setDate(n.getDate()+t),n}function ml(e){const t=new Date(e);return t.setHours(0,0,0,0),t}function yl(e){const t=new Date(e);return t.setHours(23,59,59,999),t}function Gr(e){return{from:ml(e).toISOString(),to:yl(e).toISOString()}}function pn(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function vl(e,t,n=new Date){if(pn(e,n))return t("all_experiences.today");const r=Mn(n,1);if(pn(e,r))return t("all_experiences.tomorrow");const i=e.toLocaleDateString(void 0,{weekday:"short"}),o=e.toLocaleDateString(void 0,{month:"short"}),a=e.getDate();return`${i}, ${o} ${a}`}function Wi(e){return e.toLocaleDateString(void 0,{weekday:"long",month:"long",day:"numeric",year:"numeric"})}var jn={},bl=be;Object.defineProperty(jn,"__esModule",{value:!0});var Hi=jn.default=void 0,wl=bl(ve()),Cl=d;Hi=jn.default=(0,wl.default)((0,Cl.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 _l(e,t){return`https://decentraland.org/jump?position=${e},${t}`}function Ln(e,t){return`https://decentraland.org/jump/event?position=${e},${t}`}function Sl(e){const[t,n]=e.split(",").map(Number);return Number.isNaN(t)||Number.isNaN(n)?[0,0]:[t,n]}function Dn(e){if(!e.startAt)return null;const t=o=>new Date(o).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 On={},xl=be;Object.defineProperty(On,"__esModule",{value:!0});var zi=On.default=void 0,Al=xl(ve()),El=d;zi=On.default=(0,Al.default)((0,El.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:Il,Typography:we,styled:z}=await M("decentraland-ui2"),Ht=64,kl=z(Il)(({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,overflowY:"auto",overflowX:"hidden",backgroundColor:"transparent",boxShadow:"0px 4px 25px 0px #FFFFFF40",display:"flex",flexDirection:"column",scrollbarWidth:"none"},"& .MuiDialog-paper::-webkit-scrollbar":{display:"none"},[e.breakpoints.down("sm")]:{"& .MuiDialog-paper":{borderRadius:0,maxWidth:"100%",maxHeight:`calc(100% - ${Ht}px)`,height:`calc(100% - ${Ht}px)`,margin:0,marginTop:Ht,backgroundColor:"#1A0A2E"}}})),Tl=z(ue)(({theme:e})=>({position:"relative",width:880,height:450,maxWidth:"100%",overflow:"hidden",flexShrink:0,[e.breakpoints.down("sm")]:{width:"100%",height:"auto"}})),Rl=z("img")(({theme:e})=>({position:"absolute",top:0,left:0,width:"100%",height:"100%",objectFit:"cover",[e.breakpoints.down("sm")]:{position:"relative",aspectRatio:"16 / 9",height:"auto"}})),Pl=z(ue)(({theme:e})=>({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%)",[e.breakpoints.down("sm")]:{display:"none"}})),Ml=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},[e.breakpoints.down("sm")]:{top:e.spacing(1),left:e.spacing(1),right:"auto"}})),jl=z(zi)({fontSize:20,color:"#FCFCFC"}),Ll=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),[e.breakpoints.down("sm")]:{position:"relative",padding:e.spacing(2),background:"linear-gradient(180deg, #1A0A2E 0%, #32134C 100%)"}})),Dl=z(we)({fontSize:14,fontWeight:600,color:"#FCFCFC",textTransform:"uppercase",letterSpacing:"0.04em"}),Ol=z(we)({fontSize:32,fontWeight:600,lineHeight:1.24,color:"#FCFCFC",overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical"}),Nl=z(ue)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(1)})),$l=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"})),Ul=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})),Fl=z(we)({fontSize:14,lineHeight:1,color:"#FCFCFC",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}),ql=z("span")({color:"#FF2D55"}),Ql=z(ue)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(1)})),Bl=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}})),Vr=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}})),Wl=z("button")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"transparent",border:"1px solid #FCFCFC",borderRadius:e.spacing(1),padding:e.spacing(1,2),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}})),Hl=z(vi)({fontSize:18,color:"#FCFCFC"}),zl=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),flex:1,[e.breakpoints.down("sm")]:{padding:e.spacing(3,2)}})),Kr=z(we)(({theme:e})=>({fontSize:14,fontWeight:600,lineHeight:1.75,textTransform:"uppercase",color:"#A09BA8",marginBottom:e.spacing(1)})),Gl=z(we)({fontSize:14,lineHeight:1.6,color:"#FCFCFC"}),Vl=z(ue)(({theme:e})=>({height:1,backgroundColor:"rgba(255, 255, 255, 0.15)",margin:e.spacing(2,0)})),Kl=z(ue)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",gap:e.spacing(1.5)})),Yl=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}}),Jl=z(we)({fontSize:14,lineHeight:1.5,color:"#FCFCFC"}),Xl=z(we)(({theme:e})=>({fontSize:12,color:"#A09BA8",marginTop:e.spacing(.5)})),{useCallback:Zl}=await M("react"),{useTranslation:eu}=await M("@dcl/hooks");function tu(e){return new Date(e).toLocaleDateString(void 0,{weekday:"short",month:"short",day:"numeric"})}function Yr(e){return new Date(e).toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit",hour12:!0})}function nu(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 ru({data:e}){const{t}=eu(),n=!!e.description,r=!!e.startAt,i=Zl(()=>{const a=Dn(e);a&&window.open(a,"_blank","noopener,noreferrer")},[e]);if(!n&&!r)return null;const o=e.recurrent?nu(e.recurrentFrequency,t):null;return d.jsxs(zl,{children:[n&&d.jsxs(d.Fragment,{children:[d.jsx(Kr,{children:t("event_detail.what_to_expect")}),d.jsx(Gl,{children:e.description})]}),n&&r&&d.jsx(Vl,{}),r&&e.startAt&&d.jsxs(d.Fragment,{children:[d.jsx(Kr,{children:t("event_detail.schedule")}),d.jsxs(Kl,{children:[d.jsxs("div",{children:[d.jsxs(Jl,{children:[tu(e.startAt)," · ",Yr(e.startAt),e.finishAt&&` – ${Yr(e.finishAt)}`]}),o&&d.jsx(Xl,{children:o})]}),d.jsx(Yl,{onClick:i,"aria-label":t("event_detail.add_to_calendar"),children:d.jsx(Hi,{})})]})]})]})}var Nn={},iu=be;Object.defineProperty(Nn,"__esModule",{value:!0});var $n=Nn.default=void 0,ou=iu(ve()),au=d;$n=Nn.default=(0,ou.default)((0,au.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");const{useCallback:su,useEffect:Jr,useRef:cu,useState:Xr}=await M("react");function Un(e,t){const{identity:n,hasValidIdentity:r}=Me(),[i,{isLoading:o}]=Tc({fixedCacheKey:`remind-${e}`}),[a,l]=Xr(!1),[s,c]=Xr(null),v=cu(),g=!!t,h=s!==null?s:g;Jr(()=>{s!==null&&s===g&&c(null)},[s,g]),Jr(()=>()=>clearTimeout(v.current),[]);const m=su(I=>{if(I.stopPropagation(),o)return;if(!r||!n){$i();return}const x=!h;c(x),l(!0),clearTimeout(v.current),v.current=setTimeout(()=>l(!1),600),i({eventId:e,attending:x,identity:n}).unwrap().catch(()=>c(null))},[e,h,r,n,o,i]);return{isReminded:h,isLoading:o,isShaking:a,handleToggle:m}}const{styled:Fn}=await M("decentraland-ui2"),lu="M5.4167 9.44547C5.44685 7.63928 6.21335 5.91687 7.55087 4.64979C8.88839 3.38271 10.6897 2.6725 12.5663 2.67236C14.4429 2.67223 16.2444 3.38217 17.5821 4.64907C18.9198 5.91596 19.6866 7.63825 19.717 9.44444L19.7173 12.2663L21.4284 15.9735C21.4888 16.1045 21.5143 16.2479 21.5025 16.3907C21.4907 16.5335 21.4421 16.6712 21.361 16.7914C21.2799 16.9115 21.169 17.0103 21.0382 17.0787C20.9074 17.1471 20.7609 17.183 20.6121 17.1831L15.3891 17.1835L15.3919 17.1891L9.73956 17.1894L9.74313 17.1835L4.52097 17.1824C4.37215 17.1824 4.2257 17.1465 4.0949 17.0782C3.96411 17.0099 3.85311 16.9112 3.77197 16.7911C3.69084 16.671 3.64213 16.5333 3.63028 16.3905C3.61843 16.2477 3.6438 16.1043 3.7041 15.9733L5.41606 12.2689L5.41581 9.44696L5.4167 9.44547ZM7.20443 9.44545L7.20361 12.4516C7.20351 12.5717 7.17727 12.6905 7.1266 12.8002L5.89689 15.4632L19.2368 15.4629L18.006 12.7997C17.9557 12.69 17.9298 12.5713 17.93 12.4514L17.9284 9.44595C17.9026 8.09324 17.3262 6.80431 16.3233 5.85649C15.3203 4.90867 13.971 4.37771 12.5655 4.37784C11.16 4.37797 9.81067 4.90918 8.80791 5.85719C7.80515 6.80519 7.22904 8.09422 7.20354 9.44694L7.20443 9.44545Z",uu="M9.48535 18.7616C9.59625 19.475 9.96951 20.1265 10.5372 20.5974C11.1049 21.0683 11.8294 21.3274 12.5788 21.3275C13.3282 21.3277 14.0528 21.0689 14.6207 20.5982C15.1886 20.1276 15.5622 19.4763 15.6734 18.7629L9.48535 18.7616Z",du="M15.6737 18.7625C15.5625 19.4758 15.1888 20.1277 14.621 20.5984C14.0531 21.069 13.3282 21.328 12.579 21.3279C11.8296 21.3277 11.1047 21.0683 10.537 20.5974C9.96927 20.1265 9.59613 19.4749 9.48522 18.7615L15.6737 18.7625ZM12.5663 2.67261C14.4428 2.67251 16.2442 3.38232 17.5819 4.64917C17.9225 4.97176 18.2253 5.32444 18.4891 5.69995L16.4413 7.74976L16.1805 7.48901C15.0869 6.3954 13.3142 6.39538 12.2206 7.48901C11.1271 8.58265 11.127 10.3554 12.2206 11.449L14.4608 13.6892C14.9859 14.2141 15.6988 14.5095 16.4413 14.5095C17.1837 14.5093 17.8958 14.2142 18.4208 13.6892L19.7567 12.3523L21.4286 15.9734C21.4889 16.1042 21.5135 16.2477 21.5018 16.3904C21.4901 16.5332 21.4423 16.6716 21.3612 16.7917C21.2801 16.9119 21.1687 17.0105 21.038 17.0789C20.9073 17.1472 20.7609 17.1832 20.6122 17.1833H15.3885L15.3915 17.1892H9.73913L9.74304 17.1833L4.52038 17.1824C4.37169 17.1823 4.22528 17.1462 4.0946 17.0779C3.96389 17.0095 3.85245 16.9108 3.77136 16.7908C3.69038 16.6708 3.64159 16.533 3.62975 16.3904C3.61793 16.2476 3.6437 16.1043 3.70397 15.9734L5.41589 12.2693V9.44702L5.41686 9.44507C5.44712 7.63911 6.21335 5.91712 7.55065 4.65015C8.88817 3.38306 10.6897 2.67274 12.5663 2.67261Z",fu="M20.0042 6.3392C20.4417 5.90174 21.1508 5.90174 21.5882 6.3392C22.0257 6.77666 22.0257 7.48574 21.5882 7.9232L17.1075 12.4039C16.8974 12.614 16.6126 12.7321 16.3155 12.7321C16.0184 12.7321 15.7336 12.614 15.5235 12.4039L13.2832 10.1635C12.8457 9.72609 12.8457 9.01701 13.2832 8.57955C13.7206 8.14209 14.4297 8.14209 14.8672 8.57955L16.3155 10.0279L20.0042 6.3392Z",pu=Fn("span")({position:"relative",display:"inline-flex",flexShrink:0,transformOrigin:"top center","@keyframes bellShake":{"0%":{transform:"rotate(0)"},"15%":{transform:"rotate(14deg)"},"30%":{transform:"rotate(-14deg)"},"45%":{transform:"rotate(10deg)"},"60%":{transform:"rotate(-8deg)"},"75%":{transform:"rotate(4deg)"},"85%":{transform:"rotate(-2deg)"},"100%":{transform:"rotate(0)"}},"&.shake":{animation:"bellShake 0.6s ease-in-out"}}),Zr=Fn("svg")({position:"absolute",inset:0,transition:"opacity 0.3s ease"}),hu=Fn("path")({transformOrigin:"17px 9px",transition:"opacity 0.25s ease 0.15s, transform 0.25s ease 0.15s","&.hidden":{opacity:0,transform:"scale(0)",transition:"opacity 0.15s ease, transform 0.15s ease"}});function pt({active:e,shaking:t,className:n,size:r=18}){const i=[n,t?"shake":""].filter(Boolean).join(" ")||void 0;return d.jsxs(pu,{className:i,style:{width:r,height:r},children:[d.jsxs(Zr,{viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",style:{opacity:e?0:1},children:[d.jsx("path",{d:lu,fill:"currentColor"}),d.jsx("path",{d:uu,fill:"currentColor"})]}),d.jsxs(Zr,{viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",style:{opacity:e?1:0},children:[d.jsx("path",{d:du,fill:"#FF2D55"}),d.jsx(hu,{className:e?"":"hidden",d:fu,fill:"#FF2D55"})]})]})}const{useCallback:zt,useState:gu}=await M("react"),{useTranslation:mu}=await M("@dcl/hooks"),{Tooltip:Gt,useTheme:yu}=await M("decentraland-ui2"),vu=`${window.location.origin}/dcl-logo.svg`.replace(/^http:\/\//,"https://");function bu({data:e,onClose:t}){const{t:n}=mu(),r=yu(),i=wo(r.breakpoints.down("sm")),[o,a]=gu(!1),{isReminded:l,isLoading:s,isShaking:c,handleToggle:v}=Un(e.id,e.attending),g=e.creatorName?.toLowerCase()==="decentraland foundation",{data:h}=Pe(e.creatorAddress,{skip:!e.creatorAddress||g}),m=h?.avatars?.[0],I=g?vu:m?.avatar?.snapshots?.face256,x=g?"Decentraland Foundation":m?.name||e.creatorName,b=!!(I||x),A=zt(()=>{window.open(e.url,"_blank","noopener,noreferrer")},[e.url]),C=zt(()=>{navigator.clipboard?.writeText(e.url)?.then(()=>{a(!0),setTimeout(()=>a(!1),2e3)}).catch(_=>console.warn("[EventDetailModal] Failed to copy:",_))},[e.url]),y=zt(()=>{const _=Dn(e);_&&window.open(_,"_blank","noopener,noreferrer")},[e]),u=e.live?n("event_detail.live_now"):e.categories[0]||null;return d.jsx(d.Fragment,{children:d.jsxs(Tl,{children:[e.image&&d.jsx(Rl,{src:e.image,alt:e.name}),d.jsx(Pl,{}),d.jsx(Ml,{onClick:t,"aria-label":n("event_detail.close"),children:i?d.jsx(qi,{sx:{fontSize:20,color:"#FCFCFC"}}):d.jsx(jl,{})}),d.jsxs(Ll,{children:[u&&d.jsx(Dl,{children:u}),d.jsx(Ol,{id:"event-detail-title",children:e.name}),b&&d.jsxs(Nl,{children:[I?d.jsx($l,{src:I,alt:x??""}):d.jsx(Ul,{}),d.jsxs(Fl,{children:[n("event_detail.by_prefix"),d.jsx(ql,{children:x})]})]}),d.jsxs(Ql,{children:[d.jsx(Bl,{onClick:A,children:n("event_detail.jump_in")}),d.jsx(Gt,{title:n("event_detail.remind_me"),placement:"top",arrow:!0,children:d.jsx(Vr,{onClick:v,disabled:s,"aria-label":n("event_detail.remind_me"),children:d.jsx(pt,{active:l,shaking:c,size:20})})}),e.startAt&&d.jsx(Gt,{title:n("event_detail.add_to_calendar"),placement:"top",arrow:!0,children:d.jsx(Vr,{onClick:y,"aria-label":n("event_detail.add_to_calendar"),children:d.jsx($n,{fontSize:"small"})})}),d.jsx(Gt,{title:n(o?"event_detail.copied":"event_detail.copy_link"),placement:"top",arrow:!0,children:d.jsx(Wl,{onClick:C,"aria-label":n("event_detail.copy_link"),children:d.jsx(Hl,{})})})]})]})]})})}function qn({open:e,onClose:t,data:n}){return d.jsx(kl,{open:e&&!!n,onClose:t,"aria-labelledby":"event-detail-title",fullWidth:!0,children:n&&d.jsxs(d.Fragment,{children:[d.jsx(bu,{data:n,onClose:t}),d.jsx(ru,{data:n})]})})}function Gi(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,attending:e.attending,live:e.live,categories:e.categories,url:Ln(e.x,e.y)}}function wu(e){const[t,n]=Sl(e.coordinates),r=e.type==="event"?Ln(t,n):_l(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,attending:void 0,live:!0,categories:e.categories||[],url:r}}const Cu="data:image/webp;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQq0AAAAAElFTkSuQmCC",_u="data:image/webp;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQq0AAAAAElFTkSuQmCC";var Qn={},Su=be;Object.defineProperty(Qn,"__esModule",{value:!0});var Vi=Qn.default=void 0,xu=Su(ve()),Au=d;Vi=Qn.default=(0,xu.default)((0,Au.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:Bn,Typography:Wn,styled:ee}=await M("decentraland-ui2"),Eu=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"}})),Iu=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"}})),ku=ee(Bn)(({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)}})),Tu=ee(Wn)(({theme:e})=>({fontSize:"1.5rem",fontWeight:600,lineHeight:1.334,color:e.palette.text.primary})),Ru=ee(Wn)(({theme:e})=>({fontSize:16,fontWeight:400,lineHeight:1.5,color:e.palette.text.secondary})),Vt=ee(Bn)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(1)})),Kt=ee(Vi)(({theme:e})=>({fontSize:20,color:e.palette.primary.main})),Yt=ee(Wn)(({theme:e})=>({fontSize:14,fontWeight:400,color:e.palette.text.primary})),Pu=ee(Bn)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(2),marginTop:e.spacing(1),[e.breakpoints.down("sm")]:{flexDirection:"column",alignItems:"stretch"}})),Mu=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}})),ju=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}})),Lu=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:ei}=await M("react"),{useNavigate:Du}=await M("react-router-dom"),{useTranslation:Ou}=await M("@dcl/hooks"),Nu="https://docs.decentraland.org/creator/events/";function $u(){const{t:e}=Ou(),t=Du(),n=ei(()=>{t("/create")},[t]),r=ei(()=>{window.open(Nu,"_blank","noopener")},[]);return d.jsxs(Eu,{"aria-label":e("host_banner.title"),children:[d.jsx(Iu,{src:Cu,alt:"","aria-hidden":"true"}),d.jsxs(ku,{children:[d.jsx(Tu,{children:e("host_banner.title")}),d.jsx(Ru,{children:e("host_banner.subtitle")}),d.jsxs("div",{children:[d.jsxs(Vt,{children:[d.jsx(Kt,{}),d.jsx(Yt,{children:e("host_banner.check_1")})]}),d.jsxs(Vt,{children:[d.jsx(Kt,{}),d.jsx(Yt,{children:e("host_banner.check_2")})]}),d.jsxs(Vt,{children:[d.jsx(Kt,{}),d.jsx(Yt,{children:e("host_banner.check_3")})]})]}),d.jsxs(Pu,{children:[d.jsxs(Mu,{onClick:n,children:[d.jsx(Co,{sx:{fontSize:18}}),e("host_banner.create_event")]}),d.jsx(ju,{onClick:r,children:e("host_banner.learn_more")})]})]}),d.jsx(Lu,{src:_u,alt:"","aria-hidden":"true"})]})}const{useCallback:ti,useEffect:Uu,useRef:ni,useState:ri}=await M("react");function Ki(e){const t=Ln(e.x,e.y),[n,r]=ri(!1),[i,o]=ri(!1),a=ni(null),l=ni(null);Uu(()=>()=>{a.current&&clearTimeout(a.current),l.current&&clearTimeout(l.current)},[]);const s=ti(v=>{v.stopPropagation(),navigator.clipboard?.writeText(t)?.then(()=>{r(!0),a.current&&clearTimeout(a.current),a.current=setTimeout(()=>r(!1),2e3)}).catch(g=>console.warn("[useCardActions] Failed to copy:",g))},[t]),c=ti(v=>{v.stopPropagation();const g=Dn({name:e.name,description:e.description,startAt:e.startAt,finishAt:e.finishAt,x:e.x,y:e.y,url:t});g&&(window.open(g,"calendar","width=1090,height=870,noopener,noreferrer"),o(!0),l.current&&clearTimeout(l.current),l.current=setTimeout(()=>o(!1),2e3))},[e.name,e.description,e.startAt,e.finishAt,e.x,e.y,t]);return{eventUrl:t,copied:n,calendarAdded:i,handleCopy:s,handleAddToCalendar:c}}function Yi(e,t){const n=Date.now(),i=new Date(e).getTime()-n;if(i<=0)return ii(e);const o=Math.round(i/6e4);if(o<60)return t("upcoming.starts_in_mins",{count:o});const a=Math.round(o/60);return a<24?t("upcoming.starts_in_hours",{count:a}):ii(e)}function ii(e){return new Date(e).toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit",hour12:!0})}function ht({size:e=18,style:t,className:n}){return d.jsxs("svg",{width:e,height:e,viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{flexShrink:0,...t},className:n,children:[d.jsx("path",{d:"M8.286 1.865v3.976M16.237 1.865v3.976",stroke:"currentColor",strokeWidth:"1.036",strokeLinecap:"round",strokeLinejoin:"round"}),d.jsx("rect",{x:"3.425",y:"4.142",width:"17.889",height:"17.889",rx:"3.667",stroke:"currentColor",strokeWidth:"2.073"}),d.jsx("path",{d:"M3.316 8.872h17.89",stroke:"currentColor",strokeWidth:"1.036",strokeLinecap:"round",strokeLinejoin:"round"}),d.jsx("path",{d:"M15.546 15.035h-2.665v2.665h-.888v-2.665H9.328v-.888h2.665v-2.665h.888v2.665h2.665v.888Z",fill:"currentColor"})]})}const{Box:Et,Typography:Ji,dclColors:Y,styled:J}=await M("decentraland-ui2"),Hn="#D9D8DB",Fu="#00B453",gt=J("button")(()=>({display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:Y.neutral.gray5,border:"none",borderRadius:8,padding:6,width:30,height:30,flexShrink:0,color:Y.neutral.softBlack1,cursor:"pointer",transition:"background-color 0.2s ease, color 0.35s ease","&:hover":{backgroundColor:Hn},'&[data-active="true"]':{color:Y.base.primary,transition:"color 0.15s ease"},"&:disabled":{opacity:.5,cursor:"default"},"&:focus-visible":{outline:`2px solid ${Y.neutral.softWhite}`,outlineOffset:2}})),zn=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:Hn},"&:focus-visible":{outline:`2px solid ${Y.neutral.softWhite}`,outlineOffset:2}})),qu={fontSize:12,fontWeight:600,textTransform:"uppercase",whiteSpace:"nowrap"},mt=J("span")({...qu,"@container (max-width: 340px)":{display:"none"}}),Qu=J("button")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",gap:4,backgroundColor:Y.neutral.softWhite,border:"none",borderRadius:8,padding:6,minWidth:30,flexShrink:1,color:Y.base.primary,cursor:"pointer",overflow:"hidden",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),"&:hover":{backgroundColor:Hn},"&:disabled":{opacity:.5,cursor:"default"},"&:focus-visible":{outline:`2px solid ${Y.neutral.softWhite}`,outlineOffset:2}})),Xi=J(vi)({fontSize:18,color:"inherit"}),Bu=J("img")({width:19,height:19,borderRadius:"50%",border:`1.4px solid ${Y.whiteTransparent.blurry}`,flexShrink:0,objectFit:"cover"}),Wu=J(Et)({width:19,height:19,borderRadius:"50%",backgroundColor:Fu,border:`1.4px solid ${Y.whiteTransparent.blurry}`,flexShrink:0}),Hu=J(Ji)({fontSize:12,lineHeight:1,color:Y.neutral.softWhite,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}),zu=J("span")({color:Y.base.primary}),Gu=J(Et)({display:"flex",alignItems:"center",gap:8}),Vu=J(Et)({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"}),Ku=J(_o)({fontSize:20,color:Y.neutral.softWhite}),Yu=J(Ji)({fontSize:16,fontWeight:600,lineHeight:1.5,color:Y.neutral.softWhite,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}),Ju=J(Et)({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"}),Xu="0px 2px 12px 12px rgba(255, 255, 255, 0.3)";function Zi({isReminded:e,isLoading:t,isShaking:n,label:r,onClick:i}){return e?d.jsxs(Qu,{onClick:i,disabled:t,children:[d.jsx(pt,{active:!0,shaking:n}),d.jsx(mt,{children:r})]}):d.jsxs(zn,{onClick:i,disabled:t,children:[d.jsx(pt,{active:!1,shaking:n}),d.jsx(mt,{children:r})]})}const{styled:Zu}=await M("decentraland-ui2"),oi=Zu("button")(({theme:e})=>({display:"none",[e.breakpoints.down("md")]:{display:"flex",alignItems:"center",justifyContent:"center",width:28,height:28,flexShrink:0,borderRadius:6,border:"none",backgroundColor:"rgba(255, 255, 255, 0.15)",cursor:"pointer",padding:0,color:"#FCFCFC","&:active":{backgroundColor:"rgba(255, 255, 255, 0.3)"}}})),{useCallback:ed}=await M("react"),{useTranslation:td}=await M("@dcl/hooks"),{EventSmallCard:nd,Tooltip:ai}=await M("decentraland-ui2");function yt({event:e,onClick:t,disableHover:n}){const{t:r}=td(),{hasValidIdentity:i}=Me(),{data:o}=Pe(e.user,{skip:!e.user}),a=o?.avatars?.[0],l=a?.avatar?.snapshots?.face256,s=a?.name||e.user_name||r("upcoming.unknown_creator"),{copied:c,calendarAdded:v,handleCopy:g,handleAddToCalendar:h}=Ki({name:e.name,description:e.description,startAt:e.start_at,finishAt:e.finish_at,x:e.x,y:e.y}),{isReminded:m,isLoading:I,isShaking:x,handleToggle:b}=Un(e.id,e.attending),A=ed(()=>{t(e)},[t,e]),C=i?d.jsx(oi,{onClick:b,disabled:I,"aria-label":r("upcoming.remind_me"),children:d.jsx(pt,{active:m,shaking:x,size:16})}):d.jsx(oi,{onClick:h,"aria-label":r("upcoming.add_to_calendar"),children:d.jsx($n,{sx:{fontSize:16}})}),y=d.jsxs(d.Fragment,{children:[i?d.jsx(Zi,{isReminded:m,isLoading:I,isShaking:x,label:r("upcoming.remind_me"),onClick:b}):d.jsxs(zn,{onClick:h,children:[d.jsx(ht,{}),d.jsx(mt,{children:r("upcoming.add_to_calendar")})]}),i&&d.jsx(ai,{title:r("upcoming.add_to_calendar"),placement:"top",arrow:!0,children:d.jsx(gt,{onClick:h,"data-active":v,children:d.jsx(ht,{})})}),d.jsx(ai,{title:r(c?"upcoming.copied":"upcoming.copy_link"),placement:"top",arrow:!0,children:d.jsx(gt,{onClick:g,"data-active":c,children:d.jsx(Xi,{})})})]});return d.jsx(nd,{image:e.image??void 0,title:e.name,creatorName:s,creatorAvatarUrl:l,timeLabel:Yi(e.start_at,r),onClick:A,disableHover:n,action:C,hoverActions:y})}yt.displayName="UpcomingCard";const{Box:It,Typography:rd,dclColors:Gn,styled:je}=await M("decentraland-ui2"),id=je(It)({borderRadius:12,overflow:"hidden",cursor:"pointer",position:"relative",width:"100%",minWidth:0,"&:hover":{boxShadow:Xu},'&: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}}),od=je(It)({width:"100%",aspectRatio:"16 / 9",overflow:"hidden",flexShrink:0}),ad=je("img")({width:"100%",height:"100%",objectFit:"cover",display:"block",pointerEvents:"none",userSelect:"none"}),sd=je(It)({display:"flex",flexDirection:"column",gap:4,padding:12,position:"relative",backgroundColor:Gn.blackTransparent.blurry}),cd=je(rd)({fontWeight:600,fontSize:16,lineHeight:1.5,color:Gn.neutral.softWhite,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}),ld=je(It)({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:Gn.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:ud,useCallback:dd}=await M("react"),{useTranslation:fd}=await M("@dcl/hooks"),{Tooltip:si}=await M("decentraland-ui2"),eo=ud(({event:e,onClick:t})=>{const{t:n}=fd(),{hasValidIdentity:r}=Me(),{data:i}=Pe(e.user,{skip:!e.user}),o=i?.avatars?.[0],a=o?.avatar?.snapshots?.face256,l=o?.name||e.user_name||n("all_experiences.coming_soon"),{copied:s,handleCopy:c,handleAddToCalendar:v}=Ki({name:e.name,description:e.description,startAt:e.start_at,finishAt:e.finish_at,x:e.x,y:e.y}),{isReminded:g,isLoading:h,isShaking:m,handleToggle:I}=Un(e.id,e.attending),x=dd(()=>{t(e)},[t,e]);return d.jsxs(id,{onClick:x,children:[e.image&&d.jsx(od,{children:d.jsx(ad,{src:e.image,alt:e.name,loading:"lazy"})}),d.jsxs(sd,{children:[d.jsx(cd,{children:e.name}),d.jsxs(Gu,{"data-role":"creator-row",children:[a?d.jsx(Bu,{src:a,alt:l}):d.jsx(Wu,{}),d.jsxs(Hu,{children:[n("upcoming.by_prefix"),d.jsx(zu,{children:l})]})]}),d.jsxs(Vu,{"data-role":"time-pill",children:[d.jsx(Ku,{}),d.jsx(Yu,{children:Yi(e.start_at,n)})]}),d.jsxs(Ju,{"data-role":"hover-actions",children:[r?d.jsx(Zi,{isReminded:g,isLoading:h,isShaking:m,label:n("all_experiences.remind_me"),onClick:I}):d.jsxs(zn,{onClick:v,children:[d.jsx(ht,{}),d.jsx(mt,{children:n("all_experiences.add_to_calendar")})]}),r&&d.jsx(si,{title:n("all_experiences.add_to_calendar"),placement:"top",arrow:!0,children:d.jsx(gt,{onClick:v,children:d.jsx(ht,{})})}),d.jsx(si,{title:n(s?"all_experiences.copied":"all_experiences.copy_link"),placement:"top",arrow:!0,children:d.jsx(gt,{onClick:c,children:d.jsx(Xi,{})})})]})]})]})});eo.displayName="FutureCard";const{memo:pd,useCallback:hd}=await M("react"),{BadgeGroup:gd,EventCard:md,LiveBadge:yd,UserCountBadge:vd}=await M("decentraland-ui2"),to=pd(({event:e,onClick:t})=>{const{data:n}=Pe(e.user,{skip:!e.user}),r=n?.avatars?.[0],i=hd(()=>{t(e)},[t,e]),o=r?.avatar?r:void 0;return d.jsx(ld,{children:d.jsx(md,{image:e.image??"",sceneName:e.name,coordinates:`${e.x},${e.y}`,avatar:o,onClick:i,leftBadge:d.jsxs(gd,{children:[d.jsx(yd,{}),d.jsx(vd,{count:e.total_attendees})]}),leftBadgeTransparent:!0,hideLocation:!0})})});to.displayName="LiveCard";const{memo:bd}=await M("react"),no=bd(({event:e,onClick:t})=>e.live?d.jsx(to,{event:e,onClick:t}):d.jsx(eo,{event:e,onClick:t}));no.displayName="AllExperiencesCard";var Vn={},wd=be;Object.defineProperty(Vn,"__esModule",{value:!0});var Kn=Vn.default=void 0,Cd=wd(ve()),_d=d;Kn=Vn.default=(0,Cd.default)((0,_d.jsx)("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft");var Yn={},Sd=be;Object.defineProperty(Yn,"__esModule",{value:!0});var Jn=Yn.default=void 0,xd=Sd(ve()),Ad=d;Jn=Yn.default=(0,xd.default)((0,Ad.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight");const{Box:Ed,Typography:Id,dclColors:vt,styled:Xn}=await M("decentraland-ui2"),kd=50,Td=12,ci=20,Rd=Xn(Ed)({display:"flex",alignItems:"center",height:kd,marginBottom:Td,position:"relative",backgroundColor:vt.blackTransparent.backdrop,borderRadius:12,padding:0}),Pd=Xn(Id,{shouldForwardProp:e=>e!=="isToday"})(({isToday:e})=>({flex:1,textAlign:"center",fontWeight:600,fontSize:16,lineHeight:"100%",letterSpacing:0,color:e?vt.neutral.softWhite:"rgba(255, 255, 255, 0.7)"})),li=Xn("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)":vt.neutral.softWhite,height:ci,width:ci,position:"absolute",top:"50%",transform:"translateY(-50%)",[t]:8,zIndex:1,"&:focus-visible":{outline:`2px solid ${vt.neutral.softWhite}`,outlineOffset:2}})),{memo:Md,useMemo:jd}=await M("react"),{useTranslation:Ld}=await M("@dcl/hooks"),ro=Md(({startOffset:e,columnCount:t,today:n,onNavigateLeft:r,onNavigateRight:i})=>{const{t:o}=Ld(),a=e>0,l=jd(()=>Array.from({length:t},(s,c)=>Mn(n,e+c)),[n,e,t]);return d.jsxs(Rd,{role:"navigation","aria-label":o("all_experiences.title"),children:[d.jsx(li,{side:"left",onClick:r,disabled:!a,"aria-label":o("all_experiences.navigate_previous"),"aria-disabled":!a,tabIndex:a?0:-1,children:d.jsx(Kn,{sx:{fontSize:20}})}),l.map((s,c)=>d.jsx(Pd,{variant:"h6",isToday:e+c===0,"aria-label":Wi(s),"aria-current":e+c===0?"date":void 0,children:vl(s,o,n)},s.toISOString())),d.jsx(li,{side:"right",onClick:i,"aria-label":o("all_experiences.navigate_next"),children:d.jsx(Jn,{sx:{fontSize:20}})})]})});ro.displayName="DateNavigation";const{Box:kt,dclColors:io,styled:Tt}=await M("decentraland-ui2"),Dd=24,Od="calc(100vh - 280px)",Nd=8,$d=8,hn=12,Ud=200,Fd=Tt(kt)(({theme:e})=>({borderRadius:Dd,backgroundColor:"rgba(179, 32, 255, 0.25)",border:`2px solid ${io.whiteTransparent.subtle}`,display:"flex",flexDirection:"column",height:Od,overflow:"hidden",[e.breakpoints.down("sm")]:{height:"auto"}})),qd=Tt(kt)({flex:1,overflowY:"auto",display:"flex",flexDirection:"column",gap:Nd,padding:$d,scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),Qd=Tt(kt)({flex:1,minHeight:hn,backgroundColor:io.whiteTransparent.subtle,borderRadius:hn}),Jt=Tt(kt)({height:Ud,borderRadius:hn,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:Bd,useCallback:Xt,useEffect:Wd,useRef:ui,useState:Hd}=await M("react"),oo=Bd(({events:e,isLoading:t,dateLabel:n,renderCard:r})=>{const i=ui(null),o=ui({isDown:!1,startY:0,scrollTop:0}),[a,l]=Hd(!1);Wd(()=>{const g=i.current;if(!g)return;const h=()=>l(g.scrollHeight>g.clientHeight);h();const m=new ResizeObserver(h);return m.observe(g),()=>m.disconnect()},[e,t]);const s=Xt(g=>{const h=i.current;h&&(o.current={isDown:!0,startY:g.clientY,scrollTop:h.scrollTop})},[]),c=Xt(g=>{if(!o.current.isDown)return;const h=i.current;if(!h)return;g.preventDefault();const m=g.clientY-o.current.startY;h.scrollTop=o.current.scrollTop-m},[]),v=Xt(()=>{o.current.isDown=!1},[]);return d.jsx(Fd,{role:"list","aria-label":n,children:d.jsxs(qd,{ref:i,onMouseDown:s,onMouseMove:c,onMouseUp:v,onMouseLeave:v,children:[t&&d.jsxs(d.Fragment,{children:[d.jsx(Jt,{role:"listitem","aria-hidden":"true"}),d.jsx(Jt,{role:"listitem","aria-hidden":"true"}),d.jsx(Jt,{role:"listitem","aria-hidden":"true"})]}),!t&&e.map(g=>d.jsx("div",{role:"listitem",children:r(g)},g.id)),!a&&d.jsx(Qd,{"aria-hidden":"true"})]})})});oo.displayName="DayColumn";const{Box:Zn,Typography:zd,styled:Ve}=await M("decentraland-ui2"),Gd=28,Vd=16,Kd="0.4s",Yd="0.15s",Jd=Ve("section")(({theme:e})=>({position:"relative",zIndex:8,marginTop:e.spacing(4),animation:`slideUp ${Kd} ease-out ${Yd}`,"@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:0,marginRight:0,padding:e.spacing(4,2)}})),Xd=Ve(zd)(({theme:e})=>({fontWeight:500,fontSize:32,lineHeight:1.235,marginBottom:Gd,[e.breakpoints.down("sm")]:{fontSize:24,textAlign:"center"}})),Zd=Ve(Zn)({display:"grid",gap:Vd}),ef=Ve(Zn)({display:"flex",gap:12,overflowX:"auto",scrollSnapType:"x mandatory",scrollBehavior:"smooth",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),tf=Ve(Zn)({display:"flex",flexDirection:"column",gap:12,flex:"0 0 100%",scrollSnapAlign:"start"}),{useCallback:Ue,useEffect:nf,useMemo:qe,useState:Zt}=await M("react"),{useTranslation:rf}=await M("@dcl/hooks");function of(e,t,n,r){const i=qe(()=>Array.from({length:n},(v,g)=>Mn(e,t+g)),[e,t,n]),o=qe(()=>Gr(i[0]),[i]),a=qe(()=>Gr(i[i.length-1]),[i]),{data:l=[],isLoading:s,isError:c}=Ic({list:"active",from:o.from,to:a.to,order:"asc",world:!1,limit:200,identity:r});return qe(()=>i.map(v=>({date:v,events:l.filter(g=>pn(new Date(g.start_at),v)),isLoading:s,isError:c})),[i,l,s,c])}function af(){const{t:e}=rf(),{identity:t}=Me(),n=gl(),[r,i]=Zt(0),[o,a]=Zt(null),[l,s]=Zt(()=>{const b=new Date;return b.setHours(0,0,0,0),b});nf(()=>{const b=()=>{const A=new Date;A.setHours(0,0,0,0),A.getTime()!==l.getTime()&&(s(A),i(0))};return document.addEventListener("visibilitychange",b),()=>document.removeEventListener("visibilitychange",b)},[l]);const c=of(l,r,n,t),v=Ue(()=>{i(b=>Math.max(0,b-n))},[n]),g=Ue(()=>{i(b=>b+n)},[n]),h=Ue(b=>{a(Gi(b))},[]),m=Ue(()=>{a(null)},[]),I=Ue(b=>d.jsx(no,{event:b,onClick:h}),[h]),x=qe(()=>Bi(c.flatMap(b=>b.events),2),[c]);return d.jsxs(Jd,{"aria-label":e("all_experiences.title"),children:[d.jsx(Xd,{variant:"h4",children:e("all_experiences.title")}),d.jsx(ro,{startOffset:r,columnCount:n,today:l,onNavigateLeft:v,onNavigateRight:g}),n<=1?d.jsx(ef,{children:x.map((b,A)=>d.jsx(tf,{children:b.map(C=>d.jsx(yt,{event:C,onClick:h},C.id))},A))}):d.jsx(Zd,{sx:{gridTemplateColumns:`repeat(${n}, 1fr)`},children:c.map(({date:b,events:A,isLoading:C})=>d.jsx(oo,{events:A,isLoading:C,dateLabel:Wi(b),renderCard:I},b.toISOString()))}),d.jsx($u,{}),d.jsx(qn,{open:!!o,onClose:m,data:o})]})}const{Box:sf,styled:ao}=await M("decentraland-ui2"),so=ao(sf)(({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:cf,useCallback:lf}=await M("react"),{BadgeGroup:uf,EventCard:df,LiveBadge:ff,UserCountBadge:pf}=await M("decentraland-ui2"),hf=`${window.location.origin}/dcl-logo.svg`.replace(/^http:\/\//,"https://"),lo=cf(({card:e,onClick:t})=>{const n=e.title.toLowerCase().includes("genesis plaza"),{data:r}=Pe(e.creatorAddress,{skip:!e.creatorAddress}),i=r?.avatars?.[0],o=lf(()=>{t(e)},[t,e]);let a;return n?a={name:e.creatorName??"Decentraland Foundation",ethAddress:"",avatar:{snapshots:{face256:hf,body:""}}}:i?a={name:i.name??"",ethAddress:i.ethAddress??"",avatar:i.avatar}:e.creatorName&&(a={name:e.creatorName,ethAddress:""}),d.jsx(df,{image:e.image,sceneName:e.title,coordinates:e.coordinates,avatar:a,onClick:o,hoverEffect:"lift",leftBadge:d.jsxs(uf,{children:[e.type==="event"&&d.jsx(ff,{}),d.jsx(pf,{count:e.users})]}),leftBadgeTransparent:!0,hideLocation:!0})});lo.displayName="LiveNowCardItem";const{Box:Rt,IconButton:gf,Typography:mf,styled:fe}=await M("decentraland-ui2"),yf=fe("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),marginTop:0,marginLeft:0,marginRight:0,background:"radial-gradient(63.39% 112.69% at 49.33% 50.11%, #A042CD 0%, #32134C 100%)",borderRadius:0,boxShadow:"none"}})),vf=fe(Rt)(({theme:e})=>({display:"flex",alignItems:"center",gap:8,marginBottom:24,[e.breakpoints.down("sm")]:{justifyContent:"center",padding:e.spacing(0,2)}})),bf=fe(mf)(({theme:e})=>({fontWeight:600,fontSize:32,[e.breakpoints.down("sm")]:{fontSize:24,textAlign:"center",width:"100%"}})),di=62,fi=60,wf=fe(Rt,{shouldForwardProp:e=>e!=="fadeLeft"&&e!=="fadeRight"&&e!=="hasScroll"})(({theme:e,fadeLeft:t,fadeRight:n,hasScroll:r})=>{const i=[];return t&&i.push(`linear-gradient(to right, transparent, black ${fi}px)`),n&&i.push(`linear-gradient(to left, transparent, black ${fi}px)`),{position:"relative",...r?{overflowX:"auto",padding:"24px 16px 16px",margin:"-24px -16px -16px",scrollSnapType:"x mandatory",scrollPaddingInline:16,scrollBehavior:"smooth",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}:{overflow:"visible"},...i.length>0&&{maskImage:i.join(", "),WebkitMaskImage:i.join(", ")},...i.length>1&&{maskComposite:"intersect",WebkitMaskComposite:"source-in"},[e.breakpoints.down("sm")]:{maskImage:"none",WebkitMaskImage:"none"}}}),pi=fe(gf)(({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"}})),Cf=fe(Rt)(({theme:e})=>({display:"flex",gap:e.spacing(2),justifyContent:"safe center",alignItems:"stretch","&::after":{content:'""',flexShrink:0,width:1},"& .MuiCard-root":{minWidth:"max(300px, calc((100% - 48px) / 4))",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")]:{"& .MuiCard-root":{minWidth:"unset",maxWidth:"unset",maxHeight:"none",flex:"0 0 100%"},"&& .MuiCardMedia-root":{height:`calc(62.5cqw - ${di}px)`},"&& .MuiCardActionArea-root:hover .MuiCardMedia-root":{height:`calc(62.5cqw - ${di}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)"}}})),_f=fe(So)(({theme:e})=>({color:"#E00000",[e.breakpoints.down("sm")]:{display:"none"}})),Sf=fe(Rt)({position:"relative"}),{useCallback:ce,useEffect:xf,useMemo:Af,useRef:hi,useState:Ee}=await M("react"),{useTranslation:Ef}=await M("@dcl/hooks"),gi=300;function If(){const{t:e}=Ef(),t=Af(()=>{const p=new URLSearchParams(window.location.search).get("minUsers");if(p!==null&&!Number.isNaN(Number(p)))return{minUsers:Number(p)}},[]),{data:n=[]}=Ni(t,{pollingInterval:6e4}),[r,i]=Ee(0),[o,a]=Ee(!1),[l,s]=Ee(!1),[c,v]=Ee(1),[g,h]=Ee(!1),[m,I]=Ee(null),x=hi(null),b=hi({isDown:!1,startX:0,scrollLeft:0}),A=ce(()=>{const f=x.current;if(!f)return;const p=f.scrollWidth>f.clientWidth,w=p&&f.clientWidth>0?Math.max(1,Math.ceil(f.scrollWidth/f.clientWidth)):1;a(f.scrollLeft>0),s(p&&f.scrollLeft+f.clientWidth<f.scrollWidth-1),v(w);const S=f.scrollWidth-f.clientWidth;if(S<=0)i(0);else{const k=f.scrollLeft/S;i(Math.round(k*(w-1)))}},[]);xf(()=>{const f=x.current;if(!f)return;A();const p=new ResizeObserver(A);return p.observe(f),()=>p.disconnect()},[n.length,A]);const C=ce(f=>{const p=x.current;if(!p)return;const w=f==="left"?-gi:gi;p.scrollBy({left:w,behavior:"smooth"})},[]),y=ce(f=>{const p=x.current;p&&(b.current={isDown:!0,startX:f.pageX-p.offsetLeft,scrollLeft:p.scrollLeft},h(!1))},[]),u=ce(f=>{if(!b.current.isDown)return;const p=x.current;if(!p)return;f.preventDefault();const S=f.pageX-p.offsetLeft-b.current.startX;Math.abs(S)>5&&h(!0),p.scrollLeft=b.current.scrollLeft-S},[]),_=ce(()=>{b.current.isDown=!1},[]),R=ce(f=>{g&&f.stopPropagation()},[g]),T=ce(f=>{const p=x.current;if(!p)return;const w=p.scrollWidth-p.clientWidth,S=c<=1?0:w*f/(c-1);p.scrollTo({left:S,behavior:"smooth"})},[c]),P=ce(f=>{I(wu(f))},[]),E=ce(()=>{I(null)},[]);return n.length===0?null:d.jsxs(yf,{children:[d.jsxs(vf,{children:[d.jsx(_f,{}),d.jsx(bf,{variant:"h5",children:e("live_now.title")})]}),d.jsxs(Sf,{children:[o&&d.jsx(pi,{side:"left",onClick:()=>C("left"),children:d.jsx(Kn,{})}),l&&d.jsx(pi,{side:"right",onClick:()=>C("right"),children:d.jsx(Jn,{})}),d.jsx(wf,{ref:x,onScroll:A,fadeLeft:o,fadeRight:l,hasScroll:c>1,onMouseDown:y,onMouseMove:u,onMouseUp:_,onMouseLeave:_,onClickCapture:R,sx:{cursor:g?"grabbing":"grab"},children:d.jsx(Cf,{children:n.map(f=>d.jsx(lo,{card:f,onClick:P},f.id))})})]}),c>1&&d.jsx(so,{children:Array.from({length:c},(f,p)=>d.jsx(co,{active:p===r,onClick:()=>T(p),"aria-label":e("pagination.go_to_page",{page:p+1})},p))}),d.jsx(qn,{open:!!m,onClose:E,data:m})]})}const{Box:Pt,Typography:kf,styled:Le}=await M("decentraland-ui2"),Tf="0.4s",Rf=Le("section")(({theme:e})=>({position:"relative",zIndex:9,marginTop:e.spacing(4),animation:`slideUp ${Tf} 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:0,marginRight:0,padding:e.spacing(3,2)}})),Pf=Le(kf)(({theme:e})=>({fontWeight:500,fontSize:32,lineHeight:1.235,marginBottom:32,[e.breakpoints.down("md")]:{textAlign:"center"},[e.breakpoints.down("sm")]:{fontSize:24}})),Mf=Le(Pt)(({theme:e})=>({display:"none",[e.breakpoints.down("md")]:{display:"block"}})),jf=Le(Pt)({display:"flex",gap:12,overflowX:"auto",scrollSnapType:"x mandatory",scrollBehavior:"smooth",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),Lf=Le(Pt)(()=>({display:"grid",gridTemplateColumns:"1fr 1fr",gap:12,flex:"0 0 100%",scrollSnapAlign:"start","@media (max-width: 600px)":{gridTemplateColumns:"1fr",justifyItems:"center","& > *:nth-of-type(n+3)":{display:"none"}}})),Df=Le(Pt)(({theme:e})=>({display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(max(300px, calc((100% - 72px) / 4)), 1fr))",gap:24,[e.breakpoints.down("md")]:{display:"none"}})),{useCallback:it,useMemo:Of,useRef:Nf,useState:mi}=await M("react"),{useTranslation:$f}=await M("@dcl/hooks"),Uf=4;function Ff(){const{t:e}=$f(),{identity:t}=Me(),{data:n=[]}=kc(t?{identity:t}:void 0),[r,i]=mi(null),[o,a]=mi(0),l=Nf(null),s=Of(()=>Bi(n,Uf),[n]),c=it(()=>{const m=l.current;if(!m||m.clientWidth===0)return;const I=Math.round(m.scrollLeft/m.clientWidth);a(I)},[]),v=it(m=>{const I=l.current;I&&I.scrollTo({left:m*I.clientWidth,behavior:"smooth"})},[]),g=it(m=>{i(Gi(m))},[]),h=it(()=>{i(null)},[]);return n.length===0?null:d.jsxs(Rf,{children:[d.jsx(Pf,{variant:"h5",children:e("upcoming.title")}),d.jsx(Df,{children:n.map(m=>d.jsx(yt,{event:m,onClick:g},m.id))}),d.jsxs(Mf,{children:[d.jsx(jf,{ref:l,onScroll:c,children:s.map((m,I)=>d.jsx(Lf,{children:m.map(x=>d.jsx(yt,{event:x,onClick:g,disableHover:!0},x.id))},I))}),s.length>1&&d.jsx(so,{children:s.map((m,I)=>d.jsx(co,{active:I===o,onClick:()=>v(I),"aria-label":e("pagination.go_to_page",{page:I+1})},I))})]}),d.jsx(qn,{open:!!r,onClose:h,data:r})]})}const qf="https://cdn.decentraland.org/@dcl/explore-site/0.0.1-24478945478.commit-fbe29bc/assets/top_background-Bnd2vX_F.webp",{Box:uo,styled:fo}=await M("decentraland-ui2"),Qf=fo(uo)(({standalone:e,theme:t})=>({position:"relative",background:`url(${qf}) 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(0,0,0,0),background:"#1A0A2E",backgroundSize:"unset","&::before":{display:"none"}},...!e&&{paddingTop:0}})),Bf=fo(uo)(({standalone:e,theme:t})=>({position:"relative",zIndex:1,display:"flex",flexDirection:"column",gap:t.spacing(4),paddingTop:e?"66px":"96px",[t.breakpoints.down("sm")]:{paddingTop:"56px",gap:0}}));function sp({standalone:e=!0}){const{isLoading:t}=Ni(),n=d.jsxs(Qf,{component:"main",standalone:e,children:[d.jsx(Bf,{standalone:e,children:d.jsx(If,{})}),!t&&d.jsx(Ff,{}),!t&&d.jsx(af,{})]});return e?d.jsx(cl,{children:n}):n}export{sp as H,cl as P,ep as W,tp as a,Zf as c,qi as d,ap as e,ie as g,Fo as m,$i as r,Lc as s,xi as u};
@@ -1,2 +1,2 @@
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(`
1
+ import{importShared as Q}from"./__federation_fn_import-DiM-2p0X.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};