@dcl/shop 0.1.0-30347128512.commit-fa777d2 → 0.1.0-30362815497.commit-35ecdbf

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 (170) hide show
  1. package/assets/Activity-DYOikZol.js +291 -0
  2. package/assets/{AnimatedBackground-Bjg_dM62.js → AnimatedBackground-HX4woz1t.js} +3 -3
  3. package/assets/{Assets-DJY-c9rg.js → Assets-trIla3fm.js} +3 -3
  4. package/assets/{Assets.styles-9f6mDaEv.js → Assets.styles-BN81sFiL.js} +1 -1
  5. package/assets/{Authorizations-xYmMGz1i.js → Authorizations-9b3idzYV.js} +1 -1
  6. package/assets/{Button-CnbjjJO5.js → Button-BeodHck0.js} +1 -1
  7. package/assets/{Cart-Bzhtcjep.js → Cart-DgJ2dSls.js} +1 -1
  8. package/assets/{CircularProgress-Dmrktj_R.js → CircularProgress-DBX8-bxs.js} +1 -1
  9. package/assets/{Collection-CzfHG3Jx.js → Collection-BoptXS-5.js} +1 -1
  10. package/assets/{CollectionCarousel-wgdFgVLs.js → CollectionCarousel-Dsbypx_Q.js} +5 -5
  11. package/assets/{Creator-CzKCZ1jg.js → Creator-Bt88BMiE.js} +1 -1
  12. package/assets/{ExchangeController-DUqIwOTZ.js → ExchangeController-Bh5MbgEF.js} +1 -1
  13. package/assets/{GetCredits-hAzqWm5M.js → GetCredits-CbPLtnWt.js} +86 -63
  14. package/assets/{HelpersUtil-BJdZT-ZD.js → HelpersUtil-Bj2jMRhF.js} +1 -1
  15. package/assets/{ImportListings-CKlnt9Z6.js → ImportListings-Dza88Ul5.js} +1 -1
  16. package/assets/{ItemDetail-Bkx3_3eQ.js → ItemDetail-BrPctSLd.js} +138 -138
  17. package/assets/{LoadMore-CAh6doss.js → LoadMore-Cp-E67xI.js} +1 -1
  18. package/assets/{MarketCheckout-FIvhuZ3q.js → MarketCheckout-ClTJqeTN.js} +1 -1
  19. package/assets/{MenuList-DxlQfd2X.js → MenuList-CGv6Hx3E.js} +1 -1
  20. package/assets/{MyAssets-CMBD-Ngx.js → MyAssets-CCRHQYFa.js} +1 -1
  21. package/assets/{MyFavorites-Cgr-G9SJ.js → MyFavorites-CdD42WhZ.js} +1 -1
  22. package/assets/{NotFound-CaFZy4ut.js → NotFound-C-faFC1M.js} +1 -1
  23. package/assets/{NotificationsBell-4tMYFsJw.js → NotificationsBell-BoZQHliJ.js} +1 -1
  24. package/assets/{StoreSettings-_jtWsb9j.js → StoreSettings-LxpZbXrk.js} +1 -1
  25. package/assets/{Success-CuyF-BMf.js → Success-DuDT9YWk.js} +1 -1
  26. package/assets/{SwapController-p2JmriC1.js → SwapController-DCarrY7n.js} +1 -1
  27. package/assets/{Tooltip-CVHiMiqz.js → Tooltip-QUx-0PAd.js} +1 -1
  28. package/assets/{TradeService-BYXvSV2J.js → TradeService-WOpUOCj5.js} +1 -1
  29. package/assets/{W3MFrameProviderSingleton-CdvVVbWO.js → W3MFrameProviderSingleton-DvD-aezH.js} +3 -3
  30. package/assets/{WebCryptoP256-RIRaftOz.js → WebCryptoP256-KHg0PT8E.js} +1 -1
  31. package/assets/{authorizations-DMJkwvHN.js → authorizations-CUAi4uqJ.js} +1 -1
  32. package/assets/{basic-BEYxallz.js → basic-Bf_YtlYZ.js} +1 -1
  33. package/assets/{biconomy-CTb5Sjfo.js → biconomy-ClJBQv0E.js} +1 -1
  34. package/assets/{builder-C9zPgqzY.js → builder-BFcfggvn.js} +1 -1
  35. package/assets/{buy-zrP-t3zp.js → buy-Tme1UHVf.js} +1 -1
  36. package/assets/{buy-gasless-klfuiHzU.js → buy-gasless-BdW9VEKq.js} +1 -1
  37. package/assets/{cart-checkout-D-JbGzKO.js → cart-checkout-D8_UxnB9.js} +1 -1
  38. package/assets/{categories-Cdf5XoX6.js → categories-CV5P_HZd.js} +1 -1
  39. package/assets/{ccip-Ch0XTBQB.js → ccip-BQ1iXCKX.js} +1 -1
  40. package/assets/{ccip-BCecDdR4.js → ccip-Dt6AwyXx.js} +1 -1
  41. package/assets/{collection-Cbwi-Ykf.js → collection-CHWj8iQW.js} +1 -1
  42. package/assets/{controller-C6EUJbnF.js → controller-DINKBWbu.js} +2 -2
  43. package/assets/{core-CSRy0e_M.js → core-BAP8R3XC.js} +4 -4
  44. package/assets/{custom-B_kqWExa.js → custom--eKw29PB.js} +1 -1
  45. package/assets/{data-capture-CV3sZIEf.js → data-capture-B1VKtAVM.js} +1 -1
  46. package/assets/{email-BSyZQ5Ug.js → email-BLadXpqP.js} +1 -1
  47. package/assets/{embedded-wallet-mBdS4pUU.js → embedded-wallet-BcP4ehoH.js} +1 -1
  48. package/assets/{emotion-styled.browser.esm-C7FrEQY-.js → emotion-styled.browser.esm-CWNG-OnU.js} +1 -1
  49. package/assets/{engine-QspL2-eT.js → engine-DNXrnXBq.js} +1 -1
  50. package/assets/{errors-DAbZY9SI.js → errors-DCLH44Ym.js} +1 -1
  51. package/assets/{estimate-l1-fee-DGh1S3rC.js → estimate-l1-fee-qYVfWmvo.js} +1 -1
  52. package/assets/{execute-D4k49Xnj.js → execute-DZFWrHQq.js} +2 -2
  53. package/assets/{features-CBUzQGYP.js → features-CU8DRP_5.js} +1 -1
  54. package/assets/{fetchTokenMetadata-Dt9ABnkf.js → fetchTokenMetadata-qukyHCda.js} +2 -2
  55. package/assets/{get-ecosystem-wallet-info-BK8ezJ63.js → get-ecosystem-wallet-info-CE-anDO0.js} +1 -1
  56. package/assets/{getBalance-l63nBmhp.js → getBalance-BYFNEbEM.js} +1 -1
  57. package/assets/{getNFT-BBMO-39z.js → getNFT-2J_9TTUS.js} +1 -1
  58. package/assets/{getNFT-C2Kxe7NW.js → getNFT-CozT-FPO.js} +1 -1
  59. package/assets/{getThemeProps-BAQMSm7B.js → getThemeProps-G_RkUSWj.js} +1 -1
  60. package/assets/{hashTypedData-yK76SDtz.js → hashTypedData-COw4MIw7.js} +1 -1
  61. package/assets/{hashTypedData-z3RblDHR.js → hashTypedData-Shyia_b5.js} +1 -1
  62. package/assets/{import-Cj6re7IB.js → import-BgvjaGsU.js} +1 -1
  63. package/assets/{in-app-CL3vQ8Yv.js → in-app-h5Z8xJLI.js} +1 -1
  64. package/assets/{in-app-wallet-calls-fq5qF2CS.js → in-app-wallet-calls-DndrTTgL.js} +1 -1
  65. package/assets/{index-B_EntOu0.js → index-0df2_JuN.js} +1 -1
  66. package/assets/{index-B2nJgezW.js → index-5TQ09pWW.js} +1 -1
  67. package/assets/{index-DsGo0VzU.js → index-8yB_Vwf0.js} +1 -1
  68. package/assets/{index-BzUrNmEF.js → index-B-7JnJnf.js} +1 -1
  69. package/assets/{index-Ao_0yZtx.js → index-B-IGbYzs.js} +1 -1
  70. package/assets/{index-TEdLKziZ.js → index-B20SJjGI.js} +1 -1
  71. package/assets/{index-BdhwhIIA.js → index-BSeusSHl.js} +31 -31
  72. package/assets/{index-ChiR2URD.js → index-BkDBPQKr.js} +1 -1
  73. package/assets/{index-BszhwqjZ.js → index-BrDLym1R.js} +2 -2
  74. package/assets/{index-Dp04VmhK.js → index-C4-ffFyv.js} +1 -1
  75. package/assets/{index-BwXaPcB2.js → index-C97Z675S.js} +1 -1
  76. package/assets/{index-Bx5De6CE.js → index-CF84ORMp.js} +1 -1
  77. package/assets/{index-Bti6nPx-.js → index-CFFpa2x2.js} +1 -1
  78. package/assets/{index-D7f9PSpo.js → index-CFuHjg6U.js} +1 -1
  79. package/assets/{index-DVq4ZIKX.js → index-CNI9E71C.js} +1 -1
  80. package/assets/{index-BstIL6B8.js → index-CPpRxy1r.js} +1 -1
  81. package/assets/{index-hqJGkjgW.js → index-CQzsOUTd.js} +1 -1
  82. package/assets/{index-2Xk3H1Oc.js → index-CkyS_Z8N.js} +1 -1
  83. package/assets/{index-CB7QJ7yR.js → index-ClGkpWPa.js} +2 -2
  84. package/assets/{index-CeI0yJhC.js → index-CnqcuprG.js} +3 -3
  85. package/assets/{index-B_1Et03N.js → index-CpnWgZnn.js} +3 -3
  86. package/assets/{index-DfzHEJ0Y.js → index-Cr75_Qxi.js} +1 -1
  87. package/assets/{index-CA3v1bQD.js → index-Cs14qqbg.js} +1 -1
  88. package/assets/{index-CB_Wl35a.js → index-CuziAoAD.js} +1 -1
  89. package/assets/{index-BZeeM0tt.js → index-CxnwYMKU.js} +1 -1
  90. package/assets/{index-CBXiS-js.js → index-D-DRci2G.js} +1 -1
  91. package/assets/{index-CoDCwP37.js → index-D-sEcKqr.js} +1 -1
  92. package/assets/{index-DFlXV5Pc.js → index-D2m2DNID.js} +1 -1
  93. package/assets/{index-BgmnD0Bm.js → index-D6_4iqAn.js} +2 -2
  94. package/assets/{index-DmXp5-MY.js → index-DIlrszNn.js} +1 -1
  95. package/assets/{index-DldSHFkS.js → index-DLY0JksW.js} +1 -1
  96. package/assets/{index-R7yneMBI.js → index-DLsq0JOY.js} +1 -1
  97. package/assets/{index-DnCPf0Dd.js → index-DQWUa_ga.js} +1 -1
  98. package/assets/{index-Cx0ZzwkB.js → index-DSv4T_PT.js} +1 -1
  99. package/assets/{index-Dx7iSYKC.js → index-DZwpOX3I.js} +1 -1
  100. package/assets/{index-Dlv9lXjh.js → index-Dj-l-ING.js} +1 -1
  101. package/assets/{index-BKGGk1Fw.js → index-Dj9Oj7O6.js} +1 -1
  102. package/assets/{index-BCme8pZp.js → index-DonfdwAp.js} +1 -1
  103. package/assets/{index-6GsD_zmA.js → index-DySNHqeZ.js} +1 -1
  104. package/assets/{index-DQ6LOtMx.js → index-FJnVr04j.js} +1 -1
  105. package/assets/{index-BAjUWjZ9.js → index-PrsXxs3B.js} +2 -2
  106. package/assets/{index-D10Qa-8Q.js → index-RTTHiCT2.js} +1 -1
  107. package/assets/{index-BwCDygn2.js → index-TRWztzJI.js} +1 -1
  108. package/assets/{index-D703KTq5.js → index-_DXp_lqm.js} +1 -1
  109. package/assets/{index-BxqCyrqG.js → index-a0GqAWet.js} +1 -1
  110. package/assets/{index-BIjljlfD.js → index-iGJTuv1I.js} +3 -3
  111. package/assets/{index-BZDi2bJp.js → index-isk6Q4SE.js} +1 -1
  112. package/assets/{index-CmzyNQHY.js → index-m8asLu1c.js} +1 -1
  113. package/assets/{index-DhMsVQI9.js → index-rsuER-il.js} +1 -1
  114. package/assets/{index-D7r3-q0U.js → index-vYDwCibh.js} +1 -1
  115. package/assets/{index-CC_NLvt1.js → index-zSTykcGn.js} +1 -1
  116. package/assets/{index.es-CY9HYgDS.js → index.es-CsQSB3db.js} +4 -4
  117. package/assets/{index.es-Xsmb-Itv.js → index.es-CsZiAUYy.js} +1 -1
  118. package/assets/{index.es-DFy6PIAe.js → index.es-Do3Y7r2K.js} +1 -1
  119. package/assets/{localBatchGatewayRequest-CDftYM3Y.js → localBatchGatewayRequest-CbxoLL2f.js} +1 -1
  120. package/assets/{mana-rate-DHV9Z9OW.js → mana-rate-BJbe6lgb.js} +1 -1
  121. package/assets/{networks-BdfDt4wL.js → networks-Dpsd0s9-.js} +1 -1
  122. package/assets/{onramp-BAq14Nfv.js → onramp-DaQ4owbO.js} +1 -1
  123. package/assets/{openzeppelin-BjFBwqKA.js → openzeppelin-6LOIfZsS.js} +1 -1
  124. package/assets/{parseNft-WlXFdqLF.js → parseNft-DM4WbrF2.js} +2 -2
  125. package/assets/{parseSignature-CxAFWsh2.js → parseSignature-CJECbqyJ.js} +1 -1
  126. package/assets/{parseSignature-BvN7UKEY.js → parseSignature-DJ5B7dkH.js} +3 -3
  127. package/assets/{passkeys-DEBGhkuP.js → passkeys-D0bGzkR-.js} +1 -1
  128. package/assets/{pay-with-exchange-DvWg_J7u.js → pay-with-exchange-DGD6NZUT.js} +1 -1
  129. package/assets/{qr-overlay-iuqr9ogp.js → qr-overlay-C57bRh8h.js} +1 -1
  130. package/assets/{receive-Dzi2JClg.js → receive-Dig0fUc0.js} +1 -1
  131. package/assets/{resolveImplementation-C-dGW-ru.js → resolveImplementation-D_fazAjd.js} +1 -1
  132. package/assets/{rpc-zjmc2EwX.js → rpc-ChD_4MbV.js} +1 -1
  133. package/assets/{secp256k1-lmNrMAfy.js → secp256k1-BClwNS_R.js} +1 -1
  134. package/assets/{secp256k1-DfKqmJaF.js → secp256k1-CJyNFsNt.js} +1 -1
  135. package/assets/{secp256k1-O8gz0ioM.js → secp256k1-N6PNU3bA.js} +1 -1
  136. package/assets/{send-BLVRRk0J.js → send-DAWm3Jv2.js} +1 -1
  137. package/assets/{send-batch-transaction-DnO3Izjn.js → send-batch-transaction-Dg_fuCoW.js} +1 -1
  138. package/assets/{send-eip712-transaction-Cewdx89i.js → send-eip712-transaction-BfQDidJ0.js} +2 -2
  139. package/assets/{send-gasless-transaction-Q9ukTPCQ.js → send-gasless-transaction-ZUIH6xn8.js} +2 -2
  140. package/assets/{send-transaction-DAlwpSnE.js → send-transaction-CfoJI6V6.js} +2 -2
  141. package/assets/{sendMetaTransaction-SaUBHgVB.js → sendMetaTransaction-DEU_Xtzf.js} +1 -1
  142. package/assets/{sendRawTransaction-D5CrLxcS.js → sendRawTransaction-ZYIm5xd5.js} +3 -3
  143. package/assets/{serializeTransaction-DjtMrOmD.js → serializeTransaction-CzSGVGz4.js} +1 -1
  144. package/assets/{session-proposal-CjBY-WFu.js → session-proposal-B0DQCL8Q.js} +1 -1
  145. package/assets/{session-request-Bus_0b3e.js → session-request-D7PK8aVZ.js} +2 -2
  146. package/assets/{signing-DqI8cCUS.js → signing-B8VyPC00.js} +3 -3
  147. package/assets/{socials-BVbJKC5k.js → socials-KoDapNpC.js} +1 -1
  148. package/assets/{swaps-C-LDjTCR.js → swaps-BlxZRFZr.js} +1 -1
  149. package/assets/{thirdweb-C25BYG7i.js → thirdweb-DJf-EEOv.js} +3 -3
  150. package/assets/{to-serializable-transaction-B_IZoFlk.js → to-serializable-transaction-B1lQjM9d.js} +2 -2
  151. package/assets/{trade-encoding-oV0MV6zA.js → trade-encoding-DXoI04Mc.js} +1 -1
  152. package/assets/{transactionReceipt-B5CHc_d7.js → transactionReceipt-kDTd5JL7.js} +1 -1
  153. package/assets/{transactions-C54yTH1n.js → transactions-CehNE2A8.js} +1 -1
  154. package/assets/{useCreditPacks-CqK2ArSn.js → useCreditPacks-Dg3_30xn.js} +1 -1
  155. package/assets/{useInfiniteGrid-BjepR_Mr.js → useInfiniteGrid-dBP53DpO.js} +1 -1
  156. package/assets/useManaRate-CY5PbqWB.js +1 -0
  157. package/assets/{useStore-BCigKXty.js → useStore-Duh496VH.js} +1 -1
  158. package/assets/{useTheme-0QOVKbIa.js → useTheme-BRdkaoFm.js} +1 -1
  159. package/assets/{verifyHash-LbzNhN2f.js → verifyHash-PdDaV25N.js} +1 -1
  160. package/assets/{w3m-modal-BsUqbELC.js → w3m-modal-Bt6VN9EP.js} +1 -1
  161. package/assets/{w3m-modal-DjU8voGA.js → w3m-modal-CywSQTgA.js} +1 -1
  162. package/assets/{wait-for-tx-receipt-D_8xkyQQ.js → wait-for-tx-receipt-Cw3p4OOt.js} +1 -1
  163. package/assets/{wallets-B69-HxcI.js → wallets-BqGvfAVQ.js} +5 -5
  164. package/assets/{web-connector-CspD6Rab.js → web-connector-CwUgIh1D.js} +3 -3
  165. package/assets/{writeContract-CHmB_QOJ.js → writeContract-BCO99ptR.js} +1 -1
  166. package/assets/{zoraTestnet-Duru9tif.js → zoraTestnet-81flFamw.js} +1 -1
  167. package/index.html +11 -11
  168. package/package.json +2 -2
  169. package/assets/Activity-eJFv6ymH.js +0 -287
  170. package/assets/useManaRate-DlMC8eER.js +0 -1
@@ -0,0 +1,291 @@
1
+ import{r as b,j as e,L as _,e as dt}from"./react-B36MyIP_.js";import{n as l,K as o,R as lt,B as ht,h as ut,t as d,e as xt,u as j,I as g,aG as B,aH as G,aI as pt,k as v,aJ as mt,an as E,S as Q,m as gt,aK as ft,aL as X}from"./index-BSeusSHl.js";import{m as yt}from"./mana-rate-BJbe6lgb.js";import{u as bt}from"./useManaRate-CY5PbqWB.js";import{L as jt}from"./LoadMore-Cp-E67xI.js";import{u as f}from"./useInfiniteGrid-dBP53DpO.js";import"./sentry-gZJVwIqQ.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-BteKixT0.js";import"./intl-CBcMB1D2.js";const vt=15e3;function kt(t,i){return t.txHash&&i.txHash?t.txHash===i.txHash:t.txHash||i.txHash?!1:t.status===i.status&&Math.abs(t.createdAt-i.createdAt)<=vt}function wt(t){const i=[...t].sort((a,n)=>n.createdAt-a.createdAt),s=[];for(const a of i){const n=s[s.length-1];n&&kt(n[n.length-1],a)?n.push(a):s.push([a])}return s.map(a=>{var n;return{id:((n=a.find(c=>c.txHash))==null?void 0:n.txHash)??a[a.length-1].id,createdAt:Math.max(...a.map(c=>c.createdAt)),status:a.some(c=>c.status==="PENDING")?"PENDING":"SETTLED",totalCredits:a.reduce((c,u)=>c+u.credits,0),lines:a}})}function It(t){const i=[],s=new Map;for(const a of t)if(a.tradeId){const n=s.get(a.tradeId);if(n){n.quantity+=1,n.credits+=a.credits;continue}const c={key:a.tradeId,tradeId:a.tradeId,quantity:1,credits:a.credits};s.set(a.tradeId,c),i.push(c)}else i.push({key:a.id,tradeId:null,quantity:1,credits:a.credits});return i}function At(t,i){return{id:t.id,contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId,counterparty:t.buyer,credits:i?yt(t.manaWei,i):null,manaWei:t.manaWei,createdAt:t.createdAt,txHash:t.txHash}}function $t(t){const s=wt(t.purchases.filter(r=>r.status!=="EXPIRED")).map(r=>({kind:"purchase",id:`purchase:${r.id}`,createdAt:r.createdAt,order:r})),a=t.sales.map(r=>{const x=At(r,t.rate);return{kind:"sale",id:`sale:${x.id}`,createdAt:x.createdAt,sale:x}}),n=(t.creditOrders??[]).filter(r=>r.status!=="failed").map(r=>({kind:"credit",id:`credit:${r.id}`,createdAt:r.createdAt,order:r})),c=new Set(t.purchases.filter(r=>r.txHash).map(r=>r.txHash.toLowerCase())),u=(t.manaPurchases??[]).filter(r=>!c.has(r.txHash.toLowerCase())).map(r=>({kind:"mana-purchase",id:`mana-purchase:${r.id}`,createdAt:r.createdAt,sale:r}));return[...s,...a,...n,...u].sort((r,x)=>x.createdAt-r.createdAt||(r.id<x.id?-1:1))}function Pt(t,i){return i==="all"?t:i==="sales"?t.filter(s=>s.kind==="sale"):t.filter(s=>s.kind==="purchase"||s.kind==="credit"||s.kind==="mana-purchase")}const J=t=>t.trim().toLowerCase();function Lt(t){const i=new Map;for(const s of t??[]){const a=J(s.txHash??"");if(!a)continue;const n=i.get(a);n?n.push(s):i.set(a,[s])}return i}function Nt(t,i,s=Date.now()){const a=i.txHash?t.get(J(i.txHash)):void 0;if(!a||a.length===0)return{kind:"direct"};const n=a.length===1?Et(a[0].netCents):null,c=a.filter(r=>!r.available&&r.availableAt>s);if(c.length===0)return{kind:"credited",credits:n};const u=c.reduce((r,x)=>Math.max(r,x.availableAt),0);return{kind:"pending",credits:n,availableAt:u}}function Et(t){return Math.floor(t/10)}const Tt="https://cdn.decentraland.org/@dcl/shop/0.1.0-30362815497.commit-35ecdbf/assets/credits-product-vs4Q6u6l.svg",T=lt`
2
+ 0% { background-position: 200% 0; }
3
+ 100% { background-position: -200% 0; }
4
+ `,Ct=l.section`
5
+ width: 100%;
6
+ min-width: 0;
7
+ min-height: 60vh;
8
+ /* Centre the whole column — heading, tabs and cards as ONE block — so the feed isn't parked against
9
+ the left edge of a wide page. Centring only the list would leave the heading orphaned from it. */
10
+ max-width: 760px;
11
+ margin-inline: auto;
12
+ `,St=l.div`
13
+ display: flex;
14
+ align-items: baseline;
15
+ gap: 12px;
16
+ margin-bottom: 20px;
17
+ `,Ft=l.h1`
18
+ font-family: ${o.font.sans};
19
+ margin: 0;
20
+ `;l.span`
21
+ color: ${o.colors.muted};
22
+ font-size: 14px;
23
+ `;const Mt=l.div`
24
+ display: flex;
25
+ gap: 8px;
26
+ margin-bottom: 20px;
27
+ flex-wrap: wrap;
28
+ `,Dt=l.button`
29
+ appearance: none;
30
+ border: 1px solid ${o.colors.line};
31
+ background: ${o.colors.white};
32
+ color: ${o.colors.text};
33
+ font-family: ${o.font.sans};
34
+ font-size: 14px;
35
+ font-weight: 600;
36
+ padding: 8px 16px;
37
+ min-height: 40px;
38
+ border-radius: ${o.radius.pill};
39
+ cursor: pointer;
40
+ transition:
41
+ background 0.15s,
42
+ border-color 0.15s,
43
+ color 0.15s;
44
+
45
+ &:hover {
46
+ background: ${o.colors.media};
47
+ }
48
+ &:focus-visible {
49
+ outline: 2px solid ${o.colors.accent};
50
+ outline-offset: 2px;
51
+ }
52
+ &[data-active='true'] {
53
+ background: ${o.colors.accent};
54
+ border-color: ${o.colors.accent};
55
+ color: ${o.colors.white};
56
+ }
57
+ `,K=l.div`
58
+ display: flex;
59
+ flex-direction: column;
60
+ gap: 16px;
61
+ `,k=l.div`
62
+ background: ${o.colors.white};
63
+ border: 1px solid ${o.colors.line};
64
+ border-radius: 16px;
65
+ overflow: hidden;
66
+ `,w=l.div`
67
+ display: flex;
68
+ align-items: center;
69
+ justify-content: space-between;
70
+ gap: 12px;
71
+ padding: 14px 18px;
72
+ background: ${o.colors.softWhite};
73
+ border-bottom: 1px solid ${o.colors.line};
74
+
75
+ ${o.media.down("mobile")} {
76
+ flex-wrap: wrap;
77
+ }
78
+ `,I=l.div`
79
+ display: flex;
80
+ flex-direction: column;
81
+ gap: 2px;
82
+ min-width: 0;
83
+ `,A=l.span`
84
+ font-weight: 700;
85
+ color: ${o.colors.text};
86
+ `,$=l.span`
87
+ font-size: 13px;
88
+ color: ${o.colors.muted};
89
+ `,P=l.div`
90
+ display: flex;
91
+ align-items: center;
92
+ gap: 14px;
93
+ /* Pin to the right regardless of how many elements sit on the left (the credit-purchase card adds a
94
+ leading thumbnail, giving the head three children instead of two). */
95
+ margin-left: auto;
96
+ `,Ht=l.div`
97
+ flex: 0 0 auto;
98
+ width: 52px;
99
+ height: 52px;
100
+ border-radius: 10px;
101
+ background: ${o.colors.media};
102
+ display: flex;
103
+ align-items: center;
104
+ justify-content: center;
105
+
106
+ img {
107
+ width: 30px;
108
+ height: 30px;
109
+ display: block;
110
+ }
111
+ `,L=l.span`
112
+ font-size: 11px;
113
+ font-weight: 700;
114
+ text-transform: uppercase;
115
+ letter-spacing: 0.03em;
116
+ padding: 4px 10px;
117
+ border-radius: ${o.radius.pill};
118
+ white-space: nowrap;
119
+
120
+ &[data-status='SETTLED'] {
121
+ background: rgba(30, 166, 114, 0.14);
122
+ color: ${o.colors.okStrong};
123
+ }
124
+ &[data-status='PENDING'] {
125
+ background: rgba(245, 166, 35, 0.16);
126
+ color: #b5790a;
127
+ }
128
+ &[data-status='SOLD'] {
129
+ background: rgba(103, 58, 183, 0.14);
130
+ color: ${o.colors.accent};
131
+ }
132
+ &[data-status='FAILED'] {
133
+ background: rgba(214, 61, 61, 0.14);
134
+ color: #b02a2a;
135
+ }
136
+ `,p=l.div`
137
+ display: flex;
138
+ align-items: center;
139
+ gap: 5px;
140
+ font-weight: 800;
141
+ color: ${o.colors.text};
142
+ white-space: nowrap;
143
+
144
+ .ccy-mark {
145
+ width: 16px;
146
+ height: 16px;
147
+ }
148
+
149
+ // Money received (a sale) reads as income in the shop's success green.
150
+ &[data-kind='income'] {
151
+ color: ${o.colors.okStrong};
152
+ }
153
+ `,Z=l.img`
154
+ width: 16px;
155
+ height: 16px;
156
+ vertical-align: -0.15em;
157
+ `,zt=l.span`
158
+ display: inline-flex;
159
+ align-items: center;
160
+ cursor: pointer;
161
+ `,qt=l.span`
162
+ position: fixed;
163
+ transform: translateX(-50%);
164
+ padding: 6px 8px;
165
+ border-radius: 6px;
166
+ background: #16141a;
167
+ color: #fff;
168
+ font-size: 12px;
169
+ font-weight: 600;
170
+ line-height: 1;
171
+ white-space: nowrap;
172
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
173
+ pointer-events: none;
174
+ z-index: 9999;
175
+ `,C=l.div`
176
+ display: flex;
177
+ flex-direction: column;
178
+ `,N=l.div`
179
+ display: grid;
180
+ grid-template-columns: 52px 1fr auto;
181
+ align-items: center;
182
+ gap: 14px;
183
+ padding: 12px 18px;
184
+ text-decoration: none;
185
+ color: inherit;
186
+
187
+ & + & {
188
+ border-top: 1px solid ${o.colors.line};
189
+ }
190
+
191
+ &[data-link='true'] {
192
+ transition: background 0.15s;
193
+ }
194
+ &[data-link='true']:hover {
195
+ background: ${o.colors.media};
196
+ }
197
+ &[data-link='true']:focus-visible {
198
+ outline: 2px solid ${o.colors.accent};
199
+ outline-offset: -2px;
200
+ }
201
+ `,S=l.div`
202
+ width: 52px;
203
+ height: 52px;
204
+ border-radius: 10px;
205
+ background: ${o.colors.media};
206
+ overflow: hidden;
207
+ display: flex;
208
+ align-items: center;
209
+ justify-content: center;
210
+ color: ${o.colors.muted2};
211
+
212
+ img {
213
+ width: 100%;
214
+ height: 100%;
215
+ object-fit: contain;
216
+ }
217
+ `,F=l.div`
218
+ width: 52px;
219
+ height: 52px;
220
+ border-radius: 10px;
221
+ background: linear-gradient(100deg, ${o.colors.media} 30%, ${o.colors.panel} 50%, ${o.colors.media} 70%);
222
+ background-size: 200% 100%;
223
+ animation: ${T} 1.3s infinite linear;
224
+
225
+ @media (prefers-reduced-motion: reduce) {
226
+ animation: none;
227
+ }
228
+ `,M=l.div`
229
+ min-width: 0;
230
+ display: flex;
231
+ flex-direction: column;
232
+ gap: 2px;
233
+ `,D=l.span`
234
+ font-weight: 700;
235
+ white-space: nowrap;
236
+ overflow: hidden;
237
+ text-overflow: ellipsis;
238
+ `,H=l.span`
239
+ display: inline-block;
240
+ width: 140px;
241
+ max-width: 60%;
242
+ height: 12px;
243
+ border-radius: 6px;
244
+ background: linear-gradient(100deg, ${o.colors.media} 30%, ${o.colors.panel} 50%, ${o.colors.media} 70%);
245
+ background-size: 200% 100%;
246
+ animation: ${T} 1.3s infinite linear;
247
+
248
+ @media (prefers-reduced-motion: reduce) {
249
+ animation: none;
250
+ }
251
+ `,z=l.span`
252
+ font-size: 13px;
253
+ color: ${o.colors.muted};
254
+ `,Ot=l.div`
255
+ display: flex;
256
+ align-items: center;
257
+ gap: 4px;
258
+ font-weight: 700;
259
+ color: ${o.colors.text};
260
+ white-space: nowrap;
261
+
262
+ .ccy-mark {
263
+ width: 14px;
264
+ height: 14px;
265
+ }
266
+ `,U=l.div`
267
+ height: 132px;
268
+ border-radius: 16px;
269
+ border: 1px solid transparent;
270
+ background: linear-gradient(100deg, ${o.colors.media} 30%, ${o.colors.panel} 50%, ${o.colors.media} 70%);
271
+ background-size: 200% 100%;
272
+ animation: ${T} 1.3s infinite linear;
273
+
274
+ @media (prefers-reduced-motion: reduce) {
275
+ animation: none;
276
+ }
277
+ `,V=l.div`
278
+ display: flex;
279
+ flex-direction: column;
280
+ align-items: center;
281
+ gap: 8px;
282
+ text-align: center;
283
+ padding: 90px 20px;
284
+ min-height: 50vh;
285
+ `,Y=l.p`
286
+ font-size: 22px;
287
+ font-weight: 700;
288
+ margin: 6px 0 0;
289
+ `,Wt=l(ht)`
290
+ margin-top: 12px;
291
+ `,q=N.withComponent(_),y=24,Rt=["all","purchases","sales"];function m(t){try{return new Date(t).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function tt(t){return t.length>10?`${t.slice(0,6)}…${t.slice(-4)}`:t}function et(t){const i=Number(t)/1e18;return Number.isFinite(i)?i.toLocaleString("en",{maximumFractionDigits:2}):"0"}function it({children:t}){const i=b.useRef(null),[s,a]=b.useState(null),n=()=>{var u;const c=(u=i.current)==null?void 0:u.getBoundingClientRect();c&&a({top:c.bottom+8,left:c.left+c.width/2})};return e.jsxs(zt,{ref:i,tabIndex:0,onMouseEnter:n,onMouseLeave:()=>a(null),onFocus:n,onBlur:()=>a(null),children:[t,s?dt.createPortal(e.jsx(qt,{style:{top:s.top,left:s.left},role:"tooltip",children:d("activity.polygonMana")}),document.body):null]})}function Bt({item:t}){const{data:i,isLoading:s}=j({queryKey:["trade-display",t.tradeId],queryFn:()=>ft(t.tradeId),enabled:!!t.tradeId,staleTime:3e5}),a=!!t.tradeId&&s,n=(i==null?void 0:i.name)??d("activity.itemFallback"),c=(i==null?void 0:i.thumbnail)??"",u=E({contractAddress:i==null?void 0:i.contractAddress,tokenId:i==null?void 0:i.tokenId,itemId:i==null?void 0:i.itemId})??void 0,r=e.jsxs(e.Fragment,{children:[a?e.jsx(F,{}):e.jsx(S,{children:c?e.jsx("img",{src:c,alt:n}):e.jsx(g,{name:"cart",size:20})}),e.jsxs(M,{children:[a?e.jsx(H,{}):e.jsx(D,{title:n,children:n}),t.quantity>1?e.jsx(z,{children:d("activity.quantity",{count:t.quantity})}):null]}),e.jsxs(Ot,{children:[e.jsx(v,{className:"ccy-mark"})," ",t.credits]})]});return u?e.jsx(q,{to:u,"data-link":"true",children:r}):e.jsx(N,{children:r})}function Gt({order:t}){const i=It(t.lines),s=i.reduce((a,n)=>a+n.quantity,0);return e.jsxs(k,{"data-testid":"purchase-order",children:[e.jsxs(w,{children:[e.jsxs(I,{children:[e.jsx(A,{children:m(t.createdAt)}),e.jsxs($,{children:[d("activity.purchaseLabel")," · ",d("activity.itemCount",{count:s})]})]}),e.jsxs(P,{children:[e.jsx(L,{"data-status":t.status,children:t.status==="PENDING"?d("activity.processing"):d("activity.completed")}),e.jsxs(p,{children:[e.jsx(v,{className:"ccy-mark"})," ",t.totalCredits]})]})]}),e.jsx(C,{children:i.map(a=>e.jsx(Bt,{item:a},a.key))})]})}function Kt({sale:t}){const{data:i,isLoading:s}=j({queryKey:["asset-display",t.contractAddress,t.tokenId,t.itemId],queryFn:()=>X(t.contractAddress,{tokenId:t.tokenId,itemId:t.itemId}),enabled:!!t.contractAddress,staleTime:3e5}),a=(i==null?void 0:i.name)??d("activity.itemFallback"),n=(i==null?void 0:i.thumbnail)??"",c=E({contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId})??void 0,u=e.jsxs(e.Fragment,{children:[s?e.jsx(F,{}):e.jsx(S,{children:n?e.jsx("img",{src:n,alt:a}):e.jsx(g,{name:"offer",size:20})}),e.jsxs(M,{children:[s?e.jsx(H,{}):e.jsx(D,{title:a,children:a}),e.jsx(z,{children:d("activity.boughtFrom",{account:tt(t.seller)})})]})]});return e.jsxs(k,{"data-testid":"activity-mana-purchase",children:[e.jsxs(w,{children:[e.jsxs(I,{children:[e.jsx(A,{children:m(t.createdAt)}),e.jsx($,{children:d("activity.paidWithMana")})]}),e.jsxs(P,{children:[e.jsx(L,{"data-status":"SETTLED",children:d("activity.completed")}),e.jsxs(p,{children:[et(t.manaWei)," ",e.jsx(it,{children:e.jsx(Z,{src:Q,alt:"MANA"})})]})]})]}),e.jsx(C,{children:c?e.jsx(q,{to:c,"data-link":"true",children:u}):e.jsx(N,{children:u})})]})}function Ut({sale:t,payout:i}){const{data:s,isLoading:a}=j({queryKey:["asset-display",t.contractAddress,t.tokenId,t.itemId],queryFn:()=>X(t.contractAddress,{tokenId:t.tokenId,itemId:t.itemId}),enabled:!!t.contractAddress,staleTime:3e5}),n=(s==null?void 0:s.name)??d("activity.itemFallback"),c=(s==null?void 0:s.thumbnail)??"",u=E({contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId})??void 0,r=e.jsxs(e.Fragment,{children:[a?e.jsx(F,{}):e.jsx(S,{children:c?e.jsx("img",{src:c,alt:n}):e.jsx(g,{name:"offer",size:20})}),e.jsxs(M,{children:[a?e.jsx(H,{}):e.jsx(D,{title:n,children:n}),e.jsxs(z,{children:[d("activity.soldTo",{account:tt(t.counterparty)}),i.kind==="pending"?` · ${d("activity.payoutPendingOn",{date:m(i.availableAt)})}`:""]})]})]});return e.jsxs(k,{"data-testid":"activity-sale",children:[e.jsxs(w,{children:[e.jsxs(I,{children:[e.jsx(A,{children:m(t.createdAt)}),e.jsx($,{children:d("activity.saleLabel")})]}),e.jsxs(P,{children:[e.jsx(L,{"data-status":i.kind==="pending"?"PENDING":"SOLD",children:i.kind==="pending"?d("activity.payoutPending"):d("activity.sold")}),i.kind==="direct"?e.jsxs(p,{"data-kind":"income",children:["+",et(t.manaWei)," ",e.jsx(it,{children:e.jsx(Z,{src:Q,alt:"MANA"})})]}):i.credits!==null?e.jsxs(p,{"data-kind":"income",children:[e.jsx(v,{className:"ccy-mark"})," +",gt(i.credits)]}):e.jsx(p,{"data-kind":"income",children:d("activity.payoutCredited")})]})]}),e.jsx(C,{children:u?e.jsx(q,{to:u,"data-link":"true",children:r}):e.jsx(N,{children:r})})]})}function _t({order:t}){const i=`$${(t.usdCents/100).toFixed(2)}`,s=mt(t.status),a=s==="SETTLED"?d("activity.completed"):s==="FAILED"?d("activity.failed"):d("activity.processing");return e.jsx(k,{"data-testid":"credit-order",children:e.jsxs(w,{children:[e.jsx(Ht,{children:e.jsx("img",{src:Tt,alt:"","aria-hidden":!0})}),e.jsxs(I,{children:[e.jsx(A,{children:m(t.createdAt)}),e.jsxs($,{children:[d("activity.creditPurchaseLabel")," · ",d("activity.creditPaid",{usd:i})]})]}),e.jsxs(P,{children:[e.jsx(L,{"data-status":s,children:a}),e.jsxs(p,{"data-kind":"income",children:["+",e.jsx(v,{className:"ccy-mark"})," ",t.credits]})]})]})})}function Qt({filter:t}){const i={all:{icon:"clock",title:d("activity.emptyAllTitle"),body:d("activity.emptyAllBody")},purchases:{icon:"cart",title:d("activity.emptyPurchasesTitle"),body:d("activity.emptyPurchasesBody")},sales:{icon:"offer",title:d("activity.emptySalesTitle"),body:d("activity.emptySalesBody")}}[t];return e.jsxs(V,{children:[e.jsx(g,{name:i.icon,size:40,color:"var(--muted-2)"}),e.jsx(Y,{children:i.title}),e.jsx("p",{className:"muted",children:i.body}),t!=="sales"?e.jsx(Wt,{as:_,to:"/assets",variant:"purple",children:d("notFound.cta")}):null]})}function se(){ut({title:d("nav.activity"),noindex:!0});const{session:t}=xt(),[i,s]=b.useState("all"),a=!!t&&i!=="sales",n=!!t&&i!=="purchases",c=f(["purchases",t==null?void 0:t.address],h=>pt(t.address,t.identity,{first:y,skip:h}),{enabled:a}),u=f(["sales",t==null?void 0:t.address],h=>B(t.address,{role:"seller",first:y,skip:h}),{enabled:n}),r=f(["credit-orders",t==null?void 0:t.address],h=>G(t.address,t.identity,{first:y,skip:h}),{enabled:a}),x=f(["mana-purchases",t==null?void 0:t.address],h=>B(t.address,{role:"buyer",first:y,skip:h}),{enabled:a}),{data:O}=j({queryKey:["sale-payouts",t==null?void 0:t.address],queryFn:()=>G(t.address,t.identity,{first:200}).then(h=>h.payouts),enabled:n,staleTime:6e4}),at=b.useMemo(()=>Lt(O),[O]),{data:nt}=bt(n);if(!t)return e.jsxs(V,{children:[e.jsx(g,{name:"clock",size:40,color:"var(--muted-2)"}),e.jsx(Y,{children:d("activity.signInTitle")}),e.jsx("p",{className:"muted",children:d("activity.signInBody")})]});const W=Pt($t({purchases:a?c.items:[],sales:n?u.items:[],creditOrders:a?r.items:[],manaPurchases:a?x.items:[],rate:nt}),i),st=a&&(c.isLoading||r.isLoading||x.isLoading)||n&&u.isLoading,R=a&&(c.isFetchingNextPage||r.isFetchingNextPage||x.isFetchingNextPage)||n&&u.isFetchingNextPage,rt=a&&(c.hasNextPage||r.hasNextPage||x.hasNextPage)||n&&u.hasNextPage;function ot(){a&&c.hasNextPage&&c.fetchNextPage(),a&&r.hasNextPage&&r.fetchNextPage(),a&&x.hasNextPage&&x.fetchNextPage(),n&&u.hasNextPage&&u.fetchNextPage()}return e.jsxs(Ct,{children:[e.jsx(St,{children:e.jsx(Ft,{children:d("nav.activity")})}),e.jsx(Mt,{role:"tablist","aria-label":d("nav.activity"),children:Rt.map(h=>e.jsx(Dt,{type:"button",role:"tab","aria-selected":i===h,"data-active":i===h,"data-testid":`activity-filter-${h}`,onClick:()=>s(h),children:d(`activity.filter.${h}`)},h))}),st?e.jsx(K,{children:Array.from({length:5}).map((h,ct)=>e.jsx(U,{},ct))}):W.length===0?e.jsx(Qt,{filter:i}):e.jsxs(e.Fragment,{children:[e.jsxs(K,{children:[W.map(h=>h.kind==="purchase"?e.jsx(Gt,{order:h.order},h.id):h.kind==="credit"?e.jsx(_t,{order:h.order},h.id):h.kind==="mana-purchase"?e.jsx(Kt,{sale:h.sale},h.id):e.jsx(Ut,{sale:h.sale,payout:Nt(at,h.sale)},h.id)),R?e.jsx(U,{}):null]}),e.jsx(jt,{hasNextPage:rt,isFetching:R,onLoadMore:ot})]})]})}export{se as Activity};
@@ -1,11 +1,11 @@
1
- import{r as l,j as v}from"./react-B36MyIP_.js";const w="https://cdn.decentraland.org/@dcl/shop/0.1.0-30347128512.commit-fa777d2/assets/custom-welcome-background-BxlFQma9.webp",S="https://cdn.decentraland.org/@dcl/shop/0.1.0-30347128512.commit-fa777d2/assets/DCL_LogoPattern-BryBPc3d.png",U=`
1
+ import{r as l,j as v}from"./react-B36MyIP_.js";const w="https://cdn.decentraland.org/@dcl/shop/0.1.0-30362815497.commit-35ecdbf/assets/custom-welcome-background-BxlFQma9.webp",S="https://cdn.decentraland.org/@dcl/shop/0.1.0-30362815497.commit-35ecdbf/assets/DCL_LogoPattern-BryBPc3d.png",b=`
2
2
  attribute vec2 a_position;
3
3
  varying vec2 v_uv;
4
4
  void main() {
5
5
  v_uv = a_position * 0.5 + 0.5;
6
6
  gl_Position = vec4(a_position, 0.0, 1.0);
7
7
  }
8
- `,b=`
8
+ `,U=`
9
9
  precision highp float;
10
10
 
11
11
  uniform float u_time;
@@ -77,4 +77,4 @@ void main() {
77
77
 
78
78
  gl_FragColor = result;
79
79
  }
80
- `;function g(t,a,r){const e=t.createShader(a);return e?(t.shaderSource(e,r),t.compileShader(e),t.getShaderParameter(e,t.COMPILE_STATUS)?e:(console.error("Shader compile error:",t.getShaderInfoLog(e)),t.deleteShader(e),null)):null}function P(t,a,r){const e=t.createProgram();return e?(t.attachShader(e,a),t.attachShader(e,r),t.linkProgram(e),t.getProgramParameter(e,t.LINK_STATUS)?e:(console.error("Program link error:",t.getProgramInfoLog(e)),t.deleteProgram(e),null)):null}function D(t,a,r){const e=t.createTexture();if(!e)return null;t.bindTexture(t.TEXTURE_2D,e),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array([128,128,128,255]));const o=new Image;return o.crossOrigin="anonymous",o.onload=()=>{r!=null&&r()||(t.bindTexture(t.TEXTURE_2D,e),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,!0),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,o),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR_MIPMAP_LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.generateMipmap(t.TEXTURE_2D))},o.src=a,e}function L(){const t=l.useRef(null),a=l.useRef(0);return l.useEffect(()=>{var h;const r=t.current;if(!r||(h=window.matchMedia)!=null&&h.call(window,"(prefers-reduced-motion: reduce)").matches)return;const e=r.getContext("webgl",{alpha:!1,antialias:!1});if(!e)return;const o=g(e,e.VERTEX_SHADER,U),c=g(e,e.FRAGMENT_SHADER,b);if(!o||!c){o&&e.deleteShader(o),c&&e.deleteShader(c);return}const n=P(e,o,c);if(!n){e.deleteShader(o),e.deleteShader(c);return}const u=e.getAttribLocation(n,"a_position"),_=e.getUniformLocation(n,"u_time"),R=e.getUniformLocation(n,"u_resolution"),y=e.getUniformLocation(n,"u_overlayTex"),s=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,s),e.bufferData(e.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,-1,1,1,-1,1,1]),e.STATIC_DRAW);let m=!1;const d=D(e,S,()=>m),A=()=>{const i=window.devicePixelRatio||1,x=r.clientWidth*i,E=r.clientHeight*i;(r.width!==x||r.height!==E)&&(r.width=x,r.height=E)},p=performance.now()/1e3,f=()=>{A(),e.viewport(0,0,r.width,r.height),e.useProgram(n),e.uniform1f(_,performance.now()/1e3-p),e.uniform2f(R,r.width,r.height),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,d),e.uniform1i(y,0),e.enableVertexAttribArray(u),e.bindBuffer(e.ARRAY_BUFFER,s),e.vertexAttribPointer(u,2,e.FLOAT,!1,0,0),e.drawArrays(e.TRIANGLES,0,6),a.current=requestAnimationFrame(f)},T=i=>{i.preventDefault(),cancelAnimationFrame(a.current),r.style.opacity="0"};return r.addEventListener("webglcontextlost",T,!1),a.current=requestAnimationFrame(f),()=>{m=!0,cancelAnimationFrame(a.current),r.removeEventListener("webglcontextlost",T),e.deleteProgram(n),e.deleteShader(o),e.deleteShader(c),e.deleteBuffer(s),e.deleteTexture(d)}},[]),v.jsxs("div",{className:"AnimatedBackground","aria-hidden":!0,children:[v.jsx("div",{className:"AnimatedBackground__fallback",style:{backgroundImage:`url(${w})`}}),v.jsx("canvas",{ref:t,className:"AnimatedBackground__canvas"})]})}export{L as default};
80
+ `;function g(t,a,r){const e=t.createShader(a);return e?(t.shaderSource(e,r),t.compileShader(e),t.getShaderParameter(e,t.COMPILE_STATUS)?e:(console.error("Shader compile error:",t.getShaderInfoLog(e)),t.deleteShader(e),null)):null}function P(t,a,r){const e=t.createProgram();return e?(t.attachShader(e,a),t.attachShader(e,r),t.linkProgram(e),t.getProgramParameter(e,t.LINK_STATUS)?e:(console.error("Program link error:",t.getProgramInfoLog(e)),t.deleteProgram(e),null)):null}function D(t,a,r){const e=t.createTexture();if(!e)return null;t.bindTexture(t.TEXTURE_2D,e),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array([128,128,128,255]));const o=new Image;return o.crossOrigin="anonymous",o.onload=()=>{r!=null&&r()||(t.bindTexture(t.TEXTURE_2D,e),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,!0),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,o),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR_MIPMAP_LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.generateMipmap(t.TEXTURE_2D))},o.src=a,e}function L(){const t=l.useRef(null),a=l.useRef(0);return l.useEffect(()=>{var h;const r=t.current;if(!r||(h=window.matchMedia)!=null&&h.call(window,"(prefers-reduced-motion: reduce)").matches)return;const e=r.getContext("webgl",{alpha:!1,antialias:!1});if(!e)return;const o=g(e,e.VERTEX_SHADER,b),c=g(e,e.FRAGMENT_SHADER,U);if(!o||!c){o&&e.deleteShader(o),c&&e.deleteShader(c);return}const n=P(e,o,c);if(!n){e.deleteShader(o),e.deleteShader(c);return}const u=e.getAttribLocation(n,"a_position"),_=e.getUniformLocation(n,"u_time"),R=e.getUniformLocation(n,"u_resolution"),y=e.getUniformLocation(n,"u_overlayTex"),s=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,s),e.bufferData(e.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,-1,1,1,-1,1,1]),e.STATIC_DRAW);let m=!1;const d=D(e,S,()=>m),A=()=>{const i=window.devicePixelRatio||1,x=r.clientWidth*i,E=r.clientHeight*i;(r.width!==x||r.height!==E)&&(r.width=x,r.height=E)},p=performance.now()/1e3,f=()=>{A(),e.viewport(0,0,r.width,r.height),e.useProgram(n),e.uniform1f(_,performance.now()/1e3-p),e.uniform2f(R,r.width,r.height),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,d),e.uniform1i(y,0),e.enableVertexAttribArray(u),e.bindBuffer(e.ARRAY_BUFFER,s),e.vertexAttribPointer(u,2,e.FLOAT,!1,0,0),e.drawArrays(e.TRIANGLES,0,6),a.current=requestAnimationFrame(f)},T=i=>{i.preventDefault(),cancelAnimationFrame(a.current),r.style.opacity="0"};return r.addEventListener("webglcontextlost",T,!1),a.current=requestAnimationFrame(f),()=>{m=!0,cancelAnimationFrame(a.current),r.removeEventListener("webglcontextlost",T),e.deleteProgram(n),e.deleteShader(o),e.deleteShader(c),e.deleteBuffer(s),e.deleteTexture(d)}},[]),v.jsxs("div",{className:"AnimatedBackground","aria-hidden":!0,children:[v.jsx("div",{className:"AnimatedBackground__fallback",style:{backgroundImage:`url(${w})`}}),v.jsx("canvas",{ref:t,className:"AnimatedBackground__canvas"})]})}export{L as default};
@@ -1,4 +1,4 @@
1
- import{a as Le,r as f,j as e,b as tt}from"./react-B36MyIP_.js";import{c as W,D as nt,y as st,s as ot,n as s,K as t,e as ie,w as rt,x as Fe,m as Be,j as it,t as o,I as T,k as B,A as ye,E as J,F as at,G as lt,h as We,L as ct,M as te,aL as dt,aM as pt}from"./index-BdhwhIIA.js";import{u as ft,M as ht}from"./MarketCheckout-FIvhuZ3q.js";import{r as xt,a as ut,m as He}from"./mana-rate-DHV9Z9OW.js";import{u as Ue}from"./useManaRate-DlMC8eER.js";import{g as mt,h as gt,i as bt,j as yt,k as wt,C as jt,l as vt,o as Ct,m as $t,n as kt,M as St,E as Et,p as Tt,q as It,r as _t,s as Rt,t as zt,u as At}from"./Assets.styles-9f6mDaEv.js";import{d as we,R as Nt,F as Mt,S as je,b as Pt}from"./categories-Cdf5XoX6.js";import{L as Lt}from"./LoadMore-CAh6doss.js";import{u as Ft}from"./useInfiniteGrid-BjepR_Mr.js";import{E as Bt}from"./ErrorNotice-D_Z5OVFI.js";import{d as Wt}from"./dcl-schemas-BICTSpB5.js";import{u as Ht,G as Ut,w as Ot,S as Dt}from"./buy-gasless-klfuiHzU.js";import{s as Gt}from"./buy-zrP-t3zp.js";import{i as qt}from"./trade-encoding-oV0MV6zA.js";import{f as Vt}from"./errors-DAbZY9SI.js";import{J as Kt,C as Zt,B as re}from"./ethers-BteKixT0.js";import{l as Qt}from"./loader-logo-BzY9EKdC.js";import{n as Jt}from"./emotion-CSxEP8yM.js";import"./sentry-gZJVwIqQ.js";import"./intl-CBcMB1D2.js";import"./authorizations-DMJkwvHN.js";import"./sendMetaTransaction-SaUBHgVB.js";import"./Tooltip-CVHiMiqz.js";function ne(n){const r=n.source??"item",l=n.tradeId||`${n.contractAddress}-${n.tokenId??n.itemId??""}`;return`${r}:${l}`}const H="100000000000000000000",Oe=2,X=15,Xt=/^[a-zA-Z0-9]+$/;function ve(n){const r=n.trim();return r.length===0?{ok:!1,reason:"empty"}:Xt.test(r)?r.length<Oe?{ok:!1,reason:"too-short"}:r.length>X?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function Yt(n){return n.replace(/[^a-zA-Z0-9]/g,"").slice(0,X)}const en=["function available(string _subdomain) view returns (bool)"],Ce={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function tn(){return W.chainId===Wt.ChainId.MATIC_MAINNET?Ce.mainnet:Ce.sepolia}async function nn(n,r={}){var a;const{rpc:l,address:h}=tn(),u=new Kt(l),c=new Zt(h,en,u);console.info(`[names] availability check → DCLRegistrar(${h}).available("${n}") on ${l}`);const x=await c.available(n);if((a=r.signal)!=null&&a.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${n}" available=${x}`),x?"available":"taken"}const sn="https://app.across.to/api";class De extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}function on(n){return ut(H,n)}async function rn(n,r,l={}){var a;const h=l.chainId??W.chainId,u=l.provider??"across",c=`${W.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(r)}&chainId=${h}&provider=${u}`,x=await ot(c,{method:"GET",identity:n,metadata:{}});if(!x.ok){let d;try{d=(a=await x.json())==null?void 0:a.code}catch{}throw d==="ROUTE_COST_TOO_HIGH"?new De:new Error(`fetchNameCreditRoute ${x.status}`)}return x.json()}function an(n,r){const l=re.from(n.availableAmount),u=re.from(H).sub(l);return{credits:[{value:n.amount,expiresAt:Number(n.expiresAt),salt:qt(n.id)}],creditsSignatures:[n.signature],externalCall:{target:r.externalCall.target,selector:r.externalCall.selector,data:r.externalCall.data,expiresAt:r.externalCall.expiresAt,salt:r.externalCall.salt},customExternalCallSignature:r.customExternalCallSignature,maxUncreditedValue:u.isNegative()?"0":u.toString(),maxCreditedValue:H}}async function ln(n,r={}){const l=sn,h=r.intervalMs??1e4,u=r.maxAttempts??60;let c={status:"pending",destinationTxHash:null,actionsSucceeded:!1};for(let x=0;x<u;x++){try{const a=await fetch(`${l}/deposit/status?originChainId=137&depositTxHash=${n}`);if(a.ok){const d=await a.json(),p=(d.status??"pending").toLowerCase(),w=d.fillTx??d.fillTxnRef??null,m=d.actionsSucceeded!==!1;if(p==="filled")return{status:"filled",destinationTxHash:w,actionsSucceeded:m};if(p==="refunded"||p==="expired")return{status:p,destinationTxHash:null,actionsSucceeded:!1};c={status:"pending",destinationTxHash:w,actionsSucceeded:m}}}catch{}x<u-1&&await new Promise(a=>setTimeout(a,h))}return c}async function cn(n){const{name:r,identity:l,signer:h}=n,u=n.chainId??W.chainId,c=n.provider??"across",x=(n.beneficiary??await h.getAddress()).toLowerCase();let a=null,d=!1;console.info("[names] register start",{name:r,buyer:x,chainId:u,provider:c});try{const p=await xt(u),w=on(p);console.info("[names] step 1/6 sized reservation",{usdCents:w,manaRate:p});const m=await rn(l,r,{chainId:u,provider:c});console.info("[names] step 2/6 route fetched",{target:m.externalCall.target,selector:m.externalCall.selector,provider:m.provider,quoteId:m.quoteId});const C=await nt(l,w);if(a=C.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:C.credit.id,maxCreditedValue:C.maxCreditedValue}),re.from(C.maxCreditedValue).lt(H))throw new Error("Credit under-sized for the name price");const $=an(C.credit,m);let b;try{b=await Ht({chainId:u,buyer:x,signer:h,args:$})}catch(y){if(!(y instanceof Ut))throw y;b=await Gt(u,$,h)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:b}),await Ot(b),d=!0,console.info("[names] step 5/6 origin tx confirmed",{originTxHash:b}),c==="across"){const y=await ln(b,n.acrossPoll);if(console.info("[names] step 6/6 across status",y),y.status==="pending")return{status:"pending",originTxHash:b};if(y.status!=="filled"||!y.actionsSucceeded)throw new Error("The name could not be registered on Ethereum; your funds were recovered.");return{status:"registered",originTxHash:b,destinationTxHash:y.destinationTxHash}}return{status:"pending",originTxHash:b}}catch(p){if(console.error("[names] register failed — raw error:",p,{name:r,buyer:x,originConfirmed:d}),p instanceof Dt)return{status:"pending",originTxHash:p.txHash};throw a&&!d&&await st(l,[a]).catch(()=>{}),p instanceof De?p:new Error(Vt(p,"Couldn't register the name. Please try again.",{sale:!0}))}}const dn=s.div`
1
+ import{a as Fe,r as f,j as e,b as tt}from"./react-B36MyIP_.js";import{c as W,D as nt,y as st,s as ot,n as s,K as t,e as ie,w as rt,x as Le,m as Be,j as it,t as o,I as T,k as B,A as ye,E as J,F as at,G as lt,h as We,L as ct,M as te,aM as dt,aN as pt}from"./index-BSeusSHl.js";import{u as ft,M as ht}from"./MarketCheckout-ClTJqeTN.js";import{r as xt,a as ut,m as He}from"./mana-rate-BJbe6lgb.js";import{u as Ue}from"./useManaRate-CY5PbqWB.js";import{g as mt,h as gt,i as bt,j as yt,k as wt,C as jt,l as vt,o as Ct,m as $t,n as kt,M as St,E as Et,p as Tt,q as It,r as _t,s as Rt,t as zt,u as At}from"./Assets.styles-BN81sFiL.js";import{d as we,R as Nt,F as Mt,S as je,b as Pt}from"./categories-CV5P_HZd.js";import{L as Ft}from"./LoadMore-Cp-E67xI.js";import{u as Lt}from"./useInfiniteGrid-dBP53DpO.js";import{E as Bt}from"./ErrorNotice-D_Z5OVFI.js";import{d as Wt}from"./dcl-schemas-BICTSpB5.js";import{u as Ht,G as Ut,w as Ot,S as Dt}from"./buy-gasless-BdW9VEKq.js";import{s as Gt}from"./buy-Tme1UHVf.js";import{i as qt}from"./trade-encoding-DXoI04Mc.js";import{f as Vt}from"./errors-DCLH44Ym.js";import{J as Kt,C as Zt,B as re}from"./ethers-BteKixT0.js";import{l as Qt}from"./loader-logo-BzY9EKdC.js";import{n as Jt}from"./emotion-CSxEP8yM.js";import"./sentry-gZJVwIqQ.js";import"./intl-CBcMB1D2.js";import"./authorizations-CUAi4uqJ.js";import"./sendMetaTransaction-DEU_Xtzf.js";import"./Tooltip-QUx-0PAd.js";function ne(n){const r=n.source??"item",l=n.tradeId||`${n.contractAddress}-${n.tokenId??n.itemId??""}`;return`${r}:${l}`}const H="100000000000000000000",Oe=2,X=15,Xt=/^[a-zA-Z0-9]+$/;function ve(n){const r=n.trim();return r.length===0?{ok:!1,reason:"empty"}:Xt.test(r)?r.length<Oe?{ok:!1,reason:"too-short"}:r.length>X?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function Yt(n){return n.replace(/[^a-zA-Z0-9]/g,"").slice(0,X)}const en=["function available(string _subdomain) view returns (bool)"],Ce={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function tn(){return W.chainId===Wt.ChainId.MATIC_MAINNET?Ce.mainnet:Ce.sepolia}async function nn(n,r={}){var a;const{rpc:l,address:h}=tn(),u=new Kt(l),c=new Zt(h,en,u);console.info(`[names] availability check → DCLRegistrar(${h}).available("${n}") on ${l}`);const x=await c.available(n);if((a=r.signal)!=null&&a.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${n}" available=${x}`),x?"available":"taken"}const sn="https://app.across.to/api";class De extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}function on(n){return ut(H,n)}async function rn(n,r,l={}){var a;const h=l.chainId??W.chainId,u=l.provider??"across",c=`${W.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(r)}&chainId=${h}&provider=${u}`,x=await ot(c,{method:"GET",identity:n,metadata:{}});if(!x.ok){let d;try{d=(a=await x.json())==null?void 0:a.code}catch{}throw d==="ROUTE_COST_TOO_HIGH"?new De:new Error(`fetchNameCreditRoute ${x.status}`)}return x.json()}function an(n,r){const l=re.from(n.availableAmount),u=re.from(H).sub(l);return{credits:[{value:n.amount,expiresAt:Number(n.expiresAt),salt:qt(n.id)}],creditsSignatures:[n.signature],externalCall:{target:r.externalCall.target,selector:r.externalCall.selector,data:r.externalCall.data,expiresAt:r.externalCall.expiresAt,salt:r.externalCall.salt},customExternalCallSignature:r.customExternalCallSignature,maxUncreditedValue:u.isNegative()?"0":u.toString(),maxCreditedValue:H}}async function ln(n,r={}){const l=sn,h=r.intervalMs??1e4,u=r.maxAttempts??60;let c={status:"pending",destinationTxHash:null,actionsSucceeded:!1};for(let x=0;x<u;x++){try{const a=await fetch(`${l}/deposit/status?originChainId=137&depositTxHash=${n}`);if(a.ok){const d=await a.json(),p=(d.status??"pending").toLowerCase(),w=d.fillTx??d.fillTxnRef??null,m=d.actionsSucceeded!==!1;if(p==="filled")return{status:"filled",destinationTxHash:w,actionsSucceeded:m};if(p==="refunded"||p==="expired")return{status:p,destinationTxHash:null,actionsSucceeded:!1};c={status:"pending",destinationTxHash:w,actionsSucceeded:m}}}catch{}x<u-1&&await new Promise(a=>setTimeout(a,h))}return c}async function cn(n){const{name:r,identity:l,signer:h}=n,u=n.chainId??W.chainId,c=n.provider??"across",x=(n.beneficiary??await h.getAddress()).toLowerCase();let a=null,d=!1;console.info("[names] register start",{name:r,buyer:x,chainId:u,provider:c});try{const p=await xt(u),w=on(p);console.info("[names] step 1/6 sized reservation",{usdCents:w,manaRate:p});const m=await rn(l,r,{chainId:u,provider:c});console.info("[names] step 2/6 route fetched",{target:m.externalCall.target,selector:m.externalCall.selector,provider:m.provider,quoteId:m.quoteId});const C=await nt(l,w);if(a=C.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:C.credit.id,maxCreditedValue:C.maxCreditedValue}),re.from(C.maxCreditedValue).lt(H))throw new Error("Credit under-sized for the name price");const $=an(C.credit,m);let b;try{b=await Ht({chainId:u,buyer:x,signer:h,args:$})}catch(y){if(!(y instanceof Ut))throw y;b=await Gt(u,$,h)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:b}),await Ot(b),d=!0,console.info("[names] step 5/6 origin tx confirmed",{originTxHash:b}),c==="across"){const y=await ln(b,n.acrossPoll);if(console.info("[names] step 6/6 across status",y),y.status==="pending")return{status:"pending",originTxHash:b};if(y.status!=="filled"||!y.actionsSucceeded)throw new Error("The name could not be registered on Ethereum; your funds were recovered.");return{status:"registered",originTxHash:b,destinationTxHash:y.destinationTxHash}}return{status:"pending",originTxHash:b}}catch(p){if(console.error("[names] register failed — raw error:",p,{name:r,buyer:x,originConfirmed:d}),p instanceof Dt)return{status:"pending",originTxHash:p.txHash};throw a&&!d&&await st(l,[a]).catch(()=>{}),p instanceof De?p:new Error(Vt(p,"Couldn't register the name. Please try again.",{sale:!0}))}}const dn=s.div`
2
2
  position: fixed;
3
3
  inset: 0;
4
4
  z-index: 10000;
@@ -366,7 +366,7 @@ import{a as Le,r as f,j as e,b as tt}from"./react-B36MyIP_.js";import{c as W,D a
366
366
  flex: none;
367
367
  color: ${t.colors.dclRed};
368
368
  }
369
- `;function zn({name:n,priceCredits:r,onClose:l}){const{session:h}=ie(),{data:u,isError:c}=rt(h),x=Fe(),a=Le(),[d,p]=f.useState("confirm"),[w,m]=f.useState(""),[C,$]=f.useState(null),b=f.useRef(!1),y=w.trim().toLowerCase()===n.toLowerCase(),S=d==="completing",j=r!=null?Be(r):"—";f.useEffect(()=>{const g=R=>{R.key==="Escape"&&!S&&l()};document.addEventListener("keydown",g);const Y=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",g),document.body.style.overflow=Y}},[S,l]);async function E(){if(!(!h||!y||b.current)){b.current=!0,p("completing"),$(null);try{await cn({name:n,identity:h.identity,signer:h.signer}),J("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:r??null}),x.invalidateQueries({queryKey:["usd-balance"]}),x.invalidateQueries({queryKey:["my-assets"]}),p("success")}catch(g){J(lt(g)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:at(g),purchase_type:"name"}),$((g==null?void 0:g.message)||o("names.errorGeneric")),p("error")}finally{b.current=!1}}}const k=d!=="success",I=it(h==null?void 0:h.providerType);return e.jsx(dn,{onClick:S?void 0:l,role:"presentation",children:e.jsxs(pn,{role:"dialog","aria-modal":"true","aria-label":o("names.buyTitle"),onClick:g=>g.stopPropagation(),children:[k&&e.jsxs(e.Fragment,{children:[e.jsxs($e,{children:[e.jsx(ke,{children:d==="error"?o("names.errorTitle"):o("names.buyTitle")}),e.jsx(Se,{onClick:l,disabled:S,"aria-label":o("buyModal.close"),children:e.jsx(T,{name:"close"})})]}),e.jsxs(Ee,{children:[o("names.myCreditsBalance")," ",e.jsx(B,{})," ",ye(u,c)]}),e.jsx(Te,{})]}),(d==="confirm"||d==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(Ie,{children:[e.jsx(_e,{"aria-hidden":!0,children:"@"}),e.jsxs(Re,{children:[e.jsxs(ze,{children:[n,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(Ae,{children:o("names.subtitle")})]}),e.jsxs(Ne,{children:[e.jsx(B,{}),j]})]}),d==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(Rn,{children:[e.jsx(T,{name:"info","aria-hidden":!0}),e.jsx("span",{children:C})]}),e.jsx(Me,{onClick:()=>p("confirm"),children:o("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(fn,{children:[e.jsx(hn,{children:o("names.confirmTitle")}),e.jsx(xn,{dangerouslySetInnerHTML:{__html:o("names.confirmBody",{name:`<b>@${An(n)}</b>`})}}),e.jsxs(un,{children:[e.jsx(mn,{"aria-hidden":!0,children:"@"}),e.jsx(gn,{value:w,onChange:g=>m(g.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":o("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(w.length,8)}ch`}}),e.jsx(bn,{children:".dcl.eth"})]})]}),e.jsx(Me,{onClick:()=>void E(),disabled:!y||!h,children:o("names.buyCta")})]})]}),d==="completing"&&e.jsxs(yn,{children:[e.jsx(wn,{src:Qt,alt:"",width:56,height:56}),e.jsx(jn,{children:I?o("names.confirming"):o("names.completing")}),e.jsxs(vn,{children:[e.jsx(Cn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx($n,{children:"1/1"})]})]}),d==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs($e,{children:[e.jsx(ke,{children:o("names.successHeaderTitle")}),e.jsx(Se,{onClick:l,"aria-label":o("buyModal.close"),children:e.jsx(T,{name:"close"})})]}),e.jsxs(Ee,{children:[o("names.myCreditsBalance")," ",e.jsx(B,{})," ",ye(u,c)]}),e.jsx(Te,{}),e.jsxs(kn,{children:[e.jsx(Sn,{"aria-hidden":!0,children:e.jsx(T,{name:"check"})}),e.jsxs(En,{children:[e.jsx("b",{children:o("names.successBannerBold")})," ",o("names.successBannerRest")]})]}),e.jsxs(Ie,{style:{marginTop:20},children:[e.jsx(_e,{"aria-hidden":!0,children:"@"}),e.jsxs(Re,{children:[e.jsxs(ze,{children:[n,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(Ae,{children:o("names.subtitle")})]}),e.jsxs(Ne,{children:[e.jsx(B,{}),j]})]}),e.jsxs(Tn,{children:[e.jsx(In,{onClick:()=>{l(),a("/my-assets")},children:o("names.myItems")}),e.jsx(_n,{href:W.profileUrl,target:"_blank",rel:"noopener noreferrer",children:o("names.assignToAvatar")})]})]})]})})}function An(n){return n.replace(/[&<>"']/g,r=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[r])}const Nn="https://cdn.decentraland.org/@dcl/shop/0.1.0-30347128512.commit-fa777d2/assets/identity-B4DXDuJP.webp",Mn="https://cdn.decentraland.org/@dcl/shop/0.1.0-30347128512.commit-fa777d2/assets/world-B-9aPlxu.webp",Pn="https://cdn.decentraland.org/@dcl/shop/0.1.0-30347128512.commit-fa777d2/assets/invite-BfwIhP2C.webp",Ln="https://cdn.decentraland.org/@dcl/shop/0.1.0-30347128512.commit-fa777d2/assets/governance-DnazlIjy.webp",Fn=s.div`
369
+ `;function zn({name:n,priceCredits:r,onClose:l}){const{session:h}=ie(),{data:u,isError:c}=rt(h),x=Le(),a=Fe(),[d,p]=f.useState("confirm"),[w,m]=f.useState(""),[C,$]=f.useState(null),b=f.useRef(!1),y=w.trim().toLowerCase()===n.toLowerCase(),S=d==="completing",j=r!=null?Be(r):"—";f.useEffect(()=>{const g=R=>{R.key==="Escape"&&!S&&l()};document.addEventListener("keydown",g);const Y=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",g),document.body.style.overflow=Y}},[S,l]);async function E(){if(!(!h||!y||b.current)){b.current=!0,p("completing"),$(null);try{await cn({name:n,identity:h.identity,signer:h.signer}),J("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:r??null}),x.invalidateQueries({queryKey:["usd-balance"]}),x.invalidateQueries({queryKey:["my-assets"]}),p("success")}catch(g){J(lt(g)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:at(g),purchase_type:"name"}),$((g==null?void 0:g.message)||o("names.errorGeneric")),p("error")}finally{b.current=!1}}}const k=d!=="success",I=it(h==null?void 0:h.providerType);return e.jsx(dn,{onClick:S?void 0:l,role:"presentation",children:e.jsxs(pn,{role:"dialog","aria-modal":"true","aria-label":o("names.buyTitle"),onClick:g=>g.stopPropagation(),children:[k&&e.jsxs(e.Fragment,{children:[e.jsxs($e,{children:[e.jsx(ke,{children:d==="error"?o("names.errorTitle"):o("names.buyTitle")}),e.jsx(Se,{onClick:l,disabled:S,"aria-label":o("buyModal.close"),children:e.jsx(T,{name:"close"})})]}),e.jsxs(Ee,{children:[o("names.myCreditsBalance")," ",e.jsx(B,{})," ",ye(u,c)]}),e.jsx(Te,{})]}),(d==="confirm"||d==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(Ie,{children:[e.jsx(_e,{"aria-hidden":!0,children:"@"}),e.jsxs(Re,{children:[e.jsxs(ze,{children:[n,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(Ae,{children:o("names.subtitle")})]}),e.jsxs(Ne,{children:[e.jsx(B,{}),j]})]}),d==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(Rn,{children:[e.jsx(T,{name:"info","aria-hidden":!0}),e.jsx("span",{children:C})]}),e.jsx(Me,{onClick:()=>p("confirm"),children:o("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(fn,{children:[e.jsx(hn,{children:o("names.confirmTitle")}),e.jsx(xn,{dangerouslySetInnerHTML:{__html:o("names.confirmBody",{name:`<b>@${An(n)}</b>`})}}),e.jsxs(un,{children:[e.jsx(mn,{"aria-hidden":!0,children:"@"}),e.jsx(gn,{value:w,onChange:g=>m(g.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":o("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(w.length,8)}ch`}}),e.jsx(bn,{children:".dcl.eth"})]})]}),e.jsx(Me,{onClick:()=>void E(),disabled:!y||!h,children:o("names.buyCta")})]})]}),d==="completing"&&e.jsxs(yn,{children:[e.jsx(wn,{src:Qt,alt:"",width:56,height:56}),e.jsx(jn,{children:I?o("names.confirming"):o("names.completing")}),e.jsxs(vn,{children:[e.jsx(Cn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx($n,{children:"1/1"})]})]}),d==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs($e,{children:[e.jsx(ke,{children:o("names.successHeaderTitle")}),e.jsx(Se,{onClick:l,"aria-label":o("buyModal.close"),children:e.jsx(T,{name:"close"})})]}),e.jsxs(Ee,{children:[o("names.myCreditsBalance")," ",e.jsx(B,{})," ",ye(u,c)]}),e.jsx(Te,{}),e.jsxs(kn,{children:[e.jsx(Sn,{"aria-hidden":!0,children:e.jsx(T,{name:"check"})}),e.jsxs(En,{children:[e.jsx("b",{children:o("names.successBannerBold")})," ",o("names.successBannerRest")]})]}),e.jsxs(Ie,{style:{marginTop:20},children:[e.jsx(_e,{"aria-hidden":!0,children:"@"}),e.jsxs(Re,{children:[e.jsxs(ze,{children:[n,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(Ae,{children:o("names.subtitle")})]}),e.jsxs(Ne,{children:[e.jsx(B,{}),j]})]}),e.jsxs(Tn,{children:[e.jsx(In,{onClick:()=>{l(),a("/my-assets")},children:o("names.myItems")}),e.jsx(_n,{href:W.profileUrl,target:"_blank",rel:"noopener noreferrer",children:o("names.assignToAvatar")})]})]})]})})}function An(n){return n.replace(/[&<>"']/g,r=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[r])}const Nn="https://cdn.decentraland.org/@dcl/shop/0.1.0-30362815497.commit-35ecdbf/assets/identity-B4DXDuJP.webp",Mn="https://cdn.decentraland.org/@dcl/shop/0.1.0-30362815497.commit-35ecdbf/assets/world-B-9aPlxu.webp",Pn="https://cdn.decentraland.org/@dcl/shop/0.1.0-30362815497.commit-35ecdbf/assets/invite-BfwIhP2C.webp",Fn="https://cdn.decentraland.org/@dcl/shop/0.1.0-30362815497.commit-35ecdbf/assets/governance-DnazlIjy.webp",Ln=s.div`
370
370
  width: 100%;
371
371
  min-width: 0;
372
372
  `,Bn=s.nav`
@@ -784,4 +784,4 @@ import{a as Le,r as f,j as e,b as tt}from"./react-B36MyIP_.js";import{c as W,D a
784
784
  clip: rect(0, 0, 0, 0);
785
785
  white-space: nowrap;
786
786
  border: 0;
787
- `,hs="https://docs.decentraland.org/creator/worlds/about/",xs="https://governance.decentraland.org";function us(n){const r=typeof window<"u"?window.location.hostname:"";return`${r.endsWith("decentraland.org")?"https://decentraland.org":r.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(n)}`}function ms({onBack:n}){We({title:o("seo.names.title"),description:o("seo.names.description")});const{session:r,signIn:l}=ie(),{data:h}=Ue(),u=h?He(H,h):null,[c,x]=f.useState(""),[a,d]=f.useState("idle"),[p,w]=f.useState(!1),m=f.useRef(null),[C,$]=f.useState(void 0);f.useLayoutEffect(()=>{m.current&&$(m.current.offsetWidth)},[c]),f.useEffect(()=>{if(!ve(c).ok){d(c.length===0?"idle":"invalid");return}d("checking");const k=new AbortController,I=setTimeout(()=>{(async()=>{try{const g=await nn(c,{signal:k.signal});d(g)}catch(g){if((g==null?void 0:g.name)==="AbortError")return;d("error")}})()},400);return()=>{clearTimeout(I),k.abort()}},[c]);const b=ve(c),y=b.ok&&(a==="available"||a==="error");function S(){if(y){if(!r){l();return}w(!0)}}const j=e.jsxs(e.Fragment,{children:[o("names.claim"),u!=null?e.jsxs(rs,{children:[e.jsx(B,{}),Be(u)]}):null]});return e.jsxs(Fn,{"data-testid":"names-page",children:[e.jsxs(Bn,{"aria-label":o("names.breadcrumbAria"),children:[e.jsx(Wn,{onClick:n,children:o("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(Hn,{children:o("names.breadcrumbCurrent")})]}),e.jsxs(Un,{children:[e.jsxs(On,{children:[e.jsxs(Dn,{children:[e.jsx(Gn,{children:o("names.heroTitle")}),e.jsx(qn,{children:o("names.heroSubtitle")})]}),e.jsxs(Vn,{children:[e.jsxs(Kn,{children:[e.jsxs(Zn,{invalid:a==="taken",children:[e.jsxs(Yn,{children:[e.jsx(es,{"aria-hidden":!0,children:"@"}),e.jsx(ts,{value:c,onChange:E=>x(Yt(E.target.value)),placeholder:o("names.inputPlaceholder"),"aria-label":o("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:X,style:{width:C!=null?`${C}px`:void 0}}),e.jsx(Qn,{ref:m,"aria-hidden":!0,children:c||o("names.inputPlaceholder")}),e.jsx(ns,{children:o("names.suffix")})]}),c.length>0?e.jsxs(ss,{"aria-hidden":!0,children:[c.length,"/",X]}):null,e.jsx(Ge,{onClick:S,disabled:!y,"data-testid":"names-claim",children:j})]}),a==="taken"?e.jsxs(Jn,{role:"status","data-testid":"names-taken",children:[e.jsx(T,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:o("names.taken")}),e.jsxs(Xn,{href:us(c),target:"_blank",rel:"noopener noreferrer",children:[o("names.takenMakeOffer"),e.jsx(T,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null]}),e.jsx(os,{onClick:S,disabled:!y,children:j}),a==="checking"?e.jsx(se,{tone:"muted",role:"status","data-testid":"names-checking",children:o("names.checking")}):a==="error"?e.jsx(se,{tone:"muted",role:"status",children:o("names.checkError")}):a==="invalid"&&!b.ok&&b.reason==="too-short"?e.jsx(se,{tone:"muted",role:"status",children:o("names.tooShort",{min:Oe})}):null,e.jsx(fs,{role:"status","aria-live":"polite",children:a==="available"?o("names.available",{name:c}):""})]})]}),e.jsxs(is,{children:[e.jsxs(as,{children:[e.jsx(ls,{children:o("names.whyTitle")}),e.jsx(cs,{children:o("names.whyIntro")})]}),e.jsxs(ds,{children:[e.jsxs(q,{children:[e.jsx(V,{src:Nn,alt:""}),e.jsxs(K,{children:[e.jsx(Z,{children:o("names.why1Title")}),e.jsx(Q,{children:o("names.why1")})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:Mn,alt:""}),e.jsxs(K,{children:[e.jsx(Z,{children:o("names.why2Title")}),e.jsxs(Q,{children:[o("names.why2")," ",e.jsx(ps,{children:o("names.why2Address")})]}),e.jsxs(Pe,{href:hs,target:"_blank",rel:"noopener noreferrer",children:[o("names.learnMore"),e.jsx(T,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:Pn,alt:""}),e.jsxs(K,{children:[e.jsx(Z,{children:o("names.why3Title")}),e.jsx(Q,{children:o("names.why3")})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:Ln,alt:""}),e.jsxs(K,{children:[e.jsx(Z,{children:o("names.why4Title")}),e.jsx(Q,{children:o("names.why4")}),e.jsxs(Pe,{href:xs,target:"_blank",rel:"noopener noreferrer",children:[o("names.learnMore"),e.jsx(T,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),p?e.jsx(zn,{name:c,priceCredits:u,onClose:()=>w(!1)}):null]})}const gs="data:image/svg+xml,%3csvg%20width='101'%20height='101'%20viewBox='0%200%20101%20101'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M42.4493%2040.9855L30.7394%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M30.7391%2040.9855L42.449%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M36.2621%2071.0604C29.6047%2071.0604%2023.9709%2068.7542%2019.3608%2064.1416C14.7507%2059.5291%2012.4445%2053.8953%2012.442%2047.2404C12.4396%2040.5854%2014.7459%2034.9516%2019.3608%2030.3391C23.9758%2025.7266%2029.6096%2023.4203%2036.2621%2023.4203C42.9146%2023.4203%2048.5496%2025.7266%2053.167%2030.3391C57.7844%2034.9516%2060.0895%2040.5854%2060.0822%2047.2404C60.0822%2049.9277%2059.6546%2052.4624%2058.7995%2054.8445C57.9445%2057.2265%2056.784%2059.3336%2055.3181%2061.1659L75.84%2081.6878C76.5119%2082.3597%2076.8478%2083.2148%2076.8478%2084.2531C76.8478%2085.2914%2076.5119%2086.1465%2075.84%2086.8183C75.1682%2087.4902%2074.3131%2087.8261%2073.2748%2087.8261C72.2365%2087.8261%2071.3814%2087.4902%2070.7096%2086.8183L50.1877%2066.2964C48.3554%2067.7623%2046.2482%2068.9227%2043.8662%2069.7778C41.4842%2070.6329%2038.9495%2071.0604%2036.2621%2071.0604ZM36.2621%2063.7312C40.8429%2063.7312%2044.7372%2062.1285%2047.9449%2058.9232C51.1527%2055.7179%2052.7554%2051.8236%2052.7529%2047.2404C52.7505%2042.6571%2051.1478%2038.7641%2047.9449%2035.5612C44.742%2032.3583%2040.8478%2030.7544%2036.2621%2030.7495C31.6764%2030.7447%2027.7834%2032.3485%2024.5829%2035.5612C21.3825%2038.7739%2019.7786%2042.6669%2019.7713%2047.2404C19.764%2051.8138%2021.3678%2055.7081%2024.5829%2058.9232C27.798%2062.1383%2031.6911%2063.7409%2036.2621%2063.7312Z'%20fill='url(%23paint0_linear_search_empty)'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_search_empty'%20x1='10.4127'%20y1='55.6273'%20x2='124.009'%20y2='44.925'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF2D55'/%3e%3cstop%20offset='1'%20stop-color='%23FFBC5B'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",oe=48;function bs(n){return{tradeId:n.tradeId??n.id,listingType:"primary",contractAddress:n.contractAddress,itemId:n.itemId??"",name:n.name,thumbnail:n.thumbnail,rarity:n.rarity,category:n.category,wearableCategory:n.wearableCategory??null,creator:n.creator,manaWei:n.manaWei??"0",available:1,network:n.network,chainId:n.chainId,createdAt:0}}function Us(){const[n]=tt(),r=Le(),l=(n.get("q")??"").trim().toLowerCase(),h=Fe(),{session:u,signIn:c}=ie(),x=(n.get("q")??"").trim();We({title:x?o("seo.collectibles.searchTitle",{query:x}):o("seo.collectibles.title"),description:o("seo.collectibles.description")});const[a,d]=f.useState("wearable"),[p,w]=f.useState(null),[m,C]=f.useState([]),[$,b]=f.useState(""),[y,S]=f.useState(""),[j,E]=f.useState("on_sale"),[k,I]=f.useState(!1),[g,Y]=f.useState("newest"),[R,A]=f.useState(!1),[ae,ee]=f.useState(null);f.useEffect(()=>{if(!R)return;const i=F=>{F.key==="Escape"&&A(!1)};document.addEventListener("keydown",i);const v=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",i),document.body.style.overflow=v}},[R]);const U=j==="on_sale",N=$&&!Number.isNaN(Number($))?Number($):void 0,M=y&&!Number.isNaN(Number(y))?Number(y):void 0,qe=ft(),le=p?Pt[p]:void 0,ce=(we.find(i=>i.key===g)??we[0]).server,de={category:a,rarities:m.length?m:void 0,wearableCategories:le,minPriceCredits:N,maxPriceCredits:M,search:l||void 0,sortBy:ce,isSmart:k||void 0,onSale:!0,listingType:qe?void 0:"primary"},pe={category:a,rarities:m.length?m:void 0,wearableCategories:le,search:l||void 0,sortBy:ce,isWearableSmart:k||void 0,isOnSale:j==="not_for_sale"?!1:void 0},{items:P,total:fe,isLoading:_,isPlaceholderData:z,error:he,hasNextPage:Ve,isFetchingNextPage:xe,fetchNextPage:Ke}=Ft(U?["shop-items",de]:["catalog-items",pe],i=>U?dt({...de,first:oe,skip:i}):pt({...pe,first:oe,skip:i}),{enabled:a!=="names"}),O=fe,ue=_||z,Ze=_?15:Math.min(Math.max(P.length,1),oe),{data:D,isError:Qe}=Ue(),Je=i=>D&&i.manaWei?He(i.manaWei,D):null,me=f.useRef(null);f.useEffect(()=>{_||z||!l||me.current===l||(me.current=l,J("Shop Searched",{query:l,result_count:O}))},[l,_,z,O]);const G=f.useRef("__init__");f.useEffect(()=>{if(_||z)return;const i=JSON.stringify({category:a,subCategory:p,rarities:m,min:N,max:M,sort:g,status:j,smart:k});if(G.current==="__init__"||G.current===i){G.current=i;return}G.current=i,J("Shop Applied Filter",{filters:{category:a,sub_category:p,rarities:m,min_price_credits:N??null,max_price_credits:M??null,status:j,smart:k,sort:g},result_count:O})},[a,p,m,N,M,g,j,k,_,z,O]);function ge(i){d(i),w(null)}function be(i){C(v=>v.includes(i)?v.filter(F=>F!==i):[...v,i])}function Xe(){d("wearable"),w(null),C([]),b(""),S(""),E("on_sale"),I(!1)}function Ye(i){const v=P.find(F=>F.id===i.id);if(!(!v||v.source!=="legacy"||!v.manaWei)){if(!u){c();return}ee(bs(v))}}function et(){h.invalidateQueries({queryKey:["shop-items"]})}const L=[];(N!=null||M!=null)&&L.push({key:"price",label:o("filter.price"),onRemove:()=>{b(""),S("")}});for(const i of Nt)m.includes(i)&&L.push({key:`rarity-${i}`,label:ct(i),onRemove:()=>be(i)});return k&&L.push({key:"smart",label:o("filter.smart"),onRemove:()=>I(!1)}),j!=="on_sale"&&L.push({key:"status",label:j==="all"?o("filter.statusAll"):o("filter.notForSale"),onRemove:()=>E("on_sale")}),e.jsxs(mt,{"data-testid":"browse",children:[a!=="names"&&e.jsxs(e.Fragment,{children:[R?e.jsx(gt,{onClick:()=>A(!1),"aria-hidden":!0}):null,e.jsxs(bt,{className:R?"is-open":"","data-testid":"browse-sidebar",children:[e.jsxs(yt,{children:[e.jsx(wt,{children:o("assets.filters")}),e.jsx(jt,{onClick:()=>A(!1),"aria-label":o("assets.closeFilters"),children:"✕"})]}),e.jsx(vt,{children:e.jsx(Ct,{category:a,subCategory:p,onCategory:ge,onSub:w,priceMin:$,priceMax:y,onPriceMin:b,onPriceMax:S,rarities:m,onToggleRarity:be,status:j,onStatus:E,smart:k,onSmart:I})}),e.jsx($t,{children:e.jsx(kt,{type:"button",onClick:()=>A(!1),children:o("assets.showItems")})})]})]}),e.jsx(St,{children:a==="names"?e.jsx(ms,{onBack:()=>ge("wearable")}):e.jsxs(e.Fragment,{children:[e.jsx(Mt,{sort:g,onSort:Y,total:fe,loading:_||z,query:l,onOpenFilters:()=>A(!0),chips:L,onClearChips:Xe}),Qe&&U&&P.some(i=>i.source==="legacy")?e.jsx("p",{className:"market-banner market-banner--warn",children:o("assets.marketUnavailable")}):null,he?e.jsx(Bt,{message:o("assets.loadError"),testId:"browse-error"}):null,!ue&&P.length===0&&!he?e.jsxs(Et,{"data-testid":"browse-empty",children:[e.jsx(Tt,{src:gs,alt:""}),e.jsxs(It,{children:[e.jsx(_t,{children:o("assets.empty.title")}),e.jsx(Rt,{children:x?e.jsxs(e.Fragment,{children:[o("assets.empty.searchBefore"),e.jsx("b",{children:x}),o("assets.empty.searchAfter")]}):o("assets.empty.filters")})]}),e.jsx(zt,{children:e.jsx(At,{type:"button",onClick:()=>r("/overview"),children:o("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"grid","data-testid":"grid",children:ue?e.jsx(je,{count:Ze}):e.jsxs(e.Fragment,{children:[P.map(i=>{if(!U)return e.jsx(te,{item:i,mode:"view"},ne(i));const v=i;return v.source==="legacy"?e.jsx(te,{item:v,mode:"market",marketPriceCredits:Je(v),onBuyNow:Ye},ne(i)):e.jsx(te,{item:i},ne(i))}),xe?e.jsx(je,{count:6}):null]})}),e.jsx(Lt,{hasNextPage:Ve,isFetching:xe,onLoadMore:()=>void Ke()})]})]})}),ae&&D?e.jsx(ht,{listing:ae,rate:D,onClose:()=>ee(null),onSold:()=>{ee(null),et()}}):null]})}export{Us as Assets};
787
+ `,hs="https://docs.decentraland.org/creator/worlds/about/",xs="https://governance.decentraland.org";function us(n){const r=typeof window<"u"?window.location.hostname:"";return`${r.endsWith("decentraland.org")?"https://decentraland.org":r.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(n)}`}function ms({onBack:n}){We({title:o("seo.names.title"),description:o("seo.names.description")});const{session:r,signIn:l}=ie(),{data:h}=Ue(),u=h?He(H,h):null,[c,x]=f.useState(""),[a,d]=f.useState("idle"),[p,w]=f.useState(!1),m=f.useRef(null),[C,$]=f.useState(void 0);f.useLayoutEffect(()=>{m.current&&$(m.current.offsetWidth)},[c]),f.useEffect(()=>{if(!ve(c).ok){d(c.length===0?"idle":"invalid");return}d("checking");const k=new AbortController,I=setTimeout(()=>{(async()=>{try{const g=await nn(c,{signal:k.signal});d(g)}catch(g){if((g==null?void 0:g.name)==="AbortError")return;d("error")}})()},400);return()=>{clearTimeout(I),k.abort()}},[c]);const b=ve(c),y=b.ok&&(a==="available"||a==="error");function S(){if(y){if(!r){l();return}w(!0)}}const j=e.jsxs(e.Fragment,{children:[o("names.claim"),u!=null?e.jsxs(rs,{children:[e.jsx(B,{}),Be(u)]}):null]});return e.jsxs(Ln,{"data-testid":"names-page",children:[e.jsxs(Bn,{"aria-label":o("names.breadcrumbAria"),children:[e.jsx(Wn,{onClick:n,children:o("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(Hn,{children:o("names.breadcrumbCurrent")})]}),e.jsxs(Un,{children:[e.jsxs(On,{children:[e.jsxs(Dn,{children:[e.jsx(Gn,{children:o("names.heroTitle")}),e.jsx(qn,{children:o("names.heroSubtitle")})]}),e.jsxs(Vn,{children:[e.jsxs(Kn,{children:[e.jsxs(Zn,{invalid:a==="taken",children:[e.jsxs(Yn,{children:[e.jsx(es,{"aria-hidden":!0,children:"@"}),e.jsx(ts,{value:c,onChange:E=>x(Yt(E.target.value)),placeholder:o("names.inputPlaceholder"),"aria-label":o("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:X,style:{width:C!=null?`${C}px`:void 0}}),e.jsx(Qn,{ref:m,"aria-hidden":!0,children:c||o("names.inputPlaceholder")}),e.jsx(ns,{children:o("names.suffix")})]}),c.length>0?e.jsxs(ss,{"aria-hidden":!0,children:[c.length,"/",X]}):null,e.jsx(Ge,{onClick:S,disabled:!y,"data-testid":"names-claim",children:j})]}),a==="taken"?e.jsxs(Jn,{role:"status","data-testid":"names-taken",children:[e.jsx(T,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:o("names.taken")}),e.jsxs(Xn,{href:us(c),target:"_blank",rel:"noopener noreferrer",children:[o("names.takenMakeOffer"),e.jsx(T,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null]}),e.jsx(os,{onClick:S,disabled:!y,children:j}),a==="checking"?e.jsx(se,{tone:"muted",role:"status","data-testid":"names-checking",children:o("names.checking")}):a==="error"?e.jsx(se,{tone:"muted",role:"status",children:o("names.checkError")}):a==="invalid"&&!b.ok&&b.reason==="too-short"?e.jsx(se,{tone:"muted",role:"status",children:o("names.tooShort",{min:Oe})}):null,e.jsx(fs,{role:"status","aria-live":"polite",children:a==="available"?o("names.available",{name:c}):""})]})]}),e.jsxs(is,{children:[e.jsxs(as,{children:[e.jsx(ls,{children:o("names.whyTitle")}),e.jsx(cs,{children:o("names.whyIntro")})]}),e.jsxs(ds,{children:[e.jsxs(q,{children:[e.jsx(V,{src:Nn,alt:""}),e.jsxs(K,{children:[e.jsx(Z,{children:o("names.why1Title")}),e.jsx(Q,{children:o("names.why1")})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:Mn,alt:""}),e.jsxs(K,{children:[e.jsx(Z,{children:o("names.why2Title")}),e.jsxs(Q,{children:[o("names.why2")," ",e.jsx(ps,{children:o("names.why2Address")})]}),e.jsxs(Pe,{href:hs,target:"_blank",rel:"noopener noreferrer",children:[o("names.learnMore"),e.jsx(T,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:Pn,alt:""}),e.jsxs(K,{children:[e.jsx(Z,{children:o("names.why3Title")}),e.jsx(Q,{children:o("names.why3")})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:Fn,alt:""}),e.jsxs(K,{children:[e.jsx(Z,{children:o("names.why4Title")}),e.jsx(Q,{children:o("names.why4")}),e.jsxs(Pe,{href:xs,target:"_blank",rel:"noopener noreferrer",children:[o("names.learnMore"),e.jsx(T,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),p?e.jsx(zn,{name:c,priceCredits:u,onClose:()=>w(!1)}):null]})}const gs="data:image/svg+xml,%3csvg%20width='101'%20height='101'%20viewBox='0%200%20101%20101'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M42.4493%2040.9855L30.7394%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M30.7391%2040.9855L42.449%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M36.2621%2071.0604C29.6047%2071.0604%2023.9709%2068.7542%2019.3608%2064.1416C14.7507%2059.5291%2012.4445%2053.8953%2012.442%2047.2404C12.4396%2040.5854%2014.7459%2034.9516%2019.3608%2030.3391C23.9758%2025.7266%2029.6096%2023.4203%2036.2621%2023.4203C42.9146%2023.4203%2048.5496%2025.7266%2053.167%2030.3391C57.7844%2034.9516%2060.0895%2040.5854%2060.0822%2047.2404C60.0822%2049.9277%2059.6546%2052.4624%2058.7995%2054.8445C57.9445%2057.2265%2056.784%2059.3336%2055.3181%2061.1659L75.84%2081.6878C76.5119%2082.3597%2076.8478%2083.2148%2076.8478%2084.2531C76.8478%2085.2914%2076.5119%2086.1465%2075.84%2086.8183C75.1682%2087.4902%2074.3131%2087.8261%2073.2748%2087.8261C72.2365%2087.8261%2071.3814%2087.4902%2070.7096%2086.8183L50.1877%2066.2964C48.3554%2067.7623%2046.2482%2068.9227%2043.8662%2069.7778C41.4842%2070.6329%2038.9495%2071.0604%2036.2621%2071.0604ZM36.2621%2063.7312C40.8429%2063.7312%2044.7372%2062.1285%2047.9449%2058.9232C51.1527%2055.7179%2052.7554%2051.8236%2052.7529%2047.2404C52.7505%2042.6571%2051.1478%2038.7641%2047.9449%2035.5612C44.742%2032.3583%2040.8478%2030.7544%2036.2621%2030.7495C31.6764%2030.7447%2027.7834%2032.3485%2024.5829%2035.5612C21.3825%2038.7739%2019.7786%2042.6669%2019.7713%2047.2404C19.764%2051.8138%2021.3678%2055.7081%2024.5829%2058.9232C27.798%2062.1383%2031.6911%2063.7409%2036.2621%2063.7312Z'%20fill='url(%23paint0_linear_search_empty)'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_search_empty'%20x1='10.4127'%20y1='55.6273'%20x2='124.009'%20y2='44.925'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF2D55'/%3e%3cstop%20offset='1'%20stop-color='%23FFBC5B'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",oe=48;function bs(n){return{tradeId:n.tradeId??n.id,listingType:"primary",contractAddress:n.contractAddress,itemId:n.itemId??"",name:n.name,thumbnail:n.thumbnail,rarity:n.rarity,category:n.category,wearableCategory:n.wearableCategory??null,creator:n.creator,manaWei:n.manaWei??"0",available:1,network:n.network,chainId:n.chainId,createdAt:0}}function Us(){const[n]=tt(),r=Fe(),l=(n.get("q")??"").trim().toLowerCase(),h=Le(),{session:u,signIn:c}=ie(),x=(n.get("q")??"").trim();We({title:x?o("seo.collectibles.searchTitle",{query:x}):o("seo.collectibles.title"),description:o("seo.collectibles.description")});const[a,d]=f.useState("wearable"),[p,w]=f.useState(null),[m,C]=f.useState([]),[$,b]=f.useState(""),[y,S]=f.useState(""),[j,E]=f.useState("on_sale"),[k,I]=f.useState(!1),[g,Y]=f.useState("newest"),[R,A]=f.useState(!1),[ae,ee]=f.useState(null);f.useEffect(()=>{if(!R)return;const i=L=>{L.key==="Escape"&&A(!1)};document.addEventListener("keydown",i);const v=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",i),document.body.style.overflow=v}},[R]);const U=j==="on_sale",N=$&&!Number.isNaN(Number($))?Number($):void 0,M=y&&!Number.isNaN(Number(y))?Number(y):void 0,qe=ft(),le=p?Pt[p]:void 0,ce=(we.find(i=>i.key===g)??we[0]).server,de={category:a,rarities:m.length?m:void 0,wearableCategories:le,minPriceCredits:N,maxPriceCredits:M,search:l||void 0,sortBy:ce,isSmart:k||void 0,onSale:!0,listingType:qe?void 0:"primary"},pe={category:a,rarities:m.length?m:void 0,wearableCategories:le,search:l||void 0,sortBy:ce,isWearableSmart:k||void 0,isOnSale:j==="not_for_sale"?!1:void 0},{items:P,total:fe,isLoading:_,isPlaceholderData:z,error:he,hasNextPage:Ve,isFetchingNextPage:xe,fetchNextPage:Ke}=Lt(U?["shop-items",de]:["catalog-items",pe],i=>U?dt({...de,first:oe,skip:i}):pt({...pe,first:oe,skip:i}),{enabled:a!=="names"}),O=fe,ue=_||z,Ze=_?15:Math.min(Math.max(P.length,1),oe),{data:D,isError:Qe}=Ue(),Je=i=>D&&i.manaWei?He(i.manaWei,D):null,me=f.useRef(null);f.useEffect(()=>{_||z||!l||me.current===l||(me.current=l,J("Shop Searched",{query:l,result_count:O}))},[l,_,z,O]);const G=f.useRef("__init__");f.useEffect(()=>{if(_||z)return;const i=JSON.stringify({category:a,subCategory:p,rarities:m,min:N,max:M,sort:g,status:j,smart:k});if(G.current==="__init__"||G.current===i){G.current=i;return}G.current=i,J("Shop Applied Filter",{filters:{category:a,sub_category:p,rarities:m,min_price_credits:N??null,max_price_credits:M??null,status:j,smart:k,sort:g},result_count:O})},[a,p,m,N,M,g,j,k,_,z,O]);function ge(i){d(i),w(null)}function be(i){C(v=>v.includes(i)?v.filter(L=>L!==i):[...v,i])}function Xe(){d("wearable"),w(null),C([]),b(""),S(""),E("on_sale"),I(!1)}function Ye(i){const v=P.find(L=>L.id===i.id);if(!(!v||v.source!=="legacy"||!v.manaWei)){if(!u){c();return}ee(bs(v))}}function et(){h.invalidateQueries({queryKey:["shop-items"]})}const F=[];(N!=null||M!=null)&&F.push({key:"price",label:o("filter.price"),onRemove:()=>{b(""),S("")}});for(const i of Nt)m.includes(i)&&F.push({key:`rarity-${i}`,label:ct(i),onRemove:()=>be(i)});return k&&F.push({key:"smart",label:o("filter.smart"),onRemove:()=>I(!1)}),j!=="on_sale"&&F.push({key:"status",label:j==="all"?o("filter.statusAll"):o("filter.notForSale"),onRemove:()=>E("on_sale")}),e.jsxs(mt,{"data-testid":"browse",children:[a!=="names"&&e.jsxs(e.Fragment,{children:[R?e.jsx(gt,{onClick:()=>A(!1),"aria-hidden":!0}):null,e.jsxs(bt,{className:R?"is-open":"","data-testid":"browse-sidebar",children:[e.jsxs(yt,{children:[e.jsx(wt,{children:o("assets.filters")}),e.jsx(jt,{onClick:()=>A(!1),"aria-label":o("assets.closeFilters"),children:"✕"})]}),e.jsx(vt,{children:e.jsx(Ct,{category:a,subCategory:p,onCategory:ge,onSub:w,priceMin:$,priceMax:y,onPriceMin:b,onPriceMax:S,rarities:m,onToggleRarity:be,status:j,onStatus:E,smart:k,onSmart:I})}),e.jsx($t,{children:e.jsx(kt,{type:"button",onClick:()=>A(!1),children:o("assets.showItems")})})]})]}),e.jsx(St,{children:a==="names"?e.jsx(ms,{onBack:()=>ge("wearable")}):e.jsxs(e.Fragment,{children:[e.jsx(Mt,{sort:g,onSort:Y,total:fe,loading:_||z,query:l,onOpenFilters:()=>A(!0),chips:F,onClearChips:Xe}),Qe&&U&&P.some(i=>i.source==="legacy")?e.jsx("p",{className:"market-banner market-banner--warn",children:o("assets.marketUnavailable")}):null,he?e.jsx(Bt,{message:o("assets.loadError"),testId:"browse-error"}):null,!ue&&P.length===0&&!he?e.jsxs(Et,{"data-testid":"browse-empty",children:[e.jsx(Tt,{src:gs,alt:""}),e.jsxs(It,{children:[e.jsx(_t,{children:o("assets.empty.title")}),e.jsx(Rt,{children:x?e.jsxs(e.Fragment,{children:[o("assets.empty.searchBefore"),e.jsx("b",{children:x}),o("assets.empty.searchAfter")]}):o("assets.empty.filters")})]}),e.jsx(zt,{children:e.jsx(At,{type:"button",onClick:()=>r("/overview"),children:o("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"grid","data-testid":"grid",children:ue?e.jsx(je,{count:Ze}):e.jsxs(e.Fragment,{children:[P.map(i=>{if(!U)return e.jsx(te,{item:i,mode:"view"},ne(i));const v=i;return v.source==="legacy"?e.jsx(te,{item:v,mode:"market",marketPriceCredits:Je(v),onBuyNow:Ye},ne(i)):e.jsx(te,{item:i},ne(i))}),xe?e.jsx(je,{count:6}):null]})}),e.jsx(Ft,{hasNextPage:Ve,isFetching:xe,onLoadMore:()=>void Ke()})]})]})}),ae&&D?e.jsx(ht,{listing:ae,rate:D,onClose:()=>ee(null),onSold:()=>{ee(null),et()}}):null]})}export{Us as Assets};
@@ -1,4 +1,4 @@
1
- import{r as $,j as t}from"./react-B36MyIP_.js";import{R as C,a as oe,C as ie,c as ne}from"./categories-Cdf5XoX6.js";import{T as se}from"./Tooltip-CVHiMiqz.js";import{K as e,n as o,I as m,t as s,L as re,b as v}from"./index-BdhwhIIA.js";import{n as c}from"./emotion-CSxEP8yM.js";const ae=o.div`
1
+ import{r as $,j as t}from"./react-B36MyIP_.js";import{R as C,a as oe,C as ie,c as ne}from"./categories-CV5P_HZd.js";import{T as se}from"./Tooltip-QUx-0PAd.js";import{K as e,n as o,I as m,t as s,L as re,b as v}from"./index-BSeusSHl.js";import{n as c}from"./emotion-CSxEP8yM.js";const ae=o.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 12px;
@@ -1,4 +1,4 @@
1
- import{j as t,L as q,r as D}from"./react-B36MyIP_.js";import{n as a,B as M,K as o,R as I,h as B,t as e,e as F,j as K,I as f,k as G,S as P,u as w,x as Q,c as H,U as k,J as O,N as $}from"./index-BdhwhIIA.js";import{b as W,c as _,d as J,f as U,s as X,h as V}from"./authorizations-DMJkwvHN.js";import{a as Y}from"./builder-C9zPgqzY.js";import{f as Z}from"./errors-DAbZY9SI.js";import"./sentry-gZJVwIqQ.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-BteKixT0.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-SaUBHgVB.js";const tt=I`
1
+ import{j as t,L as q,r as D}from"./react-B36MyIP_.js";import{n as a,B as M,K as o,R as I,h as B,t as e,e as F,j as K,I as f,k as G,S as P,u as w,x as Q,c as H,U as k,J as O,N as $}from"./index-BSeusSHl.js";import{b as W,c as _,d as J,f as U,s as X,h as V}from"./authorizations-CUAi4uqJ.js";import{a as Y}from"./builder-BFcfggvn.js";import{f as Z}from"./errors-DCLH44Ym.js";import"./sentry-gZJVwIqQ.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-BteKixT0.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-DEU_Xtzf.js";const tt=I`
2
2
  to { transform: rotate(360deg); }
3
3
  `,it=I`
4
4
  to { background-position: -200% 0; }
@@ -1,4 +1,4 @@
1
- import{bb as Xe,bc as Ye,q as Ge,bd as qe,Y as G,Z as b,$ as z,W as ee,X as se,be as Ze,a2 as H,R as le,V as Ce,bf as be,bg as we,bh as w,a1 as Re,bi as Je,T as Qe,aT as eo,r as oo,a0 as B,bj as to,bk as J}from"./index-BdhwhIIA.js";import{r as l,j as T,R as Y}from"./react-B36MyIP_.js";function Me(e){var o,t,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(o=0;o<n;o++)e[o]&&(t=Me(e[o]))&&(i&&(i+=" "),i+=t)}else for(t in e)e[t]&&(i&&(i+=" "),i+=t);return i}function no(){for(var e,o,t=0,i="",n=arguments.length;t<n;t++)(e=arguments[t])&&(o=Me(e))&&(i&&(i+=" "),i+=o);return i}const io=["className","component"];function ao(e={}){const{themeId:o,defaultTheme:t,defaultClassName:i="MuiBox-root",generateClassName:n}=e,a=Xe("div",{shouldForwardProp:u=>u!=="theme"&&u!=="sx"&&u!=="as"})(Ye);return l.forwardRef(function(c,p){const f=Ge(t),g=qe(c),{className:m,component:v="div"}=g,h=G(g,io);return T.jsx(a,b({as:v,ref:p,className:no(m,n?n(i):i),theme:o&&f[o]||f},h))})}function ae(e,o){return ae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t},ae(e,o)}function ro(e,o){e.prototype=Object.create(o.prototype),e.prototype.constructor=e,ae(e,o)}const ge=Y.createContext(null);function so(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ce(e,o){var t=function(a){return o&&l.isValidElement(a)?o(a):a},i=Object.create(null);return e&&l.Children.map(e,function(n){return n}).forEach(function(n){i[n.key]=t(n)}),i}function lo(e,o){e=e||{},o=o||{};function t(f){return f in o?o[f]:e[f]}var i=Object.create(null),n=[];for(var a in e)a in o?n.length&&(i[a]=n,n=[]):n.push(a);var r,u={};for(var c in o){if(i[c])for(r=0;r<i[c].length;r++){var p=i[c][r];u[i[c][r]]=t(p)}u[c]=t(c)}for(r=0;r<n.length;r++)u[n[r]]=t(n[r]);return u}function A(e,o,t){return t[o]!=null?t[o]:e.props[o]}function co(e,o){return ce(e.children,function(t){return l.cloneElement(t,{onExited:o.bind(null,t),in:!0,appear:A(t,"appear",e),enter:A(t,"enter",e),exit:A(t,"exit",e)})})}function uo(e,o,t){var i=ce(e.children),n=lo(o,i);return Object.keys(n).forEach(function(a){var r=n[a];if(l.isValidElement(r)){var u=a in o,c=a in i,p=o[a],f=l.isValidElement(p)&&!p.props.in;c&&(!u||f)?n[a]=l.cloneElement(r,{onExited:t.bind(null,r),in:!0,exit:A(r,"exit",e),enter:A(r,"enter",e)}):!c&&u&&!f?n[a]=l.cloneElement(r,{in:!1}):c&&u&&l.isValidElement(p)&&(n[a]=l.cloneElement(r,{onExited:t.bind(null,r),in:p.props.in,exit:A(r,"exit",e),enter:A(r,"enter",e)}))}}),n}var po=Object.values||function(e){return Object.keys(e).map(function(o){return e[o]})},fo={component:"div",childFactory:function(o){return o}},ue=(function(e){ro(o,e);function o(i,n){var a;a=e.call(this,i,n)||this;var r=a.handleExited.bind(so(a));return a.state={contextValue:{isMounting:!0},handleExited:r,firstRender:!0},a}var t=o.prototype;return t.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},t.componentWillUnmount=function(){this.mounted=!1},o.getDerivedStateFromProps=function(n,a){var r=a.children,u=a.handleExited,c=a.firstRender;return{children:c?co(n,u):uo(n,r,u),firstRender:!1}},t.handleExited=function(n,a){var r=ce(this.props.children);n.key in r||(n.props.onExited&&n.props.onExited(a),this.mounted&&this.setState(function(u){var c=b({},u.children);return delete c[n.key],{children:c}}))},t.render=function(){var n=this.props,a=n.component,r=n.childFactory,u=G(n,["component","childFactory"]),c=this.state.contextValue,p=po(this.state.children).map(r);return delete u.appear,delete u.enter,delete u.exit,a===null?Y.createElement(ge.Provider,{value:c},p):Y.createElement(ge.Provider,{value:c},Y.createElement(a,u,p))},o})(Y.Component);ue.propTypes={};ue.defaultProps=fo;function ho(e){const{className:o,classes:t,pulsate:i=!1,rippleX:n,rippleY:a,rippleSize:r,in:u,onExited:c,timeout:p}=e,[f,g]=l.useState(!1),m=z(o,t.ripple,t.rippleVisible,i&&t.ripplePulsate),v={width:r,height:r,top:-(r/2)+a,left:-(r/2)+n},h=z(t.child,f&&t.childLeaving,i&&t.childPulsate);return!u&&!f&&g(!0),l.useEffect(()=>{if(!u&&c!=null){const C=setTimeout(c,p);return()=>{clearTimeout(C)}}},[c,u,p]),T.jsx("span",{className:m,style:v,children:T.jsx("span",{className:h})})}const E=ee("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),bo=["center","classes","className"];let oe=e=>e,me,xe,ve,ye;const re=550,go=80,mo=le(me||(me=oe`
1
+ import{bc as Xe,bd as Ye,q as Ge,be as qe,Y as G,Z as b,$ as z,W as ee,X as se,bf as Ze,a2 as H,R as le,V as Ce,bg as be,bh as we,bi as w,a1 as Re,bj as Je,T as Qe,aU as eo,r as oo,a0 as B,bk as to,bl as J}from"./index-BSeusSHl.js";import{r as l,j as T,R as Y}from"./react-B36MyIP_.js";function Me(e){var o,t,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(o=0;o<n;o++)e[o]&&(t=Me(e[o]))&&(i&&(i+=" "),i+=t)}else for(t in e)e[t]&&(i&&(i+=" "),i+=t);return i}function no(){for(var e,o,t=0,i="",n=arguments.length;t<n;t++)(e=arguments[t])&&(o=Me(e))&&(i&&(i+=" "),i+=o);return i}const io=["className","component"];function ao(e={}){const{themeId:o,defaultTheme:t,defaultClassName:i="MuiBox-root",generateClassName:n}=e,a=Xe("div",{shouldForwardProp:u=>u!=="theme"&&u!=="sx"&&u!=="as"})(Ye);return l.forwardRef(function(c,p){const f=Ge(t),g=qe(c),{className:m,component:v="div"}=g,h=G(g,io);return T.jsx(a,b({as:v,ref:p,className:no(m,n?n(i):i),theme:o&&f[o]||f},h))})}function ae(e,o){return ae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t},ae(e,o)}function ro(e,o){e.prototype=Object.create(o.prototype),e.prototype.constructor=e,ae(e,o)}const ge=Y.createContext(null);function so(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ce(e,o){var t=function(a){return o&&l.isValidElement(a)?o(a):a},i=Object.create(null);return e&&l.Children.map(e,function(n){return n}).forEach(function(n){i[n.key]=t(n)}),i}function lo(e,o){e=e||{},o=o||{};function t(f){return f in o?o[f]:e[f]}var i=Object.create(null),n=[];for(var a in e)a in o?n.length&&(i[a]=n,n=[]):n.push(a);var r,u={};for(var c in o){if(i[c])for(r=0;r<i[c].length;r++){var p=i[c][r];u[i[c][r]]=t(p)}u[c]=t(c)}for(r=0;r<n.length;r++)u[n[r]]=t(n[r]);return u}function A(e,o,t){return t[o]!=null?t[o]:e.props[o]}function co(e,o){return ce(e.children,function(t){return l.cloneElement(t,{onExited:o.bind(null,t),in:!0,appear:A(t,"appear",e),enter:A(t,"enter",e),exit:A(t,"exit",e)})})}function uo(e,o,t){var i=ce(e.children),n=lo(o,i);return Object.keys(n).forEach(function(a){var r=n[a];if(l.isValidElement(r)){var u=a in o,c=a in i,p=o[a],f=l.isValidElement(p)&&!p.props.in;c&&(!u||f)?n[a]=l.cloneElement(r,{onExited:t.bind(null,r),in:!0,exit:A(r,"exit",e),enter:A(r,"enter",e)}):!c&&u&&!f?n[a]=l.cloneElement(r,{in:!1}):c&&u&&l.isValidElement(p)&&(n[a]=l.cloneElement(r,{onExited:t.bind(null,r),in:p.props.in,exit:A(r,"exit",e),enter:A(r,"enter",e)}))}}),n}var po=Object.values||function(e){return Object.keys(e).map(function(o){return e[o]})},fo={component:"div",childFactory:function(o){return o}},ue=(function(e){ro(o,e);function o(i,n){var a;a=e.call(this,i,n)||this;var r=a.handleExited.bind(so(a));return a.state={contextValue:{isMounting:!0},handleExited:r,firstRender:!0},a}var t=o.prototype;return t.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},t.componentWillUnmount=function(){this.mounted=!1},o.getDerivedStateFromProps=function(n,a){var r=a.children,u=a.handleExited,c=a.firstRender;return{children:c?co(n,u):uo(n,r,u),firstRender:!1}},t.handleExited=function(n,a){var r=ce(this.props.children);n.key in r||(n.props.onExited&&n.props.onExited(a),this.mounted&&this.setState(function(u){var c=b({},u.children);return delete c[n.key],{children:c}}))},t.render=function(){var n=this.props,a=n.component,r=n.childFactory,u=G(n,["component","childFactory"]),c=this.state.contextValue,p=po(this.state.children).map(r);return delete u.appear,delete u.enter,delete u.exit,a===null?Y.createElement(ge.Provider,{value:c},p):Y.createElement(ge.Provider,{value:c},Y.createElement(a,u,p))},o})(Y.Component);ue.propTypes={};ue.defaultProps=fo;function ho(e){const{className:o,classes:t,pulsate:i=!1,rippleX:n,rippleY:a,rippleSize:r,in:u,onExited:c,timeout:p}=e,[f,g]=l.useState(!1),m=z(o,t.ripple,t.rippleVisible,i&&t.ripplePulsate),v={width:r,height:r,top:-(r/2)+a,left:-(r/2)+n},h=z(t.child,f&&t.childLeaving,i&&t.childPulsate);return!u&&!f&&g(!0),l.useEffect(()=>{if(!u&&c!=null){const C=setTimeout(c,p);return()=>{clearTimeout(C)}}},[c,u,p]),T.jsx("span",{className:m,style:v,children:T.jsx("span",{className:h})})}const E=ee("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),bo=["center","classes","className"];let oe=e=>e,me,xe,ve,ye;const re=550,go=80,mo=le(me||(me=oe`
2
2
  0% {
3
3
  transform: scale(0);
4
4
  opacity: 0.1;