@dcl/shop 0.7.2 → 0.7.3-31000563578.commit-5745007
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-ChYDB8b3.js +381 -0
- package/_assets/{AnimatedBackground-Be3B4ztI.js → AnimatedBackground-DEhy0Hs4.js} +1 -1
- package/_assets/{Assets-DoF0RVFp.js → Assets-CDxxXXrh.js} +13 -13
- package/_assets/{Assets.styles-IIy06Oye.js → Assets.styles-Eymc9hCH.js} +1 -1
- package/_assets/{Authorizations-b9znutOi.js → Authorizations-DC9PQV5B.js} +1 -1
- package/_assets/{Cart-CFsD5IlH.js → Cart-8HndC0ZN.js} +2 -2
- package/_assets/{CircularProgress-wU--wY5P.js → CircularProgress-CptEdBJR.js} +1 -1
- package/_assets/{Collection-CsVwPele.js → Collection-xeabHw_M.js} +1 -1
- package/_assets/{CollectionCarousel-DelfAKnZ.js → CollectionCarousel-D3Qo_rdU.js} +6 -6
- package/_assets/{Creator-CJuvJbZ7.js → Creator-RE0JcIXz.js} +6 -6
- package/_assets/{ErrorNotice-3r5bQgT2.js → ErrorNotice-CNAMbiNs.js} +1 -1
- package/_assets/{ExchangeController-CxfrLhaH.js → ExchangeController-Dv_sOoYV.js} +1 -1
- package/_assets/Faq-CLALDt_B.js +168 -0
- package/_assets/{GetCredits-Dn-IHOnM.js → GetCredits-Cldg30Nc.js} +85 -66
- package/_assets/{Grow-BmECuNyH.js → Grow-CWsjbYSK.js} +1 -1
- package/_assets/{HelpersUtil-Bvk_vk1Y.js → HelpersUtil-7Aopq74x.js} +1 -1
- package/_assets/{ItemDetail-ByHvYOS_.js → ItemDetail-Os4bWzmF.js} +1 -1
- package/_assets/LazyEmoteControls-Djrq3wXI.js +2 -0
- package/_assets/{LoadMore-CymwFW-m.js → LoadMore-DA2Anza2.js} +1 -1
- package/_assets/{ManaPricingBanner.styles-B36mIGF3.js → ManaPricingBanner.styles-CbLNPpYs.js} +1 -1
- package/_assets/{MyAssets-CE5nGbGF.js → MyAssets-CupXdivc.js} +1 -1
- package/_assets/{MyFavorites-Bk3TaFpw.js → MyFavorites-CHgYHTPv.js} +1 -1
- package/_assets/{NotFound-DtwVRkn9.js → NotFound-CvtnPkYR.js} +1 -1
- package/_assets/{NotificationsBell-CayuJgBV.js → NotificationsBell-BvQHk_Q-.js} +1 -1
- package/_assets/{OutfitDetail-CYCbMvMy.js → OutfitDetail-CGoug6Af.js} +1 -1
- package/_assets/{OutfitPreview-4ZQworXq.js → OutfitPreview-Dvzj3PdH.js} +1 -1
- package/_assets/{OutfitStudio-B7JjH_OJ.js → OutfitStudio-CjcxdyQL.js} +1 -1
- package/_assets/{StoreSettings-DZqto59M.js → StoreSettings-DuxrCPSa.js} +1 -1
- package/_assets/{Success-BXd4vOmE.js → Success-DPT_uk5N.js} +1 -1
- package/_assets/{SwapController-D_HE5-4t.js → SwapController-C5h7L4FU.js} +1 -1
- package/_assets/{Tooltip-CH3i2AZ8.js → Tooltip-E9qudNC4.js} +1 -1
- package/_assets/{TradeService-8wrIkkCU.js → TradeService-BFHswSBP.js} +1 -1
- package/_assets/{W3MFrameProviderSingleton-hR4mAmko.js → W3MFrameProviderSingleton-BzvCvXax.js} +3 -3
- package/_assets/{WebCryptoP256-CUVz0sT-.js → WebCryptoP256-c09CYnck.js} +1 -1
- package/_assets/{authorizations-CkEL0cRE.js → authorizations-ByBKRXko.js} +1 -1
- package/_assets/{basic-CjxOIetC.js → basic-5LFbVzlu.js} +1 -1
- package/_assets/{biconomy-8Mii_u_D.js → biconomy-B0JUoK-z.js} +1 -1
- package/_assets/{builder-BoC6pJY-.js → builder-DOXH8ial.js} +1 -1
- package/_assets/{buy-gasless-CtdtD4yw.js → buy-gasless-BcMX7AjG.js} +1 -1
- package/_assets/{buy-C5VKib6d.js → buy-ot6NCqZj.js} +1 -1
- package/_assets/{categories-N60mkQ85.js → categories-C1JdJ-IT.js} +1 -1
- package/_assets/{ccip-BfABfKqd.js → ccip-CSgTbbZy.js} +1 -1
- package/_assets/{ccip-CkHWEn4N.js → ccip-POlm_yFj.js} +1 -1
- package/_assets/{collectionPage.styles-BWGZLOL_.js → collectionPage.styles-JqpbqhpO.js} +1 -1
- package/_assets/{controller-bg1czStV.js → controller-B_xSifoO.js} +2 -2
- package/_assets/{core-CI81_wqW.js → core-DDawgI8S.js} +4 -4
- package/_assets/{createSvgIcon-BG_h01sL.js → createSvgIcon-CLQlGodw.js} +1 -1
- package/_assets/{custom-BNXh19kf.js → custom-BCK3km4M.js} +1 -1
- package/_assets/{data-capture-Gwo_M6sW.js → data-capture-DKrduCxq.js} +1 -1
- package/_assets/{email-Bnr-9hTW.js → email-rJO4D9ZY.js} +1 -1
- package/_assets/{embedded-wallet-D4jo3k6W.js → embedded-wallet-Cf9m2OdT.js} +1 -1
- package/_assets/{emotion-styled.browser.esm-Bd2qjAcz.js → emotion-styled.browser.esm-BNLyCOxT.js} +1 -1
- package/_assets/{engine-C--F6ENC.js → engine-BdpkQPz0.js} +1 -1
- package/_assets/{errors-Du3dWMbd.js → errors-C6KYIkHm.js} +1 -1
- package/_assets/{estimate-l1-fee-DtQQVymm.js → estimate-l1-fee-BPDfynS3.js} +1 -1
- package/_assets/{execute-DbnGyz94.js → execute-DjMuILJW.js} +2 -2
- package/_assets/{features-BkFSf-iq.js → features-BEzDX2Wi.js} +1 -1
- package/_assets/{fetchTokenMetadata-DFggI2iY.js → fetchTokenMetadata-BXcTI6Hp.js} +2 -2
- package/_assets/{field.styles-D3cOLW18.js → field.styles-uVKqEgCR.js} +1 -1
- package/_assets/{get-ecosystem-wallet-info-11sCnJ-7.js → get-ecosystem-wallet-info-BEa08lNL.js} +1 -1
- package/_assets/{getBalance-QGjDk77O.js → getBalance-3QcWDEP1.js} +1 -1
- package/_assets/{getNFT-BJ8yr01Z.js → getNFT-BpmSHnLn.js} +1 -1
- package/_assets/{getNFT-BVVv_-0Y.js → getNFT-Dwtlr3Th.js} +1 -1
- package/_assets/{grid.styles-CFQtLncp.js → grid.styles-BIS84Ueh.js} +1 -1
- package/_assets/{hashTypedData-gN3c95l4.js → hashTypedData-BmbEYwxf.js} +1 -1
- package/_assets/{hashTypedData-BXX-P_dP.js → hashTypedData-CQdGyU5r.js} +1 -1
- package/_assets/{in-app-kBwlyl-f.js → in-app-CQIEGwXf.js} +1 -1
- package/_assets/{in-app-wallet-calls-BN8r6OBs.js → in-app-wallet-calls-CT-zKabR.js} +1 -1
- package/_assets/{index-BwWxHd9J.js → index-1UxDFeoD.js} +1 -1
- package/_assets/{index-Cxw303yv.js → index-9k1dQZMh.js} +1 -1
- package/_assets/{index-CrvRYFHR.js → index-BBhZ0HVP.js} +3 -3
- package/_assets/{index-DvkSTulM.js → index-BEtNsXEG.js} +1 -1
- package/_assets/{index-DoRhx_He.js → index-BKHcUi1P.js} +1 -1
- package/_assets/{index-CMeSxiXG.js → index-BSv-QHZ0.js} +1 -1
- package/_assets/{index-DyxpPyVg.js → index-B_Lx9HeJ.js} +1 -1
- package/_assets/index-BbC_AcLk.js +519 -0
- package/_assets/{index-DjPyQFXF.js → index-BcQW8Gj2.js} +1 -1
- package/_assets/{index-Bakfg_1g.js → index-BcflcbFk.js} +1 -1
- package/_assets/{index-B0ryoW8w.js → index-BtR-ASCb.js} +1 -1
- package/_assets/{index-xPEXNMYS.js → index-Byc0pXfs.js} +1 -1
- package/_assets/{index-CzYiATyr.js → index-Bymdy1ge.js} +1 -1
- package/_assets/{index-B4bQ_g5A.js → index-CCVqnHck.js} +1 -1
- package/_assets/{index-DOlLnnbN.js → index-CENf1OH6.js} +1 -1
- package/_assets/{index-B4M8sJUj.js → index-CHwaoGWX.js} +1 -1
- package/_assets/{index-DN1pJSb7.js → index-COsrlET7.js} +1 -1
- package/_assets/{index-DInQ5jG-.js → index-CU7zlhMP.js} +1 -1
- package/_assets/{index-CKac0RNB.js → index-CYmJEkim.js} +1 -1
- package/_assets/{index-DrqL3wnf.js → index-CZxnK8TQ.js} +1 -1
- package/_assets/{index-EXLD54jH.js → index-CkcOUFYl.js} +2 -2
- package/_assets/{index-DxojTLnQ.js → index-CqWjs3ID.js} +1 -1
- package/_assets/{index-CIyes5rm.js → index-CrnyOt4u.js} +1 -1
- package/_assets/{index-BLrPav1T.js → index-CtjY17-l.js} +1 -1
- package/_assets/{index-CQdN8SI1.js → index-CuQBnNj3.js} +1 -1
- package/_assets/{index-TTZwY716.js → index-CxTerMZo.js} +2 -2
- package/_assets/{index-Bm7j_2aS.js → index-Cyw6hStH.js} +1 -1
- package/_assets/{index-kPR91X9E.js → index-D7kYOOTD.js} +1 -1
- package/_assets/{index-YZKg7WM1.js → index-DAHMNdQp.js} +3 -3
- package/_assets/{index-BUvdjpLN.js → index-DI-LAVz5.js} +1 -1
- package/_assets/{index-BtNS6Sv0.js → index-DLzn22gN.js} +1 -1
- package/_assets/{index-CVQ8oHkh.js → index-DMGubkbp.js} +2 -2
- package/_assets/{index-zQ8cxU2G.js → index-DY_p3BO1.js} +1 -1
- package/_assets/{index-D7zzleDp.js → index-DYdMXhWE.js} +1 -1
- package/_assets/{index-O0VpavwW.js → index-D_VYAhm8.js} +1 -1
- package/_assets/{index-C36oVpEk.js → index-Dbo5n5--.js} +1 -1
- package/_assets/{index-C786VheW.js → index-DcFYf1M_.js} +1 -1
- package/_assets/{index-DLzdQycs.js → index-DeWbFeXm.js} +1 -1
- package/_assets/{index-cvhPRrXA.js → index-DhZP1nf3.js} +1 -1
- package/_assets/{index-CvxViQFA.js → index-Dj9eZjMG.js} +1 -1
- package/_assets/{index-CqVxBPGc.js → index-DkFeq1NQ.js} +1 -1
- package/_assets/index-DyLYzoRb.js +3386 -0
- package/_assets/{index-Dyh7pyxx.js → index-Dz98iCbS.js} +1 -1
- package/_assets/{index-D9xYIYaf.js → index-FD4X2Esu.js} +1 -1
- package/_assets/{index-DDiCv4U4.js → index-ICnT6kXr.js} +3 -3
- package/_assets/{index-Dl0ZUNWk.js → index-Pa51CfZf.js} +1 -1
- package/_assets/{index-tpmZJbVV.js → index-R5Wlc0cr.js} +1 -1
- package/_assets/{index-C4Ua5jGw.js → index-c1Smsb2X.js} +1 -1
- package/_assets/{index-CblEnpzL.js → index-fnqyc3tx.js} +2 -2
- package/_assets/{index-I2lMQseb.js → index-jFSqsnQs.js} +1 -1
- package/_assets/{index-CkItaod2.js → index-n2RJyG-z.js} +1 -1
- package/_assets/{index-B_HYDEtX.js → index-rZPi0_Sz.js} +1 -1
- package/_assets/{index.es-Bl2PbxJr.js → index.es-CKFHGSe7.js} +4 -4
- package/_assets/{index.es-EFLDV9YI.js → index.es-D9hMCl3e.js} +1 -1
- package/_assets/{index.es-5JavRckI.js → index.es-orQLS9Ly.js} +1 -1
- package/_assets/{localBatchGatewayRequest-BWsIaDIE.js → localBatchGatewayRequest-Ca5RqcRB.js} +1 -1
- package/_assets/{networks--rzHY8zY.js → networks-J75QV4BL.js} +1 -1
- package/_assets/{onramp-IBGbKthf.js → onramp-qkvJojyj.js} +1 -1
- package/_assets/{openzeppelin-CteHZYAE.js → openzeppelin-DA9yw4Ac.js} +1 -1
- package/_assets/{parseNft-CjJbs0kN.js → parseNft-dG5pP9hp.js} +2 -2
- package/_assets/{parseSignature-BZS2g2Jp.js → parseSignature-CTHIkvJH.js} +1 -1
- package/_assets/{parseSignature-DgP8I4s-.js → parseSignature-m408d1zh.js} +3 -3
- package/_assets/{passkeys-2GYfrIW-.js → passkeys-CFsll6XV.js} +1 -1
- package/_assets/{pay-with-exchange-CFDPj_Ci.js → pay-with-exchange-DxDbUNGc.js} +1 -1
- package/_assets/{qr-overlay-Ds7Fr0lF.js → qr-overlay-DulceYNG.js} +1 -1
- package/_assets/{receive-DI-hDZuo.js → receive-xfbWCO49.js} +1 -1
- package/_assets/{resolveImplementation-BtX-ARKv.js → resolveImplementation-DxW4TCTM.js} +1 -1
- package/_assets/{rpc-CpuwTu3M.js → rpc-CQv7-Ntx.js} +1 -1
- package/_assets/{secp256k1-BMmzDgZw.js → secp256k1-Ce7nlUsr.js} +1 -1
- package/_assets/{secp256k1-DT8TtWA2.js → secp256k1-Cx50cwV-.js} +1 -1
- package/_assets/{secp256k1-B3lQnF4x.js → secp256k1-DzNTK7K-.js} +1 -1
- package/_assets/{send-batch-transaction-CshATiqB.js → send-batch-transaction-DIubuv-a.js} +1 -1
- package/_assets/{send-eip712-transaction-B_yd_Ph2.js → send-eip712-transaction-DHInvefN.js} +2 -2
- package/_assets/{send-gasless-transaction-Ot1v7swm.js → send-gasless-transaction-I0TAc2h2.js} +2 -2
- package/_assets/{send-lqB2NsIP.js → send-n9rbeOB-.js} +1 -1
- package/_assets/{send-transaction-Bbb8MiYz.js → send-transaction-vZPauM2q.js} +2 -2
- package/_assets/{sendMetaTransaction-B8QarnGW.js → sendMetaTransaction-BkvxVm7u.js} +1 -1
- package/_assets/{sendRawTransaction-CdbKO36d.js → sendRawTransaction-DtFtq1LQ.js} +3 -3
- package/_assets/{serializeTransaction-qj2kvULH.js → serializeTransaction-dTvuM5EZ.js} +1 -1
- package/_assets/{session-proposal-Bjh7TDS3.js → session-proposal-BHTiDxrO.js} +1 -1
- package/_assets/{session-request-BWLuJcL4.js → session-request-C9I3jCiJ.js} +2 -2
- package/_assets/{signing-CssxZ7kf.js → signing-BWYe-S9K.js} +3 -3
- package/_assets/{socials-91-QTc9v.js → socials-gfGHJNQF.js} +1 -1
- package/_assets/styled-BYt4mtoI.js +9 -0
- package/_assets/{swaps-CT9j7o9y.js → swaps-DPHYDz4Z.js} +1 -1
- package/_assets/{thirdweb-6YwgkX44.js → thirdweb-1EkAYNGI.js} +3 -3
- package/_assets/{to-serializable-transaction-Cwp0L3ww.js → to-serializable-transaction-CZajYrNm.js} +2 -2
- package/_assets/{trade-encoding-CxvKGx0_.js → trade-encoding-DHpwKa1D.js} +1 -1
- package/_assets/{transactionReceipt-CYYXW47r.js → transactionReceipt-BBXVz8i8.js} +1 -1
- package/_assets/{transactions-Yy0hGtH3.js → transactions-D_3mPI1t.js} +1 -1
- package/_assets/{useCreditPacks-eXmbKxJO.js → useCreditPacks-BQUqwasL.js} +1 -1
- package/_assets/{useImportable-1wgCIPJI.js → useImportable-DJqmpxB-.js} +1 -1
- package/_assets/{useInfiniteGrid-IXSEUDfN.js → useInfiniteGrid-BLY3pHgI.js} +1 -1
- package/_assets/{useTheme-DDHPP1hV.js → useTheme-C2r5FbDn.js} +1 -1
- package/_assets/{verifyHash-UQQpWRKz.js → verifyHash-B2NKbjyd.js} +1 -1
- package/_assets/{w3m-modal-R-xHgcLx.js → w3m-modal-Bx4rEvvz.js} +1 -1
- package/_assets/{w3m-modal-uZlen5oK.js → w3m-modal-LQPpq0YJ.js} +1 -1
- package/_assets/{wait-for-tx-receipt-Be-DMOgp.js → wait-for-tx-receipt-ChaKOpHZ.js} +1 -1
- package/_assets/{wallets-XOlHe2ld.js → wallets-TZYYtnxp.js} +5 -5
- package/_assets/{web-connector-msoNVD8s.js → web-connector-BILtFc_I.js} +3 -3
- package/_assets/{writeContract-8MHZT7h2.js → writeContract-CsUwt49p.js} +1 -1
- package/_assets/{zoraTestnet-HwyYvSRG.js → zoraTestnet-6_PUQr1Q.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/_assets/Activity-Jc4Ww2Np.js +0 -384
- package/_assets/LazyEmoteControls-DBetyXKO.js +0 -2
- package/_assets/index-B1DCMe50.js +0 -3378
- package/_assets/index-DDc9MCuJ.js +0 -474
- package/_assets/styled-CjUv0U3K.js +0 -9
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-BbC_AcLk.js","_assets/react-DehiWSvs.js","_assets/index-DyLYzoRb.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-DJqmpxB-.js","_assets/buy-ot6NCqZj.js","_assets/authorizations-ByBKRXko.js","_assets/sendMetaTransaction-BkvxVm7u.js","_assets/trade-encoding-DHpwKa1D.js","_assets/ManaPricingBanner.styles-CbLNPpYs.js","_assets/Faq-CLALDt_B.js","_assets/field.styles-uVKqEgCR.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{m as we,bF as je,k as q,n as I,bG as ke,s as l,t as s,o as Ie,B as Ae,q as $e,d as c,ai as Le,I as A,bH as Y,bI as ee,bJ as Pe,_ as Ne,w as N,bK as Ee,x as Te,bb as z,az as Ce,bL as Se,z as Fe,bM as De,bN as O}from"./index-DyLYzoRb.js";import{r as g,e as Me,j as t,L as se,a as He}from"./react-DehiWSvs.js";import{u as qe}from"./useImportable-DJqmpxB-.js";import{L as ze}from"./LoadMore-DA2Anza2.js";import{u as L}from"./useInfiniteGrid-BLY3pHgI.js";import{m as ne}from"./mana-matic-C4e1sNO3.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";import"./buy-ot6NCqZj.js";import"./authorizations-ByBKRXko.js";import"./sendMetaTransaction-BkvxVm7u.js";import"./trade-encoding-DHpwKa1D.js";const Oe=15e3;function Re(e,a){return e.txHash&&a.txHash?e.txHash===a.txHash:e.txHash||a.txHash?!1:e.status===a.status&&Math.abs(e.createdAt-a.createdAt)<=Oe}function We(e){const a=[...e].sort((i,r)=>r.createdAt-i.createdAt),n=[];for(const i of a){const r=n[n.length-1];r&&Re(r[r.length-1],i)?r.push(i):n.push([i])}return n.map(i=>{var r;return{id:((r=i.find(d=>d.txHash))==null?void 0:r.txHash)??i[i.length-1].id,createdAt:Math.max(...i.map(d=>d.createdAt)),status:i.some(d=>d.status==="PENDING")?"PENDING":"SETTLED",totalCredits:i.reduce((d,u)=>d+u.credits,0),lines:i}})}function _e(e){return e.tradeId?`trade:${e.tradeId}`:e.contractAddress&&e.itemId?`item:${e.contractAddress.toLowerCase()}:${e.itemId}`:null}function Ge(e){const a=[],n=new Map;for(const i of e){const r=_e(i);if(!r){a.push({key:i.id,tradeId:null,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits});continue}const d=n.get(r);if(d){d.quantity+=1,d.credits+=i.credits;continue}const u={key:r,tradeId:i.tradeId,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits};n.set(r,u),a.push(u)}return a}function Be(e,a){return{id:e.id,contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId,counterparty:e.buyer,credits:a?we(e.manaWei,a):null,manaWei:e.manaWei,createdAt:e.createdAt,txHash:e.txHash}}function Ke(e){const n=We(e.purchases.filter(o=>o.status!=="EXPIRED")).map(o=>({kind:"purchase",id:`purchase:${o.id}`,createdAt:o.createdAt,order:o})),i=e.sales.map(o=>{const x=Be(o,e.rate);return{kind:"sale",id:`sale:${x.id}`,createdAt:x.createdAt,sale:x}}),r=(e.creditOrders??[]).filter(o=>o.status!=="failed"&&o.status!=="abandoned").map(o=>({kind:"credit",id:`credit:${o.id}`,createdAt:o.createdAt,order:o})),d=new Set(e.purchases.filter(o=>o.txHash).map(o=>o.txHash.toLowerCase())),u=(e.manaPurchases??[]).filter(o=>!d.has(o.txHash.toLowerCase())).map(o=>({kind:"mana-purchase",id:`mana-purchase:${o.id}`,createdAt:o.createdAt,sale:o}));return[...n,...i,...r,...u].sort((o,x)=>x.createdAt-o.createdAt||(o.id<x.id?-1:1))}function Ue(e,a){return a==="all"?e:a==="sales"?e.filter(n=>n.kind==="sale"):e.filter(n=>n.kind==="purchase"||n.kind==="credit"||n.kind==="mana-purchase")}const re=e=>e.trim().toLowerCase();function Qe(e){const a=new Map;for(const n of e??[]){const i=re(n.txHash??"");if(!i)continue;const r=a.get(i);r?r.push(n):a.set(i,[n])}return a}function Ve(e,a,n=Date.now()){const i=a.txHash?e.get(re(a.txHash)):void 0;if(!i||i.length===0)return{kind:"direct"};const r=i.length===1?Xe(i[0].netCents):null,d=i.filter(o=>!o.available&&o.availableAt>n);if(d.length===0)return{kind:"credited",credits:r};const u=d.reduce((o,x)=>Math.max(o,x.availableAt),0);return{kind:"pending",credits:r,availableAt:u}}function Xe(e){return je(e)}function Je(){const e=q(i=>{var r;return(r=i.session)==null?void 0:r.address}),{data:a,isLoading:n}=I({queryKey:["listing-count",e],queryFn:()=>ke({creator:e,onSale:!0,first:1}),enabled:!!e,staleTime:5*6e4});return{count:a==null?void 0:a.total,isLoading:n}}const Ze="https://cdn.decentraland.org/@dcl/shop/0.7.3-31000563578.commit-5745007/_assets/credits-product-vs4Q6u6l.svg",R=Ie`
|
|
3
|
+
0% { background-position: 200% 0; }
|
|
4
|
+
100% { background-position: -200% 0; }
|
|
5
|
+
`,Ye=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
|
+
`,et=l.div`
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: baseline;
|
|
21
|
+
gap: 12px;
|
|
22
|
+
margin-bottom: 20px;
|
|
23
|
+
`,tt=l.h1`
|
|
24
|
+
font-family: ${s.font.sans};
|
|
25
|
+
margin: 0;
|
|
26
|
+
`;l.span`
|
|
27
|
+
color: ${s.colors.muted};
|
|
28
|
+
font-size: 14px;
|
|
29
|
+
`;const it=l.div`
|
|
30
|
+
display: flex;
|
|
31
|
+
gap: 8px;
|
|
32
|
+
margin-bottom: 20px;
|
|
33
|
+
flex-wrap: wrap;
|
|
34
|
+
`,oe=l.button`
|
|
35
|
+
appearance: none;
|
|
36
|
+
/* Figma draws the row as a 0.5px Gray 4 hairline, a shade darker and half the weight of the card
|
|
37
|
+
border this used, and sets the label a point smaller with the tracking the shop's other 13px
|
|
38
|
+
pills carry. */
|
|
39
|
+
border: 0.5px solid ${s.colors.gray4};
|
|
40
|
+
background: ${s.colors.white};
|
|
41
|
+
color: ${s.colors.text};
|
|
42
|
+
font-family: ${s.font.sans};
|
|
43
|
+
font-size: 13px;
|
|
44
|
+
font-weight: 600;
|
|
45
|
+
line-height: 24px;
|
|
46
|
+
letter-spacing: 0.46px;
|
|
47
|
+
/* The design gives the pill a flat 40px and no vertical padding, centring the 24px line box inside
|
|
48
|
+
it — so the height is the 40 it draws rather than the sum of a line box, padding and a border. */
|
|
49
|
+
display: inline-flex;
|
|
50
|
+
align-items: center;
|
|
51
|
+
justify-content: center;
|
|
52
|
+
padding: 0 16px;
|
|
53
|
+
min-height: 40px;
|
|
54
|
+
border-radius: ${s.radius.pill};
|
|
55
|
+
cursor: pointer;
|
|
56
|
+
transition:
|
|
57
|
+
background 0.15s,
|
|
58
|
+
border-color 0.15s,
|
|
59
|
+
color 0.15s;
|
|
60
|
+
|
|
61
|
+
&:hover {
|
|
62
|
+
background: ${s.colors.media};
|
|
63
|
+
}
|
|
64
|
+
&:focus-visible {
|
|
65
|
+
outline: 2px solid ${s.colors.accent};
|
|
66
|
+
outline-offset: 2px;
|
|
67
|
+
}
|
|
68
|
+
&[data-active='true'] {
|
|
69
|
+
background: ${s.colors.accent};
|
|
70
|
+
border-color: ${s.colors.accent};
|
|
71
|
+
color: ${s.colors.white};
|
|
72
|
+
}
|
|
73
|
+
`,at=l(oe)`
|
|
74
|
+
position: relative;
|
|
75
|
+
|
|
76
|
+
/* Violet-on-violet once the chip fills, so the badge inverts. Reached by test id rather than by
|
|
77
|
+
interpolating the styled def, which throws under vitest (see CLAUDE.md). */
|
|
78
|
+
&[data-active='true'] [data-testid='activity-migrate-count'] {
|
|
79
|
+
background: ${s.colors.white};
|
|
80
|
+
color: ${s.colors.accent};
|
|
81
|
+
/* See MigrateBadge: a white ring would vanish into the page here, since the disc itself is white. */
|
|
82
|
+
box-shadow: 0 0 0 2px ${s.colors.accent};
|
|
83
|
+
}
|
|
84
|
+
`,st=l.span`
|
|
85
|
+
position: absolute;
|
|
86
|
+
/* Offsets run from the chip's PADDING box, so they carry the 1px its hairline occupies in layout on
|
|
87
|
+
top of the 5.5 / 2.5 the design measures from the pill's outer edge. */
|
|
88
|
+
top: -6.5px;
|
|
89
|
+
right: -3.5px;
|
|
90
|
+
display: grid;
|
|
91
|
+
place-items: center;
|
|
92
|
+
/* The chip's tracking would otherwise widen the disc off its 20px. */
|
|
93
|
+
letter-spacing: normal;
|
|
94
|
+
/* Figma only ever draws a single digit, as a fixed 20px disc. The padding is what lets a two- or
|
|
95
|
+
three-figure count grow leftwards out of the corner instead of spilling out of the circle. */
|
|
96
|
+
min-width: 20px;
|
|
97
|
+
height: 20px;
|
|
98
|
+
padding: 0 6px;
|
|
99
|
+
border-radius: ${s.radius.pill};
|
|
100
|
+
background: ${s.colors.brandViolet};
|
|
101
|
+
/**
|
|
102
|
+
* A ring, whose colour has to FOLLOW THE DISC rather than the page.
|
|
103
|
+
*
|
|
104
|
+
* The disc hangs off the corner: part of it sits on the chip, part on the page. Unselected it is violet
|
|
105
|
+
* on white, so it already reads and the white ring only separates it from the chip's grey hairline.
|
|
106
|
+
* Selected, the chip inverts it to white on violet — and a white disc against the white page has no edge
|
|
107
|
+
* at all along the half that overhangs, which is the state where the circle looked unfinished. That case
|
|
108
|
+
* needs the ring in the chip's accent instead (below), so the disc keeps a hard edge on both surfaces.
|
|
109
|
+
*
|
|
110
|
+
* box-shadow rather than a border: a border would grow the 20px disc the design fixes, while a spread
|
|
111
|
+
* shadow draws outside the box.
|
|
112
|
+
*/
|
|
113
|
+
box-shadow: 0 0 0 2px ${s.colors.white};
|
|
114
|
+
font-weight: 600;
|
|
115
|
+
font-size: 12px;
|
|
116
|
+
line-height: 1.6;
|
|
117
|
+
color: ${s.colors.white};
|
|
118
|
+
`,nt=l.div`
|
|
119
|
+
min-height: 60vh;
|
|
120
|
+
`,te=l.div`
|
|
121
|
+
display: flex;
|
|
122
|
+
flex-direction: column;
|
|
123
|
+
gap: 16px;
|
|
124
|
+
`,E=l.div`
|
|
125
|
+
background: ${s.colors.white};
|
|
126
|
+
border: 1px solid ${s.colors.line};
|
|
127
|
+
border-radius: 16px;
|
|
128
|
+
overflow: hidden;
|
|
129
|
+
`,T=l.div`
|
|
130
|
+
display: flex;
|
|
131
|
+
align-items: center;
|
|
132
|
+
justify-content: space-between;
|
|
133
|
+
gap: 12px;
|
|
134
|
+
padding: 14px 18px;
|
|
135
|
+
background: ${s.colors.softWhite};
|
|
136
|
+
border-bottom: 1px solid ${s.colors.line};
|
|
137
|
+
|
|
138
|
+
${s.media.maxWidth("mobile")} {
|
|
139
|
+
flex-wrap: wrap;
|
|
140
|
+
}
|
|
141
|
+
`,C=l.div`
|
|
142
|
+
display: flex;
|
|
143
|
+
flex-direction: column;
|
|
144
|
+
gap: 2px;
|
|
145
|
+
min-width: 0;
|
|
146
|
+
`,S=l.span`
|
|
147
|
+
font-weight: 700;
|
|
148
|
+
color: ${s.colors.text};
|
|
149
|
+
`,F=l.span`
|
|
150
|
+
font-size: 13px;
|
|
151
|
+
color: ${s.colors.muted};
|
|
152
|
+
`,D=l.div`
|
|
153
|
+
display: flex;
|
|
154
|
+
align-items: center;
|
|
155
|
+
gap: 14px;
|
|
156
|
+
/* Pin to the right regardless of how many elements sit on the left (the credit-purchase card adds a
|
|
157
|
+
leading thumbnail, giving the head three children instead of two). */
|
|
158
|
+
margin-left: auto;
|
|
159
|
+
`,rt=l.div`
|
|
160
|
+
flex: 0 0 auto;
|
|
161
|
+
width: 52px;
|
|
162
|
+
height: 52px;
|
|
163
|
+
border-radius: 10px;
|
|
164
|
+
background: ${s.colors.media};
|
|
165
|
+
display: flex;
|
|
166
|
+
align-items: center;
|
|
167
|
+
justify-content: center;
|
|
168
|
+
|
|
169
|
+
img {
|
|
170
|
+
width: 30px;
|
|
171
|
+
height: 30px;
|
|
172
|
+
display: block;
|
|
173
|
+
}
|
|
174
|
+
`,M=l.span`
|
|
175
|
+
font-size: 11px;
|
|
176
|
+
font-weight: 700;
|
|
177
|
+
text-transform: uppercase;
|
|
178
|
+
letter-spacing: 0.03em;
|
|
179
|
+
padding: 4px 10px;
|
|
180
|
+
border-radius: ${s.radius.pill};
|
|
181
|
+
white-space: nowrap;
|
|
182
|
+
|
|
183
|
+
&[data-status='SETTLED'] {
|
|
184
|
+
background: rgba(30, 166, 114, 0.14);
|
|
185
|
+
color: ${s.colors.okStrong};
|
|
186
|
+
}
|
|
187
|
+
&[data-status='PENDING'] {
|
|
188
|
+
background: rgba(245, 166, 35, 0.16);
|
|
189
|
+
color: #b5790a;
|
|
190
|
+
}
|
|
191
|
+
&[data-status='SOLD'] {
|
|
192
|
+
background: rgba(103, 58, 183, 0.14);
|
|
193
|
+
color: ${s.colors.accent};
|
|
194
|
+
}
|
|
195
|
+
&[data-status='FAILED'] {
|
|
196
|
+
background: rgba(214, 61, 61, 0.14);
|
|
197
|
+
color: #b02a2a;
|
|
198
|
+
}
|
|
199
|
+
/* Nobody paid and nobody is owed anything — deliberately the quietest of the four. Reusing PENDING's
|
|
200
|
+
amber here is what made an abandoned checkout look like money on its way. */
|
|
201
|
+
&[data-status='UNFINISHED'] {
|
|
202
|
+
background: ${s.colors.line};
|
|
203
|
+
color: ${s.colors.muted};
|
|
204
|
+
}
|
|
205
|
+
`,ot=l.button`
|
|
206
|
+
font-size: 11px;
|
|
207
|
+
font-weight: 700;
|
|
208
|
+
text-transform: uppercase;
|
|
209
|
+
letter-spacing: 0.03em;
|
|
210
|
+
padding: 4px 10px;
|
|
211
|
+
border-radius: ${s.radius.pill};
|
|
212
|
+
white-space: nowrap;
|
|
213
|
+
border: 1px solid ${s.colors.accent};
|
|
214
|
+
background: transparent;
|
|
215
|
+
color: ${s.colors.accent};
|
|
216
|
+
cursor: pointer;
|
|
217
|
+
transition: background 0.15s ease;
|
|
218
|
+
|
|
219
|
+
&:hover:not(:disabled) {
|
|
220
|
+
background: rgba(103, 58, 183, 0.08);
|
|
221
|
+
}
|
|
222
|
+
&:disabled {
|
|
223
|
+
opacity: 0.6;
|
|
224
|
+
cursor: default;
|
|
225
|
+
}
|
|
226
|
+
`,j=l.div`
|
|
227
|
+
display: flex;
|
|
228
|
+
align-items: center;
|
|
229
|
+
gap: 5px;
|
|
230
|
+
font-weight: 800;
|
|
231
|
+
color: ${s.colors.text};
|
|
232
|
+
white-space: nowrap;
|
|
233
|
+
|
|
234
|
+
.ccy-mark {
|
|
235
|
+
width: 16px;
|
|
236
|
+
height: 16px;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
// Money received (a sale) reads as income in the shop's success green.
|
|
240
|
+
&[data-kind='income'] {
|
|
241
|
+
color: ${s.colors.okStrong};
|
|
242
|
+
}
|
|
243
|
+
`,de=l.img`
|
|
244
|
+
width: 16px;
|
|
245
|
+
height: 16px;
|
|
246
|
+
vertical-align: -0.15em;
|
|
247
|
+
`,dt=l.span`
|
|
248
|
+
display: inline-flex;
|
|
249
|
+
align-items: center;
|
|
250
|
+
cursor: pointer;
|
|
251
|
+
`,ct=l.span`
|
|
252
|
+
position: fixed;
|
|
253
|
+
transform: translateX(-50%);
|
|
254
|
+
padding: 6px 8px;
|
|
255
|
+
border-radius: 6px;
|
|
256
|
+
background: #16141a;
|
|
257
|
+
color: ${s.colors.white};
|
|
258
|
+
font-size: 12px;
|
|
259
|
+
font-weight: 600;
|
|
260
|
+
line-height: 1;
|
|
261
|
+
white-space: nowrap;
|
|
262
|
+
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
|
|
263
|
+
pointer-events: none;
|
|
264
|
+
z-index: 9999;
|
|
265
|
+
`,W=l.div`
|
|
266
|
+
display: flex;
|
|
267
|
+
flex-direction: column;
|
|
268
|
+
`,H=l.div`
|
|
269
|
+
display: grid;
|
|
270
|
+
grid-template-columns: 52px 1fr auto;
|
|
271
|
+
align-items: center;
|
|
272
|
+
gap: 14px;
|
|
273
|
+
padding: 12px 18px;
|
|
274
|
+
text-decoration: none;
|
|
275
|
+
color: inherit;
|
|
276
|
+
|
|
277
|
+
& + & {
|
|
278
|
+
border-top: 1px solid ${s.colors.line};
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
&[data-link='true'] {
|
|
282
|
+
transition: background 0.15s;
|
|
283
|
+
}
|
|
284
|
+
&[data-link='true']:hover {
|
|
285
|
+
background: ${s.colors.media};
|
|
286
|
+
}
|
|
287
|
+
&[data-link='true']:focus-visible {
|
|
288
|
+
outline: 2px solid ${s.colors.accent};
|
|
289
|
+
outline-offset: -2px;
|
|
290
|
+
}
|
|
291
|
+
`,_=l.div`
|
|
292
|
+
width: 52px;
|
|
293
|
+
height: 52px;
|
|
294
|
+
border-radius: 10px;
|
|
295
|
+
background: ${s.colors.media};
|
|
296
|
+
overflow: hidden;
|
|
297
|
+
display: flex;
|
|
298
|
+
align-items: center;
|
|
299
|
+
justify-content: center;
|
|
300
|
+
color: ${s.colors.muted2};
|
|
301
|
+
|
|
302
|
+
img {
|
|
303
|
+
width: 100%;
|
|
304
|
+
height: 100%;
|
|
305
|
+
object-fit: contain;
|
|
306
|
+
}
|
|
307
|
+
`,G=l.div`
|
|
308
|
+
width: 52px;
|
|
309
|
+
height: 52px;
|
|
310
|
+
border-radius: 10px;
|
|
311
|
+
background: linear-gradient(100deg, ${s.colors.media} 30%, ${s.colors.panel} 50%, ${s.colors.media} 70%);
|
|
312
|
+
background-size: 200% 100%;
|
|
313
|
+
animation: ${R} 1.3s infinite linear;
|
|
314
|
+
|
|
315
|
+
@media (prefers-reduced-motion: reduce) {
|
|
316
|
+
animation: none;
|
|
317
|
+
}
|
|
318
|
+
`,B=l.div`
|
|
319
|
+
min-width: 0;
|
|
320
|
+
display: flex;
|
|
321
|
+
flex-direction: column;
|
|
322
|
+
gap: 2px;
|
|
323
|
+
`,K=l.span`
|
|
324
|
+
font-weight: 700;
|
|
325
|
+
white-space: nowrap;
|
|
326
|
+
overflow: hidden;
|
|
327
|
+
text-overflow: ellipsis;
|
|
328
|
+
`,U=l.span`
|
|
329
|
+
display: inline-block;
|
|
330
|
+
width: 140px;
|
|
331
|
+
max-width: 60%;
|
|
332
|
+
height: 12px;
|
|
333
|
+
border-radius: 6px;
|
|
334
|
+
background: linear-gradient(100deg, ${s.colors.media} 30%, ${s.colors.panel} 50%, ${s.colors.media} 70%);
|
|
335
|
+
background-size: 200% 100%;
|
|
336
|
+
animation: ${R} 1.3s infinite linear;
|
|
337
|
+
|
|
338
|
+
@media (prefers-reduced-motion: reduce) {
|
|
339
|
+
animation: none;
|
|
340
|
+
}
|
|
341
|
+
`,Q=l.span`
|
|
342
|
+
font-size: 13px;
|
|
343
|
+
color: ${s.colors.muted};
|
|
344
|
+
`,lt=l.div`
|
|
345
|
+
display: flex;
|
|
346
|
+
align-items: center;
|
|
347
|
+
gap: 4px;
|
|
348
|
+
font-weight: 700;
|
|
349
|
+
color: ${s.colors.text};
|
|
350
|
+
white-space: nowrap;
|
|
351
|
+
|
|
352
|
+
.ccy-mark {
|
|
353
|
+
width: 14px;
|
|
354
|
+
height: 14px;
|
|
355
|
+
}
|
|
356
|
+
`,ie=l.div`
|
|
357
|
+
height: 132px;
|
|
358
|
+
border-radius: 16px;
|
|
359
|
+
border: 1px solid transparent;
|
|
360
|
+
background: linear-gradient(100deg, ${s.colors.media} 30%, ${s.colors.panel} 50%, ${s.colors.media} 70%);
|
|
361
|
+
background-size: 200% 100%;
|
|
362
|
+
animation: ${R} 1.3s infinite linear;
|
|
363
|
+
|
|
364
|
+
@media (prefers-reduced-motion: reduce) {
|
|
365
|
+
animation: none;
|
|
366
|
+
}
|
|
367
|
+
`,ce=l.div`
|
|
368
|
+
display: flex;
|
|
369
|
+
flex-direction: column;
|
|
370
|
+
align-items: center;
|
|
371
|
+
gap: 8px;
|
|
372
|
+
text-align: center;
|
|
373
|
+
padding: 90px 20px;
|
|
374
|
+
min-height: 50vh;
|
|
375
|
+
`,le=l.p`
|
|
376
|
+
font-size: 22px;
|
|
377
|
+
font-weight: 700;
|
|
378
|
+
margin: 6px 0 0;
|
|
379
|
+
`,ht=l(Ae)`
|
|
380
|
+
margin-top: 12px;
|
|
381
|
+
`,V=H.withComponent(se),ut=g.lazy(()=>Ne(()=>import("./index-BbC_AcLk.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15])).then(e=>({default:e.ImportListings}))),P=24,pt=["all","purchases","sales"],ae="migrate";function k(e){try{return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function he(e){return e.length>10?`${e.slice(0,6)}…${e.slice(-4)}`:e}function ue(e){const a=Number(e)/1e18;return Number.isFinite(a)?a.toLocaleString("en",{maximumFractionDigits:2}):"0"}function pe({children:e}){const a=g.useRef(null),[n,i]=g.useState(null),r=()=>{var u;const d=(u=a.current)==null?void 0:u.getBoundingClientRect();d&&i({top:d.bottom+8,left:d.left+d.width/2})};return t.jsxs(dt,{ref:a,tabIndex:0,onMouseEnter:r,onMouseLeave:()=>i(null),onFocus:r,onBlur:()=>i(null),children:[e,n?He.createPortal(t.jsx(ct,{style:{top:n.top,left:n.left},role:"tooltip",children:c("activity.polygonMana")}),document.body):null]})}function xt({item:e}){const a=!!e.contractAddress&&!!e.itemId,n=!!e.tradeId||a,{data:i,isLoading:r}=I({queryKey:["order-line-display",e.tradeId,e.contractAddress,e.itemId],queryFn:()=>e.tradeId?De(e.tradeId):O(e.contractAddress,{itemId:e.itemId}),enabled:n,staleTime:5*6e4}),d=n&&r,u=(i==null?void 0:i.name)??c("activity.itemFallback"),o=(i==null?void 0:i.thumbnail)??"",x=z({contractAddress:i==null?void 0:i.contractAddress,tokenId:i==null?void 0:i.tokenId,itemId:i==null?void 0:i.itemId})??void 0,f=t.jsxs(t.Fragment,{children:[d?t.jsx(G,{}):t.jsx(_,{children:o?t.jsx("img",{src:o,alt:u}):t.jsx(A,{name:"cart",size:20})}),t.jsxs(B,{children:[d?t.jsx(U,{}):t.jsx(K,{title:u,children:u}),e.quantity>1?t.jsx(Q,{children:c("activity.quantity",{count:e.quantity})}):null]}),t.jsxs(lt,{children:[t.jsx(N,{className:"ccy-mark"})," ",e.credits]})]});return x?t.jsx(V,{to:x,"data-link":"true",children:f}):t.jsx(H,{children:f})}function mt({order:e}){const a=Ge(e.lines),n=a.reduce((i,r)=>i+r.quantity,0);return t.jsxs(E,{"data-testid":"purchase-order",children:[t.jsxs(T,{children:[t.jsxs(C,{children:[t.jsx(S,{children:k(e.createdAt)}),t.jsxs(F,{children:[c("activity.purchaseLabel")," · ",c("activity.itemCount",{count:n})]})]}),t.jsxs(D,{children:[t.jsx(M,{"data-status":e.status,children:e.status==="PENDING"?c("activity.processing"):c("activity.completed")}),t.jsxs(j,{children:[t.jsx(N,{className:"ccy-mark"})," ",e.totalCredits]})]})]}),t.jsx(W,{children:a.map(i=>t.jsx(xt,{item:i},i.key))})]})}function gt({sale:e}){const{data:a,isLoading:n}=I({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>O(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),i=(a==null?void 0:a.name)??c("activity.itemFallback"),r=(a==null?void 0:a.thumbnail)??"",d=z({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,u=t.jsxs(t.Fragment,{children:[n?t.jsx(G,{}):t.jsx(_,{children:r?t.jsx("img",{src:r,alt:i}):t.jsx(A,{name:"offer",size:20})}),t.jsxs(B,{children:[n?t.jsx(U,{}):t.jsx(K,{title:i,children:i}),t.jsx(Q,{children:c("activity.boughtFrom",{account:he(e.seller)})})]})]});return t.jsxs(E,{"data-testid":"activity-mana-purchase",children:[t.jsxs(T,{children:[t.jsxs(C,{children:[t.jsx(S,{children:k(e.createdAt)}),t.jsx(F,{children:c("activity.paidWithMana")})]}),t.jsxs(D,{children:[t.jsx(M,{"data-status":"SETTLED",children:c("activity.completed")}),t.jsxs(j,{children:[ue(e.manaWei)," ",t.jsx(pe,{children:t.jsx(de,{src:ne,alt:"MANA"})})]})]})]}),t.jsx(W,{children:d?t.jsx(V,{to:d,"data-link":"true",children:u}):t.jsx(H,{children:u})})]})}function ft({sale:e,payout:a}){const{data:n,isLoading:i}=I({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>O(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),r=(n==null?void 0:n.name)??c("activity.itemFallback"),d=(n==null?void 0:n.thumbnail)??"",u=z({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,o=t.jsxs(t.Fragment,{children:[i?t.jsx(G,{}):t.jsx(_,{children:d?t.jsx("img",{src:d,alt:r}):t.jsx(A,{name:"offer",size:20})}),t.jsxs(B,{children:[i?t.jsx(U,{}):t.jsx(K,{title:r,children:r}),t.jsxs(Q,{children:[c("activity.soldTo",{account:he(e.counterparty)}),a.kind==="pending"?` · ${c("activity.payoutPendingOn",{date:k(a.availableAt)})}`:""]})]})]});return t.jsxs(E,{"data-testid":"activity-sale",children:[t.jsxs(T,{children:[t.jsxs(C,{children:[t.jsx(S,{children:k(e.createdAt)}),t.jsx(F,{children:c("activity.saleLabel")})]}),t.jsxs(D,{children:[t.jsx(M,{"data-status":a.kind==="pending"?"PENDING":"SOLD",children:a.kind==="pending"?c("activity.payoutPending"):c("activity.sold")}),a.kind==="direct"?t.jsxs(j,{"data-kind":"income",children:["+",ue(e.manaWei)," ",t.jsx(pe,{children:t.jsx(de,{src:ne,alt:"MANA"})})]}):a.credits!==null?t.jsxs(j,{"data-kind":"income",children:[t.jsx(N,{className:"ccy-mark"})," +",Ce(a.credits)]}):t.jsx(j,{"data-kind":"income",children:c("activity.payoutCredited")})]})]}),t.jsx(W,{children:u?t.jsx(V,{to:u,"data-link":"true",children:o}):t.jsx(H,{children:o})})]})}function bt({order:e}){const a=`$${(e.usdCents/100).toFixed(2)}`,n=Ee(e.status),i=n==="SETTLED"?c("activity.completed"):n==="FAILED"?c("activity.failed"):n==="UNFINISHED"?c("activity.unfinished"):c("activity.processing"),r=q(p=>p.session),d=Te(),[u,o]=g.useState(!1),x=e.status==="initiated"&&!!r;async function f(){if(!(!r||u)){o(!0);try{const p=await Se(e.id,r.identity);if(p){window.location.href=p;return}Fe.info(c("activity.resumeExpired")),d.invalidateQueries({queryKey:["credit-orders"]})}finally{o(!1)}}}return t.jsx(E,{"data-testid":"credit-order",children:t.jsxs(T,{children:[t.jsx(rt,{children:t.jsx("img",{src:Ze,alt:"","aria-hidden":!0})}),t.jsxs(C,{children:[t.jsx(S,{children:k(e.createdAt)}),t.jsxs(F,{children:[c("activity.creditPurchaseLabel")," · ",c("activity.creditPaid",{usd:a})]})]}),t.jsxs(D,{children:[x?t.jsx(ot,{type:"button",onClick:()=>void f(),disabled:u,"data-testid":"resume-order",children:u?c("activity.resuming"):c("activity.resume")}):null,t.jsx(M,{"data-status":n,children:i}),t.jsxs(j,{"data-kind":"income",children:["+",t.jsx(N,{className:"ccy-mark"})," ",e.credits]})]})]})})}function yt({filter:e}){const a={all:{icon:"clock",title: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")}}[e];return t.jsxs(ce,{children:[t.jsx(A,{name:a.icon,size:40,color:s.colors.muted2}),t.jsx(le,{children:a.title}),t.jsx("p",{className:"muted",children:a.body}),e!=="sales"?t.jsx(ht,{as:se,to:"/items",variant:"purple",children:c("notFound.cta")}):null]})}function Ft(){const{session:e}=q(),[a,n]=g.useState("all"),[i,r]=Me(),d=i.get("view")===ae;$e({title:d?c("seo.import.title"):c("nav.activity"),noindex:!0});const{count:u}=qe(),{count:o}=Je(),f=u!==void 0&&o!==void 0&&(u>0||o>0||d),p=!!e&&!d&&a!=="sales",m=!!e&&!d&&a!=="purchases",b=L(["purchases",e==null?void 0:e.address],h=>Pe(e.address,e.identity,{first:P,skip:h}),{enabled:p}),y=L(["sales",e==null?void 0:e.address],h=>Y(e.address,{role:"seller",first:P,skip:h}),{enabled:m}),v=L(["credit-orders",e==null?void 0:e.address],h=>ee(e.address,e.identity,{first:P,skip:h}),{enabled:p}),w=L(["mana-purchases",e==null?void 0:e.address],h=>Y(e.address,{role:"buyer",first:P,skip:h}),{enabled:p}),{data:X}=I({queryKey:["sale-payouts",e==null?void 0:e.address],queryFn:()=>ee(e.address,e.identity,{first:200}).then(h=>h.payouts),enabled:m,staleTime:6e4}),xe=g.useMemo(()=>Qe(X),[X]),{data:me}=Le(m);if(!e)return t.jsxs(ce,{children:[t.jsx(A,{name:"clock",size:40,color:s.colors.muted2}),t.jsx(le,{children:c("activity.signInTitle")}),t.jsx("p",{className:"muted",children:c("activity.signInBody")})]});const J=Ue(Ke({purchases:p?b.items:[],sales:m?y.items:[],creditOrders:p?v.items:[],manaPurchases:p?w.items:[],rate:me}),a),ge=p&&(b.isLoading||v.isLoading||w.isLoading)||m&&y.isLoading,Z=p&&(b.isFetchingNextPage||v.isFetchingNextPage||w.isFetchingNextPage)||m&&y.isFetchingNextPage,fe=p&&(b.hasNextPage||v.hasNextPage||w.hasNextPage)||m&&y.hasNextPage;function be(){p&&b.hasNextPage&&b.fetchNextPage(),p&&v.hasNextPage&&v.fetchNextPage(),p&&w.hasNextPage&&w.fetchNextPage(),m&&y.hasNextPage&&y.fetchNextPage()}function ye(h){if(n(h),!d)return;const $=new URLSearchParams(i);$.delete("view"),r($,{replace:!0})}function ve(){const h=new URLSearchParams(i);h.set("view",ae),r(h,{replace:!0})}return t.jsxs(Ye,{children:[t.jsx(et,{children:t.jsx(tt,{children:c("nav.activity")})}),t.jsxs(it,{role:"tablist","aria-label":c("nav.activity"),children:[pt.map(h=>t.jsx(oe,{type:"button",role:"tab","aria-selected":!d&&a===h,"data-active":!d&&a===h,"data-testid":`activity-filter-${h}`,onClick:()=>ye(h),children:c(`activity.filter.${h}`)},h)),f?t.jsxs(at,{type:"button",role:"tab","aria-selected":d,"data-active":d,"data-testid":"activity-filter-migrate","aria-label":u?c("activity.migrate.chipAria",{count:u}):void 0,onClick:ve,children:[c("activity.migrate.chip"),u?t.jsx(st,{"data-testid":"activity-migrate-count","aria-hidden":!0,children:u}):null]}):null]}),d?t.jsx(g.Suspense,{fallback:t.jsx(nt,{"aria-busy":"true"}),children:t.jsx(ut,{})}):ge?t.jsx(te,{children:Array.from({length:5}).map((h,$)=>t.jsx(ie,{},$))}):J.length===0?t.jsx(yt,{filter:a}):t.jsxs(t.Fragment,{children:[t.jsxs(te,{children:[J.map(h=>h.kind==="purchase"?t.jsx(mt,{order:h.order},h.id):h.kind==="credit"?t.jsx(bt,{order:h.order},h.id):h.kind==="mana-purchase"?t.jsx(gt,{sale:h.sale},h.id):t.jsx(ft,{sale:h.sale,payout:Ve(xe,h.sale)},h.id)),Z?t.jsx(ie,{}):null]}),t.jsx(ze,{hasNextPage:fe,isFetching:Z,onLoadMore:be})]})]})}export{Ft 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-DyLYzoRb.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";const S="https://cdn.decentraland.org/@dcl/shop/0.7.3-31000563578.commit-5745007/_assets/custom-welcome-background-BxlFQma9.webp",b="https://cdn.decentraland.org/@dcl/shop/0.7.3-31000563578.commit-5745007/_assets/DCL_LogoPattern-BryBPc3d.png",U=`
|
|
2
2
|
attribute vec2 a_position;
|
|
3
3
|
varying vec2 v_uv;
|
|
4
4
|
void main() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as Le,r as u,j as e,e as nt}from"./react-DehiWSvs.js";import{c as U,r as st,bg as rt,bh as ot,au as it,b as at,s,t,k as Ue,b6 as lt,x as ct,az as be,d as n,v as dt,I as R,w as M,
|
|
1
|
+
import{d as Le,r as u,j as e,e as nt}from"./react-DehiWSvs.js";import{c as U,r as st,bg as rt,bh as ot,au as it,b as at,s,t,k as Ue,b6 as lt,x as ct,az as be,d as n,v as dt,I as R,w as M,bS as se,b5 as pt,S as ee,bk as ht,bj as xt,q as He,ai as Oe,m as De,l as mt,ag as ft,ak as Ie,al as V,aB as ut,bD as gt}from"./index-DyLYzoRb.js";import{g as bt,h as yt,i as wt,j as jt,k as vt,C as $t,l as Ct,o as kt,m as St,n as Et,M as Rt,u as _t,E as Tt,v as zt,p as It,q as At,r as Nt,s as Pt,t as Mt}from"./Assets.styles-Eymc9hCH.js";import{S as Ae,R as Bt,F as Wt,e as Ft}from"./categories-C1JdJ-IT.js";import{L as Lt}from"./LoadMore-DA2Anza2.js";import{u as Ut}from"./useInfiniteGrid-BLY3pHgI.js";import{E as Ht}from"./ErrorNotice-CNAMbiNs.js";import{d as Ot}from"./dcl-schemas-Dr9BTjb7.js";import{s as Dt,G as Gt,w as qt,S as Vt}from"./buy-gasless-BcMX7AjG.js";import{s as Zt}from"./buy-ot6NCqZj.js";import{j as Kt}from"./trade-encoding-DHpwKa1D.js";import{f as Jt}from"./errors-C6KYIkHm.js";import{J as Qt,C as Xt,B as ye}from"./ethers-CtNGBird.js";import{n as Yt}from"./Tooltip-E9qudNC4.js";import{G as en}from"./grid.styles-BIS84Ueh.js";import"./sentry-973sfbO9.js";import"./intl-CBcMB1D2.js";import"./authorizations-ByBKRXko.js";import"./sendMetaTransaction-BkvxVm7u.js";function Z(r){const i=r.source??"item",h=r.tradeId||`${r.contractAddress}-${r.tokenId??r.itemId??""}`;return`${i}:${h}`}const H="100000000000000000000",Ge=2,te=15,tn=/^[a-zA-Z0-9]+$/;function Ne(r){const i=r.trim();return i.length===0?{ok:!1,reason:"empty"}:tn.test(i)?i.length<Ge?{ok:!1,reason:"too-short"}:i.length>te?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function nn(r){return r.replace(/[^a-zA-Z0-9]/g,"").slice(0,te)}const sn=["function available(string _subdomain) view returns (bool)"],Pe={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function rn(){return U.chainId===Number(Ot.ChainId.MATIC_MAINNET)?Pe.mainnet:Pe.sepolia}async function on(r,i={}){var l;const{rpc:h,address:c}=rn(),d=new Qt(h),a=new Xt(c,sn,d);console.info(`[names] availability check → DCLRegistrar(${c}).available("${r}") on ${h}`);const m=await a.available(r);if((l=i.signal)!=null&&l.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${r}" available=${m}`),m?"available":"taken"}const an="https://app.across.to/api";class we extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}function ln(r){return it(H,r)}async function cn(r,i,h={}){var l;const c=h.chainId??U.chainId,d=h.provider??"across",a=`${U.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(i)}&chainId=${c}&provider=${d}`,m=await at(a,{method:"GET",identity:r,metadata:{}});if(!m.ok){let p;try{p=(l=await m.json())==null?void 0:l.code}catch{}throw p==="ROUTE_COST_TOO_HIGH"?new we:new Error(`fetchNameCreditRoute ${m.status}`)}return m.json()}function dn(r,i){const h=ye.from(r.availableAmount),d=ye.from(H).sub(h);return{credits:[{value:r.amount,expiresAt:Number(r.expiresAt),salt:Kt(r.id)}],creditsSignatures:[r.signature],externalCall:{target:i.externalCall.target,selector:i.externalCall.selector,data:i.externalCall.data,expiresAt:i.externalCall.expiresAt,salt:i.externalCall.salt},customExternalCallSignature:i.customExternalCallSignature,maxUncreditedValue:d.isNegative()?"0":d.toString(),maxCreditedValue:H}}async function pn(r,i={}){const h=an,c=i.intervalMs??1e4,d=i.maxAttempts??60;let a={status:"pending",destinationTxHash:null,actionsSucceeded:!1};for(let m=0;m<d;m++){try{const l=await fetch(`${h}/deposit/status?originChainId=137&depositTxHash=${r}`);if(l.ok){const p=await l.json(),x=(p.status??"pending").toLowerCase(),y=p.fillTx??p.fillTxnRef??null,f=p.actionsSucceeded!==!1;if(x==="filled")return{status:"filled",destinationTxHash:y,actionsSucceeded:f};if(x==="refunded"||x==="expired")return{status:x,destinationTxHash:null,actionsSucceeded:!1};a={status:"pending",destinationTxHash:y,actionsSucceeded:f}}}catch{}m<d-1&&await new Promise(l=>setTimeout(l,c))}return a}async function hn(r){const{name:i,identity:h,signer:c}=r,d=r.chainId??U.chainId,a=r.provider??"across",m=(r.beneficiary??await c.getAddress()).toLowerCase();let l=null,p=!1;console.info("[names] register start",{name:i,buyer:m,chainId:d,provider:a});try{const x=await st(d),y=ln(x);console.info("[names] step 1/6 sized reservation",{usdCents:y,manaRate:x});const f=await cn(h,i,{chainId:d,provider:a});console.info("[names] step 2/6 route fetched",{target:f.externalCall.target,selector:f.externalCall.selector,provider:f.provider,quoteId:f.quoteId});const C=await rt(h,y);if(l=C.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:C.credit.id,maxCreditedValue:C.maxCreditedValue}),ye.from(C.maxCreditedValue).lt(H))throw new Error("Credit under-sized for the name price");const k=dn(C.credit,f);let g;try{g=await Dt({chainId:d,buyer:m,signer:c,args:k})}catch(b){if(!(b instanceof Gt))throw b;g=await Zt(d,k,c)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:g}),await qt(g),p=!0,console.info("[names] step 5/6 origin tx confirmed",{originTxHash:g}),a==="across"){const b=await pn(g,r.acrossPoll);if(console.info("[names] step 6/6 across status",b),b.status==="pending")return{status:"pending",originTxHash:g};if(b.status!=="filled"||!b.actionsSucceeded)throw new Error("The name could not be registered on Ethereum; your funds were recovered.");return{status:"registered",originTxHash:g,destinationTxHash:b.destinationTxHash}}return{status:"pending",originTxHash:g}}catch(x){if(console.error("[names] register failed — raw error:",x,{name:i,buyer:m,originConfirmed:p}),x instanceof Vt)return{status:"pending",originTxHash:x.txHash};if(l&&!p&&await ot(h,[l]).catch(()=>{}),x instanceof we)throw x;const y=new Error(Jt(x,"Couldn't register the name. Please try again.",{sale:!0}));throw y.cause=x,y}}const xn=s.div`
|
|
2
2
|
position: fixed;
|
|
3
3
|
inset: 0;
|
|
4
4
|
z-index: 10000;
|
|
@@ -7,7 +7,7 @@ import{d as Le,r as u,j as e,e as nt}from"./react-DehiWSvs.js";import{c as U,r a
|
|
|
7
7
|
justify-content: center;
|
|
8
8
|
padding: 16px;
|
|
9
9
|
background: rgba(22, 21, 24, 0.55);
|
|
10
|
-
`,
|
|
10
|
+
`,mn=s.div`
|
|
11
11
|
width: 560px;
|
|
12
12
|
max-width: 100%;
|
|
13
13
|
max-height: 92vh;
|
|
@@ -112,7 +112,7 @@ import{d as Le,r as u,j as e,e as nt}from"./react-DehiWSvs.js";import{c as U,r a
|
|
|
112
112
|
font-family: ${t.font.sans};
|
|
113
113
|
font-size: 14px;
|
|
114
114
|
color: ${t.colors.muted2};
|
|
115
|
-
`,
|
|
115
|
+
`,me=s.div`
|
|
116
116
|
flex: none;
|
|
117
117
|
display: flex;
|
|
118
118
|
align-items: center;
|
|
@@ -127,7 +127,7 @@ import{d as Le,r as u,j as e,e as nt}from"./react-DehiWSvs.js";import{c as U,r a
|
|
|
127
127
|
height: 22px;
|
|
128
128
|
color: ${t.colors.brandViolet};
|
|
129
129
|
}
|
|
130
|
-
`,
|
|
130
|
+
`,fn=s.div`
|
|
131
131
|
margin-top: 16px;
|
|
132
132
|
padding: 16px;
|
|
133
133
|
border-radius: 12px;
|
|
@@ -347,7 +347,7 @@ import{d as Le,r as u,j as e,e as nt}from"./react-DehiWSvs.js";import{c as U,r a
|
|
|
347
347
|
outline: 2px solid ${t.colors.accent};
|
|
348
348
|
outline-offset: 2px;
|
|
349
349
|
}
|
|
350
|
-
`,
|
|
350
|
+
`,fe=s.div`
|
|
351
351
|
display: flex;
|
|
352
352
|
align-items: flex-start;
|
|
353
353
|
gap: 12px;
|
|
@@ -379,7 +379,7 @@ import{d as Le,r as u,j as e,e as nt}from"./react-DehiWSvs.js";import{c as U,r a
|
|
|
379
379
|
color: ${t.colors.accent};
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
|
-
`;function In({name:r,priceCredits:i,onClose:h}){const{session:c}=Ue(),{data:d,isError:a}=lt(c),
|
|
382
|
+
`;function In({name:r,priceCredits:i,onClose:h}){const{session:c}=Ue(),{data:d,isError:a}=lt(c),m=ct(),l=Le(),[p,x]=u.useState("confirm"),[y,f]=u.useState(""),[C,k]=u.useState(null),g=u.useRef(!1),b=y.trim().toLowerCase()===r.toLowerCase(),S=p==="completing",v=i!=null?be(i):"—",_=i==null,E=d==null?void 0:d.credits,B=i!=null&&E!=null?i-E:0,$=B>0,T=_?n("names.priceUnavailable"):$?n("names.insufficientCredits",{credits:be(B)}):null;u.useEffect(()=>{const w=D=>{D.key==="Escape"&&!S&&h()};document.addEventListener("keydown",w);const O=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",w),document.body.style.overflow=O}},[S,h]);async function I(){if(!(!c||!b||_||$||g.current)){g.current=!0,x("completing"),k(null);try{const w=await hn({name:r,identity:c.identity,signer:c.signer});ee("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:i??null,settlement:w.status}),m.invalidateQueries({queryKey:["usd-balance"]}),m.invalidateQueries({queryKey:["my-assets"]}),x(w.status==="registered"?"success":"pending")}catch(w){ee(xt(w)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:ht(w),purchase_type:"name"}),k(w instanceof we?n("names.errorRouteCost"):(w==null?void 0:w.message)||n("names.errorGeneric")),x("error")}finally{g.current=!1}}}const A=p!=="success"&&p!=="pending",N=dt(c==null?void 0:c.providerType);return e.jsx(xn,{onClick:S?void 0:h,role:"presentation",children:e.jsxs(mn,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:w=>w.stopPropagation(),children:[A&&e.jsxs(e.Fragment,{children:[e.jsxs(re,{children:[e.jsx(oe,{children:p==="error"?n("names.errorTitle"):n("names.buyTitle")}),e.jsx(ie,{onClick:h,disabled:S,"aria-label":n("buyModal.close"),children:e.jsx(R,{name:"close"})})]}),e.jsxs(ae,{children:[n("names.myCreditsBalance")," ",e.jsx(M,{})," ",se(d,a)]}),e.jsx(le,{})]}),(p==="confirm"||p==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(ce,{children:[e.jsx(de,{"aria-hidden":!0,children:"@"}),e.jsxs(pe,{children:[e.jsxs(he,{children:[r,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(xe,{children:n("names.subtitle")})]}),e.jsxs(me,{children:[e.jsx(M,{}),v]})]}),p==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(fe,{children:[e.jsx(R,{name:"info","aria-hidden":!0}),e.jsx("span",{children:C})]}),e.jsx(Me,{onClick:()=>x("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(fn,{children:[e.jsx(un,{children:n("names.confirmTitle")}),e.jsx(gn,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${An(r)}</b>`})}}),e.jsxs(bn,{children:[e.jsx(yn,{"aria-hidden":!0,children:"@"}),e.jsx(wn,{value:y,onChange:w=>f(w.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":n("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(y.length,8)}ch`}}),e.jsx(jn,{children:".dcl.eth"})]})]}),T?e.jsxs(fe,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(R,{name:"info","aria-hidden":!0}),e.jsx("span",{children:T})]}):null,e.jsx(Me,{onClick:()=>void I(),disabled:!b||!c||_||$,children:n("names.buyCta")})]})]}),p==="completing"&&e.jsxs(vn,{children:[e.jsx($n,{src:pt,alt:"",width:56,height:56}),e.jsx(Cn,{children:N?n("names.confirming"):n("names.completing")}),e.jsxs(kn,{children:[e.jsx(Sn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(En,{children:"1/1"})]})]}),p==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(re,{children:[e.jsx(oe,{children:n("names.pendingHeaderTitle")}),e.jsx(ie,{onClick:h,"aria-label":n("buyModal.close"),children:e.jsx(R,{name:"close"})})]}),e.jsxs(ae,{children:[n("names.myCreditsBalance")," ",e.jsx(M,{})," ",se(d,a)]}),e.jsx(le,{}),e.jsxs(fe,{"data-tone":"info",children:[e.jsx(R,{name:"info","aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("b",{children:n("names.pendingBannerBold")})," ",n("names.pendingBannerRest")]})]}),e.jsxs(ce,{style:{marginTop:20},children:[e.jsx(de,{"aria-hidden":!0,children:"@"}),e.jsxs(pe,{children:[e.jsxs(he,{children:[r,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(xe,{children:n("names.subtitle")})]}),e.jsxs(me,{children:[e.jsx(M,{}),v]})]}),e.jsx(Be,{children:e.jsx(We,{onClick:()=>{h(),l("/my-items")},children:n("names.myItems")})})]}),p==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(re,{children:[e.jsx(oe,{children:n("names.successHeaderTitle")}),e.jsx(ie,{onClick:h,"aria-label":n("buyModal.close"),children:e.jsx(R,{name:"close"})})]}),e.jsxs(ae,{children:[n("names.myCreditsBalance")," ",e.jsx(M,{})," ",se(d,a)]}),e.jsx(le,{}),e.jsxs(Rn,{children:[e.jsx(_n,{"aria-hidden":!0,children:e.jsx(R,{name:"check"})}),e.jsxs(Tn,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(ce,{style:{marginTop:20},children:[e.jsx(de,{"aria-hidden":!0,children:"@"}),e.jsxs(pe,{children:[e.jsxs(he,{children:[r,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(xe,{children:n("names.subtitle")})]}),e.jsxs(me,{children:[e.jsx(M,{}),v]})]}),e.jsxs(Be,{children:[e.jsx(We,{onClick:()=>{h(),l("/my-items")},children:n("names.myItems")}),e.jsx(zn,{href:U.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function An(r){return r.replace(/[&<>"']/g,i=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[i])}const Nn="https://cdn.decentraland.org/@dcl/shop/0.7.3-31000563578.commit-5745007/_assets/identity-B4DXDuJP.webp",Pn="https://cdn.decentraland.org/@dcl/shop/0.7.3-31000563578.commit-5745007/_assets/world-B-9aPlxu.webp",Mn="https://cdn.decentraland.org/@dcl/shop/0.7.3-31000563578.commit-5745007/_assets/invite-BfwIhP2C.webp",Bn="https://cdn.decentraland.org/@dcl/shop/0.7.3-31000563578.commit-5745007/_assets/governance-DnazlIjy.webp",Wn=s.div`
|
|
383
383
|
width: 100%;
|
|
384
384
|
min-width: 0;
|
|
385
385
|
`,Fn=s.nav`
|
|
@@ -438,12 +438,12 @@ import{d as Le,r as u,j as e,e as nt}from"./react-DehiWSvs.js";import{c as U,r a
|
|
|
438
438
|
padding: 40px 20px;
|
|
439
439
|
gap: 28px;
|
|
440
440
|
}
|
|
441
|
-
`,
|
|
441
|
+
`,Dn=s.div`
|
|
442
442
|
display: flex;
|
|
443
443
|
flex-direction: column;
|
|
444
444
|
align-items: center;
|
|
445
445
|
gap: 12px;
|
|
446
|
-
`,
|
|
446
|
+
`,Gn=s.h1`
|
|
447
447
|
margin: 0;
|
|
448
448
|
font-family: ${t.font.sans};
|
|
449
449
|
font-weight: 600;
|
|
@@ -489,7 +489,7 @@ import{d as Le,r as u,j as e,e as nt}from"./react-DehiWSvs.js";import{c as U,r a
|
|
|
489
489
|
${t.media.maxWidth("mobile")} {
|
|
490
490
|
border-radius: 16px;
|
|
491
491
|
}
|
|
492
|
-
`,
|
|
492
|
+
`,Jn=s.span`
|
|
493
493
|
position: absolute;
|
|
494
494
|
left: -9999px;
|
|
495
495
|
top: 0;
|
|
@@ -504,7 +504,7 @@ import{d as Le,r as u,j as e,e as nt}from"./react-DehiWSvs.js";import{c as U,r a
|
|
|
504
504
|
${t.media.maxWidth("mobile")} {
|
|
505
505
|
font-size: 16px;
|
|
506
506
|
}
|
|
507
|
-
`,
|
|
507
|
+
`,Qn=s.div`
|
|
508
508
|
position: absolute;
|
|
509
509
|
top: calc(100% + 8px);
|
|
510
510
|
left: 0;
|
|
@@ -737,13 +737,13 @@ import{d as Le,r as u,j as e,e as nt}from"./react-DehiWSvs.js";import{c as U,r a
|
|
|
737
737
|
border: 0.25px solid ${t.colors.muted2};
|
|
738
738
|
border-radius: ${t.radius.card};
|
|
739
739
|
overflow: hidden;
|
|
740
|
-
`,
|
|
740
|
+
`,J=s.img`
|
|
741
741
|
display: block;
|
|
742
742
|
width: calc(100% + 0.5px);
|
|
743
743
|
margin: -0.25px -0.25px 0;
|
|
744
744
|
aspect-ratio: 388 / 235;
|
|
745
745
|
object-fit: cover;
|
|
746
|
-
`,
|
|
746
|
+
`,Q=s.div`
|
|
747
747
|
flex: 1;
|
|
748
748
|
display: flex;
|
|
749
749
|
flex-direction: column;
|
|
@@ -798,4 +798,4 @@ import{d as Le,r as u,j as e,e as nt}from"./react-DehiWSvs.js";import{c as U,r a
|
|
|
798
798
|
clip: rect(0, 0, 0, 0);
|
|
799
799
|
white-space: nowrap;
|
|
800
800
|
border: 0;
|
|
801
|
-
`,xs="https://docs.decentraland.org/creator/worlds/about/",fs="https://governance.decentraland.org";function ms(r){const i=typeof window<"u"?window.location.hostname:"";return`${i.endsWith("decentraland.org")?"https://decentraland.org":i.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(r)}`}function us({onBack:r}){He({title:n("seo.names.title"),description:n("seo.names.description")});const{session:i,signIn:h}=Ue(),{data:c}=Oe(),d=c?Ge(H,c):null,[a,f]=u.useState(""),[l,p]=u.useState("idle"),[x,y]=u.useState(!1),m=u.useRef(null),[C,k]=u.useState(void 0);u.useLayoutEffect(()=>{m.current&&k(m.current.offsetWidth)},[a]),u.useEffect(()=>{if(!Ne(a).ok){p(a.length===0?"idle":"invalid");return}p("checking");const E=new AbortController,B=setTimeout(()=>{(async()=>{try{const $=await on(a,{signal:E.signal});p($)}catch($){if(($==null?void 0:$.name)==="AbortError")return;p("error")}})()},400);return()=>{clearTimeout(B),E.abort()}},[a]);const g=Ne(a),b=g.ok&&(l==="available"||l==="error");function S(){if(b){if(!i){h();return}y(!0)}}const v=e.jsxs(e.Fragment,{children:[n("names.claim"),d!=null?e.jsxs(os,{children:[e.jsx(M,{}),be(d)]}):null]});return e.jsxs(Wn,{"data-testid":"names-page",children:[e.jsxs(Fn,{"aria-label":n("names.breadcrumbAria"),children:[e.jsx(Ln,{onClick:r,children:n("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(Un,{children:n("names.breadcrumbCurrent")})]}),e.jsxs(Hn,{children:[e.jsxs(On,{children:[e.jsxs(Gn,{children:[e.jsx(Dn,{children:n("names.heroTitle")}),e.jsx(qn,{children:n("names.heroSubtitle")})]}),e.jsxs(Vn,{children:[e.jsxs(Zn,{children:[e.jsxs(Kn,{invalid:l==="taken",children:[e.jsxs(Yn,{children:[e.jsx(es,{"aria-hidden":!0,children:"@"}),e.jsx(ts,{value:a,onChange:_=>f(nn(_.target.value)),placeholder:n("names.inputPlaceholder"),"aria-label":n("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:te,style:{width:C!=null?`${C}px`:void 0}}),e.jsx(Qn,{ref:m,"aria-hidden":!0,children:a||n("names.inputPlaceholder")}),e.jsx(ns,{children:n("names.suffix")})]}),a.length>0?e.jsxs(ss,{"aria-hidden":!0,children:[a.length,"/",te]}):null,e.jsx(qe,{onClick:S,disabled:!b,"data-testid":"names-claim",children:v})]}),l==="taken"?e.jsxs(Jn,{role:"status","data-testid":"names-taken",children:[e.jsx(R,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:n("names.taken")}),e.jsxs(Xn,{href:ms(a),target:"_blank",rel:"noopener noreferrer",children:[n("names.takenMakeOffer"),e.jsx(R,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null]}),e.jsx(rs,{onClick:S,disabled:!b,children:v}),l==="checking"?e.jsx(ue,{tone:"muted",role:"status","data-testid":"names-checking",children:n("names.checking")}):l==="error"?e.jsx(ue,{tone:"muted",role:"status",children:n("names.checkError")}):l==="invalid"&&!g.ok&&g.reason==="too-short"?e.jsx(ue,{tone:"muted",role:"status",children:n("names.tooShort",{min:De})}):null,e.jsx(hs,{role:"status","aria-live":"polite",children:l==="available"?n("names.available",{name:a}):""})]})]}),e.jsxs(is,{children:[e.jsxs(as,{children:[e.jsx(ls,{children:n("names.whyTitle")}),e.jsx(cs,{children:n("names.whyIntro")})]}),e.jsxs(ds,{children:[e.jsxs(K,{children:[e.jsx(Q,{src:Nn,alt:""}),e.jsxs(J,{children:[e.jsx(X,{children:n("names.why1Title")}),e.jsx(Y,{children:n("names.why1")})]})]}),e.jsxs(K,{children:[e.jsx(Q,{src:Pn,alt:""}),e.jsxs(J,{children:[e.jsx(X,{children:n("names.why2Title")}),e.jsxs(Y,{children:[n("names.why2")," ",e.jsx(ps,{children:n("names.why2Address")})]}),e.jsxs(Fe,{href:xs,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(R,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(K,{children:[e.jsx(Q,{src:Mn,alt:""}),e.jsxs(J,{children:[e.jsx(X,{children:n("names.why3Title")}),e.jsx(Y,{children:n("names.why3")})]})]}),e.jsxs(K,{children:[e.jsx(Q,{src:Bn,alt:""}),e.jsxs(J,{children:[e.jsx(X,{children:n("names.why4Title")}),e.jsx(Y,{children:n("names.why4")}),e.jsxs(Fe,{href:fs,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(R,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),x?e.jsx(In,{name:a,priceCredits:d,onClose:()=>y(!1)}):null]})}const gs="data:image/svg+xml,%3csvg%20width='101'%20height='101'%20viewBox='0%200%20101%20101'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M42.4493%2040.9855L30.7394%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M30.7391%2040.9855L42.449%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M36.2621%2071.0604C29.6047%2071.0604%2023.9709%2068.7542%2019.3608%2064.1416C14.7507%2059.5291%2012.4445%2053.8953%2012.442%2047.2404C12.4396%2040.5854%2014.7459%2034.9516%2019.3608%2030.3391C23.9758%2025.7266%2029.6096%2023.4203%2036.2621%2023.4203C42.9146%2023.4203%2048.5496%2025.7266%2053.167%2030.3391C57.7844%2034.9516%2060.0895%2040.5854%2060.0822%2047.2404C60.0822%2049.9277%2059.6546%2052.4624%2058.7995%2054.8445C57.9445%2057.2265%2056.784%2059.3336%2055.3181%2061.1659L75.84%2081.6878C76.5119%2082.3597%2076.8478%2083.2148%2076.8478%2084.2531C76.8478%2085.2914%2076.5119%2086.1465%2075.84%2086.8183C75.1682%2087.4902%2074.3131%2087.8261%2073.2748%2087.8261C72.2365%2087.8261%2071.3814%2087.4902%2070.7096%2086.8183L50.1877%2066.2964C48.3554%2067.7623%2046.2482%2068.9227%2043.8662%2069.7778C41.4842%2070.6329%2038.9495%2071.0604%2036.2621%2071.0604ZM36.2621%2063.7312C40.8429%2063.7312%2044.7372%2062.1285%2047.9449%2058.9232C51.1527%2055.7179%2052.7554%2051.8236%2052.7529%2047.2404C52.7505%2042.6571%2051.1478%2038.7641%2047.9449%2035.5612C44.742%2032.3583%2040.8478%2030.7544%2036.2621%2030.7495C31.6764%2030.7447%2027.7834%2032.3485%2024.5829%2035.5612C21.3825%2038.7739%2019.7786%2042.6669%2019.7713%2047.2404C19.764%2051.8138%2021.3678%2055.7081%2024.5829%2058.9232C27.798%2062.1383%2031.6911%2063.7409%2036.2621%2063.7312Z'%20fill='url(%23paint0_linear_search_empty)'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_search_empty'%20x1='10.4127'%20y1='55.6273'%20x2='124.009'%20y2='44.925'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF2D55'/%3e%3cstop%20offset='1'%20stop-color='%23FFBC5B'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",ge=48,bs=["all","on_sale","not_for_sale"];function Ws(){const[r,i]=nt(),h=Le(),c=(r.get("q")??"").trim().toLowerCase(),d=(r.get("q")??"").trim();He({title:d?n("seo.collectibles.searchTitle",{query:d}):n("seo.collectibles.title"),description:n("seo.collectibles.description")});const a=r.get("category")??(c?"all":"wearable"),f=r.get("status"),l=f&&bs.includes(f)?f:"on_sale",p=(o,j)=>i(z=>{const ne=new URLSearchParams(z);return j==null?ne.delete(o):ne.set(o,j),ne},{replace:!0}),[x,y]=u.useState(null),[m,C]=u.useState([]),[k,g]=u.useState(""),[b,S]=u.useState(""),[v,_]=u.useState(!1),[E,B]=u.useState("newest"),[$,T]=u.useState(!1);u.useEffect(()=>{if(!$)return;const o=z=>{z.key==="Escape"&&T(!1)};document.addEventListener("keydown",o);const j=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",o),document.body.style.overflow=j}},[$]);const I=l==="on_sale",A=k&&!Number.isNaN(Number(k))?Number(k):void 0,N=b&&!Number.isNaN(Number(b))?Number(b):void 0,w=ft(),O=x?Ft[x]:void 0,G=(Ae.find(o=>o.key===E)??Ae[0]).server,je={category:a,rarities:m.length?m:void 0,wearableCategories:O,minPriceCredits:A,maxPriceCredits:N,search:c||void 0,sortBy:G,isSmart:v||void 0,onSale:!0,listingType:w?void 0:"primary"},ve={category:a,rarities:m.length?m:void 0,wearableCategories:O,search:c||void 0,sortBy:G,isWearableSmart:v||void 0,isOnSale:l==="not_for_sale"?!1:void 0},{items:F,total:$e,isLoading:P,isPlaceholderData:W,error:Ce,hasNextPage:Ve,isFetchingNextPage:ke,isFetchNextPageError:Ze,fetchNextPage:Ke}=Ut(I?["shop-items",je]:["catalog-items",ve],o=>I?ut({...je,first:ge,skip:o}):gt({...ve,first:ge,skip:o}),{enabled:a!=="names"}),D=$e,{data:Se,isError:Qe,isPending:Je}=Oe(),Xe=o=>Se&&o.manaWei?Ge(o.manaWei,Se):null,Ye=I&&Je&&F.some(o=>o.source==="legacy"),Ee=P||W||Ye,et=P?15:Math.min(Math.max(F.length,1),ge),Re=u.useRef(null);u.useEffect(()=>{P||W||!c||Re.current===c||(Re.current=c,ee("Shop Searched",{query:c,result_count:D}))},[c,P,W,D]);const q=u.useRef("__init__");u.useEffect(()=>{if(P||W)return;const o=JSON.stringify({category:a,subCategory:x,rarities:m,min:A,max:N,sort:E,status:l,smart:v});if(q.current==="__init__"||q.current===o){q.current=o;return}q.current=o,ee("Shop Applied Filter",{filters:{category:a,sub_category:x,rarities:m,min_price_credits:A??null,max_price_credits:N??null,status:l,smart:v,sort:E},result_count:D})},[a,x,m,A,N,E,l,v,P,W,D]);function _e(o){p("category",o),y(null)}function Te(o){p("status",o==="on_sale"?null:o)}function ze(o){C(j=>j.includes(o)?j.filter(z=>z!==o):[...j,o])}function tt(){i(o=>{const j=new URLSearchParams(o);return j.delete("category"),j.delete("status"),j},{replace:!0}),y(null),C([]),g(""),S(""),_(!1)}const L=[];(A!=null||N!=null)&&L.push({key:"price",label:n("filter.price"),onRemove:()=>{g(""),S("")}});for(const o of Bt)m.includes(o)&&L.push({key:`rarity-${o}`,label:mt(o),onRemove:()=>ze(o)});return v&&L.push({key:"smart",label:n("filter.smart"),onRemove:()=>_(!1)}),l!=="on_sale"&&L.push({key:"status",label:l==="all"?n("filter.statusAll"):n("filter.notForSale"),onRemove:()=>Te("on_sale")}),e.jsxs(bt,{"data-testid":"browse",children:[a!=="names"&&e.jsxs(e.Fragment,{children:[$?e.jsx(yt,{onClick:()=>T(!1),"aria-hidden":!0}):null,e.jsxs(wt,{"data-open":$||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(jt,{children:[e.jsx(vt,{children:n("assets.filters")}),e.jsx($t,{onClick:()=>T(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(Ct,{children:e.jsx(kt,{category:a,subCategory:x,onCategory:_e,onSub:y,priceMin:k,priceMax:b,onPriceMin:g,onPriceMax:S,rarities:m,onToggleRarity:ze,status:l,onStatus:Te,smart:v,onSmart:_})}),e.jsx(St,{children:e.jsx(Et,{type:"button",onClick:()=>T(!1),children:n("assets.showItems")})})]})]}),e.jsx(Rt,{children:a==="names"?e.jsx(us,{onBack:()=>_e("wearable")}):e.jsxs(e.Fragment,{children:[e.jsx(Wt,{sort:E,onSort:B,total:$e,loading:P||W,query:c,onOpenFilters:()=>T(!0),chips:L,onClearChips:tt}),Qe&&I&&F.some(o=>o.source==="legacy")?e.jsx(_t,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,Ce?e.jsx(Ht,{message:n("assets.loadError"),testId:"browse-error"}):null,!Ee&&F.length===0&&!Ce?e.jsxs(Tt,{"data-testid":"browse-empty",children:[e.jsx(zt,{src:gs,alt:""}),e.jsxs(It,{children:[e.jsx(At,{children:n("assets.empty.title")}),e.jsx(Nt,{children:d?e.jsxs(e.Fragment,{children:[n("assets.empty.searchBefore"),e.jsx("b",{children:d}),n("assets.empty.searchAfter")]}):n("assets.empty.filters")})]}),e.jsx(Pt,{children:e.jsx(Mt,{type:"button",onClick:()=>h("/overview"),children:n("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx(en,{"data-testid":"grid",children:Ee?e.jsx(Ie,{count:et}):e.jsxs(e.Fragment,{children:[F.map(o=>{if(!I)return e.jsx(V,{item:o,mode:"view"},Z(o));const j=o;if(j.source!=="legacy")return e.jsx(V,{item:o},Z(o));const z=Xe(j);return z==null?e.jsx(V,{item:o,mode:"view"},Z(o)):e.jsx(V,{item:{...j,priceCredits:z}},Z(o))}),ke?e.jsx(Ie,{count:6}):null]})}),e.jsx(Lt,{hasNextPage:Ve,isFetching:ke,isError:Ze,onLoadMore:()=>void Ke()})]})]})})]})}export{Ws as Assets};
|
|
801
|
+
`,xs="https://docs.decentraland.org/creator/worlds/about/",ms="https://governance.decentraland.org";function fs(r){const i=typeof window<"u"?window.location.hostname:"";return`${i.endsWith("decentraland.org")?"https://decentraland.org":i.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(r)}`}function us({onBack:r}){He({title:n("seo.names.title"),description:n("seo.names.description")});const{session:i,signIn:h}=Ue(),{data:c}=Oe(),d=c?De(H,c):null,[a,m]=u.useState(""),[l,p]=u.useState("idle"),[x,y]=u.useState(!1),f=u.useRef(null),[C,k]=u.useState(void 0);u.useLayoutEffect(()=>{f.current&&k(f.current.offsetWidth)},[a]),u.useEffect(()=>{if(!Ne(a).ok){p(a.length===0?"idle":"invalid");return}p("checking");const E=new AbortController,B=setTimeout(()=>{(async()=>{try{const $=await on(a,{signal:E.signal});p($)}catch($){if(($==null?void 0:$.name)==="AbortError")return;p("error")}})()},400);return()=>{clearTimeout(B),E.abort()}},[a]);const g=Ne(a),b=g.ok&&(l==="available"||l==="error");function S(){if(b){if(!i){h();return}y(!0)}}const v=e.jsxs(e.Fragment,{children:[n("names.claim"),d!=null?e.jsxs(os,{children:[e.jsx(M,{}),be(d)]}):null]});return e.jsxs(Wn,{"data-testid":"names-page",children:[e.jsxs(Fn,{"aria-label":n("names.breadcrumbAria"),children:[e.jsx(Ln,{onClick:r,children:n("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(Un,{children:n("names.breadcrumbCurrent")})]}),e.jsxs(Hn,{children:[e.jsxs(On,{children:[e.jsxs(Dn,{children:[e.jsx(Gn,{children:n("names.heroTitle")}),e.jsx(qn,{children:n("names.heroSubtitle")})]}),e.jsxs(Vn,{children:[e.jsxs(Zn,{children:[e.jsxs(Kn,{invalid:l==="taken",children:[e.jsxs(Yn,{children:[e.jsx(es,{"aria-hidden":!0,children:"@"}),e.jsx(ts,{value:a,onChange:_=>m(nn(_.target.value)),placeholder:n("names.inputPlaceholder"),"aria-label":n("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:te,style:{width:C!=null?`${C}px`:void 0}}),e.jsx(Jn,{ref:f,"aria-hidden":!0,children:a||n("names.inputPlaceholder")}),e.jsx(ns,{children:n("names.suffix")})]}),a.length>0?e.jsxs(ss,{"aria-hidden":!0,children:[a.length,"/",te]}):null,e.jsx(qe,{onClick:S,disabled:!b,"data-testid":"names-claim",children:v})]}),l==="taken"?e.jsxs(Qn,{role:"status","data-testid":"names-taken",children:[e.jsx(R,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:n("names.taken")}),e.jsxs(Xn,{href:fs(a),target:"_blank",rel:"noopener noreferrer",children:[n("names.takenMakeOffer"),e.jsx(R,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null]}),e.jsx(rs,{onClick:S,disabled:!b,children:v}),l==="checking"?e.jsx(ue,{tone:"muted",role:"status","data-testid":"names-checking",children:n("names.checking")}):l==="error"?e.jsx(ue,{tone:"muted",role:"status",children:n("names.checkError")}):l==="invalid"&&!g.ok&&g.reason==="too-short"?e.jsx(ue,{tone:"muted",role:"status",children:n("names.tooShort",{min:Ge})}):null,e.jsx(hs,{role:"status","aria-live":"polite",children:l==="available"?n("names.available",{name:a}):""})]})]}),e.jsxs(is,{children:[e.jsxs(as,{children:[e.jsx(ls,{children:n("names.whyTitle")}),e.jsx(cs,{children:n("names.whyIntro")})]}),e.jsxs(ds,{children:[e.jsxs(K,{children:[e.jsx(J,{src:Nn,alt:""}),e.jsxs(Q,{children:[e.jsx(X,{children:n("names.why1Title")}),e.jsx(Y,{children:n("names.why1")})]})]}),e.jsxs(K,{children:[e.jsx(J,{src:Pn,alt:""}),e.jsxs(Q,{children:[e.jsx(X,{children:n("names.why2Title")}),e.jsxs(Y,{children:[n("names.why2")," ",e.jsx(ps,{children:n("names.why2Address")})]}),e.jsxs(Fe,{href:xs,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(R,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(K,{children:[e.jsx(J,{src:Mn,alt:""}),e.jsxs(Q,{children:[e.jsx(X,{children:n("names.why3Title")}),e.jsx(Y,{children:n("names.why3")})]})]}),e.jsxs(K,{children:[e.jsx(J,{src:Bn,alt:""}),e.jsxs(Q,{children:[e.jsx(X,{children:n("names.why4Title")}),e.jsx(Y,{children:n("names.why4")}),e.jsxs(Fe,{href:ms,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(R,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),x?e.jsx(In,{name:a,priceCredits:d,onClose:()=>y(!1)}):null]})}const gs="data:image/svg+xml,%3csvg%20width='101'%20height='101'%20viewBox='0%200%20101%20101'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M42.4493%2040.9855L30.7394%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M30.7391%2040.9855L42.449%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M36.2621%2071.0604C29.6047%2071.0604%2023.9709%2068.7542%2019.3608%2064.1416C14.7507%2059.5291%2012.4445%2053.8953%2012.442%2047.2404C12.4396%2040.5854%2014.7459%2034.9516%2019.3608%2030.3391C23.9758%2025.7266%2029.6096%2023.4203%2036.2621%2023.4203C42.9146%2023.4203%2048.5496%2025.7266%2053.167%2030.3391C57.7844%2034.9516%2060.0895%2040.5854%2060.0822%2047.2404C60.0822%2049.9277%2059.6546%2052.4624%2058.7995%2054.8445C57.9445%2057.2265%2056.784%2059.3336%2055.3181%2061.1659L75.84%2081.6878C76.5119%2082.3597%2076.8478%2083.2148%2076.8478%2084.2531C76.8478%2085.2914%2076.5119%2086.1465%2075.84%2086.8183C75.1682%2087.4902%2074.3131%2087.8261%2073.2748%2087.8261C72.2365%2087.8261%2071.3814%2087.4902%2070.7096%2086.8183L50.1877%2066.2964C48.3554%2067.7623%2046.2482%2068.9227%2043.8662%2069.7778C41.4842%2070.6329%2038.9495%2071.0604%2036.2621%2071.0604ZM36.2621%2063.7312C40.8429%2063.7312%2044.7372%2062.1285%2047.9449%2058.9232C51.1527%2055.7179%2052.7554%2051.8236%2052.7529%2047.2404C52.7505%2042.6571%2051.1478%2038.7641%2047.9449%2035.5612C44.742%2032.3583%2040.8478%2030.7544%2036.2621%2030.7495C31.6764%2030.7447%2027.7834%2032.3485%2024.5829%2035.5612C21.3825%2038.7739%2019.7786%2042.6669%2019.7713%2047.2404C19.764%2051.8138%2021.3678%2055.7081%2024.5829%2058.9232C27.798%2062.1383%2031.6911%2063.7409%2036.2621%2063.7312Z'%20fill='url(%23paint0_linear_search_empty)'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_search_empty'%20x1='10.4127'%20y1='55.6273'%20x2='124.009'%20y2='44.925'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF2D55'/%3e%3cstop%20offset='1'%20stop-color='%23FFBC5B'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",ge=48,bs=["all","on_sale","not_for_sale"];function Ws(){const[r,i]=nt(),h=Le(),c=(r.get("q")??"").trim().toLowerCase(),d=(r.get("q")??"").trim();He({title:d?n("seo.collectibles.searchTitle",{query:d}):n("seo.collectibles.title"),description:n("seo.collectibles.description")});const a=r.get("category")??(c?"all":"wearable"),m=r.get("status"),l=m&&bs.includes(m)?m:"on_sale",p=(o,j)=>i(z=>{const ne=new URLSearchParams(z);return j==null?ne.delete(o):ne.set(o,j),ne},{replace:!0}),[x,y]=u.useState(null),[f,C]=u.useState([]),[k,g]=u.useState(""),[b,S]=u.useState(""),[v,_]=u.useState(!1),[E,B]=u.useState("newest"),[$,T]=u.useState(!1);u.useEffect(()=>{if(!$)return;const o=z=>{z.key==="Escape"&&T(!1)};document.addEventListener("keydown",o);const j=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",o),document.body.style.overflow=j}},[$]);const I=l==="on_sale",A=k&&!Number.isNaN(Number(k))?Number(k):void 0,N=b&&!Number.isNaN(Number(b))?Number(b):void 0,w=mt(),O=x?Ft[x]:void 0,D=(Ae.find(o=>o.key===E)??Ae[0]).server,je={category:a,rarities:f.length?f:void 0,wearableCategories:O,minPriceCredits:A,maxPriceCredits:N,search:c||void 0,sortBy:D,isSmart:v||void 0,onSale:!0,listingType:w?void 0:"primary"},ve={category:a,rarities:f.length?f:void 0,wearableCategories:O,search:c||void 0,sortBy:D,isWearableSmart:v||void 0,isOnSale:l==="not_for_sale"?!1:void 0},{items:F,total:$e,isLoading:P,isPlaceholderData:W,error:Ce,hasNextPage:Ve,isFetchingNextPage:ke,isFetchNextPageError:Ze,fetchNextPage:Ke}=Ut(I?["shop-items",je]:["catalog-items",ve],o=>I?ut({...je,first:ge,skip:o}):gt({...ve,first:ge,skip:o}),{enabled:a!=="names"}),G=$e,{data:Se,isError:Je,isPending:Qe}=Oe(),Xe=o=>Se&&o.manaWei?De(o.manaWei,Se):null,Ye=I&&Qe&&F.some(o=>o.source==="legacy"),Ee=P||W||Ye,et=P?15:Math.min(Math.max(F.length,1),ge),Re=u.useRef(null);u.useEffect(()=>{P||W||!c||Re.current===c||(Re.current=c,ee("Shop Searched",{query:c,result_count:G}))},[c,P,W,G]);const q=u.useRef("__init__");u.useEffect(()=>{if(P||W)return;const o=JSON.stringify({category:a,subCategory:x,rarities:f,min:A,max:N,sort:E,status:l,smart:v});if(q.current==="__init__"||q.current===o){q.current=o;return}q.current=o,ee("Shop Applied Filter",{filters:{category:a,sub_category:x,rarities:f,min_price_credits:A??null,max_price_credits:N??null,status:l,smart:v,sort:E},result_count:G})},[a,x,f,A,N,E,l,v,P,W,G]);function _e(o){p("category",o),y(null)}function Te(o){p("status",o==="on_sale"?null:o)}function ze(o){C(j=>j.includes(o)?j.filter(z=>z!==o):[...j,o])}function tt(){i(o=>{const j=new URLSearchParams(o);return j.delete("category"),j.delete("status"),j},{replace:!0}),y(null),C([]),g(""),S(""),_(!1)}const L=[];(A!=null||N!=null)&&L.push({key:"price",label:n("filter.price"),onRemove:()=>{g(""),S("")}});for(const o of Bt)f.includes(o)&&L.push({key:`rarity-${o}`,label:ft(o),onRemove:()=>ze(o)});return v&&L.push({key:"smart",label:n("filter.smart"),onRemove:()=>_(!1)}),l!=="on_sale"&&L.push({key:"status",label:l==="all"?n("filter.statusAll"):n("filter.notForSale"),onRemove:()=>Te("on_sale")}),e.jsxs(bt,{"data-testid":"browse",children:[a!=="names"&&e.jsxs(e.Fragment,{children:[$?e.jsx(yt,{onClick:()=>T(!1),"aria-hidden":!0}):null,e.jsxs(wt,{"data-open":$||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(jt,{children:[e.jsx(vt,{children:n("assets.filters")}),e.jsx($t,{onClick:()=>T(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(Ct,{children:e.jsx(kt,{category:a,subCategory:x,onCategory:_e,onSub:y,priceMin:k,priceMax:b,onPriceMin:g,onPriceMax:S,rarities:f,onToggleRarity:ze,status:l,onStatus:Te,smart:v,onSmart:_})}),e.jsx(St,{children:e.jsx(Et,{type:"button",onClick:()=>T(!1),children:n("assets.showItems")})})]})]}),e.jsx(Rt,{children:a==="names"?e.jsx(us,{onBack:()=>_e("wearable")}):e.jsxs(e.Fragment,{children:[e.jsx(Wt,{sort:E,onSort:B,total:$e,loading:P||W,query:c,onOpenFilters:()=>T(!0),chips:L,onClearChips:tt}),Je&&I&&F.some(o=>o.source==="legacy")?e.jsx(_t,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,Ce?e.jsx(Ht,{message:n("assets.loadError"),testId:"browse-error"}):null,!Ee&&F.length===0&&!Ce?e.jsxs(Tt,{"data-testid":"browse-empty",children:[e.jsx(zt,{src:gs,alt:""}),e.jsxs(It,{children:[e.jsx(At,{children:n("assets.empty.title")}),e.jsx(Nt,{children:d?e.jsxs(e.Fragment,{children:[n("assets.empty.searchBefore"),e.jsx("b",{children:d}),n("assets.empty.searchAfter")]}):n("assets.empty.filters")})]}),e.jsx(Pt,{children:e.jsx(Mt,{type:"button",onClick:()=>h("/overview"),children:n("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx(en,{"data-testid":"grid",children:Ee?e.jsx(Ie,{count:et}):e.jsxs(e.Fragment,{children:[F.map(o=>{if(!I)return e.jsx(V,{item:o,mode:"view"},Z(o));const j=o;if(j.source!=="legacy")return e.jsx(V,{item:o},Z(o));const z=Xe(j);return z==null?e.jsx(V,{item:o,mode:"view"},Z(o)):e.jsx(V,{item:{...j,priceCredits:z}},Z(o))}),ke?e.jsx(Ie,{count:6}):null]})}),e.jsx(Lt,{hasNextPage:Ve,isFetching:ke,isError:Ze,onLoadMore:()=>void Ke()})]})]})})]})}export{Ws as Assets};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as $,j as t}from"./react-DehiWSvs.js";import{R as T,C as se,a as ae,b as re}from"./categories-
|
|
1
|
+
import{r as $,j as t}from"./react-DehiWSvs.js";import{R as T,C as se,a as ae,b as re}from"./categories-C1JdJ-IT.js";import{n as c,T as le}from"./Tooltip-E9qudNC4.js";import{t as e,s as o,I as g,d as s,ag as ce,e as v}from"./index-DyLYzoRb.js";const de=o.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 12px;
|