@dcl/shop 0.7.3-31004613129.commit-29bd738 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_assets/{Activity-DHRw9r_G.js → Activity-BpEWDEgt.js} +9 -9
- package/_assets/{AnimatedBackground-lOgqKL4d.js → AnimatedBackground-whCeMUgc.js} +1 -1
- package/_assets/{Assets-VGMfDLPY.js → Assets-CH4B54Xy.js} +11 -11
- package/_assets/{Assets.styles-B_PmcugB.js → Assets.styles-DuSEfvzx.js} +2 -2
- package/_assets/{Authorizations-BDp7n41u.js → Authorizations-DTC0viZ7.js} +1 -1
- package/_assets/{Cart-Bs53nlQk.js → Cart-Ccdz2uXK.js} +2 -2
- package/_assets/{CircularProgress-BPWY_F37.js → CircularProgress-BkDrovgn.js} +1 -1
- package/_assets/{Collection-qqEYK-rA.js → Collection-LGp9HIwD.js} +3 -3
- package/_assets/{CollectionCarousel-C_JJAdFF.js → CollectionCarousel-CnR1So5p.js} +22 -22
- package/_assets/{ContentClient-C2puvDPt.js → ContentClient-CRr9ZuRH.js} +1 -1
- package/_assets/{Creator-BsWzWPDC.js → Creator-2jJw01qB.js} +21 -21
- package/_assets/{DeploymentBuilder-jIyneWTC.js → DeploymentBuilder-DYNbIRzZ.js} +1 -1
- package/_assets/{ErrorNotice-BiqT0Cec.js → ErrorNotice-BXWX_0E4.js} +1 -1
- package/_assets/{ExchangeController-PF6wI6Mp.js → ExchangeController-C_NxeYpZ.js} +1 -1
- package/_assets/{Faq-CwuXgMC7.js → Faq-BXT0tU5Q.js} +1 -1
- package/_assets/{GetCredits-CY9xW-3-.js → GetCredits-CiVv6zS4.js} +1 -1
- package/_assets/{Grow-nUylTs5m.js → Grow-d2ucdHqS.js} +1 -1
- package/_assets/{HelpersUtil-Bwy8o8bw.js → HelpersUtil-BsEaPmaI.js} +1 -1
- package/_assets/{ItemDetail-wxRF5CUO.js → ItemDetail-BxGSP-it.js} +1 -1
- package/_assets/LazyEmoteControls-D7IWhRxC.js +2 -0
- package/_assets/{LoadMore-oc9uIc47.js → LoadMore-DcIHY8Kf.js} +1 -1
- package/_assets/{ManaPricingBanner.styles-CEtfxA02.js → ManaPricingBanner.styles-CxOm66Fo.js} +1 -1
- package/_assets/{MyAssets-BFWp9KWR.js → MyAssets-BozGMHXd.js} +1 -1
- package/_assets/{MyFavorites-BC0Zj7CR.js → MyFavorites-wLuasEwD.js} +1 -1
- package/_assets/{NotFound-BZASz5NG.js → NotFound-D9deZR03.js} +1 -1
- package/_assets/{NotificationsBell-DvmmUfvh.js → NotificationsBell-DULYJmKs.js} +1 -1
- package/_assets/{OutfitDetail-UMdvdT0P.js → OutfitDetail-B28zoBrk.js} +1 -1
- package/_assets/{OutfitPreview-BgPOBB1N.js → OutfitPreview-GRiCEESc.js} +1 -1
- package/_assets/{OutfitStudio-BUW7MldY.js → OutfitStudio-D7500MAI.js} +5 -5
- package/_assets/{StoreSettings-Cf-k3hGA.js → StoreSettings-DK8rP1ia.js} +1 -1
- package/_assets/{Success-cUrjdiUL.js → Success-zZ3HkHoh.js} +8 -8
- package/_assets/{SwapController-DDZdhbmi.js → SwapController-LhvwgYfv.js} +1 -1
- package/_assets/{Tooltip-eMANvv6_.js → Tooltip-Dh6dtNV3.js} +1 -1
- package/_assets/{TradeService-K5TbzQm1.js → TradeService-DjBvwlyu.js} +1 -1
- package/_assets/{W3MFrameProviderSingleton-ipn1OWk5.js → W3MFrameProviderSingleton-DyHElSGY.js} +3 -3
- package/_assets/{WebCryptoP256-BzRIl457.js → WebCryptoP256-CGMChTjg.js} +1 -1
- package/_assets/{authorizations-gBmiqrl2.js → authorizations-w-yCHVpU.js} +1 -1
- package/_assets/{basic-BX6XcCy2.js → basic-BwriZEC-.js} +1 -1
- package/_assets/{biconomy-FZ6cxo6V.js → biconomy-CeViGwXz.js} +1 -1
- package/_assets/{builder-C63nhwMn.js → builder-CYMYImB0.js} +1 -1
- package/_assets/{buy-BQ9t9Zrr.js → buy-DIVuBMot.js} +1 -1
- package/_assets/{buy-gasless-B-y8WMZ-.js → buy-gasless-DIfZSqYX.js} +1 -1
- package/_assets/{categories-4GVQVLVO.js → categories-BbYXk3ti.js} +32 -38
- package/_assets/{ccip-D3QGl9dR.js → ccip-CwIu0LfN.js} +1 -1
- package/_assets/{ccip-Dk-2B020.js → ccip-Sex5PzD_.js} +1 -1
- package/_assets/{collectionPage.styles-D9v6voUC.js → collectionPage.styles-CHbJGgda.js} +5 -5
- package/_assets/{controller-BuNan0kN.js → controller-DfTp5YOO.js} +2 -2
- package/_assets/{core-BGdcId97.js → core-BEK9pA3q.js} +4 -4
- package/_assets/{createSvgIcon-W_IY7RAQ.js → createSvgIcon-CU05oHiV.js} +1 -1
- package/_assets/{custom-BvhiNuVl.js → custom-BhGswfT_.js} +1 -1
- package/_assets/{data-capture-CmgoF3cw.js → data-capture-nvuZRuzg.js} +1 -1
- package/_assets/{dcl-schemas-Dr9BTjb7.js → dcl-schemas-CmtP3U6y.js} +1 -1
- package/_assets/{disposePreview-8oEf57G7.js → disposePreview-B96DpOZy.js} +1 -1
- package/_assets/{email-DKRlv_02.js → email-CieTjR51.js} +1 -1
- package/_assets/{embedded-wallet-DOzPMXtH.js → embedded-wallet-CI-r3uDX.js} +1 -1
- package/_assets/{emotion-styled.browser.esm-Ddpetkdy.js → emotion-styled.browser.esm-BlQXcSKx.js} +1 -1
- package/_assets/{engine-T7LkHRv2.js → engine-CHP2eI44.js} +1 -1
- package/_assets/{errors-CPlWFAEN.js → errors-BAqCaL6O.js} +1 -1
- package/_assets/{estimate-l1-fee-DfTmkotx.js → estimate-l1-fee-D_pdXw9y.js} +1 -1
- package/_assets/{ethers-BHogtzPD.js → ethers-DejfrZ8i.js} +1 -1
- package/_assets/{execute-DY3XaITL.js → execute-BJuyrz_X.js} +2 -2
- package/_assets/{features-B0RaX-b9.js → features-B9o2bxOE.js} +1 -1
- package/_assets/{fetchTokenMetadata-CYkVqirC.js → fetchTokenMetadata-DeEXEM9T.js} +2 -2
- package/_assets/{field.styles-CGEOSW7q.js → field.styles-BYH2xB5-.js} +1 -1
- package/_assets/{get-ecosystem-wallet-info-CdwwL-l8.js → get-ecosystem-wallet-info-C5KzHIh2.js} +1 -1
- package/_assets/{getBalance-CNjN-sP8.js → getBalance-pkY6oxRI.js} +1 -1
- package/_assets/{getNFT-BfCcimFc.js → getNFT-BXJA28mr.js} +1 -1
- package/_assets/{getNFT-Dp7PGXVr.js → getNFT-CYm9n3Xd.js} +1 -1
- package/_assets/{grid.styles-DszJKyog.js → grid.styles-DoBUqqdT.js} +1 -1
- package/_assets/{hashTypedData-Qed0bO5s.js → hashTypedData-DpkGfcdz.js} +1 -1
- package/_assets/{hashTypedData-nM2s3pqE.js → hashTypedData-ONHChmVW.js} +1 -1
- package/_assets/{in-app-BIFA2e_r.js → in-app-GxZkDa12.js} +1 -1
- package/_assets/{in-app-wallet-calls-BS-El40Z.js → in-app-wallet-calls-B91UMKOr.js} +1 -1
- package/_assets/{index-N1lD9YVF.js → index--dDDhPCb.js} +1 -1
- package/_assets/{index-S3QJcEor.js → index-5GNI01Ww.js} +1 -1
- package/_assets/{index-CTeErQvD.js → index-73vZ1csI.js} +1 -1
- package/_assets/{index-DdKv_wFT.js → index-8TbyLPoA.js} +2 -2
- package/_assets/{index-DTS28jX1.js → index-B-FT9tly.js} +1 -1
- package/_assets/{index-DxkHHnyf.js → index-B49Ra42Y.js} +2 -2
- package/_assets/{index-DsSyWLy-.js → index-B4d9kGHc.js} +1 -1
- package/_assets/{index-DMtPghPO.js → index-B6MX4qjW.js} +3 -3
- package/_assets/{index-CnEDwKLU.js → index-BACQuryf.js} +1 -1
- package/_assets/{index-oAhypoXM.js → index-BFFeuHAN.js} +1 -1
- package/_assets/{index-DBr7T_eT.js → index-BH5LU_4T.js} +1 -1
- package/_assets/{index-WJ3npObe.js → index-BJM0Y8Dj.js} +1 -1
- package/_assets/{index-rNjzxsiO.js → index-BWh4oQv2.js} +1 -1
- package/_assets/{index-DeSzNtSp.js → index-BX8-GtYO.js} +3 -3
- package/_assets/{index-BiJICnih.js → index-BYlZ9YbP.js} +1 -1
- package/_assets/{index-DBjvq-XI.js → index-B_JiruyT.js} +1 -1
- package/_assets/{index-Ba80g_QU.js → index-Bk7mlw_4.js} +1 -1
- package/_assets/{index-BZQAtid_.js → index-BkDtNpJ9.js} +1 -1
- package/_assets/{index-7NadBeuh.js → index-BkMwrTJ3.js} +1 -1
- package/_assets/{index-Bl0AjSkb.js → index-Bk_uITsR.js} +1 -1
- package/_assets/{index-B42zNTgr.js → index-Bmq5dKA-.js} +1 -1
- package/_assets/{index-DT2QfQDk.js → index-BpBengnA.js} +1 -1
- package/_assets/{index-oUhlt_Bb.js → index-BsE741-i.js} +1 -1
- package/_assets/{index-BMd58yCH.js → index-Bzt1xZyM.js} +1 -1
- package/_assets/{index-DrQ4_MN_.js → index-C33PRPh0.js} +1 -1
- package/_assets/{index-Lyytmv-l.js → index-C5F4093w.js} +1 -1
- package/_assets/{index-DMepoE3Z.js → index-CIQQJerR.js} +1 -1
- package/_assets/{index-CLwUPuZs.js → index-CMV7iaeR.js} +1 -1
- package/_assets/{index-DyqDagNo.js → index-CRQCirWA.js} +1 -1
- package/_assets/{index-BkRxRlme.js → index-Cakc_FOK.js} +1 -1
- package/_assets/{index-DNr9nntg.js → index-CrYXAQF7.js} +1 -1
- package/_assets/{index-BxSBXkoJ.js → index-CtybxktV.js} +1 -1
- package/_assets/{index-DlVK89jK.js → index-Cu9CgJO0.js} +1 -1
- package/_assets/{index-C1B5cU5h.js → index-Cv1Bu0gQ.js} +1 -1
- package/_assets/{index-D1j9ElOD.js → index-D3BUTCsu.js} +1 -1
- package/_assets/{index-BZON-2rL.js → index-D4Aqu34H.js} +1 -1
- package/_assets/{index-lM2OO31J.js → index-DEPPVv3y.js} +3 -3
- package/_assets/{index-C9FU26y1.js → index-DGI43LaB.js} +1 -1
- package/_assets/{index-_IBCVipy.js → index-DMNGIYYv.js} +1 -1
- package/_assets/{index-DYx3Y8hN.js → index-DOiEVNYb.js} +1 -1
- package/_assets/index-DOxWmjOH.js +1 -0
- package/_assets/{index-DdGXSTOn.js → index-DPmmgd_P.js} +1 -1
- package/_assets/index-DbCMsBDL.js +3504 -0
- package/_assets/{index-RY9Ezazi.js → index-De1oZcbD.js} +7 -7
- package/_assets/{index-CVEuy3QH.js → index-Dfv984cL.js} +1 -1
- package/_assets/{index-BVQ9R8Ou.js → index-DhNV3-07.js} +1 -1
- package/_assets/{index-CRVeI5_c.js → index-DxSEHau1.js} +1 -1
- package/_assets/{index-Ci9bIwy_.js → index-E7P9-xl1.js} +1 -1
- package/_assets/{index-U9sHU96u.js → index-G6kG-9qx.js} +1 -1
- package/_assets/{index-EMfiBMg7.js → index-INHGq5Es.js} +1 -1
- package/_assets/index-JweqbyGF.js +2 -0
- package/_assets/{index-DpxbmIMg.js → index-L_H5aHd6.js} +1 -1
- package/_assets/{index-ClflEUAF.js → index-OqCfgEJv.js} +1 -1
- package/_assets/{index-CBJPuKa9.js → index-OxDwxhIP.js} +1 -1
- package/_assets/{index-C2Q5s1eA.js → index-_943ql8C.js} +1 -1
- package/_assets/{index-CzV_L3_6.js → index-__99MHKr.js} +2 -2
- package/_assets/{index-BiwxPZf9.js → index-l4-9ZZLe.js} +3 -3
- package/_assets/{index-CAAOpbIF.js → index-t0T-6ZrA.js} +1 -1
- package/_assets/{index.es-BwDqaf8R.js → index.es-7bD3vSL6.js} +4 -4
- package/_assets/{index.es-Dcp_TMfU.js → index.es-DD8zy1OU.js} +1 -1
- package/_assets/{index.es-BmKNbSKx.js → index.es-DdtYF7po.js} +1 -1
- package/_assets/{localBatchGatewayRequest-JfP-082C.js → localBatchGatewayRequest-Cqcm6wSH.js} +1 -1
- package/_assets/{networks-BCXn0uun.js → networks-BsQOwKdI.js} +1 -1
- package/_assets/{onramp-BC8u85Rq.js → onramp-CutBYUPg.js} +1 -1
- package/_assets/{openzeppelin-BA7UqeqU.js → openzeppelin-K-AgEyIf.js} +1 -1
- package/_assets/{parseNft-zNfP6wMG.js → parseNft-pYm9OVKe.js} +2 -2
- package/_assets/{parseSignature-BqSmw9-v.js → parseSignature-BrLHTUOQ.js} +3 -3
- package/_assets/{parseSignature-DWC-KHKy.js → parseSignature-DnyPA3OO.js} +1 -1
- package/_assets/{passkeys-CIu_Utx8.js → passkeys-zi3xVlV1.js} +1 -1
- package/_assets/{pay-with-exchange-DsggiL3i.js → pay-with-exchange-pvINEHpN.js} +1 -1
- package/_assets/{qr-overlay-Drv1G6MN.js → qr-overlay-CLKlyiw2.js} +1 -1
- package/_assets/{receive-CeqabMKU.js → receive-BLXAcZ6B.js} +1 -1
- package/_assets/{resolveImplementation-CQyxSY4d.js → resolveImplementation-CfgIWk0L.js} +1 -1
- package/_assets/{rpc-B3h6KQXA.js → rpc-C2ZJH6qL.js} +1 -1
- package/_assets/{secp256k1-i_L0DASD.js → secp256k1--GaGebUJ.js} +1 -1
- package/_assets/{secp256k1-CrlTAPJ_.js → secp256k1-BPdRWJXL.js} +1 -1
- package/_assets/{secp256k1-B5_ud9a2.js → secp256k1-DQNL-k-L.js} +1 -1
- package/_assets/{send-u523DWGF.js → send-Cl_aA-ga.js} +1 -1
- package/_assets/{send-batch-transaction-BsS_vCy3.js → send-batch-transaction-1ElceULH.js} +1 -1
- package/_assets/{send-eip712-transaction-Cr4-Q79f.js → send-eip712-transaction-BV_DsAbU.js} +2 -2
- package/_assets/{send-gasless-transaction-BGa7BHKv.js → send-gasless-transaction-eTi92Rfc.js} +2 -2
- package/_assets/{send-transaction-Ckey7MpC.js → send-transaction-DWimy5qX.js} +2 -2
- package/_assets/{sendMetaTransaction-C_M5KgcT.js → sendMetaTransaction-B6HBQ8NH.js} +1 -1
- package/_assets/{sendRawTransaction-C7O5sdy-.js → sendRawTransaction-6C6FbT-9.js} +3 -3
- package/_assets/{serializeTransaction-Bqahk7NV.js → serializeTransaction-DJpTnAzh.js} +1 -1
- package/_assets/{session-proposal-10rDfTdh.js → session-proposal-B1fE_9QJ.js} +1 -1
- package/_assets/{session-request-DLQ4W5j6.js → session-request-DVlIT2Cz.js} +2 -2
- package/_assets/{signing-DgL5hw-1.js → signing-C2OtEE_7.js} +3 -3
- package/_assets/{socials-Iclu6gpv.js → socials-CwiK-Oz5.js} +1 -1
- package/_assets/{styled-BtpmW8vE.js → styled-INC_AiMB.js} +2 -2
- package/_assets/{swaps-Dio5DiT_.js → swaps-Cz6uslns.js} +1 -1
- package/_assets/{thirdweb-0ZVJwYkE.js → thirdweb-QagPg_5G.js} +3 -3
- package/_assets/{to-serializable-transaction-DegngUV6.js → to-serializable-transaction-CI3ePtUl.js} +2 -2
- package/_assets/{transactionReceipt-CmwM9KP5.js → transactionReceipt-B2jt8_c5.js} +1 -1
- package/_assets/{transactions-DELzUAyE.js → transactions-DuxoNdoM.js} +1 -1
- package/_assets/{useCreditPacks-CfD1NWa_.js → useCreditPacks-CeoLpXxe.js} +1 -1
- package/_assets/{useImportable-BT9O6VkF.js → useImportable-CHlGR9sz.js} +1 -1
- package/_assets/{useInfiniteGrid-DtKMGQpL.js → useInfiniteGrid-D9jUBgv1.js} +1 -1
- package/_assets/{useTheme-DWUAjMsm.js → useTheme-HGI9qk_L.js} +1 -1
- package/_assets/{verifyHash-Dfknpu50.js → verifyHash-BWYK-_oQ.js} +1 -1
- package/_assets/{w3m-modal-CdoCVhdl.js → w3m-modal-C_cXhjYQ.js} +1 -1
- package/_assets/{w3m-modal-C0qGnhfo.js → w3m-modal-DeCOfGwP.js} +1 -1
- package/_assets/{wait-for-tx-receipt-Bwjk5Mq0.js → wait-for-tx-receipt-D52q1hNL.js} +1 -1
- package/_assets/{wallets-CTtGK85J.js → wallets-BiRgfoDB.js} +5 -5
- package/_assets/{web-connector-DVU2yQ5E.js → web-connector-CI1NmWV2.js} +3 -3
- package/_assets/{writeContract-C0uKNOQ8.js → writeContract-J3cBsNY4.js} +1 -1
- package/_assets/{zoraTestnet-CwVNTWsU.js → zoraTestnet-zRF1Vikt.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/_assets/LazyEmoteControls-DBB9eg39.js +0 -2
- package/_assets/index-BIBRNTUK.js +0 -3386
- package/_assets/index-DWVWkLU-.js +0 -2
- package/_assets/index-qY7j72YC.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-
|
|
2
|
-
import{m as we,
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-De1oZcbD.js","_assets/react-DehiWSvs.js","_assets/index-DbCMsBDL.js","_assets/sentry-973sfbO9.js","_assets/dcl-schemas-CmtP3U6y.js","_assets/ethers-DejfrZ8i.js","_assets/intl-CBcMB1D2.js","_assets/index-D-NhBWWr.css","_assets/useImportable-CHlGR9sz.js","_assets/buy-DIVuBMot.js","_assets/authorizations-w-yCHVpU.js","_assets/sendMetaTransaction-B6HBQ8NH.js","_assets/ManaPricingBanner.styles-CxOm66Fo.js","_assets/Faq-BXT0tU5Q.js","_assets/field.styles-BYH2xB5-.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{m as we,bH as je,k as q,n as I,bI as ke,s as l,t as s,o as Ie,B as Ae,q as $e,b as d,ai as Pe,I as A,bJ as Y,bK as ee,bL as Le,_ as Ne,w as N,bM as Ee,x as Te,bc as z,aA as Ce,bN as Se,z as Fe,bO as De,bP as O}from"./index-DbCMsBDL.js";import{r as g,e as Me,j as t,L as se,a as He}from"./react-DehiWSvs.js";import{u as qe}from"./useImportable-CHlGR9sz.js";import{L as ze}from"./LoadMore-DcIHY8Kf.js";import{u as P}from"./useInfiniteGrid-D9jUBgv1.js";import{m as ne}from"./mana-matic-C4e1sNO3.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-CmtP3U6y.js";import"./ethers-DejfrZ8i.js";import"./intl-CBcMB1D2.js";import"./buy-DIVuBMot.js";import"./authorizations-w-yCHVpU.js";import"./sendMetaTransaction-B6HBQ8NH.js";const Oe=15e3;function Re(e,a){return e.txHash&&a.txHash?e.txHash===a.txHash:e.txHash||a.txHash?!1:e.status===a.status&&Math.abs(e.createdAt-a.createdAt)<=Oe}function We(e){const a=[...e].sort((i,r)=>r.createdAt-i.createdAt),n=[];for(const i of a){const r=n[n.length-1];r&&Re(r[r.length-1],i)?r.push(i):n.push([i])}return n.map(i=>{var r;return{id:((r=i.find(c=>c.txHash))==null?void 0:r.txHash)??i[i.length-1].id,createdAt:Math.max(...i.map(c=>c.createdAt)),status:i.some(c=>c.status==="PENDING")?"PENDING":"SETTLED",totalCredits:i.reduce((c,u)=>c+u.credits,0),lines:i}})}function _e(e){return e.tradeId?`trade:${e.tradeId}`:e.contractAddress&&e.itemId?`item:${e.contractAddress.toLowerCase()}:${e.itemId}`:null}function Be(e){const a=[],n=new Map;for(const i of e){const r=_e(i);if(!r){a.push({key:i.id,tradeId:null,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits});continue}const c=n.get(r);if(c){c.quantity+=1,c.credits+=i.credits;continue}const u={key:r,tradeId:i.tradeId,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits};n.set(r,u),a.push(u)}return a}function Ge(e,a){return{id:e.id,contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId,counterparty:e.buyer,credits:a?we(e.manaWei,a):null,manaWei:e.manaWei,createdAt:e.createdAt,txHash:e.txHash}}function Ke(e){const n=We(e.purchases.filter(o=>o.status!=="EXPIRED")).map(o=>({kind:"purchase",id:`purchase:${o.id}`,createdAt:o.createdAt,order:o})),i=e.sales.map(o=>{const x=Ge(o,e.rate);return{kind:"sale",id:`sale:${x.id}`,createdAt:x.createdAt,sale:x}}),r=(e.creditOrders??[]).filter(o=>o.status!=="failed"&&o.status!=="abandoned").map(o=>({kind:"credit",id:`credit:${o.id}`,createdAt:o.createdAt,order:o})),c=new Set(e.purchases.filter(o=>o.txHash).map(o=>o.txHash.toLowerCase())),u=(e.manaPurchases??[]).filter(o=>!c.has(o.txHash.toLowerCase())).map(o=>({kind:"mana-purchase",id:`mana-purchase:${o.id}`,createdAt:o.createdAt,sale:o}));return[...n,...i,...r,...u].sort((o,x)=>x.createdAt-o.createdAt||(o.id<x.id?-1:1))}function Ue(e,a){return a==="all"?e:a==="sales"?e.filter(n=>n.kind==="sale"):e.filter(n=>n.kind==="purchase"||n.kind==="credit"||n.kind==="mana-purchase")}const re=e=>e.trim().toLowerCase();function Qe(e){const a=new Map;for(const n of e??[]){const i=re(n.txHash??"");if(!i)continue;const r=a.get(i);r?r.push(n):a.set(i,[n])}return a}function Ve(e,a,n=Date.now()){const i=a.txHash?e.get(re(a.txHash)):void 0;if(!i||i.length===0)return{kind:"direct"};const r=i.length===1?Xe(i[0].netCents):null,c=i.filter(o=>!o.available&&o.availableAt>n);if(c.length===0)return{kind:"credited",credits:r};const u=c.reduce((o,x)=>Math.max(o,x.availableAt),0);return{kind:"pending",credits:r,availableAt:u}}function Xe(e){return je(e)}function Je(){const e=q(i=>{var r;return(r=i.session)==null?void 0:r.address}),{data:a,isLoading:n}=I({queryKey:["listing-count",e],queryFn:()=>ke({creator:e,onSale:!0,first:1}),enabled:!!e,staleTime:5*6e4});return{count:a==null?void 0:a.total,isLoading:n}}const Ze="https://cdn.decentraland.org/@dcl/shop/0.8.0/_assets/credits-product-vs4Q6u6l.svg",R=Ie`
|
|
3
3
|
0% { background-position: 200% 0; }
|
|
4
4
|
100% { background-position: -200% 0; }
|
|
5
5
|
`,Ye=l.section`
|
|
@@ -240,15 +240,15 @@ import{m as we,bG as je,k as q,n as I,bH as ke,s as l,t as s,o as Ie,B as Ae,q a
|
|
|
240
240
|
&[data-kind='income'] {
|
|
241
241
|
color: ${s.colors.okStrong};
|
|
242
242
|
}
|
|
243
|
-
`,
|
|
243
|
+
`,ce=l.img`
|
|
244
244
|
width: 16px;
|
|
245
245
|
height: 16px;
|
|
246
246
|
vertical-align: -0.15em;
|
|
247
|
-
`,
|
|
247
|
+
`,ct=l.span`
|
|
248
248
|
display: inline-flex;
|
|
249
249
|
align-items: center;
|
|
250
250
|
cursor: pointer;
|
|
251
|
-
`,
|
|
251
|
+
`,dt=l.span`
|
|
252
252
|
position: fixed;
|
|
253
253
|
transform: translateX(-50%);
|
|
254
254
|
padding: 6px 8px;
|
|
@@ -304,7 +304,7 @@ import{m as we,bG as je,k as q,n as I,bH as ke,s as l,t as s,o as Ie,B as Ae,q a
|
|
|
304
304
|
height: 100%;
|
|
305
305
|
object-fit: contain;
|
|
306
306
|
}
|
|
307
|
-
`,
|
|
307
|
+
`,B=l.div`
|
|
308
308
|
width: 52px;
|
|
309
309
|
height: 52px;
|
|
310
310
|
border-radius: 10px;
|
|
@@ -315,7 +315,7 @@ import{m as we,bG as je,k as q,n as I,bH as ke,s as l,t as s,o as Ie,B as Ae,q a
|
|
|
315
315
|
@media (prefers-reduced-motion: reduce) {
|
|
316
316
|
animation: none;
|
|
317
317
|
}
|
|
318
|
-
`,
|
|
318
|
+
`,G=l.div`
|
|
319
319
|
min-width: 0;
|
|
320
320
|
display: flex;
|
|
321
321
|
flex-direction: column;
|
|
@@ -364,7 +364,7 @@ import{m as we,bG as je,k as q,n as I,bH as ke,s as l,t as s,o as Ie,B as Ae,q a
|
|
|
364
364
|
@media (prefers-reduced-motion: reduce) {
|
|
365
365
|
animation: none;
|
|
366
366
|
}
|
|
367
|
-
`,
|
|
367
|
+
`,de=l.div`
|
|
368
368
|
display: flex;
|
|
369
369
|
flex-direction: column;
|
|
370
370
|
align-items: center;
|
|
@@ -378,4 +378,4 @@ import{m as we,bG as je,k as q,n as I,bH as ke,s as l,t as s,o as Ie,B as Ae,q a
|
|
|
378
378
|
margin: 6px 0 0;
|
|
379
379
|
`,ht=l(Ae)`
|
|
380
380
|
margin-top: 12px;
|
|
381
|
-
`,V=H.withComponent(se),ut=g.lazy(()=>Ne(()=>import("./index-
|
|
381
|
+
`,V=H.withComponent(se),ut=g.lazy(()=>Ne(()=>import("./index-De1oZcbD.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14])).then(e=>({default:e.ImportListings}))),L=24,pt=["all","purchases","sales"],ae="migrate";function k(e){try{return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function he(e){return e.length>10?`${e.slice(0,6)}…${e.slice(-4)}`:e}function ue(e){const a=Number(e)/1e18;return Number.isFinite(a)?a.toLocaleString("en",{maximumFractionDigits:2}):"0"}function pe({children:e}){const a=g.useRef(null),[n,i]=g.useState(null),r=()=>{var u;const c=(u=a.current)==null?void 0:u.getBoundingClientRect();c&&i({top:c.bottom+8,left:c.left+c.width/2})};return t.jsxs(ct,{ref:a,tabIndex:0,onMouseEnter:r,onMouseLeave:()=>i(null),onFocus:r,onBlur:()=>i(null),children:[e,n?He.createPortal(t.jsx(dt,{style:{top:n.top,left:n.left},role:"tooltip",children:d("activity.polygonMana")}),document.body):null]})}function xt({item:e}){const a=!!e.contractAddress&&!!e.itemId,n=!!e.tradeId||a,{data:i,isLoading:r}=I({queryKey:["order-line-display",e.tradeId,e.contractAddress,e.itemId],queryFn:()=>e.tradeId?De(e.tradeId):O(e.contractAddress,{itemId:e.itemId}),enabled:n,staleTime:5*6e4}),c=n&&r,u=(i==null?void 0:i.name)??d("activity.itemFallback"),o=(i==null?void 0:i.thumbnail)??"",x=z({contractAddress:i==null?void 0:i.contractAddress,tokenId:i==null?void 0:i.tokenId,itemId:i==null?void 0:i.itemId})??void 0,f=t.jsxs(t.Fragment,{children:[c?t.jsx(B,{}):t.jsx(_,{children:o?t.jsx("img",{src:o,alt:u}):t.jsx(A,{name:"cart",size:20})}),t.jsxs(G,{children:[c?t.jsx(U,{}):t.jsx(K,{title:u,children:u}),e.quantity>1?t.jsx(Q,{children:d("activity.quantity",{count:e.quantity})}):null]}),t.jsxs(lt,{children:[t.jsx(N,{className:"ccy-mark"})," ",e.credits]})]});return x?t.jsx(V,{to:x,"data-link":"true",children:f}):t.jsx(H,{children:f})}function mt({order:e}){const a=Be(e.lines),n=a.reduce((i,r)=>i+r.quantity,0);return t.jsxs(E,{"data-testid":"purchase-order",children:[t.jsxs(T,{children:[t.jsxs(C,{children:[t.jsx(S,{children:k(e.createdAt)}),t.jsxs(F,{children:[d("activity.purchaseLabel")," · ",d("activity.itemCount",{count:n})]})]}),t.jsxs(D,{children:[t.jsx(M,{"data-status":e.status,children:e.status==="PENDING"?d("activity.processing"):d("activity.completed")}),t.jsxs(j,{children:[t.jsx(N,{className:"ccy-mark"})," ",e.totalCredits]})]})]}),t.jsx(W,{children:a.map(i=>t.jsx(xt,{item:i},i.key))})]})}function gt({sale:e}){const{data:a,isLoading:n}=I({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>O(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),i=(a==null?void 0:a.name)??d("activity.itemFallback"),r=(a==null?void 0:a.thumbnail)??"",c=z({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,u=t.jsxs(t.Fragment,{children:[n?t.jsx(B,{}):t.jsx(_,{children:r?t.jsx("img",{src:r,alt:i}):t.jsx(A,{name:"offer",size:20})}),t.jsxs(G,{children:[n?t.jsx(U,{}):t.jsx(K,{title:i,children:i}),t.jsx(Q,{children:d("activity.boughtFrom",{account:he(e.seller)})})]})]});return t.jsxs(E,{"data-testid":"activity-mana-purchase",children:[t.jsxs(T,{children:[t.jsxs(C,{children:[t.jsx(S,{children:k(e.createdAt)}),t.jsx(F,{children:d("activity.paidWithMana")})]}),t.jsxs(D,{children:[t.jsx(M,{"data-status":"SETTLED",children:d("activity.completed")}),t.jsxs(j,{children:[ue(e.manaWei)," ",t.jsx(pe,{children:t.jsx(ce,{src:ne,alt:"MANA"})})]})]})]}),t.jsx(W,{children:c?t.jsx(V,{to:c,"data-link":"true",children:u}):t.jsx(H,{children:u})})]})}function ft({sale:e,payout:a}){const{data:n,isLoading:i}=I({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>O(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),r=(n==null?void 0:n.name)??d("activity.itemFallback"),c=(n==null?void 0:n.thumbnail)??"",u=z({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,o=t.jsxs(t.Fragment,{children:[i?t.jsx(B,{}):t.jsx(_,{children:c?t.jsx("img",{src:c,alt:r}):t.jsx(A,{name:"offer",size:20})}),t.jsxs(G,{children:[i?t.jsx(U,{}):t.jsx(K,{title:r,children:r}),t.jsxs(Q,{children:[d("activity.soldTo",{account:he(e.counterparty)}),a.kind==="pending"?` · ${d("activity.payoutPendingOn",{date:k(a.availableAt)})}`:""]})]})]});return t.jsxs(E,{"data-testid":"activity-sale",children:[t.jsxs(T,{children:[t.jsxs(C,{children:[t.jsx(S,{children:k(e.createdAt)}),t.jsx(F,{children:d("activity.saleLabel")})]}),t.jsxs(D,{children:[t.jsx(M,{"data-status":a.kind==="pending"?"PENDING":"SOLD",children:a.kind==="pending"?d("activity.payoutPending"):d("activity.sold")}),a.kind==="direct"?t.jsxs(j,{"data-kind":"income",children:["+",ue(e.manaWei)," ",t.jsx(pe,{children:t.jsx(ce,{src:ne,alt:"MANA"})})]}):a.credits!==null?t.jsxs(j,{"data-kind":"income",children:[t.jsx(N,{className:"ccy-mark"})," +",Ce(a.credits)]}):t.jsx(j,{"data-kind":"income",children:d("activity.payoutCredited")})]})]}),t.jsx(W,{children:u?t.jsx(V,{to:u,"data-link":"true",children:o}):t.jsx(H,{children:o})})]})}function bt({order:e}){const a=`$${(e.usdCents/100).toFixed(2)}`,n=Ee(e.status),i=n==="SETTLED"?d("activity.completed"):n==="FAILED"?d("activity.failed"):n==="UNFINISHED"?d("activity.unfinished"):d("activity.processing"),r=q(p=>p.session),c=Te(),[u,o]=g.useState(!1),x=e.status==="initiated"&&!!r;async function f(){if(!(!r||u)){o(!0);try{const p=await Se(e.id,r.identity);if(p){window.location.href=p;return}Fe.info(d("activity.resumeExpired")),c.invalidateQueries({queryKey:["credit-orders"]})}finally{o(!1)}}}return t.jsx(E,{"data-testid":"credit-order",children:t.jsxs(T,{children:[t.jsx(rt,{children:t.jsx("img",{src:Ze,alt:"","aria-hidden":!0})}),t.jsxs(C,{children:[t.jsx(S,{children:k(e.createdAt)}),t.jsxs(F,{children:[d("activity.creditPurchaseLabel")," · ",d("activity.creditPaid",{usd:a})]})]}),t.jsxs(D,{children:[x?t.jsx(ot,{type:"button",onClick:()=>void f(),disabled:u,"data-testid":"resume-order",children:u?d("activity.resuming"):d("activity.resume")}):null,t.jsx(M,{"data-status":n,children:i}),t.jsxs(j,{"data-kind":"income",children:["+",t.jsx(N,{className:"ccy-mark"})," ",e.credits]})]})]})})}function yt({filter:e}){const a={all:{icon:"clock",title:d("activity.emptyAllTitle"),body:d("activity.emptyAllBody")},purchases:{icon:"cart",title:d("activity.emptyPurchasesTitle"),body:d("activity.emptyPurchasesBody")},sales:{icon:"offer",title:d("activity.emptySalesTitle"),body:d("activity.emptySalesBody")}}[e];return t.jsxs(de,{children:[t.jsx(A,{name:a.icon,size:40,color:s.colors.muted2}),t.jsx(le,{children:a.title}),t.jsx("p",{className:"muted",children:a.body}),e!=="sales"?t.jsx(ht,{as:se,to:"/items",variant:"purple",children:d("notFound.cta")}):null]})}function St(){const{session:e}=q(),[a,n]=g.useState("all"),[i,r]=Me(),c=i.get("view")===ae;$e({title:c?d("seo.import.title"):d("nav.activity"),noindex:!0});const{count:u}=qe(),{count:o}=Je(),f=u!==void 0&&o!==void 0&&(u>0||o>0||c),p=!!e&&!c&&a!=="sales",m=!!e&&!c&&a!=="purchases",b=P(["purchases",e==null?void 0:e.address],h=>Le(e.address,e.identity,{first:L,skip:h}),{enabled:p}),y=P(["sales",e==null?void 0:e.address],h=>Y(e.address,{role:"seller",first:L,skip:h}),{enabled:m}),v=P(["credit-orders",e==null?void 0:e.address],h=>ee(e.address,e.identity,{first:L,skip:h}),{enabled:p}),w=P(["mana-purchases",e==null?void 0:e.address],h=>Y(e.address,{role:"buyer",first:L,skip:h}),{enabled:p}),{data:X}=I({queryKey:["sale-payouts",e==null?void 0:e.address],queryFn:()=>ee(e.address,e.identity,{first:200}).then(h=>h.payouts),enabled:m,staleTime:6e4}),xe=g.useMemo(()=>Qe(X),[X]),{data:me}=Pe(m);if(!e)return t.jsxs(de,{children:[t.jsx(A,{name:"clock",size:40,color:s.colors.muted2}),t.jsx(le,{children:d("activity.signInTitle")}),t.jsx("p",{className:"muted",children:d("activity.signInBody")})]});const J=Ue(Ke({purchases:p?b.items:[],sales:m?y.items:[],creditOrders:p?v.items:[],manaPurchases:p?w.items:[],rate:me}),a),ge=p&&(b.isLoading||v.isLoading||w.isLoading)||m&&y.isLoading,Z=p&&(b.isFetchingNextPage||v.isFetchingNextPage||w.isFetchingNextPage)||m&&y.isFetchingNextPage,fe=p&&(b.hasNextPage||v.hasNextPage||w.hasNextPage)||m&&y.hasNextPage;function be(){p&&b.hasNextPage&&b.fetchNextPage(),p&&v.hasNextPage&&v.fetchNextPage(),p&&w.hasNextPage&&w.fetchNextPage(),m&&y.hasNextPage&&y.fetchNextPage()}function ye(h){if(n(h),!c)return;const $=new URLSearchParams(i);$.delete("view"),r($,{replace:!0})}function ve(){const h=new URLSearchParams(i);h.set("view",ae),r(h,{replace:!0})}return t.jsxs(Ye,{children:[t.jsx(et,{children:t.jsx(tt,{children:d("nav.activity")})}),t.jsxs(it,{role:"tablist","aria-label":d("nav.activity"),children:[pt.map(h=>t.jsx(oe,{type:"button",role:"tab","aria-selected":!c&&a===h,"data-active":!c&&a===h,"data-testid":`activity-filter-${h}`,onClick:()=>ye(h),children:d(`activity.filter.${h}`)},h)),f?t.jsxs(at,{type:"button",role:"tab","aria-selected":c,"data-active":c,"data-testid":"activity-filter-migrate","aria-label":u?d("activity.migrate.chipAria",{count:u}):void 0,onClick:ve,children:[d("activity.migrate.chip"),u?t.jsx(st,{"data-testid":"activity-migrate-count","aria-hidden":!0,children:u}):null]}):null]}),c?t.jsx(g.Suspense,{fallback:t.jsx(nt,{"aria-busy":"true"}),children:t.jsx(ut,{})}):ge?t.jsx(te,{children:Array.from({length:5}).map((h,$)=>t.jsx(ie,{},$))}):J.length===0?t.jsx(yt,{filter:a}):t.jsxs(t.Fragment,{children:[t.jsxs(te,{children:[J.map(h=>h.kind==="purchase"?t.jsx(mt,{order:h.order},h.id):h.kind==="credit"?t.jsx(bt,{order:h.order},h.id):h.kind==="mana-purchase"?t.jsx(gt,{sale:h.sale},h.id):t.jsx(ft,{sale:h.sale,payout:Ve(xe,h.sale)},h.id)),Z?t.jsx(ie,{}):null]}),t.jsx(ze,{hasNextPage:fe,isFetching:Z,onLoadMore:be})]})]})}export{St as Activity};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as l,j as v}from"./react-DehiWSvs.js";import{s as u}from"./index-
|
|
1
|
+
import{r as l,j as v}from"./react-DehiWSvs.js";import{s as u}from"./index-DbCMsBDL.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-CmtP3U6y.js";import"./ethers-DejfrZ8i.js";import"./intl-CBcMB1D2.js";const S="https://cdn.decentraland.org/@dcl/shop/0.8.0/_assets/custom-welcome-background-BxlFQma9.webp",b="https://cdn.decentraland.org/@dcl/shop/0.8.0/_assets/DCL_LogoPattern-BryBPc3d.png",U=`
|
|
2
2
|
attribute vec2 a_position;
|
|
3
3
|
varying vec2 v_uv;
|
|
4
4
|
void main() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as Le,r as u,j as e,e as nt}from"./react-DehiWSvs.js";import{c as U,r as st,
|
|
1
|
+
import{d as Le,r as u,j as e,e as nt}from"./react-DehiWSvs.js";import{c as U,r as st,bh as rt,bi as ot,av as it,a as at,s,t,k as Ue,b7 as lt,x as ct,aA as be,b as n,v as dt,I as R,w as M,bU as se,b6 as pt,R as ee,bm as ht,bl as xt,q as He,ai as Oe,m as Ge,l as ft,af as mt,ak as Ie,al as V,aC as ut,bF as gt}from"./index-DbCMsBDL.js";import{g as bt,h as yt,i as wt,j as jt,k as vt,C as $t,l as Ct,o as kt,m as St,n as Et,M as Rt,u as _t,E as Tt,v as zt,p as It,q as At,r as Nt,s as Pt,t as Mt}from"./Assets.styles-DuSEfvzx.js";import{S as Ae,R as Wt,F as Bt,d as Ft}from"./categories-BbYXk3ti.js";import{L as Lt}from"./LoadMore-DcIHY8Kf.js";import{u as Ut}from"./useInfiniteGrid-D9jUBgv1.js";import{E as Ht}from"./ErrorNotice-BXWX_0E4.js";import{d as Ot}from"./dcl-schemas-CmtP3U6y.js";import{s as Gt,G as Dt,w as qt,S as Vt}from"./buy-gasless-DIfZSqYX.js";import{s as Zt,k as Kt}from"./buy-DIVuBMot.js";import{f as Jt}from"./errors-BAqCaL6O.js";import{J as Qt,C as Xt,B as ye}from"./ethers-DejfrZ8i.js";import{n as Yt}from"./Tooltip-Dh6dtNV3.js";import{G as en}from"./grid.styles-DoBUqqdT.js";import"./sentry-973sfbO9.js";import"./intl-CBcMB1D2.js";import"./authorizations-w-yCHVpU.js";import"./sendMetaTransaction-B6HBQ8NH.js";function Z(r){const i=r.source??"item",h=r.tradeId||`${r.contractAddress}-${r.tokenId??r.itemId??""}`;return`${i}:${h}`}const H="100000000000000000000",De=2,te=15,tn=/^[a-zA-Z0-9]+$/;function Ne(r){const i=r.trim();return i.length===0?{ok:!1,reason:"empty"}:tn.test(i)?i.length<De?{ok:!1,reason:"too-short"}:i.length>te?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function nn(r){return r.replace(/[^a-zA-Z0-9]/g,"").slice(0,te)}const sn=["function available(string _subdomain) view returns (bool)"],Pe={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function rn(){return U.chainId===Number(Ot.ChainId.MATIC_MAINNET)?Pe.mainnet:Pe.sepolia}async function on(r,i={}){var l;const{rpc:h,address:c}=rn(),d=new Qt(h),a=new Xt(c,sn,d);console.info(`[names] availability check → DCLRegistrar(${c}).available("${r}") on ${h}`);const f=await a.available(r);if((l=i.signal)!=null&&l.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${r}" available=${f}`),f?"available":"taken"}const an="https://app.across.to/api";class we extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}function ln(r){return it(H,r)}async function cn(r,i,h={}){var l;const c=h.chainId??U.chainId,d=h.provider??"across",a=`${U.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(i)}&chainId=${c}&provider=${d}`,f=await at(a,{method:"GET",identity:r,metadata:{}});if(!f.ok){let p;try{p=(l=await f.json())==null?void 0:l.code}catch{}throw p==="ROUTE_COST_TOO_HIGH"?new we:new Error(`fetchNameCreditRoute ${f.status}`)}return f.json()}function dn(r,i){const h=ye.from(r.availableAmount),d=ye.from(H).sub(h);return{credits:[{value:r.amount,expiresAt:Number(r.expiresAt),salt:Kt(r.id)}],creditsSignatures:[r.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:d.isNegative()?"0":d.toString(),maxCreditedValue:H}}async function pn(r,i={}){const h=an,c=i.intervalMs??1e4,d=i.maxAttempts??60;let a={status:"pending",destinationTxHash:null,actionsSucceeded:!1};for(let f=0;f<d;f++){try{const l=await fetch(`${h}/deposit/status?originChainId=137&depositTxHash=${r}`);if(l.ok){const p=await l.json(),x=(p.status??"pending").toLowerCase(),y=p.fillTx??p.fillTxnRef??null,m=p.actionsSucceeded!==!1;if(x==="filled")return{status:"filled",destinationTxHash:y,actionsSucceeded:m};if(x==="refunded"||x==="expired")return{status:x,destinationTxHash:null,actionsSucceeded:!1};a={status:"pending",destinationTxHash:y,actionsSucceeded:m}}}catch{}f<d-1&&await new Promise(l=>setTimeout(l,c))}return a}async function hn(r){const{name:i,identity:h,signer:c}=r,d=r.chainId??U.chainId,a=r.provider??"across",f=(r.beneficiary??await c.getAddress()).toLowerCase();let l=null,p=!1;console.info("[names] register start",{name:i,buyer:f,chainId:d,provider:a});try{const x=await st(d),y=ln(x);console.info("[names] step 1/6 sized reservation",{usdCents:y,manaRate:x});const m=await cn(h,i,{chainId:d,provider:a});console.info("[names] step 2/6 route fetched",{target:m.externalCall.target,selector:m.externalCall.selector,provider:m.provider,quoteId:m.quoteId});const C=await rt(h,y);if(l=C.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:C.credit.id,maxCreditedValue:C.maxCreditedValue}),ye.from(C.maxCreditedValue).lt(H))throw new Error("Credit under-sized for the name price");const k=dn(C.credit,m);let g;try{g=await Gt({chainId:d,buyer:f,signer:c,args:k})}catch(b){if(!(b instanceof Dt))throw b;g=await Zt(d,k,c)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:g}),await qt(g),p=!0,console.info("[names] step 5/6 origin tx confirmed",{originTxHash:g}),a==="across"){const b=await pn(g,r.acrossPoll);if(console.info("[names] step 6/6 across status",b),b.status==="pending")return{status:"pending",originTxHash:g};if(b.status!=="filled"||!b.actionsSucceeded)throw new Error("The name could not be registered on Ethereum; your funds were recovered.");return{status:"registered",originTxHash:g,destinationTxHash:b.destinationTxHash}}return{status:"pending",originTxHash:g}}catch(x){if(console.error("[names] register failed — raw error:",x,{name:i,buyer:f,originConfirmed:p}),x instanceof Vt)return{status:"pending",originTxHash:x.txHash};if(l&&!p&&await ot(h,[l]).catch(()=>{}),x instanceof we)throw x;const y=new Error(Jt(x,"Couldn't register the name. Please try again.",{sale:!0}));throw y.cause=x,y}}const xn=s.div`
|
|
2
2
|
position: fixed;
|
|
3
3
|
inset: 0;
|
|
4
4
|
z-index: 10000;
|
|
@@ -7,7 +7,7 @@ import{d as Le,r as u,j as e,e as nt}from"./react-DehiWSvs.js";import{c as U,r a
|
|
|
7
7
|
justify-content: center;
|
|
8
8
|
padding: 16px;
|
|
9
9
|
background: rgba(22, 21, 24, 0.55);
|
|
10
|
-
`,
|
|
10
|
+
`,fn=s.div`
|
|
11
11
|
width: 560px;
|
|
12
12
|
max-width: 100%;
|
|
13
13
|
max-height: 92vh;
|
|
@@ -112,7 +112,7 @@ import{d as Le,r as u,j as e,e as nt}from"./react-DehiWSvs.js";import{c as U,r a
|
|
|
112
112
|
font-family: ${t.font.sans};
|
|
113
113
|
font-size: 14px;
|
|
114
114
|
color: ${t.colors.muted2};
|
|
115
|
-
`,
|
|
115
|
+
`,fe=s.div`
|
|
116
116
|
flex: none;
|
|
117
117
|
display: flex;
|
|
118
118
|
align-items: center;
|
|
@@ -127,7 +127,7 @@ import{d as Le,r as u,j as e,e as nt}from"./react-DehiWSvs.js";import{c as U,r a
|
|
|
127
127
|
height: 22px;
|
|
128
128
|
color: ${t.colors.brandViolet};
|
|
129
129
|
}
|
|
130
|
-
`,
|
|
130
|
+
`,mn=s.div`
|
|
131
131
|
margin-top: 16px;
|
|
132
132
|
padding: 16px;
|
|
133
133
|
border-radius: 12px;
|
|
@@ -271,7 +271,7 @@ import{d as Le,r as u,j as e,e as nt}from"./react-DehiWSvs.js";import{c as U,r a
|
|
|
271
271
|
border-radius: 12px;
|
|
272
272
|
background: #e2f5ea;
|
|
273
273
|
text-align: center;
|
|
274
|
-
`,
|
|
274
|
+
`,_n=s.div`
|
|
275
275
|
display: grid;
|
|
276
276
|
place-items: center;
|
|
277
277
|
width: 56px;
|
|
@@ -284,7 +284,7 @@ import{d as Le,r as u,j as e,e as nt}from"./react-DehiWSvs.js";import{c as U,r a
|
|
|
284
284
|
width: 30px;
|
|
285
285
|
height: 30px;
|
|
286
286
|
}
|
|
287
|
-
`,
|
|
287
|
+
`,Tn=s.p`
|
|
288
288
|
margin: 0;
|
|
289
289
|
font-family: ${t.font.sans};
|
|
290
290
|
font-size: 16px;
|
|
@@ -294,7 +294,7 @@ import{d as Le,r as u,j as e,e as nt}from"./react-DehiWSvs.js";import{c as U,r a
|
|
|
294
294
|
b {
|
|
295
295
|
font-weight: 700;
|
|
296
296
|
}
|
|
297
|
-
`,
|
|
297
|
+
`,We=s.div`
|
|
298
298
|
display: flex;
|
|
299
299
|
gap: 16px;
|
|
300
300
|
margin-top: 20px;
|
|
@@ -302,7 +302,7 @@ import{d as Le,r as u,j as e,e as nt}from"./react-DehiWSvs.js";import{c as U,r a
|
|
|
302
302
|
${t.media.maxWidth("mobile")} {
|
|
303
303
|
flex-direction: column;
|
|
304
304
|
}
|
|
305
|
-
`,
|
|
305
|
+
`,Be=s.button`
|
|
306
306
|
flex: 1;
|
|
307
307
|
height: 48px;
|
|
308
308
|
border: 1px solid ${t.colors.accent};
|
|
@@ -347,7 +347,7 @@ import{d as Le,r as u,j as e,e as nt}from"./react-DehiWSvs.js";import{c as U,r a
|
|
|
347
347
|
outline: 2px solid ${t.colors.accent};
|
|
348
348
|
outline-offset: 2px;
|
|
349
349
|
}
|
|
350
|
-
`,
|
|
350
|
+
`,me=s.div`
|
|
351
351
|
display: flex;
|
|
352
352
|
align-items: flex-start;
|
|
353
353
|
gap: 12px;
|
|
@@ -379,7 +379,7 @@ import{d as Le,r as u,j as e,e as nt}from"./react-DehiWSvs.js";import{c as U,r a
|
|
|
379
379
|
color: ${t.colors.accent};
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
|
-
`;function In({name:r,priceCredits:i,onClose:h}){const{session:c}=Ue(),{data:d,isError:a}=lt(c),
|
|
382
|
+
`;function In({name:r,priceCredits:i,onClose:h}){const{session:c}=Ue(),{data:d,isError:a}=lt(c),f=ct(),l=Le(),[p,x]=u.useState("confirm"),[y,m]=u.useState(""),[C,k]=u.useState(null),g=u.useRef(!1),b=y.trim().toLowerCase()===r.toLowerCase(),S=p==="completing",v=i!=null?be(i):"—",_=i==null,E=d==null?void 0:d.credits,W=i!=null&&E!=null?i-E:0,$=W>0,T=_?n("names.priceUnavailable"):$?n("names.insufficientCredits",{credits:be(W)}):null;u.useEffect(()=>{const w=G=>{G.key==="Escape"&&!S&&h()};document.addEventListener("keydown",w);const O=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",w),document.body.style.overflow=O}},[S,h]);async function I(){if(!(!c||!b||_||$||g.current)){g.current=!0,x("completing"),k(null);try{const w=await hn({name:r,identity:c.identity,signer:c.signer});ee("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:i??null,settlement:w.status}),f.invalidateQueries({queryKey:["usd-balance"]}),f.invalidateQueries({queryKey:["my-assets"]}),x(w.status==="registered"?"success":"pending")}catch(w){ee(xt(w)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:ht(w),purchase_type:"name"}),k(w instanceof we?n("names.errorRouteCost"):(w==null?void 0:w.message)||n("names.errorGeneric")),x("error")}finally{g.current=!1}}}const A=p!=="success"&&p!=="pending",N=dt(c==null?void 0:c.providerType);return e.jsx(xn,{onClick:S?void 0:h,role:"presentation",children:e.jsxs(fn,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:w=>w.stopPropagation(),children:[A&&e.jsxs(e.Fragment,{children:[e.jsxs(re,{children:[e.jsx(oe,{children:p==="error"?n("names.errorTitle"):n("names.buyTitle")}),e.jsx(ie,{onClick:h,disabled:S,"aria-label":n("buyModal.close"),children:e.jsx(R,{name:"close"})})]}),e.jsxs(ae,{children:[n("names.myCreditsBalance")," ",e.jsx(M,{})," ",se(d,a)]}),e.jsx(le,{})]}),(p==="confirm"||p==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(ce,{children:[e.jsx(de,{"aria-hidden":!0,children:"@"}),e.jsxs(pe,{children:[e.jsxs(he,{children:[r,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(xe,{children:n("names.subtitle")})]}),e.jsxs(fe,{children:[e.jsx(M,{}),v]})]}),p==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(me,{children:[e.jsx(R,{name:"info","aria-hidden":!0}),e.jsx("span",{children:C})]}),e.jsx(Me,{onClick:()=>x("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(mn,{children:[e.jsx(un,{children:n("names.confirmTitle")}),e.jsx(gn,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${An(r)}</b>`})}}),e.jsxs(bn,{children:[e.jsx(yn,{"aria-hidden":!0,children:"@"}),e.jsx(wn,{value:y,onChange:w=>m(w.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":n("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(y.length,8)}ch`}}),e.jsx(jn,{children:".dcl.eth"})]})]}),T?e.jsxs(me,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(R,{name:"info","aria-hidden":!0}),e.jsx("span",{children:T})]}):null,e.jsx(Me,{onClick:()=>void I(),disabled:!b||!c||_||$,children:n("names.buyCta")})]})]}),p==="completing"&&e.jsxs(vn,{children:[e.jsx($n,{src:pt,alt:"",width:56,height:56}),e.jsx(Cn,{children:N?n("names.confirming"):n("names.completing")}),e.jsxs(kn,{children:[e.jsx(Sn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(En,{children:"1/1"})]})]}),p==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(re,{children:[e.jsx(oe,{children:n("names.pendingHeaderTitle")}),e.jsx(ie,{onClick:h,"aria-label":n("buyModal.close"),children:e.jsx(R,{name:"close"})})]}),e.jsxs(ae,{children:[n("names.myCreditsBalance")," ",e.jsx(M,{})," ",se(d,a)]}),e.jsx(le,{}),e.jsxs(me,{"data-tone":"info",children:[e.jsx(R,{name:"info","aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("b",{children:n("names.pendingBannerBold")})," ",n("names.pendingBannerRest")]})]}),e.jsxs(ce,{style:{marginTop:20},children:[e.jsx(de,{"aria-hidden":!0,children:"@"}),e.jsxs(pe,{children:[e.jsxs(he,{children:[r,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(xe,{children:n("names.subtitle")})]}),e.jsxs(fe,{children:[e.jsx(M,{}),v]})]}),e.jsx(We,{children:e.jsx(Be,{onClick:()=>{h(),l("/my-items")},children:n("names.myItems")})})]}),p==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(re,{children:[e.jsx(oe,{children:n("names.successHeaderTitle")}),e.jsx(ie,{onClick:h,"aria-label":n("buyModal.close"),children:e.jsx(R,{name:"close"})})]}),e.jsxs(ae,{children:[n("names.myCreditsBalance")," ",e.jsx(M,{})," ",se(d,a)]}),e.jsx(le,{}),e.jsxs(Rn,{children:[e.jsx(_n,{"aria-hidden":!0,children:e.jsx(R,{name:"check"})}),e.jsxs(Tn,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(ce,{style:{marginTop:20},children:[e.jsx(de,{"aria-hidden":!0,children:"@"}),e.jsxs(pe,{children:[e.jsxs(he,{children:[r,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(xe,{children:n("names.subtitle")})]}),e.jsxs(fe,{children:[e.jsx(M,{}),v]})]}),e.jsxs(We,{children:[e.jsx(Be,{onClick:()=>{h(),l("/my-items")},children:n("names.myItems")}),e.jsx(zn,{href:U.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function An(r){return r.replace(/[&<>"']/g,i=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[i])}const Nn="https://cdn.decentraland.org/@dcl/shop/0.8.0/_assets/identity-B4DXDuJP.webp",Pn="https://cdn.decentraland.org/@dcl/shop/0.8.0/_assets/world-B-9aPlxu.webp",Mn="https://cdn.decentraland.org/@dcl/shop/0.8.0/_assets/invite-BfwIhP2C.webp",Wn="https://cdn.decentraland.org/@dcl/shop/0.8.0/_assets/governance-DnazlIjy.webp",Bn=s.div`
|
|
383
383
|
width: 100%;
|
|
384
384
|
min-width: 0;
|
|
385
385
|
`,Fn=s.nav`
|
|
@@ -798,4 +798,4 @@ import{d as Le,r as u,j as e,e as nt}from"./react-DehiWSvs.js";import{c as U,r a
|
|
|
798
798
|
clip: rect(0, 0, 0, 0);
|
|
799
799
|
white-space: nowrap;
|
|
800
800
|
border: 0;
|
|
801
|
-
`,xs="https://docs.decentraland.org/creator/worlds/about/",ms="https://governance.decentraland.org";function fs(r){const i=typeof window<"u"?window.location.hostname:"";return`${i.endsWith("decentraland.org")?"https://decentraland.org":i.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(r)}`}function us({onBack:r}){He({title:n("seo.names.title"),description:n("seo.names.description")});const{session:i,signIn:h}=Ue(),{data:c}=Oe(),d=c?Ge(H,c):null,[a,m]=u.useState(""),[l,p]=u.useState("idle"),[x,y]=u.useState(!1),f=u.useRef(null),[C,k]=u.useState(void 0);u.useLayoutEffect(()=>{f.current&&k(f.current.offsetWidth)},[a]),u.useEffect(()=>{if(!Ne(a).ok){p(a.length===0?"idle":"invalid");return}p("checking");const E=new AbortController,B=setTimeout(()=>{(async()=>{try{const $=await on(a,{signal:E.signal});p($)}catch($){if(($==null?void 0:$.name)==="AbortError")return;p("error")}})()},400);return()=>{clearTimeout(B),E.abort()}},[a]);const g=Ne(a),b=g.ok&&(l==="available"||l==="error");function S(){if(b){if(!i){h();return}y(!0)}}const v=e.jsxs(e.Fragment,{children:[n("names.claim"),d!=null?e.jsxs(os,{children:[e.jsx(M,{}),be(d)]}):null]});return e.jsxs(Wn,{"data-testid":"names-page",children:[e.jsxs(Fn,{"aria-label":n("names.breadcrumbAria"),children:[e.jsx(Ln,{onClick:r,children:n("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(Un,{children:n("names.breadcrumbCurrent")})]}),e.jsxs(Hn,{children:[e.jsxs(On,{children:[e.jsxs(Gn,{children:[e.jsx(Dn,{children:n("names.heroTitle")}),e.jsx(qn,{children:n("names.heroSubtitle")})]}),e.jsxs(Vn,{children:[e.jsxs(Zn,{children:[e.jsxs(Kn,{invalid:l==="taken",children:[e.jsxs(Yn,{children:[e.jsx(es,{"aria-hidden":!0,children:"@"}),e.jsx(ts,{value:a,onChange:T=>m(nn(T.target.value)),placeholder:n("names.inputPlaceholder"),"aria-label":n("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:te,style:{width:C!=null?`${C}px`:void 0}}),e.jsx(Jn,{ref:f,"aria-hidden":!0,children:a||n("names.inputPlaceholder")}),e.jsx(ns,{children:n("names.suffix")})]}),a.length>0?e.jsxs(ss,{"aria-hidden":!0,children:[a.length,"/",te]}):null,e.jsx(qe,{onClick:S,disabled:!b,"data-testid":"names-claim",children:v})]}),l==="taken"?e.jsxs(Qn,{role:"status","data-testid":"names-taken",children:[e.jsx(R,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:n("names.taken")}),e.jsxs(Xn,{href:fs(a),target:"_blank",rel:"noopener noreferrer",children:[n("names.takenMakeOffer"),e.jsx(R,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null]}),e.jsx(rs,{onClick:S,disabled:!b,children:v}),l==="checking"?e.jsx(ue,{tone:"muted",role:"status","data-testid":"names-checking",children:n("names.checking")}):l==="error"?e.jsx(ue,{tone:"muted",role:"status",children:n("names.checkError")}):l==="invalid"&&!g.ok&&g.reason==="too-short"?e.jsx(ue,{tone:"muted",role:"status",children:n("names.tooShort",{min:De})}):null,e.jsx(hs,{role:"status","aria-live":"polite",children:l==="available"?n("names.available",{name:a}):""})]})]}),e.jsxs(is,{children:[e.jsxs(as,{children:[e.jsx(ls,{children:n("names.whyTitle")}),e.jsx(cs,{children:n("names.whyIntro")})]}),e.jsxs(ds,{children:[e.jsxs(K,{children:[e.jsx(J,{src:Nn,alt:""}),e.jsxs(Q,{children:[e.jsx(X,{children:n("names.why1Title")}),e.jsx(Y,{children:n("names.why1")})]})]}),e.jsxs(K,{children:[e.jsx(J,{src:Pn,alt:""}),e.jsxs(Q,{children:[e.jsx(X,{children:n("names.why2Title")}),e.jsxs(Y,{children:[n("names.why2")," ",e.jsx(ps,{children:n("names.why2Address")})]}),e.jsxs(Fe,{href:xs,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(R,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(K,{children:[e.jsx(J,{src:Mn,alt:""}),e.jsxs(Q,{children:[e.jsx(X,{children:n("names.why3Title")}),e.jsx(Y,{children:n("names.why3")})]})]}),e.jsxs(K,{children:[e.jsx(J,{src:Bn,alt:""}),e.jsxs(Q,{children:[e.jsx(X,{children:n("names.why4Title")}),e.jsx(Y,{children:n("names.why4")}),e.jsxs(Fe,{href:ms,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(R,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),x?e.jsx(In,{name:a,priceCredits:d,onClose:()=>y(!1)}):null]})}const gs="data:image/svg+xml,%3csvg%20width='101'%20height='101'%20viewBox='0%200%20101%20101'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M42.4493%2040.9855L30.7394%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M30.7391%2040.9855L42.449%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M36.2621%2071.0604C29.6047%2071.0604%2023.9709%2068.7542%2019.3608%2064.1416C14.7507%2059.5291%2012.4445%2053.8953%2012.442%2047.2404C12.4396%2040.5854%2014.7459%2034.9516%2019.3608%2030.3391C23.9758%2025.7266%2029.6096%2023.4203%2036.2621%2023.4203C42.9146%2023.4203%2048.5496%2025.7266%2053.167%2030.3391C57.7844%2034.9516%2060.0895%2040.5854%2060.0822%2047.2404C60.0822%2049.9277%2059.6546%2052.4624%2058.7995%2054.8445C57.9445%2057.2265%2056.784%2059.3336%2055.3181%2061.1659L75.84%2081.6878C76.5119%2082.3597%2076.8478%2083.2148%2076.8478%2084.2531C76.8478%2085.2914%2076.5119%2086.1465%2075.84%2086.8183C75.1682%2087.4902%2074.3131%2087.8261%2073.2748%2087.8261C72.2365%2087.8261%2071.3814%2087.4902%2070.7096%2086.8183L50.1877%2066.2964C48.3554%2067.7623%2046.2482%2068.9227%2043.8662%2069.7778C41.4842%2070.6329%2038.9495%2071.0604%2036.2621%2071.0604ZM36.2621%2063.7312C40.8429%2063.7312%2044.7372%2062.1285%2047.9449%2058.9232C51.1527%2055.7179%2052.7554%2051.8236%2052.7529%2047.2404C52.7505%2042.6571%2051.1478%2038.7641%2047.9449%2035.5612C44.742%2032.3583%2040.8478%2030.7544%2036.2621%2030.7495C31.6764%2030.7447%2027.7834%2032.3485%2024.5829%2035.5612C21.3825%2038.7739%2019.7786%2042.6669%2019.7713%2047.2404C19.764%2051.8138%2021.3678%2055.7081%2024.5829%2058.9232C27.798%2062.1383%2031.6911%2063.7409%2036.2621%2063.7312Z'%20fill='url(%23paint0_linear_search_empty)'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_search_empty'%20x1='10.4127'%20y1='55.6273'%20x2='124.009'%20y2='44.925'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF2D55'/%3e%3cstop%20offset='1'%20stop-color='%23FFBC5B'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",ge=48,bs=["all","on_sale","not_for_sale"];function Bs(){const[r,i]=nt(),h=Le(),c=(r.get("q")??"").trim().toLowerCase(),d=(r.get("q")??"").trim();He({title:d?n("seo.collectibles.searchTitle",{query:d}):n("seo.collectibles.title"),description:n("seo.collectibles.description")});const a=r.get("category")??(c?"all":"wearable"),m=r.get("status"),l=m&&bs.includes(m)?m:"on_sale",p=(o,j)=>i(z=>{const ne=new URLSearchParams(z);return j==null?ne.delete(o):ne.set(o,j),ne},{replace:!0}),[x,y]=u.useState(null),[f,C]=u.useState([]),[k,g]=u.useState(""),[b,S]=u.useState(""),[v,T]=u.useState(!1),[E,B]=u.useState("newest"),[$,_]=u.useState(!1);u.useEffect(()=>{if(!$)return;const o=z=>{z.key==="Escape"&&_(!1)};document.addEventListener("keydown",o);const j=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",o),document.body.style.overflow=j}},[$]);const I=l==="on_sale",A=k&&!Number.isNaN(Number(k))?Number(k):void 0,N=b&&!Number.isNaN(Number(b))?Number(b):void 0,w=mt(),O=x?Ft[x]:void 0,G=(Ae.find(o=>o.key===E)??Ae[0]).server,je={category:a,rarities:f.length?f:void 0,wearableCategories:O,minPriceCredits:A,maxPriceCredits:N,search:c||void 0,sortBy:G,isSmart:v||void 0,onSale:!0,listingType:w?void 0:"primary"},ve={category:a,rarities:f.length?f:void 0,wearableCategories:O,search:c||void 0,sortBy:G,isWearableSmart:v||void 0,isOnSale:l==="not_for_sale"?!1:void 0},{items:F,total:$e,isLoading:P,isPlaceholderData:W,error:Ce,hasNextPage:Ve,isFetchingNextPage:ke,isFetchNextPageError:Ze,fetchNextPage:Ke}=Ut(I?["shop-items",je]:["catalog-items",ve],o=>I?ut({...je,first:ge,skip:o}):gt({...ve,first:ge,skip:o}),{enabled:a!=="names"}),D=$e,{data:Se,isError:Je,isPending:Qe}=Oe(),Xe=o=>Se&&o.manaWei?Ge(o.manaWei,Se):null,Ye=I&&Qe&&F.some(o=>o.source==="legacy"),Ee=P||W||Ye,et=P?15:Math.min(Math.max(F.length,1),ge),Re=u.useRef(null);u.useEffect(()=>{P||W||!c||Re.current===c||(Re.current=c,ee("Shop Searched",{query:c,result_count:D}))},[c,P,W,D]);const q=u.useRef("__init__");u.useEffect(()=>{if(P||W)return;const o=JSON.stringify({category:a,subCategory:x,rarities:f,min:A,max:N,sort:E,status:l,smart:v});if(q.current==="__init__"||q.current===o){q.current=o;return}q.current=o,ee("Shop Applied Filter",{filters:{category:a,sub_category:x,rarities:f,min_price_credits:A??null,max_price_credits:N??null,status:l,smart:v,sort:E},result_count:D})},[a,x,f,A,N,E,l,v,P,W,D]);function Te(o){p("category",o),y(null)}function _e(o){p("status",o==="on_sale"?null:o)}function ze(o){C(j=>j.includes(o)?j.filter(z=>z!==o):[...j,o])}function tt(){i(o=>{const j=new URLSearchParams(o);return j.delete("category"),j.delete("status"),j},{replace:!0}),y(null),C([]),g(""),S(""),T(!1)}const L=[];(A!=null||N!=null)&&L.push({key:"price",label:n("filter.price"),onRemove:()=>{g(""),S("")}});for(const o of Bt)f.includes(o)&&L.push({key:`rarity-${o}`,label:ft(o),onRemove:()=>ze(o)});return v&&L.push({key:"smart",label:n("filter.smart"),onRemove:()=>T(!1)}),l!=="on_sale"&&L.push({key:"status",label:l==="all"?n("filter.statusAll"):n("filter.notForSale"),onRemove:()=>_e("on_sale")}),e.jsxs(bt,{"data-testid":"browse",children:[a!=="names"&&e.jsxs(e.Fragment,{children:[$?e.jsx(yt,{onClick:()=>_(!1),"aria-hidden":!0}):null,e.jsxs(wt,{"data-open":$||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(jt,{children:[e.jsx(vt,{children:n("assets.filters")}),e.jsx($t,{onClick:()=>_(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(Ct,{children:e.jsx(kt,{category:a,subCategory:x,onCategory:Te,onSub:y,priceMin:k,priceMax:b,onPriceMin:g,onPriceMax:S,rarities:f,onToggleRarity:ze,status:l,onStatus:_e,smart:v,onSmart:T})}),e.jsx(St,{children:e.jsx(Et,{type:"button",onClick:()=>_(!1),children:n("assets.showItems")})})]})]}),e.jsx(Rt,{children:a==="names"?e.jsx(us,{onBack:()=>Te("wearable")}):e.jsxs(e.Fragment,{children:[e.jsx(Wt,{sort:E,onSort:B,total:$e,loading:P||W,query:c,onOpenFilters:()=>_(!0),chips:L,onClearChips:tt}),Je&&I&&F.some(o=>o.source==="legacy")?e.jsx(Tt,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,Ce?e.jsx(Ht,{message:n("assets.loadError"),testId:"browse-error"}):null,!Ee&&F.length===0&&!Ce?e.jsxs(_t,{"data-testid":"browse-empty",children:[e.jsx(zt,{src:gs,alt:""}),e.jsxs(It,{children:[e.jsx(At,{children:n("assets.empty.title")}),e.jsx(Nt,{children:d?e.jsxs(e.Fragment,{children:[n("assets.empty.searchBefore"),e.jsx("b",{children:d}),n("assets.empty.searchAfter")]}):n("assets.empty.filters")})]}),e.jsx(Pt,{children:e.jsx(Mt,{type:"button",onClick:()=>h("/overview"),children:n("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx(en,{"data-testid":"grid",children:Ee?e.jsx(Ie,{count:et}):e.jsxs(e.Fragment,{children:[F.map(o=>{if(!I)return e.jsx(V,{item:o,mode:"view"},Z(o));const j=o;if(j.source!=="legacy")return e.jsx(V,{item:o},Z(o));const z=Xe(j);return z==null?e.jsx(V,{item:o,mode:"view"},Z(o)):e.jsx(V,{item:{...j,priceCredits:z}},Z(o))}),ke?e.jsx(Ie,{count:6}):null]})}),e.jsx(Lt,{hasNextPage:Ve,isFetching:ke,isError:Ze,onLoadMore:()=>void Ke()})]})]})})]})}export{Bs as Assets};
|
|
801
|
+
`,xs="https://docs.decentraland.org/creator/worlds/about/",fs="https://governance.decentraland.org";function ms(r){const i=typeof window<"u"?window.location.hostname:"";return`${i.endsWith("decentraland.org")?"https://decentraland.org":i.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(r)}`}function us({onBack:r}){He({title:n("seo.names.title"),description:n("seo.names.description")});const{session:i,signIn:h}=Ue(),{data:c}=Oe(),d=c?Ge(H,c):null,[a,f]=u.useState(""),[l,p]=u.useState("idle"),[x,y]=u.useState(!1),m=u.useRef(null),[C,k]=u.useState(void 0);u.useLayoutEffect(()=>{m.current&&k(m.current.offsetWidth)},[a]),u.useEffect(()=>{if(!Ne(a).ok){p(a.length===0?"idle":"invalid");return}p("checking");const E=new AbortController,W=setTimeout(()=>{(async()=>{try{const $=await on(a,{signal:E.signal});p($)}catch($){if(($==null?void 0:$.name)==="AbortError")return;p("error")}})()},400);return()=>{clearTimeout(W),E.abort()}},[a]);const g=Ne(a),b=g.ok&&(l==="available"||l==="error");function S(){if(b){if(!i){h();return}y(!0)}}const v=e.jsxs(e.Fragment,{children:[n("names.claim"),d!=null?e.jsxs(os,{children:[e.jsx(M,{}),be(d)]}):null]});return e.jsxs(Bn,{"data-testid":"names-page",children:[e.jsxs(Fn,{"aria-label":n("names.breadcrumbAria"),children:[e.jsx(Ln,{onClick:r,children:n("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(Un,{children:n("names.breadcrumbCurrent")})]}),e.jsxs(Hn,{children:[e.jsxs(On,{children:[e.jsxs(Gn,{children:[e.jsx(Dn,{children:n("names.heroTitle")}),e.jsx(qn,{children:n("names.heroSubtitle")})]}),e.jsxs(Vn,{children:[e.jsxs(Zn,{children:[e.jsxs(Kn,{invalid:l==="taken",children:[e.jsxs(Yn,{children:[e.jsx(es,{"aria-hidden":!0,children:"@"}),e.jsx(ts,{value:a,onChange:_=>f(nn(_.target.value)),placeholder:n("names.inputPlaceholder"),"aria-label":n("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:te,style:{width:C!=null?`${C}px`:void 0}}),e.jsx(Jn,{ref:m,"aria-hidden":!0,children:a||n("names.inputPlaceholder")}),e.jsx(ns,{children:n("names.suffix")})]}),a.length>0?e.jsxs(ss,{"aria-hidden":!0,children:[a.length,"/",te]}):null,e.jsx(qe,{onClick:S,disabled:!b,"data-testid":"names-claim",children:v})]}),l==="taken"?e.jsxs(Qn,{role:"status","data-testid":"names-taken",children:[e.jsx(R,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:n("names.taken")}),e.jsxs(Xn,{href:ms(a),target:"_blank",rel:"noopener noreferrer",children:[n("names.takenMakeOffer"),e.jsx(R,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null]}),e.jsx(rs,{onClick:S,disabled:!b,children:v}),l==="checking"?e.jsx(ue,{tone:"muted",role:"status","data-testid":"names-checking",children:n("names.checking")}):l==="error"?e.jsx(ue,{tone:"muted",role:"status",children:n("names.checkError")}):l==="invalid"&&!g.ok&&g.reason==="too-short"?e.jsx(ue,{tone:"muted",role:"status",children:n("names.tooShort",{min:De})}):null,e.jsx(hs,{role:"status","aria-live":"polite",children:l==="available"?n("names.available",{name:a}):""})]})]}),e.jsxs(is,{children:[e.jsxs(as,{children:[e.jsx(ls,{children:n("names.whyTitle")}),e.jsx(cs,{children:n("names.whyIntro")})]}),e.jsxs(ds,{children:[e.jsxs(K,{children:[e.jsx(J,{src:Nn,alt:""}),e.jsxs(Q,{children:[e.jsx(X,{children:n("names.why1Title")}),e.jsx(Y,{children:n("names.why1")})]})]}),e.jsxs(K,{children:[e.jsx(J,{src:Pn,alt:""}),e.jsxs(Q,{children:[e.jsx(X,{children:n("names.why2Title")}),e.jsxs(Y,{children:[n("names.why2")," ",e.jsx(ps,{children:n("names.why2Address")})]}),e.jsxs(Fe,{href:xs,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(R,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(K,{children:[e.jsx(J,{src:Mn,alt:""}),e.jsxs(Q,{children:[e.jsx(X,{children:n("names.why3Title")}),e.jsx(Y,{children:n("names.why3")})]})]}),e.jsxs(K,{children:[e.jsx(J,{src:Wn,alt:""}),e.jsxs(Q,{children:[e.jsx(X,{children:n("names.why4Title")}),e.jsx(Y,{children:n("names.why4")}),e.jsxs(Fe,{href:fs,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(R,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),x?e.jsx(In,{name:a,priceCredits:d,onClose:()=>y(!1)}):null]})}const gs="data:image/svg+xml,%3csvg%20width='101'%20height='101'%20viewBox='0%200%20101%20101'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M42.4493%2040.9855L30.7394%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M30.7391%2040.9855L42.449%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M36.2621%2071.0604C29.6047%2071.0604%2023.9709%2068.7542%2019.3608%2064.1416C14.7507%2059.5291%2012.4445%2053.8953%2012.442%2047.2404C12.4396%2040.5854%2014.7459%2034.9516%2019.3608%2030.3391C23.9758%2025.7266%2029.6096%2023.4203%2036.2621%2023.4203C42.9146%2023.4203%2048.5496%2025.7266%2053.167%2030.3391C57.7844%2034.9516%2060.0895%2040.5854%2060.0822%2047.2404C60.0822%2049.9277%2059.6546%2052.4624%2058.7995%2054.8445C57.9445%2057.2265%2056.784%2059.3336%2055.3181%2061.1659L75.84%2081.6878C76.5119%2082.3597%2076.8478%2083.2148%2076.8478%2084.2531C76.8478%2085.2914%2076.5119%2086.1465%2075.84%2086.8183C75.1682%2087.4902%2074.3131%2087.8261%2073.2748%2087.8261C72.2365%2087.8261%2071.3814%2087.4902%2070.7096%2086.8183L50.1877%2066.2964C48.3554%2067.7623%2046.2482%2068.9227%2043.8662%2069.7778C41.4842%2070.6329%2038.9495%2071.0604%2036.2621%2071.0604ZM36.2621%2063.7312C40.8429%2063.7312%2044.7372%2062.1285%2047.9449%2058.9232C51.1527%2055.7179%2052.7554%2051.8236%2052.7529%2047.2404C52.7505%2042.6571%2051.1478%2038.7641%2047.9449%2035.5612C44.742%2032.3583%2040.8478%2030.7544%2036.2621%2030.7495C31.6764%2030.7447%2027.7834%2032.3485%2024.5829%2035.5612C21.3825%2038.7739%2019.7786%2042.6669%2019.7713%2047.2404C19.764%2051.8138%2021.3678%2055.7081%2024.5829%2058.9232C27.798%2062.1383%2031.6911%2063.7409%2036.2621%2063.7312Z'%20fill='url(%23paint0_linear_search_empty)'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_search_empty'%20x1='10.4127'%20y1='55.6273'%20x2='124.009'%20y2='44.925'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF2D55'/%3e%3cstop%20offset='1'%20stop-color='%23FFBC5B'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",ge=48,bs=["all","on_sale","not_for_sale"];function Ws(){const[r,i]=nt(),h=Le(),c=(r.get("q")??"").trim().toLowerCase(),d=(r.get("q")??"").trim();He({title:d?n("seo.collectibles.searchTitle",{query:d}):n("seo.collectibles.title"),description:n("seo.collectibles.description")});const a=r.get("category")??(c?"all":"wearable"),f=r.get("status"),l=f&&bs.includes(f)?f:"on_sale",p=(o,j)=>i(z=>{const ne=new URLSearchParams(z);return j==null?ne.delete(o):ne.set(o,j),ne},{replace:!0}),[x,y]=u.useState(null),[m,C]=u.useState([]),[k,g]=u.useState(""),[b,S]=u.useState(""),[v,_]=u.useState(!1),[E,W]=u.useState("newest"),[$,T]=u.useState(!1);u.useEffect(()=>{if(!$)return;const o=z=>{z.key==="Escape"&&T(!1)};document.addEventListener("keydown",o);const j=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",o),document.body.style.overflow=j}},[$]);const I=l==="on_sale",A=k&&!Number.isNaN(Number(k))?Number(k):void 0,N=b&&!Number.isNaN(Number(b))?Number(b):void 0,w=ft(),O=x?Ft[x]:void 0,G=(Ae.find(o=>o.key===E)??Ae[0]).server,je={category:a,rarities:m.length?m:void 0,wearableCategories:O,minPriceCredits:A,maxPriceCredits:N,search:c||void 0,sortBy:G,isSmart:v||void 0,onSale:!0,listingType:w?void 0:"primary"},ve={category:a,rarities:m.length?m:void 0,wearableCategories:O,search:c||void 0,sortBy:G,isWearableSmart:v||void 0,isOnSale:l==="not_for_sale"?!1:void 0},{items:F,total:$e,isLoading:P,isPlaceholderData:B,error:Ce,hasNextPage:Ve,isFetchingNextPage:ke,isFetchNextPageError:Ze,fetchNextPage:Ke}=Ut(I?["shop-items",je]:["catalog-items",ve],o=>I?ut({...je,first:ge,skip:o}):gt({...ve,first:ge,skip:o}),{enabled:a!=="names"}),D=$e,{data:Se,isError:Je,isPending:Qe}=Oe(),Xe=o=>Se&&o.manaWei?Ge(o.manaWei,Se):null,Ye=I&&Qe&&F.some(o=>o.source==="legacy"),Ee=P||B||Ye,et=P?15:Math.min(Math.max(F.length,1),ge),Re=u.useRef(null);u.useEffect(()=>{P||B||!c||Re.current===c||(Re.current=c,ee("Shop Searched",{query:c,result_count:D}))},[c,P,B,D]);const q=u.useRef("__init__");u.useEffect(()=>{if(P||B)return;const o=JSON.stringify({category:a,subCategory:x,rarities:m,min:A,max:N,sort:E,status:l,smart:v});if(q.current==="__init__"||q.current===o){q.current=o;return}q.current=o,ee("Shop Applied Filter",{filters:{category:a,sub_category:x,rarities:m,min_price_credits:A??null,max_price_credits:N??null,status:l,smart:v,sort:E},result_count:D})},[a,x,m,A,N,E,l,v,P,B,D]);function _e(o){p("category",o),y(null)}function Te(o){p("status",o==="on_sale"?null:o)}function ze(o){C(j=>j.includes(o)?j.filter(z=>z!==o):[...j,o])}function tt(){i(o=>{const j=new URLSearchParams(o);return j.delete("category"),j.delete("status"),j},{replace:!0}),y(null),C([]),g(""),S(""),_(!1)}const L=[];(A!=null||N!=null)&&L.push({key:"price",label:n("filter.price"),onRemove:()=>{g(""),S("")}});for(const o of Wt)m.includes(o)&&L.push({key:`rarity-${o}`,label:mt(o),onRemove:()=>ze(o)});return v&&L.push({key:"smart",label:n("filter.smart"),onRemove:()=>_(!1)}),l!=="on_sale"&&L.push({key:"status",label:l==="all"?n("filter.statusAll"):n("filter.notForSale"),onRemove:()=>Te("on_sale")}),e.jsxs(bt,{"data-testid":"browse",children:[a!=="names"&&e.jsxs(e.Fragment,{children:[$?e.jsx(yt,{onClick:()=>T(!1),"aria-hidden":!0}):null,e.jsxs(wt,{"data-open":$||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(jt,{children:[e.jsx(vt,{children:n("assets.filters")}),e.jsx($t,{onClick:()=>T(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(Ct,{children:e.jsx(kt,{category:a,subCategory:x,onCategory:_e,onSub:y,priceMin:k,priceMax:b,onPriceMin:g,onPriceMax:S,rarities:m,onToggleRarity:ze,status:l,onStatus:Te,smart:v,onSmart:_})}),e.jsx(St,{children:e.jsx(Et,{type:"button",onClick:()=>T(!1),children:n("assets.showItems")})})]})]}),e.jsx(Rt,{children:a==="names"?e.jsx(us,{onBack:()=>_e("wearable")}):e.jsxs(e.Fragment,{children:[e.jsx(Bt,{sort:E,onSort:W,total:$e,loading:P||B,query:c,onOpenFilters:()=>T(!0),chips:L,onClearChips:tt}),Je&&I&&F.some(o=>o.source==="legacy")?e.jsx(_t,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,Ce?e.jsx(Ht,{message:n("assets.loadError"),testId:"browse-error"}):null,!Ee&&F.length===0&&!Ce?e.jsxs(Tt,{"data-testid":"browse-empty",children:[e.jsx(zt,{src:gs,alt:""}),e.jsxs(It,{children:[e.jsx(At,{children:n("assets.empty.title")}),e.jsx(Nt,{children:d?e.jsxs(e.Fragment,{children:[n("assets.empty.searchBefore"),e.jsx("b",{children:d}),n("assets.empty.searchAfter")]}):n("assets.empty.filters")})]}),e.jsx(Pt,{children:e.jsx(Mt,{type:"button",onClick:()=>h("/overview"),children:n("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx(en,{"data-testid":"grid",children:Ee?e.jsx(Ie,{count:et}):e.jsxs(e.Fragment,{children:[F.map(o=>{if(!I)return e.jsx(V,{item:o,mode:"view"},Z(o));const j=o;if(j.source!=="legacy")return e.jsx(V,{item:o},Z(o));const z=Xe(j);return z==null?e.jsx(V,{item:o,mode:"view"},Z(o)):e.jsx(V,{item:{...j,priceCredits:z}},Z(o))}),ke?e.jsx(Ie,{count:6}):null]})}),e.jsx(Lt,{hasNextPage:Ve,isFetching:ke,isError:Ze,onLoadMore:()=>void Ke()})]})]})})]})}export{Ws as Assets};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as $,j as t}from"./react-DehiWSvs.js";import{R as T,C as se,a as ae
|
|
1
|
+
import{r as $,j as t}from"./react-DehiWSvs.js";import{R as T,C as se,a as ae}from"./categories-BbYXk3ti.js";import{t as e,s as o,I as g,b as s,af as re,C as v,ag as le}from"./index-DbCMsBDL.js";import{n as c,T as ce}from"./Tooltip-Dh6dtNV3.js";const de=o.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 12px;
|
|
@@ -367,7 +367,7 @@ import{r as $,j as t}from"./react-DehiWSvs.js";import{R as T,C as se,a as ae,b a
|
|
|
367
367
|
height: 18px;
|
|
368
368
|
left: ${({on:i})=>i?"calc(100% - 18px)":"2px"};
|
|
369
369
|
}
|
|
370
|
-
`,d=1e5;function De(i){var l;for(const h of ae){const p=(l=h.subs)==null?void 0:l.find(a=>a.key===i);if(p)return s(p.labelKey)}return i}function j({title:i,open:l,onToggle:h,summary:p,desktopStatic:a,headerTestId:x,headerAria:f,children:u}){const m=t.jsx(
|
|
370
|
+
`,d=1e5;function De(i){var l;for(const h of ae){const p=(l=h.subs)==null?void 0:l.find(a=>a.key===i);if(p)return s(p.labelKey)}return i}function j({title:i,open:l,onToggle:h,summary:p,desktopStatic:a,headerTestId:x,headerAria:f,children:u}){const m=t.jsx(le,{up:l,size:24,color:e.colors.text});return t.jsxs(pe,{children:[t.jsxs(xe,{type:"button",desktopStatic:a,onClick:h,"aria-expanded":l,"aria-label":f,"data-testid":x,children:[t.jsx(he,{children:i}),a?t.jsx(me,{children:m}):m]}),!l&&p?t.jsx(ge,{desktopHidden:a,children:p}):null,t.jsx(fe,{open:l,desktopStatic:a,children:t.jsx(ue,{children:u})})]})}function Ye({category:i,subCategory:l,onCategory:h,onSub:p,priceMin:a,priceMax:x,onPriceMin:f,onPriceMax:u,rarities:m,onToggleRarity:B,status:S,onStatus:D,smart:b,onSmart:L,hideNames:O=!1,collections:C=!1,onCollections:_}){const[M,Y]=$.useState(!0),[K,U]=$.useState(!0),[q,G]=$.useState(!1),[V,X]=$.useState(!0),R=a&&!Number.isNaN(Number(a))?Number(a):void 0,z=x&&!Number.isNaN(Number(x))?Number(x):void 0,w=R!=null?Math.min(R,d):0,y=z!=null?Math.min(z,d):d,J=w/d*100,Q=y/d*100;function Z(n){const r=Math.min(n,y);f(r<=0?"":String(r))}function ee(n){const r=Math.max(n,w);u(r>=d?"":String(r))}const te=C?s("categories.collections"):l?De(l):i!=="wearable"?s(`categories.${i==="emote"?"emotes":i==="all"?"shopAll":i}`):"",oe=R!=null||z!=null?`${a||"0"}-${x||"∞"}`:"",ie=T.filter(n=>m.includes(n)).map(re).join(", "),ne=S==="on_sale"?s("filter.onSale"):S==="not_for_sale"?s("filter.notForSale"):"";return t.jsxs(de,{children:[t.jsx(j,{title:s("assets.category"),open:M,onToggle:()=>Y(n=>!n),summary:te,desktopStatic:!0,children:t.jsx(se,{category:i,subCategory:l,onCategory:h,onSub:p,hideNames:O,collections:C,onCollections:_})}),t.jsx(k,{}),t.jsxs(j,{title:s("filter.price"),open:K,onToggle:()=>U(n=>!n),summary:oe,desktopStatic:!0,children:[t.jsxs(be,{children:[t.jsxs(W,{children:[t.jsx(N,{children:s("assets.min")}),t.jsxs(P,{children:[t.jsx(F,{name:v.iconName,"aria-hidden":!0}),t.jsx(E,{type:"number",min:"0","aria-label":s("assets.minPriceAria"),placeholder:"0",value:a,onChange:n=>f(n.target.value)})]})]}),t.jsx(we,{children:s("assets.priceTo")}),t.jsxs(W,{children:[t.jsx(N,{children:s("assets.max")}),t.jsxs(P,{children:[t.jsx(F,{name:v.iconName,"aria-hidden":!0}),t.jsx(E,{type:"number",min:"0","aria-label":s("assets.maxPriceAria"),placeholder:"0",value:x,onChange:n=>u(n.target.value)})]})]})]}),t.jsxs(ye,{children:[t.jsx($e,{"aria-hidden":!0}),t.jsx(ve,{minPct:J,maxPct:Q,"aria-hidden":!0}),t.jsx(I,{type:"range",min:0,max:d,value:w,"aria-label":s("assets.minPriceSliderAria"),onChange:n=>Z(Number(n.target.value))}),t.jsx(I,{type:"range",min:0,max:d,value:y,"aria-label":s("assets.maxPriceSliderAria"),onChange:n=>ee(Number(n.target.value))})]}),t.jsxs(ke,{children:[t.jsxs(A,{children:[t.jsx(H,{name:v.iconName,"aria-hidden":!0}),w.toLocaleString()]}),t.jsxs(A,{children:[t.jsx(H,{name:v.iconName,"aria-hidden":!0}),y.toLocaleString()]})]})]}),t.jsx(k,{}),t.jsx(j,{title:s("assets.rarity"),open:q,onToggle:()=>G(n=>!n),summary:ie,headerTestId:"sidebar-section-toggle",children:t.jsx(je,{"data-testid":"rarity-filter",children:T.map(n=>{const r=m.includes(n);return t.jsxs(Se,{type:"button",selected:r,"aria-pressed":r,onClick:()=>B(n),"data-testid":"rarity-filter-check",children:[t.jsx(Re,{color:e.rarities[n],children:r?t.jsx(ze,{name:"check","aria-hidden":!0}):null}),t.jsx(Ce,{selected:r,children:n})]},n)})})}),t.jsx(k,{}),t.jsx(j,{title:s("filter.status"),open:V,onToggle:()=>X(n=>!n),summary:ne,children:[["all",s("filter.statusAll")],["on_sale",s("filter.onSale")],["not_for_sale",s("filter.notForSale")]].map(([n,r])=>t.jsxs(Te,{children:[t.jsx(We,{type:"radio",name:"shop-status",checked:S===n,onChange:()=>D(n)}),t.jsx(Ne,{children:r})]},n))}),t.jsx(k,{}),t.jsxs(Pe,{children:[t.jsxs(Fe,{children:[t.jsx(Ee,{name:"smart","aria-hidden":!0}),t.jsx(Ie,{children:s("filter.smart")}),t.jsx(ce,{content:s("filter.smartHint"),placement:"bottom",children:t.jsx(Ae,{name:"info",role:"img","aria-label":s("filter.smartHint"),tabIndex:0,"data-testid":"smart-hint"})})]}),t.jsx(He,{type:"button",role:"switch",on:b,"aria-checked":b,"aria-label":s("filter.smart"),onClick:()=>L(!b),children:t.jsx(Be,{on:b})})]})]})}const Ke=o.div`
|
|
371
371
|
position: relative;
|
|
372
372
|
display: flex;
|
|
373
373
|
gap: 32px;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as i,L as _,r as P}from"./react-DehiWSvs.js";import{s as n,B as W,t as a,o as D,q as F,b as e,k as G,v as O,I as z,w as B,n as w,x as K,c as Q,y as H,z as A,A as X,D as Z,E}from"./index-
|
|
1
|
+
import{j as i,L as _,r as P}from"./react-DehiWSvs.js";import{s as n,B as W,t as a,o as D,q as F,b as e,k as G,v as O,I as z,w as B,n as w,x as K,c as Q,y as H,z as A,A as X,D as Z,E}from"./index-DbCMsBDL.js";import{e as J,f as U,d as V,h as Y,s as tt,b as it}from"./authorizations-w-yCHVpU.js";import{f as et}from"./builder-CYMYImB0.js";import{m as ot}from"./mana-matic-C4e1sNO3.js";import{f as at}from"./errors-BAqCaL6O.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-CmtP3U6y.js";import"./ethers-DejfrZ8i.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-B6HBQ8NH.js";const nt=D`
|
|
2
2
|
to { transform: rotate(360deg); }
|
|
3
3
|
`,st=D`
|
|
4
4
|
to { background-position: -200% 0; }
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,L as Se,r as P,d as Zt,b as ea}from"./react-DehiWSvs.js";import{t as le,s as i,b as a,
|
|
1
|
+
import{j as e,L as Se,r as P,d as Zt,b as ea}from"./react-DehiWSvs.js";import{t as le,s as i,b as a,aA as de,b6 as ta,az as aa,I as H,w as St,ae as Ke,q as sa,P as Q,ah as ot,k as na,l as ia,n as ra,b7 as oa,x as ca,b8 as da,ai as la,b9 as ua,ba as ct,bb as ha,bc as pa,v as ga,bd as dt,R as G,be as lt,bf as xa,A as ae,r as ma,c as ut,bg as fa,C as ya,bh as ht,bi as Re,bj as ba,bk as fe,bl as ye,bm as pt,g as be,d as va,e as Be,bn as wa}from"./index-DbCMsBDL.js";import{M as Ca,S as ja,C as ka,H as Sa,a as $a,T as Ma,X as Ta,b as Ia,B as Pa,c as za,d as gt,e as Aa,f as je,P as $t,m as Ea,g as qa,h as Ra,i as Ba,j as Mt,k as ke,L as _a,l as Wa,n as xt,o as mt,W as Fa,p as La,q as Ka,A as Ua,r as Na,s as Qa,t as Ha,u as Oa,v as Va,w as Ga,x as Da,y as Ya,z as Ja,D as Xa,E as Za,F as es,G as ts,I as as,J as ss,K as _e,N as ns,O as is,Q as rs,R as os,U as ft,V as yt,Y as cs,Z as ds,_ as ls}from"./CollectionCarousel-CnR1So5p.js";import{p as us,q as hs,b as ps,t as gs,j as xs,A as ms}from"./authorizations-w-yCHVpU.js";import{g as fs,j as We}from"./buy-DIVuBMot.js";import{b as ys,w as bs,S as bt,G as vs}from"./buy-gasless-DIfZSqYX.js";import{u as ws,M as Cs,R as ve,r as js,c as ks,p as vt}from"./useCreditPacks-CeoLpXxe.js";import{i as Ss,a as $s}from"./errors-BAqCaL6O.js";import{E as Ms}from"./ErrorNotice-BXWX_0E4.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-CmtP3U6y.js";import"./ethers-DejfrZ8i.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-B6HBQ8NH.js";const{colors:se,radius:Ts}=le,Is=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 Se,r as P,d as Zt,b as ea}from"./react-DehiWSvs.js";import{t
|
|
|
58
58
|
font-weight: 700;
|
|
59
59
|
color: ${se.text};
|
|
60
60
|
}
|
|
61
|
-
`,qs="https://cdn.decentraland.org/@dcl/shop/0.
|
|
61
|
+
`,qs="https://cdn.decentraland.org/@dcl/shop/0.8.0/_assets/buy-error-22UunaPC.png";function Rs(o){const{phase:l,balanceCredits:I,onClose:z}=o,W=l==="processing",D=l==="error"?a("cartCheckout.errorTitle"):l==="nofunds"?a("cartCheckout.titleNoFunds"):l==="choose"?a("buyModal.choosePayment"):a("cartCheckout.titleBuy"),Y=l==="processing";return e.jsxs(Ca,{role:"dialog","aria-modal":"true","aria-label":a("cartCheckout.dialogAria"),children:[e.jsx(ja,{onClick:W?void 0:z,"aria-hidden":!0}),e.jsxs(ka,{"data-tall":Y||void 0,children:[e.jsxs(Sa,{children:[e.jsxs($a,{children:[e.jsx(Ma,{children:D}),!W&&e.jsx(Ta,{onClick:z,"aria-label":a("buyModal.close"),children:e.jsx(Ia,{})})]}),e.jsxs(Pa,{children:[e.jsx(za,{children:l==="nofunds"?a("buyModal.dclBalance"):a("buyModal.myCreditsBalance")}),e.jsx(gt,{}),e.jsx(Aa,{children:de(I)})]})]}),l==="choose"&&e.jsxs(je,{children:[e.jsxs(Es,{children:[e.jsx("span",{children:a("cart.purchaseSummary")}),e.jsxs("strong",{children:[e.jsx(gt,{}),de(o.totalCredits??0)]})]}),e.jsx($t,{options:o.options??[],totalCents:o.totalCents??0,onPay:o.onPay??(()=>{}),rateNote:(()=>{const A=Ea(o.totalCents??0,o.totalManaWei??0n);return A!=null?a("buyModal.manaRate",{mana:A.toLocaleString("en",{maximumFractionDigits:2})}):null})()})]}),l==="processing"&&e.jsx(Bs,{stage:o.stage??"reserving",step:o.step??1,total:o.total??1,isSelfCustody:!!o.isSelfCustody,signatures:o.signatures}),l==="nofunds"&&e.jsx(_s,{lines:o.lines??[],shortfallCredits:o.shortfallCredits??0,packs:o.packs??[],selectedPack:o.selectedPack??"",onSelectPack:o.onSelectPack??(()=>{}),onBuyPacks:o.onBuyPacks??(()=>{}),onCancel:z}),l==="error"&&e.jsxs(je,{children:[e.jsxs(qa,{"data-testid":"buy-error",children:[e.jsx(Ra,{src:qs,alt:"",width:64,height:80}),e.jsxs(Ba,{children:[e.jsx("b",{children:a("cartCheckout.errorHeadline")})," ",o.message??a("cartCheckout.errorBody")]})]}),e.jsxs(Mt,{children:[e.jsx(ke,{"data-variant":"outline",onClick:z,children:a("buyModal.cancel")}),e.jsx(ke,{"data-variant":"purple",onClick:o.onRetry??z,children:a("cartCheckout.tryAgain")})]})]})]})]})}function Bs({stage:o,step:l,total:I,isSelfCustody:z,signatures:W}){const D=o==="reserving",Y=I>0?Math.min(100,Math.round(l/I*100)):0,A=z&&W&&W.total>1,ne=o==="awaiting-signature"?z?A?a("cartCheckout.confirmMultiple",{current:W.current,total:W.total}):a("buyModal.confirmToContinue"):a("buyModal.completingTransaction"):o==="settling"?a("buyModal.completingTransaction"):a("cartCheckout.preparing");return e.jsxs(je,{"data-processing":!0,children:[e.jsx(_a,{src:ta,alt:"",width:61,height:61}),e.jsx(Wa,{children:ne}),D?e.jsxs(Is,{children:[e.jsx(xt,{"aria-hidden":!0,children:e.jsx(mt,{"data-step":!0,style:{width:`${Y}%`}})}),I>1?e.jsxs(Ps,{children:[l,"/",I]}):null]}):e.jsx(xt,{"aria-hidden":!0,children:e.jsx(mt,{})})]})}function _s({lines:o,shortfallCredits:l,packs:I,selectedPack:z,onSelectPack:W,onBuyPacks:D,onCancel:Y}){const A=I.find(n=>n.id===z),ne=o.reduce((n,L)=>n+(L.quantity??1),0);return e.jsxs(je,{children:[e.jsxs(Fa,{"data-testid":"nofunds-warning",children:[e.jsx(La,{}),e.jsxs(Ka,{children:[e.jsx("b",{children:a("buyModal.insufficientFunds")})," ",a("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:a("buyModal.warningCreditsAmount",{count:Math.max(0,l)})})," ",a("buyModal.warningToPurchase",{count:ne})]})]}),e.jsx(zs,{children:o.map(n=>{const L=n.quantity??1;return e.jsxs(Ua,{children:[e.jsx(Na,{children:n.item.thumbnail?e.jsx("img",{src:n.item.thumbnail,alt:""}):null}),e.jsxs(Qa,{children:[e.jsxs("div",{children:[e.jsxs(Ha,{title:n.item.name,children:[n.item.name||a("buyModal.itemFallback"),L>1?e.jsx(As,{children:a("cartCheckout.qty",{count:L})}):null]}),n.item.creator?e.jsx(Oa,{address:n.item.creator}):null]}),e.jsxs(Va,{children:[e.jsx(Ga,{}),e.jsx("span",{children:de(n.priceCredits*L)})]})]})]},n.item.id)})}),e.jsx(Da,{children:I.map(n=>{const L=n.id===z;return e.jsxs(Ya,{"data-testid":"credit-pack","data-on":L||void 0,onClick:()=>W(n.id),children:[e.jsx(Ja,{}),e.jsx(Xa,{children:de(n.credits)}),e.jsxs(Za,{children:["($",n.usd.toFixed(2),")"]})]},n.id)})}),e.jsxs(es,{children:[e.jsxs(ts,{children:[e.jsx(as,{}),e.jsx("span",{children:de((A==null?void 0:A.credits)??0)})]}),e.jsxs(ss,{children:["$",((A==null?void 0:A.usd)??0).toFixed(2)]})]}),e.jsxs(Mt,{children:[e.jsx(ke,{"data-variant":"outline",onClick:Y,children:a("buyModal.cancel")}),e.jsx(ke,{"data-variant":"gradient",onClick:D,children:a("buyModal.buy")})]})]})}const{colors:r,gradients:Tt,radius:Z}=le,It="@media (max-width: 1080px)",T="@media (max-width: 880px)",wt=i.div`
|
|
62
62
|
max-width: 1510px;
|
|
63
63
|
margin: 0 auto;
|
|
64
64
|
/* Grows into the page's leftover height and passes it down to Upsell, so the white cross-sell band ends at
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aa as N,ab as U,ac as o,ad as n,ae as D,o as M}from"./index-
|
|
1
|
+
import{aa as N,ab as U,ac as o,ad as n,ae as D,o as M}from"./index-DbCMsBDL.js";import{r as w,j as g}from"./react-DehiWSvs.js";import{g as z,a as E,c as I,b as F}from"./clsx-WwvpwSg0.js";import{s as v}from"./styled-INC_AiMB.js";function K(r){return z("MuiCircularProgress",r)}E("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const W=["className","color","disableShrink","size","style","thickness","value","variant"];let l=r=>r,P,b,S,$;const a=44,B=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 h,u as J,d as X}from"./react-DehiWSvs.js";import{t as b,s,
|
|
1
|
+
import{j as e,r as h,u as J,d as X}from"./react-DehiWSvs.js";import{t as b,s,bo as ee,V as te,y as z,bp as ae,bq as oe,I as ie,b as a,c as re,A as se,n as ne,q as ce,C as le,ak as F,al as de,br as pe,bs as xe}from"./index-DbCMsBDL.js";import{E as me}from"./ErrorNotice-BXWX_0E4.js";import{d as he,P as ue,C as ge,a as be,b as fe,A as ve}from"./collectionPage.styles-CHbJGgda.js";import{S as L,C as ye,F as je,b as Ce,P as we,c as $e,H as ke,d as Ne}from"./categories-BbYXk3ti.js";import{L as Ae}from"./LoadMore-DcIHY8Kf.js";import{u as Pe}from"./useInfiniteGrid-D9jUBgv1.js";import{G as Se}from"./grid.styles-DoBUqqdT.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-CmtP3U6y.js";import"./ethers-DejfrZ8i.js";import"./intl-CBcMB1D2.js";const Me=s.section`
|
|
2
2
|
position: relative;
|
|
3
3
|
border-radius: ${b.radius.card};
|
|
4
4
|
overflow: hidden;
|
|
@@ -116,7 +116,7 @@ import{j as e,r as h,u as J,d as X}from"./react-DehiWSvs.js";import{t as b,s,bn
|
|
|
116
116
|
background: ${c.accent};
|
|
117
117
|
color: ${c.white};
|
|
118
118
|
}
|
|
119
|
-
`;function _e({address:o}){var v,l;const{data:t}=te(o),[n,d]=h.useState(!1);if(!o)return null;const p=(t==null?void 0:t.name)||z(o),u=(l=(v=t==null?void 0:t.avatar)==null?void 0:v.snapshots)==null?void 0:l.face256,g=`${re.profileUrl}/${o}`,f=ae(oe({name:t==null?void 0:t.name,hasClaimedName:t==null?void 0:t.hasClaimedName,ethAddress:(t==null?void 0:t.ethAddress)??o}));async function x(){try{await navigator.clipboard.writeText(o),d(!0),window.setTimeout(()=>d(!1),1500)}catch(
|
|
119
|
+
`;function _e({address:o}){var v,l;const{data:t}=te(o),[n,d]=h.useState(!1);if(!o)return null;const p=(t==null?void 0:t.name)||z(o),u=(l=(v=t==null?void 0:t.avatar)==null?void 0:v.snapshots)==null?void 0:l.face256,g=`${re.profileUrl}/${o}`,f=ae(oe({name:t==null?void 0:t.name,hasClaimedName:t==null?void 0:t.hasClaimedName,ethAddress:(t==null?void 0:t.ethAddress)??o}));async function x(){try{await navigator.clipboard.writeText(o),d(!0),window.setTimeout(()=>d(!1),1500)}catch(j){se(j,{flow:"copy_creator_address"})}}return e.jsxs(Le,{"data-testid":"creator-card",children:[u?e.jsx(B,{src:u,alt:"",loading:"eager",style:{backgroundColor:f}}):e.jsx(B,{as:"span","aria-hidden":!0,style:{backgroundColor:f}}),e.jsx(Be,{title:p,children:p}),e.jsxs(Ie,{type:"button",onClick:()=>void x(),title:n?a("collection.copied"):a("collection.copyAddress"),"aria-label":n?a("collection.copied"):a("collection.copyAddress"),children:[e.jsx("span",{children:z(o)}),e.jsx(ie,{name:"copy",size:16})]}),e.jsx(We,{"data-testid":"creator-card-view",href:g,target:"_blank",rel:"noopener noreferrer",children:a("collection.viewProfile")})]})}const{colors:qe,media:$}=b,Ge=s.div`
|
|
120
120
|
position: relative;
|
|
121
121
|
display: flex;
|
|
122
122
|
gap: 32px;
|
|
@@ -159,4 +159,4 @@ import{j as e,r as h,u as J,d as X}from"./react-DehiWSvs.js";import{t as b,s,bn
|
|
|
159
159
|
visibility: visible;
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
|
-
`,Ye=48;function it(){var T;const{contractAddress:o}=J(),t=X(),[n,d]=h.useState("wearable"),[p,u]=h.useState(null),[g,f]=h.useState([]),[x,v]=h.useState(""),[l,
|
|
162
|
+
`,Ye=48;function it(){var T;const{contractAddress:o}=J(),t=X(),[n,d]=h.useState("wearable"),[p,u]=h.useState(null),[g,f]=h.useState([]),[x,v]=h.useState(""),[l,j]=h.useState(""),[k,W]=h.useState("newest"),N=x&&!Number.isNaN(Number(x))?Number(x):void 0,A=l&&!Number.isNaN(Number(l))?Number(l):void 0,_=p?Ne[p]:void 0,q=(L.find(i=>i.key===k)??L[0]).server,P={category:n,rarities:g.length?g:void 0,wearableCategories:_,minPriceCredits:N,maxPriceCredits:A,sortBy:q},{items:y,total:G,isLoading:C,error:S,hasNextPage:H,isFetchingNextPage:M,isFetchNextPageError:U,fetchNextPage:Y}=Pe(["collection-page",o,P],i=>pe(o,{...P,first:Ye,skip:i}),{enabled:!!o}),{data:r}=ne({queryKey:["collection-meta",o],queryFn:()=>xe(o),enabled:!!o,staleTime:5*6e4}),E=(r==null?void 0:r.name)||a("collection.fallbackTitle");ce({title:r==null?void 0:r.name,description:r!=null&&r.name?a("seo.collection.description",{name:r.name}):void 0});const R=(r==null?void 0:r.creator)||((T=y[0])==null?void 0:T.creator);function K(i){d(i),u(null)}function V(i){f(m=>m.includes(i)?m.filter(Z=>Z!==i):[...m,i])}function D(){d("wearable"),u(null),f([]),v(""),j("")}const w=!!(N||A),O=w?`${x||"0"}–${l||"∞"}`:a("filter.price"),Q=n!=="wearable"||!!p||g.length>0||w;return e.jsxs(ue,{"data-testid":"collection-page",children:[e.jsxs(ge,{"aria-label":a("collection.breadcrumbAria"),children:[e.jsx(be,{onClick:()=>t("/items"),children:a("collection.breadcrumb")}),e.jsx("span",{children:"/"}),e.jsx(fe,{children:E})]}),e.jsx(Fe,{name:E,creator:R}),e.jsxs(Ge,{"data-testid":"browse",children:[e.jsxs(Ue,{"data-testid":"browse-sidebar",children:[e.jsx(_e,{address:R}),e.jsx(ye,{category:n,subCategory:p,onCategory:K,onSub:u,title:a("collection.category"),flat:!0})]}),e.jsxs(He,{children:[!C&&y.length>0?e.jsx(ve,{items:y,source:"collection"}):null,e.jsx(je,{rarities:g,onToggleRarity:V,sort:k,onSort:W,total:G,loading:C,anyActive:Q,onClear:D,renderTrailing:i=>e.jsx(Ce,{panelKey:"price",label:O,active:w,panel:i,children:e.jsxs(we,{"data-variant":"price",children:[e.jsxs($e,{children:[e.jsx("input",{type:"number",min:"0","aria-label":a("collection.priceMin"),placeholder:a("collection.priceMinPlaceholder"),value:x,onChange:m=>v(m.target.value)}),e.jsx("span",{children:"–"}),e.jsx("input",{type:"number",min:"0","aria-label":a("collection.priceMax"),placeholder:a("collection.priceMaxPlaceholder"),value:l,onChange:m=>j(m.target.value)})]}),e.jsx(ke,{children:a("collection.priceHint",{currency:le.name})})]})})}),S?e.jsx(me,{message:a("collection.error")}):null,e.jsx(Se,{"data-testid":"grid",children:C?e.jsx(F,{count:15}):e.jsxs(e.Fragment,{children:[y.map(i=>e.jsx(de,{item:i},i.id)),M?e.jsx(F,{count:6}):null]})}),e.jsx(Ae,{hasNextPage:H,isFetching:M,isError:U,onLoadMore:()=>void Y()}),!C&&!S&&y.length===0?e.jsx("p",{className:"muted",children:a("collection.empty")}):null]})]})]})}export{it as Collection,it as default};
|