@dcl/shop 1.0.0 → 1.0.1
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-CYc4haGG.js +378 -0
- package/_assets/{AnimatedBackground-CHiOSgJ6.js → AnimatedBackground-DEshz0c2.js} +1 -1
- package/_assets/{Assets-1KVsmH01.js → Assets-D5sxwFuc.js} +6 -6
- package/_assets/{Assets.styles-BUHnZ7Nb.js → Assets.styles-c5XuGAG4.js} +1 -1
- package/_assets/{Authorizations-BGlyC4dr.js → Authorizations-m488Gyk0.js} +1 -1
- package/_assets/{Cart-afrKtZvj.js → Cart-Ctyse8xg.js} +2 -2
- package/_assets/{CircularProgress-K7JjSpPZ.js → CircularProgress-CB7Frwx7.js} +1 -1
- package/_assets/{Collection-B0G71rJV.js → Collection-CS-PKjRf.js} +8 -8
- package/_assets/{CollectionCarousel-B4hzcKRb.js → CollectionCarousel-DhrBSU2o.js} +13 -13
- package/_assets/{Confetti-BBhDY6Q2.js → Confetti-z9mEz7Mo.js} +1 -1
- package/_assets/{Creator-CYC3eVKx.js → Creator-BMYJiMCB.js} +5 -5
- package/_assets/{ErrorNotice-CnPcFEw_.js → ErrorNotice-BG4CBNkl.js} +1 -1
- package/_assets/{ExchangeController-BAefeOHy.js → ExchangeController-CLyfn8FH.js} +1 -1
- package/_assets/{Faq-D03YByjo.js → Faq-D7gV7iYA.js} +1 -1
- package/_assets/{GetCredits-Cyw0rRMV.js → GetCredits-CL7K_M9H.js} +10 -10
- package/_assets/{Grow-CPwRVF9g.js → Grow-Ccwk3GHr.js} +1 -1
- package/_assets/{HelpersUtil-DJC0aWJi.js → HelpersUtil-tyC-vTbQ.js} +1 -1
- package/_assets/{ItemDetail-DSuMCjR9.js → ItemDetail-DwY7HKZL.js} +28 -28
- package/_assets/LazyEmoteControls-BNHGzPTO.js +2 -0
- package/_assets/{LoadMore-CMAFsns3.js → LoadMore-BLHzgyNQ.js} +1 -1
- package/_assets/{ManaPricingBanner.styles-Bb7BS6EM.js → ManaPricingBanner.styles-G4jy5obg.js} +1 -1
- package/_assets/{MyAssets-C5lGRPqP.js → MyAssets-BpBrCfKj.js} +4 -4
- package/_assets/{MyFavorites-C1t1o6Li.js → MyFavorites-eakG4vL0.js} +1 -1
- package/_assets/{NotFound-Bdi_fN5j.js → NotFound-By_5zIVf.js} +1 -1
- package/_assets/{NotificationsBell-BQk3EV9b.js → NotificationsBell-DVM7TZeA.js} +1 -1
- package/_assets/{OutfitDetail-D3Mwl6KR.js → OutfitDetail-CKImDsVr.js} +1 -1
- package/_assets/{OutfitPreview-BpWwkAro.js → OutfitPreview-BDsx1Zln.js} +1 -1
- package/_assets/{OutfitStudio-BL7OYD9h.js → OutfitStudio-BNP0n5pI.js} +4 -4
- package/_assets/{StoreSettings-BNhzJJib.js → StoreSettings-CMOSmEWV.js} +6 -6
- package/_assets/{Success-Cnu7oCbI.js → Success-DKTCAGfP.js} +1 -1
- package/_assets/{SwapController-BD23YCPw.js → SwapController-B6jVCCgh.js} +1 -1
- package/_assets/{Tooltip-tAvMrdFp.js → Tooltip-CnjWof_H.js} +1 -1
- package/_assets/{TradeService-a2JgoWq2.js → TradeService-DqBS7JER.js} +1 -1
- package/_assets/{W3MFrameProviderSingleton-CPDmjNiA.js → W3MFrameProviderSingleton-BNh7T9LS.js} +3 -3
- package/_assets/{WebCryptoP256-DIEJtB0I.js → WebCryptoP256-DVUZQ3fN.js} +1 -1
- package/_assets/{authorizations-HgwrWkaa.js → authorizations-CE0HtqU4.js} +1 -1
- package/_assets/{basic-B3qEjJvY.js → basic-sWTPOMIW.js} +1 -1
- package/_assets/{biconomy-CzcDC8vB.js → biconomy-Gn8OlgoU.js} +1 -1
- package/_assets/{builder-TZGldT6a.js → builder-DeMyTCI7.js} +1 -1
- package/_assets/buy-BF3MKHeK.js +1 -0
- package/_assets/buy-gasless-C6Uiz2ft.js +1 -0
- package/_assets/{categories-B3DJZe02.js → categories-e7ryjlpc.js} +1 -1
- package/_assets/{ccip-CB03B_MW.js → ccip-BGow4NM2.js} +1 -1
- package/_assets/{ccip-VI2-jJnV.js → ccip-C8QxGeVJ.js} +1 -1
- package/_assets/{collectionPage.styles-DXfFyRiH.js → collectionPage.styles-DGJTp7Uw.js} +4 -4
- package/_assets/{controller-CEo6ipG_.js → controller-Ct0gOkSO.js} +2 -2
- package/_assets/{core-DmqfUS4f.js → core-BPejI2Uv.js} +4 -4
- package/_assets/{createSvgIcon-WfOAVB94.js → createSvgIcon-CfV25Qvu.js} +3 -3
- package/_assets/{custom-bIxIBqCn.js → custom-CtkIvR1q.js} +1 -1
- package/_assets/{data-capture-Dtaj6ehs.js → data-capture-ChzQjncq.js} +1 -1
- package/_assets/{email-DBXWS-p0.js → email-DTmn4SUk.js} +1 -1
- package/_assets/{embedded-wallet-DqlpsZRk.js → embedded-wallet-zOEVMj8r.js} +1 -1
- package/_assets/{emotion-styled.browser.esm-pOAX0dMa.js → emotion-styled.browser.esm-ftlGzXhy.js} +1 -1
- package/_assets/{engine-gP8vp-2g.js → engine-C84VS8MU.js} +1 -1
- package/_assets/{errors-WNvNILsF.js → errors-jURSB57c.js} +1 -1
- package/_assets/{estimate-l1-fee-X1cvAsdL.js → estimate-l1-fee-BK9aiTEg.js} +1 -1
- package/_assets/{execute-V2l_cDAW.js → execute-BJdfX8go.js} +2 -2
- package/_assets/{features-CFR_-yBt.js → features-CEPVrrJh.js} +1 -1
- package/_assets/{fetchTokenMetadata-Do5GLuIQ.js → fetchTokenMetadata-Cg8LhGF6.js} +2 -2
- package/_assets/{field.styles-ciG_OcBi.js → field.styles-BO_2AHCA.js} +1 -1
- package/_assets/{get-ecosystem-wallet-info-CyDTxLgQ.js → get-ecosystem-wallet-info-DN7GFeAM.js} +1 -1
- package/_assets/{getBalance-7wKu8RUe.js → getBalance-CCluSQca.js} +1 -1
- package/_assets/{getNFT-DecLUThv.js → getNFT-B3tNxOax.js} +1 -1
- package/_assets/{getNFT-BbpUiMXR.js → getNFT-C7PC0iJF.js} +1 -1
- package/_assets/{grid.styles-Caahz6PS.js → grid.styles-DRngdZfp.js} +1 -1
- package/_assets/{hashTypedData-Ca524zaX.js → hashTypedData-BPxQrISG.js} +1 -1
- package/_assets/{hashTypedData-C9kgxiiE.js → hashTypedData-ulq3qXHW.js} +1 -1
- package/_assets/{in-app-B-disnkm.js → in-app-C_sI0Q7l.js} +1 -1
- package/_assets/{in-app-wallet-calls-3yighozE.js → in-app-wallet-calls-ozqkkU0m.js} +1 -1
- package/_assets/{index-DCMLwiSR.js → index-0wuiFD-D.js} +1 -1
- package/_assets/{index-BBX5Tona.js → index-2bLJt5nu.js} +1 -1
- package/_assets/{index-DvjyzmjB.js → index-B-0HDufu.js} +1 -1
- package/_assets/{index-CFziwAGz.js → index-B1yZmsbg.js} +1 -1
- package/_assets/{index-DsH_mBtT.js → index-B2h0kzTR.js} +7 -7
- package/_assets/{index-o0b8cjRQ.js → index-B41s2t0I.js} +1 -1
- package/_assets/{index-CEDBhmGn.js → index-B4Sh4DUY.js} +1 -1
- package/_assets/{index-CEnhHz30.js → index-B4VWghxR.js} +1 -1
- package/_assets/{index-2-BWsekC.js → index-B4ldzGrT.js} +1 -1
- package/_assets/{index-CONyzZZC.js → index-B8hnFmS-.js} +3 -3
- package/_assets/{index-D58OkhU1.js → index-BCbVNwA6.js} +1 -1
- package/_assets/{index-8xcbpK09.js → index-BCqRbjcA.js} +1 -1
- package/_assets/{index-CUAEZ5zJ.js → index-BG93ruhj.js} +1 -1
- package/_assets/{index-CmlH9TBP.js → index-BLtmHnvk.js} +1 -1
- package/_assets/{index-DxB85HDB.js → index-BQAoWWgI.js} +1 -1
- package/_assets/{index-BrU_i04f.js → index-BQbGdQCn.js} +1 -1
- package/_assets/{index-D9iAFl4E.js → index-BZo86GEs.js} +1 -1
- package/_assets/{index-BMFVFrWl.js → index-Bfbo1-y3.js} +3 -3
- package/_assets/{index-DRI1gQSo.js → index-Bk3FocQt.js} +1 -1
- package/_assets/{index-C616xNgB.js → index-BpBLqmY7.js} +19 -19
- package/_assets/{index-BjEDpwxR.js → index-BqQA-htt.js} +1 -1
- package/_assets/{index-DEw1jYQT.js → index-BsAc5Nb_.js} +1 -1
- package/_assets/{index-CjhGjrdW.js → index-BwT65Ui0.js} +1 -1
- package/_assets/{index-DNvcQt0s.js → index-BwpU8az-.js} +3 -3
- package/_assets/{index-DCAUOF_r.js → index-C1ABS6aZ.js} +1 -1
- package/_assets/{index-p0fxtTsZ.js → index-C21U9leN.js} +2 -2
- package/_assets/{index-CO_xP_3N.js → index-C6jWze3p.js} +1 -1
- package/_assets/{index-CAl290ro.js → index-C7gyW2pC.js} +1 -1
- package/_assets/{index-CyITvpDL.js → index-C8N5dIBi.js} +1 -1
- package/_assets/{index-CGcb9Mz3.js → index-CFj3lX4u.js} +1 -1
- package/_assets/{index--1pBMb8n.js → index-CPVal8wI.js} +1 -1
- package/_assets/{index-BuImQh6o.js → index-Ca2t9jnc.js} +1 -1
- package/_assets/{index-yiECqJCb.js → index-Ce2J3RrX.js} +1 -1
- package/_assets/{index-Gw3Mauv_.js → index-Cutc7nXs.js} +1 -1
- package/_assets/{index-JuH5W7YS.js → index-D3CBiscc.js} +2 -2
- package/_assets/{index-CZBUgvRB.js → index-D7sH_woo.js} +1 -1
- package/_assets/{index-N5sgh9IC.js → index-DEpHjDox.js} +1 -1
- package/_assets/{index-Bd7SNoIN.js → index-DNUmp9qJ.js} +2 -2
- package/_assets/{index-DKghJgJj.js → index-DPJNY0Ni.js} +1 -1
- package/_assets/{index-BLCTVSaC.js → index-DPh8zvp5.js} +1 -1
- package/_assets/{index-Eip3e8N8.js → index-DUeFbNWb.js} +1 -1
- package/_assets/{index-C3MGLBUO.js → index-D_qvzN-5.js} +1 -1
- package/_assets/{index-DUmo7598.js → index-DisgA_Kp.js} +1 -1
- package/_assets/{index-BdQllJHM.js → index-DmYn7FTm.js} +1 -1
- package/_assets/{index-tCYP1O3W.js → index-DmouEX3z.js} +1 -1
- package/_assets/{index-BQB7qYN1.js → index-DrdjzH9k.js} +1 -1
- package/_assets/{index-DJOlt1Iv.js → index-G_9AGT2d.js} +1 -1
- package/_assets/{index-CdFrv2eV.js → index-YX6Ay2YX.js} +1 -1
- package/_assets/{index-Dag4zALf.js → index-aOhbQl_e.js} +1 -1
- package/_assets/{index-CKkE-eRE.js → index-js8gBwwu.js} +1 -1
- package/_assets/{index-B6l73M7K.js → index-sAHvnz2N.js} +1 -1
- package/_assets/{index-p4Ph7ugv.js → index-yJr5AHy6.js} +1 -1
- package/_assets/{index.es-C5PJ78RX.js → index.es-CAm13D3S.js} +1 -1
- package/_assets/{index.es-DF_hlZIu.js → index.es-_sMtTPSc.js} +4 -4
- package/_assets/{index.es-D73EniUm.js → index.es-nXwNgZDa.js} +1 -1
- package/_assets/{localBatchGatewayRequest-DvkdRgNo.js → localBatchGatewayRequest-DldZ90JU.js} +1 -1
- package/_assets/{networks-7b-i0dnd.js → networks-A_3lFdbQ.js} +1 -1
- package/_assets/{onramp-CoF8bFaS.js → onramp-uIn5Hze6.js} +1 -1
- package/_assets/{openzeppelin-DcsEW8tQ.js → openzeppelin-K0lueS2f.js} +1 -1
- package/_assets/{parseNft-CNJ2CwyE.js → parseNft-B8gQqMLe.js} +2 -2
- package/_assets/{parseSignature-whU_pkfu.js → parseSignature-DzYQN9v3.js} +3 -3
- package/_assets/{parseSignature-D0-1k6Yx.js → parseSignature-eP7njmVY.js} +1 -1
- package/_assets/{passkeys-SqHHDvyI.js → passkeys-CdjlkSrV.js} +1 -1
- package/_assets/{pay-with-exchange-Cvr7dd94.js → pay-with-exchange-2kPfthhA.js} +1 -1
- package/_assets/{qr-overlay-HlBTd234.js → qr-overlay-lH0GRusa.js} +1 -1
- package/_assets/{receive-HPltMi_i.js → receive-D9VTDtK7.js} +1 -1
- package/_assets/{resolveImplementation-CM1yFlGf.js → resolveImplementation-BBpjC548.js} +1 -1
- package/_assets/{rpc-CPS_djFB.js → rpc-QKrpJtdm.js} +1 -1
- package/_assets/{secp256k1-ChRNiO68.js → secp256k1-BC1FlI33.js} +1 -1
- package/_assets/{secp256k1-CQmdb_AD.js → secp256k1-CYkRl_Jj.js} +1 -1
- package/_assets/{secp256k1-DUTfCpIK.js → secp256k1-DhRlT0ib.js} +1 -1
- package/_assets/{send-zy_Vr6BQ.js → send-BR0llNO1.js} +1 -1
- package/_assets/{send-batch-transaction-Vn4JOFM5.js → send-batch-transaction-BCKT8nBl.js} +1 -1
- package/_assets/{send-eip712-transaction-Qvibiwhe.js → send-eip712-transaction-DJ0zmOUy.js} +2 -2
- package/_assets/{send-gasless-transaction-DQLcvFHt.js → send-gasless-transaction-BjdM8j2X.js} +2 -2
- package/_assets/{send-transaction-CZ0kapdy.js → send-transaction-C8RVBMn9.js} +2 -2
- package/_assets/{sendMetaTransaction-Ba_-1nOk.js → sendMetaTransaction-CcYdCbY-.js} +1 -1
- package/_assets/{sendRawTransaction-BUz1EYd8.js → sendRawTransaction-daS8Cqba.js} +3 -3
- package/_assets/{serializeTransaction-B8qCVIIu.js → serializeTransaction-hW8PYHkl.js} +1 -1
- package/_assets/{session-proposal-BqO43SKO.js → session-proposal-CqH6oHj9.js} +1 -1
- package/_assets/{session-request-DbQI-hjo.js → session-request-BWv_wt41.js} +2 -2
- package/_assets/{signing-CVGndCRE.js → signing-BqfCVU3I.js} +3 -3
- package/_assets/{skeleton.styles-K9f1Sxf1.js → skeleton.styles-DagyoT5y.js} +1 -1
- package/_assets/{socials-CNOGl_eO.js → socials-D4goIlBt.js} +1 -1
- package/_assets/{styled-CljNQW-J.js → styled-CoVCpn99.js} +1 -1
- package/_assets/{swaps-D5haogfk.js → swaps-GJ4U9DHL.js} +1 -1
- package/_assets/{thirdweb-CC2bk-Up.js → thirdweb-F_-Px602.js} +3 -3
- package/_assets/{to-serializable-transaction-BB0M9pw8.js → to-serializable-transaction-BkPY6iHK.js} +2 -2
- package/_assets/{transactionReceipt-puJsrtjz.js → transactionReceipt-iJ97NYxd.js} +1 -1
- package/_assets/{transactions-BnYHwdat.js → transactions-Cl8fRRc0.js} +1 -1
- package/_assets/{useCreditPacks-xyyhS_80.js → useCreditPacks-Dsfos9wm.js} +1 -1
- package/_assets/{useImportable-Bh7jH6e9.js → useImportable-Bn9l5AUn.js} +1 -1
- package/_assets/{useInfiniteGrid-CV4TXaLn.js → useInfiniteGrid-VPnx9W8Q.js} +1 -1
- package/_assets/{useTheme-Czw2-J4G.js → useTheme-D2_ZQh6-.js} +1 -1
- package/_assets/{verifyHash-CAYWYGEG.js → verifyHash-DlqrxU4F.js} +1 -1
- package/_assets/{w3m-modal-Fr29zvJe.js → w3m-modal-BTAbPei6.js} +1 -1
- package/_assets/{w3m-modal-DtofW43q.js → w3m-modal-DRnBD4CD.js} +1 -1
- package/_assets/{wait-for-tx-receipt-mfzWqQ40.js → wait-for-tx-receipt-CETDDyPM.js} +1 -1
- package/_assets/{wallets-DT2LKaVF.js → wallets-91m5q0QW.js} +5 -5
- package/_assets/{web-connector-4TZSYYzx.js → web-connector-qXgR2Q4O.js} +3 -3
- package/_assets/{writeContract-CEQ0n4-z.js → writeContract-IIDoxAya.js} +1 -1
- package/_assets/{zoraTestnet-Cd1Th5ww.js → zoraTestnet-ev6ZVcwL.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/_assets/Activity-CJO4ONwi.js +0 -371
- package/_assets/LazyEmoteControls-D-xqLU4A.js +0 -2
- package/_assets/buy-CuFubBZY.js +0 -1
- package/_assets/buy-gasless-DO6cBuJ3.js +0 -1
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-B2h0kzTR.js","_assets/react-BYHuwl8r.js","_assets/index-BpBLqmY7.js","_assets/dcl-schemas-CmtP3U6y.js","_assets/sentry-Dx-KuLV3.js","_assets/ethers-BDpbhgX6.js","_assets/intl-CBcMB1D2.js","_assets/index-BYP7oMPZ.css","_assets/useImportable-Bn9l5AUn.js","_assets/buy-BF3MKHeK.js","_assets/authorizations-CE0HtqU4.js","_assets/sendMetaTransaction-CcYdCbY-.js","_assets/ManaPricingBanner.styles-G4jy5obg.js","_assets/Faq-D7gV7iYA.js","_assets/field.styles-BO_2AHCA.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{n as It,bO as At,o as O,v as A,bP as $t,t as s,s as l,w as Lt,B as Et,x as Pt,b as c,ap as Tt,I as $,bQ as et,bR as it,bS as Nt,_ as St,z as P,bT as Ct,A as Ft,bj as q,L as Dt,bU as Mt,E as Ht,bV as Rt,bW as W}from"./index-BpBLqmY7.js";import{r as g,u as zt,j as e,L as rt,e as Ot}from"./react-BYHuwl8r.js";import{u as qt}from"./useImportable-Bn9l5AUn.js";import{L as Wt}from"./LoadMore-BLHzgyNQ.js";import{u as L}from"./useInfiniteGrid-VPnx9W8Q.js";import{m as ot}from"./mana-matic-C4e1sNO3.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";import"./buy-BF3MKHeK.js";import"./authorizations-CE0HtqU4.js";import"./sendMetaTransaction-CcYdCbY-.js";const _t=15e3;function Gt(t,n){return t.txHash&&n.txHash?t.txHash===n.txHash:t.txHash||n.txHash?!1:t.status===n.status&&Math.abs(t.createdAt-n.createdAt)<=_t}function Bt(t){const n=[...t].sort((i,r)=>r.createdAt-i.createdAt),a=[];for(const i of n){const r=a[a.length-1];r&&Gt(r[r.length-1],i)?r.push(i):a.push([i])}return a.map(i=>{var r;return{id:((r=i.find(o=>o.txHash))==null?void 0:r.txHash)??i[i.length-1].id,createdAt:Math.max(...i.map(o=>o.createdAt)),status:Kt(i),totalCredits:i.reduce((o,h)=>o+h.credits,0),lines:i}})}function Kt(t){return t.some(n=>n.status==="PENDING")?"PENDING":t.some(n=>n.status==="SETTLED")?"SETTLED":"EXPIRED"}function Ut(t){return t==="SETTLED"?"SETTLED":t==="EXPIRED"?"FAILED":"PENDING"}function Qt(t){return t.tradeId?`trade:${t.tradeId}`:t.contractAddress&&t.itemId?`item:${t.contractAddress.toLowerCase()}:${t.itemId}`:null}function Vt(t){const n=[],a=new Map;for(const i of t){const r=Qt(i);if(!r){n.push({key:i.id,tradeId:null,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits});continue}const o=a.get(r);if(o){o.quantity+=1,o.credits+=i.credits;continue}const h={key:r,tradeId:i.tradeId,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits};a.set(r,h),n.push(h)}return n}function Xt(t,n){return{id:t.id,contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId,counterparty:t.buyer,credits:n?It(t.manaWei,n):null,manaWei:t.manaWei,createdAt:t.createdAt,txHash:t.txHash}}function Yt(t){return t.status!=="EXPIRED"||!!t.submittedTxHash}function Zt(t){const a=Bt(t.purchases.filter(Yt)).map(d=>({kind:"purchase",id:`purchase:${d.id}`,createdAt:d.createdAt,order:d})),i=t.sales.map(d=>{const x=Xt(d,t.rate);return{kind:"sale",id:`sale:${x.id}`,createdAt:x.createdAt,sale:x}}),r=(t.creditOrders??[]).filter(d=>d.status!=="failed"&&d.status!=="abandoned").map(d=>({kind:"credit",id:`credit:${d.id}`,createdAt:d.createdAt,order:d})),o=new Set(t.purchases.filter(d=>d.txHash).map(d=>d.txHash.toLowerCase())),h=(t.manaPurchases??[]).filter(d=>!o.has(d.txHash.toLowerCase())).map(d=>({kind:"mana-purchase",id:`mana-purchase:${d.id}`,createdAt:d.createdAt,sale:d}));return[...a,...i,...r,...h].sort((d,x)=>x.createdAt-d.createdAt||(d.id<x.id?-1:1))}function Jt(t,n){return n==="all"?t:n==="sales"?t.filter(a=>a.kind==="sale"):t.filter(a=>a.kind==="purchase"||a.kind==="credit"||a.kind==="mana-purchase")}const ct=t=>t.trim().toLowerCase();function te(t){const n=new Map;for(const a of t??[]){const i=ct(a.txHash??"");if(!i)continue;const r=n.get(i);r?r.push(a):n.set(i,[a])}return n}function ee(t,n,a=Date.now()){const i=n.txHash?t.get(ct(n.txHash)):void 0;if(!i||i.length===0)return{kind:"direct"};const r=i.length===1?ie(i[0].netCents):null,o=i.filter(d=>!d.available&&d.availableAt>a);if(o.length===0)return{kind:"credited",credits:r};const h=o.reduce((d,x)=>Math.max(d,x.availableAt),0);return{kind:"pending",credits:r,availableAt:h}}function ie(t){return At(t)}function ne(){const t=O(i=>{var r;return(r=i.session)==null?void 0:r.address}),{data:n,isLoading:a}=A({queryKey:["listing-count",t],queryFn:()=>$t({creator:t,onSale:!0,first:1}),enabled:!!t,staleTime:5*6e4});return{count:n==null?void 0:n.total,isLoading:a}}const se="https://cdn.decentraland.org/@dcl/shop/1.0.1/_assets/credits-product-vs4Q6u6l.svg",_=Lt`
|
|
3
|
+
0% { background-position: 200% 0; }
|
|
4
|
+
100% { background-position: -200% 0; }
|
|
5
|
+
`,ae=l.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
|
+
|
|
12
|
+
ONE width for every view. The migration tool needs 1003px (its row is a thumbnail, a name and a
|
|
13
|
+
144px price field; narrower, the price field drops to its own line on a desktop), and the feed used
|
|
14
|
+
to sit at 760px — so switching chips resized the heading and the whole column under it, which reads
|
|
15
|
+
as the page reloading rather than as a filter changing. */
|
|
16
|
+
max-width: 1003px;
|
|
17
|
+
margin-inline: auto;
|
|
18
|
+
`,re=l.div`
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: baseline;
|
|
21
|
+
gap: 12px;
|
|
22
|
+
margin-bottom: 20px;
|
|
23
|
+
`,oe=l.h1`
|
|
24
|
+
font-family: ${s.font.sans};
|
|
25
|
+
margin: 0;
|
|
26
|
+
color: ${s.colors.softWhite};
|
|
27
|
+
`;l.span`
|
|
28
|
+
color: ${s.colors.gray4};
|
|
29
|
+
font-size: 14px;
|
|
30
|
+
`;const ce=l.div`
|
|
31
|
+
display: flex;
|
|
32
|
+
gap: 8px;
|
|
33
|
+
margin-bottom: 20px;
|
|
34
|
+
flex-wrap: wrap;
|
|
35
|
+
`,dt=l.button`
|
|
36
|
+
appearance: none;
|
|
37
|
+
/* Figma draws the row as a 0.5px Gray 4 hairline, a shade darker and half the weight of the card
|
|
38
|
+
border this used, and sets the label a point smaller with the tracking the shop's other 13px
|
|
39
|
+
pills carry. */
|
|
40
|
+
border: 0.5px solid ${s.colors.accent};
|
|
41
|
+
background: ${s.colors.accent};
|
|
42
|
+
color: ${s.colors.white};
|
|
43
|
+
font-family: ${s.font.sans};
|
|
44
|
+
font-size: 13px;
|
|
45
|
+
font-weight: 600;
|
|
46
|
+
line-height: 24px;
|
|
47
|
+
letter-spacing: 0.46px;
|
|
48
|
+
/* The design gives the pill a flat 40px and no vertical padding, centring the 24px line box inside
|
|
49
|
+
it — so the height is the 40 it draws rather than the sum of a line box, padding and a border. */
|
|
50
|
+
display: inline-flex;
|
|
51
|
+
align-items: center;
|
|
52
|
+
justify-content: center;
|
|
53
|
+
padding: 0 16px;
|
|
54
|
+
min-height: 40px;
|
|
55
|
+
border-radius: ${s.radius.pill};
|
|
56
|
+
cursor: pointer;
|
|
57
|
+
transition:
|
|
58
|
+
background 0.15s,
|
|
59
|
+
border-color 0.15s,
|
|
60
|
+
color 0.15s;
|
|
61
|
+
|
|
62
|
+
&:hover {
|
|
63
|
+
background: ${s.colors.accentHover};
|
|
64
|
+
border-color: ${s.colors.accentHover};
|
|
65
|
+
}
|
|
66
|
+
&:focus-visible {
|
|
67
|
+
outline: 2px solid ${s.colors.white};
|
|
68
|
+
outline-offset: 2px;
|
|
69
|
+
}
|
|
70
|
+
&[data-active='true'] {
|
|
71
|
+
background: ${s.colors.white};
|
|
72
|
+
border-color: ${s.colors.gray4};
|
|
73
|
+
color: ${s.colors.text};
|
|
74
|
+
}
|
|
75
|
+
&[data-active='true']:hover {
|
|
76
|
+
background: ${s.colors.media};
|
|
77
|
+
border-color: ${s.colors.gray4};
|
|
78
|
+
}
|
|
79
|
+
`,de=l(dt)`
|
|
80
|
+
position: relative;
|
|
81
|
+
`,le=l.span`
|
|
82
|
+
position: absolute;
|
|
83
|
+
/* Offsets run from the chip's PADDING box, so they carry the 1px its hairline occupies in layout on
|
|
84
|
+
top of the 5.5 / 2.5 the design measures from the pill's outer edge. */
|
|
85
|
+
top: -6.5px;
|
|
86
|
+
right: -3.5px;
|
|
87
|
+
display: grid;
|
|
88
|
+
place-items: center;
|
|
89
|
+
/* The chip's tracking would otherwise widen the disc off its 20px. */
|
|
90
|
+
letter-spacing: normal;
|
|
91
|
+
/* Figma only ever draws a single digit, as a fixed 20px disc. The padding is what lets a two- or
|
|
92
|
+
three-figure count grow leftwards out of the corner instead of spilling out of the circle. */
|
|
93
|
+
min-width: 20px;
|
|
94
|
+
height: 20px;
|
|
95
|
+
padding: 0 6px;
|
|
96
|
+
border-radius: ${s.radius.pill};
|
|
97
|
+
background: ${s.colors.dclRed};
|
|
98
|
+
/* No ring: the red separates itself from both surfaces the disc straddles (the chip and the page), and
|
|
99
|
+
the design draws the circle bare. */
|
|
100
|
+
font-weight: 600;
|
|
101
|
+
font-size: 12px;
|
|
102
|
+
line-height: 1.6;
|
|
103
|
+
color: ${s.colors.white};
|
|
104
|
+
`,ue=l.div`
|
|
105
|
+
min-height: 60vh;
|
|
106
|
+
`,nt=l.div`
|
|
107
|
+
display: flex;
|
|
108
|
+
flex-direction: column;
|
|
109
|
+
gap: 16px;
|
|
110
|
+
`,T=l.div`
|
|
111
|
+
background: ${s.colors.white};
|
|
112
|
+
border: 1px solid ${s.colors.line};
|
|
113
|
+
border-radius: 16px;
|
|
114
|
+
overflow: hidden;
|
|
115
|
+
`,N=l.div`
|
|
116
|
+
display: flex;
|
|
117
|
+
align-items: center;
|
|
118
|
+
justify-content: space-between;
|
|
119
|
+
gap: 12px;
|
|
120
|
+
padding: 14px 18px;
|
|
121
|
+
background: ${s.colors.softWhite};
|
|
122
|
+
border-bottom: 1px solid ${s.colors.line};
|
|
123
|
+
|
|
124
|
+
${s.media.maxWidth("mobile")} {
|
|
125
|
+
flex-wrap: wrap;
|
|
126
|
+
}
|
|
127
|
+
`,S=l.div`
|
|
128
|
+
display: flex;
|
|
129
|
+
flex-direction: column;
|
|
130
|
+
gap: 2px;
|
|
131
|
+
min-width: 0;
|
|
132
|
+
`,C=l.span`
|
|
133
|
+
font-weight: 700;
|
|
134
|
+
color: ${s.colors.text};
|
|
135
|
+
`,F=l.span`
|
|
136
|
+
font-size: 13px;
|
|
137
|
+
color: ${s.colors.muted};
|
|
138
|
+
`,D=l.div`
|
|
139
|
+
display: flex;
|
|
140
|
+
align-items: center;
|
|
141
|
+
gap: 14px;
|
|
142
|
+
/* Pin to the right regardless of how many elements sit on the left (the credit-purchase card adds a
|
|
143
|
+
leading thumbnail, giving the head three children instead of two). */
|
|
144
|
+
margin-left: auto;
|
|
145
|
+
`,he=l.div`
|
|
146
|
+
flex: 0 0 auto;
|
|
147
|
+
width: 52px;
|
|
148
|
+
height: 52px;
|
|
149
|
+
border-radius: 10px;
|
|
150
|
+
background: ${s.colors.media};
|
|
151
|
+
display: flex;
|
|
152
|
+
align-items: center;
|
|
153
|
+
justify-content: center;
|
|
154
|
+
|
|
155
|
+
img {
|
|
156
|
+
width: 30px;
|
|
157
|
+
height: 30px;
|
|
158
|
+
display: block;
|
|
159
|
+
}
|
|
160
|
+
`,M=l.span`
|
|
161
|
+
font-size: 11px;
|
|
162
|
+
font-weight: 700;
|
|
163
|
+
text-transform: uppercase;
|
|
164
|
+
letter-spacing: 0.03em;
|
|
165
|
+
padding: 4px 10px;
|
|
166
|
+
border-radius: ${s.radius.pill};
|
|
167
|
+
white-space: nowrap;
|
|
168
|
+
|
|
169
|
+
&[data-status='SETTLED'] {
|
|
170
|
+
background: rgba(30, 166, 114, 0.14);
|
|
171
|
+
color: ${s.colors.okStrong};
|
|
172
|
+
}
|
|
173
|
+
&[data-status='PENDING'] {
|
|
174
|
+
background: rgba(245, 166, 35, 0.16);
|
|
175
|
+
color: #b5790a;
|
|
176
|
+
}
|
|
177
|
+
&[data-status='SOLD'] {
|
|
178
|
+
background: rgba(103, 58, 183, 0.14);
|
|
179
|
+
color: ${s.colors.accent};
|
|
180
|
+
}
|
|
181
|
+
&[data-status='FAILED'] {
|
|
182
|
+
background: rgba(214, 61, 61, 0.14);
|
|
183
|
+
color: #b02a2a;
|
|
184
|
+
}
|
|
185
|
+
/* Nobody paid and nobody is owed anything — deliberately the quietest of the four. Reusing PENDING's
|
|
186
|
+
amber here is what made an abandoned checkout look like money on its way. */
|
|
187
|
+
&[data-status='UNFINISHED'] {
|
|
188
|
+
background: ${s.colors.line};
|
|
189
|
+
color: ${s.colors.muted};
|
|
190
|
+
}
|
|
191
|
+
`,pe=l.button`
|
|
192
|
+
font-size: 11px;
|
|
193
|
+
font-weight: 700;
|
|
194
|
+
text-transform: uppercase;
|
|
195
|
+
letter-spacing: 0.03em;
|
|
196
|
+
padding: 4px 10px;
|
|
197
|
+
border-radius: ${s.radius.pill};
|
|
198
|
+
white-space: nowrap;
|
|
199
|
+
border: 1px solid ${s.colors.accent};
|
|
200
|
+
background: transparent;
|
|
201
|
+
color: ${s.colors.accent};
|
|
202
|
+
cursor: pointer;
|
|
203
|
+
transition: background 0.15s ease;
|
|
204
|
+
|
|
205
|
+
&:hover:not(:disabled) {
|
|
206
|
+
background: rgba(103, 58, 183, 0.08);
|
|
207
|
+
}
|
|
208
|
+
&:disabled {
|
|
209
|
+
opacity: 0.6;
|
|
210
|
+
cursor: default;
|
|
211
|
+
}
|
|
212
|
+
`,k=l.div`
|
|
213
|
+
display: flex;
|
|
214
|
+
align-items: center;
|
|
215
|
+
gap: 5px;
|
|
216
|
+
font-weight: 800;
|
|
217
|
+
color: ${s.colors.text};
|
|
218
|
+
white-space: nowrap;
|
|
219
|
+
|
|
220
|
+
.ccy-mark {
|
|
221
|
+
width: 16px;
|
|
222
|
+
height: 16px;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
// Money received (a sale) reads as income in the shop's success green.
|
|
226
|
+
&[data-kind='income'] {
|
|
227
|
+
color: ${s.colors.okStrong};
|
|
228
|
+
}
|
|
229
|
+
`,lt=l.img`
|
|
230
|
+
width: 16px;
|
|
231
|
+
height: 16px;
|
|
232
|
+
vertical-align: -0.15em;
|
|
233
|
+
`,xe=l.span`
|
|
234
|
+
display: inline-flex;
|
|
235
|
+
align-items: center;
|
|
236
|
+
cursor: pointer;
|
|
237
|
+
`,me=l.span`
|
|
238
|
+
position: fixed;
|
|
239
|
+
transform: translateX(-50%);
|
|
240
|
+
padding: 6px 8px;
|
|
241
|
+
border-radius: 6px;
|
|
242
|
+
background: #16141a;
|
|
243
|
+
color: ${s.colors.white};
|
|
244
|
+
font-size: 12px;
|
|
245
|
+
font-weight: 600;
|
|
246
|
+
line-height: 1;
|
|
247
|
+
white-space: nowrap;
|
|
248
|
+
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
|
|
249
|
+
pointer-events: none;
|
|
250
|
+
z-index: 9999;
|
|
251
|
+
`,ge=l.p`
|
|
252
|
+
margin: 0;
|
|
253
|
+
/* 18px sides to sit on the same rail as CardHead and Line; no bottom, since Line brings its own 12px. */
|
|
254
|
+
padding: 12px 18px 0;
|
|
255
|
+
font-size: 13px;
|
|
256
|
+
line-height: 1.45;
|
|
257
|
+
color: ${s.colors.muted};
|
|
258
|
+
`,G=l.div`
|
|
259
|
+
display: flex;
|
|
260
|
+
flex-direction: column;
|
|
261
|
+
`,H=l.div`
|
|
262
|
+
display: grid;
|
|
263
|
+
grid-template-columns: 52px 1fr auto;
|
|
264
|
+
align-items: center;
|
|
265
|
+
gap: 14px;
|
|
266
|
+
padding: 12px 18px;
|
|
267
|
+
text-decoration: none;
|
|
268
|
+
color: inherit;
|
|
269
|
+
|
|
270
|
+
& + & {
|
|
271
|
+
border-top: 1px solid ${s.colors.line};
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
&[data-link='true'] {
|
|
275
|
+
transition: background 0.15s;
|
|
276
|
+
}
|
|
277
|
+
&[data-link='true']:hover {
|
|
278
|
+
background: ${s.colors.media};
|
|
279
|
+
}
|
|
280
|
+
&[data-link='true']:focus-visible {
|
|
281
|
+
outline: 2px solid ${s.colors.accent};
|
|
282
|
+
outline-offset: -2px;
|
|
283
|
+
}
|
|
284
|
+
`,B=l.div`
|
|
285
|
+
width: 52px;
|
|
286
|
+
height: 52px;
|
|
287
|
+
border-radius: 10px;
|
|
288
|
+
background: ${s.colors.media};
|
|
289
|
+
overflow: hidden;
|
|
290
|
+
display: flex;
|
|
291
|
+
align-items: center;
|
|
292
|
+
justify-content: center;
|
|
293
|
+
color: ${s.colors.muted2};
|
|
294
|
+
|
|
295
|
+
img {
|
|
296
|
+
width: 100%;
|
|
297
|
+
height: 100%;
|
|
298
|
+
object-fit: contain;
|
|
299
|
+
}
|
|
300
|
+
`,K=l.div`
|
|
301
|
+
width: 52px;
|
|
302
|
+
height: 52px;
|
|
303
|
+
border-radius: 10px;
|
|
304
|
+
background: linear-gradient(100deg, ${s.colors.media} 30%, ${s.colors.panel} 50%, ${s.colors.media} 70%);
|
|
305
|
+
background-size: 200% 100%;
|
|
306
|
+
animation: ${_} 1.3s infinite linear;
|
|
307
|
+
|
|
308
|
+
@media (prefers-reduced-motion: reduce) {
|
|
309
|
+
animation: none;
|
|
310
|
+
}
|
|
311
|
+
`,U=l.div`
|
|
312
|
+
min-width: 0;
|
|
313
|
+
display: flex;
|
|
314
|
+
flex-direction: column;
|
|
315
|
+
gap: 2px;
|
|
316
|
+
`,Q=l.span`
|
|
317
|
+
font-weight: 700;
|
|
318
|
+
white-space: nowrap;
|
|
319
|
+
overflow: hidden;
|
|
320
|
+
text-overflow: ellipsis;
|
|
321
|
+
`,V=l.span`
|
|
322
|
+
display: inline-block;
|
|
323
|
+
width: 140px;
|
|
324
|
+
max-width: 60%;
|
|
325
|
+
height: 12px;
|
|
326
|
+
border-radius: 6px;
|
|
327
|
+
background: linear-gradient(100deg, ${s.colors.media} 30%, ${s.colors.panel} 50%, ${s.colors.media} 70%);
|
|
328
|
+
background-size: 200% 100%;
|
|
329
|
+
animation: ${_} 1.3s infinite linear;
|
|
330
|
+
|
|
331
|
+
@media (prefers-reduced-motion: reduce) {
|
|
332
|
+
animation: none;
|
|
333
|
+
}
|
|
334
|
+
`,X=l.span`
|
|
335
|
+
font-size: 13px;
|
|
336
|
+
color: ${s.colors.muted};
|
|
337
|
+
`,fe=l.div`
|
|
338
|
+
display: flex;
|
|
339
|
+
align-items: center;
|
|
340
|
+
gap: 4px;
|
|
341
|
+
font-weight: 700;
|
|
342
|
+
color: ${s.colors.text};
|
|
343
|
+
white-space: nowrap;
|
|
344
|
+
|
|
345
|
+
.ccy-mark {
|
|
346
|
+
width: 14px;
|
|
347
|
+
height: 14px;
|
|
348
|
+
}
|
|
349
|
+
`,st=l.div`
|
|
350
|
+
height: 132px;
|
|
351
|
+
border-radius: 16px;
|
|
352
|
+
border: 1px solid transparent;
|
|
353
|
+
background: linear-gradient(100deg, ${s.colors.media} 30%, ${s.colors.panel} 50%, ${s.colors.media} 70%);
|
|
354
|
+
background-size: 200% 100%;
|
|
355
|
+
animation: ${_} 1.3s infinite linear;
|
|
356
|
+
|
|
357
|
+
@media (prefers-reduced-motion: reduce) {
|
|
358
|
+
animation: none;
|
|
359
|
+
}
|
|
360
|
+
`,ut=l.div`
|
|
361
|
+
display: flex;
|
|
362
|
+
flex-direction: column;
|
|
363
|
+
align-items: center;
|
|
364
|
+
gap: 8px;
|
|
365
|
+
text-align: center;
|
|
366
|
+
padding: 90px 20px;
|
|
367
|
+
min-height: 50vh;
|
|
368
|
+
color: ${s.colors.softWhite};
|
|
369
|
+
`,ht=l.p`
|
|
370
|
+
font-size: 22px;
|
|
371
|
+
font-weight: 700;
|
|
372
|
+
margin: 6px 0 0;
|
|
373
|
+
`,pt=l.p`
|
|
374
|
+
margin: 0;
|
|
375
|
+
color: ${s.colors.softWhite};
|
|
376
|
+
`,be=l(Et)`
|
|
377
|
+
margin-top: 12px;
|
|
378
|
+
`,Y=H.withComponent(rt),ye=g.lazy(()=>St(()=>import("./index-B2h0kzTR.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14])).then(t=>({default:t.ImportListings}))),E=24,ve=["all","purchases","sales"],R="section",at="listings",z="view",je="migrate";function I(t){try{return new Date(t).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function xt(t){return t.length>10?`${t.slice(0,6)}…${t.slice(-4)}`:t}function mt(t){const n=Number(t)/1e18;return Number.isFinite(n)?n.toLocaleString("en",{maximumFractionDigits:2}):"0"}function gt({children:t}){const n=g.useRef(null),[a,i]=g.useState(null),r=()=>{var h;const o=(h=n.current)==null?void 0:h.getBoundingClientRect();o&&i({top:o.bottom+8,left:o.left+o.width/2})};return e.jsxs(xe,{ref:n,tabIndex:0,onMouseEnter:r,onMouseLeave:()=>i(null),onFocus:r,onBlur:()=>i(null),children:[t,a?Ot.createPortal(e.jsx(me,{style:{top:a.top,left:a.left},role:"tooltip",children:c("activity.polygonMana")}),document.body):null]})}function ke({item:t}){const n=!!t.contractAddress&&!!t.itemId,a=!!t.tradeId||n,{data:i,isLoading:r}=A({queryKey:["order-line-display",t.tradeId,t.contractAddress,t.itemId],queryFn:()=>t.tradeId?Rt(t.tradeId):W(t.contractAddress,{itemId:t.itemId}),enabled:a,staleTime:5*6e4}),o=a&&r,h=(i==null?void 0:i.name)??c("activity.itemFallback"),d=(i==null?void 0:i.thumbnail)??"",x=q({contractAddress:i==null?void 0:i.contractAddress,tokenId:i==null?void 0:i.tokenId,itemId:i==null?void 0:i.itemId})??void 0,f=e.jsxs(e.Fragment,{children:[o?e.jsx(K,{}):e.jsx(B,{children:d?e.jsx("img",{src:d,alt:h}):e.jsx($,{name:"cart",size:20})}),e.jsxs(U,{children:[o?e.jsx(V,{}):e.jsx(Q,{title:h,children:h}),t.quantity>1?e.jsx(X,{children:c("activity.quantity",{count:t.quantity})}):null]}),e.jsxs(fe,{children:[e.jsx(P,{className:"ccy-mark"})," ",t.credits]})]});return x?e.jsx(Y,{to:x,"data-link":"true",children:f}):e.jsx(H,{children:f})}function we({order:t}){const n=Vt(t.lines),a=n.reduce((o,h)=>o+h.quantity,0),i=Ut(t.status),r=i==="SETTLED"?c("activity.completed"):i==="FAILED"?c("activity.failed"):c("activity.processing");return e.jsxs(T,{"data-testid":"purchase-order",children:[e.jsxs(N,{children:[e.jsxs(S,{children:[e.jsx(C,{children:I(t.createdAt)}),e.jsxs(F,{children:[c("activity.purchaseLabel")," · ",c("activity.itemCount",{count:a})]})]}),e.jsxs(D,{children:[e.jsx(M,{"data-status":i,children:r}),e.jsxs(k,{children:[e.jsx(P,{className:"ccy-mark"})," ",t.totalCredits]})]})]}),i==="FAILED"?e.jsx(ge,{children:c("activity.purchaseFailedNote")}):null,e.jsx(G,{children:n.map(o=>e.jsx(ke,{item:o},o.key))})]})}function Ie({sale:t}){const{data:n,isLoading:a}=A({queryKey:["asset-display",t.contractAddress,t.tokenId,t.itemId],queryFn:()=>W(t.contractAddress,{tokenId:t.tokenId,itemId:t.itemId}),enabled:!!t.contractAddress,staleTime:3e5}),i=(n==null?void 0:n.name)??c("activity.itemFallback"),r=(n==null?void 0:n.thumbnail)??"",o=q({contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId})??void 0,h=e.jsxs(e.Fragment,{children:[a?e.jsx(K,{}):e.jsx(B,{children:r?e.jsx("img",{src:r,alt:i}):e.jsx($,{name:"offer",size:20})}),e.jsxs(U,{children:[a?e.jsx(V,{}):e.jsx(Q,{title:i,children:i}),e.jsx(X,{children:c("activity.boughtFrom",{account:xt(t.seller)})})]})]});return e.jsxs(T,{"data-testid":"activity-mana-purchase",children:[e.jsxs(N,{children:[e.jsxs(S,{children:[e.jsx(C,{children:I(t.createdAt)}),e.jsx(F,{children:c("activity.paidWithMana")})]}),e.jsxs(D,{children:[e.jsx(M,{"data-status":"SETTLED",children:c("activity.completed")}),e.jsxs(k,{children:[mt(t.manaWei)," ",e.jsx(gt,{children:e.jsx(lt,{src:ot,alt:"MANA"})})]})]})]}),e.jsx(G,{children:o?e.jsx(Y,{to:o,"data-link":"true",children:h}):e.jsx(H,{children:h})})]})}function Ae({sale:t,payout:n}){const{data:a,isLoading:i}=A({queryKey:["asset-display",t.contractAddress,t.tokenId,t.itemId],queryFn:()=>W(t.contractAddress,{tokenId:t.tokenId,itemId:t.itemId}),enabled:!!t.contractAddress,staleTime:3e5}),r=(a==null?void 0:a.name)??c("activity.itemFallback"),o=(a==null?void 0:a.thumbnail)??"",h=q({contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId})??void 0,d=e.jsxs(e.Fragment,{children:[i?e.jsx(K,{}):e.jsx(B,{children:o?e.jsx("img",{src:o,alt:r}):e.jsx($,{name:"offer",size:20})}),e.jsxs(U,{children:[i?e.jsx(V,{}):e.jsx(Q,{title:r,children:r}),e.jsxs(X,{children:[c("activity.soldTo",{account:xt(t.counterparty)}),n.kind==="pending"?` · ${c("activity.payoutPendingOn",{date:I(n.availableAt)})}`:""]})]})]});return e.jsxs(T,{"data-testid":"activity-sale",children:[e.jsxs(N,{children:[e.jsxs(S,{children:[e.jsx(C,{children:I(t.createdAt)}),e.jsx(F,{children:c("activity.saleLabel")})]}),e.jsxs(D,{children:[e.jsx(M,{"data-status":n.kind==="pending"?"PENDING":"SOLD",children:n.kind==="pending"?c("activity.payoutPending"):c("activity.sold")}),n.kind==="direct"?e.jsxs(k,{"data-kind":"income",children:["+",mt(t.manaWei)," ",e.jsx(gt,{children:e.jsx(lt,{src:ot,alt:"MANA"})})]}):n.credits!==null?e.jsxs(k,{"data-kind":"income",children:[e.jsx(P,{className:"ccy-mark"})," +",Dt(n.credits)]}):e.jsx(k,{"data-kind":"income",children:c("activity.payoutCredited")})]})]}),e.jsx(G,{children:h?e.jsx(Y,{to:h,"data-link":"true",children:d}):e.jsx(H,{children:d})})]})}function $e({order:t}){const n=`$${(t.usdCents/100).toFixed(2)}`,a=Ct(t.status),i=a==="SETTLED"?c("activity.completed"):a==="FAILED"?c("activity.failed"):a==="UNFINISHED"?c("activity.unfinished"):c("activity.processing"),r=O(p=>p.session),o=Ft(),[h,d]=g.useState(!1),x=t.status==="initiated"&&!!r;async function f(){if(!(!r||h)){d(!0);try{const p=await Mt(t.id,r.identity);if(p){window.location.href=p;return}Ht.info(c("activity.resumeExpired")),o.invalidateQueries({queryKey:["credit-orders"]})}finally{d(!1)}}}return e.jsx(T,{"data-testid":"credit-order",children:e.jsxs(N,{children:[e.jsx(he,{children:e.jsx("img",{src:se,alt:"","aria-hidden":!0})}),e.jsxs(S,{children:[e.jsx(C,{children:I(t.createdAt)}),e.jsxs(F,{children:[c("activity.creditPurchaseLabel")," · ",c("activity.creditPaid",{usd:n})]})]}),e.jsxs(D,{children:[x?e.jsx(pe,{type:"button",onClick:()=>void f(),disabled:h,"data-testid":"resume-order",children:h?c("activity.resuming"):c("activity.resume")}):null,e.jsx(M,{"data-status":a,children:i}),e.jsxs(k,{"data-kind":"income",children:["+",e.jsx(P,{className:"ccy-mark"})," ",t.credits]})]})]})})}function Le({filter:t}){const n={all:{icon:"clock",title:c("activity.emptyAllTitle"),body:c("activity.emptyAllBody")},purchases:{icon:"cart",title:c("activity.emptyPurchasesTitle"),body:c("activity.emptyPurchasesBody")},sales:{icon:"offer",title:c("activity.emptySalesTitle"),body:c("activity.emptySalesBody")}}[t];return e.jsxs(ut,{children:[e.jsx($,{name:n.icon,size:40,color:s.colors.muted2}),e.jsx(ht,{children:n.title}),e.jsx(pt,{children:n.body}),t!=="sales"?e.jsx(be,{as:rt,to:"/items",variant:"purple",children:c("notFound.cta")}):null]})}function qe(){const{session:t}=O(),[n,a]=g.useState("all"),[i,r]=zt(),o=i.get(R)===at||i.get(z)===je;Pt({title:o?c("seo.import.title"):c("nav.activity"),noindex:!0});const{count:h}=qt(),{count:d}=ne(),f=h!==void 0&&d!==void 0&&(h>0||d>0||o),p=!!t&&!o&&n!=="sales",m=!!t&&!o&&n!=="purchases",b=L(["purchases",t==null?void 0:t.address],u=>Nt(t.address,t.identity,{first:E,skip:u}),{enabled:p}),y=L(["sales",t==null?void 0:t.address],u=>et(t.address,{role:"seller",first:E,skip:u}),{enabled:m}),v=L(["credit-orders",t==null?void 0:t.address],u=>it(t.address,t.identity,{first:E,skip:u}),{enabled:p}),j=L(["mana-purchases",t==null?void 0:t.address],u=>et(t.address,{role:"buyer",first:E,skip:u}),{enabled:p}),{data:Z}=A({queryKey:["sale-payouts",t==null?void 0:t.address],queryFn:()=>it(t.address,t.identity,{first:200}).then(u=>u.payouts),enabled:m,staleTime:6e4}),ft=g.useMemo(()=>te(Z),[Z]),{data:bt}=Tt(m);if(!t)return e.jsxs(ut,{children:[e.jsx($,{name:"clock",size:40,color:s.colors.muted2}),e.jsx(ht,{children:c("activity.signInTitle")}),e.jsx(pt,{children:c("activity.signInBody")})]});const J=Jt(Zt({purchases:p?b.items:[],sales:m?y.items:[],creditOrders:p?v.items:[],manaPurchases:p?j.items:[],rate:bt}),n),yt=p&&(b.isLoading||v.isLoading||j.isLoading)||m&&y.isLoading,tt=p&&(b.isFetchingNextPage||v.isFetchingNextPage||j.isFetchingNextPage)||m&&y.isFetchingNextPage,vt=p&&(b.hasNextPage||v.hasNextPage||j.hasNextPage)||m&&y.hasNextPage;function jt(){p&&b.hasNextPage&&b.fetchNextPage(),p&&v.hasNextPage&&v.fetchNextPage(),p&&j.hasNextPage&&j.fetchNextPage(),m&&y.hasNextPage&&y.fetchNextPage()}function kt(u){if(a(u),!o)return;const w=new URLSearchParams(i);w.delete(R),w.delete(z),r(w,{replace:!0})}function wt(){const u=new URLSearchParams(i);u.set(R,at),u.delete(z),r(u,{replace:!0})}return e.jsxs(ae,{children:[e.jsx(re,{children:e.jsx(oe,{children:c("nav.activity")})}),e.jsxs(ce,{role:"tablist","aria-label":c("nav.activity"),children:[ve.map(u=>e.jsx(dt,{type:"button",role:"tab","aria-selected":!o&&n===u,"data-active":!o&&n===u,"data-testid":`activity-filter-${u}`,onClick:()=>kt(u),children:c(`activity.filter.${u}`)},u)),f?e.jsxs(de,{type:"button",role:"tab","aria-selected":o,"data-active":o,"data-testid":"activity-filter-migrate","aria-label":h?c("activity.migrate.chipAria",{count:h}):void 0,onClick:wt,children:[c("activity.migrate.chip"),h?e.jsx(le,{"data-testid":"activity-migrate-count","aria-hidden":!0,children:h}):null]}):null]}),o?e.jsx(g.Suspense,{fallback:e.jsx(ue,{"aria-busy":"true"}),children:e.jsx(ye,{})}):yt?e.jsx(nt,{children:Array.from({length:5}).map((u,w)=>e.jsx(st,{},w))}):J.length===0?e.jsx(Le,{filter:n}):e.jsxs(e.Fragment,{children:[e.jsxs(nt,{children:[J.map(u=>u.kind==="purchase"?e.jsx(we,{order:u.order},u.id):u.kind==="credit"?e.jsx($e,{order:u.order},u.id):u.kind==="mana-purchase"?e.jsx(Ie,{sale:u.sale},u.id):e.jsx(Ae,{sale:u.sale,payout:ee(ft,u.sale)},u.id)),tt?e.jsx(st,{}):null]}),e.jsx(Wt,{hasNextPage:vt,isFetching:tt,onLoadMore:jt})]})]})}export{qe as Activity};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as u,j as m}from"./react-BYHuwl8r.js";import{s as d}from"./index-
|
|
1
|
+
import{r as u,j as m}from"./react-BYHuwl8r.js";import{s as d}from"./index-BpBLqmY7.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";const P="https://cdn.decentraland.org/@dcl/shop/1.0.1/_assets/custom-welcome-background-BxlFQma9.webp",L="https://cdn.decentraland.org/@dcl/shop/1.0.1/_assets/DCL_LogoPattern-BryBPc3d.png",D=`
|
|
2
2
|
attribute vec2 a_position;
|
|
3
3
|
varying vec2 v_uv;
|
|
4
4
|
void main() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as Ae,r as w,j as e,u as Ke}from"./react-BYHuwl8r.js";import{u as Je}from"./useUrlFilters-DH-gxdfV.js";import{u as Qe,S as ke,R as Xe,F as Ye,e as et}from"./categories-
|
|
1
|
+
import{b as Ae,r as w,j as e,u as Ke}from"./react-BYHuwl8r.js";import{u as Je}from"./useUrlFilters-DH-gxdfV.js";import{u as Qe,S as ke,R as Xe,F as Ye,e as et}from"./categories-e7ryjlpc.js";import{c as W,r as tt,bo as nt,bp as st,aC as rt,a as it,s,t,o as Me,be as ot,A as at,L as fe,b as n,y as lt,I as T,z as A,b$ as Y,bd as ct,$ as Q,bt as dt,bs as pt,x as Ne,ap as Pe,n as We,q as ht,an as xt,ar as Se,as as D,aI as ft,bM as mt}from"./index-BpBLqmY7.js";import{g as ut,h as gt,i as bt,j as yt,k as wt,C as jt,l as vt,o as $t,m as Ct,n as kt,M as St,u as Et,E as Tt,v as _t,p as Rt,q as It,r as zt,s as At,t as Mt}from"./Assets.styles-c5XuGAG4.js";import{L as Nt}from"./LoadMore-BLHzgyNQ.js";import{u as Pt}from"./useInfiniteGrid-VPnx9W8Q.js";import{E as Wt}from"./ErrorNotice-BG4CBNkl.js";import{d as Bt}from"./dcl-schemas-CmtP3U6y.js";import{s as Ft,G as Lt,w as Ut,S as Ht}from"./buy-gasless-C6Uiz2ft.js";import{s as Ot,k as Dt}from"./buy-BF3MKHeK.js";import{f as Gt}from"./errors-jURSB57c.js";import{J as qt,C as Vt,B as me}from"./ethers-BDpbhgX6.js";import{n as Zt}from"./Tooltip-CnjWof_H.js";import{G as Kt}from"./grid.styles-DRngdZfp.js";import"./skeleton.styles-DagyoT5y.js";import"./sentry-Dx-KuLV3.js";import"./intl-CBcMB1D2.js";import"./authorizations-CE0HtqU4.js";import"./sendMetaTransaction-CcYdCbY-.js";function G(r){const o=r.source??"item",l=r.tradeId||`${r.contractAddress}-${r.tokenId??r.itemId??""}`;return`${o}:${l}`}const B="100000000000000000000",Be=2,X=15,Jt=/^[a-zA-Z0-9]+$/;function Ee(r){const o=r.trim();return o.length===0?{ok:!1,reason:"empty"}:Jt.test(o)?o.length<Be?{ok:!1,reason:"too-short"}:o.length>X?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function Qt(r){return r.replace(/[^a-zA-Z0-9]/g,"").slice(0,X)}const Xt=["function available(string _subdomain) view returns (bool)"],Te={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function Yt(){return W.chainId===Number(Bt.ChainId.MATIC_MAINNET)?Te.mainnet:Te.sepolia}async function en(r,o={}){var c;const{rpc:l,address:x}=Yt(),h=new qt(l),d=new Vt(x,Xt,h);console.info(`[names] availability check → DCLRegistrar(${x}).available("${r}") on ${l}`);const p=await d.available(r);if((c=o.signal)!=null&&c.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${r}" available=${p}`),p?"available":"taken"}const tn="https://app.across.to/api";class ue extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}function nn(r){return rt(B,r)}async function sn(r,o,l={}){var c;const x=l.chainId??W.chainId,h=l.provider??"across",d=`${W.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(o)}&chainId=${x}&provider=${h}`,p=await it(d,{method:"GET",identity:r,metadata:{}});if(!p.ok){let a;try{a=(c=await p.json())==null?void 0:c.code}catch{}throw a==="ROUTE_COST_TOO_HIGH"?new ue:new Error(`fetchNameCreditRoute ${p.status}`)}return p.json()}function rn(r,o){const l=me.from(r.availableAmount),h=me.from(B).sub(l);return{credits:[{value:r.amount,expiresAt:Number(r.expiresAt),salt:Dt(r.id)}],creditsSignatures:[r.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:h.isNegative()?"0":h.toString(),maxCreditedValue:B}}async function on(r,o={}){const l=tn,x=o.intervalMs??1e4,h=o.maxAttempts??60;let d={status:"pending",destinationTxHash:null,actionsSucceeded:!1};for(let p=0;p<h;p++){try{const c=await fetch(`${l}/deposit/status?originChainId=137&depositTxHash=${r}`);if(c.ok){const a=await c.json(),f=(a.status??"pending").toLowerCase(),g=a.fillTx??a.fillTxnRef??null,u=a.actionsSucceeded!==!1;if(f==="filled")return{status:"filled",destinationTxHash:g,actionsSucceeded:u};if(f==="refunded"||f==="expired")return{status:f,destinationTxHash:null,actionsSucceeded:!1};d={status:"pending",destinationTxHash:g,actionsSucceeded:u}}}catch{}p<h-1&&await new Promise(c=>setTimeout(c,x))}return d}async function an(r){const{name:o,identity:l,signer:x}=r,h=r.chainId??W.chainId,d=r.provider??"across",p=(r.beneficiary??await x.getAddress()).toLowerCase();let c=null,a=!1;console.info("[names] register start",{name:o,buyer:p,chainId:h,provider:d});try{const f=await tt(h),g=nn(f);console.info("[names] step 1/6 sized reservation",{usdCents:g,manaRate:f});const u=await sn(l,o,{chainId:h,provider:d});console.info("[names] step 2/6 route fetched",{target:u.externalCall.target,selector:u.externalCall.selector,provider:u.provider,quoteId:u.quoteId});const v=await nt(l,g);if(c=v.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:v.credit.id,maxCreditedValue:v.maxCreditedValue}),me.from(v.maxCreditedValue).lt(B))throw new Error("Credit under-sized for the name price");const j=rn(v.credit,u);let m;try{m=await Ft({chainId:h,buyer:p,signer:x,args:j})}catch(b){if(!(b instanceof Lt))throw b;m=await Ot(h,j,x)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:m}),await Ut(m),a=!0,console.info("[names] step 5/6 origin tx confirmed",{originTxHash:m}),d==="across"){const b=await on(m,r.acrossPoll);if(console.info("[names] step 6/6 across status",b),b.status==="pending")return{status:"pending",originTxHash:m};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:m,destinationTxHash:b.destinationTxHash}}return{status:"pending",originTxHash:m}}catch(f){if(console.error("[names] register failed — raw error:",f,{name:o,buyer:p,originConfirmed:a}),f instanceof Ht)return{status:"pending",originTxHash:f.txHash};if(c&&!a&&await st(l,[c]).catch(()=>{}),f instanceof ue)throw f;const g=new Error(Gt(f,"Couldn't register the name. Please try again.",{sale:!0}));throw g.cause=f,g}}const ln=s.div`
|
|
2
2
|
position: fixed;
|
|
3
3
|
inset: 0;
|
|
4
4
|
z-index: 10000;
|
|
@@ -186,7 +186,7 @@ import{b as Ae,r as w,j as e,u as Ke}from"./react-BYHuwl8r.js";import{u as Je}fr
|
|
|
186
186
|
font-family: ${t.font.sans};
|
|
187
187
|
font-size: 16px;
|
|
188
188
|
color: ${t.colors.muted2};
|
|
189
|
-
`,
|
|
189
|
+
`,_e=s.button`
|
|
190
190
|
margin-top: 16px;
|
|
191
191
|
width: 100%;
|
|
192
192
|
height: 52px;
|
|
@@ -302,7 +302,7 @@ import{b as Ae,r as w,j as e,u as Ke}from"./react-BYHuwl8r.js";import{u as Je}fr
|
|
|
302
302
|
${t.media.maxWidth("mobile")} {
|
|
303
303
|
flex-direction: column;
|
|
304
304
|
}
|
|
305
|
-
`,
|
|
305
|
+
`,Ie=s.button`
|
|
306
306
|
flex: 1;
|
|
307
307
|
height: 48px;
|
|
308
308
|
border: 1px solid ${t.colors.accent};
|
|
@@ -379,7 +379,7 @@ import{b as Ae,r as w,j as e,u as Ke}from"./react-BYHuwl8r.js";import{u as Je}fr
|
|
|
379
379
|
color: ${t.colors.accent};
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
|
-
`;function En({name:r,priceCredits:o,onClose:l}){const{session:x}=Me(),{data:h,isError:d}=ot(x),p=at(),c=Ae(),[a,f]=w.useState("confirm"),[g,u]=w.useState(""),[v,j]=w.useState(null),m=w.useRef(!1),b=g.trim().toLowerCase()===r.toLowerCase(),$=a==="completing",C=o!=null?fe(o):"—",k=o==null,E=h==null?void 0:h.credits,M=o!=null&&E!=null?o-E:0,S=M>0,N=k?n("names.priceUnavailable"):S?n("names.insufficientCredits",{credits:fe(M)}):null;w.useEffect(()=>{const y=R=>{R.key==="Escape"&&!$&&l()};document.addEventListener("keydown",y);const
|
|
382
|
+
`;function En({name:r,priceCredits:o,onClose:l}){const{session:x}=Me(),{data:h,isError:d}=ot(x),p=at(),c=Ae(),[a,f]=w.useState("confirm"),[g,u]=w.useState(""),[v,j]=w.useState(null),m=w.useRef(!1),b=g.trim().toLowerCase()===r.toLowerCase(),$=a==="completing",C=o!=null?fe(o):"—",k=o==null,E=h==null?void 0:h.credits,M=o!=null&&E!=null?o-E:0,S=M>0,N=k?n("names.priceUnavailable"):S?n("names.insufficientCredits",{credits:fe(M)}):null;w.useEffect(()=>{const y=R=>{R.key==="Escape"&&!$&&l()};document.addEventListener("keydown",y);const _=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",y),document.body.style.overflow=_}},[$,l]);async function F(){if(!(!x||!b||k||S||m.current)){m.current=!0,f("completing"),j(null);try{const y=await an({name:r,identity:x.identity,signer:x.signer});Q("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:o??null,settlement:y.status}),p.invalidateQueries({queryKey:["usd-balance"]}),p.invalidateQueries({queryKey:["my-assets"]}),f(y.status==="registered"?"success":"pending")}catch(y){Q(pt(y)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:dt(y),purchase_type:"name"}),j(y instanceof ue?n("names.errorRouteCost"):(y==null?void 0:y.message)||n("names.errorGeneric")),f("error")}finally{m.current=!1}}}const L=a!=="success"&&a!=="pending",I=lt(x==null?void 0:x.providerType);return e.jsx(ln,{onClick:$?void 0:l,role:"presentation",children:e.jsxs(cn,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:y=>y.stopPropagation(),children:[L&&e.jsxs(e.Fragment,{children:[e.jsxs(ee,{children:[e.jsx(te,{children:a==="error"?n("names.errorTitle"):n("names.buyTitle")}),e.jsx(ne,{onClick:l,disabled:$,"aria-label":n("buyModal.close"),children:e.jsx(T,{name:"close"})})]}),e.jsxs(se,{children:[n("names.myCreditsBalance")," ",e.jsx(A,{})," ",Y(h,d)]}),e.jsx(re,{})]}),(a==="confirm"||a==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(ie,{children:[e.jsx(oe,{"aria-hidden":!0,children:"@"}),e.jsxs(ae,{children:[e.jsxs(le,{children:[r,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ce,{children:n("names.subtitle")})]}),e.jsxs(de,{children:[e.jsx(A,{}),C]})]}),a==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(pe,{children:[e.jsx(T,{name:"info","aria-hidden":!0}),e.jsx("span",{children:v})]}),e.jsx(_e,{onClick:()=>f("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>@${Tn(r)}</b>`})}}),e.jsxs(xn,{children:[e.jsx(fn,{"aria-hidden":!0,children:"@"}),e.jsx(mn,{value:g,onChange:y=>u(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"})]})]}),N?e.jsxs(pe,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(T,{name:"info","aria-hidden":!0}),e.jsx("span",{children:N})]}):null,e.jsx(_e,{onClick:()=>void F(),disabled:!b||!x||k||S,children:n("names.buyCta")})]})]}),a==="completing"&&e.jsxs(gn,{children:[e.jsx(bn,{src:ct,alt:"",width:56,height:56}),e.jsx(yn,{children:I?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"})]})]}),a==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(ee,{children:[e.jsx(te,{children:n("names.pendingHeaderTitle")}),e.jsx(ne,{onClick:l,"aria-label":n("buyModal.close"),children:e.jsx(T,{name:"close"})})]}),e.jsxs(se,{children:[n("names.myCreditsBalance")," ",e.jsx(A,{})," ",Y(h,d)]}),e.jsx(re,{}),e.jsxs(pe,{"data-tone":"info",children:[e.jsx(T,{name:"info","aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("b",{children:n("names.pendingBannerBold")})," ",n("names.pendingBannerRest")]})]}),e.jsxs(ie,{style:{marginTop:20},children:[e.jsx(oe,{"aria-hidden":!0,children:"@"}),e.jsxs(ae,{children:[e.jsxs(le,{children:[r,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ce,{children:n("names.subtitle")})]}),e.jsxs(de,{children:[e.jsx(A,{}),C]})]}),e.jsx(Re,{children:e.jsx(Ie,{onClick:()=>{l(),c("/my-items")},children:n("names.myItems")})})]}),a==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(ee,{children:[e.jsx(te,{children:n("names.successHeaderTitle")}),e.jsx(ne,{onClick:l,"aria-label":n("buyModal.close"),children:e.jsx(T,{name:"close"})})]}),e.jsxs(se,{children:[n("names.myCreditsBalance")," ",e.jsx(A,{})," ",Y(h,d)]}),e.jsx(re,{}),e.jsxs($n,{children:[e.jsx(Cn,{"aria-hidden":!0,children:e.jsx(T,{name:"check"})}),e.jsxs(kn,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(ie,{style:{marginTop:20},children:[e.jsx(oe,{"aria-hidden":!0,children:"@"}),e.jsxs(ae,{children:[e.jsxs(le,{children:[r,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ce,{children:n("names.subtitle")})]}),e.jsxs(de,{children:[e.jsx(A,{}),C]})]}),e.jsxs(Re,{children:[e.jsx(Ie,{onClick:()=>{l(),c("/my-items")},children:n("names.myItems")}),e.jsx(Sn,{href:W.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function Tn(r){return r.replace(/[&<>"']/g,o=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[o])}const _n="https://cdn.decentraland.org/@dcl/shop/1.0.1/_assets/identity-B4DXDuJP.webp",Rn="https://cdn.decentraland.org/@dcl/shop/1.0.1/_assets/world-B-9aPlxu.webp",In="https://cdn.decentraland.org/@dcl/shop/1.0.1/_assets/invite-BfwIhP2C.webp",zn="https://cdn.decentraland.org/@dcl/shop/1.0.1/_assets/governance-DnazlIjy.webp",An=s.div`
|
|
383
383
|
width: 100%;
|
|
384
384
|
min-width: 0;
|
|
385
385
|
`,Mn=s.nav`
|
|
@@ -767,7 +767,7 @@ import{b as Ae,r as w,j as e,u as Ke}from"./react-BYHuwl8r.js";import{u as Je}fr
|
|
|
767
767
|
`,os=s.span`
|
|
768
768
|
font-weight: 600;
|
|
769
769
|
color: ${t.colors.accent};
|
|
770
|
-
`,
|
|
770
|
+
`,ze=s.a`
|
|
771
771
|
display: inline-flex;
|
|
772
772
|
align-items: center;
|
|
773
773
|
gap: 2px;
|
|
@@ -798,4 +798,4 @@ import{b as Ae,r as w,j as e,u as Ke}from"./react-BYHuwl8r.js";import{u as Je}fr
|
|
|
798
798
|
clip: rect(0, 0, 0, 0);
|
|
799
799
|
white-space: nowrap;
|
|
800
800
|
border: 0;
|
|
801
|
-
`,ls="https://docs.decentraland.org/creator/worlds/about/",cs="https://governance.decentraland.org";function ds(r){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(r)}`}function ps({onBack:r}){Ne({title:n("seo.names.title"),description:n("seo.names.description")});const{session:o,signIn:l}=Me(),{data:x}=Pe(),h=x?We(B,x):null,[d,p]=w.useState(""),[c,a]=w.useState("idle"),[f,g]=w.useState(!1),u=w.useRef(null),[v,j]=w.useState(void 0);w.useLayoutEffect(()=>{u.current&&j(u.current.offsetWidth)},[d]),w.useEffect(()=>{if(!Ee(d).ok){a(d.length===0?"idle":"invalid");return}a("checking");const E=new AbortController,M=setTimeout(()=>{(async()=>{try{const S=await en(d,{signal:E.signal});a(S)}catch(S){if((S==null?void 0:S.name)==="AbortError")return;a("error")}})()},400);return()=>{clearTimeout(M),E.abort()}},[d]);const m=Ee(d),b=m.ok&&(c==="available"||c==="error");function $(){if(b){if(!o){l();return}g(!0)}}const C=e.jsxs(e.Fragment,{children:[n("names.claim"),h!=null?e.jsxs(es,{children:[e.jsx(A,{}),fe(h)]}):null]});return e.jsxs(An,{"data-testid":"names-page",children:[e.jsxs(Mn,{"aria-label":n("names.breadcrumbAria"),children:[e.jsx(Nn,{onClick:r,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(Dn,{invalid:c==="taken",children:[e.jsxs(Zn,{children:[e.jsx(Kn,{"aria-hidden":!0,children:"@"}),e.jsx(Jn,{value:d,onChange:k=>p(Qt(k.target.value)),placeholder:n("names.inputPlaceholder"),"aria-label":n("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:X,style:{width:v!=null?`${v}px`:void 0}}),e.jsx(Gn,{ref:u,"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,"/",X]}):null,e.jsx(Fe,{onClick:$,disabled:!b,"data-testid":"names-claim",children:C})]}),c==="taken"?e.jsxs(qn,{role:"status","data-testid":"names-taken",children:[e.jsx(_,{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(_,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null]}),e.jsx(Yn,{onClick:$,disabled:!b,children:C}),c==="checking"?e.jsx(he,{tone:"muted",role:"status","data-testid":"names-checking",children:n("names.checking")}):c==="error"?e.jsx(he,{tone:"muted",role:"status",children:n("names.checkError")}):c==="invalid"&&!m.ok&&m.reason==="too-short"?e.jsx(he,{tone:"muted",role:"status",children:n("names.tooShort",{min:Be})}):null,e.jsx(as,{role:"status","aria-live":"polite",children:c==="available"?n("names.available",{name:d}):""})]})]}),e.jsxs(ts,{children:[e.jsxs(ns,{children:[e.jsx(ss,{children:n("names.whyTitle")}),e.jsx(rs,{children:n("names.whyIntro")})]}),e.jsxs(is,{children:[e.jsxs(q,{children:[e.jsx(V,{src:Tn,alt:""}),e.jsxs(Z,{children:[e.jsx(K,{children:n("names.why1Title")}),e.jsx(J,{children:n("names.why1")})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:Rn,alt:""}),e.jsxs(Z,{children:[e.jsx(K,{children:n("names.why2Title")}),e.jsxs(J,{children:[n("names.why2")," ",e.jsx(os,{children:n("names.why2Address")})]}),e.jsxs(Ie,{href:ls,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(_,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:zn,alt:""}),e.jsxs(Z,{children:[e.jsx(K,{children:n("names.why3Title")}),e.jsx(J,{children:n("names.why3")})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:In,alt:""}),e.jsxs(Z,{children:[e.jsx(K,{children:n("names.why4Title")}),e.jsx(J,{children:n("names.why4")}),e.jsxs(Ie,{href:cs,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(_,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),f?e.jsx(En,{name:d,priceCredits:h,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",xe=48,xs=["all","on_sale","not_for_sale"];function Ms(){const[r]=Ke(),o=Ae(),l=(r.get("q")??"").trim().toLowerCase(),x=(r.get("q")??"").trim();Ne({title:x?n("seo.collectibles.searchTitle",{query:x}):n("seo.collectibles.title"),description:n("seo.collectibles.description")});const h=w.useMemo(()=>({category:"all",status:"on_sale",subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[]),[d,p]=Je(h),{subCategory:c,rarities:a,priceMin:f,priceMax:g,smart:u,sort:v}=d,j=d.category,m=xs.includes(d.status)?d.status:"on_sale";Qe(`${j}:${c??""}`);const[b,$]=w.useState(!1);w.useEffect(()=>{if(!b)return;const i=O=>{O.key==="Escape"&&$(!1)};document.addEventListener("keydown",i);const I=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",i),document.body.style.overflow=I}},[b]);const C=m==="on_sale",k=f&&!Number.isNaN(Number(f))?Number(f):void 0,E=g&&!Number.isNaN(Number(g))?Number(g):void 0,M=ht(),S=c?et[c]:void 0,N=(ke.find(i=>i.key===v)??ke[0]).server,F={category:j,rarities:a.length?a:void 0,wearableCategories:S,minPriceCredits:k,maxPriceCredits:E,search:l||void 0,sortBy:N,isSmart:u||void 0,onSale:!0,listingType:M?void 0:"primary"},L={category:j,rarities:a.length?a:void 0,wearableCategories:S,search:l||void 0,sortBy:N,isWearableSmart:u||void 0,isOnSale:m==="not_for_sale"?!1:void 0},{items:z,total:y,isLoading:T,isPlaceholderData:R,error:ge,hasNextPage:Le,isFetchingNextPage:be,isFetchNextPageError:Ue,fetchNextPage:He}=Pt(C?["shop-items",F]:["catalog-items",L],i=>C?ft({...F,first:xe,skip:i}):mt({...L,first:xe,skip:i}),{enabled:j!=="names"}),U=y,{data:ye,isError:Oe,isPending:De}=Pe(),Ge=i=>ye&&i.manaWei?We(i.manaWei,ye):null,qe=C&&De&&z.some(i=>i.source==="legacy"),we=T||R||qe,Ve=T?15:Math.min(Math.max(z.length,1),xe),je=w.useRef(null);w.useEffect(()=>{T||R||!l||je.current===l||(je.current=l,Q("Shop Searched",{query:l,result_count:U}))},[l,T,R,U]);const H=w.useRef("__init__");w.useEffect(()=>{if(T||R)return;const i=JSON.stringify({category:j,subCategory:c,rarities:a,min:k,max:E,sort:v,status:m,smart:u});if(H.current==="__init__"||H.current===i){H.current=i;return}H.current=i,Q("Shop Applied Filter",{filters:{category:j,sub_category:c,rarities:a,min_price_credits:k??null,max_price_credits:E??null,status:m,smart:u,sort:v},result_count:U})},[j,c,a,k,E,v,m,u,T,R,U]);function ve(i){p({category:i,subCategory:null})}function $e(i){p({status:i})}function Ce(i){p({rarities:a.includes(i)?a.filter(I=>I!==i):[...a,i]})}function Ze(){p(h)}const P=[];(k!=null||E!=null)&&P.push({key:"price",label:n("filter.price"),onRemove:()=>{p({priceMin:"",priceMax:""})}});for(const i of Xe)a.includes(i)&&P.push({key:`rarity-${i}`,label:xt(i),onRemove:()=>Ce(i)});return u&&P.push({key:"smart",label:n("filter.smart"),onRemove:()=>p({smart:!1})}),m!=="on_sale"&&P.push({key:"status",label:m==="all"?n("filter.statusAll"):n("filter.notForSale"),onRemove:()=>$e("on_sale")}),e.jsxs(ut,{"data-testid":"browse",children:[j!=="names"&&e.jsxs(e.Fragment,{children:[b?e.jsx(gt,{onClick:()=>$(!1),"aria-hidden":!0}):null,e.jsxs(bt,{"data-open":b||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(yt,{children:[e.jsx(wt,{children:n("assets.filters")}),e.jsx(jt,{onClick:()=>$(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(vt,{children:e.jsx($t,{category:j,subCategory:c,onCategory:ve,onSub:i=>p({subCategory:i}),priceMin:f,priceMax:g,onPriceMin:i=>p({priceMin:i}),onPriceMax:i=>p({priceMax:i}),rarities:a,onToggleRarity:Ce,status:m,onStatus:$e,smart:u,onSmart:i=>p({smart:i})})}),e.jsx(Ct,{children:e.jsx(kt,{type:"button",onClick:()=>$(!1),children:n("assets.showItems")})})]})]}),e.jsx(St,{children:j==="names"?e.jsx(ps,{onBack:()=>ve("all")}):e.jsxs(e.Fragment,{children:[e.jsx(Ye,{sort:v,onSort:i=>p({sort:i}),total:y,loading:T||R,query:l,onOpenFilters:()=>$(!0),chips:P,onClearChips:Ze}),Oe&&C&&z.some(i=>i.source==="legacy")?e.jsx(Et,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,ge?e.jsx(Wt,{message:n("assets.loadError"),testId:"browse-error"}):null,!we&&z.length===0&&!ge?e.jsxs(_t,{"data-testid":"browse-empty",children:[e.jsx(Tt,{src:hs,alt:""}),e.jsxs(Rt,{children:[e.jsx(zt,{children:n("assets.empty.title")}),e.jsx(It,{children:x?e.jsxs(e.Fragment,{children:[n("assets.empty.searchBefore"),e.jsx("b",{children:x}),n("assets.empty.searchAfter")]}):n("assets.empty.filters")})]}),e.jsx(At,{children:e.jsx(Mt,{type:"button",onClick:()=>o("/overview"),children:n("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx(Kt,{"data-testid":"grid",children:we?e.jsx(Se,{count:Ve}):e.jsxs(e.Fragment,{children:[z.map(i=>{if(!C)return e.jsx(D,{item:i,mode:"view"},G(i));const I=i;if(I.source!=="legacy")return e.jsx(D,{item:i},G(i));const O=Ge(I);return O==null?e.jsx(D,{item:i,mode:"view"},G(i)):e.jsx(D,{item:{...I,priceCredits:O}},G(i))}),be?e.jsx(Se,{count:6}):null]})}),e.jsx(Nt,{hasNextPage:Le,isFetching:be,isError:Ue,onLoadMore:()=>void He()})]})]})})]})}export{Ms as Assets};
|
|
801
|
+
`,ls="https://docs.decentraland.org/creator/worlds/about/",cs="https://governance.decentraland.org";function ds(r){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(r)}`}function ps({onBack:r}){Ne({title:n("seo.names.title"),description:n("seo.names.description")});const{session:o,signIn:l}=Me(),{data:x}=Pe(),h=x?We(B,x):null,[d,p]=w.useState(""),[c,a]=w.useState("idle"),[f,g]=w.useState(!1),u=w.useRef(null),[v,j]=w.useState(void 0);w.useLayoutEffect(()=>{u.current&&j(u.current.offsetWidth)},[d]),w.useEffect(()=>{if(!Ee(d).ok){a(d.length===0?"idle":"invalid");return}a("checking");const E=new AbortController,M=setTimeout(()=>{(async()=>{try{const S=await en(d,{signal:E.signal});a(S)}catch(S){if((S==null?void 0:S.name)==="AbortError")return;a("error")}})()},400);return()=>{clearTimeout(M),E.abort()}},[d]);const m=Ee(d),b=m.ok&&(c==="available"||c==="error");function $(){if(b){if(!o){l();return}g(!0)}}const C=e.jsxs(e.Fragment,{children:[n("names.claim"),h!=null?e.jsxs(es,{children:[e.jsx(A,{}),fe(h)]}):null]});return e.jsxs(An,{"data-testid":"names-page",children:[e.jsxs(Mn,{"aria-label":n("names.breadcrumbAria"),children:[e.jsx(Nn,{onClick:r,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(Dn,{invalid:c==="taken",children:[e.jsxs(Zn,{children:[e.jsx(Kn,{"aria-hidden":!0,children:"@"}),e.jsx(Jn,{value:d,onChange:k=>p(Qt(k.target.value)),placeholder:n("names.inputPlaceholder"),"aria-label":n("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:X,style:{width:v!=null?`${v}px`:void 0}}),e.jsx(Gn,{ref:u,"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,"/",X]}):null,e.jsx(Fe,{onClick:$,disabled:!b,"data-testid":"names-claim",children:C})]}),c==="taken"?e.jsxs(qn,{role:"status","data-testid":"names-taken",children:[e.jsx(T,{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(T,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null]}),e.jsx(Yn,{onClick:$,disabled:!b,children:C}),c==="checking"?e.jsx(he,{tone:"muted",role:"status","data-testid":"names-checking",children:n("names.checking")}):c==="error"?e.jsx(he,{tone:"muted",role:"status",children:n("names.checkError")}):c==="invalid"&&!m.ok&&m.reason==="too-short"?e.jsx(he,{tone:"muted",role:"status",children:n("names.tooShort",{min:Be})}):null,e.jsx(as,{role:"status","aria-live":"polite",children:c==="available"?n("names.available",{name:d}):""})]})]}),e.jsxs(ts,{children:[e.jsxs(ns,{children:[e.jsx(ss,{children:n("names.whyTitle")}),e.jsx(rs,{children:n("names.whyIntro")})]}),e.jsxs(is,{children:[e.jsxs(q,{children:[e.jsx(V,{src:_n,alt:""}),e.jsxs(Z,{children:[e.jsx(K,{children:n("names.why1Title")}),e.jsx(J,{children:n("names.why1")})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:Rn,alt:""}),e.jsxs(Z,{children:[e.jsx(K,{children:n("names.why2Title")}),e.jsxs(J,{children:[n("names.why2")," ",e.jsx(os,{children:n("names.why2Address")})]}),e.jsxs(ze,{href:ls,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(T,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:In,alt:""}),e.jsxs(Z,{children:[e.jsx(K,{children:n("names.why3Title")}),e.jsx(J,{children:n("names.why3")})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:zn,alt:""}),e.jsxs(Z,{children:[e.jsx(K,{children:n("names.why4Title")}),e.jsx(J,{children:n("names.why4")}),e.jsxs(ze,{href:cs,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(T,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),f?e.jsx(En,{name:d,priceCredits:h,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",xe=48,xs=["all","on_sale","not_for_sale"];function Ms(){const[r]=Ke(),o=Ae(),l=(r.get("q")??"").trim().toLowerCase(),x=(r.get("q")??"").trim();Ne({title:x?n("seo.collectibles.searchTitle",{query:x}):n("seo.collectibles.title"),description:n("seo.collectibles.description")});const h=w.useMemo(()=>({category:"all",status:"on_sale",subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[]),[d,p]=Je(h),{subCategory:c,rarities:a,priceMin:f,priceMax:g,smart:u,sort:v}=d,j=d.category,m=xs.includes(d.status)?d.status:"on_sale";Qe(`${j}:${c??""}`);const[b,$]=w.useState(!1);w.useEffect(()=>{if(!b)return;const i=O=>{O.key==="Escape"&&$(!1)};document.addEventListener("keydown",i);const z=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",i),document.body.style.overflow=z}},[b]);const C=m==="on_sale",k=f&&!Number.isNaN(Number(f))?Number(f):void 0,E=g&&!Number.isNaN(Number(g))?Number(g):void 0,M=ht(),S=c?et[c]:void 0,N=(ke.find(i=>i.key===v)??ke[0]).server,F={category:j,rarities:a.length?a:void 0,wearableCategories:S,minPriceCredits:k,maxPriceCredits:E,search:l||void 0,sortBy:N,isSmart:u||void 0,onSale:!0,listingType:M?void 0:"primary"},L={category:j,rarities:a.length?a:void 0,wearableCategories:S,search:l||void 0,sortBy:N,isWearableSmart:u||void 0,isOnSale:m==="not_for_sale"?!1:void 0},{items:I,total:y,isLoading:_,isPlaceholderData:R,error:ge,hasNextPage:Le,isFetchingNextPage:be,isFetchNextPageError:Ue,fetchNextPage:He}=Pt(C?["shop-items",F]:["catalog-items",L],i=>C?ft({...F,first:xe,skip:i}):mt({...L,first:xe,skip:i}),{enabled:j!=="names"}),U=y,{data:ye,isError:Oe,isPending:De}=Pe(),Ge=i=>ye&&i.manaWei?We(i.manaWei,ye):null,qe=C&&De&&I.some(i=>i.source==="legacy"),we=_||R||qe,Ve=_?15:Math.min(Math.max(I.length,1),xe),je=w.useRef(null);w.useEffect(()=>{_||R||!l||je.current===l||(je.current=l,Q("Shop Searched",{query:l,result_count:U}))},[l,_,R,U]);const H=w.useRef("__init__");w.useEffect(()=>{if(_||R)return;const i=JSON.stringify({category:j,subCategory:c,rarities:a,min:k,max:E,sort:v,status:m,smart:u});if(H.current==="__init__"||H.current===i){H.current=i;return}H.current=i,Q("Shop Applied Filter",{filters:{category:j,sub_category:c,rarities:a,min_price_credits:k??null,max_price_credits:E??null,status:m,smart:u,sort:v},result_count:U})},[j,c,a,k,E,v,m,u,_,R,U]);function ve(i){p({category:i,subCategory:null})}function $e(i){p({status:i})}function Ce(i){p({rarities:a.includes(i)?a.filter(z=>z!==i):[...a,i]})}function Ze(){p(h)}const P=[];(k!=null||E!=null)&&P.push({key:"price",label:n("filter.price"),onRemove:()=>{p({priceMin:"",priceMax:""})}});for(const i of Xe)a.includes(i)&&P.push({key:`rarity-${i}`,label:xt(i),onRemove:()=>Ce(i)});return u&&P.push({key:"smart",label:n("filter.smart"),onRemove:()=>p({smart:!1})}),m!=="on_sale"&&P.push({key:"status",label:m==="all"?n("filter.statusAll"):n("filter.notForSale"),onRemove:()=>$e("on_sale")}),e.jsxs(ut,{"data-testid":"browse",children:[j!=="names"&&e.jsxs(e.Fragment,{children:[b?e.jsx(gt,{onClick:()=>$(!1),"aria-hidden":!0}):null,e.jsxs(bt,{"data-open":b||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(yt,{children:[e.jsx(wt,{children:n("assets.filters")}),e.jsx(jt,{onClick:()=>$(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(vt,{children:e.jsx($t,{category:j,subCategory:c,onCategory:ve,onSub:i=>p({subCategory:i}),priceMin:f,priceMax:g,onPriceMin:i=>p({priceMin:i}),onPriceMax:i=>p({priceMax:i}),rarities:a,onToggleRarity:Ce,status:m,onStatus:$e,smart:u,onSmart:i=>p({smart:i})})}),e.jsx(Ct,{children:e.jsx(kt,{type:"button",onClick:()=>$(!1),children:n("assets.showItems")})})]})]}),e.jsx(St,{children:j==="names"?e.jsx(ps,{onBack:()=>ve("all")}):e.jsxs(e.Fragment,{children:[e.jsx(Ye,{sort:v,onSort:i=>p({sort:i}),total:y,loading:_||R,query:l,onOpenFilters:()=>$(!0),chips:P,onClearChips:Ze}),Oe&&C&&I.some(i=>i.source==="legacy")?e.jsx(Et,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,ge?e.jsx(Wt,{message:n("assets.loadError"),testId:"browse-error"}):null,!we&&I.length===0&&!ge?e.jsxs(Tt,{"data-testid":"browse-empty",children:[e.jsx(_t,{src:hs,alt:""}),e.jsxs(Rt,{children:[e.jsx(It,{children:n("assets.empty.title")}),e.jsx(zt,{children:x?e.jsxs(e.Fragment,{children:[n("assets.empty.searchBefore"),e.jsx("b",{children:x}),n("assets.empty.searchAfter")]}):n("assets.empty.filters")})]}),e.jsx(At,{children:e.jsx(Mt,{type:"button",onClick:()=>o("/overview"),children:n("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx(Kt,{"data-testid":"grid",children:we?e.jsx(Se,{count:Ve}):e.jsxs(e.Fragment,{children:[I.map(i=>{if(!C)return e.jsx(D,{item:i,mode:"view"},G(i));const z=i;if(z.source!=="legacy")return e.jsx(D,{item:i},G(i));const O=Ge(z);return O==null?e.jsx(D,{item:i,mode:"view"},G(i)):e.jsx(D,{item:{...z,priceCredits:O}},G(i))}),be?e.jsx(Se,{count:6}):null]})}),e.jsx(Nt,{hasNextPage:Le,isFetching:be,isError:Ue,onLoadMore:()=>void He()})]})]})})]})}export{Ms as Assets};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as w,j as i}from"./react-BYHuwl8r.js";import{C as _,R as T,a as le,b as de}from"./categories-
|
|
1
|
+
import{r as w,j as i}from"./react-BYHuwl8r.js";import{C as _,R as T,a as le,b as de}from"./categories-e7ryjlpc.js";import{n as d,T as ce}from"./Tooltip-CnjWof_H.js";import{s as t,t as e,I as k,b as a,an as E,C as F}from"./index-BpBLqmY7.js";const pe=t.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 12px;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as i,L as q,r as _}from"./react-BYHuwl8r.js";import{t as o,s as n,B as F,w as D,x as G,b as e,o as P,y as O,I as z,z as B,v as w,A as K,c as H,D as Q,E as A,F as X,G as Z,H as E}from"./index-
|
|
1
|
+
import{j as i,L as q,r as _}from"./react-BYHuwl8r.js";import{t as o,s as n,B as F,w as D,x as G,b as e,o as P,y as O,I as z,z as B,v as w,A as K,c as H,D as Q,E as A,F as X,G as Z,H as E}from"./index-BpBLqmY7.js";import{c as J,d as U,b as V,e as Y,s as tt,a as it}from"./authorizations-CE0HtqU4.js";import{f as et}from"./builder-DeMyTCI7.js";import{m as ot}from"./mana-matic-C4e1sNO3.js";import{f as at}from"./errors-jURSB57c.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-CcYdCbY-.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 t,L as ke,r as M,b as ea,a as ta}from"./react-BYHuwl8r.js";import{t as de,s as i,b as a,L as ce,
|
|
1
|
+
import{j as t,L as ke,r as M,b as ea,a as ta}from"./react-BYHuwl8r.js";import{t as de,s as i,b as a,L as ce,bd as aa,J as sa,I as O,z as St,K as Le,x as na,Y as H,ao as ct,o as ia,q as ra,v as oa,be as ca,A as da,bf as la,ap as ua,bg as ha,bh as dt,bi as pa,bj as ga,y as ma,bk as lt,$ as V,bl as ut,bm as xa,F as ae,r as fa,c as ht,bn as ya,C as ba,bo as pt,bp as Re,bq as va,br as xe,bs as fe,bt as gt,g as ye,f as wa,h as qe,bu as Ca}from"./index-BpBLqmY7.js";import{M as ja,S as ka,C as $a,H as Sa,a as Ta,T as Ma,X as Ia,b as Pa,B as za,c as Aa,d as mt,e as Ea,f as Ce,P as Tt,m as Ra,g as qa,h as Ba,i as _a,j as Mt,k as je,L as Fa,l as Wa,n as xt,o as ft,W as La,p as Ka,q as Na,A as Ua,r as Qa,s as Ha,t as Oa,u as Ga,v as Va,w as Da,x as Ya,y as Ja,z as Xa,D as Za,E as es,F as ts,G as as,I as ss,J as ns,K as is,N as Be,O as rs,Q as os,R as cs,U as ds,V as yt,Y as bt,Z as ls,_ as us,$ as hs}from"./CollectionCarousel-DhrBSU2o.js";import{k as ps,l as gs,a as ms,n as xs,f as fs,A as ys}from"./authorizations-CE0HtqU4.js";import{g as bs,j as _e}from"./buy-BF3MKHeK.js";import{b as vs,w as ws,S as vt,G as Cs}from"./buy-gasless-C6Uiz2ft.js";import{u as js,M as ks,R as be,r as $s,c as Ss,p as wt}from"./useCreditPacks-Dsfos9wm.js";import{i as Ts,a as Ms}from"./errors-jURSB57c.js";import{E as Is}from"./ErrorNotice-BG4CBNkl.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-CcYdCbY-.js";const{colors:se,radius:Ps}=de,zs=i.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
justify-content: center;
|
|
@@ -58,7 +58,7 @@ import{j as t,L as ke,r as M,b as ea,a as ta}from"./react-BYHuwl8r.js";import{t
|
|
|
58
58
|
font-weight: 700;
|
|
59
59
|
color: ${se.text};
|
|
60
60
|
}
|
|
61
|
-
`,Bs="https://cdn.decentraland.org/@dcl/shop/1.0.
|
|
61
|
+
`,Bs="https://cdn.decentraland.org/@dcl/shop/1.0.1/_assets/buy-error-22UunaPC.png";function _s(o){const{phase:l,balanceCredits:P,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 t.jsxs(ja,{role:"dialog","aria-modal":"true","aria-label":a("cartCheckout.dialogAria"),children:[t.jsx(ka,{onClick:W?void 0:z,"aria-hidden":!0}),t.jsxs($a,{"data-tall":Y||void 0,children:[t.jsxs(Sa,{children:[t.jsxs(Ta,{children:[t.jsx(Ma,{children:D}),!W&&t.jsx(Ia,{onClick:z,"aria-label":a("buyModal.close"),children:t.jsx(Pa,{})})]}),t.jsxs(za,{children:[t.jsx(Aa,{children:l==="nofunds"?a("buyModal.dclBalance"):a("buyModal.myCreditsBalance")}),t.jsx(mt,{}),t.jsx(Ea,{children:ce(P)})]})]}),l==="choose"&&t.jsxs(Ce,{children:[t.jsxs(qs,{children:[t.jsx("span",{children:a("cart.purchaseSummary")}),t.jsxs("strong",{children:[t.jsx(mt,{}),ce(o.totalCredits??0)]})]}),t.jsx(Tt,{options:o.options??[],totalCents:o.totalCents??0,onPay:o.onPay??(()=>{}),rateNote:(()=>{const A=Ra(o.totalCents??0,o.totalManaWei??0n);return A!=null?a("buyModal.manaRate",{mana:A.toLocaleString("en",{maximumFractionDigits:2})}):null})()})]}),l==="processing"&&t.jsx(Fs,{stage:o.stage??"reserving",step:o.step??1,total:o.total??1,isSelfCustody:!!o.isSelfCustody,signatures:o.signatures}),l==="nofunds"&&t.jsx(Ws,{lines:o.lines??[],shortfallCredits:o.shortfallCredits??0,packs:o.packs??[],selectedPack:o.selectedPack??"",onSelectPack:o.onSelectPack??(()=>{}),onBuyPacks:o.onBuyPacks??(()=>{}),onCancel:z}),l==="error"&&t.jsxs(Ce,{children:[t.jsxs(qa,{"data-testid":"buy-error",children:[t.jsx(Ba,{src:Bs,alt:"",width:64,height:80}),t.jsxs(_a,{children:[t.jsx("b",{children:a("cartCheckout.errorHeadline")})," ",o.message??a("cartCheckout.errorBody")]})]}),t.jsxs(Mt,{children:[t.jsx(je,{"data-variant":"outline",onClick:z,children:a("buyModal.cancel")}),t.jsx(je,{"data-variant":"purple",onClick:o.onRetry??z,children:a("cartCheckout.tryAgain")})]})]})]})]})}function Fs({stage:o,step:l,total:P,isSelfCustody:z,signatures:W}){const D=o==="reserving",Y=P>0?Math.min(100,Math.round(l/P*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 t.jsxs(Ce,{"data-processing":!0,children:[t.jsx(Fa,{src:aa,alt:"",width:61,height:61}),t.jsx(Wa,{children:ne}),D?t.jsxs(zs,{children:[t.jsx(xt,{"aria-hidden":!0,children:t.jsx(ft,{"data-step":!0,style:{width:`${Y}%`}})}),P>1?t.jsxs(As,{children:[l,"/",P]}):null]}):t.jsx(xt,{"aria-hidden":!0,children:t.jsx(ft,{})})]})}function Ws({lines:o,shortfallCredits:l,packs:P,selectedPack:z,onSelectPack:W,onBuyPacks:D,onCancel:Y}){const A=P.find(n=>n.id===z),ne=o.reduce((n,K)=>n+(K.quantity??1),0);return t.jsxs(Ce,{children:[t.jsxs(La,{"data-testid":"nofunds-warning",children:[t.jsx(Ka,{}),t.jsxs(Na,{children:[t.jsx("b",{children:a("buyModal.insufficientFunds")})," ",a("buyModal.warningNeedToBuy")," ",t.jsx("b",{children:a("buyModal.warningCreditsAmount",{count:Math.max(0,l)})})," ",a("buyModal.warningToPurchase",{count:ne})]})]}),t.jsx(Es,{children:o.map(n=>{const K=n.quantity??1;return t.jsxs(Ua,{children:[t.jsx(Qa,{children:n.item.thumbnail?t.jsx("img",{src:n.item.thumbnail,alt:""}):null}),t.jsxs(Ha,{children:[t.jsxs("div",{children:[t.jsxs(Oa,{title:n.item.name,children:[n.item.name||a("buyModal.itemFallback"),K>1?t.jsx(Rs,{children:a("cartCheckout.qty",{count:K})}):null]}),n.item.creator?t.jsx(Ga,{address:n.item.creator}):null]}),t.jsxs(Va,{children:[t.jsx(Da,{}),t.jsx("span",{children:ce(n.priceCredits*K)})]})]})]},n.item.id)})}),t.jsx(Ya,{children:P.map(n=>{const K=n.id===z;return t.jsxs(Ja,{"data-testid":"credit-pack","data-on":K||void 0,onClick:()=>W(n.id),children:[t.jsx(Xa,{src:Za,alt:""}),t.jsx(es,{children:ce(n.credits)}),t.jsxs(ts,{children:["($",n.usd.toFixed(2),")"]})]},n.id)})}),t.jsxs(as,{children:[t.jsxs(ss,{children:[t.jsx(ns,{}),t.jsx("span",{children:ce((A==null?void 0:A.credits)??0)})]}),t.jsxs(is,{children:["$",((A==null?void 0:A.usd)??0).toFixed(2)]})]}),t.jsxs(Mt,{children:[t.jsx(je,{"data-variant":"outline",onClick:Y,children:a("buyModal.cancel")}),t.jsx(je,{"data-variant":"gradient",onClick:D,children:a("buyModal.buy")})]})]})}const{colors:r,gradients:It,radius:ee}=de,Pt="@media (max-width: 1080px)",I="@media (max-width: 880px)",Ct=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
|