@dcl/shop 0.1.0-30532008194.commit-6986abb → 0.1.0-30532715362.commit-8beef87

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 (172) hide show
  1. package/assets/{Activity-CY78fTJF.js → Activity-DXsPCHb6.js} +1 -1
  2. package/assets/{AnimatedBackground-DvnwI56T.js → AnimatedBackground-COe0sY8T.js} +2 -2
  3. package/assets/{Assets-DXxZHpTD.js → Assets-Cs_4Vzrn.js} +2 -2
  4. package/assets/{Assets.styles-BZLdspHO.js → Assets.styles-DrXT8KZh.js} +1 -1
  5. package/assets/{Authorizations-OFclpaeL.js → Authorizations-C10zHWjs.js} +1 -1
  6. package/assets/{Cart-DMT8m78G.js → Cart-BySRNPWu.js} +2 -2
  7. package/assets/{CircularProgress-DS_zErb1.js → CircularProgress-Q2J1Bsg6.js} +1 -1
  8. package/assets/{Collection-Dn13qH7M.js → Collection-DH1Hqz40.js} +1 -1
  9. package/assets/{CollectionCarousel-BS_-U2pS.js → CollectionCarousel-aHnjzaNW.js} +1 -1
  10. package/assets/{Creator-CMBheUBC.js → Creator-B4Sl01c_.js} +1 -1
  11. package/assets/{ErrorNotice-C6J8i5JJ.js → ErrorNotice-rHvx0ML0.js} +1 -1
  12. package/assets/{ExchangeController-BOClqAAF.js → ExchangeController-HnKmhqlz.js} +1 -1
  13. package/assets/{GetCredits-CdXcYj3h.js → GetCredits-CXo2QVIm.js} +1 -1
  14. package/assets/{HelpersUtil-XnsNASnA.js → HelpersUtil-7eNnvRtR.js} +1 -1
  15. package/assets/{ImportListings-BXUFF7Il.js → ImportListings-C0ezMlI7.js} +1 -1
  16. package/assets/{ItemDetail-DBpyoDM3.js → ItemDetail-BPc2OlC1.js} +3 -3
  17. package/assets/{LoadMore-Dwif0bmX.js → LoadMore-Tx57CQll.js} +1 -1
  18. package/assets/{MenuList-BAfpS6o4.js → MenuList-B1R_wkCv.js} +1 -1
  19. package/assets/{MyAssets-Cu_tMLYH.js → MyAssets-BfR3ILS-.js} +1 -1
  20. package/assets/{MyFavorites--1ubbbHz.js → MyFavorites-Dgkb3WE8.js} +1 -1
  21. package/assets/{NotFound-BUrKqzv2.js → NotFound-EEY_gBPv.js} +1 -1
  22. package/assets/{NotificationsBell-DQ1MfrBk.js → NotificationsBell-ClzKWPxL.js} +1 -1
  23. package/assets/{StoreSettings-DBbS7Ygl.js → StoreSettings-DXxM647G.js} +1 -1
  24. package/assets/{Success-CwPtAk12.js → Success-BInyNeeT.js} +1 -1
  25. package/assets/{SwapController-Bwbdcrfd.js → SwapController-BU7arC_E.js} +1 -1
  26. package/assets/{Tooltip-ChqAjQ8a.js → Tooltip-DFBlwayp.js} +1 -1
  27. package/assets/{TradeService-B_JMiFDC.js → TradeService-Dtm2J_JR.js} +1 -1
  28. package/assets/{W3MFrameProviderSingleton-BcXglSXU.js → W3MFrameProviderSingleton-Cu6jVXFH.js} +3 -3
  29. package/assets/{WebCryptoP256-CNMlxWFc.js → WebCryptoP256-DSqamxv9.js} +1 -1
  30. package/assets/{authorizations-B71vkYZi.js → authorizations-CP2LPBVO.js} +1 -1
  31. package/assets/{basic-EI3l6JCF.js → basic-ByiZbZb0.js} +1 -1
  32. package/assets/{biconomy-uYhILO0t.js → biconomy-C-NsHAGB.js} +1 -1
  33. package/assets/{browseLayout.styles-Dn4E_hm9.js → browseLayout.styles-QRB_0D0j.js} +2 -2
  34. package/assets/{builder-eGBIg94P.js → builder-CFj7Br94.js} +1 -1
  35. package/assets/{buy-CqNJMeic.js → buy-5mCWsIPg.js} +1 -1
  36. package/assets/{buy-gasless-DwHlvX9I.js → buy-gasless-IX5NUXaW.js} +1 -1
  37. package/assets/{categories-C5Ash7Cl.js → categories-KNpvobx-.js} +1 -1
  38. package/assets/{ccip-D1C_kdgc.js → ccip-DLxVnP72.js} +1 -1
  39. package/assets/{ccip-BuIIKxEy.js → ccip-DxM3CQG_.js} +1 -1
  40. package/assets/{clsx-TVl4Fw6R.js → clsx-BhtvxQSI.js} +1 -1
  41. package/assets/{controller-C7FOTPcw.js → controller-CEG79YLO.js} +2 -2
  42. package/assets/{core-Be2gd_-A.js → core-CkQTgCPa.js} +4 -4
  43. package/assets/{createSvgIcon-D7_Tfkk2.js → createSvgIcon-BYM3dfXO.js} +1 -1
  44. package/assets/{custom-Sfnykh1O.js → custom-CaIgAdfO.js} +1 -1
  45. package/assets/{data-capture-Cpct4eDD.js → data-capture-CSvVpO9N.js} +1 -1
  46. package/assets/{email-I1JmHA8b.js → email-Ce7E9ZIX.js} +1 -1
  47. package/assets/{embedded-wallet-4Kxqmemh.js → embedded-wallet-Ct4fbeOq.js} +1 -1
  48. package/assets/{emotion-styled.browser.esm-BrUVH94k.js → emotion-styled.browser.esm-CniaO-pd.js} +1 -1
  49. package/assets/{engine-D5km3lWd.js → engine-9uobw7hk.js} +1 -1
  50. package/assets/{errors-RMUk5IWt.js → errors-Xoj9Pf4j.js} +1 -1
  51. package/assets/{estimate-l1-fee-B7BmVttm.js → estimate-l1-fee-BhL_bnEx.js} +1 -1
  52. package/assets/{execute-nRPsQN0k.js → execute-BvxPbWHn.js} +2 -2
  53. package/assets/{features-CXdCXVaD.js → features-Xk_vA2-r.js} +1 -1
  54. package/assets/{fetchTokenMetadata-L9GEnWtU.js → fetchTokenMetadata-BwO6uG9e.js} +2 -2
  55. package/assets/{get-ecosystem-wallet-info-BU5ZVM1J.js → get-ecosystem-wallet-info-DZCRjX8O.js} +1 -1
  56. package/assets/{getBalance-za6hqsnl.js → getBalance-CBfSy4cP.js} +1 -1
  57. package/assets/{getNFT-BOBUD7E2.js → getNFT-CQWyUu6h.js} +1 -1
  58. package/assets/{getNFT-xENcr48F.js → getNFT-D1gknLyZ.js} +1 -1
  59. package/assets/{getThemeProps-C8hygmDf.js → getThemeProps-D4IusJff.js} +1 -1
  60. package/assets/{grid.styles-Da_K81Vp.js → grid.styles-BaK36ERu.js} +1 -1
  61. package/assets/{hashTypedData-gsOaY-sj.js → hashTypedData-BdBXFmsT.js} +1 -1
  62. package/assets/{hashTypedData-CCwRZYmq.js → hashTypedData-CZEMAZvp.js} +1 -1
  63. package/assets/{import-0QitgW4n.js → import-BGqRXoMi.js} +1 -1
  64. package/assets/{in-app-D_PUkLQN.js → in-app-Clv1avhF.js} +1 -1
  65. package/assets/{in-app-wallet-calls-DkNaLtcu.js → in-app-wallet-calls-CXSITrm5.js} +1 -1
  66. package/assets/{index-jsmYYM0d.js → index-B6uiCcrt.js} +1 -1
  67. package/assets/{index-Bp2JuJvi.js → index-BByrnYgv.js} +1 -1
  68. package/assets/{index-xgCPilcR.js → index-BFQw-UeC.js} +3 -3
  69. package/assets/{index-NAYTtjI1.js → index-BGXVXIEV.js} +1 -1
  70. package/assets/{index-CKL8Q_pX.js → index-BHyQrcKm.js} +1 -1
  71. package/assets/{index-DII6pUKe.js → index-BI9OSG4C.js} +1 -1
  72. package/assets/{index-85ibXcNS.js → index-BL_3vqGr.js} +2 -2
  73. package/assets/{index-BVBprbPq.js → index-BMcBFcyk.js} +1 -1
  74. package/assets/{index-BN_lxMHI.js → index-BaawZMw9.js} +1 -1
  75. package/assets/{index-AfUp7vHi.js → index-Bb-ctA2i.js} +3 -3
  76. package/assets/{index-sPXkKTtn.js → index-BbgALYwP.js} +1 -1
  77. package/assets/{index-DW7LHbXl.js → index-BnYS65tB.js} +1 -1
  78. package/assets/{index-DZafNtC_.js → index-BrCgyLfB.js} +1 -1
  79. package/assets/{index-I41G1DAF.js → index-Bv6JZ5ey.js} +1 -1
  80. package/assets/{index-Df7UCKX5.js → index-ByQslnaL.js} +1 -1
  81. package/assets/{index-hAuXZIuG.js → index-C78R2O3V.js} +1 -1
  82. package/assets/{index-lfzkmcVI.js → index-C7X0s3w-.js} +1 -1
  83. package/assets/{index-9GJtTHX4.js → index-CHXgpBfg.js} +1 -1
  84. package/assets/{index-C_AUmJkz.js → index-CM6JiSWG.js} +1 -1
  85. package/assets/{index-DLMzMfNH.js → index-CXRnJaGv.js} +1 -1
  86. package/assets/{index-BjlyWqNc.js → index-Cea9m6m6.js} +1 -1
  87. package/assets/{index-DykbZXWR.js → index-ChVQN9Re.js} +1 -1
  88. package/assets/{index-CI7GrIbc.js → index-Chf_jbxh.js} +1 -1
  89. package/assets/{index-CtofFlo3.js → index-Cq8f-u4g.js} +1 -1
  90. package/assets/{index-D3yjS6UL.js → index-CtI9DEE8.js} +1 -1
  91. package/assets/{index-CrqsmTcP.js → index-Cx46CM59.js} +2 -2
  92. package/assets/{index-BMQPyN_n.js → index-D0kkpaPy.js} +1 -1
  93. package/assets/{index-CeLnhUQu.js → index-D3ZV3GwU.js} +1 -1
  94. package/assets/{index-CI7-G5Oy.js → index-D7ZWH6NI.js} +44 -44
  95. package/assets/{index-CnEjtUBz.js → index-D8ythwAp.js} +1 -1
  96. package/assets/{index-DF64Tupi.js → index-DbZP2Nym.js} +1 -1
  97. package/assets/{index-b1G7YdO_.js → index-DnB3nk2e.js} +1 -1
  98. package/assets/{index-D5svUjer.js → index-DuGPA9Yq.js} +1 -1
  99. package/assets/{index-CgKvYT-g.js → index-DwGiSdLd.js} +1 -1
  100. package/assets/{index-j9riU6He.js → index-DxUGDPNp.js} +2 -2
  101. package/assets/{index-LPIzMZLY.js → index-Dyq2f61P.js} +1 -1
  102. package/assets/{index-IpXUe6yn.js → index-JdIW5UKh.js} +1 -1
  103. package/assets/{index-S84JPn58.js → index-Qp32TF-V.js} +1 -1
  104. package/assets/{index-DKyQ7J2w.js → index-V2hwiDFp.js} +1 -1
  105. package/assets/{index-DmB4CMu8.js → index-X1I9q2Xs.js} +1 -1
  106. package/assets/{index-Do1pmJrB.js → index-bmGN4UEt.js} +1 -1
  107. package/assets/{index-D-bwngAp.js → index-dofF12y9.js} +1 -1
  108. package/assets/{index-C5bvPMV9.js → index-lI49iOQk.js} +1 -1
  109. package/assets/{index-Cp91AEco.js → index-mUiMp8y2.js} +1 -1
  110. package/assets/{index-O2nB9LUp.js → index-q2-bfBxj.js} +1 -1
  111. package/assets/{index-Do7JduXq.js → index-s-1OdYah.js} +1 -1
  112. package/assets/{index-B_cG4f56.js → index-tRHH5rOM.js} +1 -1
  113. package/assets/{index-22M6vKsg.js → index-tygT_g8z.js} +1 -1
  114. package/assets/{index-ByaXIwGe.js → index-uCXt1ISF.js} +3 -3
  115. package/assets/{index-CuRtPQEp.js → index-wETBOgA7.js} +1 -1
  116. package/assets/{index-DVdC5n54.js → index-y7_6pFNd.js} +1 -1
  117. package/assets/{index.es-CGI6zzWg.js → index.es-CduT3As6.js} +4 -4
  118. package/assets/{index.es-B0hGp6Xo.js → index.es-CgYCuXY5.js} +1 -1
  119. package/assets/{index.es-bUlXOEdU.js → index.es-QDVvHRoP.js} +1 -1
  120. package/assets/{localBatchGatewayRequest-BpZ7tNRq.js → localBatchGatewayRequest-DDQ-37nZ.js} +1 -1
  121. package/assets/{mana-convert-DV2llJXe.js → mana-convert-CTkOJWok.js} +1 -1
  122. package/assets/{mana-rate-DMPR7xGG.js → mana-rate-B3jNC9WL.js} +1 -1
  123. package/assets/{networks-miLRzT8H.js → networks-DY1GGVoZ.js} +1 -1
  124. package/assets/{onramp-CDzWumHA.js → onramp-MB3gJE9T.js} +1 -1
  125. package/assets/{openzeppelin-VC2vsmWT.js → openzeppelin-DLL5PotD.js} +1 -1
  126. package/assets/{parseNft-DnTonjKC.js → parseNft-DBjlFNmz.js} +2 -2
  127. package/assets/{parseSignature-Cha7BZfy.js → parseSignature-CTt9CKmI.js} +1 -1
  128. package/assets/{parseSignature-DuKzN4db.js → parseSignature-Ca_jBzCt.js} +3 -3
  129. package/assets/{passkeys-4r1SsgNk.js → passkeys-BhdtpkG3.js} +1 -1
  130. package/assets/{pay-with-exchange-FwwF5ZT7.js → pay-with-exchange-UhmVzX0_.js} +1 -1
  131. package/assets/{qr-overlay-Bz5EWIXN.js → qr-overlay-Bel_hI9L.js} +1 -1
  132. package/assets/{receive-B-LvIGN4.js → receive-DvtASiDw.js} +1 -1
  133. package/assets/{resolveImplementation-B2EgExar.js → resolveImplementation-Crr2ANKW.js} +1 -1
  134. package/assets/{rpc-CA1HCLxh.js → rpc-HHAPdzTl.js} +1 -1
  135. package/assets/{secp256k1-BMi6wfhq.js → secp256k1-BwXwpUbQ.js} +1 -1
  136. package/assets/{secp256k1-Dse5kSkc.js → secp256k1-CKVQU7cA.js} +1 -1
  137. package/assets/{secp256k1-DDGzNPWn.js → secp256k1-K_0KdAZi.js} +1 -1
  138. package/assets/{send-D4qOXRyN.js → send-BArHY5qm.js} +1 -1
  139. package/assets/{send-batch-transaction-B0L8iVE6.js → send-batch-transaction-Cws5UZTj.js} +1 -1
  140. package/assets/{send-eip712-transaction-_G32CTaF.js → send-eip712-transaction-Jy31jMiS.js} +2 -2
  141. package/assets/{send-gasless-transaction-ByX1vWNS.js → send-gasless-transaction-D6BtYlsp.js} +2 -2
  142. package/assets/{send-transaction-D0Z8Ws5W.js → send-transaction-C0Q8I7jR.js} +2 -2
  143. package/assets/{sendMetaTransaction-zdWpVVA2.js → sendMetaTransaction-LxU_36sg.js} +1 -1
  144. package/assets/{sendRawTransaction-BFNrE7nA.js → sendRawTransaction-L3E4qVZ2.js} +3 -3
  145. package/assets/{serializeTransaction-BwNMTNoW.js → serializeTransaction-QEbdyDWI.js} +1 -1
  146. package/assets/{session-proposal-Bsx1PbxN.js → session-proposal-DEGfmUum.js} +1 -1
  147. package/assets/{session-request-Ib7pbFdX.js → session-request-1v8-bT3R.js} +2 -2
  148. package/assets/{signing-CjguQwou.js → signing-Ch-fjZhe.js} +3 -3
  149. package/assets/{socials-DIFDSNMr.js → socials-FlF3MjOh.js} +1 -1
  150. package/assets/{swaps-CNg9XLz-.js → swaps-BdbXq8hD.js} +1 -1
  151. package/assets/{thirdweb-CzZc9n0H.js → thirdweb-Cn5Jq5Hu.js} +3 -3
  152. package/assets/{to-serializable-transaction-Dvd6K2HR.js → to-serializable-transaction-CNqneSem.js} +2 -2
  153. package/assets/{trade-encoding-CaXvzcLt.js → trade-encoding-B9tOaOWk.js} +1 -1
  154. package/assets/{transactionReceipt-D5Tp_bfi.js → transactionReceipt-Cy0XVF6Y.js} +1 -1
  155. package/assets/{transactions-BGXESWEF.js → transactions-D-bEbXIa.js} +1 -1
  156. package/assets/{useCreditPacks-DLBz56_d.js → useCreditPacks-CWKaLN_B.js} +1 -1
  157. package/assets/{useInfiniteGrid-CkvYLplF.js → useInfiniteGrid-Ca2LjQTz.js} +1 -1
  158. package/assets/useManaRate-B0JTyx88.js +1 -0
  159. package/assets/{useSecondarySales-DoB0_ije.js → useSecondarySales-DAN8M0aA.js} +1 -1
  160. package/assets/{useStore-B_HwVTSU.js → useStore-Bz1liw-O.js} +1 -1
  161. package/assets/{useTheme-Gc9pyKB2.js → useTheme-CQoRc-Qt.js} +1 -1
  162. package/assets/{verifyHash-GHS_xf3h.js → verifyHash-vaH6XQ21.js} +1 -1
  163. package/assets/{w3m-modal-B2lABWy7.js → w3m-modal-COhcfhdL.js} +1 -1
  164. package/assets/{w3m-modal-DbJoixp-.js → w3m-modal-qBmy-8_j.js} +1 -1
  165. package/assets/{wait-for-tx-receipt-Di6pGjWg.js → wait-for-tx-receipt-B0QYIbav.js} +1 -1
  166. package/assets/{wallets-DQWtlvcy.js → wallets-Cuqs91vN.js} +5 -5
  167. package/assets/{web-connector-CYDcrQ-v.js → web-connector-BL9pueby.js} +3 -3
  168. package/assets/{writeContract-CIVGB3lk.js → writeContract-DJXQ4hrB.js} +1 -1
  169. package/assets/{zoraTestnet-D_7iK4db.js → zoraTestnet-DXMEx9Im.js} +1 -1
  170. package/index.html +11 -11
  171. package/package.json +2 -2
  172. package/assets/useManaRate-BShpKssx.js +0 -1
@@ -1,4 +1,4 @@
1
- import{r as b,j as e,L as _,d as dt}from"./react-vyZjIDcS.js";import{aE as lt,s as l,t as o,w as ut,B as ht,l as xt,d,m as pt,u as j,I as g,aF as G,aG as R,aH as mt,y as v,aI as gt,al as E,z as Q,H as ft,aJ as yt,aK as X}from"./index-CI7-G5Oy.js";import{m as bt}from"./mana-convert-DV2llJXe.js";import{u as jt}from"./useManaRate-BShpKssx.js";import{L as vt}from"./LoadMore-Dwif0bmX.js";import{u as f}from"./useInfiniteGrid-CkvYLplF.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CpLYx0ea.js";import"./intl-CBcMB1D2.js";import"./mana-rate-DMPR7xGG.js";const kt=15e3;function wt(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)<=kt}function It(t){const i=[...t].sort((a,n)=>n.createdAt-a.createdAt),s=[];for(const a of i){const n=s[s.length-1];n&&wt(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,h)=>c+h.credits,0),lines:a}})}function At(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 $t(t,i){return{id:t.id,contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId,counterparty:t.buyer,credits:i?bt(t.manaWei,i):null,manaWei:t.manaWei,createdAt:t.createdAt,txHash:t.txHash}}function Pt(t){const s=It(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=$t(r,t.rate);return{kind:"sale",id:`sale:${x.id}`,createdAt:x.createdAt,sale:x}}),n=(t.creditOrders??[]).filter(r=>r.status!=="failed"&&r.status!=="abandoned").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())),h=(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,...h].sort((r,x)=>x.createdAt-r.createdAt||(r.id<x.id?-1:1))}function Lt(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 Nt(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 Et(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?Tt(a[0].netCents):null,c=a.filter(r=>!r.available&&r.availableAt>s);if(c.length===0)return{kind:"credited",credits:n};const h=c.reduce((r,x)=>Math.max(r,x.availableAt),0);return{kind:"pending",credits:n,availableAt:h}}function Tt(t){return lt(t)}const Ct="https://cdn.decentraland.org/@dcl/shop/0.1.0-30532008194.commit-6986abb/assets/credits-product-vs4Q6u6l.svg",T=ut`
1
+ import{r as b,j as e,L as _,d as dt}from"./react-vyZjIDcS.js";import{aE as lt,s as l,t as o,w as ut,B as ht,l as xt,d,m as pt,u as j,I as g,aF as G,aG as R,aH as mt,y as v,aI as gt,al as E,z as Q,H as ft,aJ as yt,aK as X}from"./index-D7ZWH6NI.js";import{m as bt}from"./mana-convert-CTkOJWok.js";import{u as jt}from"./useManaRate-B0JTyx88.js";import{L as vt}from"./LoadMore-Tx57CQll.js";import{u as f}from"./useInfiniteGrid-Ca2LjQTz.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CpLYx0ea.js";import"./intl-CBcMB1D2.js";import"./mana-rate-B3jNC9WL.js";const kt=15e3;function wt(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)<=kt}function It(t){const i=[...t].sort((a,n)=>n.createdAt-a.createdAt),s=[];for(const a of i){const n=s[s.length-1];n&&wt(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,h)=>c+h.credits,0),lines:a}})}function At(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 $t(t,i){return{id:t.id,contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId,counterparty:t.buyer,credits:i?bt(t.manaWei,i):null,manaWei:t.manaWei,createdAt:t.createdAt,txHash:t.txHash}}function Pt(t){const s=It(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=$t(r,t.rate);return{kind:"sale",id:`sale:${x.id}`,createdAt:x.createdAt,sale:x}}),n=(t.creditOrders??[]).filter(r=>r.status!=="failed"&&r.status!=="abandoned").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())),h=(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,...h].sort((r,x)=>x.createdAt-r.createdAt||(r.id<x.id?-1:1))}function Lt(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 Nt(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 Et(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?Tt(a[0].netCents):null,c=a.filter(r=>!r.available&&r.availableAt>s);if(c.length===0)return{kind:"credited",credits:n};const h=c.reduce((r,x)=>Math.max(r,x.availableAt),0);return{kind:"pending",credits:n,availableAt:h}}function Tt(t){return lt(t)}const Ct="https://cdn.decentraland.org/@dcl/shop/0.1.0-30532715362.commit-8beef87/assets/credits-product-vs4Q6u6l.svg",T=ut`
2
2
  0% { background-position: 200% 0; }
3
3
  100% { background-position: -200% 0; }
4
4
  `,Ft=l.section`
@@ -1,4 +1,4 @@
1
- import{r as l,j as v}from"./react-vyZjIDcS.js";import{s as u}from"./index-CI7-G5Oy.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CpLYx0ea.js";import"./intl-CBcMB1D2.js";const b="https://cdn.decentraland.org/@dcl/shop/0.1.0-30532008194.commit-6986abb/assets/custom-welcome-background-BxlFQma9.webp",S="https://cdn.decentraland.org/@dcl/shop/0.1.0-30532008194.commit-6986abb/assets/DCL_LogoPattern-BryBPc3d.png",U=`
1
+ import{r as l,j as v}from"./react-vyZjIDcS.js";import{s as u}from"./index-D7ZWH6NI.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CpLYx0ea.js";import"./intl-CBcMB1D2.js";const S="https://cdn.decentraland.org/@dcl/shop/0.1.0-30532715362.commit-8beef87/assets/custom-welcome-background-BxlFQma9.webp",b="https://cdn.decentraland.org/@dcl/shop/0.1.0-30532715362.commit-8beef87/assets/DCL_LogoPattern-BryBPc3d.png",U=`
2
2
  attribute vec2 a_position;
3
3
  varying vec2 v_uv;
4
4
  void main() {
@@ -94,4 +94,4 @@ void main() {
94
94
  inset: 0;
95
95
  width: 100%;
96
96
  height: 100%;
97
- `;function G(){const t=l.useRef(null),n=l.useRef(0);return l.useEffect(()=>{var x;const r=t.current;if(!r||(x=window.matchMedia)!=null&&x.call(window,"(prefers-reduced-motion: reduce)").matches)return;const e=r.getContext("webgl",{alpha:!1,antialias:!1});if(!e)return;const o=p(e,e.VERTEX_SHADER,U),i=p(e,e.FRAGMENT_SHADER,P);if(!o||!i){o&&e.deleteShader(o),i&&e.deleteShader(i);return}const a=D(e,o,i);if(!a){e.deleteShader(o),e.deleteShader(i);return}const m=e.getAttribLocation(a,"a_position"),R=e.getUniformLocation(a,"u_time"),y=e.getUniformLocation(a,"u_resolution"),_=e.getUniformLocation(a,"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 d=!1;const f=L(e,S,()=>d),w=()=>{const c=window.devicePixelRatio||1,E=r.clientWidth*c,g=r.clientHeight*c;(r.width!==E||r.height!==g)&&(r.width=E,r.height=g)},A=performance.now()/1e3,h=()=>{w(),e.viewport(0,0,r.width,r.height),e.useProgram(a),e.uniform1f(R,performance.now()/1e3-A),e.uniform2f(y,r.width,r.height),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,f),e.uniform1i(_,0),e.enableVertexAttribArray(m),e.bindBuffer(e.ARRAY_BUFFER,s),e.vertexAttribPointer(m,2,e.FLOAT,!1,0,0),e.drawArrays(e.TRIANGLES,0,6),n.current=requestAnimationFrame(h)},T=c=>{c.preventDefault(),cancelAnimationFrame(n.current),r.style.opacity="0"};return r.addEventListener("webglcontextlost",T,!1),n.current=requestAnimationFrame(h),()=>{d=!0,cancelAnimationFrame(n.current),r.removeEventListener("webglcontextlost",T),e.deleteProgram(a),e.deleteShader(o),e.deleteShader(i),e.deleteBuffer(s),e.deleteTexture(f)}},[]),v.jsxs(B,{"aria-hidden":!0,children:[v.jsx(F,{style:{backgroundImage:`url(${b})`}}),v.jsx(I,{ref:t})]})}export{G as default};
97
+ `;function G(){const t=l.useRef(null),n=l.useRef(0);return l.useEffect(()=>{var x;const r=t.current;if(!r||(x=window.matchMedia)!=null&&x.call(window,"(prefers-reduced-motion: reduce)").matches)return;const e=r.getContext("webgl",{alpha:!1,antialias:!1});if(!e)return;const o=p(e,e.VERTEX_SHADER,U),i=p(e,e.FRAGMENT_SHADER,P);if(!o||!i){o&&e.deleteShader(o),i&&e.deleteShader(i);return}const a=D(e,o,i);if(!a){e.deleteShader(o),e.deleteShader(i);return}const m=e.getAttribLocation(a,"a_position"),R=e.getUniformLocation(a,"u_time"),y=e.getUniformLocation(a,"u_resolution"),_=e.getUniformLocation(a,"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 d=!1;const f=L(e,b,()=>d),w=()=>{const c=window.devicePixelRatio||1,E=r.clientWidth*c,g=r.clientHeight*c;(r.width!==E||r.height!==g)&&(r.width=E,r.height=g)},A=performance.now()/1e3,h=()=>{w(),e.viewport(0,0,r.width,r.height),e.useProgram(a),e.uniform1f(R,performance.now()/1e3-A),e.uniform2f(y,r.width,r.height),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,f),e.uniform1i(_,0),e.enableVertexAttribArray(m),e.bindBuffer(e.ARRAY_BUFFER,s),e.vertexAttribPointer(m,2,e.FLOAT,!1,0,0),e.drawArrays(e.TRIANGLES,0,6),n.current=requestAnimationFrame(h)},T=c=>{c.preventDefault(),cancelAnimationFrame(n.current),r.style.opacity="0"};return r.addEventListener("webglcontextlost",T,!1),n.current=requestAnimationFrame(h),()=>{d=!0,cancelAnimationFrame(n.current),r.removeEventListener("webglcontextlost",T),e.deleteProgram(a),e.deleteShader(o),e.deleteShader(i),e.deleteBuffer(s),e.deleteTexture(f)}},[]),v.jsxs(B,{"aria-hidden":!0,children:[v.jsx(F,{style:{backgroundImage:`url(${S})`}}),v.jsx(I,{ref:t})]})}export{G as default};
@@ -1,4 +1,4 @@
1
- import{b as ze,r as m,j as e,u as Ve}from"./react-vyZjIDcS.js";import{c as B,aq as Ze,ar as Ke,b as Je,s as n,t,m as Ie,ai as Qe,D as Xe,H as Ae,x as Ye,d as s,I as R,y as W,aN as he,an as J,au as et,at as tt,l as Ne,n as nt,S as fe,A as O,aO as st,aP as ot}from"./index-CI7-G5Oy.js";import{u as it}from"./useSecondarySales-DoB0_ije.js";import{a as rt,m as Me}from"./mana-convert-DV2llJXe.js";import{u as Pe}from"./useManaRate-BShpKssx.js";import{g as at,h as lt,i as ct,j as dt,k as pt,C as xt,l as ht,o as ft,m as mt,n as ut,M as gt,p as bt,E as yt,q as wt,r as jt,s as vt,t as $t,u as Ct,v as kt}from"./Assets.styles-BZLdspHO.js";import{c as me,R as St,F as Et,S as Rt}from"./categories-C5Ash7Cl.js";import{L as Tt}from"./LoadMore-Dwif0bmX.js";import{u as _t}from"./useInfiniteGrid-CkvYLplF.js";import{E as zt}from"./ErrorNotice-C6J8i5JJ.js";import{d as It}from"./dcl-schemas-BICTSpB5.js";import{s as At,G as Nt,w as Mt,S as Pt}from"./buy-gasless-DwHlvX9I.js";import{s as Wt}from"./buy-CqNJMeic.js";import{i as Bt}from"./trade-encoding-CaXvzcLt.js";import{r as Ft}from"./mana-rate-DMPR7xGG.js";import{f as Lt}from"./errors-RMUk5IWt.js";import{J as Ht,C as Ut,B as ee}from"./ethers-CpLYx0ea.js";import{l as Ot}from"./loader-logo-BzY9EKdC.js";import{n as Dt}from"./Tooltip-ChqAjQ8a.js";import{G as Gt}from"./grid.styles-Da_K81Vp.js";import"./sentry-B35L1FdR.js";import"./intl-CBcMB1D2.js";import"./authorizations-B71vkYZi.js";import"./sendMetaTransaction-zdWpVVA2.js";function D(o){const i=o.source??"item",l=o.tradeId||`${o.contractAddress}-${o.tokenId??o.itemId??""}`;return`${i}:${l}`}const F="100000000000000000000",We=2,Q=15,qt=/^[a-zA-Z0-9]+$/;function ue(o){const i=o.trim();return i.length===0?{ok:!1,reason:"empty"}:qt.test(i)?i.length<We?{ok:!1,reason:"too-short"}:i.length>Q?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function Vt(o){return o.replace(/[^a-zA-Z0-9]/g,"").slice(0,Q)}const Zt=["function available(string _subdomain) view returns (bool)"],ge={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function Kt(){return B.chainId===Number(It.ChainId.MATIC_MAINNET)?ge.mainnet:ge.sepolia}async function Jt(o,i={}){var p;const{rpc:l,address:x}=Kt(),c=new Ht(l),d=new Ut(x,Zt,c);console.info(`[names] availability check → DCLRegistrar(${x}).available("${o}") on ${l}`);const h=await d.available(o);if((p=i.signal)!=null&&p.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${o}" available=${h}`),h?"available":"taken"}const Qt="https://app.across.to/api";class Be extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}function Xt(o){return rt(F,o)}async function Yt(o,i,l={}){var p;const x=l.chainId??B.chainId,c=l.provider??"across",d=`${B.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(i)}&chainId=${x}&provider=${c}`,h=await Je(d,{method:"GET",identity:o,metadata:{}});if(!h.ok){let a;try{a=(p=await h.json())==null?void 0:p.code}catch{}throw a==="ROUTE_COST_TOO_HIGH"?new Be:new Error(`fetchNameCreditRoute ${h.status}`)}return h.json()}function en(o,i){const l=ee.from(o.availableAmount),c=ee.from(F).sub(l);return{credits:[{value:o.amount,expiresAt:Number(o.expiresAt),salt:Bt(o.id)}],creditsSignatures:[o.signature],externalCall:{target:i.externalCall.target,selector:i.externalCall.selector,data:i.externalCall.data,expiresAt:i.externalCall.expiresAt,salt:i.externalCall.salt},customExternalCallSignature:i.customExternalCallSignature,maxUncreditedValue:c.isNegative()?"0":c.toString(),maxCreditedValue:F}}async function tn(o,i={}){const l=Qt,x=i.intervalMs??1e4,c=i.maxAttempts??60;let d={status:"pending",destinationTxHash:null,actionsSucceeded:!1};for(let h=0;h<c;h++){try{const p=await fetch(`${l}/deposit/status?originChainId=137&depositTxHash=${o}`);if(p.ok){const a=await p.json(),u=(a.status??"pending").toLowerCase(),b=a.fillTx??a.fillTxnRef??null,w=a.actionsSucceeded!==!1;if(u==="filled")return{status:"filled",destinationTxHash:b,actionsSucceeded:w};if(u==="refunded"||u==="expired")return{status:u,destinationTxHash:null,actionsSucceeded:!1};d={status:"pending",destinationTxHash:b,actionsSucceeded:w}}}catch{}h<c-1&&await new Promise(p=>setTimeout(p,x))}return d}async function nn(o){const{name:i,identity:l,signer:x}=o,c=o.chainId??B.chainId,d=o.provider??"across",h=(o.beneficiary??await x.getAddress()).toLowerCase();let p=null,a=!1;console.info("[names] register start",{name:i,buyer:h,chainId:c,provider:d});try{const u=await Ft(c),b=Xt(u);console.info("[names] step 1/6 sized reservation",{usdCents:b,manaRate:u});const w=await Yt(l,i,{chainId:c,provider:d});console.info("[names] step 2/6 route fetched",{target:w.externalCall.target,selector:w.externalCall.selector,provider:w.provider,quoteId:w.quoteId});const j=await Ze(l,b);if(p=j.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:j.credit.id,maxCreditedValue:j.maxCreditedValue}),ee.from(j.maxCreditedValue).lt(F))throw new Error("Credit under-sized for the name price");const $=en(j.credit,w);let f;try{f=await At({chainId:c,buyer:h,signer:x,args:$})}catch(y){if(!(y instanceof Nt))throw y;f=await Wt(c,$,x)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:f}),await Mt(f),a=!0,console.info("[names] step 5/6 origin tx confirmed",{originTxHash:f}),d==="across"){const y=await tn(f,o.acrossPoll);if(console.info("[names] step 6/6 across status",y),y.status==="pending")return{status:"pending",originTxHash:f};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:f,destinationTxHash:y.destinationTxHash}}return{status:"pending",originTxHash:f}}catch(u){if(console.error("[names] register failed — raw error:",u,{name:i,buyer:h,originConfirmed:a}),u instanceof Pt)return{status:"pending",originTxHash:u.txHash};if(p&&!a&&await Ke(l,[p]).catch(()=>{}),u instanceof Be)throw u;const b=new Error(Lt(u,"Couldn't register the name. Please try again.",{sale:!0}));throw b.cause=u,b}}const sn=n.div`
1
+ import{b as ze,r as m,j as e,u as Ve}from"./react-vyZjIDcS.js";import{c as B,aq as Ze,ar as Ke,b as Je,s as n,t,m as Ie,ai as Qe,D as Xe,H as Ae,x as Ye,d as s,I as R,y as W,aN as he,an as J,au as et,at as tt,l as Ne,n as nt,S as fe,A as O,aO as st,aP as ot}from"./index-D7ZWH6NI.js";import{u as it}from"./useSecondarySales-DAN8M0aA.js";import{a as rt,m as Me}from"./mana-convert-CTkOJWok.js";import{u as Pe}from"./useManaRate-B0JTyx88.js";import{g as at,h as lt,i as ct,j as dt,k as pt,C as xt,l as ht,o as ft,m as mt,n as ut,M as gt,p as bt,E as yt,q as wt,r as jt,s as vt,t as $t,u as Ct,v as kt}from"./Assets.styles-DrXT8KZh.js";import{c as me,R as St,F as Et,S as Rt}from"./categories-KNpvobx-.js";import{L as Tt}from"./LoadMore-Tx57CQll.js";import{u as _t}from"./useInfiniteGrid-Ca2LjQTz.js";import{E as zt}from"./ErrorNotice-rHvx0ML0.js";import{d as It}from"./dcl-schemas-BICTSpB5.js";import{s as At,G as Nt,w as Mt,S as Pt}from"./buy-gasless-IX5NUXaW.js";import{s as Wt}from"./buy-5mCWsIPg.js";import{i as Bt}from"./trade-encoding-B9tOaOWk.js";import{r as Ft}from"./mana-rate-B3jNC9WL.js";import{f as Lt}from"./errors-Xoj9Pf4j.js";import{J as Ht,C as Ut,B as ee}from"./ethers-CpLYx0ea.js";import{l as Ot}from"./loader-logo-BzY9EKdC.js";import{n as Dt}from"./Tooltip-DFBlwayp.js";import{G as Gt}from"./grid.styles-BaK36ERu.js";import"./sentry-B35L1FdR.js";import"./intl-CBcMB1D2.js";import"./authorizations-CP2LPBVO.js";import"./sendMetaTransaction-LxU_36sg.js";function D(o){const i=o.source??"item",l=o.tradeId||`${o.contractAddress}-${o.tokenId??o.itemId??""}`;return`${i}:${l}`}const F="100000000000000000000",We=2,Q=15,qt=/^[a-zA-Z0-9]+$/;function ue(o){const i=o.trim();return i.length===0?{ok:!1,reason:"empty"}:qt.test(i)?i.length<We?{ok:!1,reason:"too-short"}:i.length>Q?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function Vt(o){return o.replace(/[^a-zA-Z0-9]/g,"").slice(0,Q)}const Zt=["function available(string _subdomain) view returns (bool)"],ge={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function Kt(){return B.chainId===Number(It.ChainId.MATIC_MAINNET)?ge.mainnet:ge.sepolia}async function Jt(o,i={}){var p;const{rpc:l,address:x}=Kt(),c=new Ht(l),d=new Ut(x,Zt,c);console.info(`[names] availability check → DCLRegistrar(${x}).available("${o}") on ${l}`);const h=await d.available(o);if((p=i.signal)!=null&&p.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${o}" available=${h}`),h?"available":"taken"}const Qt="https://app.across.to/api";class Be extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}function Xt(o){return rt(F,o)}async function Yt(o,i,l={}){var p;const x=l.chainId??B.chainId,c=l.provider??"across",d=`${B.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(i)}&chainId=${x}&provider=${c}`,h=await Je(d,{method:"GET",identity:o,metadata:{}});if(!h.ok){let a;try{a=(p=await h.json())==null?void 0:p.code}catch{}throw a==="ROUTE_COST_TOO_HIGH"?new Be:new Error(`fetchNameCreditRoute ${h.status}`)}return h.json()}function en(o,i){const l=ee.from(o.availableAmount),c=ee.from(F).sub(l);return{credits:[{value:o.amount,expiresAt:Number(o.expiresAt),salt:Bt(o.id)}],creditsSignatures:[o.signature],externalCall:{target:i.externalCall.target,selector:i.externalCall.selector,data:i.externalCall.data,expiresAt:i.externalCall.expiresAt,salt:i.externalCall.salt},customExternalCallSignature:i.customExternalCallSignature,maxUncreditedValue:c.isNegative()?"0":c.toString(),maxCreditedValue:F}}async function tn(o,i={}){const l=Qt,x=i.intervalMs??1e4,c=i.maxAttempts??60;let d={status:"pending",destinationTxHash:null,actionsSucceeded:!1};for(let h=0;h<c;h++){try{const p=await fetch(`${l}/deposit/status?originChainId=137&depositTxHash=${o}`);if(p.ok){const a=await p.json(),u=(a.status??"pending").toLowerCase(),b=a.fillTx??a.fillTxnRef??null,w=a.actionsSucceeded!==!1;if(u==="filled")return{status:"filled",destinationTxHash:b,actionsSucceeded:w};if(u==="refunded"||u==="expired")return{status:u,destinationTxHash:null,actionsSucceeded:!1};d={status:"pending",destinationTxHash:b,actionsSucceeded:w}}}catch{}h<c-1&&await new Promise(p=>setTimeout(p,x))}return d}async function nn(o){const{name:i,identity:l,signer:x}=o,c=o.chainId??B.chainId,d=o.provider??"across",h=(o.beneficiary??await x.getAddress()).toLowerCase();let p=null,a=!1;console.info("[names] register start",{name:i,buyer:h,chainId:c,provider:d});try{const u=await Ft(c),b=Xt(u);console.info("[names] step 1/6 sized reservation",{usdCents:b,manaRate:u});const w=await Yt(l,i,{chainId:c,provider:d});console.info("[names] step 2/6 route fetched",{target:w.externalCall.target,selector:w.externalCall.selector,provider:w.provider,quoteId:w.quoteId});const j=await Ze(l,b);if(p=j.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:j.credit.id,maxCreditedValue:j.maxCreditedValue}),ee.from(j.maxCreditedValue).lt(F))throw new Error("Credit under-sized for the name price");const $=en(j.credit,w);let f;try{f=await At({chainId:c,buyer:h,signer:x,args:$})}catch(y){if(!(y instanceof Nt))throw y;f=await Wt(c,$,x)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:f}),await Mt(f),a=!0,console.info("[names] step 5/6 origin tx confirmed",{originTxHash:f}),d==="across"){const y=await tn(f,o.acrossPoll);if(console.info("[names] step 6/6 across status",y),y.status==="pending")return{status:"pending",originTxHash:f};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:f,destinationTxHash:y.destinationTxHash}}return{status:"pending",originTxHash:f}}catch(u){if(console.error("[names] register failed — raw error:",u,{name:i,buyer:h,originConfirmed:a}),u instanceof Pt)return{status:"pending",originTxHash:u.txHash};if(p&&!a&&await Ke(l,[p]).catch(()=>{}),u instanceof Be)throw u;const b=new Error(Lt(u,"Couldn't register the name. Please try again.",{sale:!0}));throw b.cause=u,b}}const sn=n.div`
2
2
  position: fixed;
3
3
  inset: 0;
4
4
  z-index: 10000;
@@ -366,7 +366,7 @@ import{b as ze,r as m,j as e,u as Ve}from"./react-vyZjIDcS.js";import{c as B,aq
366
366
  flex: none;
367
367
  color: ${t.colors.dclRed};
368
368
  }
369
- `;function Sn({name:o,priceCredits:i,onClose:l}){const{session:x}=Ie(),{data:c,isError:d}=Qe(x),h=Xe(),p=ze(),[a,u]=m.useState("confirm"),[b,w]=m.useState(""),[j,$]=m.useState(null),f=m.useRef(!1),y=b.trim().toLowerCase()===o.toLowerCase(),v=a==="completing",k=i!=null?Ae(i):"—";m.useEffect(()=>{const g=T=>{T.key==="Escape"&&!v&&l()};document.addEventListener("keydown",g);const I=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",g),document.body.style.overflow=I}},[v,l]);async function C(){if(!(!x||!y||f.current)){f.current=!0,u("completing"),$(null);try{await nn({name:o,identity:x.identity,signer:x.signer}),J("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:i??null}),h.invalidateQueries({queryKey:["usd-balance"]}),h.invalidateQueries({queryKey:["my-assets"]}),u("success")}catch(g){J(tt(g)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:et(g),purchase_type:"name"}),$((g==null?void 0:g.message)||s("names.errorGeneric")),u("error")}finally{f.current=!1}}}const z=a!=="success",E=Ye(x==null?void 0:x.providerType);return e.jsx(sn,{onClick:v?void 0:l,role:"presentation",children:e.jsxs(on,{role:"dialog","aria-modal":"true","aria-label":s("names.buyTitle"),onClick:g=>g.stopPropagation(),children:[z&&e.jsxs(e.Fragment,{children:[e.jsxs(be,{children:[e.jsx(ye,{children:a==="error"?s("names.errorTitle"):s("names.buyTitle")}),e.jsx(we,{onClick:l,disabled:v,"aria-label":s("buyModal.close"),children:e.jsx(R,{name:"close"})})]}),e.jsxs(je,{children:[s("names.myCreditsBalance")," ",e.jsx(W,{})," ",he(c,d)]}),e.jsx(ve,{})]}),(a==="confirm"||a==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs($e,{children:[e.jsx(Ce,{"aria-hidden":!0,children:"@"}),e.jsxs(ke,{children:[e.jsxs(Se,{children:[o,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(Ee,{children:s("names.subtitle")})]}),e.jsxs(Re,{children:[e.jsx(W,{}),k]})]}),a==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(kn,{children:[e.jsx(R,{name:"info","aria-hidden":!0}),e.jsx("span",{children:j})]}),e.jsx(Te,{onClick:()=>u("confirm"),children:s("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(rn,{children:[e.jsx(an,{children:s("names.confirmTitle")}),e.jsx(ln,{dangerouslySetInnerHTML:{__html:s("names.confirmBody",{name:`<b>@${En(o)}</b>`})}}),e.jsxs(cn,{children:[e.jsx(dn,{"aria-hidden":!0,children:"@"}),e.jsx(pn,{value:b,onChange:g=>w(g.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":s("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(b.length,8)}ch`}}),e.jsx(xn,{children:".dcl.eth"})]})]}),e.jsx(Te,{onClick:()=>void C(),disabled:!y||!x,children:s("names.buyCta")})]})]}),a==="completing"&&e.jsxs(hn,{children:[e.jsx(fn,{src:Ot,alt:"",width:56,height:56}),e.jsx(mn,{children:E?s("names.confirming"):s("names.completing")}),e.jsxs(un,{children:[e.jsx(gn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(bn,{children:"1/1"})]})]}),a==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(be,{children:[e.jsx(ye,{children:s("names.successHeaderTitle")}),e.jsx(we,{onClick:l,"aria-label":s("buyModal.close"),children:e.jsx(R,{name:"close"})})]}),e.jsxs(je,{children:[s("names.myCreditsBalance")," ",e.jsx(W,{})," ",he(c,d)]}),e.jsx(ve,{}),e.jsxs(yn,{children:[e.jsx(wn,{"aria-hidden":!0,children:e.jsx(R,{name:"check"})}),e.jsxs(jn,{children:[e.jsx("b",{children:s("names.successBannerBold")})," ",s("names.successBannerRest")]})]}),e.jsxs($e,{style:{marginTop:20},children:[e.jsx(Ce,{"aria-hidden":!0,children:"@"}),e.jsxs(ke,{children:[e.jsxs(Se,{children:[o,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(Ee,{children:s("names.subtitle")})]}),e.jsxs(Re,{children:[e.jsx(W,{}),k]})]}),e.jsxs(vn,{children:[e.jsx($n,{onClick:()=>{l(),p("/my-assets")},children:s("names.myItems")}),e.jsx(Cn,{href:B.profileUrl,target:"_blank",rel:"noopener noreferrer",children:s("names.assignToAvatar")})]})]})]})})}function En(o){return o.replace(/[&<>"']/g,i=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[i])}const Rn="https://cdn.decentraland.org/@dcl/shop/0.1.0-30532008194.commit-6986abb/assets/identity-B4DXDuJP.webp",Tn="https://cdn.decentraland.org/@dcl/shop/0.1.0-30532008194.commit-6986abb/assets/world-B-9aPlxu.webp",_n="https://cdn.decentraland.org/@dcl/shop/0.1.0-30532008194.commit-6986abb/assets/invite-BfwIhP2C.webp",zn="https://cdn.decentraland.org/@dcl/shop/0.1.0-30532008194.commit-6986abb/assets/governance-DnazlIjy.webp",In=n.div`
369
+ `;function Sn({name:o,priceCredits:i,onClose:l}){const{session:x}=Ie(),{data:c,isError:d}=Qe(x),h=Xe(),p=ze(),[a,u]=m.useState("confirm"),[b,w]=m.useState(""),[j,$]=m.useState(null),f=m.useRef(!1),y=b.trim().toLowerCase()===o.toLowerCase(),v=a==="completing",k=i!=null?Ae(i):"—";m.useEffect(()=>{const g=T=>{T.key==="Escape"&&!v&&l()};document.addEventListener("keydown",g);const I=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",g),document.body.style.overflow=I}},[v,l]);async function C(){if(!(!x||!y||f.current)){f.current=!0,u("completing"),$(null);try{await nn({name:o,identity:x.identity,signer:x.signer}),J("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:i??null}),h.invalidateQueries({queryKey:["usd-balance"]}),h.invalidateQueries({queryKey:["my-assets"]}),u("success")}catch(g){J(tt(g)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:et(g),purchase_type:"name"}),$((g==null?void 0:g.message)||s("names.errorGeneric")),u("error")}finally{f.current=!1}}}const z=a!=="success",E=Ye(x==null?void 0:x.providerType);return e.jsx(sn,{onClick:v?void 0:l,role:"presentation",children:e.jsxs(on,{role:"dialog","aria-modal":"true","aria-label":s("names.buyTitle"),onClick:g=>g.stopPropagation(),children:[z&&e.jsxs(e.Fragment,{children:[e.jsxs(be,{children:[e.jsx(ye,{children:a==="error"?s("names.errorTitle"):s("names.buyTitle")}),e.jsx(we,{onClick:l,disabled:v,"aria-label":s("buyModal.close"),children:e.jsx(R,{name:"close"})})]}),e.jsxs(je,{children:[s("names.myCreditsBalance")," ",e.jsx(W,{})," ",he(c,d)]}),e.jsx(ve,{})]}),(a==="confirm"||a==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs($e,{children:[e.jsx(Ce,{"aria-hidden":!0,children:"@"}),e.jsxs(ke,{children:[e.jsxs(Se,{children:[o,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(Ee,{children:s("names.subtitle")})]}),e.jsxs(Re,{children:[e.jsx(W,{}),k]})]}),a==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(kn,{children:[e.jsx(R,{name:"info","aria-hidden":!0}),e.jsx("span",{children:j})]}),e.jsx(Te,{onClick:()=>u("confirm"),children:s("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(rn,{children:[e.jsx(an,{children:s("names.confirmTitle")}),e.jsx(ln,{dangerouslySetInnerHTML:{__html:s("names.confirmBody",{name:`<b>@${En(o)}</b>`})}}),e.jsxs(cn,{children:[e.jsx(dn,{"aria-hidden":!0,children:"@"}),e.jsx(pn,{value:b,onChange:g=>w(g.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":s("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(b.length,8)}ch`}}),e.jsx(xn,{children:".dcl.eth"})]})]}),e.jsx(Te,{onClick:()=>void C(),disabled:!y||!x,children:s("names.buyCta")})]})]}),a==="completing"&&e.jsxs(hn,{children:[e.jsx(fn,{src:Ot,alt:"",width:56,height:56}),e.jsx(mn,{children:E?s("names.confirming"):s("names.completing")}),e.jsxs(un,{children:[e.jsx(gn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(bn,{children:"1/1"})]})]}),a==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(be,{children:[e.jsx(ye,{children:s("names.successHeaderTitle")}),e.jsx(we,{onClick:l,"aria-label":s("buyModal.close"),children:e.jsx(R,{name:"close"})})]}),e.jsxs(je,{children:[s("names.myCreditsBalance")," ",e.jsx(W,{})," ",he(c,d)]}),e.jsx(ve,{}),e.jsxs(yn,{children:[e.jsx(wn,{"aria-hidden":!0,children:e.jsx(R,{name:"check"})}),e.jsxs(jn,{children:[e.jsx("b",{children:s("names.successBannerBold")})," ",s("names.successBannerRest")]})]}),e.jsxs($e,{style:{marginTop:20},children:[e.jsx(Ce,{"aria-hidden":!0,children:"@"}),e.jsxs(ke,{children:[e.jsxs(Se,{children:[o,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(Ee,{children:s("names.subtitle")})]}),e.jsxs(Re,{children:[e.jsx(W,{}),k]})]}),e.jsxs(vn,{children:[e.jsx($n,{onClick:()=>{l(),p("/my-assets")},children:s("names.myItems")}),e.jsx(Cn,{href:B.profileUrl,target:"_blank",rel:"noopener noreferrer",children:s("names.assignToAvatar")})]})]})]})})}function En(o){return o.replace(/[&<>"']/g,i=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[i])}const Rn="https://cdn.decentraland.org/@dcl/shop/0.1.0-30532715362.commit-8beef87/assets/identity-B4DXDuJP.webp",Tn="https://cdn.decentraland.org/@dcl/shop/0.1.0-30532715362.commit-8beef87/assets/world-B-9aPlxu.webp",_n="https://cdn.decentraland.org/@dcl/shop/0.1.0-30532715362.commit-8beef87/assets/invite-BfwIhP2C.webp",zn="https://cdn.decentraland.org/@dcl/shop/0.1.0-30532715362.commit-8beef87/assets/governance-DnazlIjy.webp",In=n.div`
370
370
  width: 100%;
371
371
  min-width: 0;
372
372
  `,An=n.nav`
@@ -1,4 +1,4 @@
1
- import{r as $,j as t}from"./react-vyZjIDcS.js";import{R as C,a as oe,C as ie,b as ne}from"./categories-C5Ash7Cl.js";import{n as c,T as se}from"./Tooltip-ChqAjQ8a.js";import{t as e,s as o,I as g,d as s,n as ae,e as v}from"./index-CI7-G5Oy.js";const re=o.div`
1
+ import{r as $,j as t}from"./react-vyZjIDcS.js";import{R as C,a as oe,C as ie,b as ne}from"./categories-KNpvobx-.js";import{n as c,T as se}from"./Tooltip-DFBlwayp.js";import{t as e,s as o,I as g,d as s,n as ae,e as v}from"./index-D7ZWH6NI.js";const re=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 M}from"./react-vyZjIDcS.js";import{s as a,B as N,t as o,w as I,l as B,d as e,m as F,x as W,I as f,y as G,z as K,u as w,D as P,c as Q,E as k,k as H,o as $}from"./index-CI7-G5Oy.js";import{a as O,b as _,c as X,d as J,s as U,f as V}from"./authorizations-B71vkYZi.js";import{a as Y}from"./builder-eGBIg94P.js";import{f as Z}from"./errors-RMUk5IWt.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CpLYx0ea.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-zdWpVVA2.js";const tt=I`
1
+ import{j as t,L as q,r as M}from"./react-vyZjIDcS.js";import{s as a,B as N,t as o,w as I,l as B,d as e,m as F,x as W,I as f,y as G,z as K,u as w,D as P,c as Q,E as k,k as H,o as $}from"./index-D7ZWH6NI.js";import{a as O,b as _,c as X,d as J,s as U,f as V}from"./authorizations-CP2LPBVO.js";import{a as Y}from"./builder-CFj7Br94.js";import{f as Z}from"./errors-Xoj9Pf4j.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CpLYx0ea.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-LxU_36sg.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{j as e,L as ge,r as $,b as Lt,a as Nt}from"./react-vyZjIDcS.js";import{t as ee,s as i,d as a,H as Z,F as Qt,I as R,y as xt,G as ze,l as Kt,ah as q,O as Ze,m as Ut,u as Ot,ai as Ht,D as Vt,aj as Dt,ak as Gt,al as Yt,x as Jt,am as et,an as Q,ao as tt,ap as Xt,k as V,c as at,e as Zt,aq as st,ar as je,as as ke,at as ce,au as nt,g as le,a as ea,C as $e,av as ta}from"./index-CI7-G5Oy.js";import{M as aa,S as sa,C as na,H as ia,a as ra,T as oa,X as ca,b as la,B as da,c as ua,d as it,e as ha,f as pe,P as gt,m as mt,g as pa,h as xa,i as ga,j as ft,k as xe,L as ma,l as fa,n as rt,o as ot,W as ya,p as ba,q as va,A as Ca,r as wa,s as ja,t as ka,u as $a,v as Sa,w as Ma,x as Ta,y as Pa,z as za,D as Aa,E as Ia,F as qa,G as Ra,I as _a,J as Ba,K as Se,N as Ea,O as Fa,Q as Wa,R as La,U as ct,V as Na,Y as Qa,Z as Ka,_ as Ua}from"./CollectionCarousel-BS_-U2pS.js";import{u as Oa}from"./useManaRate-BShpKssx.js";import{r as Ha}from"./mana-rate-DMPR7xGG.js";import{i as Va,j as Da,f as Ga,n as Ya,h as Ja,A as Xa}from"./authorizations-B71vkYZi.js";import{b as Me}from"./buy-CqNJMeic.js";import{b as Za,w as es,S as ts,G as as}from"./buy-gasless-DwHlvX9I.js";import{u as ss,M as ns,R as de,r as is,c as rs}from"./useCreditPacks-DLBz56_d.js";import{l as os}from"./loader-logo-BzY9EKdC.js";import{i as cs,a as ls}from"./errors-RMUk5IWt.js";import{E as ds}from"./ErrorNotice-C6J8i5JJ.js";import{u as lt}from"./mana-convert-DV2llJXe.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CpLYx0ea.js";import"./intl-CBcMB1D2.js";import"./trade-encoding-CaXvzcLt.js";import"./sendMetaTransaction-zdWpVVA2.js";const{colors:D,radius:us}=ee,hs=i.div`
1
+ import{j as e,L as ge,r as $,b as Lt,a as Nt}from"./react-vyZjIDcS.js";import{t as ee,s as i,d as a,H as Z,F as Qt,I as R,y as xt,G as ze,l as Kt,ah as q,O as Ze,m as Ut,u as Ot,ai as Ht,D as Vt,aj as Dt,ak as Gt,al as Yt,x as Jt,am as et,an as Q,ao as tt,ap as Xt,k as V,c as at,e as Zt,aq as st,ar as je,as as ke,at as ce,au as nt,g as le,a as ea,C as $e,av as ta}from"./index-D7ZWH6NI.js";import{M as aa,S as sa,C as na,H as ia,a as ra,T as oa,X as ca,b as la,B as da,c as ua,d as it,e as ha,f as pe,P as gt,m as mt,g as pa,h as xa,i as ga,j as ft,k as xe,L as ma,l as fa,n as rt,o as ot,W as ya,p as ba,q as va,A as Ca,r as wa,s as ja,t as ka,u as $a,v as Sa,w as Ma,x as Ta,y as Pa,z as za,D as Aa,E as Ia,F as qa,G as Ra,I as _a,J as Ba,K as Se,N as Ea,O as Fa,Q as Wa,R as La,U as ct,V as Na,Y as Qa,Z as Ka,_ as Ua}from"./CollectionCarousel-aHnjzaNW.js";import{u as Oa}from"./useManaRate-B0JTyx88.js";import{r as Ha}from"./mana-rate-B3jNC9WL.js";import{i as Va,j as Da,f as Ga,n as Ya,h as Ja,A as Xa}from"./authorizations-CP2LPBVO.js";import{b as Me}from"./buy-5mCWsIPg.js";import{b as Za,w as es,S as ts,G as as}from"./buy-gasless-IX5NUXaW.js";import{u as ss,M as ns,R as de,r as is,c as rs}from"./useCreditPacks-CWKaLN_B.js";import{l as os}from"./loader-logo-BzY9EKdC.js";import{i as cs,a as ls}from"./errors-Xoj9Pf4j.js";import{E as ds}from"./ErrorNotice-rHvx0ML0.js";import{u as lt}from"./mana-convert-CTkOJWok.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CpLYx0ea.js";import"./intl-CBcMB1D2.js";import"./trade-encoding-B9tOaOWk.js";import"./sendMetaTransaction-LxU_36sg.js";const{colors:D,radius:us}=ee,hs=i.div`
2
2
  display: flex;
3
3
  align-items: center;
4
4
  justify-content: center;
@@ -58,7 +58,7 @@ import{j as e,L as ge,r as $,b as Lt,a as Nt}from"./react-vyZjIDcS.js";import{t
58
58
  font-weight: 700;
59
59
  color: ${D.text};
60
60
  }
61
- `,fs="https://cdn.decentraland.org/@dcl/shop/0.1.0-30532008194.commit-6986abb/assets/buy-error-22UunaPC.png";function ys(c){const{phase:d,balanceCredits:k,onClose:T}=c,_=d==="processing",F=d==="error"?a("cartCheckout.errorTitle"):d==="nofunds"?a("cartCheckout.titleNoFunds"):d==="choose"?a("buyModal.choosePayment"):a("cartCheckout.titleBuy"),W=d==="processing";return e.jsxs(aa,{role:"dialog","aria-modal":"true","aria-label":a("cartCheckout.dialogAria"),children:[e.jsx(sa,{onClick:_?void 0:T,"aria-hidden":!0}),e.jsxs(na,{"data-tall":W||void 0,children:[e.jsxs(ia,{children:[e.jsxs(ra,{children:[e.jsx(oa,{children:F}),!_&&e.jsx(ca,{onClick:T,"aria-label":a("buyModal.close"),children:e.jsx(la,{})})]}),e.jsxs(da,{children:[e.jsx(ua,{children:d==="nofunds"?a("buyModal.dclBalance"):a("buyModal.myCreditsBalance")}),e.jsx(it,{}),e.jsx(ha,{children:Z(k)})]})]}),d==="choose"&&e.jsxs(pe,{children:[e.jsxs(ms,{children:[e.jsx("span",{children:a("cart.purchaseSummary")}),e.jsxs("strong",{children:[e.jsx(it,{}),Z(c.totalCredits??0)]})]}),e.jsx(gt,{options:c.options??[],totalCents:c.totalCents??0,onPay:c.onPay??(()=>{}),rateNote:(()=>{const z=mt(c.totalCents??0,c.totalManaWei??0n);return z!=null?a("buyModal.manaRate",{mana:z.toLocaleString("en",{maximumFractionDigits:2})}):null})()})]}),d==="processing"&&e.jsx(bs,{stage:c.stage??"reserving",step:c.step??1,total:c.total??1,isSelfCustody:!!c.isSelfCustody}),d==="nofunds"&&e.jsx(vs,{lines:c.lines??[],shortfallCredits:c.shortfallCredits??0,packs:c.packs??[],selectedPack:c.selectedPack??"",onSelectPack:c.onSelectPack??(()=>{}),onBuyPacks:c.onBuyPacks??(()=>{}),onCancel:T}),d==="error"&&e.jsxs(pe,{children:[e.jsxs(pa,{"data-testid":"buy-error",children:[e.jsx(xa,{src:fs,alt:"",width:64,height:80}),e.jsxs(ga,{children:[e.jsx("b",{children:a("cartCheckout.errorHeadline")})," ",a("cartCheckout.errorBody")]})]}),e.jsxs(ft,{children:[e.jsx(xe,{"data-variant":"outline",onClick:T,children:a("buyModal.cancel")}),e.jsx(xe,{"data-variant":"purple",onClick:c.onRetry??T,children:a("cartCheckout.tryAgain")})]})]})]})]})}function bs({stage:c,step:d,total:k,isSelfCustody:T}){const _=c==="reserving",F=k>0?Math.min(100,Math.round(d/k*100)):0,W=c==="awaiting-signature"?T?a("buyModal.confirmToContinue"):a("buyModal.completingTransaction"):c==="settling"?a("buyModal.completingTransaction"):a("cartCheckout.preparing");return e.jsxs(pe,{"data-processing":!0,children:[e.jsx(ma,{src:os,alt:"",width:61,height:61}),e.jsx(fa,{children:W}),_?e.jsxs(hs,{children:[e.jsx(rt,{"aria-hidden":!0,children:e.jsx(ot,{"data-step":!0,style:{width:`${F}%`}})}),k>1?e.jsxs(ps,{children:[d,"/",k]}):null]}):e.jsx(rt,{"aria-hidden":!0,children:e.jsx(ot,{})})]})}function vs({lines:c,shortfallCredits:d,packs:k,selectedPack:T,onSelectPack:_,onBuyPacks:F,onCancel:W}){const z=k.find(n=>n.id===T),me=c.reduce((n,I)=>n+(I.quantity??1),0);return e.jsxs(pe,{children:[e.jsxs(ya,{"data-testid":"nofunds-warning",children:[e.jsx(ba,{}),e.jsxs(va,{children:[e.jsx("b",{children:a("buyModal.insufficientFunds")})," ",a("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:a("buyModal.warningCreditsAmount",{count:Math.max(0,d)})})," ",a("buyModal.warningToPurchase",{count:me})]})]}),e.jsx(xs,{children:c.map(n=>{const I=n.quantity??1;return e.jsxs(Ca,{children:[e.jsx(wa,{children:n.item.thumbnail?e.jsx("img",{src:n.item.thumbnail,alt:""}):null}),e.jsxs(ja,{children:[e.jsxs("div",{children:[e.jsxs(ka,{title:n.item.name,children:[n.item.name||a("buyModal.itemFallback"),I>1?e.jsx(gs,{children:a("cartCheckout.qty",{count:I})}):null]}),n.item.creator?e.jsx($a,{address:n.item.creator}):null]}),e.jsxs(Sa,{children:[e.jsx(Ma,{}),e.jsx("span",{children:Z(n.priceCredits*I)})]})]})]},n.item.id)})}),e.jsx(Ta,{children:k.map(n=>{const I=n.id===T;return e.jsxs(Pa,{"data-testid":"credit-pack","data-on":I||void 0,onClick:()=>_(n.id),children:[e.jsx(za,{}),e.jsx(Aa,{children:Z(n.credits)}),e.jsxs(Ia,{children:["($",n.usd.toFixed(2),")"]})]},n.id)})}),e.jsxs(qa,{children:[e.jsxs(Ra,{children:[e.jsx(_a,{}),e.jsx("span",{children:Z((z==null?void 0:z.credits)??0)})]}),e.jsxs(Ba,{children:["$",((z==null?void 0:z.usd)??0).toFixed(2)]})]}),e.jsxs(ft,{children:[e.jsx(xe,{"data-variant":"outline",onClick:W,children:a("buyModal.cancel")}),e.jsx(xe,{"data-variant":"gradient",onClick:F,children:a("buyModal.buy")})]})]})}const{colors:o,gradients:yt,radius:K}=ee,bt="@media (max-width: 1080px)",S="@media (max-width: 880px)",dt=i.div`
61
+ `,fs="https://cdn.decentraland.org/@dcl/shop/0.1.0-30532715362.commit-8beef87/assets/buy-error-22UunaPC.png";function ys(c){const{phase:d,balanceCredits:k,onClose:T}=c,_=d==="processing",F=d==="error"?a("cartCheckout.errorTitle"):d==="nofunds"?a("cartCheckout.titleNoFunds"):d==="choose"?a("buyModal.choosePayment"):a("cartCheckout.titleBuy"),W=d==="processing";return e.jsxs(aa,{role:"dialog","aria-modal":"true","aria-label":a("cartCheckout.dialogAria"),children:[e.jsx(sa,{onClick:_?void 0:T,"aria-hidden":!0}),e.jsxs(na,{"data-tall":W||void 0,children:[e.jsxs(ia,{children:[e.jsxs(ra,{children:[e.jsx(oa,{children:F}),!_&&e.jsx(ca,{onClick:T,"aria-label":a("buyModal.close"),children:e.jsx(la,{})})]}),e.jsxs(da,{children:[e.jsx(ua,{children:d==="nofunds"?a("buyModal.dclBalance"):a("buyModal.myCreditsBalance")}),e.jsx(it,{}),e.jsx(ha,{children:Z(k)})]})]}),d==="choose"&&e.jsxs(pe,{children:[e.jsxs(ms,{children:[e.jsx("span",{children:a("cart.purchaseSummary")}),e.jsxs("strong",{children:[e.jsx(it,{}),Z(c.totalCredits??0)]})]}),e.jsx(gt,{options:c.options??[],totalCents:c.totalCents??0,onPay:c.onPay??(()=>{}),rateNote:(()=>{const z=mt(c.totalCents??0,c.totalManaWei??0n);return z!=null?a("buyModal.manaRate",{mana:z.toLocaleString("en",{maximumFractionDigits:2})}):null})()})]}),d==="processing"&&e.jsx(bs,{stage:c.stage??"reserving",step:c.step??1,total:c.total??1,isSelfCustody:!!c.isSelfCustody}),d==="nofunds"&&e.jsx(vs,{lines:c.lines??[],shortfallCredits:c.shortfallCredits??0,packs:c.packs??[],selectedPack:c.selectedPack??"",onSelectPack:c.onSelectPack??(()=>{}),onBuyPacks:c.onBuyPacks??(()=>{}),onCancel:T}),d==="error"&&e.jsxs(pe,{children:[e.jsxs(pa,{"data-testid":"buy-error",children:[e.jsx(xa,{src:fs,alt:"",width:64,height:80}),e.jsxs(ga,{children:[e.jsx("b",{children:a("cartCheckout.errorHeadline")})," ",a("cartCheckout.errorBody")]})]}),e.jsxs(ft,{children:[e.jsx(xe,{"data-variant":"outline",onClick:T,children:a("buyModal.cancel")}),e.jsx(xe,{"data-variant":"purple",onClick:c.onRetry??T,children:a("cartCheckout.tryAgain")})]})]})]})]})}function bs({stage:c,step:d,total:k,isSelfCustody:T}){const _=c==="reserving",F=k>0?Math.min(100,Math.round(d/k*100)):0,W=c==="awaiting-signature"?T?a("buyModal.confirmToContinue"):a("buyModal.completingTransaction"):c==="settling"?a("buyModal.completingTransaction"):a("cartCheckout.preparing");return e.jsxs(pe,{"data-processing":!0,children:[e.jsx(ma,{src:os,alt:"",width:61,height:61}),e.jsx(fa,{children:W}),_?e.jsxs(hs,{children:[e.jsx(rt,{"aria-hidden":!0,children:e.jsx(ot,{"data-step":!0,style:{width:`${F}%`}})}),k>1?e.jsxs(ps,{children:[d,"/",k]}):null]}):e.jsx(rt,{"aria-hidden":!0,children:e.jsx(ot,{})})]})}function vs({lines:c,shortfallCredits:d,packs:k,selectedPack:T,onSelectPack:_,onBuyPacks:F,onCancel:W}){const z=k.find(n=>n.id===T),me=c.reduce((n,I)=>n+(I.quantity??1),0);return e.jsxs(pe,{children:[e.jsxs(ya,{"data-testid":"nofunds-warning",children:[e.jsx(ba,{}),e.jsxs(va,{children:[e.jsx("b",{children:a("buyModal.insufficientFunds")})," ",a("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:a("buyModal.warningCreditsAmount",{count:Math.max(0,d)})})," ",a("buyModal.warningToPurchase",{count:me})]})]}),e.jsx(xs,{children:c.map(n=>{const I=n.quantity??1;return e.jsxs(Ca,{children:[e.jsx(wa,{children:n.item.thumbnail?e.jsx("img",{src:n.item.thumbnail,alt:""}):null}),e.jsxs(ja,{children:[e.jsxs("div",{children:[e.jsxs(ka,{title:n.item.name,children:[n.item.name||a("buyModal.itemFallback"),I>1?e.jsx(gs,{children:a("cartCheckout.qty",{count:I})}):null]}),n.item.creator?e.jsx($a,{address:n.item.creator}):null]}),e.jsxs(Sa,{children:[e.jsx(Ma,{}),e.jsx("span",{children:Z(n.priceCredits*I)})]})]})]},n.item.id)})}),e.jsx(Ta,{children:k.map(n=>{const I=n.id===T;return e.jsxs(Pa,{"data-testid":"credit-pack","data-on":I||void 0,onClick:()=>_(n.id),children:[e.jsx(za,{}),e.jsx(Aa,{children:Z(n.credits)}),e.jsxs(Ia,{children:["($",n.usd.toFixed(2),")"]})]},n.id)})}),e.jsxs(qa,{children:[e.jsxs(Ra,{children:[e.jsx(_a,{}),e.jsx("span",{children:Z((z==null?void 0:z.credits)??0)})]}),e.jsxs(Ba,{children:["$",((z==null?void 0:z.usd)??0).toFixed(2)]})]}),e.jsxs(ft,{children:[e.jsx(xe,{"data-variant":"outline",onClick:W,children:a("buyModal.cancel")}),e.jsx(xe,{"data-variant":"gradient",onClick:F,children:a("buyModal.buy")})]})]})}const{colors:o,gradients:yt,radius:K}=ee,bt="@media (max-width: 1080px)",S="@media (max-width: 880px)",dt=i.div`
62
62
  max-width: 1510px;
63
63
  margin: 0 auto;
64
64
 
@@ -1,4 +1,4 @@
1
- import{K as N,L as w,M as o,N as n,G as D,w as M}from"./index-CI7-G5Oy.js";import{r as U,j as g}from"./react-vyZjIDcS.js";import{g as z,a as E,c as I,b as K,s as v}from"./clsx-TVl4Fw6R.js";function F(r){return z("MuiCircularProgress",r)}E("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const G=["className","color","disableShrink","size","style","thickness","value","variant"];let l=r=>r,P,b,S,$;const t=44,L=M(P||(P=l`
1
+ import{K as N,L as w,M as o,N as n,G as D,w as M}from"./index-D7ZWH6NI.js";import{r as U,j as g}from"./react-vyZjIDcS.js";import{g as z,a as E,c as I,b as K,s as v}from"./clsx-BhtvxQSI.js";function F(r){return z("MuiCircularProgress",r)}E("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const G=["className","color","disableShrink","size","style","thickness","value","variant"];let l=r=>r,P,b,S,$;const t=44,L=M(P||(P=l`
2
2
  0% {
3
3
  transform: rotate(0deg);
4
4
  }
@@ -1,4 +1,4 @@
1
- import{j as e,r as m,e as Y,b as Z}from"./react-vyZjIDcS.js";import{t as v,s as c,ad as J,ae as z,I as X,d as a,c as ee,k as te,u as ae,l as re,e as oe,S as E,A as ie,af as se,ag as ne}from"./index-CI7-G5Oy.js";import{E as ce}from"./ErrorNotice-C6J8i5JJ.js";import{d as le,g as de,a as pe,P as xe,C as ue,b as me,c as ge,B as he,S as be,M as fe,A as je}from"./browseLayout.styles-Dn4E_hm9.js";import{u as ve}from"./useStore-B_HwVTSU.js";import{c as F,a as ye,F as Ce,d as we,P as Se,e as ke,H as Ae,S as Ne}from"./categories-C5Ash7Cl.js";import{L as $e}from"./LoadMore-Dwif0bmX.js";import{u as Pe}from"./useInfiniteGrid-CkvYLplF.js";import{G as Me}from"./grid.styles-Da_K81Vp.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CpLYx0ea.js";import"./intl-CBcMB1D2.js";const Re=c.section`
1
+ import{j as e,r as m,e as Y,b as Z}from"./react-vyZjIDcS.js";import{t as v,s as c,ad as J,ae as z,I as X,d as a,c as ee,k as te,u as ae,l as re,e as oe,S as E,A as ie,af as se,ag as ne}from"./index-D7ZWH6NI.js";import{E as ce}from"./ErrorNotice-rHvx0ML0.js";import{d as le,g as de,a as pe,P as xe,C as ue,b as me,c as ge,B as he,S as be,M as fe,A as je}from"./browseLayout.styles-QRB_0D0j.js";import{u as ve}from"./useStore-Bz1liw-O.js";import{c as F,a as ye,F as Ce,d as we,P as Se,e as ke,H as Ae,S as Ne}from"./categories-KNpvobx-.js";import{L as $e}from"./LoadMore-Tx57CQll.js";import{u as Pe}from"./useInfiniteGrid-Ca2LjQTz.js";import{G as Me}from"./grid.styles-BaK36ERu.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CpLYx0ea.js";import"./intl-CBcMB1D2.js";const Re=c.section`
2
2
  position: relative;
3
3
  border-radius: ${v.radius.card};
4
4
  overflow: hidden;
@@ -1,4 +1,4 @@
1
- import{j as t,r as v}from"./react-vyZjIDcS.js";import{s as e,t as o,d as g,y as k,H as j,b8 as C,e as G,w as Y,I as Q,k as X,g as W,C as B,a as Z,b9 as J,ba as F,A as q}from"./index-CI7-G5Oy.js";import{s as ee,h as H,A as U,g as K,r as te,m as ne,e as ae}from"./authorizations-B71vkYZi.js";import{i as ie}from"./errors-RMUk5IWt.js";import{E as oe}from"./ErrorNotice-C6J8i5JJ.js";import{a as se}from"./buy-CqNJMeic.js";import{d as re,f as ce}from"./trade-encoding-CaXvzcLt.js";import{s as de,M as le,E as pe}from"./sendMetaTransaction-zdWpVVA2.js";import{I as he,C as ue}from"./ethers-CpLYx0ea.js";const L="shop:resume_after_signin",xe=900*1e3;function rt(a){try{sessionStorage.setItem(L,JSON.stringify({...a,at:Date.now()}))}catch{}}function ct(a){let n;try{n=sessionStorage.getItem(L)}catch{return null}if(!n)return null;try{sessionStorage.removeItem(L)}catch{}let i;try{i=JSON.parse(n)}catch{return null}return!i||i.type!==a||typeof i.at!="number"||Date.now()-i.at>xe?null:i.type==="cart-checkout"?{type:"cart-checkout"}:{type:"item-buy",path:i.path}}function ge(a,n){return(a+n-1n)/n}function fe(a,n,i){return a<=0||n<=0?0n:a>=n?i:ge(i*BigInt(a),BigInt(n))}function dt(a){var m,f,w;const n=Number.isFinite(a.priceCents)?Math.max(0,Math.trunc(a.priceCents)):0,i=Number.isFinite(a.balanceCents)?Math.max(0,Math.trunc(a.balanceCents)):0,s=a.priceManaWei>0n?a.priceManaWei:0n,d=a.manaBalanceWei>0n?a.manaBalanceWei:0n;if(n<=0)return{options:[],preferred:null,manaShortfall:null};const c=[];if(i>=n&&c.push({method:"credits",creditsCents:n,manaWei:0n}),s>0n&&i>0&&i<n){const l=n-i,b=fe(l,n,s);d>=b&&c.push({method:"combined",creditsCents:i,manaWei:b})}s>0n&&d>=s&&c.push({method:"mana",creditsCents:0,manaWei:s});const p=((m=c.find(l=>l.method==="credits"))==null?void 0:m.method)??((f=c.find(l=>l.method==="combined"))==null?void 0:f.method)??((w=c.find(l=>l.method==="mana"))==null?void 0:w.method)??null,y=!c.some(l=>l.method==="mana"||l.method==="combined")&&s>0n&&d>0n?{manaWei:d,manaCents:me(d,n,s),priceCents:n}:null;return{options:c,preferred:p,manaShortfall:y}}function me(a,n,i){return Number(a*BigInt(n)/i)}function lt(a,n){let i=Number.isFinite(n)?Math.max(0,Math.trunc(n)):0;return a.map(s=>{const d=Number.isFinite(s)?Math.max(0,Math.trunc(s)):0,c=Math.min(d,i);return i-=c,c})}function z(a){return Number.isFinite(a)?Math.max(0,a)/10:0}function pt(a,n){return a.options.find(i=>i.method===n)??null}function ht(a,n){if(!Number.isFinite(a)||a<=0||n<=0n)return null;const i=a/10;return Number(n)/1e18/i}const T="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%201'%3e%3cpath%20id='Vector'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12%202L22%2012L12%2022L2%2012L12%202ZM12%204.8L19.2%2012L12%2019.2L4.8%2012L12%204.8ZM12%2015.6C12.9548%2015.6001%2013.8705%2015.2209%2014.5457%2014.5459C15.2209%2013.8708%2015.6003%2012.9552%2015.6004%2012.0004C15.6005%2011.0456%2015.2213%2010.1299%2014.5463%209.45471C13.8712%208.7795%2012.9556%208.40011%2012.0008%208.4C11.0461%208.4%2010.1304%208.77928%209.45525%209.45442C8.78012%2010.1295%208.40083%2011.0452%208.40083%2012C8.40083%2012.9548%208.78012%2013.8705%209.45525%2014.5456C10.1304%2015.2207%2011.0461%2015.6%2012.0008%2015.6H12Z'%20fill='white'/%3e%3cg%20id='Rectangle%201'%3e%3c/g%3e%3c/g%3e%3c/svg%3e",be=e.div`
1
+ import{j as t,r as v}from"./react-vyZjIDcS.js";import{s as e,t as o,d as g,y as k,H as j,b8 as C,e as G,w as Y,I as Q,k as X,g as W,C as B,a as Z,b9 as J,ba as F,A as q}from"./index-D7ZWH6NI.js";import{s as ee,h as H,A as U,g as K,r as te,m as ne,e as ae}from"./authorizations-CP2LPBVO.js";import{i as ie}from"./errors-Xoj9Pf4j.js";import{E as oe}from"./ErrorNotice-rHvx0ML0.js";import{a as se}from"./buy-5mCWsIPg.js";import{d as re,f as ce}from"./trade-encoding-B9tOaOWk.js";import{s as de,M as le,E as pe}from"./sendMetaTransaction-LxU_36sg.js";import{I as he,C as ue}from"./ethers-CpLYx0ea.js";const L="shop:resume_after_signin",xe=900*1e3;function rt(a){try{sessionStorage.setItem(L,JSON.stringify({...a,at:Date.now()}))}catch{}}function ct(a){let n;try{n=sessionStorage.getItem(L)}catch{return null}if(!n)return null;try{sessionStorage.removeItem(L)}catch{}let i;try{i=JSON.parse(n)}catch{return null}return!i||i.type!==a||typeof i.at!="number"||Date.now()-i.at>xe?null:i.type==="cart-checkout"?{type:"cart-checkout"}:{type:"item-buy",path:i.path}}function ge(a,n){return(a+n-1n)/n}function fe(a,n,i){return a<=0||n<=0?0n:a>=n?i:ge(i*BigInt(a),BigInt(n))}function dt(a){var m,f,w;const n=Number.isFinite(a.priceCents)?Math.max(0,Math.trunc(a.priceCents)):0,i=Number.isFinite(a.balanceCents)?Math.max(0,Math.trunc(a.balanceCents)):0,s=a.priceManaWei>0n?a.priceManaWei:0n,d=a.manaBalanceWei>0n?a.manaBalanceWei:0n;if(n<=0)return{options:[],preferred:null,manaShortfall:null};const c=[];if(i>=n&&c.push({method:"credits",creditsCents:n,manaWei:0n}),s>0n&&i>0&&i<n){const l=n-i,b=fe(l,n,s);d>=b&&c.push({method:"combined",creditsCents:i,manaWei:b})}s>0n&&d>=s&&c.push({method:"mana",creditsCents:0,manaWei:s});const p=((m=c.find(l=>l.method==="credits"))==null?void 0:m.method)??((f=c.find(l=>l.method==="combined"))==null?void 0:f.method)??((w=c.find(l=>l.method==="mana"))==null?void 0:w.method)??null,y=!c.some(l=>l.method==="mana"||l.method==="combined")&&s>0n&&d>0n?{manaWei:d,manaCents:me(d,n,s),priceCents:n}:null;return{options:c,preferred:p,manaShortfall:y}}function me(a,n,i){return Number(a*BigInt(n)/i)}function lt(a,n){let i=Number.isFinite(n)?Math.max(0,Math.trunc(n)):0;return a.map(s=>{const d=Number.isFinite(s)?Math.max(0,Math.trunc(s)):0,c=Math.min(d,i);return i-=c,c})}function z(a){return Number.isFinite(a)?Math.max(0,a)/10:0}function pt(a,n){return a.options.find(i=>i.method===n)??null}function ht(a,n){if(!Number.isFinite(a)||a<=0||n<=0n)return null;const i=a/10;return Number(n)/1e18/i}const T="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%201'%3e%3cpath%20id='Vector'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12%202L22%2012L12%2022L2%2012L12%202ZM12%204.8L19.2%2012L12%2019.2L4.8%2012L12%204.8ZM12%2015.6C12.9548%2015.6001%2013.8705%2015.2209%2014.5457%2014.5459C15.2209%2013.8708%2015.6003%2012.9552%2015.6004%2012.0004C15.6005%2011.0456%2015.2213%2010.1299%2014.5463%209.45471C13.8712%208.7795%2012.9556%208.40011%2012.0008%208.4C11.0461%208.4%2010.1304%208.77928%209.45525%209.45442C8.78012%2010.1295%208.40083%2011.0452%208.40083%2012C8.40083%2012.9548%208.78012%2013.8705%209.45525%2014.5456C10.1304%2015.2207%2011.0461%2015.6%2012.0008%2015.6H12Z'%20fill='white'/%3e%3cg%20id='Rectangle%201'%3e%3c/g%3e%3c/g%3e%3c/svg%3e",be=e.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 12px;
@@ -1,4 +1,4 @@
1
- import{b as Y,j as e,L as ue,e as fe,u as be,r as y}from"./react-vyZjIDcS.js";import{t as Z,aw as we,ax as R,ay as _,s as a,az as je,F as ve,aA as Ce,d as t,aB as W,B as ye,G as q,ad as J,m as $e,ae as Q,I as T,c as ke,l as Ne,S,e as Pe,A as Se,av as Le,aC as Ae}from"./index-CI7-G5Oy.js";import{d as Me,g as ze,a as Fe,P as Be,C as Ee,b as Ie,c as Re,A as _e,B as We,S as Te,M as Ge,e as He,f as Ue}from"./browseLayout.styles-Dn4E_hm9.js";import{u as De,L as Ke}from"./useStore-B_HwVTSU.js";import{c as G,a as Oe,F as Ve,d as Ye,P as Ze,e as qe,H as Je,S as Qe}from"./categories-C5Ash7Cl.js";import{L as H}from"./LoadMore-Dwif0bmX.js";import{u as U}from"./useInfiniteGrid-CkvYLplF.js";import{E as D}from"./ErrorNotice-C6J8i5JJ.js";import{G as K}from"./grid.styles-Da_K81Vp.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CpLYx0ea.js";import"./intl-CBcMB1D2.js";const{colors:m,radius:X,media:Xe}=Z,et=a.article`
1
+ import{b as Y,j as e,L as ue,e as fe,u as be,r as y}from"./react-vyZjIDcS.js";import{t as Z,aw as we,ax as R,ay as _,s as a,az as je,F as ve,aA as Ce,d as t,aB as W,B as ye,G as q,ad as J,m as $e,ae as Q,I as T,c as ke,l as Ne,S,e as Pe,A as Se,av as Le,aC as Ae}from"./index-D7ZWH6NI.js";import{d as Me,g as ze,a as Fe,P as Be,C as Ee,b as Ie,c as Re,A as _e,B as We,S as Te,M as Ge,e as He,f as Ue}from"./browseLayout.styles-QRB_0D0j.js";import{u as De,L as Ke}from"./useStore-Bz1liw-O.js";import{c as G,a as Oe,F as Ve,d as Ye,P as Ze,e as qe,H as Je,S as Qe}from"./categories-KNpvobx-.js";import{L as H}from"./LoadMore-Tx57CQll.js";import{u as U}from"./useInfiniteGrid-Ca2LjQTz.js";import{E as D}from"./ErrorNotice-rHvx0ML0.js";import{G as K}from"./grid.styles-BaK36ERu.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CpLYx0ea.js";import"./intl-CBcMB1D2.js";const{colors:m,radius:X,media:Xe}=Z,et=a.article`
2
2
  height: 300px;
3
3
  background: ${m.bg};
4
4
  border-radius: ${X.card};
@@ -1 +1 @@
1
- import{j as r}from"./react-vyZjIDcS.js";import{I as i}from"./index-CI7-G5Oy.js";function a({message:e,className:o,testId:t}){return e?r.jsxs("p",{className:o?`error-notice ${o}`:"error-notice","data-testid":t,role:"alert",children:[r.jsx(i,{name:"alert",className:"error-notice__ico",size:18}),r.jsx("span",{className:"error-notice__msg",children:e})]}):null}export{a as E};
1
+ import{j as r}from"./react-vyZjIDcS.js";import{I as i}from"./index-D7ZWH6NI.js";function a({message:e,className:o,testId:t}){return e?r.jsxs("p",{className:o?`error-notice ${o}`:"error-notice","data-testid":t,role:"alert",children:[r.jsx(i,{name:"alert",className:"error-notice__ico",size:18}),r.jsx("span",{className:"error-notice__msg",children:e})]}):null}export{a as E};
@@ -1 +1 @@
1
- import{C as l,E as w,b as E,S as A,d as k,O as U,N as P,g as f,B as x,e as N,i as I,p as L}from"./W3MFrameProviderSingleton-BcXglSXU.js";import{g as T,a as W,f as b,b as _,c as v}from"./index-xgCPilcR.js";const D=0,C={paymentAsset:null,amount:null,tokenAmount:0,priceLoading:!1,error:null,exchanges:[],isLoading:!1,currentPayment:void 0,isPaymentInProgress:!1,paymentId:"",assets:[]},e=L(C),m={state:e,subscribe(t){return I(e,()=>t(e))},subscribeKey(t,n){return N(e,t,n)},resetState(){Object.assign(e,{...C})},async getAssetsForNetwork(t){const n=v(t),s=await m.getAssetsImageAndPrice(n),r=n.map(a=>{var c,o,p,y;const u=a.asset==="native"?f():`${a.network}:${a.asset}`,i=s.find(S=>{var g,d,h;return((h=(d=(g=S.fungibles)==null?void 0:g[0])==null?void 0:d.address)==null?void 0:h.toLowerCase())===u.toLowerCase()});return{...a,price:((o=(c=i==null?void 0:i.fungibles)==null?void 0:c[0])==null?void 0:o.price)||1,metadata:{...a.metadata,iconUrl:(y=(p=i==null?void 0:i.fungibles)==null?void 0:p[0])==null?void 0:y.iconUrl}}});return e.assets=r,r},async getAssetsImageAndPrice(t){const n=t.map(r=>r.asset==="native"?f():`${r.network}:${r.asset}`);return await Promise.all(n.map(r=>x.fetchTokenPrice({addresses:[r]})))},getTokenAmount(){var s;if(!((s=e==null?void 0:e.paymentAsset)!=null&&s.price))throw new Error("Cannot get token price");const t=P.bigNumber(e.amount??0).round(8),n=P.bigNumber(e.paymentAsset.price).round(8);return t.div(n).round(8).toNumber()},setAmount(t){var n;e.amount=t,(n=e.paymentAsset)!=null&&n.price&&(e.tokenAmount=m.getTokenAmount())},setPaymentAsset(t){e.paymentAsset=t},isPayWithExchangeEnabled(){var t;return(t=U.state.remoteFeatures)==null?void 0:t.payWithExchange},isPayWithExchangeSupported(){return m.isPayWithExchangeEnabled()&&l.state.activeCaipNetwork&&k.PAY_WITH_EXCHANGE_SUPPORTED_CHAIN_NAMESPACES.includes(l.state.activeCaipNetwork.chainNamespace)},async fetchExchanges(){var t;try{const n=m.isPayWithExchangeSupported();if(!e.paymentAsset||!n){e.exchanges=[],e.isLoading=!1;return}e.isLoading=!0;const s=await _({page:D,asset:b(e.paymentAsset.network,e.paymentAsset.asset),amount:((t=e.amount)==null?void 0:t.toString())??"0"});e.exchanges=s.exchanges.slice(0,2)}catch{throw A.showError("Unable to get exchanges"),new Error("Unable to get exchanges")}finally{e.isLoading=!1}},async getPayUrl(t,n){try{const s=Number(n.amount),r=await W({exchangeId:t,asset:b(n.network,n.asset),amount:s.toString(),recipient:`${n.network}:${n.recipient}`});return w.sendEvent({type:"track",event:"PAY_EXCHANGE_SELECTED",properties:{exchange:{id:t},configuration:{network:n.network,asset:n.asset,recipient:n.recipient,amount:s},currentPayment:{type:"exchange",exchangeId:t},source:"fund-from-exchange",headless:!1}}),r}catch(s){throw s instanceof Error&&s.message.includes("is not supported")?new Error("Asset not supported"):new Error(s.message)}},async handlePayWithExchange(t){var n;try{const s=(n=l.getAccountData())==null?void 0:n.address;if(!s)throw new Error("No account connected");if(!e.paymentAsset)throw new Error("No payment asset selected");const r=E.returnOpenHref("","popupWindow","scrollbar=yes,width=480,height=720");if(!r)throw new Error("Could not create popup window");e.isPaymentInProgress=!0,e.paymentId=crypto.randomUUID(),e.currentPayment={type:"exchange",exchangeId:t};const{network:a,asset:u}=e.paymentAsset,i={network:a,asset:u,amount:e.tokenAmount,recipient:s},c=await m.getPayUrl(t,i);if(!c){try{r.close()}catch(o){console.error("Unable to close popup window",o)}throw new Error("Unable to initiate payment")}e.currentPayment.sessionId=c.sessionId,e.currentPayment.status="IN_PROGRESS",e.currentPayment.exchangeId=t,r.location.href=c.url}catch{e.error="Unable to initiate payment",A.showError(e.error)}},async waitUntilComplete({exchangeId:t,sessionId:n,paymentId:s,retries:r=20}){const a=await m.getBuyStatus(t,n,s);if(a.status==="SUCCESS"||a.status==="FAILED")return a;if(r===0)throw new Error("Unable to get deposit status");return await new Promise(u=>{setTimeout(u,5e3)}),m.waitUntilComplete({exchangeId:t,sessionId:n,paymentId:s,retries:r-1})},async getBuyStatus(t,n,s){var r,a,u,i,c;try{if(!e.currentPayment)throw new Error("No current payment");const o=await T({sessionId:n,exchangeId:t});if(e.currentPayment.status=o.status,o.status==="SUCCESS"||o.status==="FAILED"){const p=(r=l.getAccountData())==null?void 0:r.address;e.currentPayment.result=o.txHash,e.isPaymentInProgress=!1,w.sendEvent({type:"track",event:o.status==="SUCCESS"?"PAY_SUCCESS":"PAY_ERROR",properties:{message:o.status==="FAILED"?E.parseError(e.error):void 0,source:"fund-from-exchange",paymentId:s,configuration:{network:((a=e.paymentAsset)==null?void 0:a.network)||"",asset:((u=e.paymentAsset)==null?void 0:u.asset)||"",recipient:p||"",amount:e.amount??0},currentPayment:{type:"exchange",exchangeId:(i=e.currentPayment)==null?void 0:i.exchangeId,sessionId:(c=e.currentPayment)==null?void 0:c.sessionId,result:o.txHash}}})}return o}catch{return{status:"UNKNOWN",txHash:""}}},reset(){e.currentPayment=void 0,e.isPaymentInProgress=!1,e.paymentId="",e.paymentAsset=null,e.amount=0,e.tokenAmount=0,e.priceLoading=!1,e.error=null,e.exchanges=[],e.isLoading=!1}};export{m as E};
1
+ import{C as l,E as w,b as E,S as A,d as k,O as U,N as P,g as f,B as x,e as N,i as I,p as L}from"./W3MFrameProviderSingleton-Cu6jVXFH.js";import{g as T,a as W,f as b,b as _,c as v}from"./index-BFQw-UeC.js";const D=0,C={paymentAsset:null,amount:null,tokenAmount:0,priceLoading:!1,error:null,exchanges:[],isLoading:!1,currentPayment:void 0,isPaymentInProgress:!1,paymentId:"",assets:[]},e=L(C),m={state:e,subscribe(t){return I(e,()=>t(e))},subscribeKey(t,n){return N(e,t,n)},resetState(){Object.assign(e,{...C})},async getAssetsForNetwork(t){const n=v(t),s=await m.getAssetsImageAndPrice(n),r=n.map(a=>{var c,o,p,y;const u=a.asset==="native"?f():`${a.network}:${a.asset}`,i=s.find(S=>{var g,d,h;return((h=(d=(g=S.fungibles)==null?void 0:g[0])==null?void 0:d.address)==null?void 0:h.toLowerCase())===u.toLowerCase()});return{...a,price:((o=(c=i==null?void 0:i.fungibles)==null?void 0:c[0])==null?void 0:o.price)||1,metadata:{...a.metadata,iconUrl:(y=(p=i==null?void 0:i.fungibles)==null?void 0:p[0])==null?void 0:y.iconUrl}}});return e.assets=r,r},async getAssetsImageAndPrice(t){const n=t.map(r=>r.asset==="native"?f():`${r.network}:${r.asset}`);return await Promise.all(n.map(r=>x.fetchTokenPrice({addresses:[r]})))},getTokenAmount(){var s;if(!((s=e==null?void 0:e.paymentAsset)!=null&&s.price))throw new Error("Cannot get token price");const t=P.bigNumber(e.amount??0).round(8),n=P.bigNumber(e.paymentAsset.price).round(8);return t.div(n).round(8).toNumber()},setAmount(t){var n;e.amount=t,(n=e.paymentAsset)!=null&&n.price&&(e.tokenAmount=m.getTokenAmount())},setPaymentAsset(t){e.paymentAsset=t},isPayWithExchangeEnabled(){var t;return(t=U.state.remoteFeatures)==null?void 0:t.payWithExchange},isPayWithExchangeSupported(){return m.isPayWithExchangeEnabled()&&l.state.activeCaipNetwork&&k.PAY_WITH_EXCHANGE_SUPPORTED_CHAIN_NAMESPACES.includes(l.state.activeCaipNetwork.chainNamespace)},async fetchExchanges(){var t;try{const n=m.isPayWithExchangeSupported();if(!e.paymentAsset||!n){e.exchanges=[],e.isLoading=!1;return}e.isLoading=!0;const s=await _({page:D,asset:b(e.paymentAsset.network,e.paymentAsset.asset),amount:((t=e.amount)==null?void 0:t.toString())??"0"});e.exchanges=s.exchanges.slice(0,2)}catch{throw A.showError("Unable to get exchanges"),new Error("Unable to get exchanges")}finally{e.isLoading=!1}},async getPayUrl(t,n){try{const s=Number(n.amount),r=await W({exchangeId:t,asset:b(n.network,n.asset),amount:s.toString(),recipient:`${n.network}:${n.recipient}`});return w.sendEvent({type:"track",event:"PAY_EXCHANGE_SELECTED",properties:{exchange:{id:t},configuration:{network:n.network,asset:n.asset,recipient:n.recipient,amount:s},currentPayment:{type:"exchange",exchangeId:t},source:"fund-from-exchange",headless:!1}}),r}catch(s){throw s instanceof Error&&s.message.includes("is not supported")?new Error("Asset not supported"):new Error(s.message)}},async handlePayWithExchange(t){var n;try{const s=(n=l.getAccountData())==null?void 0:n.address;if(!s)throw new Error("No account connected");if(!e.paymentAsset)throw new Error("No payment asset selected");const r=E.returnOpenHref("","popupWindow","scrollbar=yes,width=480,height=720");if(!r)throw new Error("Could not create popup window");e.isPaymentInProgress=!0,e.paymentId=crypto.randomUUID(),e.currentPayment={type:"exchange",exchangeId:t};const{network:a,asset:u}=e.paymentAsset,i={network:a,asset:u,amount:e.tokenAmount,recipient:s},c=await m.getPayUrl(t,i);if(!c){try{r.close()}catch(o){console.error("Unable to close popup window",o)}throw new Error("Unable to initiate payment")}e.currentPayment.sessionId=c.sessionId,e.currentPayment.status="IN_PROGRESS",e.currentPayment.exchangeId=t,r.location.href=c.url}catch{e.error="Unable to initiate payment",A.showError(e.error)}},async waitUntilComplete({exchangeId:t,sessionId:n,paymentId:s,retries:r=20}){const a=await m.getBuyStatus(t,n,s);if(a.status==="SUCCESS"||a.status==="FAILED")return a;if(r===0)throw new Error("Unable to get deposit status");return await new Promise(u=>{setTimeout(u,5e3)}),m.waitUntilComplete({exchangeId:t,sessionId:n,paymentId:s,retries:r-1})},async getBuyStatus(t,n,s){var r,a,u,i,c;try{if(!e.currentPayment)throw new Error("No current payment");const o=await T({sessionId:n,exchangeId:t});if(e.currentPayment.status=o.status,o.status==="SUCCESS"||o.status==="FAILED"){const p=(r=l.getAccountData())==null?void 0:r.address;e.currentPayment.result=o.txHash,e.isPaymentInProgress=!1,w.sendEvent({type:"track",event:o.status==="SUCCESS"?"PAY_SUCCESS":"PAY_ERROR",properties:{message:o.status==="FAILED"?E.parseError(e.error):void 0,source:"fund-from-exchange",paymentId:s,configuration:{network:((a=e.paymentAsset)==null?void 0:a.network)||"",asset:((u=e.paymentAsset)==null?void 0:u.asset)||"",recipient:p||"",amount:e.amount??0},currentPayment:{type:"exchange",exchangeId:(i=e.currentPayment)==null?void 0:i.exchangeId,sessionId:(c=e.currentPayment)==null?void 0:c.sessionId,result:o.txHash}}})}return o}catch{return{status:"UNKNOWN",txHash:""}}},reset(){e.currentPayment=void 0,e.isPaymentInProgress=!1,e.paymentId="",e.paymentAsset=null,e.amount=0,e.tokenAmount=0,e.priceLoading=!1,e.error=null,e.exchanges=[],e.isLoading=!1}};export{m as E};
@@ -1,4 +1,4 @@
1
- import{b as pe,u as xe,r as l,j as t}from"./react-vyZjIDcS.js";import{s as i,t as e,w as E,l as ue,d as r,e as p,m as he,D as ge,an as g,al as fe,k as G,au as U,I as ee,y as te,aM as me}from"./index-CI7-G5Oy.js";import{R as N}from"./resume-buy-Bf0zIH7y.js";import{u as be,p as we,R as ye,c as ke,i as Ce}from"./useCreditPacks-DLBz56_d.js";import{l as H}from"./loader-logo-BzY9EKdC.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CpLYx0ea.js";import"./intl-CBcMB1D2.js";import"./mana-convert-DV2llJXe.js";const S="https://cdn.decentraland.org/@dcl/shop/0.1.0-30532008194.commit-6986abb/assets/pack-coins-BDh1ZDbh.webp",ie="https://cdn.decentraland.org/@dcl/shop/0.1.0-30532008194.commit-6986abb/assets/pack-stacks-D-V2jSHW.webp",re="https://cdn.decentraland.org/@dcl/shop/0.1.0-30532008194.commit-6986abb/assets/pack-chest-BX_j84xW.webp",je="https://cdn.decentraland.org/@dcl/shop/0.1.0-30532008194.commit-6986abb/assets/credit-coin-CmcTCd5i.webp",$e="data:image/svg+xml,%3csvg%20width='60'%20height='60'%20viewBox='0%200%2060%2060'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='60'%20height='60'%20rx='30'%20fill='%2334CE77'/%3e%3cpath%20d='M21.6583%2046.1067L11.4656%2036.0591C10.1688%2034.829%2010.1905%2032.7207%2011.4769%2031.4622L13.6868%2029.3591C14.9732%2028.1006%2017.1615%2028.1058%2018.4582%2029.3359L23.8747%2034.6197L41.9704%2015.6527C43.2568%2014.3942%2045.4291%2014.2093%2046.7258%2015.4394L48.8765%2017.3628C50.1732%2018.5929%2050.3491%2020.6844%2049.0626%2021.9429L26.6112%2045.8766C25.1433%2047.342%2022.955%2047.3368%2021.6583%2046.1067Z'%20fill='%23FCFCFC'/%3e%3c/svg%3e",ve="https://cdn.decentraland.org/@dcl/shop/0.1.0-30532008194.commit-6986abb/assets/packs-backdrop-BcXiUPeP.webp",D="linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0)",Se=i.div`
1
+ import{b as pe,u as xe,r as l,j as t}from"./react-vyZjIDcS.js";import{s as i,t as e,w as E,l as ue,d as r,e as p,m as he,D as ge,an as g,al as fe,k as G,au as U,I as ee,y as te,aM as me}from"./index-D7ZWH6NI.js";import{R as N}from"./resume-buy-Bf0zIH7y.js";import{u as be,p as we,R as ye,c as ke,i as Ce}from"./useCreditPacks-CWKaLN_B.js";import{l as H}from"./loader-logo-BzY9EKdC.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CpLYx0ea.js";import"./intl-CBcMB1D2.js";import"./mana-convert-CTkOJWok.js";const S="https://cdn.decentraland.org/@dcl/shop/0.1.0-30532715362.commit-8beef87/assets/pack-coins-BDh1ZDbh.webp",ie="https://cdn.decentraland.org/@dcl/shop/0.1.0-30532715362.commit-8beef87/assets/pack-stacks-D-V2jSHW.webp",re="https://cdn.decentraland.org/@dcl/shop/0.1.0-30532715362.commit-8beef87/assets/pack-chest-BX_j84xW.webp",je="https://cdn.decentraland.org/@dcl/shop/0.1.0-30532715362.commit-8beef87/assets/credit-coin-CmcTCd5i.webp",$e="data:image/svg+xml,%3csvg%20width='60'%20height='60'%20viewBox='0%200%2060%2060'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='60'%20height='60'%20rx='30'%20fill='%2334CE77'/%3e%3cpath%20d='M21.6583%2046.1067L11.4656%2036.0591C10.1688%2034.829%2010.1905%2032.7207%2011.4769%2031.4622L13.6868%2029.3591C14.9732%2028.1006%2017.1615%2028.1058%2018.4582%2029.3359L23.8747%2034.6197L41.9704%2015.6527C43.2568%2014.3942%2045.4291%2014.2093%2046.7258%2015.4394L48.8765%2017.3628C50.1732%2018.5929%2050.3491%2020.6844%2049.0626%2021.9429L26.6112%2045.8766C25.1433%2047.342%2022.955%2047.3368%2021.6583%2046.1067Z'%20fill='%23FCFCFC'/%3e%3c/svg%3e",ve="https://cdn.decentraland.org/@dcl/shop/0.1.0-30532715362.commit-8beef87/assets/packs-backdrop-BcXiUPeP.webp",D="linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0)",Se=i.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 24px;
@@ -1,4 +1,4 @@
1
- import{i as f,b as h}from"./lit-element-B3y9oplH.js";import{n as m}from"./class-map-CxwNmq0D.js";import{c as p}from"./index-CuRtPQEp.js";import{d as g,r as v}from"./index-xgCPilcR.js";import{C as c}from"./ConstantsUtil-Dfwpy1eP.js";import{R as $,O as u}from"./W3MFrameProviderSingleton-BcXglSXU.js";import{au as y}from"./NetworkUtil-HlUKXKcF.js";const b=g`
1
+ import{i as f,b as h}from"./lit-element-B3y9oplH.js";import{n as m}from"./class-map-CxwNmq0D.js";import{c as p}from"./index-wETBOgA7.js";import{d as g,r as v}from"./index-BFQw-UeC.js";import{C as c}from"./ConstantsUtil-Dfwpy1eP.js";import{R as $,O as u}from"./W3MFrameProviderSingleton-Cu6jVXFH.js";import{au as y}from"./NetworkUtil-HlUKXKcF.js";const b=g`
2
2
  :host {
3
3
  display: flex;
4
4
  justify-content: center;
@@ -1,4 +1,4 @@
1
- import{j as e,b as ee,r as h,L as te}from"./react-vyZjIDcS.js";import{t as S,s as t,w as ie,x as se,d as i,e as R,B as L,y as z,an as ne,aL as K,k as W,l as re,m as oe,D as ae,u as de,E as ce}from"./index-CI7-G5Oy.js";import{i as le,R as pe,f as ge}from"./import-0QitgW4n.js";import{u as xe}from"./useSecondarySales-DoB0_ije.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CpLYx0ea.js";import"./intl-CBcMB1D2.js";import"./buy-CqNJMeic.js";import"./authorizations-B71vkYZi.js";import"./sendMetaTransaction-zdWpVVA2.js";import"./trade-encoding-CaXvzcLt.js";import"./mana-rate-DMPR7xGG.js";import"./mana-convert-DV2llJXe.js";function U({size:o=12,...w}){return e.jsx("svg",{viewBox:"0 0 20 20",width:o,height:o,fill:"none","aria-hidden":!0,focusable:"false",...w,children:e.jsx("path",{d:"M5 10.5l3 3 7-7.5",stroke:"#fff",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round"})})}const{colors:M,radius:me,z:ue}=S,he=ie`
1
+ import{j as e,b as ee,r as h,L as te}from"./react-vyZjIDcS.js";import{t as S,s as t,w as ie,x as se,d as i,e as R,B as L,y as z,an as ne,aL as K,k as W,l as re,m as oe,D as ae,u as de,E as ce}from"./index-D7ZWH6NI.js";import{i as le,R as pe,f as ge}from"./import-BGqRXoMi.js";import{u as xe}from"./useSecondarySales-DAN8M0aA.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CpLYx0ea.js";import"./intl-CBcMB1D2.js";import"./buy-5mCWsIPg.js";import"./authorizations-CP2LPBVO.js";import"./sendMetaTransaction-LxU_36sg.js";import"./trade-encoding-B9tOaOWk.js";import"./mana-rate-B3jNC9WL.js";import"./mana-convert-CTkOJWok.js";function U({size:o=12,...w}){return e.jsx("svg",{viewBox:"0 0 20 20",width:o,height:o,fill:"none","aria-hidden":!0,focusable:"false",...w,children:e.jsx("path",{d:"M5 10.5l3 3 7-7.5",stroke:"#fff",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round"})})}const{colors:M,radius:me,z:ue}=S,he=ie`
2
2
  0% {
3
3
  transform: scale(0);
4
4
  opacity: 0;
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-IpXUe6yn.js","assets/react-vyZjIDcS.js","assets/dcl-schemas-BICTSpB5.js","assets/index-CI7-G5Oy.js","assets/sentry-B35L1FdR.js","assets/ethers-CpLYx0ea.js","assets/intl-CBcMB1D2.js","assets/index-YUVIXaKh.css","assets/createSvgIcon-D7_Tfkk2.js","assets/clsx-TVl4Fw6R.js","assets/emotion-styled.browser.esm-BrUVH94k.js","assets/CircularProgress-DS_zErb1.js","assets/index-BVBprbPq.js","assets/useTheme-Gc9pyKB2.js","assets/getThemeProps-C8hygmDf.js"])))=>i.map(i=>d[i]);
2
- var Hc=Object.defineProperty;var zc=(n,a,t)=>a in n?Hc(n,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[a]=t;var W=(n,a,t)=>zc(n,typeof a!="symbol"?a+"":a,t);import{r as v,d as qc,j as s,b as Wt,l as us,R as M,h as Qc,e as Kc,a as Vc,L as Uc}from"./react-vyZjIDcS.js";import{s as m,t as d,d as x,I as J,b9 as Xc,y as _e,H as Ke,e as vt,z as ro,b8 as Rr,m as Ot,ai as ps,aj as Gc,D as Bt,ap as Jc,Y as fs,Z as rr,aq as oa,ar as $e,an as le,au as Xe,at,bt as Zc,as as Lr,k as Ge,c as At,g as ia,a as el,C as hs,x as tl,u as we,ad as br,n as vr,ae as ma,aL as Gt,p as ms,E as _n,ag as gs,bu as nl,B as Pn,G as In,bv as xs,aM as ao,aN as rl,f as ys,_ as Fr,w as al,ah as Dn,bw as ol,bx as il,by as sl,bz as cl,bA as ll,bB as dl,bC as bs,bD as ul,bE as pl,b as vs,bF as fl,bG as hl,bH as ml,bI as gl,F as xl,bJ as yl,O as oo,bK as bl,bL as vl,bM as wl,bN as kl,bO as Dl,aD as Cl,l as Sl,bP as Ml,bQ as _l,bR as Pl,bS as io,af as Il,bT as jl,bU as El,bV as Tl,bW as $l,bX as Nl,bY as Ol}from"./index-CI7-G5Oy.js";import{d as Re,a as so}from"./dcl-schemas-BICTSpB5.js";import{$ as Yr,m as Al,K as Rl,V as Ll,Q as ws,R as Fl,M as Yl,S as Wl,C as Bl,H as Hl,a as zl,T as ql,X as Ql,b as Kl,B as Vl,c as Ul,d as Xl,e as Gl,f as Qt,j as Yn,k as Kt,W as Jl,p as Zl,q as ed,P as td,x as nd,y as rd,z as ad,D as od,E as id,F as sd,G as cd,I as ld,J as dd,L as ud,l as pd,n as fd,o as hd,a0 as md,a1 as gd,A as xd,r as yd,s as bd,t as vd,u as wd,v as kd,w as Dd,a2 as Cd,a3 as Sd,a4 as Md,N as _d,O as Pd,U as Id}from"./CollectionCarousel-BS_-U2pS.js";import{a as ar,t as jd,c as Ed}from"./buy-CqNJMeic.js";import{f as Td}from"./builder-eGBIg94P.js";import{u as $d,M as Nd,l as Od,c as Ad}from"./useCreditPacks-DLBz56_d.js";import{r as Rd}from"./mana-rate-DMPR7xGG.js";import{i as ks,f as Ds,n as Ld,j as Fd,c as co,g as Cs,e as Yd,r as Wd,m as Bd}from"./authorizations-B71vkYZi.js";import{a as Ss,w as Ms,S as _s,G as Ps}from"./buy-gasless-DwHlvX9I.js";import{R as lo}from"./resume-buy-Bf0zIH7y.js";import{a as Hd,f as yt,i as en}from"./errors-RMUk5IWt.js";import{E as ut}from"./ErrorNotice-C6J8i5JJ.js";import{l as zd}from"./loader-logo-BzY9EKdC.js";import{C as qd}from"./CircularProgress-DS_zErb1.js";import{j as Qd,a as Kd,b as Vd,k as Ud,e as Xd,c as Gd,f as Jd}from"./trade-encoding-CaXvzcLt.js";import{M as Zd,E as eu,s as tu}from"./sendMetaTransaction-zdWpVVA2.js";import{C as nu,I as ru}from"./ethers-CpLYx0ea.js";import{a as Wr}from"./mana-convert-DV2llJXe.js";import{u as Is}from"./useManaRate-BShpKssx.js";import{u as au}from"./useSecondarySales-DoB0_ije.js";import{T as js}from"./Tooltip-ChqAjQ8a.js";import"./sentry-B35L1FdR.js";import"./intl-CBcMB1D2.js";import"./clsx-TVl4Fw6R.js";const tn=Math.min,Et=Math.max,or=Math.round,Wn=Math.floor,it=n=>({x:n,y:n}),ou={left:"right",right:"left",bottom:"top",top:"bottom"};function iu(n,a,t){return Et(n,tn(a,t))}function wr(n,a){return typeof n=="function"?n(a):n}function nn(n){return n.split("-")[0]}function jn(n){return n.split("-")[1]}function su(n){return n==="x"?"y":"x"}function ga(n){return n==="y"?"height":"width"}function It(n){const a=n[0];return a==="t"||a==="b"?"y":"x"}function xa(n){return su(It(n))}function cu(n,a,t){t===void 0&&(t=!1);const e=jn(n),r=xa(n),o=ga(r);let i=r==="x"?e===(t?"end":"start")?"right":"left":e==="start"?"bottom":"top";return a.reference[o]>a.floating[o]&&(i=ir(i)),[i,ir(i)]}function lu(n){const a=ir(n);return[sa(n),a,sa(a)]}function sa(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}const uo=["left","right"],po=["right","left"],du=["top","bottom"],uu=["bottom","top"];function pu(n,a,t){switch(n){case"top":case"bottom":return t?a?po:uo:a?uo:po;case"left":case"right":return a?du:uu;default:return[]}}function fu(n,a,t,e){const r=jn(n);let o=pu(nn(n),t==="start",e);return r&&(o=o.map(i=>i+"-"+r),a&&(o=o.concat(o.map(sa)))),o}function ir(n){const a=nn(n);return ou[a]+n.slice(a.length)}function hu(n){var a,t,e,r;return{top:(a=n.top)!=null?a:0,right:(t=n.right)!=null?t:0,bottom:(e=n.bottom)!=null?e:0,left:(r=n.left)!=null?r:0}}function Es(n){return typeof n!="number"?hu(n):{top:n,right:n,bottom:n,left:n}}function sr(n){const{x:a,y:t,width:e,height:r}=n;return{width:e,height:r,top:t,left:a,right:a+e,bottom:t+r,x:a,y:t}}function fo(n,a,t){let{reference:e,floating:r}=n;const o=It(a),i=xa(a),c=ga(i),l=nn(a),p=o==="y",u=e.x+e.width/2-r.width/2,h=e.y+e.height/2-r.height/2,y=e[c]/2-r[c]/2;let g;switch(l){case"top":g={x:u,y:e.y-r.height};break;case"bottom":g={x:u,y:e.y+e.height};break;case"right":g={x:e.x+e.width,y:h};break;case"left":g={x:e.x-r.width,y:h};break;default:g={x:e.x,y:e.y}}const b=jn(a);return b&&(g[i]+=y*(b==="end"?1:-1)*(t&&p?-1:1)),g}async function mu(n,a){var t;a===void 0&&(a={});const{x:e,y:r,platform:o,rects:i,elements:c,strategy:l}=n,{boundary:p="clippingAncestors",rootBoundary:u="viewport",elementContext:h="floating",altBoundary:y=!1,padding:g=0}=wr(a,n),b=Es(g),f=c[y?h==="floating"?"reference":"floating":h],D=sr(await o.getClippingRect({element:(t=await(o.isElement==null?void 0:o.isElement(f)))==null||t?f:f.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(c.floating)),boundary:p,rootBoundary:u,strategy:l})),S=h==="floating"?{x:e,y:r,width:i.floating.width,height:i.floating.height}:i.reference,j=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c.floating)),T=await(o.isElement==null?void 0:o.isElement(j))&&await(o.getScale==null?void 0:o.getScale(j))||{x:1,y:1},O=sr(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:S,offsetParent:j,strategy:l}):S);return{top:(D.top-O.top+b.top)/T.y,bottom:(O.bottom-D.bottom+b.bottom)/T.y,left:(D.left-O.left+b.left)/T.x,right:(O.right-D.right+b.right)/T.x}}const gu=50,xu=async(n,a,t)=>{const{placement:e="bottom",strategy:r="absolute",middleware:o=[],platform:i}=t,c=i.detectOverflow?i:{...i,detectOverflow:mu},l=await(i.isRTL==null?void 0:i.isRTL(a));let p=await i.getElementRects({reference:n,floating:a,strategy:r}),{x:u,y:h}=fo(p,e,l),y=e,g=0;const b={};for(let w=0;w<o.length;w++){const f=o[w];if(!f)continue;const{name:D,fn:S}=f,{x:j,y:T,data:O,reset:$}=await S({x:u,y:h,initialPlacement:e,placement:y,strategy:r,middlewareData:b,rects:p,platform:c,elements:{reference:n,floating:a}});u=j??u,h=T??h,b[D]={...b[D],...O},$&&g<gu&&(g++,typeof $=="object"&&($.placement&&(y=$.placement),$.rects&&(p=$.rects===!0?await i.getElementRects({reference:n,floating:a,strategy:r}):$.rects),{x:u,y:h}=fo(p,y,l)),w=-1)}return{x:u,y:h,placement:y,strategy:r,middlewareData:b}},yu=n=>({name:"arrow",options:n,async fn(a){const{x:t,y:e,placement:r,rects:o,platform:i,elements:c,middlewareData:l}=a,{element:p,padding:u=0}=wr(n,a)||{};if(p==null)return{};const h=Es(u),y={x:t,y:e},g=xa(r),b=ga(g),w=await i.getDimensions(p),f=g==="y",D=f?"top":"left",S=f?"bottom":"right",j=f?"clientHeight":"clientWidth",T=o.reference[b]+o.reference[g]-y[g]-o.floating[b],O=y[g]-o.reference[g],$=await(i.getOffsetParent==null?void 0:i.getOffsetParent(p));let C=$?$[j]:0;(!C||!await(i.isElement==null?void 0:i.isElement($)))&&(C=c.floating[j]||o.floating[b]);const k=T/2-O/2,_=C/2-w[b]/2-1,E=tn(h[D],_),N=tn(h[S],_),A=C-w[b]-N,B=C/2-w[b]/2+k,U=iu(E,B,A),Q=!l.arrow&&jn(r)!=null&&B!==U&&o.reference[b]/2-(B<E?E:N)-w[b]/2<0,L=Q?B<E?B-E:B-A:0;return{[g]:y[g]+L,data:{[g]:U,centerOffset:B-U-L,...Q&&{alignmentOffset:L}},reset:Q}}}),bu=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(a){var t,e;const{placement:r,middlewareData:o,rects:i,initialPlacement:c,platform:l,elements:p}=a,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:y,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:w=!0,...f}=wr(n,a);if((t=o.arrow)!=null&&t.alignmentOffset)return{};const D=nn(r),S=It(c),j=nn(c)===c,T=await(l.isRTL==null?void 0:l.isRTL(p.floating)),O=y||(j||!w?[ir(c)]:lu(c)),$=b!=="none";!y&&$&&O.push(...fu(c,w,b,T));const C=[c,...O],k=await l.detectOverflow(a,f),_=[];let E=((e=o.flip)==null?void 0:e.overflows)||[];if(u&&_.push(k[D]),h){const U=cu(r,i,T);_.push(k[U[0]],k[U[1]])}if(E=[...E,{placement:r,overflows:_}],!_.every(U=>U<=0)){var N,A;const U=(((N=o.flip)==null?void 0:N.index)||0)+1,Q=C[U];if(Q&&(!(h==="alignment"?S!==It(Q):!1)||E.every(P=>It(P.placement)===S?P.overflows[0]>0:!0)))return{data:{index:U,overflows:E},reset:{placement:Q}};let L=(A=E.filter(q=>q.overflows[0]<=0).sort((q,P)=>q.overflows[1]-P.overflows[1])[0])==null?void 0:A.placement;if(!L)switch(g){case"bestFit":{var B;const q=(B=E.filter(P=>{if($){const K=It(P.placement);return K===S||K==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(K=>K>0).reduce((K,ie)=>K+ie,0)]).sort((P,K)=>P[1]-K[1])[0])==null?void 0:B[0];q&&(L=q);break}case"initialPlacement":L=c;break}if(r!==L)return{reset:{placement:L}}}return{}}}},vu=new Set(["left","top"]);async function wu(n,a){const{placement:t,platform:e,elements:r}=n,o=await(e.isRTL==null?void 0:e.isRTL(r.floating)),i=nn(t),c=jn(t),l=It(t)==="y",p=vu.has(i)?-1:1,u=o&&l?-1:1,h=wr(a,n);let{mainAxis:y,crossAxis:g,alignmentAxis:b}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return c&&typeof b=="number"&&(g=c==="end"?b*-1:b),l?{x:g*u,y:y*p}:{x:y*p,y:g*u}}const ku=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(a){var t,e;const{x:r,y:o,placement:i,middlewareData:c}=a,l=await wu(a,n);return i===((t=c.offset)==null?void 0:t.placement)&&(e=c.arrow)!=null&&e.alignmentOffset?{}:{x:r+l.x,y:o+l.y,data:{...l,placement:i}}}}};function kr(){return typeof window<"u"}function sn(n){return Ts(n)?(n.nodeName||"").toLowerCase():"#document"}function Pe(n){var a;return(n==null||(a=n.ownerDocument)==null?void 0:a.defaultView)||window}function ht(n){var a;return(a=(Ts(n)?n.ownerDocument:n.document)||window.document)==null?void 0:a.documentElement}function Ts(n){return kr()?n instanceof Node||n instanceof Pe(n).Node:!1}function Me(n){return kr()?n instanceof Element||n instanceof Pe(n).Element:!1}function Dt(n){return kr()?n instanceof HTMLElement||n instanceof Pe(n).HTMLElement:!1}function ho(n){return!kr()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof Pe(n).ShadowRoot}function Dr(n){const{overflow:a,overflowX:t,overflowY:e,display:r}=Fe(n);return/auto|scroll|overlay|hidden|clip/.test(a+e+t)&&r!=="inline"&&r!=="contents"}function Du(n){return/^(table|td|th)$/.test(sn(n))}function Cr(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}const Cu=/transform|translate|scale|rotate|perspective|filter/,Su=/paint|layout|strict|content/,_t=n=>!!n&&n!=="none";let Br;function ya(n){const a=Me(n)?Fe(n):n;return _t(a.transform)||_t(a.translate)||_t(a.scale)||_t(a.rotate)||_t(a.perspective)||!ba()&&(_t(a.backdropFilter)||_t(a.filter))||Cu.test(a.willChange||"")||Su.test(a.contain||"")}function Mu(n){let a=Rt(n);for(;Dt(a)&&!Cn(a);){if(ya(a))return a;if(Cr(a))return null;a=Rt(a)}return null}function ba(){return Br==null&&(Br=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Br}function Cn(n){return/^(html|body|#document)$/.test(sn(n))}function Fe(n){return Pe(n).getComputedStyle(n)}function Sr(n){return Me(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function Rt(n){if(sn(n)==="html")return n;const a=n.assignedSlot||n.parentNode||ho(n)&&n.host||ht(n);return ho(a)?a.host:a}function $s(n){const a=Rt(n);return Cn(a)?(n.ownerDocument||n).body:Dt(a)&&Dr(a)?a:$s(a)}function Sn(n,a,t){var e;a===void 0&&(a=[]),t===void 0&&(t=!0);const r=$s(n),o=r===((e=n.ownerDocument)==null?void 0:e.body),i=Pe(r);if(o){const c=ca(i);return a.concat(i,i.visualViewport||[],Dr(r)?r:[],c&&t?Sn(c):[])}else return a.concat(r,Sn(r,[],t))}function ca(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function Ns(n){const a=Fe(n);let t=parseFloat(a.width)||0,e=parseFloat(a.height)||0;const r=Dt(n),o=r?n.offsetWidth:t,i=r?n.offsetHeight:e,c=or(t)!==o||or(e)!==i;return c&&(t=o,e=i),{width:t,height:e,$:c}}function va(n){return Me(n)?n:n.contextElement}function Jt(n){const a=va(n);if(!Dt(a))return it(1);const t=a.getBoundingClientRect(),{width:e,height:r,$:o}=Ns(a);let i=(o?or(t.width):t.width)/e,c=(o?or(t.height):t.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const _u=it(0);function Os(n){const a=Pe(n);return!ba()||!a.visualViewport?_u:{x:a.visualViewport.offsetLeft,y:a.visualViewport.offsetTop}}function Pu(n,a,t){return a===void 0&&(a=!1),!!t&&a&&t===Pe(n)}function Lt(n,a,t,e){a===void 0&&(a=!1),t===void 0&&(t=!1);const r=n.getBoundingClientRect(),o=va(n);let i=it(1);a&&(e?Me(e)&&(i=Jt(e)):i=Jt(n));const c=Pu(o,t,e)?Os(o):it(0);let l=(r.left+c.x)/i.x,p=(r.top+c.y)/i.y,u=r.width/i.x,h=r.height/i.y;if(o&&e){const y=Pe(o),g=Me(e)?Pe(e):e;let b=y,w=ca(b);for(;w&&g!==b;){const f=Jt(w),D=w.getBoundingClientRect(),S=Fe(w),j=D.left+(w.clientLeft+parseFloat(S.paddingLeft))*f.x,T=D.top+(w.clientTop+parseFloat(S.paddingTop))*f.y;l*=f.x,p*=f.y,u*=f.x,h*=f.y,l+=j,p+=T,b=Pe(w),w=ca(b)}}return sr({width:u,height:h,x:l,y:p})}function Mr(n,a){const t=Sr(n).scrollLeft;return a?a.left+t:Lt(ht(n)).left+t}function As(n,a){const t=n.getBoundingClientRect(),e=t.left+a.scrollLeft-Mr(n,t),r=t.top+a.scrollTop;return{x:e,y:r}}function Iu(n){let{elements:a,rect:t,offsetParent:e,strategy:r}=n;const o=r==="fixed",i=ht(e),c=a?Cr(a.floating):!1;if(e===i||c&&o)return t;let l={scrollLeft:0,scrollTop:0},p=it(1);const u=it(0),h=Dt(e);if((h||!o)&&((sn(e)!=="body"||Dr(i))&&(l=Sr(e)),h)){const g=Lt(e);p=Jt(e),u.x=g.x+e.clientLeft,u.y=g.y+e.clientTop}const y=i&&!h&&!o?As(i,l):it(0);return{width:t.width*p.x,height:t.height*p.y,x:t.x*p.x-l.scrollLeft*p.x+u.x+y.x,y:t.y*p.y-l.scrollTop*p.y+u.y+y.y}}function ju(n){return n.getClientRects?Array.from(n.getClientRects()):[]}function Eu(n){const a=Sr(n),t=n.ownerDocument.body,e=Et(n.scrollWidth,n.clientWidth,t.scrollWidth,t.clientWidth),r=Et(n.scrollHeight,n.clientHeight,t.scrollHeight,t.clientHeight);let o=-a.scrollLeft+Mr(n);const i=-a.scrollTop;return Fe(t).direction==="rtl"&&(o+=Et(n.clientWidth,t.clientWidth)-e),{width:e,height:r,x:o,y:i}}const Tu=25;function $u(n,a,t){t===void 0&&(t="viewport");const e=t==="layoutViewport",r=Pe(n),o=ht(n),i=r.visualViewport;let c=o.clientWidth,l=o.clientHeight,p=0,u=0;if(i){const y=!ba()||a==="fixed";e?y||(p=-i.offsetLeft,u=-i.offsetTop):(c=i.width,l=i.height,y&&(p=i.offsetLeft,u=i.offsetTop))}if(Mr(o)<=0){const y=o.ownerDocument,g=y.body,b=getComputedStyle(g),w=y.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,f=Math.abs(o.clientWidth-g.clientWidth-w),D=getComputedStyle(o).scrollbarGutter==="stable both-edges"?f/2:f;D<=Tu&&(c-=D)}return{width:c,height:l,x:p,y:u}}function Nu(n,a){const t=Lt(n,!0,a==="fixed"),e=t.top+n.clientTop,r=t.left+n.clientLeft,o=Jt(n),i=n.clientWidth*o.x,c=n.clientHeight*o.y,l=r*o.x,p=e*o.y;return{width:i,height:c,x:l,y:p}}function mo(n,a,t){let e;if(a==="viewport"||a==="layoutViewport")e=$u(n,t,a);else if(a==="document")e=Eu(ht(n));else if(Me(a))e=Nu(a,t);else{const r=Os(n);e={x:a.x-r.x,y:a.y-r.y,width:a.width,height:a.height}}return sr(e)}function Ou(n,a){const t=a.get(n);if(t)return t;let e=Sn(n,[],!1).filter(c=>Me(c)&&sn(c)!=="body"),r=null;const o=Fe(n).position==="fixed";let i=o?Rt(n):n;for(;Me(i)&&!Cn(i);){const c=Fe(i),l=ya(i),p=r?r.position:o?"fixed":"";!l&&(p==="fixed"||p==="absolute"&&c.position==="static")?e=e.filter(h=>h!==i):r=c,i=Rt(i)}return a.set(n,e),e}function Au(n){let{element:a,boundary:t,rootBoundary:e,strategy:r}=n;const i=[...t==="clippingAncestors"?Cr(a)?[]:Ou(a,this._c):[].concat(t),e],c=mo(a,i[0],r);let l=c.top,p=c.right,u=c.bottom,h=c.left;for(let y=1;y<i.length;y++){const g=mo(a,i[y],r);l=Et(g.top,l),p=tn(g.right,p),u=tn(g.bottom,u),h=Et(g.left,h)}return{width:p-h,height:u-l,x:h,y:l}}function Ru(n){const{width:a,height:t}=Ns(n);return{width:a,height:t}}function Lu(n,a,t){const e=Dt(a),r=ht(a),o=t==="fixed",i=Lt(n,!0,o,a);let c={scrollLeft:0,scrollTop:0};const l=it(0);if((e||!o)&&((sn(a)!=="body"||Dr(r))&&(c=Sr(a)),e)){const y=Lt(a,!0,o,a);l.x=y.x+a.clientLeft,l.y=y.y+a.clientTop}!e&&r&&(l.x=Mr(r));const p=r&&!e&&!o?As(r,c):it(0),u=i.left+c.scrollLeft-l.x-p.x,h=i.top+c.scrollTop-l.y-p.y;return{x:u,y:h,width:i.width,height:i.height}}function Hr(n){return Fe(n).position==="static"}function go(n,a){if(!Dt(n)||Fe(n).position==="fixed")return null;if(a)return a(n);let t=n.offsetParent;return ht(n)===t&&(t=t.ownerDocument.body),t}function Rs(n,a){const t=Pe(n);if(Cr(n))return t;if(!Dt(n)){let r=Rt(n);for(;r&&!Cn(r);){if(Me(r)&&!Hr(r))return r;r=Rt(r)}return t}let e=go(n,a);for(;e&&Du(e)&&Hr(e);)e=go(e,a);return e&&Cn(e)&&Hr(e)&&!ya(e)?t:e||Mu(n)||t}const Fu=async function(n){const a=this.getOffsetParent||Rs,t=this.getDimensions,e=await t(n.floating);return{reference:Lu(n.reference,await a(n.floating),n.strategy),floating:{x:0,y:0,width:e.width,height:e.height}}};function Yu(n){return Fe(n).direction==="rtl"}const Wu={convertOffsetParentRelativeRectToViewportRelativeRect:Iu,getDocumentElement:ht,getClippingRect:Au,getOffsetParent:Rs,getElementRects:Fu,getClientRects:ju,getDimensions:Ru,getScale:Jt,isElement:Me,isRTL:Yu};function Ls(n,a){return n.x===a.x&&n.y===a.y&&n.width===a.width&&n.height===a.height}function Bu(n,a,t){let e=null,r;const o=ht(n);function i(){var u;clearTimeout(r),(u=e)==null||u.disconnect(),e=null}function c(u,h){u===void 0&&(u=!1),h===void 0&&(h=1),i();const y=n.getBoundingClientRect(),{left:g,top:b,width:w,height:f}=y;if(u||a(),!w||!f)return;const D=Wn(b),S=Wn(o.clientWidth-(g+w)),j=Wn(o.clientHeight-(b+f)),T=Wn(g),$={rootMargin:-D+"px "+-S+"px "+-j+"px "+-T+"px",threshold:Et(0,tn(1,h))||1};let C=!0;function k(_){const E=_[0].intersectionRatio;if(!Ls(y,n.getBoundingClientRect()))return c();if(E!==h){if(!C)return c();E?c(!1,E):r=setTimeout(()=>{c(!1,1e-7)},1e3)}C=!1}try{e=new IntersectionObserver(k,{...$,root:o.ownerDocument})}catch{e=new IntersectionObserver(k,$)}e.observe(n)}const l=Pe(n),p=()=>c(t);return l.addEventListener("resize",p),c(!0),()=>{l.removeEventListener("resize",p),i()}}function Hu(n,a,t,e){e===void 0&&(e={});const{ancestorScroll:r=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=e,p=va(n),u=r||o?[...p?Sn(p):[],...a?Sn(a):[]]:[];u.forEach(D=>{r&&D.addEventListener("scroll",t),o&&D.addEventListener("resize",t)});const h=p&&c?Bu(p,t,o):null;let y=-1,g=null;i&&(g=new ResizeObserver(D=>{let[S]=D;S&&S.target===p&&g&&a&&(g.unobserve(a),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var j;(j=g)==null||j.observe(a)})),t()}),p&&!l&&g.observe(p),a&&g.observe(a));let b,w=l?Lt(n):null;l&&f();function f(){const D=Lt(n);w&&!Ls(w,D)&&t(),w=D,b=requestAnimationFrame(f)}return t(),()=>{var D;u.forEach(S=>{r&&S.removeEventListener("scroll",t),o&&S.removeEventListener("resize",t)}),h==null||h(),(D=g)==null||D.disconnect(),g=null,l&&cancelAnimationFrame(b)}}const zu=ku,qu=bu,xo=yu,Qu=(n,a,t)=>{const e=new Map,r=t??{},o={...Wu,...r.platform,_c:e};return xu(n,a,{...r,platform:o})};var Ku=typeof document<"u",Vu=function(){},Gn=Ku?v.useLayoutEffect:Vu;function cr(n,a){if(n===a)return!0;if(typeof n!=typeof a)return!1;if(typeof n=="function"&&n.toString()===a.toString())return!0;let t,e,r;if(n&&a&&typeof n=="object"){if(Array.isArray(n)){if(t=n.length,t!==a.length)return!1;for(e=t;e--!==0;)if(!cr(n[e],a[e]))return!1;return!0}if(r=Object.keys(n),t=r.length,t!==Object.keys(a).length)return!1;for(e=t;e--!==0;)if(!{}.hasOwnProperty.call(a,r[e]))return!1;for(e=t;e--!==0;){const o=r[e];if(!(o==="_owner"&&n.$$typeof)&&!cr(n[o],a[o]))return!1}return!0}return n!==n&&a!==a}function Fs(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function yo(n,a){const t=Fs(n);return Math.round(a*t)/t}function zr(n){const a=v.useRef(n);return Gn(()=>{a.current=n}),a}function Uu(n){n===void 0&&(n={});const{placement:a="bottom",strategy:t="absolute",middleware:e=[],platform:r,elements:{reference:o,floating:i}={},transform:c=!0,whileElementsMounted:l,open:p}=n,[u,h]=v.useState({x:0,y:0,strategy:t,placement:a,middlewareData:{},isPositioned:!1}),[y,g]=v.useState(e);cr(y,e)||g(e);const[b,w]=v.useState(null),[f,D]=v.useState(null),S=v.useCallback(P=>{P!==$.current&&($.current=P,w(P))},[]),j=v.useCallback(P=>{P!==C.current&&(C.current=P,D(P))},[]),T=o||b,O=i||f,$=v.useRef(null),C=v.useRef(null),k=v.useRef(u),_=l!=null,E=zr(l),N=zr(r),A=zr(p),B=v.useCallback(()=>{if(!$.current||!C.current)return;const P={placement:a,strategy:t,middleware:y};N.current&&(P.platform=N.current),Qu($.current,C.current,P).then(K=>{const ie={...K,isPositioned:A.current!==!1};U.current&&!cr(k.current,ie)&&(k.current=ie,qc.flushSync(()=>{h(ie)}))})},[y,a,t,N,A]);Gn(()=>{p===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,h(P=>({...P,isPositioned:!1})))},[p]);const U=v.useRef(!1);Gn(()=>(U.current=!0,()=>{U.current=!1}),[]),Gn(()=>{if(T&&($.current=T),O&&(C.current=O),T&&O){if(E.current)return E.current(T,O,B);B()}},[T,O,B,E,_]);const Q=v.useMemo(()=>({reference:$,floating:C,setReference:S,setFloating:j}),[S,j]),L=v.useMemo(()=>({reference:T,floating:O}),[T,O]),q=v.useMemo(()=>{const P={position:t,left:0,top:0};if(!L.floating)return P;const K=yo(L.floating,u.x),ie=yo(L.floating,u.y);return c?{...P,transform:"translate("+K+"px, "+ie+"px)",...Fs(L.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:K,top:ie}},[t,c,L.floating,u.x,u.y]);return v.useMemo(()=>({...u,update:B,refs:Q,elements:L,floatingStyles:q}),[u,B,Q,L,q])}const Xu=n=>{function a(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:n,fn(t){const{element:e,padding:r}=typeof n=="function"?n(t):n;return e&&a(e)?e.current!=null?xo({element:e.current,padding:r}).fn(t):{}:e?xo({element:e,padding:r}).fn(t):{}}}},Gu=(n,a)=>{const t=zu(n);return{name:t.name,fn:t.fn,options:[n,a]}},Ju=(n,a)=>{const t=qu(n);return{name:t.name,fn:t.fn,options:[n,a]}},Zu=(n,a)=>{const t=Xu(n);return{name:t.name,fn:t.fn,options:[n,a]}},Ys=216n,ep=(1n<<Ys)-1n;function tp(n){const a=typeof n=="bigint"?n:BigInt(n.trim());if(a<0n)throw new Error(`Invalid tokenId: ${String(n)}`);return{itemId:(a>>Ys).toString(),issuedId:(a&ep).toString()}}function np(n){if(!n)return null;try{return tp(n).itemId}catch{return null}}function bo(n,a){return a.kind==="listed"?{...n,isOnSale:!0,listingPrice:a.priceCredits,tradeId:a.tradeId??n.tradeId}:{...n,isOnSale:!1,listingPrice:void 0,tradeId:void 0}}function qr(n,a,t){const{address:e,contractAddress:r,tokenId:o}=a;if(!r||!o)return;const i=`${r}-${o}`;n.cancelQueries({queryKey:["owned-token",r,o]}),n.cancelQueries({queryKey:["secondary-sale-state"]}),e&&n.cancelQueries({queryKey:["my-assets",e]});const c=t.kind==="gone";n.setQueriesData({queryKey:["owned-token",r,o]},p=>p&&(c?null:bo(p,t)));const l=e?["my-assets",e]:["my-assets"];n.setQueriesData({queryKey:l},p=>p!=null&&p.pages?{...p,pages:p.pages.map(u=>{if(c){const h=u.items.filter(y=>!(y.contractAddress===r&&y.tokenId===o));return{...u,items:h,total:Math.max(0,u.total-(u.items.length-h.length))}}return{...u,items:u.items.map(h=>h.contractAddress===r&&h.tokenId===o?bo(h,t):h)}})}:p),n.setQueriesData({queryKey:["secondary-sale-state"]},p=>{var h;if(!p)return p;const u={...p};return t.kind==="removed"||t.kind==="gone"?delete u[i]:u[i]={priceCredits:t.priceCredits,tradeId:t.tradeId??((h=u[i])==null?void 0:h.tradeId)??""},u})}function rp(n){return!(n.isMarket||n.forSale&&n.priceKnown||n.manage||n.soldOutWithResale||!n.stillResolving&&!n.resolvingTrade&&(n.isTokenRoute?!n.ownedAssetLoading:!n.deepLinkLoading))}const ap="data:image/webp;base64,UklGRqgOAABXRUJQVlA4IJwOAACwOwCdASqEAIsAPj0YikMiIaEWuib4IAPEtQBl0QC/bukK7J6X8cPZP5F69/Nvhj8oPlD3odY/QB8RXPv/C+3n59+izzA/0l/3/9064PmD/bH9Zvey/33r8/2PqC/zH/fdaX6EX7O+nP+3Xwlfub+33tOf/+7N8wTMuJT/znss7V9qD/DcDplr/deudN0/Rcajjp49/Q//7vLR70+4X+tP/R9az//+3r9z/Yk/ZVVfCa+jj+kU2kxc+zPDZIZQYWF19BTevkFTZdPnQBT3YukdDX/AtCNcmvBrFJ96eYkUWaCCtnOpfB+/IETSsPYuwsabIrqSWHYoPBskXi/DUubCFDAf/6+0pCLU1kmMIueWH8HebltZsATbIO+vXwG1gHAXjGECElz7j/+GXHZJM9ORAFgOa/b/pGdMUEE9PfuMHx1G3GpnRw8WEP5FknNoUNOyb6iY5VX/W5w6pnS5r1srs4CXTuHzUJLdvXVpyiQNuBwCyLYlukPjvLuqqHRrv5/jHTa1L+iumi2wLA8NzahM3euE6fvC7shIbIWajyLkVYhWOOdMRjOWdhSN1wi7JvE4t+bFXSVHOX+4DnQxVhhUKacLKMYPHhQKLZSdyYzM66dZ22undenNBcAjNHjBW+9t0W2glcAA/v44VaU8mJJP1Vz1l456kKu23B2wH7M9h1OtAwoGAGj8t///XA7H+OEVSxGjYfFAlM1Upvv/NmvKOBdxK8JXyQLqAqwy0bgja/QQTJKOEDkKX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F85VIVNVoRlDLXxjwsBb4heeCxAzkU+gm7I1b5uvL3i2xq/xj+lhL8t6XTKJliRrlPGHQuVR3ZceU87KLxOQcICfVOCe7B88mxyvsB2FmiotOM3UOnG+VcZ3jL1W+JFDzYyR9Y3KsZNaeJAazd5ajmnZLTYIY7gJ4N4t99U2hY/CMgI0yMNLaq3cJB0CNBsd1hRKl7lZ1wMh16/EZx5jig5JWvlZNPTMuJFHvpW42fyFjIfKslwVHB/SJKWDRr3w9uFCRm/Z3ABn2ydMFGvXjMZEaTsZlqF17J76wjrLkgmgcbtrtL9N8T3dXsKhM4LPscSPo2kc9MfW3dmjuo98vCdxBR/RvMAgm0VzEuXulny1QdmDMzoBUfPseIFkTNYFg89+m4OKn/8Xc28jcPteGx8v0vwYyKNlOAZvi/yt7OImF7kADj+rzqjSoqwVTnCCjOKrF1Gt1i+6oeDggdd5wEh1ghvxdHELxvJeJE8x82cfHEVXhE9Nheu7Q1WycLXUTZA8oZHsdBaBFpk6vyYdYFT8YTShaCjPle1+2DJHzXzhRUQ6ZY/HcDs/vS2V8+jO+pjV23u5WL6yRWULzVi+0qUXIiJzd9qj65YnWPMxIubcSpm+5n8vMpysoMuGzoNwBmNszF+S+b8acZRgm2Gi0UT5OGuYwq4wZ5kmd8OqnDzhze2RxwMRtRm+17eKYWzLWtgVuOca/HWuBI58UC9FNZtBLv1l2htg7Iyehb/cr9uKvXkPXh0LFeyfEc49dOsGvppssGqOAAAAA=",ip=m.div`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-JdIW5UKh.js","assets/react-vyZjIDcS.js","assets/dcl-schemas-BICTSpB5.js","assets/index-D7ZWH6NI.js","assets/sentry-B35L1FdR.js","assets/ethers-CpLYx0ea.js","assets/intl-CBcMB1D2.js","assets/index-YUVIXaKh.css","assets/createSvgIcon-BYM3dfXO.js","assets/clsx-BhtvxQSI.js","assets/emotion-styled.browser.esm-CniaO-pd.js","assets/CircularProgress-Q2J1Bsg6.js","assets/index-BMcBFcyk.js","assets/useTheme-CQoRc-Qt.js","assets/getThemeProps-D4IusJff.js"])))=>i.map(i=>d[i]);
2
+ var Hc=Object.defineProperty;var zc=(n,a,t)=>a in n?Hc(n,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[a]=t;var W=(n,a,t)=>zc(n,typeof a!="symbol"?a+"":a,t);import{r as v,d as qc,j as s,b as Wt,l as us,R as M,h as Qc,e as Kc,a as Vc,L as Uc}from"./react-vyZjIDcS.js";import{s as m,t as d,d as x,I as J,b9 as Xc,y as _e,H as Ke,e as vt,z as ro,b8 as Rr,m as Ot,ai as ps,aj as Gc,D as Bt,ap as Jc,Y as fs,Z as rr,aq as oa,ar as $e,an as le,au as Xe,at,bt as Zc,as as Lr,k as Ge,c as At,g as ia,a as el,C as hs,x as tl,u as we,ad as br,n as vr,ae as ma,aL as Gt,p as ms,E as _n,ag as gs,bu as nl,B as Pn,G as In,bv as xs,aM as ao,aN as rl,f as ys,_ as Fr,w as al,ah as Dn,bw as ol,bx as il,by as sl,bz as cl,bA as ll,bB as dl,bC as bs,bD as ul,bE as pl,b as vs,bF as fl,bG as hl,bH as ml,bI as gl,F as xl,bJ as yl,O as oo,bK as bl,bL as vl,bM as wl,bN as kl,bO as Dl,aD as Cl,l as Sl,bP as Ml,bQ as _l,bR as Pl,bS as io,af as Il,bT as jl,bU as El,bV as Tl,bW as $l,bX as Nl,bY as Ol}from"./index-D7ZWH6NI.js";import{d as Re,a as so}from"./dcl-schemas-BICTSpB5.js";import{$ as Yr,m as Al,K as Rl,V as Ll,Q as ws,R as Fl,M as Yl,S as Wl,C as Bl,H as Hl,a as zl,T as ql,X as Ql,b as Kl,B as Vl,c as Ul,d as Xl,e as Gl,f as Qt,j as Yn,k as Kt,W as Jl,p as Zl,q as ed,P as td,x as nd,y as rd,z as ad,D as od,E as id,F as sd,G as cd,I as ld,J as dd,L as ud,l as pd,n as fd,o as hd,a0 as md,a1 as gd,A as xd,r as yd,s as bd,t as vd,u as wd,v as kd,w as Dd,a2 as Cd,a3 as Sd,a4 as Md,N as _d,O as Pd,U as Id}from"./CollectionCarousel-aHnjzaNW.js";import{a as ar,t as jd,c as Ed}from"./buy-5mCWsIPg.js";import{f as Td}from"./builder-CFj7Br94.js";import{u as $d,M as Nd,l as Od,c as Ad}from"./useCreditPacks-CWKaLN_B.js";import{r as Rd}from"./mana-rate-B3jNC9WL.js";import{i as ks,f as Ds,n as Ld,j as Fd,c as co,g as Cs,e as Yd,r as Wd,m as Bd}from"./authorizations-CP2LPBVO.js";import{a as Ss,w as Ms,S as _s,G as Ps}from"./buy-gasless-IX5NUXaW.js";import{R as lo}from"./resume-buy-Bf0zIH7y.js";import{a as Hd,f as yt,i as en}from"./errors-Xoj9Pf4j.js";import{E as ut}from"./ErrorNotice-rHvx0ML0.js";import{l as zd}from"./loader-logo-BzY9EKdC.js";import{C as qd}from"./CircularProgress-Q2J1Bsg6.js";import{j as Qd,a as Kd,b as Vd,k as Ud,e as Xd,c as Gd,f as Jd}from"./trade-encoding-B9tOaOWk.js";import{M as Zd,E as eu,s as tu}from"./sendMetaTransaction-LxU_36sg.js";import{C as nu,I as ru}from"./ethers-CpLYx0ea.js";import{a as Wr}from"./mana-convert-CTkOJWok.js";import{u as Is}from"./useManaRate-B0JTyx88.js";import{u as au}from"./useSecondarySales-DAN8M0aA.js";import{T as js}from"./Tooltip-DFBlwayp.js";import"./sentry-B35L1FdR.js";import"./intl-CBcMB1D2.js";import"./clsx-BhtvxQSI.js";const tn=Math.min,Et=Math.max,or=Math.round,Wn=Math.floor,it=n=>({x:n,y:n}),ou={left:"right",right:"left",bottom:"top",top:"bottom"};function iu(n,a,t){return Et(n,tn(a,t))}function wr(n,a){return typeof n=="function"?n(a):n}function nn(n){return n.split("-")[0]}function jn(n){return n.split("-")[1]}function su(n){return n==="x"?"y":"x"}function ga(n){return n==="y"?"height":"width"}function It(n){const a=n[0];return a==="t"||a==="b"?"y":"x"}function xa(n){return su(It(n))}function cu(n,a,t){t===void 0&&(t=!1);const e=jn(n),r=xa(n),o=ga(r);let i=r==="x"?e===(t?"end":"start")?"right":"left":e==="start"?"bottom":"top";return a.reference[o]>a.floating[o]&&(i=ir(i)),[i,ir(i)]}function lu(n){const a=ir(n);return[sa(n),a,sa(a)]}function sa(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}const uo=["left","right"],po=["right","left"],du=["top","bottom"],uu=["bottom","top"];function pu(n,a,t){switch(n){case"top":case"bottom":return t?a?po:uo:a?uo:po;case"left":case"right":return a?du:uu;default:return[]}}function fu(n,a,t,e){const r=jn(n);let o=pu(nn(n),t==="start",e);return r&&(o=o.map(i=>i+"-"+r),a&&(o=o.concat(o.map(sa)))),o}function ir(n){const a=nn(n);return ou[a]+n.slice(a.length)}function hu(n){var a,t,e,r;return{top:(a=n.top)!=null?a:0,right:(t=n.right)!=null?t:0,bottom:(e=n.bottom)!=null?e:0,left:(r=n.left)!=null?r:0}}function Es(n){return typeof n!="number"?hu(n):{top:n,right:n,bottom:n,left:n}}function sr(n){const{x:a,y:t,width:e,height:r}=n;return{width:e,height:r,top:t,left:a,right:a+e,bottom:t+r,x:a,y:t}}function fo(n,a,t){let{reference:e,floating:r}=n;const o=It(a),i=xa(a),c=ga(i),l=nn(a),p=o==="y",u=e.x+e.width/2-r.width/2,h=e.y+e.height/2-r.height/2,y=e[c]/2-r[c]/2;let g;switch(l){case"top":g={x:u,y:e.y-r.height};break;case"bottom":g={x:u,y:e.y+e.height};break;case"right":g={x:e.x+e.width,y:h};break;case"left":g={x:e.x-r.width,y:h};break;default:g={x:e.x,y:e.y}}const b=jn(a);return b&&(g[i]+=y*(b==="end"?1:-1)*(t&&p?-1:1)),g}async function mu(n,a){var t;a===void 0&&(a={});const{x:e,y:r,platform:o,rects:i,elements:c,strategy:l}=n,{boundary:p="clippingAncestors",rootBoundary:u="viewport",elementContext:h="floating",altBoundary:y=!1,padding:g=0}=wr(a,n),b=Es(g),f=c[y?h==="floating"?"reference":"floating":h],D=sr(await o.getClippingRect({element:(t=await(o.isElement==null?void 0:o.isElement(f)))==null||t?f:f.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(c.floating)),boundary:p,rootBoundary:u,strategy:l})),S=h==="floating"?{x:e,y:r,width:i.floating.width,height:i.floating.height}:i.reference,j=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c.floating)),T=await(o.isElement==null?void 0:o.isElement(j))&&await(o.getScale==null?void 0:o.getScale(j))||{x:1,y:1},O=sr(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:S,offsetParent:j,strategy:l}):S);return{top:(D.top-O.top+b.top)/T.y,bottom:(O.bottom-D.bottom+b.bottom)/T.y,left:(D.left-O.left+b.left)/T.x,right:(O.right-D.right+b.right)/T.x}}const gu=50,xu=async(n,a,t)=>{const{placement:e="bottom",strategy:r="absolute",middleware:o=[],platform:i}=t,c=i.detectOverflow?i:{...i,detectOverflow:mu},l=await(i.isRTL==null?void 0:i.isRTL(a));let p=await i.getElementRects({reference:n,floating:a,strategy:r}),{x:u,y:h}=fo(p,e,l),y=e,g=0;const b={};for(let w=0;w<o.length;w++){const f=o[w];if(!f)continue;const{name:D,fn:S}=f,{x:j,y:T,data:O,reset:$}=await S({x:u,y:h,initialPlacement:e,placement:y,strategy:r,middlewareData:b,rects:p,platform:c,elements:{reference:n,floating:a}});u=j??u,h=T??h,b[D]={...b[D],...O},$&&g<gu&&(g++,typeof $=="object"&&($.placement&&(y=$.placement),$.rects&&(p=$.rects===!0?await i.getElementRects({reference:n,floating:a,strategy:r}):$.rects),{x:u,y:h}=fo(p,y,l)),w=-1)}return{x:u,y:h,placement:y,strategy:r,middlewareData:b}},yu=n=>({name:"arrow",options:n,async fn(a){const{x:t,y:e,placement:r,rects:o,platform:i,elements:c,middlewareData:l}=a,{element:p,padding:u=0}=wr(n,a)||{};if(p==null)return{};const h=Es(u),y={x:t,y:e},g=xa(r),b=ga(g),w=await i.getDimensions(p),f=g==="y",D=f?"top":"left",S=f?"bottom":"right",j=f?"clientHeight":"clientWidth",T=o.reference[b]+o.reference[g]-y[g]-o.floating[b],O=y[g]-o.reference[g],$=await(i.getOffsetParent==null?void 0:i.getOffsetParent(p));let C=$?$[j]:0;(!C||!await(i.isElement==null?void 0:i.isElement($)))&&(C=c.floating[j]||o.floating[b]);const k=T/2-O/2,_=C/2-w[b]/2-1,E=tn(h[D],_),N=tn(h[S],_),A=C-w[b]-N,B=C/2-w[b]/2+k,U=iu(E,B,A),Q=!l.arrow&&jn(r)!=null&&B!==U&&o.reference[b]/2-(B<E?E:N)-w[b]/2<0,L=Q?B<E?B-E:B-A:0;return{[g]:y[g]+L,data:{[g]:U,centerOffset:B-U-L,...Q&&{alignmentOffset:L}},reset:Q}}}),bu=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(a){var t,e;const{placement:r,middlewareData:o,rects:i,initialPlacement:c,platform:l,elements:p}=a,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:y,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:w=!0,...f}=wr(n,a);if((t=o.arrow)!=null&&t.alignmentOffset)return{};const D=nn(r),S=It(c),j=nn(c)===c,T=await(l.isRTL==null?void 0:l.isRTL(p.floating)),O=y||(j||!w?[ir(c)]:lu(c)),$=b!=="none";!y&&$&&O.push(...fu(c,w,b,T));const C=[c,...O],k=await l.detectOverflow(a,f),_=[];let E=((e=o.flip)==null?void 0:e.overflows)||[];if(u&&_.push(k[D]),h){const U=cu(r,i,T);_.push(k[U[0]],k[U[1]])}if(E=[...E,{placement:r,overflows:_}],!_.every(U=>U<=0)){var N,A;const U=(((N=o.flip)==null?void 0:N.index)||0)+1,Q=C[U];if(Q&&(!(h==="alignment"?S!==It(Q):!1)||E.every(P=>It(P.placement)===S?P.overflows[0]>0:!0)))return{data:{index:U,overflows:E},reset:{placement:Q}};let L=(A=E.filter(q=>q.overflows[0]<=0).sort((q,P)=>q.overflows[1]-P.overflows[1])[0])==null?void 0:A.placement;if(!L)switch(g){case"bestFit":{var B;const q=(B=E.filter(P=>{if($){const K=It(P.placement);return K===S||K==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(K=>K>0).reduce((K,ie)=>K+ie,0)]).sort((P,K)=>P[1]-K[1])[0])==null?void 0:B[0];q&&(L=q);break}case"initialPlacement":L=c;break}if(r!==L)return{reset:{placement:L}}}return{}}}},vu=new Set(["left","top"]);async function wu(n,a){const{placement:t,platform:e,elements:r}=n,o=await(e.isRTL==null?void 0:e.isRTL(r.floating)),i=nn(t),c=jn(t),l=It(t)==="y",p=vu.has(i)?-1:1,u=o&&l?-1:1,h=wr(a,n);let{mainAxis:y,crossAxis:g,alignmentAxis:b}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return c&&typeof b=="number"&&(g=c==="end"?b*-1:b),l?{x:g*u,y:y*p}:{x:y*p,y:g*u}}const ku=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(a){var t,e;const{x:r,y:o,placement:i,middlewareData:c}=a,l=await wu(a,n);return i===((t=c.offset)==null?void 0:t.placement)&&(e=c.arrow)!=null&&e.alignmentOffset?{}:{x:r+l.x,y:o+l.y,data:{...l,placement:i}}}}};function kr(){return typeof window<"u"}function sn(n){return Ts(n)?(n.nodeName||"").toLowerCase():"#document"}function Pe(n){var a;return(n==null||(a=n.ownerDocument)==null?void 0:a.defaultView)||window}function ht(n){var a;return(a=(Ts(n)?n.ownerDocument:n.document)||window.document)==null?void 0:a.documentElement}function Ts(n){return kr()?n instanceof Node||n instanceof Pe(n).Node:!1}function Me(n){return kr()?n instanceof Element||n instanceof Pe(n).Element:!1}function Dt(n){return kr()?n instanceof HTMLElement||n instanceof Pe(n).HTMLElement:!1}function ho(n){return!kr()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof Pe(n).ShadowRoot}function Dr(n){const{overflow:a,overflowX:t,overflowY:e,display:r}=Fe(n);return/auto|scroll|overlay|hidden|clip/.test(a+e+t)&&r!=="inline"&&r!=="contents"}function Du(n){return/^(table|td|th)$/.test(sn(n))}function Cr(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}const Cu=/transform|translate|scale|rotate|perspective|filter/,Su=/paint|layout|strict|content/,_t=n=>!!n&&n!=="none";let Br;function ya(n){const a=Me(n)?Fe(n):n;return _t(a.transform)||_t(a.translate)||_t(a.scale)||_t(a.rotate)||_t(a.perspective)||!ba()&&(_t(a.backdropFilter)||_t(a.filter))||Cu.test(a.willChange||"")||Su.test(a.contain||"")}function Mu(n){let a=Rt(n);for(;Dt(a)&&!Cn(a);){if(ya(a))return a;if(Cr(a))return null;a=Rt(a)}return null}function ba(){return Br==null&&(Br=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Br}function Cn(n){return/^(html|body|#document)$/.test(sn(n))}function Fe(n){return Pe(n).getComputedStyle(n)}function Sr(n){return Me(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function Rt(n){if(sn(n)==="html")return n;const a=n.assignedSlot||n.parentNode||ho(n)&&n.host||ht(n);return ho(a)?a.host:a}function $s(n){const a=Rt(n);return Cn(a)?(n.ownerDocument||n).body:Dt(a)&&Dr(a)?a:$s(a)}function Sn(n,a,t){var e;a===void 0&&(a=[]),t===void 0&&(t=!0);const r=$s(n),o=r===((e=n.ownerDocument)==null?void 0:e.body),i=Pe(r);if(o){const c=ca(i);return a.concat(i,i.visualViewport||[],Dr(r)?r:[],c&&t?Sn(c):[])}else return a.concat(r,Sn(r,[],t))}function ca(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function Ns(n){const a=Fe(n);let t=parseFloat(a.width)||0,e=parseFloat(a.height)||0;const r=Dt(n),o=r?n.offsetWidth:t,i=r?n.offsetHeight:e,c=or(t)!==o||or(e)!==i;return c&&(t=o,e=i),{width:t,height:e,$:c}}function va(n){return Me(n)?n:n.contextElement}function Jt(n){const a=va(n);if(!Dt(a))return it(1);const t=a.getBoundingClientRect(),{width:e,height:r,$:o}=Ns(a);let i=(o?or(t.width):t.width)/e,c=(o?or(t.height):t.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const _u=it(0);function Os(n){const a=Pe(n);return!ba()||!a.visualViewport?_u:{x:a.visualViewport.offsetLeft,y:a.visualViewport.offsetTop}}function Pu(n,a,t){return a===void 0&&(a=!1),!!t&&a&&t===Pe(n)}function Lt(n,a,t,e){a===void 0&&(a=!1),t===void 0&&(t=!1);const r=n.getBoundingClientRect(),o=va(n);let i=it(1);a&&(e?Me(e)&&(i=Jt(e)):i=Jt(n));const c=Pu(o,t,e)?Os(o):it(0);let l=(r.left+c.x)/i.x,p=(r.top+c.y)/i.y,u=r.width/i.x,h=r.height/i.y;if(o&&e){const y=Pe(o),g=Me(e)?Pe(e):e;let b=y,w=ca(b);for(;w&&g!==b;){const f=Jt(w),D=w.getBoundingClientRect(),S=Fe(w),j=D.left+(w.clientLeft+parseFloat(S.paddingLeft))*f.x,T=D.top+(w.clientTop+parseFloat(S.paddingTop))*f.y;l*=f.x,p*=f.y,u*=f.x,h*=f.y,l+=j,p+=T,b=Pe(w),w=ca(b)}}return sr({width:u,height:h,x:l,y:p})}function Mr(n,a){const t=Sr(n).scrollLeft;return a?a.left+t:Lt(ht(n)).left+t}function As(n,a){const t=n.getBoundingClientRect(),e=t.left+a.scrollLeft-Mr(n,t),r=t.top+a.scrollTop;return{x:e,y:r}}function Iu(n){let{elements:a,rect:t,offsetParent:e,strategy:r}=n;const o=r==="fixed",i=ht(e),c=a?Cr(a.floating):!1;if(e===i||c&&o)return t;let l={scrollLeft:0,scrollTop:0},p=it(1);const u=it(0),h=Dt(e);if((h||!o)&&((sn(e)!=="body"||Dr(i))&&(l=Sr(e)),h)){const g=Lt(e);p=Jt(e),u.x=g.x+e.clientLeft,u.y=g.y+e.clientTop}const y=i&&!h&&!o?As(i,l):it(0);return{width:t.width*p.x,height:t.height*p.y,x:t.x*p.x-l.scrollLeft*p.x+u.x+y.x,y:t.y*p.y-l.scrollTop*p.y+u.y+y.y}}function ju(n){return n.getClientRects?Array.from(n.getClientRects()):[]}function Eu(n){const a=Sr(n),t=n.ownerDocument.body,e=Et(n.scrollWidth,n.clientWidth,t.scrollWidth,t.clientWidth),r=Et(n.scrollHeight,n.clientHeight,t.scrollHeight,t.clientHeight);let o=-a.scrollLeft+Mr(n);const i=-a.scrollTop;return Fe(t).direction==="rtl"&&(o+=Et(n.clientWidth,t.clientWidth)-e),{width:e,height:r,x:o,y:i}}const Tu=25;function $u(n,a,t){t===void 0&&(t="viewport");const e=t==="layoutViewport",r=Pe(n),o=ht(n),i=r.visualViewport;let c=o.clientWidth,l=o.clientHeight,p=0,u=0;if(i){const y=!ba()||a==="fixed";e?y||(p=-i.offsetLeft,u=-i.offsetTop):(c=i.width,l=i.height,y&&(p=i.offsetLeft,u=i.offsetTop))}if(Mr(o)<=0){const y=o.ownerDocument,g=y.body,b=getComputedStyle(g),w=y.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,f=Math.abs(o.clientWidth-g.clientWidth-w),D=getComputedStyle(o).scrollbarGutter==="stable both-edges"?f/2:f;D<=Tu&&(c-=D)}return{width:c,height:l,x:p,y:u}}function Nu(n,a){const t=Lt(n,!0,a==="fixed"),e=t.top+n.clientTop,r=t.left+n.clientLeft,o=Jt(n),i=n.clientWidth*o.x,c=n.clientHeight*o.y,l=r*o.x,p=e*o.y;return{width:i,height:c,x:l,y:p}}function mo(n,a,t){let e;if(a==="viewport"||a==="layoutViewport")e=$u(n,t,a);else if(a==="document")e=Eu(ht(n));else if(Me(a))e=Nu(a,t);else{const r=Os(n);e={x:a.x-r.x,y:a.y-r.y,width:a.width,height:a.height}}return sr(e)}function Ou(n,a){const t=a.get(n);if(t)return t;let e=Sn(n,[],!1).filter(c=>Me(c)&&sn(c)!=="body"),r=null;const o=Fe(n).position==="fixed";let i=o?Rt(n):n;for(;Me(i)&&!Cn(i);){const c=Fe(i),l=ya(i),p=r?r.position:o?"fixed":"";!l&&(p==="fixed"||p==="absolute"&&c.position==="static")?e=e.filter(h=>h!==i):r=c,i=Rt(i)}return a.set(n,e),e}function Au(n){let{element:a,boundary:t,rootBoundary:e,strategy:r}=n;const i=[...t==="clippingAncestors"?Cr(a)?[]:Ou(a,this._c):[].concat(t),e],c=mo(a,i[0],r);let l=c.top,p=c.right,u=c.bottom,h=c.left;for(let y=1;y<i.length;y++){const g=mo(a,i[y],r);l=Et(g.top,l),p=tn(g.right,p),u=tn(g.bottom,u),h=Et(g.left,h)}return{width:p-h,height:u-l,x:h,y:l}}function Ru(n){const{width:a,height:t}=Ns(n);return{width:a,height:t}}function Lu(n,a,t){const e=Dt(a),r=ht(a),o=t==="fixed",i=Lt(n,!0,o,a);let c={scrollLeft:0,scrollTop:0};const l=it(0);if((e||!o)&&((sn(a)!=="body"||Dr(r))&&(c=Sr(a)),e)){const y=Lt(a,!0,o,a);l.x=y.x+a.clientLeft,l.y=y.y+a.clientTop}!e&&r&&(l.x=Mr(r));const p=r&&!e&&!o?As(r,c):it(0),u=i.left+c.scrollLeft-l.x-p.x,h=i.top+c.scrollTop-l.y-p.y;return{x:u,y:h,width:i.width,height:i.height}}function Hr(n){return Fe(n).position==="static"}function go(n,a){if(!Dt(n)||Fe(n).position==="fixed")return null;if(a)return a(n);let t=n.offsetParent;return ht(n)===t&&(t=t.ownerDocument.body),t}function Rs(n,a){const t=Pe(n);if(Cr(n))return t;if(!Dt(n)){let r=Rt(n);for(;r&&!Cn(r);){if(Me(r)&&!Hr(r))return r;r=Rt(r)}return t}let e=go(n,a);for(;e&&Du(e)&&Hr(e);)e=go(e,a);return e&&Cn(e)&&Hr(e)&&!ya(e)?t:e||Mu(n)||t}const Fu=async function(n){const a=this.getOffsetParent||Rs,t=this.getDimensions,e=await t(n.floating);return{reference:Lu(n.reference,await a(n.floating),n.strategy),floating:{x:0,y:0,width:e.width,height:e.height}}};function Yu(n){return Fe(n).direction==="rtl"}const Wu={convertOffsetParentRelativeRectToViewportRelativeRect:Iu,getDocumentElement:ht,getClippingRect:Au,getOffsetParent:Rs,getElementRects:Fu,getClientRects:ju,getDimensions:Ru,getScale:Jt,isElement:Me,isRTL:Yu};function Ls(n,a){return n.x===a.x&&n.y===a.y&&n.width===a.width&&n.height===a.height}function Bu(n,a,t){let e=null,r;const o=ht(n);function i(){var u;clearTimeout(r),(u=e)==null||u.disconnect(),e=null}function c(u,h){u===void 0&&(u=!1),h===void 0&&(h=1),i();const y=n.getBoundingClientRect(),{left:g,top:b,width:w,height:f}=y;if(u||a(),!w||!f)return;const D=Wn(b),S=Wn(o.clientWidth-(g+w)),j=Wn(o.clientHeight-(b+f)),T=Wn(g),$={rootMargin:-D+"px "+-S+"px "+-j+"px "+-T+"px",threshold:Et(0,tn(1,h))||1};let C=!0;function k(_){const E=_[0].intersectionRatio;if(!Ls(y,n.getBoundingClientRect()))return c();if(E!==h){if(!C)return c();E?c(!1,E):r=setTimeout(()=>{c(!1,1e-7)},1e3)}C=!1}try{e=new IntersectionObserver(k,{...$,root:o.ownerDocument})}catch{e=new IntersectionObserver(k,$)}e.observe(n)}const l=Pe(n),p=()=>c(t);return l.addEventListener("resize",p),c(!0),()=>{l.removeEventListener("resize",p),i()}}function Hu(n,a,t,e){e===void 0&&(e={});const{ancestorScroll:r=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=e,p=va(n),u=r||o?[...p?Sn(p):[],...a?Sn(a):[]]:[];u.forEach(D=>{r&&D.addEventListener("scroll",t),o&&D.addEventListener("resize",t)});const h=p&&c?Bu(p,t,o):null;let y=-1,g=null;i&&(g=new ResizeObserver(D=>{let[S]=D;S&&S.target===p&&g&&a&&(g.unobserve(a),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var j;(j=g)==null||j.observe(a)})),t()}),p&&!l&&g.observe(p),a&&g.observe(a));let b,w=l?Lt(n):null;l&&f();function f(){const D=Lt(n);w&&!Ls(w,D)&&t(),w=D,b=requestAnimationFrame(f)}return t(),()=>{var D;u.forEach(S=>{r&&S.removeEventListener("scroll",t),o&&S.removeEventListener("resize",t)}),h==null||h(),(D=g)==null||D.disconnect(),g=null,l&&cancelAnimationFrame(b)}}const zu=ku,qu=bu,xo=yu,Qu=(n,a,t)=>{const e=new Map,r=t??{},o={...Wu,...r.platform,_c:e};return xu(n,a,{...r,platform:o})};var Ku=typeof document<"u",Vu=function(){},Gn=Ku?v.useLayoutEffect:Vu;function cr(n,a){if(n===a)return!0;if(typeof n!=typeof a)return!1;if(typeof n=="function"&&n.toString()===a.toString())return!0;let t,e,r;if(n&&a&&typeof n=="object"){if(Array.isArray(n)){if(t=n.length,t!==a.length)return!1;for(e=t;e--!==0;)if(!cr(n[e],a[e]))return!1;return!0}if(r=Object.keys(n),t=r.length,t!==Object.keys(a).length)return!1;for(e=t;e--!==0;)if(!{}.hasOwnProperty.call(a,r[e]))return!1;for(e=t;e--!==0;){const o=r[e];if(!(o==="_owner"&&n.$$typeof)&&!cr(n[o],a[o]))return!1}return!0}return n!==n&&a!==a}function Fs(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function yo(n,a){const t=Fs(n);return Math.round(a*t)/t}function zr(n){const a=v.useRef(n);return Gn(()=>{a.current=n}),a}function Uu(n){n===void 0&&(n={});const{placement:a="bottom",strategy:t="absolute",middleware:e=[],platform:r,elements:{reference:o,floating:i}={},transform:c=!0,whileElementsMounted:l,open:p}=n,[u,h]=v.useState({x:0,y:0,strategy:t,placement:a,middlewareData:{},isPositioned:!1}),[y,g]=v.useState(e);cr(y,e)||g(e);const[b,w]=v.useState(null),[f,D]=v.useState(null),S=v.useCallback(P=>{P!==$.current&&($.current=P,w(P))},[]),j=v.useCallback(P=>{P!==C.current&&(C.current=P,D(P))},[]),T=o||b,O=i||f,$=v.useRef(null),C=v.useRef(null),k=v.useRef(u),_=l!=null,E=zr(l),N=zr(r),A=zr(p),B=v.useCallback(()=>{if(!$.current||!C.current)return;const P={placement:a,strategy:t,middleware:y};N.current&&(P.platform=N.current),Qu($.current,C.current,P).then(K=>{const ie={...K,isPositioned:A.current!==!1};U.current&&!cr(k.current,ie)&&(k.current=ie,qc.flushSync(()=>{h(ie)}))})},[y,a,t,N,A]);Gn(()=>{p===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,h(P=>({...P,isPositioned:!1})))},[p]);const U=v.useRef(!1);Gn(()=>(U.current=!0,()=>{U.current=!1}),[]),Gn(()=>{if(T&&($.current=T),O&&(C.current=O),T&&O){if(E.current)return E.current(T,O,B);B()}},[T,O,B,E,_]);const Q=v.useMemo(()=>({reference:$,floating:C,setReference:S,setFloating:j}),[S,j]),L=v.useMemo(()=>({reference:T,floating:O}),[T,O]),q=v.useMemo(()=>{const P={position:t,left:0,top:0};if(!L.floating)return P;const K=yo(L.floating,u.x),ie=yo(L.floating,u.y);return c?{...P,transform:"translate("+K+"px, "+ie+"px)",...Fs(L.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:K,top:ie}},[t,c,L.floating,u.x,u.y]);return v.useMemo(()=>({...u,update:B,refs:Q,elements:L,floatingStyles:q}),[u,B,Q,L,q])}const Xu=n=>{function a(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:n,fn(t){const{element:e,padding:r}=typeof n=="function"?n(t):n;return e&&a(e)?e.current!=null?xo({element:e.current,padding:r}).fn(t):{}:e?xo({element:e,padding:r}).fn(t):{}}}},Gu=(n,a)=>{const t=zu(n);return{name:t.name,fn:t.fn,options:[n,a]}},Ju=(n,a)=>{const t=qu(n);return{name:t.name,fn:t.fn,options:[n,a]}},Zu=(n,a)=>{const t=Xu(n);return{name:t.name,fn:t.fn,options:[n,a]}},Ys=216n,ep=(1n<<Ys)-1n;function tp(n){const a=typeof n=="bigint"?n:BigInt(n.trim());if(a<0n)throw new Error(`Invalid tokenId: ${String(n)}`);return{itemId:(a>>Ys).toString(),issuedId:(a&ep).toString()}}function np(n){if(!n)return null;try{return tp(n).itemId}catch{return null}}function bo(n,a){return a.kind==="listed"?{...n,isOnSale:!0,listingPrice:a.priceCredits,tradeId:a.tradeId??n.tradeId}:{...n,isOnSale:!1,listingPrice:void 0,tradeId:void 0}}function qr(n,a,t){const{address:e,contractAddress:r,tokenId:o}=a;if(!r||!o)return;const i=`${r}-${o}`;n.cancelQueries({queryKey:["owned-token",r,o]}),n.cancelQueries({queryKey:["secondary-sale-state"]}),e&&n.cancelQueries({queryKey:["my-assets",e]});const c=t.kind==="gone";n.setQueriesData({queryKey:["owned-token",r,o]},p=>p&&(c?null:bo(p,t)));const l=e?["my-assets",e]:["my-assets"];n.setQueriesData({queryKey:l},p=>p!=null&&p.pages?{...p,pages:p.pages.map(u=>{if(c){const h=u.items.filter(y=>!(y.contractAddress===r&&y.tokenId===o));return{...u,items:h,total:Math.max(0,u.total-(u.items.length-h.length))}}return{...u,items:u.items.map(h=>h.contractAddress===r&&h.tokenId===o?bo(h,t):h)}})}:p),n.setQueriesData({queryKey:["secondary-sale-state"]},p=>{var h;if(!p)return p;const u={...p};return t.kind==="removed"||t.kind==="gone"?delete u[i]:u[i]={priceCredits:t.priceCredits,tradeId:t.tradeId??((h=u[i])==null?void 0:h.tradeId)??""},u})}function rp(n){return!(n.isMarket||n.forSale&&n.priceKnown||n.manage||n.soldOutWithResale||!n.stillResolving&&!n.resolvingTrade&&(n.isTokenRoute?!n.ownedAssetLoading:!n.deepLinkLoading))}const ap="data:image/webp;base64,UklGRqgOAABXRUJQVlA4IJwOAACwOwCdASqEAIsAPj0YikMiIaEWuib4IAPEtQBl0QC/bukK7J6X8cPZP5F69/Nvhj8oPlD3odY/QB8RXPv/C+3n59+izzA/0l/3/9064PmD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ADj+rzqjSoqwVTnCCjOKrF1Gt1i+6oeDggdd5wEh1ghvxdHELxvJeJE8x82cfHEVXhE9Nheu7Q1WycLXUTZA8oZHsdBaBFpk6vyYdYFT8YTShaCjPle1+2DJHzXzhRUQ6ZY/HcDs/vS2V8+jO+pjV23u5WL6yRWULzVi+0qUXIiJzd9qj65YnWPMxIubcSpm+5n8vMpysoMuGzoNwBmNszF+S+b8acZRgm2Gi0UT5OGuYwq4wZ5kmd8OqnDzhze2RxwMRtRm+17eKYWzLWtgVuOca/HWuBI58UC9FNZtBLv1l2htg7Iyehb/cr9uKvXkPXh0LFeyfEc49dOsGvppssGqOAAAAA=",ip=m.div`
3
3
  display: flex;
4
4
  flex-direction: column;
5
5
  gap: 24px;
@@ -1705,7 +1705,7 @@ var Hc=Object.defineProperty;var zc=(n,a,t)=>a in n?Hc(n,a,{enumerable:!0,config
1705
1705
  margin-top: 18px;
1706
1706
  `,Ni=m(Pn)`
1707
1707
  flex: 1;
1708
- `;function Oi(n){if(en(n))return x("errors.rejected");const a=(n.message??"").toLowerCase();return a.includes("insufficient")?x("marketCheckout.error.insufficient",{currency:vt.name}):a.includes("not found")||a.includes("no active listing")||a.includes("404")?x("marketCheckout.error.soldOrRemoved"):a.includes("your own listing")?x("errors.cantBuyOwn"):x("marketCheckout.error.generic")}function ny(n){return{id:n.tradeId,tradeId:n.tradeId,name:n.name,creator:n.creator,contractAddress:n.contractAddress,itemId:n.itemId,category:n.category,wearableCategory:n.wearableCategory??void 0,rarity:n.rarity,network:n.network,chainId:n.chainId,thumbnail:n.thumbnail,priceCredits:0,gender:null,isSmart:!1}}function yc({listing:n,rate:a,onClose:t,onSold:e}){const{session:r}=Ot(),{data:o,isError:i}=ps(r),c=Bt(),l=Wt(),[p,u]=v.useState("confirm"),[h,y]=v.useState(x("marketCheckout.lockingPrice")),[g,b]=v.useState(null),[w,f]=v.useState(null),D=v.useRef(null),S=rr(Wr(n.manaWei,a));v.useEffect(()=>{let C=!1;if(!r){u("error"),b(x("buyModal.signInToCheckout"));return}return(async()=>{try{const _=await ys(n.tradeId);if(!_)throw new Error("not found");if(fs(_,r.address))throw new Error("You can't buy your own listing.");const E=Wr(n.manaWei,a);if(!Number.isFinite(E)||E<=0)throw new Error("price unavailable");const{credit:N,maxCreditedValue:A,usdCents:B}=await oa(r.identity,E,n.tradeId);if(C){$e(r.identity,[N.id]).catch(()=>{});return}D.current=N.id,f({trade:_,credit:N,maxCreditedValue:A,usdCents:B,credits:rr(B)}),y("")}catch(_){if(C)return;console.error("[market] authorize failed",_),le(at(_)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"authorize",error_code:Xe(_),value_usd:Math.round(Wr(n.manaWei,a))/100}),u("error"),b(Oi(_))}})(),()=>{C=!0,D.current&&r&&($e(r.identity,[D.current]).catch(()=>{}),D.current=null)}},[]);const j=!!w&&o!=null&&o.credits<w.credits;async function T(){if(!r||!w)return;if(j){le("Shop Buy Credits Prompted",{from:"item_checkout",credits_needed:w.credits,credits_balance:(o==null?void 0:o.credits)??0,shortfall:Math.max(0,w.credits-((o==null?void 0:o.credits)??0))}),$e(r.identity,[w.credit.id]).catch(()=>{}),D.current=null,l("/credits");return}u("working"),b(null);let C=!1;try{y(x("marketCheckout.confirming"));const k={trade:w.trade,buyer:r.address,signer:r.signer,credits:[w.credit],maxCreditedValue:w.maxCreditedValue};let _;if(ks())try{_=await Ss(k),await Ms(_),C=!0}catch(N){if(N instanceof _s)C=!0;else if(N instanceof Ps)_=await ar(k);else throw N}else _=await ar(k);D.current=null,le("Shop Completed Purchase",{items:[{item_id:n.itemId??null,contract_address:n.contractAddress,token_id:null,price_usd:w.usdCents/100}],value_credits:w.credits,value_usd:w.usdCents/100,purchase_type:"item",is_primary:!0,payment_type:"credits",no_crypto_step:C,transaction_hash:_??null}),c.invalidateQueries({queryKey:["usd-balance"]}),c.invalidateQueries({queryKey:["detail-trade"]}),c.invalidateQueries({queryKey:["shop-item"]}),c.invalidateQueries({queryKey:["item-resales",n.contractAddress,n.itemId]}),c.invalidateQueries({queryKey:["shop-items"]}),c.invalidateQueries({queryKey:["catalog-items"]}),c.invalidateQueries({queryKey:["my-assets"]}),c.invalidateQueries({queryKey:["purchases"]});const E={items:[ny(n)],txHash:_};l("/success",{state:E})}catch(k){console.error("[market] buy now failed",k),$e(r.identity,[w.credit.id]).catch(()=>{}),D.current=null,le(at(k)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Xe(k),value_usd:w.usdCents/100}),c.invalidateQueries({queryKey:["usd-balance"]}),b(Oi(k)),u("error");const _=(k.message??"").toLowerCase();(_.includes("not found")||_.includes("no active listing")||_.includes("404"))&&e()}}function O(){r&&w&&$e(r.identity,[w.credit.id]).catch(()=>{}),D.current=null,t()}const $=p==="working";return s.jsxs(qx,{role:"dialog","aria-modal":"true","aria-label":x("buyModal.dialogAria",{name:n.name}),children:[s.jsx(Qx,{onClick:$?void 0:O,"aria-hidden":!0}),s.jsxs(Kx,{children:[s.jsxs(Vx,{children:[s.jsx(Ux,{children:n.thumbnail?s.jsx("img",{src:n.thumbnail,alt:""}):null}),s.jsxs("div",{children:[s.jsx(Xx,{title:n.name,children:n.name||x("buyModal.itemFallback")}),s.jsx(xs,{"data-variant":"rarity",children:n.rarity})]})]}),s.jsx(Gx,{children:w?s.jsxs(s.Fragment,{children:[s.jsx(Ii,{children:x("marketCheckout.finalPrice")}),s.jsxs(ji,{children:[s.jsx(Ei,{}),ao(w.credits)]}),s.jsxs(Ti,{className:"muted",children:[x("marketCheckout.lockedForPurchase")," · $",(w.usdCents/100).toFixed(2)]})]}):s.jsxs(s.Fragment,{children:[s.jsx(Ii,{children:x("marketCheckout.todaysPrice")}),s.jsxs(ji,{"data-approx":!0,children:[s.jsx(Jx,{"aria-hidden":!0,children:"≈"}),s.jsx(Ei,{}),ao(S)]}),s.jsx(Ti,{className:"muted",children:h||x("marketCheckout.lockingPrice")})]})}),r?s.jsxs(Zx,{className:"muted",children:[x("marketCheckout.yourBalance")," ",s.jsx(_e,{className:"ccy-mark"})," ",rl(o,i)]}):null,j?s.jsx($i,{className:"muted",children:x("marketCheckout.needMore",{currency:vt.name})}):null,h&&p==="working"?s.jsx($i,{className:"muted",children:h}):null,s.jsx(ey,{message:g}),s.jsxs(ty,{children:[s.jsx(Ni,{variant:"ghost",onClick:O,disabled:$,children:x("buyModal.cancel")}),s.jsx(Ni,{variant:"purple",onClick:()=>void T(),disabled:$||!w,children:$?x("marketCheckout.buying"):j?x("nav.getCredits",{currency:vt.name}):x("marketCheckout.confirmPurchase")})]})]})]})}const ry=v.lazy(async()=>{const[{EmoteControls:n},{Experimental_CssVarsProvider:a},{light:t}]=await Promise.all([Fr(()=>import("./index-IpXUe6yn.js").then(e=>e.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])),Fr(()=>import("./index-BVBprbPq.js"),__vite__mapDeps([12,3,1,4,2,5,6,7,13,14,9])),Fr(()=>import("./index-CI7-G5Oy.js").then(e=>e.c0),__vite__mapDeps([3,1,4,2,5,6,7]))]);return{default:e=>s.jsx(a,{theme:t,children:s.jsx(n,{...e})})}});function ay(n){return s.jsx(v.Suspense,{fallback:null,children:s.jsx(ry,{...n})})}function oy(){const n=v.useRef(null),[a,t]=v.useState(!0),[e,r]=v.useState(()=>typeof document>"u"||document.visibilityState!=="hidden");return v.useEffect(()=>{const o=n.current;if(!o||typeof IntersectionObserver>"u")return;const i=new IntersectionObserver(c=>t(c.some(l=>l.isIntersecting)),{rootMargin:"200px"});return i.observe(o),()=>i.disconnect()},[]),v.useEffect(()=>{if(typeof document>"u")return;const o=()=>r(document.visibilityState!=="hidden");return document.addEventListener("visibilitychange",o),()=>document.removeEventListener("visibilitychange",o)},[]),{ref:n,active:a&&e}}function iy(n){if(n)try{so.sendMessage(n,so.PreviewMessageType.CONTROLLER_REQUEST,{id:`dispose-${Date.now()}`,namespace:"scene",method:"cleanup",params:[]})}catch{}}const{colors:ce,media:Ia}=d,sy=al`
1708
+ `;function Oi(n){if(en(n))return x("errors.rejected");const a=(n.message??"").toLowerCase();return a.includes("insufficient")?x("marketCheckout.error.insufficient",{currency:vt.name}):a.includes("not found")||a.includes("no active listing")||a.includes("404")?x("marketCheckout.error.soldOrRemoved"):a.includes("your own listing")?x("errors.cantBuyOwn"):x("marketCheckout.error.generic")}function ny(n){return{id:n.tradeId,tradeId:n.tradeId,name:n.name,creator:n.creator,contractAddress:n.contractAddress,itemId:n.itemId,category:n.category,wearableCategory:n.wearableCategory??void 0,rarity:n.rarity,network:n.network,chainId:n.chainId,thumbnail:n.thumbnail,priceCredits:0,gender:null,isSmart:!1}}function yc({listing:n,rate:a,onClose:t,onSold:e}){const{session:r}=Ot(),{data:o,isError:i}=ps(r),c=Bt(),l=Wt(),[p,u]=v.useState("confirm"),[h,y]=v.useState(x("marketCheckout.lockingPrice")),[g,b]=v.useState(null),[w,f]=v.useState(null),D=v.useRef(null),S=rr(Wr(n.manaWei,a));v.useEffect(()=>{let C=!1;if(!r){u("error"),b(x("buyModal.signInToCheckout"));return}return(async()=>{try{const _=await ys(n.tradeId);if(!_)throw new Error("not found");if(fs(_,r.address))throw new Error("You can't buy your own listing.");const E=Wr(n.manaWei,a);if(!Number.isFinite(E)||E<=0)throw new Error("price unavailable");const{credit:N,maxCreditedValue:A,usdCents:B}=await oa(r.identity,E,n.tradeId);if(C){$e(r.identity,[N.id]).catch(()=>{});return}D.current=N.id,f({trade:_,credit:N,maxCreditedValue:A,usdCents:B,credits:rr(B)}),y("")}catch(_){if(C)return;console.error("[market] authorize failed",_),le(at(_)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"authorize",error_code:Xe(_),value_usd:Math.round(Wr(n.manaWei,a))/100}),u("error"),b(Oi(_))}})(),()=>{C=!0,D.current&&r&&($e(r.identity,[D.current]).catch(()=>{}),D.current=null)}},[]);const j=!!w&&o!=null&&o.credits<w.credits;async function T(){if(!r||!w)return;if(j){le("Shop Buy Credits Prompted",{from:"item_checkout",credits_needed:w.credits,credits_balance:(o==null?void 0:o.credits)??0,shortfall:Math.max(0,w.credits-((o==null?void 0:o.credits)??0))}),$e(r.identity,[w.credit.id]).catch(()=>{}),D.current=null,l("/credits");return}u("working"),b(null);let C=!1;try{y(x("marketCheckout.confirming"));const k={trade:w.trade,buyer:r.address,signer:r.signer,credits:[w.credit],maxCreditedValue:w.maxCreditedValue};let _;if(ks())try{_=await Ss(k),await Ms(_),C=!0}catch(N){if(N instanceof _s)C=!0;else if(N instanceof Ps)_=await ar(k);else throw N}else _=await ar(k);D.current=null,le("Shop Completed Purchase",{items:[{item_id:n.itemId??null,contract_address:n.contractAddress,token_id:null,price_usd:w.usdCents/100}],value_credits:w.credits,value_usd:w.usdCents/100,purchase_type:"item",is_primary:!0,payment_type:"credits",no_crypto_step:C,transaction_hash:_??null}),c.invalidateQueries({queryKey:["usd-balance"]}),c.invalidateQueries({queryKey:["detail-trade"]}),c.invalidateQueries({queryKey:["shop-item"]}),c.invalidateQueries({queryKey:["item-resales",n.contractAddress,n.itemId]}),c.invalidateQueries({queryKey:["shop-items"]}),c.invalidateQueries({queryKey:["catalog-items"]}),c.invalidateQueries({queryKey:["my-assets"]}),c.invalidateQueries({queryKey:["purchases"]});const E={items:[ny(n)],txHash:_};l("/success",{state:E})}catch(k){console.error("[market] buy now failed",k),$e(r.identity,[w.credit.id]).catch(()=>{}),D.current=null,le(at(k)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Xe(k),value_usd:w.usdCents/100}),c.invalidateQueries({queryKey:["usd-balance"]}),b(Oi(k)),u("error");const _=(k.message??"").toLowerCase();(_.includes("not found")||_.includes("no active listing")||_.includes("404"))&&e()}}function O(){r&&w&&$e(r.identity,[w.credit.id]).catch(()=>{}),D.current=null,t()}const $=p==="working";return s.jsxs(qx,{role:"dialog","aria-modal":"true","aria-label":x("buyModal.dialogAria",{name:n.name}),children:[s.jsx(Qx,{onClick:$?void 0:O,"aria-hidden":!0}),s.jsxs(Kx,{children:[s.jsxs(Vx,{children:[s.jsx(Ux,{children:n.thumbnail?s.jsx("img",{src:n.thumbnail,alt:""}):null}),s.jsxs("div",{children:[s.jsx(Xx,{title:n.name,children:n.name||x("buyModal.itemFallback")}),s.jsx(xs,{"data-variant":"rarity",children:n.rarity})]})]}),s.jsx(Gx,{children:w?s.jsxs(s.Fragment,{children:[s.jsx(Ii,{children:x("marketCheckout.finalPrice")}),s.jsxs(ji,{children:[s.jsx(Ei,{}),ao(w.credits)]}),s.jsxs(Ti,{className:"muted",children:[x("marketCheckout.lockedForPurchase")," · $",(w.usdCents/100).toFixed(2)]})]}):s.jsxs(s.Fragment,{children:[s.jsx(Ii,{children:x("marketCheckout.todaysPrice")}),s.jsxs(ji,{"data-approx":!0,children:[s.jsx(Jx,{"aria-hidden":!0,children:"≈"}),s.jsx(Ei,{}),ao(S)]}),s.jsx(Ti,{className:"muted",children:h||x("marketCheckout.lockingPrice")})]})}),r?s.jsxs(Zx,{className:"muted",children:[x("marketCheckout.yourBalance")," ",s.jsx(_e,{className:"ccy-mark"})," ",rl(o,i)]}):null,j?s.jsx($i,{className:"muted",children:x("marketCheckout.needMore",{currency:vt.name})}):null,h&&p==="working"?s.jsx($i,{className:"muted",children:h}):null,s.jsx(ey,{message:g}),s.jsxs(ty,{children:[s.jsx(Ni,{variant:"ghost",onClick:O,disabled:$,children:x("buyModal.cancel")}),s.jsx(Ni,{variant:"purple",onClick:()=>void T(),disabled:$||!w,children:$?x("marketCheckout.buying"):j?x("nav.getCredits",{currency:vt.name}):x("marketCheckout.confirmPurchase")})]})]})]})}const ry=v.lazy(async()=>{const[{EmoteControls:n},{Experimental_CssVarsProvider:a},{light:t}]=await Promise.all([Fr(()=>import("./index-JdIW5UKh.js").then(e=>e.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])),Fr(()=>import("./index-BMcBFcyk.js"),__vite__mapDeps([12,3,1,4,2,5,6,7,13,14,9])),Fr(()=>import("./index-D7ZWH6NI.js").then(e=>e.c0),__vite__mapDeps([3,1,4,2,5,6,7]))]);return{default:e=>s.jsx(a,{theme:t,children:s.jsx(n,{...e})})}});function ay(n){return s.jsx(v.Suspense,{fallback:null,children:s.jsx(ry,{...n})})}function oy(){const n=v.useRef(null),[a,t]=v.useState(!0),[e,r]=v.useState(()=>typeof document>"u"||document.visibilityState!=="hidden");return v.useEffect(()=>{const o=n.current;if(!o||typeof IntersectionObserver>"u")return;const i=new IntersectionObserver(c=>t(c.some(l=>l.isIntersecting)),{rootMargin:"200px"});return i.observe(o),()=>i.disconnect()},[]),v.useEffect(()=>{if(typeof document>"u")return;const o=()=>r(document.visibilityState!=="hidden");return document.addEventListener("visibilitychange",o),()=>document.removeEventListener("visibilitychange",o)},[]),{ref:n,active:a&&e}}function iy(n){if(n)try{so.sendMessage(n,so.PreviewMessageType.CONTROLLER_REQUEST,{id:`dispose-${Date.now()}`,namespace:"scene",method:"cleanup",params:[]})}catch{}}const{colors:ce,media:Ia}=d,sy=al`
1709
1709
  to {
1710
1710
  transform: rotate(360deg);
1711
1711
  }
@@ -1,4 +1,4 @@
1
- import{r as l,j as c}from"./react-vyZjIDcS.js";import{s as u,B as f,d}from"./index-CI7-G5Oy.js";const p=u.div`
1
+ import{r as l,j as c}from"./react-vyZjIDcS.js";import{s as u,B as f,d}from"./index-D7ZWH6NI.js";const p=u.div`
2
2
  display: flex;
3
3
  justify-content: center;
4
4
  padding: 28px 0 8px;
@@ -1,4 +1,4 @@
1
- import{L as Y,K as Ke,M,bp as vt,b2 as mt,bn as we}from"./index-CI7-G5Oy.js";import{h as De,R as Me,r as O,j as X,d as nn,i as rn,g as on}from"./react-vyZjIDcS.js";import{g as jt,a as Nt,c as Lt,b as Ye,s as Ze,d as an,f as sn}from"./clsx-TVl4Fw6R.js";import{_ as ln,T as Wt,u as ue,s as ht,o as je,a as un}from"./createSvgIcon-D7_Tfkk2.js";import{u as cn}from"./useTheme-Gc9pyKB2.js";function fn(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}var Fe={exports:{}},S={};/**
1
+ import{L as Y,K as Ke,M,bp as vt,b2 as mt,bn as we}from"./index-D7ZWH6NI.js";import{h as De,R as Me,r as O,j as X,d as nn,i as rn,g as on}from"./react-vyZjIDcS.js";import{g as jt,a as Nt,c as Lt,b as Ye,s as Ze,d as an,f as sn}from"./clsx-BhtvxQSI.js";import{_ as ln,T as Wt,u as ue,s as ht,o as je,a as un}from"./createSvgIcon-BYM3dfXO.js";import{u as cn}from"./useTheme-CQoRc-Qt.js";function fn(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}var Fe={exports:{}},S={};/**
2
2
  * @license React
3
3
  * react-is.production.min.js
4
4
  *
@@ -1,4 +1,4 @@
1
- import{L as be,u as Ue,r as c,j as t}from"./react-vyZjIDcS.js";import{s as a,t as s,I as k,l as He,d as r,m as We,n as re,u as _,B as Ye,S as D,A as U,o as Qe,c as we,q as Ve,v as Ze}from"./index-CI7-G5Oy.js";import{f as Je}from"./import-0QitgW4n.js";import{f as Xe}from"./builder-eGBIg94P.js";import{L as et}from"./LoadMore-Dwif0bmX.js";import{R as H,C as tt,a as st,F as ot,S as ae}from"./categories-C5Ash7Cl.js";import{D as ie,F as le,R as nt,a as rt,b as at,c as it,d as lt,S as ct,e as dt,f as mt,g as pt,h as ut,i as ft,j as xt,k as ht,C as yt,l as gt,m as bt,n as wt,M as St}from"./Assets.styles-BZLdspHO.js";import{u as jt}from"./useInfiniteGrid-CkvYLplF.js";import{u as $t}from"./useSecondarySales-DoB0_ije.js";import{E as ce}from"./ErrorNotice-C6J8i5JJ.js";import{n as Se}from"./Tooltip-ChqAjQ8a.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CpLYx0ea.js";import"./intl-CBcMB1D2.js";import"./buy-CqNJMeic.js";import"./authorizations-B71vkYZi.js";import"./sendMetaTransaction-zdWpVVA2.js";import"./trade-encoding-CaXvzcLt.js";import"./mana-rate-DMPR7xGG.js";import"./mana-convert-DV2llJXe.js";a.div`
1
+ import{L as be,u as Ue,r as c,j as t}from"./react-vyZjIDcS.js";import{s as a,t as s,I as k,l as He,d as r,m as We,n as re,u as _,B as Ye,S as D,A as U,o as Qe,c as we,q as Ve,v as Ze}from"./index-D7ZWH6NI.js";import{f as Je}from"./import-BGqRXoMi.js";import{f as Xe}from"./builder-CFj7Br94.js";import{L as et}from"./LoadMore-Tx57CQll.js";import{R as H,C as tt,a as st,F as ot,S as ae}from"./categories-KNpvobx-.js";import{D as ie,F as le,R as nt,a as rt,b as at,c as it,d as lt,S as ct,e as dt,f as mt,g as pt,h as ut,i as ft,j as xt,k as ht,C as yt,l as gt,m as bt,n as wt,M as St}from"./Assets.styles-DrXT8KZh.js";import{u as jt}from"./useInfiniteGrid-Ca2LjQTz.js";import{u as $t}from"./useSecondarySales-DAN8M0aA.js";import{E as ce}from"./ErrorNotice-rHvx0ML0.js";import{n as Se}from"./Tooltip-DFBlwayp.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CpLYx0ea.js";import"./intl-CBcMB1D2.js";import"./buy-5mCWsIPg.js";import"./authorizations-CP2LPBVO.js";import"./sendMetaTransaction-LxU_36sg.js";import"./trade-encoding-B9tOaOWk.js";import"./mana-rate-B3jNC9WL.js";import"./mana-convert-CTkOJWok.js";a.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 4px;
@@ -1,4 +1,4 @@
1
- import{L as p,r as d,j as t}from"./react-vyZjIDcS.js";import{t as l,s as e,l as x,d as o,O as m,A as h}from"./index-CI7-G5Oy.js";import{L as g}from"./LoadMore-Dwif0bmX.js";import{G as f}from"./grid.styles-Da_K81Vp.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CpLYx0ea.js";import"./intl-CBcMB1D2.js";const{colors:i,radius:u}=l,y=e.div`
1
+ import{L as p,r as d,j as t}from"./react-vyZjIDcS.js";import{t as l,s as e,l as x,d as o,O as m,A as h}from"./index-D7ZWH6NI.js";import{L as g}from"./LoadMore-Tx57CQll.js";import{G as f}from"./grid.styles-BaK36ERu.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CpLYx0ea.js";import"./intl-CBcMB1D2.js";const{colors:i,radius:u}=l,y=e.div`
2
2
  display: flex;
3
3
  align-items: baseline;
4
4
  gap: 12px;