@dcl/shop 0.5.0 → 0.5.1-30936450524.commit-699b9ba
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-BNdtDMvf.js +336 -0
- package/_assets/{AnimatedBackground-C4vGO85y.js → AnimatedBackground-DtccR1Yr.js} +2 -2
- package/_assets/{Assets-DUB4VCUr.js → Assets-BPmdORes.js} +11 -11
- package/_assets/{Assets.styles-DIh1hG4_.js → Assets.styles-DGFYQnxw.js} +1 -1
- package/_assets/{Authorizations-gse9z0i5.js → Authorizations-DxyGJ4g6.js} +3 -3
- package/_assets/{Cart-xOvVoYwp.js → Cart-BK5UrFhK.js} +6 -6
- package/_assets/{CircularProgress-BZT_u7sL.js → CircularProgress-DdEjsaZL.js} +1 -1
- package/_assets/{Collection-DkMWDyM9.js → Collection-DqFConie.js} +7 -7
- package/_assets/{CollectionCarousel-D-7TqEHy.js → CollectionCarousel-ChFXFBmM.js} +7 -7
- package/_assets/{Creator-CIj-i2cJ.js → Creator-DrGLyYfy.js} +9 -9
- package/_assets/{ErrorNotice-qXSCgBBe.js → ErrorNotice-BCKaFzga.js} +1 -1
- package/_assets/{ExchangeController-CoWk4iJ_.js → ExchangeController-CvylFMia.js} +1 -1
- package/_assets/{GetCredits-91dR46BQ.js → GetCredits-Dw4w8acm.js} +7 -7
- package/_assets/{HelpersUtil-B_EI8lTR.js → HelpersUtil-_HSkzV2T.js} +1 -1
- package/_assets/{ItemDetail-DneK31a0.js → ItemDetail-Dxa9T_S-.js} +489 -324
- package/_assets/{LoadMore-CPg41rwp.js → LoadMore-D8E5F-8f.js} +1 -1
- package/_assets/ManaPricingBanner.styles-DTnTTvyO.js +74 -0
- package/_assets/{MenuList-D5E4Wrvx.js → MenuList-Jtp545Fi.js} +1 -1
- package/_assets/MyAssets-Db0d2mYm.js +381 -0
- package/_assets/{MyFavorites-CfsWFXpI.js → MyFavorites-B581Hpf-.js} +2 -2
- package/_assets/{NotFound-DVmSPOa9.js → NotFound-B5YyPIK4.js} +1 -1
- package/_assets/{NotificationsBell-C_HZmA4_.js → NotificationsBell-8HxMRP0q.js} +1 -1
- package/_assets/OutfitDetail-cz6cQtz6.js +326 -0
- package/_assets/OutfitPreview-CU2mgvnt.js +6 -0
- package/_assets/{OutfitStudio-D6HxPa0M.js → OutfitStudio-_HyedkEg.js} +50 -50
- package/_assets/{StoreSettings-CmI6OJyt.js → StoreSettings-BGKiUIzy.js} +9 -9
- package/_assets/{Success-CILFVgai.js → Success-RigWZOgD.js} +6 -6
- package/_assets/{SwapController-BtZYC1DC.js → SwapController-BivMb2kn.js} +1 -1
- package/_assets/{Tooltip-D-dOz9cj.js → Tooltip-BFF2_vlu.js} +1 -1
- package/_assets/{TradeService-DFGHQuam.js → TradeService-0TCYki7R.js} +1 -1
- package/_assets/{W3MFrameProviderSingleton-Dd3fipah.js → W3MFrameProviderSingleton-B0Higky5.js} +3 -3
- package/_assets/{WebCryptoP256-83ZQlmY9.js → WebCryptoP256-CGkaFniB.js} +1 -1
- package/_assets/{authorizations-3-Mq1Ehl.js → authorizations-zc6Rq7Wn.js} +1 -1
- package/_assets/{basic-BndfWYou.js → basic-DttMuloT.js} +1 -1
- package/_assets/{biconomy-UoaVnBXL.js → biconomy-D4i00Lfc.js} +1 -1
- package/_assets/{browseLayout.styles-C2XsX59Z.js → browseLayout.styles-BdkLZM96.js} +4 -4
- package/_assets/{builder-BCsqID1m.js → builder-D5fMO9fl.js} +1 -1
- package/_assets/{buy-gasless-Cf6hPQpJ.js → buy-gasless-e__YZBZy.js} +1 -1
- package/_assets/buy-hkJbpiOY.js +1 -0
- package/_assets/{categories-CJDomWri.js → categories-B569rNQU.js} +1 -1
- package/_assets/{ccip-DL1ik4S_.js → ccip-CCidJiYF.js} +1 -1
- package/_assets/{ccip-LyTNGN_g.js → ccip-CJTcr6Ak.js} +1 -1
- package/_assets/{clsx-CbhzNwHc.js → clsx-DSmAtJIx.js} +2 -2
- package/_assets/{controller-DI4T8YXU.js → controller-CMLpEAq8.js} +2 -2
- package/_assets/{core-DLkqCpDz.js → core-BIMKRKLD.js} +4 -4
- package/_assets/{createSvgIcon-BdIjzl8A.js → createSvgIcon-mO6bQXvS.js} +1 -1
- package/_assets/{custom-DjHlYa2L.js → custom-VPCzWEDJ.js} +1 -1
- package/_assets/{data-capture-CCEqsOVC.js → data-capture-NhUWYbV9.js} +1 -1
- package/_assets/{email-MyVfElwc.js → email-Clto1rbh.js} +1 -1
- package/_assets/{embedded-wallet-DGKPNmRz.js → embedded-wallet-t8b4yu9z.js} +1 -1
- package/_assets/{emotion-styled.browser.esm-B-KYMSCc.js → emotion-styled.browser.esm-DnvNBX1u.js} +1 -1
- package/_assets/{engine-P4mrsX3-.js → engine-DLv8fLGx.js} +1 -1
- package/_assets/{errors-B5G852-H.js → errors-CZnCfZdx.js} +1 -1
- package/_assets/{estimate-l1-fee-CZTQo2Yh.js → estimate-l1-fee-CJ4pO8UF.js} +1 -1
- package/_assets/{execute-CqlntYG8.js → execute-DlPcikaV.js} +2 -2
- package/_assets/{features-BstqY0d8.js → features-BxKqKAM5.js} +1 -1
- package/_assets/{fetchTokenMetadata-wr3bODuw.js → fetchTokenMetadata-w38JAtHF.js} +2 -2
- package/_assets/{field.styles-CeFk4Y5o.js → field.styles-CFlKswg7.js} +1 -1
- package/_assets/{get-ecosystem-wallet-info-BmrdD1ZM.js → get-ecosystem-wallet-info-VnVOeJ1z.js} +1 -1
- package/_assets/{getBalance-CGp1VbNi.js → getBalance-on_xo7HU.js} +1 -1
- package/_assets/{getNFT-BATtEfMr.js → getNFT-CRTR8WTI.js} +1 -1
- package/_assets/{getNFT-Bc7mOqON.js → getNFT-CWzo03nA.js} +1 -1
- package/_assets/{getThemeProps-Cj1ePFOP.js → getThemeProps-B8B_-Rbo.js} +1 -1
- package/_assets/{grid.styles-4uR2Oqak.js → grid.styles-BZkFiBLS.js} +1 -1
- package/_assets/{hashTypedData-DmaIP4Ta.js → hashTypedData-BH6OTW-d.js} +1 -1
- package/_assets/{hashTypedData--isNjJrk.js → hashTypedData-DRMGHRZ0.js} +1 -1
- package/_assets/{in-app-DkfGauuN.js → in-app-Vc6OIIzS.js} +1 -1
- package/_assets/{in-app-wallet-calls-_oAp4gRk.js → in-app-wallet-calls-KLGGFOPI.js} +1 -1
- package/_assets/{index-Jw4WyTL7.js → index-0nqA1JJF.js} +1 -1
- package/_assets/{index-hxv9huma.js → index-4zQsq3fd.js} +1 -1
- package/_assets/{index-B4VZ6oCr.js → index-5ACH-P5G.js} +1 -1
- package/_assets/{index-CNLdKmSV.js → index-6yxWjL1L.js} +2 -2
- package/_assets/{index-B0XZJoRs.js → index-8RpSVOTx.js} +3 -3
- package/_assets/{index-UOqdWcGo.js → index-B-wQ0paE.js} +1 -1
- package/_assets/{index-B08mxqyH.js → index-BCJi5oKJ.js} +1 -1
- package/_assets/{index-DwhWwt0R.js → index-BKEDzKNY.js} +1 -1
- package/_assets/{index-TXpJyzEO.js → index-BPaO_ntB.js} +1 -1
- package/_assets/{index-DCcvZO5Y.js → index-BQwGj32K.js} +1 -1
- package/_assets/{index-pUOx764A.js → index-BS6iKClO.js} +1 -1
- package/_assets/{index-Rzy39Nn7.js → index-BhObZWWG.js} +1 -1
- package/_assets/{index-B3qntzSb.js → index-BkDkQWWI.js} +1 -1
- package/_assets/{index-B9aCuD80.js → index-BqF97xZA.js} +1 -1
- package/_assets/{index-CAtB_PCp.js → index-C-amGj-7.js} +2 -2
- package/_assets/{index-BYndrnYs.js → index-C1U7eBbq.js} +1 -1
- package/_assets/{index-DA6dfZrr.js → index-C2GPCavy.js} +1 -1
- package/_assets/{index-BHPckyG6.js → index-C2q4KTdy.js} +1 -1
- package/_assets/{index-DYIatsEA.js → index-C7ek7oob.js} +1 -1
- package/_assets/{index-qOIpyDqw.js → index-CI0UD5dV.js} +3 -3
- package/_assets/{index-DYJqGaxj.js → index-CJLFJ36W.js} +2 -2
- package/_assets/{index-DG2jERXm.js → index-CNboH-3O.js} +1 -1
- package/_assets/{index-g7yoq537.js → index-Cdvi3pNM.js} +2 -2
- package/_assets/{index-DMfeEICj.js → index-Ceegzko5.js} +1 -1
- package/_assets/{index-CwgAx_D_.js → index-CgA-OcG0.js} +1 -1
- package/_assets/{index-DiwV8Pqc.js → index-Ch8J3QK6.js} +1 -1
- package/_assets/{index-CKuDkHtx.js → index-Cmdx7DKx.js} +1 -1
- package/_assets/{index-9uXo0dDW.js → index-CqPO5kHJ.js} +1 -1
- package/_assets/{index-D-cwjSAX.js → index-CuziOquE.js} +3 -3
- package/_assets/{index-6-oWZZKk.js → index-CzmJnQZH.js} +1 -1
- package/_assets/index-D-7WCtxn.js +3482 -0
- package/_assets/{index-GIpFWU31.js → index-D5RD0vxf.js} +1 -1
- package/_assets/{index-COG_bMzA.js → index-DBZVIZHo.js} +1 -1
- package/_assets/{index-BQJhzjgB.js → index-DHBnEMAt.js} +1 -1
- package/_assets/{index-bI7YB81Q.js → index-DOPFlRgN.js} +1 -1
- package/_assets/{index-wLhUVrXT.js → index-DYWfNXUa.js} +1 -1
- package/_assets/{index-BlqD0sjz.js → index-DkuxSwEU.js} +1 -1
- package/_assets/{index-TyIfm5pC.js → index-DmTmwD6t.js} +1 -1
- package/_assets/{index-Df_MtlRn.js → index-DtsO_iTE.js} +1 -1
- package/_assets/{index-DARDndd8.js → index-DxHGh86B.js} +1 -1
- package/_assets/{index-DXe6U5Nd.js → index-GDLtMazN.js} +1 -1
- package/_assets/{index-BQEMTtHk.js → index-Te89Gq1W.js} +1 -1
- package/_assets/{index-Bq3RaeMg.js → index-Umj2Vke8.js} +1 -1
- package/_assets/{index-6TyUCKeH.js → index-WAyEz3yq.js} +1 -1
- package/_assets/{index-BmlqG1wa.js → index-_KNtvZ03.js} +1 -1
- package/_assets/{index-hFWlaYZc.js → index-cz6Rqk8W.js} +1 -1
- package/_assets/{index-DA_UmuJW.js → index-eog29CgL.js} +2 -2
- package/_assets/{index-CVTYXB-H.js → index-irGTnSKf.js} +1 -1
- package/_assets/{index-a7lLIynB.js → index-jHpuKYUW.js} +1 -1
- package/_assets/{index-DI6mFHN_.js → index-oBbODxgD.js} +1 -1
- package/_assets/index-vsp2ePXO.js +472 -0
- package/_assets/{index-BF4F4-es.js → index-xtIMpr9r.js} +1 -1
- package/_assets/{index.es-DSBJgnik.js → index.es-B7JVZeTo.js} +4 -4
- package/_assets/{index.es-CleSpdBe.js → index.es-CGbqEV93.js} +1 -1
- package/_assets/{index.es-DcH5dh4Z.js → index.es-ClM1Q4-S.js} +1 -1
- package/_assets/{localBatchGatewayRequest-BQaanzyf.js → localBatchGatewayRequest-CKHM638r.js} +1 -1
- package/_assets/{mana-convert-gdOzEDdP.js → mana-convert-dJqmfJfM.js} +1 -1
- package/_assets/{networks-DweEIHqd.js → networks-D4B8rcMf.js} +1 -1
- package/_assets/{onramp-CQin_sc0.js → onramp-BAAYO5Xz.js} +1 -1
- package/_assets/{openzeppelin-aL0pLCk3.js → openzeppelin-tyZlnFgc.js} +1 -1
- package/_assets/{parseNft-C3_Nz5T-.js → parseNft-DmVgwo4R.js} +2 -2
- package/_assets/{parseSignature-DbUWX_0J.js → parseSignature-CCUgv0Xf.js} +1 -1
- package/_assets/{parseSignature-CaUNRWNX.js → parseSignature-Cz4DXMg4.js} +3 -3
- package/_assets/{passkeys-ErJmNcK7.js → passkeys-B-SLcTQC.js} +1 -1
- package/_assets/{pay-with-exchange-IR4P3LG2.js → pay-with-exchange-CPF4Xyar.js} +1 -1
- package/_assets/{qr-overlay-CdnDwp_H.js → qr-overlay-CCgl-rQv.js} +1 -1
- package/_assets/{receive-zGMAuzLF.js → receive-CtyJrIps.js} +1 -1
- package/_assets/{resolveImplementation-DBCwfUsj.js → resolveImplementation-BWEbVpHA.js} +1 -1
- package/_assets/{rpc-DcBDiZd9.js → rpc-9WGO6xiN.js} +1 -1
- package/_assets/{secp256k1-Dw0WpBX5.js → secp256k1-2RfA0szs.js} +1 -1
- package/_assets/{secp256k1-Dewsd8iM.js → secp256k1-CFrW1Y2s.js} +1 -1
- package/_assets/{secp256k1-B-E-jiWl.js → secp256k1-pmcASsb-.js} +1 -1
- package/_assets/{send-DDT-5Y8C.js → send-CMNbsrhM.js} +1 -1
- package/_assets/{send-batch-transaction-BurBPeh7.js → send-batch-transaction-D75RDx36.js} +1 -1
- package/_assets/{send-eip712-transaction-D77WUDwd.js → send-eip712-transaction-BQazlaNl.js} +2 -2
- package/_assets/{send-gasless-transaction-CIWAOyRc.js → send-gasless-transaction-DjoFh0d8.js} +2 -2
- package/_assets/{send-transaction-BXhwaD9S.js → send-transaction-CVFVkU0Z.js} +2 -2
- package/_assets/{sendMetaTransaction-CrIt0KCG.js → sendMetaTransaction-BAlAehuy.js} +1 -1
- package/_assets/{sendRawTransaction-DNK5LA13.js → sendRawTransaction-C4U7kCvT.js} +3 -3
- package/_assets/{serializeTransaction-D3WekrgC.js → serializeTransaction-DaaHRnn4.js} +1 -1
- package/_assets/{session-proposal-BlosSPbJ.js → session-proposal-B8JSXkYh.js} +1 -1
- package/_assets/{session-request-C8iYxI6j.js → session-request-CVuIL0x8.js} +2 -2
- package/_assets/{signing-Bx48W7O-.js → signing-CoqvM4v0.js} +3 -3
- package/_assets/{socials-BSmNv258.js → socials-Ci3QFil3.js} +1 -1
- package/_assets/{swaps-DyNopWtM.js → swaps-Bk85njMT.js} +1 -1
- package/_assets/{thirdweb-Bc1voIUm.js → thirdweb-CTwUbVaf.js} +3 -3
- package/_assets/{to-serializable-transaction-BXY289Ul.js → to-serializable-transaction-BHWda6_Z.js} +2 -2
- package/_assets/{trade-encoding-B7y8VfDo.js → trade-encoding-BDt5HS0k.js} +1 -1
- package/_assets/{transactionReceipt-DLzKebEg.js → transactionReceipt-DVIb0l0k.js} +1 -1
- package/_assets/{transactions-BWXAu1Vp.js → transactions-Dk1TKJgv.js} +1 -1
- package/_assets/{useCreditPacks-CYnMKZmp.js → useCreditPacks-BM-De58w.js} +1 -1
- package/_assets/useImportable-Ce98Ar0U.js +1 -0
- package/_assets/{useInfiniteGrid-ottWIC3k.js → useInfiniteGrid-_3YA45kU.js} +1 -1
- package/_assets/useManaRate-Co5_bB5U.js +1 -0
- package/_assets/{useStore-DC77ufHd.js → useStore-DYpF-pdm.js} +1 -1
- package/_assets/{useTheme-BOb3XgSe.js → useTheme-Br5XE3ab.js} +1 -1
- package/_assets/{verifyHash-B6wVUzvm.js → verifyHash-CJn902Qe.js} +1 -1
- package/_assets/{w3m-modal-CYIABu52.js → w3m-modal-Bq4uD3cn.js} +1 -1
- package/_assets/{w3m-modal-D0DQYwij.js → w3m-modal-iwn664AW.js} +1 -1
- package/_assets/{wait-for-tx-receipt-CzEApn7N.js → wait-for-tx-receipt-mVLKSavl.js} +1 -1
- package/_assets/{wallets-CQPQ_gpR.js → wallets-CUhTDJCi.js} +5 -5
- package/_assets/{web-connector-B5U5FrL8.js → web-connector-1E0uyUrr.js} +3 -3
- package/_assets/{writeContract-CGlJd1QG.js → writeContract-DDr9VQLH.js} +1 -1
- package/_assets/{zoraTestnet-pKTbhMUO.js → zoraTestnet-JZ6ZNHig.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/_assets/Activity-GNtRBDkH.js +0 -291
- package/_assets/ImportListings-DrIx4tN-.js +0 -472
- package/_assets/ItemPreview.styles--MP-O7tE.js +0 -166
- package/_assets/ManaPricingBanner.styles-4CDYw79q.js +0 -74
- package/_assets/MyAssets-C29gKaZs.js +0 -381
- package/_assets/OutfitDetail-BCkHFvPX.js +0 -357
- package/_assets/OutfitPreview-XyEsGBYa.js +0 -6
- package/_assets/buy-Bs_G6nfA.js +0 -1
- package/_assets/index-CEec1iYe.js +0 -3476
- package/_assets/mana-rate-DFh9C_O1.js +0 -1
- package/_assets/useManaRate-CPn6JNFj.js +0 -1
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-vsp2ePXO.js","_assets/react-DehiWSvs.js","_assets/index-D-7WCtxn.js","_assets/sentry-973sfbO9.js","_assets/dcl-schemas-Dr9BTjb7.js","_assets/ethers-CtNGBird.js","_assets/intl-CBcMB1D2.js","_assets/index-D-NhBWWr.css","_assets/useImportable-Ce98Ar0U.js","_assets/buy-hkJbpiOY.js","_assets/mana-convert-dJqmfJfM.js","_assets/authorizations-zc6Rq7Wn.js","_assets/sendMetaTransaction-BAlAehuy.js","_assets/trade-encoding-BDt5HS0k.js","_assets/ManaPricingBanner.styles-DTnTTvyO.js","_assets/field.styles-CFlKswg7.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{bn as bt,s as u,t as n,o as yt,B as vt,n as jt,q as kt,b as d,u as A,I as k,bo as Z,bp as J,bq as wt,_ as It,w as P,br as $t,b3 as q,ar as At,bs as Pt,bt as z}from"./index-D-7WCtxn.js";import{r as y,e as Lt,j as e,L as et,a as Nt}from"./react-DehiWSvs.js";import{m as Et}from"./mana-convert-dJqmfJfM.js";import{u as Tt}from"./useManaRate-Co5_bB5U.js";import{u as Ct}from"./useImportable-Ce98Ar0U.js";import{L as St}from"./LoadMore-D8E5F-8f.js";import{u as I}from"./useInfiniteGrid-_3YA45kU.js";import{m as it}from"./mana-matic-C4e1sNO3.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";import"./buy-hkJbpiOY.js";import"./authorizations-zc6Rq7Wn.js";import"./sendMetaTransaction-BAlAehuy.js";import"./trade-encoding-BDt5HS0k.js";const Ft=15e3;function Mt(t,a){return t.txHash&&a.txHash?t.txHash===a.txHash:t.txHash||a.txHash?!1:t.status===a.status&&Math.abs(t.createdAt-a.createdAt)<=Ft}function Dt(t){const a=[...t].sort((i,c)=>c.createdAt-i.createdAt),s=[];for(const i of a){const c=s[s.length-1];c&&Mt(c[c.length-1],i)?c.push(i):s.push([i])}return s.map(i=>{var c;return{id:((c=i.find(r=>r.txHash))==null?void 0:c.txHash)??i[i.length-1].id,createdAt:Math.max(...i.map(r=>r.createdAt)),status:i.some(r=>r.status==="PENDING")?"PENDING":"SETTLED",totalCredits:i.reduce((r,h)=>r+h.credits,0),lines:i}})}function qt(t){return t.tradeId?`trade:${t.tradeId}`:t.contractAddress&&t.itemId?`item:${t.contractAddress.toLowerCase()}:${t.itemId}`:null}function zt(t){const a=[],s=new Map;for(const i of t){const c=qt(i);if(!c){a.push({key:i.id,tradeId:null,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits});continue}const r=s.get(c);if(r){r.quantity+=1,r.credits+=i.credits;continue}const h={key:c,tradeId:i.tradeId,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits};s.set(c,h),a.push(h)}return a}function Ht(t,a){return{id:t.id,contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId,counterparty:t.buyer,credits:a?Et(t.manaWei,a):null,manaWei:t.manaWei,createdAt:t.createdAt,txHash:t.txHash}}function Ot(t){const s=Dt(t.purchases.filter(o=>o.status!=="EXPIRED")).map(o=>({kind:"purchase",id:`purchase:${o.id}`,createdAt:o.createdAt,order:o})),i=t.sales.map(o=>{const p=Ht(o,t.rate);return{kind:"sale",id:`sale:${p.id}`,createdAt:p.createdAt,sale:p}}),c=(t.creditOrders??[]).filter(o=>o.status!=="failed"&&o.status!=="abandoned").map(o=>({kind:"credit",id:`credit:${o.id}`,createdAt:o.createdAt,order:o})),r=new Set(t.purchases.filter(o=>o.txHash).map(o=>o.txHash.toLowerCase())),h=(t.manaPurchases??[]).filter(o=>!r.has(o.txHash.toLowerCase())).map(o=>({kind:"mana-purchase",id:`mana-purchase:${o.id}`,createdAt:o.createdAt,sale:o}));return[...s,...i,...c,...h].sort((o,p)=>p.createdAt-o.createdAt||(o.id<p.id?-1:1))}function Rt(t,a){return a==="all"?t:a==="sales"?t.filter(s=>s.kind==="sale"):t.filter(s=>s.kind==="purchase"||s.kind==="credit"||s.kind==="mana-purchase")}const at=t=>t.trim().toLowerCase();function Wt(t){const a=new Map;for(const s of t??[]){const i=at(s.txHash??"");if(!i)continue;const c=a.get(i);c?c.push(s):a.set(i,[s])}return a}function _t(t,a,s=Date.now()){const i=a.txHash?t.get(at(a.txHash)):void 0;if(!i||i.length===0)return{kind:"direct"};const c=i.length===1?Bt(i[0].netCents):null,r=i.filter(o=>!o.available&&o.availableAt>s);if(r.length===0)return{kind:"credited",credits:c};const h=r.reduce((o,p)=>Math.max(o,p.availableAt),0);return{kind:"pending",credits:c,availableAt:h}}function Bt(t){return bt(t)}const Gt="https://cdn.decentraland.org/@dcl/shop/0.5.1-30936450524.commit-699b9ba/_assets/credits-product-vs4Q6u6l.svg",H=yt`
|
|
3
|
+
0% { background-position: 200% 0; }
|
|
4
|
+
100% { background-position: -200% 0; }
|
|
5
|
+
`,Ut=u.section`
|
|
6
|
+
width: 100%;
|
|
7
|
+
min-width: 0;
|
|
8
|
+
min-height: 60vh;
|
|
9
|
+
/* Centre the whole column — heading, tabs and cards as ONE block — so the feed isn't parked against
|
|
10
|
+
the left edge of a wide page. Centring only the list would leave the heading orphaned from it. */
|
|
11
|
+
max-width: 760px;
|
|
12
|
+
margin-inline: auto;
|
|
13
|
+
|
|
14
|
+
/* The migration tool's row (thumbnail + name + a 144px price field) does not survive the feed's
|
|
15
|
+
column: squeezed to 760px the price field lands on its own line on a desktop. Widening the whole
|
|
16
|
+
column keeps heading, chips and panel as one block, which is the point of the constraint above. */
|
|
17
|
+
&[data-view='migrate'] {
|
|
18
|
+
max-width: 1003px;
|
|
19
|
+
}
|
|
20
|
+
`,Kt=u.div`
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: baseline;
|
|
23
|
+
gap: 12px;
|
|
24
|
+
margin-bottom: 20px;
|
|
25
|
+
`,Vt=u.h1`
|
|
26
|
+
font-family: ${n.font.sans};
|
|
27
|
+
margin: 0;
|
|
28
|
+
`;u.span`
|
|
29
|
+
color: ${n.colors.muted};
|
|
30
|
+
font-size: 14px;
|
|
31
|
+
`;const Qt=u.div`
|
|
32
|
+
display: flex;
|
|
33
|
+
gap: 8px;
|
|
34
|
+
margin-bottom: 20px;
|
|
35
|
+
flex-wrap: wrap;
|
|
36
|
+
`,nt=u.button`
|
|
37
|
+
appearance: none;
|
|
38
|
+
border: 1px solid ${n.colors.line};
|
|
39
|
+
background: ${n.colors.white};
|
|
40
|
+
color: ${n.colors.text};
|
|
41
|
+
font-family: ${n.font.sans};
|
|
42
|
+
font-size: 14px;
|
|
43
|
+
font-weight: 600;
|
|
44
|
+
padding: 8px 16px;
|
|
45
|
+
min-height: 40px;
|
|
46
|
+
border-radius: ${n.radius.pill};
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
transition:
|
|
49
|
+
background 0.15s,
|
|
50
|
+
border-color 0.15s,
|
|
51
|
+
color 0.15s;
|
|
52
|
+
|
|
53
|
+
&:hover {
|
|
54
|
+
background: ${n.colors.media};
|
|
55
|
+
}
|
|
56
|
+
&:focus-visible {
|
|
57
|
+
outline: 2px solid ${n.colors.accent};
|
|
58
|
+
outline-offset: 2px;
|
|
59
|
+
}
|
|
60
|
+
&[data-active='true'] {
|
|
61
|
+
background: ${n.colors.accent};
|
|
62
|
+
border-color: ${n.colors.accent};
|
|
63
|
+
color: ${n.colors.white};
|
|
64
|
+
}
|
|
65
|
+
`,Xt=u(nt)`
|
|
66
|
+
display: inline-flex;
|
|
67
|
+
align-items: center;
|
|
68
|
+
gap: 8px;
|
|
69
|
+
border-color: transparent;
|
|
70
|
+
background: ${n.colors.promptLilac};
|
|
71
|
+
color: ${n.colors.accent};
|
|
72
|
+
|
|
73
|
+
&:hover {
|
|
74
|
+
background: ${n.colors.rarityBg};
|
|
75
|
+
}
|
|
76
|
+
&[data-active='true'] {
|
|
77
|
+
background: ${n.colors.accent};
|
|
78
|
+
border-color: ${n.colors.accent};
|
|
79
|
+
color: ${n.colors.white};
|
|
80
|
+
}
|
|
81
|
+
/* Violet-on-violet once the chip fills, so the badge inverts. Reached by test id rather than by
|
|
82
|
+
interpolating the styled def, which throws under vitest (see CLAUDE.md). */
|
|
83
|
+
&[data-active='true'] [data-testid='activity-migrate-count'] {
|
|
84
|
+
background: ${n.colors.white};
|
|
85
|
+
color: ${n.colors.accent};
|
|
86
|
+
}
|
|
87
|
+
`,Zt=u.span`
|
|
88
|
+
flex: none;
|
|
89
|
+
display: grid;
|
|
90
|
+
place-items: center;
|
|
91
|
+
min-width: 20px;
|
|
92
|
+
height: 20px;
|
|
93
|
+
padding: 0 6px;
|
|
94
|
+
border-radius: ${n.radius.pill};
|
|
95
|
+
background: ${n.colors.brandViolet};
|
|
96
|
+
font-weight: 600;
|
|
97
|
+
font-size: 12px;
|
|
98
|
+
line-height: 1.6;
|
|
99
|
+
color: ${n.colors.white};
|
|
100
|
+
`,Jt=u.div`
|
|
101
|
+
min-height: 60vh;
|
|
102
|
+
`,Y=u.div`
|
|
103
|
+
display: flex;
|
|
104
|
+
flex-direction: column;
|
|
105
|
+
gap: 16px;
|
|
106
|
+
`,L=u.div`
|
|
107
|
+
background: ${n.colors.white};
|
|
108
|
+
border: 1px solid ${n.colors.line};
|
|
109
|
+
border-radius: 16px;
|
|
110
|
+
overflow: hidden;
|
|
111
|
+
`,N=u.div`
|
|
112
|
+
display: flex;
|
|
113
|
+
align-items: center;
|
|
114
|
+
justify-content: space-between;
|
|
115
|
+
gap: 12px;
|
|
116
|
+
padding: 14px 18px;
|
|
117
|
+
background: ${n.colors.softWhite};
|
|
118
|
+
border-bottom: 1px solid ${n.colors.line};
|
|
119
|
+
|
|
120
|
+
${n.media.maxWidth("mobile")} {
|
|
121
|
+
flex-wrap: wrap;
|
|
122
|
+
}
|
|
123
|
+
`,E=u.div`
|
|
124
|
+
display: flex;
|
|
125
|
+
flex-direction: column;
|
|
126
|
+
gap: 2px;
|
|
127
|
+
min-width: 0;
|
|
128
|
+
`,T=u.span`
|
|
129
|
+
font-weight: 700;
|
|
130
|
+
color: ${n.colors.text};
|
|
131
|
+
`,C=u.span`
|
|
132
|
+
font-size: 13px;
|
|
133
|
+
color: ${n.colors.muted};
|
|
134
|
+
`,S=u.div`
|
|
135
|
+
display: flex;
|
|
136
|
+
align-items: center;
|
|
137
|
+
gap: 14px;
|
|
138
|
+
/* Pin to the right regardless of how many elements sit on the left (the credit-purchase card adds a
|
|
139
|
+
leading thumbnail, giving the head three children instead of two). */
|
|
140
|
+
margin-left: auto;
|
|
141
|
+
`,Yt=u.div`
|
|
142
|
+
flex: 0 0 auto;
|
|
143
|
+
width: 52px;
|
|
144
|
+
height: 52px;
|
|
145
|
+
border-radius: 10px;
|
|
146
|
+
background: ${n.colors.media};
|
|
147
|
+
display: flex;
|
|
148
|
+
align-items: center;
|
|
149
|
+
justify-content: center;
|
|
150
|
+
|
|
151
|
+
img {
|
|
152
|
+
width: 30px;
|
|
153
|
+
height: 30px;
|
|
154
|
+
display: block;
|
|
155
|
+
}
|
|
156
|
+
`,F=u.span`
|
|
157
|
+
font-size: 11px;
|
|
158
|
+
font-weight: 700;
|
|
159
|
+
text-transform: uppercase;
|
|
160
|
+
letter-spacing: 0.03em;
|
|
161
|
+
padding: 4px 10px;
|
|
162
|
+
border-radius: ${n.radius.pill};
|
|
163
|
+
white-space: nowrap;
|
|
164
|
+
|
|
165
|
+
&[data-status='SETTLED'] {
|
|
166
|
+
background: rgba(30, 166, 114, 0.14);
|
|
167
|
+
color: ${n.colors.okStrong};
|
|
168
|
+
}
|
|
169
|
+
&[data-status='PENDING'] {
|
|
170
|
+
background: rgba(245, 166, 35, 0.16);
|
|
171
|
+
color: #b5790a;
|
|
172
|
+
}
|
|
173
|
+
&[data-status='SOLD'] {
|
|
174
|
+
background: rgba(103, 58, 183, 0.14);
|
|
175
|
+
color: ${n.colors.accent};
|
|
176
|
+
}
|
|
177
|
+
&[data-status='FAILED'] {
|
|
178
|
+
background: rgba(214, 61, 61, 0.14);
|
|
179
|
+
color: #b02a2a;
|
|
180
|
+
}
|
|
181
|
+
`,v=u.div`
|
|
182
|
+
display: flex;
|
|
183
|
+
align-items: center;
|
|
184
|
+
gap: 5px;
|
|
185
|
+
font-weight: 800;
|
|
186
|
+
color: ${n.colors.text};
|
|
187
|
+
white-space: nowrap;
|
|
188
|
+
|
|
189
|
+
.ccy-mark {
|
|
190
|
+
width: 16px;
|
|
191
|
+
height: 16px;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
// Money received (a sale) reads as income in the shop's success green.
|
|
195
|
+
&[data-kind='income'] {
|
|
196
|
+
color: ${n.colors.okStrong};
|
|
197
|
+
}
|
|
198
|
+
`,st=u.img`
|
|
199
|
+
width: 16px;
|
|
200
|
+
height: 16px;
|
|
201
|
+
vertical-align: -0.15em;
|
|
202
|
+
`,te=u.span`
|
|
203
|
+
display: inline-flex;
|
|
204
|
+
align-items: center;
|
|
205
|
+
cursor: pointer;
|
|
206
|
+
`,ee=u.span`
|
|
207
|
+
position: fixed;
|
|
208
|
+
transform: translateX(-50%);
|
|
209
|
+
padding: 6px 8px;
|
|
210
|
+
border-radius: 6px;
|
|
211
|
+
background: #16141a;
|
|
212
|
+
color: ${n.colors.white};
|
|
213
|
+
font-size: 12px;
|
|
214
|
+
font-weight: 600;
|
|
215
|
+
line-height: 1;
|
|
216
|
+
white-space: nowrap;
|
|
217
|
+
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
|
|
218
|
+
pointer-events: none;
|
|
219
|
+
z-index: 9999;
|
|
220
|
+
`,O=u.div`
|
|
221
|
+
display: flex;
|
|
222
|
+
flex-direction: column;
|
|
223
|
+
`,M=u.div`
|
|
224
|
+
display: grid;
|
|
225
|
+
grid-template-columns: 52px 1fr auto;
|
|
226
|
+
align-items: center;
|
|
227
|
+
gap: 14px;
|
|
228
|
+
padding: 12px 18px;
|
|
229
|
+
text-decoration: none;
|
|
230
|
+
color: inherit;
|
|
231
|
+
|
|
232
|
+
& + & {
|
|
233
|
+
border-top: 1px solid ${n.colors.line};
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
&[data-link='true'] {
|
|
237
|
+
transition: background 0.15s;
|
|
238
|
+
}
|
|
239
|
+
&[data-link='true']:hover {
|
|
240
|
+
background: ${n.colors.media};
|
|
241
|
+
}
|
|
242
|
+
&[data-link='true']:focus-visible {
|
|
243
|
+
outline: 2px solid ${n.colors.accent};
|
|
244
|
+
outline-offset: -2px;
|
|
245
|
+
}
|
|
246
|
+
`,R=u.div`
|
|
247
|
+
width: 52px;
|
|
248
|
+
height: 52px;
|
|
249
|
+
border-radius: 10px;
|
|
250
|
+
background: ${n.colors.media};
|
|
251
|
+
overflow: hidden;
|
|
252
|
+
display: flex;
|
|
253
|
+
align-items: center;
|
|
254
|
+
justify-content: center;
|
|
255
|
+
color: ${n.colors.muted2};
|
|
256
|
+
|
|
257
|
+
img {
|
|
258
|
+
width: 100%;
|
|
259
|
+
height: 100%;
|
|
260
|
+
object-fit: contain;
|
|
261
|
+
}
|
|
262
|
+
`,W=u.div`
|
|
263
|
+
width: 52px;
|
|
264
|
+
height: 52px;
|
|
265
|
+
border-radius: 10px;
|
|
266
|
+
background: linear-gradient(100deg, ${n.colors.media} 30%, ${n.colors.panel} 50%, ${n.colors.media} 70%);
|
|
267
|
+
background-size: 200% 100%;
|
|
268
|
+
animation: ${H} 1.3s infinite linear;
|
|
269
|
+
|
|
270
|
+
@media (prefers-reduced-motion: reduce) {
|
|
271
|
+
animation: none;
|
|
272
|
+
}
|
|
273
|
+
`,_=u.div`
|
|
274
|
+
min-width: 0;
|
|
275
|
+
display: flex;
|
|
276
|
+
flex-direction: column;
|
|
277
|
+
gap: 2px;
|
|
278
|
+
`,B=u.span`
|
|
279
|
+
font-weight: 700;
|
|
280
|
+
white-space: nowrap;
|
|
281
|
+
overflow: hidden;
|
|
282
|
+
text-overflow: ellipsis;
|
|
283
|
+
`,G=u.span`
|
|
284
|
+
display: inline-block;
|
|
285
|
+
width: 140px;
|
|
286
|
+
max-width: 60%;
|
|
287
|
+
height: 12px;
|
|
288
|
+
border-radius: 6px;
|
|
289
|
+
background: linear-gradient(100deg, ${n.colors.media} 30%, ${n.colors.panel} 50%, ${n.colors.media} 70%);
|
|
290
|
+
background-size: 200% 100%;
|
|
291
|
+
animation: ${H} 1.3s infinite linear;
|
|
292
|
+
|
|
293
|
+
@media (prefers-reduced-motion: reduce) {
|
|
294
|
+
animation: none;
|
|
295
|
+
}
|
|
296
|
+
`,U=u.span`
|
|
297
|
+
font-size: 13px;
|
|
298
|
+
color: ${n.colors.muted};
|
|
299
|
+
`,ie=u.div`
|
|
300
|
+
display: flex;
|
|
301
|
+
align-items: center;
|
|
302
|
+
gap: 4px;
|
|
303
|
+
font-weight: 700;
|
|
304
|
+
color: ${n.colors.text};
|
|
305
|
+
white-space: nowrap;
|
|
306
|
+
|
|
307
|
+
.ccy-mark {
|
|
308
|
+
width: 14px;
|
|
309
|
+
height: 14px;
|
|
310
|
+
}
|
|
311
|
+
`,tt=u.div`
|
|
312
|
+
height: 132px;
|
|
313
|
+
border-radius: 16px;
|
|
314
|
+
border: 1px solid transparent;
|
|
315
|
+
background: linear-gradient(100deg, ${n.colors.media} 30%, ${n.colors.panel} 50%, ${n.colors.media} 70%);
|
|
316
|
+
background-size: 200% 100%;
|
|
317
|
+
animation: ${H} 1.3s infinite linear;
|
|
318
|
+
|
|
319
|
+
@media (prefers-reduced-motion: reduce) {
|
|
320
|
+
animation: none;
|
|
321
|
+
}
|
|
322
|
+
`,rt=u.div`
|
|
323
|
+
display: flex;
|
|
324
|
+
flex-direction: column;
|
|
325
|
+
align-items: center;
|
|
326
|
+
gap: 8px;
|
|
327
|
+
text-align: center;
|
|
328
|
+
padding: 90px 20px;
|
|
329
|
+
min-height: 50vh;
|
|
330
|
+
`,ot=u.p`
|
|
331
|
+
font-size: 22px;
|
|
332
|
+
font-weight: 700;
|
|
333
|
+
margin: 6px 0 0;
|
|
334
|
+
`,ae=u(vt)`
|
|
335
|
+
margin-top: 12px;
|
|
336
|
+
`,K=M.withComponent(et),ne=y.lazy(()=>It(()=>import("./index-vsp2ePXO.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15])).then(t=>({default:t.ImportListings}))),$=24,se=["all","purchases","sales"],D="migrate";function j(t){try{return new Date(t).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function ct(t){return t.length>10?`${t.slice(0,6)}…${t.slice(-4)}`:t}function dt(t){const a=Number(t)/1e18;return Number.isFinite(a)?a.toLocaleString("en",{maximumFractionDigits:2}):"0"}function lt({children:t}){const a=y.useRef(null),[s,i]=y.useState(null),c=()=>{var h;const r=(h=a.current)==null?void 0:h.getBoundingClientRect();r&&i({top:r.bottom+8,left:r.left+r.width/2})};return e.jsxs(te,{ref:a,tabIndex:0,onMouseEnter:c,onMouseLeave:()=>i(null),onFocus:c,onBlur:()=>i(null),children:[t,s?Nt.createPortal(e.jsx(ee,{style:{top:s.top,left:s.left},role:"tooltip",children:d("activity.polygonMana")}),document.body):null]})}function re({item:t}){const a=!!t.contractAddress&&!!t.itemId,s=!!t.tradeId||a,{data:i,isLoading:c}=A({queryKey:["order-line-display",t.tradeId,t.contractAddress,t.itemId],queryFn:()=>t.tradeId?Pt(t.tradeId):z(t.contractAddress,{itemId:t.itemId}),enabled:s,staleTime:5*6e4}),r=s&&c,h=(i==null?void 0:i.name)??d("activity.itemFallback"),o=(i==null?void 0:i.thumbnail)??"",p=q({contractAddress:i==null?void 0:i.contractAddress,tokenId:i==null?void 0:i.tokenId,itemId:i==null?void 0:i.itemId})??void 0,m=e.jsxs(e.Fragment,{children:[r?e.jsx(W,{}):e.jsx(R,{children:o?e.jsx("img",{src:o,alt:h}):e.jsx(k,{name:"cart",size:20})}),e.jsxs(_,{children:[r?e.jsx(G,{}):e.jsx(B,{title:h,children:h}),t.quantity>1?e.jsx(U,{children:d("activity.quantity",{count:t.quantity})}):null]}),e.jsxs(ie,{children:[e.jsx(P,{className:"ccy-mark"})," ",t.credits]})]});return p?e.jsx(K,{to:p,"data-link":"true",children:m}):e.jsx(M,{children:m})}function oe({order:t}){const a=zt(t.lines),s=a.reduce((i,c)=>i+c.quantity,0);return e.jsxs(L,{"data-testid":"purchase-order",children:[e.jsxs(N,{children:[e.jsxs(E,{children:[e.jsx(T,{children:j(t.createdAt)}),e.jsxs(C,{children:[d("activity.purchaseLabel")," · ",d("activity.itemCount",{count:s})]})]}),e.jsxs(S,{children:[e.jsx(F,{"data-status":t.status,children:t.status==="PENDING"?d("activity.processing"):d("activity.completed")}),e.jsxs(v,{children:[e.jsx(P,{className:"ccy-mark"})," ",t.totalCredits]})]})]}),e.jsx(O,{children:a.map(i=>e.jsx(re,{item:i},i.key))})]})}function ce({sale:t}){const{data:a,isLoading:s}=A({queryKey:["asset-display",t.contractAddress,t.tokenId,t.itemId],queryFn:()=>z(t.contractAddress,{tokenId:t.tokenId,itemId:t.itemId}),enabled:!!t.contractAddress,staleTime:3e5}),i=(a==null?void 0:a.name)??d("activity.itemFallback"),c=(a==null?void 0:a.thumbnail)??"",r=q({contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId})??void 0,h=e.jsxs(e.Fragment,{children:[s?e.jsx(W,{}):e.jsx(R,{children:c?e.jsx("img",{src:c,alt:i}):e.jsx(k,{name:"offer",size:20})}),e.jsxs(_,{children:[s?e.jsx(G,{}):e.jsx(B,{title:i,children:i}),e.jsx(U,{children:d("activity.boughtFrom",{account:ct(t.seller)})})]})]});return e.jsxs(L,{"data-testid":"activity-mana-purchase",children:[e.jsxs(N,{children:[e.jsxs(E,{children:[e.jsx(T,{children:j(t.createdAt)}),e.jsx(C,{children:d("activity.paidWithMana")})]}),e.jsxs(S,{children:[e.jsx(F,{"data-status":"SETTLED",children:d("activity.completed")}),e.jsxs(v,{children:[dt(t.manaWei)," ",e.jsx(lt,{children:e.jsx(st,{src:it,alt:"MANA"})})]})]})]}),e.jsx(O,{children:r?e.jsx(K,{to:r,"data-link":"true",children:h}):e.jsx(M,{children:h})})]})}function de({sale:t,payout:a}){const{data:s,isLoading:i}=A({queryKey:["asset-display",t.contractAddress,t.tokenId,t.itemId],queryFn:()=>z(t.contractAddress,{tokenId:t.tokenId,itemId:t.itemId}),enabled:!!t.contractAddress,staleTime:3e5}),c=(s==null?void 0:s.name)??d("activity.itemFallback"),r=(s==null?void 0:s.thumbnail)??"",h=q({contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId})??void 0,o=e.jsxs(e.Fragment,{children:[i?e.jsx(W,{}):e.jsx(R,{children:r?e.jsx("img",{src:r,alt:c}):e.jsx(k,{name:"offer",size:20})}),e.jsxs(_,{children:[i?e.jsx(G,{}):e.jsx(B,{title:c,children:c}),e.jsxs(U,{children:[d("activity.soldTo",{account:ct(t.counterparty)}),a.kind==="pending"?` · ${d("activity.payoutPendingOn",{date:j(a.availableAt)})}`:""]})]})]});return e.jsxs(L,{"data-testid":"activity-sale",children:[e.jsxs(N,{children:[e.jsxs(E,{children:[e.jsx(T,{children:j(t.createdAt)}),e.jsx(C,{children:d("activity.saleLabel")})]}),e.jsxs(S,{children:[e.jsx(F,{"data-status":a.kind==="pending"?"PENDING":"SOLD",children:a.kind==="pending"?d("activity.payoutPending"):d("activity.sold")}),a.kind==="direct"?e.jsxs(v,{"data-kind":"income",children:["+",dt(t.manaWei)," ",e.jsx(lt,{children:e.jsx(st,{src:it,alt:"MANA"})})]}):a.credits!==null?e.jsxs(v,{"data-kind":"income",children:[e.jsx(P,{className:"ccy-mark"})," +",At(a.credits)]}):e.jsx(v,{"data-kind":"income",children:d("activity.payoutCredited")})]})]}),e.jsx(O,{children:h?e.jsx(K,{to:h,"data-link":"true",children:o}):e.jsx(M,{children:o})})]})}function le({order:t}){const a=`$${(t.usdCents/100).toFixed(2)}`,s=$t(t.status),i=s==="SETTLED"?d("activity.completed"):s==="FAILED"?d("activity.failed"):d("activity.processing");return e.jsx(L,{"data-testid":"credit-order",children:e.jsxs(N,{children:[e.jsx(Yt,{children:e.jsx("img",{src:Gt,alt:"","aria-hidden":!0})}),e.jsxs(E,{children:[e.jsx(T,{children:j(t.createdAt)}),e.jsxs(C,{children:[d("activity.creditPurchaseLabel")," · ",d("activity.creditPaid",{usd:a})]})]}),e.jsxs(S,{children:[e.jsx(F,{"data-status":s,children:i}),e.jsxs(v,{"data-kind":"income",children:["+",e.jsx(P,{className:"ccy-mark"})," ",t.credits]})]})]})})}function ue({filter:t}){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")}}[t];return e.jsxs(rt,{children:[e.jsx(k,{name:a.icon,size:40,color:n.colors.muted2}),e.jsx(ot,{children:a.title}),e.jsx("p",{className:"muted",children:a.body}),t!=="sales"?e.jsx(ae,{as:et,to:"/items",variant:"purple",children:d("notFound.cta")}):null]})}function Le(){const{session:t}=jt(),[a,s]=y.useState("all"),[i,c]=Lt(),r=i.get("view")===D;kt({title:r?d("seo.import.title"):d("nav.activity"),noindex:!0});const{count:h}=Ct(),o=h!==void 0&&(h>0||r),p=!!t&&!r&&a!=="sales",m=!!t&&!r&&a!=="purchases",x=I(["purchases",t==null?void 0:t.address],l=>wt(t.address,t.identity,{first:$,skip:l}),{enabled:p}),g=I(["sales",t==null?void 0:t.address],l=>Z(t.address,{role:"seller",first:$,skip:l}),{enabled:m}),f=I(["credit-orders",t==null?void 0:t.address],l=>J(t.address,t.identity,{first:$,skip:l}),{enabled:p}),b=I(["mana-purchases",t==null?void 0:t.address],l=>Z(t.address,{role:"buyer",first:$,skip:l}),{enabled:p}),{data:V}=A({queryKey:["sale-payouts",t==null?void 0:t.address],queryFn:()=>J(t.address,t.identity,{first:200}).then(l=>l.payouts),enabled:m,staleTime:6e4}),ut=y.useMemo(()=>Wt(V),[V]),{data:ht}=Tt(m);if(!t)return e.jsxs(rt,{children:[e.jsx(k,{name:"clock",size:40,color:n.colors.muted2}),e.jsx(ot,{children:d("activity.signInTitle")}),e.jsx("p",{className:"muted",children:d("activity.signInBody")})]});const Q=Rt(Ot({purchases:p?x.items:[],sales:m?g.items:[],creditOrders:p?f.items:[],manaPurchases:p?b.items:[],rate:ht}),a),pt=p&&(x.isLoading||f.isLoading||b.isLoading)||m&&g.isLoading,X=p&&(x.isFetchingNextPage||f.isFetchingNextPage||b.isFetchingNextPage)||m&&g.isFetchingNextPage,mt=p&&(x.hasNextPage||f.hasNextPage||b.hasNextPage)||m&&g.hasNextPage;function xt(){p&&x.hasNextPage&&x.fetchNextPage(),p&&f.hasNextPage&&f.fetchNextPage(),p&&b.hasNextPage&&b.fetchNextPage(),m&&g.hasNextPage&&g.fetchNextPage()}function gt(l){if(s(l),!r)return;const w=new URLSearchParams(i);w.delete("view"),c(w,{replace:!0})}function ft(){const l=new URLSearchParams(i);l.set("view",D),c(l,{replace:!0})}return e.jsxs(Ut,{"data-view":r?D:"feed",children:[e.jsx(Kt,{children:e.jsx(Vt,{children:d("nav.activity")})}),e.jsxs(Qt,{role:"tablist","aria-label":d("nav.activity"),children:[se.map(l=>e.jsx(nt,{type:"button",role:"tab","aria-selected":!r&&a===l,"data-active":!r&&a===l,"data-testid":`activity-filter-${l}`,onClick:()=>gt(l),children:d(`activity.filter.${l}`)},l)),o?e.jsxs(Xt,{type:"button",role:"tab","aria-selected":r,"data-active":r,"data-testid":"activity-filter-migrate","aria-label":h?d("activity.migrate.chipAria",{count:h}):void 0,onClick:ft,children:[d("activity.migrate.chip"),h?e.jsx(Zt,{"data-testid":"activity-migrate-count","aria-hidden":!0,children:h}):null]}):null]}),r?e.jsx(y.Suspense,{fallback:e.jsx(Jt,{"aria-busy":"true"}),children:e.jsx(ne,{})}):pt?e.jsx(Y,{children:Array.from({length:5}).map((l,w)=>e.jsx(tt,{},w))}):Q.length===0?e.jsx(ue,{filter:a}):e.jsxs(e.Fragment,{children:[e.jsxs(Y,{children:[Q.map(l=>l.kind==="purchase"?e.jsx(oe,{order:l.order},l.id):l.kind==="credit"?e.jsx(le,{order:l.order},l.id):l.kind==="mana-purchase"?e.jsx(ce,{sale:l.sale},l.id):e.jsx(de,{sale:l.sale,payout:_t(ut,l.sale)},l.id)),X?e.jsx(tt,{}):null]}),e.jsx(St,{hasNextPage:mt,isFetching:X,onLoadMore:xt})]})]})}export{Le 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-D-7WCtxn.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";const b="https://cdn.decentraland.org/@dcl/shop/0.5.1-30936450524.commit-699b9ba/_assets/custom-welcome-background-BxlFQma9.webp",S="https://cdn.decentraland.org/@dcl/shop/0.5.1-30936450524.commit-699b9ba/_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"),_=e.getUniformLocation(a,"u_resolution"),y=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,
|
|
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"),_=e.getUniformLocation(a,"u_resolution"),y=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(_,r.width,r.height),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,f),e.uniform1i(y,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};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as We,r as m,j as e,e as Qe}from"./react-DehiWSvs.js";import{c as F,
|
|
1
|
+
import{d as We,r as m,j as e,e as Qe}from"./react-DehiWSvs.js";import{c as F,b8 as Xe,b9 as Ye,a as et,s,t,n as Be,a$ as tt,x as nt,ar as ge,b as n,v as st,I as S,w as M,bw as ne,a_ as it,R as Y,bc as ot,bb as rt,q as Fe,ad as at,af as _e,ag as q,at as lt,bx as ct}from"./index-D-7WCtxn.js";import{r as dt,s as pt,u as ht}from"./buy-hkJbpiOY.js";import{a as xt,m as Le}from"./mana-convert-dJqmfJfM.js";import{u as Ue}from"./useManaRate-Co5_bB5U.js";import{g as ft,h as mt,i as ut,j as gt,k as bt,C as yt,l as wt,o as jt,m as vt,n as $t,M as Ct,p as kt,E as St,q as Et,r as Rt,s as _t,t as Tt,u as zt,v as It}from"./Assets.styles-DGFYQnxw.js";import{S as Te,R as At,F as Nt,e as Mt}from"./categories-B569rNQU.js";import{L as Pt}from"./LoadMore-D8E5F-8f.js";import{u as Wt}from"./useInfiniteGrid-_3YA45kU.js";import{E as Bt}from"./ErrorNotice-BCKaFzga.js";import{d as Ft}from"./dcl-schemas-Dr9BTjb7.js";import{s as Lt,G as Ut,w as Ht,S as Ot}from"./buy-gasless-e__YZBZy.js";import{i as Gt}from"./trade-encoding-BDt5HS0k.js";import{f as Dt}from"./errors-CZnCfZdx.js";import{J as qt,C as Vt,B as be}from"./ethers-CtNGBird.js";import{n as Zt}from"./Tooltip-BFF2_vlu.js";import{G as Kt}from"./grid.styles-BZkFiBLS.js";import"./sentry-973sfbO9.js";import"./intl-CBcMB1D2.js";import"./authorizations-zc6Rq7Wn.js";import"./sendMetaTransaction-BAlAehuy.js";function V(i){const o=i.source??"item",a=i.tradeId||`${i.contractAddress}-${i.tokenId??i.itemId??""}`;return`${o}:${a}`}const L="100000000000000000000",He=2,ee=15,Jt=/^[a-zA-Z0-9]+$/;function ze(i){const o=i.trim();return o.length===0?{ok:!1,reason:"empty"}:Jt.test(o)?o.length<He?{ok:!1,reason:"too-short"}:o.length>ee?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function Qt(i){return i.replace(/[^a-zA-Z0-9]/g,"").slice(0,ee)}const Xt=["function available(string _subdomain) view returns (bool)"],Ie={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function Yt(){return F.chainId===Number(Ft.ChainId.MATIC_MAINNET)?Ie.mainnet:Ie.sepolia}async function en(i,o={}){var p;const{rpc:a,address:h}=Yt(),l=new qt(a),d=new Vt(h,Xt,l);console.info(`[names] availability check → DCLRegistrar(${h}).available("${i}") on ${a}`);const x=await d.available(i);if((p=o.signal)!=null&&p.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${i}" available=${x}`),x?"available":"taken"}const tn="https://app.across.to/api";class ye extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}function nn(i){return xt(L,i)}async function sn(i,o,a={}){var p;const h=a.chainId??F.chainId,l=a.provider??"across",d=`${F.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(o)}&chainId=${h}&provider=${l}`,x=await et(d,{method:"GET",identity:i,metadata:{}});if(!x.ok){let r;try{r=(p=await x.json())==null?void 0:p.code}catch{}throw r==="ROUTE_COST_TOO_HIGH"?new ye:new Error(`fetchNameCreditRoute ${x.status}`)}return x.json()}function on(i,o){const a=be.from(i.availableAmount),l=be.from(L).sub(a);return{credits:[{value:i.amount,expiresAt:Number(i.expiresAt),salt:Gt(i.id)}],creditsSignatures:[i.signature],externalCall:{target:o.externalCall.target,selector:o.externalCall.selector,data:o.externalCall.data,expiresAt:o.externalCall.expiresAt,salt:o.externalCall.salt},customExternalCallSignature:o.customExternalCallSignature,maxUncreditedValue:l.isNegative()?"0":l.toString(),maxCreditedValue:L}}async function rn(i,o={}){const a=tn,h=o.intervalMs??1e4,l=o.maxAttempts??60;let d={status:"pending",destinationTxHash:null,actionsSucceeded:!1};for(let x=0;x<l;x++){try{const p=await fetch(`${a}/deposit/status?originChainId=137&depositTxHash=${i}`);if(p.ok){const r=await p.json(),u=(r.status??"pending").toLowerCase(),g=r.fillTx??r.fillTxnRef??null,w=r.actionsSucceeded!==!1;if(u==="filled")return{status:"filled",destinationTxHash:g,actionsSucceeded:w};if(u==="refunded"||u==="expired")return{status:u,destinationTxHash:null,actionsSucceeded:!1};d={status:"pending",destinationTxHash:g,actionsSucceeded:w}}}catch{}x<l-1&&await new Promise(p=>setTimeout(p,h))}return d}async function an(i){const{name:o,identity:a,signer:h}=i,l=i.chainId??F.chainId,d=i.provider??"across",x=(i.beneficiary??await h.getAddress()).toLowerCase();let p=null,r=!1;console.info("[names] register start",{name:o,buyer:x,chainId:l,provider:d});try{const u=await dt(l),g=nn(u);console.info("[names] step 1/6 sized reservation",{usdCents:g,manaRate:u});const w=await sn(a,o,{chainId:l,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 Xe(a,g);if(p=j.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:j.credit.id,maxCreditedValue:j.maxCreditedValue}),be.from(j.maxCreditedValue).lt(L))throw new Error("Credit under-sized for the name price");const k=on(j.credit,w);let f;try{f=await Lt({chainId:l,buyer:x,signer:h,args:k})}catch(b){if(!(b instanceof Ut))throw b;f=await pt(l,k,h)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:f}),await Ht(f),r=!0,console.info("[names] step 5/6 origin tx confirmed",{originTxHash:f}),d==="across"){const b=await rn(f,i.acrossPoll);if(console.info("[names] step 6/6 across status",b),b.status==="pending")return{status:"pending",originTxHash:f};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:f,destinationTxHash:b.destinationTxHash}}return{status:"pending",originTxHash:f}}catch(u){if(console.error("[names] register failed — raw error:",u,{name:o,buyer:x,originConfirmed:r}),u instanceof Ot)return{status:"pending",originTxHash:u.txHash};if(p&&!r&&await Ye(a,[p]).catch(()=>{}),u instanceof ye)throw u;const g=new Error(Dt(u,"Couldn't register the name. Please try again.",{sale:!0}));throw g.cause=u,g}}const ln=s.div`
|
|
2
2
|
position: fixed;
|
|
3
3
|
inset: 0;
|
|
4
4
|
z-index: 10000;
|
|
@@ -25,14 +25,14 @@ import{d as We,r as m,j as e,e as Qe}from"./react-DehiWSvs.js";import{c as F,b7
|
|
|
25
25
|
align-items: flex-start;
|
|
26
26
|
justify-content: space-between;
|
|
27
27
|
gap: 12px;
|
|
28
|
-
`,
|
|
28
|
+
`,ie=s.h2`
|
|
29
29
|
margin: 0;
|
|
30
30
|
font-family: ${t.font.sans};
|
|
31
31
|
font-weight: 700;
|
|
32
32
|
font-size: 22px;
|
|
33
33
|
line-height: 1.2;
|
|
34
34
|
color: ${t.colors.text};
|
|
35
|
-
`,
|
|
35
|
+
`,oe=s.button`
|
|
36
36
|
flex: none;
|
|
37
37
|
display: grid;
|
|
38
38
|
place-items: center;
|
|
@@ -379,7 +379,7 @@ import{d as We,r as m,j as e,e as Qe}from"./react-DehiWSvs.js";import{c as F,b7
|
|
|
379
379
|
color: ${t.colors.accent};
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
|
-
`;function En({name:
|
|
382
|
+
`;function En({name:i,priceCredits:o,onClose:a}){const{session:h}=Be(),{data:l,isError:d}=tt(h),x=nt(),p=We(),[r,u]=m.useState("confirm"),[g,w]=m.useState(""),[j,k]=m.useState(null),f=m.useRef(!1),b=g.trim().toLowerCase()===i.toLowerCase(),v=r==="completing",E=o!=null?ge(o):"—",C=o==null,T=l==null?void 0:l.credits,R=o!=null&&T!=null?o-T:0,$=R>0,z=C?n("names.priceUnavailable"):$?n("names.insufficientCredits",{credits:ge(R)}):null;m.useEffect(()=>{const y=H=>{H.key==="Escape"&&!v&&a()};document.addEventListener("keydown",y);const U=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",y),document.body.style.overflow=U}},[v,a]);async function I(){if(!(!h||!b||C||$||f.current)){f.current=!0,u("completing"),k(null);try{const y=await an({name:i,identity:h.identity,signer:h.signer});Y("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:o??null,settlement:y.status}),x.invalidateQueries({queryKey:["usd-balance"]}),x.invalidateQueries({queryKey:["my-assets"]}),u(y.status==="registered"?"success":"pending")}catch(y){Y(rt(y)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:ot(y),purchase_type:"name"}),k(y instanceof ye?n("names.errorRouteCost"):(y==null?void 0:y.message)||n("names.errorGeneric")),u("error")}finally{f.current=!1}}}const A=r!=="success"&&r!=="pending",te=st(h==null?void 0:h.providerType);return e.jsx(ln,{onClick:v?void 0:a,role:"presentation",children:e.jsxs(cn,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:y=>y.stopPropagation(),children:[A&&e.jsxs(e.Fragment,{children:[e.jsxs(se,{children:[e.jsx(ie,{children:r==="error"?n("names.errorTitle"):n("names.buyTitle")}),e.jsx(oe,{onClick:a,disabled:v,"aria-label":n("buyModal.close"),children:e.jsx(S,{name:"close"})})]}),e.jsxs(re,{children:[n("names.myCreditsBalance")," ",e.jsx(M,{})," ",ne(l,d)]}),e.jsx(ae,{})]}),(r==="confirm"||r==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(le,{children:[e.jsx(ce,{"aria-hidden":!0,children:"@"}),e.jsxs(de,{children:[e.jsxs(pe,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(he,{children:n("names.subtitle")})]}),e.jsxs(xe,{children:[e.jsx(M,{}),E]})]}),r==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(fe,{children:[e.jsx(S,{name:"info","aria-hidden":!0}),e.jsx("span",{children:j})]}),e.jsx(Ae,{onClick:()=>u("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(dn,{children:[e.jsx(pn,{children:n("names.confirmTitle")}),e.jsx(hn,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${Rn(i)}</b>`})}}),e.jsxs(xn,{children:[e.jsx(fn,{"aria-hidden":!0,children:"@"}),e.jsx(mn,{value:g,onChange:y=>w(y.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":n("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(g.length,8)}ch`}}),e.jsx(un,{children:".dcl.eth"})]})]}),z?e.jsxs(fe,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(S,{name:"info","aria-hidden":!0}),e.jsx("span",{children:z})]}):null,e.jsx(Ae,{onClick:()=>void I(),disabled:!b||!h||C||$,children:n("names.buyCta")})]})]}),r==="completing"&&e.jsxs(gn,{children:[e.jsx(bn,{src:it,alt:"",width:56,height:56}),e.jsx(yn,{children:te?n("names.confirming"):n("names.completing")}),e.jsxs(wn,{children:[e.jsx(jn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(vn,{children:"1/1"})]})]}),r==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(se,{children:[e.jsx(ie,{children:n("names.pendingHeaderTitle")}),e.jsx(oe,{onClick:a,"aria-label":n("buyModal.close"),children:e.jsx(S,{name:"close"})})]}),e.jsxs(re,{children:[n("names.myCreditsBalance")," ",e.jsx(M,{})," ",ne(l,d)]}),e.jsx(ae,{}),e.jsxs(fe,{"data-tone":"info",children:[e.jsx(S,{name:"info","aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("b",{children:n("names.pendingBannerBold")})," ",n("names.pendingBannerRest")]})]}),e.jsxs(le,{style:{marginTop:20},children:[e.jsx(ce,{"aria-hidden":!0,children:"@"}),e.jsxs(de,{children:[e.jsxs(pe,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(he,{children:n("names.subtitle")})]}),e.jsxs(xe,{children:[e.jsx(M,{}),E]})]}),e.jsx(Ne,{children:e.jsx(Me,{onClick:()=>{a(),p("/my-items")},children:n("names.myItems")})})]}),r==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(se,{children:[e.jsx(ie,{children:n("names.successHeaderTitle")}),e.jsx(oe,{onClick:a,"aria-label":n("buyModal.close"),children:e.jsx(S,{name:"close"})})]}),e.jsxs(re,{children:[n("names.myCreditsBalance")," ",e.jsx(M,{})," ",ne(l,d)]}),e.jsx(ae,{}),e.jsxs($n,{children:[e.jsx(Cn,{"aria-hidden":!0,children:e.jsx(S,{name:"check"})}),e.jsxs(kn,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(le,{style:{marginTop:20},children:[e.jsx(ce,{"aria-hidden":!0,children:"@"}),e.jsxs(de,{children:[e.jsxs(pe,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(he,{children:n("names.subtitle")})]}),e.jsxs(xe,{children:[e.jsx(M,{}),E]})]}),e.jsxs(Ne,{children:[e.jsx(Me,{onClick:()=>{a(),p("/my-items")},children:n("names.myItems")}),e.jsx(Sn,{href:F.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function Rn(i){return i.replace(/[&<>"']/g,o=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[o])}const _n="https://cdn.decentraland.org/@dcl/shop/0.5.1-30936450524.commit-699b9ba/_assets/identity-B4DXDuJP.webp",Tn="https://cdn.decentraland.org/@dcl/shop/0.5.1-30936450524.commit-699b9ba/_assets/world-B-9aPlxu.webp",zn="https://cdn.decentraland.org/@dcl/shop/0.5.1-30936450524.commit-699b9ba/_assets/invite-BfwIhP2C.webp",In="https://cdn.decentraland.org/@dcl/shop/0.5.1-30936450524.commit-699b9ba/_assets/governance-DnazlIjy.webp",An=s.div`
|
|
383
383
|
width: 100%;
|
|
384
384
|
min-width: 0;
|
|
385
385
|
`,Nn=s.nav`
|
|
@@ -479,11 +479,11 @@ import{d as We,r as m,j as e,e as Qe}from"./react-DehiWSvs.js";import{c as F,b7
|
|
|
479
479
|
gap: 8px;
|
|
480
480
|
padding: 8px 8px 8px 16px;
|
|
481
481
|
background: ${t.colors.softWhite};
|
|
482
|
-
border: 1.5px solid ${({invalid:
|
|
482
|
+
border: 1.5px solid ${({invalid:i})=>i?t.colors.dclRed:t.colors.line};
|
|
483
483
|
border-radius: 20px;
|
|
484
484
|
|
|
485
485
|
&:focus-within {
|
|
486
|
-
border-color: ${({invalid:
|
|
486
|
+
border-color: ${({invalid:i})=>i?t.colors.dclRed:t.colors.magenta};
|
|
487
487
|
}
|
|
488
488
|
|
|
489
489
|
${t.media.maxWidth("mobile")} {
|
|
@@ -669,8 +669,8 @@ import{d as We,r as m,j as e,e as Qe}from"./react-DehiWSvs.js";import{c as F,b7
|
|
|
669
669
|
font-weight: 500;
|
|
670
670
|
text-align: left;
|
|
671
671
|
|
|
672
|
-
background: ${({tone:
|
|
673
|
-
color: ${({tone:
|
|
672
|
+
background: ${({tone:i})=>i==="error"?"rgba(255, 45, 85, 0.12)":i==="ok"?"rgba(30, 166, 114, 0.14)":"rgba(255,255,255,0.14)"};
|
|
673
|
+
color: ${({tone:i})=>i==="error"?t.colors.dclRed:i==="ok"?"#0f7a4f":"#ecebed"};
|
|
674
674
|
|
|
675
675
|
.ico {
|
|
676
676
|
width: 16px;
|
|
@@ -704,7 +704,7 @@ import{d as We,r as m,j as e,e as Qe}from"./react-DehiWSvs.js";import{c as F,b7
|
|
|
704
704
|
${t.media.maxWidth("mobile")} {
|
|
705
705
|
font-size: 22px;
|
|
706
706
|
}
|
|
707
|
-
`,
|
|
707
|
+
`,is=s.p`
|
|
708
708
|
margin: 0;
|
|
709
709
|
max-width: 907px;
|
|
710
710
|
text-align: center;
|
|
@@ -717,7 +717,7 @@ import{d as We,r as m,j as e,e as Qe}from"./react-DehiWSvs.js";import{c as F,b7
|
|
|
717
717
|
${t.media.maxWidth("mobile")} {
|
|
718
718
|
font-size: 16px;
|
|
719
719
|
}
|
|
720
|
-
`,
|
|
720
|
+
`,os=s.div`
|
|
721
721
|
display: grid;
|
|
722
722
|
grid-template-columns: repeat(4, 1fr);
|
|
723
723
|
gap: 24px;
|
|
@@ -797,4 +797,4 @@ import{d as We,r as m,j as e,e as Qe}from"./react-DehiWSvs.js";import{c as F,b7
|
|
|
797
797
|
clip: rect(0, 0, 0, 0);
|
|
798
798
|
white-space: nowrap;
|
|
799
799
|
border: 0;
|
|
800
|
-
`,ls="https://docs.decentraland.org/creator/worlds/about/",cs="https://governance.decentraland.org";function ds(o){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(o)}`}function ps({onBack:o}){Fe({title:n("seo.names.title"),description:n("seo.names.description")});const{session:i,signIn:a}=Be(),{data:h}=Ue(),l=h?Le(L,h):null,[d,x]=m.useState(""),[p,r]=m.useState("idle"),[u,g]=m.useState(!1),w=m.useRef(null),[j,k]=m.useState(void 0);m.useLayoutEffect(()=>{w.current&&k(w.current.offsetWidth)},[d]),m.useEffect(()=>{if(!ze(d).ok){r(d.length===0?"idle":"invalid");return}r("checking");const T=new AbortController,R=setTimeout(()=>{(async()=>{try{const $=await en(d,{signal:T.signal});r($)}catch($){if(($==null?void 0:$.name)==="AbortError")return;r("error")}})()},400);return()=>{clearTimeout(R),T.abort()}},[d]);const f=ze(d),b=f.ok&&(p==="available"||p==="error");function v(){if(b){if(!i){a();return}g(!0)}}const E=e.jsxs(e.Fragment,{children:[n("names.claim"),l!=null?e.jsxs(es,{children:[e.jsx(M,{}),ge(l)]}):null]});return e.jsxs(An,{"data-testid":"names-page",children:[e.jsxs(Nn,{"aria-label":n("names.breadcrumbAria"),children:[e.jsx(Mn,{onClick:o,children:n("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(Pn,{children:n("names.breadcrumbCurrent")})]}),e.jsxs(Wn,{children:[e.jsxs(Bn,{children:[e.jsxs(Fn,{children:[e.jsx(Ln,{children:n("names.heroTitle")}),e.jsx(Un,{children:n("names.heroSubtitle")})]}),e.jsxs(Hn,{children:[e.jsxs(On,{children:[e.jsxs(Gn,{invalid:p==="taken",children:[e.jsxs(Zn,{children:[e.jsx(Kn,{"aria-hidden":!0,children:"@"}),e.jsx(Jn,{value:d,onChange:C=>x(Qt(C.target.value)),placeholder:n("names.inputPlaceholder"),"aria-label":n("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:ee,style:{width:j!=null?`${j}px`:void 0}}),e.jsx(Dn,{ref:w,"aria-hidden":!0,children:d||n("names.inputPlaceholder")}),e.jsx(Qn,{children:n("names.suffix")})]}),d.length>0?e.jsxs(Xn,{"aria-hidden":!0,children:[d.length,"/",ee]}):null,e.jsx(Oe,{onClick:v,disabled:!b,"data-testid":"names-claim",children:E})]}),p==="taken"?e.jsxs(qn,{role:"status","data-testid":"names-taken",children:[e.jsx(S,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:n("names.taken")}),e.jsxs(Vn,{href:ds(d),target:"_blank",rel:"noopener noreferrer",children:[n("names.takenMakeOffer"),e.jsx(S,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null]}),e.jsx(Yn,{onClick:v,disabled:!b,children:E}),p==="checking"?e.jsx(me,{tone:"muted",role:"status","data-testid":"names-checking",children:n("names.checking")}):p==="error"?e.jsx(me,{tone:"muted",role:"status",children:n("names.checkError")}):p==="invalid"&&!f.ok&&f.reason==="too-short"?e.jsx(me,{tone:"muted",role:"status",children:n("names.tooShort",{min:He})}):null,e.jsx(as,{role:"status","aria-live":"polite",children:p==="available"?n("names.available",{name:d}):""})]})]}),e.jsxs(ts,{children:[e.jsxs(ns,{children:[e.jsx(ss,{children:n("names.whyTitle")}),e.jsx(os,{children:n("names.whyIntro")})]}),e.jsxs(is,{children:[e.jsxs(Z,{children:[e.jsx(K,{src:_n,alt:""}),e.jsxs(J,{children:[e.jsx(Q,{children:n("names.why1Title")}),e.jsx(X,{children:n("names.why1")})]})]}),e.jsxs(Z,{children:[e.jsx(K,{src:Tn,alt:""}),e.jsxs(J,{children:[e.jsx(Q,{children:n("names.why2Title")}),e.jsxs(X,{children:[n("names.why2")," ",e.jsx(rs,{children:n("names.why2Address")})]}),e.jsxs(Pe,{href:ls,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(S,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(Z,{children:[e.jsx(K,{src:zn,alt:""}),e.jsxs(J,{children:[e.jsx(Q,{children:n("names.why3Title")}),e.jsx(X,{children:n("names.why3")})]})]}),e.jsxs(Z,{children:[e.jsx(K,{src:In,alt:""}),e.jsxs(J,{children:[e.jsx(Q,{children:n("names.why4Title")}),e.jsx(X,{children:n("names.why4")}),e.jsxs(Pe,{href:cs,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(S,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),u?e.jsx(En,{name:d,priceCredits:l,onClose:()=>g(!1)}):null]})}const hs="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",ue=48;function Ms(){const[o]=Qe(),i=We(),a=(o.get("q")??"").trim().toLowerCase(),h=(o.get("q")??"").trim();Fe({title:h?n("seo.collectibles.searchTitle",{query:h}):n("seo.collectibles.title"),description:n("seo.collectibles.description")});const[l,d]=m.useState("wearable"),[x,p]=m.useState(null),[r,u]=m.useState([]),[g,w]=m.useState(""),[j,k]=m.useState(""),[f,b]=m.useState("on_sale"),[v,E]=m.useState(!1),[C,T]=m.useState("newest"),[R,$]=m.useState(!1);m.useEffect(()=>{if(!R)return;const c=W=>{W.key==="Escape"&&$(!1)};document.addEventListener("keydown",c);const _=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",c),document.body.style.overflow=_}},[R]);const z=f==="on_sale",I=g&&!Number.isNaN(Number(g))?Number(g):void 0,A=j&&!Number.isNaN(Number(j))?Number(j):void 0,te=pt(),y=x?Nt[x]:void 0,U=(Te.find(c=>c.key===C)??Te[0]).server,H={category:l,rarities:r.length?r:void 0,wearableCategories:y,minPriceCredits:I,maxPriceCredits:A,search:a||void 0,sortBy:U,isSmart:v||void 0,onSale:!0,listingType:te?void 0:"primary"},we={category:l,rarities:r.length?r:void 0,wearableCategories:y,search:a||void 0,sortBy:U,isWearableSmart:v||void 0,isOnSale:f==="not_for_sale"?!1:void 0},{items:O,total:je,isLoading:N,isPlaceholderData:P,error:ve,hasNextPage:Ge,isFetchingNextPage:$e,isFetchNextPageError:De,fetchNextPage:qe}=Pt(z?["shop-items",H]:["catalog-items",we],c=>z?lt({...H,first:ue,skip:c}):ct({...we,first:ue,skip:c}),{enabled:l!=="names"}),G=je,Ce=N||P,Ve=N?15:Math.min(Math.max(O.length,1),ue),{data:ke,isError:Ze}=Ue(),Ke=c=>ke&&c.manaWei?Le(c.manaWei,ke):null,Se=m.useRef(null);m.useEffect(()=>{N||P||!a||Se.current===a||(Se.current=a,Y("Shop Searched",{query:a,result_count:G}))},[a,N,P,G]);const D=m.useRef("__init__");m.useEffect(()=>{if(N||P)return;const c=JSON.stringify({category:l,subCategory:x,rarities:r,min:I,max:A,sort:C,status:f,smart:v});if(D.current==="__init__"||D.current===c){D.current=c;return}D.current=c,Y("Shop Applied Filter",{filters:{category:l,sub_category:x,rarities:r,min_price_credits:I??null,max_price_credits:A??null,status:f,smart:v,sort:C},result_count:G})},[l,x,r,I,A,C,f,v,N,P,G]);function Ee(c){d(c),p(null)}function Re(c){u(_=>_.includes(c)?_.filter(W=>W!==c):[..._,c])}function Je(){d("wearable"),p(null),u([]),w(""),k(""),b("on_sale"),E(!1)}const B=[];(I!=null||A!=null)&&B.push({key:"price",label:n("filter.price"),onRemove:()=>{w(""),k("")}});for(const c of It)r.includes(c)&&B.push({key:`rarity-${c}`,label:at(c),onRemove:()=>Re(c)});return v&&B.push({key:"smart",label:n("filter.smart"),onRemove:()=>E(!1)}),f!=="on_sale"&&B.push({key:"status",label:f==="all"?n("filter.statusAll"):n("filter.notForSale"),onRemove:()=>b("on_sale")}),e.jsxs(xt,{"data-testid":"browse",children:[l!=="names"&&e.jsxs(e.Fragment,{children:[R?e.jsx(ft,{onClick:()=>$(!1),"aria-hidden":!0}):null,e.jsxs(mt,{"data-open":R||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(ut,{children:[e.jsx(gt,{children:n("assets.filters")}),e.jsx(bt,{onClick:()=>$(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(yt,{children:e.jsx(wt,{category:l,subCategory:x,onCategory:Ee,onSub:p,priceMin:g,priceMax:j,onPriceMin:w,onPriceMax:k,rarities:r,onToggleRarity:Re,status:f,onStatus:b,smart:v,onSmart:E})}),e.jsx(jt,{children:e.jsx(vt,{type:"button",onClick:()=>$(!1),children:n("assets.showItems")})})]})]}),e.jsx($t,{children:l==="names"?e.jsx(ps,{onBack:()=>Ee("wearable")}):e.jsxs(e.Fragment,{children:[e.jsx(At,{sort:C,onSort:T,total:je,loading:N||P,query:a,onOpenFilters:()=>$(!0),chips:B,onClearChips:Je}),Ze&&z&&O.some(c=>c.source==="legacy")?e.jsx(Ct,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,ve?e.jsx(Wt,{message:n("assets.loadError"),testId:"browse-error"}):null,!Ce&&O.length===0&&!ve?e.jsxs(kt,{"data-testid":"browse-empty",children:[e.jsx(St,{src:hs,alt:""}),e.jsxs(Et,{children:[e.jsx(Rt,{children:n("assets.empty.title")}),e.jsx(_t,{children:h?e.jsxs(e.Fragment,{children:[n("assets.empty.searchBefore"),e.jsx("b",{children:h}),n("assets.empty.searchAfter")]}):n("assets.empty.filters")})]}),e.jsx(Tt,{children:e.jsx(zt,{type:"button",onClick:()=>i("/overview"),children:n("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx(Kt,{"data-testid":"grid",children:Ce?e.jsx(_e,{count:Ve}):e.jsxs(e.Fragment,{children:[O.map(c=>{if(!z)return e.jsx(q,{item:c,mode:"view"},V(c));const _=c;if(_.source!=="legacy")return e.jsx(q,{item:c},V(c));const W=Ke(_);return W==null?e.jsx(q,{item:c,mode:"view"},V(c)):e.jsx(q,{item:{..._,priceCredits:W}},V(c))}),$e?e.jsx(_e,{count:6}):null]})}),e.jsx(Mt,{hasNextPage:Ge,isFetching:$e,isError:De,onLoadMore:()=>void qe()})]})]})})]})}export{Ms as Assets};
|
|
800
|
+
`,ls="https://docs.decentraland.org/creator/worlds/about/",cs="https://governance.decentraland.org";function ds(i){const o=typeof window<"u"?window.location.hostname:"";return`${o.endsWith("decentraland.org")?"https://decentraland.org":o.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(i)}`}function ps({onBack:i}){Fe({title:n("seo.names.title"),description:n("seo.names.description")});const{session:o,signIn:a}=Be(),{data:h}=Ue(),l=h?Le(L,h):null,[d,x]=m.useState(""),[p,r]=m.useState("idle"),[u,g]=m.useState(!1),w=m.useRef(null),[j,k]=m.useState(void 0);m.useLayoutEffect(()=>{w.current&&k(w.current.offsetWidth)},[d]),m.useEffect(()=>{if(!ze(d).ok){r(d.length===0?"idle":"invalid");return}r("checking");const T=new AbortController,R=setTimeout(()=>{(async()=>{try{const $=await en(d,{signal:T.signal});r($)}catch($){if(($==null?void 0:$.name)==="AbortError")return;r("error")}})()},400);return()=>{clearTimeout(R),T.abort()}},[d]);const f=ze(d),b=f.ok&&(p==="available"||p==="error");function v(){if(b){if(!o){a();return}g(!0)}}const E=e.jsxs(e.Fragment,{children:[n("names.claim"),l!=null?e.jsxs(es,{children:[e.jsx(M,{}),ge(l)]}):null]});return e.jsxs(An,{"data-testid":"names-page",children:[e.jsxs(Nn,{"aria-label":n("names.breadcrumbAria"),children:[e.jsx(Mn,{onClick:i,children:n("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(Pn,{children:n("names.breadcrumbCurrent")})]}),e.jsxs(Wn,{children:[e.jsxs(Bn,{children:[e.jsxs(Fn,{children:[e.jsx(Ln,{children:n("names.heroTitle")}),e.jsx(Un,{children:n("names.heroSubtitle")})]}),e.jsxs(Hn,{children:[e.jsxs(On,{children:[e.jsxs(Gn,{invalid:p==="taken",children:[e.jsxs(Zn,{children:[e.jsx(Kn,{"aria-hidden":!0,children:"@"}),e.jsx(Jn,{value:d,onChange:C=>x(Qt(C.target.value)),placeholder:n("names.inputPlaceholder"),"aria-label":n("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:ee,style:{width:j!=null?`${j}px`:void 0}}),e.jsx(Dn,{ref:w,"aria-hidden":!0,children:d||n("names.inputPlaceholder")}),e.jsx(Qn,{children:n("names.suffix")})]}),d.length>0?e.jsxs(Xn,{"aria-hidden":!0,children:[d.length,"/",ee]}):null,e.jsx(Oe,{onClick:v,disabled:!b,"data-testid":"names-claim",children:E})]}),p==="taken"?e.jsxs(qn,{role:"status","data-testid":"names-taken",children:[e.jsx(S,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:n("names.taken")}),e.jsxs(Vn,{href:ds(d),target:"_blank",rel:"noopener noreferrer",children:[n("names.takenMakeOffer"),e.jsx(S,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null]}),e.jsx(Yn,{onClick:v,disabled:!b,children:E}),p==="checking"?e.jsx(me,{tone:"muted",role:"status","data-testid":"names-checking",children:n("names.checking")}):p==="error"?e.jsx(me,{tone:"muted",role:"status",children:n("names.checkError")}):p==="invalid"&&!f.ok&&f.reason==="too-short"?e.jsx(me,{tone:"muted",role:"status",children:n("names.tooShort",{min:He})}):null,e.jsx(as,{role:"status","aria-live":"polite",children:p==="available"?n("names.available",{name:d}):""})]})]}),e.jsxs(ts,{children:[e.jsxs(ns,{children:[e.jsx(ss,{children:n("names.whyTitle")}),e.jsx(is,{children:n("names.whyIntro")})]}),e.jsxs(os,{children:[e.jsxs(Z,{children:[e.jsx(K,{src:_n,alt:""}),e.jsxs(J,{children:[e.jsx(Q,{children:n("names.why1Title")}),e.jsx(X,{children:n("names.why1")})]})]}),e.jsxs(Z,{children:[e.jsx(K,{src:Tn,alt:""}),e.jsxs(J,{children:[e.jsx(Q,{children:n("names.why2Title")}),e.jsxs(X,{children:[n("names.why2")," ",e.jsx(rs,{children:n("names.why2Address")})]}),e.jsxs(Pe,{href:ls,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(S,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(Z,{children:[e.jsx(K,{src:zn,alt:""}),e.jsxs(J,{children:[e.jsx(Q,{children:n("names.why3Title")}),e.jsx(X,{children:n("names.why3")})]})]}),e.jsxs(Z,{children:[e.jsx(K,{src:In,alt:""}),e.jsxs(J,{children:[e.jsx(Q,{children:n("names.why4Title")}),e.jsx(X,{children:n("names.why4")}),e.jsxs(Pe,{href:cs,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(S,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),u?e.jsx(En,{name:d,priceCredits:l,onClose:()=>g(!1)}):null]})}const hs="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",ue=48;function Ns(){const[i]=Qe(),o=We(),a=(i.get("q")??"").trim().toLowerCase(),h=(i.get("q")??"").trim();Fe({title:h?n("seo.collectibles.searchTitle",{query:h}):n("seo.collectibles.title"),description:n("seo.collectibles.description")});const[l,d]=m.useState("wearable"),[x,p]=m.useState(null),[r,u]=m.useState([]),[g,w]=m.useState(""),[j,k]=m.useState(""),[f,b]=m.useState("on_sale"),[v,E]=m.useState(!1),[C,T]=m.useState("newest"),[R,$]=m.useState(!1);m.useEffect(()=>{if(!R)return;const c=W=>{W.key==="Escape"&&$(!1)};document.addEventListener("keydown",c);const _=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",c),document.body.style.overflow=_}},[R]);const z=f==="on_sale",I=g&&!Number.isNaN(Number(g))?Number(g):void 0,A=j&&!Number.isNaN(Number(j))?Number(j):void 0,te=ht(),y=x?Mt[x]:void 0,U=(Te.find(c=>c.key===C)??Te[0]).server,H={category:l,rarities:r.length?r:void 0,wearableCategories:y,minPriceCredits:I,maxPriceCredits:A,search:a||void 0,sortBy:U,isSmart:v||void 0,onSale:!0,listingType:te?void 0:"primary"},we={category:l,rarities:r.length?r:void 0,wearableCategories:y,search:a||void 0,sortBy:U,isWearableSmart:v||void 0,isOnSale:f==="not_for_sale"?!1:void 0},{items:O,total:je,isLoading:N,isPlaceholderData:P,error:ve,hasNextPage:Ge,isFetchingNextPage:$e,isFetchNextPageError:De,fetchNextPage:qe}=Wt(z?["shop-items",H]:["catalog-items",we],c=>z?lt({...H,first:ue,skip:c}):ct({...we,first:ue,skip:c}),{enabled:l!=="names"}),G=je,Ce=N||P,Ve=N?15:Math.min(Math.max(O.length,1),ue),{data:ke,isError:Ze}=Ue(),Ke=c=>ke&&c.manaWei?Le(c.manaWei,ke):null,Se=m.useRef(null);m.useEffect(()=>{N||P||!a||Se.current===a||(Se.current=a,Y("Shop Searched",{query:a,result_count:G}))},[a,N,P,G]);const D=m.useRef("__init__");m.useEffect(()=>{if(N||P)return;const c=JSON.stringify({category:l,subCategory:x,rarities:r,min:I,max:A,sort:C,status:f,smart:v});if(D.current==="__init__"||D.current===c){D.current=c;return}D.current=c,Y("Shop Applied Filter",{filters:{category:l,sub_category:x,rarities:r,min_price_credits:I??null,max_price_credits:A??null,status:f,smart:v,sort:C},result_count:G})},[l,x,r,I,A,C,f,v,N,P,G]);function Ee(c){d(c),p(null)}function Re(c){u(_=>_.includes(c)?_.filter(W=>W!==c):[..._,c])}function Je(){d("wearable"),p(null),u([]),w(""),k(""),b("on_sale"),E(!1)}const B=[];(I!=null||A!=null)&&B.push({key:"price",label:n("filter.price"),onRemove:()=>{w(""),k("")}});for(const c of At)r.includes(c)&&B.push({key:`rarity-${c}`,label:at(c),onRemove:()=>Re(c)});return v&&B.push({key:"smart",label:n("filter.smart"),onRemove:()=>E(!1)}),f!=="on_sale"&&B.push({key:"status",label:f==="all"?n("filter.statusAll"):n("filter.notForSale"),onRemove:()=>b("on_sale")}),e.jsxs(ft,{"data-testid":"browse",children:[l!=="names"&&e.jsxs(e.Fragment,{children:[R?e.jsx(mt,{onClick:()=>$(!1),"aria-hidden":!0}):null,e.jsxs(ut,{"data-open":R||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(gt,{children:[e.jsx(bt,{children:n("assets.filters")}),e.jsx(yt,{onClick:()=>$(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(wt,{children:e.jsx(jt,{category:l,subCategory:x,onCategory:Ee,onSub:p,priceMin:g,priceMax:j,onPriceMin:w,onPriceMax:k,rarities:r,onToggleRarity:Re,status:f,onStatus:b,smart:v,onSmart:E})}),e.jsx(vt,{children:e.jsx($t,{type:"button",onClick:()=>$(!1),children:n("assets.showItems")})})]})]}),e.jsx(Ct,{children:l==="names"?e.jsx(ps,{onBack:()=>Ee("wearable")}):e.jsxs(e.Fragment,{children:[e.jsx(Nt,{sort:C,onSort:T,total:je,loading:N||P,query:a,onOpenFilters:()=>$(!0),chips:B,onClearChips:Je}),Ze&&z&&O.some(c=>c.source==="legacy")?e.jsx(kt,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,ve?e.jsx(Bt,{message:n("assets.loadError"),testId:"browse-error"}):null,!Ce&&O.length===0&&!ve?e.jsxs(St,{"data-testid":"browse-empty",children:[e.jsx(Et,{src:hs,alt:""}),e.jsxs(Rt,{children:[e.jsx(_t,{children:n("assets.empty.title")}),e.jsx(Tt,{children:h?e.jsxs(e.Fragment,{children:[n("assets.empty.searchBefore"),e.jsx("b",{children:h}),n("assets.empty.searchAfter")]}):n("assets.empty.filters")})]}),e.jsx(zt,{children:e.jsx(It,{type:"button",onClick:()=>o("/overview"),children:n("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx(Kt,{"data-testid":"grid",children:Ce?e.jsx(_e,{count:Ve}):e.jsxs(e.Fragment,{children:[O.map(c=>{if(!z)return e.jsx(q,{item:c,mode:"view"},V(c));const _=c;if(_.source!=="legacy")return e.jsx(q,{item:c},V(c));const W=Ke(_);return W==null?e.jsx(q,{item:c,mode:"view"},V(c)):e.jsx(q,{item:{..._,priceCredits:W}},V(c))}),$e?e.jsx(_e,{count:6}):null]})}),e.jsx(Pt,{hasNextPage:Ge,isFetching:$e,isError:De,onLoadMore:()=>void qe()})]})]})})]})}export{Ns as Assets};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as $,j as t}from"./react-DehiWSvs.js";import{R as C,C as oe,a as ie,b as ne}from"./categories-
|
|
1
|
+
import{r as $,j as t}from"./react-DehiWSvs.js";import{R as C,C as oe,a as ie,b as ne}from"./categories-B569rNQU.js";import{n as c,T as se}from"./Tooltip-BFF2_vlu.js";import{t as e,s as o,I as g,b as s,ad as ae,C as v}from"./index-D-7WCtxn.js";const re=o.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 12px;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{j as i,L as _,r as P}from"./react-DehiWSvs.js";import{s as n,B as W,t as a,
|
|
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,n as G,v as O,I as z,w as B,u as w,x as K,c as Q,y as H,z as A,j as X,A as Z,D as T}from"./index-D-7WCtxn.js";import{a as J,b as U,c as V,d as Y,s as tt,e as it}from"./authorizations-zc6Rq7Wn.js";import{f as et}from"./builder-D5fMO9fl.js";import{m as ot}from"./mana-matic-C4e1sNO3.js";import{f as at}from"./errors-CZnCfZdx.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-BAlAehuy.js";const nt=D`
|
|
2
2
|
to { transform: rotate(360deg); }
|
|
3
|
-
`,st=
|
|
3
|
+
`,st=D`
|
|
4
4
|
to { background-position: -200% 0; }
|
|
5
5
|
`,rt=n.section`
|
|
6
6
|
width: 100%;
|
|
@@ -183,4 +183,4 @@ import{j as i,L as _,r as P}from"./react-DehiWSvs.js";import{s as n,B as W,t as
|
|
|
183
183
|
margin: 6px 0 0;
|
|
184
184
|
`,M=n(W)`
|
|
185
185
|
margin-top: 12px;
|
|
186
|
-
`;function j({descriptor:t,owner:s,signer:r,name:o,description:c,image:l,icon:p}){const v=K(),[h,y]=P.useState(!1),{data:u,isLoading:m,refetch:d}=w({queryKey:["authorization",t.id,s],queryFn:()=>it(t,s),staleTime:3e4});async function g(){if(h||m)return;const b=!u;y(!0);try{await tt({auth:t,signer:r,active:b}),await d(),v.setQueryData(["authorization",t.id,s],b),A.success(b?e("authorizations.toastActivated",{name:o}):e("authorizations.toastDeactivated",{name:o}))}catch($){X($,{flow:"authorizations",step:b?"grant":"revoke"}),A.error(at($,e("authorizations.errorGeneric")))}finally{y(!1)}}const
|
|
186
|
+
`;function j({descriptor:t,owner:s,signer:r,name:o,description:c,image:l,icon:p}){const v=K(),[h,y]=P.useState(!1),{data:u,isLoading:m,refetch:d}=w({queryKey:["authorization",t.id,s],queryFn:()=>it(t,s),staleTime:3e4});async function g(){if(h||m)return;const b=!u;y(!0);try{await tt({auth:t,signer:r,active:b}),await d(),v.setQueryData(["authorization",t.id,s],b),A.success(b?e("authorizations.toastActivated",{name:o}):e("authorizations.toastDeactivated",{name:o}))}catch($){X($,{flow:"authorizations",step:b?"grant":"revoke"}),A.error(at($,e("authorizations.errorGeneric")))}finally{y(!1)}}const q=m?e("authorizations.checking"):u?e("authorizations.active"):e("authorizations.inactive");return i.jsxs(ut,{"data-testid":`authorization-${t.id}`,"data-active":!!u,children:[i.jsx(pt,{children:l?i.jsx("img",{src:l,alt:""}):p}),i.jsxs(mt,{children:[i.jsx(gt,{title:o,children:o}),i.jsx(xt,{children:c})]}),i.jsxs(yt,{children:[i.jsx(ft,{"data-active":!!u,children:q}),h?i.jsx(zt,{"aria-label":e("authorizations.working")}):i.jsx(bt,{type:"button","data-testid":`authorization-toggle-${t.id}`,"data-active":!!u,role:"switch","aria-checked":!!u,"aria-label":u?e("authorizations.deactivateAria",{name:o}):e("authorizations.activateAria",{name:o}),disabled:m,onClick:()=>void g()})]})]})}const f=500,R=10,wt=f*R;async function N(t,s){const r=await T(t,{category:s,first:f}),o=Math.min(Math.ceil(r.total/f),R),c=await Promise.all(Array.from({length:Math.max(0,o-1)},(l,p)=>T(t,{category:s,first:f,skip:(p+1)*f})));return{assets:[...r.assets,...c.flatMap(l=>l.assets)],truncated:r.total>wt}}function vt(t){return w({queryKey:["owned-collections",t],enabled:!!t,staleTime:6e4,queryFn:async()=>{const[s,r]=await Promise.all([N(t,"wearable"),N(t,"emote")]),o=new Map;for(const c of[...s.assets,...r.assets]){const l=c.contractAddress.toLowerCase();o.has(l)||o.set(l,c)}return{collections:[...o.values()],truncated:s.truncated||r.truncated,scanned:s.assets.length+r.assets.length}}})}function kt(t){return w({queryKey:["contract-registry"],enabled:t,staleTime:1/0,gcTime:1/0,queryFn:Z})}function Ct(t,s){const r=s==null?void 0:s.get(t.toLowerCase());if(r)return r;const o=H(t);return o===t?e("authorizations.collectionFallback"):o}function $t(t,s){return w({queryKey:["creator-collections",t],enabled:!!t&&!!s,staleTime:6e4,queryFn:async()=>{const r=await et(t,s),o=new Map;for(const c of r){const l=c.contractAddress.toLowerCase();o.has(l)||o.set(l,c)}return[...o.values()]}})}function _t(){F({title:e("authorizations.title"),noindex:!0});const{session:t,signIn:s}=G(),r=Q.chainId,o=O(t==null?void 0:t.providerType),{data:c,isLoading:l}=vt(o?t==null?void 0:t.address:void 0),{data:p,isLoading:v}=kt(!!o&&!!(t!=null&&t.address)),{data:h,isLoading:y}=$t(o?t==null?void 0:t.address:void 0,o?t==null?void 0:t.identity:void 0);if(!t)return i.jsxs(S,{children:[i.jsx(z,{name:"info",size:40,color:a.colors.muted2}),i.jsx(L,{children:e("authorizations.signInTitle")}),i.jsx("p",{className:"muted",children:e("authorizations.signInBody")}),i.jsx(M,{variant:"purple",onClick:()=>s(),children:e("storeSettings.signIn")})]});if(!o)return i.jsxs(S,{children:[i.jsx(z,{name:"check",size:40,color:a.colors.ok}),i.jsx(L,{children:e("authorizations.managedTitle")}),i.jsx("p",{className:"muted",children:e("authorizations.managedBody")}),i.jsx(M,{as:_,to:"/items",variant:"purple",children:e("authorizations.managedCta")})]});const u=J(r),m=U(r);return i.jsxs(rt,{children:[i.jsxs(ct,{children:[i.jsx(lt,{children:e("authorizations.title")}),i.jsx(dt,{children:e("authorizations.intro")})]}),i.jsxs(k,{children:[i.jsx(C,{children:e("authorizations.buyingTitle")}),i.jsxs(x,{children:[i.jsx(j,{descriptor:u,owner:t.address,signer:t.signer,name:e("authorizations.creditsName"),description:e("authorizations.creditsDesc"),icon:i.jsx(B,{className:"ccy-mark"})}),i.jsx(j,{descriptor:m,owner:t.address,signer:t.signer,name:e("authorizations.manaName"),description:e("authorizations.manaDesc"),icon:i.jsx(ht,{src:ot,alt:"","aria-hidden":!0})})]})]}),i.jsxs(k,{children:[i.jsx(C,{children:e("authorizations.sellingTitle")}),c!=null&&c.truncated?i.jsx(jt,{"data-testid":"authorizations-selling-truncated",children:e("authorizations.sellingTruncated",{count:c.scanned})}):null,l||v?i.jsx(x,{"aria-busy":"true","aria-label":e("authorizations.checking"),children:Array.from({length:3}).map((d,g)=>i.jsx(E,{"aria-hidden":!0},g))}):c&&c.collections.length>0?i.jsx(x,{children:c.collections.map(d=>i.jsx(j,{descriptor:V(d.contractAddress,r),owner:t.address,signer:t.signer,name:Ct(d.contractAddress,p),description:e("authorizations.sellingDesc"),image:d.image,icon:i.jsx(z,{name:"pen",size:18})},d.contractAddress))}):i.jsx(I,{children:e("authorizations.sellingEmpty")})]}),i.jsxs(k,{children:[i.jsx(C,{children:e("authorizations.mintingTitle")}),y?i.jsx(x,{"aria-busy":"true","aria-label":e("authorizations.checking"),children:Array.from({length:3}).map((d,g)=>i.jsx(E,{"aria-hidden":!0},g))}):h&&h.length>0?i.jsx(x,{children:h.map(d=>i.jsx(j,{descriptor:Y(d.contractAddress,r),owner:t.address,signer:t.signer,name:d.name||e("authorizations.collectionFallback"),description:e("authorizations.mintingDesc"),icon:i.jsx(z,{name:"pen",size:18})},d.contractAddress))}):i.jsx(I,{children:e("authorizations.mintingEmpty")})]})]})}export{_t as Authorizations};
|